@c8y/client 1017.45.0 → 1017.47.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.
@@ -1,13 +1,13 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
3
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
- (factory((global.cumulocity = {})));
5
- }(this, (function (exports) { 'use strict';
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.cumulocity = {}));
5
+ })(this, (function (exports) { 'use strict';
6
6
 
7
- var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
7
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
8
8
 
9
9
  function unwrapExports (x) {
10
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x.default : x;
10
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
11
11
  }
12
12
 
13
13
  function createCommonjsModule(fn, module) {
@@ -3428,11 +3428,11 @@
3428
3428
  }));
3429
3429
  });
3430
3430
 
3431
- var browser = {
3431
+ var browser$1 = {
3432
3432
  CometD: cometd.CometD,
3433
3433
  default: cometd
3434
3434
  };
3435
- var browser_1 = browser.CometD;
3435
+ var browser_1 = browser$1.CometD;
3436
3436
 
3437
3437
  var MetaChannel;
3438
3438
  (function (MetaChannel) {
@@ -3500,7 +3500,7 @@
3500
3500
  }
3501
3501
  }
3502
3502
 
3503
- var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
3503
+ var __awaiter$v = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
3504
3504
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3505
3505
  return new (P || (P = Promise))(function (resolve, reject) {
3506
3506
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -3532,7 +3532,7 @@
3532
3532
  * @param filter
3533
3533
  */
3534
3534
  next(filter = {}) {
3535
- return __awaiter(this, void 0, void 0, function* () {
3535
+ return __awaiter$v(this, void 0, void 0, function* () {
3536
3536
  return this.list(this.getFilter(filter, this.nextPage));
3537
3537
  });
3538
3538
  }
@@ -3541,7 +3541,7 @@
3541
3541
  * @param filter
3542
3542
  */
3543
3543
  prev(filter = {}) {
3544
- return __awaiter(this, void 0, void 0, function* () {
3544
+ return __awaiter$v(this, void 0, void 0, function* () {
3545
3545
  return this.list(this.getFilter(filter, this.prevPage));
3546
3546
  });
3547
3547
  }
@@ -3552,7 +3552,7 @@
3552
3552
  * @param filter
3553
3553
  */
3554
3554
  list(filter = {}) {
3555
- return __awaiter(this, void 0, void 0, function* () {
3555
+ return __awaiter$v(this, void 0, void 0, function* () {
3556
3556
  return this.service.list(filter);
3557
3557
  });
3558
3558
  }
@@ -3562,7 +3562,7 @@
3562
3562
  * @param filter
3563
3563
  */
3564
3564
  goto(page, filter = {}) {
3565
- return __awaiter(this, void 0, void 0, function* () {
3565
+ return __awaiter$v(this, void 0, void 0, function* () {
3566
3566
  return this.list(this.getFilter(filter, page));
3567
3567
  });
3568
3568
  }
@@ -3571,7 +3571,7 @@
3571
3571
  }
3572
3572
  }
3573
3573
 
3574
- var __awaiter$1 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
3574
+ var __awaiter$u = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
3575
3575
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3576
3576
  return new (P || (P = Promise))(function (resolve, reject) {
3577
3577
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -3598,7 +3598,7 @@
3598
3598
  });
3599
3599
  }
3600
3600
  list(filter = {}) {
3601
- return __awaiter$1(this, void 0, void 0, function* () {
3601
+ return __awaiter$u(this, void 0, void 0, function* () {
3602
3602
  const headers = { accept: 'application/json' };
3603
3603
  const url = this.listUrl;
3604
3604
  const res = yield this.fetch(url, this.changeFetchOptions({ headers, params: filter }, url));
@@ -3609,7 +3609,7 @@
3609
3609
  });
3610
3610
  }
3611
3611
  detail(entityOrId, filter = {}) {
3612
- return __awaiter$1(this, void 0, void 0, function* () {
3612
+ return __awaiter$u(this, void 0, void 0, function* () {
3613
3613
  const headers = { accept: 'application/json' };
3614
3614
  const url = this.getDetailUrl(entityOrId);
3615
3615
  const res = yield this.fetch(url, this.changeFetchOptions({ headers, params: Object.assign({}, filter) }, url));
@@ -3618,7 +3618,7 @@
3618
3618
  });
3619
3619
  }
3620
3620
  create(entity) {
3621
- return __awaiter$1(this, void 0, void 0, function* () {
3621
+ return __awaiter$u(this, void 0, void 0, function* () {
3622
3622
  const url = this.listUrl;
3623
3623
  const method = 'POST';
3624
3624
  const body = JSON.stringify(this.onBeforeCreate(entity));
@@ -3629,7 +3629,7 @@
3629
3629
  });
3630
3630
  }
3631
3631
  update(entity) {
3632
- return __awaiter$1(this, void 0, void 0, function* () {
3632
+ return __awaiter$u(this, void 0, void 0, function* () {
3633
3633
  const url = this.getDetailUrl(entity);
3634
3634
  const method = 'PUT';
3635
3635
  const body = JSON.stringify(this.onBeforeUpdate(entity));
@@ -3640,7 +3640,7 @@
3640
3640
  });
3641
3641
  }
3642
3642
  delete(entityOrId, params) {
3643
- return __awaiter$1(this, void 0, void 0, function* () {
3643
+ return __awaiter$u(this, void 0, void 0, function* () {
3644
3644
  const method = 'DELETE';
3645
3645
  const url = this.getDetailUrl(entityOrId);
3646
3646
  const res = yield this.fetch(url, this.changeFetchOptions({ method, params }, url));
@@ -3676,7 +3676,7 @@
3676
3676
  return `${this.listUrl}/${id}`;
3677
3677
  }
3678
3678
  fetch(url, init) {
3679
- return __awaiter$1(this, void 0, void 0, function* () {
3679
+ return __awaiter$u(this, void 0, void 0, function* () {
3680
3680
  const fullUrl = this.getUrl(url);
3681
3681
  const res = yield this.client.fetch(fullUrl, init);
3682
3682
  return yield this.handleErrorStatusCodes(res);
@@ -3692,7 +3692,7 @@
3692
3692
  * @throws If an error is detected, it throws `{ res, data }`, where `data` contains error details from server.
3693
3693
  */
3694
3694
  handleErrorStatusCodes(response) {
3695
- return __awaiter$1(this, void 0, void 0, function* () {
3695
+ return __awaiter$u(this, void 0, void 0, function* () {
3696
3696
  if (response.status >= 400) {
3697
3697
  let data = null;
3698
3698
  try {
@@ -3749,7 +3749,7 @@
3749
3749
  })();
3750
3750
  (function(self) {
3751
3751
 
3752
- var irrelevant = (function (exports) {
3752
+ ((function (exports) {
3753
3753
 
3754
3754
  var support = {
3755
3755
  searchParams: 'URLSearchParams' in self,
@@ -4277,7 +4277,7 @@
4277
4277
 
4278
4278
  return exports;
4279
4279
 
4280
- })({});
4280
+ }))({});
4281
4281
  })(__self__);
4282
4282
  __self__.fetch.ponyfill = true;
4283
4283
  // Remove "polyfill" property added by whatwg-fetch
@@ -4295,12 +4295,12 @@
4295
4295
  });
4296
4296
 
4297
4297
  var fetch = unwrapExports(browserPonyfill);
4298
- var browserPonyfill_1 = browserPonyfill.fetch;
4299
- var browserPonyfill_2 = browserPonyfill.Headers;
4300
- var browserPonyfill_3 = browserPonyfill.Request;
4301
- var browserPonyfill_4 = browserPonyfill.Response;
4298
+ browserPonyfill.fetch;
4299
+ browserPonyfill.Headers;
4300
+ browserPonyfill.Request;
4301
+ browserPonyfill.Response;
4302
4302
 
4303
- var __awaiter$2 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
4303
+ var __awaiter$t = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
4304
4304
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4305
4305
  return new (P || (P = Promise))(function (resolve, reject) {
4306
4306
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -4328,7 +4328,7 @@
4328
4328
  auths.set(this, auth);
4329
4329
  }
4330
4330
  fetch(url, init) {
4331
- return __awaiter$2(this, void 0, void 0, function* () {
4331
+ return __awaiter$t(this, void 0, void 0, function* () {
4332
4332
  let fetchFn = fetch;
4333
4333
  try {
4334
4334
  fetchFn = window.fetch || fetchFn;
@@ -4438,7 +4438,7 @@
4438
4438
  return _btoa(utf8(input));
4439
4439
  });
4440
4440
 
4441
- var E$1 = error('The string to be decoded is not correctly encoded');
4441
+ error('The string to be decoded is not correctly encoded');
4442
4442
 
4443
4443
  // this is var and not const to please typedoc https://github.com/TypeStrong/typedoc/issues/691
4444
4444
  // eslint-disable-next-line no-var
@@ -4509,7 +4509,7 @@
4509
4509
  }
4510
4510
  }
4511
4511
 
4512
- var __awaiter$3 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
4512
+ var __awaiter$s = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
4513
4513
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4514
4514
  return new (P || (P = Promise))(function (resolve, reject) {
4515
4515
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -4544,7 +4544,7 @@
4544
4544
  return config;
4545
4545
  }
4546
4546
  logout() {
4547
- return __awaiter$3(this, void 0, void 0, function* () {
4547
+ return __awaiter$s(this, void 0, void 0, function* () {
4548
4548
  if (this.user) {
4549
4549
  delete this.user;
4550
4550
  }
@@ -4625,6 +4625,11 @@
4625
4625
  /** Identity function used for marking strings for translation */
4626
4626
  const gettext = t => t;
4627
4627
 
4628
+ /**
4629
+ * Severity can be one of the following states.
4630
+ * It is used in [[AlarmService]] for example.
4631
+ */
4632
+ exports.Severity = void 0;
4628
4633
  (function (Severity) {
4629
4634
  Severity[Severity["CRITICAL"] = gettext('CRITICAL')] = "CRITICAL";
4630
4635
  Severity[Severity["MAJOR"] = gettext('MAJOR')] = "MAJOR";
@@ -4689,32 +4694,32 @@
4689
4694
  * Builds query string from provided query object.
4690
4695
  *
4691
4696
  * @param query Object containing filters and sort order for querying managed objects. Supported filters are:
4692
- * - **__and** - Specifies conditions, e.g. {__and: [{__has: 'c8y_IsDevice'}, {'count': {__gt: 0}}]}.
4693
- * - **__or** - Specifies alternative conditions, e.g. {__or: [{__bygroupid: 10300}, {__bygroupid: 10400}]}.
4694
- * - **__eq** - Specified fragment must be equal to given value, e.g. {'status': 'AVAILABLE'} (no nested object required).
4695
- * - **__lt** - Specified fragment must be less then given value, e.g. {'count': {__lt: 10}}.
4696
- * - **__gt** - Specified fragment must be greater then given value, e.g. {'count': {__gt: 0}}.
4697
- * - **__in** - Specified fragment must be equal to one of values in the list, e.g. {'status': {__in: ['AVAILABLE', 'UNAVAILABLE']}}.
4698
- * - **__not** - Negates condition, e.g. {__not: {'status': 'AVAILABLE'}}.
4699
- * - **__bygroupid** - True if filtered managed object is assigned to given group, e.g. {__bygroupid: 10300}.
4700
- * - **__has** - Specified fragment must have a value defined, e.g. {__has: 'c8y_IsDevice'}.
4701
- * - **__useFilterQueryString** - Gets rid of the '$filter=()… $orderby=…' parts of a query and keeps only what's between the most
4697
+ * - **__and** - Specifies conditions, e.g. `{__and: [{__has: 'c8y_IsDevice'}, {'count': {__gt: 0}}]}`.
4698
+ * - **__or** - Specifies alternative conditions, e.g. `{__or: [{__bygroupid: 10300}, {__bygroupid: 10400}]}`.
4699
+ * - **__eq** - Specified fragment must be equal to given value, e.g. `{'status': 'AVAILABLE'}` (no nested object required).
4700
+ * - **__lt** - Specified fragment must be less then given value, e.g. `{'count': {__lt: 10}}`.
4701
+ * - **__gt** - Specified fragment must be greater then given value, e.g. `{'count': {__gt: 0}}`.
4702
+ * - **__in** - Specified fragment must be equal to one of values in the list, e.g. `{'status': {__in: ['AVAILABLE', 'UNAVAILABLE']}}`.
4703
+ * - **__not** - Negates condition, e.g. `{__not: {'status': 'AVAILABLE'}}`.
4704
+ * - **__bygroupid** - True if filtered managed object is assigned to given group, e.g. `{__bygroupid: 10300}`.
4705
+ * - **__has** - Specified fragment must have a value defined, e.g. `{__has: 'c8y_IsDevice'}`.
4706
+ * - **__useFilterQueryString** - Gets rid of the `$filter=()… $orderby=…` parts of a query and keeps only what's between the most
4702
4707
  * exterior parentheses of the $filter.
4703
4708
  * EXAMPLE: takes a query of the form
4704
- * "$filter=(name eq 'RaspPi*') $orderby=name asc"
4709
+ * `$filter=(name eq 'RaspPi*') $orderby=name asc`
4705
4710
  * and turns it into
4706
- * "name eq 'RaspPi*'"
4711
+ * `name eq 'RaspPi*'`
4707
4712
  * This is necessary for searching for smart groups, which are identified by their own query
4708
4713
  * that needs to be passed through.
4709
4714
  *
4710
4715
  *
4711
4716
  * The order is specified by an array of field paths and sort direction (1 for ascending, -1 for descending), e.g.:
4712
- * - {__orderby: [{'creationTime': -1}, {'name': 1}], __filter: {...}}
4717
+ * - `{__orderby: [{'creationTime': -1}, {'name': 1}], __filter: {...}}`
4713
4718
  *
4714
4719
  * @returns {string} Returns a query string ready to be sent in request params to backend.
4715
4720
  *
4716
4721
  * **Example**
4717
- * <pre>
4722
+ * ```typescript
4718
4723
  * const query = {
4719
4724
  * __filter: {
4720
4725
  * 'name': 'My Device*',
@@ -4747,7 +4752,7 @@
4747
4752
  * const params = {
4748
4753
  * query: queriesUtil.buildQuery(query)
4749
4754
  * };
4750
- * </pre>
4755
+ * ```
4751
4756
  */
4752
4757
  buildQuery(query) {
4753
4758
  const q = [];
@@ -4869,7 +4874,7 @@
4869
4874
  }
4870
4875
  }
4871
4876
 
4872
- var __awaiter$4 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
4877
+ var __awaiter$r = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
4873
4878
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4874
4879
  return new (P || (P = Promise))(function (resolve, reject) {
4875
4880
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -4910,7 +4915,7 @@
4910
4915
  const _super = Object.create(null, {
4911
4916
  detail: { get: () => super.detail }
4912
4917
  });
4913
- return __awaiter$4(this, void 0, void 0, function* () {
4918
+ return __awaiter$r(this, void 0, void 0, function* () {
4914
4919
  return _super.detail.call(this, entityOrId);
4915
4920
  });
4916
4921
  }
@@ -4940,7 +4945,7 @@
4940
4945
  const _super = Object.create(null, {
4941
4946
  create: { get: () => super.create }
4942
4947
  });
4943
- return __awaiter$4(this, void 0, void 0, function* () {
4948
+ return __awaiter$r(this, void 0, void 0, function* () {
4944
4949
  return _super.create.call(this, entity);
4945
4950
  });
4946
4951
  }
@@ -4968,7 +4973,7 @@
4968
4973
  const _super = Object.create(null, {
4969
4974
  update: { get: () => super.update }
4970
4975
  });
4971
- return __awaiter$4(this, void 0, void 0, function* () {
4976
+ return __awaiter$r(this, void 0, void 0, function* () {
4972
4977
  return _super.update.call(this, entity);
4973
4978
  });
4974
4979
  }
@@ -4996,7 +5001,7 @@
4996
5001
  const _super = Object.create(null, {
4997
5002
  list: { get: () => super.list }
4998
5003
  });
4999
- return __awaiter$4(this, void 0, void 0, function* () {
5004
+ return __awaiter$r(this, void 0, void 0, function* () {
5000
5005
  return _super.list.call(this, filter);
5001
5006
  });
5002
5007
  }
@@ -5022,16 +5027,16 @@
5022
5027
  const _super = Object.create(null, {
5023
5028
  delete: { get: () => super.delete }
5024
5029
  });
5025
- return __awaiter$4(this, void 0, void 0, function* () {
5030
+ return __awaiter$r(this, void 0, void 0, function* () {
5026
5031
  return _super.delete.call(this, entityOrId);
5027
5032
  });
5028
5033
  }
5029
5034
  }
5030
5035
 
5031
5036
  /* eslint-env browser */
5032
- var browser$1 = typeof self == 'object' ? self.FormData : window.FormData;
5037
+ var browser = typeof self == 'object' ? self.FormData : window.FormData;
5033
5038
 
5034
- var __awaiter$5 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
5039
+ var __awaiter$q = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
5035
5040
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
5036
5041
  return new (P || (P = Promise))(function (resolve, reject) {
5037
5042
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -5065,10 +5070,10 @@
5065
5070
  * ```
5066
5071
  */
5067
5072
  upload(file, entityOrId) {
5068
- return __awaiter$5(this, void 0, void 0, function* () {
5073
+ return __awaiter$q(this, void 0, void 0, function* () {
5069
5074
  const method = 'POST';
5070
5075
  const url = this.getDetailUrl(entityOrId);
5071
- const body = new browser$1();
5076
+ const body = new browser();
5072
5077
  body.append('file', file);
5073
5078
  const headers = {
5074
5079
  accept: 'application/json'
@@ -5094,7 +5099,7 @@
5094
5099
  * })();
5095
5100
  */
5096
5101
  download(entityOrId) {
5097
- return __awaiter$5(this, void 0, void 0, function* () {
5102
+ return __awaiter$q(this, void 0, void 0, function* () {
5098
5103
  const url = this.getDetailUrl(entityOrId);
5099
5104
  return yield this.fetch(url);
5100
5105
  });
@@ -5119,7 +5124,7 @@
5119
5124
  const _super = Object.create(null, {
5120
5125
  delete: { get: () => super.delete }
5121
5126
  });
5122
- return __awaiter$5(this, void 0, void 0, function* () {
5127
+ return __awaiter$q(this, void 0, void 0, function* () {
5123
5128
  return _super.delete.call(this, entityOrId);
5124
5129
  });
5125
5130
  }
@@ -5135,7 +5140,7 @@
5135
5140
  }
5136
5141
  }
5137
5142
 
5138
- var __awaiter$6 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
5143
+ var __awaiter$p = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
5139
5144
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
5140
5145
  return new (P || (P = Promise))(function (resolve, reject) {
5141
5146
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -5159,10 +5164,10 @@
5159
5164
  * but these two properties will be removed from `managedObject` before saving.
5160
5165
  */
5161
5166
  create(file, managedObject = {}) {
5162
- return __awaiter$6(this, void 0, void 0, function* () {
5167
+ return __awaiter$p(this, void 0, void 0, function* () {
5163
5168
  const method = 'POST';
5164
5169
  const url = this.listUrl;
5165
- const body = new browser$1();
5170
+ const body = new browser();
5166
5171
  let fileName;
5167
5172
  let fileType;
5168
5173
  if (managedObject.fileName) {
@@ -5204,7 +5209,7 @@
5204
5209
  const _super = Object.create(null, {
5205
5210
  list: { get: () => super.list }
5206
5211
  });
5207
- return __awaiter$6(this, void 0, void 0, function* () {
5212
+ return __awaiter$p(this, void 0, void 0, function* () {
5208
5213
  return _super.list.call(this, filter);
5209
5214
  });
5210
5215
  }
@@ -5212,12 +5217,12 @@
5212
5217
  const _super = Object.create(null, {
5213
5218
  delete: { get: () => super.delete }
5214
5219
  });
5215
- return __awaiter$6(this, void 0, void 0, function* () {
5220
+ return __awaiter$p(this, void 0, void 0, function* () {
5216
5221
  return _super.delete.call(this, managedObjectOrId);
5217
5222
  });
5218
5223
  }
5219
5224
  download(managedObjectOrId) {
5220
- return __awaiter$6(this, void 0, void 0, function* () {
5225
+ return __awaiter$p(this, void 0, void 0, function* () {
5221
5226
  const url = this.getDetailUrl(managedObjectOrId);
5222
5227
  return yield this.fetch(url);
5223
5228
  });
@@ -5244,7 +5249,7 @@
5244
5249
  }
5245
5250
  }
5246
5251
 
5247
- var __awaiter$7 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
5252
+ var __awaiter$o = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
5248
5253
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
5249
5254
  return new (P || (P = Promise))(function (resolve, reject) {
5250
5255
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -5253,6 +5258,10 @@
5253
5258
  step((generator = generator.apply(thisArg, _arguments || [])).next());
5254
5259
  });
5255
5260
  };
5261
+ /**
5262
+ * Possible types of a child.
5263
+ */
5264
+ exports.ChildType = void 0;
5256
5265
  (function (ChildType) {
5257
5266
  ChildType["ASSETS"] = "childAssets";
5258
5267
  ChildType["DEVICES"] = "childDevices";
@@ -5296,7 +5305,7 @@
5296
5305
  const _super = Object.create(null, {
5297
5306
  detail: { get: () => super.detail }
5298
5307
  });
5299
- return __awaiter$7(this, void 0, void 0, function* () {
5308
+ return __awaiter$o(this, void 0, void 0, function* () {
5300
5309
  return _super.detail.call(this, managedObjectOrId, filter);
5301
5310
  });
5302
5311
  }
@@ -5323,7 +5332,7 @@
5323
5332
  const _super = Object.create(null, {
5324
5333
  create: { get: () => super.create }
5325
5334
  });
5326
- return __awaiter$7(this, void 0, void 0, function* () {
5335
+ return __awaiter$o(this, void 0, void 0, function* () {
5327
5336
  return _super.create.call(this, managedObject);
5328
5337
  });
5329
5338
  }
@@ -5351,7 +5360,7 @@
5351
5360
  const _super = Object.create(null, {
5352
5361
  update: { get: () => super.update }
5353
5362
  });
5354
- return __awaiter$7(this, void 0, void 0, function* () {
5363
+ return __awaiter$o(this, void 0, void 0, function* () {
5355
5364
  return _super.update.call(this, managedObject);
5356
5365
  });
5357
5366
  }
@@ -5379,7 +5388,7 @@
5379
5388
  const _super = Object.create(null, {
5380
5389
  list: { get: () => super.list }
5381
5390
  });
5382
- return __awaiter$7(this, void 0, void 0, function* () {
5391
+ return __awaiter$o(this, void 0, void 0, function* () {
5383
5392
  return _super.list.call(this, filter);
5384
5393
  });
5385
5394
  }
@@ -5411,7 +5420,7 @@
5411
5420
  const _super = Object.create(null, {
5412
5421
  list: { get: () => super.list }
5413
5422
  });
5414
- return __awaiter$7(this, void 0, void 0, function* () {
5423
+ return __awaiter$o(this, void 0, void 0, function* () {
5415
5424
  filter[this.inventoriesQueryParamName] = this.queriesUtil.buildQuery(query);
5416
5425
  return _super.list.call(this, filter);
5417
5426
  });
@@ -5444,7 +5453,7 @@
5444
5453
  const _super = Object.create(null, {
5445
5454
  list: { get: () => super.list }
5446
5455
  });
5447
- return __awaiter$7(this, void 0, void 0, function* () {
5456
+ return __awaiter$o(this, void 0, void 0, function* () {
5448
5457
  filter[this.devicesQueryParamName] = this.queriesUtil.buildQuery(query);
5449
5458
  return _super.list.call(this, filter);
5450
5459
  });
@@ -5474,7 +5483,7 @@
5474
5483
  const _super = Object.create(null, {
5475
5484
  delete: { get: () => super.delete }
5476
5485
  });
5477
- return __awaiter$7(this, void 0, void 0, function* () {
5486
+ return __awaiter$o(this, void 0, void 0, function* () {
5478
5487
  return _super.delete.call(this, managedObjectOrId, params);
5479
5488
  });
5480
5489
  }
@@ -5501,7 +5510,7 @@
5501
5510
  * ```
5502
5511
  */
5503
5512
  childAdditionsList(parentReference, filter = {}) {
5504
- return __awaiter$7(this, void 0, void 0, function* () {
5513
+ return __awaiter$o(this, void 0, void 0, function* () {
5505
5514
  return this.listChildren(exports.ChildType.ADDITIONS, parentReference, filter);
5506
5515
  });
5507
5516
  }
@@ -5532,7 +5541,7 @@
5532
5541
  * ```
5533
5542
  */
5534
5543
  childAdditionsCreate(managedObject, parentReference) {
5535
- return __awaiter$7(this, void 0, void 0, function* () {
5544
+ return __awaiter$o(this, void 0, void 0, function* () {
5536
5545
  return this.createChild(exports.ChildType.ADDITIONS, managedObject, parentReference);
5537
5546
  });
5538
5547
  }
@@ -5556,7 +5565,7 @@
5556
5565
  * ```
5557
5566
  */
5558
5567
  childAdditionsAdd(childReference, parentReference) {
5559
- return __awaiter$7(this, void 0, void 0, function* () {
5568
+ return __awaiter$o(this, void 0, void 0, function* () {
5560
5569
  return this.addChild(exports.ChildType.ADDITIONS, childReference, parentReference);
5561
5570
  });
5562
5571
  }
@@ -5580,7 +5589,7 @@
5580
5589
  * ```
5581
5590
  */
5582
5591
  childAdditionsRemove(childReference, parentReference) {
5583
- return __awaiter$7(this, void 0, void 0, function* () {
5592
+ return __awaiter$o(this, void 0, void 0, function* () {
5584
5593
  return this.removeChild(exports.ChildType.ADDITIONS, childReference, parentReference);
5585
5594
  });
5586
5595
  }
@@ -5608,7 +5617,7 @@
5608
5617
  * ```
5609
5618
  */
5610
5619
  childAssetsList(parentReference, filter = {}) {
5611
- return __awaiter$7(this, void 0, void 0, function* () {
5620
+ return __awaiter$o(this, void 0, void 0, function* () {
5612
5621
  return this.listChildren(exports.ChildType.ASSETS, parentReference, filter);
5613
5622
  });
5614
5623
  }
@@ -5639,7 +5648,7 @@
5639
5648
  * ```
5640
5649
  */
5641
5650
  childAssetsCreate(managedObject, parentReference) {
5642
- return __awaiter$7(this, void 0, void 0, function* () {
5651
+ return __awaiter$o(this, void 0, void 0, function* () {
5643
5652
  return this.createChild(exports.ChildType.ASSETS, managedObject, parentReference);
5644
5653
  });
5645
5654
  }
@@ -5663,7 +5672,7 @@
5663
5672
  * ```
5664
5673
  */
5665
5674
  childAssetsAdd(childReference, parentReference) {
5666
- return __awaiter$7(this, void 0, void 0, function* () {
5675
+ return __awaiter$o(this, void 0, void 0, function* () {
5667
5676
  return this.addChild(exports.ChildType.ASSETS, childReference, parentReference);
5668
5677
  });
5669
5678
  }
@@ -5687,7 +5696,7 @@
5687
5696
  * ```
5688
5697
  */
5689
5698
  childAssetsBulkAdd(childReference, parentReference) {
5690
- return __awaiter$7(this, void 0, void 0, function* () {
5699
+ return __awaiter$o(this, void 0, void 0, function* () {
5691
5700
  return this.addChildBulk(exports.ChildType.ASSETS, childReference, parentReference);
5692
5701
  });
5693
5702
  }
@@ -5711,7 +5720,7 @@
5711
5720
  * ```
5712
5721
  */
5713
5722
  childAssetsRemove(childReference, parentReference) {
5714
- return __awaiter$7(this, void 0, void 0, function* () {
5723
+ return __awaiter$o(this, void 0, void 0, function* () {
5715
5724
  return this.removeChild(exports.ChildType.ASSETS, childReference, parentReference);
5716
5725
  });
5717
5726
  }
@@ -5739,7 +5748,7 @@
5739
5748
  * ```
5740
5749
  */
5741
5750
  childDevicesList(parentReference, filter = {}) {
5742
- return __awaiter$7(this, void 0, void 0, function* () {
5751
+ return __awaiter$o(this, void 0, void 0, function* () {
5743
5752
  return this.listChildren(exports.ChildType.DEVICES, parentReference, filter);
5744
5753
  });
5745
5754
  }
@@ -5770,7 +5779,7 @@
5770
5779
  * ```
5771
5780
  */
5772
5781
  childDevicesCreate(managedObject, parentReference) {
5773
- return __awaiter$7(this, void 0, void 0, function* () {
5782
+ return __awaiter$o(this, void 0, void 0, function* () {
5774
5783
  return this.createChild(exports.ChildType.DEVICES, managedObject, parentReference);
5775
5784
  });
5776
5785
  }
@@ -5794,7 +5803,7 @@
5794
5803
  * ```
5795
5804
  */
5796
5805
  childDevicesAdd(childReference, parentReference) {
5797
- return __awaiter$7(this, void 0, void 0, function* () {
5806
+ return __awaiter$o(this, void 0, void 0, function* () {
5798
5807
  return this.addChild(exports.ChildType.DEVICES, childReference, parentReference);
5799
5808
  });
5800
5809
  }
@@ -5818,7 +5827,7 @@
5818
5827
  * ```
5819
5828
  */
5820
5829
  childDevicesRemove(childReference, parentReference) {
5821
- return __awaiter$7(this, void 0, void 0, function* () {
5830
+ return __awaiter$o(this, void 0, void 0, function* () {
5822
5831
  return this.removeChild(exports.ChildType.DEVICES, childReference, parentReference);
5823
5832
  });
5824
5833
  }
@@ -5831,7 +5840,7 @@
5831
5840
  * @param {IdReference} managedObjectOrId
5832
5841
  */
5833
5842
  getSupportedMeasurements(managedObjectOrId) {
5834
- return __awaiter$7(this, void 0, void 0, function* () {
5843
+ return __awaiter$o(this, void 0, void 0, function* () {
5835
5844
  return this.getSupportedMeasurementDetails(managedObjectOrId, 'supportedMeasurements');
5836
5845
  });
5837
5846
  }
@@ -5844,7 +5853,7 @@
5844
5853
  * @param {IdReference} managedObjectOrId
5845
5854
  */
5846
5855
  getSupportedSeries(managedObjectOrId) {
5847
- return __awaiter$7(this, void 0, void 0, function* () {
5856
+ return __awaiter$o(this, void 0, void 0, function* () {
5848
5857
  return this.getSupportedMeasurementDetails(managedObjectOrId, 'supportedSeries');
5849
5858
  });
5850
5859
  }
@@ -5856,7 +5865,7 @@
5856
5865
  * @param {IdReference} managedObjectOrId
5857
5866
  */
5858
5867
  getMeasurementsAndSeries(managedObjectOrId) {
5859
- return __awaiter$7(this, void 0, void 0, function* () {
5868
+ return __awaiter$o(this, void 0, void 0, function* () {
5860
5869
  const [supportedMeasurements, supportedSeries] = yield Promise.all([
5861
5870
  this.getSupportedMeasurements(managedObjectOrId),
5862
5871
  this.getSupportedSeries(managedObjectOrId)
@@ -5884,12 +5893,12 @@
5884
5893
  * @param {object} filter
5885
5894
  */
5886
5895
  assetKPIsList(parentReference, filter = {}) {
5887
- return __awaiter$7(this, void 0, void 0, function* () {
5896
+ return __awaiter$o(this, void 0, void 0, function* () {
5888
5897
  return this.listKPIs(parentReference, filter);
5889
5898
  });
5890
5899
  }
5891
5900
  listKPIs(parentReference, filter = {}) {
5892
- return __awaiter$7(this, void 0, void 0, function* () {
5901
+ return __awaiter$o(this, void 0, void 0, function* () {
5893
5902
  const headers = { accept: 'application/json' };
5894
5903
  const url = this.getChildrenUrl('kpis', parentReference);
5895
5904
  const res = yield this.fetch(url, this.changeFetchOptions({ headers, params: filter }, url));
@@ -5916,7 +5925,7 @@
5916
5925
  return `${this.getChildrenUrl(type, parentReference)}/${childId}`;
5917
5926
  }
5918
5927
  listChildren(type, parentReference, filter = {}) {
5919
- return __awaiter$7(this, void 0, void 0, function* () {
5928
+ return __awaiter$o(this, void 0, void 0, function* () {
5920
5929
  const headers = { 'content-type': 'application/json' };
5921
5930
  const url = this.getChildrenUrl(type, parentReference);
5922
5931
  const res = yield this.fetch(url, { headers, params: filter });
@@ -5928,7 +5937,7 @@
5928
5937
  });
5929
5938
  }
5930
5939
  createChild(type, managedObject, parentReference) {
5931
- return __awaiter$7(this, void 0, void 0, function* () {
5940
+ return __awaiter$o(this, void 0, void 0, function* () {
5932
5941
  const url = this.getChildrenUrl(type, parentReference);
5933
5942
  const method = 'POST';
5934
5943
  const body = JSON.stringify(this.onBeforeCreate(managedObject));
@@ -5939,7 +5948,7 @@
5939
5948
  });
5940
5949
  }
5941
5950
  addChild(type, childReference, parentReference) {
5942
- return __awaiter$7(this, void 0, void 0, function* () {
5951
+ return __awaiter$o(this, void 0, void 0, function* () {
5943
5952
  const url = this.getChildrenUrl(type, parentReference);
5944
5953
  const method = 'POST';
5945
5954
  const childId = this.getIdString(childReference);
@@ -5955,7 +5964,7 @@
5955
5964
  });
5956
5965
  }
5957
5966
  addChildBulk(type, childReferenceArray, parentReference) {
5958
- return __awaiter$7(this, void 0, void 0, function* () {
5967
+ return __awaiter$o(this, void 0, void 0, function* () {
5959
5968
  const url = this.getChildrenUrl(type, parentReference);
5960
5969
  const method = 'POST';
5961
5970
  const references = childReferenceArray.map(childId => ({
@@ -5976,7 +5985,7 @@
5976
5985
  });
5977
5986
  }
5978
5987
  removeChild(type, childReference, parentReference) {
5979
- return __awaiter$7(this, void 0, void 0, function* () {
5988
+ return __awaiter$o(this, void 0, void 0, function* () {
5980
5989
  const childId = this.getIdString(childReference);
5981
5990
  const url = `${this.getChildrenUrl(type, parentReference)}/${childId}`;
5982
5991
  const method = 'DELETE';
@@ -5987,7 +5996,7 @@
5987
5996
  });
5988
5997
  }
5989
5998
  getSupportedMeasurementDetails(managedObjectOrId, type = 'supportedSeries') {
5990
- return __awaiter$7(this, void 0, void 0, function* () {
5999
+ return __awaiter$o(this, void 0, void 0, function* () {
5991
6000
  const url = `${this.getDetailUrl(managedObjectOrId)}/${type}`;
5992
6001
  this.getIdString(managedObjectOrId);
5993
6002
  const headers = { accept: 'application/json' };
@@ -5998,7 +6007,7 @@
5998
6007
  }
5999
6008
  }
6000
6009
 
6001
- var __awaiter$8 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
6010
+ var __awaiter$n = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
6002
6011
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6003
6012
  return new (P || (P = Promise))(function (resolve, reject) {
6004
6013
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -6042,7 +6051,7 @@
6042
6051
  const _super = Object.create(null, {
6043
6052
  detail: { get: () => super.detail }
6044
6053
  });
6045
- return __awaiter$8(this, void 0, void 0, function* () {
6054
+ return __awaiter$n(this, void 0, void 0, function* () {
6046
6055
  return _super.detail.call(this, entityOrId);
6047
6056
  });
6048
6057
  }
@@ -6070,7 +6079,7 @@
6070
6079
  const _super = Object.create(null, {
6071
6080
  create: { get: () => super.create }
6072
6081
  });
6073
- return __awaiter$8(this, void 0, void 0, function* () {
6082
+ return __awaiter$n(this, void 0, void 0, function* () {
6074
6083
  return _super.create.call(this, this.onBeforeCreate(entity));
6075
6084
  });
6076
6085
  }
@@ -6098,7 +6107,7 @@
6098
6107
  const _super = Object.create(null, {
6099
6108
  list: { get: () => super.list }
6100
6109
  });
6101
- return __awaiter$8(this, void 0, void 0, function* () {
6110
+ return __awaiter$n(this, void 0, void 0, function* () {
6102
6111
  return _super.list.call(this, filter);
6103
6112
  });
6104
6113
  }
@@ -6126,7 +6135,7 @@
6126
6135
  const _super = Object.create(null, {
6127
6136
  delete: { get: () => super.delete }
6128
6137
  });
6129
- return __awaiter$8(this, void 0, void 0, function* () {
6138
+ return __awaiter$n(this, void 0, void 0, function* () {
6130
6139
  return _super.delete.call(this, entityOrId);
6131
6140
  });
6132
6141
  }
@@ -6152,7 +6161,7 @@
6152
6161
  * ```
6153
6162
  */
6154
6163
  listSeries(params) {
6155
- return __awaiter$8(this, void 0, void 0, function* () {
6164
+ return __awaiter$n(this, void 0, void 0, function* () {
6156
6165
  const url = `${this.baseUrl}/${this.listUrl}/series`;
6157
6166
  const res = yield this.client.fetch(url, { params });
6158
6167
  const data = yield res.json();
@@ -6179,13 +6188,14 @@
6179
6188
  }
6180
6189
  }
6181
6190
 
6191
+ exports.aggregationType = void 0;
6182
6192
  (function (aggregationType) {
6183
6193
  aggregationType["MINUTELY"] = "MINUTELY";
6184
6194
  aggregationType["HOURLY"] = "HOURLY";
6185
6195
  aggregationType["DAILY"] = "DAILY";
6186
6196
  })(exports.aggregationType || (exports.aggregationType = {}));
6187
6197
 
6188
- var __awaiter$9 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
6198
+ var __awaiter$m = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
6189
6199
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6190
6200
  return new (P || (P = Promise))(function (resolve, reject) {
6191
6201
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -6226,7 +6236,7 @@
6226
6236
  const _super = Object.create(null, {
6227
6237
  detail: { get: () => super.detail }
6228
6238
  });
6229
- return __awaiter$9(this, void 0, void 0, function* () {
6239
+ return __awaiter$m(this, void 0, void 0, function* () {
6230
6240
  return _super.detail.call(this, entityOrId);
6231
6241
  });
6232
6242
  }
@@ -6257,7 +6267,7 @@
6257
6267
  const _super = Object.create(null, {
6258
6268
  create: { get: () => super.create }
6259
6269
  });
6260
- return __awaiter$9(this, void 0, void 0, function* () {
6270
+ return __awaiter$m(this, void 0, void 0, function* () {
6261
6271
  return _super.create.call(this, entity);
6262
6272
  });
6263
6273
  }
@@ -6286,7 +6296,7 @@
6286
6296
  const _super = Object.create(null, {
6287
6297
  update: { get: () => super.update }
6288
6298
  });
6289
- return __awaiter$9(this, void 0, void 0, function* () {
6299
+ return __awaiter$m(this, void 0, void 0, function* () {
6290
6300
  return _super.update.call(this, entity);
6291
6301
  });
6292
6302
  }
@@ -6315,19 +6325,23 @@
6315
6325
  const _super = Object.create(null, {
6316
6326
  list: { get: () => super.list }
6317
6327
  });
6318
- return __awaiter$9(this, void 0, void 0, function* () {
6328
+ return __awaiter$m(this, void 0, void 0, function* () {
6319
6329
  return _super.list.call(this, filter);
6320
6330
  });
6321
6331
  }
6322
6332
  }
6323
6333
 
6334
+ /**
6335
+ * A specific alarm can have one of the following states
6336
+ */
6337
+ exports.AlarmStatus = void 0;
6324
6338
  (function (AlarmStatus) {
6325
6339
  AlarmStatus[AlarmStatus["ACKNOWLEDGED"] = gettext('ACKNOWLEDGED')] = "ACKNOWLEDGED";
6326
6340
  AlarmStatus[AlarmStatus["CLEARED"] = gettext('CLEARED')] = "CLEARED";
6327
6341
  AlarmStatus[AlarmStatus["ACTIVE"] = gettext('ACTIVE')] = "ACTIVE";
6328
6342
  })(exports.AlarmStatus || (exports.AlarmStatus = {}));
6329
6343
 
6330
- var __awaiter$10 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
6344
+ var __awaiter$l = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
6331
6345
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6332
6346
  return new (P || (P = Promise))(function (resolve, reject) {
6333
6347
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -6367,7 +6381,7 @@
6367
6381
  const _super = Object.create(null, {
6368
6382
  detail: { get: () => super.detail }
6369
6383
  });
6370
- return __awaiter$10(this, void 0, void 0, function* () {
6384
+ return __awaiter$l(this, void 0, void 0, function* () {
6371
6385
  return _super.detail.call(this, entityOrId);
6372
6386
  });
6373
6387
  }
@@ -6401,7 +6415,7 @@
6401
6415
  const _super = Object.create(null, {
6402
6416
  create: { get: () => super.create }
6403
6417
  });
6404
- return __awaiter$10(this, void 0, void 0, function* () {
6418
+ return __awaiter$l(this, void 0, void 0, function* () {
6405
6419
  return _super.create.call(this, entity);
6406
6420
  });
6407
6421
  }
@@ -6436,7 +6450,7 @@
6436
6450
  const _super = Object.create(null, {
6437
6451
  update: { get: () => super.update }
6438
6452
  });
6439
- return __awaiter$10(this, void 0, void 0, function* () {
6453
+ return __awaiter$l(this, void 0, void 0, function* () {
6440
6454
  return _super.update.call(this, entity);
6441
6455
  });
6442
6456
  }
@@ -6464,13 +6478,13 @@
6464
6478
  const _super = Object.create(null, {
6465
6479
  list: { get: () => super.list }
6466
6480
  });
6467
- return __awaiter$10(this, void 0, void 0, function* () {
6481
+ return __awaiter$l(this, void 0, void 0, function* () {
6468
6482
  return _super.list.call(this, filter);
6469
6483
  });
6470
6484
  }
6471
6485
  }
6472
6486
 
6473
- var __awaiter$11 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
6487
+ var __awaiter$k = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
6474
6488
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6475
6489
  return new (P || (P = Promise))(function (resolve, reject) {
6476
6490
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -6510,7 +6524,7 @@
6510
6524
  const _super = Object.create(null, {
6511
6525
  detail: { get: () => super.detail }
6512
6526
  });
6513
- return __awaiter$11(this, void 0, void 0, function* () {
6527
+ return __awaiter$k(this, void 0, void 0, function* () {
6514
6528
  return _super.detail.call(this, operationOrId);
6515
6529
  });
6516
6530
  }
@@ -6545,7 +6559,7 @@
6545
6559
  const _super = Object.create(null, {
6546
6560
  create: { get: () => super.create }
6547
6561
  });
6548
- return __awaiter$11(this, void 0, void 0, function* () {
6562
+ return __awaiter$k(this, void 0, void 0, function* () {
6549
6563
  return _super.create.call(this, operation);
6550
6564
  });
6551
6565
  }
@@ -6580,7 +6594,7 @@
6580
6594
  const _super = Object.create(null, {
6581
6595
  update: { get: () => super.update }
6582
6596
  });
6583
- return __awaiter$11(this, void 0, void 0, function* () {
6597
+ return __awaiter$k(this, void 0, void 0, function* () {
6584
6598
  return _super.update.call(this, entity);
6585
6599
  });
6586
6600
  }
@@ -6608,7 +6622,7 @@
6608
6622
  const _super = Object.create(null, {
6609
6623
  list: { get: () => super.list }
6610
6624
  });
6611
- return __awaiter$11(this, void 0, void 0, function* () {
6625
+ return __awaiter$k(this, void 0, void 0, function* () {
6612
6626
  return _super.list.call(this, filter);
6613
6627
  });
6614
6628
  }
@@ -6633,12 +6647,16 @@
6633
6647
  const _super = Object.create(null, {
6634
6648
  delete: { get: () => super.delete }
6635
6649
  });
6636
- return __awaiter$11(this, void 0, void 0, function* () {
6650
+ return __awaiter$k(this, void 0, void 0, function* () {
6637
6651
  return _super.delete.call(this, operationOrId);
6638
6652
  });
6639
6653
  }
6640
6654
  }
6641
6655
 
6656
+ /**
6657
+ * A bulk operation can have one of the following states.
6658
+ */
6659
+ exports.OperationBulkStatus = void 0;
6642
6660
  (function (OperationBulkStatus) {
6643
6661
  OperationBulkStatus[OperationBulkStatus["ACTIVE"] = gettext('ACTIVE')] = "ACTIVE";
6644
6662
  OperationBulkStatus[OperationBulkStatus["IN_PROGRESS"] = gettext('IN_PROGRESS')] = "IN_PROGRESS";
@@ -6646,6 +6664,10 @@
6646
6664
  OperationBulkStatus[OperationBulkStatus["DELETED"] = gettext('DELETED')] = "DELETED";
6647
6665
  })(exports.OperationBulkStatus || (exports.OperationBulkStatus = {}));
6648
6666
 
6667
+ /**
6668
+ * A bulk operation can have one of the following general statuses.
6669
+ */
6670
+ exports.OperationBulkGeneralStatus = void 0;
6649
6671
  (function (OperationBulkGeneralStatus) {
6650
6672
  OperationBulkGeneralStatus[OperationBulkGeneralStatus["SCHEDULED"] = gettext('SCHEDULED')] = "SCHEDULED";
6651
6673
  OperationBulkGeneralStatus[OperationBulkGeneralStatus["EXECUTING"] = gettext('EXECUTING')] = "EXECUTING";
@@ -6657,6 +6679,10 @@
6657
6679
  OperationBulkGeneralStatus[OperationBulkGeneralStatus["INCORRECT"] = gettext('INCORRECT')] = "INCORRECT";
6658
6680
  })(exports.OperationBulkGeneralStatus || (exports.OperationBulkGeneralStatus = {}));
6659
6681
 
6682
+ /**
6683
+ * An Operation can have one of the following states.
6684
+ */
6685
+ exports.OperationStatus = void 0;
6660
6686
  (function (OperationStatus) {
6661
6687
  OperationStatus[OperationStatus["PENDING"] = gettext('PENDING')] = "PENDING";
6662
6688
  OperationStatus[OperationStatus["EXECUTING"] = gettext('EXECUTING')] = "EXECUTING";
@@ -6664,7 +6690,7 @@
6664
6690
  OperationStatus[OperationStatus["FAILED"] = gettext('FAILED')] = "FAILED";
6665
6691
  })(exports.OperationStatus || (exports.OperationStatus = {}));
6666
6692
 
6667
- var __awaiter$12 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
6693
+ var __awaiter$j = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
6668
6694
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6669
6695
  return new (P || (P = Promise))(function (resolve, reject) {
6670
6696
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -6714,7 +6740,7 @@
6714
6740
  const _super = Object.create(null, {
6715
6741
  detail: { get: () => super.detail }
6716
6742
  });
6717
- return __awaiter$12(this, void 0, void 0, function* () {
6743
+ return __awaiter$j(this, void 0, void 0, function* () {
6718
6744
  return _super.detail.call(this, entityOrId);
6719
6745
  });
6720
6746
  }
@@ -6749,7 +6775,7 @@
6749
6775
  const _super = Object.create(null, {
6750
6776
  create: { get: () => super.create }
6751
6777
  });
6752
- return __awaiter$12(this, void 0, void 0, function* () {
6778
+ return __awaiter$j(this, void 0, void 0, function* () {
6753
6779
  return _super.create.call(this, entity);
6754
6780
  });
6755
6781
  }
@@ -6781,7 +6807,7 @@
6781
6807
  const _super = Object.create(null, {
6782
6808
  update: { get: () => super.update }
6783
6809
  });
6784
- return __awaiter$12(this, void 0, void 0, function* () {
6810
+ return __awaiter$j(this, void 0, void 0, function* () {
6785
6811
  return _super.update.call(this, entity);
6786
6812
  });
6787
6813
  }
@@ -6812,7 +6838,7 @@
6812
6838
  const _super = Object.create(null, {
6813
6839
  list: { get: () => super.list }
6814
6840
  });
6815
- return __awaiter$12(this, void 0, void 0, function* () {
6841
+ return __awaiter$j(this, void 0, void 0, function* () {
6816
6842
  return _super.list.call(this, filter);
6817
6843
  });
6818
6844
  }
@@ -6839,12 +6865,12 @@
6839
6865
  const _super = Object.create(null, {
6840
6866
  delete: { get: () => super.delete }
6841
6867
  });
6842
- return __awaiter$12(this, void 0, void 0, function* () {
6868
+ return __awaiter$j(this, void 0, void 0, function* () {
6843
6869
  return _super.delete.call(this, entityOrId);
6844
6870
  });
6845
6871
  }
6846
6872
  current() {
6847
- return __awaiter$12(this, void 0, void 0, function* () {
6873
+ return __awaiter$j(this, void 0, void 0, function* () {
6848
6874
  const headers = { 'content-type': 'application/json' };
6849
6875
  const res = yield this.fetch(this.currentTenantUrl, { headers });
6850
6876
  const data = yield res.json();
@@ -6864,7 +6890,7 @@
6864
6890
  * ```
6865
6891
  */
6866
6892
  enableSupportUser() {
6867
- return __awaiter$12(this, void 0, void 0, function* () {
6893
+ return __awaiter$j(this, void 0, void 0, function* () {
6868
6894
  const url = 'support-user/enable';
6869
6895
  const res = yield this.fetch(url, this.fetchOptions);
6870
6896
  return { res, data: null };
@@ -6883,14 +6909,14 @@
6883
6909
  * ```
6884
6910
  */
6885
6911
  disableSupportUser() {
6886
- return __awaiter$12(this, void 0, void 0, function* () {
6912
+ return __awaiter$j(this, void 0, void 0, function* () {
6887
6913
  const url = 'support-user/disable';
6888
6914
  const res = yield this.fetch(url, this.fetchOptions);
6889
6915
  return { res, data: null };
6890
6916
  });
6891
6917
  }
6892
6918
  currentTenantType() {
6893
- return __awaiter$12(this, void 0, void 0, function* () {
6919
+ return __awaiter$j(this, void 0, void 0, function* () {
6894
6920
  const tenantData = yield this.current();
6895
6921
  if (tenantData.data.customProperties &&
6896
6922
  tenantData.data.customProperties.tenantType === 'TRIAL') {
@@ -6918,7 +6944,7 @@
6918
6944
  * ```
6919
6945
  */
6920
6946
  getTfaSettings(tenant) {
6921
- return __awaiter$12(this, void 0, void 0, function* () {
6947
+ return __awaiter$j(this, void 0, void 0, function* () {
6922
6948
  const entityOrId = this.getIdString(tenant);
6923
6949
  const url = `tenants/${entityOrId}/tfa`;
6924
6950
  const res = yield this.fetch(url);
@@ -6950,7 +6976,7 @@
6950
6976
  * ```
6951
6977
  */
6952
6978
  subscribeApplication(tenant, application) {
6953
- return __awaiter$12(this, void 0, void 0, function* () {
6979
+ return __awaiter$j(this, void 0, void 0, function* () {
6954
6980
  const entityOrId = this.getIdString(tenant);
6955
6981
  const applicationId = application.id;
6956
6982
  const url = `tenants/${entityOrId}/applications`;
@@ -6991,7 +7017,7 @@
6991
7017
  * ```
6992
7018
  */
6993
7019
  unsubscribeApplication(tenant, application) {
6994
- return __awaiter$12(this, void 0, void 0, function* () {
7020
+ return __awaiter$j(this, void 0, void 0, function* () {
6995
7021
  const entityOrId = this.getIdString(tenant);
6996
7022
  const url = `tenants/${entityOrId}/applications/${application.id}`;
6997
7023
  const method = 'DELETE';
@@ -7007,6 +7033,7 @@
7007
7033
  }
7008
7034
  }
7009
7035
 
7036
+ exports.TenantStatus = void 0;
7010
7037
  (function (TenantStatus) {
7011
7038
  TenantStatus[TenantStatus["ACTIVE"] = gettext('ACTIVE')] = "ACTIVE";
7012
7039
  TenantStatus[TenantStatus["SUSPENDED"] = gettext('SUSPENDED')] = "SUSPENDED";
@@ -7015,6 +7042,7 @@
7015
7042
  /**
7016
7043
  * Represents a strategy used for two-factor authentication.
7017
7044
  */
7045
+ exports.TfaStrategy = void 0;
7018
7046
  (function (TfaStrategy) {
7019
7047
  /** Two-factor authentication with Time-Based One Time Passwords. */
7020
7048
  TfaStrategy["TOTP"] = "TOTP";
@@ -7022,7 +7050,7 @@
7022
7050
  TfaStrategy["SMS"] = "SMS";
7023
7051
  })(exports.TfaStrategy || (exports.TfaStrategy = {}));
7024
7052
 
7025
- var __awaiter$13 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
7053
+ var __awaiter$i = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
7026
7054
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
7027
7055
  return new (P || (P = Promise))(function (resolve, reject) {
7028
7056
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -7067,7 +7095,7 @@
7067
7095
  const _super = Object.create(null, {
7068
7096
  detail: { get: () => super.detail }
7069
7097
  });
7070
- return __awaiter$13(this, void 0, void 0, function* () {
7098
+ return __awaiter$i(this, void 0, void 0, function* () {
7071
7099
  return _super.detail.call(this, entityOrId);
7072
7100
  });
7073
7101
  }
@@ -7094,7 +7122,7 @@
7094
7122
  const _super = Object.create(null, {
7095
7123
  create: { get: () => super.create }
7096
7124
  });
7097
- return __awaiter$13(this, void 0, void 0, function* () {
7125
+ return __awaiter$i(this, void 0, void 0, function* () {
7098
7126
  return _super.create.call(this, entity);
7099
7127
  });
7100
7128
  }
@@ -7107,7 +7135,7 @@
7107
7135
  const _super = Object.create(null, {
7108
7136
  update: { get: () => super.update }
7109
7137
  });
7110
- return __awaiter$13(this, void 0, void 0, function* () {
7138
+ return __awaiter$i(this, void 0, void 0, function* () {
7111
7139
  return _super.update.call(this, entity);
7112
7140
  });
7113
7141
  }
@@ -7136,7 +7164,7 @@
7136
7164
  const _super = Object.create(null, {
7137
7165
  list: { get: () => super.list }
7138
7166
  });
7139
- return __awaiter$13(this, void 0, void 0, function* () {
7167
+ return __awaiter$i(this, void 0, void 0, function* () {
7140
7168
  return _super.list.call(this, filter);
7141
7169
  });
7142
7170
  }
@@ -7161,13 +7189,13 @@
7161
7189
  const _super = Object.create(null, {
7162
7190
  delete: { get: () => super.delete }
7163
7191
  });
7164
- return __awaiter$13(this, void 0, void 0, function* () {
7192
+ return __awaiter$i(this, void 0, void 0, function* () {
7165
7193
  return _super.delete.call(this, entityOrId);
7166
7194
  });
7167
7195
  }
7168
7196
  }
7169
7197
 
7170
- var __awaiter$14 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
7198
+ var __awaiter$h = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
7171
7199
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
7172
7200
  return new (P || (P = Promise))(function (resolve, reject) {
7173
7201
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -7228,7 +7256,7 @@
7228
7256
  const _super = Object.create(null, {
7229
7257
  detail: { get: () => super.detail }
7230
7258
  });
7231
- return __awaiter$14(this, void 0, void 0, function* () {
7259
+ return __awaiter$h(this, void 0, void 0, function* () {
7232
7260
  return _super.detail.call(this, entityOrId);
7233
7261
  });
7234
7262
  }
@@ -7256,7 +7284,7 @@
7256
7284
  const _super = Object.create(null, {
7257
7285
  create: { get: () => super.create }
7258
7286
  });
7259
- return __awaiter$14(this, void 0, void 0, function* () {
7287
+ return __awaiter$h(this, void 0, void 0, function* () {
7260
7288
  return _super.create.call(this, entity);
7261
7289
  });
7262
7290
  }
@@ -7288,7 +7316,7 @@
7288
7316
  const _super = Object.create(null, {
7289
7317
  update: { get: () => super.update }
7290
7318
  });
7291
- return __awaiter$14(this, void 0, void 0, function* () {
7319
+ return __awaiter$h(this, void 0, void 0, function* () {
7292
7320
  return _super.update.call(this, entity);
7293
7321
  });
7294
7322
  }
@@ -7316,7 +7344,7 @@
7316
7344
  const _super = Object.create(null, {
7317
7345
  list: { get: () => super.list }
7318
7346
  });
7319
- return __awaiter$14(this, void 0, void 0, function* () {
7347
+ return __awaiter$h(this, void 0, void 0, function* () {
7320
7348
  return _super.list.call(this, filter);
7321
7349
  });
7322
7350
  }
@@ -7341,7 +7369,7 @@
7341
7369
  const _super = Object.create(null, {
7342
7370
  delete: { get: () => super.delete }
7343
7371
  });
7344
- return __awaiter$14(this, void 0, void 0, function* () {
7372
+ return __awaiter$h(this, void 0, void 0, function* () {
7345
7373
  return _super.delete.call(this, entityOrId);
7346
7374
  });
7347
7375
  }
@@ -7380,7 +7408,7 @@
7380
7408
  * ```
7381
7409
  */
7382
7410
  current() {
7383
- return __awaiter$14(this, void 0, void 0, function* () {
7411
+ return __awaiter$h(this, void 0, void 0, function* () {
7384
7412
  const headers = {
7385
7413
  'content-type': 'application/json',
7386
7414
  Accept: 'application/vnd.com.nsn.cumulocity.user+json;'
@@ -7404,7 +7432,7 @@
7404
7432
  * ```
7405
7433
  */
7406
7434
  currentWithEffectiveRoles() {
7407
- return __awaiter$14(this, void 0, void 0, function* () {
7435
+ return __awaiter$h(this, void 0, void 0, function* () {
7408
7436
  const headers = {
7409
7437
  'content-type': 'application/json',
7410
7438
  Accept: 'application/vnd.com.nsn.cumulocity.currentUser+json;'
@@ -7422,7 +7450,7 @@
7422
7450
  * @return Returns promise object resolved with the IUser wrapped by IResult
7423
7451
  */
7424
7452
  updateCurrent(user) {
7425
- return __awaiter$14(this, void 0, void 0, function* () {
7453
+ return __awaiter$h(this, void 0, void 0, function* () {
7426
7454
  const mimeType = 'application/vnd.com.nsn.cumulocity.user+json';
7427
7455
  const headers = { 'content-type': mimeType, Accept: mimeType };
7428
7456
  const body = JSON.stringify(this.onBeforeUpdate(user));
@@ -7450,7 +7478,7 @@
7450
7478
  * ```
7451
7479
  */
7452
7480
  sendPasswordResetMail(email, tenantId) {
7453
- return __awaiter$14(this, void 0, void 0, function* () {
7481
+ return __awaiter$h(this, void 0, void 0, function* () {
7454
7482
  const headers = { 'content-type': 'application/json', accept: 'application/json' };
7455
7483
  const method = 'POST';
7456
7484
  const url = this.passwordResetUrl;
@@ -7484,7 +7512,7 @@
7484
7512
  * ```
7485
7513
  */
7486
7514
  resetPassword(newPassword, tenantId) {
7487
- return __awaiter$14(this, void 0, void 0, function* () {
7515
+ return __awaiter$h(this, void 0, void 0, function* () {
7488
7516
  const headers = { 'content-type': 'application/json', accept: 'application/json' };
7489
7517
  const method = 'PUT';
7490
7518
  const url = this.passwordResetUrl;
@@ -7510,7 +7538,7 @@
7510
7538
  * ```
7511
7539
  */
7512
7540
  verifyTFACode(pin) {
7513
- return __awaiter$14(this, void 0, void 0, function* () {
7541
+ return __awaiter$h(this, void 0, void 0, function* () {
7514
7542
  const method = 'POST';
7515
7543
  const body = JSON.stringify({ pin });
7516
7544
  const headers = { 'content-type': 'application/json', accept: 'application/json' };
@@ -7534,7 +7562,7 @@
7534
7562
  * ```
7535
7563
  */
7536
7564
  verifyTotpCode(code) {
7537
- return __awaiter$14(this, void 0, void 0, function* () {
7565
+ return __awaiter$h(this, void 0, void 0, function* () {
7538
7566
  const method = 'POST';
7539
7567
  const headers = { 'content-type': 'application/json' };
7540
7568
  const body = JSON.stringify({ code });
@@ -7556,7 +7584,7 @@
7556
7584
  * ```
7557
7585
  */
7558
7586
  activateTotp() {
7559
- return __awaiter$14(this, void 0, void 0, function* () {
7587
+ return __awaiter$h(this, void 0, void 0, function* () {
7560
7588
  const method = 'POST';
7561
7589
  const headers = { 'content-type': 'application/json' };
7562
7590
  const body = JSON.stringify({ isActive: true });
@@ -7579,7 +7607,7 @@
7579
7607
  * ```
7580
7608
  */
7581
7609
  getActivityTotp() {
7582
- return __awaiter$14(this, void 0, void 0, function* () {
7610
+ return __awaiter$h(this, void 0, void 0, function* () {
7583
7611
  const method = 'GET';
7584
7612
  const headers = { 'content-type': 'application/json' };
7585
7613
  const res = yield this.fetch(this.activateTOTPCodeUrl, { headers, method });
@@ -7602,7 +7630,7 @@
7602
7630
  * ```
7603
7631
  */
7604
7632
  generateTotpSecret() {
7605
- return __awaiter$14(this, void 0, void 0, function* () {
7633
+ return __awaiter$h(this, void 0, void 0, function* () {
7606
7634
  const method = 'POST';
7607
7635
  const headers = { 'content-type': 'application/json', accept: 'application/json' };
7608
7636
  const res = yield this.fetch(this.totpCurrentUserURL, { headers, method });
@@ -7618,7 +7646,7 @@
7618
7646
  * @returns Status object
7619
7647
  */
7620
7648
  totpRevokeSecret(user) {
7621
- return __awaiter$14(this, void 0, void 0, function* () {
7649
+ return __awaiter$h(this, void 0, void 0, function* () {
7622
7650
  const url = `${this.getDetailUrl(user)}/${this.revokeTOTPSecretUrl}`;
7623
7651
  const method = 'DELETE';
7624
7652
  const headers = { accept: 'application/json' };
@@ -7632,7 +7660,7 @@
7632
7660
  * @returns Server response and data with updated current user object.
7633
7661
  */
7634
7662
  savePhoneNumber(phoneNumber) {
7635
- return __awaiter$14(this, void 0, void 0, function* () {
7663
+ return __awaiter$h(this, void 0, void 0, function* () {
7636
7664
  const url = this.currentUserPhoneUrl;
7637
7665
  const options = {
7638
7666
  method: 'PUT',
@@ -7652,7 +7680,7 @@
7652
7680
  * @returns Server response and data with email addresses as plain text.
7653
7681
  */
7654
7682
  getNewsletterEmails() {
7655
- return __awaiter$14(this, void 0, void 0, function* () {
7683
+ return __awaiter$h(this, void 0, void 0, function* () {
7656
7684
  const url = this.newsletterEmailsUrl;
7657
7685
  const options = {
7658
7686
  method: 'GET',
@@ -7673,7 +7701,7 @@
7673
7701
  * @returns Returns a result object.
7674
7702
  */
7675
7703
  changeUserPassword(entityOrId, newPassword, currentUserPassword) {
7676
- return __awaiter$14(this, void 0, void 0, function* () {
7704
+ return __awaiter$h(this, void 0, void 0, function* () {
7677
7705
  const method = 'PUT';
7678
7706
  const headers = { 'content-type': 'application/json' };
7679
7707
  const body = JSON.stringify({ newPassword, currentUserPassword });
@@ -7690,7 +7718,7 @@
7690
7718
  * @returns Returns a result object. During this action if preferred login mode is OAI_SECURE new jwt cookie will be set.
7691
7719
  */
7692
7720
  changeCurrentUserPassword(newPassword, currentUserPassword) {
7693
- return __awaiter$14(this, void 0, void 0, function* () {
7721
+ return __awaiter$h(this, void 0, void 0, function* () {
7694
7722
  const method = 'PUT';
7695
7723
  const headers = { 'content-type': 'application/json' };
7696
7724
  const body = JSON.stringify({ newPassword, currentUserPassword });
@@ -7704,7 +7732,7 @@
7704
7732
  * @returns Returns a result object.
7705
7733
  */
7706
7734
  revokeTokens() {
7707
- return __awaiter$14(this, void 0, void 0, function* () {
7735
+ return __awaiter$h(this, void 0, void 0, function* () {
7708
7736
  const method = 'POST';
7709
7737
  const headers = { 'content-type': 'application/json' };
7710
7738
  const res = yield this.fetch(this.revokeAllTokensUrl, { headers, method });
@@ -7770,13 +7798,14 @@
7770
7798
  }
7771
7799
  }
7772
7800
 
7801
+ exports.PasswordStrength = void 0;
7773
7802
  (function (PasswordStrength) {
7774
7803
  PasswordStrength["GREEN"] = "GREEN";
7775
7804
  PasswordStrength["RED"] = "RED";
7776
7805
  PasswordStrength["YELLOW"] = "YELLOW";
7777
7806
  })(exports.PasswordStrength || (exports.PasswordStrength = {}));
7778
7807
 
7779
- var __awaiter$15 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
7808
+ var __awaiter$g = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
7780
7809
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
7781
7810
  return new (P || (P = Promise))(function (resolve, reject) {
7782
7811
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -7793,7 +7822,7 @@
7793
7822
  this.baseUrl = `application/applications/${this.getIdString(applicationOrId)}`;
7794
7823
  }
7795
7824
  upload(binary, fileName, uploadParamsOverride) {
7796
- return __awaiter$15(this, void 0, void 0, function* () {
7825
+ return __awaiter$g(this, void 0, void 0, function* () {
7797
7826
  const url = (uploadParamsOverride === null || uploadParamsOverride === void 0 ? void 0 : uploadParamsOverride.listUrl) || this.listUrl;
7798
7827
  const method = 'POST';
7799
7828
  const body = this.createBinaryRequestBody(binary, fileName, uploadParamsOverride);
@@ -7846,7 +7875,7 @@
7846
7875
  const _super = Object.create(null, {
7847
7876
  list: { get: () => super.list }
7848
7877
  });
7849
- return __awaiter$15(this, void 0, void 0, function* () {
7878
+ return __awaiter$g(this, void 0, void 0, function* () {
7850
7879
  return _super.list.call(this, filter);
7851
7880
  });
7852
7881
  }
@@ -7854,12 +7883,12 @@
7854
7883
  const _super = Object.create(null, {
7855
7884
  delete: { get: () => super.delete }
7856
7885
  });
7857
- return __awaiter$15(this, void 0, void 0, function* () {
7886
+ return __awaiter$g(this, void 0, void 0, function* () {
7858
7887
  return _super.delete.call(this, binaryOrId);
7859
7888
  });
7860
7889
  }
7861
7890
  listPlugins() {
7862
- return __awaiter$15(this, void 0, void 0, function* () {
7891
+ return __awaiter$g(this, void 0, void 0, function* () {
7863
7892
  const headers = { accept: 'application/json' };
7864
7893
  const url = `${this.listUrl}/plugins`;
7865
7894
  const res = yield this.fetch(url, { headers });
@@ -7868,10 +7897,10 @@
7868
7897
  });
7869
7898
  }
7870
7899
  addPlugin(pluginName, pluginFile) {
7871
- return __awaiter$15(this, void 0, void 0, function* () {
7900
+ return __awaiter$g(this, void 0, void 0, function* () {
7872
7901
  const url = `${this.listUrl}/plugins/${encodeURIComponent(pluginName)}`;
7873
7902
  const method = 'POST';
7874
- const body = new browser$1();
7903
+ const body = new browser();
7875
7904
  const bufferOrStream = pluginFile instanceof ArrayBuffer ? Buffer.from(pluginFile) : pluginFile;
7876
7905
  body.append('file', bufferOrStream);
7877
7906
  let bodyHeaders;
@@ -7887,7 +7916,7 @@
7887
7916
  });
7888
7917
  }
7889
7918
  removePlugin(pluginName) {
7890
- return __awaiter$15(this, void 0, void 0, function* () {
7919
+ return __awaiter$g(this, void 0, void 0, function* () {
7891
7920
  const method = 'DELETE';
7892
7921
  const headers = { accept: 'application/json' };
7893
7922
  const url = `${this.listUrl}/plugins/${pluginName}`;
@@ -7897,10 +7926,10 @@
7897
7926
  });
7898
7927
  }
7899
7928
  updateFiles(files) {
7900
- return __awaiter$15(this, void 0, void 0, function* () {
7929
+ return __awaiter$g(this, void 0, void 0, function* () {
7901
7930
  const url = `${this.listUrl}/files`;
7902
7931
  const method = 'POST';
7903
- const body = new browser$1();
7932
+ const body = new browser();
7904
7933
  files.forEach(file => {
7905
7934
  const bufferOrStream = file.contents instanceof ArrayBuffer ? Buffer.from(file.contents) : file.contents;
7906
7935
  body.append(file.path, bufferOrStream);
@@ -7918,13 +7947,13 @@
7918
7947
  });
7919
7948
  }
7920
7949
  downloadArchive(binaryId) {
7921
- return __awaiter$15(this, void 0, void 0, function* () {
7950
+ return __awaiter$g(this, void 0, void 0, function* () {
7922
7951
  const url = `${this.listUrl}/${binaryId}`;
7923
7952
  return yield this.fetch(url);
7924
7953
  });
7925
7954
  }
7926
7955
  createBinaryRequestBody(binary, fileName, uploadParamsOverride) {
7927
- const body = new browser$1();
7956
+ const body = new browser();
7928
7957
  const bufferOrStream = binary instanceof ArrayBuffer ? Buffer.from(binary) : binary;
7929
7958
  let uploadFileName = fileName;
7930
7959
  if (typeof File !== 'undefined' && binary instanceof File) {
@@ -7943,6 +7972,7 @@
7943
7972
  }
7944
7973
  }
7945
7974
 
7975
+ exports.ApplicationType = void 0;
7946
7976
  (function (ApplicationType) {
7947
7977
  ApplicationType["EXTERNAL"] = "EXTERNAL";
7948
7978
  ApplicationType["HOSTED"] = "HOSTED";
@@ -7951,7 +7981,7 @@
7951
7981
  ApplicationType["REPOSITORY"] = "REPOSITORY";
7952
7982
  })(exports.ApplicationType || (exports.ApplicationType = {}));
7953
7983
 
7954
- var __awaiter$16 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
7984
+ var __awaiter$f = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
7955
7985
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
7956
7986
  return new (P || (P = Promise))(function (resolve, reject) {
7957
7987
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -7993,12 +8023,12 @@
7993
8023
  const _super = Object.create(null, {
7994
8024
  create: { get: () => super.create }
7995
8025
  });
7996
- return __awaiter$16(this, void 0, void 0, function* () {
8026
+ return __awaiter$f(this, void 0, void 0, function* () {
7997
8027
  return _super.create.call(this, entity);
7998
8028
  });
7999
8029
  }
8000
8030
  clone(entity) {
8001
- return __awaiter$16(this, void 0, void 0, function* () {
8031
+ return __awaiter$f(this, void 0, void 0, function* () {
8002
8032
  const url = `${this.getDetailUrl(entity)}/clone`;
8003
8033
  const method = 'POST';
8004
8034
  const body = '';
@@ -8032,7 +8062,7 @@
8032
8062
  const _super = Object.create(null, {
8033
8063
  list: { get: () => super.list }
8034
8064
  });
8035
- return __awaiter$16(this, void 0, void 0, function* () {
8065
+ return __awaiter$f(this, void 0, void 0, function* () {
8036
8066
  return _super.list.call(this, filter);
8037
8067
  });
8038
8068
  }
@@ -8057,7 +8087,7 @@
8057
8087
  */
8058
8088
  listVersions(entityOrId, params = {}) {
8059
8089
  var _a;
8060
- return __awaiter$16(this, void 0, void 0, function* () {
8090
+ return __awaiter$f(this, void 0, void 0, function* () {
8061
8091
  const id = this.getEntityId(entityOrId);
8062
8092
  const url = `${this.listUrl}/${id}/versions`;
8063
8093
  const headers = { 'content-type': 'application/json' };
@@ -8096,7 +8126,7 @@
8096
8126
  const _super = Object.create(null, {
8097
8127
  detail: { get: () => super.detail }
8098
8128
  });
8099
- return __awaiter$16(this, void 0, void 0, function* () {
8129
+ return __awaiter$f(this, void 0, void 0, function* () {
8100
8130
  return _super.detail.call(this, entityOrId);
8101
8131
  });
8102
8132
  }
@@ -8125,7 +8155,7 @@
8125
8155
  const _super = Object.create(null, {
8126
8156
  update: { get: () => super.update }
8127
8157
  });
8128
- return __awaiter$16(this, void 0, void 0, function* () {
8158
+ return __awaiter$f(this, void 0, void 0, function* () {
8129
8159
  return _super.update.call(this, entity);
8130
8160
  });
8131
8161
  }
@@ -8153,12 +8183,12 @@
8153
8183
  const _super = Object.create(null, {
8154
8184
  delete: { get: () => super.delete }
8155
8185
  });
8156
- return __awaiter$16(this, void 0, void 0, function* () {
8186
+ return __awaiter$f(this, void 0, void 0, function* () {
8157
8187
  return _super.delete.call(this, entityOrId);
8158
8188
  });
8159
8189
  }
8160
8190
  listByName(name) {
8161
- return __awaiter$16(this, void 0, void 0, function* () {
8191
+ return __awaiter$f(this, void 0, void 0, function* () {
8162
8192
  const headers = { 'content-type': 'application/json' };
8163
8193
  const url = `applicationsByName/${encodeURIComponent(name)}`;
8164
8194
  const res = yield this.fetch(url, { headers });
@@ -8168,7 +8198,7 @@
8168
8198
  });
8169
8199
  }
8170
8200
  listByTenant(tenantOrName, params = {}) {
8171
- return __awaiter$16(this, void 0, void 0, function* () {
8201
+ return __awaiter$f(this, void 0, void 0, function* () {
8172
8202
  const headers = { 'content-type': 'application/json' };
8173
8203
  const tenantService = new TenantService(this.client);
8174
8204
  const tenantName = this.getIdString(tenantOrName || (yield tenantService.current()).data.name);
@@ -8180,7 +8210,7 @@
8180
8210
  });
8181
8211
  }
8182
8212
  listByOwner(tenantOrName, params = {}) {
8183
- return __awaiter$16(this, void 0, void 0, function* () {
8213
+ return __awaiter$f(this, void 0, void 0, function* () {
8184
8214
  const headers = { 'content-type': 'application/json' };
8185
8215
  const tenantService = new TenantService(this.client);
8186
8216
  const tenantName = this.getIdString(tenantOrName || (yield tenantService.current()).data.name);
@@ -8192,7 +8222,7 @@
8192
8222
  });
8193
8223
  }
8194
8224
  listByUser(userOrId, params = {}) {
8195
- return __awaiter$16(this, void 0, void 0, function* () {
8225
+ return __awaiter$f(this, void 0, void 0, function* () {
8196
8226
  const headers = { 'content-type': 'application/json' };
8197
8227
  const userService = new UserService(this.client);
8198
8228
  const userId = this.getIdString(userOrId || (yield userService.current()).data);
@@ -8204,7 +8234,7 @@
8204
8234
  });
8205
8235
  }
8206
8236
  reactivateArchive(appId) {
8207
- return __awaiter$16(this, void 0, void 0, function* () {
8237
+ return __awaiter$f(this, void 0, void 0, function* () {
8208
8238
  const url = `${this.listUrl}/${appId}/refresh`;
8209
8239
  const method = 'POST';
8210
8240
  const body = '';
@@ -8243,7 +8273,7 @@
8243
8273
  * ```
8244
8274
  */
8245
8275
  isAvailable(application) {
8246
- return __awaiter$16(this, void 0, void 0, function* () {
8276
+ return __awaiter$f(this, void 0, void 0, function* () {
8247
8277
  const { res, data } = yield this.listByUser(undefined, {
8248
8278
  dropOverwrittenApps: true,
8249
8279
  noPaging: true
@@ -8272,7 +8302,7 @@
8272
8302
  * ```
8273
8303
  */
8274
8304
  getStatusDetails(entityOrId) {
8275
- return __awaiter$16(this, void 0, void 0, function* () {
8305
+ return __awaiter$f(this, void 0, void 0, function* () {
8276
8306
  const appId = this.getEntityId(entityOrId);
8277
8307
  const inventory = new InventoryService(this.client, this.realtime);
8278
8308
  return inventory.list({ type: `c8y_Application_${appId}` });
@@ -8326,7 +8356,7 @@
8326
8356
  * ```
8327
8357
  */
8328
8358
  getInstanceLog(entityOrId, instanceName, params) {
8329
- return __awaiter$16(this, void 0, void 0, function* () {
8359
+ return __awaiter$f(this, void 0, void 0, function* () {
8330
8360
  const url = `${this.getDetailUrl(entityOrId)}/logs/${instanceName}`;
8331
8361
  const headers = { accept: this.mimeType('applicationLogs') };
8332
8362
  const res = yield this.fetch(url, { headers, params });
@@ -8335,7 +8365,7 @@
8335
8365
  });
8336
8366
  }
8337
8367
  /**
8338
- * Dynamic options are stored on the API in a specific config: {} object. They can
8368
+ * Dynamic options are stored on the API in a specific `config: {}` object. They can
8339
8369
  * be used to configure the app dynamically.
8340
8370
  *
8341
8371
  * Note: To avoids conflicts with the default Config, it is recommended
@@ -8346,7 +8376,7 @@
8346
8376
  */
8347
8377
  updateApplicationConfig(entityOrId, config) {
8348
8378
  var _a;
8349
- return __awaiter$16(this, void 0, void 0, function* () {
8379
+ return __awaiter$f(this, void 0, void 0, function* () {
8350
8380
  const id = this.getEntityId(entityOrId);
8351
8381
  const { data: app } = yield this.detail(id);
8352
8382
  const currentConfig = (app === null || app === void 0 ? void 0 : app.config) || {};
@@ -8368,7 +8398,7 @@
8368
8398
  * @returns Application manifest object.
8369
8399
  */
8370
8400
  getAppManifest(app, version) {
8371
- return __awaiter$16(this, void 0, void 0, function* () {
8401
+ return __awaiter$f(this, void 0, void 0, function* () {
8372
8402
  const date = new Date();
8373
8403
  let result;
8374
8404
  if (!version) {
@@ -8394,7 +8424,7 @@
8394
8424
  * @returns Application manifest object.
8395
8425
  */
8396
8426
  storeAppManifest(entityOrId, manifestJSON) {
8397
- return __awaiter$16(this, void 0, void 0, function* () {
8427
+ return __awaiter$f(this, void 0, void 0, function* () {
8398
8428
  return yield this.binary(entityOrId).updateFiles([
8399
8429
  { path: 'cumulocity.json', contents: JSON.stringify(manifestJSON) }
8400
8430
  ]);
@@ -8412,7 +8442,7 @@
8412
8442
  * @returns Application version object.
8413
8443
  */
8414
8444
  setPackageVersionTag(app, version, tags) {
8415
- return __awaiter$16(this, void 0, void 0, function* () {
8445
+ return __awaiter$f(this, void 0, void 0, function* () {
8416
8446
  const url = `${this.getDetailUrl(app)}/versions/${version}`;
8417
8447
  const method = 'PUT';
8418
8448
  const body = JSON.stringify({ tags });
@@ -8430,7 +8460,7 @@
8430
8460
  * @param contextPath
8431
8461
  */
8432
8462
  getManifestOfContextPath(contextPath) {
8433
- return __awaiter$16(this, void 0, void 0, function* () {
8463
+ return __awaiter$f(this, void 0, void 0, function* () {
8434
8464
  const url = `${this.getDetailUrl(contextPath)}/manifest`;
8435
8465
  const res = yield this.fetch(url);
8436
8466
  const { application } = yield res.json();
@@ -8459,7 +8489,7 @@
8459
8489
  * ```
8460
8490
  */
8461
8491
  deleteVersionPackage(app, params) {
8462
- return __awaiter$16(this, void 0, void 0, function* () {
8492
+ return __awaiter$f(this, void 0, void 0, function* () {
8463
8493
  const url = `${this.getDetailUrl(app)}/versions/`;
8464
8494
  const method = 'DELETE';
8465
8495
  const res = yield this.fetch(url, this.changeFetchOptions({ method, params }, url));
@@ -8476,7 +8506,7 @@
8476
8506
  * @returns Updated application.
8477
8507
  */
8478
8508
  updateApplicationAvailability(entityOrId, availability) {
8479
- return __awaiter$16(this, void 0, void 0, function* () {
8509
+ return __awaiter$f(this, void 0, void 0, function* () {
8480
8510
  const id = this.getEntityId(entityOrId);
8481
8511
  return yield this.update({
8482
8512
  id,
@@ -8502,6 +8532,7 @@
8502
8532
  }
8503
8533
  }
8504
8534
 
8535
+ exports.InstanceStatus = void 0;
8505
8536
  (function (InstanceStatus) {
8506
8537
  InstanceStatus["Up"] = "Up";
8507
8538
  InstanceStatus["Unhealthy"] = "Unhealthy";
@@ -8509,23 +8540,26 @@
8509
8540
  InstanceStatus["Unknown"] = "Unknown";
8510
8541
  })(exports.InstanceStatus || (exports.InstanceStatus = {}));
8511
8542
 
8543
+ exports.BillingMode = void 0;
8512
8544
  (function (BillingMode) {
8513
8545
  BillingMode["SUBSCRIPTION"] = "SUBSCRIPTION";
8514
8546
  BillingMode["RESOURCES"] = "RESOURCES";
8515
8547
  })(exports.BillingMode || (exports.BillingMode = {}));
8516
8548
 
8549
+ exports.Isolation = void 0;
8517
8550
  (function (Isolation) {
8518
8551
  Isolation["PER_TENANT"] = "PER_TENANT";
8519
8552
  Isolation["MULTI_TENANT"] = "MULTI_TENANT";
8520
8553
  })(exports.Isolation || (exports.Isolation = {}));
8521
8554
 
8555
+ exports.ApplicationAvailability = void 0;
8522
8556
  (function (ApplicationAvailability) {
8523
8557
  ApplicationAvailability[ApplicationAvailability["MARKET"] = gettext('MARKET')] = "MARKET";
8524
8558
  ApplicationAvailability[ApplicationAvailability["PRIVATE"] = gettext('PRIVATE')] = "PRIVATE";
8525
8559
  ApplicationAvailability[ApplicationAvailability["SHARED"] = gettext('SHARED')] = "SHARED";
8526
8560
  })(exports.ApplicationAvailability || (exports.ApplicationAvailability = {}));
8527
8561
 
8528
- var __awaiter$17 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
8562
+ var __awaiter$e = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
8529
8563
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
8530
8564
  return new (P || (P = Promise))(function (resolve, reject) {
8531
8565
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -8565,7 +8599,7 @@
8565
8599
  const _super = Object.create(null, {
8566
8600
  detail: { get: () => super.detail }
8567
8601
  });
8568
- return __awaiter$17(this, void 0, void 0, function* () {
8602
+ return __awaiter$e(this, void 0, void 0, function* () {
8569
8603
  return _super.detail.call(this, option);
8570
8604
  });
8571
8605
  }
@@ -8590,7 +8624,7 @@
8590
8624
  * ```
8591
8625
  */
8592
8626
  list(filter = {}) {
8593
- return __awaiter$17(this, void 0, void 0, function* () {
8627
+ return __awaiter$e(this, void 0, void 0, function* () {
8594
8628
  const headers = { 'content-type': 'application/json' };
8595
8629
  const url = this.listUrl;
8596
8630
  const res = yield this.fetch(url, { headers, params: filter });
@@ -8607,7 +8641,7 @@
8607
8641
  }
8608
8642
  }
8609
8643
 
8610
- var __awaiter$18 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
8644
+ var __awaiter$d = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
8611
8645
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
8612
8646
  return new (P || (P = Promise))(function (resolve, reject) {
8613
8647
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -8660,7 +8694,7 @@
8660
8694
  const _super = Object.create(null, {
8661
8695
  detail: { get: () => super.detail }
8662
8696
  });
8663
- return __awaiter$18(this, void 0, void 0, function* () {
8697
+ return __awaiter$d(this, void 0, void 0, function* () {
8664
8698
  return _super.detail.call(this, entity, params);
8665
8699
  });
8666
8700
  }
@@ -8698,7 +8732,7 @@
8698
8732
  const _super = Object.create(null, {
8699
8733
  create: { get: () => super.create }
8700
8734
  });
8701
- return __awaiter$18(this, void 0, void 0, function* () {
8735
+ return __awaiter$d(this, void 0, void 0, function* () {
8702
8736
  return _super.create.call(this, entity);
8703
8737
  });
8704
8738
  }
@@ -8728,7 +8762,7 @@
8728
8762
  const _super = Object.create(null, {
8729
8763
  update: { get: () => super.update }
8730
8764
  });
8731
- return __awaiter$18(this, void 0, void 0, function* () {
8765
+ return __awaiter$d(this, void 0, void 0, function* () {
8732
8766
  return _super.update.call(this, entity);
8733
8767
  });
8734
8768
  }
@@ -8760,7 +8794,7 @@
8760
8794
  const _super = Object.create(null, {
8761
8795
  list: { get: () => super.list }
8762
8796
  });
8763
- return __awaiter$18(this, void 0, void 0, function* () {
8797
+ return __awaiter$d(this, void 0, void 0, function* () {
8764
8798
  return _super.list.call(this, filter);
8765
8799
  });
8766
8800
  }
@@ -8787,7 +8821,7 @@
8787
8821
  const _super = Object.create(null, {
8788
8822
  delete: { get: () => super.delete }
8789
8823
  });
8790
- return __awaiter$18(this, void 0, void 0, function* () {
8824
+ return __awaiter$d(this, void 0, void 0, function* () {
8791
8825
  return _super.delete.call(this, entityOrId);
8792
8826
  });
8793
8827
  }
@@ -8806,7 +8840,7 @@
8806
8840
  }
8807
8841
  }
8808
8842
 
8809
- var __awaiter$19 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
8843
+ var __awaiter$c = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
8810
8844
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
8811
8845
  return new (P || (P = Promise))(function (resolve, reject) {
8812
8846
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -8850,7 +8884,7 @@
8850
8884
  const _super = Object.create(null, {
8851
8885
  detail: { get: () => super.detail }
8852
8886
  });
8853
- return __awaiter$19(this, void 0, void 0, function* () {
8887
+ return __awaiter$c(this, void 0, void 0, function* () {
8854
8888
  return _super.detail.call(this, tenantSecurityOption);
8855
8889
  });
8856
8890
  }
@@ -8862,7 +8896,7 @@
8862
8896
  }
8863
8897
  }
8864
8898
 
8865
- var __awaiter$20 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
8899
+ var __awaiter$b = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
8866
8900
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
8867
8901
  return new (P || (P = Promise))(function (resolve, reject) {
8868
8902
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -8903,7 +8937,7 @@
8903
8937
  const _super = Object.create(null, {
8904
8938
  detail: { get: () => super.detail }
8905
8939
  });
8906
- return __awaiter$20(this, void 0, void 0, function* () {
8940
+ return __awaiter$b(this, void 0, void 0, function* () {
8907
8941
  return _super.detail.call(this, entityIdentityOrId);
8908
8942
  });
8909
8943
  }
@@ -8930,7 +8964,7 @@
8930
8964
  const _super = Object.create(null, {
8931
8965
  list: { get: () => super.list }
8932
8966
  });
8933
- return __awaiter$20(this, void 0, void 0, function* () {
8967
+ return __awaiter$b(this, void 0, void 0, function* () {
8934
8968
  return _super.list.call(this, filter);
8935
8969
  });
8936
8970
  }
@@ -8951,7 +8985,7 @@
8951
8985
  const _super = Object.create(null, {
8952
8986
  list: { get: () => super.list }
8953
8987
  });
8954
- return __awaiter$20(this, void 0, void 0, function* () {
8988
+ return __awaiter$b(this, void 0, void 0, function* () {
8955
8989
  return _super.list.call(this, { tenantId: this.client.tenant });
8956
8990
  });
8957
8991
  }
@@ -8972,7 +9006,7 @@
8972
9006
  const _super = Object.create(null, {
8973
9007
  list: { get: () => super.list }
8974
9008
  });
8975
- return __awaiter$20(this, void 0, void 0, function* () {
9009
+ return __awaiter$b(this, void 0, void 0, function* () {
8976
9010
  return _super.list.call(this, { management: true });
8977
9011
  });
8978
9012
  }
@@ -9003,7 +9037,7 @@
9003
9037
  const _super = Object.create(null, {
9004
9038
  create: { get: () => super.create }
9005
9039
  });
9006
- return __awaiter$20(this, void 0, void 0, function* () {
9040
+ return __awaiter$b(this, void 0, void 0, function* () {
9007
9041
  return _super.create.call(this, entity);
9008
9042
  });
9009
9043
  }
@@ -9035,7 +9069,7 @@
9035
9069
  const _super = Object.create(null, {
9036
9070
  update: { get: () => super.update }
9037
9071
  });
9038
- return __awaiter$20(this, void 0, void 0, function* () {
9072
+ return __awaiter$b(this, void 0, void 0, function* () {
9039
9073
  return _super.update.call(this, entity);
9040
9074
  });
9041
9075
  }
@@ -9064,7 +9098,7 @@
9064
9098
  * ```
9065
9099
  */
9066
9100
  save(entity) {
9067
- return __awaiter$20(this, void 0, void 0, function* () {
9101
+ return __awaiter$b(this, void 0, void 0, function* () {
9068
9102
  return entity.id ? this.update(entity) : this.create(entity);
9069
9103
  });
9070
9104
  }
@@ -9089,12 +9123,13 @@
9089
9123
  const _super = Object.create(null, {
9090
9124
  delete: { get: () => super.delete }
9091
9125
  });
9092
- return __awaiter$20(this, void 0, void 0, function* () {
9126
+ return __awaiter$b(this, void 0, void 0, function* () {
9093
9127
  return _super.delete.call(this, entityOrId);
9094
9128
  });
9095
9129
  }
9096
9130
  }
9097
9131
 
9132
+ exports.TenantLoginOptionType = void 0;
9098
9133
  (function (TenantLoginOptionType) {
9099
9134
  /**
9100
9135
  * OAI-Secure: authentication information is stored in a HttpOnly cookie
@@ -9109,16 +9144,18 @@
9109
9144
  */
9110
9145
  TenantLoginOptionType["BASIC"] = "BASIC";
9111
9146
  })(exports.TenantLoginOptionType || (exports.TenantLoginOptionType = {}));
9147
+ exports.GrantType = void 0;
9112
9148
  (function (GrantType) {
9113
9149
  GrantType["AUTHORIZATION_CODE"] = "AUTHORIZATION_CODE";
9114
9150
  GrantType["PASSWORD"] = "PASSWORD";
9115
9151
  })(exports.GrantType || (exports.GrantType = {}));
9152
+ exports.UserManagementSource = void 0;
9116
9153
  (function (UserManagementSource) {
9117
9154
  UserManagementSource["REMOTE"] = "REMOTE";
9118
9155
  UserManagementSource["INTERNAL"] = "INTERNAL";
9119
9156
  })(exports.UserManagementSource || (exports.UserManagementSource = {}));
9120
9157
 
9121
- var __awaiter$21 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
9158
+ var __awaiter$a = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
9122
9159
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9123
9160
  return new (P || (P = Promise))(function (resolve, reject) {
9124
9161
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -9155,7 +9192,7 @@
9155
9192
  const _super = Object.create(null, {
9156
9193
  detail: { get: () => super.detail }
9157
9194
  });
9158
- return __awaiter$21(this, void 0, void 0, function* () {
9195
+ return __awaiter$a(this, void 0, void 0, function* () {
9159
9196
  return _super.detail.call(this, entityOrId);
9160
9197
  });
9161
9198
  }
@@ -9186,7 +9223,7 @@
9186
9223
  const _super = Object.create(null, {
9187
9224
  create: { get: () => super.create }
9188
9225
  });
9189
- return __awaiter$21(this, void 0, void 0, function* () {
9226
+ return __awaiter$a(this, void 0, void 0, function* () {
9190
9227
  return _super.create.call(this, entity);
9191
9228
  });
9192
9229
  }
@@ -9215,7 +9252,7 @@
9215
9252
  const _super = Object.create(null, {
9216
9253
  list: { get: () => super.list }
9217
9254
  });
9218
- return __awaiter$21(this, void 0, void 0, function* () {
9255
+ return __awaiter$a(this, void 0, void 0, function* () {
9219
9256
  return _super.list.call(this, filter);
9220
9257
  });
9221
9258
  }
@@ -9224,6 +9261,7 @@
9224
9261
  /**
9225
9262
  * A specific audit record can have one of the following types
9226
9263
  */
9264
+ exports.AuditRecordType = void 0;
9227
9265
  (function (AuditRecordType) {
9228
9266
  AuditRecordType["ALARM"] = "Alarm";
9229
9267
  AuditRecordType["BULK_OPERATION"] = "BulkOperation";
@@ -9240,13 +9278,17 @@
9240
9278
  AuditRecordType["USER"] = "User";
9241
9279
  })(exports.AuditRecordType || (exports.AuditRecordType = {}));
9242
9280
 
9281
+ /**
9282
+ * An audit record can have one of the following change type
9283
+ */
9284
+ exports.ChangeType = void 0;
9243
9285
  (function (ChangeType) {
9244
9286
  ChangeType[ChangeType["ADDED"] = gettext('ADDED')] = "ADDED";
9245
9287
  ChangeType[ChangeType["REPLACED"] = gettext('REPLACED')] = "REPLACED";
9246
9288
  ChangeType[ChangeType["REMOVED"] = gettext('REMOVED')] = "REMOVED";
9247
9289
  })(exports.ChangeType || (exports.ChangeType = {}));
9248
9290
 
9249
- var __awaiter$22 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
9291
+ var __awaiter$9 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
9250
9292
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9251
9293
  return new (P || (P = Promise))(function (resolve, reject) {
9252
9294
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -9283,7 +9325,7 @@
9283
9325
  const _super = Object.create(null, {
9284
9326
  detail: { get: () => super.detail }
9285
9327
  });
9286
- return __awaiter$22(this, void 0, void 0, function* () {
9328
+ return __awaiter$9(this, void 0, void 0, function* () {
9287
9329
  return _super.detail.call(this, entityOrId);
9288
9330
  });
9289
9331
  }
@@ -9310,7 +9352,7 @@
9310
9352
  const _super = Object.create(null, {
9311
9353
  create: { get: () => super.create }
9312
9354
  });
9313
- return __awaiter$22(this, void 0, void 0, function* () {
9355
+ return __awaiter$9(this, void 0, void 0, function* () {
9314
9356
  return _super.create.call(this, entity);
9315
9357
  });
9316
9358
  }
@@ -9338,7 +9380,7 @@
9338
9380
  const _super = Object.create(null, {
9339
9381
  update: { get: () => super.update }
9340
9382
  });
9341
- return __awaiter$22(this, void 0, void 0, function* () {
9383
+ return __awaiter$9(this, void 0, void 0, function* () {
9342
9384
  return _super.update.call(this, entity);
9343
9385
  });
9344
9386
  }
@@ -9366,7 +9408,7 @@
9366
9408
  const _super = Object.create(null, {
9367
9409
  list: { get: () => super.list }
9368
9410
  });
9369
- return __awaiter$22(this, void 0, void 0, function* () {
9411
+ return __awaiter$9(this, void 0, void 0, function* () {
9370
9412
  return _super.list.call(this, filter);
9371
9413
  });
9372
9414
  }
@@ -9391,12 +9433,16 @@
9391
9433
  const _super = Object.create(null, {
9392
9434
  delete: { get: () => super.delete }
9393
9435
  });
9394
- return __awaiter$22(this, void 0, void 0, function* () {
9436
+ return __awaiter$9(this, void 0, void 0, function* () {
9395
9437
  return _super.delete.call(this, entityOrId);
9396
9438
  });
9397
9439
  }
9398
9440
  }
9399
9441
 
9442
+ /**
9443
+ * Device registration can have one of the following states.
9444
+ */
9445
+ exports.DeviceRegistrationStatus = void 0;
9400
9446
  (function (DeviceRegistrationStatus) {
9401
9447
  DeviceRegistrationStatus[DeviceRegistrationStatus["WAITING_FOR_CONNECTION"] = gettext('WAITING_FOR_CONNECTION')] = "WAITING_FOR_CONNECTION";
9402
9448
  DeviceRegistrationStatus[DeviceRegistrationStatus["PENDING_ACCEPTANCE"] = gettext('PENDING_ACCEPTANCE')] = "PENDING_ACCEPTANCE";
@@ -9404,7 +9450,7 @@
9404
9450
  DeviceRegistrationStatus[DeviceRegistrationStatus["BLOCKED"] = gettext('BLOCKED')] = "BLOCKED";
9405
9451
  })(exports.DeviceRegistrationStatus || (exports.DeviceRegistrationStatus = {}));
9406
9452
 
9407
- var __awaiter$23 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
9453
+ var __awaiter$8 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
9408
9454
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9409
9455
  return new (P || (P = Promise))(function (resolve, reject) {
9410
9456
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -9444,7 +9490,7 @@
9444
9490
  const _super = Object.create(null, {
9445
9491
  detail: { get: () => super.detail }
9446
9492
  });
9447
- return __awaiter$23(this, void 0, void 0, function* () {
9493
+ return __awaiter$8(this, void 0, void 0, function* () {
9448
9494
  return _super.detail.call(this, entityOrId);
9449
9495
  });
9450
9496
  }
@@ -9471,7 +9517,7 @@
9471
9517
  const _super = Object.create(null, {
9472
9518
  create: { get: () => super.create }
9473
9519
  });
9474
- return __awaiter$23(this, void 0, void 0, function* () {
9520
+ return __awaiter$8(this, void 0, void 0, function* () {
9475
9521
  return _super.create.call(this, entity);
9476
9522
  });
9477
9523
  }
@@ -9499,7 +9545,7 @@
9499
9545
  const _super = Object.create(null, {
9500
9546
  list: { get: () => super.list }
9501
9547
  });
9502
- return __awaiter$23(this, void 0, void 0, function* () {
9548
+ return __awaiter$8(this, void 0, void 0, function* () {
9503
9549
  return _super.list.call(this, filter);
9504
9550
  });
9505
9551
  }
@@ -9525,7 +9571,7 @@
9525
9571
  const _super = Object.create(null, {
9526
9572
  delete: { get: () => super.delete }
9527
9573
  });
9528
- return __awaiter$23(this, void 0, void 0, function* () {
9574
+ return __awaiter$8(this, void 0, void 0, function* () {
9529
9575
  return _super.delete.call(this, entityOrId);
9530
9576
  });
9531
9577
  }
@@ -9550,7 +9596,7 @@
9550
9596
  const _super = Object.create(null, {
9551
9597
  update: { get: () => super.update }
9552
9598
  });
9553
- return __awaiter$23(this, void 0, void 0, function* () {
9599
+ return __awaiter$8(this, void 0, void 0, function* () {
9554
9600
  const securityToken = this.getSecurityToken(entityOrId);
9555
9601
  let payload = {
9556
9602
  id: this.getIdString(entityOrId),
@@ -9579,7 +9625,7 @@
9579
9625
  const _super = Object.create(null, {
9580
9626
  fetch: { get: () => super.fetch }
9581
9627
  });
9582
- return __awaiter$23(this, void 0, void 0, function* () {
9628
+ return __awaiter$8(this, void 0, void 0, function* () {
9583
9629
  const res = yield _super.fetch.call(this, `${this.listUrl}/acceptAll`, { method: 'POST' });
9584
9630
  const data = (yield res.json());
9585
9631
  return { res, data };
@@ -9602,7 +9648,7 @@
9602
9648
  const _super = Object.create(null, {
9603
9649
  fetch: { get: () => super.fetch }
9604
9650
  });
9605
- return __awaiter$23(this, void 0, void 0, function* () {
9651
+ return __awaiter$8(this, void 0, void 0, function* () {
9606
9652
  const res = yield _super.fetch.call(this, `${this.listUrl}/limit`);
9607
9653
  const data = (yield res.json());
9608
9654
  return { res, data };
@@ -9632,7 +9678,7 @@
9632
9678
  * ```
9633
9679
  */
9634
9680
  bootstrap(entityOrId, options) {
9635
- return __awaiter$23(this, void 0, void 0, function* () {
9681
+ return __awaiter$8(this, void 0, void 0, function* () {
9636
9682
  const id = this.getIdString(entityOrId);
9637
9683
  const securityToken = this.getSecurityToken(entityOrId);
9638
9684
  const body = securityToken ? JSON.stringify({ id, securityToken }) : JSON.stringify({ id });
@@ -9678,7 +9724,7 @@
9678
9724
  }
9679
9725
  }
9680
9726
 
9681
- var __awaiter$24 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
9727
+ var __awaiter$7 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
9682
9728
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9683
9729
  return new (P || (P = Promise))(function (resolve, reject) {
9684
9730
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -9722,11 +9768,11 @@
9722
9768
  * ```
9723
9769
  */
9724
9770
  create(inputFile) {
9725
- return __awaiter$24(this, void 0, void 0, function* () {
9771
+ return __awaiter$7(this, void 0, void 0, function* () {
9726
9772
  let csv = inputFile;
9727
9773
  const url = '/devicecontrol/bulkNewDeviceRequests';
9728
9774
  const method = 'POST';
9729
- const body = new browser$1();
9775
+ const body = new browser();
9730
9776
  let fileName = 'bulk-registration.csv';
9731
9777
  if (typeof File !== 'undefined' && csv instanceof File) {
9732
9778
  fileName = csv.name;
@@ -9753,13 +9799,14 @@
9753
9799
  /**
9754
9800
  * Device registration can have one of the following security modes.
9755
9801
  */
9802
+ exports.DeviceRegistrationSecurityMode = void 0;
9756
9803
  (function (DeviceRegistrationSecurityMode) {
9757
9804
  DeviceRegistrationSecurityMode["REQUIRED"] = "REQUIRED";
9758
9805
  DeviceRegistrationSecurityMode["OPTIONAL"] = "OPTIONAL";
9759
9806
  DeviceRegistrationSecurityMode["IGNORED"] = "IGNORED";
9760
9807
  })(exports.DeviceRegistrationSecurityMode || (exports.DeviceRegistrationSecurityMode = {}));
9761
9808
 
9762
- var __awaiter$25 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
9809
+ var __awaiter$6 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
9763
9810
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9764
9811
  return new (P || (P = Promise))(function (resolve, reject) {
9765
9812
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -9800,7 +9847,7 @@
9800
9847
  const _super = Object.create(null, {
9801
9848
  detail: { get: () => super.detail }
9802
9849
  });
9803
- return __awaiter$25(this, void 0, void 0, function* () {
9850
+ return __awaiter$6(this, void 0, void 0, function* () {
9804
9851
  return _super.detail.call(this, entityOrId);
9805
9852
  });
9806
9853
  }
@@ -9829,13 +9876,13 @@
9829
9876
  const _super = Object.create(null, {
9830
9877
  list: { get: () => super.list }
9831
9878
  });
9832
- return __awaiter$25(this, void 0, void 0, function* () {
9879
+ return __awaiter$6(this, void 0, void 0, function* () {
9833
9880
  return _super.list.call(this, filter);
9834
9881
  });
9835
9882
  }
9836
9883
  }
9837
9884
 
9838
- var __awaiter$26 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
9885
+ var __awaiter$5 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
9839
9886
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9840
9887
  return new (P || (P = Promise))(function (resolve, reject) {
9841
9888
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -9883,7 +9930,7 @@
9883
9930
  const _super = Object.create(null, {
9884
9931
  detail: { get: () => super.detail }
9885
9932
  });
9886
- return __awaiter$26(this, void 0, void 0, function* () {
9933
+ return __awaiter$5(this, void 0, void 0, function* () {
9887
9934
  return _super.detail.call(this, entityOrId);
9888
9935
  });
9889
9936
  }
@@ -9911,7 +9958,7 @@
9911
9958
  const _super = Object.create(null, {
9912
9959
  create: { get: () => super.create }
9913
9960
  });
9914
- return __awaiter$26(this, void 0, void 0, function* () {
9961
+ return __awaiter$5(this, void 0, void 0, function* () {
9915
9962
  return _super.create.call(this, entity);
9916
9963
  });
9917
9964
  }
@@ -9941,7 +9988,7 @@
9941
9988
  const _super = Object.create(null, {
9942
9989
  update: { get: () => super.update }
9943
9990
  });
9944
- return __awaiter$26(this, void 0, void 0, function* () {
9991
+ return __awaiter$5(this, void 0, void 0, function* () {
9945
9992
  return _super.update.call(this, entity);
9946
9993
  });
9947
9994
  }
@@ -9970,7 +10017,7 @@
9970
10017
  const _super = Object.create(null, {
9971
10018
  list: { get: () => super.list }
9972
10019
  });
9973
- return __awaiter$26(this, void 0, void 0, function* () {
10020
+ return __awaiter$5(this, void 0, void 0, function* () {
9974
10021
  return _super.list.call(this, filter);
9975
10022
  });
9976
10023
  }
@@ -9999,7 +10046,7 @@
9999
10046
  const _super = Object.create(null, {
10000
10047
  delete: { get: () => super.delete }
10001
10048
  });
10002
- return __awaiter$26(this, void 0, void 0, function* () {
10049
+ return __awaiter$5(this, void 0, void 0, function* () {
10003
10050
  return _super.delete.call(this, entityOrId);
10004
10051
  });
10005
10052
  }
@@ -10024,7 +10071,7 @@
10024
10071
  * When role is assigned to user, suitable audit record is created with type 'User' and activity 'User updated'.
10025
10072
  */
10026
10073
  addRoleToGroup(entityOrId, childEntityOrSelf) {
10027
- return __awaiter$26(this, void 0, void 0, function* () {
10074
+ return __awaiter$5(this, void 0, void 0, function* () {
10028
10075
  return this.addChild(ChildType.ROLES, entityOrId, childEntityOrSelf);
10029
10076
  });
10030
10077
  }
@@ -10048,7 +10095,7 @@
10048
10095
  * ```
10049
10096
  */
10050
10097
  removeRoleFromGroup(entityOrId, childEntityOrSelf) {
10051
- return __awaiter$26(this, void 0, void 0, function* () {
10098
+ return __awaiter$5(this, void 0, void 0, function* () {
10052
10099
  return this.removeChild(ChildType.ROLES, entityOrId, childEntityOrSelf);
10053
10100
  });
10054
10101
  }
@@ -10073,7 +10120,7 @@
10073
10120
  * When user is added to group, suitable audit record is created with type 'User' and activity 'User updated'.
10074
10121
  */
10075
10122
  addUserToGroup(entityOrId, childEntityOrSelf) {
10076
- return __awaiter$26(this, void 0, void 0, function* () {
10123
+ return __awaiter$5(this, void 0, void 0, function* () {
10077
10124
  return this.addChild(ChildType.USERS, entityOrId, childEntityOrSelf);
10078
10125
  });
10079
10126
  }
@@ -10098,7 +10145,7 @@
10098
10145
  * When user is removed from group, suitable audit record is created with type 'User' and activity 'User updated'.
10099
10146
  */
10100
10147
  removeUserFromGroup(entityOrId, childEntityOrSelf) {
10101
- return __awaiter$26(this, void 0, void 0, function* () {
10148
+ return __awaiter$5(this, void 0, void 0, function* () {
10102
10149
  return this.removeChild(ChildType.USERS, entityOrId, childEntityOrSelf);
10103
10150
  });
10104
10151
  }
@@ -10124,7 +10171,7 @@
10124
10171
  throw new Error('UserGroupService -> getChild -> unsupported child type');
10125
10172
  }
10126
10173
  addChild(type, userGroupOrId, childReference) {
10127
- return __awaiter$26(this, void 0, void 0, function* () {
10174
+ return __awaiter$5(this, void 0, void 0, function* () {
10128
10175
  const url = this.getChildUrl(type, userGroupOrId);
10129
10176
  const method = 'POST';
10130
10177
  const body = this.getChildReferenceAsBody(type, childReference);
@@ -10139,7 +10186,7 @@
10139
10186
  });
10140
10187
  }
10141
10188
  removeChild(type, userGroupOrId, childReference) {
10142
- return __awaiter$26(this, void 0, void 0, function* () {
10189
+ return __awaiter$5(this, void 0, void 0, function* () {
10143
10190
  const childId = this.getIdString(childReference);
10144
10191
  const url = `${this.getChildUrl(type, userGroupOrId)}/${encodeURIComponent(String(childId))}`;
10145
10192
  const method = 'DELETE';
@@ -10151,7 +10198,7 @@
10151
10198
  }
10152
10199
  }
10153
10200
 
10154
- var __awaiter$27 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
10201
+ var __awaiter$4 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
10155
10202
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
10156
10203
  return new (P || (P = Promise))(function (resolve, reject) {
10157
10204
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -10190,7 +10237,7 @@
10190
10237
  * ```
10191
10238
  */
10192
10239
  list(managedObjectId) {
10193
- return __awaiter$27(this, void 0, void 0, function* () {
10240
+ return __awaiter$4(this, void 0, void 0, function* () {
10194
10241
  const headers = { accept: 'application/json' };
10195
10242
  const url = this.getExternalIdsOfGlobalIdUrl(managedObjectId);
10196
10243
  const res = yield this.fetch(url, { headers });
@@ -10223,7 +10270,7 @@
10223
10270
  * ```
10224
10271
  */
10225
10272
  create(identity) {
10226
- return __awaiter$27(this, void 0, void 0, function* () {
10273
+ return __awaiter$4(this, void 0, void 0, function* () {
10227
10274
  const headers = { 'content-type': 'application/json', accept: 'application/json' };
10228
10275
  const method = 'POST';
10229
10276
  const body = JSON.stringify(identity);
@@ -10254,7 +10301,7 @@
10254
10301
  * ```
10255
10302
  */
10256
10303
  detail(identity) {
10257
- return __awaiter$27(this, void 0, void 0, function* () {
10304
+ return __awaiter$4(this, void 0, void 0, function* () {
10258
10305
  const headers = { accept: 'application/json' };
10259
10306
  const url = this.getExternalIdUrl(identity);
10260
10307
  const res = yield this.fetch(url, { headers });
@@ -10283,7 +10330,7 @@
10283
10330
  * ```
10284
10331
  */
10285
10332
  delete(identity) {
10286
- return __awaiter$27(this, void 0, void 0, function* () {
10333
+ return __awaiter$4(this, void 0, void 0, function* () {
10287
10334
  const headers = { accept: 'application/json' };
10288
10335
  const method = 'DELETE';
10289
10336
  const url = this.getExternalIdUrl(identity);
@@ -10292,7 +10339,7 @@
10292
10339
  });
10293
10340
  }
10294
10341
  fetch(url, init) {
10295
- return __awaiter$27(this, void 0, void 0, function* () {
10342
+ return __awaiter$4(this, void 0, void 0, function* () {
10296
10343
  const res = yield this.client.fetch(url, init);
10297
10344
  if (res.status >= 400) {
10298
10345
  let data = null;
@@ -10320,7 +10367,7 @@
10320
10367
  }
10321
10368
  }
10322
10369
 
10323
- var __awaiter$28 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
10370
+ var __awaiter$3 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
10324
10371
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
10325
10372
  return new (P || (P = Promise))(function (resolve, reject) {
10326
10373
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -10359,7 +10406,7 @@
10359
10406
  const _super = Object.create(null, {
10360
10407
  list: { get: () => super.list }
10361
10408
  });
10362
- return __awaiter$28(this, void 0, void 0, function* () {
10409
+ return __awaiter$3(this, void 0, void 0, function* () {
10363
10410
  return _super.list.call(this, filter);
10364
10411
  });
10365
10412
  }
@@ -10384,7 +10431,7 @@
10384
10431
  const _super = Object.create(null, {
10385
10432
  detail: { get: () => super.detail }
10386
10433
  });
10387
- return __awaiter$28(this, void 0, void 0, function* () {
10434
+ return __awaiter$3(this, void 0, void 0, function* () {
10388
10435
  return _super.detail.call(this, entityOrId);
10389
10436
  });
10390
10437
  }
@@ -10409,7 +10456,7 @@
10409
10456
  const _super = Object.create(null, {
10410
10457
  delete: { get: () => super.delete }
10411
10458
  });
10412
- return __awaiter$28(this, void 0, void 0, function* () {
10459
+ return __awaiter$3(this, void 0, void 0, function* () {
10413
10460
  return _super.delete.call(this, entityOrId);
10414
10461
  });
10415
10462
  }
@@ -10436,7 +10483,7 @@
10436
10483
  const _super = Object.create(null, {
10437
10484
  update: { get: () => super.update }
10438
10485
  });
10439
- return __awaiter$28(this, void 0, void 0, function* () {
10486
+ return __awaiter$3(this, void 0, void 0, function* () {
10440
10487
  return _super.update.call(this, entity);
10441
10488
  });
10442
10489
  }
@@ -10465,7 +10512,7 @@
10465
10512
  const _super = Object.create(null, {
10466
10513
  create: { get: () => super.create }
10467
10514
  });
10468
- return __awaiter$28(this, void 0, void 0, function* () {
10515
+ return __awaiter$3(this, void 0, void 0, function* () {
10469
10516
  return _super.create.call(this, entity);
10470
10517
  });
10471
10518
  }
@@ -10488,7 +10535,7 @@
10488
10535
  * ```
10489
10536
  */
10490
10537
  regeneratePoPVerificationCode(entityOrId) {
10491
- return __awaiter$28(this, void 0, void 0, function* () {
10538
+ return __awaiter$3(this, void 0, void 0, function* () {
10492
10539
  const method = 'POST';
10493
10540
  const headers = { 'content-type': 'application/json', Accept: 'application/json' };
10494
10541
  const url = `${this.proofOfPossessionUrl}/${this.getEntityId(entityOrId)}/verification-code`;
@@ -10518,7 +10565,7 @@
10518
10565
  * ```
10519
10566
  */
10520
10567
  verifySignedVerificationCode(entityOrId, proofOfPossessionSignedVerificationCode) {
10521
- return __awaiter$28(this, void 0, void 0, function* () {
10568
+ return __awaiter$3(this, void 0, void 0, function* () {
10522
10569
  const method = 'POST';
10523
10570
  const headers = { 'content-type': 'application/json', Accept: 'application/json' };
10524
10571
  const url = `${this.proofOfPossessionUrl}/${this.getEntityId(entityOrId)}/pop`;
@@ -10544,7 +10591,7 @@
10544
10591
  }
10545
10592
  }
10546
10593
 
10547
- var __awaiter$29 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
10594
+ var __awaiter$2 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
10548
10595
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
10549
10596
  return new (P || (P = Promise))(function (resolve, reject) {
10550
10597
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -10605,7 +10652,7 @@
10605
10652
  const _super = Object.create(null, {
10606
10653
  detail: { get: () => super.detail }
10607
10654
  });
10608
- return __awaiter$29(this, void 0, void 0, function* () {
10655
+ return __awaiter$2(this, void 0, void 0, function* () {
10609
10656
  return _super.detail.call(this, entityOrId, filter);
10610
10657
  });
10611
10658
  }
@@ -10644,7 +10691,7 @@
10644
10691
  const _super = Object.create(null, {
10645
10692
  create: { get: () => super.create }
10646
10693
  });
10647
- return __awaiter$29(this, void 0, void 0, function* () {
10694
+ return __awaiter$2(this, void 0, void 0, function* () {
10648
10695
  const { data: isInstalled } = yield this.isSmartGroupsV2MicroserviceInstalled();
10649
10696
  const entity = Object.assign(Object.assign(Object.assign({}, obj.smartGroup), { [this.QUERY_STRING_FRAGMENT]: obj.deviceQueryString, [this.COLUMNS_CONFIG_FRAGMENT]: obj.configurableColumns }), (obj.filterConfig && { [this.FILTER_CONFIG_FRAGMENT]: obj.filterConfig }));
10650
10697
  return isInstalled ? this.createSmartGroupV2(entity) : _super.create.call(this, entity);
@@ -10672,7 +10719,7 @@
10672
10719
  const _super = Object.create(null, {
10673
10720
  update: { get: () => super.update }
10674
10721
  });
10675
- return __awaiter$29(this, void 0, void 0, function* () {
10722
+ return __awaiter$2(this, void 0, void 0, function* () {
10676
10723
  const { id } = mo;
10677
10724
  const { data: isInstalled } = yield this.isSmartGroupsV2MicroserviceInstalled();
10678
10725
  const { data: groupMo } = yield this.detail(id, { withChildren: false });
@@ -10700,7 +10747,7 @@
10700
10747
  * ```
10701
10748
  */
10702
10749
  updateSmartGroupV2(mo, filter = {}) {
10703
- return __awaiter$29(this, void 0, void 0, function* () {
10750
+ return __awaiter$2(this, void 0, void 0, function* () {
10704
10751
  const { id } = mo, partialMo = __rest(mo, ["id"]);
10705
10752
  const method = 'PUT';
10706
10753
  const body = JSON.stringify(this.onBeforeUpdate(partialMo));
@@ -10736,7 +10783,7 @@
10736
10783
  const _super = Object.create(null, {
10737
10784
  delete: { get: () => super.delete }
10738
10785
  });
10739
- return __awaiter$29(this, void 0, void 0, function* () {
10786
+ return __awaiter$2(this, void 0, void 0, function* () {
10740
10787
  const { data: isInstalled } = yield this.isSmartGroupsV2MicroserviceInstalled();
10741
10788
  const data = (yield this.detail(entityOrId, { withChildren: false })).data;
10742
10789
  return isInstalled && this.isSmartGroupV2(data)
@@ -10825,7 +10872,7 @@
10825
10872
  * ```
10826
10873
  */
10827
10874
  removeSmartGroupV2(entityOrId) {
10828
- return __awaiter$29(this, void 0, void 0, function* () {
10875
+ return __awaiter$2(this, void 0, void 0, function* () {
10829
10876
  let id;
10830
10877
  if (typeof entityOrId === 'object' && entityOrId.id) {
10831
10878
  id = entityOrId.id;
@@ -10850,7 +10897,7 @@
10850
10897
  }
10851
10898
  }
10852
10899
  createSmartGroupV2(entity) {
10853
- return __awaiter$29(this, void 0, void 0, function* () {
10900
+ return __awaiter$2(this, void 0, void 0, function* () {
10854
10901
  const method = 'POST';
10855
10902
  const body = JSON.stringify(entity);
10856
10903
  const headers = { 'content-type': 'application/json', accept: 'application/json' };
@@ -10862,7 +10909,7 @@
10862
10909
  }
10863
10910
  }
10864
10911
 
10865
- var __awaiter$30 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
10912
+ var __awaiter$1 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
10866
10913
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
10867
10914
  return new (P || (P = Promise))(function (resolve, reject) {
10868
10915
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -10891,7 +10938,7 @@
10891
10938
  * ```
10892
10939
  */
10893
10940
  isMicroserviceAvailable() {
10894
- return __awaiter$30(this, void 0, void 0, function* () {
10941
+ return __awaiter$1(this, void 0, void 0, function* () {
10895
10942
  if (this.microserviceAvailable === undefined) {
10896
10943
  this.microserviceAvailable = (yield this.applicationService.isAvailable(SmartRulesService.microserviceName)).data;
10897
10944
  }
@@ -10916,7 +10963,7 @@
10916
10963
  * ```
10917
10964
  */
10918
10965
  listByContext(entityOrId) {
10919
- return __awaiter$30(this, void 0, void 0, function* () {
10966
+ return __awaiter$1(this, void 0, void 0, function* () {
10920
10967
  const url = this.contextRulesUrl(entityOrId);
10921
10968
  const res = yield this.fetch(url, { method: 'GET' });
10922
10969
  const rules = (yield res.json()).rules;
@@ -10968,7 +11015,7 @@
10968
11015
  * ```
10969
11016
  */
10970
11017
  update(rule) {
10971
- return __awaiter$30(this, void 0, void 0, function* () {
11018
+ return __awaiter$1(this, void 0, void 0, function* () {
10972
11019
  const url = this.getSmartRulesUrl(rule);
10973
11020
  const method = 'PUT';
10974
11021
  const body = JSON.stringify(this.removeUnclonableFields(rule, this.unupdatableFields));
@@ -11013,7 +11060,7 @@
11013
11060
  }
11014
11061
  SmartRulesService.microserviceName = 'smartrule';
11015
11062
 
11016
- var __awaiter$31 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
11063
+ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
11017
11064
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
11018
11065
  return new (P || (P = Promise))(function (resolve, reject) {
11019
11066
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -11097,7 +11144,7 @@
11097
11144
  * ```
11098
11145
  */
11099
11146
  static authenticate(credentials, baseUrl) {
11100
- return __awaiter$31(this, void 0, void 0, function* () {
11147
+ return __awaiter(this, void 0, void 0, function* () {
11101
11148
  const auth = new BasicAuth(credentials);
11102
11149
  const clientCore = new FetchClient(auth, baseUrl);
11103
11150
  const res = yield clientCore.fetch('/tenant/currentTenant', { method: 'GET' });
@@ -11116,7 +11163,7 @@
11116
11163
  * **Deprecated** Please use MQTT to bootstrap a device.
11117
11164
  */
11118
11165
  static deviceBootstrap(options) {
11119
- return __awaiter$31(this, void 0, void 0, function* () {
11166
+ return __awaiter(this, void 0, void 0, function* () {
11120
11167
  const { deviceId, timeout, baseUrl, basicAuthToken } = options;
11121
11168
  let { expire } = options;
11122
11169
  if (timeout && !expire) {
@@ -11168,7 +11215,7 @@
11168
11215
  * ```
11169
11216
  */
11170
11217
  static getMicroserviceSubscriptions(bootstrapCredentials, baseUrl) {
11171
- return __awaiter$31(this, void 0, void 0, function* () {
11218
+ return __awaiter(this, void 0, void 0, function* () {
11172
11219
  const microserviceSubscriptionsEndpoint = '/application/currentApplication/subscriptions';
11173
11220
  const clientCore = new FetchClient(new BasicAuth(bootstrapCredentials), baseUrl);
11174
11221
  const res = yield clientCore.fetch(microserviceSubscriptionsEndpoint);
@@ -11192,43 +11239,42 @@
11192
11239
  }
11193
11240
  }
11194
11241
 
11195
- exports.Client = Client;
11196
11242
  exports.AlarmService = AlarmService;
11243
+ exports.ApplicationBinaryService = ApplicationBinaryService;
11197
11244
  exports.ApplicationService = ApplicationService;
11198
11245
  exports.AuditService = AuditService;
11199
- exports.Service = Service;
11200
- exports.FetchClient = FetchClient;
11201
11246
  exports.BasicAuth = BasicAuth;
11247
+ exports.Client = Client;
11202
11248
  exports.CookieAuth = CookieAuth;
11203
- exports.MicroserviceClientRequestAuth = MicroserviceClientRequestAuth;
11204
- exports.Paging = Paging;
11205
- exports.QueriesUtil = QueriesUtil;
11206
- exports.TrustedCertificateService = TrustedCertificateService;
11207
- exports.DeviceRegistrationService = DeviceRegistrationService;
11208
11249
  exports.DeviceRegistrationBulkService = DeviceRegistrationBulkService;
11209
- exports.EventService = EventService;
11250
+ exports.DeviceRegistrationService = DeviceRegistrationService;
11210
11251
  exports.EventBinaryService = EventBinaryService;
11252
+ exports.EventService = EventService;
11253
+ exports.FetchClient = FetchClient;
11211
11254
  exports.IdentityService = IdentityService;
11212
- exports.InventoryService = InventoryService;
11213
11255
  exports.InventoryBinaryService = InventoryBinaryService;
11214
11256
  exports.InventoryRoleService = InventoryRoleService;
11257
+ exports.InventoryService = InventoryService;
11215
11258
  exports.MeasurementService = MeasurementService;
11216
- exports.OperationService = OperationService;
11259
+ exports.MicroserviceClientRequestAuth = MicroserviceClientRequestAuth;
11217
11260
  exports.OperationBulkService = OperationBulkService;
11261
+ exports.OperationService = OperationService;
11262
+ exports.Paging = Paging;
11263
+ exports.QueriesUtil = QueriesUtil;
11218
11264
  exports.Realtime = Realtime;
11265
+ exports.Service = Service;
11266
+ exports.SmartGroupsService = SmartGroupsService;
11267
+ exports.SmartRulesService = SmartRulesService;
11219
11268
  exports.SystemOptionsService = SystemOptionsService;
11220
- exports.TenantService = TenantService;
11269
+ exports.TenantLoginOptionsService = TenantLoginOptionsService;
11221
11270
  exports.TenantOptionsService = TenantOptionsService;
11222
11271
  exports.TenantSecurityOptionsService = TenantSecurityOptionsService;
11223
- exports.TenantLoginOptionsService = TenantLoginOptionsService;
11224
- exports.UserService = UserService;
11225
- exports.UserInventoryRoleService = UserInventoryRoleService;
11272
+ exports.TenantService = TenantService;
11273
+ exports.TrustedCertificateService = TrustedCertificateService;
11226
11274
  exports.UserGroupService = UserGroupService;
11275
+ exports.UserInventoryRoleService = UserInventoryRoleService;
11227
11276
  exports.UserRoleService = UserRoleService;
11228
- exports.SmartRulesService = SmartRulesService;
11229
- exports.SmartGroupsService = SmartGroupsService;
11230
-
11231
- Object.defineProperty(exports, '__esModule', { value: true });
11277
+ exports.UserService = UserService;
11232
11278
 
11233
- })));
11279
+ }));
11234
11280
  //# sourceMappingURL=client.umd.js.map