@azure/digital-twins-core 2.0.0-alpha.20240112.1 → 2.0.0-alpha.20240126.1

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/dist/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var tslib = require('tslib');
5
6
  var uuid = require('uuid');
6
7
  var coreClient = require('@azure/core-client');
7
8
  var coreTracing = require('@azure/core-tracing');
@@ -35,10 +36,11 @@ var coreClient__namespace = /*#__PURE__*/_interopNamespaceDefault(coreClient);
35
36
  */
36
37
  const pageMap = new WeakMap();
37
38
  function setContinuationToken(page, continuationToken) {
39
+ var _a;
38
40
  if (typeof page !== "object" || page === null || !continuationToken) {
39
41
  return;
40
42
  }
41
- const pageInfo = pageMap.get(page) ?? {};
43
+ const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
42
44
  pageInfo.continuationToken = continuationToken;
43
45
  pageMap.set(page, pageInfo);
44
46
  }
@@ -854,35 +856,52 @@ class DigitalTwinModelsImpl {
854
856
  return this;
855
857
  },
856
858
  byPage: (settings) => {
857
- if (settings?.maxPageSize) {
859
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
858
860
  throw new Error("maxPageSize is not supported by this operation.");
859
861
  }
860
862
  return this.listPagingPage(options, settings);
861
863
  }
862
864
  };
863
865
  }
864
- async *listPagingPage(options, settings) {
865
- let result;
866
- let continuationToken = settings?.continuationToken;
867
- if (!continuationToken) {
868
- result = await this._list(options);
869
- let page = result.value || [];
870
- continuationToken = result.nextLink;
871
- setContinuationToken(page, continuationToken);
872
- yield page;
873
- }
874
- while (continuationToken) {
875
- result = await this._listNext(continuationToken, options);
876
- continuationToken = result.nextLink;
877
- let page = result.value || [];
878
- setContinuationToken(page, continuationToken);
879
- yield page;
880
- }
866
+ listPagingPage(options, settings) {
867
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
868
+ let result;
869
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
870
+ if (!continuationToken) {
871
+ result = yield tslib.__await(this._list(options));
872
+ let page = result.value || [];
873
+ continuationToken = result.nextLink;
874
+ setContinuationToken(page, continuationToken);
875
+ yield yield tslib.__await(page);
876
+ }
877
+ while (continuationToken) {
878
+ result = yield tslib.__await(this._listNext(continuationToken, options));
879
+ continuationToken = result.nextLink;
880
+ let page = result.value || [];
881
+ setContinuationToken(page, continuationToken);
882
+ yield yield tslib.__await(page);
883
+ }
884
+ });
881
885
  }
882
- async *listPagingAll(options) {
883
- for await (const page of this.listPagingPage(options)) {
884
- yield* page;
885
- }
886
+ listPagingAll(options) {
887
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
888
+ var _a, e_1, _b, _c;
889
+ try {
890
+ for (var _d = true, _e = tslib.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
891
+ _c = _f.value;
892
+ _d = false;
893
+ const page = _c;
894
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
895
+ }
896
+ }
897
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
898
+ finally {
899
+ try {
900
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
901
+ }
902
+ finally { if (e_1) throw e_1.error; }
903
+ }
904
+ });
886
905
  }
887
906
  /**
888
907
  * Uploads one or more models. When any error occurs, no models are uploaded.
@@ -1182,35 +1201,52 @@ class DigitalTwinsImpl {
1182
1201
  return this;
1183
1202
  },
1184
1203
  byPage: (settings) => {
1185
- if (settings?.maxPageSize) {
1204
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
1186
1205
  throw new Error("maxPageSize is not supported by this operation.");
1187
1206
  }
1188
1207
  return this.listRelationshipsPagingPage(id, options, settings);
1189
1208
  }
1190
1209
  };
1191
1210
  }
1192
- async *listRelationshipsPagingPage(id, options, settings) {
1193
- let result;
1194
- let continuationToken = settings?.continuationToken;
1195
- if (!continuationToken) {
1196
- result = await this._listRelationships(id, options);
1197
- let page = result.value || [];
1198
- continuationToken = result.nextLink;
1199
- setContinuationToken(page, continuationToken);
1200
- yield page;
1201
- }
1202
- while (continuationToken) {
1203
- result = await this._listRelationshipsNext(id, continuationToken, options);
1204
- continuationToken = result.nextLink;
1205
- let page = result.value || [];
1206
- setContinuationToken(page, continuationToken);
1207
- yield page;
1208
- }
1211
+ listRelationshipsPagingPage(id, options, settings) {
1212
+ return tslib.__asyncGenerator(this, arguments, function* listRelationshipsPagingPage_1() {
1213
+ let result;
1214
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
1215
+ if (!continuationToken) {
1216
+ result = yield tslib.__await(this._listRelationships(id, options));
1217
+ let page = result.value || [];
1218
+ continuationToken = result.nextLink;
1219
+ setContinuationToken(page, continuationToken);
1220
+ yield yield tslib.__await(page);
1221
+ }
1222
+ while (continuationToken) {
1223
+ result = yield tslib.__await(this._listRelationshipsNext(id, continuationToken, options));
1224
+ continuationToken = result.nextLink;
1225
+ let page = result.value || [];
1226
+ setContinuationToken(page, continuationToken);
1227
+ yield yield tslib.__await(page);
1228
+ }
1229
+ });
1209
1230
  }
1210
- async *listRelationshipsPagingAll(id, options) {
1211
- for await (const page of this.listRelationshipsPagingPage(id, options)) {
1212
- yield* page;
1213
- }
1231
+ listRelationshipsPagingAll(id, options) {
1232
+ return tslib.__asyncGenerator(this, arguments, function* listRelationshipsPagingAll_1() {
1233
+ var _a, e_1, _b, _c;
1234
+ try {
1235
+ for (var _d = true, _e = tslib.__asyncValues(this.listRelationshipsPagingPage(id, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
1236
+ _c = _f.value;
1237
+ _d = false;
1238
+ const page = _c;
1239
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1240
+ }
1241
+ }
1242
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
1243
+ finally {
1244
+ try {
1245
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
1246
+ }
1247
+ finally { if (e_1) throw e_1.error; }
1248
+ }
1249
+ });
1214
1250
  }
1215
1251
  /**
1216
1252
  * Retrieves all incoming relationship for a digital twin.
@@ -1233,35 +1269,52 @@ class DigitalTwinsImpl {
1233
1269
  return this;
1234
1270
  },
1235
1271
  byPage: (settings) => {
1236
- if (settings?.maxPageSize) {
1272
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
1237
1273
  throw new Error("maxPageSize is not supported by this operation.");
1238
1274
  }
1239
1275
  return this.listIncomingRelationshipsPagingPage(id, options, settings);
1240
1276
  }
1241
1277
  };
1242
1278
  }
1243
- async *listIncomingRelationshipsPagingPage(id, options, settings) {
1244
- let result;
1245
- let continuationToken = settings?.continuationToken;
1246
- if (!continuationToken) {
1247
- result = await this._listIncomingRelationships(id, options);
1248
- let page = result.value || [];
1249
- continuationToken = result.nextLink;
1250
- setContinuationToken(page, continuationToken);
1251
- yield page;
1252
- }
1253
- while (continuationToken) {
1254
- result = await this._listIncomingRelationshipsNext(id, continuationToken, options);
1255
- continuationToken = result.nextLink;
1256
- let page = result.value || [];
1257
- setContinuationToken(page, continuationToken);
1258
- yield page;
1259
- }
1279
+ listIncomingRelationshipsPagingPage(id, options, settings) {
1280
+ return tslib.__asyncGenerator(this, arguments, function* listIncomingRelationshipsPagingPage_1() {
1281
+ let result;
1282
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
1283
+ if (!continuationToken) {
1284
+ result = yield tslib.__await(this._listIncomingRelationships(id, options));
1285
+ let page = result.value || [];
1286
+ continuationToken = result.nextLink;
1287
+ setContinuationToken(page, continuationToken);
1288
+ yield yield tslib.__await(page);
1289
+ }
1290
+ while (continuationToken) {
1291
+ result = yield tslib.__await(this._listIncomingRelationshipsNext(id, continuationToken, options));
1292
+ continuationToken = result.nextLink;
1293
+ let page = result.value || [];
1294
+ setContinuationToken(page, continuationToken);
1295
+ yield yield tslib.__await(page);
1296
+ }
1297
+ });
1260
1298
  }
1261
- async *listIncomingRelationshipsPagingAll(id, options) {
1262
- for await (const page of this.listIncomingRelationshipsPagingPage(id, options)) {
1263
- yield* page;
1264
- }
1299
+ listIncomingRelationshipsPagingAll(id, options) {
1300
+ return tslib.__asyncGenerator(this, arguments, function* listIncomingRelationshipsPagingAll_1() {
1301
+ var _a, e_2, _b, _c;
1302
+ try {
1303
+ for (var _d = true, _e = tslib.__asyncValues(this.listIncomingRelationshipsPagingPage(id, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
1304
+ _c = _f.value;
1305
+ _d = false;
1306
+ const page = _c;
1307
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1308
+ }
1309
+ }
1310
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
1311
+ finally {
1312
+ try {
1313
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
1314
+ }
1315
+ finally { if (e_2) throw e_2.error; }
1316
+ }
1317
+ });
1265
1318
  }
1266
1319
  /**
1267
1320
  * Retrieves a digital twin.
@@ -1883,35 +1936,52 @@ class EventRoutesImpl {
1883
1936
  return this;
1884
1937
  },
1885
1938
  byPage: (settings) => {
1886
- if (settings?.maxPageSize) {
1939
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
1887
1940
  throw new Error("maxPageSize is not supported by this operation.");
1888
1941
  }
1889
1942
  return this.listPagingPage(options, settings);
1890
1943
  }
1891
1944
  };
1892
1945
  }
1893
- async *listPagingPage(options, settings) {
1894
- let result;
1895
- let continuationToken = settings?.continuationToken;
1896
- if (!continuationToken) {
1897
- result = await this._list(options);
1898
- let page = result.value || [];
1899
- continuationToken = result.nextLink;
1900
- setContinuationToken(page, continuationToken);
1901
- yield page;
1902
- }
1903
- while (continuationToken) {
1904
- result = await this._listNext(continuationToken, options);
1905
- continuationToken = result.nextLink;
1906
- let page = result.value || [];
1907
- setContinuationToken(page, continuationToken);
1908
- yield page;
1909
- }
1946
+ listPagingPage(options, settings) {
1947
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
1948
+ let result;
1949
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
1950
+ if (!continuationToken) {
1951
+ result = yield tslib.__await(this._list(options));
1952
+ let page = result.value || [];
1953
+ continuationToken = result.nextLink;
1954
+ setContinuationToken(page, continuationToken);
1955
+ yield yield tslib.__await(page);
1956
+ }
1957
+ while (continuationToken) {
1958
+ result = yield tslib.__await(this._listNext(continuationToken, options));
1959
+ continuationToken = result.nextLink;
1960
+ let page = result.value || [];
1961
+ setContinuationToken(page, continuationToken);
1962
+ yield yield tslib.__await(page);
1963
+ }
1964
+ });
1910
1965
  }
1911
- async *listPagingAll(options) {
1912
- for await (const page of this.listPagingPage(options)) {
1913
- yield* page;
1914
- }
1966
+ listPagingAll(options) {
1967
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
1968
+ var _a, e_1, _b, _c;
1969
+ try {
1970
+ for (var _d = true, _e = tslib.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
1971
+ _c = _f.value;
1972
+ _d = false;
1973
+ const page = _c;
1974
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1975
+ }
1976
+ }
1977
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
1978
+ finally {
1979
+ try {
1980
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
1981
+ }
1982
+ finally { if (e_1) throw e_1.error; }
1983
+ }
1984
+ });
1915
1985
  }
1916
1986
  /**
1917
1987
  * Retrieves all event routes.
@@ -2063,6 +2133,7 @@ class AzureDigitalTwinsAPI extends coreClient__namespace.ServiceClient {
2063
2133
  * @param options The parameter options
2064
2134
  */
2065
2135
  constructor(options) {
2136
+ var _a, _b;
2066
2137
  // Initializing default values for options
2067
2138
  if (!options) {
2068
2139
  options = {};
@@ -2074,14 +2145,9 @@ class AzureDigitalTwinsAPI extends coreClient__namespace.ServiceClient {
2074
2145
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
2075
2146
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
2076
2147
  : `${packageDetails}`;
2077
- const optionsWithDefaults = {
2078
- ...defaults,
2079
- ...options,
2080
- userAgentOptions: {
2148
+ const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
2081
2149
  userAgentPrefix
2082
- },
2083
- endpoint: options.endpoint ?? options.baseUri ?? "https://digitaltwins-hostname"
2084
- };
2150
+ }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://digitaltwins-hostname" });
2085
2151
  super(optionsWithDefaults);
2086
2152
  // Assigning values to Constant parameters
2087
2153
  this.$host = options.$host || "https://digitaltwins-hostname";
@@ -2166,19 +2232,11 @@ class DigitalTwinsClient {
2166
2232
  * @param options - Used to configure the service client.
2167
2233
  */
2168
2234
  constructor(endpointUrl, credential, options = {}) {
2169
- const internalPipelineOptions = {
2170
- ...options,
2171
- loggingOptions: {
2235
+ const internalPipelineOptions = Object.assign(Object.assign({}, options), { loggingOptions: {
2172
2236
  logger: logger.info,
2173
2237
  additionalAllowedHeaderNames: ["x-ms-request-id"],
2174
- },
2175
- };
2176
- this.client = new AzureDigitalTwinsAPI({
2177
- endpoint: endpointUrl,
2178
- credential,
2179
- credentialScopes: DEFAULT_DIGITALTWINS_SCOPE,
2180
- ...internalPipelineOptions,
2181
- });
2238
+ } });
2239
+ this.client = new AzureDigitalTwinsAPI(Object.assign({ endpoint: endpointUrl, credential, credentialScopes: DEFAULT_DIGITALTWINS_SCOPE }, internalPipelineOptions));
2182
2240
  }
2183
2241
  /**
2184
2242
  * Get a digital twin
@@ -2347,10 +2405,7 @@ class DigitalTwinsClient {
2347
2405
  */
2348
2406
  publishTelemetry(digitalTwinId, payload, messageId, options = {}) {
2349
2407
  return tracingClient.withSpan("DigitalTwinsClient.publishTelemetry", options, async (updatedOptions) => {
2350
- return this.client.digitalTwins.sendTelemetry(digitalTwinId, messageId || uuid.v4(), payload, {
2351
- ...updatedOptions,
2352
- telemetrySourceTime: new Date().toISOString(),
2353
- });
2408
+ return this.client.digitalTwins.sendTelemetry(digitalTwinId, messageId || uuid.v4(), payload, Object.assign(Object.assign({}, updatedOptions), { telemetrySourceTime: new Date().toISOString() }));
2354
2409
  });
2355
2410
  }
2356
2411
  /**
@@ -2365,7 +2420,7 @@ class DigitalTwinsClient {
2365
2420
  */
2366
2421
  publishComponentTelemetry(digitalTwinId, componentName, payload, messageId, options = {}) {
2367
2422
  return tracingClient.withSpan("DigitalTwinsClient.publishComponentTelemetry", options, async (updatedOptions) => {
2368
- return this.client.digitalTwins.sendComponentTelemetry(digitalTwinId, componentName, messageId || uuid.v4(), payload, { ...updatedOptions, telemetrySourceTime: new Date().toISOString() });
2423
+ return this.client.digitalTwins.sendComponentTelemetry(digitalTwinId, componentName, messageId || uuid.v4(), payload, Object.assign(Object.assign({}, updatedOptions), { telemetrySourceTime: new Date().toISOString() }));
2369
2424
  });
2370
2425
  }
2371
2426
  /**
@@ -2376,10 +2431,8 @@ class DigitalTwinsClient {
2376
2431
  * @returns The application/json model.
2377
2432
  */
2378
2433
  getModel(modelId, options = {}) {
2379
- return tracingClient.withSpan("DigitalTwinsClient.getModel", {
2380
- ...options,
2381
- includeModelDefinition: options?.includeModelDefinition ?? false,
2382
- }, async (updatedOptions) => {
2434
+ var _a;
2435
+ return tracingClient.withSpan("DigitalTwinsClient.getModel", Object.assign(Object.assign({}, options), { includeModelDefinition: (_a = options === null || options === void 0 ? void 0 : options.includeModelDefinition) !== null && _a !== void 0 ? _a : false }), async (updatedOptions) => {
2383
2436
  return this.client.digitalTwinModels.getById(modelId, updatedOptions);
2384
2437
  });
2385
2438
  }
@@ -2390,10 +2443,8 @@ class DigitalTwinsClient {
2390
2443
  * @returns A pageable set of application/json models.
2391
2444
  */
2392
2445
  listModels(options = {}) {
2393
- return this.client.digitalTwinModels.list({
2394
- ...options,
2395
- includeModelDefinition: options?.includeModelDefinition ?? false,
2396
- });
2446
+ var _a;
2447
+ return this.client.digitalTwinModels.list(Object.assign(Object.assign({}, options), { includeModelDefinition: (_a = options === null || options === void 0 ? void 0 : options.includeModelDefinition) !== null && _a !== void 0 ? _a : false }));
2397
2448
  }
2398
2449
  /**
2399
2450
  * Create one or many
@@ -2403,10 +2454,7 @@ class DigitalTwinsClient {
2403
2454
  * @returns The created application/json models.
2404
2455
  */
2405
2456
  createModels(dtdlModels, options = {}) {
2406
- return tracingClient.withSpan("DigitalTwinsClient.createModels", {
2407
- ...options,
2408
- models: dtdlModels,
2409
- }, async (updatedOptions) => {
2457
+ return tracingClient.withSpan("DigitalTwinsClient.createModels", Object.assign(Object.assign({}, options), { models: dtdlModels }), async (updatedOptions) => {
2410
2458
  return this.client.digitalTwinModels.add(updatedOptions);
2411
2459
  });
2412
2460
  }
@@ -2471,13 +2519,10 @@ class DigitalTwinsClient {
2471
2519
 
2472
2520
  */
2473
2521
  upsertEventRoute(eventRouteId, endpointId, filter, options = {}) {
2474
- return tracingClient.withSpan("DigitalTwinsClient.upsertEventRoute", {
2475
- eventRoute: {
2522
+ return tracingClient.withSpan("DigitalTwinsClient.upsertEventRoute", Object.assign({ eventRoute: {
2476
2523
  endpointName: endpointId,
2477
2524
  filter,
2478
- },
2479
- ...options,
2480
- }, async (updatedOptions) => {
2525
+ } }, options), async (updatedOptions) => {
2481
2526
  return this.client.eventRoutes.add(eventRouteId, updatedOptions);
2482
2527
  });
2483
2528
  }
@@ -2501,30 +2546,47 @@ class DigitalTwinsClient {
2501
2546
  * @param continuationState - An object that indicates the position of the paginated request.
2502
2547
  *
2503
2548
  */
2504
- async *queryTwinsPage(query, options, continuationState) {
2505
- let { continuationToken } = continuationState ?? {};
2506
- if (!continuationToken) {
2507
- const queryResult = await this.client.query.queryTwins({ query }, options);
2508
- continuationToken = queryResult.continuationToken;
2509
- yield queryResult;
2510
- }
2511
- while (continuationToken) {
2512
- const queryResult = await this.client.query.queryTwins({ query, continuationToken }, options);
2513
- continuationToken = queryResult.continuationToken;
2514
- yield queryResult;
2515
- }
2549
+ queryTwinsPage(query, options, continuationState) {
2550
+ return tslib.__asyncGenerator(this, arguments, function* queryTwinsPage_1() {
2551
+ let { continuationToken } = continuationState !== null && continuationState !== void 0 ? continuationState : {};
2552
+ if (!continuationToken) {
2553
+ const queryResult = yield tslib.__await(this.client.query.queryTwins({ query }, options));
2554
+ continuationToken = queryResult.continuationToken;
2555
+ yield yield tslib.__await(queryResult);
2556
+ }
2557
+ while (continuationToken) {
2558
+ const queryResult = yield tslib.__await(this.client.query.queryTwins({ query, continuationToken }, options));
2559
+ continuationToken = queryResult.continuationToken;
2560
+ yield yield tslib.__await(queryResult);
2561
+ }
2562
+ });
2516
2563
  }
2517
2564
  /**
2518
2565
  * Deals with the iteration of all the available results of {@link query}.
2519
2566
  * @param query - The query string, in SQL-like syntax.
2520
2567
  * @param options - Common options for the iterative endpoints.
2521
2568
  */
2522
- async *queryTwinsAll(query, options) {
2523
- for await (const page of this.queryTwinsPage(query, options)) {
2524
- if (page.value) {
2525
- yield* page.value;
2569
+ queryTwinsAll(query, options) {
2570
+ return tslib.__asyncGenerator(this, arguments, function* queryTwinsAll_1() {
2571
+ var _a, e_1, _b, _c;
2572
+ try {
2573
+ for (var _d = true, _e = tslib.__asyncValues(this.queryTwinsPage(query, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
2574
+ _c = _f.value;
2575
+ _d = false;
2576
+ const page = _c;
2577
+ if (page.value) {
2578
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page.value)));
2579
+ }
2580
+ }
2526
2581
  }
2527
- }
2582
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
2583
+ finally {
2584
+ try {
2585
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
2586
+ }
2587
+ finally { if (e_1) throw e_1.error; }
2588
+ }
2589
+ });
2528
2590
  }
2529
2591
  /**
2530
2592
  * Query for digital twins.