opengate-js 16.2.0 → 16.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +84 -8
  2. package/dist/{opengate-api-bower-16.2.0.js → opengate-api-bower-16.3.0.js} +1006 -665
  3. package/dist/opengate-api-bower-16.3.0.js.map +6 -0
  4. package/dist/opengate-api-bower-16.3.0.min.js +117 -0
  5. package/dist/opengate-api-bower-16.3.0.min.js.map +6 -0
  6. package/dist/opengate-api-npm.js +4 -0
  7. package/dist/opengate-api-npm.js.map +1 -1
  8. package/dist/opengate-api-npm.mjs +133 -21
  9. package/dist/opengate-api-npm.mjs.map +1 -1
  10. package/dist/src/InternalOpenGateAPI.js +38 -2
  11. package/dist/src/InternalOpenGateAPI.js.map +1 -1
  12. package/dist/src/searching/AssetSearch.js +1 -1
  13. package/dist/src/searching/AssetSearch.js.map +1 -1
  14. package/dist/src/searching/BaseSearch.js +3 -3
  15. package/dist/src/searching/DeviceSearch.js +1 -1
  16. package/dist/src/searching/DeviceSearch.js.map +1 -1
  17. package/dist/src/searching/EntitySearch.js +1 -1
  18. package/dist/src/searching/EntitySearch.js.map +1 -1
  19. package/dist/src/searching/WPSearch.js +1 -1
  20. package/dist/src/searching/WPSearch.js.map +1 -1
  21. package/dist/src/util/NorthAmpliaREST.js +77 -2
  22. package/dist/src/util/NorthAmpliaREST.js.map +1 -1
  23. package/dist/src/util/http/RequestSpec.js +21 -10
  24. package/dist/src/util/http/RequestSpec.js.map +1 -1
  25. package/opengate-api-npm.js +6 -0
  26. package/package.json +2 -2
  27. package/src/InternalOpenGateAPI.js +46 -2
  28. package/src/searching/AssetSearch.js +1 -1
  29. package/src/searching/BaseSearch.js +3 -3
  30. package/src/searching/DeviceSearch.js +1 -1
  31. package/src/searching/EntitySearch.js +1 -1
  32. package/src/searching/WPSearch.js +1 -1
  33. package/src/util/NorthAmpliaREST.js +87 -2
  34. package/src/util/http/RequestSpec.js +29 -10
  35. package/types/opengate-api-npm.d.ts +7 -1
  36. package/types/src/InternalOpenGateAPI.d.ts +103 -8
  37. package/types/src/util/NorthAmpliaREST.d.ts +25 -0
  38. package/dist/opengate-api-bower-16.2.0.js.map +0 -6
  39. package/dist/opengate-api-bower-16.2.0.min.js +0 -116
  40. package/dist/opengate-api-bower-16.2.0.min.js.map +0 -6
@@ -35,6 +35,10 @@ var import_InternalOpenGateAPI = __toESM(require("./src/InternalOpenGateAPI"));
35
35
  var import_NorthAmpliaREST = __toESM(require("./src/util/NorthAmpliaREST"));
36
36
  var import_SouthAmpliaREST = __toESM(require("./src/util/SouthAmpliaREST"));
37
37
  class OpenGateAPI extends import_InternalOpenGateAPI.default {
38
+ /**
39
+ * @param {import('./src/InternalOpenGateAPI').OpenGateOptions & Record<string, unknown>} _options - the client's
40
+ * configuration; see the README's Configuration section.
41
+ */
38
42
  constructor(_options) {
39
43
  super(
40
44
  new import_NorthAmpliaREST.default(_options, {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../opengate-api-npm.js"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,iCAAgC;AAChC,6BAA4B;AAC5B,6BAA4B;AAE5B,MAAO,oBAAkC,2BAAAA,QAAoB;AAAA,EACzD,YAAY,UAAU;AAClB;AAAA,MACI,IAAI,uBAAAC,QAAgB,UAAU;AAAA,QAC1B,gBAAgB;AAAA,MACpB,CAAC;AAAA,MACD,IAAI,uBAAAC,QAAgB,UAAU;AAAA,QAC1B,gBAAgB;AAAA,MACpB,CAAC;AAAA,MACD;AAAA,IACJ;AAAA,EACJ;AACJ;",
4
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,iCAAgC;AAChC,6BAA4B;AAC5B,6BAA4B;AAI5B,MAAO,oBAAkC,2BAAAA,QAAoB;AAAA;AAAA;AAAA;AAAA;AAAA,EAKzD,YAAY,UAAU;AAClB;AAAA,MACI,IAAI,uBAAAC,QAAgB,UAAU;AAAA,QAC1B,gBAAgB;AAAA,MACpB,CAAC;AAAA,MACD,IAAI,uBAAAC,QAAgB,UAAU;AAAA,QAC1B,gBAAgB;AAAA,MACpB,CAAC;AAAA,MACD;AAAA,IACJ;AAAA,EACJ;AACJ;",
5
5
  "names": ["InternalOpenGateAPI", "NorthAmpliaREST", "SouthAmpliaREST"]
6
6
  }
@@ -3298,7 +3298,7 @@ var BaseSearch = class _BaseSearch {
3298
3298
  execute() {
3299
3299
  var defered = q9.defer();
3300
3300
  var promise = defered.promise;
3301
- this._ogapi.Napi.post(
3301
+ this._ogapi.Napi._searchPost(
3302
3302
  this._resource,
3303
3303
  this._filter(),
3304
3304
  this._timeout,
@@ -3361,7 +3361,7 @@ var BaseSearch = class _BaseSearch {
3361
3361
  this._setExtraHeaders({
3362
3362
  Accept: "text/plain"
3363
3363
  });
3364
- this._ogapi.Napi.post(
3364
+ this._ogapi.Napi._searchPost(
3365
3365
  this._resource,
3366
3366
  filter,
3367
3367
  this._timeout,
@@ -3413,7 +3413,7 @@ var BaseSearch = class _BaseSearch {
3413
3413
  statusCode: 403
3414
3414
  });
3415
3415
  } else {
3416
- _this._ogapi.Napi.post(
3416
+ _this._ogapi.Napi._searchPost(
3417
3417
  _this._resource,
3418
3418
  filter,
3419
3419
  _this._timeout,
@@ -4939,7 +4939,7 @@ var WPSearch = class extends BaseSearch {
4939
4939
  statusCode: 403
4940
4940
  });
4941
4941
  } else {
4942
- _this._ogapi.Napi.post(_this._resource, filter, _this._timeout, _this._getExtraHeaders(), _this._getUrlParameters()).then((response) => {
4942
+ _this._ogapi.Napi._searchPost(_this._resource, filter, _this._timeout, _this._getExtraHeaders(), _this._getUrlParameters()).then((response) => {
4943
4943
  let statusCode = response.statusCode;
4944
4944
  let body = response.body;
4945
4945
  if (!body && response.text) {
@@ -8242,7 +8242,7 @@ var DeviceSearch = class extends Search {
8242
8242
  var defered = q25.defer();
8243
8243
  var promise = defered.promise;
8244
8244
  var parameters = this._getUrlParameters();
8245
- this._ogapi.Napi.post(this._resource, this._filter(), this._timeout, this._getExtraHeaders(), parameters).then((response) => {
8245
+ this._ogapi.Napi._searchPost(this._resource, this._filter(), this._timeout, this._getExtraHeaders(), parameters).then((response) => {
8246
8246
  let resultQuery = response.body;
8247
8247
  let statusCode = response.statusCode;
8248
8248
  if (statusCode === 200 && resultQuery.entities) {
@@ -8582,7 +8582,7 @@ var AssetSearch = class extends Search {
8582
8582
  var defered = q26.defer();
8583
8583
  var promise = defered.promise;
8584
8584
  var parameters = this._getUrlParameters();
8585
- this._ogapi.Napi.post(this._resource, this._filter(), this._timeout, this._getExtraHeaders(), parameters).then((response) => {
8585
+ this._ogapi.Napi._searchPost(this._resource, this._filter(), this._timeout, this._getExtraHeaders(), parameters).then((response) => {
8586
8586
  let resultQuery = response.body;
8587
8587
  let statusCode = response.statusCode;
8588
8588
  if (statusCode === 200) {
@@ -18403,7 +18403,7 @@ var EntitySearch = class extends Search {
18403
18403
  var defered = q40.defer();
18404
18404
  var promise = defered.promise;
18405
18405
  var parameters = this._getUrlParameters();
18406
- this._ogapi.Napi.post(this._resource, this._filter(), this._timeout, this._getExtraHeaders(), parameters).then((response) => {
18406
+ this._ogapi.Napi._searchPost(this._resource, this._filter(), this._timeout, this._getExtraHeaders(), parameters).then((response) => {
18407
18407
  let resultQuery = response.body;
18408
18408
  let statusCode = response.statusCode;
18409
18409
  if (statusCode === 200 && resultQuery.entities && resultQuery.entities.length > 0) {
@@ -19700,6 +19700,15 @@ function respond(route, request) {
19700
19700
  }
19701
19701
 
19702
19702
  // src/util/http/RequestSpec.js
19703
+ function transportError(message, reason) {
19704
+ const error = new Error(message);
19705
+ error.reason = reason;
19706
+ if (reason === "timeout") {
19707
+ error.timeout = true;
19708
+ error.code = "ECONNABORTED";
19709
+ }
19710
+ return error;
19711
+ }
19703
19712
  var beforeStart;
19704
19713
  function setBeforeStart(callback) {
19705
19714
  beforeStart = callback;
@@ -19985,7 +19994,7 @@ var RequestSpec = class {
19985
19994
  this.aborted = true;
19986
19995
  this.clearTimeout();
19987
19996
  if (this._xhr) this._xhr.abort();
19988
- else if (this._controller) this._controller.abort(new Error("Request aborted"));
19997
+ else if (this._controller) this._controller.abort(transportError("Request aborted", "aborted"));
19989
19998
  this.emit("abort");
19990
19999
  return this;
19991
20000
  }
@@ -20279,7 +20288,7 @@ var RequestSpec = class {
20279
20288
  }
20280
20289
  _execute() {
20281
20290
  return __async(this, null, function* () {
20282
- if (this.aborted) throw new Error("Request aborted");
20291
+ if (this.aborted) throw transportError("Request aborted", "aborted");
20283
20292
  const mocked = match(this.method, this.url);
20284
20293
  if (mocked) {
20285
20294
  const lowerCased = {};
@@ -20373,9 +20382,7 @@ var RequestSpec = class {
20373
20382
  let expire;
20374
20383
  const promise = new Promise((resolve, reject) => {
20375
20384
  expire = (message) => {
20376
- const error = new Error(message);
20377
- error.timeout = true;
20378
- error.code = "ECONNABORTED";
20385
+ const error = transportError(message, "timeout");
20379
20386
  this.timedout = true;
20380
20387
  if (this._xhr) this._xhr.abort();
20381
20388
  else if (this._controller) this._controller.abort(error);
@@ -20397,7 +20404,11 @@ var RequestSpec = class {
20397
20404
  if (duplex) init.duplex = duplex;
20398
20405
  if (controller) init.signal = controller.signal;
20399
20406
  if (this._withCredentials) init.credentials = "include";
20400
- const raw = yield Promise.race([fetch(this.url, init), expiry.promise]);
20407
+ const sent = fetch(this.url, init).catch((error) => {
20408
+ if (error && typeof error === "object" && !error.reason) error.reason = "network";
20409
+ throw error;
20410
+ });
20411
+ const raw = yield Promise.race([sent, expiry.promise]);
20401
20412
  if (this._responseTimer) {
20402
20413
  clearTimeout(this._responseTimer);
20403
20414
  this._responseTimer = null;
@@ -20439,7 +20450,7 @@ var RequestSpec = class {
20439
20450
  const xhr = new XMLHttpRequest();
20440
20451
  this._xhr = xhr;
20441
20452
  if (this.aborted) {
20442
- reject(new Error("Request aborted"));
20453
+ reject(transportError("Request aborted", "aborted"));
20443
20454
  return;
20444
20455
  }
20445
20456
  const expiry = this._expiry();
@@ -20483,9 +20494,9 @@ var RequestSpec = class {
20483
20494
  if (!this._isResponseOK(response)) reject(toError(response));
20484
20495
  else resolve(response);
20485
20496
  };
20486
- xhr.onerror = () => reject(new Error("Network error"));
20487
- xhr.ontimeout = () => reject(new Error("Timeout of " + this._timeout + "ms exceeded"));
20488
- xhr.onabort = () => reject(new Error("Request aborted"));
20497
+ xhr.onerror = () => reject(transportError("Network error", "network"));
20498
+ xhr.ontimeout = () => reject(transportError("Timeout of " + this._timeout + "ms exceeded", "timeout"));
20499
+ xhr.onabort = () => reject(transportError("Request aborted", "aborted"));
20489
20500
  xhr.send(body === void 0 ? null : body);
20490
20501
  });
20491
20502
  }
@@ -23884,8 +23895,9 @@ var registerBeforeStartHook = setBeforeStart;
23884
23895
  var InternalOpenGateAPI = class _InternalOpenGateAPI {
23885
23896
  /**
23886
23897
  * Constructor
23887
- * @param {{ url: string,port: string,version: string,apiKey: string}} _options - this is configuration about Opengate North API.
23888
- * @param {AmpliaREST} ampliaREST - this is a backend selected to manage a request to Opengate North API.
23898
+ * @param {object} northAmpliaREST - the client that sends requests to the North API.
23899
+ * @param {object} southAmpliaREST - the client that sends requests to the South API.
23900
+ * @param {OpenGateOptions & Record<string, unknown>} _options - the client's configuration.
23889
23901
  */
23890
23902
  constructor(northAmpliaREST, southAmpliaREST, _options) {
23891
23903
  if (this.constructor === _InternalOpenGateAPI) {
@@ -23903,6 +23915,7 @@ var InternalOpenGateAPI = class _InternalOpenGateAPI {
23903
23915
  if (_options.hooks && _options.hooks.beforeStart && typeof _options.hooks.beforeStart === "function") {
23904
23916
  registerBeforeStartHook(_options.hooks.beforeStart);
23905
23917
  }
23918
+ Object.defineProperty(this, "_options", { value: Object.freeze(__spreadValues({}, _options)) });
23906
23919
  this.Napi = northAmpliaREST;
23907
23920
  this.Sapi = southAmpliaREST;
23908
23921
  this.EX = Expression;
@@ -23911,6 +23924,26 @@ var InternalOpenGateAPI = class _InternalOpenGateAPI {
23911
23924
  this.alarms = new AlarmActions(this);
23912
23925
  this.entityBuilder = new EntityBuilder(this);
23913
23926
  }
23927
+ /**
23928
+ * A new client with this one's options, and the given ones on top. The merge is shallow: an
23929
+ * override of `south` replaces the whole object.
23930
+ *
23931
+ * A clone of a read-only client is read-only too, and asking for `readOnly: false` throws: code
23932
+ * handed a read-only client cannot widen it this way. `logger` and `hooks` are process-wide, so
23933
+ * overriding them in a clone changes them for every client.
23934
+ * @example
23935
+ * const widgetApi = ogapi.clone({ readOnly: true });
23936
+ * @param {Partial<OpenGateOptions> & Record<string, unknown>} [overrides] - the options to change.
23937
+ * @return {this}
23938
+ */
23939
+ clone(overrides = {}) {
23940
+ if (this._options.readOnly && "readOnly" in overrides && !overrides.readOnly) {
23941
+ throw new Error("OGAPI: a clone of a read-only client is read-only too");
23942
+ }
23943
+ const options = __spreadValues(__spreadValues({}, this._options), overrides);
23944
+ if (this._options.readOnly) options.readOnly = true;
23945
+ return new this.constructor(options);
23946
+ }
23914
23947
  /**
23915
23948
  * This returns a util to find a user
23916
23949
  * @return {UserFinder}
@@ -25030,6 +25063,8 @@ var NorthAmpliaREST = class {
25030
25063
  * @return {Promise}
25031
25064
  */
25032
25065
  get(url, timeout, headers, parameters, asBlob, serviceBaseURL) {
25066
+ const rejected = this._guard("GET", url, serviceBaseURL);
25067
+ if (rejected) return rejected;
25033
25068
  const _url = this._createUrl(url, parameters, serviceBaseURL);
25034
25069
  logger_default.info("GET", _url);
25035
25070
  var req = new RequestSpec("GET", _url);
@@ -25046,6 +25081,8 @@ var NorthAmpliaREST = class {
25046
25081
  * @return {Promise}
25047
25082
  */
25048
25083
  patch(url, data, timeout, headers, parameters, serviceBaseURL) {
25084
+ const rejected = this._guard("PATCH", url, serviceBaseURL);
25085
+ if (rejected) return rejected;
25049
25086
  const _url = this._createUrl(url, parameters, serviceBaseURL);
25050
25087
  logger_default.info("PATCH", _url);
25051
25088
  var req = new RequestSpec("PATCH", _url).send(data);
@@ -25062,6 +25099,8 @@ var NorthAmpliaREST = class {
25062
25099
  * @return {Promise}
25063
25100
  */
25064
25101
  post(url, data, timeout, headers, parameters, serviceBaseURL) {
25102
+ const rejected = this._guard("POST", url, serviceBaseURL);
25103
+ if (rejected) return rejected;
25065
25104
  const _url = this._createUrl(url, parameters, serviceBaseURL);
25066
25105
  logger_default.info("POST", _url);
25067
25106
  var req = new RequestSpec("POST", _url).send(data);
@@ -25079,6 +25118,8 @@ var NorthAmpliaREST = class {
25079
25118
  * @return {Promise}
25080
25119
  */
25081
25120
  post_multipart(url, formData, events, timeout, headers, parameters, serviceBaseURL) {
25121
+ const rejected = this._guard("POST", url, serviceBaseURL);
25122
+ if (rejected) return rejected;
25082
25123
  const _url = this._createUrl(url, parameters, serviceBaseURL);
25083
25124
  logger_default.info("POST_MULTIPART", _url);
25084
25125
  let req = new RequestSpec("POST", _url);
@@ -25096,6 +25137,8 @@ var NorthAmpliaREST = class {
25096
25137
  * @return {Promise}
25097
25138
  */
25098
25139
  put(url, data, timeout, headers, parameters, serviceBaseURL) {
25140
+ const rejected = this._guard("PUT", url, serviceBaseURL);
25141
+ if (rejected) return rejected;
25099
25142
  const _url = this._createUrl(url, parameters, serviceBaseURL);
25100
25143
  logger_default.info("PUT", _url);
25101
25144
  var req = new RequestSpec("PUT", _url).send(data);
@@ -25120,6 +25163,8 @@ var NorthAmpliaREST = class {
25120
25163
  * @return {Promise}
25121
25164
  */
25122
25165
  put_multipart(url, formData, events, timeout, headers, parameters, serviceBaseURL) {
25166
+ const rejected = this._guard("PUT", url, serviceBaseURL);
25167
+ if (rejected) return rejected;
25123
25168
  const _url = this._createUrl(url, parameters, serviceBaseURL);
25124
25169
  logger_default.info("PUT_MULTIPART", _url);
25125
25170
  let req = new RequestSpec("PUT", _url);
@@ -25193,6 +25238,8 @@ var NorthAmpliaREST = class {
25193
25238
  * @return {Promise}
25194
25239
  */
25195
25240
  delete(url, timeout, headers, parameters, body, serviceBaseURL) {
25241
+ const rejected = this._guard("DELETE", url, serviceBaseURL);
25242
+ if (rejected) return rejected;
25196
25243
  const _url = this._createUrl(url, parameters, serviceBaseURL);
25197
25244
  logger_default.info("DELETE", _url);
25198
25245
  var req;
@@ -25230,6 +25277,62 @@ var NorthAmpliaREST = class {
25230
25277
  });
25231
25278
  return this._url(this._options) + "/" + this._getDefaultBaseURL(serviceBaseURL) + "/" + encode.join("/");
25232
25279
  }
25280
+ /**
25281
+ * POST for a search, which reads. The search layer calls this instead of `post` so that a
25282
+ * read-only client lets it through; the mark lasts only for the synchronous guard inside `post`.
25283
+ * @return {Promise}
25284
+ */
25285
+ _searchPost(url, data, timeout, headers, parameters, serviceBaseURL) {
25286
+ this._searchIntent = true;
25287
+ try {
25288
+ return this.post(url, data, timeout, headers, parameters, serviceBaseURL);
25289
+ } finally {
25290
+ this._searchIntent = false;
25291
+ }
25292
+ }
25293
+ /** @return {Promise|null} a rejection to return before sending, or null to go ahead. */
25294
+ _guard(method, url, serviceBaseURL) {
25295
+ return this._rejectDuplicatedBase(url, serviceBaseURL) || this._rejectWrite(method, url);
25296
+ }
25297
+ /**
25298
+ * With `readOnly`, everything but GET and search POSTs is refused before it leaves: the search
25299
+ * builders, and a free `post` to a `search/...` path. It guards against mistakes, not against
25300
+ * code that holds the client and means harm -- `_searchPost` and `fetch` are one call away. The
25301
+ * server, or a proxy in front of it, remains the boundary.
25302
+ * @return {Promise|null}
25303
+ */
25304
+ _rejectWrite(method, url) {
25305
+ if (!this._options.readOnly || method === "GET") return null;
25306
+ const isSearch = this._searchIntent || typeof url === "string" && /^\/*search\//.test(url);
25307
+ if (method === "POST" && isSearch) return null;
25308
+ const message = "OGAPI: read-only client refused " + method + " " + url;
25309
+ return q50.reject({
25310
+ statusCode: 403,
25311
+ data: { errors: [{ code: 403, message }] },
25312
+ reason: "read-only",
25313
+ cause: new Error(message)
25314
+ });
25315
+ }
25316
+ /**
25317
+ * The default base (`north/v80`, or `v80` on South) is prepended to every path, so a path that
25318
+ * repeats it, such as `/north/v80/provision/...`, used to reach `north/v80//north/v80/...` and
25319
+ * fail with a misleading error. Such a call never worked, so refusing it breaks nothing. A
25320
+ * caller-given `serviceBaseURL` is left alone: its paths are its own business.
25321
+ * @return {Promise|null} a rejection to return, or null when the path is fine.
25322
+ */
25323
+ _rejectDuplicatedBase(url, serviceBaseURL) {
25324
+ if (serviceBaseURL || typeof url !== "string") return null;
25325
+ const base = this._getDefaultBaseURL();
25326
+ const firstSegment = base.split("/")[0];
25327
+ if (url.replace(/^\/+/, "").split("/")[0] !== firstSegment) return null;
25328
+ const message = 'OGAPI: the path "' + url + '" already starts with "' + firstSegment + '/", but "' + base + '/" is prepended to every path. Pass the path relative to it, or give a serviceBaseURL.';
25329
+ return q50.reject({
25330
+ statusCode: 400,
25331
+ data: { errors: [{ code: 400, message }] },
25332
+ reason: "invalid-path",
25333
+ cause: new Error(message)
25334
+ });
25335
+ }
25233
25336
  _getDefaultBaseURL(serviceBaseURL) {
25234
25337
  if (!serviceBaseURL) {
25235
25338
  if (this._isSouth) {
@@ -25297,11 +25400,16 @@ var NorthAmpliaREST = class {
25297
25400
  status = 408;
25298
25401
  }
25299
25402
  }
25300
- defered.reject({
25403
+ const rejection = {
25301
25404
  statusCode: status,
25302
25405
  data,
25303
25406
  headers: headers2
25304
- });
25407
+ };
25408
+ if (typeof err.response === "undefined") {
25409
+ rejection.reason = err.reason || "unknown";
25410
+ rejection.cause = err;
25411
+ }
25412
+ defered.reject(rejection);
25305
25413
  } else {
25306
25414
  defered.resolve(res);
25307
25415
  }
@@ -25326,6 +25434,10 @@ var SouthAmpliaREST = class extends NorthAmpliaREST {
25326
25434
 
25327
25435
  // opengate-api-npm.js
25328
25436
  var OpenGateAPI = class extends InternalOpenGateAPI {
25437
+ /**
25438
+ * @param {import('./src/InternalOpenGateAPI').OpenGateOptions & Record<string, unknown>} _options - the client's
25439
+ * configuration; see the README's Configuration section.
25440
+ */
25329
25441
  constructor(_options) {
25330
25442
  super(
25331
25443
  new NorthAmpliaREST(_options, {