@skedulo/pulse-solution-services 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -1
- package/README.md +321 -25
- package/dist/clients/artifact-client.js +1 -1
- package/dist/clients/availability-api-client.js +1 -0
- package/dist/clients/base-client.js +1 -1
- package/dist/clients/geo-api-client.js +1 -0
- package/dist/clients/graphql-client.js +1 -1
- package/dist/constants/graphql-constants.js +1 -0
- package/dist/constants/index.js +1 -1
- package/dist/constants/tenant-endpoints.js +1 -1
- package/dist/core/entity-factory.js +1 -0
- package/dist/core/execution-context.js +1 -1
- package/dist/core/execution-options.js +1 -0
- package/dist/core/index.js +1 -1
- package/dist/core/request-context.js +1 -0
- package/dist/core/request-header-constants.js +1 -0
- package/dist/core/tenant-objects.js +1 -0
- package/dist/index.d.ts +708 -151
- package/dist/interfaces/api-client.js +1 -0
- package/dist/interfaces/availability.js +1 -0
- package/dist/interfaces/geoservice-interfaces.js +1 -0
- package/dist/interfaces/index.js +1 -1
- package/dist/services/batch-processor/fetching-strategies/cursor-based-fetching-strategy.js +1 -1
- package/dist/services/batch-processor/fetching-strategies/date-based-fetching-strategy.js +1 -1
- package/dist/services/geoservice.js +1 -0
- package/dist/services/graph-batch/graph-batch-config.d.ts +34 -0
- package/dist/services/graph-batch/graph-batch-config.js +1 -0
- package/dist/services/graph-batch/graph-batch.d.ts +56 -0
- package/dist/services/graph-batch/graph-batch.js +1 -0
- package/dist/services/graph-batch/index.d.ts +3 -0
- package/dist/services/graph-batch/index.js +1 -0
- package/dist/services/graph-batch/pagination-strategy.d.ts +5 -0
- package/dist/services/graph-batch/pagination-strategy.js +1 -0
- package/dist/services/graphql/graphql-query-builder.d.ts +17 -28
- package/dist/services/graphql/graphql-query-builder.js +1 -1
- package/dist/services/graphql/graphql-service.d.ts +20 -13
- package/dist/services/graphql/graphql-service.js +1 -1
- package/dist/services/graphql/queries.d.ts +5 -4
- package/dist/services/graphql/queries.js +1 -1
- package/dist/services/index.js +1 -1
- package/dist/services/resource-availability/builder/data-service.d.ts +10 -0
- package/dist/services/resource-availability/builder/data-service.js +1 -0
- package/dist/services/resource-availability/builder/index.d.ts +3 -0
- package/dist/services/resource-availability/builder/index.js +1 -0
- package/dist/services/resource-availability/builder/resource-availability-service.d.ts +8 -0
- package/dist/services/resource-availability/builder/resource-availability-service.js +1 -0
- package/dist/services/resource-availability/builder/resource-builder.d.ts +17 -0
- package/dist/services/resource-availability/builder/resource-builder.js +1 -0
- package/dist/services/resource-availability/builder/resource-query-param.d.ts +23 -0
- package/dist/services/resource-availability/builder/resource-query-param.js +1 -0
- package/dist/services/resource-availability/index.d.ts +2 -0
- package/dist/services/resource-availability/index.js +1 -0
- package/dist/services/resource-availability/validator/index.d.ts +3 -0
- package/dist/services/resource-availability/validator/index.js +1 -0
- package/dist/services/resource-availability/validator/resource-job-validation.d.ts +11 -0
- package/dist/services/resource-availability/validator/resource-job-validation.js +1 -0
- package/dist/services/resource-availability/validator/resource-validation-option.d.ts +5 -0
- package/dist/services/resource-availability/validator/resource-validation-option.js +1 -0
- package/dist/services/resource-availability/validator/resource-validator.d.ts +13 -0
- package/dist/services/resource-availability/validator/resource-validator.js +1 -0
- package/dist/services/resource-availability/validator/validation-result.d.ts +12 -0
- package/dist/services/resource-availability/validator/validation-result.js +1 -0
- package/dist/utils/datetime-utils.js +1 -0
- package/dist/utils/index.js +1 -1
- package/package.json +7 -2
- package/yarn.lock +38 -0
- package/dist/clients/artifacts/artifact-client.d.ts +0 -19
- package/dist/clients/artifacts/artifact-client.js +0 -1
- package/dist/clients/artifacts/base-artifact-client.d.ts +0 -14
- package/dist/clients/artifacts/base-artifact-client.js +0 -1
- package/dist/clients/artifacts/object-based-artifact-client.d.ts +0 -11
- package/dist/clients/artifacts/object-based-artifact-client.js +0 -1
- package/dist/clients/custom-field-client.js +0 -1
- package/dist/clients/custom-schema-client.js +0 -1
- package/dist/constants/artifact.js +0 -1
- package/dist/constants/config-var.js +0 -1
- package/dist/constants/config-variable-constants.js +0 -1
- package/dist/constants/mobile-notification.js +0 -1
- package/dist/constants/tenant-objects.js +0 -1
- /package/dist/{interfaces/custom-field.js → core/base-config.js} +0 -0
- /package/dist/{interfaces/custom-schema.js → core/tenant-entities.js} +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Job, Resource } from "../../../interfaces";
|
|
2
|
+
import { ResourceJobValidation } from "./resource-job-validation";
|
|
3
|
+
import { ResourceValidationOption } from "./resource-validation-option";
|
|
4
|
+
export declare class ValidationResult {
|
|
5
|
+
private readonly validations;
|
|
6
|
+
private readonly option;
|
|
7
|
+
constructor(validations: ResourceJobValidation[], option: ResourceValidationOption);
|
|
8
|
+
getQualifiedResources(): Partial<Resource>[];
|
|
9
|
+
getJobsWithXQualifiedResources(minQualifiedResources: number): Partial<Job>[];
|
|
10
|
+
getUnqualifiedJobsWithReasons(): ResourceJobValidation[];
|
|
11
|
+
format(): any[];
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ValidationResult=void 0;class ValidationResult{constructor(i,e){this.validations=i,this.option=e}getQualifiedResources(){const i=new Map;for(const e of this.validations)e.isQualified(this.option)&&e.resource.id&&i.set(e.resource.id,e.resource);return Array.from(i.values())}getJobsWithXQualifiedResources(i){const e=new Map;for(const i of this.validations)i.isQualified(this.option)&&i.job.id&&e.set(i.job.id,(e.get(i.job.id)||0)+1);return Array.from(new Set(this.validations.map((i=>i.job)))).filter((t=>(e.get(t.id)||0)>=i))}getUnqualifiedJobsWithReasons(){return this.validations.filter((i=>!i.isQualified(this.option)))}format(){return this.validations.map((i=>({resource:i.resource,job:i.job,qualificationStatus:i.isQualified({checkAvailability:!0,checkConflict:!0,checkTag:!0})?"Qualified":"Not Qualified",reasons:[...i.availableEvent?[]:[{reason:"Resource is not available during the job timeframe."}],...i.conflictEvents.length>0?[{reason:"Conflict Detected",conflictingEvents:i.conflictEvents.map((i=>({id:i.id,name:i.name,eventType:i.eventType})))}]:[],...i.missingTags.length>0?[{reason:"Missing Required Skills",missingSkills:i.missingTags.map((i=>({id:i.id,name:i.name})))}]:[]]})))}}exports.ValidationResult=ValidationResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DateTimeUtils=void 0;const luxon_1=require("luxon");class DateTimeUtils{static toTimezone(t,e){return this.switchTimezone(t,"UTC",e)}static switchTimezone(t,e,a){if(e===a)return t;return luxon_1.DateTime.fromJSDate(t,{zone:e}).setZone(a).toJSDate()}static addMinutes(t,e,a){return luxon_1.DateTime.fromJSDate(t,{zone:a}).plus({minutes:e}).toJSDate()}static addDays(t,e,a){return luxon_1.DateTime.fromJSDate(t,{zone:a}).plus({days:e}).toJSDate()}static addMonths(t,e,a){return luxon_1.DateTime.fromJSDate(t,{zone:a}).plus({months:e}).toJSDate()}static addYears(t,e,a){return luxon_1.DateTime.fromJSDate(t,{zone:a}).plus({years:e}).toJSDate()}static getDate(t,e){return luxon_1.DateTime.fromJSDate(t,{zone:e}).startOf("day").toJSDate()}static getDateFromIsoString(t){return luxon_1.DateTime.fromISO(t,{zone:"UTC"}).toJSDate()}static getDateTimeFromIsoString(t){return luxon_1.DateTime.fromISO(t,{zone:"UTC"}).toJSDate()}static getStartOfDate(t,e){const a="string"==typeof t?this.getDateFromIsoString(t):t;return luxon_1.DateTime.fromJSDate(a,{zone:e}).startOf("day").toJSDate()}static getEndOfDate(t,e){const a=this.getStartOfDate(t,e);return this.addDays(a,1,e)}static isIncluding(t,e){return t.start<=e.start&&t.finish>=e.finish}static isOverlapping(t,e){return t.start<e.finish&&t.finish>e.start}static mergeEvents(t){t.sort(((t,e)=>t.start.getTime()-e.start.getTime()));const e=[];let a=null;for(const i of t)a?new Date(a.finish)>=i.start?(a.finish=i.finish,a.eventType="merged",a.description=a.description?`${a.description}, ${a.name} merged with ${i.name}`:`${a.name} merged with ${i.name}`):(e.push(a),a=i):a=i;return a&&e.push(a),e}}exports.DateTimeUtils=DateTimeUtils;
|
package/dist/utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,o)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),__exportStar=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||__createBinding(t,e,r)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(require("./config-helper"),exports),__exportStar(require("./datetime-utils"),exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skedulo/pulse-solution-services",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "A collection of services and utilities to support solution development on the Pulse platform.",
|
|
5
5
|
"author": "Skedulo",
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,7 +37,12 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@skedulo/function-utilities": "^0.0.6",
|
|
40
|
+
"@types/luxon": "^3.4.2",
|
|
41
|
+
"luxon": "^3.5.0",
|
|
42
|
+
"p-queue": "^8.1.0",
|
|
40
43
|
"typescript": "~5.6.3",
|
|
41
|
-
"
|
|
44
|
+
"uuid": "^11.0.5",
|
|
45
|
+
"winston": "^3.17.0",
|
|
46
|
+
"zod": "^3.24.2"
|
|
42
47
|
}
|
|
43
48
|
}
|
package/yarn.lock
CHANGED
|
@@ -751,6 +751,11 @@
|
|
|
751
751
|
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841"
|
|
752
752
|
integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==
|
|
753
753
|
|
|
754
|
+
"@types/luxon@^3.4.2":
|
|
755
|
+
version "3.4.2"
|
|
756
|
+
resolved "https://registry.yarnpkg.com/@types/luxon/-/luxon-3.4.2.tgz#e4fc7214a420173cea47739c33cdf10874694db7"
|
|
757
|
+
integrity sha512-TifLZlFudklWlMBfhubvgqTXRzLDI5pCbGa4P8a3wPyUQSW+1xQ5eDsreP9DWHX3tjq1ke96uYG/nwundroWcA==
|
|
758
|
+
|
|
754
759
|
"@types/node@*":
|
|
755
760
|
version "22.12.0"
|
|
756
761
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.12.0.tgz#bf8af3b2af0837b5a62a368756ff2b705ae0048c"
|
|
@@ -1394,6 +1399,11 @@ esutils@^2.0.2:
|
|
|
1394
1399
|
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
|
|
1395
1400
|
integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==
|
|
1396
1401
|
|
|
1402
|
+
eventemitter3@^5.0.1:
|
|
1403
|
+
version "5.0.1"
|
|
1404
|
+
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4"
|
|
1405
|
+
integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==
|
|
1406
|
+
|
|
1397
1407
|
execa@^5.0.0:
|
|
1398
1408
|
version "5.1.1"
|
|
1399
1409
|
resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd"
|
|
@@ -2280,6 +2290,11 @@ lru-cache@^5.1.1:
|
|
|
2280
2290
|
dependencies:
|
|
2281
2291
|
yallist "^3.0.2"
|
|
2282
2292
|
|
|
2293
|
+
luxon@^3.5.0:
|
|
2294
|
+
version "3.5.0"
|
|
2295
|
+
resolved "https://registry.yarnpkg.com/luxon/-/luxon-3.5.0.tgz#6b6f65c5cd1d61d1fd19dbf07ee87a50bf4b8e20"
|
|
2296
|
+
integrity sha512-rh+Zjr6DNfUYR3bPwJEnuwDdqMbxZW7LOQfUN4B54+Cl+0o5zaU9RJ6bcidfDtC1cWCZXQ+nvX8bf6bAji37QQ==
|
|
2297
|
+
|
|
2283
2298
|
make-dir@^4.0.0:
|
|
2284
2299
|
version "4.0.0"
|
|
2285
2300
|
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e"
|
|
@@ -2436,6 +2451,19 @@ p-locate@^5.0.0:
|
|
|
2436
2451
|
dependencies:
|
|
2437
2452
|
p-limit "^3.0.2"
|
|
2438
2453
|
|
|
2454
|
+
p-queue@^8.1.0:
|
|
2455
|
+
version "8.1.0"
|
|
2456
|
+
resolved "https://registry.yarnpkg.com/p-queue/-/p-queue-8.1.0.tgz#d71929249868b10b16f885d8a82beeaf35d32279"
|
|
2457
|
+
integrity sha512-mxLDbbGIBEXTJL0zEx8JIylaj3xQ7Z/7eEVjcF9fJX4DBiH9oqe+oahYnlKKxm0Ci9TlWTyhSHgygxMxjIB2jw==
|
|
2458
|
+
dependencies:
|
|
2459
|
+
eventemitter3 "^5.0.1"
|
|
2460
|
+
p-timeout "^6.1.2"
|
|
2461
|
+
|
|
2462
|
+
p-timeout@^6.1.2:
|
|
2463
|
+
version "6.1.4"
|
|
2464
|
+
resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-6.1.4.tgz#418e1f4dd833fa96a2e3f532547dd2abdb08dbc2"
|
|
2465
|
+
integrity sha512-MyIV3ZA/PmyBN/ud8vV9XzwTrNtR4jFrObymZYnZqMmW0zA8Z17vnT0rBgFE/TlohB+YCHqXMgZzb3Csp49vqg==
|
|
2466
|
+
|
|
2439
2467
|
p-try@^2.0.0:
|
|
2440
2468
|
version "2.2.0"
|
|
2441
2469
|
resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6"
|
|
@@ -2904,6 +2932,11 @@ util-deprecate@^1.0.1:
|
|
|
2904
2932
|
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
|
|
2905
2933
|
integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==
|
|
2906
2934
|
|
|
2935
|
+
uuid@^11.0.5:
|
|
2936
|
+
version "11.0.5"
|
|
2937
|
+
resolved "https://registry.yarnpkg.com/uuid/-/uuid-11.0.5.tgz#07b46bdfa6310c92c3fb3953a8720f170427fc62"
|
|
2938
|
+
integrity sha512-508e6IcKLrhxKdBbcA2b4KQZlLVp2+J5UwQ6F7Drckkc5N9ZJwFa4TgWtsww9UG8fGHbm6gbV19TdM5pQ4GaIA==
|
|
2939
|
+
|
|
2907
2940
|
v8-to-istanbul@^9.0.1:
|
|
2908
2941
|
version "9.3.0"
|
|
2909
2942
|
resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz#b9572abfa62bd556c16d75fdebc1a411d5ff3175"
|
|
@@ -3012,3 +3045,8 @@ yocto-queue@^0.1.0:
|
|
|
3012
3045
|
version "0.1.0"
|
|
3013
3046
|
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
|
|
3014
3047
|
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
|
|
3048
|
+
|
|
3049
|
+
zod@^3.24.2:
|
|
3050
|
+
version "3.24.2"
|
|
3051
|
+
resolved "https://registry.yarnpkg.com/zod/-/zod-3.24.2.tgz#8efa74126287c675e92f46871cfc8d15c34372b3"
|
|
3052
|
+
integrity sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { BaseClient } from "../base-client";
|
|
2
|
-
type ArtifactParams = {
|
|
3
|
-
objectName?: string;
|
|
4
|
-
viewTypeName?: string;
|
|
5
|
-
name?: string;
|
|
6
|
-
scope?: string;
|
|
7
|
-
};
|
|
8
|
-
export declare class ArtifactClient extends BaseClient {
|
|
9
|
-
private artifactType;
|
|
10
|
-
private baseEndpoint;
|
|
11
|
-
constructor(config: any, artifactType: string);
|
|
12
|
-
list<T>(): Promise<T[]>;
|
|
13
|
-
get<T>(params?: ArtifactParams): Promise<T>;
|
|
14
|
-
create<T>(params: ArtifactParams, artifactData: Partial<T>): Promise<T>;
|
|
15
|
-
update<T>(params: ArtifactParams, artifactData: Partial<T>): Promise<T>;
|
|
16
|
-
delete(params: ArtifactParams): Promise<void>;
|
|
17
|
-
private buildEndpoint;
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))((function(r,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ArtifactClient=void 0;const constants_1=require("../../constants"),base_client_1=require("../base-client");class ArtifactClient extends base_client_1.BaseClient{constructor(t,e){super(t),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.HTTP_METHOD.POST,endpoint:this.buildEndpoint(t),body:e})}))}update(t,e){return __awaiter(this,void 0,void 0,(function*(){return this.performRequest({method:constants_1.HTTP_METHOD.PUT,endpoint:this.buildEndpoint(t),body:e})}))}delete(t){return __awaiter(this,void 0,void 0,(function*(){yield this.performRequest({method:constants_1.HTTP_METHOD.DELETE,endpoint:this.buildEndpoint(t)})}))}buildEndpoint(t){const{objectName:e,viewTypeName:i,name:n,scope:r}=t;let o=this.baseEndpoint;return e&&(o+=`/${e}`),i&&(o+=`/${i}`),n&&(o+=`/${n}`),r&&(o+=`/${r}`),o}}exports.ArtifactClient=ArtifactClient;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { BaseClient } from "../base-client";
|
|
2
|
-
/**
|
|
3
|
-
* Handles artifacts that only require `name` in the endpoint.
|
|
4
|
-
*/
|
|
5
|
-
export declare class BaseArtifactClient extends BaseClient {
|
|
6
|
-
protected artifactType: string;
|
|
7
|
-
protected artifactEndpoint: string;
|
|
8
|
-
constructor(config: any, artifactType: string);
|
|
9
|
-
list<T>(): Promise<T[]>;
|
|
10
|
-
get<T>(name: string): Promise<T>;
|
|
11
|
-
create<T>(name: string, artifactData: Partial<T>): Promise<T>;
|
|
12
|
-
update<T>(name: string, artifactData: Partial<T>): Promise<T>;
|
|
13
|
-
delete(name: string): Promise<void>;
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))((function(r,a){function o(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,s)}c((n=n.apply(t,e||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.BaseArtifactClient=void 0;const constants_1=require("../../constants"),base_client_1=require("../base-client");class BaseArtifactClient extends base_client_1.BaseClient{constructor(t,e){super(t),this.artifactType=e,this.artifactEndpoint=`artifacts/${this.artifactType}`}list(){return __awaiter(this,void 0,void 0,(function*(){return this.performRequest({endpoint:this.artifactEndpoint})}))}get(t){return __awaiter(this,void 0,void 0,(function*(){return this.performRequest({endpoint:`${this.artifactEndpoint}/${t}`})}))}create(t,e){return __awaiter(this,void 0,void 0,(function*(){return this.performRequest({method:constants_1.HTTP_METHOD.POST,endpoint:`${this.artifactEndpoint}/${t}`,body:e})}))}update(t,e){return __awaiter(this,void 0,void 0,(function*(){return this.performRequest({method:constants_1.HTTP_METHOD.PUT,endpoint:`${this.artifactEndpoint}/${t}`,body:e})}))}delete(t){return __awaiter(this,void 0,void 0,(function*(){yield this.performRequest({method:constants_1.HTTP_METHOD.DELETE,endpoint:`${this.artifactEndpoint}/${t}`})}))}}exports.BaseArtifactClient=BaseArtifactClient;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { BaseArtifactClient } from "./base-artifact-client";
|
|
2
|
-
/**
|
|
3
|
-
* Handles artifacts that require both `objectName` and `name` in the endpoint.
|
|
4
|
-
*/
|
|
5
|
-
export declare class ObjectBasedArtifactClient extends BaseArtifactClient {
|
|
6
|
-
constructor(config: any, artifactType: string);
|
|
7
|
-
getArtifact<T>(objectName: string, name: string): Promise<T>;
|
|
8
|
-
createOrUpdateArtifact<T>(objectName: string, name: string, artifactData: Partial<T>): Promise<T>;
|
|
9
|
-
updateArtifact<T>(objectName: string, name: string, artifactData: Partial<T>): Promise<T>;
|
|
10
|
-
deleteArtifact(objectName: string, name: string): Promise<void>;
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))((function(r,a){function o(t){try{s(n.next(t))}catch(t){a(t)}}function c(t){try{s(n.throw(t))}catch(t){a(t)}}function s(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,c)}s((n=n.apply(t,e||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ObjectBasedArtifactClient=void 0;const constants_1=require("../../constants"),base_artifact_client_1=require("./base-artifact-client");class ObjectBasedArtifactClient extends base_artifact_client_1.BaseArtifactClient{constructor(t,e){super(t,e)}getArtifact(t,e){return __awaiter(this,void 0,void 0,(function*(){return this.performRequest({endpoint:`${this.artifactEndpoint}/${t}/${e}`})}))}createOrUpdateArtifact(t,e,i){return __awaiter(this,void 0,void 0,(function*(){return this.performRequest({method:constants_1.HTTP_METHOD.POST,endpoint:`${this.artifactEndpoint}/${t}/${e}`,body:i})}))}updateArtifact(t,e,i){return __awaiter(this,void 0,void 0,(function*(){return this.performRequest({method:constants_1.HTTP_METHOD.PUT,endpoint:`${this.artifactEndpoint}/${t}/${e}`,body:i})}))}deleteArtifact(t,e){return __awaiter(this,void 0,void 0,(function*(){yield this.performRequest({method:constants_1.HTTP_METHOD.DELETE,endpoint:`${this.artifactEndpoint}/${t}/${e}`})}))}}exports.ObjectBasedArtifactClient=ObjectBasedArtifactClient;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,n,i){return new(n||(n=Promise))((function(o,s){function r(t){try{d(i.next(t))}catch(t){s(t)}}function a(t){try{d(i.throw(t))}catch(t){s(t)}}function d(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(r,a)}d((i=i.apply(t,e||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CustomFieldClient=void 0;const constants_1=require("../constants"),base_client_1=require("./base-client");class CustomFieldClient extends base_client_1.BaseClient{getCustomFields(t){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({endpoint:constants_1.TENANT_ENDPOINTS.CUSTOM_FIELD.GET_FIELDS(t)})}))}createStandaloneField(t){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({method:"POST",endpoint:constants_1.TENANT_ENDPOINTS.CUSTOM_FIELD.CREATE_STANDALONE,body:t})}))}updateCustomField(t){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({method:"POST",endpoint:constants_1.TENANT_ENDPOINTS.CUSTOM_FIELD.UPDATE,body:t})}))}deleteStandaloneField(t){return __awaiter(this,void 0,void 0,(function*(){yield this.performRequest({method:"DELETE",endpoint:constants_1.TENANT_ENDPOINTS.CUSTOM_FIELD.DELETE_STANDALONE(t)})}))}}exports.CustomFieldClient=CustomFieldClient;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,n,i){return new(n||(n=Promise))((function(o,s){function r(t){try{c(i.next(t))}catch(t){s(t)}}function a(t){try{c(i.throw(t))}catch(t){s(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(r,a)}c((i=i.apply(t,e||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CustomSchemaClient=void 0;const constants_1=require("../constants"),base_client_1=require("./base-client");class CustomSchemaClient extends base_client_1.BaseClient{getCustomSchemas(){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({endpoint:constants_1.TENANT_ENDPOINTS.CUSTOM_SCHEMA.GET_ALL})}))}updateCustomSchemas(t){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({method:"POST",endpoint:constants_1.TENANT_ENDPOINTS.CUSTOM_SCHEMA.UPDATE,body:t})}))}createStandaloneSchema(t){return __awaiter(this,void 0,void 0,(function*(){return yield this.performRequest({method:"POST",endpoint:constants_1.TENANT_ENDPOINTS.CUSTOM_SCHEMA.CREATE_STANDALONE,body:t})}))}deleteStandaloneSchema(t){return __awaiter(this,void 0,void 0,(function*(){yield this.performRequest({method:"DELETE",endpoint:constants_1.TENANT_ENDPOINTS.CUSTOM_SCHEMA.DELETE_STANDALONE(t)})}))}}exports.CustomSchemaClient=CustomSchemaClient;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var ArtifactType;Object.defineProperty(exports,"__esModule",{value:!0}),exports.ArtifactType=void 0,function(o){o.CUSTOM_OBJECT="custom-object",o.CUSTOM_FIELD="custom-field",o.FUNCTION="function",o.MOBILE_EXTENSION="mobile-extension",o.PUBLIC_PAGE="public-page",o.TRIGGERED_ACTION="triggered-action",o.USER_ROLE="user-role",o.WEBHOOK="webhook",o.HORIZON_CUSTOM_RESOURCE="horizon-custom-resource",o.HORIZON_PAGE="horizon-page",o.HORIZON_TEMPLATE="horizon-template",o.HORIZON_TENANT_CONFIG="horizon-tenant-config",o.HORIZON_COMPONENT_BUNDLE="horizon-component-bundle",o.HORIZON_VIEW_TYPE="horizon-view-type",o.HORIZON_CUSTOM_ACTION="horizon-custom-action",o.HORIZON_VIEW_STATE="horizon-view-state",o.HORIZON_DATA_FIELD_OVERLAY="horizon-data-field-overlay",o.HORIZON_DATA_RELATIONSHIP_OVERLAY="horizon-data-relationship-overlay",o.HORIZON_LIST_CONFIG="horizon-list-config",o.HORIZON_LIST_VIEW_STATE="horizon-list-view-state"}(ArtifactType||(exports.ArtifactType=ArtifactType={}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CONFIG_VAR_STATUS=exports.CONFIG_VAR_TYPE=void 0,exports.CONFIG_VAR_TYPE={PLAIN_TEXT:"plain-text",SECRET:"secret"},exports.CONFIG_VAR_STATUS={ACTIVE:"active",INACTIVE:"inactive",EXPIRED:"expired"};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var ConfigVariableType,ConfigVariableStatus;Object.defineProperty(exports,"__esModule",{value:!0}),exports.ConfigVariableStatus=exports.ConfigVariableType=void 0,function(e){e.PLAIN_TEXT="plain-text",e.SECRET="secret"}(ConfigVariableType||(exports.ConfigVariableType=ConfigVariableType={})),function(e){e.ACTIVE="active",e.INACTIVE="inactive",e.EXPIRED="expired"}(ConfigVariableStatus||(exports.ConfigVariableStatus=ConfigVariableStatus={}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var NotificationTemplate,NotificationType;Object.defineProperty(exports,"__esModule",{value:!0}),exports.NotificationType=exports.NotificationTemplate=void 0,function(i){i.JOB_DISPATCH="job_dispatch",i.JOB_REMINDER="job_reminder",i.JOB_CANCELLED="job_cancelled",i.JOB_OFFER="job_offer"}(NotificationTemplate||(exports.NotificationTemplate=NotificationTemplate={})),function(i){i.SMS="sms",i.PUSH="push"}(NotificationType||(exports.NotificationType=NotificationType={}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var TenantObject;Object.defineProperty(exports,"__esModule",{value:!0}),exports.TenantObject=void 0,function(e){e.Accounts="Accounts",e.Jobs="Jobs",e.JobAllocations="JobAllocations",e.Regions="Regions",e.Contacts="Contacts",e.Locations="Locations",e.Resources="Resources",e.Tags="Tags",e.JobTags="JobTags",e.ResourceTags="ResourceTags",e.Activities="Activities",e.Availabilities="Availabilities",e.Holidays="Holidays",e.AvailabilityPatterns="AvailabilityPatterns",e.AvailabilityPatternResources="AvailabilityPatternResources",e.AccountResourceScores="AccountResourceScores",e.LocationResourceScores="LocationResourceScores",e.Products="Products",e.JobProducts="JobProducts"}(TenantObject||(exports.TenantObject=TenantObject={}));
|
|
File without changes
|
|
File without changes
|