@salesforce/lds-adapters-platform-interaction-orchestrator 1.124.1 → 1.124.3
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/dist/es/es2018/platform-interaction-orchestrator.js +1066 -1066
- package/dist/{types → es/es2018/types}/src/generated/adapters/adapter-utils.d.ts +66 -66
- package/dist/{types → es/es2018/types}/src/generated/adapters/getOrchestrationInstanceCollection.d.ts +27 -27
- package/dist/{types → es/es2018/types}/src/generated/artifacts/main.d.ts +1 -1
- package/dist/{types → es/es2018/types}/src/generated/artifacts/sfdc.d.ts +3 -3
- package/dist/{types → es/es2018/types}/src/generated/resources/getConnectInteractionOrchestrationInstances.d.ts +16 -16
- package/dist/{types → es/es2018/types}/src/generated/types/FlowOrchestrationInstanceCollectionRepresentation.d.ts +31 -31
- package/dist/{types → es/es2018/types}/src/generated/types/FlowOrchestrationInstanceRepresentation.d.ts +48 -48
- package/dist/{types → es/es2018/types}/src/generated/types/FlowOrchestrationStageInstanceRepresentation.d.ts +42 -42
- package/dist/{types → es/es2018/types}/src/generated/types/FlowOrchestrationStepInstanceRepresentation.d.ts +45 -45
- package/dist/{types → es/es2018/types}/src/generated/types/FlowOrchestrationWorkAssignmentRepresentation.d.ts +26 -26
- package/dist/{types → es/es2018/types}/src/generated/types/FlowOrchestrationWorkItemRepresentation.d.ts +53 -53
- package/dist/{types → es/es2018/types}/src/generated/types/type-utils.d.ts +39 -39
- package/package.json +5 -5
- package/sfdc/index.d.ts +1 -1
- package/sfdc/index.js +1086 -1086
- package/dist/umd/es2018/platform-interaction-orchestrator.js +0 -1101
- package/dist/umd/es5/platform-interaction-orchestrator.js +0 -1106
|
@@ -1,1106 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2022, Salesforce, Inc.,
|
|
3
|
-
* All rights reserved.
|
|
4
|
-
* For full license text, see the LICENSE.txt file
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
(function (global, factory) {
|
|
8
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@luvio/engine')) :
|
|
9
|
-
typeof define === 'function' && define.amd ? define(['exports', '@luvio/engine'], factory) :
|
|
10
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["platformInteraction-orchestrator"] = {}, global.engine));
|
|
11
|
-
})(this, (function (exports, engine) { 'use strict';
|
|
12
|
-
|
|
13
|
-
var ObjectPrototypeHasOwnProperty = Object.prototype.hasOwnProperty;
|
|
14
|
-
var ObjectKeys = Object.keys;
|
|
15
|
-
var ArrayIsArray$1 = Array.isArray;
|
|
16
|
-
/**
|
|
17
|
-
* Validates an adapter config is well-formed.
|
|
18
|
-
* @param config The config to validate.
|
|
19
|
-
* @param adapter The adapter validation configuration.
|
|
20
|
-
* @param oneOf The keys the config must contain at least one of.
|
|
21
|
-
* @throws A TypeError if config doesn't satisfy the adapter's config validation.
|
|
22
|
-
*/
|
|
23
|
-
function validateConfig(config, adapter, oneOf) {
|
|
24
|
-
var displayName = adapter.displayName;
|
|
25
|
-
var _a = adapter.parameters, required = _a.required, optional = _a.optional, unsupported = _a.unsupported;
|
|
26
|
-
if (config === undefined ||
|
|
27
|
-
required.every(function (req) { return ObjectPrototypeHasOwnProperty.call(config, req); }) === false) {
|
|
28
|
-
throw new TypeError("adapter ".concat(displayName, " configuration must specify ").concat(required.sort().join(', ')));
|
|
29
|
-
}
|
|
30
|
-
if (oneOf && oneOf.some(function (req) { return ObjectPrototypeHasOwnProperty.call(config, req); }) === false) {
|
|
31
|
-
throw new TypeError("adapter ".concat(displayName, " configuration must specify one of ").concat(oneOf.sort().join(', ')));
|
|
32
|
-
}
|
|
33
|
-
if (unsupported !== undefined &&
|
|
34
|
-
unsupported.some(function (req) { return ObjectPrototypeHasOwnProperty.call(config, req); })) {
|
|
35
|
-
throw new TypeError("adapter ".concat(displayName, " does not yet support ").concat(unsupported.sort().join(', ')));
|
|
36
|
-
}
|
|
37
|
-
var supported = required.concat(optional);
|
|
38
|
-
if (ObjectKeys(config).some(function (key) { return !supported.includes(key); })) {
|
|
39
|
-
throw new TypeError("adapter ".concat(displayName, " configuration supports only ").concat(supported.sort().join(', ')));
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
function untrustedIsObject(untrusted) {
|
|
43
|
-
return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
|
|
44
|
-
}
|
|
45
|
-
function areRequiredParametersPresent(config, configPropertyNames) {
|
|
46
|
-
return configPropertyNames.parameters.required.every(function (req) { return req in config; });
|
|
47
|
-
}
|
|
48
|
-
var snapshotRefreshOptions = {
|
|
49
|
-
overrides: {
|
|
50
|
-
headers: {
|
|
51
|
-
'Cache-Control': 'no-cache',
|
|
52
|
-
},
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
var keyPrefix = 'InteractionOrchestrator';
|
|
56
|
-
|
|
57
|
-
var ArrayIsArray = Array.isArray;
|
|
58
|
-
function equalsArray(a, b, equalsItem) {
|
|
59
|
-
var aLength = a.length;
|
|
60
|
-
var bLength = b.length;
|
|
61
|
-
if (aLength !== bLength) {
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
64
|
-
for (var i = 0; i < aLength; i++) {
|
|
65
|
-
if (equalsItem(a[i], b[i]) === false) {
|
|
66
|
-
return false;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
return true;
|
|
70
|
-
}
|
|
71
|
-
function createLink(ref) {
|
|
72
|
-
return {
|
|
73
|
-
__ref: engine.serializeStructuredKey(ref),
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
var VERSION$4 = "ab05f41c9070286098c01e14dc5587f6";
|
|
78
|
-
function validate$4(obj, path) {
|
|
79
|
-
if (path === void 0) { path = 'FlowOrchestrationWorkItemRepresentation'; }
|
|
80
|
-
var v_error = (function () {
|
|
81
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
82
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
83
|
-
}
|
|
84
|
-
var obj_assigneeId = obj.assigneeId;
|
|
85
|
-
var path_assigneeId = path + '.assigneeId';
|
|
86
|
-
if (typeof obj_assigneeId !== 'string') {
|
|
87
|
-
return new TypeError('Expected "string" but received "' + typeof obj_assigneeId + '" (at "' + path_assigneeId + '")');
|
|
88
|
-
}
|
|
89
|
-
var obj_description = obj.description;
|
|
90
|
-
var path_description = path + '.description';
|
|
91
|
-
var obj_description_union0 = null;
|
|
92
|
-
var obj_description_union0_error = (function () {
|
|
93
|
-
if (typeof obj_description !== 'string') {
|
|
94
|
-
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
95
|
-
}
|
|
96
|
-
})();
|
|
97
|
-
if (obj_description_union0_error != null) {
|
|
98
|
-
obj_description_union0 = obj_description_union0_error.message;
|
|
99
|
-
}
|
|
100
|
-
var obj_description_union1 = null;
|
|
101
|
-
var obj_description_union1_error = (function () {
|
|
102
|
-
if (obj_description !== null) {
|
|
103
|
-
return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
104
|
-
}
|
|
105
|
-
})();
|
|
106
|
-
if (obj_description_union1_error != null) {
|
|
107
|
-
obj_description_union1 = obj_description_union1_error.message;
|
|
108
|
-
}
|
|
109
|
-
if (obj_description_union0 && obj_description_union1) {
|
|
110
|
-
var message = 'Object doesn\'t match union (at "' + path_description + '")';
|
|
111
|
-
message += '\n' + obj_description_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
112
|
-
message += '\n' + obj_description_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
113
|
-
return new TypeError(message);
|
|
114
|
-
}
|
|
115
|
-
var obj_id = obj.id;
|
|
116
|
-
var path_id = path + '.id';
|
|
117
|
-
if (typeof obj_id !== 'string') {
|
|
118
|
-
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
119
|
-
}
|
|
120
|
-
var obj_label = obj.label;
|
|
121
|
-
var path_label = path + '.label';
|
|
122
|
-
var obj_label_union0 = null;
|
|
123
|
-
var obj_label_union0_error = (function () {
|
|
124
|
-
if (typeof obj_label !== 'string') {
|
|
125
|
-
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
126
|
-
}
|
|
127
|
-
})();
|
|
128
|
-
if (obj_label_union0_error != null) {
|
|
129
|
-
obj_label_union0 = obj_label_union0_error.message;
|
|
130
|
-
}
|
|
131
|
-
var obj_label_union1 = null;
|
|
132
|
-
var obj_label_union1_error = (function () {
|
|
133
|
-
if (obj_label !== null) {
|
|
134
|
-
return new TypeError('Expected "null" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
135
|
-
}
|
|
136
|
-
})();
|
|
137
|
-
if (obj_label_union1_error != null) {
|
|
138
|
-
obj_label_union1 = obj_label_union1_error.message;
|
|
139
|
-
}
|
|
140
|
-
if (obj_label_union0 && obj_label_union1) {
|
|
141
|
-
var message = 'Object doesn\'t match union (at "' + path_label + '")';
|
|
142
|
-
message += '\n' + obj_label_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
143
|
-
message += '\n' + obj_label_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
144
|
-
return new TypeError(message);
|
|
145
|
-
}
|
|
146
|
-
var obj_relatedRecordId = obj.relatedRecordId;
|
|
147
|
-
var path_relatedRecordId = path + '.relatedRecordId';
|
|
148
|
-
var obj_relatedRecordId_union0 = null;
|
|
149
|
-
var obj_relatedRecordId_union0_error = (function () {
|
|
150
|
-
if (typeof obj_relatedRecordId !== 'string') {
|
|
151
|
-
return new TypeError('Expected "string" but received "' + typeof obj_relatedRecordId + '" (at "' + path_relatedRecordId + '")');
|
|
152
|
-
}
|
|
153
|
-
})();
|
|
154
|
-
if (obj_relatedRecordId_union0_error != null) {
|
|
155
|
-
obj_relatedRecordId_union0 = obj_relatedRecordId_union0_error.message;
|
|
156
|
-
}
|
|
157
|
-
var obj_relatedRecordId_union1 = null;
|
|
158
|
-
var obj_relatedRecordId_union1_error = (function () {
|
|
159
|
-
if (obj_relatedRecordId !== null) {
|
|
160
|
-
return new TypeError('Expected "null" but received "' + typeof obj_relatedRecordId + '" (at "' + path_relatedRecordId + '")');
|
|
161
|
-
}
|
|
162
|
-
})();
|
|
163
|
-
if (obj_relatedRecordId_union1_error != null) {
|
|
164
|
-
obj_relatedRecordId_union1 = obj_relatedRecordId_union1_error.message;
|
|
165
|
-
}
|
|
166
|
-
if (obj_relatedRecordId_union0 && obj_relatedRecordId_union1) {
|
|
167
|
-
var message = 'Object doesn\'t match union (at "' + path_relatedRecordId + '")';
|
|
168
|
-
message += '\n' + obj_relatedRecordId_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
169
|
-
message += '\n' + obj_relatedRecordId_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
170
|
-
return new TypeError(message);
|
|
171
|
-
}
|
|
172
|
-
var obj_screenFlowDeveloperName = obj.screenFlowDeveloperName;
|
|
173
|
-
var path_screenFlowDeveloperName = path + '.screenFlowDeveloperName';
|
|
174
|
-
if (typeof obj_screenFlowDeveloperName !== 'string') {
|
|
175
|
-
return new TypeError('Expected "string" but received "' + typeof obj_screenFlowDeveloperName + '" (at "' + path_screenFlowDeveloperName + '")');
|
|
176
|
-
}
|
|
177
|
-
var obj_screenFlowId = obj.screenFlowId;
|
|
178
|
-
var path_screenFlowId = path + '.screenFlowId';
|
|
179
|
-
if (typeof obj_screenFlowId !== 'string') {
|
|
180
|
-
return new TypeError('Expected "string" but received "' + typeof obj_screenFlowId + '" (at "' + path_screenFlowId + '")');
|
|
181
|
-
}
|
|
182
|
-
var obj_screenFlowInputs = obj.screenFlowInputs;
|
|
183
|
-
var path_screenFlowInputs = path + '.screenFlowInputs';
|
|
184
|
-
if (typeof obj_screenFlowInputs !== 'string') {
|
|
185
|
-
return new TypeError('Expected "string" but received "' + typeof obj_screenFlowInputs + '" (at "' + path_screenFlowInputs + '")');
|
|
186
|
-
}
|
|
187
|
-
var obj_status = obj.status;
|
|
188
|
-
var path_status = path + '.status';
|
|
189
|
-
if (typeof obj_status !== 'string') {
|
|
190
|
-
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
191
|
-
}
|
|
192
|
-
})();
|
|
193
|
-
return v_error === undefined ? null : v_error;
|
|
194
|
-
}
|
|
195
|
-
var select$5 = function FlowOrchestrationWorkItemRepresentationSelect() {
|
|
196
|
-
return {
|
|
197
|
-
kind: 'Fragment',
|
|
198
|
-
version: VERSION$4,
|
|
199
|
-
private: [],
|
|
200
|
-
selections: [
|
|
201
|
-
{
|
|
202
|
-
name: 'assigneeId',
|
|
203
|
-
kind: 'Scalar'
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
name: 'description',
|
|
207
|
-
kind: 'Scalar'
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
name: 'id',
|
|
211
|
-
kind: 'Scalar'
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
name: 'label',
|
|
215
|
-
kind: 'Scalar'
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
name: 'relatedRecordId',
|
|
219
|
-
kind: 'Scalar'
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
name: 'screenFlowDeveloperName',
|
|
223
|
-
kind: 'Scalar'
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
name: 'screenFlowId',
|
|
227
|
-
kind: 'Scalar'
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
name: 'screenFlowInputs',
|
|
231
|
-
kind: 'Scalar'
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
name: 'status',
|
|
235
|
-
kind: 'Scalar'
|
|
236
|
-
}
|
|
237
|
-
]
|
|
238
|
-
};
|
|
239
|
-
};
|
|
240
|
-
function equals$4(existing, incoming) {
|
|
241
|
-
var existing_assigneeId = existing.assigneeId;
|
|
242
|
-
var incoming_assigneeId = incoming.assigneeId;
|
|
243
|
-
if (!(existing_assigneeId === incoming_assigneeId)) {
|
|
244
|
-
return false;
|
|
245
|
-
}
|
|
246
|
-
var existing_id = existing.id;
|
|
247
|
-
var incoming_id = incoming.id;
|
|
248
|
-
if (!(existing_id === incoming_id)) {
|
|
249
|
-
return false;
|
|
250
|
-
}
|
|
251
|
-
var existing_screenFlowDeveloperName = existing.screenFlowDeveloperName;
|
|
252
|
-
var incoming_screenFlowDeveloperName = incoming.screenFlowDeveloperName;
|
|
253
|
-
if (!(existing_screenFlowDeveloperName === incoming_screenFlowDeveloperName)) {
|
|
254
|
-
return false;
|
|
255
|
-
}
|
|
256
|
-
var existing_screenFlowId = existing.screenFlowId;
|
|
257
|
-
var incoming_screenFlowId = incoming.screenFlowId;
|
|
258
|
-
if (!(existing_screenFlowId === incoming_screenFlowId)) {
|
|
259
|
-
return false;
|
|
260
|
-
}
|
|
261
|
-
var existing_screenFlowInputs = existing.screenFlowInputs;
|
|
262
|
-
var incoming_screenFlowInputs = incoming.screenFlowInputs;
|
|
263
|
-
if (!(existing_screenFlowInputs === incoming_screenFlowInputs)) {
|
|
264
|
-
return false;
|
|
265
|
-
}
|
|
266
|
-
var existing_status = existing.status;
|
|
267
|
-
var incoming_status = incoming.status;
|
|
268
|
-
if (!(existing_status === incoming_status)) {
|
|
269
|
-
return false;
|
|
270
|
-
}
|
|
271
|
-
var existing_description = existing.description;
|
|
272
|
-
var incoming_description = incoming.description;
|
|
273
|
-
if (!(existing_description === incoming_description)) {
|
|
274
|
-
return false;
|
|
275
|
-
}
|
|
276
|
-
var existing_label = existing.label;
|
|
277
|
-
var incoming_label = incoming.label;
|
|
278
|
-
if (!(existing_label === incoming_label)) {
|
|
279
|
-
return false;
|
|
280
|
-
}
|
|
281
|
-
var existing_relatedRecordId = existing.relatedRecordId;
|
|
282
|
-
var incoming_relatedRecordId = incoming.relatedRecordId;
|
|
283
|
-
if (!(existing_relatedRecordId === incoming_relatedRecordId)) {
|
|
284
|
-
return false;
|
|
285
|
-
}
|
|
286
|
-
return true;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
var VERSION$3 = "9817b563e81370d761a0d7f4b18410e4";
|
|
290
|
-
function validate$3(obj, path) {
|
|
291
|
-
if (path === void 0) { path = 'FlowOrchestrationStepInstanceRepresentation'; }
|
|
292
|
-
var v_error = (function () {
|
|
293
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
294
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
295
|
-
}
|
|
296
|
-
var obj_id = obj.id;
|
|
297
|
-
var path_id = path + '.id';
|
|
298
|
-
if (typeof obj_id !== 'string') {
|
|
299
|
-
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
300
|
-
}
|
|
301
|
-
var obj_label = obj.label;
|
|
302
|
-
var path_label = path + '.label';
|
|
303
|
-
var obj_label_union0 = null;
|
|
304
|
-
var obj_label_union0_error = (function () {
|
|
305
|
-
if (typeof obj_label !== 'string') {
|
|
306
|
-
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
307
|
-
}
|
|
308
|
-
})();
|
|
309
|
-
if (obj_label_union0_error != null) {
|
|
310
|
-
obj_label_union0 = obj_label_union0_error.message;
|
|
311
|
-
}
|
|
312
|
-
var obj_label_union1 = null;
|
|
313
|
-
var obj_label_union1_error = (function () {
|
|
314
|
-
if (obj_label !== null) {
|
|
315
|
-
return new TypeError('Expected "null" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
316
|
-
}
|
|
317
|
-
})();
|
|
318
|
-
if (obj_label_union1_error != null) {
|
|
319
|
-
obj_label_union1 = obj_label_union1_error.message;
|
|
320
|
-
}
|
|
321
|
-
if (obj_label_union0 && obj_label_union1) {
|
|
322
|
-
var message = 'Object doesn\'t match union (at "' + path_label + '")';
|
|
323
|
-
message += '\n' + obj_label_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
324
|
-
message += '\n' + obj_label_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
325
|
-
return new TypeError(message);
|
|
326
|
-
}
|
|
327
|
-
var obj_name = obj.name;
|
|
328
|
-
var path_name = path + '.name';
|
|
329
|
-
var obj_name_union0 = null;
|
|
330
|
-
var obj_name_union0_error = (function () {
|
|
331
|
-
if (typeof obj_name !== 'string') {
|
|
332
|
-
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
333
|
-
}
|
|
334
|
-
})();
|
|
335
|
-
if (obj_name_union0_error != null) {
|
|
336
|
-
obj_name_union0 = obj_name_union0_error.message;
|
|
337
|
-
}
|
|
338
|
-
var obj_name_union1 = null;
|
|
339
|
-
var obj_name_union1_error = (function () {
|
|
340
|
-
if (obj_name !== null) {
|
|
341
|
-
return new TypeError('Expected "null" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
342
|
-
}
|
|
343
|
-
})();
|
|
344
|
-
if (obj_name_union1_error != null) {
|
|
345
|
-
obj_name_union1 = obj_name_union1_error.message;
|
|
346
|
-
}
|
|
347
|
-
if (obj_name_union0 && obj_name_union1) {
|
|
348
|
-
var message = 'Object doesn\'t match union (at "' + path_name + '")';
|
|
349
|
-
message += '\n' + obj_name_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
350
|
-
message += '\n' + obj_name_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
351
|
-
return new TypeError(message);
|
|
352
|
-
}
|
|
353
|
-
var obj_status = obj.status;
|
|
354
|
-
var path_status = path + '.status';
|
|
355
|
-
if (typeof obj_status !== 'string') {
|
|
356
|
-
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
357
|
-
}
|
|
358
|
-
var obj_stepType = obj.stepType;
|
|
359
|
-
var path_stepType = path + '.stepType';
|
|
360
|
-
if (typeof obj_stepType !== 'string') {
|
|
361
|
-
return new TypeError('Expected "string" but received "' + typeof obj_stepType + '" (at "' + path_stepType + '")');
|
|
362
|
-
}
|
|
363
|
-
var obj_workItems = obj.workItems;
|
|
364
|
-
var path_workItems = path + '.workItems';
|
|
365
|
-
if (!ArrayIsArray(obj_workItems)) {
|
|
366
|
-
return new TypeError('Expected "array" but received "' + typeof obj_workItems + '" (at "' + path_workItems + '")');
|
|
367
|
-
}
|
|
368
|
-
for (var i = 0; i < obj_workItems.length; i++) {
|
|
369
|
-
var obj_workItems_item = obj_workItems[i];
|
|
370
|
-
var path_workItems_item = path_workItems + '[' + i + ']';
|
|
371
|
-
var referencepath_workItems_itemValidationError = validate$4(obj_workItems_item, path_workItems_item);
|
|
372
|
-
if (referencepath_workItems_itemValidationError !== null) {
|
|
373
|
-
var message = 'Object doesn\'t match FlowOrchestrationWorkItemRepresentation (at "' + path_workItems_item + '")\n';
|
|
374
|
-
message += referencepath_workItems_itemValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
375
|
-
return new TypeError(message);
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
})();
|
|
379
|
-
return v_error === undefined ? null : v_error;
|
|
380
|
-
}
|
|
381
|
-
var select$4 = function FlowOrchestrationStepInstanceRepresentationSelect() {
|
|
382
|
-
var _a = select$5(), FlowOrchestrationWorkItemRepresentation__selections = _a.selections;
|
|
383
|
-
return {
|
|
384
|
-
kind: 'Fragment',
|
|
385
|
-
version: VERSION$3,
|
|
386
|
-
private: [],
|
|
387
|
-
selections: [
|
|
388
|
-
{
|
|
389
|
-
name: 'id',
|
|
390
|
-
kind: 'Scalar'
|
|
391
|
-
},
|
|
392
|
-
{
|
|
393
|
-
name: 'label',
|
|
394
|
-
kind: 'Scalar'
|
|
395
|
-
},
|
|
396
|
-
{
|
|
397
|
-
name: 'name',
|
|
398
|
-
kind: 'Scalar'
|
|
399
|
-
},
|
|
400
|
-
{
|
|
401
|
-
name: 'status',
|
|
402
|
-
kind: 'Scalar'
|
|
403
|
-
},
|
|
404
|
-
{
|
|
405
|
-
name: 'stepType',
|
|
406
|
-
kind: 'Scalar'
|
|
407
|
-
},
|
|
408
|
-
{
|
|
409
|
-
name: 'workItems',
|
|
410
|
-
kind: 'Object',
|
|
411
|
-
plural: true,
|
|
412
|
-
selections: FlowOrchestrationWorkItemRepresentation__selections
|
|
413
|
-
}
|
|
414
|
-
]
|
|
415
|
-
};
|
|
416
|
-
};
|
|
417
|
-
function equals$3(existing, incoming) {
|
|
418
|
-
var existing_id = existing.id;
|
|
419
|
-
var incoming_id = incoming.id;
|
|
420
|
-
if (!(existing_id === incoming_id)) {
|
|
421
|
-
return false;
|
|
422
|
-
}
|
|
423
|
-
var existing_status = existing.status;
|
|
424
|
-
var incoming_status = incoming.status;
|
|
425
|
-
if (!(existing_status === incoming_status)) {
|
|
426
|
-
return false;
|
|
427
|
-
}
|
|
428
|
-
var existing_stepType = existing.stepType;
|
|
429
|
-
var incoming_stepType = incoming.stepType;
|
|
430
|
-
if (!(existing_stepType === incoming_stepType)) {
|
|
431
|
-
return false;
|
|
432
|
-
}
|
|
433
|
-
var existing_label = existing.label;
|
|
434
|
-
var incoming_label = incoming.label;
|
|
435
|
-
if (!(existing_label === incoming_label)) {
|
|
436
|
-
return false;
|
|
437
|
-
}
|
|
438
|
-
var existing_name = existing.name;
|
|
439
|
-
var incoming_name = incoming.name;
|
|
440
|
-
if (!(existing_name === incoming_name)) {
|
|
441
|
-
return false;
|
|
442
|
-
}
|
|
443
|
-
var existing_workItems = existing.workItems;
|
|
444
|
-
var incoming_workItems = incoming.workItems;
|
|
445
|
-
var equals_workItems_items = equalsArray(existing_workItems, incoming_workItems, function (existing_workItems_item, incoming_workItems_item) {
|
|
446
|
-
if (!(equals$4(existing_workItems_item, incoming_workItems_item))) {
|
|
447
|
-
return false;
|
|
448
|
-
}
|
|
449
|
-
});
|
|
450
|
-
if (equals_workItems_items === false) {
|
|
451
|
-
return false;
|
|
452
|
-
}
|
|
453
|
-
return true;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
var VERSION$2 = "4d586ae3293b53e776853c9b4e1ad36b";
|
|
457
|
-
function validate$2(obj, path) {
|
|
458
|
-
if (path === void 0) { path = 'FlowOrchestrationStageInstanceRepresentation'; }
|
|
459
|
-
var v_error = (function () {
|
|
460
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
461
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
462
|
-
}
|
|
463
|
-
var obj_id = obj.id;
|
|
464
|
-
var path_id = path + '.id';
|
|
465
|
-
if (typeof obj_id !== 'string') {
|
|
466
|
-
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
467
|
-
}
|
|
468
|
-
var obj_label = obj.label;
|
|
469
|
-
var path_label = path + '.label';
|
|
470
|
-
var obj_label_union0 = null;
|
|
471
|
-
var obj_label_union0_error = (function () {
|
|
472
|
-
if (typeof obj_label !== 'string') {
|
|
473
|
-
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
474
|
-
}
|
|
475
|
-
})();
|
|
476
|
-
if (obj_label_union0_error != null) {
|
|
477
|
-
obj_label_union0 = obj_label_union0_error.message;
|
|
478
|
-
}
|
|
479
|
-
var obj_label_union1 = null;
|
|
480
|
-
var obj_label_union1_error = (function () {
|
|
481
|
-
if (obj_label !== null) {
|
|
482
|
-
return new TypeError('Expected "null" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
483
|
-
}
|
|
484
|
-
})();
|
|
485
|
-
if (obj_label_union1_error != null) {
|
|
486
|
-
obj_label_union1 = obj_label_union1_error.message;
|
|
487
|
-
}
|
|
488
|
-
if (obj_label_union0 && obj_label_union1) {
|
|
489
|
-
var message = 'Object doesn\'t match union (at "' + path_label + '")';
|
|
490
|
-
message += '\n' + obj_label_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
491
|
-
message += '\n' + obj_label_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
492
|
-
return new TypeError(message);
|
|
493
|
-
}
|
|
494
|
-
var obj_name = obj.name;
|
|
495
|
-
var path_name = path + '.name';
|
|
496
|
-
var obj_name_union0 = null;
|
|
497
|
-
var obj_name_union0_error = (function () {
|
|
498
|
-
if (typeof obj_name !== 'string') {
|
|
499
|
-
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
500
|
-
}
|
|
501
|
-
})();
|
|
502
|
-
if (obj_name_union0_error != null) {
|
|
503
|
-
obj_name_union0 = obj_name_union0_error.message;
|
|
504
|
-
}
|
|
505
|
-
var obj_name_union1 = null;
|
|
506
|
-
var obj_name_union1_error = (function () {
|
|
507
|
-
if (obj_name !== null) {
|
|
508
|
-
return new TypeError('Expected "null" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
509
|
-
}
|
|
510
|
-
})();
|
|
511
|
-
if (obj_name_union1_error != null) {
|
|
512
|
-
obj_name_union1 = obj_name_union1_error.message;
|
|
513
|
-
}
|
|
514
|
-
if (obj_name_union0 && obj_name_union1) {
|
|
515
|
-
var message = 'Object doesn\'t match union (at "' + path_name + '")';
|
|
516
|
-
message += '\n' + obj_name_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
517
|
-
message += '\n' + obj_name_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
518
|
-
return new TypeError(message);
|
|
519
|
-
}
|
|
520
|
-
var obj_status = obj.status;
|
|
521
|
-
var path_status = path + '.status';
|
|
522
|
-
if (typeof obj_status !== 'string') {
|
|
523
|
-
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
524
|
-
}
|
|
525
|
-
var obj_stepInstances = obj.stepInstances;
|
|
526
|
-
var path_stepInstances = path + '.stepInstances';
|
|
527
|
-
if (!ArrayIsArray(obj_stepInstances)) {
|
|
528
|
-
return new TypeError('Expected "array" but received "' + typeof obj_stepInstances + '" (at "' + path_stepInstances + '")');
|
|
529
|
-
}
|
|
530
|
-
for (var i = 0; i < obj_stepInstances.length; i++) {
|
|
531
|
-
var obj_stepInstances_item = obj_stepInstances[i];
|
|
532
|
-
var path_stepInstances_item = path_stepInstances + '[' + i + ']';
|
|
533
|
-
var referencepath_stepInstances_itemValidationError = validate$3(obj_stepInstances_item, path_stepInstances_item);
|
|
534
|
-
if (referencepath_stepInstances_itemValidationError !== null) {
|
|
535
|
-
var message = 'Object doesn\'t match FlowOrchestrationStepInstanceRepresentation (at "' + path_stepInstances_item + '")\n';
|
|
536
|
-
message += referencepath_stepInstances_itemValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
537
|
-
return new TypeError(message);
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
})();
|
|
541
|
-
return v_error === undefined ? null : v_error;
|
|
542
|
-
}
|
|
543
|
-
var select$3 = function FlowOrchestrationStageInstanceRepresentationSelect() {
|
|
544
|
-
var _a = select$4(), FlowOrchestrationStepInstanceRepresentation__selections = _a.selections;
|
|
545
|
-
return {
|
|
546
|
-
kind: 'Fragment',
|
|
547
|
-
version: VERSION$2,
|
|
548
|
-
private: [],
|
|
549
|
-
selections: [
|
|
550
|
-
{
|
|
551
|
-
name: 'id',
|
|
552
|
-
kind: 'Scalar'
|
|
553
|
-
},
|
|
554
|
-
{
|
|
555
|
-
name: 'label',
|
|
556
|
-
kind: 'Scalar'
|
|
557
|
-
},
|
|
558
|
-
{
|
|
559
|
-
name: 'name',
|
|
560
|
-
kind: 'Scalar'
|
|
561
|
-
},
|
|
562
|
-
{
|
|
563
|
-
name: 'status',
|
|
564
|
-
kind: 'Scalar'
|
|
565
|
-
},
|
|
566
|
-
{
|
|
567
|
-
name: 'stepInstances',
|
|
568
|
-
kind: 'Object',
|
|
569
|
-
plural: true,
|
|
570
|
-
selections: FlowOrchestrationStepInstanceRepresentation__selections
|
|
571
|
-
}
|
|
572
|
-
]
|
|
573
|
-
};
|
|
574
|
-
};
|
|
575
|
-
function equals$2(existing, incoming) {
|
|
576
|
-
var existing_id = existing.id;
|
|
577
|
-
var incoming_id = incoming.id;
|
|
578
|
-
if (!(existing_id === incoming_id)) {
|
|
579
|
-
return false;
|
|
580
|
-
}
|
|
581
|
-
var existing_status = existing.status;
|
|
582
|
-
var incoming_status = incoming.status;
|
|
583
|
-
if (!(existing_status === incoming_status)) {
|
|
584
|
-
return false;
|
|
585
|
-
}
|
|
586
|
-
var existing_label = existing.label;
|
|
587
|
-
var incoming_label = incoming.label;
|
|
588
|
-
if (!(existing_label === incoming_label)) {
|
|
589
|
-
return false;
|
|
590
|
-
}
|
|
591
|
-
var existing_name = existing.name;
|
|
592
|
-
var incoming_name = incoming.name;
|
|
593
|
-
if (!(existing_name === incoming_name)) {
|
|
594
|
-
return false;
|
|
595
|
-
}
|
|
596
|
-
var existing_stepInstances = existing.stepInstances;
|
|
597
|
-
var incoming_stepInstances = incoming.stepInstances;
|
|
598
|
-
var equals_stepInstances_items = equalsArray(existing_stepInstances, incoming_stepInstances, function (existing_stepInstances_item, incoming_stepInstances_item) {
|
|
599
|
-
if (!(equals$3(existing_stepInstances_item, incoming_stepInstances_item))) {
|
|
600
|
-
return false;
|
|
601
|
-
}
|
|
602
|
-
});
|
|
603
|
-
if (equals_stepInstances_items === false) {
|
|
604
|
-
return false;
|
|
605
|
-
}
|
|
606
|
-
return true;
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
var VERSION$1 = "5cd09fe6e4e088f4787a6cf1b9ab7a2a";
|
|
610
|
-
function validate$1(obj, path) {
|
|
611
|
-
if (path === void 0) { path = 'FlowOrchestrationInstanceRepresentation'; }
|
|
612
|
-
var v_error = (function () {
|
|
613
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
614
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
615
|
-
}
|
|
616
|
-
var obj_flowDefinitionDeveloperName = obj.flowDefinitionDeveloperName;
|
|
617
|
-
var path_flowDefinitionDeveloperName = path + '.flowDefinitionDeveloperName';
|
|
618
|
-
var obj_flowDefinitionDeveloperName_union0 = null;
|
|
619
|
-
var obj_flowDefinitionDeveloperName_union0_error = (function () {
|
|
620
|
-
if (typeof obj_flowDefinitionDeveloperName !== 'string') {
|
|
621
|
-
return new TypeError('Expected "string" but received "' + typeof obj_flowDefinitionDeveloperName + '" (at "' + path_flowDefinitionDeveloperName + '")');
|
|
622
|
-
}
|
|
623
|
-
})();
|
|
624
|
-
if (obj_flowDefinitionDeveloperName_union0_error != null) {
|
|
625
|
-
obj_flowDefinitionDeveloperName_union0 = obj_flowDefinitionDeveloperName_union0_error.message;
|
|
626
|
-
}
|
|
627
|
-
var obj_flowDefinitionDeveloperName_union1 = null;
|
|
628
|
-
var obj_flowDefinitionDeveloperName_union1_error = (function () {
|
|
629
|
-
if (obj_flowDefinitionDeveloperName !== null) {
|
|
630
|
-
return new TypeError('Expected "null" but received "' + typeof obj_flowDefinitionDeveloperName + '" (at "' + path_flowDefinitionDeveloperName + '")');
|
|
631
|
-
}
|
|
632
|
-
})();
|
|
633
|
-
if (obj_flowDefinitionDeveloperName_union1_error != null) {
|
|
634
|
-
obj_flowDefinitionDeveloperName_union1 = obj_flowDefinitionDeveloperName_union1_error.message;
|
|
635
|
-
}
|
|
636
|
-
if (obj_flowDefinitionDeveloperName_union0 && obj_flowDefinitionDeveloperName_union1) {
|
|
637
|
-
var message = 'Object doesn\'t match union (at "' + path_flowDefinitionDeveloperName + '")';
|
|
638
|
-
message += '\n' + obj_flowDefinitionDeveloperName_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
639
|
-
message += '\n' + obj_flowDefinitionDeveloperName_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
640
|
-
return new TypeError(message);
|
|
641
|
-
}
|
|
642
|
-
var obj_flowDefinitionId = obj.flowDefinitionId;
|
|
643
|
-
var path_flowDefinitionId = path + '.flowDefinitionId';
|
|
644
|
-
var obj_flowDefinitionId_union0 = null;
|
|
645
|
-
var obj_flowDefinitionId_union0_error = (function () {
|
|
646
|
-
if (typeof obj_flowDefinitionId !== 'string') {
|
|
647
|
-
return new TypeError('Expected "string" but received "' + typeof obj_flowDefinitionId + '" (at "' + path_flowDefinitionId + '")');
|
|
648
|
-
}
|
|
649
|
-
})();
|
|
650
|
-
if (obj_flowDefinitionId_union0_error != null) {
|
|
651
|
-
obj_flowDefinitionId_union0 = obj_flowDefinitionId_union0_error.message;
|
|
652
|
-
}
|
|
653
|
-
var obj_flowDefinitionId_union1 = null;
|
|
654
|
-
var obj_flowDefinitionId_union1_error = (function () {
|
|
655
|
-
if (obj_flowDefinitionId !== null) {
|
|
656
|
-
return new TypeError('Expected "null" but received "' + typeof obj_flowDefinitionId + '" (at "' + path_flowDefinitionId + '")');
|
|
657
|
-
}
|
|
658
|
-
})();
|
|
659
|
-
if (obj_flowDefinitionId_union1_error != null) {
|
|
660
|
-
obj_flowDefinitionId_union1 = obj_flowDefinitionId_union1_error.message;
|
|
661
|
-
}
|
|
662
|
-
if (obj_flowDefinitionId_union0 && obj_flowDefinitionId_union1) {
|
|
663
|
-
var message = 'Object doesn\'t match union (at "' + path_flowDefinitionId + '")';
|
|
664
|
-
message += '\n' + obj_flowDefinitionId_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
665
|
-
message += '\n' + obj_flowDefinitionId_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
666
|
-
return new TypeError(message);
|
|
667
|
-
}
|
|
668
|
-
var obj_flowDefinitionName = obj.flowDefinitionName;
|
|
669
|
-
var path_flowDefinitionName = path + '.flowDefinitionName';
|
|
670
|
-
var obj_flowDefinitionName_union0 = null;
|
|
671
|
-
var obj_flowDefinitionName_union0_error = (function () {
|
|
672
|
-
if (typeof obj_flowDefinitionName !== 'string') {
|
|
673
|
-
return new TypeError('Expected "string" but received "' + typeof obj_flowDefinitionName + '" (at "' + path_flowDefinitionName + '")');
|
|
674
|
-
}
|
|
675
|
-
})();
|
|
676
|
-
if (obj_flowDefinitionName_union0_error != null) {
|
|
677
|
-
obj_flowDefinitionName_union0 = obj_flowDefinitionName_union0_error.message;
|
|
678
|
-
}
|
|
679
|
-
var obj_flowDefinitionName_union1 = null;
|
|
680
|
-
var obj_flowDefinitionName_union1_error = (function () {
|
|
681
|
-
if (obj_flowDefinitionName !== null) {
|
|
682
|
-
return new TypeError('Expected "null" but received "' + typeof obj_flowDefinitionName + '" (at "' + path_flowDefinitionName + '")');
|
|
683
|
-
}
|
|
684
|
-
})();
|
|
685
|
-
if (obj_flowDefinitionName_union1_error != null) {
|
|
686
|
-
obj_flowDefinitionName_union1 = obj_flowDefinitionName_union1_error.message;
|
|
687
|
-
}
|
|
688
|
-
if (obj_flowDefinitionName_union0 && obj_flowDefinitionName_union1) {
|
|
689
|
-
var message = 'Object doesn\'t match union (at "' + path_flowDefinitionName + '")';
|
|
690
|
-
message += '\n' + obj_flowDefinitionName_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
691
|
-
message += '\n' + obj_flowDefinitionName_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
692
|
-
return new TypeError(message);
|
|
693
|
-
}
|
|
694
|
-
var obj_id = obj.id;
|
|
695
|
-
var path_id = path + '.id';
|
|
696
|
-
if (typeof obj_id !== 'string') {
|
|
697
|
-
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
698
|
-
}
|
|
699
|
-
var obj_interviewId = obj.interviewId;
|
|
700
|
-
var path_interviewId = path + '.interviewId';
|
|
701
|
-
var obj_interviewId_union0 = null;
|
|
702
|
-
var obj_interviewId_union0_error = (function () {
|
|
703
|
-
if (typeof obj_interviewId !== 'string') {
|
|
704
|
-
return new TypeError('Expected "string" but received "' + typeof obj_interviewId + '" (at "' + path_interviewId + '")');
|
|
705
|
-
}
|
|
706
|
-
})();
|
|
707
|
-
if (obj_interviewId_union0_error != null) {
|
|
708
|
-
obj_interviewId_union0 = obj_interviewId_union0_error.message;
|
|
709
|
-
}
|
|
710
|
-
var obj_interviewId_union1 = null;
|
|
711
|
-
var obj_interviewId_union1_error = (function () {
|
|
712
|
-
if (obj_interviewId !== null) {
|
|
713
|
-
return new TypeError('Expected "null" but received "' + typeof obj_interviewId + '" (at "' + path_interviewId + '")');
|
|
714
|
-
}
|
|
715
|
-
})();
|
|
716
|
-
if (obj_interviewId_union1_error != null) {
|
|
717
|
-
obj_interviewId_union1 = obj_interviewId_union1_error.message;
|
|
718
|
-
}
|
|
719
|
-
if (obj_interviewId_union0 && obj_interviewId_union1) {
|
|
720
|
-
var message = 'Object doesn\'t match union (at "' + path_interviewId + '")';
|
|
721
|
-
message += '\n' + obj_interviewId_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
722
|
-
message += '\n' + obj_interviewId_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
723
|
-
return new TypeError(message);
|
|
724
|
-
}
|
|
725
|
-
var obj_stageInstances = obj.stageInstances;
|
|
726
|
-
var path_stageInstances = path + '.stageInstances';
|
|
727
|
-
if (!ArrayIsArray(obj_stageInstances)) {
|
|
728
|
-
return new TypeError('Expected "array" but received "' + typeof obj_stageInstances + '" (at "' + path_stageInstances + '")');
|
|
729
|
-
}
|
|
730
|
-
for (var i = 0; i < obj_stageInstances.length; i++) {
|
|
731
|
-
var obj_stageInstances_item = obj_stageInstances[i];
|
|
732
|
-
var path_stageInstances_item = path_stageInstances + '[' + i + ']';
|
|
733
|
-
var referencepath_stageInstances_itemValidationError = validate$2(obj_stageInstances_item, path_stageInstances_item);
|
|
734
|
-
if (referencepath_stageInstances_itemValidationError !== null) {
|
|
735
|
-
var message = 'Object doesn\'t match FlowOrchestrationStageInstanceRepresentation (at "' + path_stageInstances_item + '")\n';
|
|
736
|
-
message += referencepath_stageInstances_itemValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
737
|
-
return new TypeError(message);
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
|
-
var obj_status = obj.status;
|
|
741
|
-
var path_status = path + '.status';
|
|
742
|
-
if (typeof obj_status !== 'string') {
|
|
743
|
-
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
744
|
-
}
|
|
745
|
-
})();
|
|
746
|
-
return v_error === undefined ? null : v_error;
|
|
747
|
-
}
|
|
748
|
-
var select$2 = function FlowOrchestrationInstanceRepresentationSelect() {
|
|
749
|
-
var _a = select$3(), FlowOrchestrationStageInstanceRepresentation__selections = _a.selections;
|
|
750
|
-
return {
|
|
751
|
-
kind: 'Fragment',
|
|
752
|
-
version: VERSION$1,
|
|
753
|
-
private: [],
|
|
754
|
-
selections: [
|
|
755
|
-
{
|
|
756
|
-
name: 'flowDefinitionDeveloperName',
|
|
757
|
-
kind: 'Scalar'
|
|
758
|
-
},
|
|
759
|
-
{
|
|
760
|
-
name: 'flowDefinitionId',
|
|
761
|
-
kind: 'Scalar'
|
|
762
|
-
},
|
|
763
|
-
{
|
|
764
|
-
name: 'flowDefinitionName',
|
|
765
|
-
kind: 'Scalar'
|
|
766
|
-
},
|
|
767
|
-
{
|
|
768
|
-
name: 'id',
|
|
769
|
-
kind: 'Scalar'
|
|
770
|
-
},
|
|
771
|
-
{
|
|
772
|
-
name: 'interviewId',
|
|
773
|
-
kind: 'Scalar'
|
|
774
|
-
},
|
|
775
|
-
{
|
|
776
|
-
name: 'stageInstances',
|
|
777
|
-
kind: 'Object',
|
|
778
|
-
plural: true,
|
|
779
|
-
selections: FlowOrchestrationStageInstanceRepresentation__selections
|
|
780
|
-
},
|
|
781
|
-
{
|
|
782
|
-
name: 'status',
|
|
783
|
-
kind: 'Scalar'
|
|
784
|
-
}
|
|
785
|
-
]
|
|
786
|
-
};
|
|
787
|
-
};
|
|
788
|
-
function equals$1(existing, incoming) {
|
|
789
|
-
var existing_id = existing.id;
|
|
790
|
-
var incoming_id = incoming.id;
|
|
791
|
-
if (!(existing_id === incoming_id)) {
|
|
792
|
-
return false;
|
|
793
|
-
}
|
|
794
|
-
var existing_status = existing.status;
|
|
795
|
-
var incoming_status = incoming.status;
|
|
796
|
-
if (!(existing_status === incoming_status)) {
|
|
797
|
-
return false;
|
|
798
|
-
}
|
|
799
|
-
var existing_flowDefinitionDeveloperName = existing.flowDefinitionDeveloperName;
|
|
800
|
-
var incoming_flowDefinitionDeveloperName = incoming.flowDefinitionDeveloperName;
|
|
801
|
-
if (!(existing_flowDefinitionDeveloperName === incoming_flowDefinitionDeveloperName)) {
|
|
802
|
-
return false;
|
|
803
|
-
}
|
|
804
|
-
var existing_flowDefinitionId = existing.flowDefinitionId;
|
|
805
|
-
var incoming_flowDefinitionId = incoming.flowDefinitionId;
|
|
806
|
-
if (!(existing_flowDefinitionId === incoming_flowDefinitionId)) {
|
|
807
|
-
return false;
|
|
808
|
-
}
|
|
809
|
-
var existing_flowDefinitionName = existing.flowDefinitionName;
|
|
810
|
-
var incoming_flowDefinitionName = incoming.flowDefinitionName;
|
|
811
|
-
if (!(existing_flowDefinitionName === incoming_flowDefinitionName)) {
|
|
812
|
-
return false;
|
|
813
|
-
}
|
|
814
|
-
var existing_interviewId = existing.interviewId;
|
|
815
|
-
var incoming_interviewId = incoming.interviewId;
|
|
816
|
-
if (!(existing_interviewId === incoming_interviewId)) {
|
|
817
|
-
return false;
|
|
818
|
-
}
|
|
819
|
-
var existing_stageInstances = existing.stageInstances;
|
|
820
|
-
var incoming_stageInstances = incoming.stageInstances;
|
|
821
|
-
var equals_stageInstances_items = equalsArray(existing_stageInstances, incoming_stageInstances, function (existing_stageInstances_item, incoming_stageInstances_item) {
|
|
822
|
-
if (!(equals$2(existing_stageInstances_item, incoming_stageInstances_item))) {
|
|
823
|
-
return false;
|
|
824
|
-
}
|
|
825
|
-
});
|
|
826
|
-
if (equals_stageInstances_items === false) {
|
|
827
|
-
return false;
|
|
828
|
-
}
|
|
829
|
-
return true;
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
var TTL = 100;
|
|
833
|
-
var VERSION = "ff1028f6e4a6a9aeed322135fdf518b5";
|
|
834
|
-
function validate(obj, path) {
|
|
835
|
-
if (path === void 0) { path = 'FlowOrchestrationInstanceCollectionRepresentation'; }
|
|
836
|
-
var v_error = (function () {
|
|
837
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
838
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
839
|
-
}
|
|
840
|
-
var obj_instances = obj.instances;
|
|
841
|
-
var path_instances = path + '.instances';
|
|
842
|
-
if (!ArrayIsArray(obj_instances)) {
|
|
843
|
-
return new TypeError('Expected "array" but received "' + typeof obj_instances + '" (at "' + path_instances + '")');
|
|
844
|
-
}
|
|
845
|
-
for (var i = 0; i < obj_instances.length; i++) {
|
|
846
|
-
var obj_instances_item = obj_instances[i];
|
|
847
|
-
var path_instances_item = path_instances + '[' + i + ']';
|
|
848
|
-
var referencepath_instances_itemValidationError = validate$1(obj_instances_item, path_instances_item);
|
|
849
|
-
if (referencepath_instances_itemValidationError !== null) {
|
|
850
|
-
var message = 'Object doesn\'t match FlowOrchestrationInstanceRepresentation (at "' + path_instances_item + '")\n';
|
|
851
|
-
message += referencepath_instances_itemValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
852
|
-
return new TypeError(message);
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
})();
|
|
856
|
-
return v_error === undefined ? null : v_error;
|
|
857
|
-
}
|
|
858
|
-
var RepresentationType = 'FlowOrchestrationInstanceCollectionRepresentation';
|
|
859
|
-
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
860
|
-
return input;
|
|
861
|
-
}
|
|
862
|
-
var select$1 = function FlowOrchestrationInstanceCollectionRepresentationSelect() {
|
|
863
|
-
var _a = select$2(), FlowOrchestrationInstanceRepresentation__selections = _a.selections;
|
|
864
|
-
return {
|
|
865
|
-
kind: 'Fragment',
|
|
866
|
-
version: VERSION,
|
|
867
|
-
private: [],
|
|
868
|
-
selections: [
|
|
869
|
-
{
|
|
870
|
-
name: 'instances',
|
|
871
|
-
kind: 'Object',
|
|
872
|
-
plural: true,
|
|
873
|
-
selections: FlowOrchestrationInstanceRepresentation__selections
|
|
874
|
-
}
|
|
875
|
-
]
|
|
876
|
-
};
|
|
877
|
-
};
|
|
878
|
-
function equals(existing, incoming) {
|
|
879
|
-
var existing_instances = existing.instances;
|
|
880
|
-
var incoming_instances = incoming.instances;
|
|
881
|
-
var equals_instances_items = equalsArray(existing_instances, incoming_instances, function (existing_instances_item, incoming_instances_item) {
|
|
882
|
-
if (!(equals$1(existing_instances_item, incoming_instances_item))) {
|
|
883
|
-
return false;
|
|
884
|
-
}
|
|
885
|
-
});
|
|
886
|
-
if (equals_instances_items === false) {
|
|
887
|
-
return false;
|
|
888
|
-
}
|
|
889
|
-
return true;
|
|
890
|
-
}
|
|
891
|
-
var ingest = function FlowOrchestrationInstanceCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
892
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
893
|
-
var validateError = validate(input);
|
|
894
|
-
if (validateError !== null) {
|
|
895
|
-
throw validateError;
|
|
896
|
-
}
|
|
897
|
-
}
|
|
898
|
-
var key = path.fullPath;
|
|
899
|
-
var existingRecord = store.readEntry(key);
|
|
900
|
-
var ttlToUse = TTL;
|
|
901
|
-
var incomingRecord = normalize(input, store.readEntry(key), {
|
|
902
|
-
fullPath: key,
|
|
903
|
-
parent: path.parent,
|
|
904
|
-
propertyName: path.propertyName,
|
|
905
|
-
ttl: ttlToUse
|
|
906
|
-
});
|
|
907
|
-
if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
|
|
908
|
-
luvio.storePublish(key, incomingRecord);
|
|
909
|
-
}
|
|
910
|
-
{
|
|
911
|
-
var storeMetadataParams = {
|
|
912
|
-
ttl: ttlToUse,
|
|
913
|
-
namespace: "InteractionOrchestrator",
|
|
914
|
-
version: VERSION,
|
|
915
|
-
representationName: RepresentationType,
|
|
916
|
-
};
|
|
917
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
918
|
-
}
|
|
919
|
-
return createLink(key);
|
|
920
|
-
};
|
|
921
|
-
function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
922
|
-
var rootKeySet = new engine.StoreKeyMap();
|
|
923
|
-
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
924
|
-
var rootKey = fullPathFactory();
|
|
925
|
-
rootKeySet.set(rootKey, {
|
|
926
|
-
namespace: keyPrefix,
|
|
927
|
-
representationName: RepresentationType,
|
|
928
|
-
mergeable: false
|
|
929
|
-
});
|
|
930
|
-
return rootKeySet;
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
function select(luvio, params) {
|
|
934
|
-
return select$1();
|
|
935
|
-
}
|
|
936
|
-
function keyBuilder$1(luvio, params) {
|
|
937
|
-
return keyPrefix + '::FlowOrchestrationInstanceCollectionRepresentation:(' + 'contextRecordId:' + params.queryParams.contextRecordId + ',' + 'relatedRecordId:' + params.queryParams.relatedRecordId + ')';
|
|
938
|
-
}
|
|
939
|
-
function getResponseCacheKeys(luvio, resourceParams, response) {
|
|
940
|
-
return getTypeCacheKeys(luvio, response, function () { return keyBuilder$1(luvio, resourceParams); });
|
|
941
|
-
}
|
|
942
|
-
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
943
|
-
var body = response.body;
|
|
944
|
-
var key = keyBuilder$1(luvio, resourceParams);
|
|
945
|
-
luvio.storeIngest(key, ingest, body);
|
|
946
|
-
var snapshot = luvio.storeLookup({
|
|
947
|
-
recordId: key,
|
|
948
|
-
node: select(),
|
|
949
|
-
variables: {},
|
|
950
|
-
}, snapshotRefresh);
|
|
951
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
952
|
-
if (snapshot.state !== 'Fulfilled') {
|
|
953
|
-
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
954
|
-
}
|
|
955
|
-
}
|
|
956
|
-
return snapshot;
|
|
957
|
-
}
|
|
958
|
-
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
959
|
-
var key = keyBuilder$1(luvio, params);
|
|
960
|
-
var errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
961
|
-
var storeMetadataParams = {
|
|
962
|
-
ttl: TTL,
|
|
963
|
-
namespace: keyPrefix,
|
|
964
|
-
version: VERSION,
|
|
965
|
-
representationName: RepresentationType
|
|
966
|
-
};
|
|
967
|
-
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
968
|
-
return errorSnapshot;
|
|
969
|
-
}
|
|
970
|
-
function createResourceRequest(config) {
|
|
971
|
-
var headers = {};
|
|
972
|
-
return {
|
|
973
|
-
baseUri: '/services/data/v58.0',
|
|
974
|
-
basePath: '/connect/interaction/orchestration/instances',
|
|
975
|
-
method: 'get',
|
|
976
|
-
body: null,
|
|
977
|
-
urlParams: {},
|
|
978
|
-
queryParams: config.queryParams,
|
|
979
|
-
headers: headers,
|
|
980
|
-
priority: 'normal',
|
|
981
|
-
};
|
|
982
|
-
}
|
|
983
|
-
|
|
984
|
-
var oneOfConfigPropertiesIdentifier = [
|
|
985
|
-
'relatedRecordId'
|
|
986
|
-
];
|
|
987
|
-
var getOrchestrationInstanceCollection_ConfigPropertyNames = {
|
|
988
|
-
displayName: 'getOrchestrationInstanceCollection',
|
|
989
|
-
parameters: {
|
|
990
|
-
required: [],
|
|
991
|
-
optional: ['contextRecordId', 'relatedRecordId']
|
|
992
|
-
}
|
|
993
|
-
};
|
|
994
|
-
function createResourceParams(config) {
|
|
995
|
-
var resourceParams = {
|
|
996
|
-
queryParams: {
|
|
997
|
-
contextRecordId: config.contextRecordId, relatedRecordId: config.relatedRecordId
|
|
998
|
-
}
|
|
999
|
-
};
|
|
1000
|
-
return resourceParams;
|
|
1001
|
-
}
|
|
1002
|
-
function keyBuilder(luvio, config) {
|
|
1003
|
-
var resourceParams = createResourceParams(config);
|
|
1004
|
-
return keyBuilder$1(luvio, resourceParams);
|
|
1005
|
-
}
|
|
1006
|
-
function typeCheckConfig(untrustedConfig) {
|
|
1007
|
-
var config = {};
|
|
1008
|
-
var untrustedConfig_contextRecordId = untrustedConfig.contextRecordId;
|
|
1009
|
-
if (typeof untrustedConfig_contextRecordId === 'string') {
|
|
1010
|
-
config.contextRecordId = untrustedConfig_contextRecordId;
|
|
1011
|
-
}
|
|
1012
|
-
var untrustedConfig_relatedRecordId = untrustedConfig.relatedRecordId;
|
|
1013
|
-
if (typeof untrustedConfig_relatedRecordId === 'string') {
|
|
1014
|
-
config.relatedRecordId = untrustedConfig_relatedRecordId;
|
|
1015
|
-
}
|
|
1016
|
-
return config;
|
|
1017
|
-
}
|
|
1018
|
-
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
1019
|
-
if (!untrustedIsObject(untrustedConfig)) {
|
|
1020
|
-
return null;
|
|
1021
|
-
}
|
|
1022
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1023
|
-
validateConfig(untrustedConfig, configPropertyNames, oneOfConfigPropertiesIdentifier);
|
|
1024
|
-
}
|
|
1025
|
-
var config = typeCheckConfig(untrustedConfig);
|
|
1026
|
-
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1027
|
-
return null;
|
|
1028
|
-
}
|
|
1029
|
-
if (config.relatedRecordId === undefined) {
|
|
1030
|
-
return null;
|
|
1031
|
-
}
|
|
1032
|
-
return config;
|
|
1033
|
-
}
|
|
1034
|
-
function adapterFragment(luvio, config) {
|
|
1035
|
-
createResourceParams(config);
|
|
1036
|
-
return select();
|
|
1037
|
-
}
|
|
1038
|
-
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
1039
|
-
var snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
1040
|
-
config: config,
|
|
1041
|
-
resolve: function () { return buildNetworkSnapshot(luvio, config, snapshotRefreshOptions); }
|
|
1042
|
-
});
|
|
1043
|
-
return luvio.storeBroadcast().then(function () { return snapshot; });
|
|
1044
|
-
}
|
|
1045
|
-
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
1046
|
-
var snapshot = ingestError(luvio, resourceParams, response, {
|
|
1047
|
-
config: config,
|
|
1048
|
-
resolve: function () { return buildNetworkSnapshot(luvio, config, snapshotRefreshOptions); }
|
|
1049
|
-
});
|
|
1050
|
-
return luvio.storeBroadcast().then(function () { return snapshot; });
|
|
1051
|
-
}
|
|
1052
|
-
function buildNetworkSnapshot(luvio, config, options) {
|
|
1053
|
-
var resourceParams = createResourceParams(config);
|
|
1054
|
-
var request = createResourceRequest(resourceParams);
|
|
1055
|
-
return luvio.dispatchResourceRequest(request, options)
|
|
1056
|
-
.then(function (response) {
|
|
1057
|
-
return luvio.handleSuccessResponse(function () { return onFetchResponseSuccess(luvio, config, resourceParams, response); }, function () { return getResponseCacheKeys(luvio, resourceParams, response.body); });
|
|
1058
|
-
}, function (response) {
|
|
1059
|
-
return luvio.handleErrorResponse(function () { return onFetchResponseError(luvio, config, resourceParams, response); });
|
|
1060
|
-
});
|
|
1061
|
-
}
|
|
1062
|
-
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
1063
|
-
var luvio = context.luvio, config = context.config;
|
|
1064
|
-
var networkPriority = coercedAdapterRequestContext.networkPriority, requestCorrelator = coercedAdapterRequestContext.requestCorrelator, eventObservers = coercedAdapterRequestContext.eventObservers;
|
|
1065
|
-
var dispatchOptions = {
|
|
1066
|
-
resourceRequestContext: {
|
|
1067
|
-
requestCorrelator: requestCorrelator,
|
|
1068
|
-
luvioRequestMethod: undefined,
|
|
1069
|
-
},
|
|
1070
|
-
eventObservers: eventObservers
|
|
1071
|
-
};
|
|
1072
|
-
if (networkPriority !== 'normal') {
|
|
1073
|
-
dispatchOptions.overrides = {
|
|
1074
|
-
priority: networkPriority
|
|
1075
|
-
};
|
|
1076
|
-
}
|
|
1077
|
-
return buildNetworkSnapshot(luvio, config, dispatchOptions);
|
|
1078
|
-
}
|
|
1079
|
-
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
1080
|
-
var luvio = context.luvio, config = context.config;
|
|
1081
|
-
var selector = {
|
|
1082
|
-
recordId: keyBuilder(luvio, config),
|
|
1083
|
-
node: adapterFragment(luvio, config),
|
|
1084
|
-
variables: {},
|
|
1085
|
-
};
|
|
1086
|
-
var cacheSnapshot = storeLookup(selector, {
|
|
1087
|
-
config: config,
|
|
1088
|
-
resolve: function () { return buildNetworkSnapshot(luvio, config, snapshotRefreshOptions); }
|
|
1089
|
-
});
|
|
1090
|
-
return cacheSnapshot;
|
|
1091
|
-
}
|
|
1092
|
-
var getOrchestrationInstanceCollectionAdapterFactory = function (luvio) { return function InteractionOrchestrator__getOrchestrationInstanceCollection(untrustedConfig, requestContext) {
|
|
1093
|
-
var config = validateAdapterConfig(untrustedConfig, getOrchestrationInstanceCollection_ConfigPropertyNames);
|
|
1094
|
-
// Invalid or incomplete config
|
|
1095
|
-
if (config === null) {
|
|
1096
|
-
return null;
|
|
1097
|
-
}
|
|
1098
|
-
return luvio.applyCachePolicy((requestContext || {}), { config: config, luvio: luvio }, // BuildSnapshotContext
|
|
1099
|
-
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
1100
|
-
}; };
|
|
1101
|
-
|
|
1102
|
-
exports.getOrchestrationInstanceCollectionAdapterFactory = getOrchestrationInstanceCollectionAdapterFactory;
|
|
1103
|
-
|
|
1104
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1105
|
-
|
|
1106
|
-
}));
|