@skedulo/pulse-solution-services 0.0.12 → 0.0.14
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 +4 -0
- package/README.md +48 -3
- package/dist/clients/files-api-client.js +1 -0
- package/dist/clients/index.js +1 -1
- package/dist/constants/tenant-endpoints.js +1 -1
- package/dist/core/execution-context.js +1 -1
- package/dist/core/request-header-constants.js +1 -1
- package/dist/index.d.ts +550 -530
- package/dist/interfaces/index.js +1 -1
- package/dist/{services/batch-processor → monitoring}/index.js +1 -1
- package/dist/services/graphql/graphql-service.js +1 -1
- package/dist/services/index.js +1 -1
- package/dist/services/resource-availability/builder/resource-availability-service.d.ts +1 -1
- package/dist/services/resource-availability/validator/index.d.ts +1 -0
- package/dist/services/resource-availability/validator/index.js +1 -1
- package/dist/services/resource-availability/validator/resource-job-validation.d.ts +1 -1
- package/dist/services/resource-availability/validator/resource-validator.d.ts +1 -1
- package/dist/services/resource-availability/validator/validation-result.d.ts +1 -1
- package/package.json +6 -2
- package/yarn.lock +246 -12
- package/dist/monitoring/monitor-call.decorator.js +0 -1
- package/dist/services/batch-processor/batch-orchestrator.d.ts +0 -18
- package/dist/services/batch-processor/batch-orchestrator.js +0 -1
- package/dist/services/batch-processor/constants.d.ts +0 -22
- package/dist/services/batch-processor/constants.js +0 -1
- package/dist/services/batch-processor/fetching-strategies/batch-number-fetching-strategy.d.ts +0 -6
- package/dist/services/batch-processor/fetching-strategies/batch-number-fetching-strategy.js +0 -1
- package/dist/services/batch-processor/fetching-strategies/cursor-based-fetching-strategy.d.ts +0 -8
- package/dist/services/batch-processor/fetching-strategies/cursor-based-fetching-strategy.js +0 -1
- package/dist/services/batch-processor/fetching-strategies/date-based-fetching-strategy.d.ts +0 -4
- package/dist/services/batch-processor/fetching-strategies/date-based-fetching-strategy.js +0 -1
- package/dist/services/batch-processor/fetching-strategies/fetching-strategy-factory.d.ts +0 -9
- package/dist/services/batch-processor/fetching-strategies/fetching-strategy-factory.js +0 -1
- package/dist/services/batch-processor/fetching-strategies/index.d.ts +0 -1
- package/dist/services/batch-processor/fetching-strategies/index.js +0 -1
- package/dist/services/batch-processor/index.d.ts +0 -2
- package/dist/services/batch-processor/interfaces.d.ts +0 -33
- package/dist/services/batch-processor/interfaces.js +0 -1
- package/dist/services/batch-processor/workers/custom-worker.d.ts +0 -5
- package/dist/services/batch-processor/workers/custom-worker.js +0 -1
- package/dist/services/batch-processor/workers/delete-worker.d.ts +0 -4
- package/dist/services/batch-processor/workers/delete-worker.js +0 -1
- package/dist/services/batch-processor/workers/index.d.ts +0 -2
- package/dist/services/batch-processor/workers/index.js +0 -1
- package/dist/services/batch-processor/workers/update-worker.d.ts +0 -4
- package/dist/services/batch-processor/workers/update-worker.js +0 -1
- package/dist/services/batch-processor/workers/worker-factory.d.ts +0 -6
- package/dist/services/batch-processor/workers/worker-factory.js +0 -1
- package/dist/services/batch-processor/workers/worker-interfaces.d.ts +0 -4
- package/dist/services/batch-processor/workers/worker-interfaces.js +0 -1
- package/dist/services/locking-service.js +0 -1
- /package/dist/interfaces/{locking-service-interfaces.js → files.js} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,60 +1,122 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
export declare enum ArtifactType {
|
|
4
|
+
CUSTOM_OBJECT = "custom-object",
|
|
5
|
+
CUSTOM_FIELD = "custom-field",
|
|
6
|
+
FUNCTION = "function",
|
|
7
|
+
MOBILE_EXTENSION = "mobile-extension",
|
|
8
|
+
PUBLIC_PAGE = "public-page",
|
|
9
|
+
TRIGGERED_ACTION = "triggered-action",
|
|
10
|
+
USER_ROLE = "user-role",
|
|
11
|
+
WEBHOOK = "webhook",
|
|
12
|
+
HORIZON_CUSTOM_RESOURCE = "horizon-custom-resource",
|
|
13
|
+
HORIZON_PAGE = "horizon-page",
|
|
14
|
+
HORIZON_TEMPLATE = "horizon-template",
|
|
15
|
+
HORIZON_TENANT_CONFIG = "horizon-tenant-config",
|
|
16
|
+
HORIZON_COMPONENT_BUNDLE = "horizon-component-bundle",
|
|
17
|
+
HORIZON_VIEW_TYPE = "horizon-view-type",
|
|
18
|
+
HORIZON_CUSTOM_ACTION = "horizon-custom-action",
|
|
19
|
+
HORIZON_VIEW_STATE = "horizon-view-state",
|
|
20
|
+
HORIZON_DATA_FIELD_OVERLAY = "horizon-data-field-overlay",
|
|
21
|
+
HORIZON_DATA_RELATIONSHIP_OVERLAY = "horizon-data-relationship-overlay",
|
|
22
|
+
HORIZON_LIST_CONFIG = "horizon-list-config",
|
|
23
|
+
HORIZON_LIST_VIEW_STATE = "horizon-list-view-state"
|
|
11
24
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export interface ObjectMetadata extends Metadata {
|
|
16
|
-
relationships: any[];
|
|
17
|
-
fields: any[];
|
|
25
|
+
export declare enum ConfigVariableType {
|
|
26
|
+
PLAIN_TEXT = "plain-text",
|
|
27
|
+
SECRET = "secret"
|
|
18
28
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
schemaMapping: string;
|
|
24
|
-
mapping: string;
|
|
25
|
-
fieldMapping: string;
|
|
29
|
+
export declare enum ConfigVariableStatus {
|
|
30
|
+
ACTIVE = "active",
|
|
31
|
+
INACTIVE = "inactive",
|
|
32
|
+
EXPIRED = "expired"
|
|
26
33
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
mapping: string;
|
|
33
|
-
type: string;
|
|
34
|
-
nillable: boolean;
|
|
35
|
-
length: number;
|
|
36
|
-
maxLength: number | null;
|
|
37
|
-
precision: number | null;
|
|
38
|
-
scale: number | null;
|
|
39
|
-
upsertKey: boolean;
|
|
40
|
-
unique: boolean;
|
|
41
|
-
readOnly: boolean;
|
|
42
|
-
accessMode: "read_only" | "read_write";
|
|
43
|
-
relationship: RelationshipMapping | null;
|
|
44
|
-
values: Array<PicklistValue>;
|
|
45
|
-
name: string;
|
|
34
|
+
export declare enum GraphqlOperations {
|
|
35
|
+
INSERT = "insert",
|
|
36
|
+
UPDATE = "update",
|
|
37
|
+
DELETE = "delete",
|
|
38
|
+
UPSERT = "upsert"
|
|
46
39
|
}
|
|
47
|
-
export
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
40
|
+
export declare enum HttpMethod {
|
|
41
|
+
GET = "GET",
|
|
42
|
+
POST = "POST",
|
|
43
|
+
PUT = "PUT",
|
|
44
|
+
DELETE = "DELETE",
|
|
45
|
+
PATCH = "PATCH"
|
|
52
46
|
}
|
|
53
|
-
export
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
47
|
+
export declare enum NotificationTemplate {
|
|
48
|
+
JOB_DISPATCH = "job_dispatch",
|
|
49
|
+
JOB_REMINDER = "job_reminder",
|
|
50
|
+
JOB_CANCELLED = "job_cancelled",
|
|
51
|
+
JOB_OFFER = "job_offer"
|
|
52
|
+
}
|
|
53
|
+
export declare enum NotificationType {
|
|
54
|
+
SMS = "sms",
|
|
55
|
+
PUSH = "push"
|
|
57
56
|
}
|
|
57
|
+
export declare const TENANT_ENDPOINTS: {
|
|
58
|
+
readonly CONFIG_VAR: {
|
|
59
|
+
readonly CREATE: "configuration/extension";
|
|
60
|
+
readonly GET: (key: string) => string;
|
|
61
|
+
readonly UPDATE: (key: string) => string;
|
|
62
|
+
readonly DELETE: (key: string) => string;
|
|
63
|
+
readonly SEARCH: "configuration/extension/search";
|
|
64
|
+
};
|
|
65
|
+
readonly GRAPHQL: {
|
|
66
|
+
readonly SINGLE: "graphql/graphql";
|
|
67
|
+
readonly BATCH: "graphql/graphql/batch";
|
|
68
|
+
};
|
|
69
|
+
readonly METADATA: {
|
|
70
|
+
readonly ALL: "custom/metadata";
|
|
71
|
+
readonly OBJECT: (objectMapping: string) => string;
|
|
72
|
+
};
|
|
73
|
+
readonly ORG_PREFERENCE: {
|
|
74
|
+
readonly GET: "config/org_preference";
|
|
75
|
+
readonly UPDATE: "config/org_preference";
|
|
76
|
+
};
|
|
77
|
+
readonly CONFIG_TEMPLATE: {
|
|
78
|
+
readonly GET_TEMPLATES: (objectName: string) => string;
|
|
79
|
+
readonly GET_VALUES: (templateId: string) => string;
|
|
80
|
+
readonly UPDATE_VALUES: (templateId: string) => string;
|
|
81
|
+
readonly CREATE: "config/template";
|
|
82
|
+
readonly DELETE: (templateId: string) => string;
|
|
83
|
+
};
|
|
84
|
+
readonly CONFIG_FEATURES: {
|
|
85
|
+
readonly GET: "config/features";
|
|
86
|
+
readonly UPDATE: (tenantId: string) => string;
|
|
87
|
+
};
|
|
88
|
+
readonly VOCABULARY: {
|
|
89
|
+
readonly GET_ITEMS: (schemaName: string, fieldName: string) => string;
|
|
90
|
+
readonly ADD_ITEM: (schemaName: string, fieldName: string) => string;
|
|
91
|
+
readonly UPDATE_ITEM: (schemaName: string, fieldName: string, value: string) => string;
|
|
92
|
+
};
|
|
93
|
+
readonly NOTIFICATIONS: {
|
|
94
|
+
readonly GET_TEMPLATES: "notifications/v2/templates";
|
|
95
|
+
readonly DELETE_TEMPLATE: (template: string, templateType: string) => string;
|
|
96
|
+
readonly SET_TEMPLATE: (type: string, protocol: string) => string;
|
|
97
|
+
readonly DISPATCH: "notifications/dispatch";
|
|
98
|
+
readonly NOTIFY: "notifications/notify";
|
|
99
|
+
readonly NOTIFY_CANCEL: "notifications/notify_cancel";
|
|
100
|
+
readonly ONE_OFF: "notifications/oneoff";
|
|
101
|
+
readonly SEND_SMS: "notifications/sms";
|
|
102
|
+
readonly SMS_CONFIRMATION_REQUEST: "notifications/sms/confirmation_request";
|
|
103
|
+
};
|
|
104
|
+
readonly GEOSERVICES: {
|
|
105
|
+
readonly DISTANCE_MATRIX: "geoservices/distanceMatrix";
|
|
106
|
+
readonly DIRECTIONS: "geoservices/directions";
|
|
107
|
+
readonly GEOCODE: "geoservices/geocode";
|
|
108
|
+
readonly AUTOCOMPLETE: "geoservices/autocomplete";
|
|
109
|
+
readonly PLACE: "geoservices/place";
|
|
110
|
+
readonly TIMEZONE: "geoservices/timezone";
|
|
111
|
+
};
|
|
112
|
+
readonly AVAILABILITY: {
|
|
113
|
+
readonly SIMPLE: "availability/simple";
|
|
114
|
+
};
|
|
115
|
+
readonly FILES: {
|
|
116
|
+
readonly AVATAR: "files/avatar";
|
|
117
|
+
readonly ATTACHMENTS: (parentId: string) => string;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
58
120
|
/**
|
|
59
121
|
* Represents execution options for GraphQL requests.
|
|
60
122
|
* This class encapsulates metadata and execution settings
|
|
@@ -79,6 +141,11 @@ export declare class ExecutionOptions {
|
|
|
79
141
|
*/
|
|
80
142
|
constructor(initialValues?: Partial<ExecutionOptions>);
|
|
81
143
|
}
|
|
144
|
+
export interface BaseConfig {
|
|
145
|
+
apiServer: string;
|
|
146
|
+
apiToken: string;
|
|
147
|
+
internalApiToken?: string;
|
|
148
|
+
}
|
|
82
149
|
export interface RequestParams {
|
|
83
150
|
method?: string;
|
|
84
151
|
endpoint: string;
|
|
@@ -131,43 +198,95 @@ export declare class BaseClient {
|
|
|
131
198
|
*/
|
|
132
199
|
protected handleException(error: any): void;
|
|
133
200
|
}
|
|
201
|
+
export type ArtifactParams = {
|
|
202
|
+
objectName?: string;
|
|
203
|
+
viewTypeName?: string;
|
|
204
|
+
name?: string;
|
|
205
|
+
scope?: string;
|
|
206
|
+
};
|
|
207
|
+
export declare class ArtifactClient extends BaseClient {
|
|
208
|
+
private artifactType;
|
|
209
|
+
private baseEndpoint;
|
|
210
|
+
constructor(config: any, artifactType: ArtifactType, executionOptions?: Partial<ExecutionOptions>);
|
|
211
|
+
list<T>(): Promise<T[]>;
|
|
212
|
+
get<T>(params?: ArtifactParams): Promise<T>;
|
|
213
|
+
create<T>(params: ArtifactParams, artifactData: Partial<T>): Promise<T>;
|
|
214
|
+
update<T>(params: ArtifactParams, artifactData: Partial<T>): Promise<T>;
|
|
215
|
+
delete(params: ArtifactParams): Promise<void>;
|
|
216
|
+
private buildEndpoint;
|
|
217
|
+
}
|
|
218
|
+
export interface AvailabilityRequestParams {
|
|
219
|
+
/**
|
|
220
|
+
* Array of resource IDs for which availability is requested.
|
|
221
|
+
* Must contain at least one and at most 200 resource IDs.
|
|
222
|
+
*/
|
|
223
|
+
resourceIds: string[];
|
|
224
|
+
/**
|
|
225
|
+
* The UTC datetime from which to start fetching availability (ISO 8601 format).
|
|
226
|
+
*/
|
|
227
|
+
start: string;
|
|
228
|
+
/**
|
|
229
|
+
* The UTC datetime until which to fetch availability (ISO 8601 format).
|
|
230
|
+
* Must be after start and within 375 days.
|
|
231
|
+
*/
|
|
232
|
+
end: string;
|
|
233
|
+
/**
|
|
234
|
+
* If true, merged availability time intervals are returned in the response.
|
|
235
|
+
* Defaults to false.
|
|
236
|
+
*/
|
|
237
|
+
mergedAvailabilities?: boolean;
|
|
238
|
+
/**
|
|
239
|
+
* If true (or omitted), a list of availability entries is returned.
|
|
240
|
+
* Defaults to true.
|
|
241
|
+
*/
|
|
242
|
+
entries?: boolean;
|
|
243
|
+
}
|
|
244
|
+
export interface AvailabilityResult {
|
|
245
|
+
resourceId: string;
|
|
246
|
+
mergedAvailabilities?: {
|
|
247
|
+
start: string;
|
|
248
|
+
end: string;
|
|
249
|
+
}[];
|
|
250
|
+
entries?: AvailabilityEntry[];
|
|
251
|
+
}
|
|
252
|
+
export interface AvailabilityEntry {
|
|
253
|
+
type: "template" | "pattern" | "override" | "holiday";
|
|
254
|
+
start: string;
|
|
255
|
+
end: string;
|
|
256
|
+
available: boolean;
|
|
257
|
+
templateEntryId?: string;
|
|
258
|
+
name?: string;
|
|
259
|
+
patternId?: string;
|
|
260
|
+
patternRecordId?: string;
|
|
261
|
+
}
|
|
134
262
|
/**
|
|
135
|
-
*
|
|
263
|
+
* AvailabilityClient class to handle API requests related to availability.
|
|
136
264
|
* Extends BaseClient to perform API operations.
|
|
137
265
|
*/
|
|
138
|
-
export declare class
|
|
139
|
-
/**
|
|
140
|
-
* Fetches all metadata mappings from the metadata endpoint.
|
|
141
|
-
* @returns {Promise<Metadata[]>} - A promise resolving to an object containing an array of Metadata.
|
|
142
|
-
*/
|
|
143
|
-
fetchAllMetadata(): Promise<Metadata[]>;
|
|
266
|
+
export declare class AvailabilityAPIClient extends BaseClient {
|
|
144
267
|
/**
|
|
145
|
-
* Fetches
|
|
146
|
-
* @param {
|
|
147
|
-
* @returns {Promise<
|
|
268
|
+
* Fetches resource availability based on the given request parameters.
|
|
269
|
+
* @param {AvailabilityRequestParams} params - The request parameters for availability.
|
|
270
|
+
* @returns {Promise<AvailabilityResult[]>} - The availability data for the requested resources.
|
|
148
271
|
*/
|
|
149
|
-
|
|
272
|
+
fetchAvailability(params: AvailabilityRequestParams): Promise<AvailabilityResult[]>;
|
|
150
273
|
}
|
|
151
274
|
/**
|
|
152
|
-
*
|
|
275
|
+
* ConfigFeatureClient class to handle API requests related to feature flags.
|
|
276
|
+
* Extends BaseClient to perform API operations.
|
|
153
277
|
*/
|
|
154
|
-
export declare class
|
|
155
|
-
private client;
|
|
156
|
-
constructor(client: MetadataClient);
|
|
278
|
+
export declare class ConfigFeaturesClient extends BaseClient {
|
|
157
279
|
/**
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
* @param objectNames - The names of the objects.
|
|
161
|
-
* @returns A promise that resolves to metadata records.
|
|
280
|
+
* Fetches feature flags configuration.
|
|
281
|
+
* @returns {Promise<Record<string, any>>} - A promise resolving to the sorted feature flags in JSON string format.
|
|
162
282
|
*/
|
|
163
|
-
|
|
283
|
+
get(): Promise<Record<string, any>>;
|
|
164
284
|
/**
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
* @
|
|
168
|
-
* @returns An object containing the picklist values for each picklist field.
|
|
285
|
+
* Deploys feature flags configuration.
|
|
286
|
+
* @param {string} newConfig - The new configuration to be deployed.
|
|
287
|
+
* @returns {Promise<Record<string, any>>} - A promise resolving when the configuration is successfully deployed.
|
|
169
288
|
*/
|
|
170
|
-
|
|
289
|
+
update(tenantId: string, newConfig: Record<string, any>): Promise<Record<string, any>>;
|
|
171
290
|
}
|
|
172
291
|
export interface ConfigTemplate {
|
|
173
292
|
id?: string;
|
|
@@ -194,264 +313,117 @@ export declare class ConfigTemplateClient extends BaseClient {
|
|
|
194
313
|
get(objectName: string): Promise<ConfigTemplate[]>;
|
|
195
314
|
/**
|
|
196
315
|
* Fetches configuration template values by template ID.
|
|
197
|
-
* @param {string} templateId - The template ID.
|
|
198
|
-
* @returns {Promise<any[]>} - A promise resolving to an array of configuration values.
|
|
199
|
-
*/
|
|
200
|
-
getTemmplateValues(templateId: string): Promise<any[]>;
|
|
201
|
-
/**
|
|
202
|
-
* Updates or Inserts configuration template values.
|
|
203
|
-
* @param {string} templateId - The template ID.
|
|
204
|
-
* @param {ConfigTemplateValue[]} values - The values to update.
|
|
205
|
-
* @returns {Promise<any>} - A promise resolving when the update is complete.
|
|
206
|
-
*/
|
|
207
|
-
upsertTemplateValues(templateId: string, values: ConfigTemplateValue[]): Promise<any>;
|
|
208
|
-
/**
|
|
209
|
-
* Deletes a configuration template.
|
|
210
|
-
* @param {string} templateId - The template ID.
|
|
211
|
-
* @returns {Promise<any>} - A promise resolving when the deletion is complete.
|
|
212
|
-
*/
|
|
213
|
-
delete(templateId: string): Promise<any>;
|
|
214
|
-
/**
|
|
215
|
-
* Deploys a configuration template.
|
|
216
|
-
* @param {ConfigTemplate} template - The template to deploy.
|
|
217
|
-
* @returns {Promise<any>} - A promise resolving when the deployment is complete.
|
|
218
|
-
*/
|
|
219
|
-
create(template: ConfigTemplate): Promise<any>;
|
|
220
|
-
}
|
|
221
|
-
export interface ConfigVar {
|
|
222
|
-
key?: string;
|
|
223
|
-
configType: string;
|
|
224
|
-
value: string;
|
|
225
|
-
description?: string;
|
|
226
|
-
status?: "active" | "inactive" | "expired";
|
|
227
|
-
expiryDate?: string;
|
|
228
|
-
updatedBy?: string;
|
|
229
|
-
createdBy?: string;
|
|
230
|
-
createdAt?: string;
|
|
231
|
-
updatedAt?: string;
|
|
232
|
-
}
|
|
233
|
-
/**
|
|
234
|
-
* Client for managing configuration variables through API requests.
|
|
235
|
-
* Provides methods to create, retrieve, update, search, and delete configuration variables.
|
|
236
|
-
*/
|
|
237
|
-
export declare class ConfigVarClient extends BaseClient {
|
|
238
|
-
/**
|
|
239
|
-
* Creates a new configuration variable.
|
|
240
|
-
*/
|
|
241
|
-
create(configVar: ConfigVar): Promise<ConfigVar>;
|
|
242
|
-
/**
|
|
243
|
-
* Retrieves a configuration variable by key.
|
|
244
|
-
*/
|
|
245
|
-
get(key: string): Promise<ConfigVar>;
|
|
246
|
-
/**
|
|
247
|
-
* Updates an existing configuration variable.
|
|
248
|
-
*/
|
|
249
|
-
update(configVar: ConfigVar): Promise<ConfigVar>;
|
|
250
|
-
/**
|
|
251
|
-
* Upsert a configuration variable. If the configuration variable does not exist, it will be created.
|
|
252
|
-
*/
|
|
253
|
-
upsert(configVar: ConfigVar): Promise<ConfigVar>;
|
|
254
|
-
/**
|
|
255
|
-
* Searches for configuration variables with pagination.
|
|
256
|
-
*/
|
|
257
|
-
search(pageSize?: number): Promise<ConfigVar[]>;
|
|
258
|
-
/**
|
|
259
|
-
* Deletes a configuration variable by key.
|
|
260
|
-
*/
|
|
261
|
-
delete(key: string): Promise<string>;
|
|
262
|
-
}
|
|
263
|
-
export declare enum ArtifactType {
|
|
264
|
-
CUSTOM_OBJECT = "custom-object",
|
|
265
|
-
CUSTOM_FIELD = "custom-field",
|
|
266
|
-
FUNCTION = "function",
|
|
267
|
-
MOBILE_EXTENSION = "mobile-extension",
|
|
268
|
-
PUBLIC_PAGE = "public-page",
|
|
269
|
-
TRIGGERED_ACTION = "triggered-action",
|
|
270
|
-
USER_ROLE = "user-role",
|
|
271
|
-
WEBHOOK = "webhook",
|
|
272
|
-
HORIZON_CUSTOM_RESOURCE = "horizon-custom-resource",
|
|
273
|
-
HORIZON_PAGE = "horizon-page",
|
|
274
|
-
HORIZON_TEMPLATE = "horizon-template",
|
|
275
|
-
HORIZON_TENANT_CONFIG = "horizon-tenant-config",
|
|
276
|
-
HORIZON_COMPONENT_BUNDLE = "horizon-component-bundle",
|
|
277
|
-
HORIZON_VIEW_TYPE = "horizon-view-type",
|
|
278
|
-
HORIZON_CUSTOM_ACTION = "horizon-custom-action",
|
|
279
|
-
HORIZON_VIEW_STATE = "horizon-view-state",
|
|
280
|
-
HORIZON_DATA_FIELD_OVERLAY = "horizon-data-field-overlay",
|
|
281
|
-
HORIZON_DATA_RELATIONSHIP_OVERLAY = "horizon-data-relationship-overlay",
|
|
282
|
-
HORIZON_LIST_CONFIG = "horizon-list-config",
|
|
283
|
-
HORIZON_LIST_VIEW_STATE = "horizon-list-view-state"
|
|
284
|
-
}
|
|
285
|
-
export declare enum ConfigVariableType {
|
|
286
|
-
PLAIN_TEXT = "plain-text",
|
|
287
|
-
SECRET = "secret"
|
|
288
|
-
}
|
|
289
|
-
export declare enum ConfigVariableStatus {
|
|
290
|
-
ACTIVE = "active",
|
|
291
|
-
INACTIVE = "inactive",
|
|
292
|
-
EXPIRED = "expired"
|
|
293
|
-
}
|
|
294
|
-
export declare enum GraphqlOperations {
|
|
295
|
-
INSERT = "insert",
|
|
296
|
-
UPDATE = "update",
|
|
297
|
-
DELETE = "delete",
|
|
298
|
-
UPSERT = "upsert"
|
|
299
|
-
}
|
|
300
|
-
export declare enum HttpMethod {
|
|
301
|
-
GET = "GET",
|
|
302
|
-
POST = "POST",
|
|
303
|
-
PUT = "PUT",
|
|
304
|
-
DELETE = "DELETE",
|
|
305
|
-
PATCH = "PATCH"
|
|
306
|
-
}
|
|
307
|
-
export declare enum NotificationTemplate {
|
|
308
|
-
JOB_DISPATCH = "job_dispatch",
|
|
309
|
-
JOB_REMINDER = "job_reminder",
|
|
310
|
-
JOB_CANCELLED = "job_cancelled",
|
|
311
|
-
JOB_OFFER = "job_offer"
|
|
312
|
-
}
|
|
313
|
-
export declare enum NotificationType {
|
|
314
|
-
SMS = "sms",
|
|
315
|
-
PUSH = "push"
|
|
316
|
-
}
|
|
317
|
-
export declare const TENANT_ENDPOINTS: {
|
|
318
|
-
readonly CONFIG_VAR: {
|
|
319
|
-
readonly CREATE: "configuration/extension";
|
|
320
|
-
readonly GET: (key: string) => string;
|
|
321
|
-
readonly UPDATE: (key: string) => string;
|
|
322
|
-
readonly DELETE: (key: string) => string;
|
|
323
|
-
readonly SEARCH: "configuration/extension/search";
|
|
324
|
-
};
|
|
325
|
-
readonly GRAPHQL: {
|
|
326
|
-
readonly SINGLE: "graphql/graphql";
|
|
327
|
-
readonly BATCH: "graphql/graphql/batch";
|
|
328
|
-
};
|
|
329
|
-
readonly METADATA: {
|
|
330
|
-
readonly ALL: "custom/metadata";
|
|
331
|
-
readonly OBJECT: (objectMapping: string) => string;
|
|
332
|
-
};
|
|
333
|
-
readonly ORG_PREFERENCE: {
|
|
334
|
-
readonly GET: "config/org_preference";
|
|
335
|
-
readonly UPDATE: "config/org_preference";
|
|
336
|
-
};
|
|
337
|
-
readonly CONFIG_TEMPLATE: {
|
|
338
|
-
readonly GET_TEMPLATES: (objectName: string) => string;
|
|
339
|
-
readonly GET_VALUES: (templateId: string) => string;
|
|
340
|
-
readonly UPDATE_VALUES: (templateId: string) => string;
|
|
341
|
-
readonly CREATE: "config/template";
|
|
342
|
-
readonly DELETE: (templateId: string) => string;
|
|
343
|
-
};
|
|
344
|
-
readonly CONFIG_FEATURES: {
|
|
345
|
-
readonly GET: "config/features";
|
|
346
|
-
readonly UPDATE: (tenantId: string) => string;
|
|
347
|
-
};
|
|
348
|
-
readonly VOCABULARY: {
|
|
349
|
-
readonly GET_ITEMS: (schemaName: string, fieldName: string) => string;
|
|
350
|
-
readonly ADD_ITEM: (schemaName: string, fieldName: string) => string;
|
|
351
|
-
readonly UPDATE_ITEM: (schemaName: string, fieldName: string, value: string) => string;
|
|
352
|
-
};
|
|
353
|
-
readonly NOTIFICATIONS: {
|
|
354
|
-
readonly GET_TEMPLATES: "notifications/v2/templates";
|
|
355
|
-
readonly DELETE_TEMPLATE: (template: string, templateType: string) => string;
|
|
356
|
-
readonly SET_TEMPLATE: (type: string, protocol: string) => string;
|
|
357
|
-
readonly DISPATCH: "notifications/dispatch";
|
|
358
|
-
readonly NOTIFY: "notifications/notify";
|
|
359
|
-
readonly NOTIFY_CANCEL: "notifications/notify_cancel";
|
|
360
|
-
readonly ONE_OFF: "notifications/oneoff";
|
|
361
|
-
readonly SEND_SMS: "notifications/sms";
|
|
362
|
-
readonly SMS_CONFIRMATION_REQUEST: "notifications/sms/confirmation_request";
|
|
363
|
-
};
|
|
364
|
-
readonly GEOSERVICES: {
|
|
365
|
-
readonly DISTANCE_MATRIX: "geoservices/distanceMatrix";
|
|
366
|
-
readonly DIRECTIONS: "geoservices/directions";
|
|
367
|
-
readonly GEOCODE: "geoservices/geocode";
|
|
368
|
-
readonly AUTOCOMPLETE: "geoservices/autocomplete";
|
|
369
|
-
readonly PLACE: "geoservices/place";
|
|
370
|
-
readonly TIMEZONE: "geoservices/timezone";
|
|
371
|
-
};
|
|
372
|
-
readonly AVAILABILITY: {
|
|
373
|
-
readonly SIMPLE: "availability/simple";
|
|
374
|
-
};
|
|
375
|
-
};
|
|
376
|
-
export interface HasId {
|
|
377
|
-
UID?: string;
|
|
378
|
-
[key: string]: any;
|
|
379
|
-
}
|
|
380
|
-
export interface GraphQlResponse<T = any> {
|
|
381
|
-
data: T;
|
|
382
|
-
errors?: object[];
|
|
383
|
-
}
|
|
384
|
-
export interface GraphqlParams {
|
|
385
|
-
objectName: string;
|
|
386
|
-
operationName: string;
|
|
387
|
-
}
|
|
388
|
-
export interface GraphqlMurationParams extends GraphqlParams {
|
|
389
|
-
records: HasId[];
|
|
390
|
-
operation: GraphqlOperations;
|
|
391
|
-
bulkOperation?: boolean;
|
|
392
|
-
}
|
|
393
|
-
export interface GraphqlQueryParams extends GraphqlParams {
|
|
394
|
-
first?: number;
|
|
395
|
-
offset?: number;
|
|
396
|
-
orderBy?: string;
|
|
397
|
-
filter?: string;
|
|
398
|
-
after?: string;
|
|
399
|
-
fields?: string;
|
|
400
|
-
readOnly?: boolean;
|
|
401
|
-
}
|
|
402
|
-
export interface QueryResult {
|
|
403
|
-
records: HasId[];
|
|
404
|
-
totalCount: number;
|
|
405
|
-
pageInfo: any;
|
|
406
|
-
endCursor: string;
|
|
407
|
-
endOffset: number;
|
|
316
|
+
* @param {string} templateId - The template ID.
|
|
317
|
+
* @returns {Promise<any[]>} - A promise resolving to an array of configuration values.
|
|
318
|
+
*/
|
|
319
|
+
getTemmplateValues(templateId: string): Promise<any[]>;
|
|
320
|
+
/**
|
|
321
|
+
* Updates or Inserts configuration template values.
|
|
322
|
+
* @param {string} templateId - The template ID.
|
|
323
|
+
* @param {ConfigTemplateValue[]} values - The values to update.
|
|
324
|
+
* @returns {Promise<any>} - A promise resolving when the update is complete.
|
|
325
|
+
*/
|
|
326
|
+
upsertTemplateValues(templateId: string, values: ConfigTemplateValue[]): Promise<any>;
|
|
327
|
+
/**
|
|
328
|
+
* Deletes a configuration template.
|
|
329
|
+
* @param {string} templateId - The template ID.
|
|
330
|
+
* @returns {Promise<any>} - A promise resolving when the deletion is complete.
|
|
331
|
+
*/
|
|
332
|
+
delete(templateId: string): Promise<any>;
|
|
333
|
+
/**
|
|
334
|
+
* Deploys a configuration template.
|
|
335
|
+
* @param {ConfigTemplate} template - The template to deploy.
|
|
336
|
+
* @returns {Promise<any>} - A promise resolving when the deployment is complete.
|
|
337
|
+
*/
|
|
338
|
+
create(template: ConfigTemplate): Promise<any>;
|
|
408
339
|
}
|
|
409
|
-
export interface
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
340
|
+
export interface ConfigVar {
|
|
341
|
+
key?: string;
|
|
342
|
+
configType: string;
|
|
343
|
+
value: string;
|
|
344
|
+
description?: string;
|
|
345
|
+
status?: "active" | "inactive" | "expired";
|
|
346
|
+
expiryDate?: string;
|
|
347
|
+
updatedBy?: string;
|
|
348
|
+
createdBy?: string;
|
|
349
|
+
createdAt?: string;
|
|
350
|
+
updatedAt?: string;
|
|
415
351
|
}
|
|
416
352
|
/**
|
|
417
|
-
*
|
|
418
|
-
*
|
|
353
|
+
* Client for managing configuration variables through API requests.
|
|
354
|
+
* Provides methods to create, retrieve, update, search, and delete configuration variables.
|
|
419
355
|
*/
|
|
420
|
-
export declare class
|
|
356
|
+
export declare class ConfigVarClient extends BaseClient {
|
|
421
357
|
/**
|
|
422
|
-
*
|
|
423
|
-
* @param {string} graphqlQuery - The GraphQL query or mutation string.
|
|
424
|
-
* @param {Record<string, string>} headers - Additional headers to include in the request.
|
|
425
|
-
* @returns {Promise<GraphQlResponse>} - The response from the GraphQL API.
|
|
426
|
-
* @throws {Error} - If the request fails or if there are errors in the response.
|
|
358
|
+
* Creates a new configuration variable.
|
|
427
359
|
*/
|
|
428
|
-
|
|
360
|
+
create(configVar: ConfigVar): Promise<ConfigVar>;
|
|
429
361
|
/**
|
|
430
|
-
*
|
|
431
|
-
* @param {string} graphqlQuery - The GraphQL queries and/or mutations.
|
|
432
|
-
* @param {Record<string, string>} headers - Additional headers to include in the request.
|
|
433
|
-
* @returns {Promise<GraphQlResponse>} - The response from the GraphQL API.
|
|
434
|
-
* @throws {Error} - If the request fails or if there are errors in the response.
|
|
362
|
+
* Retrieves a configuration variable by key.
|
|
435
363
|
*/
|
|
436
|
-
|
|
437
|
-
|
|
364
|
+
get(key: string): Promise<ConfigVar>;
|
|
365
|
+
/**
|
|
366
|
+
* Updates an existing configuration variable.
|
|
367
|
+
*/
|
|
368
|
+
update(configVar: ConfigVar): Promise<ConfigVar>;
|
|
369
|
+
/**
|
|
370
|
+
* Upsert a configuration variable. If the configuration variable does not exist, it will be created.
|
|
371
|
+
*/
|
|
372
|
+
upsert(configVar: ConfigVar): Promise<ConfigVar>;
|
|
373
|
+
/**
|
|
374
|
+
* Searches for configuration variables with pagination.
|
|
375
|
+
*/
|
|
376
|
+
search(pageSize?: number): Promise<ConfigVar[]>;
|
|
377
|
+
/**
|
|
378
|
+
* Deletes a configuration variable by key.
|
|
379
|
+
*/
|
|
380
|
+
delete(key: string): Promise<string>;
|
|
438
381
|
}
|
|
439
382
|
/**
|
|
440
|
-
*
|
|
441
|
-
*
|
|
383
|
+
* Request parameters for fetching avatars.
|
|
384
|
+
* - `userIds`: comma-separated user IDs
|
|
385
|
+
* - `sizeHint`: optional size hint (e.g., "small", "thumbnail")
|
|
442
386
|
*/
|
|
443
|
-
export
|
|
387
|
+
export interface GetAvatarParams {
|
|
388
|
+
userIds: string[];
|
|
389
|
+
sizeHint?: string;
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Response shape for fetching avatars.
|
|
393
|
+
* The API returns a map from userId -> avatar URL.
|
|
394
|
+
*/
|
|
395
|
+
export type GetAvatarResponse = Record<string, string>;
|
|
396
|
+
/**
|
|
397
|
+
* Represents a single attachment record.
|
|
398
|
+
*/
|
|
399
|
+
export interface Attachment {
|
|
400
|
+
id: string;
|
|
401
|
+
contentType: string;
|
|
402
|
+
fileName: string;
|
|
403
|
+
uploadedDate: string;
|
|
404
|
+
parentId: string;
|
|
405
|
+
createdBy: string;
|
|
406
|
+
size: number;
|
|
407
|
+
description: string;
|
|
408
|
+
downloadUrl: string;
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Response shape for fetching attachments.
|
|
412
|
+
*/
|
|
413
|
+
export interface GetAttachmentsResponse {
|
|
414
|
+
list: Attachment[];
|
|
415
|
+
}
|
|
416
|
+
export declare class FilesAPIClient extends BaseClient {
|
|
444
417
|
/**
|
|
445
|
-
*
|
|
446
|
-
*
|
|
418
|
+
* Fetch a map of userId -> avatar URL.
|
|
419
|
+
* Example request: GET /avatar?user_ids=abc,def&size_hint=thumbnail
|
|
447
420
|
*/
|
|
448
|
-
|
|
421
|
+
getAvatar(params: GetAvatarParams): Promise<GetAvatarResponse>;
|
|
449
422
|
/**
|
|
450
|
-
*
|
|
451
|
-
*
|
|
452
|
-
* @returns {Promise<Record<string, any>>} - A promise resolving when the configuration is successfully deployed.
|
|
423
|
+
* Find attachments that belong to the specified parent record.
|
|
424
|
+
* Example request: GET /attachments/{parentId}
|
|
453
425
|
*/
|
|
454
|
-
|
|
426
|
+
getAttachments(parentId: string): Promise<GetAttachmentsResponse>;
|
|
455
427
|
}
|
|
456
428
|
export interface LatLng {
|
|
457
429
|
lat: number;
|
|
@@ -546,168 +518,18 @@ export interface PlaceResponse {
|
|
|
546
518
|
geometry: LatLng;
|
|
547
519
|
}
|
|
548
520
|
export interface TimezoneRequest {
|
|
549
|
-
location: [
|
|
550
|
-
number,
|
|
551
|
-
number
|
|
552
|
-
];
|
|
553
|
-
timestamp: number;
|
|
554
|
-
}
|
|
555
|
-
export interface TimezoneResponse {
|
|
556
|
-
dstOffset: number;
|
|
557
|
-
rawOffset: number;
|
|
558
|
-
timeZoneId: string;
|
|
559
|
-
}
|
|
560
|
-
export interface BaseObject {
|
|
561
|
-
id: string;
|
|
562
|
-
name: string;
|
|
563
|
-
propertyMap?: Record<string, any>;
|
|
564
|
-
}
|
|
565
|
-
export interface BaseEvent extends BaseObject {
|
|
566
|
-
start: Date;
|
|
567
|
-
finish: Date;
|
|
568
|
-
eventType?: string;
|
|
569
|
-
description?: string;
|
|
570
|
-
geoLocation?: LatLng;
|
|
571
|
-
}
|
|
572
|
-
export interface Resource extends BaseObject {
|
|
573
|
-
category?: string;
|
|
574
|
-
employmentType?: string;
|
|
575
|
-
resourceType?: string;
|
|
576
|
-
userId?: string;
|
|
577
|
-
regionId?: string;
|
|
578
|
-
timezone: string;
|
|
579
|
-
tags: Tag[];
|
|
580
|
-
availabilities: BaseEvent[];
|
|
581
|
-
events: BaseEvent[];
|
|
582
|
-
}
|
|
583
|
-
export interface Tag extends BaseObject {
|
|
584
|
-
}
|
|
585
|
-
export interface Availability extends BaseEvent {
|
|
586
|
-
resourceId: string;
|
|
587
|
-
isAvailable: boolean;
|
|
588
|
-
status: string;
|
|
589
|
-
availabilityType: string;
|
|
590
|
-
}
|
|
591
|
-
export interface Activity extends BaseEvent {
|
|
592
|
-
resourceId: string;
|
|
593
|
-
activityType: string;
|
|
594
|
-
}
|
|
595
|
-
export interface JobAllocation extends BaseEvent {
|
|
596
|
-
jobId: string;
|
|
597
|
-
resourceId: string;
|
|
598
|
-
status: string;
|
|
599
|
-
}
|
|
600
|
-
export interface Job extends BaseEvent {
|
|
601
|
-
address: string;
|
|
602
|
-
contactId: string;
|
|
603
|
-
jobStatus: string;
|
|
604
|
-
regionId: string;
|
|
605
|
-
tags: Tag[];
|
|
606
|
-
}
|
|
607
|
-
export interface ResourceShift extends BaseEvent {
|
|
608
|
-
resourceId: string;
|
|
609
|
-
shift: Shift;
|
|
610
|
-
}
|
|
611
|
-
export interface Shift extends BaseEvent {
|
|
612
|
-
regionId: string;
|
|
613
|
-
displayName: string;
|
|
614
|
-
isDraft: boolean;
|
|
615
|
-
}
|
|
616
|
-
export declare class EntityFactory {
|
|
617
|
-
static createBaseObject(data: Record<string, string>): BaseObject;
|
|
618
|
-
static createBaseEvent(data: Record<string, string>): BaseEvent;
|
|
619
|
-
static createTag(data: Record<string, any>): Tag;
|
|
620
|
-
static createResource(data: Record<string, any>): Resource;
|
|
621
|
-
static createJob(data: Record<string, any>): Job;
|
|
622
|
-
static createAvailability(data: Record<string, any>): Availability;
|
|
623
|
-
static createActivity(data: Record<string, any>): Activity;
|
|
624
|
-
static createJobAllocation(data: Record<string, any>): JobAllocation;
|
|
625
|
-
static createResourceShift(data: Record<string, any>): ResourceShift;
|
|
626
|
-
static createShift(data: Record<string, any>): Shift;
|
|
627
|
-
}
|
|
628
|
-
export type ArtifactParams = {
|
|
629
|
-
objectName?: string;
|
|
630
|
-
viewTypeName?: string;
|
|
631
|
-
name?: string;
|
|
632
|
-
scope?: string;
|
|
633
|
-
};
|
|
634
|
-
declare class ArtifactClient extends BaseClient {
|
|
635
|
-
private artifactType;
|
|
636
|
-
private baseEndpoint;
|
|
637
|
-
constructor(config: any, artifactType: ArtifactType, executionOptions?: Partial<ExecutionOptions>);
|
|
638
|
-
list<T>(): Promise<T[]>;
|
|
639
|
-
get<T>(params?: ArtifactParams): Promise<T>;
|
|
640
|
-
create<T>(params: ArtifactParams, artifactData: Partial<T>): Promise<T>;
|
|
641
|
-
update<T>(params: ArtifactParams, artifactData: Partial<T>): Promise<T>;
|
|
642
|
-
delete(params: ArtifactParams): Promise<void>;
|
|
643
|
-
private buildEndpoint;
|
|
644
|
-
}
|
|
645
|
-
export interface AvailabilityRequestParams {
|
|
646
|
-
/**
|
|
647
|
-
* Array of resource IDs for which availability is requested.
|
|
648
|
-
* Must contain at least one and at most 200 resource IDs.
|
|
649
|
-
*/
|
|
650
|
-
resourceIds: string[];
|
|
651
|
-
/**
|
|
652
|
-
* The UTC datetime from which to start fetching availability (ISO 8601 format).
|
|
653
|
-
*/
|
|
654
|
-
start: string;
|
|
655
|
-
/**
|
|
656
|
-
* The UTC datetime until which to fetch availability (ISO 8601 format).
|
|
657
|
-
* Must be after start and within 375 days.
|
|
658
|
-
*/
|
|
659
|
-
end: string;
|
|
660
|
-
/**
|
|
661
|
-
* If true, merged availability time intervals are returned in the response.
|
|
662
|
-
* Defaults to false.
|
|
663
|
-
*/
|
|
664
|
-
mergedAvailabilities?: boolean;
|
|
665
|
-
/**
|
|
666
|
-
* If true (or omitted), a list of availability entries is returned.
|
|
667
|
-
* Defaults to true.
|
|
668
|
-
*/
|
|
669
|
-
entries?: boolean;
|
|
670
|
-
}
|
|
671
|
-
export interface AvailabilityResult {
|
|
672
|
-
resourceId: string;
|
|
673
|
-
mergedAvailabilities?: {
|
|
674
|
-
start: string;
|
|
675
|
-
end: string;
|
|
676
|
-
}[];
|
|
677
|
-
entries?: AvailabilityEntry[];
|
|
678
|
-
}
|
|
679
|
-
export interface AvailabilityEntry {
|
|
680
|
-
type: "template" | "pattern" | "override" | "holiday";
|
|
681
|
-
start: string;
|
|
682
|
-
end: string;
|
|
683
|
-
available: boolean;
|
|
684
|
-
templateEntryId?: string;
|
|
685
|
-
name?: string;
|
|
686
|
-
patternId?: string;
|
|
687
|
-
patternRecordId?: string;
|
|
688
|
-
}
|
|
689
|
-
declare class AvailabilityAPIClient extends BaseClient {
|
|
690
|
-
/**
|
|
691
|
-
* Fetches resource availability based on the given request parameters.
|
|
692
|
-
* @param {AvailabilityRequestParams} params - The request parameters for availability.
|
|
693
|
-
* @returns {Promise<AvailabilityResult[]>} - The availability data for the requested resources.
|
|
694
|
-
*/
|
|
695
|
-
fetchAvailability(params: AvailabilityRequestParams): Promise<AvailabilityResult[]>;
|
|
696
|
-
}
|
|
697
|
-
declare class ConfigFeaturesClient extends BaseClient {
|
|
698
|
-
/**
|
|
699
|
-
* Fetches feature flags configuration.
|
|
700
|
-
* @returns {Promise<Record<string, any>>} - A promise resolving to the sorted feature flags in JSON string format.
|
|
701
|
-
*/
|
|
702
|
-
get(): Promise<Record<string, any>>;
|
|
703
|
-
/**
|
|
704
|
-
* Deploys feature flags configuration.
|
|
705
|
-
* @param {string} newConfig - The new configuration to be deployed.
|
|
706
|
-
* @returns {Promise<Record<string, any>>} - A promise resolving when the configuration is successfully deployed.
|
|
707
|
-
*/
|
|
708
|
-
update(tenantId: string, newConfig: Record<string, any>): Promise<Record<string, any>>;
|
|
521
|
+
location: [
|
|
522
|
+
number,
|
|
523
|
+
number
|
|
524
|
+
];
|
|
525
|
+
timestamp: number;
|
|
526
|
+
}
|
|
527
|
+
export interface TimezoneResponse {
|
|
528
|
+
dstOffset: number;
|
|
529
|
+
rawOffset: number;
|
|
530
|
+
timeZoneId: string;
|
|
709
531
|
}
|
|
710
|
-
declare class GeoAPIClient extends BaseClient {
|
|
532
|
+
export declare class GeoAPIClient extends BaseClient {
|
|
711
533
|
/**
|
|
712
534
|
* Computes travel distance and time for all combinations of origin and destination locations.
|
|
713
535
|
*/
|
|
@@ -733,6 +555,137 @@ declare class GeoAPIClient extends BaseClient {
|
|
|
733
555
|
*/
|
|
734
556
|
getTimezone(data: TimezoneRequest): Promise<TimezoneResponse>;
|
|
735
557
|
}
|
|
558
|
+
export interface HasId {
|
|
559
|
+
UID?: string;
|
|
560
|
+
[key: string]: any;
|
|
561
|
+
}
|
|
562
|
+
export interface GraphQlResponse<T = any> {
|
|
563
|
+
data: T;
|
|
564
|
+
errors?: object[];
|
|
565
|
+
}
|
|
566
|
+
export interface GraphqlParams {
|
|
567
|
+
objectName: string;
|
|
568
|
+
operationName: string;
|
|
569
|
+
}
|
|
570
|
+
export interface GraphqlMurationParams extends GraphqlParams {
|
|
571
|
+
records: HasId[];
|
|
572
|
+
operation: GraphqlOperations;
|
|
573
|
+
bulkOperation?: boolean;
|
|
574
|
+
suppressChangeEvents?: boolean;
|
|
575
|
+
}
|
|
576
|
+
export interface GraphqlQueryParams extends GraphqlParams {
|
|
577
|
+
first?: number;
|
|
578
|
+
offset?: number;
|
|
579
|
+
orderBy?: string;
|
|
580
|
+
filter?: string;
|
|
581
|
+
after?: string;
|
|
582
|
+
fields?: string;
|
|
583
|
+
readOnly?: boolean;
|
|
584
|
+
}
|
|
585
|
+
export interface QueryResult {
|
|
586
|
+
records: HasId[];
|
|
587
|
+
totalCount: number;
|
|
588
|
+
pageInfo: any;
|
|
589
|
+
endCursor: string;
|
|
590
|
+
endOffset: number;
|
|
591
|
+
}
|
|
592
|
+
export interface MutationResult {
|
|
593
|
+
data: {
|
|
594
|
+
schema: {
|
|
595
|
+
[alias: string]: string;
|
|
596
|
+
};
|
|
597
|
+
};
|
|
598
|
+
}
|
|
599
|
+
/**
|
|
600
|
+
* A client for executing GraphQL queries and mutations.
|
|
601
|
+
* Extends the BaseClient to interact with the GraphQL API.
|
|
602
|
+
*/
|
|
603
|
+
export declare class GraphQLClient extends BaseClient {
|
|
604
|
+
/**
|
|
605
|
+
* Executes a GraphQL query or mutation.
|
|
606
|
+
* @param {string} graphqlQuery - The GraphQL query or mutation string.
|
|
607
|
+
* @param {Record<string, string>} headers - Additional headers to include in the request.
|
|
608
|
+
* @returns {Promise<GraphQlResponse>} - The response from the GraphQL API.
|
|
609
|
+
* @throws {Error} - If the request fails or if there are errors in the response.
|
|
610
|
+
*/
|
|
611
|
+
execute(graphqlQuery: string, headers?: Record<string, string>): Promise<GraphQlResponse>;
|
|
612
|
+
/**
|
|
613
|
+
* Executes a GraphQL query or mutation.
|
|
614
|
+
* @param {string} graphqlQuery - The GraphQL queries and/or mutations.
|
|
615
|
+
* @param {Record<string, string>} headers - Additional headers to include in the request.
|
|
616
|
+
* @returns {Promise<GraphQlResponse>} - The response from the GraphQL API.
|
|
617
|
+
* @throws {Error} - If the request fails or if there are errors in the response.
|
|
618
|
+
*/
|
|
619
|
+
executeBatch(graphqlQuery: string, headers?: Record<string, string>): Promise<GraphQlResponse>;
|
|
620
|
+
protected handleResponseData(responseData: any): void;
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* Interface representing the structure of metadata for an object.
|
|
624
|
+
*/
|
|
625
|
+
export interface Metadata {
|
|
626
|
+
label: string;
|
|
627
|
+
labelPlural: string | null;
|
|
628
|
+
mapping: string;
|
|
629
|
+
name: string;
|
|
630
|
+
}
|
|
631
|
+
/**
|
|
632
|
+
* Interface representing the metadata for a specific object, extending the base Metadata interface.
|
|
633
|
+
*/
|
|
634
|
+
export interface ObjectMetadata extends Metadata {
|
|
635
|
+
relationships: any[];
|
|
636
|
+
fields: any[];
|
|
637
|
+
}
|
|
638
|
+
/**
|
|
639
|
+
* Interface representing the structure of a relationship.
|
|
640
|
+
*/
|
|
641
|
+
export interface RelationshipMapping {
|
|
642
|
+
schemaMapping: string;
|
|
643
|
+
mapping: string;
|
|
644
|
+
fieldMapping: string;
|
|
645
|
+
}
|
|
646
|
+
/**
|
|
647
|
+
* Interface representing the structure of a field.
|
|
648
|
+
*/
|
|
649
|
+
export interface FieldMetadata {
|
|
650
|
+
label: string;
|
|
651
|
+
mapping: string;
|
|
652
|
+
type: string;
|
|
653
|
+
nillable: boolean;
|
|
654
|
+
length: number;
|
|
655
|
+
maxLength: number | null;
|
|
656
|
+
precision: number | null;
|
|
657
|
+
scale: number | null;
|
|
658
|
+
upsertKey: boolean;
|
|
659
|
+
unique: boolean;
|
|
660
|
+
readOnly: boolean;
|
|
661
|
+
accessMode: "read_only" | "read_write";
|
|
662
|
+
relationship: RelationshipMapping | null;
|
|
663
|
+
values: Array<PicklistValue>;
|
|
664
|
+
name: string;
|
|
665
|
+
}
|
|
666
|
+
export interface PicklistValue {
|
|
667
|
+
label: string;
|
|
668
|
+
value: string;
|
|
669
|
+
active: boolean;
|
|
670
|
+
defaultValue: boolean;
|
|
671
|
+
}
|
|
672
|
+
/**
|
|
673
|
+
* MetadataClient class to handle API requests related to metadata.
|
|
674
|
+
* Extends BaseClient to perform API operations.
|
|
675
|
+
*/
|
|
676
|
+
export declare class MetadataClient extends BaseClient {
|
|
677
|
+
/**
|
|
678
|
+
* Fetches all metadata mappings from the metadata endpoint.
|
|
679
|
+
* @returns {Promise<Metadata[]>} - A promise resolving to an object containing an array of Metadata.
|
|
680
|
+
*/
|
|
681
|
+
fetchAllMetadata(): Promise<Metadata[]>;
|
|
682
|
+
/**
|
|
683
|
+
* Fetches metadata for a specific object using its mapping.
|
|
684
|
+
* @param {string} mapping - The API mapping for the object.
|
|
685
|
+
* @returns {Promise<ObjectMetadata>} - A promise resolving to an object containing the metadata of the requested object.
|
|
686
|
+
*/
|
|
687
|
+
fetchObjectMetadata(mapping: string): Promise<ObjectMetadata>;
|
|
688
|
+
}
|
|
736
689
|
export interface JobRequest {
|
|
737
690
|
jobId: string;
|
|
738
691
|
}
|
|
@@ -777,7 +730,11 @@ export interface SmsConfirmationRequest extends JobRequest {
|
|
|
777
730
|
export interface SmsResponse {
|
|
778
731
|
success: boolean;
|
|
779
732
|
}
|
|
780
|
-
|
|
733
|
+
/**
|
|
734
|
+
* Client for handling mobile notifications API operations.
|
|
735
|
+
* Extends BaseClient to provide request methods.
|
|
736
|
+
*/
|
|
737
|
+
export declare class MobileNotificationClient extends BaseClient {
|
|
781
738
|
/**
|
|
782
739
|
* Fetches all mobile notification templates from the API.
|
|
783
740
|
* @returns {Promise<any>} - An array of mobile notification templates.
|
|
@@ -833,6 +790,23 @@ declare class MobileNotificationClient extends BaseClient {
|
|
|
833
790
|
*/
|
|
834
791
|
requestSmsConfirmation(request: SmsConfirmationRequest): Promise<SmsResponse>;
|
|
835
792
|
}
|
|
793
|
+
/**
|
|
794
|
+
* OrgPreferencesClient class to handle API requests related to organization preferences.
|
|
795
|
+
* Extends BaseClient to perform API operations.
|
|
796
|
+
*/
|
|
797
|
+
export declare class OrgPreferenceClient extends BaseClient {
|
|
798
|
+
/**
|
|
799
|
+
* Fetches the organization preferences configuration.
|
|
800
|
+
* @returns {Promise<Record<string, any>>} - A promise resolving to the sorted organization preferences.
|
|
801
|
+
*/
|
|
802
|
+
get(): Promise<Record<string, any>>;
|
|
803
|
+
/**
|
|
804
|
+
* Deploys the organization preferences configuration.
|
|
805
|
+
* @param {Record<string, any>} newConfig - The new configuration to be deployed.
|
|
806
|
+
* @returns {Promise<Record<string, any>>} - A promise resolving when the configuration is successfully deployed.
|
|
807
|
+
*/
|
|
808
|
+
deploy(newConfig: Record<string, any>): Promise<Record<string, any>>;
|
|
809
|
+
}
|
|
836
810
|
export interface VocabularyItem {
|
|
837
811
|
value: string;
|
|
838
812
|
label: string;
|
|
@@ -842,7 +816,11 @@ export interface VocabularyItem {
|
|
|
842
816
|
createdAt?: string;
|
|
843
817
|
updatedAt?: string;
|
|
844
818
|
}
|
|
845
|
-
|
|
819
|
+
/**
|
|
820
|
+
* VocabularyClient handles API requests related to vocabulary fields.
|
|
821
|
+
* Extends BaseClient to perform API operations.
|
|
822
|
+
*/
|
|
823
|
+
export declare class VocabularyClient extends BaseClient {
|
|
846
824
|
/**
|
|
847
825
|
* Fetches vocabulary items for a specific field in a schema.
|
|
848
826
|
* @param {string} schemaName - The schema name.
|
|
@@ -868,6 +846,74 @@ declare class VocabularyClient extends BaseClient {
|
|
|
868
846
|
*/
|
|
869
847
|
updateVocabularyItem(schemaName: string, fieldName: string, value: string, item: VocabularyItem): Promise<VocabularyItem>;
|
|
870
848
|
}
|
|
849
|
+
export interface BaseObject {
|
|
850
|
+
id: string;
|
|
851
|
+
name: string;
|
|
852
|
+
propertyMap?: Record<string, any>;
|
|
853
|
+
}
|
|
854
|
+
export interface BaseEvent extends BaseObject {
|
|
855
|
+
start: Date;
|
|
856
|
+
finish: Date;
|
|
857
|
+
eventType?: string;
|
|
858
|
+
description?: string;
|
|
859
|
+
geoLocation?: LatLng;
|
|
860
|
+
}
|
|
861
|
+
export interface Resource extends BaseObject {
|
|
862
|
+
category?: string;
|
|
863
|
+
employmentType?: string;
|
|
864
|
+
resourceType?: string;
|
|
865
|
+
userId?: string;
|
|
866
|
+
regionId?: string;
|
|
867
|
+
timezone: string;
|
|
868
|
+
tags: Tag[];
|
|
869
|
+
availabilities: BaseEvent[];
|
|
870
|
+
events: BaseEvent[];
|
|
871
|
+
}
|
|
872
|
+
export interface Tag extends BaseObject {
|
|
873
|
+
}
|
|
874
|
+
export interface Availability extends BaseEvent {
|
|
875
|
+
resourceId: string;
|
|
876
|
+
isAvailable: boolean;
|
|
877
|
+
status: string;
|
|
878
|
+
availabilityType: string;
|
|
879
|
+
}
|
|
880
|
+
export interface Activity extends BaseEvent {
|
|
881
|
+
resourceId: string;
|
|
882
|
+
activityType: string;
|
|
883
|
+
}
|
|
884
|
+
export interface JobAllocation extends BaseEvent {
|
|
885
|
+
jobId: string;
|
|
886
|
+
resourceId: string;
|
|
887
|
+
status: string;
|
|
888
|
+
}
|
|
889
|
+
export interface Job extends BaseEvent {
|
|
890
|
+
address: string;
|
|
891
|
+
contactId: string;
|
|
892
|
+
jobStatus: string;
|
|
893
|
+
regionId: string;
|
|
894
|
+
tags: Tag[];
|
|
895
|
+
}
|
|
896
|
+
export interface ResourceShift extends BaseEvent {
|
|
897
|
+
resourceId: string;
|
|
898
|
+
shift: Shift;
|
|
899
|
+
}
|
|
900
|
+
export interface Shift extends BaseEvent {
|
|
901
|
+
regionId: string;
|
|
902
|
+
displayName: string;
|
|
903
|
+
isDraft: boolean;
|
|
904
|
+
}
|
|
905
|
+
export declare class EntityFactory {
|
|
906
|
+
static createBaseObject(data: Record<string, string>): BaseObject;
|
|
907
|
+
static createBaseEvent(data: Record<string, string>): BaseEvent;
|
|
908
|
+
static createTag(data: Record<string, any>): Tag;
|
|
909
|
+
static createResource(data: Record<string, any>): Resource;
|
|
910
|
+
static createJob(data: Record<string, any>): Job;
|
|
911
|
+
static createAvailability(data: Record<string, any>): Availability;
|
|
912
|
+
static createActivity(data: Record<string, any>): Activity;
|
|
913
|
+
static createJobAllocation(data: Record<string, any>): JobAllocation;
|
|
914
|
+
static createResourceShift(data: Record<string, any>): ResourceShift;
|
|
915
|
+
static createShift(data: Record<string, any>): Shift;
|
|
916
|
+
}
|
|
871
917
|
export interface LockInfo {
|
|
872
918
|
name: string;
|
|
873
919
|
ttl: number;
|
|
@@ -951,7 +997,7 @@ export interface CacheOptions<T> {
|
|
|
951
997
|
ttl?: number;
|
|
952
998
|
useSecondaryCache?: boolean;
|
|
953
999
|
}
|
|
954
|
-
declare class GeoService {
|
|
1000
|
+
export declare class GeoService {
|
|
955
1001
|
private geoAPIClient;
|
|
956
1002
|
private sessionId;
|
|
957
1003
|
constructor(geoAPIClient: GeoAPIClient);
|
|
@@ -1115,12 +1161,33 @@ export declare class GraphQLQueryBuilder {
|
|
|
1115
1161
|
*/
|
|
1116
1162
|
toString(): string;
|
|
1117
1163
|
}
|
|
1118
|
-
declare class LockService {
|
|
1164
|
+
export declare class LockService {
|
|
1119
1165
|
private configVarClient;
|
|
1120
1166
|
constructor(configVarClient: ConfigVarClient);
|
|
1121
1167
|
acquireLock(lockInfo: LockInfo): Promise<boolean>;
|
|
1122
1168
|
releaseLock(name: string): Promise<void>;
|
|
1123
1169
|
}
|
|
1170
|
+
/**
|
|
1171
|
+
* MetadataService class to process and filter metadata.
|
|
1172
|
+
*/
|
|
1173
|
+
export declare class MetadataService {
|
|
1174
|
+
private client;
|
|
1175
|
+
constructor(client: MetadataClient);
|
|
1176
|
+
/**
|
|
1177
|
+
* Retrieves metadata for specific objects.
|
|
1178
|
+
*
|
|
1179
|
+
* @param objectNames - The names of the objects.
|
|
1180
|
+
* @returns A promise that resolves to metadata records.
|
|
1181
|
+
*/
|
|
1182
|
+
getObjectMetadata(objectNames: string[]): Promise<Record<string, ObjectMetadata>>;
|
|
1183
|
+
/**
|
|
1184
|
+
* Extracts picklist values from the object metadata.
|
|
1185
|
+
*
|
|
1186
|
+
* @param metadata - The metadata of the object.
|
|
1187
|
+
* @returns An object containing the picklist values for each picklist field.
|
|
1188
|
+
*/
|
|
1189
|
+
getPicklistValues(metadata: ObjectMetadata): Record<string, string[]>;
|
|
1190
|
+
}
|
|
1124
1191
|
export declare class ResourceQueryParam {
|
|
1125
1192
|
resourceIds?: Set<string>;
|
|
1126
1193
|
regionIds?: Set<string>;
|
|
@@ -1252,6 +1319,7 @@ export declare class ExecutionContext {
|
|
|
1252
1319
|
get mobileNotificationClient(): MobileNotificationClient;
|
|
1253
1320
|
get geoAPIClient(): GeoAPIClient;
|
|
1254
1321
|
get availabilityAPIClient(): AvailabilityAPIClient;
|
|
1322
|
+
get filesAPIClient(): FilesAPIClient;
|
|
1255
1323
|
get geoService(): GeoService;
|
|
1256
1324
|
get lockService(): LockService;
|
|
1257
1325
|
get configVarCache(): CacheService<any>;
|
|
@@ -1330,54 +1398,6 @@ export declare const TenantObjects: {
|
|
|
1330
1398
|
* Uses Winston logger but retains ANSI colors for console logs.
|
|
1331
1399
|
*/
|
|
1332
1400
|
export declare function LogMethod(namespace?: string): (target: any, propertyKey: any, descriptor: any) => any;
|
|
1333
|
-
export interface BatchJobSchemaData extends HasId {
|
|
1334
|
-
StatusDetails?: string;
|
|
1335
|
-
MaximumBatches?: number;
|
|
1336
|
-
Status?: string;
|
|
1337
|
-
ProcessedBatches?: number;
|
|
1338
|
-
ObjectName?: string;
|
|
1339
|
-
JobType?: string;
|
|
1340
|
-
BatchProcessor?: string;
|
|
1341
|
-
CreatedDate?: string;
|
|
1342
|
-
FilterCondition?: string;
|
|
1343
|
-
OrderBy?: string;
|
|
1344
|
-
Fields?: string;
|
|
1345
|
-
JobHandler?: string;
|
|
1346
|
-
State?: string;
|
|
1347
|
-
DelaySeconds?: number;
|
|
1348
|
-
CallbackURL?: string;
|
|
1349
|
-
ProcessingAt?: string;
|
|
1350
|
-
CompletedAt?: string;
|
|
1351
|
-
FailedBatches?: number;
|
|
1352
|
-
FetchingStrategy?: string;
|
|
1353
|
-
}
|
|
1354
|
-
export interface BatchOrchestratorConfig {
|
|
1355
|
-
isAsyncProcessing?: boolean;
|
|
1356
|
-
}
|
|
1357
|
-
export interface BatchState {
|
|
1358
|
-
processor?: {
|
|
1359
|
-
cursor?: string;
|
|
1360
|
-
allCursors?: string[];
|
|
1361
|
-
batchNumber?: number;
|
|
1362
|
-
};
|
|
1363
|
-
worker?: any;
|
|
1364
|
-
}
|
|
1365
|
-
export declare class BatchOrchestrator {
|
|
1366
|
-
protected context: ExecutionContext;
|
|
1367
|
-
protected config: BatchOrchestratorConfig;
|
|
1368
|
-
constructor(context: ExecutionContext, config?: BatchOrchestratorConfig);
|
|
1369
|
-
processBatchJob(): Promise<void>;
|
|
1370
|
-
protected validateJob(): void;
|
|
1371
|
-
protected prepareData(): Promise<void>;
|
|
1372
|
-
protected sendWorkerStateToCallbackUrl(): Promise<void>;
|
|
1373
|
-
protected getWorkerState(): object;
|
|
1374
|
-
protected delay(ms: number): Promise<void>;
|
|
1375
|
-
protected processWorker(): Promise<void>;
|
|
1376
|
-
protected processNextBatch(): Promise<void>;
|
|
1377
|
-
protected postProcess(): Promise<void>;
|
|
1378
|
-
protected updateJobStatus(): Promise<void>;
|
|
1379
|
-
private isCompleted;
|
|
1380
|
-
}
|
|
1381
1401
|
export declare enum PaginationStrategy {
|
|
1382
1402
|
CURSOR = "cursor",
|
|
1383
1403
|
OFFSET = "offset",
|