@salesforce/lds-adapters-platform-flow-builder 1.124.2 → 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.
Files changed (28) hide show
  1. package/dist/es/es2018/platform-flow-builder.js +856 -856
  2. package/dist/{types → es/es2018/types}/src/generated/adapters/adapter-utils.d.ts +66 -66
  3. package/dist/{types → es/es2018/types}/src/generated/adapters/getRules.d.ts +28 -28
  4. package/dist/{types → es/es2018/types}/src/generated/artifacts/main.d.ts +1 -1
  5. package/dist/{types → es/es2018/types}/src/generated/artifacts/sfdc.d.ts +3 -3
  6. package/dist/{types → es/es2018/types}/src/generated/resources/getConnectInteractionBuilderRules.d.ts +17 -17
  7. package/dist/{types → es/es2018/types}/src/generated/resources/getConnectInteractionOrchestrationInstances.d.ts +15 -15
  8. package/dist/{types → es/es2018/types}/src/generated/resources/postConnectInteractionRuntimeNavigateFlowByFlowDevName.d.ts +22 -22
  9. package/dist/{types → es/es2018/types}/src/generated/resources/postConnectInteractionRuntimeResumeFlowByFlowDevName.d.ts +15 -15
  10. package/dist/{types → es/es2018/types}/src/generated/resources/postConnectInteractionRuntimeStartFlowByFlowDevName.d.ts +19 -19
  11. package/dist/{types → es/es2018/types}/src/generated/types/FlowOperatorParameterRepresentation.d.ts +53 -53
  12. package/dist/{types → es/es2018/types}/src/generated/types/FlowOperatorRepresentation.d.ts +29 -29
  13. package/dist/{types → es/es2018/types}/src/generated/types/FlowOperatorRuleCollectionRepresentation.d.ts +30 -30
  14. package/dist/{types → es/es2018/types}/src/generated/types/FlowOperatorRuleRepresentation.d.ts +52 -52
  15. package/dist/{types → es/es2018/types}/src/generated/types/FlowOrchestrationInstanceCollectionRepresentation.d.ts +30 -30
  16. package/dist/{types → es/es2018/types}/src/generated/types/FlowOrchestrationInstanceRepresentation.d.ts +48 -48
  17. package/dist/{types → es/es2018/types}/src/generated/types/FlowOrchestrationStageInstanceRepresentation.d.ts +42 -42
  18. package/dist/{types → es/es2018/types}/src/generated/types/FlowOrchestrationStepInstanceRepresentation.d.ts +45 -45
  19. package/dist/{types → es/es2018/types}/src/generated/types/FlowOrchestrationWorkItemRepresentation.d.ts +53 -53
  20. package/dist/{types → es/es2018/types}/src/generated/types/FlowRuntimeNavigateRequestRepresentation.d.ts +48 -48
  21. package/dist/{types → es/es2018/types}/src/generated/types/FlowRuntimeNavigationFieldValueRepresentation.d.ts +35 -35
  22. package/dist/{types → es/es2018/types}/src/generated/types/FlowRuntimeResponseRepresentation.d.ts +32 -32
  23. package/dist/{types → es/es2018/types}/src/generated/types/type-utils.d.ts +39 -39
  24. package/package.json +5 -5
  25. package/sfdc/index.d.ts +1 -1
  26. package/sfdc/index.js +876 -876
  27. package/dist/umd/es2018/platform-flow-builder.js +0 -889
  28. package/dist/umd/es5/platform-flow-builder.js +0 -893
@@ -6,876 +6,876 @@
6
6
 
7
7
  import { serializeStructuredKey, StoreKeyMap } from '@luvio/engine';
8
8
 
9
- const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
- const { keys: ObjectKeys, freeze: ObjectFreeze, create: ObjectCreate } = Object;
11
- const { isArray: ArrayIsArray$1 } = Array;
12
- /**
13
- * Validates an adapter config is well-formed.
14
- * @param config The config to validate.
15
- * @param adapter The adapter validation configuration.
16
- * @param oneOf The keys the config must contain at least one of.
17
- * @throws A TypeError if config doesn't satisfy the adapter's config validation.
18
- */
19
- function validateConfig(config, adapter, oneOf) {
20
- const { displayName } = adapter;
21
- const { required, optional, unsupported } = adapter.parameters;
22
- if (config === undefined ||
23
- required.every(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
24
- throw new TypeError(`adapter ${displayName} configuration must specify ${required.sort().join(', ')}`);
25
- }
26
- if (oneOf && oneOf.some(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
27
- throw new TypeError(`adapter ${displayName} configuration must specify one of ${oneOf.sort().join(', ')}`);
28
- }
29
- if (unsupported !== undefined &&
30
- unsupported.some(req => ObjectPrototypeHasOwnProperty.call(config, req))) {
31
- throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
32
- }
33
- const supported = required.concat(optional);
34
- if (ObjectKeys(config).some(key => !supported.includes(key))) {
35
- throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
36
- }
37
- }
38
- function untrustedIsObject(untrusted) {
39
- return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
40
- }
41
- function areRequiredParametersPresent(config, configPropertyNames) {
42
- return configPropertyNames.parameters.required.every(req => req in config);
43
- }
44
- const snapshotRefreshOptions = {
45
- overrides: {
46
- headers: {
47
- 'Cache-Control': 'no-cache',
48
- },
49
- }
50
- };
9
+ const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
+ const { keys: ObjectKeys, freeze: ObjectFreeze, create: ObjectCreate } = Object;
11
+ const { isArray: ArrayIsArray$1 } = Array;
12
+ /**
13
+ * Validates an adapter config is well-formed.
14
+ * @param config The config to validate.
15
+ * @param adapter The adapter validation configuration.
16
+ * @param oneOf The keys the config must contain at least one of.
17
+ * @throws A TypeError if config doesn't satisfy the adapter's config validation.
18
+ */
19
+ function validateConfig(config, adapter, oneOf) {
20
+ const { displayName } = adapter;
21
+ const { required, optional, unsupported } = adapter.parameters;
22
+ if (config === undefined ||
23
+ required.every(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
24
+ throw new TypeError(`adapter ${displayName} configuration must specify ${required.sort().join(', ')}`);
25
+ }
26
+ if (oneOf && oneOf.some(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
27
+ throw new TypeError(`adapter ${displayName} configuration must specify one of ${oneOf.sort().join(', ')}`);
28
+ }
29
+ if (unsupported !== undefined &&
30
+ unsupported.some(req => ObjectPrototypeHasOwnProperty.call(config, req))) {
31
+ throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
32
+ }
33
+ const supported = required.concat(optional);
34
+ if (ObjectKeys(config).some(key => !supported.includes(key))) {
35
+ throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
36
+ }
37
+ }
38
+ function untrustedIsObject(untrusted) {
39
+ return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
40
+ }
41
+ function areRequiredParametersPresent(config, configPropertyNames) {
42
+ return configPropertyNames.parameters.required.every(req => req in config);
43
+ }
44
+ const snapshotRefreshOptions = {
45
+ overrides: {
46
+ headers: {
47
+ 'Cache-Control': 'no-cache',
48
+ },
49
+ }
50
+ };
51
51
  const keyPrefix = 'flow-builder';
52
52
 
53
- const { isArray: ArrayIsArray } = Array;
54
- function equalsArray(a, b, equalsItem) {
55
- const aLength = a.length;
56
- const bLength = b.length;
57
- if (aLength !== bLength) {
58
- return false;
59
- }
60
- for (let i = 0; i < aLength; i++) {
61
- if (equalsItem(a[i], b[i]) === false) {
62
- return false;
63
- }
64
- }
65
- return true;
66
- }
67
- function createLink(ref) {
68
- return {
69
- __ref: serializeStructuredKey(ref),
70
- };
53
+ const { isArray: ArrayIsArray } = Array;
54
+ function equalsArray(a, b, equalsItem) {
55
+ const aLength = a.length;
56
+ const bLength = b.length;
57
+ if (aLength !== bLength) {
58
+ return false;
59
+ }
60
+ for (let i = 0; i < aLength; i++) {
61
+ if (equalsItem(a[i], b[i]) === false) {
62
+ return false;
63
+ }
64
+ }
65
+ return true;
66
+ }
67
+ function createLink(ref) {
68
+ return {
69
+ __ref: serializeStructuredKey(ref),
70
+ };
71
71
  }
72
72
 
73
- const VERSION$3 = "f21baf31691a4049568a8fd0232f6f99";
74
- function validate$3(obj, path = 'FlowOperatorRepresentation') {
75
- const v_error = (() => {
76
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
77
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
78
- }
79
- const obj_value = obj.value;
80
- const path_value = path + '.value';
81
- let obj_value_union0 = null;
82
- const obj_value_union0_error = (() => {
83
- if (typeof obj_value !== 'string') {
84
- return new TypeError('Expected "string" but received "' + typeof obj_value + '" (at "' + path_value + '")');
85
- }
86
- })();
87
- if (obj_value_union0_error != null) {
88
- obj_value_union0 = obj_value_union0_error.message;
89
- }
90
- let obj_value_union1 = null;
91
- const obj_value_union1_error = (() => {
92
- if (obj_value !== null) {
93
- return new TypeError('Expected "null" but received "' + typeof obj_value + '" (at "' + path_value + '")');
94
- }
95
- })();
96
- if (obj_value_union1_error != null) {
97
- obj_value_union1 = obj_value_union1_error.message;
98
- }
99
- if (obj_value_union0 && obj_value_union1) {
100
- let message = 'Object doesn\'t match union (at "' + path_value + '")';
101
- message += '\n' + obj_value_union0.split('\n').map((line) => '\t' + line).join('\n');
102
- message += '\n' + obj_value_union1.split('\n').map((line) => '\t' + line).join('\n');
103
- return new TypeError(message);
104
- }
105
- })();
106
- return v_error === undefined ? null : v_error;
107
- }
108
- const select$4 = function FlowOperatorRepresentationSelect() {
109
- return {
110
- kind: 'Fragment',
111
- version: VERSION$3,
112
- private: [],
113
- selections: [
114
- {
115
- name: 'value',
116
- kind: 'Scalar'
117
- }
118
- ]
119
- };
120
- };
121
- function equals$3(existing, incoming) {
122
- const existing_value = existing.value;
123
- const incoming_value = incoming.value;
124
- if (!(existing_value === incoming_value)) {
125
- return false;
126
- }
127
- return true;
73
+ const VERSION$3 = "f21baf31691a4049568a8fd0232f6f99";
74
+ function validate$3(obj, path = 'FlowOperatorRepresentation') {
75
+ const v_error = (() => {
76
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
77
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
78
+ }
79
+ const obj_value = obj.value;
80
+ const path_value = path + '.value';
81
+ let obj_value_union0 = null;
82
+ const obj_value_union0_error = (() => {
83
+ if (typeof obj_value !== 'string') {
84
+ return new TypeError('Expected "string" but received "' + typeof obj_value + '" (at "' + path_value + '")');
85
+ }
86
+ })();
87
+ if (obj_value_union0_error != null) {
88
+ obj_value_union0 = obj_value_union0_error.message;
89
+ }
90
+ let obj_value_union1 = null;
91
+ const obj_value_union1_error = (() => {
92
+ if (obj_value !== null) {
93
+ return new TypeError('Expected "null" but received "' + typeof obj_value + '" (at "' + path_value + '")');
94
+ }
95
+ })();
96
+ if (obj_value_union1_error != null) {
97
+ obj_value_union1 = obj_value_union1_error.message;
98
+ }
99
+ if (obj_value_union0 && obj_value_union1) {
100
+ let message = 'Object doesn\'t match union (at "' + path_value + '")';
101
+ message += '\n' + obj_value_union0.split('\n').map((line) => '\t' + line).join('\n');
102
+ message += '\n' + obj_value_union1.split('\n').map((line) => '\t' + line).join('\n');
103
+ return new TypeError(message);
104
+ }
105
+ })();
106
+ return v_error === undefined ? null : v_error;
107
+ }
108
+ const select$4 = function FlowOperatorRepresentationSelect() {
109
+ return {
110
+ kind: 'Fragment',
111
+ version: VERSION$3,
112
+ private: [],
113
+ selections: [
114
+ {
115
+ name: 'value',
116
+ kind: 'Scalar'
117
+ }
118
+ ]
119
+ };
120
+ };
121
+ function equals$3(existing, incoming) {
122
+ const existing_value = existing.value;
123
+ const incoming_value = incoming.value;
124
+ if (!(existing_value === incoming_value)) {
125
+ return false;
126
+ }
127
+ return true;
128
128
  }
129
129
 
130
- const VERSION$2 = "1fbcf3729a54064347b98620da65caee";
131
- function validate$2(obj, path = 'FlowOperatorParameterRepresentation') {
132
- const v_error = (() => {
133
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
134
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
135
- }
136
- const obj_canBeApexProperty = obj.canBeApexProperty;
137
- const path_canBeApexProperty = path + '.canBeApexProperty';
138
- let obj_canBeApexProperty_union0 = null;
139
- const obj_canBeApexProperty_union0_error = (() => {
140
- if (typeof obj_canBeApexProperty !== 'string') {
141
- return new TypeError('Expected "string" but received "' + typeof obj_canBeApexProperty + '" (at "' + path_canBeApexProperty + '")');
142
- }
143
- })();
144
- if (obj_canBeApexProperty_union0_error != null) {
145
- obj_canBeApexProperty_union0 = obj_canBeApexProperty_union0_error.message;
146
- }
147
- let obj_canBeApexProperty_union1 = null;
148
- const obj_canBeApexProperty_union1_error = (() => {
149
- if (obj_canBeApexProperty !== null) {
150
- return new TypeError('Expected "null" but received "' + typeof obj_canBeApexProperty + '" (at "' + path_canBeApexProperty + '")');
151
- }
152
- })();
153
- if (obj_canBeApexProperty_union1_error != null) {
154
- obj_canBeApexProperty_union1 = obj_canBeApexProperty_union1_error.message;
155
- }
156
- if (obj_canBeApexProperty_union0 && obj_canBeApexProperty_union1) {
157
- let message = 'Object doesn\'t match union (at "' + path_canBeApexProperty + '")';
158
- message += '\n' + obj_canBeApexProperty_union0.split('\n').map((line) => '\t' + line).join('\n');
159
- message += '\n' + obj_canBeApexProperty_union1.split('\n').map((line) => '\t' + line).join('\n');
160
- return new TypeError(message);
161
- }
162
- const obj_canBeSobjectField = obj.canBeSobjectField;
163
- const path_canBeSobjectField = path + '.canBeSobjectField';
164
- let obj_canBeSobjectField_union0 = null;
165
- const obj_canBeSobjectField_union0_error = (() => {
166
- if (typeof obj_canBeSobjectField !== 'string') {
167
- return new TypeError('Expected "string" but received "' + typeof obj_canBeSobjectField + '" (at "' + path_canBeSobjectField + '")');
168
- }
169
- })();
170
- if (obj_canBeSobjectField_union0_error != null) {
171
- obj_canBeSobjectField_union0 = obj_canBeSobjectField_union0_error.message;
172
- }
173
- let obj_canBeSobjectField_union1 = null;
174
- const obj_canBeSobjectField_union1_error = (() => {
175
- if (obj_canBeSobjectField !== null) {
176
- return new TypeError('Expected "null" but received "' + typeof obj_canBeSobjectField + '" (at "' + path_canBeSobjectField + '")');
177
- }
178
- })();
179
- if (obj_canBeSobjectField_union1_error != null) {
180
- obj_canBeSobjectField_union1 = obj_canBeSobjectField_union1_error.message;
181
- }
182
- if (obj_canBeSobjectField_union0 && obj_canBeSobjectField_union1) {
183
- let message = 'Object doesn\'t match union (at "' + path_canBeSobjectField + '")';
184
- message += '\n' + obj_canBeSobjectField_union0.split('\n').map((line) => '\t' + line).join('\n');
185
- message += '\n' + obj_canBeSobjectField_union1.split('\n').map((line) => '\t' + line).join('\n');
186
- return new TypeError(message);
187
- }
188
- const obj_canBeSystemVariable = obj.canBeSystemVariable;
189
- const path_canBeSystemVariable = path + '.canBeSystemVariable';
190
- let obj_canBeSystemVariable_union0 = null;
191
- const obj_canBeSystemVariable_union0_error = (() => {
192
- if (typeof obj_canBeSystemVariable !== 'string') {
193
- return new TypeError('Expected "string" but received "' + typeof obj_canBeSystemVariable + '" (at "' + path_canBeSystemVariable + '")');
194
- }
195
- })();
196
- if (obj_canBeSystemVariable_union0_error != null) {
197
- obj_canBeSystemVariable_union0 = obj_canBeSystemVariable_union0_error.message;
198
- }
199
- let obj_canBeSystemVariable_union1 = null;
200
- const obj_canBeSystemVariable_union1_error = (() => {
201
- if (obj_canBeSystemVariable !== null) {
202
- return new TypeError('Expected "null" but received "' + typeof obj_canBeSystemVariable + '" (at "' + path_canBeSystemVariable + '")');
203
- }
204
- })();
205
- if (obj_canBeSystemVariable_union1_error != null) {
206
- obj_canBeSystemVariable_union1 = obj_canBeSystemVariable_union1_error.message;
207
- }
208
- if (obj_canBeSystemVariable_union0 && obj_canBeSystemVariable_union1) {
209
- let message = 'Object doesn\'t match union (at "' + path_canBeSystemVariable + '")';
210
- message += '\n' + obj_canBeSystemVariable_union0.split('\n').map((line) => '\t' + line).join('\n');
211
- message += '\n' + obj_canBeSystemVariable_union1.split('\n').map((line) => '\t' + line).join('\n');
212
- return new TypeError(message);
213
- }
214
- const obj_cannotBeElements = obj.cannotBeElements;
215
- const path_cannotBeElements = path + '.cannotBeElements';
216
- if (!ArrayIsArray(obj_cannotBeElements)) {
217
- return new TypeError('Expected "array" but received "' + typeof obj_cannotBeElements + '" (at "' + path_cannotBeElements + '")');
218
- }
219
- for (let i = 0; i < obj_cannotBeElements.length; i++) {
220
- const obj_cannotBeElements_item = obj_cannotBeElements[i];
221
- const path_cannotBeElements_item = path_cannotBeElements + '[' + i + ']';
222
- if (typeof obj_cannotBeElements_item !== 'string') {
223
- return new TypeError('Expected "string" but received "' + typeof obj_cannotBeElements_item + '" (at "' + path_cannotBeElements_item + '")');
224
- }
225
- }
226
- const obj_dataType = obj.dataType;
227
- const path_dataType = path + '.dataType';
228
- let obj_dataType_union0 = null;
229
- const obj_dataType_union0_error = (() => {
230
- if (typeof obj_dataType !== 'string') {
231
- return new TypeError('Expected "string" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
232
- }
233
- })();
234
- if (obj_dataType_union0_error != null) {
235
- obj_dataType_union0 = obj_dataType_union0_error.message;
236
- }
237
- let obj_dataType_union1 = null;
238
- const obj_dataType_union1_error = (() => {
239
- if (obj_dataType !== null) {
240
- return new TypeError('Expected "null" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
241
- }
242
- })();
243
- if (obj_dataType_union1_error != null) {
244
- obj_dataType_union1 = obj_dataType_union1_error.message;
245
- }
246
- if (obj_dataType_union0 && obj_dataType_union1) {
247
- let message = 'Object doesn\'t match union (at "' + path_dataType + '")';
248
- message += '\n' + obj_dataType_union0.split('\n').map((line) => '\t' + line).join('\n');
249
- message += '\n' + obj_dataType_union1.split('\n').map((line) => '\t' + line).join('\n');
250
- return new TypeError(message);
251
- }
252
- const obj_isCollection = obj.isCollection;
253
- const path_isCollection = path + '.isCollection';
254
- if (typeof obj_isCollection !== 'boolean') {
255
- return new TypeError('Expected "boolean" but received "' + typeof obj_isCollection + '" (at "' + path_isCollection + '")');
256
- }
257
- const obj_isNull = obj.isNull;
258
- const path_isNull = path + '.isNull';
259
- if (typeof obj_isNull !== 'boolean') {
260
- return new TypeError('Expected "boolean" but received "' + typeof obj_isNull + '" (at "' + path_isNull + '")');
261
- }
262
- const obj_mustBeElements = obj.mustBeElements;
263
- const path_mustBeElements = path + '.mustBeElements';
264
- if (!ArrayIsArray(obj_mustBeElements)) {
265
- return new TypeError('Expected "array" but received "' + typeof obj_mustBeElements + '" (at "' + path_mustBeElements + '")');
266
- }
267
- for (let i = 0; i < obj_mustBeElements.length; i++) {
268
- const obj_mustBeElements_item = obj_mustBeElements[i];
269
- const path_mustBeElements_item = path_mustBeElements + '[' + i + ']';
270
- if (typeof obj_mustBeElements_item !== 'string') {
271
- return new TypeError('Expected "string" but received "' + typeof obj_mustBeElements_item + '" (at "' + path_mustBeElements_item + '")');
272
- }
273
- }
274
- const obj_paramType = obj.paramType;
275
- const path_paramType = path + '.paramType';
276
- let obj_paramType_union0 = null;
277
- const obj_paramType_union0_error = (() => {
278
- if (typeof obj_paramType !== 'string') {
279
- return new TypeError('Expected "string" but received "' + typeof obj_paramType + '" (at "' + path_paramType + '")');
280
- }
281
- })();
282
- if (obj_paramType_union0_error != null) {
283
- obj_paramType_union0 = obj_paramType_union0_error.message;
284
- }
285
- let obj_paramType_union1 = null;
286
- const obj_paramType_union1_error = (() => {
287
- if (obj_paramType !== null) {
288
- return new TypeError('Expected "null" but received "' + typeof obj_paramType + '" (at "' + path_paramType + '")');
289
- }
290
- })();
291
- if (obj_paramType_union1_error != null) {
292
- obj_paramType_union1 = obj_paramType_union1_error.message;
293
- }
294
- if (obj_paramType_union0 && obj_paramType_union1) {
295
- let message = 'Object doesn\'t match union (at "' + path_paramType + '")';
296
- message += '\n' + obj_paramType_union0.split('\n').map((line) => '\t' + line).join('\n');
297
- message += '\n' + obj_paramType_union1.split('\n').map((line) => '\t' + line).join('\n');
298
- return new TypeError(message);
299
- }
300
- })();
301
- return v_error === undefined ? null : v_error;
302
- }
303
- const select$3 = function FlowOperatorParameterRepresentationSelect() {
304
- return {
305
- kind: 'Fragment',
306
- version: VERSION$2,
307
- private: [],
308
- selections: [
309
- {
310
- name: 'canBeApexProperty',
311
- kind: 'Scalar'
312
- },
313
- {
314
- name: 'canBeSobjectField',
315
- kind: 'Scalar'
316
- },
317
- {
318
- name: 'canBeSystemVariable',
319
- kind: 'Scalar'
320
- },
321
- {
322
- name: 'cannotBeElements',
323
- kind: 'Scalar',
324
- plural: true
325
- },
326
- {
327
- name: 'dataType',
328
- kind: 'Scalar'
329
- },
330
- {
331
- name: 'isCollection',
332
- kind: 'Scalar'
333
- },
334
- {
335
- name: 'isNull',
336
- kind: 'Scalar'
337
- },
338
- {
339
- name: 'mustBeElements',
340
- kind: 'Scalar',
341
- plural: true
342
- },
343
- {
344
- name: 'paramType',
345
- kind: 'Scalar'
346
- }
347
- ]
348
- };
349
- };
350
- function equals$2(existing, incoming) {
351
- const existing_isCollection = existing.isCollection;
352
- const incoming_isCollection = incoming.isCollection;
353
- if (!(existing_isCollection === incoming_isCollection)) {
354
- return false;
355
- }
356
- const existing_isNull = existing.isNull;
357
- const incoming_isNull = incoming.isNull;
358
- if (!(existing_isNull === incoming_isNull)) {
359
- return false;
360
- }
361
- const existing_canBeApexProperty = existing.canBeApexProperty;
362
- const incoming_canBeApexProperty = incoming.canBeApexProperty;
363
- if (!(existing_canBeApexProperty === incoming_canBeApexProperty)) {
364
- return false;
365
- }
366
- const existing_canBeSobjectField = existing.canBeSobjectField;
367
- const incoming_canBeSobjectField = incoming.canBeSobjectField;
368
- if (!(existing_canBeSobjectField === incoming_canBeSobjectField)) {
369
- return false;
370
- }
371
- const existing_canBeSystemVariable = existing.canBeSystemVariable;
372
- const incoming_canBeSystemVariable = incoming.canBeSystemVariable;
373
- if (!(existing_canBeSystemVariable === incoming_canBeSystemVariable)) {
374
- return false;
375
- }
376
- const existing_cannotBeElements = existing.cannotBeElements;
377
- const incoming_cannotBeElements = incoming.cannotBeElements;
378
- const equals_cannotBeElements_items = equalsArray(existing_cannotBeElements, incoming_cannotBeElements, (existing_cannotBeElements_item, incoming_cannotBeElements_item) => {
379
- if (!(existing_cannotBeElements_item === incoming_cannotBeElements_item)) {
380
- return false;
381
- }
382
- });
383
- if (equals_cannotBeElements_items === false) {
384
- return false;
385
- }
386
- const existing_dataType = existing.dataType;
387
- const incoming_dataType = incoming.dataType;
388
- if (!(existing_dataType === incoming_dataType)) {
389
- return false;
390
- }
391
- const existing_mustBeElements = existing.mustBeElements;
392
- const incoming_mustBeElements = incoming.mustBeElements;
393
- const equals_mustBeElements_items = equalsArray(existing_mustBeElements, incoming_mustBeElements, (existing_mustBeElements_item, incoming_mustBeElements_item) => {
394
- if (!(existing_mustBeElements_item === incoming_mustBeElements_item)) {
395
- return false;
396
- }
397
- });
398
- if (equals_mustBeElements_items === false) {
399
- return false;
400
- }
401
- const existing_paramType = existing.paramType;
402
- const incoming_paramType = incoming.paramType;
403
- if (!(existing_paramType === incoming_paramType)) {
404
- return false;
405
- }
406
- return true;
130
+ const VERSION$2 = "1fbcf3729a54064347b98620da65caee";
131
+ function validate$2(obj, path = 'FlowOperatorParameterRepresentation') {
132
+ const v_error = (() => {
133
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
134
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
135
+ }
136
+ const obj_canBeApexProperty = obj.canBeApexProperty;
137
+ const path_canBeApexProperty = path + '.canBeApexProperty';
138
+ let obj_canBeApexProperty_union0 = null;
139
+ const obj_canBeApexProperty_union0_error = (() => {
140
+ if (typeof obj_canBeApexProperty !== 'string') {
141
+ return new TypeError('Expected "string" but received "' + typeof obj_canBeApexProperty + '" (at "' + path_canBeApexProperty + '")');
142
+ }
143
+ })();
144
+ if (obj_canBeApexProperty_union0_error != null) {
145
+ obj_canBeApexProperty_union0 = obj_canBeApexProperty_union0_error.message;
146
+ }
147
+ let obj_canBeApexProperty_union1 = null;
148
+ const obj_canBeApexProperty_union1_error = (() => {
149
+ if (obj_canBeApexProperty !== null) {
150
+ return new TypeError('Expected "null" but received "' + typeof obj_canBeApexProperty + '" (at "' + path_canBeApexProperty + '")');
151
+ }
152
+ })();
153
+ if (obj_canBeApexProperty_union1_error != null) {
154
+ obj_canBeApexProperty_union1 = obj_canBeApexProperty_union1_error.message;
155
+ }
156
+ if (obj_canBeApexProperty_union0 && obj_canBeApexProperty_union1) {
157
+ let message = 'Object doesn\'t match union (at "' + path_canBeApexProperty + '")';
158
+ message += '\n' + obj_canBeApexProperty_union0.split('\n').map((line) => '\t' + line).join('\n');
159
+ message += '\n' + obj_canBeApexProperty_union1.split('\n').map((line) => '\t' + line).join('\n');
160
+ return new TypeError(message);
161
+ }
162
+ const obj_canBeSobjectField = obj.canBeSobjectField;
163
+ const path_canBeSobjectField = path + '.canBeSobjectField';
164
+ let obj_canBeSobjectField_union0 = null;
165
+ const obj_canBeSobjectField_union0_error = (() => {
166
+ if (typeof obj_canBeSobjectField !== 'string') {
167
+ return new TypeError('Expected "string" but received "' + typeof obj_canBeSobjectField + '" (at "' + path_canBeSobjectField + '")');
168
+ }
169
+ })();
170
+ if (obj_canBeSobjectField_union0_error != null) {
171
+ obj_canBeSobjectField_union0 = obj_canBeSobjectField_union0_error.message;
172
+ }
173
+ let obj_canBeSobjectField_union1 = null;
174
+ const obj_canBeSobjectField_union1_error = (() => {
175
+ if (obj_canBeSobjectField !== null) {
176
+ return new TypeError('Expected "null" but received "' + typeof obj_canBeSobjectField + '" (at "' + path_canBeSobjectField + '")');
177
+ }
178
+ })();
179
+ if (obj_canBeSobjectField_union1_error != null) {
180
+ obj_canBeSobjectField_union1 = obj_canBeSobjectField_union1_error.message;
181
+ }
182
+ if (obj_canBeSobjectField_union0 && obj_canBeSobjectField_union1) {
183
+ let message = 'Object doesn\'t match union (at "' + path_canBeSobjectField + '")';
184
+ message += '\n' + obj_canBeSobjectField_union0.split('\n').map((line) => '\t' + line).join('\n');
185
+ message += '\n' + obj_canBeSobjectField_union1.split('\n').map((line) => '\t' + line).join('\n');
186
+ return new TypeError(message);
187
+ }
188
+ const obj_canBeSystemVariable = obj.canBeSystemVariable;
189
+ const path_canBeSystemVariable = path + '.canBeSystemVariable';
190
+ let obj_canBeSystemVariable_union0 = null;
191
+ const obj_canBeSystemVariable_union0_error = (() => {
192
+ if (typeof obj_canBeSystemVariable !== 'string') {
193
+ return new TypeError('Expected "string" but received "' + typeof obj_canBeSystemVariable + '" (at "' + path_canBeSystemVariable + '")');
194
+ }
195
+ })();
196
+ if (obj_canBeSystemVariable_union0_error != null) {
197
+ obj_canBeSystemVariable_union0 = obj_canBeSystemVariable_union0_error.message;
198
+ }
199
+ let obj_canBeSystemVariable_union1 = null;
200
+ const obj_canBeSystemVariable_union1_error = (() => {
201
+ if (obj_canBeSystemVariable !== null) {
202
+ return new TypeError('Expected "null" but received "' + typeof obj_canBeSystemVariable + '" (at "' + path_canBeSystemVariable + '")');
203
+ }
204
+ })();
205
+ if (obj_canBeSystemVariable_union1_error != null) {
206
+ obj_canBeSystemVariable_union1 = obj_canBeSystemVariable_union1_error.message;
207
+ }
208
+ if (obj_canBeSystemVariable_union0 && obj_canBeSystemVariable_union1) {
209
+ let message = 'Object doesn\'t match union (at "' + path_canBeSystemVariable + '")';
210
+ message += '\n' + obj_canBeSystemVariable_union0.split('\n').map((line) => '\t' + line).join('\n');
211
+ message += '\n' + obj_canBeSystemVariable_union1.split('\n').map((line) => '\t' + line).join('\n');
212
+ return new TypeError(message);
213
+ }
214
+ const obj_cannotBeElements = obj.cannotBeElements;
215
+ const path_cannotBeElements = path + '.cannotBeElements';
216
+ if (!ArrayIsArray(obj_cannotBeElements)) {
217
+ return new TypeError('Expected "array" but received "' + typeof obj_cannotBeElements + '" (at "' + path_cannotBeElements + '")');
218
+ }
219
+ for (let i = 0; i < obj_cannotBeElements.length; i++) {
220
+ const obj_cannotBeElements_item = obj_cannotBeElements[i];
221
+ const path_cannotBeElements_item = path_cannotBeElements + '[' + i + ']';
222
+ if (typeof obj_cannotBeElements_item !== 'string') {
223
+ return new TypeError('Expected "string" but received "' + typeof obj_cannotBeElements_item + '" (at "' + path_cannotBeElements_item + '")');
224
+ }
225
+ }
226
+ const obj_dataType = obj.dataType;
227
+ const path_dataType = path + '.dataType';
228
+ let obj_dataType_union0 = null;
229
+ const obj_dataType_union0_error = (() => {
230
+ if (typeof obj_dataType !== 'string') {
231
+ return new TypeError('Expected "string" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
232
+ }
233
+ })();
234
+ if (obj_dataType_union0_error != null) {
235
+ obj_dataType_union0 = obj_dataType_union0_error.message;
236
+ }
237
+ let obj_dataType_union1 = null;
238
+ const obj_dataType_union1_error = (() => {
239
+ if (obj_dataType !== null) {
240
+ return new TypeError('Expected "null" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
241
+ }
242
+ })();
243
+ if (obj_dataType_union1_error != null) {
244
+ obj_dataType_union1 = obj_dataType_union1_error.message;
245
+ }
246
+ if (obj_dataType_union0 && obj_dataType_union1) {
247
+ let message = 'Object doesn\'t match union (at "' + path_dataType + '")';
248
+ message += '\n' + obj_dataType_union0.split('\n').map((line) => '\t' + line).join('\n');
249
+ message += '\n' + obj_dataType_union1.split('\n').map((line) => '\t' + line).join('\n');
250
+ return new TypeError(message);
251
+ }
252
+ const obj_isCollection = obj.isCollection;
253
+ const path_isCollection = path + '.isCollection';
254
+ if (typeof obj_isCollection !== 'boolean') {
255
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isCollection + '" (at "' + path_isCollection + '")');
256
+ }
257
+ const obj_isNull = obj.isNull;
258
+ const path_isNull = path + '.isNull';
259
+ if (typeof obj_isNull !== 'boolean') {
260
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isNull + '" (at "' + path_isNull + '")');
261
+ }
262
+ const obj_mustBeElements = obj.mustBeElements;
263
+ const path_mustBeElements = path + '.mustBeElements';
264
+ if (!ArrayIsArray(obj_mustBeElements)) {
265
+ return new TypeError('Expected "array" but received "' + typeof obj_mustBeElements + '" (at "' + path_mustBeElements + '")');
266
+ }
267
+ for (let i = 0; i < obj_mustBeElements.length; i++) {
268
+ const obj_mustBeElements_item = obj_mustBeElements[i];
269
+ const path_mustBeElements_item = path_mustBeElements + '[' + i + ']';
270
+ if (typeof obj_mustBeElements_item !== 'string') {
271
+ return new TypeError('Expected "string" but received "' + typeof obj_mustBeElements_item + '" (at "' + path_mustBeElements_item + '")');
272
+ }
273
+ }
274
+ const obj_paramType = obj.paramType;
275
+ const path_paramType = path + '.paramType';
276
+ let obj_paramType_union0 = null;
277
+ const obj_paramType_union0_error = (() => {
278
+ if (typeof obj_paramType !== 'string') {
279
+ return new TypeError('Expected "string" but received "' + typeof obj_paramType + '" (at "' + path_paramType + '")');
280
+ }
281
+ })();
282
+ if (obj_paramType_union0_error != null) {
283
+ obj_paramType_union0 = obj_paramType_union0_error.message;
284
+ }
285
+ let obj_paramType_union1 = null;
286
+ const obj_paramType_union1_error = (() => {
287
+ if (obj_paramType !== null) {
288
+ return new TypeError('Expected "null" but received "' + typeof obj_paramType + '" (at "' + path_paramType + '")');
289
+ }
290
+ })();
291
+ if (obj_paramType_union1_error != null) {
292
+ obj_paramType_union1 = obj_paramType_union1_error.message;
293
+ }
294
+ if (obj_paramType_union0 && obj_paramType_union1) {
295
+ let message = 'Object doesn\'t match union (at "' + path_paramType + '")';
296
+ message += '\n' + obj_paramType_union0.split('\n').map((line) => '\t' + line).join('\n');
297
+ message += '\n' + obj_paramType_union1.split('\n').map((line) => '\t' + line).join('\n');
298
+ return new TypeError(message);
299
+ }
300
+ })();
301
+ return v_error === undefined ? null : v_error;
302
+ }
303
+ const select$3 = function FlowOperatorParameterRepresentationSelect() {
304
+ return {
305
+ kind: 'Fragment',
306
+ version: VERSION$2,
307
+ private: [],
308
+ selections: [
309
+ {
310
+ name: 'canBeApexProperty',
311
+ kind: 'Scalar'
312
+ },
313
+ {
314
+ name: 'canBeSobjectField',
315
+ kind: 'Scalar'
316
+ },
317
+ {
318
+ name: 'canBeSystemVariable',
319
+ kind: 'Scalar'
320
+ },
321
+ {
322
+ name: 'cannotBeElements',
323
+ kind: 'Scalar',
324
+ plural: true
325
+ },
326
+ {
327
+ name: 'dataType',
328
+ kind: 'Scalar'
329
+ },
330
+ {
331
+ name: 'isCollection',
332
+ kind: 'Scalar'
333
+ },
334
+ {
335
+ name: 'isNull',
336
+ kind: 'Scalar'
337
+ },
338
+ {
339
+ name: 'mustBeElements',
340
+ kind: 'Scalar',
341
+ plural: true
342
+ },
343
+ {
344
+ name: 'paramType',
345
+ kind: 'Scalar'
346
+ }
347
+ ]
348
+ };
349
+ };
350
+ function equals$2(existing, incoming) {
351
+ const existing_isCollection = existing.isCollection;
352
+ const incoming_isCollection = incoming.isCollection;
353
+ if (!(existing_isCollection === incoming_isCollection)) {
354
+ return false;
355
+ }
356
+ const existing_isNull = existing.isNull;
357
+ const incoming_isNull = incoming.isNull;
358
+ if (!(existing_isNull === incoming_isNull)) {
359
+ return false;
360
+ }
361
+ const existing_canBeApexProperty = existing.canBeApexProperty;
362
+ const incoming_canBeApexProperty = incoming.canBeApexProperty;
363
+ if (!(existing_canBeApexProperty === incoming_canBeApexProperty)) {
364
+ return false;
365
+ }
366
+ const existing_canBeSobjectField = existing.canBeSobjectField;
367
+ const incoming_canBeSobjectField = incoming.canBeSobjectField;
368
+ if (!(existing_canBeSobjectField === incoming_canBeSobjectField)) {
369
+ return false;
370
+ }
371
+ const existing_canBeSystemVariable = existing.canBeSystemVariable;
372
+ const incoming_canBeSystemVariable = incoming.canBeSystemVariable;
373
+ if (!(existing_canBeSystemVariable === incoming_canBeSystemVariable)) {
374
+ return false;
375
+ }
376
+ const existing_cannotBeElements = existing.cannotBeElements;
377
+ const incoming_cannotBeElements = incoming.cannotBeElements;
378
+ const equals_cannotBeElements_items = equalsArray(existing_cannotBeElements, incoming_cannotBeElements, (existing_cannotBeElements_item, incoming_cannotBeElements_item) => {
379
+ if (!(existing_cannotBeElements_item === incoming_cannotBeElements_item)) {
380
+ return false;
381
+ }
382
+ });
383
+ if (equals_cannotBeElements_items === false) {
384
+ return false;
385
+ }
386
+ const existing_dataType = existing.dataType;
387
+ const incoming_dataType = incoming.dataType;
388
+ if (!(existing_dataType === incoming_dataType)) {
389
+ return false;
390
+ }
391
+ const existing_mustBeElements = existing.mustBeElements;
392
+ const incoming_mustBeElements = incoming.mustBeElements;
393
+ const equals_mustBeElements_items = equalsArray(existing_mustBeElements, incoming_mustBeElements, (existing_mustBeElements_item, incoming_mustBeElements_item) => {
394
+ if (!(existing_mustBeElements_item === incoming_mustBeElements_item)) {
395
+ return false;
396
+ }
397
+ });
398
+ if (equals_mustBeElements_items === false) {
399
+ return false;
400
+ }
401
+ const existing_paramType = existing.paramType;
402
+ const incoming_paramType = incoming.paramType;
403
+ if (!(existing_paramType === incoming_paramType)) {
404
+ return false;
405
+ }
406
+ return true;
407
407
  }
408
408
 
409
- const VERSION$1 = "db9c200fd0583df1c75001ba9a103995";
410
- function validate$1(obj, path = 'FlowOperatorRuleRepresentation') {
411
- const v_error = (() => {
412
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
413
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
414
- }
415
- const obj_assignmentOperator = obj.assignmentOperator;
416
- const path_assignmentOperator = path + '.assignmentOperator';
417
- const referencepath_assignmentOperatorValidationError = validate$3(obj_assignmentOperator, path_assignmentOperator);
418
- if (referencepath_assignmentOperatorValidationError !== null) {
419
- let message = 'Object doesn\'t match FlowOperatorRepresentation (at "' + path_assignmentOperator + '")\n';
420
- message += referencepath_assignmentOperatorValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
421
- return new TypeError(message);
422
- }
423
- const obj_comparisonOperator = obj.comparisonOperator;
424
- const path_comparisonOperator = path + '.comparisonOperator';
425
- const referencepath_comparisonOperatorValidationError = validate$3(obj_comparisonOperator, path_comparisonOperator);
426
- if (referencepath_comparisonOperatorValidationError !== null) {
427
- let message = 'Object doesn\'t match FlowOperatorRepresentation (at "' + path_comparisonOperator + '")\n';
428
- message += referencepath_comparisonOperatorValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
429
- return new TypeError(message);
430
- }
431
- const obj_excludeElems = obj.excludeElems;
432
- const path_excludeElems = path + '.excludeElems';
433
- if (!ArrayIsArray(obj_excludeElems)) {
434
- return new TypeError('Expected "array" but received "' + typeof obj_excludeElems + '" (at "' + path_excludeElems + '")');
435
- }
436
- for (let i = 0; i < obj_excludeElems.length; i++) {
437
- const obj_excludeElems_item = obj_excludeElems[i];
438
- const path_excludeElems_item = path_excludeElems + '[' + i + ']';
439
- if (typeof obj_excludeElems_item !== 'string') {
440
- return new TypeError('Expected "string" but received "' + typeof obj_excludeElems_item + '" (at "' + path_excludeElems_item + '")');
441
- }
442
- }
443
- const obj_includeElems = obj.includeElems;
444
- const path_includeElems = path + '.includeElems';
445
- if (!ArrayIsArray(obj_includeElems)) {
446
- return new TypeError('Expected "array" but received "' + typeof obj_includeElems + '" (at "' + path_includeElems + '")');
447
- }
448
- for (let i = 0; i < obj_includeElems.length; i++) {
449
- const obj_includeElems_item = obj_includeElems[i];
450
- const path_includeElems_item = path_includeElems + '[' + i + ']';
451
- if (typeof obj_includeElems_item !== 'string') {
452
- return new TypeError('Expected "string" but received "' + typeof obj_includeElems_item + '" (at "' + path_includeElems_item + '")');
453
- }
454
- }
455
- const obj_left = obj.left;
456
- const path_left = path + '.left';
457
- const referencepath_leftValidationError = validate$2(obj_left, path_left);
458
- if (referencepath_leftValidationError !== null) {
459
- let message = 'Object doesn\'t match FlowOperatorParameterRepresentation (at "' + path_left + '")\n';
460
- message += referencepath_leftValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
461
- return new TypeError(message);
462
- }
463
- const obj_rhsParams = obj.rhsParams;
464
- const path_rhsParams = path + '.rhsParams';
465
- if (!ArrayIsArray(obj_rhsParams)) {
466
- return new TypeError('Expected "array" but received "' + typeof obj_rhsParams + '" (at "' + path_rhsParams + '")');
467
- }
468
- for (let i = 0; i < obj_rhsParams.length; i++) {
469
- const obj_rhsParams_item = obj_rhsParams[i];
470
- const path_rhsParams_item = path_rhsParams + '[' + i + ']';
471
- const referencepath_rhsParams_itemValidationError = validate$2(obj_rhsParams_item, path_rhsParams_item);
472
- if (referencepath_rhsParams_itemValidationError !== null) {
473
- let message = 'Object doesn\'t match FlowOperatorParameterRepresentation (at "' + path_rhsParams_item + '")\n';
474
- message += referencepath_rhsParams_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
475
- return new TypeError(message);
476
- }
477
- }
478
- const obj_ruleType = obj.ruleType;
479
- const path_ruleType = path + '.ruleType';
480
- if (typeof obj_ruleType !== 'string') {
481
- return new TypeError('Expected "string" but received "' + typeof obj_ruleType + '" (at "' + path_ruleType + '")');
482
- }
483
- const obj_validationType = obj.validationType;
484
- const path_validationType = path + '.validationType';
485
- let obj_validationType_union0 = null;
486
- const obj_validationType_union0_error = (() => {
487
- if (typeof obj_validationType !== 'string') {
488
- return new TypeError('Expected "string" but received "' + typeof obj_validationType + '" (at "' + path_validationType + '")');
489
- }
490
- })();
491
- if (obj_validationType_union0_error != null) {
492
- obj_validationType_union0 = obj_validationType_union0_error.message;
493
- }
494
- let obj_validationType_union1 = null;
495
- const obj_validationType_union1_error = (() => {
496
- if (obj_validationType !== null) {
497
- return new TypeError('Expected "null" but received "' + typeof obj_validationType + '" (at "' + path_validationType + '")');
498
- }
499
- })();
500
- if (obj_validationType_union1_error != null) {
501
- obj_validationType_union1 = obj_validationType_union1_error.message;
502
- }
503
- if (obj_validationType_union0 && obj_validationType_union1) {
504
- let message = 'Object doesn\'t match union (at "' + path_validationType + '")';
505
- message += '\n' + obj_validationType_union0.split('\n').map((line) => '\t' + line).join('\n');
506
- message += '\n' + obj_validationType_union1.split('\n').map((line) => '\t' + line).join('\n');
507
- return new TypeError(message);
508
- }
509
- })();
510
- return v_error === undefined ? null : v_error;
511
- }
512
- const select$2 = function FlowOperatorRuleRepresentationSelect() {
513
- const { selections: FlowOperatorRepresentation__selections, opaque: FlowOperatorRepresentation__opaque, } = select$4();
514
- const { selections: FlowOperatorParameterRepresentation__selections, opaque: FlowOperatorParameterRepresentation__opaque, } = select$3();
515
- return {
516
- kind: 'Fragment',
517
- version: VERSION$1,
518
- private: [],
519
- selections: [
520
- {
521
- name: 'assignmentOperator',
522
- kind: 'Object',
523
- selections: FlowOperatorRepresentation__selections
524
- },
525
- {
526
- name: 'comparisonOperator',
527
- kind: 'Object',
528
- selections: FlowOperatorRepresentation__selections
529
- },
530
- {
531
- name: 'excludeElems',
532
- kind: 'Scalar',
533
- plural: true
534
- },
535
- {
536
- name: 'includeElems',
537
- kind: 'Scalar',
538
- plural: true
539
- },
540
- {
541
- name: 'left',
542
- kind: 'Object',
543
- selections: FlowOperatorParameterRepresentation__selections
544
- },
545
- {
546
- name: 'rhsParams',
547
- kind: 'Object',
548
- plural: true,
549
- selections: FlowOperatorParameterRepresentation__selections
550
- },
551
- {
552
- name: 'ruleType',
553
- kind: 'Scalar'
554
- },
555
- {
556
- name: 'validationType',
557
- kind: 'Scalar'
558
- }
559
- ]
560
- };
561
- };
562
- function equals$1(existing, incoming) {
563
- const existing_ruleType = existing.ruleType;
564
- const incoming_ruleType = incoming.ruleType;
565
- if (!(existing_ruleType === incoming_ruleType)) {
566
- return false;
567
- }
568
- const existing_assignmentOperator = existing.assignmentOperator;
569
- const incoming_assignmentOperator = incoming.assignmentOperator;
570
- if (!(equals$3(existing_assignmentOperator, incoming_assignmentOperator))) {
571
- return false;
572
- }
573
- const existing_comparisonOperator = existing.comparisonOperator;
574
- const incoming_comparisonOperator = incoming.comparisonOperator;
575
- if (!(equals$3(existing_comparisonOperator, incoming_comparisonOperator))) {
576
- return false;
577
- }
578
- const existing_excludeElems = existing.excludeElems;
579
- const incoming_excludeElems = incoming.excludeElems;
580
- const equals_excludeElems_items = equalsArray(existing_excludeElems, incoming_excludeElems, (existing_excludeElems_item, incoming_excludeElems_item) => {
581
- if (!(existing_excludeElems_item === incoming_excludeElems_item)) {
582
- return false;
583
- }
584
- });
585
- if (equals_excludeElems_items === false) {
586
- return false;
587
- }
588
- const existing_includeElems = existing.includeElems;
589
- const incoming_includeElems = incoming.includeElems;
590
- const equals_includeElems_items = equalsArray(existing_includeElems, incoming_includeElems, (existing_includeElems_item, incoming_includeElems_item) => {
591
- if (!(existing_includeElems_item === incoming_includeElems_item)) {
592
- return false;
593
- }
594
- });
595
- if (equals_includeElems_items === false) {
596
- return false;
597
- }
598
- const existing_left = existing.left;
599
- const incoming_left = incoming.left;
600
- if (!(equals$2(existing_left, incoming_left))) {
601
- return false;
602
- }
603
- const existing_rhsParams = existing.rhsParams;
604
- const incoming_rhsParams = incoming.rhsParams;
605
- const equals_rhsParams_items = equalsArray(existing_rhsParams, incoming_rhsParams, (existing_rhsParams_item, incoming_rhsParams_item) => {
606
- if (!(equals$2(existing_rhsParams_item, incoming_rhsParams_item))) {
607
- return false;
608
- }
609
- });
610
- if (equals_rhsParams_items === false) {
611
- return false;
612
- }
613
- const existing_validationType = existing.validationType;
614
- const incoming_validationType = incoming.validationType;
615
- if (!(existing_validationType === incoming_validationType)) {
616
- return false;
617
- }
618
- return true;
409
+ const VERSION$1 = "db9c200fd0583df1c75001ba9a103995";
410
+ function validate$1(obj, path = 'FlowOperatorRuleRepresentation') {
411
+ const v_error = (() => {
412
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
413
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
414
+ }
415
+ const obj_assignmentOperator = obj.assignmentOperator;
416
+ const path_assignmentOperator = path + '.assignmentOperator';
417
+ const referencepath_assignmentOperatorValidationError = validate$3(obj_assignmentOperator, path_assignmentOperator);
418
+ if (referencepath_assignmentOperatorValidationError !== null) {
419
+ let message = 'Object doesn\'t match FlowOperatorRepresentation (at "' + path_assignmentOperator + '")\n';
420
+ message += referencepath_assignmentOperatorValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
421
+ return new TypeError(message);
422
+ }
423
+ const obj_comparisonOperator = obj.comparisonOperator;
424
+ const path_comparisonOperator = path + '.comparisonOperator';
425
+ const referencepath_comparisonOperatorValidationError = validate$3(obj_comparisonOperator, path_comparisonOperator);
426
+ if (referencepath_comparisonOperatorValidationError !== null) {
427
+ let message = 'Object doesn\'t match FlowOperatorRepresentation (at "' + path_comparisonOperator + '")\n';
428
+ message += referencepath_comparisonOperatorValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
429
+ return new TypeError(message);
430
+ }
431
+ const obj_excludeElems = obj.excludeElems;
432
+ const path_excludeElems = path + '.excludeElems';
433
+ if (!ArrayIsArray(obj_excludeElems)) {
434
+ return new TypeError('Expected "array" but received "' + typeof obj_excludeElems + '" (at "' + path_excludeElems + '")');
435
+ }
436
+ for (let i = 0; i < obj_excludeElems.length; i++) {
437
+ const obj_excludeElems_item = obj_excludeElems[i];
438
+ const path_excludeElems_item = path_excludeElems + '[' + i + ']';
439
+ if (typeof obj_excludeElems_item !== 'string') {
440
+ return new TypeError('Expected "string" but received "' + typeof obj_excludeElems_item + '" (at "' + path_excludeElems_item + '")');
441
+ }
442
+ }
443
+ const obj_includeElems = obj.includeElems;
444
+ const path_includeElems = path + '.includeElems';
445
+ if (!ArrayIsArray(obj_includeElems)) {
446
+ return new TypeError('Expected "array" but received "' + typeof obj_includeElems + '" (at "' + path_includeElems + '")');
447
+ }
448
+ for (let i = 0; i < obj_includeElems.length; i++) {
449
+ const obj_includeElems_item = obj_includeElems[i];
450
+ const path_includeElems_item = path_includeElems + '[' + i + ']';
451
+ if (typeof obj_includeElems_item !== 'string') {
452
+ return new TypeError('Expected "string" but received "' + typeof obj_includeElems_item + '" (at "' + path_includeElems_item + '")');
453
+ }
454
+ }
455
+ const obj_left = obj.left;
456
+ const path_left = path + '.left';
457
+ const referencepath_leftValidationError = validate$2(obj_left, path_left);
458
+ if (referencepath_leftValidationError !== null) {
459
+ let message = 'Object doesn\'t match FlowOperatorParameterRepresentation (at "' + path_left + '")\n';
460
+ message += referencepath_leftValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
461
+ return new TypeError(message);
462
+ }
463
+ const obj_rhsParams = obj.rhsParams;
464
+ const path_rhsParams = path + '.rhsParams';
465
+ if (!ArrayIsArray(obj_rhsParams)) {
466
+ return new TypeError('Expected "array" but received "' + typeof obj_rhsParams + '" (at "' + path_rhsParams + '")');
467
+ }
468
+ for (let i = 0; i < obj_rhsParams.length; i++) {
469
+ const obj_rhsParams_item = obj_rhsParams[i];
470
+ const path_rhsParams_item = path_rhsParams + '[' + i + ']';
471
+ const referencepath_rhsParams_itemValidationError = validate$2(obj_rhsParams_item, path_rhsParams_item);
472
+ if (referencepath_rhsParams_itemValidationError !== null) {
473
+ let message = 'Object doesn\'t match FlowOperatorParameterRepresentation (at "' + path_rhsParams_item + '")\n';
474
+ message += referencepath_rhsParams_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
475
+ return new TypeError(message);
476
+ }
477
+ }
478
+ const obj_ruleType = obj.ruleType;
479
+ const path_ruleType = path + '.ruleType';
480
+ if (typeof obj_ruleType !== 'string') {
481
+ return new TypeError('Expected "string" but received "' + typeof obj_ruleType + '" (at "' + path_ruleType + '")');
482
+ }
483
+ const obj_validationType = obj.validationType;
484
+ const path_validationType = path + '.validationType';
485
+ let obj_validationType_union0 = null;
486
+ const obj_validationType_union0_error = (() => {
487
+ if (typeof obj_validationType !== 'string') {
488
+ return new TypeError('Expected "string" but received "' + typeof obj_validationType + '" (at "' + path_validationType + '")');
489
+ }
490
+ })();
491
+ if (obj_validationType_union0_error != null) {
492
+ obj_validationType_union0 = obj_validationType_union0_error.message;
493
+ }
494
+ let obj_validationType_union1 = null;
495
+ const obj_validationType_union1_error = (() => {
496
+ if (obj_validationType !== null) {
497
+ return new TypeError('Expected "null" but received "' + typeof obj_validationType + '" (at "' + path_validationType + '")');
498
+ }
499
+ })();
500
+ if (obj_validationType_union1_error != null) {
501
+ obj_validationType_union1 = obj_validationType_union1_error.message;
502
+ }
503
+ if (obj_validationType_union0 && obj_validationType_union1) {
504
+ let message = 'Object doesn\'t match union (at "' + path_validationType + '")';
505
+ message += '\n' + obj_validationType_union0.split('\n').map((line) => '\t' + line).join('\n');
506
+ message += '\n' + obj_validationType_union1.split('\n').map((line) => '\t' + line).join('\n');
507
+ return new TypeError(message);
508
+ }
509
+ })();
510
+ return v_error === undefined ? null : v_error;
511
+ }
512
+ const select$2 = function FlowOperatorRuleRepresentationSelect() {
513
+ const { selections: FlowOperatorRepresentation__selections, opaque: FlowOperatorRepresentation__opaque, } = select$4();
514
+ const { selections: FlowOperatorParameterRepresentation__selections, opaque: FlowOperatorParameterRepresentation__opaque, } = select$3();
515
+ return {
516
+ kind: 'Fragment',
517
+ version: VERSION$1,
518
+ private: [],
519
+ selections: [
520
+ {
521
+ name: 'assignmentOperator',
522
+ kind: 'Object',
523
+ selections: FlowOperatorRepresentation__selections
524
+ },
525
+ {
526
+ name: 'comparisonOperator',
527
+ kind: 'Object',
528
+ selections: FlowOperatorRepresentation__selections
529
+ },
530
+ {
531
+ name: 'excludeElems',
532
+ kind: 'Scalar',
533
+ plural: true
534
+ },
535
+ {
536
+ name: 'includeElems',
537
+ kind: 'Scalar',
538
+ plural: true
539
+ },
540
+ {
541
+ name: 'left',
542
+ kind: 'Object',
543
+ selections: FlowOperatorParameterRepresentation__selections
544
+ },
545
+ {
546
+ name: 'rhsParams',
547
+ kind: 'Object',
548
+ plural: true,
549
+ selections: FlowOperatorParameterRepresentation__selections
550
+ },
551
+ {
552
+ name: 'ruleType',
553
+ kind: 'Scalar'
554
+ },
555
+ {
556
+ name: 'validationType',
557
+ kind: 'Scalar'
558
+ }
559
+ ]
560
+ };
561
+ };
562
+ function equals$1(existing, incoming) {
563
+ const existing_ruleType = existing.ruleType;
564
+ const incoming_ruleType = incoming.ruleType;
565
+ if (!(existing_ruleType === incoming_ruleType)) {
566
+ return false;
567
+ }
568
+ const existing_assignmentOperator = existing.assignmentOperator;
569
+ const incoming_assignmentOperator = incoming.assignmentOperator;
570
+ if (!(equals$3(existing_assignmentOperator, incoming_assignmentOperator))) {
571
+ return false;
572
+ }
573
+ const existing_comparisonOperator = existing.comparisonOperator;
574
+ const incoming_comparisonOperator = incoming.comparisonOperator;
575
+ if (!(equals$3(existing_comparisonOperator, incoming_comparisonOperator))) {
576
+ return false;
577
+ }
578
+ const existing_excludeElems = existing.excludeElems;
579
+ const incoming_excludeElems = incoming.excludeElems;
580
+ const equals_excludeElems_items = equalsArray(existing_excludeElems, incoming_excludeElems, (existing_excludeElems_item, incoming_excludeElems_item) => {
581
+ if (!(existing_excludeElems_item === incoming_excludeElems_item)) {
582
+ return false;
583
+ }
584
+ });
585
+ if (equals_excludeElems_items === false) {
586
+ return false;
587
+ }
588
+ const existing_includeElems = existing.includeElems;
589
+ const incoming_includeElems = incoming.includeElems;
590
+ const equals_includeElems_items = equalsArray(existing_includeElems, incoming_includeElems, (existing_includeElems_item, incoming_includeElems_item) => {
591
+ if (!(existing_includeElems_item === incoming_includeElems_item)) {
592
+ return false;
593
+ }
594
+ });
595
+ if (equals_includeElems_items === false) {
596
+ return false;
597
+ }
598
+ const existing_left = existing.left;
599
+ const incoming_left = incoming.left;
600
+ if (!(equals$2(existing_left, incoming_left))) {
601
+ return false;
602
+ }
603
+ const existing_rhsParams = existing.rhsParams;
604
+ const incoming_rhsParams = incoming.rhsParams;
605
+ const equals_rhsParams_items = equalsArray(existing_rhsParams, incoming_rhsParams, (existing_rhsParams_item, incoming_rhsParams_item) => {
606
+ if (!(equals$2(existing_rhsParams_item, incoming_rhsParams_item))) {
607
+ return false;
608
+ }
609
+ });
610
+ if (equals_rhsParams_items === false) {
611
+ return false;
612
+ }
613
+ const existing_validationType = existing.validationType;
614
+ const incoming_validationType = incoming.validationType;
615
+ if (!(existing_validationType === incoming_validationType)) {
616
+ return false;
617
+ }
618
+ return true;
619
619
  }
620
620
 
621
- const VERSION = "7b00537edb93014057d98c364ea0fc84";
622
- function validate(obj, path = 'FlowOperatorRuleCollectionRepresentation') {
623
- const v_error = (() => {
624
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
625
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
626
- }
627
- const obj_rules = obj.rules;
628
- const path_rules = path + '.rules';
629
- if (!ArrayIsArray(obj_rules)) {
630
- return new TypeError('Expected "array" but received "' + typeof obj_rules + '" (at "' + path_rules + '")');
631
- }
632
- for (let i = 0; i < obj_rules.length; i++) {
633
- const obj_rules_item = obj_rules[i];
634
- const path_rules_item = path_rules + '[' + i + ']';
635
- const referencepath_rules_itemValidationError = validate$1(obj_rules_item, path_rules_item);
636
- if (referencepath_rules_itemValidationError !== null) {
637
- let message = 'Object doesn\'t match FlowOperatorRuleRepresentation (at "' + path_rules_item + '")\n';
638
- message += referencepath_rules_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
639
- return new TypeError(message);
640
- }
641
- }
642
- })();
643
- return v_error === undefined ? null : v_error;
644
- }
645
- const RepresentationType = 'FlowOperatorRuleCollectionRepresentation';
646
- function normalize(input, existing, path, luvio, store, timestamp) {
647
- return input;
648
- }
649
- const select$1 = function FlowOperatorRuleCollectionRepresentationSelect() {
650
- const { selections: FlowOperatorRuleRepresentation__selections, opaque: FlowOperatorRuleRepresentation__opaque, } = select$2();
651
- return {
652
- kind: 'Fragment',
653
- version: VERSION,
654
- private: [],
655
- selections: [
656
- {
657
- name: 'rules',
658
- kind: 'Object',
659
- plural: true,
660
- selections: FlowOperatorRuleRepresentation__selections
661
- }
662
- ]
663
- };
664
- };
665
- function equals(existing, incoming) {
666
- const existing_rules = existing.rules;
667
- const incoming_rules = incoming.rules;
668
- const equals_rules_items = equalsArray(existing_rules, incoming_rules, (existing_rules_item, incoming_rules_item) => {
669
- if (!(equals$1(existing_rules_item, incoming_rules_item))) {
670
- return false;
671
- }
672
- });
673
- if (equals_rules_items === false) {
674
- return false;
675
- }
676
- return true;
677
- }
678
- const ingest = function FlowOperatorRuleCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
679
- if (process.env.NODE_ENV !== 'production') {
680
- const validateError = validate(input);
681
- if (validateError !== null) {
682
- throw validateError;
683
- }
684
- }
685
- const key = path.fullPath;
686
- const existingRecord = store.readEntry(key);
687
- const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
688
- let incomingRecord = normalize(input, store.readEntry(key), {
689
- fullPath: key,
690
- parent: path.parent,
691
- propertyName: path.propertyName,
692
- ttl: ttlToUse
693
- });
694
- if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
695
- luvio.storePublish(key, incomingRecord);
696
- }
697
- if (ttlToUse !== undefined) {
698
- const storeMetadataParams = {
699
- ttl: ttlToUse,
700
- namespace: "flow-builder",
701
- version: VERSION,
702
- representationName: RepresentationType,
703
- };
704
- luvio.publishStoreMetadata(key, storeMetadataParams);
705
- }
706
- return createLink(key);
707
- };
708
- function getTypeCacheKeys(luvio, input, fullPathFactory) {
709
- const rootKeySet = new StoreKeyMap();
710
- // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
711
- const rootKey = fullPathFactory();
712
- rootKeySet.set(rootKey, {
713
- namespace: keyPrefix,
714
- representationName: RepresentationType,
715
- mergeable: false
716
- });
717
- return rootKeySet;
621
+ const VERSION = "7b00537edb93014057d98c364ea0fc84";
622
+ function validate(obj, path = 'FlowOperatorRuleCollectionRepresentation') {
623
+ const v_error = (() => {
624
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
625
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
626
+ }
627
+ const obj_rules = obj.rules;
628
+ const path_rules = path + '.rules';
629
+ if (!ArrayIsArray(obj_rules)) {
630
+ return new TypeError('Expected "array" but received "' + typeof obj_rules + '" (at "' + path_rules + '")');
631
+ }
632
+ for (let i = 0; i < obj_rules.length; i++) {
633
+ const obj_rules_item = obj_rules[i];
634
+ const path_rules_item = path_rules + '[' + i + ']';
635
+ const referencepath_rules_itemValidationError = validate$1(obj_rules_item, path_rules_item);
636
+ if (referencepath_rules_itemValidationError !== null) {
637
+ let message = 'Object doesn\'t match FlowOperatorRuleRepresentation (at "' + path_rules_item + '")\n';
638
+ message += referencepath_rules_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
639
+ return new TypeError(message);
640
+ }
641
+ }
642
+ })();
643
+ return v_error === undefined ? null : v_error;
644
+ }
645
+ const RepresentationType = 'FlowOperatorRuleCollectionRepresentation';
646
+ function normalize(input, existing, path, luvio, store, timestamp) {
647
+ return input;
648
+ }
649
+ const select$1 = function FlowOperatorRuleCollectionRepresentationSelect() {
650
+ const { selections: FlowOperatorRuleRepresentation__selections, opaque: FlowOperatorRuleRepresentation__opaque, } = select$2();
651
+ return {
652
+ kind: 'Fragment',
653
+ version: VERSION,
654
+ private: [],
655
+ selections: [
656
+ {
657
+ name: 'rules',
658
+ kind: 'Object',
659
+ plural: true,
660
+ selections: FlowOperatorRuleRepresentation__selections
661
+ }
662
+ ]
663
+ };
664
+ };
665
+ function equals(existing, incoming) {
666
+ const existing_rules = existing.rules;
667
+ const incoming_rules = incoming.rules;
668
+ const equals_rules_items = equalsArray(existing_rules, incoming_rules, (existing_rules_item, incoming_rules_item) => {
669
+ if (!(equals$1(existing_rules_item, incoming_rules_item))) {
670
+ return false;
671
+ }
672
+ });
673
+ if (equals_rules_items === false) {
674
+ return false;
675
+ }
676
+ return true;
677
+ }
678
+ const ingest = function FlowOperatorRuleCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
679
+ if (process.env.NODE_ENV !== 'production') {
680
+ const validateError = validate(input);
681
+ if (validateError !== null) {
682
+ throw validateError;
683
+ }
684
+ }
685
+ const key = path.fullPath;
686
+ const existingRecord = store.readEntry(key);
687
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
688
+ let incomingRecord = normalize(input, store.readEntry(key), {
689
+ fullPath: key,
690
+ parent: path.parent,
691
+ propertyName: path.propertyName,
692
+ ttl: ttlToUse
693
+ });
694
+ if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
695
+ luvio.storePublish(key, incomingRecord);
696
+ }
697
+ if (ttlToUse !== undefined) {
698
+ const storeMetadataParams = {
699
+ ttl: ttlToUse,
700
+ namespace: "flow-builder",
701
+ version: VERSION,
702
+ representationName: RepresentationType,
703
+ };
704
+ luvio.publishStoreMetadata(key, storeMetadataParams);
705
+ }
706
+ return createLink(key);
707
+ };
708
+ function getTypeCacheKeys(luvio, input, fullPathFactory) {
709
+ const rootKeySet = new StoreKeyMap();
710
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
711
+ const rootKey = fullPathFactory();
712
+ rootKeySet.set(rootKey, {
713
+ namespace: keyPrefix,
714
+ representationName: RepresentationType,
715
+ mergeable: false
716
+ });
717
+ return rootKeySet;
718
718
  }
719
719
 
720
- function select(luvio, params) {
721
- return select$1();
722
- }
723
- function keyBuilder$1(luvio, params) {
724
- return keyPrefix + '::FlowOperatorRuleCollectionRepresentation:(' + 'flowProcessType:' + params.queryParams.flowProcessType + ',' + 'flowTriggerType:' + params.queryParams.flowTriggerType + ',' + 'recordTriggerType:' + params.queryParams.recordTriggerType + ')';
725
- }
726
- function getResponseCacheKeys(luvio, resourceParams, response) {
727
- return getTypeCacheKeys(luvio, response, () => keyBuilder$1(luvio, resourceParams));
728
- }
729
- function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
730
- const { body } = response;
731
- const key = keyBuilder$1(luvio, resourceParams);
732
- luvio.storeIngest(key, ingest, body);
733
- const snapshot = luvio.storeLookup({
734
- recordId: key,
735
- node: select(),
736
- variables: {},
737
- }, snapshotRefresh);
738
- if (process.env.NODE_ENV !== 'production') {
739
- if (snapshot.state !== 'Fulfilled') {
740
- throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
741
- }
742
- }
743
- return snapshot;
744
- }
745
- function ingestError(luvio, params, error, snapshotRefresh) {
746
- const key = keyBuilder$1(luvio, params);
747
- const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
748
- luvio.storeIngestError(key, errorSnapshot);
749
- return errorSnapshot;
750
- }
751
- function createResourceRequest(config) {
752
- const headers = {};
753
- return {
754
- baseUri: '/services/data/v58.0',
755
- basePath: '/connect/interaction/builder/rules',
756
- method: 'get',
757
- body: null,
758
- urlParams: {},
759
- queryParams: config.queryParams,
760
- headers,
761
- priority: 'normal',
762
- };
720
+ function select(luvio, params) {
721
+ return select$1();
722
+ }
723
+ function keyBuilder$1(luvio, params) {
724
+ return keyPrefix + '::FlowOperatorRuleCollectionRepresentation:(' + 'flowProcessType:' + params.queryParams.flowProcessType + ',' + 'flowTriggerType:' + params.queryParams.flowTriggerType + ',' + 'recordTriggerType:' + params.queryParams.recordTriggerType + ')';
725
+ }
726
+ function getResponseCacheKeys(luvio, resourceParams, response) {
727
+ return getTypeCacheKeys(luvio, response, () => keyBuilder$1(luvio, resourceParams));
728
+ }
729
+ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
730
+ const { body } = response;
731
+ const key = keyBuilder$1(luvio, resourceParams);
732
+ luvio.storeIngest(key, ingest, body);
733
+ const snapshot = luvio.storeLookup({
734
+ recordId: key,
735
+ node: select(),
736
+ variables: {},
737
+ }, snapshotRefresh);
738
+ if (process.env.NODE_ENV !== 'production') {
739
+ if (snapshot.state !== 'Fulfilled') {
740
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
741
+ }
742
+ }
743
+ return snapshot;
744
+ }
745
+ function ingestError(luvio, params, error, snapshotRefresh) {
746
+ const key = keyBuilder$1(luvio, params);
747
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
748
+ luvio.storeIngestError(key, errorSnapshot);
749
+ return errorSnapshot;
750
+ }
751
+ function createResourceRequest(config) {
752
+ const headers = {};
753
+ return {
754
+ baseUri: '/services/data/v58.0',
755
+ basePath: '/connect/interaction/builder/rules',
756
+ method: 'get',
757
+ body: null,
758
+ urlParams: {},
759
+ queryParams: config.queryParams,
760
+ headers,
761
+ priority: 'normal',
762
+ };
763
763
  }
764
764
 
765
- const getRules_ConfigPropertyNames = {
766
- displayName: 'getRules',
767
- parameters: {
768
- required: [],
769
- optional: ['flowProcessType', 'flowTriggerType', 'recordTriggerType']
770
- }
771
- };
772
- function createResourceParams(config) {
773
- const resourceParams = {
774
- queryParams: {
775
- flowProcessType: config.flowProcessType, flowTriggerType: config.flowTriggerType, recordTriggerType: config.recordTriggerType
776
- }
777
- };
778
- return resourceParams;
779
- }
780
- function keyBuilder(luvio, config) {
781
- const resourceParams = createResourceParams(config);
782
- return keyBuilder$1(luvio, resourceParams);
783
- }
784
- function typeCheckConfig(untrustedConfig) {
785
- const config = {};
786
- const untrustedConfig_flowProcessType = untrustedConfig.flowProcessType;
787
- if (typeof untrustedConfig_flowProcessType === 'string') {
788
- config.flowProcessType = untrustedConfig_flowProcessType;
789
- }
790
- const untrustedConfig_flowTriggerType = untrustedConfig.flowTriggerType;
791
- if (typeof untrustedConfig_flowTriggerType === 'string') {
792
- config.flowTriggerType = untrustedConfig_flowTriggerType;
793
- }
794
- const untrustedConfig_recordTriggerType = untrustedConfig.recordTriggerType;
795
- if (typeof untrustedConfig_recordTriggerType === 'string') {
796
- config.recordTriggerType = untrustedConfig_recordTriggerType;
797
- }
798
- return config;
799
- }
800
- function validateAdapterConfig(untrustedConfig, configPropertyNames) {
801
- if (!untrustedIsObject(untrustedConfig)) {
802
- return null;
803
- }
804
- if (process.env.NODE_ENV !== 'production') {
805
- validateConfig(untrustedConfig, configPropertyNames);
806
- }
807
- const config = typeCheckConfig(untrustedConfig);
808
- if (!areRequiredParametersPresent(config, configPropertyNames)) {
809
- return null;
810
- }
811
- return config;
812
- }
813
- function adapterFragment(luvio, config) {
814
- createResourceParams(config);
815
- return select();
816
- }
817
- function onFetchResponseSuccess(luvio, config, resourceParams, response) {
818
- const snapshot = ingestSuccess(luvio, resourceParams, response, {
819
- config,
820
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
821
- });
822
- return luvio.storeBroadcast().then(() => snapshot);
823
- }
824
- function onFetchResponseError(luvio, config, resourceParams, response) {
825
- const snapshot = ingestError(luvio, resourceParams, response, {
826
- config,
827
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
828
- });
829
- return luvio.storeBroadcast().then(() => snapshot);
830
- }
831
- function buildNetworkSnapshot(luvio, config, options) {
832
- const resourceParams = createResourceParams(config);
833
- const request = createResourceRequest(resourceParams);
834
- return luvio.dispatchResourceRequest(request, options)
835
- .then((response) => {
836
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => getResponseCacheKeys(luvio, resourceParams, response.body));
837
- }, (response) => {
838
- return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
839
- });
840
- }
841
- function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
842
- const { luvio, config } = context;
843
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
844
- const dispatchOptions = {
845
- resourceRequestContext: {
846
- requestCorrelator,
847
- luvioRequestMethod: undefined,
848
- },
849
- eventObservers
850
- };
851
- if (networkPriority !== 'normal') {
852
- dispatchOptions.overrides = {
853
- priority: networkPriority
854
- };
855
- }
856
- return buildNetworkSnapshot(luvio, config, dispatchOptions);
857
- }
858
- function buildCachedSnapshotCachePolicy(context, storeLookup) {
859
- const { luvio, config } = context;
860
- const selector = {
861
- recordId: keyBuilder(luvio, config),
862
- node: adapterFragment(luvio, config),
863
- variables: {},
864
- };
865
- const cacheSnapshot = storeLookup(selector, {
866
- config,
867
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
868
- });
869
- return cacheSnapshot;
870
- }
871
- const getRulesAdapterFactory = (luvio) => function flowBuilder__getRules(untrustedConfig, requestContext) {
872
- const config = validateAdapterConfig(untrustedConfig, getRules_ConfigPropertyNames);
873
- // Invalid or incomplete config
874
- if (config === null) {
875
- return null;
876
- }
877
- return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
878
- buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
765
+ const getRules_ConfigPropertyNames = {
766
+ displayName: 'getRules',
767
+ parameters: {
768
+ required: [],
769
+ optional: ['flowProcessType', 'flowTriggerType', 'recordTriggerType']
770
+ }
771
+ };
772
+ function createResourceParams(config) {
773
+ const resourceParams = {
774
+ queryParams: {
775
+ flowProcessType: config.flowProcessType, flowTriggerType: config.flowTriggerType, recordTriggerType: config.recordTriggerType
776
+ }
777
+ };
778
+ return resourceParams;
779
+ }
780
+ function keyBuilder(luvio, config) {
781
+ const resourceParams = createResourceParams(config);
782
+ return keyBuilder$1(luvio, resourceParams);
783
+ }
784
+ function typeCheckConfig(untrustedConfig) {
785
+ const config = {};
786
+ const untrustedConfig_flowProcessType = untrustedConfig.flowProcessType;
787
+ if (typeof untrustedConfig_flowProcessType === 'string') {
788
+ config.flowProcessType = untrustedConfig_flowProcessType;
789
+ }
790
+ const untrustedConfig_flowTriggerType = untrustedConfig.flowTriggerType;
791
+ if (typeof untrustedConfig_flowTriggerType === 'string') {
792
+ config.flowTriggerType = untrustedConfig_flowTriggerType;
793
+ }
794
+ const untrustedConfig_recordTriggerType = untrustedConfig.recordTriggerType;
795
+ if (typeof untrustedConfig_recordTriggerType === 'string') {
796
+ config.recordTriggerType = untrustedConfig_recordTriggerType;
797
+ }
798
+ return config;
799
+ }
800
+ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
801
+ if (!untrustedIsObject(untrustedConfig)) {
802
+ return null;
803
+ }
804
+ if (process.env.NODE_ENV !== 'production') {
805
+ validateConfig(untrustedConfig, configPropertyNames);
806
+ }
807
+ const config = typeCheckConfig(untrustedConfig);
808
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
809
+ return null;
810
+ }
811
+ return config;
812
+ }
813
+ function adapterFragment(luvio, config) {
814
+ createResourceParams(config);
815
+ return select();
816
+ }
817
+ function onFetchResponseSuccess(luvio, config, resourceParams, response) {
818
+ const snapshot = ingestSuccess(luvio, resourceParams, response, {
819
+ config,
820
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
821
+ });
822
+ return luvio.storeBroadcast().then(() => snapshot);
823
+ }
824
+ function onFetchResponseError(luvio, config, resourceParams, response) {
825
+ const snapshot = ingestError(luvio, resourceParams, response, {
826
+ config,
827
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
828
+ });
829
+ return luvio.storeBroadcast().then(() => snapshot);
830
+ }
831
+ function buildNetworkSnapshot(luvio, config, options) {
832
+ const resourceParams = createResourceParams(config);
833
+ const request = createResourceRequest(resourceParams);
834
+ return luvio.dispatchResourceRequest(request, options)
835
+ .then((response) => {
836
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => getResponseCacheKeys(luvio, resourceParams, response.body));
837
+ }, (response) => {
838
+ return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
839
+ });
840
+ }
841
+ function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
842
+ const { luvio, config } = context;
843
+ const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
844
+ const dispatchOptions = {
845
+ resourceRequestContext: {
846
+ requestCorrelator,
847
+ luvioRequestMethod: undefined,
848
+ },
849
+ eventObservers
850
+ };
851
+ if (networkPriority !== 'normal') {
852
+ dispatchOptions.overrides = {
853
+ priority: networkPriority
854
+ };
855
+ }
856
+ return buildNetworkSnapshot(luvio, config, dispatchOptions);
857
+ }
858
+ function buildCachedSnapshotCachePolicy(context, storeLookup) {
859
+ const { luvio, config } = context;
860
+ const selector = {
861
+ recordId: keyBuilder(luvio, config),
862
+ node: adapterFragment(luvio, config),
863
+ variables: {},
864
+ };
865
+ const cacheSnapshot = storeLookup(selector, {
866
+ config,
867
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
868
+ });
869
+ return cacheSnapshot;
870
+ }
871
+ const getRulesAdapterFactory = (luvio) => function flowBuilder__getRules(untrustedConfig, requestContext) {
872
+ const config = validateAdapterConfig(untrustedConfig, getRules_ConfigPropertyNames);
873
+ // Invalid or incomplete config
874
+ if (config === null) {
875
+ return null;
876
+ }
877
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
878
+ buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
879
879
  };
880
880
 
881
881
  export { getRulesAdapterFactory };