@skedulo/pulse-solution-services 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -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/index.d.ts +549 -530
- package/dist/interfaces/files.js +1 -0
- package/dist/interfaces/index.js +1 -1
- package/dist/monitoring/index.js +1 -0
- 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 +234 -8
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,136 @@ 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
|
+
}
|
|
575
|
+
export interface GraphqlQueryParams extends GraphqlParams {
|
|
576
|
+
first?: number;
|
|
577
|
+
offset?: number;
|
|
578
|
+
orderBy?: string;
|
|
579
|
+
filter?: string;
|
|
580
|
+
after?: string;
|
|
581
|
+
fields?: string;
|
|
582
|
+
readOnly?: boolean;
|
|
583
|
+
}
|
|
584
|
+
export interface QueryResult {
|
|
585
|
+
records: HasId[];
|
|
586
|
+
totalCount: number;
|
|
587
|
+
pageInfo: any;
|
|
588
|
+
endCursor: string;
|
|
589
|
+
endOffset: number;
|
|
590
|
+
}
|
|
591
|
+
export interface MutationResult {
|
|
592
|
+
data: {
|
|
593
|
+
schema: {
|
|
594
|
+
[alias: string]: string;
|
|
595
|
+
};
|
|
596
|
+
};
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
599
|
+
* A client for executing GraphQL queries and mutations.
|
|
600
|
+
* Extends the BaseClient to interact with the GraphQL API.
|
|
601
|
+
*/
|
|
602
|
+
export declare class GraphQLClient extends BaseClient {
|
|
603
|
+
/**
|
|
604
|
+
* Executes a GraphQL query or mutation.
|
|
605
|
+
* @param {string} graphqlQuery - The GraphQL query or mutation string.
|
|
606
|
+
* @param {Record<string, string>} headers - Additional headers to include in the request.
|
|
607
|
+
* @returns {Promise<GraphQlResponse>} - The response from the GraphQL API.
|
|
608
|
+
* @throws {Error} - If the request fails or if there are errors in the response.
|
|
609
|
+
*/
|
|
610
|
+
execute(graphqlQuery: string, headers?: Record<string, string>): Promise<GraphQlResponse>;
|
|
611
|
+
/**
|
|
612
|
+
* Executes a GraphQL query or mutation.
|
|
613
|
+
* @param {string} graphqlQuery - The GraphQL queries and/or mutations.
|
|
614
|
+
* @param {Record<string, string>} headers - Additional headers to include in the request.
|
|
615
|
+
* @returns {Promise<GraphQlResponse>} - The response from the GraphQL API.
|
|
616
|
+
* @throws {Error} - If the request fails or if there are errors in the response.
|
|
617
|
+
*/
|
|
618
|
+
executeBatch(graphqlQuery: string, headers?: Record<string, string>): Promise<GraphQlResponse>;
|
|
619
|
+
protected handleResponseData(responseData: any): void;
|
|
620
|
+
}
|
|
621
|
+
/**
|
|
622
|
+
* Interface representing the structure of metadata for an object.
|
|
623
|
+
*/
|
|
624
|
+
export interface Metadata {
|
|
625
|
+
label: string;
|
|
626
|
+
labelPlural: string | null;
|
|
627
|
+
mapping: string;
|
|
628
|
+
name: string;
|
|
629
|
+
}
|
|
630
|
+
/**
|
|
631
|
+
* Interface representing the metadata for a specific object, extending the base Metadata interface.
|
|
632
|
+
*/
|
|
633
|
+
export interface ObjectMetadata extends Metadata {
|
|
634
|
+
relationships: any[];
|
|
635
|
+
fields: any[];
|
|
636
|
+
}
|
|
637
|
+
/**
|
|
638
|
+
* Interface representing the structure of a relationship.
|
|
639
|
+
*/
|
|
640
|
+
export interface RelationshipMapping {
|
|
641
|
+
schemaMapping: string;
|
|
642
|
+
mapping: string;
|
|
643
|
+
fieldMapping: string;
|
|
644
|
+
}
|
|
645
|
+
/**
|
|
646
|
+
* Interface representing the structure of a field.
|
|
647
|
+
*/
|
|
648
|
+
export interface FieldMetadata {
|
|
649
|
+
label: string;
|
|
650
|
+
mapping: string;
|
|
651
|
+
type: string;
|
|
652
|
+
nillable: boolean;
|
|
653
|
+
length: number;
|
|
654
|
+
maxLength: number | null;
|
|
655
|
+
precision: number | null;
|
|
656
|
+
scale: number | null;
|
|
657
|
+
upsertKey: boolean;
|
|
658
|
+
unique: boolean;
|
|
659
|
+
readOnly: boolean;
|
|
660
|
+
accessMode: "read_only" | "read_write";
|
|
661
|
+
relationship: RelationshipMapping | null;
|
|
662
|
+
values: Array<PicklistValue>;
|
|
663
|
+
name: string;
|
|
664
|
+
}
|
|
665
|
+
export interface PicklistValue {
|
|
666
|
+
label: string;
|
|
667
|
+
value: string;
|
|
668
|
+
active: boolean;
|
|
669
|
+
defaultValue: boolean;
|
|
670
|
+
}
|
|
671
|
+
/**
|
|
672
|
+
* MetadataClient class to handle API requests related to metadata.
|
|
673
|
+
* Extends BaseClient to perform API operations.
|
|
674
|
+
*/
|
|
675
|
+
export declare class MetadataClient extends BaseClient {
|
|
676
|
+
/**
|
|
677
|
+
* Fetches all metadata mappings from the metadata endpoint.
|
|
678
|
+
* @returns {Promise<Metadata[]>} - A promise resolving to an object containing an array of Metadata.
|
|
679
|
+
*/
|
|
680
|
+
fetchAllMetadata(): Promise<Metadata[]>;
|
|
681
|
+
/**
|
|
682
|
+
* Fetches metadata for a specific object using its mapping.
|
|
683
|
+
* @param {string} mapping - The API mapping for the object.
|
|
684
|
+
* @returns {Promise<ObjectMetadata>} - A promise resolving to an object containing the metadata of the requested object.
|
|
685
|
+
*/
|
|
686
|
+
fetchObjectMetadata(mapping: string): Promise<ObjectMetadata>;
|
|
687
|
+
}
|
|
736
688
|
export interface JobRequest {
|
|
737
689
|
jobId: string;
|
|
738
690
|
}
|
|
@@ -777,7 +729,11 @@ export interface SmsConfirmationRequest extends JobRequest {
|
|
|
777
729
|
export interface SmsResponse {
|
|
778
730
|
success: boolean;
|
|
779
731
|
}
|
|
780
|
-
|
|
732
|
+
/**
|
|
733
|
+
* Client for handling mobile notifications API operations.
|
|
734
|
+
* Extends BaseClient to provide request methods.
|
|
735
|
+
*/
|
|
736
|
+
export declare class MobileNotificationClient extends BaseClient {
|
|
781
737
|
/**
|
|
782
738
|
* Fetches all mobile notification templates from the API.
|
|
783
739
|
* @returns {Promise<any>} - An array of mobile notification templates.
|
|
@@ -833,6 +789,23 @@ declare class MobileNotificationClient extends BaseClient {
|
|
|
833
789
|
*/
|
|
834
790
|
requestSmsConfirmation(request: SmsConfirmationRequest): Promise<SmsResponse>;
|
|
835
791
|
}
|
|
792
|
+
/**
|
|
793
|
+
* OrgPreferencesClient class to handle API requests related to organization preferences.
|
|
794
|
+
* Extends BaseClient to perform API operations.
|
|
795
|
+
*/
|
|
796
|
+
export declare class OrgPreferenceClient extends BaseClient {
|
|
797
|
+
/**
|
|
798
|
+
* Fetches the organization preferences configuration.
|
|
799
|
+
* @returns {Promise<Record<string, any>>} - A promise resolving to the sorted organization preferences.
|
|
800
|
+
*/
|
|
801
|
+
get(): Promise<Record<string, any>>;
|
|
802
|
+
/**
|
|
803
|
+
* Deploys the organization preferences configuration.
|
|
804
|
+
* @param {Record<string, any>} newConfig - The new configuration to be deployed.
|
|
805
|
+
* @returns {Promise<Record<string, any>>} - A promise resolving when the configuration is successfully deployed.
|
|
806
|
+
*/
|
|
807
|
+
deploy(newConfig: Record<string, any>): Promise<Record<string, any>>;
|
|
808
|
+
}
|
|
836
809
|
export interface VocabularyItem {
|
|
837
810
|
value: string;
|
|
838
811
|
label: string;
|
|
@@ -842,7 +815,11 @@ export interface VocabularyItem {
|
|
|
842
815
|
createdAt?: string;
|
|
843
816
|
updatedAt?: string;
|
|
844
817
|
}
|
|
845
|
-
|
|
818
|
+
/**
|
|
819
|
+
* VocabularyClient handles API requests related to vocabulary fields.
|
|
820
|
+
* Extends BaseClient to perform API operations.
|
|
821
|
+
*/
|
|
822
|
+
export declare class VocabularyClient extends BaseClient {
|
|
846
823
|
/**
|
|
847
824
|
* Fetches vocabulary items for a specific field in a schema.
|
|
848
825
|
* @param {string} schemaName - The schema name.
|
|
@@ -868,6 +845,74 @@ declare class VocabularyClient extends BaseClient {
|
|
|
868
845
|
*/
|
|
869
846
|
updateVocabularyItem(schemaName: string, fieldName: string, value: string, item: VocabularyItem): Promise<VocabularyItem>;
|
|
870
847
|
}
|
|
848
|
+
export interface BaseObject {
|
|
849
|
+
id: string;
|
|
850
|
+
name: string;
|
|
851
|
+
propertyMap?: Record<string, any>;
|
|
852
|
+
}
|
|
853
|
+
export interface BaseEvent extends BaseObject {
|
|
854
|
+
start: Date;
|
|
855
|
+
finish: Date;
|
|
856
|
+
eventType?: string;
|
|
857
|
+
description?: string;
|
|
858
|
+
geoLocation?: LatLng;
|
|
859
|
+
}
|
|
860
|
+
export interface Resource extends BaseObject {
|
|
861
|
+
category?: string;
|
|
862
|
+
employmentType?: string;
|
|
863
|
+
resourceType?: string;
|
|
864
|
+
userId?: string;
|
|
865
|
+
regionId?: string;
|
|
866
|
+
timezone: string;
|
|
867
|
+
tags: Tag[];
|
|
868
|
+
availabilities: BaseEvent[];
|
|
869
|
+
events: BaseEvent[];
|
|
870
|
+
}
|
|
871
|
+
export interface Tag extends BaseObject {
|
|
872
|
+
}
|
|
873
|
+
export interface Availability extends BaseEvent {
|
|
874
|
+
resourceId: string;
|
|
875
|
+
isAvailable: boolean;
|
|
876
|
+
status: string;
|
|
877
|
+
availabilityType: string;
|
|
878
|
+
}
|
|
879
|
+
export interface Activity extends BaseEvent {
|
|
880
|
+
resourceId: string;
|
|
881
|
+
activityType: string;
|
|
882
|
+
}
|
|
883
|
+
export interface JobAllocation extends BaseEvent {
|
|
884
|
+
jobId: string;
|
|
885
|
+
resourceId: string;
|
|
886
|
+
status: string;
|
|
887
|
+
}
|
|
888
|
+
export interface Job extends BaseEvent {
|
|
889
|
+
address: string;
|
|
890
|
+
contactId: string;
|
|
891
|
+
jobStatus: string;
|
|
892
|
+
regionId: string;
|
|
893
|
+
tags: Tag[];
|
|
894
|
+
}
|
|
895
|
+
export interface ResourceShift extends BaseEvent {
|
|
896
|
+
resourceId: string;
|
|
897
|
+
shift: Shift;
|
|
898
|
+
}
|
|
899
|
+
export interface Shift extends BaseEvent {
|
|
900
|
+
regionId: string;
|
|
901
|
+
displayName: string;
|
|
902
|
+
isDraft: boolean;
|
|
903
|
+
}
|
|
904
|
+
export declare class EntityFactory {
|
|
905
|
+
static createBaseObject(data: Record<string, string>): BaseObject;
|
|
906
|
+
static createBaseEvent(data: Record<string, string>): BaseEvent;
|
|
907
|
+
static createTag(data: Record<string, any>): Tag;
|
|
908
|
+
static createResource(data: Record<string, any>): Resource;
|
|
909
|
+
static createJob(data: Record<string, any>): Job;
|
|
910
|
+
static createAvailability(data: Record<string, any>): Availability;
|
|
911
|
+
static createActivity(data: Record<string, any>): Activity;
|
|
912
|
+
static createJobAllocation(data: Record<string, any>): JobAllocation;
|
|
913
|
+
static createResourceShift(data: Record<string, any>): ResourceShift;
|
|
914
|
+
static createShift(data: Record<string, any>): Shift;
|
|
915
|
+
}
|
|
871
916
|
export interface LockInfo {
|
|
872
917
|
name: string;
|
|
873
918
|
ttl: number;
|
|
@@ -951,7 +996,7 @@ export interface CacheOptions<T> {
|
|
|
951
996
|
ttl?: number;
|
|
952
997
|
useSecondaryCache?: boolean;
|
|
953
998
|
}
|
|
954
|
-
declare class GeoService {
|
|
999
|
+
export declare class GeoService {
|
|
955
1000
|
private geoAPIClient;
|
|
956
1001
|
private sessionId;
|
|
957
1002
|
constructor(geoAPIClient: GeoAPIClient);
|
|
@@ -1115,12 +1160,33 @@ export declare class GraphQLQueryBuilder {
|
|
|
1115
1160
|
*/
|
|
1116
1161
|
toString(): string;
|
|
1117
1162
|
}
|
|
1118
|
-
declare class LockService {
|
|
1163
|
+
export declare class LockService {
|
|
1119
1164
|
private configVarClient;
|
|
1120
1165
|
constructor(configVarClient: ConfigVarClient);
|
|
1121
1166
|
acquireLock(lockInfo: LockInfo): Promise<boolean>;
|
|
1122
1167
|
releaseLock(name: string): Promise<void>;
|
|
1123
1168
|
}
|
|
1169
|
+
/**
|
|
1170
|
+
* MetadataService class to process and filter metadata.
|
|
1171
|
+
*/
|
|
1172
|
+
export declare class MetadataService {
|
|
1173
|
+
private client;
|
|
1174
|
+
constructor(client: MetadataClient);
|
|
1175
|
+
/**
|
|
1176
|
+
* Retrieves metadata for specific objects.
|
|
1177
|
+
*
|
|
1178
|
+
* @param objectNames - The names of the objects.
|
|
1179
|
+
* @returns A promise that resolves to metadata records.
|
|
1180
|
+
*/
|
|
1181
|
+
getObjectMetadata(objectNames: string[]): Promise<Record<string, ObjectMetadata>>;
|
|
1182
|
+
/**
|
|
1183
|
+
* Extracts picklist values from the object metadata.
|
|
1184
|
+
*
|
|
1185
|
+
* @param metadata - The metadata of the object.
|
|
1186
|
+
* @returns An object containing the picklist values for each picklist field.
|
|
1187
|
+
*/
|
|
1188
|
+
getPicklistValues(metadata: ObjectMetadata): Record<string, string[]>;
|
|
1189
|
+
}
|
|
1124
1190
|
export declare class ResourceQueryParam {
|
|
1125
1191
|
resourceIds?: Set<string>;
|
|
1126
1192
|
regionIds?: Set<string>;
|
|
@@ -1252,6 +1318,7 @@ export declare class ExecutionContext {
|
|
|
1252
1318
|
get mobileNotificationClient(): MobileNotificationClient;
|
|
1253
1319
|
get geoAPIClient(): GeoAPIClient;
|
|
1254
1320
|
get availabilityAPIClient(): AvailabilityAPIClient;
|
|
1321
|
+
get filesAPIClient(): FilesAPIClient;
|
|
1255
1322
|
get geoService(): GeoService;
|
|
1256
1323
|
get lockService(): LockService;
|
|
1257
1324
|
get configVarCache(): CacheService<any>;
|
|
@@ -1330,54 +1397,6 @@ export declare const TenantObjects: {
|
|
|
1330
1397
|
* Uses Winston logger but retains ANSI colors for console logs.
|
|
1331
1398
|
*/
|
|
1332
1399
|
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
1400
|
export declare enum PaginationStrategy {
|
|
1382
1401
|
CURSOR = "cursor",
|
|
1383
1402
|
OFFSET = "offset",
|