@here/olp-sdk-dataservice-read 2.0.0 → 3.1.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.
Files changed (55) hide show
  1. package/README.md +3 -3
  2. package/bundle.umd.dev.js +12548 -76
  3. package/bundle.umd.min.js +1 -1
  4. package/index.js +5 -1
  5. package/index.web.js +5 -1
  6. package/lib/cache/MetadataCacheRepository.js +1 -0
  7. package/lib/cache/QuadTreeIndexCacheRepository.js +1 -0
  8. package/lib/cache/index.js +5 -1
  9. package/lib/client/ArtifactClient.d.ts +2 -1
  10. package/lib/client/ArtifactClient.js +31 -43
  11. package/lib/client/CatalogClient.d.ts +3 -1
  12. package/lib/client/CatalogClient.js +59 -78
  13. package/lib/client/CatalogRequest.js +4 -3
  14. package/lib/client/CatalogVersionRequest.js +6 -3
  15. package/lib/client/CatalogsRequest.js +5 -3
  16. package/lib/client/ConfigClient.d.ts +1 -1
  17. package/lib/client/ConfigClient.js +13 -23
  18. package/lib/client/DataRequest.js +7 -6
  19. package/lib/client/IndexLayerClient.d.ts +1 -1
  20. package/lib/client/IndexLayerClient.js +37 -40
  21. package/lib/client/IndexQueryRequest.js +2 -0
  22. package/lib/client/LayerVersionsRequest.js +5 -3
  23. package/lib/client/PartitionsRequest.js +10 -7
  24. package/lib/client/PollRequest.js +2 -0
  25. package/lib/client/QuadKeyPartitionsRequest.d.ts +1 -1
  26. package/lib/client/QuadKeyPartitionsRequest.js +7 -3
  27. package/lib/client/QuadTreeIndexRequest.d.ts +1 -1
  28. package/lib/client/QuadTreeIndexRequest.js +11 -3
  29. package/lib/client/QueryClient.d.ts +2 -1
  30. package/lib/client/QueryClient.js +85 -96
  31. package/lib/client/SchemaDetailsRequest.js +5 -3
  32. package/lib/client/SchemaRequest.js +5 -3
  33. package/lib/client/SeekRequest.js +3 -0
  34. package/lib/client/StatisticsClient.d.ts +2 -1
  35. package/lib/client/StatisticsClient.js +51 -65
  36. package/lib/client/StatisticsRequest.js +9 -4
  37. package/lib/client/StreamLayerClient.d.ts +4 -1
  38. package/lib/client/StreamLayerClient.js +117 -139
  39. package/lib/client/SubscribeRequest.js +4 -0
  40. package/lib/client/SummaryRequest.js +5 -2
  41. package/lib/client/TileRequest.js +6 -6
  42. package/lib/client/UnsubscribeRequest.js +2 -0
  43. package/lib/client/VersionedLayerClient.d.ts +45 -1
  44. package/lib/client/VersionedLayerClient.js +133 -147
  45. package/lib/client/VolatileLayerClient.d.ts +4 -1
  46. package/lib/client/VolatileLayerClient.js +104 -108
  47. package/lib/client/index.js +5 -1
  48. package/lib/index.js +5 -1
  49. package/lib/utils/getTile.d.ts +37 -1
  50. package/lib/utils/getTile.js +121 -132
  51. package/lib/utils/index.js +5 -1
  52. package/lib/utils/validateBillingTag.js +1 -2
  53. package/lib/utils/validatePartitionsIdsList.js +1 -2
  54. package/package.json +11 -55
  55. package/webpack.config.js +2 -7
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- * Copyright (C) 2020 HERE Europe B.V.
3
+ * Copyright (C) 2020-2026 HERE Europe B.V.
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License");
6
6
  * you may not use this file except in compliance with the License.
@@ -17,15 +17,6 @@
17
17
  * SPDX-License-Identifier: Apache-2.0
18
18
  * License-Filename: LICENSE
19
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
20
  Object.defineProperty(exports, "__esModule", { value: true });
30
21
  exports.IndexLayerClient = void 0;
31
22
  const olp_sdk_core_1 = require("@here/olp-sdk-core");
@@ -34,13 +25,25 @@ const olp_sdk_dataservice_api_1 = require("@here/olp-sdk-dataservice-api");
34
25
  * Describes a index layer and provides the possibility to get partitions metadata and data.
35
26
  */
36
27
  class IndexLayerClient {
28
+ apiVersion = "v1";
29
+ /**
30
+ * HRN of the catalog.
31
+ */
32
+ hrn;
33
+ /**
34
+ * The ID of the layer.
35
+ */
36
+ layerId;
37
+ /**
38
+ * The [[OlpClientSettings]] instance.
39
+ */
40
+ settings;
37
41
  /**
38
42
  * Creates the [[IndexLayerClient]] instance with IndexLayerClientParams.
39
43
  *
40
44
  * @param params parameters for use to initialize IndexLayerClient.
41
45
  */
42
46
  constructor(params) {
43
- this.apiVersion = "v1";
44
47
  this.hrn = params.catalogHrn.toString();
45
48
  this.layerId = params.layerId;
46
49
  this.settings = params.settings;
@@ -56,22 +59,20 @@ class IndexLayerClient {
56
59
  *
57
60
  * @returns A list of metadata for each of the partitions from the requested layer.
58
61
  */
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);
62
+ async getPartitions(request, abortSignal) {
63
+ const query = request.getQueryString();
64
+ if (!query) {
65
+ return Promise.reject(new Error("Please provide correct query"));
66
+ }
67
+ const requestBuilder = await this.getRequestBuilder("index", olp_sdk_core_1.HRN.fromString(this.hrn), abortSignal);
68
+ const indexMetadata = await olp_sdk_dataservice_api_1.IndexApi.performQuery(requestBuilder, {
69
+ layerID: this.layerId,
70
+ query,
71
+ huge: request.getHugeResponse()
74
72
  });
73
+ return indexMetadata.data
74
+ ? Promise.resolve(indexMetadata.data)
75
+ : Promise.reject(indexMetadata.error);
75
76
  }
76
77
  /**
77
78
  * Fetches partition data using data handle.
@@ -84,16 +85,14 @@ class IndexLayerClient {
84
85
  *
85
86
  * @return The data from the requested partition.
86
87
  */
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
- });
88
+ async getData(model, abortSignal) {
89
+ if (!model.id) {
90
+ return Promise.reject(new Error("No data handle for this partition"));
91
+ }
92
+ const builder = await this.getRequestBuilder("blob", olp_sdk_core_1.HRN.fromString(this.hrn), abortSignal);
93
+ return olp_sdk_dataservice_api_1.BlobApi.getBlob(builder, {
94
+ dataHandle: model.id,
95
+ layerId: this.layerId
97
96
  });
98
97
  }
99
98
  /**
@@ -102,10 +101,8 @@ class IndexLayerClient {
102
101
  *
103
102
  * @returns requestBuilder
104
103
  */
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
- });
104
+ async getRequestBuilder(builderType, hrn, abortSignal) {
105
+ return olp_sdk_core_1.RequestFactory.create(builderType, this.apiVersion, this.settings, hrn, abortSignal);
109
106
  }
110
107
  }
111
108
  exports.IndexLayerClient = IndexLayerClient;
@@ -23,6 +23,8 @@ exports.IndexQueryRequest = void 0;
23
23
  * Prepares information for calls to get partitions metadata from the platform Index Service.
24
24
  */
25
25
  class IndexQueryRequest {
26
+ queryString;
27
+ isHugeResponse;
26
28
  /**
27
29
  * @param query An RSQL query to use to retrieve partitions that match the query.
28
30
  * The query must use the indexing attributes defined in the index layer.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- * Copyright (C) 2020 HERE Europe B.V.
3
+ * Copyright (C) 2020-2026 HERE Europe B.V.
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License");
6
6
  * you may not use this file except in compliance with the License.
@@ -19,9 +19,11 @@
19
19
  */
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
21
  exports.LayerVersionsRequest = void 0;
22
- const olp_sdk_dataservice_read_1 = require("@here/olp-sdk-dataservice-read");
22
+ const validateBillingTag_1 = require("../utils/validateBillingTag");
23
23
  /** Prepares information for calls to get layer versions of a specific catalog version. */
24
24
  class LayerVersionsRequest {
25
+ version;
26
+ billingTag;
25
27
  /**
26
28
  * Gets a catalog version.
27
29
  *
@@ -57,7 +59,7 @@ class LayerVersionsRequest {
57
59
  * If supplied, it must be 4–16 characters long and contain only alphanumeric ASCII characters [A–Za–z0–9].
58
60
  */
59
61
  withBillingTag(tag) {
60
- this.billingTag = olp_sdk_dataservice_read_1.validateBillingTag(tag);
62
+ this.billingTag = (0, validateBillingTag_1.validateBillingTag)(tag);
61
63
  return this;
62
64
  }
63
65
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- * Copyright (C) 2019-2020 HERE Europe B.V.
3
+ * Copyright (C) 2019-2026 HERE Europe B.V.
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License");
6
6
  * you may not use this file except in compliance with the License.
@@ -20,14 +20,17 @@
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
21
  exports.PartitionsRequest = void 0;
22
22
  const olp_sdk_core_1 = require("@here/olp-sdk-core");
23
- const olp_sdk_dataservice_read_1 = require("@here/olp-sdk-dataservice-read");
23
+ const validateBillingTag_1 = require("../utils/validateBillingTag");
24
+ const validatePartitionsIdsList_1 = require("../utils/validatePartitionsIdsList");
24
25
  /**
25
26
  * Prepares information for calls to get partitions metadata from the Metadata Service API.
26
27
  */
27
28
  class PartitionsRequest {
28
- constructor() {
29
- this.fetchOption = olp_sdk_core_1.FetchOptions.OnlineIfNotFound;
30
- }
29
+ version;
30
+ billingTag;
31
+ partitionIds;
32
+ additionalFields;
33
+ fetchOption = olp_sdk_core_1.FetchOptions.OnlineIfNotFound;
31
34
  /**
32
35
  * An optional free-form tag that is used for grouping billing records together.
33
36
  *
@@ -37,7 +40,7 @@ class PartitionsRequest {
37
40
  * @return The updated [[PartitionsRequest]] instance that you can use to chain methods.
38
41
  */
39
42
  withBillingTag(tag) {
40
- this.billingTag = olp_sdk_dataservice_read_1.validateBillingTag(tag);
43
+ this.billingTag = (0, validateBillingTag_1.validateBillingTag)(tag);
41
44
  return this;
42
45
  }
43
46
  /**
@@ -59,7 +62,7 @@ class PartitionsRequest {
59
62
  * @returns The updated [[PartitionsRequest]] instance that you can use to chain methods.
60
63
  */
61
64
  withPartitionIds(ids) {
62
- this.partitionIds = olp_sdk_dataservice_read_1.validatePartitionsIdsList(ids);
65
+ this.partitionIds = (0, validatePartitionsIdsList_1.validatePartitionsIdsList)(ids);
63
66
  return this;
64
67
  }
65
68
  /**
@@ -23,6 +23,8 @@ exports.PollRequest = void 0;
23
23
  * Prepares information for calls to the platform Stream Service.
24
24
  */
25
25
  class PollRequest {
26
+ mode;
27
+ subscriptionId;
26
28
  /**
27
29
  * Gets the subscription mode for the request.
28
30
  *
@@ -1,6 +1,6 @@
1
1
  import { AdditionalFields } from "@here/olp-sdk-dataservice-api";
2
2
  import { QuadKey } from "@here/olp-sdk-core";
3
- import { QuadTreeIndexDepth } from "@here/olp-sdk-dataservice-read";
3
+ import { QuadTreeIndexDepth } from "./QuadTreeIndexRequest";
4
4
  /**
5
5
  * Prepares information for calls to get quadtree metadata from the Query Service API.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- * Copyright (C) 2019-2021 HERE Europe B.V.
3
+ * Copyright (C) 2019-2026 HERE Europe B.V.
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License");
6
6
  * you may not use this file except in compliance with the License.
@@ -19,13 +19,17 @@
19
19
  */
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
21
  exports.QuadKeyPartitionsRequest = void 0;
22
- const olp_sdk_dataservice_read_1 = require("@here/olp-sdk-dataservice-read");
22
+ const validateBillingTag_1 = require("../utils/validateBillingTag");
23
23
  /**
24
24
  * Prepares information for calls to get quadtree metadata from the Query Service API.
25
25
  *
26
26
  * This class works only with versioned and volatile layers where the partitioning scheme is HERE Tile.
27
27
  */
28
28
  class QuadKeyPartitionsRequest {
29
+ quadKey;
30
+ depth;
31
+ billingTag;
32
+ additionalFields;
29
33
  /**
30
34
  * A geometric area represented as a HERE tile.
31
35
  *
@@ -59,7 +63,7 @@ class QuadKeyPartitionsRequest {
59
63
  * @return The updated [[QuadKeyPartitionsRequest]] instance that you can use to chain methods.
60
64
  */
61
65
  withBillingTag(tag) {
62
- this.billingTag = olp_sdk_dataservice_read_1.validateBillingTag(tag);
66
+ this.billingTag = (0, validateBillingTag_1.validateBillingTag)(tag);
63
67
  return this;
64
68
  }
65
69
  /**
@@ -7,7 +7,7 @@ import { AdditionalFields } from "@here/olp-sdk-dataservice-api";
7
7
  * In this way, depth describes the maximum length of the subQuadKeys in the response.
8
8
  * The maximum allowed value for the depth parameter is 4.
9
9
  */
10
- export declare type QuadTreeIndexDepth = 0 | 1 | 2 | 3 | 4;
10
+ export type QuadTreeIndexDepth = 0 | 1 | 2 | 3 | 4;
11
11
  /**
12
12
  * Prepares information for calls to get quadtree metadata from the Query Service API.
13
13
  *
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- * Copyright (C) 2019-2021 HERE Europe B.V.
3
+ * Copyright (C) 2019-2026 HERE Europe B.V.
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License");
6
6
  * you may not use this file except in compliance with the License.
@@ -19,13 +19,21 @@
19
19
  */
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
21
  exports.QuadTreeIndexRequest = void 0;
22
- const olp_sdk_dataservice_read_1 = require("@here/olp-sdk-dataservice-read");
22
+ const validateBillingTag_1 = require("../utils/validateBillingTag");
23
23
  /**
24
24
  * Prepares information for calls to get quadtree metadata from the Query Service API.
25
25
  *
26
26
  * This class works only with versioned or volatile layers where the partitioning scheme is HERE Tile.
27
27
  */
28
28
  class QuadTreeIndexRequest {
29
+ catalogHrn;
30
+ layerId;
31
+ layerType;
32
+ version;
33
+ quadKey;
34
+ depth;
35
+ billingTag;
36
+ additionalFields;
29
37
  /**
30
38
  * Constructs the [[QuadTreeIndexRequest]] instance for fetching the quadtree index from the Query Service API
31
39
  * for volatile or versioned layers
@@ -84,7 +92,7 @@ class QuadTreeIndexRequest {
84
92
  * @return The updated [[QuadTreeIndexRequest]] instance that you can use to chain methods.
85
93
  */
86
94
  withBillingTag(tag) {
87
- this.billingTag = olp_sdk_dataservice_read_1.validateBillingTag(tag);
95
+ this.billingTag = (0, validateBillingTag_1.validateBillingTag)(tag);
88
96
  return this;
89
97
  }
90
98
  /**
@@ -1,6 +1,7 @@
1
1
  import { HRN, OlpClientSettings } from "@here/olp-sdk-core";
2
2
  import { QueryApi } from "@here/olp-sdk-dataservice-api";
3
- import { PartitionsRequest, QuadTreeIndexRequest } from "@here/olp-sdk-dataservice-read";
3
+ import { PartitionsRequest } from "./PartitionsRequest";
4
+ import { QuadTreeIndexRequest } from "./QuadTreeIndexRequest";
4
5
  /**
5
6
  * A client for the Query Service API that provides a way to get information (metadata)
6
7
  * about layers and partitions stored in a catalog.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- * Copyright (C) 2019-2021 HERE Europe B.V.
3
+ * Copyright (C) 2019-2026 HERE Europe B.V.
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License");
6
6
  * you may not use this file except in compliance with the License.
@@ -17,26 +17,19 @@
17
17
  * SPDX-License-Identifier: Apache-2.0
18
18
  * License-Filename: LICENSE
19
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
20
  Object.defineProperty(exports, "__esModule", { value: true });
30
21
  exports.QueryClient = void 0;
31
22
  const olp_sdk_core_1 = require("@here/olp-sdk-core");
32
23
  const olp_sdk_dataservice_api_1 = require("@here/olp-sdk-dataservice-api");
33
- const olp_sdk_dataservice_read_1 = require("@here/olp-sdk-dataservice-read");
24
+ const MetadataCacheRepository_1 = require("../cache/MetadataCacheRepository");
34
25
  /**
35
26
  * A client for the Query Service API that provides a way to get information (metadata)
36
27
  * about layers and partitions stored in a catalog.
37
28
  * This service exposes the metadata for a single partition that you can query one by one or using a parent tile.
38
29
  */
39
30
  class QueryClient {
31
+ settings;
32
+ apiVersion = "v1";
40
33
  /**
41
34
  * Constructs a new client for the Query Service API.
42
35
  *
@@ -45,7 +38,6 @@ class QueryClient {
45
38
  */
46
39
  constructor(settings) {
47
40
  this.settings = settings;
48
- this.apiVersion = "v1";
49
41
  }
50
42
  /**
51
43
  * Fetches the quadtree index.
@@ -58,47 +50,48 @@ class QueryClient {
58
50
  *
59
51
  * @return The quadtree index object.
60
52
  */
61
- fetchQuadTreeIndex(request, abortSignal) {
62
- return __awaiter(this, void 0, void 0, function* () {
63
- const quadKey = request.getQuadKey();
64
- const layerId = request.getLayerId();
65
- if (!quadKey || !olp_sdk_core_1.TileKey.isValid(quadKey)) {
66
- return Promise.reject("Please provide correct QuadKey");
67
- }
68
- if (!layerId) {
69
- return Promise.reject("Please provide correct Id of the Layer");
70
- }
71
- let catalogVersion = request.getVersion();
72
- if (request.getLayerType() === "versioned" &&
73
- catalogVersion === undefined) {
74
- catalogVersion = yield this.getCatalogLatestVersion(request.getCatalogHrn(), abortSignal, request.getBillingTag()).catch(error => Promise.reject(`Error getting the last catalog version: ${error}`));
75
- }
76
- if (request.getLayerType() === "versioned" &&
77
- catalogVersion === undefined) {
78
- return Promise.reject(`Please provide correct catalog version`);
79
- }
80
- const requestBuilder = yield olp_sdk_core_1.RequestFactory.create("query", this.apiVersion, this.settings, request.getCatalogHrn(), abortSignal).catch(error => Promise.reject(`Erorr creating request object for query service: ${error}`));
81
- const subQuadKeysMaxLength = request.getDepth();
82
- let fetchingQuadTreeIndexFunction;
83
- let paramsForFetchQuadTreeIndex = {
84
- version: 0,
85
- layerId,
86
- depth: subQuadKeysMaxLength,
87
- quadKey: olp_sdk_core_1.TileKey.fromRowColumnLevel(quadKey.row, quadKey.column, quadKey.level)
88
- .mortonCode()
89
- .toString(),
90
- billingTag: request.getBillingTag(),
91
- additionalFields: request.getAdditionalFields()
53
+ async fetchQuadTreeIndex(request, abortSignal) {
54
+ const quadKey = request.getQuadKey();
55
+ const layerId = request.getLayerId();
56
+ if (!quadKey || !olp_sdk_core_1.TileKey.isValid(quadKey)) {
57
+ return Promise.reject("Please provide correct QuadKey");
58
+ }
59
+ if (!layerId) {
60
+ return Promise.reject("Please provide correct Id of the Layer");
61
+ }
62
+ let catalogVersion = request.getVersion();
63
+ if (request.getLayerType() === "versioned" &&
64
+ catalogVersion === undefined) {
65
+ catalogVersion = await this.getCatalogLatestVersion(request.getCatalogHrn(), abortSignal, request.getBillingTag()).catch((error) => Promise.reject(`Error getting the last catalog version: ${error}`));
66
+ }
67
+ if (request.getLayerType() === "versioned" &&
68
+ catalogVersion === undefined) {
69
+ return Promise.reject(`Please provide correct catalog version`);
70
+ }
71
+ const requestBuilder = await olp_sdk_core_1.RequestFactory.create("query", this.apiVersion, this.settings, request.getCatalogHrn(), abortSignal).catch((error) => Promise.reject(`Erorr creating request object for query service: ${error}`));
72
+ const subQuadKeysMaxLength = request.getDepth();
73
+ let fetchingQuadTreeIndexFunction;
74
+ let paramsForFetchQuadTreeIndex = {
75
+ version: 0,
76
+ layerId,
77
+ depth: subQuadKeysMaxLength,
78
+ quadKey: olp_sdk_core_1.TileKey.fromRowColumnLevel(quadKey.row, quadKey.column, quadKey.level)
79
+ .mortonCode()
80
+ .toString(),
81
+ billingTag: request.getBillingTag(),
82
+ additionalFields: request.getAdditionalFields()
83
+ };
84
+ if (request.getLayerType() === "volatile") {
85
+ fetchingQuadTreeIndexFunction = olp_sdk_dataservice_api_1.QueryApi.quadTreeIndexVolatile;
86
+ }
87
+ else {
88
+ fetchingQuadTreeIndexFunction = olp_sdk_dataservice_api_1.QueryApi.quadTreeIndex;
89
+ paramsForFetchQuadTreeIndex = {
90
+ ...paramsForFetchQuadTreeIndex,
91
+ version: catalogVersion
92
92
  };
93
- if (request.getLayerType() === "volatile") {
94
- fetchingQuadTreeIndexFunction = olp_sdk_dataservice_api_1.QueryApi.quadTreeIndexVolatile;
95
- }
96
- else {
97
- fetchingQuadTreeIndexFunction = olp_sdk_dataservice_api_1.QueryApi.quadTreeIndex;
98
- paramsForFetchQuadTreeIndex = Object.assign(Object.assign({}, paramsForFetchQuadTreeIndex), { version: catalogVersion });
99
- }
100
- return fetchingQuadTreeIndexFunction(requestBuilder, paramsForFetchQuadTreeIndex);
101
- });
93
+ }
94
+ return fetchingQuadTreeIndexFunction(requestBuilder, paramsForFetchQuadTreeIndex);
102
95
  }
103
96
  /**
104
97
  * Gets partitions using their IDs.
@@ -113,57 +106,53 @@ class QueryClient {
113
106
  *
114
107
  * @return The requested partitions.
115
108
  */
116
- getPartitionsById(request, layerId, hrn, abortSignal, catalogVersion) {
117
- return __awaiter(this, void 0, void 0, function* () {
118
- const idsList = request.getPartitionIds();
119
- if (!idsList) {
120
- return Promise.reject("Please provide correct partitionIds list");
121
- }
122
- const cache = new olp_sdk_dataservice_read_1.MetadataCacheRepository(this.settings.cache);
123
- if (request.getFetchOption() !== olp_sdk_core_1.FetchOptions.OnlineOnly) {
124
- const cachedPartitions = cache.get(request, hrn.toString(), layerId, catalogVersion);
125
- if (cachedPartitions) {
126
- return Promise.resolve({
127
- partitions: cachedPartitions
128
- });
129
- }
130
- }
131
- const requestBuilder = yield olp_sdk_core_1.RequestFactory.create("query", this.apiVersion, this.settings, hrn, abortSignal).catch(error => Promise.reject(`Erorr creating request object for query service: ${error}`));
132
- const medatada = yield olp_sdk_dataservice_api_1.QueryApi.getPartitionsById(requestBuilder, {
133
- layerId,
134
- partition: idsList,
135
- additionalFields: request.getAdditionalFields(),
136
- version: catalogVersion !== undefined ? `${catalogVersion}` : undefined
137
- }).catch(err => Promise.reject(err));
138
- if (request.getFetchOption() !== olp_sdk_core_1.FetchOptions.OnlineOnly &&
139
- medatada &&
140
- medatada.partitions &&
141
- medatada.partitions.length) {
142
- const partitions = medatada.partitions.map(partition => ({
143
- checksum: partition.checksum,
144
- compressedDataSize: partition.compressedDataSize,
145
- dataHandle: partition.dataHandle || "",
146
- dataSize: partition.dataSize,
147
- partition: partition.partition,
148
- version: partition.version
149
- }));
150
- cache.put(request, hrn.toString(), layerId, partitions, catalogVersion);
109
+ async getPartitionsById(request, layerId, hrn, abortSignal, catalogVersion) {
110
+ const idsList = request.getPartitionIds();
111
+ if (!idsList) {
112
+ return Promise.reject("Please provide correct partitionIds list");
113
+ }
114
+ const cache = new MetadataCacheRepository_1.MetadataCacheRepository(this.settings.cache);
115
+ if (request.getFetchOption() !== olp_sdk_core_1.FetchOptions.OnlineOnly) {
116
+ const cachedPartitions = cache.get(request, hrn.toString(), layerId, catalogVersion);
117
+ if (cachedPartitions) {
118
+ return Promise.resolve({
119
+ partitions: cachedPartitions
120
+ });
151
121
  }
152
- return Promise.resolve(medatada);
122
+ }
123
+ const requestBuilder = await olp_sdk_core_1.RequestFactory.create("query", this.apiVersion, this.settings, hrn, abortSignal).catch((error) => Promise.reject(`Erorr creating request object for query service: ${error}`));
124
+ const medatada = await olp_sdk_dataservice_api_1.QueryApi.getPartitionsById(requestBuilder, {
125
+ layerId,
126
+ partition: idsList,
127
+ additionalFields: request.getAdditionalFields(),
128
+ version: catalogVersion !== undefined ? `${catalogVersion}` : undefined
153
129
  });
130
+ if (request.getFetchOption() !== olp_sdk_core_1.FetchOptions.OnlineOnly &&
131
+ medatada &&
132
+ medatada.partitions &&
133
+ medatada.partitions.length) {
134
+ const partitions = medatada.partitions.map((partition) => ({
135
+ checksum: partition.checksum,
136
+ compressedDataSize: partition.compressedDataSize,
137
+ dataHandle: partition.dataHandle || "",
138
+ dataSize: partition.dataSize,
139
+ partition: partition.partition,
140
+ version: partition.version
141
+ }));
142
+ cache.put(request, hrn.toString(), layerId, partitions, catalogVersion);
143
+ }
144
+ return Promise.resolve(medatada);
154
145
  }
155
146
  /**
156
147
  * Gets the latest available catalog version
157
148
  */
158
- getCatalogLatestVersion(catalogHrn, abortSignal, billingTag) {
159
- return __awaiter(this, void 0, void 0, function* () {
160
- const request = yield olp_sdk_core_1.RequestFactory.create("metadata", this.apiVersion, this.settings, catalogHrn, abortSignal).catch(error => Promise.reject(`Erorr creating request object for metadata service: ${error}`));
161
- const latestVersion = yield olp_sdk_dataservice_api_1.MetadataApi.latestVersion(request, {
162
- startVersion: -1,
163
- billingTag
164
- }).catch(error => Promise.reject(error));
165
- return Promise.resolve(latestVersion.version);
149
+ async getCatalogLatestVersion(catalogHrn, abortSignal, billingTag) {
150
+ const request = await olp_sdk_core_1.RequestFactory.create("metadata", this.apiVersion, this.settings, catalogHrn, abortSignal).catch((error) => Promise.reject(`Erorr creating request object for metadata service: ${error}`));
151
+ const latestVersion = await olp_sdk_dataservice_api_1.MetadataApi.latestVersion(request, {
152
+ startVersion: -1,
153
+ billingTag
166
154
  });
155
+ return Promise.resolve(latestVersion.version);
167
156
  }
168
157
  }
169
158
  exports.QueryClient = QueryClient;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- * Copyright (C) 2019-2020 HERE Europe B.V.
3
+ * Copyright (C) 2019-2026 HERE Europe B.V.
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License");
6
6
  * you may not use this file except in compliance with the License.
@@ -19,11 +19,13 @@
19
19
  */
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
21
  exports.SchemaDetailsRequest = void 0;
22
- const olp_sdk_dataservice_read_1 = require("@here/olp-sdk-dataservice-read");
22
+ const validateBillingTag_1 = require("../utils/validateBillingTag");
23
23
  /**
24
24
  * Prepares information for calls to the platform Artifact Service.
25
25
  */
26
26
  class SchemaDetailsRequest {
27
+ schemaHrn;
28
+ billingTag;
27
29
  /**
28
30
  * Gets schema metadata for the request.
29
31
  *
@@ -53,7 +55,7 @@ class SchemaDetailsRequest {
53
55
  * @return The updated [[SchemaDetailsRequest]] instance that you can use to chain methods.
54
56
  */
55
57
  withBillingTag(tag) {
56
- this.billingTag = olp_sdk_dataservice_read_1.validateBillingTag(tag);
58
+ this.billingTag = (0, validateBillingTag_1.validateBillingTag)(tag);
57
59
  return this;
58
60
  }
59
61
  /**
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- * Copyright (C) 2019 HERE Europe B.V.
3
+ * Copyright (C) 2019-2026 HERE Europe B.V.
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License");
6
6
  * you may not use this file except in compliance with the License.
@@ -19,11 +19,13 @@
19
19
  */
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
21
  exports.SchemaRequest = void 0;
22
- const olp_sdk_dataservice_read_1 = require("@here/olp-sdk-dataservice-read");
22
+ const validateBillingTag_1 = require("../utils/validateBillingTag");
23
23
  /**
24
24
  * Prepares information for calls to the platform Artifact Service.
25
25
  */
26
26
  class SchemaRequest {
27
+ variant;
28
+ billingTag;
27
29
  /**
28
30
  * Gets the `Variant` object of the schema for the request.
29
31
  *
@@ -52,7 +54,7 @@ class SchemaRequest {
52
54
  * @return The updated [[SchemaRequest]] instance that you can use to chain methods.
53
55
  */
54
56
  withBillingTag(tag) {
55
- this.billingTag = olp_sdk_dataservice_read_1.validateBillingTag(tag);
57
+ this.billingTag = (0, validateBillingTag_1.validateBillingTag)(tag);
56
58
  return this;
57
59
  }
58
60
  /**
@@ -23,6 +23,9 @@ exports.SeekRequest = void 0;
23
23
  * Prepares information for calls to the platform Stream Service.
24
24
  */
25
25
  class SeekRequest {
26
+ mode;
27
+ subscriptionId;
28
+ offsets;
26
29
  /**
27
30
  * Gets the subscription mode for the request.
28
31
  *
@@ -1,6 +1,7 @@
1
1
  import { OlpClientSettings } from "@here/olp-sdk-core";
2
2
  import { CoverageApi } from "@here/olp-sdk-dataservice-api";
3
- import { StatisticsRequest, SummaryRequest } from "@here/olp-sdk-dataservice-read";
3
+ import { StatisticsRequest } from "./StatisticsRequest";
4
+ import { SummaryRequest } from "./SummaryRequest";
4
5
  /**
5
6
  * A client for the platform Statistics Service.
6
7
  */