SpaceClient
Client for working with a specific space. Provides methods for managing subspaces, entities (scripts, queries, connections), and files.
Constructors
new SpaceClient()
new SpaceClient(
dart):SpaceClient
Parameters
| Parameter | Type |
|---|---|
dart | any |
Returns
Source
Properties
| Property | Type |
|---|---|
dart | any |
Accessors
children
getchildren():SpaceChildrenClient
Returns a client for accessing children of this space
Returns
Source
files
getfiles():SpaceFilesClient
Returns a client for accessing files in this space
Returns
Source
Methods
addEntity()
addEntity(
entityId,link):Promise<void>
Adds an entity (script, query, connection, or another space) to this space. When link is false (default), the entity is moved from its current location to this space. When link is true, creates a reference without moving - the entity can appear in multiple spaces. Moving a space preserves all its files, nested subspaces, and contained entities.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
entityId | string | undefined | The unique identifier of the entity to add |
link | boolean | false | If true, creates a link reference instead of moving the entity (default: false) |
Returns
Promise<void>
Source
addSubspace()
addSubspace(
childSpace,link):Promise<Project>
Adds a child space (subspace) under this space. The subspace will have its own storage with a namespaced path derived from the parent hierarchy (e.g., 'ParentSpace:ChildSpace:'). You can provide existing space, then based on the link parameter the subspace will be moved or reference will be created.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
childSpace | string | Project | undefined | The subspace name or an existing space. |
link | boolean | false | If true, creates a link reference instead of moving the subspace (default: false). When only the subspace name is provided, this parameter is ignored. |
Returns
Promise <Project>
Source
removeEntity()
removeEntity(
entityId):Promise<void>
Removes an entity from this space. Note: If the entity is linked, only reference will be deleted.
Parameters
| Parameter | Type | Description |
|---|---|---|
entityId | string | Entity.id |
Returns
Promise<void>
Source
subspaceExists()
subspaceExists(
name):Promise<boolean>
Checks if a subspace with the given name exists in the current space.
Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
Promise<boolean>