@skedulo/pulse-solution-services 0.0.11 → 0.0.13

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 (31) hide show
  1. package/CHANGELOG.md +7 -2
  2. package/README.md +47 -3
  3. package/dist/clients/artifact-client.js +1 -1
  4. package/dist/clients/availability-api-client.js +1 -1
  5. package/dist/clients/base-client.js +1 -1
  6. package/dist/clients/config-features-client.js +1 -1
  7. package/dist/clients/config-template-client.js +1 -1
  8. package/dist/clients/config-var-client.js +1 -1
  9. package/dist/clients/files-api-client.js +1 -0
  10. package/dist/clients/geo-api-client.js +1 -1
  11. package/dist/clients/graphql-client.js +1 -1
  12. package/dist/clients/index.js +1 -1
  13. package/dist/clients/metadata-client.js +1 -1
  14. package/dist/clients/mobile-notification-client.js +1 -1
  15. package/dist/clients/org-preference-client.js +1 -1
  16. package/dist/clients/vocabulary-client.js +1 -1
  17. package/dist/constants/tenant-endpoints.js +1 -1
  18. package/dist/core/execution-context.js +1 -1
  19. package/dist/index.d.ts +552 -530
  20. package/dist/interfaces/files.js +1 -0
  21. package/dist/interfaces/index.js +1 -1
  22. package/dist/monitoring/index.js +1 -0
  23. package/dist/services/index.js +1 -1
  24. package/dist/services/resource-availability/builder/resource-availability-service.d.ts +1 -1
  25. package/dist/services/resource-availability/validator/index.d.ts +1 -0
  26. package/dist/services/resource-availability/validator/index.js +1 -1
  27. package/dist/services/resource-availability/validator/resource-job-validation.d.ts +1 -1
  28. package/dist/services/resource-availability/validator/resource-validator.d.ts +1 -1
  29. package/dist/services/resource-availability/validator/validation-result.d.ts +1 -1
  30. package/package.json +6 -2
  31. package/yarn.lock +234 -8
package/CHANGELOG.md CHANGED
@@ -1,10 +1,15 @@
1
1
  # Changelog
2
2
 
3
- ## [v0.0.11] - 2025-02-17
3
+ ## [v0.0.12] - 2025-03-19
4
+ ### Updated
5
+ - Include `baseClient.performRequest` in execution limits calculation.
6
+ - Create a singleton instance for `ExecutionContext`.
7
+
8
+ ## [v0.0.11] - 2025-03-17
4
9
  ### Added
5
10
  - Execution Limits
6
11
 
7
- ## [v0.0.10] - 2025-02-03
12
+ ## [v0.0.10] - 2025-03-03
8
13
  ### Changed
9
14
  - Minor changes
10
15
 
package/README.md CHANGED
@@ -4,6 +4,7 @@
4
4
  - [Installation](#installation)
5
5
  - [Quick Start](#quick-start)
6
6
  - [Initialize Execution Context](#initialize-execution-context)
7
+ - [Execution Limits](#execution-limits)
7
8
  - [API Clients](#api-clients)
8
9
  - [Metadata Client](#metadata-client)
9
10
  - [Vocabulary Client](#vocabulary-client)
@@ -14,6 +15,7 @@
14
15
  - [Mobile Notification Client](#mobile-notification-client)
15
16
  - [Configuration Templates](#configuration-templates)
16
17
  - [Geo API Client](#geo-api-client)
18
+ - [Files API Client](#files-api-client)
17
19
  - [Artifact Client](#artifact-client)
18
20
  - [GraphQL Service](#graphql-service)
19
21
  - [Query Data](#query-data)
@@ -121,9 +123,34 @@ const context = ExecutionContext.fromContext(skedContext, {
121
123
  limits
122
124
  });
123
125
  ```
126
+ ### Config Helper
127
+ Retrieves the values of configuration variables defined within a function. To use this helper, the execution context must be initialized from `skedContext`.
128
+ ```javascript
129
+ const secretValue = context.configHelper.getString('SECRET_NAME');
130
+ ```
131
+ In addition to `getString()`, other available methods include `getNumber()` and `getJson()`.
124
132
 
125
133
  ### API Clients
126
134
 
135
+ #### Base API Client
136
+ Handles requests to any Skedulo API that does not have a dedicated API client implementation.
137
+
138
+ **GET request**
139
+ ```javascript
140
+ context.baseClient.performRequest({
141
+ endpoint: `files/avatar?user_ids=<id1>,<id2>`,
142
+ });
143
+ ```
144
+
145
+ **POST request**
146
+ ```javascript
147
+ context.baseClient.performRequest({
148
+ method: "POST",
149
+ endpoint: `function/hello-func/hello-func/ping`,
150
+ body: { message: "Hello" }
151
+ });
152
+ ```
153
+
127
154
  #### Metadata Client
128
155
  Fetches metadata from `/metadata` endpoints.
129
156
  ```javascript
@@ -176,7 +203,7 @@ await context.configVarClient.create({
176
203
  description: "TEST_DESCRIPTION",
177
204
  });
178
205
 
179
- // Gets a config var
206
+ // Gets a plain-text config var
180
207
  const config = await context.configVarClient.get('TEST_KEY');
181
208
 
182
209
  // Deletes a config var
@@ -380,6 +407,23 @@ console.log(availability[0].entries);
380
407
 
381
408
  ```
382
409
 
410
+ #### Files API Client
411
+ **Get avatars**
412
+ ```javascript
413
+ // Calls /files/avatar to get a map of (userId -> url) for the given userIds
414
+ const params: GetAvatarParams = {
415
+ userIds: ["<user1>", "<user2>"],
416
+ sizeHint: "small", // Optional - small, thumbnail or full image otherwise
417
+ };
418
+ const result = await context.filesAPIClient.getAvatar(params);
419
+ ```
420
+
421
+ **Get attachments**
422
+ ```javascript
423
+ // Calls /files/attachments/{parentId} to attachments that belong to the parent
424
+ const attachments = await context.filesAPIClient.getAttachments(parentId);
425
+ ```
426
+
383
427
  #### Artifact Client
384
428
  The `ArtifactClient` provides a unified way to manage various artifact types.
385
429
  ```javascript
@@ -448,9 +492,9 @@ await client.delete(
448
492
 
449
493
  #### Query data
450
494
  ```javascript
451
- // Create a query builder for the Resources object
495
+ // Create a query builder for the Jobs object
452
496
  const queryBuilder = context.newQueryBuilder({
453
- objectName: 'Resources',
497
+ objectName: 'Jobs',
454
498
  operationName: 'fetchJobWithJobAllocations',
455
499
  readOnly: true
456
500
  });
@@ -1 +1 @@
1
- "use strict";var __decorate=this&&this.__decorate||function(t,e,n,i){var a,o=arguments.length,r=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(r=(o<3?a(r):o>3?a(e,n,r):a(e,n))||r);return o>3&&r&&Object.defineProperty(e,n,r),r},__metadata=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},__awaiter=this&&this.__awaiter||function(t,e,n,i){return new(n||(n=Promise))((function(a,o){function r(t){try{c(i.next(t))}catch(t){o(t)}}function s(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?a(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(r,s)}c((i=i.apply(t,e||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ArtifactClient=void 0;const constants_1=require("../constants"),monitor_call_1=require("../monitoring/decorators/monitor-call"),base_client_1=require("./base-client");class ArtifactClient extends base_client_1.BaseClient{constructor(t,e,n={}){super(t,n),this.artifactType=e,this.baseEndpoint=`artifacts/${this.artifactType}`}list(){return __awaiter(this,void 0,void 0,(function*(){return this.performRequest({endpoint:this.baseEndpoint})}))}get(){return __awaiter(this,arguments,void 0,(function*(t={}){return this.performRequest({endpoint:this.buildEndpoint(t)})}))}create(t,e){return __awaiter(this,void 0,void 0,(function*(){return this.performRequest({method:constants_1.HttpMethod.POST,endpoint:this.buildEndpoint(t),body:e})}))}update(t,e){return __awaiter(this,void 0,void 0,(function*(){return this.performRequest({method:constants_1.HttpMethod.PUT,endpoint:this.buildEndpoint(t),body:e})}))}delete(t){return __awaiter(this,void 0,void 0,(function*(){yield this.performRequest({method:constants_1.HttpMethod.DELETE,endpoint:this.buildEndpoint(t)})}))}buildEndpoint(t){const{objectName:e,viewTypeName:n,name:i,scope:a}=t;let o=this.baseEndpoint;return e&&(o+=`/${e}`),n&&(o+=`/${n}`),i&&(o+=`/${i}`),a&&(o+=`/${a}`),o}}exports.ArtifactClient=ArtifactClient,__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",Promise)],ArtifactClient.prototype,"list",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],ArtifactClient.prototype,"get",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object,Object]),__metadata("design:returntype",Promise)],ArtifactClient.prototype,"create",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object,Object]),__metadata("design:returntype",Promise)],ArtifactClient.prototype,"update",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],ArtifactClient.prototype,"delete",null);
1
+ "use strict";var __decorate=this&&this.__decorate||function(t,e,n,i){var a,o=arguments.length,r=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(r=(o<3?a(r):o>3?a(e,n,r):a(e,n))||r);return o>3&&r&&Object.defineProperty(e,n,r),r},__metadata=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},__awaiter=this&&this.__awaiter||function(t,e,n,i){return new(n||(n=Promise))((function(a,o){function r(t){try{c(i.next(t))}catch(t){o(t)}}function s(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?a(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(r,s)}c((i=i.apply(t,e||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ArtifactClient=void 0;const constants_1=require("../constants"),monitor_call_1=require("../monitoring/decorators/monitor-call"),base_client_1=require("./base-client");class ArtifactClient extends base_client_1.BaseClient{constructor(t,e,n={}){super(t,n),this.artifactType=e,this.baseEndpoint=`artifacts/${this.artifactType}`}list(){return __awaiter(this,void 0,void 0,(function*(){return this._performRequest({endpoint:this.baseEndpoint})}))}get(){return __awaiter(this,arguments,void 0,(function*(t={}){return this._performRequest({endpoint:this.buildEndpoint(t)})}))}create(t,e){return __awaiter(this,void 0,void 0,(function*(){return this._performRequest({method:constants_1.HttpMethod.POST,endpoint:this.buildEndpoint(t),body:e})}))}update(t,e){return __awaiter(this,void 0,void 0,(function*(){return this._performRequest({method:constants_1.HttpMethod.PUT,endpoint:this.buildEndpoint(t),body:e})}))}delete(t){return __awaiter(this,void 0,void 0,(function*(){yield this._performRequest({method:constants_1.HttpMethod.DELETE,endpoint:this.buildEndpoint(t)})}))}buildEndpoint(t){const{objectName:e,viewTypeName:n,name:i,scope:a}=t;let o=this.baseEndpoint;return e&&(o+=`/${e}`),n&&(o+=`/${n}`),i&&(o+=`/${i}`),a&&(o+=`/${a}`),o}}exports.ArtifactClient=ArtifactClient,__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",Promise)],ArtifactClient.prototype,"list",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],ArtifactClient.prototype,"get",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object,Object]),__metadata("design:returntype",Promise)],ArtifactClient.prototype,"create",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object,Object]),__metadata("design:returntype",Promise)],ArtifactClient.prototype,"update",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],ArtifactClient.prototype,"delete",null);
@@ -1 +1 @@
1
- "use strict";var __decorate=this&&this.__decorate||function(e,t,i,n){var r,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,n);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(a<3?r(o):a>3?r(t,i,o):r(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o},__metadata=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(r,a){function o(e){try{s(n.next(e))}catch(e){a(e)}}function l(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,l)}s((n=n.apply(e,t||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.AvailabilityAPIClient=void 0;const constants_1=require("../constants"),monitor_call_1=require("../monitoring/decorators/monitor-call"),base_client_1=require("./base-client");class AvailabilityAPIClient extends base_client_1.BaseClient{fetchAvailability(e){return __awaiter(this,void 0,void 0,(function*(){var t,i,n,r;if(!e.resourceIds.length)throw new Error("At least one resource ID must be provided.");const a={resource_ids:e.resourceIds.join(","),start:e.start,end:e.end,mergedAvailabilities:null!==(i=null===(t=e.mergedAvailabilities)||void 0===t?void 0:t.toString())&&void 0!==i?i:"false",entries:null!==(r=null===(n=e.entries)||void 0===n?void 0:n.toString())&&void 0!==r?r:"true"};return yield this.performRequest({endpoint:constants_1.TENANT_ENDPOINTS.AVAILABILITY.SIMPLE,queryParams:a})}))}}exports.AvailabilityAPIClient=AvailabilityAPIClient,__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],AvailabilityAPIClient.prototype,"fetchAvailability",null);
1
+ "use strict";var __decorate=this&&this.__decorate||function(e,t,i,n){var r,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,n);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(a<3?r(o):a>3?r(t,i,o):r(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o},__metadata=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(r,a){function o(e){try{s(n.next(e))}catch(e){a(e)}}function l(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,l)}s((n=n.apply(e,t||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.AvailabilityAPIClient=void 0;const constants_1=require("../constants"),monitor_call_1=require("../monitoring/decorators/monitor-call"),base_client_1=require("./base-client");class AvailabilityAPIClient extends base_client_1.BaseClient{fetchAvailability(e){return __awaiter(this,void 0,void 0,(function*(){var t,i,n,r;if(!e.resourceIds.length)throw new Error("At least one resource ID must be provided.");const a={resource_ids:e.resourceIds.join(","),start:e.start,end:e.end,mergedAvailabilities:null!==(i=null===(t=e.mergedAvailabilities)||void 0===t?void 0:t.toString())&&void 0!==i?i:"false",entries:null!==(r=null===(n=e.entries)||void 0===n?void 0:n.toString())&&void 0!==r?r:"true"};return yield this._performRequest({endpoint:constants_1.TENANT_ENDPOINTS.AVAILABILITY.SIMPLE,queryParams:a})}))}}exports.AvailabilityAPIClient=AvailabilityAPIClient,__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],AvailabilityAPIClient.prototype,"fetchAvailability",null);
@@ -1 +1 @@
1
- "use strict";var __decorate=this&&this.__decorate||function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s},__metadata=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.BaseClient=void 0;const request_header_constants_1=require("../core/request-header-constants"),logging_1=require("../logging");class BaseClient{constructor(e,t={}){this.config=e,this.executionOptions=t}performRequest(e){return __awaiter(this,arguments,void 0,(function*({method:e="GET",endpoint:t,headers:n={},body:r,queryParams:o},i=this.executionOptions){try{const s=Object.assign(Object.assign({},this.getHeaders(i)),n),a=this.buildUrl(t,o),c=yield fetch(a,{method:e,headers:s,body:r&&"GET"!==e?JSON.stringify(r):void 0});let u;const d=c.headers.get("content-type");if(d&&d.includes("application/json")?(u=yield c.json(),u.result&&(u=u.result)):u=yield c.text(),!c.ok)throw new Error(`HTTP error! Status: ${c.status}. Response: ${JSON.stringify(u)}`);return this.handleResponseData(u),u}catch(e){throw this.handleException(e),e}}))}handleResponseData(e){}getHeaders(e){var t,n;const r={Authorization:`Bearer ${this.config.apiToken}`,"Content-Type":"application/json"},o=e.requestSource||(null===(t=this.executionOptions)||void 0===t?void 0:t.requestSource),i=e.userAgent||(null===(n=this.executionOptions)||void 0===n?void 0:n.userAgent);return o&&(r[request_header_constants_1.REQUEST_HEADERS.X_SKEDULO_SOURCE]=o),i&&(r[request_header_constants_1.REQUEST_HEADERS.USER_AGENT]=i),r}buildUrl(e,t){const n=e.startsWith("http")?new URL(e):new URL(`${this.config.apiServer}/${e}`);return t&&Object.entries(t).forEach((([e,t])=>{n.searchParams.append(e,t)})),n.toString()}handleException(e){}}exports.BaseClient=BaseClient,__decorate([(0,logging_1.LogMethod)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object,Object]),__metadata("design:returntype",Promise)],BaseClient.prototype,"performRequest",null);
1
+ "use strict";var __decorate=this&&this.__decorate||function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s},__metadata=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.BaseClient=void 0;const request_header_constants_1=require("../core/request-header-constants"),logging_1=require("../logging"),monitor_call_1=require("../monitoring/decorators/monitor-call");class BaseClient{constructor(e,t={}){this.config=e,this.executionOptions=t}performRequest(e){return __awaiter(this,arguments,void 0,(function*({method:e="GET",endpoint:t,headers:n={},body:r,queryParams:o},i=this.executionOptions){return this._performRequest({method:e,endpoint:t,headers:n,body:r,queryParams:o},i)}))}_performRequest(e){return __awaiter(this,arguments,void 0,(function*({method:e="GET",endpoint:t,headers:n={},body:r,queryParams:o},i=this.executionOptions){try{const s=Object.assign(Object.assign({},this.getHeaders(i)),n),a=this.buildUrl(t,o),c=yield fetch(a,{method:e,headers:s,body:r&&"GET"!==e?JSON.stringify(r):void 0});let u;const d=c.headers.get("content-type");if(d&&d.includes("application/json")?(u=yield c.json(),u.result&&(u=u.result)):u=yield c.text(),!c.ok)throw new Error(`HTTP error! Status: ${c.status}. Response: ${JSON.stringify(u)}`);return this.handleResponseData(u),u}catch(e){throw this.handleException(e),e}}))}handleResponseData(e){}getHeaders(e){var t,n;const r={Authorization:`Bearer ${this.config.apiToken}`,"Content-Type":"application/json"},o=e.requestSource||(null===(t=this.executionOptions)||void 0===t?void 0:t.requestSource),i=e.userAgent||(null===(n=this.executionOptions)||void 0===n?void 0:n.userAgent);return o&&(r[request_header_constants_1.REQUEST_HEADERS.X_SKEDULO_SOURCE]=o),i&&(r[request_header_constants_1.REQUEST_HEADERS.USER_AGENT]=i),r}buildUrl(e,t){const n=e.startsWith("http")?new URL(e):new URL(`${this.config.apiServer}/${e}`);return t&&Object.entries(t).forEach((([e,t])=>{n.searchParams.append(e,t)})),n.toString()}handleException(e){}}exports.BaseClient=BaseClient,__decorate([(0,logging_1.LogMethod)(),(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object,Object]),__metadata("design:returntype",Promise)],BaseClient.prototype,"performRequest",null);
@@ -1 +1 @@
1
- "use strict";var __decorate=this&&this.__decorate||function(t,e,n,o){var a,i=arguments.length,r=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(r=(i<3?a(r):i>3?a(e,n,r):a(e,n))||r);return i>3&&r&&Object.defineProperty(e,n,r),r},__metadata=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},__awaiter=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(a,i){function r(t){try{c(o.next(t))}catch(t){i(t)}}function s(t){try{c(o.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?a(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(r,s)}c((o=o.apply(t,e||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ConfigFeaturesClient=void 0;const constants_1=require("../constants"),monitor_call_1=require("../monitoring/decorators/monitor-call"),base_client_1=require("./base-client");class ConfigFeaturesClient extends base_client_1.BaseClient{get(){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({endpoint:constants_1.TENANT_ENDPOINTS.CONFIG_FEATURES.GET})}))}update(t,e){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({method:constants_1.HttpMethod.POST,headers:{Authorization:`Bearer ${this.config.internalApiToken}`,"Content-Type":"application/json"},endpoint:constants_1.TENANT_ENDPOINTS.CONFIG_FEATURES.UPDATE(t),body:e})}))}}exports.ConfigFeaturesClient=ConfigFeaturesClient,__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",Promise)],ConfigFeaturesClient.prototype,"get",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String,Object]),__metadata("design:returntype",Promise)],ConfigFeaturesClient.prototype,"update",null);
1
+ "use strict";var __decorate=this&&this.__decorate||function(t,e,n,o){var a,i=arguments.length,r=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(r=(i<3?a(r):i>3?a(e,n,r):a(e,n))||r);return i>3&&r&&Object.defineProperty(e,n,r),r},__metadata=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},__awaiter=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(a,i){function r(t){try{c(o.next(t))}catch(t){i(t)}}function s(t){try{c(o.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?a(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(r,s)}c((o=o.apply(t,e||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ConfigFeaturesClient=void 0;const constants_1=require("../constants"),monitor_call_1=require("../monitoring/decorators/monitor-call"),base_client_1=require("./base-client");class ConfigFeaturesClient extends base_client_1.BaseClient{get(){return __awaiter(this,void 0,void 0,(function*(){return yield this._performRequest({endpoint:constants_1.TENANT_ENDPOINTS.CONFIG_FEATURES.GET})}))}update(t,e){return __awaiter(this,void 0,void 0,(function*(){return yield this._performRequest({method:constants_1.HttpMethod.POST,headers:{Authorization:`Bearer ${this.config.internalApiToken}`,"Content-Type":"application/json"},endpoint:constants_1.TENANT_ENDPOINTS.CONFIG_FEATURES.UPDATE(t),body:e})}))}}exports.ConfigFeaturesClient=ConfigFeaturesClient,__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",Promise)],ConfigFeaturesClient.prototype,"get",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String,Object]),__metadata("design:returntype",Promise)],ConfigFeaturesClient.prototype,"update",null);
@@ -1 +1 @@
1
- "use strict";var __decorate=this&&this.__decorate||function(t,e,n,a){var o,i=arguments.length,r=i<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,n):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,a);else for(var _=t.length-1;_>=0;_--)(o=t[_])&&(r=(i<3?o(r):i>3?o(e,n,r):o(e,n))||r);return i>3&&r&&Object.defineProperty(e,n,r),r},__metadata=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},__awaiter=this&&this.__awaiter||function(t,e,n,a){return new(n||(n=Promise))((function(o,i){function r(t){try{s(a.next(t))}catch(t){i(t)}}function _(t){try{s(a.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(r,_)}s((a=a.apply(t,e||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ConfigTemplateClient=void 0;const constants_1=require("../constants"),monitor_call_1=require("../monitoring/decorators/monitor-call"),base_client_1=require("./base-client");class ConfigTemplateClient extends base_client_1.BaseClient{get(t){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({endpoint:`${constants_1.TENANT_ENDPOINTS.CONFIG_TEMPLATE.GET_TEMPLATES(t)}`})}))}getTemmplateValues(t){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({endpoint:`${constants_1.TENANT_ENDPOINTS.CONFIG_TEMPLATE.GET_VALUES(t)}`})}))}upsertTemplateValues(t,e){return __awaiter(this,void 0,void 0,(function*(){return this.performRequest({method:constants_1.HttpMethod.PUT,endpoint:`${constants_1.TENANT_ENDPOINTS.CONFIG_TEMPLATE.UPDATE_VALUES(t)}`,body:e})}))}delete(t){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({method:constants_1.HttpMethod.DELETE,endpoint:`${constants_1.TENANT_ENDPOINTS.CONFIG_TEMPLATE.DELETE(t)}`})}))}create(t){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({method:constants_1.HttpMethod.POST,endpoint:`${constants_1.TENANT_ENDPOINTS.CONFIG_TEMPLATE.CREATE}`,body:t})}))}}exports.ConfigTemplateClient=ConfigTemplateClient,__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String]),__metadata("design:returntype",Promise)],ConfigTemplateClient.prototype,"get",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String]),__metadata("design:returntype",Promise)],ConfigTemplateClient.prototype,"getTemmplateValues",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String,Array]),__metadata("design:returntype",Promise)],ConfigTemplateClient.prototype,"upsertTemplateValues",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String]),__metadata("design:returntype",Promise)],ConfigTemplateClient.prototype,"delete",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],ConfigTemplateClient.prototype,"create",null);
1
+ "use strict";var __decorate=this&&this.__decorate||function(t,e,n,a){var o,i=arguments.length,r=i<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,n):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,a);else for(var _=t.length-1;_>=0;_--)(o=t[_])&&(r=(i<3?o(r):i>3?o(e,n,r):o(e,n))||r);return i>3&&r&&Object.defineProperty(e,n,r),r},__metadata=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},__awaiter=this&&this.__awaiter||function(t,e,n,a){return new(n||(n=Promise))((function(o,i){function r(t){try{s(a.next(t))}catch(t){i(t)}}function _(t){try{s(a.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(r,_)}s((a=a.apply(t,e||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ConfigTemplateClient=void 0;const constants_1=require("../constants"),monitor_call_1=require("../monitoring/decorators/monitor-call"),base_client_1=require("./base-client");class ConfigTemplateClient extends base_client_1.BaseClient{get(t){return __awaiter(this,void 0,void 0,(function*(){return yield this._performRequest({endpoint:`${constants_1.TENANT_ENDPOINTS.CONFIG_TEMPLATE.GET_TEMPLATES(t)}`})}))}getTemmplateValues(t){return __awaiter(this,void 0,void 0,(function*(){return yield this._performRequest({endpoint:`${constants_1.TENANT_ENDPOINTS.CONFIG_TEMPLATE.GET_VALUES(t)}`})}))}upsertTemplateValues(t,e){return __awaiter(this,void 0,void 0,(function*(){return this._performRequest({method:constants_1.HttpMethod.PUT,endpoint:`${constants_1.TENANT_ENDPOINTS.CONFIG_TEMPLATE.UPDATE_VALUES(t)}`,body:e})}))}delete(t){return __awaiter(this,void 0,void 0,(function*(){return yield this._performRequest({method:constants_1.HttpMethod.DELETE,endpoint:`${constants_1.TENANT_ENDPOINTS.CONFIG_TEMPLATE.DELETE(t)}`})}))}create(t){return __awaiter(this,void 0,void 0,(function*(){return yield this._performRequest({method:constants_1.HttpMethod.POST,endpoint:`${constants_1.TENANT_ENDPOINTS.CONFIG_TEMPLATE.CREATE}`,body:t})}))}}exports.ConfigTemplateClient=ConfigTemplateClient,__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String]),__metadata("design:returntype",Promise)],ConfigTemplateClient.prototype,"get",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String]),__metadata("design:returntype",Promise)],ConfigTemplateClient.prototype,"getTemmplateValues",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String,Array]),__metadata("design:returntype",Promise)],ConfigTemplateClient.prototype,"upsertTemplateValues",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String]),__metadata("design:returntype",Promise)],ConfigTemplateClient.prototype,"delete",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],ConfigTemplateClient.prototype,"create",null);
@@ -1 +1 @@
1
- "use strict";var __decorate=this&&this.__decorate||function(t,e,n,a){var i,o=arguments.length,r=o<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,n):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,a);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(r=(o<3?i(r):o>3?i(e,n,r):i(e,n))||r);return o>3&&r&&Object.defineProperty(e,n,r),r},__metadata=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},__awaiter=this&&this.__awaiter||function(t,e,n,a){return new(n||(n=Promise))((function(i,o){function r(t){try{_(a.next(t))}catch(t){o(t)}}function s(t){try{_(a.throw(t))}catch(t){o(t)}}function _(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(r,s)}_((a=a.apply(t,e||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ConfigVarClient=void 0;const constants_1=require("../constants"),monitor_call_1=require("../monitoring/decorators/monitor-call"),base_client_1=require("./base-client");class ConfigVarClient extends base_client_1.BaseClient{create(t){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.CONFIG_VAR.CREATE,body:t})}))}get(t){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({endpoint:constants_1.TENANT_ENDPOINTS.CONFIG_VAR.GET(t)})}))}update(t){return __awaiter(this,void 0,void 0,(function*(){const e=t.key||"";delete t.key;const n={};return void 0!==t.value&&(n.value=t.value),void 0!==t.description&&(n.description=t.description),void 0!==t.expiryDate&&(n.expiryDate=t.expiryDate),void 0!==t.status&&(n.status=t.status),yield this.performRequest({method:constants_1.HttpMethod.PATCH,endpoint:constants_1.TENANT_ENDPOINTS.CONFIG_VAR.UPDATE(e),body:n})}))}upsert(t){return __awaiter(this,void 0,void 0,(function*(){try{return yield this.update(Object.assign({},t))}catch(e){return yield this.create(t)}}))}search(t){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.CONFIG_VAR.SEARCH,body:{pageSize:t&&t<1e3?t:1e3}})}))}delete(t){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({method:constants_1.HttpMethod.DELETE,endpoint:constants_1.TENANT_ENDPOINTS.CONFIG_VAR.DELETE(t)})}))}}exports.ConfigVarClient=ConfigVarClient,__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],ConfigVarClient.prototype,"create",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String]),__metadata("design:returntype",Promise)],ConfigVarClient.prototype,"get",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],ConfigVarClient.prototype,"update",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Number]),__metadata("design:returntype",Promise)],ConfigVarClient.prototype,"search",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String]),__metadata("design:returntype",Promise)],ConfigVarClient.prototype,"delete",null);
1
+ "use strict";var __decorate=this&&this.__decorate||function(t,e,n,a){var i,o=arguments.length,r=o<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,n):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,a);else for(var _=t.length-1;_>=0;_--)(i=t[_])&&(r=(o<3?i(r):o>3?i(e,n,r):i(e,n))||r);return o>3&&r&&Object.defineProperty(e,n,r),r},__metadata=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},__awaiter=this&&this.__awaiter||function(t,e,n,a){return new(n||(n=Promise))((function(i,o){function r(t){try{s(a.next(t))}catch(t){o(t)}}function _(t){try{s(a.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(r,_)}s((a=a.apply(t,e||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ConfigVarClient=void 0;const constants_1=require("../constants"),monitor_call_1=require("../monitoring/decorators/monitor-call"),base_client_1=require("./base-client");class ConfigVarClient extends base_client_1.BaseClient{create(t){return __awaiter(this,void 0,void 0,(function*(){return yield this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.CONFIG_VAR.CREATE,body:t})}))}get(t){return __awaiter(this,void 0,void 0,(function*(){return yield this._performRequest({endpoint:constants_1.TENANT_ENDPOINTS.CONFIG_VAR.GET(t)})}))}update(t){return __awaiter(this,void 0,void 0,(function*(){const e=t.key||"";delete t.key;const n={};return void 0!==t.value&&(n.value=t.value),void 0!==t.description&&(n.description=t.description),void 0!==t.expiryDate&&(n.expiryDate=t.expiryDate),void 0!==t.status&&(n.status=t.status),yield this._performRequest({method:constants_1.HttpMethod.PATCH,endpoint:constants_1.TENANT_ENDPOINTS.CONFIG_VAR.UPDATE(e),body:n})}))}upsert(t){return __awaiter(this,void 0,void 0,(function*(){try{return yield this.update(Object.assign({},t))}catch(e){return yield this.create(t)}}))}search(t){return __awaiter(this,void 0,void 0,(function*(){return yield this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.CONFIG_VAR.SEARCH,body:{pageSize:t&&t<1e3?t:1e3}})}))}delete(t){return __awaiter(this,void 0,void 0,(function*(){return yield this._performRequest({method:constants_1.HttpMethod.DELETE,endpoint:constants_1.TENANT_ENDPOINTS.CONFIG_VAR.DELETE(t)})}))}}exports.ConfigVarClient=ConfigVarClient,__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],ConfigVarClient.prototype,"create",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String]),__metadata("design:returntype",Promise)],ConfigVarClient.prototype,"get",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],ConfigVarClient.prototype,"update",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Number]),__metadata("design:returntype",Promise)],ConfigVarClient.prototype,"search",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String]),__metadata("design:returntype",Promise)],ConfigVarClient.prototype,"delete",null);
@@ -0,0 +1 @@
1
+ "use strict";var __decorate=this&&this.__decorate||function(t,e,n,a){var i,o=arguments.length,r=o<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,n):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,a);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(r=(o<3?i(r):o>3?i(e,n,r):i(e,n))||r);return o>3&&r&&Object.defineProperty(e,n,r),r},__metadata=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},__awaiter=this&&this.__awaiter||function(t,e,n,a){return new(n||(n=Promise))((function(i,o){function r(t){try{c(a.next(t))}catch(t){o(t)}}function s(t){try{c(a.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(r,s)}c((a=a.apply(t,e||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.FilesAPIClient=void 0;const constants_1=require("../constants"),monitor_call_1=require("../monitoring/decorators/monitor-call"),base_client_1=require("./base-client");class FilesAPIClient extends base_client_1.BaseClient{getAvatar(t){return __awaiter(this,void 0,void 0,(function*(){const{userIds:e,sizeHint:n}=t,a={user_ids:e.join(",")};return n&&(a.size_hint=n),this._performRequest({method:constants_1.HttpMethod.GET,endpoint:constants_1.TENANT_ENDPOINTS.FILES.AVATAR,queryParams:a})}))}getAttachments(t){return __awaiter(this,void 0,void 0,(function*(){return this._performRequest({method:constants_1.HttpMethod.GET,endpoint:constants_1.TENANT_ENDPOINTS.FILES.ATTACHMENTS(t)})}))}}exports.FilesAPIClient=FilesAPIClient,__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],FilesAPIClient.prototype,"getAvatar",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String]),__metadata("design:returntype",Promise)],FilesAPIClient.prototype,"getAttachments",null);
@@ -1 +1 @@
1
- "use strict";var __decorate=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},__metadata=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},__awaiter=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))((function(a,i){function r(t){try{_(n.next(t))}catch(t){i(t)}}function s(t){try{_(n.throw(t))}catch(t){i(t)}}function _(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o((function(t){t(e)}))).then(r,s)}_((n=n.apply(t,e||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.GeoAPIClient=void 0;const constants_1=require("../constants"),monitor_call_1=require("../monitoring/decorators/monitor-call"),base_client_1=require("./base-client");class GeoAPIClient extends base_client_1.BaseClient{getDistanceMatrix(t){return __awaiter(this,void 0,void 0,(function*(){return this.performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.GEOSERVICES.DISTANCE_MATRIX,body:t})}))}getDirections(t){return __awaiter(this,void 0,void 0,(function*(){return this.performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.GEOSERVICES.DIRECTIONS,body:t})}))}geocodeAddress(t){return __awaiter(this,void 0,void 0,(function*(){return this.performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.GEOSERVICES.GEOCODE,body:t})}))}autocompleteAddress(t){return __awaiter(this,void 0,void 0,(function*(){return this.performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.GEOSERVICES.AUTOCOMPLETE,body:t})}))}getPlaceDetails(t){return __awaiter(this,void 0,void 0,(function*(){return this.performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.GEOSERVICES.PLACE,body:t})}))}getTimezone(t){return __awaiter(this,void 0,void 0,(function*(){return this.performRequest({method:constants_1.HttpMethod.GET,endpoint:constants_1.TENANT_ENDPOINTS.GEOSERVICES.TIMEZONE,queryParams:{location:t.location.join(","),timestamp:t.timestamp.toString()}})}))}}exports.GeoAPIClient=GeoAPIClient,__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],GeoAPIClient.prototype,"getDistanceMatrix",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],GeoAPIClient.prototype,"getDirections",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],GeoAPIClient.prototype,"geocodeAddress",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],GeoAPIClient.prototype,"autocompleteAddress",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],GeoAPIClient.prototype,"getPlaceDetails",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],GeoAPIClient.prototype,"getTimezone",null);
1
+ "use strict";var __decorate=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},__metadata=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},__awaiter=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))((function(a,i){function r(t){try{_(n.next(t))}catch(t){i(t)}}function s(t){try{_(n.throw(t))}catch(t){i(t)}}function _(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o((function(t){t(e)}))).then(r,s)}_((n=n.apply(t,e||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.GeoAPIClient=void 0;const constants_1=require("../constants"),monitor_call_1=require("../monitoring/decorators/monitor-call"),base_client_1=require("./base-client");class GeoAPIClient extends base_client_1.BaseClient{getDistanceMatrix(t){return __awaiter(this,void 0,void 0,(function*(){return this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.GEOSERVICES.DISTANCE_MATRIX,body:t})}))}getDirections(t){return __awaiter(this,void 0,void 0,(function*(){return this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.GEOSERVICES.DIRECTIONS,body:t})}))}geocodeAddress(t){return __awaiter(this,void 0,void 0,(function*(){return this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.GEOSERVICES.GEOCODE,body:t})}))}autocompleteAddress(t){return __awaiter(this,void 0,void 0,(function*(){return this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.GEOSERVICES.AUTOCOMPLETE,body:t})}))}getPlaceDetails(t){return __awaiter(this,void 0,void 0,(function*(){return this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.GEOSERVICES.PLACE,body:t})}))}getTimezone(t){return __awaiter(this,void 0,void 0,(function*(){return this._performRequest({method:constants_1.HttpMethod.GET,endpoint:constants_1.TENANT_ENDPOINTS.GEOSERVICES.TIMEZONE,queryParams:{location:t.location.join(","),timestamp:t.timestamp.toString()}})}))}}exports.GeoAPIClient=GeoAPIClient,__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],GeoAPIClient.prototype,"getDistanceMatrix",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],GeoAPIClient.prototype,"getDirections",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],GeoAPIClient.prototype,"geocodeAddress",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],GeoAPIClient.prototype,"autocompleteAddress",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],GeoAPIClient.prototype,"getPlaceDetails",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],GeoAPIClient.prototype,"getTimezone",null);
@@ -1 +1 @@
1
- "use strict";var __decorate=this&&this.__decorate||function(t,e,r,n){var a,o=arguments.length,i=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(i=(o<3?a(i):o>3?a(e,r,i):a(e,r))||i);return o>3&&i&&Object.defineProperty(e,r,i),i},__metadata=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},__awaiter=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(a,o){function i(t){try{s(n.next(t))}catch(t){o(t)}}function c(t){try{s(n.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,c)}s((n=n.apply(t,e||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.GraphQLClient=void 0;const constants_1=require("../constants"),http_1=require("../constants/http"),monitor_call_1=require("../monitoring/decorators/monitor-call"),base_client_1=require("./base-client");class GraphQLClient extends base_client_1.BaseClient{execute(t){return __awaiter(this,arguments,void 0,(function*(t,e={}){return yield this.performRequest({method:http_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.GRAPHQL.SINGLE,body:{query:t},headers:e})}))}executeBatch(t){return __awaiter(this,arguments,void 0,(function*(t,e={}){return yield this.performRequest({method:http_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.GRAPHQL.BATCH,body:{query:t},headers:e})}))}handleResponseData(t){if(!t.data&&t.errors)throw new Error(`GraphQL error: ${JSON.stringify(t.errors)}`)}}exports.GraphQLClient=GraphQLClient,__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String,Object]),__metadata("design:returntype",Promise)],GraphQLClient.prototype,"execute",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String,Object]),__metadata("design:returntype",Promise)],GraphQLClient.prototype,"executeBatch",null);
1
+ "use strict";var __decorate=this&&this.__decorate||function(t,e,r,n){var a,o=arguments.length,i=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(i=(o<3?a(i):o>3?a(e,r,i):a(e,r))||i);return o>3&&i&&Object.defineProperty(e,r,i),i},__metadata=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},__awaiter=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(a,o){function i(t){try{s(n.next(t))}catch(t){o(t)}}function c(t){try{s(n.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,c)}s((n=n.apply(t,e||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.GraphQLClient=void 0;const constants_1=require("../constants"),http_1=require("../constants/http"),monitor_call_1=require("../monitoring/decorators/monitor-call"),base_client_1=require("./base-client");class GraphQLClient extends base_client_1.BaseClient{execute(t){return __awaiter(this,arguments,void 0,(function*(t,e={}){return yield this._performRequest({method:http_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.GRAPHQL.SINGLE,body:{query:t},headers:e})}))}executeBatch(t){return __awaiter(this,arguments,void 0,(function*(t,e={}){return yield this._performRequest({method:http_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.GRAPHQL.BATCH,body:{query:t},headers:e})}))}handleResponseData(t){if(!t.data&&t.errors)throw new Error(`GraphQL error: ${JSON.stringify(t.errors)}`)}}exports.GraphQLClient=GraphQLClient,__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String,Object]),__metadata("design:returntype",Promise)],GraphQLClient.prototype,"execute",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String,Object]),__metadata("design:returntype",Promise)],GraphQLClient.prototype,"executeBatch",null);
@@ -1 +1 @@
1
- "use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,i){void 0===i&&(i=t);var o=Object.getOwnPropertyDescriptor(r,t);o&&!("get"in o?!r.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,i,o)}:function(e,r,t,i){void 0===i&&(i=t),e[i]=r[t]}),__exportStar=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||__createBinding(r,e,t)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(require("../services/metadata-service"),exports),__exportStar(require("./base-client"),exports),__exportStar(require("./config-template-client"),exports),__exportStar(require("./config-var-client"),exports),__exportStar(require("./graphql-client"),exports),__exportStar(require("./metadata-client"),exports),__exportStar(require("./org-preference-client"),exports);
1
+ "use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,i){void 0===i&&(i=t);var o=Object.getOwnPropertyDescriptor(r,t);o&&!("get"in o?!r.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,i,o)}:function(e,r,t,i){void 0===i&&(i=t),e[i]=r[t]}),__exportStar=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||__createBinding(r,e,t)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(require("./artifact-client"),exports),__exportStar(require("./availability-api-client"),exports),__exportStar(require("./base-client"),exports),__exportStar(require("./config-features-client"),exports),__exportStar(require("./config-template-client"),exports),__exportStar(require("./config-var-client"),exports),__exportStar(require("./files-api-client"),exports),__exportStar(require("./geo-api-client"),exports),__exportStar(require("./graphql-client"),exports),__exportStar(require("./metadata-client"),exports),__exportStar(require("./mobile-notification-client"),exports),__exportStar(require("./org-preference-client"),exports),__exportStar(require("./vocabulary-client"),exports);
@@ -1 +1 @@
1
- "use strict";var __decorate=this&&this.__decorate||function(t,e,a,n){var i,o=arguments.length,r=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,a):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,n);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(r=(o<3?i(r):o>3?i(e,a,r):i(e,a))||r);return o>3&&r&&Object.defineProperty(e,a,r),r},__metadata=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},__awaiter=this&&this.__awaiter||function(t,e,a,n){return new(a||(a=Promise))((function(i,o){function r(t){try{l(n.next(t))}catch(t){o(t)}}function c(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof a?e:new a((function(t){t(e)}))).then(r,c)}l((n=n.apply(t,e||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.MetadataClient=void 0;const constants_1=require("../constants"),monitor_call_1=require("../monitoring/decorators/monitor-call"),base_client_1=require("./base-client");class MetadataClient extends base_client_1.BaseClient{fetchAllMetadata(){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({endpoint:constants_1.TENANT_ENDPOINTS.METADATA.ALL})}))}fetchObjectMetadata(t){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({endpoint:constants_1.TENANT_ENDPOINTS.METADATA.OBJECT(t)})}))}}exports.MetadataClient=MetadataClient,__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",Promise)],MetadataClient.prototype,"fetchAllMetadata",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String]),__metadata("design:returntype",Promise)],MetadataClient.prototype,"fetchObjectMetadata",null);
1
+ "use strict";var __decorate=this&&this.__decorate||function(t,e,a,n){var i,o=arguments.length,r=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,a):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,n);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(r=(o<3?i(r):o>3?i(e,a,r):i(e,a))||r);return o>3&&r&&Object.defineProperty(e,a,r),r},__metadata=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},__awaiter=this&&this.__awaiter||function(t,e,a,n){return new(a||(a=Promise))((function(i,o){function r(t){try{_(n.next(t))}catch(t){o(t)}}function c(t){try{_(n.throw(t))}catch(t){o(t)}}function _(t){var e;t.done?i(t.value):(e=t.value,e instanceof a?e:new a((function(t){t(e)}))).then(r,c)}_((n=n.apply(t,e||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.MetadataClient=void 0;const constants_1=require("../constants"),monitor_call_1=require("../monitoring/decorators/monitor-call"),base_client_1=require("./base-client");class MetadataClient extends base_client_1.BaseClient{fetchAllMetadata(){return __awaiter(this,void 0,void 0,(function*(){return yield this._performRequest({endpoint:constants_1.TENANT_ENDPOINTS.METADATA.ALL})}))}fetchObjectMetadata(t){return __awaiter(this,void 0,void 0,(function*(){return yield this._performRequest({endpoint:constants_1.TENANT_ENDPOINTS.METADATA.OBJECT(t)})}))}}exports.MetadataClient=MetadataClient,__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",Promise)],MetadataClient.prototype,"fetchAllMetadata",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String]),__metadata("design:returntype",Promise)],MetadataClient.prototype,"fetchObjectMetadata",null);
@@ -1 +1 @@
1
- "use strict";var __decorate=this&&this.__decorate||function(t,e,o,n){var i,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(r=(a<3?i(r):a>3?i(e,o,r):i(e,o))||r);return a>3&&r&&Object.defineProperty(e,o,r),r},__metadata=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},__awaiter=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))((function(i,a){function r(t){try{_(n.next(t))}catch(t){a(t)}}function s(t){try{_(n.throw(t))}catch(t){a(t)}}function _(t){var e;t.done?i(t.value):(e=t.value,e instanceof o?e:new o((function(t){t(e)}))).then(r,s)}_((n=n.apply(t,e||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.MobileNotificationClient=void 0;const constants_1=require("../constants"),monitor_call_1=require("../monitoring/decorators/monitor-call"),base_client_1=require("./base-client");class MobileNotificationClient extends base_client_1.BaseClient{getTemplates(){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({endpoint:constants_1.TENANT_ENDPOINTS.NOTIFICATIONS.GET_TEMPLATES})}))}deleteTemplate(t,e){return __awaiter(this,void 0,void 0,(function*(){yield this.performRequest({method:constants_1.HttpMethod.DELETE,endpoint:constants_1.TENANT_ENDPOINTS.NOTIFICATIONS.DELETE_TEMPLATE(t,e)})}))}setTemplate(t,e,o){return __awaiter(this,void 0,void 0,(function*(){yield this.performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.NOTIFICATIONS.SET_TEMPLATE(t,e),body:{template:o}})}))}dispatchResources(t){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.NOTIFICATIONS.DISPATCH,body:t})}))}notifyAllocatedResources(t){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.NOTIFICATIONS.NOTIFY,body:t})}))}notifyJobCancellation(t){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.NOTIFICATIONS.NOTIFY_CANCEL,body:t})}))}sendOneOffMessage(t){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.NOTIFICATIONS.ONE_OFF,body:t})}))}sendSms(t){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.NOTIFICATIONS.SEND_SMS,body:t})}))}requestSmsConfirmation(t){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.NOTIFICATIONS.SMS_CONFIRMATION_REQUEST,body:t})}))}}exports.MobileNotificationClient=MobileNotificationClient,__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",Promise)],MobileNotificationClient.prototype,"getTemplates",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String,String]),__metadata("design:returntype",Promise)],MobileNotificationClient.prototype,"deleteTemplate",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String,String,String]),__metadata("design:returntype",Promise)],MobileNotificationClient.prototype,"setTemplate",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],MobileNotificationClient.prototype,"dispatchResources",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],MobileNotificationClient.prototype,"notifyAllocatedResources",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],MobileNotificationClient.prototype,"notifyJobCancellation",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],MobileNotificationClient.prototype,"sendOneOffMessage",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],MobileNotificationClient.prototype,"sendSms",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],MobileNotificationClient.prototype,"requestSmsConfirmation",null);
1
+ "use strict";var __decorate=this&&this.__decorate||function(t,e,o,n){var i,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var _=t.length-1;_>=0;_--)(i=t[_])&&(r=(a<3?i(r):a>3?i(e,o,r):i(e,o))||r);return a>3&&r&&Object.defineProperty(e,o,r),r},__metadata=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},__awaiter=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))((function(i,a){function r(t){try{s(n.next(t))}catch(t){a(t)}}function _(t){try{s(n.throw(t))}catch(t){a(t)}}function s(t){var e;t.done?i(t.value):(e=t.value,e instanceof o?e:new o((function(t){t(e)}))).then(r,_)}s((n=n.apply(t,e||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.MobileNotificationClient=void 0;const constants_1=require("../constants"),monitor_call_1=require("../monitoring/decorators/monitor-call"),base_client_1=require("./base-client");class MobileNotificationClient extends base_client_1.BaseClient{getTemplates(){return __awaiter(this,void 0,void 0,(function*(){return yield this._performRequest({endpoint:constants_1.TENANT_ENDPOINTS.NOTIFICATIONS.GET_TEMPLATES})}))}deleteTemplate(t,e){return __awaiter(this,void 0,void 0,(function*(){yield this._performRequest({method:constants_1.HttpMethod.DELETE,endpoint:constants_1.TENANT_ENDPOINTS.NOTIFICATIONS.DELETE_TEMPLATE(t,e)})}))}setTemplate(t,e,o){return __awaiter(this,void 0,void 0,(function*(){yield this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.NOTIFICATIONS.SET_TEMPLATE(t,e),body:{template:o}})}))}dispatchResources(t){return __awaiter(this,void 0,void 0,(function*(){return yield this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.NOTIFICATIONS.DISPATCH,body:t})}))}notifyAllocatedResources(t){return __awaiter(this,void 0,void 0,(function*(){return yield this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.NOTIFICATIONS.NOTIFY,body:t})}))}notifyJobCancellation(t){return __awaiter(this,void 0,void 0,(function*(){return yield this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.NOTIFICATIONS.NOTIFY_CANCEL,body:t})}))}sendOneOffMessage(t){return __awaiter(this,void 0,void 0,(function*(){return yield this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.NOTIFICATIONS.ONE_OFF,body:t})}))}sendSms(t){return __awaiter(this,void 0,void 0,(function*(){return yield this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.NOTIFICATIONS.SEND_SMS,body:t})}))}requestSmsConfirmation(t){return __awaiter(this,void 0,void 0,(function*(){return yield this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.NOTIFICATIONS.SMS_CONFIRMATION_REQUEST,body:t})}))}}exports.MobileNotificationClient=MobileNotificationClient,__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",Promise)],MobileNotificationClient.prototype,"getTemplates",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String,String]),__metadata("design:returntype",Promise)],MobileNotificationClient.prototype,"deleteTemplate",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String,String,String]),__metadata("design:returntype",Promise)],MobileNotificationClient.prototype,"setTemplate",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],MobileNotificationClient.prototype,"dispatchResources",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],MobileNotificationClient.prototype,"notifyAllocatedResources",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],MobileNotificationClient.prototype,"notifyJobCancellation",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],MobileNotificationClient.prototype,"sendOneOffMessage",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],MobileNotificationClient.prototype,"sendSms",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],MobileNotificationClient.prototype,"requestSmsConfirmation",null);
@@ -1 +1 @@
1
- "use strict";var __decorate=this&&this.__decorate||function(e,t,n,r){var o,a=arguments.length,i=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(i=(a<3?o(i):a>3?o(t,n,i):o(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},__metadata=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{_(r.next(e))}catch(e){a(e)}}function c(e){try{_(r.throw(e))}catch(e){a(e)}}function _(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}_((r=r.apply(e,t||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.OrgPreferenceClient=void 0;const constants_1=require("../constants"),monitor_call_1=require("../monitoring/decorators/monitor-call"),base_client_1=require("./base-client");class OrgPreferenceClient extends base_client_1.BaseClient{get(){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({endpoint:constants_1.TENANT_ENDPOINTS.ORG_PREFERENCE.GET})}))}deploy(e){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.ORG_PREFERENCE.UPDATE,body:e})}))}}exports.OrgPreferenceClient=OrgPreferenceClient,__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",Promise)],OrgPreferenceClient.prototype,"get",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],OrgPreferenceClient.prototype,"deploy",null);
1
+ "use strict";var __decorate=this&&this.__decorate||function(e,t,n,r){var o,a=arguments.length,i=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(i=(a<3?o(i):a>3?o(t,n,i):o(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},__metadata=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{_(r.next(e))}catch(e){a(e)}}function c(e){try{_(r.throw(e))}catch(e){a(e)}}function _(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}_((r=r.apply(e,t||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.OrgPreferenceClient=void 0;const constants_1=require("../constants"),monitor_call_1=require("../monitoring/decorators/monitor-call"),base_client_1=require("./base-client");class OrgPreferenceClient extends base_client_1.BaseClient{get(){return __awaiter(this,void 0,void 0,(function*(){return yield this._performRequest({endpoint:constants_1.TENANT_ENDPOINTS.ORG_PREFERENCE.GET})}))}deploy(e){return __awaiter(this,void 0,void 0,(function*(){return yield this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.ORG_PREFERENCE.UPDATE,body:e})}))}}exports.OrgPreferenceClient=OrgPreferenceClient,__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",Promise)],OrgPreferenceClient.prototype,"get",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],OrgPreferenceClient.prototype,"deploy",null);
@@ -1 +1 @@
1
- "use strict";var __decorate=this&&this.__decorate||function(t,e,a,n){var o,r=arguments.length,i=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,a):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,a,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(i=(r<3?o(i):r>3?o(e,a,i):o(e,a))||i);return r>3&&i&&Object.defineProperty(e,a,i),i},__metadata=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},__awaiter=this&&this.__awaiter||function(t,e,a,n){return new(a||(a=Promise))((function(o,r){function i(t){try{_(n.next(t))}catch(t){r(t)}}function c(t){try{_(n.throw(t))}catch(t){r(t)}}function _(t){var e;t.done?o(t.value):(e=t.value,e instanceof a?e:new a((function(t){t(e)}))).then(i,c)}_((n=n.apply(t,e||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.VocabularyClient=void 0;const constants_1=require("../constants"),monitor_call_1=require("../monitoring/decorators/monitor-call"),base_client_1=require("./base-client");class VocabularyClient extends base_client_1.BaseClient{getVocabularyItems(t,e){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({endpoint:constants_1.TENANT_ENDPOINTS.VOCABULARY.GET_ITEMS(t,e)})}))}addVocabularyItem(t,e,a){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.VOCABULARY.ADD_ITEM(t,e),body:a})}))}updateVocabularyItem(t,e,a,n){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({method:constants_1.HttpMethod.PUT,endpoint:constants_1.TENANT_ENDPOINTS.VOCABULARY.UPDATE_ITEM(t,e,a),body:n})}))}}exports.VocabularyClient=VocabularyClient,__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String,String]),__metadata("design:returntype",Promise)],VocabularyClient.prototype,"getVocabularyItems",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String,String,Object]),__metadata("design:returntype",Promise)],VocabularyClient.prototype,"addVocabularyItem",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String,String,String,Object]),__metadata("design:returntype",Promise)],VocabularyClient.prototype,"updateVocabularyItem",null);
1
+ "use strict";var __decorate=this&&this.__decorate||function(t,e,a,n){var o,r=arguments.length,i=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,a):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,a,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(i=(r<3?o(i):r>3?o(e,a,i):o(e,a))||i);return r>3&&i&&Object.defineProperty(e,a,i),i},__metadata=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},__awaiter=this&&this.__awaiter||function(t,e,a,n){return new(a||(a=Promise))((function(o,r){function i(t){try{_(n.next(t))}catch(t){r(t)}}function c(t){try{_(n.throw(t))}catch(t){r(t)}}function _(t){var e;t.done?o(t.value):(e=t.value,e instanceof a?e:new a((function(t){t(e)}))).then(i,c)}_((n=n.apply(t,e||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.VocabularyClient=void 0;const constants_1=require("../constants"),monitor_call_1=require("../monitoring/decorators/monitor-call"),base_client_1=require("./base-client");class VocabularyClient extends base_client_1.BaseClient{getVocabularyItems(t,e){return __awaiter(this,void 0,void 0,(function*(){return yield this._performRequest({endpoint:constants_1.TENANT_ENDPOINTS.VOCABULARY.GET_ITEMS(t,e)})}))}addVocabularyItem(t,e,a){return __awaiter(this,void 0,void 0,(function*(){return yield this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.VOCABULARY.ADD_ITEM(t,e),body:a})}))}updateVocabularyItem(t,e,a,n){return __awaiter(this,void 0,void 0,(function*(){return yield this._performRequest({method:constants_1.HttpMethod.PUT,endpoint:constants_1.TENANT_ENDPOINTS.VOCABULARY.UPDATE_ITEM(t,e,a),body:n})}))}}exports.VocabularyClient=VocabularyClient,__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String,String]),__metadata("design:returntype",Promise)],VocabularyClient.prototype,"getVocabularyItems",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String,String,Object]),__metadata("design:returntype",Promise)],VocabularyClient.prototype,"addVocabularyItem",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[String,String,String,Object]),__metadata("design:returntype",Promise)],VocabularyClient.prototype,"updateVocabularyItem",null);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TENANT_ENDPOINTS=void 0,exports.TENANT_ENDPOINTS={CONFIG_VAR:{CREATE:"configuration/extension",GET:e=>`configuration/extension/${e}`,UPDATE:e=>`configuration/extension/${e}`,DELETE:e=>`configuration/extension/${e}`,SEARCH:"configuration/extension/search"},GRAPHQL:{SINGLE:"graphql/graphql",BATCH:"graphql/graphql/batch"},METADATA:{ALL:"custom/metadata",OBJECT:e=>`custom/metadata/${e}`},ORG_PREFERENCE:{GET:"config/org_preference",UPDATE:"config/org_preference"},CONFIG_TEMPLATE:{GET_TEMPLATES:e=>`config/templates/${e}`,GET_VALUES:e=>`config/template/${e}/values`,UPDATE_VALUES:e=>`config/template/${e}/values`,CREATE:"config/template",DELETE:e=>`config/template/${e}`},CONFIG_FEATURES:{GET:"config/features",UPDATE:e=>`config/features/${e}`},VOCABULARY:{GET_ITEMS:(e,o)=>`custom/vocabulary/${e}/${o}`,ADD_ITEM:(e,o)=>`custom/vocabulary/${e}/${o}`,UPDATE_ITEM:(e,o,t)=>`custom/vocabulary/${e}/${o}/${t}`},NOTIFICATIONS:{GET_TEMPLATES:"notifications/v2/templates",DELETE_TEMPLATE:(e,o)=>`notifications/v2/template/${e}/${o}`,SET_TEMPLATE:(e,o)=>`notifications/v2/template/${e}/${o}`,DISPATCH:"notifications/dispatch",NOTIFY:"notifications/notify",NOTIFY_CANCEL:"notifications/notify_cancel",ONE_OFF:"notifications/oneoff",SEND_SMS:"notifications/sms",SMS_CONFIRMATION_REQUEST:"notifications/sms/confirmation_request"},GEOSERVICES:{DISTANCE_MATRIX:"geoservices/distanceMatrix",DIRECTIONS:"geoservices/directions",GEOCODE:"geoservices/geocode",AUTOCOMPLETE:"geoservices/autocomplete",PLACE:"geoservices/place",TIMEZONE:"geoservices/timezone"},AVAILABILITY:{SIMPLE:"availability/simple"}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TENANT_ENDPOINTS=void 0,exports.TENANT_ENDPOINTS={CONFIG_VAR:{CREATE:"configuration/extension",GET:e=>`configuration/extension/${e}`,UPDATE:e=>`configuration/extension/${e}`,DELETE:e=>`configuration/extension/${e}`,SEARCH:"configuration/extension/search"},GRAPHQL:{SINGLE:"graphql/graphql",BATCH:"graphql/graphql/batch"},METADATA:{ALL:"custom/metadata",OBJECT:e=>`custom/metadata/${e}`},ORG_PREFERENCE:{GET:"config/org_preference",UPDATE:"config/org_preference"},CONFIG_TEMPLATE:{GET_TEMPLATES:e=>`config/templates/${e}`,GET_VALUES:e=>`config/template/${e}/values`,UPDATE_VALUES:e=>`config/template/${e}/values`,CREATE:"config/template",DELETE:e=>`config/template/${e}`},CONFIG_FEATURES:{GET:"config/features",UPDATE:e=>`config/features/${e}`},VOCABULARY:{GET_ITEMS:(e,t)=>`custom/vocabulary/${e}/${t}`,ADD_ITEM:(e,t)=>`custom/vocabulary/${e}/${t}`,UPDATE_ITEM:(e,t,i)=>`custom/vocabulary/${e}/${t}/${i}`},NOTIFICATIONS:{GET_TEMPLATES:"notifications/v2/templates",DELETE_TEMPLATE:(e,t)=>`notifications/v2/template/${e}/${t}`,SET_TEMPLATE:(e,t)=>`notifications/v2/template/${e}/${t}`,DISPATCH:"notifications/dispatch",NOTIFY:"notifications/notify",NOTIFY_CANCEL:"notifications/notify_cancel",ONE_OFF:"notifications/oneoff",SEND_SMS:"notifications/sms",SMS_CONFIRMATION_REQUEST:"notifications/sms/confirmation_request"},GEOSERVICES:{DISTANCE_MATRIX:"geoservices/distanceMatrix",DIRECTIONS:"geoservices/directions",GEOCODE:"geoservices/geocode",AUTOCOMPLETE:"geoservices/autocomplete",PLACE:"geoservices/place",TIMEZONE:"geoservices/timezone"},AVAILABILITY:{SIMPLE:"availability/simple"},FILES:{AVATAR:"files/avatar",ATTACHMENTS:e=>`files/attachments/${e}`}};
@@ -1 +1 @@
1
- "use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ExecutionContext=void 0;const function_utilities_1=require("@skedulo/function-utilities"),clients_1=require("../clients"),artifact_client_1=require("../clients/artifact-client"),availability_api_client_1=require("../clients/availability-api-client"),config_features_client_1=require("../clients/config-features-client"),config_template_client_1=require("../clients/config-template-client"),config_var_client_1=require("../clients/config-var-client"),geo_api_client_1=require("../clients/geo-api-client"),graphql_client_1=require("../clients/graphql-client"),metadata_client_1=require("../clients/metadata-client"),mobile_notification_client_1=require("../clients/mobile-notification-client"),org_preference_client_1=require("../clients/org-preference-client"),vocabulary_client_1=require("../clients/vocabulary-client"),logger_1=__importDefault(require("../logging/logger")),monitoring_constants_1=require("../monitoring/monitoring-constants"),monitoring_registry_1=require("../monitoring/monitoring-registry"),cache_service_1=require("../services/cache/cache-service"),storage_1=require("../services/cache/storage"),geoservice_1=require("../services/geoservice"),graphql_1=require("../services/graphql"),lock_service_1=require("../services/lock-service"),metadata_service_1=require("../services/metadata-service"),data_service_1=require("../services/resource-availability/builder/data-service"),resource_availability_service_1=require("../services/resource-availability/builder/resource-availability-service"),resource_builder_1=require("../services/resource-availability/builder/resource-builder"),utils_1=require("../utils"),request_header_constants_1=require("./request-header-constants");class ExecutionContext{constructor(e,i={},t){this.logger=logger_1.default,this.services=new Map,this.skedContext=e,this.contextData={},this._executionOptions=i,this.baseConfig={apiToken:e.auth.token,apiServer:e.auth.baseUrl},(0,monitoring_registry_1.initGlobalMonitorManager)(t)}static fromContext(e,i={},t=monitoring_constants_1.DEFAULT_THRESHOLD_CONFIG){return new ExecutionContext(e,i,Object.assign(Object.assign({},monitoring_constants_1.DEFAULT_THRESHOLD_CONFIG),t))}static fromCredentials(e,i={},t=monitoring_constants_1.DEFAULT_THRESHOLD_CONFIG){const r={Authorization:`Bearer ${e.apiToken}`,[request_header_constants_1.REQUEST_HEADERS.SKED_API_SERVER]:e.apiServer},n=(0,function_utilities_1.createSkedContext)(r),a=new ExecutionContext(n,i,Object.assign(Object.assign({},monitoring_constants_1.DEFAULT_THRESHOLD_CONFIG),t));return a.baseConfig=Object.assign(Object.assign({},e),a.baseConfig),a}set executionOptions(e){this._executionOptions=Object.assign(Object.assign({},this._executionOptions),e)}get executionOptions(){return this._executionOptions}getOrCreateService(e,i){return this.services.has(e)||this.services.set(e,i()),this.services.get(e)}get configHelper(){return this.getOrCreateService("configHelper",(()=>new utils_1.ConfigHelper(this.skedContext.configVars)))}get baseClient(){return this.getOrCreateService("baseClient",(()=>new clients_1.BaseClient(this.baseConfig,this.executionOptions)))}get graphqlClient(){return this.getOrCreateService("graphqlClient",(()=>new graphql_client_1.GraphQLClient(this.baseConfig,this.executionOptions)))}get graphqlService(){return this.getOrCreateService("graphqlService",(()=>new graphql_1.GraphQLService(this.graphqlClient)))}get metadataClient(){return this.getOrCreateService("metadataClient",(()=>new metadata_client_1.MetadataClient(this.baseConfig,this.executionOptions)))}get metadataService(){return this.getOrCreateService("metadataService",(()=>new metadata_service_1.MetadataService(this.metadataClient)))}get vocabularyClient(){return this.getOrCreateService("vocabularyClient",(()=>new vocabulary_client_1.VocabularyClient(this.baseConfig,this.executionOptions)))}get orgPreferencesClient(){return this.getOrCreateService("orgPreferencesClient",(()=>new org_preference_client_1.OrgPreferenceClient(this.baseConfig,this.executionOptions)))}get configTemplateClient(){return this.getOrCreateService("configTemplateClient",(()=>new config_template_client_1.ConfigTemplateClient(this.baseConfig,this.executionOptions)))}get configFeaturesClient(){return this.getOrCreateService("configFeaturesClient",(()=>new config_features_client_1.ConfigFeaturesClient(this.baseConfig,this.executionOptions)))}get configVarClient(){return this.getOrCreateService("configVarClient",(()=>new config_var_client_1.ConfigVarClient(this.baseConfig,this.executionOptions)))}get mobileNotificationClient(){return this.getOrCreateService("mobileNotificationClient",(()=>new mobile_notification_client_1.MobileNotificationClient(this.baseConfig,this.executionOptions)))}get geoAPIClient(){return this.getOrCreateService("geoAPIClient",(()=>new geo_api_client_1.GeoAPIClient(this.baseConfig,this.executionOptions)))}get availabilityAPIClient(){return this.getOrCreateService("availabilityAPIClient",(()=>new availability_api_client_1.AvailabilityAPIClient(this.baseConfig,this.executionOptions)))}get geoService(){return this.getOrCreateService("geoService",(()=>new geoservice_1.GeoService(this.geoAPIClient)))}get lockService(){return this.getOrCreateService("lockService",(()=>new lock_service_1.LockService(this.configVarClient)))}get configVarCache(){return this.getOrCreateService("configVarCache",(()=>new cache_service_1.CacheService(new storage_1.ConfigVarCacheStorage(this.configVarClient))))}get inMemoryCache(){return this.getOrCreateService("inMemoryCache",(()=>{const e=new cache_service_1.CacheService(new storage_1.InMemoryCacheStorage);return e.setSecondaryCache(this.configVarCache),e}))}get resourceAvailabilityService(){return this.getOrCreateService("resourceAvailabilityService",(()=>new resource_availability_service_1.ResourceAvailabilityService(this.availabilityAPIClient)))}get dataService(){return this.getOrCreateService("dataService",(()=>new data_service_1.DataService(this.graphqlService)))}get resourceBuilder(){return this.getOrCreateService("resourceBuilder",(()=>new resource_builder_1.ResourceBuilder(this.dataService,this.resourceAvailabilityService)))}newQueryBuilder(e){const i=new graphql_1.GraphQLQueryBuilder(e);return i.setGraphqlService(this.graphqlService),i}newArtifactClient(e){return this.getOrCreateService(`${e}Client`,(()=>new artifact_client_1.ArtifactClient(this.baseConfig,e,this.executionOptions)))}dispose(){this.services.clear()}getExecutionMetrics(){return(0,monitoring_registry_1.getGlobalMonitorManager)().getExecutionMetrics()}}exports.ExecutionContext=ExecutionContext;
1
+ "use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ExecutionContext=void 0;const function_utilities_1=require("@skedulo/function-utilities"),clients_1=require("../clients"),artifact_client_1=require("../clients/artifact-client"),availability_api_client_1=require("../clients/availability-api-client"),config_features_client_1=require("../clients/config-features-client"),config_template_client_1=require("../clients/config-template-client"),config_var_client_1=require("../clients/config-var-client"),files_api_client_1=require("../clients/files-api-client"),geo_api_client_1=require("../clients/geo-api-client"),graphql_client_1=require("../clients/graphql-client"),metadata_client_1=require("../clients/metadata-client"),mobile_notification_client_1=require("../clients/mobile-notification-client"),org_preference_client_1=require("../clients/org-preference-client"),vocabulary_client_1=require("../clients/vocabulary-client"),logger_1=__importDefault(require("../logging/logger")),monitoring_constants_1=require("../monitoring/monitoring-constants"),monitoring_registry_1=require("../monitoring/monitoring-registry"),cache_service_1=require("../services/cache/cache-service"),storage_1=require("../services/cache/storage"),geoservice_1=require("../services/geoservice"),graphql_1=require("../services/graphql"),lock_service_1=require("../services/lock-service"),metadata_service_1=require("../services/metadata-service"),data_service_1=require("../services/resource-availability/builder/data-service"),resource_availability_service_1=require("../services/resource-availability/builder/resource-availability-service"),resource_builder_1=require("../services/resource-availability/builder/resource-builder"),utils_1=require("../utils"),request_header_constants_1=require("./request-header-constants");class ExecutionContext{constructor(e,t={},i){this.logger=logger_1.default,this.services=new Map,this.skedContext=e,this.contextData={},this._executionOptions=t,this.baseConfig={apiToken:e.auth.token,apiServer:e.auth.baseUrl},(0,monitoring_registry_1.initGlobalMonitorManager)(i)}static fromContext(e,t={},i=monitoring_constants_1.DEFAULT_THRESHOLD_CONFIG){return ExecutionContext.instance?ExecutionContext.instance.updateConfig(e,t,i):ExecutionContext.instance=new ExecutionContext(e,t,Object.assign(Object.assign({},monitoring_constants_1.DEFAULT_THRESHOLD_CONFIG),i)),ExecutionContext.instance}static fromCredentials(e,t={},i=monitoring_constants_1.DEFAULT_THRESHOLD_CONFIG){const r={Authorization:`Bearer ${e.apiToken}`,[request_header_constants_1.REQUEST_HEADERS.SKED_API_SERVER]:e.apiServer},n=(0,function_utilities_1.createSkedContext)(r);return ExecutionContext.instance?ExecutionContext.instance.updateConfig(n,t,i,e):ExecutionContext.instance=new ExecutionContext(n,t,Object.assign(Object.assign({},monitoring_constants_1.DEFAULT_THRESHOLD_CONFIG),i)),ExecutionContext.instance}updateConfig(e,t,i,r){this.skedContext=e,this._executionOptions=Object.assign(Object.assign({},this._executionOptions),t),r&&(this.baseConfig=Object.assign(Object.assign({},r),this.baseConfig))}set executionOptions(e){this._executionOptions=Object.assign(Object.assign({},this._executionOptions),e)}get executionOptions(){return this._executionOptions}getOrCreateService(e,t){return this.services.has(e)||this.services.set(e,t()),this.services.get(e)}get configHelper(){return this.getOrCreateService("configHelper",(()=>new utils_1.ConfigHelper(this.skedContext.configVars)))}get baseClient(){return this.getOrCreateService("baseClient",(()=>new clients_1.BaseClient(this.baseConfig,this.executionOptions)))}get graphqlClient(){return this.getOrCreateService("graphqlClient",(()=>new graphql_client_1.GraphQLClient(this.baseConfig,this.executionOptions)))}get graphqlService(){return this.getOrCreateService("graphqlService",(()=>new graphql_1.GraphQLService(this.graphqlClient)))}get metadataClient(){return this.getOrCreateService("metadataClient",(()=>new metadata_client_1.MetadataClient(this.baseConfig,this.executionOptions)))}get metadataService(){return this.getOrCreateService("metadataService",(()=>new metadata_service_1.MetadataService(this.metadataClient)))}get vocabularyClient(){return this.getOrCreateService("vocabularyClient",(()=>new vocabulary_client_1.VocabularyClient(this.baseConfig,this.executionOptions)))}get orgPreferencesClient(){return this.getOrCreateService("orgPreferencesClient",(()=>new org_preference_client_1.OrgPreferenceClient(this.baseConfig,this.executionOptions)))}get configTemplateClient(){return this.getOrCreateService("configTemplateClient",(()=>new config_template_client_1.ConfigTemplateClient(this.baseConfig,this.executionOptions)))}get configFeaturesClient(){return this.getOrCreateService("configFeaturesClient",(()=>new config_features_client_1.ConfigFeaturesClient(this.baseConfig,this.executionOptions)))}get configVarClient(){return this.getOrCreateService("configVarClient",(()=>new config_var_client_1.ConfigVarClient(this.baseConfig,this.executionOptions)))}get mobileNotificationClient(){return this.getOrCreateService("mobileNotificationClient",(()=>new mobile_notification_client_1.MobileNotificationClient(this.baseConfig,this.executionOptions)))}get geoAPIClient(){return this.getOrCreateService("geoAPIClient",(()=>new geo_api_client_1.GeoAPIClient(this.baseConfig,this.executionOptions)))}get availabilityAPIClient(){return this.getOrCreateService("availabilityAPIClient",(()=>new availability_api_client_1.AvailabilityAPIClient(this.baseConfig,this.executionOptions)))}get filesAPIClient(){return this.getOrCreateService("filesAPIClient",(()=>new files_api_client_1.FilesAPIClient(this.baseConfig,this.executionOptions)))}get geoService(){return this.getOrCreateService("geoService",(()=>new geoservice_1.GeoService(this.geoAPIClient)))}get lockService(){return this.getOrCreateService("lockService",(()=>new lock_service_1.LockService(this.configVarClient)))}get configVarCache(){return this.getOrCreateService("configVarCache",(()=>new cache_service_1.CacheService(new storage_1.ConfigVarCacheStorage(this.configVarClient))))}get inMemoryCache(){return this.getOrCreateService("inMemoryCache",(()=>{const e=new cache_service_1.CacheService(new storage_1.InMemoryCacheStorage);return e.setSecondaryCache(this.configVarCache),e}))}get resourceAvailabilityService(){return this.getOrCreateService("resourceAvailabilityService",(()=>new resource_availability_service_1.ResourceAvailabilityService(this.availabilityAPIClient)))}get dataService(){return this.getOrCreateService("dataService",(()=>new data_service_1.DataService(this.graphqlService)))}get resourceBuilder(){return this.getOrCreateService("resourceBuilder",(()=>new resource_builder_1.ResourceBuilder(this.dataService,this.resourceAvailabilityService)))}newQueryBuilder(e){const t=new graphql_1.GraphQLQueryBuilder(e);return t.setGraphqlService(this.graphqlService),t}newArtifactClient(e){return this.getOrCreateService(`${e}Client`,(()=>new artifact_client_1.ArtifactClient(this.baseConfig,e,this.executionOptions)))}dispose(){this.services.clear()}getExecutionMetrics(){return(0,monitoring_registry_1.getGlobalMonitorManager)().getExecutionMetrics()}}exports.ExecutionContext=ExecutionContext,ExecutionContext.instance=null;