@salesforce/lds-adapters-sales-pathassistant 1.245.0
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/LICENSE.txt +82 -0
- package/dist/es/es2018/sales-pathassistant.js +1311 -0
- package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +62 -0
- package/dist/es/es2018/types/src/generated/adapters/getPathAssistant.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/adapters/getPathAssistantDaysInStage.d.ts +27 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +5 -0
- package/dist/es/es2018/types/src/generated/resources/getConnectPathassistantByRecordId.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/resources/getConnectPathassistantDaysInStageByRecordId.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/types/AnimationRuleRepresentation.d.ts +43 -0
- package/dist/es/es2018/types/src/generated/types/PathAssistantDaysInStageRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/PathAssistantFieldRepresentation.d.ts +37 -0
- package/dist/es/es2018/types/src/generated/types/PathAssistantMetadataRepresentation.d.ts +30 -0
- package/dist/es/es2018/types/src/generated/types/PathAssistantRepresentation.d.ts +52 -0
- package/dist/es/es2018/types/src/generated/types/PathAssistantStepRepresentation.d.ts +47 -0
- package/dist/es/es2018/types/src/generated/types/PicklistEntryRepresentation.d.ts +40 -0
- package/dist/es/es2018/types/src/generated/types/PicklistForRecordTypeRepresentation.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
- package/package.json +64 -0
- package/sfdc/index.d.ts +1 -0
- package/sfdc/index.js +1351 -0
- package/src/raml/api.raml +210 -0
- package/src/raml/luvio.raml +23 -0
package/sfdc/index.js
ADDED
|
@@ -0,0 +1,1351 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2022, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/* *******************************************************************************************
|
|
8
|
+
* ATTENTION!
|
|
9
|
+
* THIS IS A GENERATED FILE FROM https://github.com/salesforce-experience-platform-emu/lds-lightning-platform
|
|
10
|
+
* If you would like to contribute to LDS, please follow the steps outlined in the git repo.
|
|
11
|
+
* Any changes made to this file in p4 will be automatically overwritten.
|
|
12
|
+
* *******************************************************************************************
|
|
13
|
+
*/
|
|
14
|
+
/* proxy-compat-disable */
|
|
15
|
+
import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
|
|
16
|
+
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
17
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2, typeCheckConfig as typeCheckConfig$2, StoreKeyMap, createResourceParams as createResourceParams$2 } from 'force/luvioEngine';
|
|
18
|
+
|
|
19
|
+
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
|
+
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
21
|
+
const { isArray: ArrayIsArray$1 } = Array;
|
|
22
|
+
/**
|
|
23
|
+
* Validates an adapter config is well-formed.
|
|
24
|
+
* @param config The config to validate.
|
|
25
|
+
* @param adapter The adapter validation configuration.
|
|
26
|
+
* @param oneOf The keys the config must contain at least one of.
|
|
27
|
+
* @throws A TypeError if config doesn't satisfy the adapter's config validation.
|
|
28
|
+
*/
|
|
29
|
+
function validateConfig(config, adapter, oneOf) {
|
|
30
|
+
const { displayName } = adapter;
|
|
31
|
+
const { required, optional, unsupported } = adapter.parameters;
|
|
32
|
+
if (config === undefined ||
|
|
33
|
+
required.every(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
|
|
34
|
+
throw new TypeError(`adapter ${displayName} configuration must specify ${required.sort().join(', ')}`);
|
|
35
|
+
}
|
|
36
|
+
if (oneOf && oneOf.some(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
|
|
37
|
+
throw new TypeError(`adapter ${displayName} configuration must specify one of ${oneOf.sort().join(', ')}`);
|
|
38
|
+
}
|
|
39
|
+
if (unsupported !== undefined &&
|
|
40
|
+
unsupported.some(req => ObjectPrototypeHasOwnProperty.call(config, req))) {
|
|
41
|
+
throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
|
|
42
|
+
}
|
|
43
|
+
const supported = required.concat(optional);
|
|
44
|
+
if (ObjectKeys(config).some(key => !supported.includes(key))) {
|
|
45
|
+
throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function untrustedIsObject(untrusted) {
|
|
49
|
+
return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
|
|
50
|
+
}
|
|
51
|
+
function areRequiredParametersPresent(config, configPropertyNames) {
|
|
52
|
+
return configPropertyNames.parameters.required.every(req => req in config);
|
|
53
|
+
}
|
|
54
|
+
const snapshotRefreshOptions = {
|
|
55
|
+
overrides: {
|
|
56
|
+
headers: {
|
|
57
|
+
'Cache-Control': 'no-cache',
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
function generateParamConfigMetadata(name, required, resourceType, typeCheckShape, isArrayShape = false, coerceFn) {
|
|
62
|
+
return {
|
|
63
|
+
name,
|
|
64
|
+
required,
|
|
65
|
+
resourceType,
|
|
66
|
+
typeCheckShape,
|
|
67
|
+
isArrayShape,
|
|
68
|
+
coerceFn,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function buildAdapterValidationConfig(displayName, paramsMeta) {
|
|
72
|
+
const required = paramsMeta.filter(p => p.required).map(p => p.name);
|
|
73
|
+
const optional = paramsMeta.filter(p => !p.required).map(p => p.name);
|
|
74
|
+
return {
|
|
75
|
+
displayName,
|
|
76
|
+
parameters: {
|
|
77
|
+
required,
|
|
78
|
+
optional,
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
const keyPrefix = 'pathassistant';
|
|
83
|
+
|
|
84
|
+
const { isArray: ArrayIsArray } = Array;
|
|
85
|
+
const { stringify: JSONStringify } = JSON;
|
|
86
|
+
function equalsArray(a, b, equalsItem) {
|
|
87
|
+
const aLength = a.length;
|
|
88
|
+
const bLength = b.length;
|
|
89
|
+
if (aLength !== bLength) {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
for (let i = 0; i < aLength; i++) {
|
|
93
|
+
if (equalsItem(a[i], b[i]) === false) {
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
function createLink(ref) {
|
|
100
|
+
return {
|
|
101
|
+
__ref: serializeStructuredKey(ref),
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const VERSION$7 = "1963abcfbac7c1bc0ea2e37461cf2333";
|
|
106
|
+
function validate$7(obj, path = 'AnimationRuleRepresentation') {
|
|
107
|
+
const v_error = (() => {
|
|
108
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
109
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
110
|
+
}
|
|
111
|
+
const obj_animationFrequency = obj.animationFrequency;
|
|
112
|
+
const path_animationFrequency = path + '.animationFrequency';
|
|
113
|
+
let obj_animationFrequency_union0 = null;
|
|
114
|
+
const obj_animationFrequency_union0_error = (() => {
|
|
115
|
+
if (typeof obj_animationFrequency !== 'string') {
|
|
116
|
+
return new TypeError('Expected "string" but received "' + typeof obj_animationFrequency + '" (at "' + path_animationFrequency + '")');
|
|
117
|
+
}
|
|
118
|
+
})();
|
|
119
|
+
if (obj_animationFrequency_union0_error != null) {
|
|
120
|
+
obj_animationFrequency_union0 = obj_animationFrequency_union0_error.message;
|
|
121
|
+
}
|
|
122
|
+
let obj_animationFrequency_union1 = null;
|
|
123
|
+
const obj_animationFrequency_union1_error = (() => {
|
|
124
|
+
if (obj_animationFrequency !== null) {
|
|
125
|
+
return new TypeError('Expected "null" but received "' + typeof obj_animationFrequency + '" (at "' + path_animationFrequency + '")');
|
|
126
|
+
}
|
|
127
|
+
})();
|
|
128
|
+
if (obj_animationFrequency_union1_error != null) {
|
|
129
|
+
obj_animationFrequency_union1 = obj_animationFrequency_union1_error.message;
|
|
130
|
+
}
|
|
131
|
+
if (obj_animationFrequency_union0 && obj_animationFrequency_union1) {
|
|
132
|
+
let message = 'Object doesn\'t match union (at "' + path_animationFrequency + '")';
|
|
133
|
+
message += '\n' + obj_animationFrequency_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
134
|
+
message += '\n' + obj_animationFrequency_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
135
|
+
return new TypeError(message);
|
|
136
|
+
}
|
|
137
|
+
const obj_isActive = obj.isActive;
|
|
138
|
+
const path_isActive = path + '.isActive';
|
|
139
|
+
if (typeof obj_isActive !== 'boolean') {
|
|
140
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isActive + '" (at "' + path_isActive + '")');
|
|
141
|
+
}
|
|
142
|
+
const obj_recordTypeContext = obj.recordTypeContext;
|
|
143
|
+
const path_recordTypeContext = path + '.recordTypeContext';
|
|
144
|
+
let obj_recordTypeContext_union0 = null;
|
|
145
|
+
const obj_recordTypeContext_union0_error = (() => {
|
|
146
|
+
if (typeof obj_recordTypeContext !== 'string') {
|
|
147
|
+
return new TypeError('Expected "string" but received "' + typeof obj_recordTypeContext + '" (at "' + path_recordTypeContext + '")');
|
|
148
|
+
}
|
|
149
|
+
})();
|
|
150
|
+
if (obj_recordTypeContext_union0_error != null) {
|
|
151
|
+
obj_recordTypeContext_union0 = obj_recordTypeContext_union0_error.message;
|
|
152
|
+
}
|
|
153
|
+
let obj_recordTypeContext_union1 = null;
|
|
154
|
+
const obj_recordTypeContext_union1_error = (() => {
|
|
155
|
+
if (obj_recordTypeContext !== null) {
|
|
156
|
+
return new TypeError('Expected "null" but received "' + typeof obj_recordTypeContext + '" (at "' + path_recordTypeContext + '")');
|
|
157
|
+
}
|
|
158
|
+
})();
|
|
159
|
+
if (obj_recordTypeContext_union1_error != null) {
|
|
160
|
+
obj_recordTypeContext_union1 = obj_recordTypeContext_union1_error.message;
|
|
161
|
+
}
|
|
162
|
+
if (obj_recordTypeContext_union0 && obj_recordTypeContext_union1) {
|
|
163
|
+
let message = 'Object doesn\'t match union (at "' + path_recordTypeContext + '")';
|
|
164
|
+
message += '\n' + obj_recordTypeContext_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
165
|
+
message += '\n' + obj_recordTypeContext_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
166
|
+
return new TypeError(message);
|
|
167
|
+
}
|
|
168
|
+
const obj_recordTypeId = obj.recordTypeId;
|
|
169
|
+
const path_recordTypeId = path + '.recordTypeId';
|
|
170
|
+
let obj_recordTypeId_union0 = null;
|
|
171
|
+
const obj_recordTypeId_union0_error = (() => {
|
|
172
|
+
if (typeof obj_recordTypeId !== 'string') {
|
|
173
|
+
return new TypeError('Expected "string" but received "' + typeof obj_recordTypeId + '" (at "' + path_recordTypeId + '")');
|
|
174
|
+
}
|
|
175
|
+
})();
|
|
176
|
+
if (obj_recordTypeId_union0_error != null) {
|
|
177
|
+
obj_recordTypeId_union0 = obj_recordTypeId_union0_error.message;
|
|
178
|
+
}
|
|
179
|
+
let obj_recordTypeId_union1 = null;
|
|
180
|
+
const obj_recordTypeId_union1_error = (() => {
|
|
181
|
+
if (obj_recordTypeId !== null) {
|
|
182
|
+
return new TypeError('Expected "null" but received "' + typeof obj_recordTypeId + '" (at "' + path_recordTypeId + '")');
|
|
183
|
+
}
|
|
184
|
+
})();
|
|
185
|
+
if (obj_recordTypeId_union1_error != null) {
|
|
186
|
+
obj_recordTypeId_union1 = obj_recordTypeId_union1_error.message;
|
|
187
|
+
}
|
|
188
|
+
if (obj_recordTypeId_union0 && obj_recordTypeId_union1) {
|
|
189
|
+
let message = 'Object doesn\'t match union (at "' + path_recordTypeId + '")';
|
|
190
|
+
message += '\n' + obj_recordTypeId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
191
|
+
message += '\n' + obj_recordTypeId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
192
|
+
return new TypeError(message);
|
|
193
|
+
}
|
|
194
|
+
const obj_targetField = obj.targetField;
|
|
195
|
+
const path_targetField = path + '.targetField';
|
|
196
|
+
if (typeof obj_targetField !== 'string') {
|
|
197
|
+
return new TypeError('Expected "string" but received "' + typeof obj_targetField + '" (at "' + path_targetField + '")');
|
|
198
|
+
}
|
|
199
|
+
const obj_targetFieldChangeToValues = obj.targetFieldChangeToValues;
|
|
200
|
+
const path_targetFieldChangeToValues = path + '.targetFieldChangeToValues';
|
|
201
|
+
if (typeof obj_targetFieldChangeToValues !== 'string') {
|
|
202
|
+
return new TypeError('Expected "string" but received "' + typeof obj_targetFieldChangeToValues + '" (at "' + path_targetFieldChangeToValues + '")');
|
|
203
|
+
}
|
|
204
|
+
})();
|
|
205
|
+
return v_error === undefined ? null : v_error;
|
|
206
|
+
}
|
|
207
|
+
const select$9 = function AnimationRuleRepresentationSelect() {
|
|
208
|
+
return {
|
|
209
|
+
kind: 'Fragment',
|
|
210
|
+
version: VERSION$7,
|
|
211
|
+
private: [],
|
|
212
|
+
selections: [
|
|
213
|
+
{
|
|
214
|
+
name: 'animationFrequency',
|
|
215
|
+
kind: 'Scalar'
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
name: 'isActive',
|
|
219
|
+
kind: 'Scalar'
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
name: 'recordTypeContext',
|
|
223
|
+
kind: 'Scalar'
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
name: 'recordTypeId',
|
|
227
|
+
kind: 'Scalar'
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
name: 'targetField',
|
|
231
|
+
kind: 'Scalar'
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
name: 'targetFieldChangeToValues',
|
|
235
|
+
kind: 'Scalar'
|
|
236
|
+
}
|
|
237
|
+
]
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
function equals$7(existing, incoming) {
|
|
241
|
+
const existing_isActive = existing.isActive;
|
|
242
|
+
const incoming_isActive = incoming.isActive;
|
|
243
|
+
if (!(existing_isActive === incoming_isActive)) {
|
|
244
|
+
return false;
|
|
245
|
+
}
|
|
246
|
+
const existing_targetField = existing.targetField;
|
|
247
|
+
const incoming_targetField = incoming.targetField;
|
|
248
|
+
if (!(existing_targetField === incoming_targetField)) {
|
|
249
|
+
return false;
|
|
250
|
+
}
|
|
251
|
+
const existing_targetFieldChangeToValues = existing.targetFieldChangeToValues;
|
|
252
|
+
const incoming_targetFieldChangeToValues = incoming.targetFieldChangeToValues;
|
|
253
|
+
if (!(existing_targetFieldChangeToValues === incoming_targetFieldChangeToValues)) {
|
|
254
|
+
return false;
|
|
255
|
+
}
|
|
256
|
+
const existing_animationFrequency = existing.animationFrequency;
|
|
257
|
+
const incoming_animationFrequency = incoming.animationFrequency;
|
|
258
|
+
if (!(existing_animationFrequency === incoming_animationFrequency)) {
|
|
259
|
+
return false;
|
|
260
|
+
}
|
|
261
|
+
const existing_recordTypeContext = existing.recordTypeContext;
|
|
262
|
+
const incoming_recordTypeContext = incoming.recordTypeContext;
|
|
263
|
+
if (!(existing_recordTypeContext === incoming_recordTypeContext)) {
|
|
264
|
+
return false;
|
|
265
|
+
}
|
|
266
|
+
const existing_recordTypeId = existing.recordTypeId;
|
|
267
|
+
const incoming_recordTypeId = incoming.recordTypeId;
|
|
268
|
+
if (!(existing_recordTypeId === incoming_recordTypeId)) {
|
|
269
|
+
return false;
|
|
270
|
+
}
|
|
271
|
+
return true;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
const VERSION$6 = "5f7a9f3543fe7279bf732a8914e5f50c";
|
|
275
|
+
function validate$6(obj, path = 'PicklistEntryRepresentation') {
|
|
276
|
+
const v_error = (() => {
|
|
277
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
278
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
279
|
+
}
|
|
280
|
+
const obj_isActive = obj.isActive;
|
|
281
|
+
const path_isActive = path + '.isActive';
|
|
282
|
+
if (typeof obj_isActive !== 'boolean') {
|
|
283
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isActive + '" (at "' + path_isActive + '")');
|
|
284
|
+
}
|
|
285
|
+
const obj_isDefault = obj.isDefault;
|
|
286
|
+
const path_isDefault = path + '.isDefault';
|
|
287
|
+
if (typeof obj_isDefault !== 'boolean') {
|
|
288
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isDefault + '" (at "' + path_isDefault + '")');
|
|
289
|
+
}
|
|
290
|
+
const obj_label = obj.label;
|
|
291
|
+
const path_label = path + '.label';
|
|
292
|
+
if (typeof obj_label !== 'string') {
|
|
293
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
294
|
+
}
|
|
295
|
+
const obj_validFor = obj.validFor;
|
|
296
|
+
const path_validFor = path + '.validFor';
|
|
297
|
+
let obj_validFor_union0 = null;
|
|
298
|
+
const obj_validFor_union0_error = (() => {
|
|
299
|
+
if (typeof obj_validFor !== 'string') {
|
|
300
|
+
return new TypeError('Expected "string" but received "' + typeof obj_validFor + '" (at "' + path_validFor + '")');
|
|
301
|
+
}
|
|
302
|
+
})();
|
|
303
|
+
if (obj_validFor_union0_error != null) {
|
|
304
|
+
obj_validFor_union0 = obj_validFor_union0_error.message;
|
|
305
|
+
}
|
|
306
|
+
let obj_validFor_union1 = null;
|
|
307
|
+
const obj_validFor_union1_error = (() => {
|
|
308
|
+
if (obj_validFor !== null) {
|
|
309
|
+
return new TypeError('Expected "null" but received "' + typeof obj_validFor + '" (at "' + path_validFor + '")');
|
|
310
|
+
}
|
|
311
|
+
})();
|
|
312
|
+
if (obj_validFor_union1_error != null) {
|
|
313
|
+
obj_validFor_union1 = obj_validFor_union1_error.message;
|
|
314
|
+
}
|
|
315
|
+
if (obj_validFor_union0 && obj_validFor_union1) {
|
|
316
|
+
let message = 'Object doesn\'t match union (at "' + path_validFor + '")';
|
|
317
|
+
message += '\n' + obj_validFor_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
318
|
+
message += '\n' + obj_validFor_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
319
|
+
return new TypeError(message);
|
|
320
|
+
}
|
|
321
|
+
const obj_value = obj.value;
|
|
322
|
+
const path_value = path + '.value';
|
|
323
|
+
if (typeof obj_value !== 'string') {
|
|
324
|
+
return new TypeError('Expected "string" but received "' + typeof obj_value + '" (at "' + path_value + '")');
|
|
325
|
+
}
|
|
326
|
+
})();
|
|
327
|
+
return v_error === undefined ? null : v_error;
|
|
328
|
+
}
|
|
329
|
+
const select$8 = function PicklistEntryRepresentationSelect() {
|
|
330
|
+
return {
|
|
331
|
+
kind: 'Fragment',
|
|
332
|
+
version: VERSION$6,
|
|
333
|
+
private: [],
|
|
334
|
+
selections: [
|
|
335
|
+
{
|
|
336
|
+
name: 'isActive',
|
|
337
|
+
kind: 'Scalar'
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
name: 'isDefault',
|
|
341
|
+
kind: 'Scalar'
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
name: 'label',
|
|
345
|
+
kind: 'Scalar'
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
name: 'validFor',
|
|
349
|
+
kind: 'Scalar'
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
name: 'value',
|
|
353
|
+
kind: 'Scalar'
|
|
354
|
+
}
|
|
355
|
+
]
|
|
356
|
+
};
|
|
357
|
+
};
|
|
358
|
+
function equals$6(existing, incoming) {
|
|
359
|
+
const existing_isActive = existing.isActive;
|
|
360
|
+
const incoming_isActive = incoming.isActive;
|
|
361
|
+
if (!(existing_isActive === incoming_isActive)) {
|
|
362
|
+
return false;
|
|
363
|
+
}
|
|
364
|
+
const existing_isDefault = existing.isDefault;
|
|
365
|
+
const incoming_isDefault = incoming.isDefault;
|
|
366
|
+
if (!(existing_isDefault === incoming_isDefault)) {
|
|
367
|
+
return false;
|
|
368
|
+
}
|
|
369
|
+
const existing_label = existing.label;
|
|
370
|
+
const incoming_label = incoming.label;
|
|
371
|
+
if (!(existing_label === incoming_label)) {
|
|
372
|
+
return false;
|
|
373
|
+
}
|
|
374
|
+
const existing_value = existing.value;
|
|
375
|
+
const incoming_value = incoming.value;
|
|
376
|
+
if (!(existing_value === incoming_value)) {
|
|
377
|
+
return false;
|
|
378
|
+
}
|
|
379
|
+
const existing_validFor = existing.validFor;
|
|
380
|
+
const incoming_validFor = incoming.validFor;
|
|
381
|
+
if (!(existing_validFor === incoming_validFor)) {
|
|
382
|
+
return false;
|
|
383
|
+
}
|
|
384
|
+
return true;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
const VERSION$5 = "e10ca73b37a9eb96684d1646b4a8f0f8";
|
|
388
|
+
function validate$5(obj, path = 'PicklistForRecordTypeRepresentation') {
|
|
389
|
+
const v_error = (() => {
|
|
390
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
391
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
392
|
+
}
|
|
393
|
+
const obj_picklistName = obj.picklistName;
|
|
394
|
+
const path_picklistName = path + '.picklistName';
|
|
395
|
+
if (typeof obj_picklistName !== 'string') {
|
|
396
|
+
return new TypeError('Expected "string" but received "' + typeof obj_picklistName + '" (at "' + path_picklistName + '")');
|
|
397
|
+
}
|
|
398
|
+
const obj_picklists = obj.picklists;
|
|
399
|
+
const path_picklists = path + '.picklists';
|
|
400
|
+
if (!ArrayIsArray(obj_picklists)) {
|
|
401
|
+
return new TypeError('Expected "array" but received "' + typeof obj_picklists + '" (at "' + path_picklists + '")');
|
|
402
|
+
}
|
|
403
|
+
for (let i = 0; i < obj_picklists.length; i++) {
|
|
404
|
+
const obj_picklists_item = obj_picklists[i];
|
|
405
|
+
const path_picklists_item = path_picklists + '[' + i + ']';
|
|
406
|
+
const referencepath_picklists_itemValidationError = validate$6(obj_picklists_item, path_picklists_item);
|
|
407
|
+
if (referencepath_picklists_itemValidationError !== null) {
|
|
408
|
+
let message = 'Object doesn\'t match PicklistEntryRepresentation (at "' + path_picklists_item + '")\n';
|
|
409
|
+
message += referencepath_picklists_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
410
|
+
return new TypeError(message);
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
})();
|
|
414
|
+
return v_error === undefined ? null : v_error;
|
|
415
|
+
}
|
|
416
|
+
const select$7 = function PicklistForRecordTypeRepresentationSelect() {
|
|
417
|
+
const { selections: PicklistEntryRepresentation__selections, opaque: PicklistEntryRepresentation__opaque, } = select$8();
|
|
418
|
+
return {
|
|
419
|
+
kind: 'Fragment',
|
|
420
|
+
version: VERSION$5,
|
|
421
|
+
private: [],
|
|
422
|
+
selections: [
|
|
423
|
+
{
|
|
424
|
+
name: 'picklistName',
|
|
425
|
+
kind: 'Scalar'
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
name: 'picklists',
|
|
429
|
+
kind: 'Object',
|
|
430
|
+
plural: true,
|
|
431
|
+
selections: PicklistEntryRepresentation__selections
|
|
432
|
+
}
|
|
433
|
+
]
|
|
434
|
+
};
|
|
435
|
+
};
|
|
436
|
+
function equals$5(existing, incoming) {
|
|
437
|
+
const existing_picklistName = existing.picklistName;
|
|
438
|
+
const incoming_picklistName = incoming.picklistName;
|
|
439
|
+
if (!(existing_picklistName === incoming_picklistName)) {
|
|
440
|
+
return false;
|
|
441
|
+
}
|
|
442
|
+
const existing_picklists = existing.picklists;
|
|
443
|
+
const incoming_picklists = incoming.picklists;
|
|
444
|
+
const equals_picklists_items = equalsArray(existing_picklists, incoming_picklists, (existing_picklists_item, incoming_picklists_item) => {
|
|
445
|
+
if (!(equals$6(existing_picklists_item, incoming_picklists_item))) {
|
|
446
|
+
return false;
|
|
447
|
+
}
|
|
448
|
+
});
|
|
449
|
+
if (equals_picklists_items === false) {
|
|
450
|
+
return false;
|
|
451
|
+
}
|
|
452
|
+
return true;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
const VERSION$4 = "a9a458021c10424744525ec9f4af4fc4";
|
|
456
|
+
function validate$4(obj, path = 'PathAssistantFieldRepresentation') {
|
|
457
|
+
const v_error = (() => {
|
|
458
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
459
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
460
|
+
}
|
|
461
|
+
const obj_apiName = obj.apiName;
|
|
462
|
+
const path_apiName = path + '.apiName';
|
|
463
|
+
if (typeof obj_apiName !== 'string') {
|
|
464
|
+
return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
|
|
465
|
+
}
|
|
466
|
+
const obj_isReadonly = obj.isReadonly;
|
|
467
|
+
const path_isReadonly = path + '.isReadonly';
|
|
468
|
+
if (typeof obj_isReadonly !== 'boolean') {
|
|
469
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isReadonly + '" (at "' + path_isReadonly + '")');
|
|
470
|
+
}
|
|
471
|
+
const obj_isRequired = obj.isRequired;
|
|
472
|
+
const path_isRequired = path + '.isRequired';
|
|
473
|
+
if (typeof obj_isRequired !== 'boolean') {
|
|
474
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isRequired + '" (at "' + path_isRequired + '")');
|
|
475
|
+
}
|
|
476
|
+
const obj_label = obj.label;
|
|
477
|
+
const path_label = path + '.label';
|
|
478
|
+
if (typeof obj_label !== 'string') {
|
|
479
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
480
|
+
}
|
|
481
|
+
})();
|
|
482
|
+
return v_error === undefined ? null : v_error;
|
|
483
|
+
}
|
|
484
|
+
const select$6 = function PathAssistantFieldRepresentationSelect() {
|
|
485
|
+
return {
|
|
486
|
+
kind: 'Fragment',
|
|
487
|
+
version: VERSION$4,
|
|
488
|
+
private: [],
|
|
489
|
+
selections: [
|
|
490
|
+
{
|
|
491
|
+
name: 'apiName',
|
|
492
|
+
kind: 'Scalar'
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
name: 'isReadonly',
|
|
496
|
+
kind: 'Scalar'
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
name: 'isRequired',
|
|
500
|
+
kind: 'Scalar'
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
name: 'label',
|
|
504
|
+
kind: 'Scalar'
|
|
505
|
+
}
|
|
506
|
+
]
|
|
507
|
+
};
|
|
508
|
+
};
|
|
509
|
+
function equals$4(existing, incoming) {
|
|
510
|
+
const existing_isReadonly = existing.isReadonly;
|
|
511
|
+
const incoming_isReadonly = incoming.isReadonly;
|
|
512
|
+
if (!(existing_isReadonly === incoming_isReadonly)) {
|
|
513
|
+
return false;
|
|
514
|
+
}
|
|
515
|
+
const existing_isRequired = existing.isRequired;
|
|
516
|
+
const incoming_isRequired = incoming.isRequired;
|
|
517
|
+
if (!(existing_isRequired === incoming_isRequired)) {
|
|
518
|
+
return false;
|
|
519
|
+
}
|
|
520
|
+
const existing_apiName = existing.apiName;
|
|
521
|
+
const incoming_apiName = incoming.apiName;
|
|
522
|
+
if (!(existing_apiName === incoming_apiName)) {
|
|
523
|
+
return false;
|
|
524
|
+
}
|
|
525
|
+
const existing_label = existing.label;
|
|
526
|
+
const incoming_label = incoming.label;
|
|
527
|
+
if (!(existing_label === incoming_label)) {
|
|
528
|
+
return false;
|
|
529
|
+
}
|
|
530
|
+
return true;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
const VERSION$3 = "bd9d5be1254fbe6807c24a76ea15e9fd";
|
|
534
|
+
function validate$3(obj, path = 'PathAssistantStepRepresentation') {
|
|
535
|
+
const v_error = (() => {
|
|
536
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
537
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
538
|
+
}
|
|
539
|
+
const obj_fields = obj.fields;
|
|
540
|
+
const path_fields = path + '.fields';
|
|
541
|
+
if (!ArrayIsArray(obj_fields)) {
|
|
542
|
+
return new TypeError('Expected "array" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
|
|
543
|
+
}
|
|
544
|
+
for (let i = 0; i < obj_fields.length; i++) {
|
|
545
|
+
const obj_fields_item = obj_fields[i];
|
|
546
|
+
const path_fields_item = path_fields + '[' + i + ']';
|
|
547
|
+
const referencepath_fields_itemValidationError = validate$4(obj_fields_item, path_fields_item);
|
|
548
|
+
if (referencepath_fields_itemValidationError !== null) {
|
|
549
|
+
let message = 'Object doesn\'t match PathAssistantFieldRepresentation (at "' + path_fields_item + '")\n';
|
|
550
|
+
message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
551
|
+
return new TypeError(message);
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
const obj_guidance = obj.guidance;
|
|
555
|
+
const path_guidance = path + '.guidance';
|
|
556
|
+
let obj_guidance_union0 = null;
|
|
557
|
+
const obj_guidance_union0_error = (() => {
|
|
558
|
+
if (typeof obj_guidance !== 'string') {
|
|
559
|
+
return new TypeError('Expected "string" but received "' + typeof obj_guidance + '" (at "' + path_guidance + '")');
|
|
560
|
+
}
|
|
561
|
+
})();
|
|
562
|
+
if (obj_guidance_union0_error != null) {
|
|
563
|
+
obj_guidance_union0 = obj_guidance_union0_error.message;
|
|
564
|
+
}
|
|
565
|
+
let obj_guidance_union1 = null;
|
|
566
|
+
const obj_guidance_union1_error = (() => {
|
|
567
|
+
if (obj_guidance !== null) {
|
|
568
|
+
return new TypeError('Expected "null" but received "' + typeof obj_guidance + '" (at "' + path_guidance + '")');
|
|
569
|
+
}
|
|
570
|
+
})();
|
|
571
|
+
if (obj_guidance_union1_error != null) {
|
|
572
|
+
obj_guidance_union1 = obj_guidance_union1_error.message;
|
|
573
|
+
}
|
|
574
|
+
if (obj_guidance_union0 && obj_guidance_union1) {
|
|
575
|
+
let message = 'Object doesn\'t match union (at "' + path_guidance + '")';
|
|
576
|
+
message += '\n' + obj_guidance_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
577
|
+
message += '\n' + obj_guidance_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
578
|
+
return new TypeError(message);
|
|
579
|
+
}
|
|
580
|
+
const obj_isClosed = obj.isClosed;
|
|
581
|
+
const path_isClosed = path + '.isClosed';
|
|
582
|
+
if (typeof obj_isClosed !== 'boolean') {
|
|
583
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isClosed + '" (at "' + path_isClosed + '")');
|
|
584
|
+
}
|
|
585
|
+
const obj_isConverted = obj.isConverted;
|
|
586
|
+
const path_isConverted = path + '.isConverted';
|
|
587
|
+
if (typeof obj_isConverted !== 'boolean') {
|
|
588
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isConverted + '" (at "' + path_isConverted + '")');
|
|
589
|
+
}
|
|
590
|
+
const obj_isWon = obj.isWon;
|
|
591
|
+
const path_isWon = path + '.isWon';
|
|
592
|
+
if (typeof obj_isWon !== 'boolean') {
|
|
593
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isWon + '" (at "' + path_isWon + '")');
|
|
594
|
+
}
|
|
595
|
+
const obj_picklistLabel = obj.picklistLabel;
|
|
596
|
+
const path_picklistLabel = path + '.picklistLabel';
|
|
597
|
+
if (typeof obj_picklistLabel !== 'string') {
|
|
598
|
+
return new TypeError('Expected "string" but received "' + typeof obj_picklistLabel + '" (at "' + path_picklistLabel + '")');
|
|
599
|
+
}
|
|
600
|
+
const obj_picklistValue = obj.picklistValue;
|
|
601
|
+
const path_picklistValue = path + '.picklistValue';
|
|
602
|
+
if (typeof obj_picklistValue !== 'string') {
|
|
603
|
+
return new TypeError('Expected "string" but received "' + typeof obj_picklistValue + '" (at "' + path_picklistValue + '")');
|
|
604
|
+
}
|
|
605
|
+
})();
|
|
606
|
+
return v_error === undefined ? null : v_error;
|
|
607
|
+
}
|
|
608
|
+
const select$5 = function PathAssistantStepRepresentationSelect() {
|
|
609
|
+
const { selections: PathAssistantFieldRepresentation__selections, opaque: PathAssistantFieldRepresentation__opaque, } = select$6();
|
|
610
|
+
return {
|
|
611
|
+
kind: 'Fragment',
|
|
612
|
+
version: VERSION$3,
|
|
613
|
+
private: [],
|
|
614
|
+
selections: [
|
|
615
|
+
{
|
|
616
|
+
name: 'fields',
|
|
617
|
+
kind: 'Object',
|
|
618
|
+
plural: true,
|
|
619
|
+
selections: PathAssistantFieldRepresentation__selections
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
name: 'guidance',
|
|
623
|
+
kind: 'Scalar'
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
name: 'isClosed',
|
|
627
|
+
kind: 'Scalar'
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
name: 'isConverted',
|
|
631
|
+
kind: 'Scalar'
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
name: 'isWon',
|
|
635
|
+
kind: 'Scalar'
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
name: 'picklistLabel',
|
|
639
|
+
kind: 'Scalar'
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
name: 'picklistValue',
|
|
643
|
+
kind: 'Scalar'
|
|
644
|
+
}
|
|
645
|
+
]
|
|
646
|
+
};
|
|
647
|
+
};
|
|
648
|
+
function equals$3(existing, incoming) {
|
|
649
|
+
const existing_isClosed = existing.isClosed;
|
|
650
|
+
const incoming_isClosed = incoming.isClosed;
|
|
651
|
+
if (!(existing_isClosed === incoming_isClosed)) {
|
|
652
|
+
return false;
|
|
653
|
+
}
|
|
654
|
+
const existing_isConverted = existing.isConverted;
|
|
655
|
+
const incoming_isConverted = incoming.isConverted;
|
|
656
|
+
if (!(existing_isConverted === incoming_isConverted)) {
|
|
657
|
+
return false;
|
|
658
|
+
}
|
|
659
|
+
const existing_isWon = existing.isWon;
|
|
660
|
+
const incoming_isWon = incoming.isWon;
|
|
661
|
+
if (!(existing_isWon === incoming_isWon)) {
|
|
662
|
+
return false;
|
|
663
|
+
}
|
|
664
|
+
const existing_picklistLabel = existing.picklistLabel;
|
|
665
|
+
const incoming_picklistLabel = incoming.picklistLabel;
|
|
666
|
+
if (!(existing_picklistLabel === incoming_picklistLabel)) {
|
|
667
|
+
return false;
|
|
668
|
+
}
|
|
669
|
+
const existing_picklistValue = existing.picklistValue;
|
|
670
|
+
const incoming_picklistValue = incoming.picklistValue;
|
|
671
|
+
if (!(existing_picklistValue === incoming_picklistValue)) {
|
|
672
|
+
return false;
|
|
673
|
+
}
|
|
674
|
+
const existing_fields = existing.fields;
|
|
675
|
+
const incoming_fields = incoming.fields;
|
|
676
|
+
const equals_fields_items = equalsArray(existing_fields, incoming_fields, (existing_fields_item, incoming_fields_item) => {
|
|
677
|
+
if (!(equals$4(existing_fields_item, incoming_fields_item))) {
|
|
678
|
+
return false;
|
|
679
|
+
}
|
|
680
|
+
});
|
|
681
|
+
if (equals_fields_items === false) {
|
|
682
|
+
return false;
|
|
683
|
+
}
|
|
684
|
+
const existing_guidance = existing.guidance;
|
|
685
|
+
const incoming_guidance = incoming.guidance;
|
|
686
|
+
if (!(existing_guidance === incoming_guidance)) {
|
|
687
|
+
return false;
|
|
688
|
+
}
|
|
689
|
+
return true;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
const VERSION$2 = "8f5dea957c8e0941055c593f74eeb0a5";
|
|
693
|
+
function validate$2(obj, path = 'PathAssistantRepresentation') {
|
|
694
|
+
const v_error = (() => {
|
|
695
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
696
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
697
|
+
}
|
|
698
|
+
const obj_animationRule = obj.animationRule;
|
|
699
|
+
const path_animationRule = path + '.animationRule';
|
|
700
|
+
if (!ArrayIsArray(obj_animationRule)) {
|
|
701
|
+
return new TypeError('Expected "array" but received "' + typeof obj_animationRule + '" (at "' + path_animationRule + '")');
|
|
702
|
+
}
|
|
703
|
+
for (let i = 0; i < obj_animationRule.length; i++) {
|
|
704
|
+
const obj_animationRule_item = obj_animationRule[i];
|
|
705
|
+
const path_animationRule_item = path_animationRule + '[' + i + ']';
|
|
706
|
+
const referencepath_animationRule_itemValidationError = validate$7(obj_animationRule_item, path_animationRule_item);
|
|
707
|
+
if (referencepath_animationRule_itemValidationError !== null) {
|
|
708
|
+
let message = 'Object doesn\'t match AnimationRuleRepresentation (at "' + path_animationRule_item + '")\n';
|
|
709
|
+
message += referencepath_animationRule_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
710
|
+
return new TypeError(message);
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
const obj_apiName = obj.apiName;
|
|
714
|
+
const path_apiName = path + '.apiName';
|
|
715
|
+
if (typeof obj_apiName !== 'string') {
|
|
716
|
+
return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
|
|
717
|
+
}
|
|
718
|
+
const obj_isActive = obj.isActive;
|
|
719
|
+
const path_isActive = path + '.isActive';
|
|
720
|
+
if (typeof obj_isActive !== 'boolean') {
|
|
721
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isActive + '" (at "' + path_isActive + '")');
|
|
722
|
+
}
|
|
723
|
+
const obj_label = obj.label;
|
|
724
|
+
const path_label = path + '.label';
|
|
725
|
+
if (typeof obj_label !== 'string') {
|
|
726
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
727
|
+
}
|
|
728
|
+
const obj_picklistField = obj.picklistField;
|
|
729
|
+
const path_picklistField = path + '.picklistField';
|
|
730
|
+
if (typeof obj_picklistField !== 'string') {
|
|
731
|
+
return new TypeError('Expected "string" but received "' + typeof obj_picklistField + '" (at "' + path_picklistField + '")');
|
|
732
|
+
}
|
|
733
|
+
const obj_picklistsForRecordType = obj.picklistsForRecordType;
|
|
734
|
+
const path_picklistsForRecordType = path + '.picklistsForRecordType';
|
|
735
|
+
if (!ArrayIsArray(obj_picklistsForRecordType)) {
|
|
736
|
+
return new TypeError('Expected "array" but received "' + typeof obj_picklistsForRecordType + '" (at "' + path_picklistsForRecordType + '")');
|
|
737
|
+
}
|
|
738
|
+
for (let i = 0; i < obj_picklistsForRecordType.length; i++) {
|
|
739
|
+
const obj_picklistsForRecordType_item = obj_picklistsForRecordType[i];
|
|
740
|
+
const path_picklistsForRecordType_item = path_picklistsForRecordType + '[' + i + ']';
|
|
741
|
+
const referencepath_picklistsForRecordType_itemValidationError = validate$5(obj_picklistsForRecordType_item, path_picklistsForRecordType_item);
|
|
742
|
+
if (referencepath_picklistsForRecordType_itemValidationError !== null) {
|
|
743
|
+
let message = 'Object doesn\'t match PicklistForRecordTypeRepresentation (at "' + path_picklistsForRecordType_item + '")\n';
|
|
744
|
+
message += referencepath_picklistsForRecordType_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
745
|
+
return new TypeError(message);
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
const obj_recordTypeId = obj.recordTypeId;
|
|
749
|
+
const path_recordTypeId = path + '.recordTypeId';
|
|
750
|
+
let obj_recordTypeId_union0 = null;
|
|
751
|
+
const obj_recordTypeId_union0_error = (() => {
|
|
752
|
+
if (typeof obj_recordTypeId !== 'string') {
|
|
753
|
+
return new TypeError('Expected "string" but received "' + typeof obj_recordTypeId + '" (at "' + path_recordTypeId + '")');
|
|
754
|
+
}
|
|
755
|
+
})();
|
|
756
|
+
if (obj_recordTypeId_union0_error != null) {
|
|
757
|
+
obj_recordTypeId_union0 = obj_recordTypeId_union0_error.message;
|
|
758
|
+
}
|
|
759
|
+
let obj_recordTypeId_union1 = null;
|
|
760
|
+
const obj_recordTypeId_union1_error = (() => {
|
|
761
|
+
if (obj_recordTypeId !== null) {
|
|
762
|
+
return new TypeError('Expected "null" but received "' + typeof obj_recordTypeId + '" (at "' + path_recordTypeId + '")');
|
|
763
|
+
}
|
|
764
|
+
})();
|
|
765
|
+
if (obj_recordTypeId_union1_error != null) {
|
|
766
|
+
obj_recordTypeId_union1 = obj_recordTypeId_union1_error.message;
|
|
767
|
+
}
|
|
768
|
+
if (obj_recordTypeId_union0 && obj_recordTypeId_union1) {
|
|
769
|
+
let message = 'Object doesn\'t match union (at "' + path_recordTypeId + '")';
|
|
770
|
+
message += '\n' + obj_recordTypeId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
771
|
+
message += '\n' + obj_recordTypeId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
772
|
+
return new TypeError(message);
|
|
773
|
+
}
|
|
774
|
+
const obj_steps = obj.steps;
|
|
775
|
+
const path_steps = path + '.steps';
|
|
776
|
+
if (!ArrayIsArray(obj_steps)) {
|
|
777
|
+
return new TypeError('Expected "array" but received "' + typeof obj_steps + '" (at "' + path_steps + '")');
|
|
778
|
+
}
|
|
779
|
+
for (let i = 0; i < obj_steps.length; i++) {
|
|
780
|
+
const obj_steps_item = obj_steps[i];
|
|
781
|
+
const path_steps_item = path_steps + '[' + i + ']';
|
|
782
|
+
const referencepath_steps_itemValidationError = validate$3(obj_steps_item, path_steps_item);
|
|
783
|
+
if (referencepath_steps_itemValidationError !== null) {
|
|
784
|
+
let message = 'Object doesn\'t match PathAssistantStepRepresentation (at "' + path_steps_item + '")\n';
|
|
785
|
+
message += referencepath_steps_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
786
|
+
return new TypeError(message);
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
})();
|
|
790
|
+
return v_error === undefined ? null : v_error;
|
|
791
|
+
}
|
|
792
|
+
const select$4 = function PathAssistantRepresentationSelect() {
|
|
793
|
+
const { selections: AnimationRuleRepresentation__selections, opaque: AnimationRuleRepresentation__opaque, } = select$9();
|
|
794
|
+
const { selections: PicklistForRecordTypeRepresentation__selections, opaque: PicklistForRecordTypeRepresentation__opaque, } = select$7();
|
|
795
|
+
const { selections: PathAssistantStepRepresentation__selections, opaque: PathAssistantStepRepresentation__opaque, } = select$5();
|
|
796
|
+
return {
|
|
797
|
+
kind: 'Fragment',
|
|
798
|
+
version: VERSION$2,
|
|
799
|
+
private: [],
|
|
800
|
+
selections: [
|
|
801
|
+
{
|
|
802
|
+
name: 'animationRule',
|
|
803
|
+
kind: 'Object',
|
|
804
|
+
plural: true,
|
|
805
|
+
selections: AnimationRuleRepresentation__selections
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
name: 'apiName',
|
|
809
|
+
kind: 'Scalar'
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
name: 'isActive',
|
|
813
|
+
kind: 'Scalar'
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
name: 'label',
|
|
817
|
+
kind: 'Scalar'
|
|
818
|
+
},
|
|
819
|
+
{
|
|
820
|
+
name: 'picklistField',
|
|
821
|
+
kind: 'Scalar'
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
name: 'picklistsForRecordType',
|
|
825
|
+
kind: 'Object',
|
|
826
|
+
plural: true,
|
|
827
|
+
selections: PicklistForRecordTypeRepresentation__selections
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
name: 'recordTypeId',
|
|
831
|
+
kind: 'Scalar'
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
name: 'steps',
|
|
835
|
+
kind: 'Object',
|
|
836
|
+
plural: true,
|
|
837
|
+
selections: PathAssistantStepRepresentation__selections
|
|
838
|
+
}
|
|
839
|
+
]
|
|
840
|
+
};
|
|
841
|
+
};
|
|
842
|
+
function equals$2(existing, incoming) {
|
|
843
|
+
const existing_isActive = existing.isActive;
|
|
844
|
+
const incoming_isActive = incoming.isActive;
|
|
845
|
+
if (!(existing_isActive === incoming_isActive)) {
|
|
846
|
+
return false;
|
|
847
|
+
}
|
|
848
|
+
const existing_apiName = existing.apiName;
|
|
849
|
+
const incoming_apiName = incoming.apiName;
|
|
850
|
+
if (!(existing_apiName === incoming_apiName)) {
|
|
851
|
+
return false;
|
|
852
|
+
}
|
|
853
|
+
const existing_label = existing.label;
|
|
854
|
+
const incoming_label = incoming.label;
|
|
855
|
+
if (!(existing_label === incoming_label)) {
|
|
856
|
+
return false;
|
|
857
|
+
}
|
|
858
|
+
const existing_picklistField = existing.picklistField;
|
|
859
|
+
const incoming_picklistField = incoming.picklistField;
|
|
860
|
+
if (!(existing_picklistField === incoming_picklistField)) {
|
|
861
|
+
return false;
|
|
862
|
+
}
|
|
863
|
+
const existing_animationRule = existing.animationRule;
|
|
864
|
+
const incoming_animationRule = incoming.animationRule;
|
|
865
|
+
const equals_animationRule_items = equalsArray(existing_animationRule, incoming_animationRule, (existing_animationRule_item, incoming_animationRule_item) => {
|
|
866
|
+
if (!(equals$7(existing_animationRule_item, incoming_animationRule_item))) {
|
|
867
|
+
return false;
|
|
868
|
+
}
|
|
869
|
+
});
|
|
870
|
+
if (equals_animationRule_items === false) {
|
|
871
|
+
return false;
|
|
872
|
+
}
|
|
873
|
+
const existing_picklistsForRecordType = existing.picklistsForRecordType;
|
|
874
|
+
const incoming_picklistsForRecordType = incoming.picklistsForRecordType;
|
|
875
|
+
const equals_picklistsForRecordType_items = equalsArray(existing_picklistsForRecordType, incoming_picklistsForRecordType, (existing_picklistsForRecordType_item, incoming_picklistsForRecordType_item) => {
|
|
876
|
+
if (!(equals$5(existing_picklistsForRecordType_item, incoming_picklistsForRecordType_item))) {
|
|
877
|
+
return false;
|
|
878
|
+
}
|
|
879
|
+
});
|
|
880
|
+
if (equals_picklistsForRecordType_items === false) {
|
|
881
|
+
return false;
|
|
882
|
+
}
|
|
883
|
+
const existing_recordTypeId = existing.recordTypeId;
|
|
884
|
+
const incoming_recordTypeId = incoming.recordTypeId;
|
|
885
|
+
if (!(existing_recordTypeId === incoming_recordTypeId)) {
|
|
886
|
+
return false;
|
|
887
|
+
}
|
|
888
|
+
const existing_steps = existing.steps;
|
|
889
|
+
const incoming_steps = incoming.steps;
|
|
890
|
+
const equals_steps_items = equalsArray(existing_steps, incoming_steps, (existing_steps_item, incoming_steps_item) => {
|
|
891
|
+
if (!(equals$3(existing_steps_item, incoming_steps_item))) {
|
|
892
|
+
return false;
|
|
893
|
+
}
|
|
894
|
+
});
|
|
895
|
+
if (equals_steps_items === false) {
|
|
896
|
+
return false;
|
|
897
|
+
}
|
|
898
|
+
return true;
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
const TTL$1 = 30000;
|
|
902
|
+
const VERSION$1 = "7a55233dea628d1403e3f698a6559d74";
|
|
903
|
+
function validate$1(obj, path = 'PathAssistantMetadataRepresentation') {
|
|
904
|
+
const v_error = (() => {
|
|
905
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
906
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
907
|
+
}
|
|
908
|
+
const obj_pathAssistants = obj.pathAssistants;
|
|
909
|
+
const path_pathAssistants = path + '.pathAssistants';
|
|
910
|
+
if (!ArrayIsArray(obj_pathAssistants)) {
|
|
911
|
+
return new TypeError('Expected "array" but received "' + typeof obj_pathAssistants + '" (at "' + path_pathAssistants + '")');
|
|
912
|
+
}
|
|
913
|
+
for (let i = 0; i < obj_pathAssistants.length; i++) {
|
|
914
|
+
const obj_pathAssistants_item = obj_pathAssistants[i];
|
|
915
|
+
const path_pathAssistants_item = path_pathAssistants + '[' + i + ']';
|
|
916
|
+
const referencepath_pathAssistants_itemValidationError = validate$2(obj_pathAssistants_item, path_pathAssistants_item);
|
|
917
|
+
if (referencepath_pathAssistants_itemValidationError !== null) {
|
|
918
|
+
let message = 'Object doesn\'t match PathAssistantRepresentation (at "' + path_pathAssistants_item + '")\n';
|
|
919
|
+
message += referencepath_pathAssistants_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
920
|
+
return new TypeError(message);
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
})();
|
|
924
|
+
return v_error === undefined ? null : v_error;
|
|
925
|
+
}
|
|
926
|
+
const RepresentationType$1 = 'PathAssistantMetadataRepresentation';
|
|
927
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
928
|
+
return input;
|
|
929
|
+
}
|
|
930
|
+
const select$3 = function PathAssistantMetadataRepresentationSelect() {
|
|
931
|
+
const { selections: PathAssistantRepresentation__selections, opaque: PathAssistantRepresentation__opaque, } = select$4();
|
|
932
|
+
return {
|
|
933
|
+
kind: 'Fragment',
|
|
934
|
+
version: VERSION$1,
|
|
935
|
+
private: [],
|
|
936
|
+
selections: [
|
|
937
|
+
{
|
|
938
|
+
name: 'pathAssistants',
|
|
939
|
+
kind: 'Object',
|
|
940
|
+
plural: true,
|
|
941
|
+
selections: PathAssistantRepresentation__selections
|
|
942
|
+
}
|
|
943
|
+
]
|
|
944
|
+
};
|
|
945
|
+
};
|
|
946
|
+
function equals$1(existing, incoming) {
|
|
947
|
+
const existing_pathAssistants = existing.pathAssistants;
|
|
948
|
+
const incoming_pathAssistants = incoming.pathAssistants;
|
|
949
|
+
const equals_pathAssistants_items = equalsArray(existing_pathAssistants, incoming_pathAssistants, (existing_pathAssistants_item, incoming_pathAssistants_item) => {
|
|
950
|
+
if (!(equals$2(existing_pathAssistants_item, incoming_pathAssistants_item))) {
|
|
951
|
+
return false;
|
|
952
|
+
}
|
|
953
|
+
});
|
|
954
|
+
if (equals_pathAssistants_items === false) {
|
|
955
|
+
return false;
|
|
956
|
+
}
|
|
957
|
+
return true;
|
|
958
|
+
}
|
|
959
|
+
const ingest$1 = function PathAssistantMetadataRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
960
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
961
|
+
const validateError = validate$1(input);
|
|
962
|
+
if (validateError !== null) {
|
|
963
|
+
throw validateError;
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
const key = path.fullPath;
|
|
967
|
+
const ttlToUse = TTL$1;
|
|
968
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "pathassistant", VERSION$1, RepresentationType$1, equals$1);
|
|
969
|
+
return createLink(key);
|
|
970
|
+
};
|
|
971
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
972
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
973
|
+
const rootKey = fullPathFactory();
|
|
974
|
+
rootKeySet.set(rootKey, {
|
|
975
|
+
namespace: keyPrefix,
|
|
976
|
+
representationName: RepresentationType$1,
|
|
977
|
+
mergeable: false
|
|
978
|
+
});
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
function select$2(luvio, params) {
|
|
982
|
+
return select$3();
|
|
983
|
+
}
|
|
984
|
+
function keyBuilder$3(luvio, params) {
|
|
985
|
+
return keyPrefix + '::PathAssistantMetadataRepresentation:(' + 'picklistFieldApiName:' + params.queryParams.picklistFieldApiName + ',' + 'recordId:' + params.urlParams.recordId + ')';
|
|
986
|
+
}
|
|
987
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
988
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
|
|
989
|
+
}
|
|
990
|
+
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
991
|
+
const { body } = response;
|
|
992
|
+
const key = keyBuilder$3(luvio, resourceParams);
|
|
993
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
994
|
+
const snapshot = luvio.storeLookup({
|
|
995
|
+
recordId: key,
|
|
996
|
+
node: select$2(),
|
|
997
|
+
variables: {},
|
|
998
|
+
}, snapshotRefresh);
|
|
999
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1000
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1001
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
deepFreeze(snapshot.data);
|
|
1005
|
+
return snapshot;
|
|
1006
|
+
}
|
|
1007
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
1008
|
+
const key = keyBuilder$3(luvio, params);
|
|
1009
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1010
|
+
const storeMetadataParams = {
|
|
1011
|
+
ttl: TTL$1,
|
|
1012
|
+
namespace: keyPrefix,
|
|
1013
|
+
version: VERSION$1,
|
|
1014
|
+
representationName: RepresentationType$1
|
|
1015
|
+
};
|
|
1016
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1017
|
+
return errorSnapshot;
|
|
1018
|
+
}
|
|
1019
|
+
function createResourceRequest$1(config) {
|
|
1020
|
+
const headers = {};
|
|
1021
|
+
return {
|
|
1022
|
+
baseUri: '/services/data/v60.0',
|
|
1023
|
+
basePath: '/connect/pathassistant/' + config.urlParams.recordId + '',
|
|
1024
|
+
method: 'get',
|
|
1025
|
+
body: null,
|
|
1026
|
+
urlParams: config.urlParams,
|
|
1027
|
+
queryParams: config.queryParams,
|
|
1028
|
+
headers,
|
|
1029
|
+
priority: 'normal',
|
|
1030
|
+
};
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
const adapterName$1 = 'getPathAssistant';
|
|
1034
|
+
const getPathAssistant_ConfigPropertyMetadata = [
|
|
1035
|
+
generateParamConfigMetadata('recordId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1036
|
+
generateParamConfigMetadata('picklistFieldApiName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1037
|
+
];
|
|
1038
|
+
const getPathAssistant_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getPathAssistant_ConfigPropertyMetadata);
|
|
1039
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$2(getPathAssistant_ConfigPropertyMetadata);
|
|
1040
|
+
function keyBuilder$2(luvio, config) {
|
|
1041
|
+
const resourceParams = createResourceParams$1(config);
|
|
1042
|
+
return keyBuilder$3(luvio, resourceParams);
|
|
1043
|
+
}
|
|
1044
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
1045
|
+
const config = {};
|
|
1046
|
+
typeCheckConfig$2(untrustedConfig, config, getPathAssistant_ConfigPropertyMetadata);
|
|
1047
|
+
return config;
|
|
1048
|
+
}
|
|
1049
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
1050
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1051
|
+
return null;
|
|
1052
|
+
}
|
|
1053
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1054
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1055
|
+
}
|
|
1056
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
1057
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1058
|
+
return null;
|
|
1059
|
+
}
|
|
1060
|
+
return config;
|
|
1061
|
+
}
|
|
1062
|
+
function adapterFragment$1(luvio, config) {
|
|
1063
|
+
createResourceParams$1(config);
|
|
1064
|
+
return select$2();
|
|
1065
|
+
}
|
|
1066
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
1067
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
|
|
1068
|
+
config,
|
|
1069
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1070
|
+
});
|
|
1071
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1072
|
+
}
|
|
1073
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
1074
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
1075
|
+
config,
|
|
1076
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1077
|
+
});
|
|
1078
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1079
|
+
}
|
|
1080
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
1081
|
+
const resourceParams = createResourceParams$1(config);
|
|
1082
|
+
const request = createResourceRequest$1(resourceParams);
|
|
1083
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1084
|
+
.then((response) => {
|
|
1085
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
1086
|
+
const cache = new StoreKeyMap();
|
|
1087
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
1088
|
+
return cache;
|
|
1089
|
+
});
|
|
1090
|
+
}, (response) => {
|
|
1091
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
1092
|
+
});
|
|
1093
|
+
}
|
|
1094
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
1095
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
1096
|
+
}
|
|
1097
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
1098
|
+
const { luvio, config } = context;
|
|
1099
|
+
const selector = {
|
|
1100
|
+
recordId: keyBuilder$2(luvio, config),
|
|
1101
|
+
node: adapterFragment$1(luvio, config),
|
|
1102
|
+
variables: {},
|
|
1103
|
+
};
|
|
1104
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1105
|
+
config,
|
|
1106
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1107
|
+
});
|
|
1108
|
+
return cacheSnapshot;
|
|
1109
|
+
}
|
|
1110
|
+
const getPathAssistantAdapterFactory = (luvio) => function pathassistant__getPathAssistant(untrustedConfig, requestContext) {
|
|
1111
|
+
const config = validateAdapterConfig$1(untrustedConfig, getPathAssistant_ConfigPropertyNames);
|
|
1112
|
+
// Invalid or incomplete config
|
|
1113
|
+
if (config === null) {
|
|
1114
|
+
return null;
|
|
1115
|
+
}
|
|
1116
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1117
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
1118
|
+
};
|
|
1119
|
+
|
|
1120
|
+
const TTL = 30000;
|
|
1121
|
+
const VERSION = "79dac224a576b8fc190868d354ad0184";
|
|
1122
|
+
function validate(obj, path = 'PathAssistantDaysInStageRepresentation') {
|
|
1123
|
+
const v_error = (() => {
|
|
1124
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1125
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1126
|
+
}
|
|
1127
|
+
const obj_picklistValuesToDays = obj.picklistValuesToDays;
|
|
1128
|
+
const path_picklistValuesToDays = path + '.picklistValuesToDays';
|
|
1129
|
+
if (obj_picklistValuesToDays === undefined) {
|
|
1130
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_picklistValuesToDays + '" (at "' + path_picklistValuesToDays + '")');
|
|
1131
|
+
}
|
|
1132
|
+
})();
|
|
1133
|
+
return v_error === undefined ? null : v_error;
|
|
1134
|
+
}
|
|
1135
|
+
const RepresentationType = 'PathAssistantDaysInStageRepresentation';
|
|
1136
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
1137
|
+
return input;
|
|
1138
|
+
}
|
|
1139
|
+
const select$1 = function PathAssistantDaysInStageRepresentationSelect() {
|
|
1140
|
+
return {
|
|
1141
|
+
kind: 'Fragment',
|
|
1142
|
+
version: VERSION,
|
|
1143
|
+
private: [],
|
|
1144
|
+
selections: [
|
|
1145
|
+
{
|
|
1146
|
+
name: 'picklistValuesToDays',
|
|
1147
|
+
kind: 'Object',
|
|
1148
|
+
// any
|
|
1149
|
+
}
|
|
1150
|
+
]
|
|
1151
|
+
};
|
|
1152
|
+
};
|
|
1153
|
+
function equals(existing, incoming) {
|
|
1154
|
+
const existing_picklistValuesToDays = existing.picklistValuesToDays;
|
|
1155
|
+
const incoming_picklistValuesToDays = incoming.picklistValuesToDays;
|
|
1156
|
+
if (JSONStringify(incoming_picklistValuesToDays) !== JSONStringify(existing_picklistValuesToDays)) {
|
|
1157
|
+
return false;
|
|
1158
|
+
}
|
|
1159
|
+
return true;
|
|
1160
|
+
}
|
|
1161
|
+
const ingest = function PathAssistantDaysInStageRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1162
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1163
|
+
const validateError = validate(input);
|
|
1164
|
+
if (validateError !== null) {
|
|
1165
|
+
throw validateError;
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
const key = path.fullPath;
|
|
1169
|
+
const ttlToUse = TTL;
|
|
1170
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "pathassistant", VERSION, RepresentationType, equals);
|
|
1171
|
+
return createLink(key);
|
|
1172
|
+
};
|
|
1173
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
1174
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1175
|
+
const rootKey = fullPathFactory();
|
|
1176
|
+
rootKeySet.set(rootKey, {
|
|
1177
|
+
namespace: keyPrefix,
|
|
1178
|
+
representationName: RepresentationType,
|
|
1179
|
+
mergeable: false
|
|
1180
|
+
});
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
function select(luvio, params) {
|
|
1184
|
+
return select$1();
|
|
1185
|
+
}
|
|
1186
|
+
function keyBuilder$1(luvio, params) {
|
|
1187
|
+
return keyPrefix + '::PathAssistantDaysInStageRepresentation:(' + 'recordId:' + params.urlParams.recordId + ')';
|
|
1188
|
+
}
|
|
1189
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
1190
|
+
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
1191
|
+
}
|
|
1192
|
+
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
1193
|
+
const { body } = response;
|
|
1194
|
+
const key = keyBuilder$1(luvio, resourceParams);
|
|
1195
|
+
luvio.storeIngest(key, ingest, body);
|
|
1196
|
+
const snapshot = luvio.storeLookup({
|
|
1197
|
+
recordId: key,
|
|
1198
|
+
node: select(),
|
|
1199
|
+
variables: {},
|
|
1200
|
+
}, snapshotRefresh);
|
|
1201
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1202
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1203
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
deepFreeze(snapshot.data);
|
|
1207
|
+
return snapshot;
|
|
1208
|
+
}
|
|
1209
|
+
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
1210
|
+
const key = keyBuilder$1(luvio, params);
|
|
1211
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1212
|
+
const storeMetadataParams = {
|
|
1213
|
+
ttl: TTL,
|
|
1214
|
+
namespace: keyPrefix,
|
|
1215
|
+
version: VERSION,
|
|
1216
|
+
representationName: RepresentationType
|
|
1217
|
+
};
|
|
1218
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1219
|
+
return errorSnapshot;
|
|
1220
|
+
}
|
|
1221
|
+
function createResourceRequest(config) {
|
|
1222
|
+
const headers = {};
|
|
1223
|
+
return {
|
|
1224
|
+
baseUri: '/services/data/v60.0',
|
|
1225
|
+
basePath: '/connect/pathassistant/' + config.urlParams.recordId + '/daysInStage',
|
|
1226
|
+
method: 'get',
|
|
1227
|
+
body: null,
|
|
1228
|
+
urlParams: config.urlParams,
|
|
1229
|
+
queryParams: {},
|
|
1230
|
+
headers,
|
|
1231
|
+
priority: 'normal',
|
|
1232
|
+
};
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
const adapterName = 'getPathAssistantDaysInStage';
|
|
1236
|
+
const getPathAssistantDaysInStage_ConfigPropertyMetadata = [
|
|
1237
|
+
generateParamConfigMetadata('recordId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1238
|
+
];
|
|
1239
|
+
const getPathAssistantDaysInStage_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getPathAssistantDaysInStage_ConfigPropertyMetadata);
|
|
1240
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$2(getPathAssistantDaysInStage_ConfigPropertyMetadata);
|
|
1241
|
+
function keyBuilder(luvio, config) {
|
|
1242
|
+
const resourceParams = createResourceParams(config);
|
|
1243
|
+
return keyBuilder$1(luvio, resourceParams);
|
|
1244
|
+
}
|
|
1245
|
+
function typeCheckConfig(untrustedConfig) {
|
|
1246
|
+
const config = {};
|
|
1247
|
+
typeCheckConfig$2(untrustedConfig, config, getPathAssistantDaysInStage_ConfigPropertyMetadata);
|
|
1248
|
+
return config;
|
|
1249
|
+
}
|
|
1250
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
1251
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1252
|
+
return null;
|
|
1253
|
+
}
|
|
1254
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1255
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1256
|
+
}
|
|
1257
|
+
const config = typeCheckConfig(untrustedConfig);
|
|
1258
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1259
|
+
return null;
|
|
1260
|
+
}
|
|
1261
|
+
return config;
|
|
1262
|
+
}
|
|
1263
|
+
function adapterFragment(luvio, config) {
|
|
1264
|
+
createResourceParams(config);
|
|
1265
|
+
return select();
|
|
1266
|
+
}
|
|
1267
|
+
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
1268
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
1269
|
+
config,
|
|
1270
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1271
|
+
});
|
|
1272
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1273
|
+
}
|
|
1274
|
+
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
1275
|
+
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
1276
|
+
config,
|
|
1277
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1278
|
+
});
|
|
1279
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1280
|
+
}
|
|
1281
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
1282
|
+
const resourceParams = createResourceParams(config);
|
|
1283
|
+
const request = createResourceRequest(resourceParams);
|
|
1284
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1285
|
+
.then((response) => {
|
|
1286
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
1287
|
+
const cache = new StoreKeyMap();
|
|
1288
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
1289
|
+
return cache;
|
|
1290
|
+
});
|
|
1291
|
+
}, (response) => {
|
|
1292
|
+
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
1293
|
+
});
|
|
1294
|
+
}
|
|
1295
|
+
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
1296
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
1297
|
+
}
|
|
1298
|
+
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
1299
|
+
const { luvio, config } = context;
|
|
1300
|
+
const selector = {
|
|
1301
|
+
recordId: keyBuilder(luvio, config),
|
|
1302
|
+
node: adapterFragment(luvio, config),
|
|
1303
|
+
variables: {},
|
|
1304
|
+
};
|
|
1305
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1306
|
+
config,
|
|
1307
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1308
|
+
});
|
|
1309
|
+
return cacheSnapshot;
|
|
1310
|
+
}
|
|
1311
|
+
const getPathAssistantDaysInStageAdapterFactory = (luvio) => function pathassistant__getPathAssistantDaysInStage(untrustedConfig, requestContext) {
|
|
1312
|
+
const config = validateAdapterConfig(untrustedConfig, getPathAssistantDaysInStage_ConfigPropertyNames);
|
|
1313
|
+
// Invalid or incomplete config
|
|
1314
|
+
if (config === null) {
|
|
1315
|
+
return null;
|
|
1316
|
+
}
|
|
1317
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1318
|
+
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
1319
|
+
};
|
|
1320
|
+
|
|
1321
|
+
let getPathAssistant;
|
|
1322
|
+
let getPathAssistantDaysInStage;
|
|
1323
|
+
// Imperative GET Adapters
|
|
1324
|
+
let getPathAssistant_imperative;
|
|
1325
|
+
let getPathAssistantDaysInStage_imperative;
|
|
1326
|
+
// Adapter Metadata
|
|
1327
|
+
const getPathAssistantMetadata = { apiFamily: 'pathassistant', name: 'getPathAssistant', ttl: 30000 };
|
|
1328
|
+
const getPathAssistantDaysInStageMetadata = { apiFamily: 'pathassistant', name: 'getPathAssistantDaysInStage', ttl: 30000 };
|
|
1329
|
+
function bindExportsTo(luvio) {
|
|
1330
|
+
// LDS Adapters
|
|
1331
|
+
const getPathAssistant_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getPathAssistant', getPathAssistantAdapterFactory), getPathAssistantMetadata);
|
|
1332
|
+
const getPathAssistantDaysInStage_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getPathAssistantDaysInStage', getPathAssistantDaysInStageAdapterFactory), getPathAssistantDaysInStageMetadata);
|
|
1333
|
+
return {
|
|
1334
|
+
getPathAssistant: createWireAdapterConstructor(luvio, getPathAssistant_ldsAdapter, getPathAssistantMetadata),
|
|
1335
|
+
getPathAssistantDaysInStage: createWireAdapterConstructor(luvio, getPathAssistantDaysInStage_ldsAdapter, getPathAssistantDaysInStageMetadata),
|
|
1336
|
+
// Imperative GET Adapters
|
|
1337
|
+
getPathAssistant_imperative: createImperativeAdapter(luvio, getPathAssistant_ldsAdapter, getPathAssistantMetadata),
|
|
1338
|
+
getPathAssistantDaysInStage_imperative: createImperativeAdapter(luvio, getPathAssistantDaysInStage_ldsAdapter, getPathAssistantDaysInStageMetadata)
|
|
1339
|
+
};
|
|
1340
|
+
}
|
|
1341
|
+
withDefaultLuvio((luvio) => {
|
|
1342
|
+
({
|
|
1343
|
+
getPathAssistant,
|
|
1344
|
+
getPathAssistantDaysInStage,
|
|
1345
|
+
getPathAssistant_imperative,
|
|
1346
|
+
getPathAssistantDaysInStage_imperative
|
|
1347
|
+
} = bindExportsTo(luvio));
|
|
1348
|
+
});
|
|
1349
|
+
|
|
1350
|
+
export { getPathAssistant, getPathAssistantDaysInStage, getPathAssistantDaysInStage_imperative, getPathAssistant_imperative };
|
|
1351
|
+
// version: 1.245.0-df5596041
|