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