@salesforce/lds-adapters-industries-recordaggregation 0.1.0-dev1

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 (68) hide show
  1. package/LICENSE.txt +82 -0
  2. package/dist/es/es2018/industries-recordaggregation.js +3999 -0
  3. package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +62 -0
  4. package/dist/es/es2018/types/src/generated/adapters/deleteRecordAggregationDefinition.d.ts +14 -0
  5. package/dist/es/es2018/types/src/generated/adapters/getBulkRecordRollupDefinitionDetails.d.ts +17 -0
  6. package/dist/es/es2018/types/src/generated/adapters/getRecordAggregationApplicableObjects.d.ts +26 -0
  7. package/dist/es/es2018/types/src/generated/adapters/getRecordAggregationDefinition.d.ts +28 -0
  8. package/dist/es/es2018/types/src/generated/adapters/getRecordAggregationEntityApplicableFields.d.ts +27 -0
  9. package/dist/es/es2018/types/src/generated/adapters/patchRecordAggregationDefinition.d.ts +19 -0
  10. package/dist/es/es2018/types/src/generated/adapters/performBulkRecordRollupSyncExecution.d.ts +16 -0
  11. package/dist/es/es2018/types/src/generated/adapters/postGenerateRecordRollupResult.d.ts +18 -0
  12. package/dist/es/es2018/types/src/generated/adapters/postRecordAggregationCreation.d.ts +18 -0
  13. package/dist/es/es2018/types/src/generated/adapters/putRecordAggregationDefinition.d.ts +20 -0
  14. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +10 -0
  15. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +15 -0
  16. package/dist/es/es2018/types/src/generated/resources/deleteConnectRecordAggregationByRecordAggregationDefinitionId.d.ts +12 -0
  17. package/dist/es/es2018/types/src/generated/resources/getConnectRecordAggregationByRecordAggregationDefinitionId.d.ts +16 -0
  18. package/dist/es/es2018/types/src/generated/resources/getConnectRecordAggregationUtilitiesApplicableObjects.d.ts +12 -0
  19. package/dist/es/es2018/types/src/generated/resources/getConnectRecordAggregationUtilitiesApplicableObjectsApplicableFieldsByObjectName.d.ts +15 -0
  20. package/dist/es/es2018/types/src/generated/resources/patchConnectRecordAggregationByRecordAggregationDefinitionId.d.ts +18 -0
  21. package/dist/es/es2018/types/src/generated/resources/postConnectRecordAggregation.d.ts +15 -0
  22. package/dist/es/es2018/types/src/generated/resources/postConnectRecordAggregationBulkRecordRollupDetails.d.ts +14 -0
  23. package/dist/es/es2018/types/src/generated/resources/postConnectRecordAggregationBulkRecordRollupSyncExecution.d.ts +13 -0
  24. package/dist/es/es2018/types/src/generated/resources/postConnectRecordAggregationRecordRollupResultsByRecordAggregationDefinitionId.d.ts +19 -0
  25. package/dist/es/es2018/types/src/generated/resources/putConnectRecordAggregationByRecordAggregationDefinitionId.d.ts +19 -0
  26. package/dist/es/es2018/types/src/generated/types/BulkRecordRollupDefinitionDetailsInputRepresentation.d.ts +34 -0
  27. package/dist/es/es2018/types/src/generated/types/BulkRecordRollupDefinitionDetailsOutputRepresentation.d.ts +47 -0
  28. package/dist/es/es2018/types/src/generated/types/BulkRecordRollupSyncExecutionInputRepresentation.d.ts +29 -0
  29. package/dist/es/es2018/types/src/generated/types/BulkRecordRollupSyncExecutionOutputRepresentation.d.ts +47 -0
  30. package/dist/es/es2018/types/src/generated/types/RADFieldFilterOutputRepresentation.d.ts +46 -0
  31. package/dist/es/es2018/types/src/generated/types/RADJoinFieldOutputRepresentation.d.ts +31 -0
  32. package/dist/es/es2018/types/src/generated/types/RADNodeFilterOutputRepresentation.d.ts +35 -0
  33. package/dist/es/es2018/types/src/generated/types/RADNodeObjectOutputRepresentation.d.ts +34 -0
  34. package/dist/es/es2018/types/src/generated/types/RADNodeOutputRepresentation.d.ts +43 -0
  35. package/dist/es/es2018/types/src/generated/types/RADOutputRepresentation.d.ts +68 -0
  36. package/dist/es/es2018/types/src/generated/types/RecordAggregationApplicableFieldOutputRepresentation.d.ts +40 -0
  37. package/dist/es/es2018/types/src/generated/types/RecordAggregationApplicableObjectOutputRepresentation.d.ts +31 -0
  38. package/dist/es/es2018/types/src/generated/types/RecordAggregationApplicableObjectsOutputRepresentation.d.ts +35 -0
  39. package/dist/es/es2018/types/src/generated/types/RecordAggregationAssociatedObjectInputRepresentation.d.ts +28 -0
  40. package/dist/es/es2018/types/src/generated/types/RecordAggregationCreationInputRepresentation.d.ts +35 -0
  41. package/dist/es/es2018/types/src/generated/types/RecordAggregationCreationOutputRepresentation.d.ts +43 -0
  42. package/dist/es/es2018/types/src/generated/types/RecordAggregationDefinitionInputRepresentation.d.ts +28 -0
  43. package/dist/es/es2018/types/src/generated/types/RecordAggregationDefinitionPartialUpdateInputRepresentation.d.ts +37 -0
  44. package/dist/es/es2018/types/src/generated/types/RecordAggregationDefinitionPartialUpdateOutputRepresentation.d.ts +40 -0
  45. package/dist/es/es2018/types/src/generated/types/RecordAggregationEntityApplicableFieldsOutputRepresentation.d.ts +42 -0
  46. package/dist/es/es2018/types/src/generated/types/RecordAggregationFilterInputRepresentation.d.ts +32 -0
  47. package/dist/es/es2018/types/src/generated/types/RecordAggregationFilterRowInputRepresentation.d.ts +37 -0
  48. package/dist/es/es2018/types/src/generated/types/RecordAggregationJoinInputRepresentation.d.ts +28 -0
  49. package/dist/es/es2018/types/src/generated/types/RecordAggregationNodeInputRepresentation.d.ts +43 -0
  50. package/dist/es/es2018/types/src/generated/types/RecordAggregationUpdationInputRepresentation.d.ts +38 -0
  51. package/dist/es/es2018/types/src/generated/types/RecordAggregationUpdationOutputRepresentation.d.ts +40 -0
  52. package/dist/es/es2018/types/src/generated/types/RecordRollupDefinitionDetailsErrorOutputRepresentation.d.ts +31 -0
  53. package/dist/es/es2018/types/src/generated/types/RecordRollupDefinitionDetailsOutputRepresentation.d.ts +50 -0
  54. package/dist/es/es2018/types/src/generated/types/RecordRollupDefinitionLastUpdatedDetailsOutputRepresentation.d.ts +34 -0
  55. package/dist/es/es2018/types/src/generated/types/RecordRollupResultColumnOutputRepresentation.d.ts +49 -0
  56. package/dist/es/es2018/types/src/generated/types/RecordRollupResultInputRepresentation.d.ts +31 -0
  57. package/dist/es/es2018/types/src/generated/types/RecordRollupResultLastUpdatedDetailsOutputRepresentation.d.ts +34 -0
  58. package/dist/es/es2018/types/src/generated/types/RecordRollupResultOutputRepresentation.d.ts +57 -0
  59. package/dist/es/es2018/types/src/generated/types/RecordRollupResultRowOutputRepresentation.d.ts +32 -0
  60. package/dist/es/es2018/types/src/generated/types/RecordRollupSyncExecutionErrorOutputRepresentation.d.ts +31 -0
  61. package/dist/es/es2018/types/src/generated/types/RecordRollupSyncExecutionInputRepresentation.d.ts +31 -0
  62. package/dist/es/es2018/types/src/generated/types/RecordRollupSyncExecutionOutputRepresentation.d.ts +34 -0
  63. package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
  64. package/package.json +66 -0
  65. package/sfdc/index.d.ts +1 -0
  66. package/sfdc/index.js +4121 -0
  67. package/src/raml/api.raml +824 -0
  68. package/src/raml/luvio.raml +78 -0
package/sfdc/index.js ADDED
@@ -0,0 +1,4121 @@
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, StoreKeyMap, deepFreeze, createResourceParams as createResourceParams$a, typeCheckConfig as typeCheckConfig$a, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$3 } from 'force/luvioEngine';
18
+
19
+ const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
20
+ const { keys: ObjectKeys$1, create: ObjectCreate$1 } = 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$1(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 = 'IndustriesRecordAggregation';
83
+
84
+ const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
85
+ const { isArray: ArrayIsArray } = Array;
86
+ const { stringify: JSONStringify } = JSON;
87
+ function equalsArray(a, b, equalsItem) {
88
+ const aLength = a.length;
89
+ const bLength = b.length;
90
+ if (aLength !== bLength) {
91
+ return false;
92
+ }
93
+ for (let i = 0; i < aLength; i++) {
94
+ if (equalsItem(a[i], b[i]) === false) {
95
+ return false;
96
+ }
97
+ }
98
+ return true;
99
+ }
100
+ function equalsObject(a, b, equalsProp) {
101
+ const aKeys = ObjectKeys(a).sort();
102
+ const bKeys = ObjectKeys(b).sort();
103
+ const aKeysLength = aKeys.length;
104
+ const bKeysLength = bKeys.length;
105
+ if (aKeysLength !== bKeysLength) {
106
+ return false;
107
+ }
108
+ for (let i = 0; i < aKeys.length; i++) {
109
+ const key = aKeys[i];
110
+ if (key !== bKeys[i]) {
111
+ return false;
112
+ }
113
+ if (equalsProp(a[key], b[key]) === false) {
114
+ return false;
115
+ }
116
+ }
117
+ return true;
118
+ }
119
+ function createLink(ref) {
120
+ return {
121
+ __ref: serializeStructuredKey(ref),
122
+ };
123
+ }
124
+
125
+ const VERSION$n = "194b30263c77f9da7e866abebe5a9939";
126
+ function validate$t(obj, path = 'RADFieldFilterOutputRepresentation') {
127
+ const v_error = (() => {
128
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
129
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
130
+ }
131
+ const obj_fieldApiName = obj.fieldApiName;
132
+ const path_fieldApiName = path + '.fieldApiName';
133
+ if (typeof obj_fieldApiName !== 'string') {
134
+ return new TypeError('Expected "string" but received "' + typeof obj_fieldApiName + '" (at "' + path_fieldApiName + '")');
135
+ }
136
+ const obj_fieldLabel = obj.fieldLabel;
137
+ const path_fieldLabel = path + '.fieldLabel';
138
+ if (typeof obj_fieldLabel !== 'string') {
139
+ return new TypeError('Expected "string" but received "' + typeof obj_fieldLabel + '" (at "' + path_fieldLabel + '")');
140
+ }
141
+ const obj_operator = obj.operator;
142
+ const path_operator = path + '.operator';
143
+ if (typeof obj_operator !== 'string') {
144
+ return new TypeError('Expected "string" but received "' + typeof obj_operator + '" (at "' + path_operator + '")');
145
+ }
146
+ const obj_operatorLabel = obj.operatorLabel;
147
+ const path_operatorLabel = path + '.operatorLabel';
148
+ if (typeof obj_operatorLabel !== 'string') {
149
+ return new TypeError('Expected "string" but received "' + typeof obj_operatorLabel + '" (at "' + path_operatorLabel + '")');
150
+ }
151
+ const obj_recordId = obj.recordId;
152
+ const path_recordId = path + '.recordId';
153
+ if (typeof obj_recordId !== 'string') {
154
+ return new TypeError('Expected "string" but received "' + typeof obj_recordId + '" (at "' + path_recordId + '")');
155
+ }
156
+ const obj_sequence = obj.sequence;
157
+ const path_sequence = path + '.sequence';
158
+ if (typeof obj_sequence !== 'number' || (typeof obj_sequence === 'number' && Math.floor(obj_sequence) !== obj_sequence)) {
159
+ return new TypeError('Expected "integer" but received "' + typeof obj_sequence + '" (at "' + path_sequence + '")');
160
+ }
161
+ const obj_value = obj.value;
162
+ const path_value = path + '.value';
163
+ if (typeof obj_value !== 'string') {
164
+ return new TypeError('Expected "string" but received "' + typeof obj_value + '" (at "' + path_value + '")');
165
+ }
166
+ })();
167
+ return v_error === undefined ? null : v_error;
168
+ }
169
+ const select$w = function RADFieldFilterOutputRepresentationSelect() {
170
+ return {
171
+ kind: 'Fragment',
172
+ version: VERSION$n,
173
+ private: [],
174
+ selections: [
175
+ {
176
+ name: 'fieldApiName',
177
+ kind: 'Scalar'
178
+ },
179
+ {
180
+ name: 'fieldLabel',
181
+ kind: 'Scalar'
182
+ },
183
+ {
184
+ name: 'operator',
185
+ kind: 'Scalar'
186
+ },
187
+ {
188
+ name: 'operatorLabel',
189
+ kind: 'Scalar'
190
+ },
191
+ {
192
+ name: 'recordId',
193
+ kind: 'Scalar'
194
+ },
195
+ {
196
+ name: 'sequence',
197
+ kind: 'Scalar'
198
+ },
199
+ {
200
+ name: 'value',
201
+ kind: 'Scalar'
202
+ }
203
+ ]
204
+ };
205
+ };
206
+ function equals$n(existing, incoming) {
207
+ const existing_sequence = existing.sequence;
208
+ const incoming_sequence = incoming.sequence;
209
+ if (!(existing_sequence === incoming_sequence)) {
210
+ return false;
211
+ }
212
+ const existing_fieldApiName = existing.fieldApiName;
213
+ const incoming_fieldApiName = incoming.fieldApiName;
214
+ if (!(existing_fieldApiName === incoming_fieldApiName)) {
215
+ return false;
216
+ }
217
+ const existing_fieldLabel = existing.fieldLabel;
218
+ const incoming_fieldLabel = incoming.fieldLabel;
219
+ if (!(existing_fieldLabel === incoming_fieldLabel)) {
220
+ return false;
221
+ }
222
+ const existing_operator = existing.operator;
223
+ const incoming_operator = incoming.operator;
224
+ if (!(existing_operator === incoming_operator)) {
225
+ return false;
226
+ }
227
+ const existing_operatorLabel = existing.operatorLabel;
228
+ const incoming_operatorLabel = incoming.operatorLabel;
229
+ if (!(existing_operatorLabel === incoming_operatorLabel)) {
230
+ return false;
231
+ }
232
+ const existing_recordId = existing.recordId;
233
+ const incoming_recordId = incoming.recordId;
234
+ if (!(existing_recordId === incoming_recordId)) {
235
+ return false;
236
+ }
237
+ const existing_value = existing.value;
238
+ const incoming_value = incoming.value;
239
+ if (!(existing_value === incoming_value)) {
240
+ return false;
241
+ }
242
+ return true;
243
+ }
244
+
245
+ const VERSION$m = "291b8d0ca0b1000c0cfd0428ed183892";
246
+ function validate$s(obj, path = 'RADNodeFilterOutputRepresentation') {
247
+ const v_error = (() => {
248
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
249
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
250
+ }
251
+ if (obj.filterConditions !== undefined) {
252
+ const obj_filterConditions = obj.filterConditions;
253
+ const path_filterConditions = path + '.filterConditions';
254
+ if (!ArrayIsArray(obj_filterConditions)) {
255
+ return new TypeError('Expected "array" but received "' + typeof obj_filterConditions + '" (at "' + path_filterConditions + '")');
256
+ }
257
+ for (let i = 0; i < obj_filterConditions.length; i++) {
258
+ const obj_filterConditions_item = obj_filterConditions[i];
259
+ const path_filterConditions_item = path_filterConditions + '[' + i + ']';
260
+ const referencepath_filterConditions_itemValidationError = validate$t(obj_filterConditions_item, path_filterConditions_item);
261
+ if (referencepath_filterConditions_itemValidationError !== null) {
262
+ let message = 'Object doesn\'t match RADFieldFilterOutputRepresentation (at "' + path_filterConditions_item + '")\n';
263
+ message += referencepath_filterConditions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
264
+ return new TypeError(message);
265
+ }
266
+ }
267
+ }
268
+ if (obj.filterCriteria !== undefined) {
269
+ const obj_filterCriteria = obj.filterCriteria;
270
+ const path_filterCriteria = path + '.filterCriteria';
271
+ if (typeof obj_filterCriteria !== 'string') {
272
+ return new TypeError('Expected "string" but received "' + typeof obj_filterCriteria + '" (at "' + path_filterCriteria + '")');
273
+ }
274
+ }
275
+ if (obj.filterCriteriaDescription !== undefined) {
276
+ const obj_filterCriteriaDescription = obj.filterCriteriaDescription;
277
+ const path_filterCriteriaDescription = path + '.filterCriteriaDescription';
278
+ if (typeof obj_filterCriteriaDescription !== 'string') {
279
+ return new TypeError('Expected "string" but received "' + typeof obj_filterCriteriaDescription + '" (at "' + path_filterCriteriaDescription + '")');
280
+ }
281
+ }
282
+ })();
283
+ return v_error === undefined ? null : v_error;
284
+ }
285
+ const select$v = function RADNodeFilterOutputRepresentationSelect() {
286
+ const { selections: RADFieldFilterOutputRepresentation__selections, opaque: RADFieldFilterOutputRepresentation__opaque, } = select$w();
287
+ return {
288
+ kind: 'Fragment',
289
+ version: VERSION$m,
290
+ private: [],
291
+ selections: [
292
+ {
293
+ name: 'filterConditions',
294
+ kind: 'Object',
295
+ plural: true,
296
+ selections: RADFieldFilterOutputRepresentation__selections,
297
+ required: false
298
+ },
299
+ {
300
+ name: 'filterCriteria',
301
+ kind: 'Scalar',
302
+ required: false
303
+ },
304
+ {
305
+ name: 'filterCriteriaDescription',
306
+ kind: 'Scalar',
307
+ required: false
308
+ }
309
+ ]
310
+ };
311
+ };
312
+ function equals$m(existing, incoming) {
313
+ const existing_filterCriteria = existing.filterCriteria;
314
+ const incoming_filterCriteria = incoming.filterCriteria;
315
+ // if at least one of these optionals is defined
316
+ if (existing_filterCriteria !== undefined || incoming_filterCriteria !== undefined) {
317
+ // if one of these is not defined we know the other is defined and therefore
318
+ // not equal
319
+ if (existing_filterCriteria === undefined || incoming_filterCriteria === undefined) {
320
+ return false;
321
+ }
322
+ if (!(existing_filterCriteria === incoming_filterCriteria)) {
323
+ return false;
324
+ }
325
+ }
326
+ const existing_filterCriteriaDescription = existing.filterCriteriaDescription;
327
+ const incoming_filterCriteriaDescription = incoming.filterCriteriaDescription;
328
+ // if at least one of these optionals is defined
329
+ if (existing_filterCriteriaDescription !== undefined || incoming_filterCriteriaDescription !== undefined) {
330
+ // if one of these is not defined we know the other is defined and therefore
331
+ // not equal
332
+ if (existing_filterCriteriaDescription === undefined || incoming_filterCriteriaDescription === undefined) {
333
+ return false;
334
+ }
335
+ if (!(existing_filterCriteriaDescription === incoming_filterCriteriaDescription)) {
336
+ return false;
337
+ }
338
+ }
339
+ const existing_filterConditions = existing.filterConditions;
340
+ const incoming_filterConditions = incoming.filterConditions;
341
+ // if at least one of these optionals is defined
342
+ if (existing_filterConditions !== undefined || incoming_filterConditions !== undefined) {
343
+ // if one of these is not defined we know the other is defined and therefore
344
+ // not equal
345
+ if (existing_filterConditions === undefined || incoming_filterConditions === undefined) {
346
+ return false;
347
+ }
348
+ const equals_filterConditions_items = equalsArray(existing_filterConditions, incoming_filterConditions, (existing_filterConditions_item, incoming_filterConditions_item) => {
349
+ if (!(equals$n(existing_filterConditions_item, incoming_filterConditions_item))) {
350
+ return false;
351
+ }
352
+ });
353
+ if (equals_filterConditions_items === false) {
354
+ return false;
355
+ }
356
+ }
357
+ return true;
358
+ }
359
+
360
+ const VERSION$l = "f2c00d9b691171207e7e5e9027b5f138";
361
+ function validate$r(obj, path = 'RADJoinFieldOutputRepresentation') {
362
+ const v_error = (() => {
363
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
364
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
365
+ }
366
+ const obj_fieldApiName = obj.fieldApiName;
367
+ const path_fieldApiName = path + '.fieldApiName';
368
+ if (typeof obj_fieldApiName !== 'string') {
369
+ return new TypeError('Expected "string" but received "' + typeof obj_fieldApiName + '" (at "' + path_fieldApiName + '")');
370
+ }
371
+ const obj_fieldLabel = obj.fieldLabel;
372
+ const path_fieldLabel = path + '.fieldLabel';
373
+ if (typeof obj_fieldLabel !== 'string') {
374
+ return new TypeError('Expected "string" but received "' + typeof obj_fieldLabel + '" (at "' + path_fieldLabel + '")');
375
+ }
376
+ })();
377
+ return v_error === undefined ? null : v_error;
378
+ }
379
+ const select$u = function RADJoinFieldOutputRepresentationSelect() {
380
+ return {
381
+ kind: 'Fragment',
382
+ version: VERSION$l,
383
+ private: [],
384
+ selections: [
385
+ {
386
+ name: 'fieldApiName',
387
+ kind: 'Scalar'
388
+ },
389
+ {
390
+ name: 'fieldLabel',
391
+ kind: 'Scalar'
392
+ }
393
+ ]
394
+ };
395
+ };
396
+ function equals$l(existing, incoming) {
397
+ const existing_fieldApiName = existing.fieldApiName;
398
+ const incoming_fieldApiName = incoming.fieldApiName;
399
+ if (!(existing_fieldApiName === incoming_fieldApiName)) {
400
+ return false;
401
+ }
402
+ const existing_fieldLabel = existing.fieldLabel;
403
+ const incoming_fieldLabel = incoming.fieldLabel;
404
+ if (!(existing_fieldLabel === incoming_fieldLabel)) {
405
+ return false;
406
+ }
407
+ return true;
408
+ }
409
+
410
+ const VERSION$k = "fd3686fb156e2a098696af8b545b9105";
411
+ function validate$q(obj, path = 'RADNodeObjectOutputRepresentation') {
412
+ const v_error = (() => {
413
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
414
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
415
+ }
416
+ const obj_apiName = obj.apiName;
417
+ const path_apiName = path + '.apiName';
418
+ if (typeof obj_apiName !== 'string') {
419
+ return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
420
+ }
421
+ const obj_label = obj.label;
422
+ const path_label = path + '.label';
423
+ if (typeof obj_label !== 'string') {
424
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
425
+ }
426
+ const obj_objectId = obj.objectId;
427
+ const path_objectId = path + '.objectId';
428
+ if (typeof obj_objectId !== 'string') {
429
+ return new TypeError('Expected "string" but received "' + typeof obj_objectId + '" (at "' + path_objectId + '")');
430
+ }
431
+ })();
432
+ return v_error === undefined ? null : v_error;
433
+ }
434
+ const select$t = function RADNodeObjectOutputRepresentationSelect() {
435
+ return {
436
+ kind: 'Fragment',
437
+ version: VERSION$k,
438
+ private: [],
439
+ selections: [
440
+ {
441
+ name: 'apiName',
442
+ kind: 'Scalar'
443
+ },
444
+ {
445
+ name: 'label',
446
+ kind: 'Scalar'
447
+ },
448
+ {
449
+ name: 'objectId',
450
+ kind: 'Scalar'
451
+ }
452
+ ]
453
+ };
454
+ };
455
+ function equals$k(existing, incoming) {
456
+ const existing_apiName = existing.apiName;
457
+ const incoming_apiName = incoming.apiName;
458
+ if (!(existing_apiName === incoming_apiName)) {
459
+ return false;
460
+ }
461
+ const existing_label = existing.label;
462
+ const incoming_label = incoming.label;
463
+ if (!(existing_label === incoming_label)) {
464
+ return false;
465
+ }
466
+ const existing_objectId = existing.objectId;
467
+ const incoming_objectId = incoming.objectId;
468
+ if (!(existing_objectId === incoming_objectId)) {
469
+ return false;
470
+ }
471
+ return true;
472
+ }
473
+
474
+ const VERSION$j = "39e3ae51001702727f0adea383e9abb3";
475
+ function validate$p(obj, path = 'RADNodeOutputRepresentation') {
476
+ const v_error = (() => {
477
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
478
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
479
+ }
480
+ if (obj.filterDetails !== undefined) {
481
+ const obj_filterDetails = obj.filterDetails;
482
+ const path_filterDetails = path + '.filterDetails';
483
+ const referencepath_filterDetailsValidationError = validate$s(obj_filterDetails, path_filterDetails);
484
+ if (referencepath_filterDetailsValidationError !== null) {
485
+ let message = 'Object doesn\'t match RADNodeFilterOutputRepresentation (at "' + path_filterDetails + '")\n';
486
+ message += referencepath_filterDetailsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
487
+ return new TypeError(message);
488
+ }
489
+ }
490
+ if (obj.nextObjectJoinDetails !== undefined) {
491
+ const obj_nextObjectJoinDetails = obj.nextObjectJoinDetails;
492
+ const path_nextObjectJoinDetails = path + '.nextObjectJoinDetails';
493
+ const referencepath_nextObjectJoinDetailsValidationError = validate$r(obj_nextObjectJoinDetails, path_nextObjectJoinDetails);
494
+ if (referencepath_nextObjectJoinDetailsValidationError !== null) {
495
+ let message = 'Object doesn\'t match RADJoinFieldOutputRepresentation (at "' + path_nextObjectJoinDetails + '")\n';
496
+ message += referencepath_nextObjectJoinDetailsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
497
+ return new TypeError(message);
498
+ }
499
+ }
500
+ const obj_objectDetails = obj.objectDetails;
501
+ const path_objectDetails = path + '.objectDetails';
502
+ const referencepath_objectDetailsValidationError = validate$q(obj_objectDetails, path_objectDetails);
503
+ if (referencepath_objectDetailsValidationError !== null) {
504
+ let message = 'Object doesn\'t match RADNodeObjectOutputRepresentation (at "' + path_objectDetails + '")\n';
505
+ message += referencepath_objectDetailsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
506
+ return new TypeError(message);
507
+ }
508
+ if (obj.previousObjectJoinDetails !== undefined) {
509
+ const obj_previousObjectJoinDetails = obj.previousObjectJoinDetails;
510
+ const path_previousObjectJoinDetails = path + '.previousObjectJoinDetails';
511
+ const referencepath_previousObjectJoinDetailsValidationError = validate$r(obj_previousObjectJoinDetails, path_previousObjectJoinDetails);
512
+ if (referencepath_previousObjectJoinDetailsValidationError !== null) {
513
+ let message = 'Object doesn\'t match RADJoinFieldOutputRepresentation (at "' + path_previousObjectJoinDetails + '")\n';
514
+ message += referencepath_previousObjectJoinDetailsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
515
+ return new TypeError(message);
516
+ }
517
+ }
518
+ const obj_sequence = obj.sequence;
519
+ const path_sequence = path + '.sequence';
520
+ if (typeof obj_sequence !== 'number' || (typeof obj_sequence === 'number' && Math.floor(obj_sequence) !== obj_sequence)) {
521
+ return new TypeError('Expected "integer" but received "' + typeof obj_sequence + '" (at "' + path_sequence + '")');
522
+ }
523
+ })();
524
+ return v_error === undefined ? null : v_error;
525
+ }
526
+ const select$s = function RADNodeOutputRepresentationSelect() {
527
+ const { selections: RADNodeFilterOutputRepresentation__selections, opaque: RADNodeFilterOutputRepresentation__opaque, } = select$v();
528
+ const { selections: RADJoinFieldOutputRepresentation__selections, opaque: RADJoinFieldOutputRepresentation__opaque, } = select$u();
529
+ const { selections: RADNodeObjectOutputRepresentation__selections, opaque: RADNodeObjectOutputRepresentation__opaque, } = select$t();
530
+ return {
531
+ kind: 'Fragment',
532
+ version: VERSION$j,
533
+ private: [],
534
+ selections: [
535
+ {
536
+ name: 'filterDetails',
537
+ kind: 'Object',
538
+ selections: RADNodeFilterOutputRepresentation__selections,
539
+ required: false
540
+ },
541
+ {
542
+ name: 'nextObjectJoinDetails',
543
+ kind: 'Object',
544
+ selections: RADJoinFieldOutputRepresentation__selections,
545
+ required: false
546
+ },
547
+ {
548
+ name: 'objectDetails',
549
+ kind: 'Object',
550
+ selections: RADNodeObjectOutputRepresentation__selections
551
+ },
552
+ {
553
+ name: 'previousObjectJoinDetails',
554
+ kind: 'Object',
555
+ selections: RADJoinFieldOutputRepresentation__selections,
556
+ required: false
557
+ },
558
+ {
559
+ name: 'sequence',
560
+ kind: 'Scalar'
561
+ }
562
+ ]
563
+ };
564
+ };
565
+ function equals$j(existing, incoming) {
566
+ const existing_sequence = existing.sequence;
567
+ const incoming_sequence = incoming.sequence;
568
+ if (!(existing_sequence === incoming_sequence)) {
569
+ return false;
570
+ }
571
+ const existing_filterDetails = existing.filterDetails;
572
+ const incoming_filterDetails = incoming.filterDetails;
573
+ // if at least one of these optionals is defined
574
+ if (existing_filterDetails !== undefined || incoming_filterDetails !== undefined) {
575
+ // if one of these is not defined we know the other is defined and therefore
576
+ // not equal
577
+ if (existing_filterDetails === undefined || incoming_filterDetails === undefined) {
578
+ return false;
579
+ }
580
+ if (!(equals$m(existing_filterDetails, incoming_filterDetails))) {
581
+ return false;
582
+ }
583
+ }
584
+ const existing_nextObjectJoinDetails = existing.nextObjectJoinDetails;
585
+ const incoming_nextObjectJoinDetails = incoming.nextObjectJoinDetails;
586
+ // if at least one of these optionals is defined
587
+ if (existing_nextObjectJoinDetails !== undefined || incoming_nextObjectJoinDetails !== undefined) {
588
+ // if one of these is not defined we know the other is defined and therefore
589
+ // not equal
590
+ if (existing_nextObjectJoinDetails === undefined || incoming_nextObjectJoinDetails === undefined) {
591
+ return false;
592
+ }
593
+ if (!(equals$l(existing_nextObjectJoinDetails, incoming_nextObjectJoinDetails))) {
594
+ return false;
595
+ }
596
+ }
597
+ const existing_objectDetails = existing.objectDetails;
598
+ const incoming_objectDetails = incoming.objectDetails;
599
+ if (!(equals$k(existing_objectDetails, incoming_objectDetails))) {
600
+ return false;
601
+ }
602
+ const existing_previousObjectJoinDetails = existing.previousObjectJoinDetails;
603
+ const incoming_previousObjectJoinDetails = incoming.previousObjectJoinDetails;
604
+ // if at least one of these optionals is defined
605
+ if (existing_previousObjectJoinDetails !== undefined || incoming_previousObjectJoinDetails !== undefined) {
606
+ // if one of these is not defined we know the other is defined and therefore
607
+ // not equal
608
+ if (existing_previousObjectJoinDetails === undefined || incoming_previousObjectJoinDetails === undefined) {
609
+ return false;
610
+ }
611
+ if (!(equals$l(existing_previousObjectJoinDetails, incoming_previousObjectJoinDetails))) {
612
+ return false;
613
+ }
614
+ }
615
+ return true;
616
+ }
617
+
618
+ const VERSION$i = "aa9791ca803cc6d19ac8c9e4120f5aae";
619
+ function validate$o(obj, path = 'RADOutputRepresentation') {
620
+ const v_error = (() => {
621
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
622
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
623
+ }
624
+ const obj_aggregationObjects = obj.aggregationObjects;
625
+ const path_aggregationObjects = path + '.aggregationObjects';
626
+ if (!ArrayIsArray(obj_aggregationObjects)) {
627
+ return new TypeError('Expected "array" but received "' + typeof obj_aggregationObjects + '" (at "' + path_aggregationObjects + '")');
628
+ }
629
+ for (let i = 0; i < obj_aggregationObjects.length; i++) {
630
+ const obj_aggregationObjects_item = obj_aggregationObjects[i];
631
+ const path_aggregationObjects_item = path_aggregationObjects + '[' + i + ']';
632
+ const referencepath_aggregationObjects_itemValidationError = validate$p(obj_aggregationObjects_item, path_aggregationObjects_item);
633
+ if (referencepath_aggregationObjects_itemValidationError !== null) {
634
+ let message = 'Object doesn\'t match RADNodeOutputRepresentation (at "' + path_aggregationObjects_item + '")\n';
635
+ message += referencepath_aggregationObjects_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
636
+ return new TypeError(message);
637
+ }
638
+ }
639
+ const obj_canDeleteDefinition = obj.canDeleteDefinition;
640
+ const path_canDeleteDefinition = path + '.canDeleteDefinition';
641
+ if (typeof obj_canDeleteDefinition !== 'boolean') {
642
+ return new TypeError('Expected "boolean" but received "' + typeof obj_canDeleteDefinition + '" (at "' + path_canDeleteDefinition + '")');
643
+ }
644
+ const obj_canEditDefinition = obj.canEditDefinition;
645
+ const path_canEditDefinition = path + '.canEditDefinition';
646
+ if (typeof obj_canEditDefinition !== 'boolean') {
647
+ return new TypeError('Expected "boolean" but received "' + typeof obj_canEditDefinition + '" (at "' + path_canEditDefinition + '")');
648
+ }
649
+ if (obj.canManageOnDemand !== undefined) {
650
+ const obj_canManageOnDemand = obj.canManageOnDemand;
651
+ const path_canManageOnDemand = path + '.canManageOnDemand';
652
+ if (typeof obj_canManageOnDemand !== 'boolean') {
653
+ return new TypeError('Expected "boolean" but received "' + typeof obj_canManageOnDemand + '" (at "' + path_canManageOnDemand + '")');
654
+ }
655
+ }
656
+ if (obj.description !== undefined) {
657
+ const obj_description = obj.description;
658
+ const path_description = path + '.description';
659
+ if (typeof obj_description !== 'string') {
660
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
661
+ }
662
+ }
663
+ const obj_displayName = obj.displayName;
664
+ const path_displayName = path + '.displayName';
665
+ if (typeof obj_displayName !== 'string') {
666
+ return new TypeError('Expected "string" but received "' + typeof obj_displayName + '" (at "' + path_displayName + '")');
667
+ }
668
+ if (obj.isOnDemandEnabled !== undefined) {
669
+ const obj_isOnDemandEnabled = obj.isOnDemandEnabled;
670
+ const path_isOnDemandEnabled = path + '.isOnDemandEnabled';
671
+ if (typeof obj_isOnDemandEnabled !== 'boolean') {
672
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isOnDemandEnabled + '" (at "' + path_isOnDemandEnabled + '")');
673
+ }
674
+ }
675
+ const obj_message = obj.message;
676
+ const path_message = path + '.message';
677
+ if (typeof obj_message !== 'string') {
678
+ return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
679
+ }
680
+ const obj_recordAggregationDefinitionId = obj.recordAggregationDefinitionId;
681
+ const path_recordAggregationDefinitionId = path + '.recordAggregationDefinitionId';
682
+ if (typeof obj_recordAggregationDefinitionId !== 'string') {
683
+ return new TypeError('Expected "string" but received "' + typeof obj_recordAggregationDefinitionId + '" (at "' + path_recordAggregationDefinitionId + '")');
684
+ }
685
+ const obj_status = obj.status;
686
+ const path_status = path + '.status';
687
+ if (typeof obj_status !== 'string') {
688
+ return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
689
+ }
690
+ const obj_statusCode = obj.statusCode;
691
+ const path_statusCode = path + '.statusCode';
692
+ if (typeof obj_statusCode !== 'string') {
693
+ return new TypeError('Expected "string" but received "' + typeof obj_statusCode + '" (at "' + path_statusCode + '")');
694
+ }
695
+ })();
696
+ return v_error === undefined ? null : v_error;
697
+ }
698
+ const RepresentationType$8 = 'RADOutputRepresentation';
699
+ function keyBuilder$d(luvio, config) {
700
+ return keyPrefix + '::' + RepresentationType$8 + ':' + config.id;
701
+ }
702
+ function keyBuilderFromType$6(luvio, object) {
703
+ const keyParams = {
704
+ id: object.recordAggregationDefinitionId
705
+ };
706
+ return keyBuilder$d(luvio, keyParams);
707
+ }
708
+ function normalize$8(input, existing, path, luvio, store, timestamp) {
709
+ return input;
710
+ }
711
+ const select$r = function RADOutputRepresentationSelect() {
712
+ const { selections: RADNodeOutputRepresentation__selections, opaque: RADNodeOutputRepresentation__opaque, } = select$s();
713
+ return {
714
+ kind: 'Fragment',
715
+ version: VERSION$i,
716
+ private: [],
717
+ selections: [
718
+ {
719
+ name: 'aggregationObjects',
720
+ kind: 'Object',
721
+ plural: true,
722
+ selections: RADNodeOutputRepresentation__selections
723
+ },
724
+ {
725
+ name: 'canDeleteDefinition',
726
+ kind: 'Scalar'
727
+ },
728
+ {
729
+ name: 'canEditDefinition',
730
+ kind: 'Scalar'
731
+ },
732
+ {
733
+ name: 'canManageOnDemand',
734
+ kind: 'Scalar',
735
+ required: false
736
+ },
737
+ {
738
+ name: 'description',
739
+ kind: 'Scalar',
740
+ required: false
741
+ },
742
+ {
743
+ name: 'displayName',
744
+ kind: 'Scalar'
745
+ },
746
+ {
747
+ name: 'isOnDemandEnabled',
748
+ kind: 'Scalar',
749
+ required: false
750
+ },
751
+ {
752
+ name: 'message',
753
+ kind: 'Scalar'
754
+ },
755
+ {
756
+ name: 'recordAggregationDefinitionId',
757
+ kind: 'Scalar'
758
+ },
759
+ {
760
+ name: 'status',
761
+ kind: 'Scalar'
762
+ },
763
+ {
764
+ name: 'statusCode',
765
+ kind: 'Scalar'
766
+ }
767
+ ]
768
+ };
769
+ };
770
+ function equals$i(existing, incoming) {
771
+ const existing_canDeleteDefinition = existing.canDeleteDefinition;
772
+ const incoming_canDeleteDefinition = incoming.canDeleteDefinition;
773
+ if (!(existing_canDeleteDefinition === incoming_canDeleteDefinition)) {
774
+ return false;
775
+ }
776
+ const existing_canEditDefinition = existing.canEditDefinition;
777
+ const incoming_canEditDefinition = incoming.canEditDefinition;
778
+ if (!(existing_canEditDefinition === incoming_canEditDefinition)) {
779
+ return false;
780
+ }
781
+ const existing_canManageOnDemand = existing.canManageOnDemand;
782
+ const incoming_canManageOnDemand = incoming.canManageOnDemand;
783
+ // if at least one of these optionals is defined
784
+ if (existing_canManageOnDemand !== undefined || incoming_canManageOnDemand !== undefined) {
785
+ // if one of these is not defined we know the other is defined and therefore
786
+ // not equal
787
+ if (existing_canManageOnDemand === undefined || incoming_canManageOnDemand === undefined) {
788
+ return false;
789
+ }
790
+ if (!(existing_canManageOnDemand === incoming_canManageOnDemand)) {
791
+ return false;
792
+ }
793
+ }
794
+ const existing_isOnDemandEnabled = existing.isOnDemandEnabled;
795
+ const incoming_isOnDemandEnabled = incoming.isOnDemandEnabled;
796
+ // if at least one of these optionals is defined
797
+ if (existing_isOnDemandEnabled !== undefined || incoming_isOnDemandEnabled !== undefined) {
798
+ // if one of these is not defined we know the other is defined and therefore
799
+ // not equal
800
+ if (existing_isOnDemandEnabled === undefined || incoming_isOnDemandEnabled === undefined) {
801
+ return false;
802
+ }
803
+ if (!(existing_isOnDemandEnabled === incoming_isOnDemandEnabled)) {
804
+ return false;
805
+ }
806
+ }
807
+ const existing_description = existing.description;
808
+ const incoming_description = incoming.description;
809
+ // if at least one of these optionals is defined
810
+ if (existing_description !== undefined || incoming_description !== undefined) {
811
+ // if one of these is not defined we know the other is defined and therefore
812
+ // not equal
813
+ if (existing_description === undefined || incoming_description === undefined) {
814
+ return false;
815
+ }
816
+ if (!(existing_description === incoming_description)) {
817
+ return false;
818
+ }
819
+ }
820
+ const existing_displayName = existing.displayName;
821
+ const incoming_displayName = incoming.displayName;
822
+ if (!(existing_displayName === incoming_displayName)) {
823
+ return false;
824
+ }
825
+ const existing_message = existing.message;
826
+ const incoming_message = incoming.message;
827
+ if (!(existing_message === incoming_message)) {
828
+ return false;
829
+ }
830
+ const existing_recordAggregationDefinitionId = existing.recordAggregationDefinitionId;
831
+ const incoming_recordAggregationDefinitionId = incoming.recordAggregationDefinitionId;
832
+ if (!(existing_recordAggregationDefinitionId === incoming_recordAggregationDefinitionId)) {
833
+ return false;
834
+ }
835
+ const existing_status = existing.status;
836
+ const incoming_status = incoming.status;
837
+ if (!(existing_status === incoming_status)) {
838
+ return false;
839
+ }
840
+ const existing_statusCode = existing.statusCode;
841
+ const incoming_statusCode = incoming.statusCode;
842
+ if (!(existing_statusCode === incoming_statusCode)) {
843
+ return false;
844
+ }
845
+ const existing_aggregationObjects = existing.aggregationObjects;
846
+ const incoming_aggregationObjects = incoming.aggregationObjects;
847
+ const equals_aggregationObjects_items = equalsArray(existing_aggregationObjects, incoming_aggregationObjects, (existing_aggregationObjects_item, incoming_aggregationObjects_item) => {
848
+ if (!(equals$j(existing_aggregationObjects_item, incoming_aggregationObjects_item))) {
849
+ return false;
850
+ }
851
+ });
852
+ if (equals_aggregationObjects_items === false) {
853
+ return false;
854
+ }
855
+ return true;
856
+ }
857
+ const ingest$8 = function RADOutputRepresentationIngest(input, path, luvio, store, timestamp) {
858
+ if (process.env.NODE_ENV !== 'production') {
859
+ const validateError = validate$o(input);
860
+ if (validateError !== null) {
861
+ throw validateError;
862
+ }
863
+ }
864
+ const key = keyBuilderFromType$6(luvio, input);
865
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 100;
866
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$8, "IndustriesRecordAggregation", VERSION$i, RepresentationType$8, equals$i);
867
+ return createLink(key);
868
+ };
869
+ function getTypeCacheKeys$8(rootKeySet, luvio, input, fullPathFactory) {
870
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
871
+ const rootKey = keyBuilderFromType$6(luvio, input);
872
+ rootKeySet.set(rootKey, {
873
+ namespace: keyPrefix,
874
+ representationName: RepresentationType$8,
875
+ mergeable: false
876
+ });
877
+ }
878
+
879
+ function keyBuilder$c(luvio, params) {
880
+ return keyBuilder$d(luvio, {
881
+ id: params.urlParams.recordAggregationDefinitionId
882
+ });
883
+ }
884
+ function getResponseCacheKeys$9(cacheKeyMap, luvio, resourceParams) {
885
+ const key = keyBuilder$c(luvio, resourceParams);
886
+ cacheKeyMap.set(key, {
887
+ namespace: keyPrefix,
888
+ representationName: RepresentationType$8,
889
+ mergeable: false
890
+ });
891
+ }
892
+ function evictSuccess(luvio, resourceParams) {
893
+ const key = keyBuilder$c(luvio, resourceParams);
894
+ luvio.storeEvict(key);
895
+ }
896
+ function createResourceRequest$9(config) {
897
+ const headers = {};
898
+ return {
899
+ baseUri: '/services/data/v66.0',
900
+ basePath: '/connect/record-aggregation/' + config.urlParams.recordAggregationDefinitionId + '',
901
+ method: 'delete',
902
+ body: null,
903
+ urlParams: config.urlParams,
904
+ queryParams: {},
905
+ headers,
906
+ priority: 'normal',
907
+ };
908
+ }
909
+
910
+ const adapterName$9 = 'deleteRecordAggregationDefinition';
911
+ const deleteRecordAggregationDefinition_ConfigPropertyMetadata = [
912
+ generateParamConfigMetadata('recordAggregationDefinitionId', true, 0 /* UrlParameter */, 0 /* String */),
913
+ ];
914
+ const deleteRecordAggregationDefinition_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, deleteRecordAggregationDefinition_ConfigPropertyMetadata);
915
+ const createResourceParams$9 = /*#__PURE__*/ createResourceParams$a(deleteRecordAggregationDefinition_ConfigPropertyMetadata);
916
+ function typeCheckConfig$9(untrustedConfig) {
917
+ const config = {};
918
+ typeCheckConfig$a(untrustedConfig, config, deleteRecordAggregationDefinition_ConfigPropertyMetadata);
919
+ return config;
920
+ }
921
+ function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
922
+ if (!untrustedIsObject(untrustedConfig)) {
923
+ return null;
924
+ }
925
+ if (process.env.NODE_ENV !== 'production') {
926
+ validateConfig(untrustedConfig, configPropertyNames);
927
+ }
928
+ const config = typeCheckConfig$9(untrustedConfig);
929
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
930
+ return null;
931
+ }
932
+ return config;
933
+ }
934
+ function buildNetworkSnapshot$9(luvio, config, options) {
935
+ const resourceParams = createResourceParams$9(config);
936
+ const request = createResourceRequest$9(resourceParams);
937
+ return luvio.dispatchResourceRequest(request, options)
938
+ .then(() => {
939
+ return luvio.handleSuccessResponse(() => {
940
+ evictSuccess(luvio, resourceParams);
941
+ return luvio.storeBroadcast();
942
+ }, () => {
943
+ const cache = new StoreKeyMap();
944
+ getResponseCacheKeys$9(cache, luvio, resourceParams);
945
+ return cache;
946
+ });
947
+ }, (response) => {
948
+ deepFreeze(response);
949
+ throw response;
950
+ });
951
+ }
952
+ const deleteRecordAggregationDefinitionAdapterFactory = (luvio) => {
953
+ return function IndustriesRecordAggregationdeleteRecordAggregationDefinition(untrustedConfig) {
954
+ const config = validateAdapterConfig$9(untrustedConfig, deleteRecordAggregationDefinition_ConfigPropertyNames);
955
+ // Invalid or incomplete config
956
+ if (config === null) {
957
+ throw new Error(`Invalid config for "${adapterName$9}"`);
958
+ }
959
+ return buildNetworkSnapshot$9(luvio, config);
960
+ };
961
+ };
962
+
963
+ const VERSION$h = "c129efabba808636007b868dc6c3d067";
964
+ function validate$n(obj, path = 'RecordRollupDefinitionDetailsErrorOutputRepresentation') {
965
+ const v_error = (() => {
966
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
967
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
968
+ }
969
+ const obj_message = obj.message;
970
+ const path_message = path + '.message';
971
+ if (typeof obj_message !== 'string') {
972
+ return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
973
+ }
974
+ const obj_type = obj.type;
975
+ const path_type = path + '.type';
976
+ if (typeof obj_type !== 'string') {
977
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
978
+ }
979
+ })();
980
+ return v_error === undefined ? null : v_error;
981
+ }
982
+ const select$q = function RecordRollupDefinitionDetailsErrorOutputRepresentationSelect() {
983
+ return {
984
+ kind: 'Fragment',
985
+ version: VERSION$h,
986
+ private: [],
987
+ selections: [
988
+ {
989
+ name: 'message',
990
+ kind: 'Scalar'
991
+ },
992
+ {
993
+ name: 'type',
994
+ kind: 'Scalar'
995
+ }
996
+ ]
997
+ };
998
+ };
999
+ function equals$h(existing, incoming) {
1000
+ const existing_message = existing.message;
1001
+ const incoming_message = incoming.message;
1002
+ if (!(existing_message === incoming_message)) {
1003
+ return false;
1004
+ }
1005
+ const existing_type = existing.type;
1006
+ const incoming_type = incoming.type;
1007
+ if (!(existing_type === incoming_type)) {
1008
+ return false;
1009
+ }
1010
+ return true;
1011
+ }
1012
+
1013
+ const VERSION$g = "ec7444b32b8111566bf44c407dfcb42e";
1014
+ function validate$m(obj, path = 'RecordRollupDefinitionLastUpdatedDetailsOutputRepresentation') {
1015
+ const v_error = (() => {
1016
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1017
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1018
+ }
1019
+ if (obj.epochTime !== undefined) {
1020
+ obj.epochTime;
1021
+ }
1022
+ if (obj.errorType !== undefined) {
1023
+ const obj_errorType = obj.errorType;
1024
+ const path_errorType = path + '.errorType';
1025
+ if (typeof obj_errorType !== 'string') {
1026
+ return new TypeError('Expected "string" but received "' + typeof obj_errorType + '" (at "' + path_errorType + '")');
1027
+ }
1028
+ }
1029
+ if (obj.processingMode !== undefined) {
1030
+ const obj_processingMode = obj.processingMode;
1031
+ const path_processingMode = path + '.processingMode';
1032
+ if (typeof obj_processingMode !== 'string') {
1033
+ return new TypeError('Expected "string" but received "' + typeof obj_processingMode + '" (at "' + path_processingMode + '")');
1034
+ }
1035
+ }
1036
+ })();
1037
+ return v_error === undefined ? null : v_error;
1038
+ }
1039
+ const select$p = function RecordRollupDefinitionLastUpdatedDetailsOutputRepresentationSelect() {
1040
+ return {
1041
+ kind: 'Fragment',
1042
+ version: VERSION$g,
1043
+ private: [],
1044
+ selections: [
1045
+ {
1046
+ name: 'epochTime',
1047
+ kind: 'Scalar',
1048
+ required: false
1049
+ },
1050
+ {
1051
+ name: 'errorType',
1052
+ kind: 'Scalar',
1053
+ required: false
1054
+ },
1055
+ {
1056
+ name: 'processingMode',
1057
+ kind: 'Scalar',
1058
+ required: false
1059
+ }
1060
+ ]
1061
+ };
1062
+ };
1063
+ function equals$g(existing, incoming) {
1064
+ const existing_errorType = existing.errorType;
1065
+ const incoming_errorType = incoming.errorType;
1066
+ // if at least one of these optionals is defined
1067
+ if (existing_errorType !== undefined || incoming_errorType !== undefined) {
1068
+ // if one of these is not defined we know the other is defined and therefore
1069
+ // not equal
1070
+ if (existing_errorType === undefined || incoming_errorType === undefined) {
1071
+ return false;
1072
+ }
1073
+ if (!(existing_errorType === incoming_errorType)) {
1074
+ return false;
1075
+ }
1076
+ }
1077
+ const existing_processingMode = existing.processingMode;
1078
+ const incoming_processingMode = incoming.processingMode;
1079
+ // if at least one of these optionals is defined
1080
+ if (existing_processingMode !== undefined || incoming_processingMode !== undefined) {
1081
+ // if one of these is not defined we know the other is defined and therefore
1082
+ // not equal
1083
+ if (existing_processingMode === undefined || incoming_processingMode === undefined) {
1084
+ return false;
1085
+ }
1086
+ if (!(existing_processingMode === incoming_processingMode)) {
1087
+ return false;
1088
+ }
1089
+ }
1090
+ const existing_epochTime = existing.epochTime;
1091
+ const incoming_epochTime = incoming.epochTime;
1092
+ // if at least one of these optionals is defined
1093
+ if (existing_epochTime !== undefined || incoming_epochTime !== undefined) {
1094
+ // if one of these is not defined we know the other is defined and therefore
1095
+ // not equal
1096
+ if (existing_epochTime === undefined || incoming_epochTime === undefined) {
1097
+ return false;
1098
+ }
1099
+ if (!(existing_epochTime === incoming_epochTime)) {
1100
+ return false;
1101
+ }
1102
+ }
1103
+ return true;
1104
+ }
1105
+
1106
+ const VERSION$f = "666b88fed89f114d1586d78611a31d3e";
1107
+ function validate$l(obj, path = 'RecordRollupDefinitionDetailsOutputRepresentation') {
1108
+ const v_error = (() => {
1109
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1110
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1111
+ }
1112
+ if (obj.developerName !== undefined) {
1113
+ const obj_developerName = obj.developerName;
1114
+ const path_developerName = path + '.developerName';
1115
+ if (typeof obj_developerName !== 'string') {
1116
+ return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
1117
+ }
1118
+ }
1119
+ if (obj.error !== undefined) {
1120
+ const obj_error = obj.error;
1121
+ const path_error = path + '.error';
1122
+ const referencepath_errorValidationError = validate$n(obj_error, path_error);
1123
+ if (referencepath_errorValidationError !== null) {
1124
+ let message = 'Object doesn\'t match RecordRollupDefinitionDetailsErrorOutputRepresentation (at "' + path_error + '")\n';
1125
+ message += referencepath_errorValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1126
+ return new TypeError(message);
1127
+ }
1128
+ }
1129
+ if (obj.id !== undefined) {
1130
+ const obj_id = obj.id;
1131
+ const path_id = path + '.id';
1132
+ if (typeof obj_id !== 'string') {
1133
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
1134
+ }
1135
+ }
1136
+ if (obj.isOnDemandEnabled !== undefined) {
1137
+ const obj_isOnDemandEnabled = obj.isOnDemandEnabled;
1138
+ const path_isOnDemandEnabled = path + '.isOnDemandEnabled';
1139
+ if (typeof obj_isOnDemandEnabled !== 'boolean') {
1140
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isOnDemandEnabled + '" (at "' + path_isOnDemandEnabled + '")');
1141
+ }
1142
+ }
1143
+ if (obj.lastUpdatedDetails !== undefined) {
1144
+ const obj_lastUpdatedDetails = obj.lastUpdatedDetails;
1145
+ const path_lastUpdatedDetails = path + '.lastUpdatedDetails';
1146
+ const referencepath_lastUpdatedDetailsValidationError = validate$m(obj_lastUpdatedDetails, path_lastUpdatedDetails);
1147
+ if (referencepath_lastUpdatedDetailsValidationError !== null) {
1148
+ let message = 'Object doesn\'t match RecordRollupDefinitionLastUpdatedDetailsOutputRepresentation (at "' + path_lastUpdatedDetails + '")\n';
1149
+ message += referencepath_lastUpdatedDetailsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1150
+ return new TypeError(message);
1151
+ }
1152
+ }
1153
+ if (obj.name !== undefined) {
1154
+ const obj_name = obj.name;
1155
+ const path_name = path + '.name';
1156
+ if (typeof obj_name !== 'string') {
1157
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
1158
+ }
1159
+ }
1160
+ if (obj.resolvedAnchorId !== undefined) {
1161
+ const obj_resolvedAnchorId = obj.resolvedAnchorId;
1162
+ const path_resolvedAnchorId = path + '.resolvedAnchorId';
1163
+ if (typeof obj_resolvedAnchorId !== 'string') {
1164
+ return new TypeError('Expected "string" but received "' + typeof obj_resolvedAnchorId + '" (at "' + path_resolvedAnchorId + '")');
1165
+ }
1166
+ }
1167
+ const obj_status = obj.status;
1168
+ const path_status = path + '.status';
1169
+ if (typeof obj_status !== 'string') {
1170
+ return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
1171
+ }
1172
+ })();
1173
+ return v_error === undefined ? null : v_error;
1174
+ }
1175
+ const select$o = function RecordRollupDefinitionDetailsOutputRepresentationSelect() {
1176
+ const { selections: RecordRollupDefinitionDetailsErrorOutputRepresentation__selections, opaque: RecordRollupDefinitionDetailsErrorOutputRepresentation__opaque, } = select$q();
1177
+ const { selections: RecordRollupDefinitionLastUpdatedDetailsOutputRepresentation__selections, opaque: RecordRollupDefinitionLastUpdatedDetailsOutputRepresentation__opaque, } = select$p();
1178
+ return {
1179
+ kind: 'Fragment',
1180
+ version: VERSION$f,
1181
+ private: [],
1182
+ selections: [
1183
+ {
1184
+ name: 'developerName',
1185
+ kind: 'Scalar',
1186
+ required: false
1187
+ },
1188
+ {
1189
+ name: 'error',
1190
+ kind: 'Object',
1191
+ selections: RecordRollupDefinitionDetailsErrorOutputRepresentation__selections,
1192
+ required: false
1193
+ },
1194
+ {
1195
+ name: 'id',
1196
+ kind: 'Scalar',
1197
+ required: false
1198
+ },
1199
+ {
1200
+ name: 'isOnDemandEnabled',
1201
+ kind: 'Scalar',
1202
+ required: false
1203
+ },
1204
+ {
1205
+ name: 'lastUpdatedDetails',
1206
+ kind: 'Object',
1207
+ selections: RecordRollupDefinitionLastUpdatedDetailsOutputRepresentation__selections,
1208
+ required: false
1209
+ },
1210
+ {
1211
+ name: 'name',
1212
+ kind: 'Scalar',
1213
+ required: false
1214
+ },
1215
+ {
1216
+ name: 'resolvedAnchorId',
1217
+ kind: 'Scalar',
1218
+ required: false
1219
+ },
1220
+ {
1221
+ name: 'status',
1222
+ kind: 'Scalar'
1223
+ }
1224
+ ]
1225
+ };
1226
+ };
1227
+ function equals$f(existing, incoming) {
1228
+ const existing_isOnDemandEnabled = existing.isOnDemandEnabled;
1229
+ const incoming_isOnDemandEnabled = incoming.isOnDemandEnabled;
1230
+ // if at least one of these optionals is defined
1231
+ if (existing_isOnDemandEnabled !== undefined || incoming_isOnDemandEnabled !== undefined) {
1232
+ // if one of these is not defined we know the other is defined and therefore
1233
+ // not equal
1234
+ if (existing_isOnDemandEnabled === undefined || incoming_isOnDemandEnabled === undefined) {
1235
+ return false;
1236
+ }
1237
+ if (!(existing_isOnDemandEnabled === incoming_isOnDemandEnabled)) {
1238
+ return false;
1239
+ }
1240
+ }
1241
+ const existing_developerName = existing.developerName;
1242
+ const incoming_developerName = incoming.developerName;
1243
+ // if at least one of these optionals is defined
1244
+ if (existing_developerName !== undefined || incoming_developerName !== undefined) {
1245
+ // if one of these is not defined we know the other is defined and therefore
1246
+ // not equal
1247
+ if (existing_developerName === undefined || incoming_developerName === undefined) {
1248
+ return false;
1249
+ }
1250
+ if (!(existing_developerName === incoming_developerName)) {
1251
+ return false;
1252
+ }
1253
+ }
1254
+ const existing_id = existing.id;
1255
+ const incoming_id = incoming.id;
1256
+ // if at least one of these optionals is defined
1257
+ if (existing_id !== undefined || incoming_id !== undefined) {
1258
+ // if one of these is not defined we know the other is defined and therefore
1259
+ // not equal
1260
+ if (existing_id === undefined || incoming_id === undefined) {
1261
+ return false;
1262
+ }
1263
+ if (!(existing_id === incoming_id)) {
1264
+ return false;
1265
+ }
1266
+ }
1267
+ const existing_name = existing.name;
1268
+ const incoming_name = incoming.name;
1269
+ // if at least one of these optionals is defined
1270
+ if (existing_name !== undefined || incoming_name !== undefined) {
1271
+ // if one of these is not defined we know the other is defined and therefore
1272
+ // not equal
1273
+ if (existing_name === undefined || incoming_name === undefined) {
1274
+ return false;
1275
+ }
1276
+ if (!(existing_name === incoming_name)) {
1277
+ return false;
1278
+ }
1279
+ }
1280
+ const existing_resolvedAnchorId = existing.resolvedAnchorId;
1281
+ const incoming_resolvedAnchorId = incoming.resolvedAnchorId;
1282
+ // if at least one of these optionals is defined
1283
+ if (existing_resolvedAnchorId !== undefined || incoming_resolvedAnchorId !== undefined) {
1284
+ // if one of these is not defined we know the other is defined and therefore
1285
+ // not equal
1286
+ if (existing_resolvedAnchorId === undefined || incoming_resolvedAnchorId === undefined) {
1287
+ return false;
1288
+ }
1289
+ if (!(existing_resolvedAnchorId === incoming_resolvedAnchorId)) {
1290
+ return false;
1291
+ }
1292
+ }
1293
+ const existing_status = existing.status;
1294
+ const incoming_status = incoming.status;
1295
+ if (!(existing_status === incoming_status)) {
1296
+ return false;
1297
+ }
1298
+ const existing_error = existing.error;
1299
+ const incoming_error = incoming.error;
1300
+ // if at least one of these optionals is defined
1301
+ if (existing_error !== undefined || incoming_error !== undefined) {
1302
+ // if one of these is not defined we know the other is defined and therefore
1303
+ // not equal
1304
+ if (existing_error === undefined || incoming_error === undefined) {
1305
+ return false;
1306
+ }
1307
+ if (!(equals$h(existing_error, incoming_error))) {
1308
+ return false;
1309
+ }
1310
+ }
1311
+ const existing_lastUpdatedDetails = existing.lastUpdatedDetails;
1312
+ const incoming_lastUpdatedDetails = incoming.lastUpdatedDetails;
1313
+ // if at least one of these optionals is defined
1314
+ if (existing_lastUpdatedDetails !== undefined || incoming_lastUpdatedDetails !== undefined) {
1315
+ // if one of these is not defined we know the other is defined and therefore
1316
+ // not equal
1317
+ if (existing_lastUpdatedDetails === undefined || incoming_lastUpdatedDetails === undefined) {
1318
+ return false;
1319
+ }
1320
+ if (!(equals$g(existing_lastUpdatedDetails, incoming_lastUpdatedDetails))) {
1321
+ return false;
1322
+ }
1323
+ }
1324
+ return true;
1325
+ }
1326
+
1327
+ const VERSION$e = "c2f199cbe0212e8411f7ac1905805188";
1328
+ function validate$k(obj, path = 'BulkRecordRollupDefinitionDetailsOutputRepresentation') {
1329
+ const v_error = (() => {
1330
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1331
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1332
+ }
1333
+ const obj_definitions = obj.definitions;
1334
+ const path_definitions = path + '.definitions';
1335
+ if (!ArrayIsArray(obj_definitions)) {
1336
+ return new TypeError('Expected "array" but received "' + typeof obj_definitions + '" (at "' + path_definitions + '")');
1337
+ }
1338
+ for (let i = 0; i < obj_definitions.length; i++) {
1339
+ const obj_definitions_item = obj_definitions[i];
1340
+ const path_definitions_item = path_definitions + '[' + i + ']';
1341
+ const referencepath_definitions_itemValidationError = validate$l(obj_definitions_item, path_definitions_item);
1342
+ if (referencepath_definitions_itemValidationError !== null) {
1343
+ let message = 'Object doesn\'t match RecordRollupDefinitionDetailsOutputRepresentation (at "' + path_definitions_item + '")\n';
1344
+ message += referencepath_definitions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1345
+ return new TypeError(message);
1346
+ }
1347
+ }
1348
+ const obj_errors = obj.errors;
1349
+ const path_errors = path + '.errors';
1350
+ if (typeof obj_errors !== 'boolean') {
1351
+ return new TypeError('Expected "boolean" but received "' + typeof obj_errors + '" (at "' + path_errors + '")');
1352
+ }
1353
+ const obj_message = obj.message;
1354
+ const path_message = path + '.message';
1355
+ if (typeof obj_message !== 'string') {
1356
+ return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
1357
+ }
1358
+ const obj_statusCode = obj.statusCode;
1359
+ const path_statusCode = path + '.statusCode';
1360
+ if (typeof obj_statusCode !== 'string') {
1361
+ return new TypeError('Expected "string" but received "' + typeof obj_statusCode + '" (at "' + path_statusCode + '")');
1362
+ }
1363
+ })();
1364
+ return v_error === undefined ? null : v_error;
1365
+ }
1366
+ const RepresentationType$7 = 'BulkRecordRollupDefinitionDetailsOutputRepresentation';
1367
+ function keyBuilder$b(luvio, config) {
1368
+ return keyPrefix + '::' + RepresentationType$7 + ':' + config.id;
1369
+ }
1370
+ function keyBuilderFromType$5(luvio, object) {
1371
+ const keyParams = {
1372
+ id: object.statusCode
1373
+ };
1374
+ return keyBuilder$b(luvio, keyParams);
1375
+ }
1376
+ function normalize$7(input, existing, path, luvio, store, timestamp) {
1377
+ return input;
1378
+ }
1379
+ const select$n = function BulkRecordRollupDefinitionDetailsOutputRepresentationSelect() {
1380
+ const { selections: RecordRollupDefinitionDetailsOutputRepresentation__selections, opaque: RecordRollupDefinitionDetailsOutputRepresentation__opaque, } = select$o();
1381
+ return {
1382
+ kind: 'Fragment',
1383
+ version: VERSION$e,
1384
+ private: [],
1385
+ selections: [
1386
+ {
1387
+ name: 'definitions',
1388
+ kind: 'Object',
1389
+ plural: true,
1390
+ selections: RecordRollupDefinitionDetailsOutputRepresentation__selections
1391
+ },
1392
+ {
1393
+ name: 'errors',
1394
+ kind: 'Scalar'
1395
+ },
1396
+ {
1397
+ name: 'message',
1398
+ kind: 'Scalar'
1399
+ },
1400
+ {
1401
+ name: 'statusCode',
1402
+ kind: 'Scalar'
1403
+ }
1404
+ ]
1405
+ };
1406
+ };
1407
+ function equals$e(existing, incoming) {
1408
+ const existing_errors = existing.errors;
1409
+ const incoming_errors = incoming.errors;
1410
+ if (!(existing_errors === incoming_errors)) {
1411
+ return false;
1412
+ }
1413
+ const existing_message = existing.message;
1414
+ const incoming_message = incoming.message;
1415
+ if (!(existing_message === incoming_message)) {
1416
+ return false;
1417
+ }
1418
+ const existing_statusCode = existing.statusCode;
1419
+ const incoming_statusCode = incoming.statusCode;
1420
+ if (!(existing_statusCode === incoming_statusCode)) {
1421
+ return false;
1422
+ }
1423
+ const existing_definitions = existing.definitions;
1424
+ const incoming_definitions = incoming.definitions;
1425
+ const equals_definitions_items = equalsArray(existing_definitions, incoming_definitions, (existing_definitions_item, incoming_definitions_item) => {
1426
+ if (!(equals$f(existing_definitions_item, incoming_definitions_item))) {
1427
+ return false;
1428
+ }
1429
+ });
1430
+ if (equals_definitions_items === false) {
1431
+ return false;
1432
+ }
1433
+ return true;
1434
+ }
1435
+ const ingest$7 = function BulkRecordRollupDefinitionDetailsOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1436
+ if (process.env.NODE_ENV !== 'production') {
1437
+ const validateError = validate$k(input);
1438
+ if (validateError !== null) {
1439
+ throw validateError;
1440
+ }
1441
+ }
1442
+ const key = keyBuilderFromType$5(luvio, input);
1443
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 100;
1444
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "IndustriesRecordAggregation", VERSION$e, RepresentationType$7, equals$e);
1445
+ return createLink(key);
1446
+ };
1447
+ function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
1448
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1449
+ const rootKey = keyBuilderFromType$5(luvio, input);
1450
+ rootKeySet.set(rootKey, {
1451
+ namespace: keyPrefix,
1452
+ representationName: RepresentationType$7,
1453
+ mergeable: false
1454
+ });
1455
+ }
1456
+
1457
+ function select$m(luvio, params) {
1458
+ return select$n();
1459
+ }
1460
+ function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
1461
+ getTypeCacheKeys$7(storeKeyMap, luvio, response);
1462
+ }
1463
+ function ingestSuccess$8(luvio, resourceParams, response) {
1464
+ const { body } = response;
1465
+ const key = keyBuilderFromType$5(luvio, body);
1466
+ luvio.storeIngest(key, ingest$7, body);
1467
+ const snapshot = luvio.storeLookup({
1468
+ recordId: key,
1469
+ node: select$m(),
1470
+ variables: {},
1471
+ });
1472
+ if (process.env.NODE_ENV !== 'production') {
1473
+ if (snapshot.state !== 'Fulfilled') {
1474
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1475
+ }
1476
+ }
1477
+ deepFreeze(snapshot.data);
1478
+ return snapshot;
1479
+ }
1480
+ function createResourceRequest$8(config) {
1481
+ const headers = {};
1482
+ return {
1483
+ baseUri: '/services/data/v66.0',
1484
+ basePath: '/connect/record-aggregation/bulk-record-rollup/details',
1485
+ method: 'post',
1486
+ body: config.body,
1487
+ urlParams: {},
1488
+ queryParams: {},
1489
+ headers,
1490
+ priority: 'normal',
1491
+ };
1492
+ }
1493
+
1494
+ const adapterName$8 = 'getBulkRecordRollupDefinitionDetails';
1495
+ const getBulkRecordRollupDefinitionDetails_ConfigPropertyMetadata = [
1496
+ generateParamConfigMetadata('anchorRecordId', true, 2 /* Body */, 0 /* String */),
1497
+ generateParamConfigMetadata('recordAggregationDefinitionIds', false, 2 /* Body */, 0 /* String */, true),
1498
+ generateParamConfigMetadata('recordAggrDefDeveloperNames', false, 2 /* Body */, 0 /* String */, true),
1499
+ ];
1500
+ const getBulkRecordRollupDefinitionDetails_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, getBulkRecordRollupDefinitionDetails_ConfigPropertyMetadata);
1501
+ const createResourceParams$8 = /*#__PURE__*/ createResourceParams$a(getBulkRecordRollupDefinitionDetails_ConfigPropertyMetadata);
1502
+ function typeCheckConfig$8(untrustedConfig) {
1503
+ const config = {};
1504
+ typeCheckConfig$a(untrustedConfig, config, getBulkRecordRollupDefinitionDetails_ConfigPropertyMetadata);
1505
+ return config;
1506
+ }
1507
+ function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
1508
+ if (!untrustedIsObject(untrustedConfig)) {
1509
+ return null;
1510
+ }
1511
+ if (process.env.NODE_ENV !== 'production') {
1512
+ validateConfig(untrustedConfig, configPropertyNames);
1513
+ }
1514
+ const config = typeCheckConfig$8(untrustedConfig);
1515
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1516
+ return null;
1517
+ }
1518
+ return config;
1519
+ }
1520
+ function buildNetworkSnapshot$8(luvio, config, options) {
1521
+ const resourceParams = createResourceParams$8(config);
1522
+ const request = createResourceRequest$8(resourceParams);
1523
+ return luvio.dispatchResourceRequest(request, options)
1524
+ .then((response) => {
1525
+ return luvio.handleSuccessResponse(() => {
1526
+ const snapshot = ingestSuccess$8(luvio, resourceParams, response);
1527
+ return luvio.storeBroadcast().then(() => snapshot);
1528
+ }, () => {
1529
+ const cache = new StoreKeyMap();
1530
+ getResponseCacheKeys$8(cache, luvio, resourceParams, response.body);
1531
+ return cache;
1532
+ });
1533
+ }, (response) => {
1534
+ deepFreeze(response);
1535
+ throw response;
1536
+ });
1537
+ }
1538
+ const getBulkRecordRollupDefinitionDetailsAdapterFactory = (luvio) => {
1539
+ return function getBulkRecordRollupDefinitionDetails(untrustedConfig) {
1540
+ const config = validateAdapterConfig$8(untrustedConfig, getBulkRecordRollupDefinitionDetails_ConfigPropertyNames);
1541
+ // Invalid or incomplete config
1542
+ if (config === null) {
1543
+ throw new Error('Invalid config for "getBulkRecordRollupDefinitionDetails"');
1544
+ }
1545
+ return buildNetworkSnapshot$8(luvio, config);
1546
+ };
1547
+ };
1548
+
1549
+ const VERSION$d = "e0976ceab3ba0b389e4cc8c2ef45e90c";
1550
+ function validate$j(obj, path = 'RecordAggregationApplicableObjectOutputRepresentation') {
1551
+ const v_error = (() => {
1552
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1553
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1554
+ }
1555
+ const obj_apiName = obj.apiName;
1556
+ const path_apiName = path + '.apiName';
1557
+ if (typeof obj_apiName !== 'string') {
1558
+ return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
1559
+ }
1560
+ const obj_label = obj.label;
1561
+ const path_label = path + '.label';
1562
+ if (typeof obj_label !== 'string') {
1563
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
1564
+ }
1565
+ })();
1566
+ return v_error === undefined ? null : v_error;
1567
+ }
1568
+ const select$l = function RecordAggregationApplicableObjectOutputRepresentationSelect() {
1569
+ return {
1570
+ kind: 'Fragment',
1571
+ version: VERSION$d,
1572
+ private: [],
1573
+ selections: [
1574
+ {
1575
+ name: 'apiName',
1576
+ kind: 'Scalar'
1577
+ },
1578
+ {
1579
+ name: 'label',
1580
+ kind: 'Scalar'
1581
+ }
1582
+ ]
1583
+ };
1584
+ };
1585
+ function equals$d(existing, incoming) {
1586
+ const existing_apiName = existing.apiName;
1587
+ const incoming_apiName = incoming.apiName;
1588
+ if (!(existing_apiName === incoming_apiName)) {
1589
+ return false;
1590
+ }
1591
+ const existing_label = existing.label;
1592
+ const incoming_label = incoming.label;
1593
+ if (!(existing_label === incoming_label)) {
1594
+ return false;
1595
+ }
1596
+ return true;
1597
+ }
1598
+
1599
+ const VERSION$c = "789bb460c399fd0e584cd09a32279a52";
1600
+ function validate$i(obj, path = 'RecordAggregationApplicableObjectsOutputRepresentation') {
1601
+ const v_error = (() => {
1602
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1603
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1604
+ }
1605
+ const obj_message = obj.message;
1606
+ const path_message = path + '.message';
1607
+ if (typeof obj_message !== 'string') {
1608
+ return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
1609
+ }
1610
+ const obj_objects = obj.objects;
1611
+ const path_objects = path + '.objects';
1612
+ if (!ArrayIsArray(obj_objects)) {
1613
+ return new TypeError('Expected "array" but received "' + typeof obj_objects + '" (at "' + path_objects + '")');
1614
+ }
1615
+ for (let i = 0; i < obj_objects.length; i++) {
1616
+ const obj_objects_item = obj_objects[i];
1617
+ const path_objects_item = path_objects + '[' + i + ']';
1618
+ const referencepath_objects_itemValidationError = validate$j(obj_objects_item, path_objects_item);
1619
+ if (referencepath_objects_itemValidationError !== null) {
1620
+ let message = 'Object doesn\'t match RecordAggregationApplicableObjectOutputRepresentation (at "' + path_objects_item + '")\n';
1621
+ message += referencepath_objects_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1622
+ return new TypeError(message);
1623
+ }
1624
+ }
1625
+ const obj_statusCode = obj.statusCode;
1626
+ const path_statusCode = path + '.statusCode';
1627
+ if (typeof obj_statusCode !== 'string') {
1628
+ return new TypeError('Expected "string" but received "' + typeof obj_statusCode + '" (at "' + path_statusCode + '")');
1629
+ }
1630
+ })();
1631
+ return v_error === undefined ? null : v_error;
1632
+ }
1633
+ const RepresentationType$6 = 'RecordAggregationApplicableObjectsOutputRepresentation';
1634
+ function normalize$6(input, existing, path, luvio, store, timestamp) {
1635
+ return input;
1636
+ }
1637
+ const select$k = function RecordAggregationApplicableObjectsOutputRepresentationSelect() {
1638
+ const { selections: RecordAggregationApplicableObjectOutputRepresentation__selections, opaque: RecordAggregationApplicableObjectOutputRepresentation__opaque, } = select$l();
1639
+ return {
1640
+ kind: 'Fragment',
1641
+ version: VERSION$c,
1642
+ private: [],
1643
+ selections: [
1644
+ {
1645
+ name: 'message',
1646
+ kind: 'Scalar'
1647
+ },
1648
+ {
1649
+ name: 'objects',
1650
+ kind: 'Object',
1651
+ plural: true,
1652
+ selections: RecordAggregationApplicableObjectOutputRepresentation__selections
1653
+ },
1654
+ {
1655
+ name: 'statusCode',
1656
+ kind: 'Scalar'
1657
+ }
1658
+ ]
1659
+ };
1660
+ };
1661
+ function equals$c(existing, incoming) {
1662
+ const existing_message = existing.message;
1663
+ const incoming_message = incoming.message;
1664
+ if (!(existing_message === incoming_message)) {
1665
+ return false;
1666
+ }
1667
+ const existing_statusCode = existing.statusCode;
1668
+ const incoming_statusCode = incoming.statusCode;
1669
+ if (!(existing_statusCode === incoming_statusCode)) {
1670
+ return false;
1671
+ }
1672
+ const existing_objects = existing.objects;
1673
+ const incoming_objects = incoming.objects;
1674
+ const equals_objects_items = equalsArray(existing_objects, incoming_objects, (existing_objects_item, incoming_objects_item) => {
1675
+ if (!(equals$d(existing_objects_item, incoming_objects_item))) {
1676
+ return false;
1677
+ }
1678
+ });
1679
+ if (equals_objects_items === false) {
1680
+ return false;
1681
+ }
1682
+ return true;
1683
+ }
1684
+ const ingest$6 = function RecordAggregationApplicableObjectsOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1685
+ if (process.env.NODE_ENV !== 'production') {
1686
+ const validateError = validate$i(input);
1687
+ if (validateError !== null) {
1688
+ throw validateError;
1689
+ }
1690
+ }
1691
+ const key = path.fullPath;
1692
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 100;
1693
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "IndustriesRecordAggregation", VERSION$c, RepresentationType$6, equals$c);
1694
+ return createLink(key);
1695
+ };
1696
+ function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
1697
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1698
+ const rootKey = fullPathFactory();
1699
+ rootKeySet.set(rootKey, {
1700
+ namespace: keyPrefix,
1701
+ representationName: RepresentationType$6,
1702
+ mergeable: false
1703
+ });
1704
+ }
1705
+
1706
+ function select$j(luvio, params) {
1707
+ return select$k();
1708
+ }
1709
+ function keyBuilder$a(luvio, params) {
1710
+ return keyPrefix + '::RecordAggregationApplicableObjectsOutputRepresentation:(' + ')';
1711
+ }
1712
+ function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
1713
+ getTypeCacheKeys$6(storeKeyMap, luvio, response, () => keyBuilder$a());
1714
+ }
1715
+ function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
1716
+ const { body } = response;
1717
+ const key = keyBuilder$a();
1718
+ luvio.storeIngest(key, ingest$6, body);
1719
+ const snapshot = luvio.storeLookup({
1720
+ recordId: key,
1721
+ node: select$j(),
1722
+ variables: {},
1723
+ }, snapshotRefresh);
1724
+ if (process.env.NODE_ENV !== 'production') {
1725
+ if (snapshot.state !== 'Fulfilled') {
1726
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1727
+ }
1728
+ }
1729
+ deepFreeze(snapshot.data);
1730
+ return snapshot;
1731
+ }
1732
+ function ingestError$2(luvio, params, error, snapshotRefresh) {
1733
+ const key = keyBuilder$a();
1734
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1735
+ luvio.storeIngestError(key, errorSnapshot);
1736
+ return errorSnapshot;
1737
+ }
1738
+ function createResourceRequest$7(config) {
1739
+ const headers = {};
1740
+ return {
1741
+ baseUri: '/services/data/v66.0',
1742
+ basePath: '/connect/record-aggregation/utilities/applicable-objects',
1743
+ method: 'get',
1744
+ body: null,
1745
+ urlParams: {},
1746
+ queryParams: {},
1747
+ headers,
1748
+ priority: 'normal',
1749
+ };
1750
+ }
1751
+
1752
+ const adapterName$7 = 'getRecordAggregationApplicableObjects';
1753
+ const getRecordAggregationApplicableObjects_ConfigPropertyMetadata = [];
1754
+ const getRecordAggregationApplicableObjects_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, getRecordAggregationApplicableObjects_ConfigPropertyMetadata);
1755
+ const createResourceParams$7 = /*#__PURE__*/ createResourceParams$a(getRecordAggregationApplicableObjects_ConfigPropertyMetadata);
1756
+ function keyBuilder$9(luvio, config) {
1757
+ createResourceParams$7(config);
1758
+ return keyBuilder$a();
1759
+ }
1760
+ function typeCheckConfig$7(untrustedConfig) {
1761
+ const config = {};
1762
+ return config;
1763
+ }
1764
+ function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
1765
+ if (!untrustedIsObject(untrustedConfig)) {
1766
+ return null;
1767
+ }
1768
+ if (process.env.NODE_ENV !== 'production') {
1769
+ validateConfig(untrustedConfig, configPropertyNames);
1770
+ }
1771
+ const config = typeCheckConfig$7();
1772
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1773
+ return null;
1774
+ }
1775
+ return config;
1776
+ }
1777
+ function adapterFragment$2(luvio, config) {
1778
+ createResourceParams$7(config);
1779
+ return select$j();
1780
+ }
1781
+ function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
1782
+ const snapshot = ingestSuccess$7(luvio, resourceParams, response, {
1783
+ config,
1784
+ resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
1785
+ });
1786
+ return luvio.storeBroadcast().then(() => snapshot);
1787
+ }
1788
+ function onFetchResponseError$2(luvio, config, resourceParams, response) {
1789
+ const snapshot = ingestError$2(luvio, resourceParams, response, {
1790
+ config,
1791
+ resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
1792
+ });
1793
+ return luvio.storeBroadcast().then(() => snapshot);
1794
+ }
1795
+ function buildNetworkSnapshot$7(luvio, config, options) {
1796
+ const resourceParams = createResourceParams$7(config);
1797
+ const request = createResourceRequest$7();
1798
+ return luvio.dispatchResourceRequest(request, options)
1799
+ .then((response) => {
1800
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
1801
+ const cache = new StoreKeyMap();
1802
+ getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
1803
+ return cache;
1804
+ });
1805
+ }, (response) => {
1806
+ return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
1807
+ });
1808
+ }
1809
+ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
1810
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$7, undefined, false);
1811
+ }
1812
+ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
1813
+ const { luvio, config } = context;
1814
+ const selector = {
1815
+ recordId: keyBuilder$9(luvio, config),
1816
+ node: adapterFragment$2(luvio, config),
1817
+ variables: {},
1818
+ };
1819
+ const cacheSnapshot = storeLookup(selector, {
1820
+ config,
1821
+ resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
1822
+ });
1823
+ return cacheSnapshot;
1824
+ }
1825
+ const getRecordAggregationApplicableObjectsAdapterFactory = (luvio) => function IndustriesRecordAggregation__getRecordAggregationApplicableObjects(untrustedConfig, requestContext) {
1826
+ const config = validateAdapterConfig$7(untrustedConfig, getRecordAggregationApplicableObjects_ConfigPropertyNames);
1827
+ // Invalid or incomplete config
1828
+ if (config === null) {
1829
+ return null;
1830
+ }
1831
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1832
+ buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
1833
+ };
1834
+
1835
+ function select$i(luvio, params) {
1836
+ return select$r();
1837
+ }
1838
+ function keyBuilder$8(luvio, params) {
1839
+ return keyBuilder$d(luvio, {
1840
+ id: params.urlParams.recordAggregationDefinitionId
1841
+ });
1842
+ }
1843
+ function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
1844
+ getTypeCacheKeys$8(storeKeyMap, luvio, response);
1845
+ }
1846
+ function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
1847
+ const { body } = response;
1848
+ const key = keyBuilder$8(luvio, resourceParams);
1849
+ luvio.storeIngest(key, ingest$8, body);
1850
+ const snapshot = luvio.storeLookup({
1851
+ recordId: key,
1852
+ node: select$i(),
1853
+ variables: {},
1854
+ }, snapshotRefresh);
1855
+ if (process.env.NODE_ENV !== 'production') {
1856
+ if (snapshot.state !== 'Fulfilled') {
1857
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1858
+ }
1859
+ }
1860
+ deepFreeze(snapshot.data);
1861
+ return snapshot;
1862
+ }
1863
+ function ingestError$1(luvio, params, error, snapshotRefresh) {
1864
+ const key = keyBuilder$8(luvio, params);
1865
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1866
+ luvio.storeIngestError(key, errorSnapshot);
1867
+ return errorSnapshot;
1868
+ }
1869
+ function createResourceRequest$6(config) {
1870
+ const headers = {};
1871
+ return {
1872
+ baseUri: '/services/data/v66.0',
1873
+ basePath: '/connect/record-aggregation/' + config.urlParams.recordAggregationDefinitionId + '',
1874
+ method: 'get',
1875
+ body: null,
1876
+ urlParams: config.urlParams,
1877
+ queryParams: {},
1878
+ headers,
1879
+ priority: 'normal',
1880
+ };
1881
+ }
1882
+ function createResourceRequestFromRepresentation(representation) {
1883
+ const config = {
1884
+ urlParams: {},
1885
+ };
1886
+ config.urlParams.recordAggregationDefinitionId = representation.recordAggregationDefinitionId;
1887
+ return createResourceRequest$6(config);
1888
+ }
1889
+
1890
+ const adapterName$6 = 'getRecordAggregationDefinition';
1891
+ const getRecordAggregationDefinition_ConfigPropertyMetadata = [
1892
+ generateParamConfigMetadata('recordAggregationDefinitionId', true, 0 /* UrlParameter */, 0 /* String */),
1893
+ ];
1894
+ const getRecordAggregationDefinition_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getRecordAggregationDefinition_ConfigPropertyMetadata);
1895
+ const createResourceParams$6 = /*#__PURE__*/ createResourceParams$a(getRecordAggregationDefinition_ConfigPropertyMetadata);
1896
+ function keyBuilder$7(luvio, config) {
1897
+ const resourceParams = createResourceParams$6(config);
1898
+ return keyBuilder$8(luvio, resourceParams);
1899
+ }
1900
+ function typeCheckConfig$6(untrustedConfig) {
1901
+ const config = {};
1902
+ typeCheckConfig$a(untrustedConfig, config, getRecordAggregationDefinition_ConfigPropertyMetadata);
1903
+ return config;
1904
+ }
1905
+ function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
1906
+ if (!untrustedIsObject(untrustedConfig)) {
1907
+ return null;
1908
+ }
1909
+ if (process.env.NODE_ENV !== 'production') {
1910
+ validateConfig(untrustedConfig, configPropertyNames);
1911
+ }
1912
+ const config = typeCheckConfig$6(untrustedConfig);
1913
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1914
+ return null;
1915
+ }
1916
+ return config;
1917
+ }
1918
+ function adapterFragment$1(luvio, config) {
1919
+ createResourceParams$6(config);
1920
+ return select$i();
1921
+ }
1922
+ function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
1923
+ const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
1924
+ config,
1925
+ resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
1926
+ });
1927
+ return luvio.storeBroadcast().then(() => snapshot);
1928
+ }
1929
+ function onFetchResponseError$1(luvio, config, resourceParams, response) {
1930
+ const snapshot = ingestError$1(luvio, resourceParams, response, {
1931
+ config,
1932
+ resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
1933
+ });
1934
+ return luvio.storeBroadcast().then(() => snapshot);
1935
+ }
1936
+ function buildNetworkSnapshot$6(luvio, config, options) {
1937
+ const resourceParams = createResourceParams$6(config);
1938
+ const request = createResourceRequest$6(resourceParams);
1939
+ return luvio.dispatchResourceRequest(request, options)
1940
+ .then((response) => {
1941
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
1942
+ const cache = new StoreKeyMap();
1943
+ getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
1944
+ return cache;
1945
+ });
1946
+ }, (response) => {
1947
+ return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
1948
+ });
1949
+ }
1950
+ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
1951
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, undefined, false);
1952
+ }
1953
+ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
1954
+ const { luvio, config } = context;
1955
+ const selector = {
1956
+ recordId: keyBuilder$7(luvio, config),
1957
+ node: adapterFragment$1(luvio, config),
1958
+ variables: {},
1959
+ };
1960
+ const cacheSnapshot = storeLookup(selector, {
1961
+ config,
1962
+ resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
1963
+ });
1964
+ return cacheSnapshot;
1965
+ }
1966
+ const getRecordAggregationDefinitionAdapterFactory = (luvio) => function IndustriesRecordAggregation__getRecordAggregationDefinition(untrustedConfig, requestContext) {
1967
+ const config = validateAdapterConfig$6(untrustedConfig, getRecordAggregationDefinition_ConfigPropertyNames);
1968
+ // Invalid or incomplete config
1969
+ if (config === null) {
1970
+ return null;
1971
+ }
1972
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1973
+ buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
1974
+ };
1975
+ const notifyChangeFactory = (luvio, options) => {
1976
+ return function getConnectRecordAggregationByRecordAggregationDefinitionIdNotifyChange(configs) {
1977
+ const keys = configs.map(c => keyBuilder$d(luvio, c));
1978
+ luvio.getNotifyChangeStoreEntries(keys).then(entries => {
1979
+ for (let i = 0, len = entries.length; i < len; i++) {
1980
+ const { key, record: val } = entries[i];
1981
+ const refreshRequest = createResourceRequestFromRepresentation(val);
1982
+ luvio.dispatchResourceRequest(refreshRequest, options)
1983
+ .then((response) => {
1984
+ return luvio.handleSuccessResponse(() => {
1985
+ const { body } = response;
1986
+ luvio.storeIngest(key, ingest$8, body);
1987
+ return luvio.storeBroadcast();
1988
+ }, () => {
1989
+ const cache = new StoreKeyMap();
1990
+ getTypeCacheKeys$8(cache, luvio, response.body);
1991
+ return cache;
1992
+ });
1993
+ }, (error) => {
1994
+ return luvio.handleErrorResponse(() => {
1995
+ const errorSnapshot = luvio.errorSnapshot(error);
1996
+ luvio.storeIngestError(key, errorSnapshot, undefined);
1997
+ return luvio.storeBroadcast().then(() => errorSnapshot);
1998
+ });
1999
+ });
2000
+ }
2001
+ });
2002
+ };
2003
+ };
2004
+
2005
+ const VERSION$b = "47b9bd810af3efccf4b2c011f8e6c7be";
2006
+ function validate$h(obj, path = 'RecordAggregationApplicableFieldOutputRepresentation') {
2007
+ const v_error = (() => {
2008
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2009
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2010
+ }
2011
+ const obj_apiName = obj.apiName;
2012
+ const path_apiName = path + '.apiName';
2013
+ if (typeof obj_apiName !== 'string') {
2014
+ return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
2015
+ }
2016
+ const obj_dataType = obj.dataType;
2017
+ const path_dataType = path + '.dataType';
2018
+ if (typeof obj_dataType !== 'string') {
2019
+ return new TypeError('Expected "string" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
2020
+ }
2021
+ const obj_isCompound = obj.isCompound;
2022
+ const path_isCompound = path + '.isCompound';
2023
+ if (typeof obj_isCompound !== 'boolean') {
2024
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isCompound + '" (at "' + path_isCompound + '")');
2025
+ }
2026
+ if (obj.isCustom !== undefined) {
2027
+ const obj_isCustom = obj.isCustom;
2028
+ const path_isCustom = path + '.isCustom';
2029
+ if (typeof obj_isCustom !== 'boolean') {
2030
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isCustom + '" (at "' + path_isCustom + '")');
2031
+ }
2032
+ }
2033
+ const obj_label = obj.label;
2034
+ const path_label = path + '.label';
2035
+ if (typeof obj_label !== 'string') {
2036
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
2037
+ }
2038
+ })();
2039
+ return v_error === undefined ? null : v_error;
2040
+ }
2041
+ const select$h = function RecordAggregationApplicableFieldOutputRepresentationSelect() {
2042
+ return {
2043
+ kind: 'Fragment',
2044
+ version: VERSION$b,
2045
+ private: [],
2046
+ selections: [
2047
+ {
2048
+ name: 'apiName',
2049
+ kind: 'Scalar'
2050
+ },
2051
+ {
2052
+ name: 'dataType',
2053
+ kind: 'Scalar'
2054
+ },
2055
+ {
2056
+ name: 'isCompound',
2057
+ kind: 'Scalar'
2058
+ },
2059
+ {
2060
+ name: 'isCustom',
2061
+ kind: 'Scalar',
2062
+ required: false
2063
+ },
2064
+ {
2065
+ name: 'label',
2066
+ kind: 'Scalar'
2067
+ }
2068
+ ]
2069
+ };
2070
+ };
2071
+ function equals$b(existing, incoming) {
2072
+ const existing_isCompound = existing.isCompound;
2073
+ const incoming_isCompound = incoming.isCompound;
2074
+ if (!(existing_isCompound === incoming_isCompound)) {
2075
+ return false;
2076
+ }
2077
+ const existing_isCustom = existing.isCustom;
2078
+ const incoming_isCustom = incoming.isCustom;
2079
+ // if at least one of these optionals is defined
2080
+ if (existing_isCustom !== undefined || incoming_isCustom !== undefined) {
2081
+ // if one of these is not defined we know the other is defined and therefore
2082
+ // not equal
2083
+ if (existing_isCustom === undefined || incoming_isCustom === undefined) {
2084
+ return false;
2085
+ }
2086
+ if (!(existing_isCustom === incoming_isCustom)) {
2087
+ return false;
2088
+ }
2089
+ }
2090
+ const existing_apiName = existing.apiName;
2091
+ const incoming_apiName = incoming.apiName;
2092
+ if (!(existing_apiName === incoming_apiName)) {
2093
+ return false;
2094
+ }
2095
+ const existing_dataType = existing.dataType;
2096
+ const incoming_dataType = incoming.dataType;
2097
+ if (!(existing_dataType === incoming_dataType)) {
2098
+ return false;
2099
+ }
2100
+ const existing_label = existing.label;
2101
+ const incoming_label = incoming.label;
2102
+ if (!(existing_label === incoming_label)) {
2103
+ return false;
2104
+ }
2105
+ return true;
2106
+ }
2107
+
2108
+ const VERSION$a = "3c44d9ec6604e1f30267b907f64fd09f";
2109
+ function validate$g(obj, path = 'RecordAggregationEntityApplicableFieldsOutputRepresentation') {
2110
+ const v_error = (() => {
2111
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2112
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2113
+ }
2114
+ const obj_fields = obj.fields;
2115
+ const path_fields = path + '.fields';
2116
+ if (!ArrayIsArray(obj_fields)) {
2117
+ return new TypeError('Expected "array" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
2118
+ }
2119
+ for (let i = 0; i < obj_fields.length; i++) {
2120
+ const obj_fields_item = obj_fields[i];
2121
+ const path_fields_item = path_fields + '[' + i + ']';
2122
+ const referencepath_fields_itemValidationError = validate$h(obj_fields_item, path_fields_item);
2123
+ if (referencepath_fields_itemValidationError !== null) {
2124
+ let message = 'Object doesn\'t match RecordAggregationApplicableFieldOutputRepresentation (at "' + path_fields_item + '")\n';
2125
+ message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2126
+ return new TypeError(message);
2127
+ }
2128
+ }
2129
+ const obj_message = obj.message;
2130
+ const path_message = path + '.message';
2131
+ if (typeof obj_message !== 'string') {
2132
+ return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
2133
+ }
2134
+ const obj_statusCode = obj.statusCode;
2135
+ const path_statusCode = path + '.statusCode';
2136
+ if (typeof obj_statusCode !== 'string') {
2137
+ return new TypeError('Expected "string" but received "' + typeof obj_statusCode + '" (at "' + path_statusCode + '")');
2138
+ }
2139
+ const obj_validOperators = obj.validOperators;
2140
+ const path_validOperators = path + '.validOperators';
2141
+ if (typeof obj_validOperators !== 'object' || ArrayIsArray(obj_validOperators) || obj_validOperators === null) {
2142
+ return new TypeError('Expected "object" but received "' + typeof obj_validOperators + '" (at "' + path_validOperators + '")');
2143
+ }
2144
+ const obj_validOperators_keys = ObjectKeys(obj_validOperators);
2145
+ for (let i = 0; i < obj_validOperators_keys.length; i++) {
2146
+ const key = obj_validOperators_keys[i];
2147
+ const obj_validOperators_prop = obj_validOperators[key];
2148
+ const path_validOperators_prop = path_validOperators + '["' + key + '"]';
2149
+ if (obj_validOperators_prop === undefined) {
2150
+ return new TypeError('Expected "defined" but received "' + typeof obj_validOperators_prop + '" (at "' + path_validOperators_prop + '")');
2151
+ }
2152
+ }
2153
+ })();
2154
+ return v_error === undefined ? null : v_error;
2155
+ }
2156
+ const RepresentationType$5 = 'RecordAggregationEntityApplicableFieldsOutputRepresentation';
2157
+ function normalize$5(input, existing, path, luvio, store, timestamp) {
2158
+ return input;
2159
+ }
2160
+ const select$g = function RecordAggregationEntityApplicableFieldsOutputRepresentationSelect() {
2161
+ const { selections: RecordAggregationApplicableFieldOutputRepresentation__selections, opaque: RecordAggregationApplicableFieldOutputRepresentation__opaque, } = select$h();
2162
+ return {
2163
+ kind: 'Fragment',
2164
+ version: VERSION$a,
2165
+ private: [],
2166
+ selections: [
2167
+ {
2168
+ name: 'fields',
2169
+ kind: 'Object',
2170
+ plural: true,
2171
+ selections: RecordAggregationApplicableFieldOutputRepresentation__selections
2172
+ },
2173
+ {
2174
+ name: 'message',
2175
+ kind: 'Scalar'
2176
+ },
2177
+ {
2178
+ name: 'statusCode',
2179
+ kind: 'Scalar'
2180
+ },
2181
+ {
2182
+ name: 'validOperators',
2183
+ kind: 'Object',
2184
+ // any
2185
+ }
2186
+ ]
2187
+ };
2188
+ };
2189
+ function equals$a(existing, incoming) {
2190
+ const existing_message = existing.message;
2191
+ const incoming_message = incoming.message;
2192
+ if (!(existing_message === incoming_message)) {
2193
+ return false;
2194
+ }
2195
+ const existing_statusCode = existing.statusCode;
2196
+ const incoming_statusCode = incoming.statusCode;
2197
+ if (!(existing_statusCode === incoming_statusCode)) {
2198
+ return false;
2199
+ }
2200
+ const existing_fields = existing.fields;
2201
+ const incoming_fields = incoming.fields;
2202
+ const equals_fields_items = equalsArray(existing_fields, incoming_fields, (existing_fields_item, incoming_fields_item) => {
2203
+ if (!(equals$b(existing_fields_item, incoming_fields_item))) {
2204
+ return false;
2205
+ }
2206
+ });
2207
+ if (equals_fields_items === false) {
2208
+ return false;
2209
+ }
2210
+ const existing_validOperators = existing.validOperators;
2211
+ const incoming_validOperators = incoming.validOperators;
2212
+ const equals_validOperators_props = equalsObject(existing_validOperators, incoming_validOperators, (existing_validOperators_prop, incoming_validOperators_prop) => {
2213
+ if (JSONStringify(incoming_validOperators_prop) !== JSONStringify(existing_validOperators_prop)) {
2214
+ return false;
2215
+ }
2216
+ });
2217
+ if (equals_validOperators_props === false) {
2218
+ return false;
2219
+ }
2220
+ return true;
2221
+ }
2222
+ const ingest$5 = function RecordAggregationEntityApplicableFieldsOutputRepresentationIngest(input, path, luvio, store, timestamp) {
2223
+ if (process.env.NODE_ENV !== 'production') {
2224
+ const validateError = validate$g(input);
2225
+ if (validateError !== null) {
2226
+ throw validateError;
2227
+ }
2228
+ }
2229
+ const key = path.fullPath;
2230
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 100;
2231
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "IndustriesRecordAggregation", VERSION$a, RepresentationType$5, equals$a);
2232
+ return createLink(key);
2233
+ };
2234
+ function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
2235
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
2236
+ const rootKey = fullPathFactory();
2237
+ rootKeySet.set(rootKey, {
2238
+ namespace: keyPrefix,
2239
+ representationName: RepresentationType$5,
2240
+ mergeable: false
2241
+ });
2242
+ }
2243
+
2244
+ function select$f(luvio, params) {
2245
+ return select$g();
2246
+ }
2247
+ function keyBuilder$6(luvio, params) {
2248
+ return keyPrefix + '::RecordAggregationEntityApplicableFieldsOutputRepresentation:(' + 'objectName:' + params.urlParams.objectName + ')';
2249
+ }
2250
+ function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
2251
+ getTypeCacheKeys$5(storeKeyMap, luvio, response, () => keyBuilder$6(luvio, resourceParams));
2252
+ }
2253
+ function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
2254
+ const { body } = response;
2255
+ const key = keyBuilder$6(luvio, resourceParams);
2256
+ luvio.storeIngest(key, ingest$5, body);
2257
+ const snapshot = luvio.storeLookup({
2258
+ recordId: key,
2259
+ node: select$f(),
2260
+ variables: {},
2261
+ }, snapshotRefresh);
2262
+ if (process.env.NODE_ENV !== 'production') {
2263
+ if (snapshot.state !== 'Fulfilled') {
2264
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
2265
+ }
2266
+ }
2267
+ deepFreeze(snapshot.data);
2268
+ return snapshot;
2269
+ }
2270
+ function ingestError(luvio, params, error, snapshotRefresh) {
2271
+ const key = keyBuilder$6(luvio, params);
2272
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
2273
+ luvio.storeIngestError(key, errorSnapshot);
2274
+ return errorSnapshot;
2275
+ }
2276
+ function createResourceRequest$5(config) {
2277
+ const headers = {};
2278
+ return {
2279
+ baseUri: '/services/data/v66.0',
2280
+ basePath: '/connect/record-aggregation/utilities/applicable-objects/' + config.urlParams.objectName + '/applicable-fields',
2281
+ method: 'get',
2282
+ body: null,
2283
+ urlParams: config.urlParams,
2284
+ queryParams: {},
2285
+ headers,
2286
+ priority: 'normal',
2287
+ };
2288
+ }
2289
+
2290
+ const adapterName$5 = 'getRecordAggregationEntityApplicableFields';
2291
+ const getRecordAggregationEntityApplicableFields_ConfigPropertyMetadata = [
2292
+ generateParamConfigMetadata('objectName', true, 0 /* UrlParameter */, 0 /* String */),
2293
+ ];
2294
+ const getRecordAggregationEntityApplicableFields_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getRecordAggregationEntityApplicableFields_ConfigPropertyMetadata);
2295
+ const createResourceParams$5 = /*#__PURE__*/ createResourceParams$a(getRecordAggregationEntityApplicableFields_ConfigPropertyMetadata);
2296
+ function keyBuilder$5(luvio, config) {
2297
+ const resourceParams = createResourceParams$5(config);
2298
+ return keyBuilder$6(luvio, resourceParams);
2299
+ }
2300
+ function typeCheckConfig$5(untrustedConfig) {
2301
+ const config = {};
2302
+ typeCheckConfig$a(untrustedConfig, config, getRecordAggregationEntityApplicableFields_ConfigPropertyMetadata);
2303
+ return config;
2304
+ }
2305
+ function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
2306
+ if (!untrustedIsObject(untrustedConfig)) {
2307
+ return null;
2308
+ }
2309
+ if (process.env.NODE_ENV !== 'production') {
2310
+ validateConfig(untrustedConfig, configPropertyNames);
2311
+ }
2312
+ const config = typeCheckConfig$5(untrustedConfig);
2313
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
2314
+ return null;
2315
+ }
2316
+ return config;
2317
+ }
2318
+ function adapterFragment(luvio, config) {
2319
+ createResourceParams$5(config);
2320
+ return select$f();
2321
+ }
2322
+ function onFetchResponseSuccess(luvio, config, resourceParams, response) {
2323
+ const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
2324
+ config,
2325
+ resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
2326
+ });
2327
+ return luvio.storeBroadcast().then(() => snapshot);
2328
+ }
2329
+ function onFetchResponseError(luvio, config, resourceParams, response) {
2330
+ const snapshot = ingestError(luvio, resourceParams, response, {
2331
+ config,
2332
+ resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
2333
+ });
2334
+ return luvio.storeBroadcast().then(() => snapshot);
2335
+ }
2336
+ function buildNetworkSnapshot$5(luvio, config, options) {
2337
+ const resourceParams = createResourceParams$5(config);
2338
+ const request = createResourceRequest$5(resourceParams);
2339
+ return luvio.dispatchResourceRequest(request, options)
2340
+ .then((response) => {
2341
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
2342
+ const cache = new StoreKeyMap();
2343
+ getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
2344
+ return cache;
2345
+ });
2346
+ }, (response) => {
2347
+ return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
2348
+ });
2349
+ }
2350
+ function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
2351
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
2352
+ }
2353
+ function buildCachedSnapshotCachePolicy(context, storeLookup) {
2354
+ const { luvio, config } = context;
2355
+ const selector = {
2356
+ recordId: keyBuilder$5(luvio, config),
2357
+ node: adapterFragment(luvio, config),
2358
+ variables: {},
2359
+ };
2360
+ const cacheSnapshot = storeLookup(selector, {
2361
+ config,
2362
+ resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
2363
+ });
2364
+ return cacheSnapshot;
2365
+ }
2366
+ const getRecordAggregationEntityApplicableFieldsAdapterFactory = (luvio) => function IndustriesRecordAggregation__getRecordAggregationEntityApplicableFields(untrustedConfig, requestContext) {
2367
+ const config = validateAdapterConfig$5(untrustedConfig, getRecordAggregationEntityApplicableFields_ConfigPropertyNames);
2368
+ // Invalid or incomplete config
2369
+ if (config === null) {
2370
+ return null;
2371
+ }
2372
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
2373
+ buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
2374
+ };
2375
+
2376
+ const VERSION$9 = "283ece02338d0d6ce28909ac02e76bc1";
2377
+ function validate$f(obj, path = 'RecordAggregationDefinitionPartialUpdateOutputRepresentation') {
2378
+ const v_error = (() => {
2379
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2380
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2381
+ }
2382
+ const obj_message = obj.message;
2383
+ const path_message = path + '.message';
2384
+ if (typeof obj_message !== 'string') {
2385
+ return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
2386
+ }
2387
+ const obj_statusCode = obj.statusCode;
2388
+ const path_statusCode = path + '.statusCode';
2389
+ if (typeof obj_statusCode !== 'string') {
2390
+ return new TypeError('Expected "string" but received "' + typeof obj_statusCode + '" (at "' + path_statusCode + '")');
2391
+ }
2392
+ })();
2393
+ return v_error === undefined ? null : v_error;
2394
+ }
2395
+ const RepresentationType$4 = 'RecordAggregationDefinitionPartialUpdateOutputRepresentation';
2396
+ function keyBuilder$4(luvio, config) {
2397
+ return keyPrefix + '::' + RepresentationType$4 + ':' + config.id;
2398
+ }
2399
+ function keyBuilderFromType$4(luvio, object) {
2400
+ const keyParams = {
2401
+ id: object.statusCode
2402
+ };
2403
+ return keyBuilder$4(luvio, keyParams);
2404
+ }
2405
+ function normalize$4(input, existing, path, luvio, store, timestamp) {
2406
+ return input;
2407
+ }
2408
+ const select$e = function RecordAggregationDefinitionPartialUpdateOutputRepresentationSelect() {
2409
+ return {
2410
+ kind: 'Fragment',
2411
+ version: VERSION$9,
2412
+ private: [],
2413
+ selections: [
2414
+ {
2415
+ name: 'message',
2416
+ kind: 'Scalar'
2417
+ },
2418
+ {
2419
+ name: 'statusCode',
2420
+ kind: 'Scalar'
2421
+ }
2422
+ ]
2423
+ };
2424
+ };
2425
+ function equals$9(existing, incoming) {
2426
+ const existing_message = existing.message;
2427
+ const incoming_message = incoming.message;
2428
+ if (!(existing_message === incoming_message)) {
2429
+ return false;
2430
+ }
2431
+ const existing_statusCode = existing.statusCode;
2432
+ const incoming_statusCode = incoming.statusCode;
2433
+ if (!(existing_statusCode === incoming_statusCode)) {
2434
+ return false;
2435
+ }
2436
+ return true;
2437
+ }
2438
+ const ingest$4 = function RecordAggregationDefinitionPartialUpdateOutputRepresentationIngest(input, path, luvio, store, timestamp) {
2439
+ if (process.env.NODE_ENV !== 'production') {
2440
+ const validateError = validate$f(input);
2441
+ if (validateError !== null) {
2442
+ throw validateError;
2443
+ }
2444
+ }
2445
+ const key = keyBuilderFromType$4(luvio, input);
2446
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 100;
2447
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "IndustriesRecordAggregation", VERSION$9, RepresentationType$4, equals$9);
2448
+ return createLink(key);
2449
+ };
2450
+ function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
2451
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
2452
+ const rootKey = keyBuilderFromType$4(luvio, input);
2453
+ rootKeySet.set(rootKey, {
2454
+ namespace: keyPrefix,
2455
+ representationName: RepresentationType$4,
2456
+ mergeable: false
2457
+ });
2458
+ }
2459
+
2460
+ function select$d(luvio, params) {
2461
+ return select$e();
2462
+ }
2463
+ function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
2464
+ getTypeCacheKeys$4(storeKeyMap, luvio, response);
2465
+ }
2466
+ function ingestSuccess$4(luvio, resourceParams, response) {
2467
+ const { body } = response;
2468
+ const key = keyBuilderFromType$4(luvio, body);
2469
+ luvio.storeIngest(key, ingest$4, body);
2470
+ const snapshot = luvio.storeLookup({
2471
+ recordId: key,
2472
+ node: select$d(),
2473
+ variables: {},
2474
+ });
2475
+ if (process.env.NODE_ENV !== 'production') {
2476
+ if (snapshot.state !== 'Fulfilled') {
2477
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
2478
+ }
2479
+ }
2480
+ deepFreeze(snapshot.data);
2481
+ return snapshot;
2482
+ }
2483
+ function createResourceRequest$4(config) {
2484
+ const headers = {};
2485
+ return {
2486
+ baseUri: '/services/data/v66.0',
2487
+ basePath: '/connect/record-aggregation/' + config.urlParams.recordAggregationDefinitionId + '',
2488
+ method: 'patch',
2489
+ body: config.body,
2490
+ urlParams: config.urlParams,
2491
+ queryParams: {},
2492
+ headers,
2493
+ priority: 'normal',
2494
+ };
2495
+ }
2496
+
2497
+ const adapterName$4 = 'patchRecordAggregationDefinition';
2498
+ const patchRecordAggregationDefinition_ConfigPropertyMetadata = [
2499
+ generateParamConfigMetadata('recordAggregationDefinitionId', true, 0 /* UrlParameter */, 0 /* String */),
2500
+ generateParamConfigMetadata('status', false, 2 /* Body */, 0 /* String */),
2501
+ generateParamConfigMetadata('definitionDisplayName', false, 2 /* Body */, 0 /* String */),
2502
+ generateParamConfigMetadata('definitionDescription', false, 2 /* Body */, 0 /* String */),
2503
+ generateParamConfigMetadata('enableOnDemand', false, 2 /* Body */, 1 /* Boolean */),
2504
+ ];
2505
+ const patchRecordAggregationDefinition_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, patchRecordAggregationDefinition_ConfigPropertyMetadata);
2506
+ const createResourceParams$4 = /*#__PURE__*/ createResourceParams$a(patchRecordAggregationDefinition_ConfigPropertyMetadata);
2507
+ function typeCheckConfig$4(untrustedConfig) {
2508
+ const config = {};
2509
+ typeCheckConfig$a(untrustedConfig, config, patchRecordAggregationDefinition_ConfigPropertyMetadata);
2510
+ return config;
2511
+ }
2512
+ function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
2513
+ if (!untrustedIsObject(untrustedConfig)) {
2514
+ return null;
2515
+ }
2516
+ if (process.env.NODE_ENV !== 'production') {
2517
+ validateConfig(untrustedConfig, configPropertyNames);
2518
+ }
2519
+ const config = typeCheckConfig$4(untrustedConfig);
2520
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
2521
+ return null;
2522
+ }
2523
+ return config;
2524
+ }
2525
+ function buildNetworkSnapshot$4(luvio, config, options) {
2526
+ const resourceParams = createResourceParams$4(config);
2527
+ const request = createResourceRequest$4(resourceParams);
2528
+ return luvio.dispatchResourceRequest(request, options)
2529
+ .then((response) => {
2530
+ return luvio.handleSuccessResponse(() => {
2531
+ const snapshot = ingestSuccess$4(luvio, resourceParams, response);
2532
+ return luvio.storeBroadcast().then(() => snapshot);
2533
+ }, () => {
2534
+ const cache = new StoreKeyMap();
2535
+ getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
2536
+ return cache;
2537
+ });
2538
+ }, (response) => {
2539
+ deepFreeze(response);
2540
+ throw response;
2541
+ });
2542
+ }
2543
+ const patchRecordAggregationDefinitionAdapterFactory = (luvio) => {
2544
+ return function patchRecordAggregationDefinition(untrustedConfig) {
2545
+ const config = validateAdapterConfig$4(untrustedConfig, patchRecordAggregationDefinition_ConfigPropertyNames);
2546
+ // Invalid or incomplete config
2547
+ if (config === null) {
2548
+ throw new Error('Invalid config for "patchRecordAggregationDefinition"');
2549
+ }
2550
+ return buildNetworkSnapshot$4(luvio, config);
2551
+ };
2552
+ };
2553
+
2554
+ function validate$e(obj, path = 'RecordRollupSyncExecutionInputRepresentation') {
2555
+ const v_error = (() => {
2556
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2557
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2558
+ }
2559
+ const obj_anchorRecordId = obj.anchorRecordId;
2560
+ const path_anchorRecordId = path + '.anchorRecordId';
2561
+ if (typeof obj_anchorRecordId !== 'string') {
2562
+ return new TypeError('Expected "string" but received "' + typeof obj_anchorRecordId + '" (at "' + path_anchorRecordId + '")');
2563
+ }
2564
+ const obj_id = obj.id;
2565
+ const path_id = path + '.id';
2566
+ if (typeof obj_id !== 'string') {
2567
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
2568
+ }
2569
+ })();
2570
+ return v_error === undefined ? null : v_error;
2571
+ }
2572
+
2573
+ const VERSION$8 = "66ef910c79586d7a0105d79b5807089b";
2574
+ function validate$d(obj, path = 'RecordRollupSyncExecutionErrorOutputRepresentation') {
2575
+ const v_error = (() => {
2576
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2577
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2578
+ }
2579
+ const obj_message = obj.message;
2580
+ const path_message = path + '.message';
2581
+ if (typeof obj_message !== 'string') {
2582
+ return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
2583
+ }
2584
+ const obj_type = obj.type;
2585
+ const path_type = path + '.type';
2586
+ if (typeof obj_type !== 'string') {
2587
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
2588
+ }
2589
+ })();
2590
+ return v_error === undefined ? null : v_error;
2591
+ }
2592
+ const select$c = function RecordRollupSyncExecutionErrorOutputRepresentationSelect() {
2593
+ return {
2594
+ kind: 'Fragment',
2595
+ version: VERSION$8,
2596
+ private: [],
2597
+ selections: [
2598
+ {
2599
+ name: 'message',
2600
+ kind: 'Scalar'
2601
+ },
2602
+ {
2603
+ name: 'type',
2604
+ kind: 'Scalar'
2605
+ }
2606
+ ]
2607
+ };
2608
+ };
2609
+ function equals$8(existing, incoming) {
2610
+ const existing_message = existing.message;
2611
+ const incoming_message = incoming.message;
2612
+ if (!(existing_message === incoming_message)) {
2613
+ return false;
2614
+ }
2615
+ const existing_type = existing.type;
2616
+ const incoming_type = incoming.type;
2617
+ if (!(existing_type === incoming_type)) {
2618
+ return false;
2619
+ }
2620
+ return true;
2621
+ }
2622
+
2623
+ const VERSION$7 = "0006af8b62d0016274acd4c295d5f334";
2624
+ function validate$c(obj, path = 'RecordRollupSyncExecutionOutputRepresentation') {
2625
+ const v_error = (() => {
2626
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2627
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2628
+ }
2629
+ if (obj.error !== undefined) {
2630
+ const obj_error = obj.error;
2631
+ const path_error = path + '.error';
2632
+ const referencepath_errorValidationError = validate$d(obj_error, path_error);
2633
+ if (referencepath_errorValidationError !== null) {
2634
+ let message = 'Object doesn\'t match RecordRollupSyncExecutionErrorOutputRepresentation (at "' + path_error + '")\n';
2635
+ message += referencepath_errorValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2636
+ return new TypeError(message);
2637
+ }
2638
+ }
2639
+ const obj_id = obj.id;
2640
+ const path_id = path + '.id';
2641
+ if (typeof obj_id !== 'string') {
2642
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
2643
+ }
2644
+ const obj_status = obj.status;
2645
+ const path_status = path + '.status';
2646
+ if (typeof obj_status !== 'string') {
2647
+ return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
2648
+ }
2649
+ })();
2650
+ return v_error === undefined ? null : v_error;
2651
+ }
2652
+ const select$b = function RecordRollupSyncExecutionOutputRepresentationSelect() {
2653
+ const { selections: RecordRollupSyncExecutionErrorOutputRepresentation__selections, opaque: RecordRollupSyncExecutionErrorOutputRepresentation__opaque, } = select$c();
2654
+ return {
2655
+ kind: 'Fragment',
2656
+ version: VERSION$7,
2657
+ private: [],
2658
+ selections: [
2659
+ {
2660
+ name: 'error',
2661
+ kind: 'Object',
2662
+ selections: RecordRollupSyncExecutionErrorOutputRepresentation__selections,
2663
+ required: false
2664
+ },
2665
+ {
2666
+ name: 'id',
2667
+ kind: 'Scalar'
2668
+ },
2669
+ {
2670
+ name: 'status',
2671
+ kind: 'Scalar'
2672
+ }
2673
+ ]
2674
+ };
2675
+ };
2676
+ function equals$7(existing, incoming) {
2677
+ const existing_id = existing.id;
2678
+ const incoming_id = incoming.id;
2679
+ if (!(existing_id === incoming_id)) {
2680
+ return false;
2681
+ }
2682
+ const existing_status = existing.status;
2683
+ const incoming_status = incoming.status;
2684
+ if (!(existing_status === incoming_status)) {
2685
+ return false;
2686
+ }
2687
+ const existing_error = existing.error;
2688
+ const incoming_error = incoming.error;
2689
+ // if at least one of these optionals is defined
2690
+ if (existing_error !== undefined || incoming_error !== undefined) {
2691
+ // if one of these is not defined we know the other is defined and therefore
2692
+ // not equal
2693
+ if (existing_error === undefined || incoming_error === undefined) {
2694
+ return false;
2695
+ }
2696
+ if (!(equals$8(existing_error, incoming_error))) {
2697
+ return false;
2698
+ }
2699
+ }
2700
+ return true;
2701
+ }
2702
+
2703
+ const VERSION$6 = "073553fbf5d6e00bd64663ab28817830";
2704
+ function validate$b(obj, path = 'BulkRecordRollupSyncExecutionOutputRepresentation') {
2705
+ const v_error = (() => {
2706
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2707
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2708
+ }
2709
+ const obj_definitions = obj.definitions;
2710
+ const path_definitions = path + '.definitions';
2711
+ if (!ArrayIsArray(obj_definitions)) {
2712
+ return new TypeError('Expected "array" but received "' + typeof obj_definitions + '" (at "' + path_definitions + '")');
2713
+ }
2714
+ for (let i = 0; i < obj_definitions.length; i++) {
2715
+ const obj_definitions_item = obj_definitions[i];
2716
+ const path_definitions_item = path_definitions + '[' + i + ']';
2717
+ const referencepath_definitions_itemValidationError = validate$c(obj_definitions_item, path_definitions_item);
2718
+ if (referencepath_definitions_itemValidationError !== null) {
2719
+ let message = 'Object doesn\'t match RecordRollupSyncExecutionOutputRepresentation (at "' + path_definitions_item + '")\n';
2720
+ message += referencepath_definitions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2721
+ return new TypeError(message);
2722
+ }
2723
+ }
2724
+ const obj_errors = obj.errors;
2725
+ const path_errors = path + '.errors';
2726
+ if (typeof obj_errors !== 'boolean') {
2727
+ return new TypeError('Expected "boolean" but received "' + typeof obj_errors + '" (at "' + path_errors + '")');
2728
+ }
2729
+ const obj_message = obj.message;
2730
+ const path_message = path + '.message';
2731
+ if (typeof obj_message !== 'string') {
2732
+ return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
2733
+ }
2734
+ const obj_statusCode = obj.statusCode;
2735
+ const path_statusCode = path + '.statusCode';
2736
+ if (typeof obj_statusCode !== 'string') {
2737
+ return new TypeError('Expected "string" but received "' + typeof obj_statusCode + '" (at "' + path_statusCode + '")');
2738
+ }
2739
+ })();
2740
+ return v_error === undefined ? null : v_error;
2741
+ }
2742
+ const RepresentationType$3 = 'BulkRecordRollupSyncExecutionOutputRepresentation';
2743
+ function keyBuilder$3(luvio, config) {
2744
+ return keyPrefix + '::' + RepresentationType$3 + ':' + config.id;
2745
+ }
2746
+ function keyBuilderFromType$3(luvio, object) {
2747
+ const keyParams = {
2748
+ id: object.statusCode
2749
+ };
2750
+ return keyBuilder$3(luvio, keyParams);
2751
+ }
2752
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
2753
+ return input;
2754
+ }
2755
+ const select$a = function BulkRecordRollupSyncExecutionOutputRepresentationSelect() {
2756
+ const { selections: RecordRollupSyncExecutionOutputRepresentation__selections, opaque: RecordRollupSyncExecutionOutputRepresentation__opaque, } = select$b();
2757
+ return {
2758
+ kind: 'Fragment',
2759
+ version: VERSION$6,
2760
+ private: [],
2761
+ selections: [
2762
+ {
2763
+ name: 'definitions',
2764
+ kind: 'Object',
2765
+ plural: true,
2766
+ selections: RecordRollupSyncExecutionOutputRepresentation__selections
2767
+ },
2768
+ {
2769
+ name: 'errors',
2770
+ kind: 'Scalar'
2771
+ },
2772
+ {
2773
+ name: 'message',
2774
+ kind: 'Scalar'
2775
+ },
2776
+ {
2777
+ name: 'statusCode',
2778
+ kind: 'Scalar'
2779
+ }
2780
+ ]
2781
+ };
2782
+ };
2783
+ function equals$6(existing, incoming) {
2784
+ const existing_errors = existing.errors;
2785
+ const incoming_errors = incoming.errors;
2786
+ if (!(existing_errors === incoming_errors)) {
2787
+ return false;
2788
+ }
2789
+ const existing_message = existing.message;
2790
+ const incoming_message = incoming.message;
2791
+ if (!(existing_message === incoming_message)) {
2792
+ return false;
2793
+ }
2794
+ const existing_statusCode = existing.statusCode;
2795
+ const incoming_statusCode = incoming.statusCode;
2796
+ if (!(existing_statusCode === incoming_statusCode)) {
2797
+ return false;
2798
+ }
2799
+ const existing_definitions = existing.definitions;
2800
+ const incoming_definitions = incoming.definitions;
2801
+ const equals_definitions_items = equalsArray(existing_definitions, incoming_definitions, (existing_definitions_item, incoming_definitions_item) => {
2802
+ if (!(equals$7(existing_definitions_item, incoming_definitions_item))) {
2803
+ return false;
2804
+ }
2805
+ });
2806
+ if (equals_definitions_items === false) {
2807
+ return false;
2808
+ }
2809
+ return true;
2810
+ }
2811
+ const ingest$3 = function BulkRecordRollupSyncExecutionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
2812
+ if (process.env.NODE_ENV !== 'production') {
2813
+ const validateError = validate$b(input);
2814
+ if (validateError !== null) {
2815
+ throw validateError;
2816
+ }
2817
+ }
2818
+ const key = keyBuilderFromType$3(luvio, input);
2819
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 100;
2820
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "IndustriesRecordAggregation", VERSION$6, RepresentationType$3, equals$6);
2821
+ return createLink(key);
2822
+ };
2823
+ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
2824
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
2825
+ const rootKey = keyBuilderFromType$3(luvio, input);
2826
+ rootKeySet.set(rootKey, {
2827
+ namespace: keyPrefix,
2828
+ representationName: RepresentationType$3,
2829
+ mergeable: false
2830
+ });
2831
+ }
2832
+
2833
+ function select$9(luvio, params) {
2834
+ return select$a();
2835
+ }
2836
+ function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
2837
+ getTypeCacheKeys$3(storeKeyMap, luvio, response);
2838
+ }
2839
+ function ingestSuccess$3(luvio, resourceParams, response) {
2840
+ const { body } = response;
2841
+ const key = keyBuilderFromType$3(luvio, body);
2842
+ luvio.storeIngest(key, ingest$3, body);
2843
+ const snapshot = luvio.storeLookup({
2844
+ recordId: key,
2845
+ node: select$9(),
2846
+ variables: {},
2847
+ });
2848
+ if (process.env.NODE_ENV !== 'production') {
2849
+ if (snapshot.state !== 'Fulfilled') {
2850
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
2851
+ }
2852
+ }
2853
+ deepFreeze(snapshot.data);
2854
+ return snapshot;
2855
+ }
2856
+ function createResourceRequest$3(config) {
2857
+ const headers = {};
2858
+ return {
2859
+ baseUri: '/services/data/v66.0',
2860
+ basePath: '/connect/record-aggregation/bulk-record-rollup/sync-execution',
2861
+ method: 'post',
2862
+ body: config.body,
2863
+ urlParams: {},
2864
+ queryParams: {},
2865
+ headers,
2866
+ priority: 'normal',
2867
+ };
2868
+ }
2869
+
2870
+ const adapterName$3 = 'performBulkRecordRollupSyncExecution';
2871
+ const performBulkRecordRollupSyncExecution_ConfigPropertyMetadata = [
2872
+ generateParamConfigMetadata('definitions', true, 2 /* Body */, 4 /* Unsupported */, true),
2873
+ ];
2874
+ const performBulkRecordRollupSyncExecution_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, performBulkRecordRollupSyncExecution_ConfigPropertyMetadata);
2875
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$a(performBulkRecordRollupSyncExecution_ConfigPropertyMetadata);
2876
+ function typeCheckConfig$3(untrustedConfig) {
2877
+ const config = {};
2878
+ const untrustedConfig_definitions = untrustedConfig.definitions;
2879
+ if (ArrayIsArray$1(untrustedConfig_definitions)) {
2880
+ const untrustedConfig_definitions_array = [];
2881
+ for (let i = 0, arrayLength = untrustedConfig_definitions.length; i < arrayLength; i++) {
2882
+ const untrustedConfig_definitions_item = untrustedConfig_definitions[i];
2883
+ const referenceRecordRollupSyncExecutionInputRepresentationValidationError = validate$e(untrustedConfig_definitions_item);
2884
+ if (referenceRecordRollupSyncExecutionInputRepresentationValidationError === null) {
2885
+ untrustedConfig_definitions_array.push(untrustedConfig_definitions_item);
2886
+ }
2887
+ }
2888
+ config.definitions = untrustedConfig_definitions_array;
2889
+ }
2890
+ return config;
2891
+ }
2892
+ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
2893
+ if (!untrustedIsObject(untrustedConfig)) {
2894
+ return null;
2895
+ }
2896
+ if (process.env.NODE_ENV !== 'production') {
2897
+ validateConfig(untrustedConfig, configPropertyNames);
2898
+ }
2899
+ const config = typeCheckConfig$3(untrustedConfig);
2900
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
2901
+ return null;
2902
+ }
2903
+ return config;
2904
+ }
2905
+ function buildNetworkSnapshot$3(luvio, config, options) {
2906
+ const resourceParams = createResourceParams$3(config);
2907
+ const request = createResourceRequest$3(resourceParams);
2908
+ return luvio.dispatchResourceRequest(request, options)
2909
+ .then((response) => {
2910
+ return luvio.handleSuccessResponse(() => {
2911
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response);
2912
+ return luvio.storeBroadcast().then(() => snapshot);
2913
+ }, () => {
2914
+ const cache = new StoreKeyMap();
2915
+ getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
2916
+ return cache;
2917
+ });
2918
+ }, (response) => {
2919
+ deepFreeze(response);
2920
+ throw response;
2921
+ });
2922
+ }
2923
+ const performBulkRecordRollupSyncExecutionAdapterFactory = (luvio) => {
2924
+ return function performBulkRecordRollupSyncExecution(untrustedConfig) {
2925
+ const config = validateAdapterConfig$3(untrustedConfig, performBulkRecordRollupSyncExecution_ConfigPropertyNames);
2926
+ // Invalid or incomplete config
2927
+ if (config === null) {
2928
+ throw new Error('Invalid config for "performBulkRecordRollupSyncExecution"');
2929
+ }
2930
+ return buildNetworkSnapshot$3(luvio, config);
2931
+ };
2932
+ };
2933
+
2934
+ const VERSION$5 = "02daf0b89e25c17101427c70217f6ffb";
2935
+ function validate$a(obj, path = 'RecordRollupResultColumnOutputRepresentation') {
2936
+ const v_error = (() => {
2937
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2938
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2939
+ }
2940
+ const obj_displayFormatType = obj.displayFormatType;
2941
+ const path_displayFormatType = path + '.displayFormatType';
2942
+ if (typeof obj_displayFormatType !== 'string') {
2943
+ return new TypeError('Expected "string" but received "' + typeof obj_displayFormatType + '" (at "' + path_displayFormatType + '")');
2944
+ }
2945
+ const obj_fieldApiName = obj.fieldApiName;
2946
+ const path_fieldApiName = path + '.fieldApiName';
2947
+ if (typeof obj_fieldApiName !== 'string') {
2948
+ return new TypeError('Expected "string" but received "' + typeof obj_fieldApiName + '" (at "' + path_fieldApiName + '")');
2949
+ }
2950
+ const obj_fieldLabel = obj.fieldLabel;
2951
+ const path_fieldLabel = path + '.fieldLabel';
2952
+ if (typeof obj_fieldLabel !== 'string') {
2953
+ return new TypeError('Expected "string" but received "' + typeof obj_fieldLabel + '" (at "' + path_fieldLabel + '")');
2954
+ }
2955
+ const obj_isRedirectionEnabled = obj.isRedirectionEnabled;
2956
+ const path_isRedirectionEnabled = path + '.isRedirectionEnabled';
2957
+ if (typeof obj_isRedirectionEnabled !== 'boolean') {
2958
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isRedirectionEnabled + '" (at "' + path_isRedirectionEnabled + '")');
2959
+ }
2960
+ const obj_isSortable = obj.isSortable;
2961
+ const path_isSortable = path + '.isSortable';
2962
+ if (typeof obj_isSortable !== 'boolean') {
2963
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isSortable + '" (at "' + path_isSortable + '")');
2964
+ }
2965
+ const obj_isTypeName = obj.isTypeName;
2966
+ const path_isTypeName = path + '.isTypeName';
2967
+ if (typeof obj_isTypeName !== 'boolean') {
2968
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isTypeName + '" (at "' + path_isTypeName + '")');
2969
+ }
2970
+ const obj_sequence = obj.sequence;
2971
+ const path_sequence = path + '.sequence';
2972
+ if (typeof obj_sequence !== 'number' || (typeof obj_sequence === 'number' && Math.floor(obj_sequence) !== obj_sequence)) {
2973
+ return new TypeError('Expected "integer" but received "' + typeof obj_sequence + '" (at "' + path_sequence + '")');
2974
+ }
2975
+ const obj_sortByField = obj.sortByField;
2976
+ const path_sortByField = path + '.sortByField';
2977
+ if (typeof obj_sortByField !== 'string') {
2978
+ return new TypeError('Expected "string" but received "' + typeof obj_sortByField + '" (at "' + path_sortByField + '")');
2979
+ }
2980
+ })();
2981
+ return v_error === undefined ? null : v_error;
2982
+ }
2983
+ const select$8 = function RecordRollupResultColumnOutputRepresentationSelect() {
2984
+ return {
2985
+ kind: 'Fragment',
2986
+ version: VERSION$5,
2987
+ private: [],
2988
+ selections: [
2989
+ {
2990
+ name: 'displayFormatType',
2991
+ kind: 'Scalar'
2992
+ },
2993
+ {
2994
+ name: 'fieldApiName',
2995
+ kind: 'Scalar'
2996
+ },
2997
+ {
2998
+ name: 'fieldLabel',
2999
+ kind: 'Scalar'
3000
+ },
3001
+ {
3002
+ name: 'isRedirectionEnabled',
3003
+ kind: 'Scalar'
3004
+ },
3005
+ {
3006
+ name: 'isSortable',
3007
+ kind: 'Scalar'
3008
+ },
3009
+ {
3010
+ name: 'isTypeName',
3011
+ kind: 'Scalar'
3012
+ },
3013
+ {
3014
+ name: 'sequence',
3015
+ kind: 'Scalar'
3016
+ },
3017
+ {
3018
+ name: 'sortByField',
3019
+ kind: 'Scalar'
3020
+ }
3021
+ ]
3022
+ };
3023
+ };
3024
+ function equals$5(existing, incoming) {
3025
+ const existing_isRedirectionEnabled = existing.isRedirectionEnabled;
3026
+ const incoming_isRedirectionEnabled = incoming.isRedirectionEnabled;
3027
+ if (!(existing_isRedirectionEnabled === incoming_isRedirectionEnabled)) {
3028
+ return false;
3029
+ }
3030
+ const existing_isSortable = existing.isSortable;
3031
+ const incoming_isSortable = incoming.isSortable;
3032
+ if (!(existing_isSortable === incoming_isSortable)) {
3033
+ return false;
3034
+ }
3035
+ const existing_isTypeName = existing.isTypeName;
3036
+ const incoming_isTypeName = incoming.isTypeName;
3037
+ if (!(existing_isTypeName === incoming_isTypeName)) {
3038
+ return false;
3039
+ }
3040
+ const existing_sequence = existing.sequence;
3041
+ const incoming_sequence = incoming.sequence;
3042
+ if (!(existing_sequence === incoming_sequence)) {
3043
+ return false;
3044
+ }
3045
+ const existing_displayFormatType = existing.displayFormatType;
3046
+ const incoming_displayFormatType = incoming.displayFormatType;
3047
+ if (!(existing_displayFormatType === incoming_displayFormatType)) {
3048
+ return false;
3049
+ }
3050
+ const existing_fieldApiName = existing.fieldApiName;
3051
+ const incoming_fieldApiName = incoming.fieldApiName;
3052
+ if (!(existing_fieldApiName === incoming_fieldApiName)) {
3053
+ return false;
3054
+ }
3055
+ const existing_fieldLabel = existing.fieldLabel;
3056
+ const incoming_fieldLabel = incoming.fieldLabel;
3057
+ if (!(existing_fieldLabel === incoming_fieldLabel)) {
3058
+ return false;
3059
+ }
3060
+ const existing_sortByField = existing.sortByField;
3061
+ const incoming_sortByField = incoming.sortByField;
3062
+ if (!(existing_sortByField === incoming_sortByField)) {
3063
+ return false;
3064
+ }
3065
+ return true;
3066
+ }
3067
+
3068
+ const VERSION$4 = "3f96fe3b7f6f6b28852304ac9f5bb831";
3069
+ function validate$9(obj, path = 'RecordRollupResultLastUpdatedDetailsOutputRepresentation') {
3070
+ const v_error = (() => {
3071
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
3072
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
3073
+ }
3074
+ if (obj.epochTime !== undefined) {
3075
+ obj.epochTime;
3076
+ }
3077
+ if (obj.errorType !== undefined) {
3078
+ const obj_errorType = obj.errorType;
3079
+ const path_errorType = path + '.errorType';
3080
+ if (typeof obj_errorType !== 'string') {
3081
+ return new TypeError('Expected "string" but received "' + typeof obj_errorType + '" (at "' + path_errorType + '")');
3082
+ }
3083
+ }
3084
+ if (obj.processingMode !== undefined) {
3085
+ const obj_processingMode = obj.processingMode;
3086
+ const path_processingMode = path + '.processingMode';
3087
+ if (typeof obj_processingMode !== 'string') {
3088
+ return new TypeError('Expected "string" but received "' + typeof obj_processingMode + '" (at "' + path_processingMode + '")');
3089
+ }
3090
+ }
3091
+ })();
3092
+ return v_error === undefined ? null : v_error;
3093
+ }
3094
+ const select$7 = function RecordRollupResultLastUpdatedDetailsOutputRepresentationSelect() {
3095
+ return {
3096
+ kind: 'Fragment',
3097
+ version: VERSION$4,
3098
+ private: [],
3099
+ selections: [
3100
+ {
3101
+ name: 'epochTime',
3102
+ kind: 'Scalar',
3103
+ required: false
3104
+ },
3105
+ {
3106
+ name: 'errorType',
3107
+ kind: 'Scalar',
3108
+ required: false
3109
+ },
3110
+ {
3111
+ name: 'processingMode',
3112
+ kind: 'Scalar',
3113
+ required: false
3114
+ }
3115
+ ]
3116
+ };
3117
+ };
3118
+ function equals$4(existing, incoming) {
3119
+ const existing_errorType = existing.errorType;
3120
+ const incoming_errorType = incoming.errorType;
3121
+ // if at least one of these optionals is defined
3122
+ if (existing_errorType !== undefined || incoming_errorType !== undefined) {
3123
+ // if one of these is not defined we know the other is defined and therefore
3124
+ // not equal
3125
+ if (existing_errorType === undefined || incoming_errorType === undefined) {
3126
+ return false;
3127
+ }
3128
+ if (!(existing_errorType === incoming_errorType)) {
3129
+ return false;
3130
+ }
3131
+ }
3132
+ const existing_processingMode = existing.processingMode;
3133
+ const incoming_processingMode = incoming.processingMode;
3134
+ // if at least one of these optionals is defined
3135
+ if (existing_processingMode !== undefined || incoming_processingMode !== undefined) {
3136
+ // if one of these is not defined we know the other is defined and therefore
3137
+ // not equal
3138
+ if (existing_processingMode === undefined || incoming_processingMode === undefined) {
3139
+ return false;
3140
+ }
3141
+ if (!(existing_processingMode === incoming_processingMode)) {
3142
+ return false;
3143
+ }
3144
+ }
3145
+ const existing_epochTime = existing.epochTime;
3146
+ const incoming_epochTime = incoming.epochTime;
3147
+ // if at least one of these optionals is defined
3148
+ if (existing_epochTime !== undefined || incoming_epochTime !== undefined) {
3149
+ // if one of these is not defined we know the other is defined and therefore
3150
+ // not equal
3151
+ if (existing_epochTime === undefined || incoming_epochTime === undefined) {
3152
+ return false;
3153
+ }
3154
+ if (!(existing_epochTime === incoming_epochTime)) {
3155
+ return false;
3156
+ }
3157
+ }
3158
+ return true;
3159
+ }
3160
+
3161
+ const VERSION$3 = "884b768851eba2313c1ed3ea0b6f454d";
3162
+ function validate$8(obj, path = 'RecordRollupResultRowOutputRepresentation') {
3163
+ const v_error = (() => {
3164
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
3165
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
3166
+ }
3167
+ const obj_rowData = obj.rowData;
3168
+ const path_rowData = path + '.rowData';
3169
+ if (typeof obj_rowData !== 'object' || ArrayIsArray(obj_rowData) || obj_rowData === null) {
3170
+ return new TypeError('Expected "object" but received "' + typeof obj_rowData + '" (at "' + path_rowData + '")');
3171
+ }
3172
+ const obj_rowData_keys = ObjectKeys(obj_rowData);
3173
+ for (let i = 0; i < obj_rowData_keys.length; i++) {
3174
+ const key = obj_rowData_keys[i];
3175
+ const obj_rowData_prop = obj_rowData[key];
3176
+ const path_rowData_prop = path_rowData + '["' + key + '"]';
3177
+ if (obj_rowData_prop === undefined) {
3178
+ return new TypeError('Expected "defined" but received "' + typeof obj_rowData_prop + '" (at "' + path_rowData_prop + '")');
3179
+ }
3180
+ }
3181
+ })();
3182
+ return v_error === undefined ? null : v_error;
3183
+ }
3184
+ const select$6 = function RecordRollupResultRowOutputRepresentationSelect() {
3185
+ return {
3186
+ kind: 'Fragment',
3187
+ version: VERSION$3,
3188
+ private: [],
3189
+ selections: [
3190
+ {
3191
+ name: 'rowData',
3192
+ kind: 'Object',
3193
+ // any
3194
+ }
3195
+ ]
3196
+ };
3197
+ };
3198
+ function equals$3(existing, incoming) {
3199
+ const existing_rowData = existing.rowData;
3200
+ const incoming_rowData = incoming.rowData;
3201
+ const equals_rowData_props = equalsObject(existing_rowData, incoming_rowData, (existing_rowData_prop, incoming_rowData_prop) => {
3202
+ if (JSONStringify(incoming_rowData_prop) !== JSONStringify(existing_rowData_prop)) {
3203
+ return false;
3204
+ }
3205
+ });
3206
+ if (equals_rowData_props === false) {
3207
+ return false;
3208
+ }
3209
+ return true;
3210
+ }
3211
+
3212
+ const VERSION$2 = "b3be598192cbe208886cb93a56e0ec87";
3213
+ function validate$7(obj, path = 'RecordRollupResultOutputRepresentation') {
3214
+ const v_error = (() => {
3215
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
3216
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
3217
+ }
3218
+ const obj_columns = obj.columns;
3219
+ const path_columns = path + '.columns';
3220
+ if (!ArrayIsArray(obj_columns)) {
3221
+ return new TypeError('Expected "array" but received "' + typeof obj_columns + '" (at "' + path_columns + '")');
3222
+ }
3223
+ for (let i = 0; i < obj_columns.length; i++) {
3224
+ const obj_columns_item = obj_columns[i];
3225
+ const path_columns_item = path_columns + '[' + i + ']';
3226
+ const referencepath_columns_itemValidationError = validate$a(obj_columns_item, path_columns_item);
3227
+ if (referencepath_columns_itemValidationError !== null) {
3228
+ let message = 'Object doesn\'t match RecordRollupResultColumnOutputRepresentation (at "' + path_columns_item + '")\n';
3229
+ message += referencepath_columns_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
3230
+ return new TypeError(message);
3231
+ }
3232
+ }
3233
+ const obj_definitionDisplayName = obj.definitionDisplayName;
3234
+ const path_definitionDisplayName = path + '.definitionDisplayName';
3235
+ if (typeof obj_definitionDisplayName !== 'string') {
3236
+ return new TypeError('Expected "string" but received "' + typeof obj_definitionDisplayName + '" (at "' + path_definitionDisplayName + '")');
3237
+ }
3238
+ if (obj.lastUpdatedDetails !== undefined) {
3239
+ const obj_lastUpdatedDetails = obj.lastUpdatedDetails;
3240
+ const path_lastUpdatedDetails = path + '.lastUpdatedDetails';
3241
+ const referencepath_lastUpdatedDetailsValidationError = validate$9(obj_lastUpdatedDetails, path_lastUpdatedDetails);
3242
+ if (referencepath_lastUpdatedDetailsValidationError !== null) {
3243
+ let message = 'Object doesn\'t match RecordRollupResultLastUpdatedDetailsOutputRepresentation (at "' + path_lastUpdatedDetails + '")\n';
3244
+ message += referencepath_lastUpdatedDetailsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
3245
+ return new TypeError(message);
3246
+ }
3247
+ }
3248
+ const obj_message = obj.message;
3249
+ const path_message = path + '.message';
3250
+ if (typeof obj_message !== 'string') {
3251
+ return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
3252
+ }
3253
+ const obj_rows = obj.rows;
3254
+ const path_rows = path + '.rows';
3255
+ if (!ArrayIsArray(obj_rows)) {
3256
+ return new TypeError('Expected "array" but received "' + typeof obj_rows + '" (at "' + path_rows + '")');
3257
+ }
3258
+ for (let i = 0; i < obj_rows.length; i++) {
3259
+ const obj_rows_item = obj_rows[i];
3260
+ const path_rows_item = path_rows + '[' + i + ']';
3261
+ const referencepath_rows_itemValidationError = validate$8(obj_rows_item, path_rows_item);
3262
+ if (referencepath_rows_itemValidationError !== null) {
3263
+ let message = 'Object doesn\'t match RecordRollupResultRowOutputRepresentation (at "' + path_rows_item + '")\n';
3264
+ message += referencepath_rows_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
3265
+ return new TypeError(message);
3266
+ }
3267
+ }
3268
+ const obj_statusCode = obj.statusCode;
3269
+ const path_statusCode = path + '.statusCode';
3270
+ if (typeof obj_statusCode !== 'string') {
3271
+ return new TypeError('Expected "string" but received "' + typeof obj_statusCode + '" (at "' + path_statusCode + '")');
3272
+ }
3273
+ const obj_totalResultCount = obj.totalResultCount;
3274
+ const path_totalResultCount = path + '.totalResultCount';
3275
+ if (typeof obj_totalResultCount !== 'number' || (typeof obj_totalResultCount === 'number' && Math.floor(obj_totalResultCount) !== obj_totalResultCount)) {
3276
+ return new TypeError('Expected "integer" but received "' + typeof obj_totalResultCount + '" (at "' + path_totalResultCount + '")');
3277
+ }
3278
+ })();
3279
+ return v_error === undefined ? null : v_error;
3280
+ }
3281
+ const RepresentationType$2 = 'RecordRollupResultOutputRepresentation';
3282
+ function keyBuilder$2(luvio, config) {
3283
+ return keyPrefix + '::' + RepresentationType$2 + ':' + config.id;
3284
+ }
3285
+ function keyBuilderFromType$2(luvio, object) {
3286
+ const keyParams = {
3287
+ id: object.definitionDisplayName
3288
+ };
3289
+ return keyBuilder$2(luvio, keyParams);
3290
+ }
3291
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
3292
+ return input;
3293
+ }
3294
+ const select$5 = function RecordRollupResultOutputRepresentationSelect() {
3295
+ const { selections: RecordRollupResultColumnOutputRepresentation__selections, opaque: RecordRollupResultColumnOutputRepresentation__opaque, } = select$8();
3296
+ const { selections: RecordRollupResultLastUpdatedDetailsOutputRepresentation__selections, opaque: RecordRollupResultLastUpdatedDetailsOutputRepresentation__opaque, } = select$7();
3297
+ const { selections: RecordRollupResultRowOutputRepresentation__selections, opaque: RecordRollupResultRowOutputRepresentation__opaque, } = select$6();
3298
+ return {
3299
+ kind: 'Fragment',
3300
+ version: VERSION$2,
3301
+ private: [],
3302
+ selections: [
3303
+ {
3304
+ name: 'columns',
3305
+ kind: 'Object',
3306
+ plural: true,
3307
+ selections: RecordRollupResultColumnOutputRepresentation__selections
3308
+ },
3309
+ {
3310
+ name: 'definitionDisplayName',
3311
+ kind: 'Scalar'
3312
+ },
3313
+ {
3314
+ name: 'lastUpdatedDetails',
3315
+ kind: 'Object',
3316
+ selections: RecordRollupResultLastUpdatedDetailsOutputRepresentation__selections,
3317
+ required: false
3318
+ },
3319
+ {
3320
+ name: 'message',
3321
+ kind: 'Scalar'
3322
+ },
3323
+ {
3324
+ name: 'rows',
3325
+ kind: 'Object',
3326
+ plural: true,
3327
+ selections: RecordRollupResultRowOutputRepresentation__selections
3328
+ },
3329
+ {
3330
+ name: 'statusCode',
3331
+ kind: 'Scalar'
3332
+ },
3333
+ {
3334
+ name: 'totalResultCount',
3335
+ kind: 'Scalar'
3336
+ }
3337
+ ]
3338
+ };
3339
+ };
3340
+ function equals$2(existing, incoming) {
3341
+ const existing_totalResultCount = existing.totalResultCount;
3342
+ const incoming_totalResultCount = incoming.totalResultCount;
3343
+ if (!(existing_totalResultCount === incoming_totalResultCount)) {
3344
+ return false;
3345
+ }
3346
+ const existing_definitionDisplayName = existing.definitionDisplayName;
3347
+ const incoming_definitionDisplayName = incoming.definitionDisplayName;
3348
+ if (!(existing_definitionDisplayName === incoming_definitionDisplayName)) {
3349
+ return false;
3350
+ }
3351
+ const existing_message = existing.message;
3352
+ const incoming_message = incoming.message;
3353
+ if (!(existing_message === incoming_message)) {
3354
+ return false;
3355
+ }
3356
+ const existing_statusCode = existing.statusCode;
3357
+ const incoming_statusCode = incoming.statusCode;
3358
+ if (!(existing_statusCode === incoming_statusCode)) {
3359
+ return false;
3360
+ }
3361
+ const existing_columns = existing.columns;
3362
+ const incoming_columns = incoming.columns;
3363
+ const equals_columns_items = equalsArray(existing_columns, incoming_columns, (existing_columns_item, incoming_columns_item) => {
3364
+ if (!(equals$5(existing_columns_item, incoming_columns_item))) {
3365
+ return false;
3366
+ }
3367
+ });
3368
+ if (equals_columns_items === false) {
3369
+ return false;
3370
+ }
3371
+ const existing_lastUpdatedDetails = existing.lastUpdatedDetails;
3372
+ const incoming_lastUpdatedDetails = incoming.lastUpdatedDetails;
3373
+ // if at least one of these optionals is defined
3374
+ if (existing_lastUpdatedDetails !== undefined || incoming_lastUpdatedDetails !== undefined) {
3375
+ // if one of these is not defined we know the other is defined and therefore
3376
+ // not equal
3377
+ if (existing_lastUpdatedDetails === undefined || incoming_lastUpdatedDetails === undefined) {
3378
+ return false;
3379
+ }
3380
+ if (!(equals$4(existing_lastUpdatedDetails, incoming_lastUpdatedDetails))) {
3381
+ return false;
3382
+ }
3383
+ }
3384
+ const existing_rows = existing.rows;
3385
+ const incoming_rows = incoming.rows;
3386
+ const equals_rows_items = equalsArray(existing_rows, incoming_rows, (existing_rows_item, incoming_rows_item) => {
3387
+ if (!(equals$3(existing_rows_item, incoming_rows_item))) {
3388
+ return false;
3389
+ }
3390
+ });
3391
+ if (equals_rows_items === false) {
3392
+ return false;
3393
+ }
3394
+ return true;
3395
+ }
3396
+ const ingest$2 = function RecordRollupResultOutputRepresentationIngest(input, path, luvio, store, timestamp) {
3397
+ if (process.env.NODE_ENV !== 'production') {
3398
+ const validateError = validate$7(input);
3399
+ if (validateError !== null) {
3400
+ throw validateError;
3401
+ }
3402
+ }
3403
+ const key = keyBuilderFromType$2(luvio, input);
3404
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 100;
3405
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "IndustriesRecordAggregation", VERSION$2, RepresentationType$2, equals$2);
3406
+ return createLink(key);
3407
+ };
3408
+ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
3409
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
3410
+ const rootKey = keyBuilderFromType$2(luvio, input);
3411
+ rootKeySet.set(rootKey, {
3412
+ namespace: keyPrefix,
3413
+ representationName: RepresentationType$2,
3414
+ mergeable: false
3415
+ });
3416
+ }
3417
+
3418
+ function select$4(luvio, params) {
3419
+ return select$5();
3420
+ }
3421
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
3422
+ getTypeCacheKeys$2(storeKeyMap, luvio, response);
3423
+ }
3424
+ function ingestSuccess$2(luvio, resourceParams, response) {
3425
+ const { body } = response;
3426
+ const key = keyBuilderFromType$2(luvio, body);
3427
+ luvio.storeIngest(key, ingest$2, body);
3428
+ const snapshot = luvio.storeLookup({
3429
+ recordId: key,
3430
+ node: select$4(),
3431
+ variables: {},
3432
+ });
3433
+ if (process.env.NODE_ENV !== 'production') {
3434
+ if (snapshot.state !== 'Fulfilled') {
3435
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
3436
+ }
3437
+ }
3438
+ deepFreeze(snapshot.data);
3439
+ return snapshot;
3440
+ }
3441
+ function createResourceRequest$2(config) {
3442
+ const headers = {};
3443
+ return {
3444
+ baseUri: '/services/data/v66.0',
3445
+ basePath: '/connect/record-aggregation/' + config.urlParams.recordAggregationDefinitionId + '/record-rollup-results',
3446
+ method: 'post',
3447
+ body: config.body,
3448
+ urlParams: config.urlParams,
3449
+ queryParams: config.queryParams,
3450
+ headers,
3451
+ priority: 'normal',
3452
+ };
3453
+ }
3454
+
3455
+ const adapterName$2 = 'postGenerateRecordRollupResult';
3456
+ const postGenerateRecordRollupResult_ConfigPropertyMetadata = [
3457
+ generateParamConfigMetadata('recordAggregationDefinitionId', true, 0 /* UrlParameter */, 0 /* String */),
3458
+ generateParamConfigMetadata('anchorRecordId', false, 1 /* QueryParameter */, 0 /* String */),
3459
+ generateParamConfigMetadata('isSortOrderAscending', false, 2 /* Body */, 1 /* Boolean */),
3460
+ generateParamConfigMetadata('sortBy', false, 2 /* Body */, 0 /* String */),
3461
+ ];
3462
+ const postGenerateRecordRollupResult_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, postGenerateRecordRollupResult_ConfigPropertyMetadata);
3463
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$a(postGenerateRecordRollupResult_ConfigPropertyMetadata);
3464
+ function typeCheckConfig$2(untrustedConfig) {
3465
+ const config = {};
3466
+ typeCheckConfig$a(untrustedConfig, config, postGenerateRecordRollupResult_ConfigPropertyMetadata);
3467
+ return config;
3468
+ }
3469
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
3470
+ if (!untrustedIsObject(untrustedConfig)) {
3471
+ return null;
3472
+ }
3473
+ if (process.env.NODE_ENV !== 'production') {
3474
+ validateConfig(untrustedConfig, configPropertyNames);
3475
+ }
3476
+ const config = typeCheckConfig$2(untrustedConfig);
3477
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
3478
+ return null;
3479
+ }
3480
+ return config;
3481
+ }
3482
+ function buildNetworkSnapshot$2(luvio, config, options) {
3483
+ const resourceParams = createResourceParams$2(config);
3484
+ const request = createResourceRequest$2(resourceParams);
3485
+ return luvio.dispatchResourceRequest(request, options)
3486
+ .then((response) => {
3487
+ return luvio.handleSuccessResponse(() => {
3488
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response);
3489
+ return luvio.storeBroadcast().then(() => snapshot);
3490
+ }, () => {
3491
+ const cache = new StoreKeyMap();
3492
+ getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
3493
+ return cache;
3494
+ });
3495
+ }, (response) => {
3496
+ deepFreeze(response);
3497
+ throw response;
3498
+ });
3499
+ }
3500
+ const postGenerateRecordRollupResultAdapterFactory = (luvio) => {
3501
+ return function postGenerateRecordRollupResult(untrustedConfig) {
3502
+ const config = validateAdapterConfig$2(untrustedConfig, postGenerateRecordRollupResult_ConfigPropertyNames);
3503
+ // Invalid or incomplete config
3504
+ if (config === null) {
3505
+ throw new Error('Invalid config for "postGenerateRecordRollupResult"');
3506
+ }
3507
+ return buildNetworkSnapshot$2(luvio, config);
3508
+ };
3509
+ };
3510
+
3511
+ function validate$6(obj, path = 'RecordAggregationFilterRowInputRepresentation') {
3512
+ const v_error = (() => {
3513
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
3514
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
3515
+ }
3516
+ const obj_fieldApiName = obj.fieldApiName;
3517
+ const path_fieldApiName = path + '.fieldApiName';
3518
+ if (typeof obj_fieldApiName !== 'string') {
3519
+ return new TypeError('Expected "string" but received "' + typeof obj_fieldApiName + '" (at "' + path_fieldApiName + '")');
3520
+ }
3521
+ const obj_operator = obj.operator;
3522
+ const path_operator = path + '.operator';
3523
+ if (typeof obj_operator !== 'string') {
3524
+ return new TypeError('Expected "string" but received "' + typeof obj_operator + '" (at "' + path_operator + '")');
3525
+ }
3526
+ const obj_sequence = obj.sequence;
3527
+ const path_sequence = path + '.sequence';
3528
+ if (typeof obj_sequence !== 'number' || (typeof obj_sequence === 'number' && Math.floor(obj_sequence) !== obj_sequence)) {
3529
+ return new TypeError('Expected "integer" but received "' + typeof obj_sequence + '" (at "' + path_sequence + '")');
3530
+ }
3531
+ const obj_value = obj.value;
3532
+ const path_value = path + '.value';
3533
+ if (typeof obj_value !== 'string') {
3534
+ return new TypeError('Expected "string" but received "' + typeof obj_value + '" (at "' + path_value + '")');
3535
+ }
3536
+ })();
3537
+ return v_error === undefined ? null : v_error;
3538
+ }
3539
+
3540
+ function validate$5(obj, path = 'RecordAggregationFilterInputRepresentation') {
3541
+ const v_error = (() => {
3542
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
3543
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
3544
+ }
3545
+ if (obj.filterConditions !== undefined) {
3546
+ const obj_filterConditions = obj.filterConditions;
3547
+ const path_filterConditions = path + '.filterConditions';
3548
+ if (!ArrayIsArray(obj_filterConditions)) {
3549
+ return new TypeError('Expected "array" but received "' + typeof obj_filterConditions + '" (at "' + path_filterConditions + '")');
3550
+ }
3551
+ for (let i = 0; i < obj_filterConditions.length; i++) {
3552
+ const obj_filterConditions_item = obj_filterConditions[i];
3553
+ const path_filterConditions_item = path_filterConditions + '[' + i + ']';
3554
+ const referencepath_filterConditions_itemValidationError = validate$6(obj_filterConditions_item, path_filterConditions_item);
3555
+ if (referencepath_filterConditions_itemValidationError !== null) {
3556
+ let message = 'Object doesn\'t match RecordAggregationFilterRowInputRepresentation (at "' + path_filterConditions_item + '")\n';
3557
+ message += referencepath_filterConditions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
3558
+ return new TypeError(message);
3559
+ }
3560
+ }
3561
+ }
3562
+ if (obj.filterCriteria !== undefined) {
3563
+ const obj_filterCriteria = obj.filterCriteria;
3564
+ const path_filterCriteria = path + '.filterCriteria';
3565
+ if (typeof obj_filterCriteria !== 'string') {
3566
+ return new TypeError('Expected "string" but received "' + typeof obj_filterCriteria + '" (at "' + path_filterCriteria + '")');
3567
+ }
3568
+ }
3569
+ })();
3570
+ return v_error === undefined ? null : v_error;
3571
+ }
3572
+
3573
+ function validate$4(obj, path = 'RecordAggregationJoinInputRepresentation') {
3574
+ const v_error = (() => {
3575
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
3576
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
3577
+ }
3578
+ const obj_fieldApiName = obj.fieldApiName;
3579
+ const path_fieldApiName = path + '.fieldApiName';
3580
+ if (typeof obj_fieldApiName !== 'string') {
3581
+ return new TypeError('Expected "string" but received "' + typeof obj_fieldApiName + '" (at "' + path_fieldApiName + '")');
3582
+ }
3583
+ })();
3584
+ return v_error === undefined ? null : v_error;
3585
+ }
3586
+
3587
+ function validate$3(obj, path = 'RecordAggregationAssociatedObjectInputRepresentation') {
3588
+ const v_error = (() => {
3589
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
3590
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
3591
+ }
3592
+ const obj_apiName = obj.apiName;
3593
+ const path_apiName = path + '.apiName';
3594
+ if (typeof obj_apiName !== 'string') {
3595
+ return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
3596
+ }
3597
+ })();
3598
+ return v_error === undefined ? null : v_error;
3599
+ }
3600
+
3601
+ function validate$2(obj, path = 'RecordAggregationNodeInputRepresentation') {
3602
+ const v_error = (() => {
3603
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
3604
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
3605
+ }
3606
+ if (obj.filterDetails !== undefined) {
3607
+ const obj_filterDetails = obj.filterDetails;
3608
+ const path_filterDetails = path + '.filterDetails';
3609
+ const referencepath_filterDetailsValidationError = validate$5(obj_filterDetails, path_filterDetails);
3610
+ if (referencepath_filterDetailsValidationError !== null) {
3611
+ let message = 'Object doesn\'t match RecordAggregationFilterInputRepresentation (at "' + path_filterDetails + '")\n';
3612
+ message += referencepath_filterDetailsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
3613
+ return new TypeError(message);
3614
+ }
3615
+ }
3616
+ if (obj.nextObjectJoinDetails !== undefined) {
3617
+ const obj_nextObjectJoinDetails = obj.nextObjectJoinDetails;
3618
+ const path_nextObjectJoinDetails = path + '.nextObjectJoinDetails';
3619
+ const referencepath_nextObjectJoinDetailsValidationError = validate$4(obj_nextObjectJoinDetails, path_nextObjectJoinDetails);
3620
+ if (referencepath_nextObjectJoinDetailsValidationError !== null) {
3621
+ let message = 'Object doesn\'t match RecordAggregationJoinInputRepresentation (at "' + path_nextObjectJoinDetails + '")\n';
3622
+ message += referencepath_nextObjectJoinDetailsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
3623
+ return new TypeError(message);
3624
+ }
3625
+ }
3626
+ const obj_objectDetails = obj.objectDetails;
3627
+ const path_objectDetails = path + '.objectDetails';
3628
+ const referencepath_objectDetailsValidationError = validate$3(obj_objectDetails, path_objectDetails);
3629
+ if (referencepath_objectDetailsValidationError !== null) {
3630
+ let message = 'Object doesn\'t match RecordAggregationAssociatedObjectInputRepresentation (at "' + path_objectDetails + '")\n';
3631
+ message += referencepath_objectDetailsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
3632
+ return new TypeError(message);
3633
+ }
3634
+ if (obj.previousObjectJoinDetails !== undefined) {
3635
+ const obj_previousObjectJoinDetails = obj.previousObjectJoinDetails;
3636
+ const path_previousObjectJoinDetails = path + '.previousObjectJoinDetails';
3637
+ const referencepath_previousObjectJoinDetailsValidationError = validate$4(obj_previousObjectJoinDetails, path_previousObjectJoinDetails);
3638
+ if (referencepath_previousObjectJoinDetailsValidationError !== null) {
3639
+ let message = 'Object doesn\'t match RecordAggregationJoinInputRepresentation (at "' + path_previousObjectJoinDetails + '")\n';
3640
+ message += referencepath_previousObjectJoinDetailsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
3641
+ return new TypeError(message);
3642
+ }
3643
+ }
3644
+ const obj_sequence = obj.sequence;
3645
+ const path_sequence = path + '.sequence';
3646
+ if (typeof obj_sequence !== 'number' || (typeof obj_sequence === 'number' && Math.floor(obj_sequence) !== obj_sequence)) {
3647
+ return new TypeError('Expected "integer" but received "' + typeof obj_sequence + '" (at "' + path_sequence + '")');
3648
+ }
3649
+ })();
3650
+ return v_error === undefined ? null : v_error;
3651
+ }
3652
+
3653
+ const VERSION$1 = "360b76c13b79ed8a1d3522d29b8a91e1";
3654
+ function validate$1(obj, path = 'RecordAggregationCreationOutputRepresentation') {
3655
+ const v_error = (() => {
3656
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
3657
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
3658
+ }
3659
+ const obj_message = obj.message;
3660
+ const path_message = path + '.message';
3661
+ if (typeof obj_message !== 'string') {
3662
+ return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
3663
+ }
3664
+ const obj_recordAggregationDefinitionId = obj.recordAggregationDefinitionId;
3665
+ const path_recordAggregationDefinitionId = path + '.recordAggregationDefinitionId';
3666
+ if (typeof obj_recordAggregationDefinitionId !== 'string') {
3667
+ return new TypeError('Expected "string" but received "' + typeof obj_recordAggregationDefinitionId + '" (at "' + path_recordAggregationDefinitionId + '")');
3668
+ }
3669
+ const obj_statusCode = obj.statusCode;
3670
+ const path_statusCode = path + '.statusCode';
3671
+ if (typeof obj_statusCode !== 'string') {
3672
+ return new TypeError('Expected "string" but received "' + typeof obj_statusCode + '" (at "' + path_statusCode + '")');
3673
+ }
3674
+ })();
3675
+ return v_error === undefined ? null : v_error;
3676
+ }
3677
+ const RepresentationType$1 = 'RecordAggregationCreationOutputRepresentation';
3678
+ function keyBuilder$1(luvio, config) {
3679
+ return keyPrefix + '::' + RepresentationType$1 + ':' + config.id;
3680
+ }
3681
+ function keyBuilderFromType$1(luvio, object) {
3682
+ const keyParams = {
3683
+ id: object.recordAggregationDefinitionId
3684
+ };
3685
+ return keyBuilder$1(luvio, keyParams);
3686
+ }
3687
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
3688
+ return input;
3689
+ }
3690
+ const select$3 = function RecordAggregationCreationOutputRepresentationSelect() {
3691
+ return {
3692
+ kind: 'Fragment',
3693
+ version: VERSION$1,
3694
+ private: [],
3695
+ selections: [
3696
+ {
3697
+ name: 'message',
3698
+ kind: 'Scalar'
3699
+ },
3700
+ {
3701
+ name: 'recordAggregationDefinitionId',
3702
+ kind: 'Scalar'
3703
+ },
3704
+ {
3705
+ name: 'statusCode',
3706
+ kind: 'Scalar'
3707
+ }
3708
+ ]
3709
+ };
3710
+ };
3711
+ function equals$1(existing, incoming) {
3712
+ const existing_message = existing.message;
3713
+ const incoming_message = incoming.message;
3714
+ if (!(existing_message === incoming_message)) {
3715
+ return false;
3716
+ }
3717
+ const existing_recordAggregationDefinitionId = existing.recordAggregationDefinitionId;
3718
+ const incoming_recordAggregationDefinitionId = incoming.recordAggregationDefinitionId;
3719
+ if (!(existing_recordAggregationDefinitionId === incoming_recordAggregationDefinitionId)) {
3720
+ return false;
3721
+ }
3722
+ const existing_statusCode = existing.statusCode;
3723
+ const incoming_statusCode = incoming.statusCode;
3724
+ if (!(existing_statusCode === incoming_statusCode)) {
3725
+ return false;
3726
+ }
3727
+ return true;
3728
+ }
3729
+ const ingest$1 = function RecordAggregationCreationOutputRepresentationIngest(input, path, luvio, store, timestamp) {
3730
+ if (process.env.NODE_ENV !== 'production') {
3731
+ const validateError = validate$1(input);
3732
+ if (validateError !== null) {
3733
+ throw validateError;
3734
+ }
3735
+ }
3736
+ const key = keyBuilderFromType$1(luvio, input);
3737
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 100;
3738
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "IndustriesRecordAggregation", VERSION$1, RepresentationType$1, equals$1);
3739
+ return createLink(key);
3740
+ };
3741
+ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
3742
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
3743
+ const rootKey = keyBuilderFromType$1(luvio, input);
3744
+ rootKeySet.set(rootKey, {
3745
+ namespace: keyPrefix,
3746
+ representationName: RepresentationType$1,
3747
+ mergeable: false
3748
+ });
3749
+ }
3750
+
3751
+ function select$2(luvio, params) {
3752
+ return select$3();
3753
+ }
3754
+ function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
3755
+ getTypeCacheKeys$1(storeKeyMap, luvio, response);
3756
+ }
3757
+ function ingestSuccess$1(luvio, resourceParams, response) {
3758
+ const { body } = response;
3759
+ const key = keyBuilderFromType$1(luvio, body);
3760
+ luvio.storeIngest(key, ingest$1, body);
3761
+ const snapshot = luvio.storeLookup({
3762
+ recordId: key,
3763
+ node: select$2(),
3764
+ variables: {},
3765
+ });
3766
+ if (process.env.NODE_ENV !== 'production') {
3767
+ if (snapshot.state !== 'Fulfilled') {
3768
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
3769
+ }
3770
+ }
3771
+ deepFreeze(snapshot.data);
3772
+ return snapshot;
3773
+ }
3774
+ function createResourceRequest$1(config) {
3775
+ const headers = {};
3776
+ return {
3777
+ baseUri: '/services/data/v66.0',
3778
+ basePath: '/connect/record-aggregation',
3779
+ method: 'post',
3780
+ body: config.body,
3781
+ urlParams: {},
3782
+ queryParams: {},
3783
+ headers,
3784
+ priority: 'normal',
3785
+ };
3786
+ }
3787
+
3788
+ const adapterName$1 = 'postRecordAggregationCreation';
3789
+ const postRecordAggregationCreation_ConfigPropertyMetadata = [
3790
+ generateParamConfigMetadata('aggregationObjects', true, 2 /* Body */, 4 /* Unsupported */, true),
3791
+ generateParamConfigMetadata('definitionDescription', false, 2 /* Body */, 0 /* String */),
3792
+ generateParamConfigMetadata('definitionDisplayName', true, 2 /* Body */, 0 /* String */),
3793
+ ];
3794
+ const postRecordAggregationCreation_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, postRecordAggregationCreation_ConfigPropertyMetadata);
3795
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$a(postRecordAggregationCreation_ConfigPropertyMetadata);
3796
+ function typeCheckConfig$1(untrustedConfig) {
3797
+ const config = {};
3798
+ typeCheckConfig$a(untrustedConfig, config, postRecordAggregationCreation_ConfigPropertyMetadata);
3799
+ const untrustedConfig_aggregationObjects = untrustedConfig.aggregationObjects;
3800
+ if (ArrayIsArray$1(untrustedConfig_aggregationObjects)) {
3801
+ const untrustedConfig_aggregationObjects_array = [];
3802
+ for (let i = 0, arrayLength = untrustedConfig_aggregationObjects.length; i < arrayLength; i++) {
3803
+ const untrustedConfig_aggregationObjects_item = untrustedConfig_aggregationObjects[i];
3804
+ const referenceRecordAggregationNodeInputRepresentationValidationError = validate$2(untrustedConfig_aggregationObjects_item);
3805
+ if (referenceRecordAggregationNodeInputRepresentationValidationError === null) {
3806
+ untrustedConfig_aggregationObjects_array.push(untrustedConfig_aggregationObjects_item);
3807
+ }
3808
+ }
3809
+ config.aggregationObjects = untrustedConfig_aggregationObjects_array;
3810
+ }
3811
+ return config;
3812
+ }
3813
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
3814
+ if (!untrustedIsObject(untrustedConfig)) {
3815
+ return null;
3816
+ }
3817
+ if (process.env.NODE_ENV !== 'production') {
3818
+ validateConfig(untrustedConfig, configPropertyNames);
3819
+ }
3820
+ const config = typeCheckConfig$1(untrustedConfig);
3821
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
3822
+ return null;
3823
+ }
3824
+ return config;
3825
+ }
3826
+ function buildNetworkSnapshot$1(luvio, config, options) {
3827
+ const resourceParams = createResourceParams$1(config);
3828
+ const request = createResourceRequest$1(resourceParams);
3829
+ return luvio.dispatchResourceRequest(request, options)
3830
+ .then((response) => {
3831
+ return luvio.handleSuccessResponse(() => {
3832
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response);
3833
+ return luvio.storeBroadcast().then(() => snapshot);
3834
+ }, () => {
3835
+ const cache = new StoreKeyMap();
3836
+ getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
3837
+ return cache;
3838
+ });
3839
+ }, (response) => {
3840
+ deepFreeze(response);
3841
+ throw response;
3842
+ });
3843
+ }
3844
+ const postRecordAggregationCreationAdapterFactory = (luvio) => {
3845
+ return function postRecordAggregationCreation(untrustedConfig) {
3846
+ const config = validateAdapterConfig$1(untrustedConfig, postRecordAggregationCreation_ConfigPropertyNames);
3847
+ // Invalid or incomplete config
3848
+ if (config === null) {
3849
+ throw new Error('Invalid config for "postRecordAggregationCreation"');
3850
+ }
3851
+ return buildNetworkSnapshot$1(luvio, config);
3852
+ };
3853
+ };
3854
+
3855
+ const VERSION = "f0ea8c85a5a54a087ec6802a512e69cd";
3856
+ function validate(obj, path = 'RecordAggregationUpdationOutputRepresentation') {
3857
+ const v_error = (() => {
3858
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
3859
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
3860
+ }
3861
+ const obj_message = obj.message;
3862
+ const path_message = path + '.message';
3863
+ if (typeof obj_message !== 'string') {
3864
+ return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
3865
+ }
3866
+ const obj_statusCode = obj.statusCode;
3867
+ const path_statusCode = path + '.statusCode';
3868
+ if (typeof obj_statusCode !== 'string') {
3869
+ return new TypeError('Expected "string" but received "' + typeof obj_statusCode + '" (at "' + path_statusCode + '")');
3870
+ }
3871
+ })();
3872
+ return v_error === undefined ? null : v_error;
3873
+ }
3874
+ const RepresentationType = 'RecordAggregationUpdationOutputRepresentation';
3875
+ function keyBuilder(luvio, config) {
3876
+ return keyPrefix + '::' + RepresentationType + ':' + config.id;
3877
+ }
3878
+ function keyBuilderFromType(luvio, object) {
3879
+ const keyParams = {
3880
+ id: object.statusCode
3881
+ };
3882
+ return keyBuilder(luvio, keyParams);
3883
+ }
3884
+ function normalize(input, existing, path, luvio, store, timestamp) {
3885
+ return input;
3886
+ }
3887
+ const select$1 = function RecordAggregationUpdationOutputRepresentationSelect() {
3888
+ return {
3889
+ kind: 'Fragment',
3890
+ version: VERSION,
3891
+ private: [],
3892
+ selections: [
3893
+ {
3894
+ name: 'message',
3895
+ kind: 'Scalar'
3896
+ },
3897
+ {
3898
+ name: 'statusCode',
3899
+ kind: 'Scalar'
3900
+ }
3901
+ ]
3902
+ };
3903
+ };
3904
+ function equals(existing, incoming) {
3905
+ const existing_message = existing.message;
3906
+ const incoming_message = incoming.message;
3907
+ if (!(existing_message === incoming_message)) {
3908
+ return false;
3909
+ }
3910
+ const existing_statusCode = existing.statusCode;
3911
+ const incoming_statusCode = incoming.statusCode;
3912
+ if (!(existing_statusCode === incoming_statusCode)) {
3913
+ return false;
3914
+ }
3915
+ return true;
3916
+ }
3917
+ const ingest = function RecordAggregationUpdationOutputRepresentationIngest(input, path, luvio, store, timestamp) {
3918
+ if (process.env.NODE_ENV !== 'production') {
3919
+ const validateError = validate(input);
3920
+ if (validateError !== null) {
3921
+ throw validateError;
3922
+ }
3923
+ }
3924
+ const key = keyBuilderFromType(luvio, input);
3925
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 100;
3926
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "IndustriesRecordAggregation", VERSION, RepresentationType, equals);
3927
+ return createLink(key);
3928
+ };
3929
+ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
3930
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
3931
+ const rootKey = keyBuilderFromType(luvio, input);
3932
+ rootKeySet.set(rootKey, {
3933
+ namespace: keyPrefix,
3934
+ representationName: RepresentationType,
3935
+ mergeable: false
3936
+ });
3937
+ }
3938
+
3939
+ function select(luvio, params) {
3940
+ return select$1();
3941
+ }
3942
+ function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
3943
+ getTypeCacheKeys(storeKeyMap, luvio, response);
3944
+ }
3945
+ function ingestSuccess(luvio, resourceParams, response) {
3946
+ const { body } = response;
3947
+ const key = keyBuilderFromType(luvio, body);
3948
+ luvio.storeIngest(key, ingest, body);
3949
+ const snapshot = luvio.storeLookup({
3950
+ recordId: key,
3951
+ node: select(),
3952
+ variables: {},
3953
+ });
3954
+ if (process.env.NODE_ENV !== 'production') {
3955
+ if (snapshot.state !== 'Fulfilled') {
3956
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
3957
+ }
3958
+ }
3959
+ deepFreeze(snapshot.data);
3960
+ return snapshot;
3961
+ }
3962
+ function createResourceRequest(config) {
3963
+ const headers = {};
3964
+ return {
3965
+ baseUri: '/services/data/v66.0',
3966
+ basePath: '/connect/record-aggregation/' + config.urlParams.recordAggregationDefinitionId + '',
3967
+ method: 'put',
3968
+ body: config.body,
3969
+ urlParams: config.urlParams,
3970
+ queryParams: {},
3971
+ headers,
3972
+ priority: 'normal',
3973
+ };
3974
+ }
3975
+
3976
+ const adapterName = 'putRecordAggregationDefinition';
3977
+ const putRecordAggregationDefinition_ConfigPropertyMetadata = [
3978
+ generateParamConfigMetadata('recordAggregationDefinitionId', true, 0 /* UrlParameter */, 0 /* String */),
3979
+ generateParamConfigMetadata('aggregationObjects', true, 2 /* Body */, 4 /* Unsupported */, true),
3980
+ generateParamConfigMetadata('definitionDescription', false, 2 /* Body */, 0 /* String */),
3981
+ generateParamConfigMetadata('definitionDisplayName', true, 2 /* Body */, 0 /* String */),
3982
+ generateParamConfigMetadata('status', false, 2 /* Body */, 0 /* String */),
3983
+ ];
3984
+ const putRecordAggregationDefinition_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, putRecordAggregationDefinition_ConfigPropertyMetadata);
3985
+ const createResourceParams = /*#__PURE__*/ createResourceParams$a(putRecordAggregationDefinition_ConfigPropertyMetadata);
3986
+ function typeCheckConfig(untrustedConfig) {
3987
+ const config = {};
3988
+ typeCheckConfig$a(untrustedConfig, config, putRecordAggregationDefinition_ConfigPropertyMetadata);
3989
+ const untrustedConfig_aggregationObjects = untrustedConfig.aggregationObjects;
3990
+ if (ArrayIsArray$1(untrustedConfig_aggregationObjects)) {
3991
+ const untrustedConfig_aggregationObjects_array = [];
3992
+ for (let i = 0, arrayLength = untrustedConfig_aggregationObjects.length; i < arrayLength; i++) {
3993
+ const untrustedConfig_aggregationObjects_item = untrustedConfig_aggregationObjects[i];
3994
+ const referenceRecordAggregationNodeInputRepresentationValidationError = validate$2(untrustedConfig_aggregationObjects_item);
3995
+ if (referenceRecordAggregationNodeInputRepresentationValidationError === null) {
3996
+ untrustedConfig_aggregationObjects_array.push(untrustedConfig_aggregationObjects_item);
3997
+ }
3998
+ }
3999
+ config.aggregationObjects = untrustedConfig_aggregationObjects_array;
4000
+ }
4001
+ return config;
4002
+ }
4003
+ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
4004
+ if (!untrustedIsObject(untrustedConfig)) {
4005
+ return null;
4006
+ }
4007
+ if (process.env.NODE_ENV !== 'production') {
4008
+ validateConfig(untrustedConfig, configPropertyNames);
4009
+ }
4010
+ const config = typeCheckConfig(untrustedConfig);
4011
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
4012
+ return null;
4013
+ }
4014
+ return config;
4015
+ }
4016
+ function buildNetworkSnapshot(luvio, config, options) {
4017
+ const resourceParams = createResourceParams(config);
4018
+ const request = createResourceRequest(resourceParams);
4019
+ return luvio.dispatchResourceRequest(request, options)
4020
+ .then((response) => {
4021
+ return luvio.handleSuccessResponse(() => {
4022
+ const snapshot = ingestSuccess(luvio, resourceParams, response);
4023
+ return luvio.storeBroadcast().then(() => snapshot);
4024
+ }, () => {
4025
+ const cache = new StoreKeyMap();
4026
+ getResponseCacheKeys(cache, luvio, resourceParams, response.body);
4027
+ return cache;
4028
+ });
4029
+ }, (response) => {
4030
+ deepFreeze(response);
4031
+ throw response;
4032
+ });
4033
+ }
4034
+ const putRecordAggregationDefinitionAdapterFactory = (luvio) => {
4035
+ return function putRecordAggregationDefinition(untrustedConfig) {
4036
+ const config = validateAdapterConfig(untrustedConfig, putRecordAggregationDefinition_ConfigPropertyNames);
4037
+ // Invalid or incomplete config
4038
+ if (config === null) {
4039
+ throw new Error('Invalid config for "putRecordAggregationDefinition"');
4040
+ }
4041
+ return buildNetworkSnapshot(luvio, config);
4042
+ };
4043
+ };
4044
+
4045
+ let deleteRecordAggregationDefinition;
4046
+ let getBulkRecordRollupDefinitionDetails;
4047
+ let getRecordAggregationApplicableObjects;
4048
+ let getRecordAggregationDefinition;
4049
+ let getRecordAggregationDefinitionNotifyChange;
4050
+ let getRecordAggregationEntityApplicableFields;
4051
+ let patchRecordAggregationDefinition;
4052
+ let performBulkRecordRollupSyncExecution;
4053
+ let postGenerateRecordRollupResult;
4054
+ let postRecordAggregationCreation;
4055
+ let putRecordAggregationDefinition;
4056
+ // Imperative GET Adapters
4057
+ let getRecordAggregationApplicableObjects_imperative;
4058
+ let getRecordAggregationDefinition_imperative;
4059
+ let getRecordAggregationEntityApplicableFields_imperative;
4060
+ const getRecordAggregationApplicableObjectsMetadata = {
4061
+ apiFamily: 'IndustriesRecordAggregation',
4062
+ name: 'getRecordAggregationApplicableObjects',
4063
+ };
4064
+ const getRecordAggregationDefinitionMetadata = {
4065
+ apiFamily: 'IndustriesRecordAggregation',
4066
+ name: 'getRecordAggregationDefinition',
4067
+ };
4068
+ const getRecordAggregationEntityApplicableFieldsMetadata = {
4069
+ apiFamily: 'IndustriesRecordAggregation',
4070
+ name: 'getRecordAggregationEntityApplicableFields',
4071
+ };
4072
+ // Notify Update Available
4073
+ function bindExportsTo(luvio) {
4074
+ // LDS Adapters
4075
+ const getRecordAggregationApplicableObjects_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getRecordAggregationApplicableObjects', getRecordAggregationApplicableObjectsAdapterFactory), getRecordAggregationApplicableObjectsMetadata);
4076
+ const getRecordAggregationDefinition_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getRecordAggregationDefinition', getRecordAggregationDefinitionAdapterFactory), getRecordAggregationDefinitionMetadata);
4077
+ const getRecordAggregationEntityApplicableFields_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getRecordAggregationEntityApplicableFields', getRecordAggregationEntityApplicableFieldsAdapterFactory), getRecordAggregationEntityApplicableFieldsMetadata);
4078
+ function unwrapSnapshotData(factory) {
4079
+ const adapter = factory(luvio);
4080
+ return (config) => adapter(config).then((snapshot) => snapshot.data);
4081
+ }
4082
+ return {
4083
+ deleteRecordAggregationDefinition: createLDSAdapter(luvio, adapterName$9, deleteRecordAggregationDefinitionAdapterFactory),
4084
+ getBulkRecordRollupDefinitionDetails: unwrapSnapshotData(getBulkRecordRollupDefinitionDetailsAdapterFactory),
4085
+ getRecordAggregationApplicableObjects: createWireAdapterConstructor(luvio, getRecordAggregationApplicableObjects_ldsAdapter, getRecordAggregationApplicableObjectsMetadata),
4086
+ getRecordAggregationDefinition: createWireAdapterConstructor(luvio, getRecordAggregationDefinition_ldsAdapter, getRecordAggregationDefinitionMetadata),
4087
+ getRecordAggregationDefinitionNotifyChange: createLDSAdapter(luvio, 'getRecordAggregationDefinitionNotifyChange', notifyChangeFactory),
4088
+ getRecordAggregationEntityApplicableFields: createWireAdapterConstructor(luvio, getRecordAggregationEntityApplicableFields_ldsAdapter, getRecordAggregationEntityApplicableFieldsMetadata),
4089
+ patchRecordAggregationDefinition: unwrapSnapshotData(patchRecordAggregationDefinitionAdapterFactory),
4090
+ performBulkRecordRollupSyncExecution: unwrapSnapshotData(performBulkRecordRollupSyncExecutionAdapterFactory),
4091
+ postGenerateRecordRollupResult: unwrapSnapshotData(postGenerateRecordRollupResultAdapterFactory),
4092
+ postRecordAggregationCreation: unwrapSnapshotData(postRecordAggregationCreationAdapterFactory),
4093
+ putRecordAggregationDefinition: unwrapSnapshotData(putRecordAggregationDefinitionAdapterFactory),
4094
+ // Imperative GET Adapters
4095
+ getRecordAggregationApplicableObjects_imperative: createImperativeAdapter(luvio, getRecordAggregationApplicableObjects_ldsAdapter, getRecordAggregationApplicableObjectsMetadata),
4096
+ getRecordAggregationDefinition_imperative: createImperativeAdapter(luvio, getRecordAggregationDefinition_ldsAdapter, getRecordAggregationDefinitionMetadata),
4097
+ getRecordAggregationEntityApplicableFields_imperative: createImperativeAdapter(luvio, getRecordAggregationEntityApplicableFields_ldsAdapter, getRecordAggregationEntityApplicableFieldsMetadata),
4098
+ // Notify Update Availables
4099
+ };
4100
+ }
4101
+ withDefaultLuvio((luvio) => {
4102
+ ({
4103
+ deleteRecordAggregationDefinition,
4104
+ getBulkRecordRollupDefinitionDetails,
4105
+ getRecordAggregationApplicableObjects,
4106
+ getRecordAggregationDefinition,
4107
+ getRecordAggregationDefinitionNotifyChange,
4108
+ getRecordAggregationEntityApplicableFields,
4109
+ patchRecordAggregationDefinition,
4110
+ performBulkRecordRollupSyncExecution,
4111
+ postGenerateRecordRollupResult,
4112
+ postRecordAggregationCreation,
4113
+ putRecordAggregationDefinition,
4114
+ getRecordAggregationApplicableObjects_imperative,
4115
+ getRecordAggregationDefinition_imperative,
4116
+ getRecordAggregationEntityApplicableFields_imperative,
4117
+ } = bindExportsTo(luvio));
4118
+ });
4119
+
4120
+ export { deleteRecordAggregationDefinition, getBulkRecordRollupDefinitionDetails, getRecordAggregationApplicableObjects, getRecordAggregationApplicableObjects_imperative, getRecordAggregationDefinition, getRecordAggregationDefinitionNotifyChange, getRecordAggregationDefinition_imperative, getRecordAggregationEntityApplicableFields, getRecordAggregationEntityApplicableFields_imperative, patchRecordAggregationDefinition, performBulkRecordRollupSyncExecution, postGenerateRecordRollupResult, postRecordAggregationCreation, putRecordAggregationDefinition };
4121
+ // version: 0.1.0-dev1-c978a7b010