VersionedLayerClient | @here/olp-sdk-ts
Class VersionedLayerClient
Hierarchy
- VersionedLayerClient
Index
Constructors
constructor
Creates the VersionedLayerClient instance with
VersionedLayerClientParams.Parameters
params: VersionedLayerClientParams
The parameters that are used to initialize
VersionedLayerClient.
Returns VersionedLayerClient
Methods
cancel Batch
Cancels the publication if it has not been submitted.
Fails if you attempt to cancel a submitted publication. This allows the specified publication to be abandoned.
Parameters
request: CancelBatchRequest
The details of the cancel operation.
Optional abortSignal: AbortSignal
The signal object that allows you to communicate with the request and, if required, abort it using the
AbortControllerobject. For more information, see theAbortControllerdocumentation.
Returns Promise<Response>
True if the operation was successful; rejects with an error otherwise.
check Data Exists
Checks whether the data handle is not used.
Data handles must be unique within a layer across all versions. If the data handle exists, generate a new one and check it again to be sure that it is not present in the blob store.
Parameters
request: CheckDataExistsRequest
CheckDataExistsRequestwith the required params.Optional abortSignal: AbortSignal
The signal object that allows you to communicate with the request and, if required, abort it using the
AbortControllerobject. For more information, see theAbortControllerdocumentation.
Returns Promise<Response>
The
Promisevoid if the data handle exists. If the data handle does not exist, rejects with an HTTP response (404 status) or an HTTP error.
complete Batch
Submits the publication (that is a batch) and initiates post-processing if necessary.
You cannot modify or interrupt the publication process, so double-check the publication details before submitting it.
The publication state becomes
Submitteddirectly after submission andSucceededafter successful processing. You can only complete a publication that is in theInitializedstate.Once you trigger to complete a publication, request the status of the publication regularly until the status becomes
Succeeded.When you submit the publication, the metadata processing starts.
Parameters
request: CompleteBatchRequest
The details of the publication completion.
Optional abortSignal: AbortSignal
The signal object that allows you to communicate with the request and, if required, abort it using the
AbortControllerobject. For more information, see theAbortControllerdocumentation.
Returns Promise<Response>
The
Promiseresolves if the operation was successful; rejects otherwise.
get Base Version
Gets the latest version of the catalog.
The default value is -1. By convention -1 indicates the virtual initial version before the first publication that has version 0.
Parameters
Optional billingTag: string
The free-form tag that is used for grouping billing records together. If supplied, it must be 4–16 characters long and contain only alphanumeric ASCII characters [A–Za–z0–9].
Optional abortSignal: AbortSignal
The signal object that allows you to communicate with the request and, if required, abort it using the
AbortControllerobject. For more information, see theAbortControllerdocumentation.
Returns Promise<number>
The
Promiseof the HTTP response that contains the payload with the latest version.
get Batch
Gets the publication details.
Parameters
request: GetBatchRequest
The details of the
GEToperation.Optional abortSignal: AbortSignal
The signal object that allows you to communicate with the request and, if required, abort it using the
AbortControllerobject. For more information, see theAbortControllerdocumentation.
Returns Promise<Publication>
The publication details.
publish To Batch
Uploads one partition blob and metadata at once.
Parameters
request: PublishSinglePartitionRequest
The
PublishSinglePartitionRequestobject with the needed parameters.Optional abortSignal: AbortSignal
The signal object that allows you to communicate with the request and, if required, abort it using the
AbortControllerobject. For more information, see theAbortControllerdocumentation.
Returns Promise<Response>
The
Promiseresolves if the operation was successful; rejects otherwise.
start Batch
Starts a new publication.
Determines the publication type based on the provided layer IDs. A publication can only consist of layer IDs that have the same layer type. For example, you can have a publication for multiple versioned layers, but you cannot have a single publication that publishes data to both versioned and stream layers.
Also, you can only have one versioned-layer publication in progress at a time. You cannot have multiple active publications to the same catalog for versioned layers. The version dependencies request field is optional and is used for versioned layers to declare version dependencies.
Parameters
request: StartBatchRequest
The details of the batch operation that you want to start.
Optional abortSignal: AbortSignal
The signal object that allows you to communicate with the request and, if required, abort it using the
AbortControllerobject. For more information, see theAbortControllerdocumentation.
Returns Promise<Publication>
upload Blob
Uploads data to the service.
If you are upload more than 50 MB of data, the data is split into parts, and each part is uploaded individually. The size of each part is 5 MB, except the last part.
Parameters
request: UploadBlobRequest
The details of the data upload process.
Optional abortSignal: AbortSignal
The signal object that allows you to communicate with the request and, if required, abort it using the
AbortControllerobject. For more information, see theAbortControllerdocumentation.
Returns Promise<UploadBlobResult>
The
Promiseresolves withUploadBlobResult.
upload Partitions
Uploads metadata to the service.
When all data is uploaded, you need to generate metadata to represent your data inside the HERE platform. At a minimum, your metadata must consist of a partition ID and the data handle that you used to upload your data. For a complete description of the fields that you can set, @see PublishPartition.
The maximum number of partitions you can upload and publish in one request is 1,000. If you have more than 1,000 partitions that you want to upload, upload the data for the first 1,000 partitions, and then upload the metadata for these 1,000 partitions. Then, continue with the next set of partitions. Do not wait until all data is uploaded before uploading metadata. Doing so will result in poor performance. Instead, upload data, then metadata, and repeat if needed until all your data and corresponding metadata is uploaded.
Parameters
request: UploadPartitionsRequest
The details of the metadata upload process.
Optional abortSignal: AbortSignal
The signal object that allows you to communicate with the request and, if required, abort it using the
AbortControllerobject. For more information, see theAbortControllerdocumentation.
Returns Promise<Response>
The
Promiseresolves with the 204 status code if the upload was successful.
Generated using TypeDoc
Describes a versioned layer and provides a possibility to publish data to it.