@here/olp-sdk-dataservice-read 1.12.2 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/client/ArtifactClient.d.ts +1 -1
- package/package.json +9 -6
- package/bundle.umd.dev.js +0 -13112
- package/bundle.umd.min.js +0 -1
- package/lib/cache/MetadataCacheRepository.js +0 -129
- package/lib/cache/QuadTreeIndexCacheRepository.js +0 -59
- package/lib/cache/index.js +0 -32
- package/lib/client/ArtifactClient.js +0 -96
- package/lib/client/CatalogClient.js +0 -206
- package/lib/client/CatalogRequest.js +0 -47
- package/lib/client/CatalogVersionRequest.js +0 -85
- package/lib/client/CatalogsRequest.js +0 -67
- package/lib/client/ConfigClient.js +0 -72
- package/lib/client/DataRequest.js +0 -115
- package/lib/client/IndexLayerClient.js +0 -111
- package/lib/client/IndexQueryRequest.js +0 -63
- package/lib/client/LayerVersionsRequest.js +0 -64
- package/lib/client/PartitionsRequest.js +0 -124
- package/lib/client/PollRequest.js +0 -63
- package/lib/client/QuadKeyPartitionsRequest.js +0 -110
- package/lib/client/QuadTreeIndexRequest.js +0 -168
- package/lib/client/QueryClient.js +0 -169
- package/lib/client/SchemaDetailsRequest.js +0 -68
- package/lib/client/SchemaRequest.js +0 -67
- package/lib/client/SeekRequest.js +0 -70
- package/lib/client/StatisticsClient.js +0 -127
- package/lib/client/StatisticsRequest.js +0 -134
- package/lib/client/StreamLayerClient.js +0 -252
- package/lib/client/SubscribeRequest.js +0 -101
- package/lib/client/SummaryRequest.js +0 -66
- package/lib/client/TileRequest.js +0 -118
- package/lib/client/UnsubscribeRequest.js +0 -63
- package/lib/client/VersionedLayerClient.js +0 -230
- package/lib/client/VolatileLayerClient.js +0 -194
- package/lib/client/index.js +0 -57
- package/lib/index.js +0 -33
- package/lib/utils/getTile.js +0 -166
- package/lib/utils/index.js +0 -33
- package/lib/utils/validateBillingTag.js +0 -37
- package/lib/utils/validatePartitionsIdsList.js +0 -38
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (C) 2019-2021 HERE Europe B.V.
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*
|
|
17
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
18
|
-
* License-Filename: LICENSE
|
|
19
|
-
*/
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.DataRequest = void 0;
|
|
22
|
-
const olp_sdk_core_1 = require("@here/olp-sdk-core");
|
|
23
|
-
const olp_sdk_dataservice_read_1 = require("@here/olp-sdk-dataservice-read");
|
|
24
|
-
/**
|
|
25
|
-
* Prepares information for calls to get data from the HERE Blob Service.
|
|
26
|
-
*/
|
|
27
|
-
class DataRequest {
|
|
28
|
-
constructor() {
|
|
29
|
-
this.fetchOption = olp_sdk_core_1.FetchOptions.OnlineIfNotFound;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Gets a data handle for the request.
|
|
33
|
-
*
|
|
34
|
-
* The data handle identifies a specific blob so that you can get the contents of that blob.
|
|
35
|
-
*
|
|
36
|
-
* @return The `DataHandle` string.
|
|
37
|
-
*/
|
|
38
|
-
getDataHandle() {
|
|
39
|
-
return this.dataHandle;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Sets the provided data handle.
|
|
43
|
-
*
|
|
44
|
-
* @param dataHandle The `DataHandler` string.
|
|
45
|
-
* @return The updated [[DataRequest]] instance that you can use to chain methods.
|
|
46
|
-
*/
|
|
47
|
-
withDataHandle(dataHandle) {
|
|
48
|
-
this.dataHandle = dataHandle;
|
|
49
|
-
return this;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Gets a partition ID for the request.
|
|
53
|
-
*
|
|
54
|
-
* @return The `partitionID` string.
|
|
55
|
-
*/
|
|
56
|
-
getPartitionId() {
|
|
57
|
-
return this.partitionId;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Sets the provided partition ID.
|
|
61
|
-
*
|
|
62
|
-
* @param partitionId The `partitionID` string.
|
|
63
|
-
* @returns The updated [[DataRequest]] instance that you can use to chain methods.
|
|
64
|
-
*/
|
|
65
|
-
withPartitionId(partitionId) {
|
|
66
|
-
this.partitionId = partitionId;
|
|
67
|
-
return this;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* An optional free-form tag that is used for grouping billing records together.
|
|
71
|
-
*
|
|
72
|
-
* If supplied, it must be 4–16 characters long and contain only alphanumeric ASCII characters [A–Za–z0–9].
|
|
73
|
-
*
|
|
74
|
-
* @param tag The `BillingTag` string.
|
|
75
|
-
* @return The updated [[DataRequest]] instance that you can use to chain methods.
|
|
76
|
-
*/
|
|
77
|
-
withBillingTag(tag) {
|
|
78
|
-
this.billingTag = olp_sdk_dataservice_read_1.validateBillingTag(tag);
|
|
79
|
-
return this;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Gets a billing tag to group billing records together.
|
|
83
|
-
*
|
|
84
|
-
* @return The `BillingTag` string.
|
|
85
|
-
*/
|
|
86
|
-
getBillingTag() {
|
|
87
|
-
return this.billingTag;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Sets the fetch option that you can use to set the source from
|
|
91
|
-
* which data should be fetched.
|
|
92
|
-
*
|
|
93
|
-
* @see `getFetchOption()` for information on usage and format.
|
|
94
|
-
*
|
|
95
|
-
* @param option The `FetchOption` enum.
|
|
96
|
-
*
|
|
97
|
-
* @return A reference to the updated `DataRequest` instance.
|
|
98
|
-
*/
|
|
99
|
-
withFetchOption(option) {
|
|
100
|
-
this.fetchOption = option;
|
|
101
|
-
return this;
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Gets the fetch option that controls how requests are handled.
|
|
105
|
-
*
|
|
106
|
-
* The default option is `OnlineIfNotFound`. It queries the network if
|
|
107
|
-
* the requested resource is not in the cache.
|
|
108
|
-
*
|
|
109
|
-
* @return The fetch option.
|
|
110
|
-
*/
|
|
111
|
-
getFetchOption() {
|
|
112
|
-
return this.fetchOption;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
exports.DataRequest = DataRequest;
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (C) 2020 HERE Europe B.V.
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*
|
|
17
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
18
|
-
* License-Filename: LICENSE
|
|
19
|
-
*/
|
|
20
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
21
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
22
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
23
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
24
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
25
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
26
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.IndexLayerClient = void 0;
|
|
31
|
-
const olp_sdk_core_1 = require("@here/olp-sdk-core");
|
|
32
|
-
const olp_sdk_dataservice_api_1 = require("@here/olp-sdk-dataservice-api");
|
|
33
|
-
/**
|
|
34
|
-
* Describes a index layer and provides the possibility to get partitions metadata and data.
|
|
35
|
-
*/
|
|
36
|
-
class IndexLayerClient {
|
|
37
|
-
/**
|
|
38
|
-
* Creates the [[IndexLayerClient]] instance with IndexLayerClientParams.
|
|
39
|
-
*
|
|
40
|
-
* @param params parameters for use to initialize IndexLayerClient.
|
|
41
|
-
*/
|
|
42
|
-
constructor(params) {
|
|
43
|
-
this.apiVersion = "v1";
|
|
44
|
-
this.hrn = params.catalogHrn.toString();
|
|
45
|
-
this.layerId = params.layerId;
|
|
46
|
-
this.settings = params.settings;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Fetches all partitions metadata from a layer that match a query from the [[IndexQueryRequest]] instance.
|
|
50
|
-
*
|
|
51
|
-
* @param IndexQueryRequest The [[IndexQueryRequest]] instance.
|
|
52
|
-
* @param abortSignal A signal object that allows you to communicate with a request (such as the `fetch` request)
|
|
53
|
-
* and, if required, abort it using the `AbortController` object.
|
|
54
|
-
*
|
|
55
|
-
* For more information, see the [`AbortController` documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).
|
|
56
|
-
*
|
|
57
|
-
* @returns A list of metadata for each of the partitions from the requested layer.
|
|
58
|
-
*/
|
|
59
|
-
getPartitions(request, abortSignal) {
|
|
60
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
-
const query = request.getQueryString();
|
|
62
|
-
if (!query) {
|
|
63
|
-
return Promise.reject(new Error("Please provide correct query"));
|
|
64
|
-
}
|
|
65
|
-
const requestBuilder = yield this.getRequestBuilder("index", olp_sdk_core_1.HRN.fromString(this.hrn), abortSignal).catch(err => Promise.reject(err));
|
|
66
|
-
const indexMetadata = yield olp_sdk_dataservice_api_1.IndexApi.performQuery(requestBuilder, {
|
|
67
|
-
layerID: this.layerId,
|
|
68
|
-
query,
|
|
69
|
-
huge: request.getHugeResponse()
|
|
70
|
-
}).catch(err => Promise.reject(err));
|
|
71
|
-
return indexMetadata.data
|
|
72
|
-
? Promise.resolve(indexMetadata.data)
|
|
73
|
-
: Promise.reject(indexMetadata.error);
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Fetches partition data using data handle.
|
|
78
|
-
*
|
|
79
|
-
* @param model The data model of partition metadata.
|
|
80
|
-
* @param abortSignal A signal object that allows you to communicate with a request (such as the `fetch` request)
|
|
81
|
-
* and, if required, abort it using the `AbortController` object.
|
|
82
|
-
*
|
|
83
|
-
* For more information, see the [`AbortController` documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).
|
|
84
|
-
*
|
|
85
|
-
* @return The data from the requested partition.
|
|
86
|
-
*/
|
|
87
|
-
getData(model, abortSignal) {
|
|
88
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
-
if (!model.id) {
|
|
90
|
-
return Promise.reject(new Error("No data handle for this partition"));
|
|
91
|
-
}
|
|
92
|
-
const builder = yield this.getRequestBuilder("blob", olp_sdk_core_1.HRN.fromString(this.hrn), abortSignal).catch(err => Promise.reject(err));
|
|
93
|
-
return olp_sdk_dataservice_api_1.BlobApi.getBlob(builder, {
|
|
94
|
-
dataHandle: model.id,
|
|
95
|
-
layerId: this.layerId
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Fetch baseUrl and create requestBuilder for sending requests to the API Lookup Service.
|
|
101
|
-
* @param builderType endpoint name is needed to create propriate requestBuilder
|
|
102
|
-
*
|
|
103
|
-
* @returns requestBuilder
|
|
104
|
-
*/
|
|
105
|
-
getRequestBuilder(builderType, hrn, abortSignal) {
|
|
106
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
107
|
-
return olp_sdk_core_1.RequestFactory.create(builderType, this.apiVersion, this.settings, hrn, abortSignal).catch(err => Promise.reject(err));
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
exports.IndexLayerClient = IndexLayerClient;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (C) 2020 HERE Europe B.V.
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*
|
|
17
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
18
|
-
* License-Filename: LICENSE
|
|
19
|
-
*/
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.IndexQueryRequest = void 0;
|
|
22
|
-
/**
|
|
23
|
-
* Prepares information for calls to get partitions metadata from the platform Index Service.
|
|
24
|
-
*/
|
|
25
|
-
class IndexQueryRequest {
|
|
26
|
-
/**
|
|
27
|
-
* @param query An RSQL query to use to retrieve partitions that match the query.
|
|
28
|
-
* The query must use the indexing attributes defined in the index layer.
|
|
29
|
-
* @returns The updated [[IndexQueryRequest]] instance that you can use to chain methods.
|
|
30
|
-
*/
|
|
31
|
-
withQueryString(query) {
|
|
32
|
-
this.queryString = query;
|
|
33
|
-
return this;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* A setter for the provided isHugeResponse parameter.
|
|
37
|
-
*
|
|
38
|
-
* @param isHuge The boolean parameter shows is the query huge.
|
|
39
|
-
*
|
|
40
|
-
* @returns The updated [[IndexQueryRequest]] instance that you can use to chain methods.
|
|
41
|
-
*/
|
|
42
|
-
withHugeResponse(isHuge) {
|
|
43
|
-
this.isHugeResponse = isHuge;
|
|
44
|
-
return this;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Gets a queryString for the request.
|
|
48
|
-
*
|
|
49
|
-
* @return The queryString string.
|
|
50
|
-
*/
|
|
51
|
-
getQueryString() {
|
|
52
|
-
return this.queryString;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Gets isHugeResponse property for the request.
|
|
56
|
-
*
|
|
57
|
-
* @return The `isHugeResponse` boolean.
|
|
58
|
-
*/
|
|
59
|
-
getHugeResponse() {
|
|
60
|
-
return this.isHugeResponse;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
exports.IndexQueryRequest = IndexQueryRequest;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (C) 2020 HERE Europe B.V.
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*
|
|
17
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
18
|
-
* License-Filename: LICENSE
|
|
19
|
-
*/
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.LayerVersionsRequest = void 0;
|
|
22
|
-
const olp_sdk_dataservice_read_1 = require("@here/olp-sdk-dataservice-read");
|
|
23
|
-
/** Prepares information for calls to get layer versions of a specific catalog version. */
|
|
24
|
-
class LayerVersionsRequest {
|
|
25
|
-
/**
|
|
26
|
-
* Gets a catalog version.
|
|
27
|
-
*
|
|
28
|
-
* @returns The catalog version.
|
|
29
|
-
*/
|
|
30
|
-
getVersion() {
|
|
31
|
-
return this.version;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Sets the catalog version value that is used in the 'getLayerVersions' method of [[CatalogClient]].
|
|
35
|
-
*
|
|
36
|
-
* @param version Specify the catalog version.
|
|
37
|
-
* @returns The updated [[LayerVersionsRequest]] instance
|
|
38
|
-
*/
|
|
39
|
-
withVersion(version) {
|
|
40
|
-
this.version = version;
|
|
41
|
-
return this;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* An optional free-form tag that is used for grouping billing records together.
|
|
45
|
-
*
|
|
46
|
-
* If supplied, it must be 4–16 characters long and contain only alphanumeric ASCII characters [A–Za–z0–9].
|
|
47
|
-
*
|
|
48
|
-
* @param tag The `BillingTag` string.
|
|
49
|
-
* @return The updated [[LayerVersionsRequest]] instance that you can use to chain methods.
|
|
50
|
-
*/
|
|
51
|
-
getBillingTag() {
|
|
52
|
-
return this.billingTag;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* An optional free-form tag that is used for grouping billing records together.
|
|
56
|
-
*
|
|
57
|
-
* If supplied, it must be 4–16 characters long and contain only alphanumeric ASCII characters [A–Za–z0–9].
|
|
58
|
-
*/
|
|
59
|
-
withBillingTag(tag) {
|
|
60
|
-
this.billingTag = olp_sdk_dataservice_read_1.validateBillingTag(tag);
|
|
61
|
-
return this;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
exports.LayerVersionsRequest = LayerVersionsRequest;
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (C) 2019-2020 HERE Europe B.V.
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*
|
|
17
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
18
|
-
* License-Filename: LICENSE
|
|
19
|
-
*/
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.PartitionsRequest = void 0;
|
|
22
|
-
const olp_sdk_core_1 = require("@here/olp-sdk-core");
|
|
23
|
-
const olp_sdk_dataservice_read_1 = require("@here/olp-sdk-dataservice-read");
|
|
24
|
-
/**
|
|
25
|
-
* Prepares information for calls to get partitions metadata from the Metadata Service API.
|
|
26
|
-
*/
|
|
27
|
-
class PartitionsRequest {
|
|
28
|
-
constructor() {
|
|
29
|
-
this.fetchOption = olp_sdk_core_1.FetchOptions.OnlineIfNotFound;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* An optional free-form tag that is used for grouping billing records together.
|
|
33
|
-
*
|
|
34
|
-
* If supplied, it must be 4–16 characters long and contain only alphanumeric ASCII characters [A–Za–z0–9].
|
|
35
|
-
*
|
|
36
|
-
* @param tag The `BillingTag` string.
|
|
37
|
-
* @return The updated [[PartitionsRequest]] instance that you can use to chain methods.
|
|
38
|
-
*/
|
|
39
|
-
withBillingTag(tag) {
|
|
40
|
-
this.billingTag = olp_sdk_dataservice_read_1.validateBillingTag(tag);
|
|
41
|
-
return this;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Gets a billing tag to group billing records together.
|
|
45
|
-
*
|
|
46
|
-
* @return The `BillingTag` string.
|
|
47
|
-
*/
|
|
48
|
-
getBillingTag() {
|
|
49
|
-
return this.billingTag;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Sets the provided partition IDs.
|
|
53
|
-
*
|
|
54
|
-
* @param ids The IDs of partitions from which you want to get metadata.
|
|
55
|
-
*
|
|
56
|
-
* The required quantity is between 1 and 100.
|
|
57
|
-
* If partition IDs are not provided, all partitions are retrieved.
|
|
58
|
-
* If the quantity of partition IDs is less than 1 (empty array) or more than 100, an error is thrown.
|
|
59
|
-
* @returns The updated [[PartitionsRequest]] instance that you can use to chain methods.
|
|
60
|
-
*/
|
|
61
|
-
withPartitionIds(ids) {
|
|
62
|
-
this.partitionIds = olp_sdk_dataservice_read_1.validatePartitionsIdsList(ids);
|
|
63
|
-
return this;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Gets partition IDs for the request.
|
|
67
|
-
*
|
|
68
|
-
* @return The `partitionIds` string.
|
|
69
|
-
*/
|
|
70
|
-
getPartitionIds() {
|
|
71
|
-
return this.partitionIds;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Sets the provided additional fields: `dataSize`, `checksum`, `compressedDataSize`, and `crc`.
|
|
75
|
-
*
|
|
76
|
-
* @param additionalFields The array of strings.
|
|
77
|
-
* The array can contain the following values: `dataSize`, `checksum`, `compressedDataSize`, and `crc`.
|
|
78
|
-
*
|
|
79
|
-
* @returns The updated [[PartitionsRequest]] instance that you can use to chain methods.
|
|
80
|
-
*/
|
|
81
|
-
withAdditionalFields(additionalFields) {
|
|
82
|
-
if (additionalFields.length) {
|
|
83
|
-
this.additionalFields = additionalFields;
|
|
84
|
-
return this;
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
throw new Error("Error. Parameter 'additionalFields' could not contain empty array. Add value or do not use this method.");
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Gets additional fields for the request.
|
|
92
|
-
*
|
|
93
|
-
* @return The `partitionIds` string.
|
|
94
|
-
*/
|
|
95
|
-
getAdditionalFields() {
|
|
96
|
-
return this.additionalFields;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Sets the fetch option that you can use to set the source from
|
|
100
|
-
* which data should be fetched.
|
|
101
|
-
*
|
|
102
|
-
* @see `getFetchOption()` for information on usage and format.
|
|
103
|
-
*
|
|
104
|
-
* @param option The `FetchOption` enum.
|
|
105
|
-
*
|
|
106
|
-
* @return A reference to the updated `PartitionsRequest` instance.
|
|
107
|
-
*/
|
|
108
|
-
withFetchOption(option) {
|
|
109
|
-
this.fetchOption = option;
|
|
110
|
-
return this;
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Gets the fetch option that controls how requests are handled.
|
|
114
|
-
*
|
|
115
|
-
* The default option is `OnlineIfNotFound`. It queries the network if
|
|
116
|
-
* the requested resource is not in the cache.
|
|
117
|
-
*
|
|
118
|
-
* @return The fetch option.
|
|
119
|
-
*/
|
|
120
|
-
getFetchOption() {
|
|
121
|
-
return this.fetchOption;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
exports.PartitionsRequest = PartitionsRequest;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (C) 2020 HERE Europe B.V.
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*
|
|
17
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
18
|
-
* License-Filename: LICENSE
|
|
19
|
-
*/
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.PollRequest = void 0;
|
|
22
|
-
/**
|
|
23
|
-
* Prepares information for calls to the platform Stream Service.
|
|
24
|
-
*/
|
|
25
|
-
class PollRequest {
|
|
26
|
-
/**
|
|
27
|
-
* Gets the subscription mode for the request.
|
|
28
|
-
*
|
|
29
|
-
* @return The subscription mode.
|
|
30
|
-
*/
|
|
31
|
-
getMode() {
|
|
32
|
-
return this.mode;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* A setter for the provided subscription mode.
|
|
36
|
-
*
|
|
37
|
-
* @param mode The subscription mode.
|
|
38
|
-
* @returns The [[PollRequest]] instance that you can use to chain methods.
|
|
39
|
-
*/
|
|
40
|
-
withMode(mode) {
|
|
41
|
-
this.mode = mode;
|
|
42
|
-
return this;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Gets the subscription id for the request.
|
|
46
|
-
*
|
|
47
|
-
* @return The subscription id.
|
|
48
|
-
*/
|
|
49
|
-
getSubscriptionId() {
|
|
50
|
-
return this.subscriptionId;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* A setter for the provided subscription id.
|
|
54
|
-
*
|
|
55
|
-
* @param id The subscription id.
|
|
56
|
-
* @returns The [[PollRequest]] instance that you can use to chain methods.
|
|
57
|
-
*/
|
|
58
|
-
withSubscriptionId(id) {
|
|
59
|
-
this.subscriptionId = id;
|
|
60
|
-
return this;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
exports.PollRequest = PollRequest;
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (C) 2019-2021 HERE Europe B.V.
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*
|
|
17
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
18
|
-
* License-Filename: LICENSE
|
|
19
|
-
*/
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.QuadKeyPartitionsRequest = void 0;
|
|
22
|
-
const olp_sdk_dataservice_read_1 = require("@here/olp-sdk-dataservice-read");
|
|
23
|
-
/**
|
|
24
|
-
* Prepares information for calls to get quadtree metadata from the Query Service API.
|
|
25
|
-
*
|
|
26
|
-
* This class works only with versioned and volatile layers where the partitioning scheme is HERE Tile.
|
|
27
|
-
*/
|
|
28
|
-
class QuadKeyPartitionsRequest {
|
|
29
|
-
/**
|
|
30
|
-
* A geometric area represented as a HERE tile.
|
|
31
|
-
*
|
|
32
|
-
* @param quadKey Addresses a tile in the quadtree.
|
|
33
|
-
* @returns The updated [[QuadKeyPartitionsRequest]] instance that you can use to chain methods.
|
|
34
|
-
*/
|
|
35
|
-
withQuadKey(quadKey) {
|
|
36
|
-
this.quadKey = quadKey;
|
|
37
|
-
return this;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* The recursion depth of the response.
|
|
41
|
-
* The maximum allowed value for the depth parameter is 4.
|
|
42
|
-
*
|
|
43
|
-
* @param depth The recursion depth of the response.
|
|
44
|
-
* @returns The updated [[QuadKeyPartitionsRequest]] instance that you can use to chain methods.
|
|
45
|
-
*
|
|
46
|
-
* If set to 0, the response includes only data from the quadkey specified in the request.
|
|
47
|
-
* In this way, the depth describes the maximum length of the subQuadKeys in the response.
|
|
48
|
-
*/
|
|
49
|
-
withDepth(depth) {
|
|
50
|
-
this.depth = depth;
|
|
51
|
-
return this;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* An optional free-form tag that is used for grouping billing records together.
|
|
55
|
-
*
|
|
56
|
-
* If supplied, it must be 4–16 characters long and contain only alphanumeric ASCII characters [A-Za-z0-9].
|
|
57
|
-
*
|
|
58
|
-
* @param tag The `BillingTag` string.
|
|
59
|
-
* @return The updated [[QuadKeyPartitionsRequest]] instance that you can use to chain methods.
|
|
60
|
-
*/
|
|
61
|
-
withBillingTag(tag) {
|
|
62
|
-
this.billingTag = olp_sdk_dataservice_read_1.validateBillingTag(tag);
|
|
63
|
-
return this;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* A setter for the provided additional fields
|
|
67
|
-
*
|
|
68
|
-
* @param additionalFields Array of strings. Array could contain next values "dataSize" | "checksum" | "compressedDataSize | "crc"".
|
|
69
|
-
* This values could be useful for getPartitions method from versionedLayerClient and volatileLayerClient.
|
|
70
|
-
*
|
|
71
|
-
* @returns The updated [[QuadKeyPartitionsRequest]] instance that you can use to chain methods.
|
|
72
|
-
*/
|
|
73
|
-
withAdditionalFields(additionalFields) {
|
|
74
|
-
this.additionalFields = additionalFields;
|
|
75
|
-
return this;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Gets the configured [[QuadKey]] object for the request.
|
|
79
|
-
*
|
|
80
|
-
* @return The the configured [[QuadKey]] object.
|
|
81
|
-
*/
|
|
82
|
-
getQuadKey() {
|
|
83
|
-
return this.quadKey;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Gets the configured depth for the request.
|
|
87
|
-
*
|
|
88
|
-
* @return The number of the configured depth.
|
|
89
|
-
*/
|
|
90
|
-
getDepth() {
|
|
91
|
-
return this.depth || 0;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Gets a billing tag to group billing records together.
|
|
95
|
-
*
|
|
96
|
-
* @return The `BillingTag` string.
|
|
97
|
-
*/
|
|
98
|
-
getBillingTag() {
|
|
99
|
-
return this.billingTag;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Gets the additional fields for the request.
|
|
103
|
-
*
|
|
104
|
-
* @return Additional fields.
|
|
105
|
-
*/
|
|
106
|
-
getAdditionalFields() {
|
|
107
|
-
return this.additionalFields;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
exports.QuadKeyPartitionsRequest = QuadKeyPartitionsRequest;
|