trimble-connect-sdk
Version:
Trimble Connect SDK for JavaScript
721 lines (720 loc) • 36.5 kB
TypeScript
import { DeleteOptions, GetOptions, ListOptions, PagedItems, ResourceIdentityWithError, UserInfoResponse, WSSubscriptionResponse } from './common';
import { Configuration } from './config';
import { Policy } from './policy';
import { ServiceResponse } from './response';
import { Service } from './service';
export declare const DefaultOrganizerServiceUri = "https://org-api.connect.trimble.com/v1/";
/**
* The request body for the @see Organiser#createTree operation.
*/
export interface CreateTreeRequest {
/** The optional identifier for the new tree, if not provided service will generate an unique identifier. */
id?: string;
/** The access conrol policy document to be attached to the tree. */
policy?: Policy;
/** The optional tree name. */
name?: string;
/** The optional description. */
description?: string;
/** The type of the tree that defines the symantic. */
type: string;
/** The optional node metadata. */
metadata?: object;
}
/**
* The request parameters for the @see Organiser#getTree operation.
*/
export interface GetTreeOptions extends GetOptions {
/** Controls which optional node attributes are returned, currently only metadata is supported. */
fields?: string;
}
/**
* The request parameters for the @see Organiser#getNode operation.
*/
export interface GetNodeOptions extends GetOptions {
/** Controls whether to send list of link toghether with the node descriptor. By default links are sent. App can reduce the payload size by using this parameter. */
nolinks?: boolean;
/** Controls which optional node attributes are returned, currently only metadata is supported. */
fields?: string;
}
/**
* The request parameters for the @see Organiser#putNodeGeometry operation.
* Does not extend GetOptions because the flag defined there has no meaning here.
*/
export interface PutGeometryOptions {
/**
* The last seen version of the node descriptor.
* If provided service will use this information for the concurrency control and will refuse to apply changes if current version is not equal to version provided in the request.
*/
v?: number;
}
/**
* The create tree options
*/
export interface CreateTreeOptions {
/** Controls which optional node attributes are returned, currently only metadata is supported. */
fields?: string;
}
/**
* The request body for the @see Organiser#updateTree operation.
* All properties are optional, if property is not provided in the request the property will retain it's old value.
*/
export interface UpdateTreeRequest {
/**
* The last seen version of the tree descriptor.
* If provided service will use this information for the concurency control and will refuse to apply changes if current version is not equal to version provided in the request.
*/
v?: number;
/**
* The access conrol policy document to be attached to the tree.
* If property is specified caller must have org:UpdateTreePolicy right to execute this operation in addition to org:UpdateTree.
*/
policy?: Policy;
/** The new name. */
name?: string;
/** The new description. */
description?: string;
/** The optional node metadata. */
metadata?: object;
}
/**
* The update tree options
*/
export interface UpdateTreeOptions {
/** Controls which optional node attributes are returned, currently only metadata is supported. */
fields?: string;
}
/**
* The tree descriptor returned from @see Organiser#createTree , @see Organiser#updateTree , @see Organiser#deleteTree and @see Organiser#getTree operations.
*/
export interface TreeResponse {
/** The unique tree identifier. */
id: string;
/** The creation timestamp in ISO format. */
createdAt: string;
/** The identifier of the principal who created the tree. */
createdBy: string;
/** The last modification timestamp in ISO format. */
modifiedAt: string;
/** The identifier of the princilat who last modified the tree descriptor. */
modifiedBy: string;
/** The current version of the tree descriptor. */
v: number;
/** The access conrol policy document attached to the tree. This property is returned only if caller has org:GetTreePolicy right. */
policy?: Policy;
/** The deletion marker. If not present or false the tree is active, otherwise the tree is marked as deleted. */
deleted?: boolean;
/** The tree short name. */
name?: string;
/** The optional description. */
description?: string;
/** The tree type that defines the symantic. */
type: string;
/** The collection of actions current user has rights to perform on this resource at the moment the response is generated by service. Not returned when specific version is requested. */
_actions?: string[];
/** The node metadata. */
metadata?: object;
}
/**
* The request body for the @see Organiser#createNode operation.
*/
export interface CreateNodeRequest {
/** The optional identifier for the new tree, if not provided service will generate an unique identifier. */
id?: string;
/** The node name. To pesent a tree-like structure this name is interpreted as a full path in a tree with '/' character as a separator between path segments. */
name?: string;
/** The optional collection of links to resources to associate with this node. */
links?: string[];
/** The optional node metadata. */
metadata?: object;
/** The optional geometry data to attach to the node. */
geometry?: {
/** The base64 encoded geometry data. */
data: string;
/** The content type (MIME) of the geometry data. */
contentType: string;
};
}
/**
* The create node options
*/
export interface CreateNodeOptions {
/** Controls which optional node attributes are returned, currently only metadata is supported. */
fields?: string;
}
/**
* The request body for the @see Organiser#updateNode operation. Also known as UpsertNodeRequest.
* All properties are optional, if property not provided in the request the property will retain it's old value.
*/
export interface UpdateNodeRequest {
/**
* The last seen version of the tree descriptor.
* If provided service will use this information for the concurency control and will refuse to apply changes if current version is not equal to version provided in the request.
*/
v?: number;
/** The new name. */
name?: string;
/** The new set of links to resources. If this property is provided it will override all existing links associated. For differential changes use @see add and @see remove properties. */
links?: string[];
/** The set of links to add to the associations collection (@see NodeResponse#links ) all currently associated links remain unchanged. */
add?: string[];
/** The set of links to be removed from to the associations collection (@see NodeResponse#links ). Links that are not associated already, are ignored. */
remove?: string[];
/** The optional node metadata. */
metadata?: object;
/** The optional geometry data to attach to the node or replace the existing one. */
geometry?: {
/** The base64 encoded geometry data. To remove the geometry from the node pass an empty string. */
data: string;
/** The content type (MIME) of the geometry data. */
contentType: string;
};
}
/**
* The update node options
*/
export interface UpdateNodeOptions {
/** Controls which optional node attributes are returned, currently only metadata is supported. */
fields?: string;
}
/**
* The tree descriptor returned from @see Organiser#createNode, @see Organiser#updateNode, @see Organiser#deleteNode and @see Organiser#getNode operations.
*/
export interface NodeResponse {
/** The forest identifier. */
forestId: string;
/** The tree identifier. */
treeId: string;
/** The unique node identifier. */
id: string;
/** The creation timestamp in ISO format. */
createdAt: string;
/** The identifier of the principal who created the node. */
createdBy: string;
/** The last modification timestamp in ISO format. */
modifiedAt: string;
/** The identifier of the princilat who last modified the node. */
modifiedBy: string;
/** The version of the node. */
v: number;
/** The deletion marker. If not present or false the node is active, otherwise the node is marked as deleted. */
deleted?: boolean;
/** The name. */
name: string;
/**
* The collection of links to resources to associate with this node. Might be absent if client requested to skip this property from the response.
* If property is requested and there are no associations then empty array is returned.
* In case of externalized links this property is not returned.
*/
links?: string[];
/** The number of links associated with the node. */
count: number;
/** URL to externalized links, if that's the case. This is returned even when the nolinks option was used in the request. */
linksUrl?: string;
/** The collection of actions current user has rights to perform on this resource at the moment the response is generated by service. Not returned when specific version is requested. */
_actions?: string[];
/** The node metadata. */
metadata?: object;
/** The associated geometry information, if exists for this node. Do not store this for a longer time (see url property). */
geometry?: {
/** The content type (MIME) of the geometry data. */
contentType: string;
/** The url to download geometry data. It has an expiration time, not suitable for very delayed downloads. To be used as is, no additional headers. */
url: string;
};
}
/**
* The de-serialized data returned from the request with list of tree descriptors.
*/
export interface ListTreesResponse extends PagedItems<TreeResponse> {
}
/**
* The de-serialized data returned from the request with list of nodes.
*/
export interface ListNodesResponse extends PagedItems<NodeResponse> {
}
/**
* The search trees API parameters.
*/
export interface ListTreesOptions extends ListOptions {
/** Controls which optional node attributes are returned, currently only metadata is supported. */
fields?: string;
}
/**
* The list nodes API parameters.
*/
export interface ListNodesOptions extends ListOptions {
/** The node name prefix to filter nodes. Only nodes whos name starts with this prefix are returned. Allows conviniently ferch branches of the tree. */
prefix?: string;
/** Controls whether to send list of link toghether with the node descriptors. By default links are sent. App can reduce the payload size when requesting tree structure by using this parameter. */
nolinks?: boolean;
/** Controls which optional node attributes are returned, currently only metadata is supported. */
fields?: string;
}
/**
* The search nodes API parameters.
*/
export interface SearchNodesOptions extends ListOptions {
/** If provided search is limited to a single tree, otherwise search in whole forest. */
treeId?: string;
/** The link. Only nodes that have this link are returned. */
link: string;
/** Controls whether to send list of link toghether with the node descriptors. By default links are not sent. App can request links to be returned by setting this parameter to false. */
nolinks?: boolean;
/** Controls which optional node attributes are returned, currently only metadata is supported. */
fields?: string;
}
/**
* The de-serialized data returned from the request with list of node versions.
*/
export interface ListNodeVersionsOptions extends ListOptions {
/** Controls whether to send list of link toghether with the node descriptors. By default links are sent. App can reduce the payload size when requesting tree structure by using this parameter. */
nolinks?: boolean;
/** Controls which optional node attributes are returned, currently only metadata is supported. */
fields?: string;
}
/**
* The tree identity.
*/
export interface TreeIdentity {
/** The forest identifier. */
forestId: string;
/** The tree identifier. */
treeId: string;
}
/**
* The node identity.
*/
export interface NodeIdentity {
/** The forest identifier. */
forestId?: string;
/** The tree identifier. */
treeId?: string;
/** The node identifier. When only the id is specified then the latest version is requested. */
nodeId: string;
/** Requesting the node with this version. Optional. */
v?: number;
}
/**
* The batch get API request body.
*/
export interface BatchGetRequest extends OrgBatchGetMap<TreeIdentity, NodeIdentity> {
}
/**
* The batch get API request body.
*/
export interface BatchGetNodesRequest extends OrgBatchGetMap<TreeIdentity, NodeIdentity> {
}
/**
* The BatchGet API options.
*/
export interface BatchGetOptions extends GetOptions {
/** Controls whether to send list of link toghether with the node descriptors. By default links are sent. App can reduce the payload size when requesting tree structure by using this parameter. */
nolinks?: boolean;
/** Controls which optional node attributes are returned, currently only metadata is supported. */
fields?: string;
}
/**
* The response from batch get API.
*/
export interface BatchGetResponse {
/** The list of unprocessed requested resources.
* It is important that client has a retry logic to fetch the items unprocessed in the original request.
* Collection of unprocessed items can be passed as is to the next request.
*/
unprocessed: OrgBatchGetMap<TreeIdentity, NodeIdentity>;
/** The collection requested nodes. */
responses: OrgBatchGetMap<TreeResponse, NodeResponse>;
/** The list of errors. */
errors: OrgBatchGetMap<ResourceIdentityWithError<TreeIdentity>, ResourceIdentityWithError<NodeIdentity>>;
}
/**
* The batch get API request body.
*/
export interface OrgBatchGetMap<T, N> {
/** The collection of trees. */
trees?: T[];
/** The collection of nodes. */
nodes?: N[];
}
/**
* The changeset request parameters .
*/
export interface ChangesetOptions {
/** Controls whether to send list of link toghether with the node descriptors. By default links are sent. App can reduce the payload size when requesting tree structure by using this parameter. */
nolinks?: boolean;
/** Controls which optional node attributes are returned, currently only metadata is supported. */
fields?: string;
}
/**
* The changeset request parameters .
*/
export interface ChangesetAsyncOptions {
/** Controls which optional node attributes are returned, currently only links is supported.
* If links is specified, the result will contain all nodes' links inlined
*/
fields?: string;
}
/**
* The change node request is an upsert type of request.
* It could be that it creates a new node or updates existing or even deletes.
*/
export declare type ChangeNodeRequest = CreateNodeRequest | UpdateNodeRequest | {
id: string;
deleted?: boolean;
};
/**
* Configures the mode of processing he changeset.
* The changeset can be applied in snapshot or incremental mode.
* In the snapshot mode all nodes not mentioned int he requests will be marked as deleted.
* In the incremental mode nodes not mentioned in the request are not touched.
*/
export interface OrgChangesetConfiguration {
/** The changeset mode. If not specified the incremental mode is used. */
snapshot?: boolean;
/** The node name prefix that will be used as a scope for the changeset. Used only in the snapshot mode to limit the nodes that will be implicitly deleted. */
scopePrefix?: string;
}
/**
* The synchronous changeset request.
* Actual node modification requests in addition to the configration.
*/
export interface OrgChangesetRequest extends OrgChangesetConfiguration {
/** The collection of nodes to add, update or delete. */
nodes: ChangeNodeRequest[];
}
/**
* The response body for @see PSet#changeset operation if it goes to async execution mode (>500 items in the request).
*/
export interface OrgChangesetResponseAccepted {
/** The changeset identifier. */
id: string;
/** The user identifier. */
createdBy: string;
/** The creation timestamp in ISO format. */
createdAt: string;
/** The changeset processing status: WaitingUpload, Queued, Processing, Done, Failed. */
status: string;
/** The changeset mode was used. */
snapshot: boolean;
/** The node name prefix was used. */
scopePrefix?: string;
}
/**
* The response body for @see Organizer#changeset operation if it is executed in sync mode (<=500 items in the request).
*/
export interface OrgChangesetResponseInline extends OrgChangesetResponseAccepted {
/** The timestamp in ISO format when processing has been started. */
startedAt: string;
/** The timestamp in ISO format when processing has been finished. */
processedAt: string;
/** The error message if processing of the changeset failed. */
message?: string;
/** Number of items successfull processed. */
itemCount: number;
/** Number of failed request items. */
errorCount: number;
/** The collection of nodes changed as a result of the operation. Returned if <= 500 items echoed. */
nodes?: NodeResponse[];
/** Url for downloading echoed processed items. Returned if > 500 items echoed (for example deleted nodes in snapshot mode).
* File contains multiple separate NodeResponse objects in Newline Delimited JSON format (see http://ndjson.org/, Content-Type=application/x-ndjson).
*/
resultsUrl?: string;
/** The collection of nodes that were left unprocessed because of errors. */
unprocessed?: UnprocessedNode[];
/** Url for downloading failed request items. Returned if > 500 items failed (for example failed deletion of nodes in snapshot mode).
* File contains multiple separate UnprocessedNode objects in Newline Delimited JSON format (see http://ndjson.org/, Content-Type=application/x-ndjson).
*/
errorsUrl?: string;
}
/**
* The node unprocessed due to some error.
*/
export interface UnprocessedNode {
/** The node change requested in the changeset explicitly or implicitly (e.g. node not mentioned in the snaphot type of changeset request). */
item: ChangeNodeRequest;
/** The error code. */
code: string;
/** The error message. */
message: string;
}
/**
* The response body for initializing asynchronous changeset, @see Organizer#changesetAsync operation.
*/
export interface OrgChangesetResponseAsync extends OrgChangesetResponseAccepted {
/** Url for uploading request items. File must contain multiple separate ChangeNodeRequest objects in Newline Delimited JSON format (see http://ndjson.org/, Content-Type=application/x-ndjson). */
uploadUrl: string;
}
/**
* The response body for @see Organizer#changesetStatus operation.
*/
export interface OrgChangesetStatusResponse extends OrgChangesetResponseAccepted {
/** The timestamp in ISO format when processing has been started. */
startedAt?: string;
/** The timestamp in ISO format when processing has been finished. */
processedAt?: string;
/** The error message if processing of the changeset failed. */
message?: string;
/** Number of items successfull processed. */
nodeCount: number;
/** Number of failed request items. */
unprocessedCount: number;
/** Url for downloading echoed processed items. File contains multiple separate NodeResponse objects in Newline Delimited JSON format (see http://ndjson.org/, Content-Type=application/x-ndjson). */
resultsUrl?: string;
/** Url for downloading failed request items. File contains multiple separate UnprocessedNode objects in Newline Delimited JSON format (see http://ndjson.org/, Content-Type=application/x-ndjson). */
errorsUrl?: string;
}
/**
* The service client that represents connection to the Organizer Service.
* Each API operation is exposed as a function on service.
*/
export declare class Organizer extends Service {
/**
* @constructor Constructs a service object.
* @param {Config} config The configuration options (e.g. service url). If not provided the default configuration will be used.
* @param {Credentials} credentials The credentials to be attached to service requests.
*/
constructor(config?: Partial<Configuration>);
/**
* Returns information the service knows about the current user.
* @returns {Promise<ServiceResponse<UserInfoResponse>>} the information known about the caller.
*/
getUserInfo(): Promise<ServiceResponse<UserInfoResponse>>;
/**
* Returns some or all (up to 500, default is 100) of the trees in a forest.
* You can use the request parameters as selection criteria to return a subset of the trees in a forest.
* @param {string} forestId The identifier of the forest to list trees from.
* @param {ListTreesOptions} params The request parameters.
* @returns {Promise<ServiceResponse<ListTreesResponse>>} The de-serialized service response.
* @throws {ServiceError} in case of the error response from the service.
*/
listTrees(forestId: string, params?: ListTreesOptions): Promise<ServiceResponse<ListTreesResponse>>;
/**
* Returns the tree descriptor.
* @param {string} forestId The forest identifier.
* @param {string} treeId The tree identifier.
* @param {GetTreeOptions} params The optional request parameters.
* @returns {Promise<ServiceResponse<TreeResponse>>} The service response with tree descriptor.
* @throws {ServiceError} in case of the error response from the service.
*/
getTree(forestId: string, treeId: string, params?: GetTreeOptions): Promise<ServiceResponse<TreeResponse>>;
/**
* Creates a new tree.
* @param {string} forestId The identifier of the forest to create a tree in.
* @param {CreateTreeRequest} request The tree creation request.
* @returns {Promise<ServiceResponse<TreeResponse>>} The service response with tree descriptor.
* @throws {ServiceError} in case of the error response from the service.
*/
createTree(forestId: string, request: CreateTreeRequest, params?: CreateTreeOptions): Promise<ServiceResponse<TreeResponse>>;
/**
* Updates the tree descriptor.
* @param {string} forestId The forest identifier.
* @param {string} treeId The tree identifier.
* @param {UpdateTreeRequest} request The tree descriptor update request.
* @returns {Promise<ServiceResponse<TreeResponse>>} The service response with tree descriptor.
* @throws {ServiceError} in case of the error response from the service.
*/
updateTree(forestId: string, treeId: string, request: UpdateTreeRequest, params?: UpdateTreeOptions): Promise<ServiceResponse<TreeResponse>>;
/**
* Marks the tree as deleted.
* @param {string} forestId The forest identifier.
* @param {string} treeId The tree identifier.
* @returns {Promise<TreeResponse>>} The de-serialized service response with tree descriptor.
* @param {DeleteOptions} params The optional request parameters.
* @throws {ServiceError} in case of the error response from the service.
*/
deleteTree(forestId: string, treeId: string, params?: DeleteOptions): Promise<ServiceResponse<TreeResponse>>;
/**
* Get the tree access control policy.
* @param {string} forestId The forest identifier.
* @param {string} treeId The tree identifier.
* @returns {Promise<ServiceResponse<Policy>>} the access control policy.
*/
getTreePolicy(forestId: string, treeId: string): Promise<ServiceResponse<Policy>>;
/**
* Puts the tree access control policy.
* @param {string} forestId The forest identifier.
* @param {string} treeId The tree identifier.
* @param {Policy} policy The policy.
* @returns {Promise<ServiceResponse<void>>} the empty response.
*/
putTreePolicy(forestId: string, treeId: string, policy: Policy): Promise<ServiceResponse<void>>;
/**
* Returns page of the nodes (up to 100, default is 100) in a tree that satisfy the search criteria.
* @param {string} forestId The identifier of the forest.
* @param {SearchNodesOptions} params The request parameters.
* @returns {Promise<ServiceResponse<ListNodesResponse>>} The de-serialized service response.
* @throws {ServiceError} in case of the error response from the service.
*/
searchNodes(forestId: string, params: SearchNodesOptions): Promise<ServiceResponse<ListNodesResponse>>;
/**
* Returns some or all (up to 500, default is 100) of the nodes in a tree.
* You can use the request parameters as selection criteria to return a subset of the nodes in a tree.
* @param {string} forestId The identifier of the forest.
* @param {string} treeId The identifier of the tree to list trees from.
* @param {ListNodesOptions} params The request parameters.
* @returns {Promise<ServiceResponse<ListNodesResponse>>} The de-serialized service response.
* @throws {ServiceError} in case of the error response from the service.
*/
listNodes(forestId: string, treeId: string, params?: ListNodesOptions): Promise<ServiceResponse<ListNodesResponse>>;
/**
* Returns some or all (up to 500, default is 100) of the node versions.
* @param {string} forestId The identifier of the forest.
* @param {string} treeId The identifier of the tree to list trees from.
* @param {string} nodeId The node identifier.
* @param {ListNodeVersionsOptions} params The request parameters.
* @returns {Promise<ServiceResponse<ListNodesResponse>>} The de-serialized service response.
* @throws {ServiceError} in case of the error response from the service.
*/
listNodeVersions(forestId: string, treeId: string, nodeId: string, params?: ListNodeVersionsOptions): Promise<ServiceResponse<ListNodesResponse>>;
/**
* Returns the node descriptor.
* @param {string} forestId The forest identifier.
* @param {string} treeId The tree identifier.
* @param {string} nodeId The node identifier.
* @param {GetNodeOptions} params The optional request parameters.
* @returns {Promise<ServiceResponse<NodeResponse>>} The service response with node descriptor.
* @throws {ServiceError} in case of the error response from the service.
*/
getNode(forestId: string, treeId: string, nodeId: string, params?: GetNodeOptions): Promise<ServiceResponse<NodeResponse>>;
/**
* Returns the node links.
* @param {string} forestId The forest identifier.
* @param {string} treeId The tree identifier.
* @param {string} nodeId The node identifier.
* @param {GetNodeOptions} params The optional request parameters.
* @returns {Promise<ServiceResponse<string[]>>} The service response with array of node links.
* @throws {ServiceError} in case of the error response from the service.
*/
getNodeLinks(forestId: string, treeId: string, nodeId: string, params?: GetNodeOptions): Promise<ServiceResponse<string[]>>;
/**
* Creates a new node.
* @param {string} forestId The identifier of the forest to create a tree in.
* @param {string} treeId The identifier of the forest to create a tree in.
* @param {CreateNodeRequest} request The tree creation request.
* @returns {Promise<ServiceResponse<NodeResponse>>} The de-serialized service response with tree descriptor.
* @throws {ServiceError} in case of the error response from the service.
*/
createNode(forestId: string, treeId: string, node: CreateNodeRequest, params?: CreateNodeOptions): Promise<ServiceResponse<NodeResponse>>;
/**
* Updates the node.
* @param {string} forestId The forest identifier.
* @param {string} treeId The tree identifier.
* @param {string} nodeId The node identifier.
* @param {UpdateNodeRequest} request The tree descriptor update request.
* @returns {Promise<ServiceResponse<NodeResponse>>} The de-serialized service response.
* @throws {ServiceError} in case of the error response from the service.
*/
updateNode(forestId: string, treeId: string, nodeId: string, node: UpdateNodeRequest, params?: UpdateNodeOptions): Promise<ServiceResponse<NodeResponse>>;
/**
* Marks the node as deleted.
* @param {string} forestId The forest identifier.
* @param {string} treeId The tree identifier.
* @param {string} nodeId The node identifier.
* @param {DeleteOptions} params The optional request parameters.
* @returns {Promise<ServiceResponse<NodeResponse>>} The de-serialized service response with node descriptor.
* @throws {ServiceError} in case of the error response from the service.
*/
deleteNode(forestId: string, treeId: string, nodeId: string, params?: DeleteOptions): Promise<ServiceResponse<NodeResponse>>;
/**
* Returns the geometry information associated to the node or undefined if geometry info doesn't exist.
* Note that error with code 404 means the node is not found (not the geometry).
* Use this call when you don't download geometry soon after the node descriptor. The original URL in the descriptor can expire.
* @param {string} forestId The forest identifier.
* @param {string} treeId The tree identifier.
* @param {string} nodeId The node identifier.
* @param {GetNodeOptions} params The optional request parameters. Only the 'deleted' option is used in this special case.
* @returns {Promise<ServiceResponse<Blob | undefined>>} The service response with blob or undefined.
* @throws {ServiceError} in case of the error response from the service. Not having geometry is not an error.
* @throws {Error} for certain runtime environments (NodeJS) where it is known not to work.
*/
getNodeGeometry(forestId: string, treeId: string, nodeId: string, params?: GetNodeOptions): Promise<ServiceResponse<Blob | undefined>>;
/**
* Returns the geometry information associated to the node or undefined if geometry info doesn't exist.
* Note that error with code 404 means the node is not found (not the geometry).
* Use this call when you don't download geometry soon after the node descriptor. The original URL in the descriptor can expire.
* @param {string} forestId The forest identifier.
* @param {string} treeId The tree identifier.
* @param {string} nodeId The node identifier.
* @param {number} version The node version identifier.
* @returns {Promise<ServiceResponse<Blob | undefined>>} The service response with blob or undefined.
* @throws {ServiceError} in case of the error response from the service. Not having geometry is not an error.
* @throws {Error} for certain runtime environments (NodeJS) where it is known not to work.
*/
getNodeVersionGeometry(forestId: string, treeId: string, nodeId: string, version: number): Promise<ServiceResponse<Blob | undefined>>;
/**
* Add or update the value of the geometry property of the node.
* Value is a blob of any content type that is not interpreted by the service, but stored as is.
* There is a limitation for the maximum size of the geometry data.
* Only application/vnd.trimbim Content-Type for binary content is supported. If binary data is sent with different Content-Type it will be UTF8 encoded.
* @param {string} forestId The forest identifier.
* @param {string} treeId The tree identifier.
* @param {string} nodeId The node identifier.
* @param {Blob} blob The data containing the geometry and its content-type (in data.type). It is not advised to use an empty content-type.
* @param {Partial<UpdateNodeRequest>} params Only the version field ('v') is used, if present, for concurrency control.
* @returns {Promise<ServiceResponse<void>>} The empty response. The new geometry data is succesfully set.
* @throws {ServiceError} in case of the error response from the service.
* @throws {Error} for certain runtime environments (NodeJS) where it is known not to work.
*/
putNodeGeometry(forestId: string, treeId: string, nodeId: string, data: Blob, params?: PutGeometryOptions): Promise<ServiceResponse<void>>;
/**
* Batch get nodes inside a single trees.
* It should never return a paged response.
* @deprecated Use batchGet instead
* @param {string} forestId The forest identifier.
* @param {string} treeId The tree identifier.
* @param {BatchGetNodesRequest} request The ids/versions of nodes to return.
* @param {GetDefinitionOptions} params The optional request parameters.
* @returns {Promise<ServiceResponse<BatchGetNodesResponse>>} The service response.
* @throws {ServiceError} in case of the error response from the service.
*/
batchGetNodes(forestId: string, treeId: string, request: BatchGetNodesRequest, params?: BatchGetOptions): Promise<ServiceResponse<BatchGetResponse>>;
/**
* Batch get nodes across multiple trees.
* It should never return a paged response.
* @param {BatchGetRequest} request The ids/versions of nodes to return.
* @param {BatchGetOptions} params The optional request parameters.
* @returns {Promise<ServiceResponse<BatchGetResponse>>} The service response.
* @throws {ServiceError} in case of the error response from the service.
*/
batchGet(request: BatchGetRequest, params?: BatchGetOptions): Promise<ServiceResponse<BatchGetResponse>>;
/**
* Applies a changeset to a tree.
* @param {string} forestId The forest identifier.
* @param {string} treeId The tree identifier.
* @param {OrgChangesetRequest} changeset The request.
* @returns {Promise<ServiceResponse<OrgChangesetResponseInline>>} The de-serialized service response.
* @throws {ServiceError} in case of the error response from the service.
*/
changeset(forestId: string, treeId: string, changeset: OrgChangesetRequest, params?: ChangesetOptions): Promise<ServiceResponse<OrgChangesetResponseInline | OrgChangesetResponseAccepted>>;
/**
* Initialize a changeset and get a link for uploading changeset for later processing.
* @param {string} forestId The forest identifier.
* @param {string} treeId The tree identifier.
* @param {OrgChangesetConfiguration} changesetConfig The configuration for processing the changes.
* @returns {Promise<ServiceResponse<ChangesetStatusResponse>>} The de-serialized service response.
* @throws {ServiceError} in case of the error response from the service.
*/
changesetAsync(forestId: string, treeId: string, changesetConfig: OrgChangesetConfiguration, params?: ChangesetAsyncOptions): Promise<ServiceResponse<OrgChangesetResponseAsync>>;
/**
* Gets a changeset status.
* @param {string} changesetId The changeset identifier.
* @returns {Promise<ServiceResponse<ChangesetStatusResponse>>} The de-serialized service response.
* @throws {ServiceError} in case of the error response from the service.
*/
changesetStatus(changesetId: string): Promise<ServiceResponse<OrgChangesetStatusResponse>>;
/**
* Requests credential to subscribe to change notifications.
* @returns {Promise<ServiceResponse<WSSubscriptionResponse>>} The de-serialized service response with temporary credentials and subscription details.
* @throws {ServiceError} in case of the error response from the service.
*/
subscribeWS(): Promise<ServiceResponse<WSSubscriptionResponse>>;
/**
* The common part of getNodeGeometry and getNodeVersionGeometry. See getNodeGeometry for the reasons of this solution.
* Does not check runtime environment, that is the responsibility of the public functions.
* @param {string} urlWithoutParams the relative path without any query params for retrieving the node descriptor.
* @returns {Promise<ServiceResponse<Blob | undefined>>} The service response with blob or undefined.
* @throws {ServiceError} in case of the error response from the service. Not having geometry is not an error.
*/
private commonGetNodeGeometry;
}