@skedulo/pulse-solution-services 0.0.15 → 0.0.17

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 (42) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/README.md +113 -9
  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 -1
  10. package/dist/clients/geo-api-client.js +1 -1
  11. package/dist/clients/graphql-client.js +1 -1
  12. package/dist/clients/metadata-client.js +1 -1
  13. package/dist/clients/mobile-notification-client.js +1 -1
  14. package/dist/clients/org-preference-client.js +1 -1
  15. package/dist/clients/vocabulary-client.js +1 -1
  16. package/dist/index.d.ts +98 -36
  17. package/dist/logging/decorators/log-method.js +1 -1
  18. package/dist/monitoring/decorators/monitor-call.js +1 -1
  19. package/dist/monitoring/monitoring-manager.js +1 -1
  20. package/dist/services/cache/cache-service.js +1 -1
  21. package/dist/services/cache/storage/config-var-cache-storage.js +1 -1
  22. package/dist/services/cache/storage/in-memory-cache-storage.js +1 -1
  23. package/dist/services/geoservice.js +1 -1
  24. package/dist/services/graph-batch/graph-batch.js +1 -1
  25. package/dist/services/graph-batch/unique-graph-batch.js +1 -1
  26. package/dist/services/graphql/graphql-batch-builder.d.ts +138 -0
  27. package/dist/services/graphql/graphql-batch-builder.js +1 -0
  28. package/dist/services/graphql/graphql-query-batch.d.ts +10 -0
  29. package/dist/services/graphql/graphql-query-batch.js +1 -0
  30. package/dist/services/graphql/graphql-query-builder.d.ts +11 -3
  31. package/dist/services/graphql/graphql-query-builder.js +1 -1
  32. package/dist/services/graphql/graphql-service.d.ts +78 -25
  33. package/dist/services/graphql/graphql-service.js +1 -1
  34. package/dist/services/graphql/queries.d.ts +13 -19
  35. package/dist/services/graphql/queries.js +1 -1
  36. package/dist/services/lock-service.js +1 -1
  37. package/dist/services/metadata-service.js +1 -1
  38. package/dist/services/resource-availability/builder/data-service.js +1 -1
  39. package/dist/services/resource-availability/builder/resource-availability-service.js +1 -1
  40. package/dist/services/resource-availability/builder/resource-builder.js +1 -1
  41. package/package.json +2 -2
  42. package/yarn.lock +642 -517
package/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## [v0.0.16] - 2025-06-19
4
+ ### Added
5
+ - Support upsert mutation.
6
+ - Support batch queries and mutations.
7
+
3
8
  ## [v0.0.15] - 2025-05-21
4
9
  ### Updated
5
10
  - Enable GraphQLRequest with variable to graphqlClient
package/README.md CHANGED
@@ -19,9 +19,12 @@
19
19
  - [Artifact Client](#artifact-client)
20
20
  - [GraphQL Service](#graphql-service)
21
21
  - [Query Data](#query-data)
22
+ - [Query by Pages](#query-by-pages)
23
+ - [Batch Queries](#batch-queries)
22
24
  - [Update Data](#update-data)
23
- - [Pagination with Offset](#pagination-with-offset)
24
- - [Pagination with Cursor](#pagination-with-cursor)
25
+ - [Upsert Data](#upsert-data)
26
+ - [Batch mMtations](#batch-mutations)
27
+ - [Pagination](#pagination)
25
28
  - [Resource Service](#resource-service)
26
29
  - [Resource Builder](#resource-builder)
27
30
  - [Resource Validator](#resource-validator)
@@ -103,7 +106,7 @@ const artifactClient = context.newArtifactClient(ArtifactType.WEBHOOK);
103
106
  const webhooks = await artifactClient.list();
104
107
  const functionPromises = webhooks.map((webhook: any) => artifactClient.get(webhook.name));
105
108
  await Promise.all(functionPromises);
106
- // Get execution metric
109
+ // Get execution metrics
107
110
  console.log(context.getExecutionMetrics());
108
111
  ```
109
112
 
@@ -311,7 +314,7 @@ const result: SmsResponse = await context.mobileNotificationClient.requestSmsCon
311
314
  const templates: ConfigTemplate[] = await context.configTemplateClient.get('Jobs');
312
315
 
313
316
  // Get teamplate values
314
- const values: ConfigValue[] = await context.configTemplateClient.getTemmplateValues(templateId);
317
+ const values: ConfigValue[] = await context.configTemplateClient.getTemplateValues(templateId);
315
318
 
316
319
  // Delete a template
317
320
  const result: Record<string,string> = await context.configTemplateClient.delete(templateId);
@@ -319,7 +322,7 @@ const result: Record<string,string> = await context.configTemplateClient.delete(
319
322
  **Template Values**
320
323
  ```javascript
321
324
  // Get template values
322
- const values: ConfigValue[] = await context.configTemplateClient.getTemmplateValues(templateId);
325
+ const values: ConfigValue[] = await context.configTemplateClient.getTemplateValues(templateId);
323
326
 
324
327
  // Create a new template and values
325
328
  const newTemplate: ConfigTemplate = {
@@ -531,6 +534,58 @@ console.log(queryResult.endOffset); // 1
531
534
 
532
535
  The `X-Graphql-Operation` header is added to all GraphQL requests and contains the value of `operationName`.
533
536
 
537
+ #### Query by Pages
538
+ ```javascript
539
+ // Create a query builder for the Jobs object
540
+ const queryBuilder = context.newQueryBuilder({
541
+ objectName: 'Jobs',
542
+ operationName: 'fetchJobs',
543
+ readOnly: true
544
+ });
545
+ // Fetch data from pages 1 through 5 (inclusive)
546
+ const queryResult = await queryBuilder.executeAll(1, 5);
547
+
548
+ // Fetch data from the first 20 pages
549
+ const queryResult = await queryBuilder.executeAll();
550
+ ```
551
+
552
+ The `queryBuilder.executeAll` method supports querying up to a maximum of 20 pages.
553
+
554
+ #### Batch Queries
555
+
556
+ To execute multiple queries in a single request, use `graphqlService.queryBatch`. This method takes an array of query builders, sends them to the GraphQL batch endpoint, and returns an array of query results. This is useful for fetching data from multiple objects efficiently.
557
+
558
+ ```javascript
559
+ // Create query builders for Jobs and Contacts
560
+ const jobQueryBuilder = context.newQueryBuilder({
561
+ objectName: 'Jobs',
562
+ operationName: 'fetchJobs',
563
+ readOnly: true
564
+ });
565
+ jobQueryBuilder.withFields(['UID', 'Name'])
566
+ .withFilter('IsActive == true')
567
+ .withLimit(10);
568
+
569
+ const contactQueryBuilder = context.newQueryBuilder({
570
+ objectName: 'Contacts',
571
+ operationName: 'fetchContacts',
572
+ readOnly: true
573
+ });
574
+ contactQueryBuilder.withFields(['UID', 'FirstName', 'LastName'])
575
+ .withFilter('LastName != null')
576
+ .withLimit(5);
577
+
578
+ // Execute batch query
579
+ const queryResults = await context.graphqlService.queryBatch([jobQueryBuilder, contactQueryBuilder]);
580
+
581
+ // Process results
582
+ const jobResults = queryResults[0];
583
+ const contactResults = queryResults[1];
584
+ console.log('Jobs:', jobResults.records);
585
+ console.log('Job Total Count:', jobResults.totalCount);
586
+ console.log('Contacts:', contactResults.records);
587
+ console.log('Contact Total Count:', contactResults.totalCount);
588
+ ```
534
589
  #### Update data
535
590
  ```javascript
536
591
  const recordsToUpdate = queryResult.records.map((record) => {
@@ -539,9 +594,8 @@ const recordsToUpdate = queryResult.records.map((record) => {
539
594
  Name: record.Name + " - Updated"
540
595
  }
541
596
  });
542
- const updateResult = await context.graphqlService.mutate({
597
+ const updateResult = await context.graphqlService.update({
543
598
  objectName: 'Resources',
544
- operation: GraphqlOperations.UPDATE,
545
599
  operationName: 'updateResources',
546
600
  records: recordsToUpdate,
547
601
  bulkOperation: true, // optional
@@ -549,17 +603,67 @@ const updateResult = await context.graphqlService.mutate({
549
603
  });
550
604
  ```
551
605
 
606
+ #### upsert data
607
+ ```javascript
608
+ const upsertResult = await context.graphqlService.upsert({
609
+ objectName: 'Resources',
610
+ operationName: 'updateResources',
611
+ records: recordsToUpsert,
612
+ bulkOperation: true, // optional
613
+ suppressChangeEvents: true, // optional
614
+ keyField: "ExternalId"
615
+ });
616
+ ```
617
+
618
+ #### Batch mutations
619
+ ```javascript
620
+ // Define mutation parameters for inserting Jobs and deleting Contacts
621
+ const insertJobParams = {
622
+ objectName: 'Jobs',
623
+ operationName: 'insertJobs',
624
+ operation: GraphqlOperations.INSERT,
625
+ records: [
626
+ { UID: 'job1', Name: 'Developer Job', Status: 'Open' },
627
+ { UID: 'job2', Name: 'Designer Job', Status: 'Open' }
628
+ ],
629
+ bulkOperation: true
630
+ };
631
+
632
+ const deleteContactParams = {
633
+ objectName: 'Contacts',
634
+ operationName: 'deleteContacts',
635
+ operation: GraphqlOperations.DELETE,
636
+ records: [
637
+ { UID: 'contact1' },
638
+ { UID: 'contact2' }
639
+ ]
640
+ };
641
+
642
+ // Execute batch mutation
643
+ const mutationResults = await context.graphqlService.mutateBatch([insertJobParams, deleteContactParams]);
644
+
645
+ // Process results
646
+ const insertResult = mutationResults[0];
647
+ const deleteResult = mutationResults[1];
648
+ console.log('Inserted Job UIDs:', context.graphqlService.extractUIDs(insertResult));
649
+ console.log('Deleted Contact UIDs:', context.graphqlService.extractUIDs(deleteResult));
650
+ ```
651
+
552
652
  The `bulkOperation` and `readOnly` options help optimize large-scale mutations and read-heavy queries. When enabled, they automatically add the `X-Skedulo-Bulk-Operation` (for mutations) and `X-Skedulo-Read-Only` (for queries) headers to improve performance.
553
653
  To reduce the impact on change event processing, especially during high-volume mutations, the `suppressChangeEvents` option can be used. This disables change history tracking, helping to minimize delays.
554
654
 
555
- #### Pagination with offset
655
+ #### Pagination
656
+
657
+ The GraphQL Service supports pagination using either offset-based or cursor-based strategies, allowing you to fetch large datasets incrementally.
658
+
659
+ *Pagination with offset*
556
660
  ```javascript
557
661
  while(queryResult.pageInfo.hasNextPage) {
558
662
  queryBuilder.withOffset(queryResult.endOffset + 1);
559
663
  queryResult = await queryBuilder.execute();
560
664
  }
561
665
  ```
562
- #### Pagination with cursor
666
+ *Pagination with cursor*
563
667
  ```javascript
564
668
  while(queryResult.pageInfo.hasNextPage) {
565
669
  queryBuilder.withCursor(queryResult.endCursor);
@@ -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 s=t.length-1;s>=0;s--)(i=t[s])&&(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)};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,a={}){super(t,a),this.artifactType=e,this.baseEndpoint=`artifacts/${this.artifactType}`}async list(){return this._performRequest({endpoint:this.baseEndpoint})}async get(t={}){return this._performRequest({endpoint:this.buildEndpoint(t)})}async create(t,e){return this._performRequest({method:constants_1.HttpMethod.POST,endpoint:this.buildEndpoint(t),body:e})}async update(t,e){return this._performRequest({method:constants_1.HttpMethod.PUT,endpoint:this.buildEndpoint(t),body:e})}async delete(t){await this._performRequest({method:constants_1.HttpMethod.DELETE,endpoint:this.buildEndpoint(t)})}buildEndpoint(t){const{objectName:e,viewTypeName:a,name:n,scope:i}=t;let o=this.baseEndpoint;return e&&(o+=`/${e}`),a&&(o+=`/${a}`),n&&(o+=`/${n}`),i&&(o+=`/${i}`),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,a){var r,n=arguments.length,o=n<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,a);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(n<3?r(o):n>3?r(t,i,o):r(t,i))||o);return n>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)};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{async fetchAvailability(e){var t,i,a,r;if(!e.resourceIds.length)throw new Error("At least one resource ID must be provided.");const n={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===(a=e.entries)||void 0===a?void 0:a.toString())&&void 0!==r?r:"true"};return await this._performRequest({endpoint:constants_1.TENANT_ENDPOINTS.AVAILABILITY.SIMPLE,queryParams:n})}}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,r,o){var n,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var i=e.length-1;i>=0;i--)(n=e[i])&&(a=(s<3?n(a):s>3?n(t,r,a):n(t,r))||a);return s>3&&a&&Object.defineProperty(t,r,a),a},__metadata=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};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}async performRequest({method:e="GET",endpoint:t,headers:r={},body:o,queryParams:n},s=this.executionOptions){return this._performRequest({method:e,endpoint:t,headers:r,body:o,queryParams:n},s)}async _performRequest({method:e="GET",endpoint:t,headers:r={},body:o,queryParams:n},s=this.executionOptions){try{const a=Object.assign(Object.assign({},this.getHeaders(s)),r),i=this.buildUrl(t,n),c=await fetch(i,{method:e,headers:a,body:o&&"GET"!==e?JSON.stringify(o):void 0});let d;const u=c.headers.get("content-type");if(u&&u.includes("application/json")?(d=await c.json(),d.result&&(d=d.result)):d=await c.text(),!c.ok)throw new Error(`HTTP error! Status: ${c.status}. Response: ${JSON.stringify(d)}`);return this.handleResponseData(d),d}catch(e){throw this.handleException(e),e}}handleResponseData(e){}getHeaders(e){var t,r;const o={Authorization:`Bearer ${this.config.apiToken}`,"Content-Type":"application/json"},n=e.requestSource||(null===(t=this.executionOptions)||void 0===t?void 0:t.requestSource),s=e.userAgent||(null===(r=this.executionOptions)||void 0===r?void 0:r.userAgent);return n&&(o[request_header_constants_1.REQUEST_HEADERS.X_SKEDULO_SOURCE]=n),s&&(o[request_header_constants_1.REQUEST_HEADERS.USER_AGENT]=s),o}buildUrl(e,t){const r=e.startsWith("http")?new URL(e):new URL(`${this.config.apiServer}/${e}`);return t&&Object.entries(t).forEach((([e,t])=>{r.searchParams.append(e,t)})),r.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
+ "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(e,t,n,a){var o,r=arguments.length,i=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,n):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,a);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(r<3?o(i):r>3?o(t,n,i):o(t,n))||i);return r>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)};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{async get(){return await this._performRequest({endpoint:constants_1.TENANT_ENDPOINTS.CONFIG_FEATURES.GET})}async update(e,t){return await 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(e),body:t})}}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,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 _=t.length-1;_>=0;_--)(o=t[_])&&(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)};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{async get(t){return await this._performRequest({endpoint:`${constants_1.TENANT_ENDPOINTS.CONFIG_TEMPLATE.GET_TEMPLATES(t)}`})}async getTemmplateValues(t){return await this._performRequest({endpoint:`${constants_1.TENANT_ENDPOINTS.CONFIG_TEMPLATE.GET_VALUES(t)}`})}async upsertTemplateValues(t,e){return this._performRequest({method:constants_1.HttpMethod.PUT,endpoint:`${constants_1.TENANT_ENDPOINTS.CONFIG_TEMPLATE.UPDATE_VALUES(t)}`,body:e})}async delete(t){return await this._performRequest({method:constants_1.HttpMethod.DELETE,endpoint:`${constants_1.TENANT_ENDPOINTS.CONFIG_TEMPLATE.DELETE(t)}`})}async create(t){return await 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)}`})}))}getTemplateValues(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,"getTemplateValues",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,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 s=t.length-1;s>=0;s--)(o=t[s])&&(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)};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{async create(t){return await this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.CONFIG_VAR.CREATE,body:t})}async get(t){return await this._performRequest({endpoint:constants_1.TENANT_ENDPOINTS.CONFIG_VAR.GET(t)})}async update(t){const e=t.key||"";delete t.key;const a={};return void 0!==t.value&&(a.value=t.value),void 0!==t.description&&(a.description=t.description),void 0!==t.expiryDate&&(a.expiryDate=t.expiryDate),void 0!==t.status&&(a.status=t.status),await this._performRequest({method:constants_1.HttpMethod.PATCH,endpoint:constants_1.TENANT_ENDPOINTS.CONFIG_VAR.UPDATE(e),body:a})}async upsert(t){try{return await this.update(Object.assign({},t))}catch(e){return await this.create(t)}}async search(t){return await this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.CONFIG_VAR.SEARCH,body:{pageSize:t&&t<1e3?t:1e3}})}async delete(t){return await 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);
@@ -1 +1 @@
1
- "use strict";var __decorate=this&&this.__decorate||function(t,e,n,a){var o,r=arguments.length,s=r<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,n):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,a);else for(var i=t.length-1;i>=0;i--)(o=t[i])&&(s=(r<3?o(s):r>3?o(e,n,s):o(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s},__metadata=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};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{async getAvatar(t){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})}async getAttachments(t){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
+ "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,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,n);else for(var i=t.length-1;i>=0;i--)(a=t[i])&&(s=(r<3?a(s):r>3?a(e,o,s):a(e,o))||s);return r>3&&s&&Object.defineProperty(e,o,s),s},__metadata=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};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{async getDistanceMatrix(t){return this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.GEOSERVICES.DISTANCE_MATRIX,body:t})}async getDirections(t){return this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.GEOSERVICES.DIRECTIONS,body:t})}async geocodeAddress(t){return this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.GEOSERVICES.GEOCODE,body:t})}async autocompleteAddress(t){return this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.GEOSERVICES.AUTOCOMPLETE,body:t})}async getPlaceDetails(t){return this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.GEOSERVICES.PLACE,body:t})}async getTimezone(t){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(e,t,r,a){var n,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,r):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,a);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(i=(o<3?n(i):o>3?n(t,r,i):n(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},__metadata=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};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{async execute(e,t={}){return await this._performRequest({method:http_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.GRAPHQL.SINGLE,body:"string"==typeof e?{query:e}:{query:e.query,variables:e.variables},headers:t})}async executeBatch(e,t={}){return await this._performRequest({method:http_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.GRAPHQL.BATCH,body:"string"==typeof e?{query:e}:{query:e.query,variables:e.variables},headers:t})}handleResponseData(e){if(!e.data&&e.errors)throw new Error(`GraphQL error: ${JSON.stringify(e.errors)}`)}}exports.GraphQLClient=GraphQLClient,__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object,Object]),__metadata("design:returntype",Promise)],GraphQLClient.prototype,"execute",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object,Object]),__metadata("design:returntype",Promise)],GraphQLClient.prototype,"executeBatch",null);
1
+ "use strict";var __decorate=this&&this.__decorate||function(e,t,r,a){var n,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,r):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,a);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(i=(o<3?n(i):o>3?n(t,r,i):n(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,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,r,a){return new(r||(r=Promise))((function(n,o){function i(e){try{c(a.next(e))}catch(e){o(e)}}function s(e){try{c(a.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}c((a=a.apply(e,t||[])).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(e){return __awaiter(this,arguments,void 0,(function*(e,t={}){return yield this._performRequest({method:http_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.GRAPHQL.SINGLE,body:"string"==typeof e?{query:e}:{query:e.query,variables:e.variables},headers:t})}))}executeBatch(e){return __awaiter(this,arguments,void 0,(function*(e,t={}){const r=e.map((e=>"string"==typeof e?{query:e}:{query:e.query,variables:e.variables})),a=yield this._performRequest({method:http_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.GRAPHQL.BATCH,body:r,headers:t});return a.forEach(((e,t)=>{if(!e.data&&e.errors)throw new Error(`GraphQL batch error at index ${t}: ${JSON.stringify(e.errors)}`)})),a}))}handleResponseData(e){if(Array.isArray(e));else if(!e.data&&e.errors)throw new Error(`GraphQL error: ${JSON.stringify(e.errors)}`)}}exports.GraphQLClient=GraphQLClient,__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object,Object]),__metadata("design:returntype",Promise)],GraphQLClient.prototype,"execute",null),__decorate([(0,monitor_call_1.MonitorCall)(),__metadata("design:type",Function),__metadata("design:paramtypes",[Array,Object]),__metadata("design:returntype",Promise)],GraphQLClient.prototype,"executeBatch",null);
@@ -1 +1 @@
1
- "use strict";var __decorate=this&&this.__decorate||function(t,e,a,n){var r,o=arguments.length,i=o<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--)(r=t[c])&&(i=(o<3?r(i):o>3?r(e,a,i):r(e,a))||i);return o>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)};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{async fetchAllMetadata(){return await this._performRequest({endpoint:constants_1.TENANT_ENDPOINTS.METADATA.ALL})}async fetchObjectMetadata(t){return await 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,a,o){var n,i=arguments.length,s=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,a):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,a,o);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(s=(i<3?n(s):i>3?n(e,a,s):n(e,a))||s);return i>3&&s&&Object.defineProperty(e,a,s),s},__metadata=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};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{async getTemplates(){return await this._performRequest({endpoint:constants_1.TENANT_ENDPOINTS.NOTIFICATIONS.GET_TEMPLATES})}async deleteTemplate(t,e){await this._performRequest({method:constants_1.HttpMethod.DELETE,endpoint:constants_1.TENANT_ENDPOINTS.NOTIFICATIONS.DELETE_TEMPLATE(t,e)})}async setTemplate(t,e,a){await this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.NOTIFICATIONS.SET_TEMPLATE(t,e),body:{template:a}})}async dispatchResources(t){return await this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.NOTIFICATIONS.DISPATCH,body:t})}async notifyAllocatedResources(t){return await this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.NOTIFICATIONS.NOTIFY,body:t})}async notifyJobCancellation(t){return await this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.NOTIFICATIONS.NOTIFY_CANCEL,body:t})}async sendOneOffMessage(t){return await this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.NOTIFICATIONS.ONE_OFF,body:t})}async sendSms(t){return await this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.NOTIFICATIONS.SEND_SMS,body:t})}async requestSmsConfirmation(t){return await 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,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},__metadata=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};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{async get(){return await this._performRequest({endpoint:constants_1.TENANT_ENDPOINTS.ORG_PREFERENCE.GET})}async deploy(e){return await 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)};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{async getVocabularyItems(t,e){return await this._performRequest({endpoint:constants_1.TENANT_ENDPOINTS.VOCABULARY.GET_ITEMS(t,e)})}async addVocabularyItem(t,e,a){return await this._performRequest({method:constants_1.HttpMethod.POST,endpoint:constants_1.TENANT_ENDPOINTS.VOCABULARY.ADD_ITEM(t,e),body:a})}async updateVocabularyItem(t,e,a,n){return await 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);