@salesforce/lds-adapters-cdp-communication-capping 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 (24) hide show
  1. package/LICENSE.txt +82 -0
  2. package/dist/es/es2018/cdp-communication-capping.js +1919 -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/getCommunicationCappingRepresentation.d.ts +27 -0
  5. package/dist/es/es2018/types/src/generated/adapters/triggerDMOCICreation.d.ts +15 -0
  6. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
  7. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +4 -0
  8. package/dist/es/es2018/types/src/generated/resources/getSsotCommunicationCappingsByIdOrName.d.ts +15 -0
  9. package/dist/es/es2018/types/src/generated/resources/postSsotCommunicationCappingsActionsRetryByIdOrName.d.ts +12 -0
  10. package/dist/es/es2018/types/src/generated/types/CdpErrorRepresentation.d.ts +31 -0
  11. package/dist/es/es2018/types/src/generated/types/CdpUserRepresentation.d.ts +34 -0
  12. package/dist/es/es2018/types/src/generated/types/CommunicationCappingActionResponseRepresentation.d.ts +41 -0
  13. package/dist/es/es2018/types/src/generated/types/CommunicationCappingRepresentation.d.ts +67 -0
  14. package/dist/es/es2018/types/src/generated/types/DataSpaceFilterConditionRepresentation.d.ts +37 -0
  15. package/dist/es/es2018/types/src/generated/types/DataSpaceFilterRepresentation.d.ts +32 -0
  16. package/dist/es/es2018/types/src/generated/types/DataSpaceRepresentation.d.ts +57 -0
  17. package/dist/es/es2018/types/src/generated/types/DimensionRepresentation.d.ts +63 -0
  18. package/dist/es/es2018/types/src/generated/types/DimensionValueRepresentation.d.ts +53 -0
  19. package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
  20. package/package.json +66 -0
  21. package/sfdc/index.d.ts +1 -0
  22. package/sfdc/index.js +1963 -0
  23. package/src/raml/api.raml +290 -0
  24. package/src/raml/luvio.raml +24 -0
package/sfdc/index.js ADDED
@@ -0,0 +1,1963 @@
1
+ /**
2
+ * Copyright (c) 2022, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+
7
+ /*
8
+ * ATTENTION!
9
+ * THIS IS A GENERATED FILE FROM https://github.com/salesforce-experience-platform-emu/lds-lightning-platform
10
+ * If you would like to contribute to LDS, please follow the steps outlined in the git repo.
11
+ * Any changes made to this file in p4 will be automatically overwritten.
12
+ * *******************************************************************************************
13
+ */
14
+ /* proxy-compat-disable */
15
+ import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
16
+ import { withDefaultLuvio } from 'force/ldsEngine';
17
+ import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1, typeCheckConfig as typeCheckConfig$2, StoreKeyMap, createResourceParams as createResourceParams$2 } from 'force/luvioEngine';
18
+
19
+ const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
20
+ const { keys: ObjectKeys, create: ObjectCreate } = Object;
21
+ const { isArray: ArrayIsArray$1 } = Array;
22
+ /**
23
+ * Validates an adapter config is well-formed.
24
+ * @param config The config to validate.
25
+ * @param adapter The adapter validation configuration.
26
+ * @param oneOf The keys the config must contain at least one of.
27
+ * @throws A TypeError if config doesn't satisfy the adapter's config validation.
28
+ */
29
+ function validateConfig(config, adapter, oneOf) {
30
+ const { displayName } = adapter;
31
+ const { required, optional, unsupported } = adapter.parameters;
32
+ if (config === undefined ||
33
+ required.every(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
34
+ throw new TypeError(`adapter ${displayName} configuration must specify ${required.sort().join(', ')}`);
35
+ }
36
+ if (oneOf && oneOf.some(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
37
+ throw new TypeError(`adapter ${displayName} configuration must specify one of ${oneOf.sort().join(', ')}`);
38
+ }
39
+ if (unsupported !== undefined &&
40
+ unsupported.some(req => ObjectPrototypeHasOwnProperty.call(config, req))) {
41
+ throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
42
+ }
43
+ const supported = required.concat(optional);
44
+ if (ObjectKeys(config).some(key => !supported.includes(key))) {
45
+ throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
46
+ }
47
+ }
48
+ function untrustedIsObject(untrusted) {
49
+ return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
50
+ }
51
+ function areRequiredParametersPresent(config, configPropertyNames) {
52
+ return configPropertyNames.parameters.required.every(req => req in config);
53
+ }
54
+ const snapshotRefreshOptions = {
55
+ overrides: {
56
+ headers: {
57
+ 'Cache-Control': 'no-cache',
58
+ },
59
+ }
60
+ };
61
+ function generateParamConfigMetadata(name, required, resourceType, typeCheckShape, isArrayShape = false, coerceFn) {
62
+ return {
63
+ name,
64
+ required,
65
+ resourceType,
66
+ typeCheckShape,
67
+ isArrayShape,
68
+ coerceFn,
69
+ };
70
+ }
71
+ function buildAdapterValidationConfig(displayName, paramsMeta) {
72
+ const required = paramsMeta.filter(p => p.required).map(p => p.name);
73
+ const optional = paramsMeta.filter(p => !p.required).map(p => p.name);
74
+ return {
75
+ displayName,
76
+ parameters: {
77
+ required,
78
+ optional,
79
+ }
80
+ };
81
+ }
82
+ const keyPrefix = 'communication-capping';
83
+
84
+ const { isArray: ArrayIsArray } = Array;
85
+ function equalsArray(a, b, equalsItem) {
86
+ const aLength = a.length;
87
+ const bLength = b.length;
88
+ if (aLength !== bLength) {
89
+ return false;
90
+ }
91
+ for (let i = 0; i < aLength; i++) {
92
+ if (equalsItem(a[i], b[i]) === false) {
93
+ return false;
94
+ }
95
+ }
96
+ return true;
97
+ }
98
+ function createLink(ref) {
99
+ return {
100
+ __ref: serializeStructuredKey(ref),
101
+ };
102
+ }
103
+
104
+ const VERSION$8 = "efb82c29d2d2d9ec860406b7caae554d";
105
+ function validate$8(obj, path = 'CdpUserRepresentation') {
106
+ const v_error = (() => {
107
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
108
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
109
+ }
110
+ const obj_id = obj.id;
111
+ const path_id = path + '.id';
112
+ if (typeof obj_id !== 'string') {
113
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
114
+ }
115
+ if (obj.name !== undefined) {
116
+ const obj_name = obj.name;
117
+ const path_name = path + '.name';
118
+ if (typeof obj_name !== 'string') {
119
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
120
+ }
121
+ }
122
+ if (obj.profilePhotoUrl !== undefined) {
123
+ const obj_profilePhotoUrl = obj.profilePhotoUrl;
124
+ const path_profilePhotoUrl = path + '.profilePhotoUrl';
125
+ if (typeof obj_profilePhotoUrl !== 'string') {
126
+ return new TypeError('Expected "string" but received "' + typeof obj_profilePhotoUrl + '" (at "' + path_profilePhotoUrl + '")');
127
+ }
128
+ }
129
+ })();
130
+ return v_error === undefined ? null : v_error;
131
+ }
132
+ const select$a = function CdpUserRepresentationSelect() {
133
+ return {
134
+ kind: 'Fragment',
135
+ version: VERSION$8,
136
+ private: [],
137
+ selections: [
138
+ {
139
+ name: 'id',
140
+ kind: 'Scalar'
141
+ },
142
+ {
143
+ name: 'name',
144
+ kind: 'Scalar',
145
+ required: false
146
+ },
147
+ {
148
+ name: 'profilePhotoUrl',
149
+ kind: 'Scalar',
150
+ required: false
151
+ }
152
+ ]
153
+ };
154
+ };
155
+ function equals$8(existing, incoming) {
156
+ const existing_id = existing.id;
157
+ const incoming_id = incoming.id;
158
+ if (!(existing_id === incoming_id)) {
159
+ return false;
160
+ }
161
+ const existing_name = existing.name;
162
+ const incoming_name = incoming.name;
163
+ // if at least one of these optionals is defined
164
+ if (existing_name !== undefined || incoming_name !== undefined) {
165
+ // if one of these is not defined we know the other is defined and therefore
166
+ // not equal
167
+ if (existing_name === undefined || incoming_name === undefined) {
168
+ return false;
169
+ }
170
+ if (!(existing_name === incoming_name)) {
171
+ return false;
172
+ }
173
+ }
174
+ const existing_profilePhotoUrl = existing.profilePhotoUrl;
175
+ const incoming_profilePhotoUrl = incoming.profilePhotoUrl;
176
+ // if at least one of these optionals is defined
177
+ if (existing_profilePhotoUrl !== undefined || incoming_profilePhotoUrl !== undefined) {
178
+ // if one of these is not defined we know the other is defined and therefore
179
+ // not equal
180
+ if (existing_profilePhotoUrl === undefined || incoming_profilePhotoUrl === undefined) {
181
+ return false;
182
+ }
183
+ if (!(existing_profilePhotoUrl === incoming_profilePhotoUrl)) {
184
+ return false;
185
+ }
186
+ }
187
+ return true;
188
+ }
189
+
190
+ const VERSION$7 = "1b02d2d39dcce31092d19e19e432ad9b";
191
+ function validate$7(obj, path = 'DataSpaceFilterConditionRepresentation') {
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_fieldName = obj.fieldName;
197
+ const path_fieldName = path + '.fieldName';
198
+ if (typeof obj_fieldName !== 'string') {
199
+ return new TypeError('Expected "string" but received "' + typeof obj_fieldName + '" (at "' + path_fieldName + '")');
200
+ }
201
+ const obj_filterValue = obj.filterValue;
202
+ const path_filterValue = path + '.filterValue';
203
+ if (typeof obj_filterValue !== 'string') {
204
+ return new TypeError('Expected "string" but received "' + typeof obj_filterValue + '" (at "' + path_filterValue + '")');
205
+ }
206
+ const obj_operator = obj.operator;
207
+ const path_operator = path + '.operator';
208
+ if (typeof obj_operator !== 'string') {
209
+ return new TypeError('Expected "string" but received "' + typeof obj_operator + '" (at "' + path_operator + '")');
210
+ }
211
+ const obj_tableName = obj.tableName;
212
+ const path_tableName = path + '.tableName';
213
+ if (typeof obj_tableName !== 'string') {
214
+ return new TypeError('Expected "string" but received "' + typeof obj_tableName + '" (at "' + path_tableName + '")');
215
+ }
216
+ })();
217
+ return v_error === undefined ? null : v_error;
218
+ }
219
+ const select$9 = function DataSpaceFilterConditionRepresentationSelect() {
220
+ return {
221
+ kind: 'Fragment',
222
+ version: VERSION$7,
223
+ private: [],
224
+ selections: [
225
+ {
226
+ name: 'fieldName',
227
+ kind: 'Scalar'
228
+ },
229
+ {
230
+ name: 'filterValue',
231
+ kind: 'Scalar'
232
+ },
233
+ {
234
+ name: 'operator',
235
+ kind: 'Scalar'
236
+ },
237
+ {
238
+ name: 'tableName',
239
+ kind: 'Scalar'
240
+ }
241
+ ]
242
+ };
243
+ };
244
+ function equals$7(existing, incoming) {
245
+ const existing_fieldName = existing.fieldName;
246
+ const incoming_fieldName = incoming.fieldName;
247
+ if (!(existing_fieldName === incoming_fieldName)) {
248
+ return false;
249
+ }
250
+ const existing_filterValue = existing.filterValue;
251
+ const incoming_filterValue = incoming.filterValue;
252
+ if (!(existing_filterValue === incoming_filterValue)) {
253
+ return false;
254
+ }
255
+ const existing_operator = existing.operator;
256
+ const incoming_operator = incoming.operator;
257
+ if (!(existing_operator === incoming_operator)) {
258
+ return false;
259
+ }
260
+ const existing_tableName = existing.tableName;
261
+ const incoming_tableName = incoming.tableName;
262
+ if (!(existing_tableName === incoming_tableName)) {
263
+ return false;
264
+ }
265
+ return true;
266
+ }
267
+
268
+ const VERSION$6 = "6e8261106b2978c3a4b64b6d4ef48591";
269
+ function validate$6(obj, path = 'DataSpaceFilterRepresentation') {
270
+ const v_error = (() => {
271
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
272
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
273
+ }
274
+ const obj_conditions = obj.conditions;
275
+ const path_conditions = path + '.conditions';
276
+ if (!ArrayIsArray(obj_conditions)) {
277
+ return new TypeError('Expected "array" but received "' + typeof obj_conditions + '" (at "' + path_conditions + '")');
278
+ }
279
+ for (let i = 0; i < obj_conditions.length; i++) {
280
+ const obj_conditions_item = obj_conditions[i];
281
+ const path_conditions_item = path_conditions + '[' + i + ']';
282
+ const referencepath_conditions_itemValidationError = validate$7(obj_conditions_item, path_conditions_item);
283
+ if (referencepath_conditions_itemValidationError !== null) {
284
+ let message = 'Object doesn\'t match DataSpaceFilterConditionRepresentation (at "' + path_conditions_item + '")\n';
285
+ message += referencepath_conditions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
286
+ return new TypeError(message);
287
+ }
288
+ }
289
+ const obj_conjunctiveOperator = obj.conjunctiveOperator;
290
+ const path_conjunctiveOperator = path + '.conjunctiveOperator';
291
+ if (typeof obj_conjunctiveOperator !== 'string') {
292
+ return new TypeError('Expected "string" but received "' + typeof obj_conjunctiveOperator + '" (at "' + path_conjunctiveOperator + '")');
293
+ }
294
+ })();
295
+ return v_error === undefined ? null : v_error;
296
+ }
297
+ const select$8 = function DataSpaceFilterRepresentationSelect() {
298
+ const { selections: DataSpaceFilterConditionRepresentation__selections, opaque: DataSpaceFilterConditionRepresentation__opaque, } = select$9();
299
+ return {
300
+ kind: 'Fragment',
301
+ version: VERSION$6,
302
+ private: [],
303
+ selections: [
304
+ {
305
+ name: 'conditions',
306
+ kind: 'Object',
307
+ plural: true,
308
+ selections: DataSpaceFilterConditionRepresentation__selections
309
+ },
310
+ {
311
+ name: 'conjunctiveOperator',
312
+ kind: 'Scalar'
313
+ }
314
+ ]
315
+ };
316
+ };
317
+ function equals$6(existing, incoming) {
318
+ const existing_conjunctiveOperator = existing.conjunctiveOperator;
319
+ const incoming_conjunctiveOperator = incoming.conjunctiveOperator;
320
+ if (!(existing_conjunctiveOperator === incoming_conjunctiveOperator)) {
321
+ return false;
322
+ }
323
+ const existing_conditions = existing.conditions;
324
+ const incoming_conditions = incoming.conditions;
325
+ const equals_conditions_items = equalsArray(existing_conditions, incoming_conditions, (existing_conditions_item, incoming_conditions_item) => {
326
+ if (!(equals$7(existing_conditions_item, incoming_conditions_item))) {
327
+ return false;
328
+ }
329
+ });
330
+ if (equals_conditions_items === false) {
331
+ return false;
332
+ }
333
+ return true;
334
+ }
335
+
336
+ const VERSION$5 = "6002273606e3a05e27583192e1479933";
337
+ function validate$5(obj, path = 'DataSpaceRepresentation') {
338
+ const v_error = (() => {
339
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
340
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
341
+ }
342
+ if (obj.createdBy !== undefined) {
343
+ const obj_createdBy = obj.createdBy;
344
+ const path_createdBy = path + '.createdBy';
345
+ const referencepath_createdByValidationError = validate$8(obj_createdBy, path_createdBy);
346
+ if (referencepath_createdByValidationError !== null) {
347
+ let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_createdBy + '")\n';
348
+ message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
349
+ return new TypeError(message);
350
+ }
351
+ }
352
+ if (obj.createdDate !== undefined) {
353
+ const obj_createdDate = obj.createdDate;
354
+ const path_createdDate = path + '.createdDate';
355
+ if (typeof obj_createdDate !== 'string') {
356
+ return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
357
+ }
358
+ }
359
+ if (obj.filter !== undefined) {
360
+ const obj_filter = obj.filter;
361
+ const path_filter = path + '.filter';
362
+ const referencepath_filterValidationError = validate$6(obj_filter, path_filter);
363
+ if (referencepath_filterValidationError !== null) {
364
+ let message = 'Object doesn\'t match DataSpaceFilterRepresentation (at "' + path_filter + '")\n';
365
+ message += referencepath_filterValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
366
+ return new TypeError(message);
367
+ }
368
+ }
369
+ const obj_id = obj.id;
370
+ const path_id = path + '.id';
371
+ if (typeof obj_id !== 'string') {
372
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
373
+ }
374
+ if (obj.label !== undefined) {
375
+ const obj_label = obj.label;
376
+ const path_label = path + '.label';
377
+ if (typeof obj_label !== 'string') {
378
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
379
+ }
380
+ }
381
+ if (obj.lastModifiedBy !== undefined) {
382
+ const obj_lastModifiedBy = obj.lastModifiedBy;
383
+ const path_lastModifiedBy = path + '.lastModifiedBy';
384
+ const referencepath_lastModifiedByValidationError = validate$8(obj_lastModifiedBy, path_lastModifiedBy);
385
+ if (referencepath_lastModifiedByValidationError !== null) {
386
+ let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_lastModifiedBy + '")\n';
387
+ message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
388
+ return new TypeError(message);
389
+ }
390
+ }
391
+ if (obj.lastModifiedDate !== undefined) {
392
+ const obj_lastModifiedDate = obj.lastModifiedDate;
393
+ const path_lastModifiedDate = path + '.lastModifiedDate';
394
+ if (typeof obj_lastModifiedDate !== 'string') {
395
+ return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
396
+ }
397
+ }
398
+ const obj_name = obj.name;
399
+ const path_name = path + '.name';
400
+ if (typeof obj_name !== 'string') {
401
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
402
+ }
403
+ if (obj.namespace !== undefined) {
404
+ const obj_namespace = obj.namespace;
405
+ const path_namespace = path + '.namespace';
406
+ if (typeof obj_namespace !== 'string') {
407
+ return new TypeError('Expected "string" but received "' + typeof obj_namespace + '" (at "' + path_namespace + '")');
408
+ }
409
+ }
410
+ if (obj.url !== undefined) {
411
+ const obj_url = obj.url;
412
+ const path_url = path + '.url';
413
+ if (typeof obj_url !== 'string') {
414
+ return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
415
+ }
416
+ }
417
+ })();
418
+ return v_error === undefined ? null : v_error;
419
+ }
420
+ const select$7 = function DataSpaceRepresentationSelect() {
421
+ const { selections: CdpUserRepresentation__selections, opaque: CdpUserRepresentation__opaque, } = select$a();
422
+ const { selections: DataSpaceFilterRepresentation__selections, opaque: DataSpaceFilterRepresentation__opaque, } = select$8();
423
+ return {
424
+ kind: 'Fragment',
425
+ version: VERSION$5,
426
+ private: [],
427
+ selections: [
428
+ {
429
+ name: 'createdBy',
430
+ kind: 'Object',
431
+ selections: CdpUserRepresentation__selections,
432
+ required: false
433
+ },
434
+ {
435
+ name: 'createdDate',
436
+ kind: 'Scalar',
437
+ required: false
438
+ },
439
+ {
440
+ name: 'filter',
441
+ kind: 'Object',
442
+ selections: DataSpaceFilterRepresentation__selections,
443
+ required: false
444
+ },
445
+ {
446
+ name: 'id',
447
+ kind: 'Scalar'
448
+ },
449
+ {
450
+ name: 'label',
451
+ kind: 'Scalar',
452
+ required: false
453
+ },
454
+ {
455
+ name: 'lastModifiedBy',
456
+ kind: 'Object',
457
+ selections: CdpUserRepresentation__selections,
458
+ required: false
459
+ },
460
+ {
461
+ name: 'lastModifiedDate',
462
+ kind: 'Scalar',
463
+ required: false
464
+ },
465
+ {
466
+ name: 'name',
467
+ kind: 'Scalar'
468
+ },
469
+ {
470
+ name: 'namespace',
471
+ kind: 'Scalar',
472
+ required: false
473
+ },
474
+ {
475
+ name: 'url',
476
+ kind: 'Scalar',
477
+ required: false
478
+ }
479
+ ]
480
+ };
481
+ };
482
+ function equals$5(existing, incoming) {
483
+ const existing_createdDate = existing.createdDate;
484
+ const incoming_createdDate = incoming.createdDate;
485
+ // if at least one of these optionals is defined
486
+ if (existing_createdDate !== undefined || incoming_createdDate !== undefined) {
487
+ // if one of these is not defined we know the other is defined and therefore
488
+ // not equal
489
+ if (existing_createdDate === undefined || incoming_createdDate === undefined) {
490
+ return false;
491
+ }
492
+ if (!(existing_createdDate === incoming_createdDate)) {
493
+ return false;
494
+ }
495
+ }
496
+ const existing_id = existing.id;
497
+ const incoming_id = incoming.id;
498
+ if (!(existing_id === incoming_id)) {
499
+ return false;
500
+ }
501
+ const existing_label = existing.label;
502
+ const incoming_label = incoming.label;
503
+ // if at least one of these optionals is defined
504
+ if (existing_label !== undefined || incoming_label !== undefined) {
505
+ // if one of these is not defined we know the other is defined and therefore
506
+ // not equal
507
+ if (existing_label === undefined || incoming_label === undefined) {
508
+ return false;
509
+ }
510
+ if (!(existing_label === incoming_label)) {
511
+ return false;
512
+ }
513
+ }
514
+ const existing_lastModifiedDate = existing.lastModifiedDate;
515
+ const incoming_lastModifiedDate = incoming.lastModifiedDate;
516
+ // if at least one of these optionals is defined
517
+ if (existing_lastModifiedDate !== undefined || incoming_lastModifiedDate !== undefined) {
518
+ // if one of these is not defined we know the other is defined and therefore
519
+ // not equal
520
+ if (existing_lastModifiedDate === undefined || incoming_lastModifiedDate === undefined) {
521
+ return false;
522
+ }
523
+ if (!(existing_lastModifiedDate === incoming_lastModifiedDate)) {
524
+ return false;
525
+ }
526
+ }
527
+ const existing_name = existing.name;
528
+ const incoming_name = incoming.name;
529
+ if (!(existing_name === incoming_name)) {
530
+ return false;
531
+ }
532
+ const existing_namespace = existing.namespace;
533
+ const incoming_namespace = incoming.namespace;
534
+ // if at least one of these optionals is defined
535
+ if (existing_namespace !== undefined || incoming_namespace !== undefined) {
536
+ // if one of these is not defined we know the other is defined and therefore
537
+ // not equal
538
+ if (existing_namespace === undefined || incoming_namespace === undefined) {
539
+ return false;
540
+ }
541
+ if (!(existing_namespace === incoming_namespace)) {
542
+ return false;
543
+ }
544
+ }
545
+ const existing_url = existing.url;
546
+ const incoming_url = incoming.url;
547
+ // if at least one of these optionals is defined
548
+ if (existing_url !== undefined || incoming_url !== undefined) {
549
+ // if one of these is not defined we know the other is defined and therefore
550
+ // not equal
551
+ if (existing_url === undefined || incoming_url === undefined) {
552
+ return false;
553
+ }
554
+ if (!(existing_url === incoming_url)) {
555
+ return false;
556
+ }
557
+ }
558
+ const existing_createdBy = existing.createdBy;
559
+ const incoming_createdBy = incoming.createdBy;
560
+ // if at least one of these optionals is defined
561
+ if (existing_createdBy !== undefined || incoming_createdBy !== undefined) {
562
+ // if one of these is not defined we know the other is defined and therefore
563
+ // not equal
564
+ if (existing_createdBy === undefined || incoming_createdBy === undefined) {
565
+ return false;
566
+ }
567
+ if (!(equals$8(existing_createdBy, incoming_createdBy))) {
568
+ return false;
569
+ }
570
+ }
571
+ const existing_filter = existing.filter;
572
+ const incoming_filter = incoming.filter;
573
+ // if at least one of these optionals is defined
574
+ if (existing_filter !== undefined || incoming_filter !== undefined) {
575
+ // if one of these is not defined we know the other is defined and therefore
576
+ // not equal
577
+ if (existing_filter === undefined || incoming_filter === undefined) {
578
+ return false;
579
+ }
580
+ if (!(equals$6(existing_filter, incoming_filter))) {
581
+ return false;
582
+ }
583
+ }
584
+ const existing_lastModifiedBy = existing.lastModifiedBy;
585
+ const incoming_lastModifiedBy = incoming.lastModifiedBy;
586
+ // if at least one of these optionals is defined
587
+ if (existing_lastModifiedBy !== undefined || incoming_lastModifiedBy !== undefined) {
588
+ // if one of these is not defined we know the other is defined and therefore
589
+ // not equal
590
+ if (existing_lastModifiedBy === undefined || incoming_lastModifiedBy === undefined) {
591
+ return false;
592
+ }
593
+ if (!(equals$8(existing_lastModifiedBy, incoming_lastModifiedBy))) {
594
+ return false;
595
+ }
596
+ }
597
+ return true;
598
+ }
599
+
600
+ const VERSION$4 = "dccce114624f015d60102d3fe03103c6";
601
+ function validate$4(obj, path = 'DimensionValueRepresentation') {
602
+ const v_error = (() => {
603
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
604
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
605
+ }
606
+ if (obj.createdBy !== undefined) {
607
+ const obj_createdBy = obj.createdBy;
608
+ const path_createdBy = path + '.createdBy';
609
+ const referencepath_createdByValidationError = validate$8(obj_createdBy, path_createdBy);
610
+ if (referencepath_createdByValidationError !== null) {
611
+ let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_createdBy + '")\n';
612
+ message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
613
+ return new TypeError(message);
614
+ }
615
+ }
616
+ if (obj.createdDate !== undefined) {
617
+ const obj_createdDate = obj.createdDate;
618
+ const path_createdDate = path + '.createdDate';
619
+ if (typeof obj_createdDate !== 'string') {
620
+ return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
621
+ }
622
+ }
623
+ const obj_id = obj.id;
624
+ const path_id = path + '.id';
625
+ if (typeof obj_id !== 'string') {
626
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
627
+ }
628
+ if (obj.label !== undefined) {
629
+ const obj_label = obj.label;
630
+ const path_label = path + '.label';
631
+ if (typeof obj_label !== 'string') {
632
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
633
+ }
634
+ }
635
+ if (obj.lastModifiedBy !== undefined) {
636
+ const obj_lastModifiedBy = obj.lastModifiedBy;
637
+ const path_lastModifiedBy = path + '.lastModifiedBy';
638
+ const referencepath_lastModifiedByValidationError = validate$8(obj_lastModifiedBy, path_lastModifiedBy);
639
+ if (referencepath_lastModifiedByValidationError !== null) {
640
+ let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_lastModifiedBy + '")\n';
641
+ message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
642
+ return new TypeError(message);
643
+ }
644
+ }
645
+ if (obj.lastModifiedDate !== undefined) {
646
+ const obj_lastModifiedDate = obj.lastModifiedDate;
647
+ const path_lastModifiedDate = path + '.lastModifiedDate';
648
+ if (typeof obj_lastModifiedDate !== 'string') {
649
+ return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
650
+ }
651
+ }
652
+ const obj_name = obj.name;
653
+ const path_name = path + '.name';
654
+ if (typeof obj_name !== 'string') {
655
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
656
+ }
657
+ if (obj.namespace !== undefined) {
658
+ const obj_namespace = obj.namespace;
659
+ const path_namespace = path + '.namespace';
660
+ if (typeof obj_namespace !== 'string') {
661
+ return new TypeError('Expected "string" but received "' + typeof obj_namespace + '" (at "' + path_namespace + '")');
662
+ }
663
+ }
664
+ if (obj.url !== undefined) {
665
+ const obj_url = obj.url;
666
+ const path_url = path + '.url';
667
+ if (typeof obj_url !== 'string') {
668
+ return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
669
+ }
670
+ }
671
+ })();
672
+ return v_error === undefined ? null : v_error;
673
+ }
674
+ const select$6 = function DimensionValueRepresentationSelect() {
675
+ const { selections: CdpUserRepresentation__selections, opaque: CdpUserRepresentation__opaque, } = select$a();
676
+ return {
677
+ kind: 'Fragment',
678
+ version: VERSION$4,
679
+ private: [],
680
+ selections: [
681
+ {
682
+ name: 'createdBy',
683
+ kind: 'Object',
684
+ selections: CdpUserRepresentation__selections,
685
+ required: false
686
+ },
687
+ {
688
+ name: 'createdDate',
689
+ kind: 'Scalar',
690
+ required: false
691
+ },
692
+ {
693
+ name: 'id',
694
+ kind: 'Scalar'
695
+ },
696
+ {
697
+ name: 'label',
698
+ kind: 'Scalar',
699
+ required: false
700
+ },
701
+ {
702
+ name: 'lastModifiedBy',
703
+ kind: 'Object',
704
+ selections: CdpUserRepresentation__selections,
705
+ required: false
706
+ },
707
+ {
708
+ name: 'lastModifiedDate',
709
+ kind: 'Scalar',
710
+ required: false
711
+ },
712
+ {
713
+ name: 'name',
714
+ kind: 'Scalar'
715
+ },
716
+ {
717
+ name: 'namespace',
718
+ kind: 'Scalar',
719
+ required: false
720
+ },
721
+ {
722
+ name: 'url',
723
+ kind: 'Scalar',
724
+ required: false
725
+ }
726
+ ]
727
+ };
728
+ };
729
+ function equals$4(existing, incoming) {
730
+ const existing_createdDate = existing.createdDate;
731
+ const incoming_createdDate = incoming.createdDate;
732
+ // if at least one of these optionals is defined
733
+ if (existing_createdDate !== undefined || incoming_createdDate !== undefined) {
734
+ // if one of these is not defined we know the other is defined and therefore
735
+ // not equal
736
+ if (existing_createdDate === undefined || incoming_createdDate === undefined) {
737
+ return false;
738
+ }
739
+ if (!(existing_createdDate === incoming_createdDate)) {
740
+ return false;
741
+ }
742
+ }
743
+ const existing_id = existing.id;
744
+ const incoming_id = incoming.id;
745
+ if (!(existing_id === incoming_id)) {
746
+ return false;
747
+ }
748
+ const existing_label = existing.label;
749
+ const incoming_label = incoming.label;
750
+ // if at least one of these optionals is defined
751
+ if (existing_label !== undefined || incoming_label !== undefined) {
752
+ // if one of these is not defined we know the other is defined and therefore
753
+ // not equal
754
+ if (existing_label === undefined || incoming_label === undefined) {
755
+ return false;
756
+ }
757
+ if (!(existing_label === incoming_label)) {
758
+ return false;
759
+ }
760
+ }
761
+ const existing_lastModifiedDate = existing.lastModifiedDate;
762
+ const incoming_lastModifiedDate = incoming.lastModifiedDate;
763
+ // if at least one of these optionals is defined
764
+ if (existing_lastModifiedDate !== undefined || incoming_lastModifiedDate !== undefined) {
765
+ // if one of these is not defined we know the other is defined and therefore
766
+ // not equal
767
+ if (existing_lastModifiedDate === undefined || incoming_lastModifiedDate === undefined) {
768
+ return false;
769
+ }
770
+ if (!(existing_lastModifiedDate === incoming_lastModifiedDate)) {
771
+ return false;
772
+ }
773
+ }
774
+ const existing_name = existing.name;
775
+ const incoming_name = incoming.name;
776
+ if (!(existing_name === incoming_name)) {
777
+ return false;
778
+ }
779
+ const existing_namespace = existing.namespace;
780
+ const incoming_namespace = incoming.namespace;
781
+ // if at least one of these optionals is defined
782
+ if (existing_namespace !== undefined || incoming_namespace !== undefined) {
783
+ // if one of these is not defined we know the other is defined and therefore
784
+ // not equal
785
+ if (existing_namespace === undefined || incoming_namespace === undefined) {
786
+ return false;
787
+ }
788
+ if (!(existing_namespace === incoming_namespace)) {
789
+ return false;
790
+ }
791
+ }
792
+ const existing_url = existing.url;
793
+ const incoming_url = incoming.url;
794
+ // if at least one of these optionals is defined
795
+ if (existing_url !== undefined || incoming_url !== undefined) {
796
+ // if one of these is not defined we know the other is defined and therefore
797
+ // not equal
798
+ if (existing_url === undefined || incoming_url === undefined) {
799
+ return false;
800
+ }
801
+ if (!(existing_url === incoming_url)) {
802
+ return false;
803
+ }
804
+ }
805
+ const existing_createdBy = existing.createdBy;
806
+ const incoming_createdBy = incoming.createdBy;
807
+ // if at least one of these optionals is defined
808
+ if (existing_createdBy !== undefined || incoming_createdBy !== undefined) {
809
+ // if one of these is not defined we know the other is defined and therefore
810
+ // not equal
811
+ if (existing_createdBy === undefined || incoming_createdBy === undefined) {
812
+ return false;
813
+ }
814
+ if (!(equals$8(existing_createdBy, incoming_createdBy))) {
815
+ return false;
816
+ }
817
+ }
818
+ const existing_lastModifiedBy = existing.lastModifiedBy;
819
+ const incoming_lastModifiedBy = incoming.lastModifiedBy;
820
+ // if at least one of these optionals is defined
821
+ if (existing_lastModifiedBy !== undefined || incoming_lastModifiedBy !== undefined) {
822
+ // if one of these is not defined we know the other is defined and therefore
823
+ // not equal
824
+ if (existing_lastModifiedBy === undefined || incoming_lastModifiedBy === undefined) {
825
+ return false;
826
+ }
827
+ if (!(equals$8(existing_lastModifiedBy, incoming_lastModifiedBy))) {
828
+ return false;
829
+ }
830
+ }
831
+ return true;
832
+ }
833
+
834
+ const VERSION$3 = "70b4d3fed31252306834619fcba6a447";
835
+ function validate$3(obj, path = 'DimensionRepresentation') {
836
+ const v_error = (() => {
837
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
838
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
839
+ }
840
+ if (obj.createdBy !== undefined) {
841
+ const obj_createdBy = obj.createdBy;
842
+ const path_createdBy = path + '.createdBy';
843
+ const referencepath_createdByValidationError = validate$8(obj_createdBy, path_createdBy);
844
+ if (referencepath_createdByValidationError !== null) {
845
+ let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_createdBy + '")\n';
846
+ message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
847
+ return new TypeError(message);
848
+ }
849
+ }
850
+ if (obj.createdDate !== undefined) {
851
+ const obj_createdDate = obj.createdDate;
852
+ const path_createdDate = path + '.createdDate';
853
+ if (typeof obj_createdDate !== 'string') {
854
+ return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
855
+ }
856
+ }
857
+ const obj_hierarchyOrder = obj.hierarchyOrder;
858
+ const path_hierarchyOrder = path + '.hierarchyOrder';
859
+ if (typeof obj_hierarchyOrder !== 'number' || (typeof obj_hierarchyOrder === 'number' && Math.floor(obj_hierarchyOrder) !== obj_hierarchyOrder)) {
860
+ return new TypeError('Expected "integer" but received "' + typeof obj_hierarchyOrder + '" (at "' + path_hierarchyOrder + '")');
861
+ }
862
+ const obj_id = obj.id;
863
+ const path_id = path + '.id';
864
+ if (typeof obj_id !== 'string') {
865
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
866
+ }
867
+ if (obj.label !== undefined) {
868
+ const obj_label = obj.label;
869
+ const path_label = path + '.label';
870
+ if (typeof obj_label !== 'string') {
871
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
872
+ }
873
+ }
874
+ if (obj.lastModifiedBy !== undefined) {
875
+ const obj_lastModifiedBy = obj.lastModifiedBy;
876
+ const path_lastModifiedBy = path + '.lastModifiedBy';
877
+ const referencepath_lastModifiedByValidationError = validate$8(obj_lastModifiedBy, path_lastModifiedBy);
878
+ if (referencepath_lastModifiedByValidationError !== null) {
879
+ let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_lastModifiedBy + '")\n';
880
+ message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
881
+ return new TypeError(message);
882
+ }
883
+ }
884
+ if (obj.lastModifiedDate !== undefined) {
885
+ const obj_lastModifiedDate = obj.lastModifiedDate;
886
+ const path_lastModifiedDate = path + '.lastModifiedDate';
887
+ if (typeof obj_lastModifiedDate !== 'string') {
888
+ return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
889
+ }
890
+ }
891
+ const obj_name = obj.name;
892
+ const path_name = path + '.name';
893
+ if (typeof obj_name !== 'string') {
894
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
895
+ }
896
+ if (obj.namespace !== undefined) {
897
+ const obj_namespace = obj.namespace;
898
+ const path_namespace = path + '.namespace';
899
+ if (typeof obj_namespace !== 'string') {
900
+ return new TypeError('Expected "string" but received "' + typeof obj_namespace + '" (at "' + path_namespace + '")');
901
+ }
902
+ }
903
+ const obj_type = obj.type;
904
+ const path_type = path + '.type';
905
+ if (typeof obj_type !== 'string') {
906
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
907
+ }
908
+ if (obj.url !== undefined) {
909
+ const obj_url = obj.url;
910
+ const path_url = path + '.url';
911
+ if (typeof obj_url !== 'string') {
912
+ return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
913
+ }
914
+ }
915
+ if (obj.values !== undefined) {
916
+ const obj_values = obj.values;
917
+ const path_values = path + '.values';
918
+ if (!ArrayIsArray(obj_values)) {
919
+ return new TypeError('Expected "array" but received "' + typeof obj_values + '" (at "' + path_values + '")');
920
+ }
921
+ for (let i = 0; i < obj_values.length; i++) {
922
+ const obj_values_item = obj_values[i];
923
+ const path_values_item = path_values + '[' + i + ']';
924
+ const referencepath_values_itemValidationError = validate$4(obj_values_item, path_values_item);
925
+ if (referencepath_values_itemValidationError !== null) {
926
+ let message = 'Object doesn\'t match DimensionValueRepresentation (at "' + path_values_item + '")\n';
927
+ message += referencepath_values_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
928
+ return new TypeError(message);
929
+ }
930
+ }
931
+ }
932
+ })();
933
+ return v_error === undefined ? null : v_error;
934
+ }
935
+ const select$5 = function DimensionRepresentationSelect() {
936
+ const { selections: CdpUserRepresentation__selections, opaque: CdpUserRepresentation__opaque, } = select$a();
937
+ const { selections: DimensionValueRepresentation__selections, opaque: DimensionValueRepresentation__opaque, } = select$6();
938
+ return {
939
+ kind: 'Fragment',
940
+ version: VERSION$3,
941
+ private: [],
942
+ selections: [
943
+ {
944
+ name: 'createdBy',
945
+ kind: 'Object',
946
+ selections: CdpUserRepresentation__selections,
947
+ required: false
948
+ },
949
+ {
950
+ name: 'createdDate',
951
+ kind: 'Scalar',
952
+ required: false
953
+ },
954
+ {
955
+ name: 'hierarchyOrder',
956
+ kind: 'Scalar'
957
+ },
958
+ {
959
+ name: 'id',
960
+ kind: 'Scalar'
961
+ },
962
+ {
963
+ name: 'label',
964
+ kind: 'Scalar',
965
+ required: false
966
+ },
967
+ {
968
+ name: 'lastModifiedBy',
969
+ kind: 'Object',
970
+ selections: CdpUserRepresentation__selections,
971
+ required: false
972
+ },
973
+ {
974
+ name: 'lastModifiedDate',
975
+ kind: 'Scalar',
976
+ required: false
977
+ },
978
+ {
979
+ name: 'name',
980
+ kind: 'Scalar'
981
+ },
982
+ {
983
+ name: 'namespace',
984
+ kind: 'Scalar',
985
+ required: false
986
+ },
987
+ {
988
+ name: 'type',
989
+ kind: 'Scalar'
990
+ },
991
+ {
992
+ name: 'url',
993
+ kind: 'Scalar',
994
+ required: false
995
+ },
996
+ {
997
+ name: 'values',
998
+ kind: 'Object',
999
+ plural: true,
1000
+ selections: DimensionValueRepresentation__selections,
1001
+ required: false
1002
+ }
1003
+ ]
1004
+ };
1005
+ };
1006
+ function equals$3(existing, incoming) {
1007
+ const existing_hierarchyOrder = existing.hierarchyOrder;
1008
+ const incoming_hierarchyOrder = incoming.hierarchyOrder;
1009
+ if (!(existing_hierarchyOrder === incoming_hierarchyOrder)) {
1010
+ return false;
1011
+ }
1012
+ const existing_createdDate = existing.createdDate;
1013
+ const incoming_createdDate = incoming.createdDate;
1014
+ // if at least one of these optionals is defined
1015
+ if (existing_createdDate !== undefined || incoming_createdDate !== undefined) {
1016
+ // if one of these is not defined we know the other is defined and therefore
1017
+ // not equal
1018
+ if (existing_createdDate === undefined || incoming_createdDate === undefined) {
1019
+ return false;
1020
+ }
1021
+ if (!(existing_createdDate === incoming_createdDate)) {
1022
+ return false;
1023
+ }
1024
+ }
1025
+ const existing_id = existing.id;
1026
+ const incoming_id = incoming.id;
1027
+ if (!(existing_id === incoming_id)) {
1028
+ return false;
1029
+ }
1030
+ const existing_label = existing.label;
1031
+ const incoming_label = incoming.label;
1032
+ // if at least one of these optionals is defined
1033
+ if (existing_label !== undefined || incoming_label !== undefined) {
1034
+ // if one of these is not defined we know the other is defined and therefore
1035
+ // not equal
1036
+ if (existing_label === undefined || incoming_label === undefined) {
1037
+ return false;
1038
+ }
1039
+ if (!(existing_label === incoming_label)) {
1040
+ return false;
1041
+ }
1042
+ }
1043
+ const existing_lastModifiedDate = existing.lastModifiedDate;
1044
+ const incoming_lastModifiedDate = incoming.lastModifiedDate;
1045
+ // if at least one of these optionals is defined
1046
+ if (existing_lastModifiedDate !== undefined || incoming_lastModifiedDate !== undefined) {
1047
+ // if one of these is not defined we know the other is defined and therefore
1048
+ // not equal
1049
+ if (existing_lastModifiedDate === undefined || incoming_lastModifiedDate === undefined) {
1050
+ return false;
1051
+ }
1052
+ if (!(existing_lastModifiedDate === incoming_lastModifiedDate)) {
1053
+ return false;
1054
+ }
1055
+ }
1056
+ const existing_name = existing.name;
1057
+ const incoming_name = incoming.name;
1058
+ if (!(existing_name === incoming_name)) {
1059
+ return false;
1060
+ }
1061
+ const existing_namespace = existing.namespace;
1062
+ const incoming_namespace = incoming.namespace;
1063
+ // if at least one of these optionals is defined
1064
+ if (existing_namespace !== undefined || incoming_namespace !== undefined) {
1065
+ // if one of these is not defined we know the other is defined and therefore
1066
+ // not equal
1067
+ if (existing_namespace === undefined || incoming_namespace === undefined) {
1068
+ return false;
1069
+ }
1070
+ if (!(existing_namespace === incoming_namespace)) {
1071
+ return false;
1072
+ }
1073
+ }
1074
+ const existing_type = existing.type;
1075
+ const incoming_type = incoming.type;
1076
+ if (!(existing_type === incoming_type)) {
1077
+ return false;
1078
+ }
1079
+ const existing_url = existing.url;
1080
+ const incoming_url = incoming.url;
1081
+ // if at least one of these optionals is defined
1082
+ if (existing_url !== undefined || incoming_url !== undefined) {
1083
+ // if one of these is not defined we know the other is defined and therefore
1084
+ // not equal
1085
+ if (existing_url === undefined || incoming_url === undefined) {
1086
+ return false;
1087
+ }
1088
+ if (!(existing_url === incoming_url)) {
1089
+ return false;
1090
+ }
1091
+ }
1092
+ const existing_createdBy = existing.createdBy;
1093
+ const incoming_createdBy = incoming.createdBy;
1094
+ // if at least one of these optionals is defined
1095
+ if (existing_createdBy !== undefined || incoming_createdBy !== undefined) {
1096
+ // if one of these is not defined we know the other is defined and therefore
1097
+ // not equal
1098
+ if (existing_createdBy === undefined || incoming_createdBy === undefined) {
1099
+ return false;
1100
+ }
1101
+ if (!(equals$8(existing_createdBy, incoming_createdBy))) {
1102
+ return false;
1103
+ }
1104
+ }
1105
+ const existing_lastModifiedBy = existing.lastModifiedBy;
1106
+ const incoming_lastModifiedBy = incoming.lastModifiedBy;
1107
+ // if at least one of these optionals is defined
1108
+ if (existing_lastModifiedBy !== undefined || incoming_lastModifiedBy !== undefined) {
1109
+ // if one of these is not defined we know the other is defined and therefore
1110
+ // not equal
1111
+ if (existing_lastModifiedBy === undefined || incoming_lastModifiedBy === undefined) {
1112
+ return false;
1113
+ }
1114
+ if (!(equals$8(existing_lastModifiedBy, incoming_lastModifiedBy))) {
1115
+ return false;
1116
+ }
1117
+ }
1118
+ const existing_values = existing.values;
1119
+ const incoming_values = incoming.values;
1120
+ // if at least one of these optionals is defined
1121
+ if (existing_values !== undefined || incoming_values !== undefined) {
1122
+ // if one of these is not defined we know the other is defined and therefore
1123
+ // not equal
1124
+ if (existing_values === undefined || incoming_values === undefined) {
1125
+ return false;
1126
+ }
1127
+ const equals_values_items = equalsArray(existing_values, incoming_values, (existing_values_item, incoming_values_item) => {
1128
+ if (!(equals$4(existing_values_item, incoming_values_item))) {
1129
+ return false;
1130
+ }
1131
+ });
1132
+ if (equals_values_items === false) {
1133
+ return false;
1134
+ }
1135
+ }
1136
+ return true;
1137
+ }
1138
+
1139
+ const VERSION$2 = "505be48e54ab7a0b752593e9294c3abd";
1140
+ function validate$2(obj, path = 'CommunicationCappingRepresentation') {
1141
+ const v_error = (() => {
1142
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1143
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1144
+ }
1145
+ if (obj.createdBy !== undefined) {
1146
+ const obj_createdBy = obj.createdBy;
1147
+ const path_createdBy = path + '.createdBy';
1148
+ const referencepath_createdByValidationError = validate$8(obj_createdBy, path_createdBy);
1149
+ if (referencepath_createdByValidationError !== null) {
1150
+ let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_createdBy + '")\n';
1151
+ message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1152
+ return new TypeError(message);
1153
+ }
1154
+ }
1155
+ if (obj.createdDate !== undefined) {
1156
+ const obj_createdDate = obj.createdDate;
1157
+ const path_createdDate = path + '.createdDate';
1158
+ if (typeof obj_createdDate !== 'string') {
1159
+ return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
1160
+ }
1161
+ }
1162
+ const obj_dataspacesInfo = obj.dataspacesInfo;
1163
+ const path_dataspacesInfo = path + '.dataspacesInfo';
1164
+ if (!ArrayIsArray(obj_dataspacesInfo)) {
1165
+ return new TypeError('Expected "array" but received "' + typeof obj_dataspacesInfo + '" (at "' + path_dataspacesInfo + '")');
1166
+ }
1167
+ for (let i = 0; i < obj_dataspacesInfo.length; i++) {
1168
+ const obj_dataspacesInfo_item = obj_dataspacesInfo[i];
1169
+ const path_dataspacesInfo_item = path_dataspacesInfo + '[' + i + ']';
1170
+ const referencepath_dataspacesInfo_itemValidationError = validate$5(obj_dataspacesInfo_item, path_dataspacesInfo_item);
1171
+ if (referencepath_dataspacesInfo_itemValidationError !== null) {
1172
+ let message = 'Object doesn\'t match DataSpaceRepresentation (at "' + path_dataspacesInfo_item + '")\n';
1173
+ message += referencepath_dataspacesInfo_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1174
+ return new TypeError(message);
1175
+ }
1176
+ }
1177
+ if (obj.description !== undefined) {
1178
+ const obj_description = obj.description;
1179
+ const path_description = path + '.description';
1180
+ let obj_description_union0 = null;
1181
+ const obj_description_union0_error = (() => {
1182
+ if (typeof obj_description !== 'string') {
1183
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
1184
+ }
1185
+ })();
1186
+ if (obj_description_union0_error != null) {
1187
+ obj_description_union0 = obj_description_union0_error.message;
1188
+ }
1189
+ let obj_description_union1 = null;
1190
+ const obj_description_union1_error = (() => {
1191
+ if (obj_description !== null) {
1192
+ return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
1193
+ }
1194
+ })();
1195
+ if (obj_description_union1_error != null) {
1196
+ obj_description_union1 = obj_description_union1_error.message;
1197
+ }
1198
+ if (obj_description_union0 && obj_description_union1) {
1199
+ let message = 'Object doesn\'t match union (at "' + path_description + '")';
1200
+ message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
1201
+ message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
1202
+ return new TypeError(message);
1203
+ }
1204
+ }
1205
+ const obj_dimensions = obj.dimensions;
1206
+ const path_dimensions = path + '.dimensions';
1207
+ if (!ArrayIsArray(obj_dimensions)) {
1208
+ return new TypeError('Expected "array" but received "' + typeof obj_dimensions + '" (at "' + path_dimensions + '")');
1209
+ }
1210
+ for (let i = 0; i < obj_dimensions.length; i++) {
1211
+ const obj_dimensions_item = obj_dimensions[i];
1212
+ const path_dimensions_item = path_dimensions + '[' + i + ']';
1213
+ const referencepath_dimensions_itemValidationError = validate$3(obj_dimensions_item, path_dimensions_item);
1214
+ if (referencepath_dimensions_itemValidationError !== null) {
1215
+ let message = 'Object doesn\'t match DimensionRepresentation (at "' + path_dimensions_item + '")\n';
1216
+ message += referencepath_dimensions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1217
+ return new TypeError(message);
1218
+ }
1219
+ }
1220
+ const obj_id = obj.id;
1221
+ const path_id = path + '.id';
1222
+ if (typeof obj_id !== 'string') {
1223
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
1224
+ }
1225
+ if (obj.label !== undefined) {
1226
+ const obj_label = obj.label;
1227
+ const path_label = path + '.label';
1228
+ if (typeof obj_label !== 'string') {
1229
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
1230
+ }
1231
+ }
1232
+ if (obj.lastModifiedBy !== undefined) {
1233
+ const obj_lastModifiedBy = obj.lastModifiedBy;
1234
+ const path_lastModifiedBy = path + '.lastModifiedBy';
1235
+ const referencepath_lastModifiedByValidationError = validate$8(obj_lastModifiedBy, path_lastModifiedBy);
1236
+ if (referencepath_lastModifiedByValidationError !== null) {
1237
+ let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_lastModifiedBy + '")\n';
1238
+ message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1239
+ return new TypeError(message);
1240
+ }
1241
+ }
1242
+ if (obj.lastModifiedDate !== undefined) {
1243
+ const obj_lastModifiedDate = obj.lastModifiedDate;
1244
+ const path_lastModifiedDate = path + '.lastModifiedDate';
1245
+ if (typeof obj_lastModifiedDate !== 'string') {
1246
+ return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
1247
+ }
1248
+ }
1249
+ const obj_name = obj.name;
1250
+ const path_name = path + '.name';
1251
+ if (typeof obj_name !== 'string') {
1252
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
1253
+ }
1254
+ if (obj.namespace !== undefined) {
1255
+ const obj_namespace = obj.namespace;
1256
+ const path_namespace = path + '.namespace';
1257
+ if (typeof obj_namespace !== 'string') {
1258
+ return new TypeError('Expected "string" but received "' + typeof obj_namespace + '" (at "' + path_namespace + '")');
1259
+ }
1260
+ }
1261
+ if (obj.status !== undefined) {
1262
+ const obj_status = obj.status;
1263
+ const path_status = path + '.status';
1264
+ if (typeof obj_status !== 'string') {
1265
+ return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
1266
+ }
1267
+ }
1268
+ if (obj.url !== undefined) {
1269
+ const obj_url = obj.url;
1270
+ const path_url = path + '.url';
1271
+ if (typeof obj_url !== 'string') {
1272
+ return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
1273
+ }
1274
+ }
1275
+ })();
1276
+ return v_error === undefined ? null : v_error;
1277
+ }
1278
+ const RepresentationType$1 = 'CommunicationCappingRepresentation';
1279
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
1280
+ return input;
1281
+ }
1282
+ const select$4 = function CommunicationCappingRepresentationSelect() {
1283
+ const { selections: CdpUserRepresentation__selections, opaque: CdpUserRepresentation__opaque, } = select$a();
1284
+ const { selections: DataSpaceRepresentation__selections, opaque: DataSpaceRepresentation__opaque, } = select$7();
1285
+ const { selections: DimensionRepresentation__selections, opaque: DimensionRepresentation__opaque, } = select$5();
1286
+ return {
1287
+ kind: 'Fragment',
1288
+ version: VERSION$2,
1289
+ private: [],
1290
+ selections: [
1291
+ {
1292
+ name: 'createdBy',
1293
+ kind: 'Object',
1294
+ selections: CdpUserRepresentation__selections,
1295
+ required: false
1296
+ },
1297
+ {
1298
+ name: 'createdDate',
1299
+ kind: 'Scalar',
1300
+ required: false
1301
+ },
1302
+ {
1303
+ name: 'dataspacesInfo',
1304
+ kind: 'Object',
1305
+ plural: true,
1306
+ selections: DataSpaceRepresentation__selections
1307
+ },
1308
+ {
1309
+ name: 'description',
1310
+ kind: 'Scalar',
1311
+ required: false
1312
+ },
1313
+ {
1314
+ name: 'dimensions',
1315
+ kind: 'Object',
1316
+ plural: true,
1317
+ selections: DimensionRepresentation__selections
1318
+ },
1319
+ {
1320
+ name: 'id',
1321
+ kind: 'Scalar'
1322
+ },
1323
+ {
1324
+ name: 'label',
1325
+ kind: 'Scalar',
1326
+ required: false
1327
+ },
1328
+ {
1329
+ name: 'lastModifiedBy',
1330
+ kind: 'Object',
1331
+ selections: CdpUserRepresentation__selections,
1332
+ required: false
1333
+ },
1334
+ {
1335
+ name: 'lastModifiedDate',
1336
+ kind: 'Scalar',
1337
+ required: false
1338
+ },
1339
+ {
1340
+ name: 'name',
1341
+ kind: 'Scalar'
1342
+ },
1343
+ {
1344
+ name: 'namespace',
1345
+ kind: 'Scalar',
1346
+ required: false
1347
+ },
1348
+ {
1349
+ name: 'status',
1350
+ kind: 'Scalar',
1351
+ required: false
1352
+ },
1353
+ {
1354
+ name: 'url',
1355
+ kind: 'Scalar',
1356
+ required: false
1357
+ }
1358
+ ]
1359
+ };
1360
+ };
1361
+ function equals$2(existing, incoming) {
1362
+ const existing_createdDate = existing.createdDate;
1363
+ const incoming_createdDate = incoming.createdDate;
1364
+ // if at least one of these optionals is defined
1365
+ if (existing_createdDate !== undefined || incoming_createdDate !== undefined) {
1366
+ // if one of these is not defined we know the other is defined and therefore
1367
+ // not equal
1368
+ if (existing_createdDate === undefined || incoming_createdDate === undefined) {
1369
+ return false;
1370
+ }
1371
+ if (!(existing_createdDate === incoming_createdDate)) {
1372
+ return false;
1373
+ }
1374
+ }
1375
+ const existing_id = existing.id;
1376
+ const incoming_id = incoming.id;
1377
+ if (!(existing_id === incoming_id)) {
1378
+ return false;
1379
+ }
1380
+ const existing_label = existing.label;
1381
+ const incoming_label = incoming.label;
1382
+ // if at least one of these optionals is defined
1383
+ if (existing_label !== undefined || incoming_label !== undefined) {
1384
+ // if one of these is not defined we know the other is defined and therefore
1385
+ // not equal
1386
+ if (existing_label === undefined || incoming_label === undefined) {
1387
+ return false;
1388
+ }
1389
+ if (!(existing_label === incoming_label)) {
1390
+ return false;
1391
+ }
1392
+ }
1393
+ const existing_lastModifiedDate = existing.lastModifiedDate;
1394
+ const incoming_lastModifiedDate = incoming.lastModifiedDate;
1395
+ // if at least one of these optionals is defined
1396
+ if (existing_lastModifiedDate !== undefined || incoming_lastModifiedDate !== undefined) {
1397
+ // if one of these is not defined we know the other is defined and therefore
1398
+ // not equal
1399
+ if (existing_lastModifiedDate === undefined || incoming_lastModifiedDate === undefined) {
1400
+ return false;
1401
+ }
1402
+ if (!(existing_lastModifiedDate === incoming_lastModifiedDate)) {
1403
+ return false;
1404
+ }
1405
+ }
1406
+ const existing_name = existing.name;
1407
+ const incoming_name = incoming.name;
1408
+ if (!(existing_name === incoming_name)) {
1409
+ return false;
1410
+ }
1411
+ const existing_namespace = existing.namespace;
1412
+ const incoming_namespace = incoming.namespace;
1413
+ // if at least one of these optionals is defined
1414
+ if (existing_namespace !== undefined || incoming_namespace !== undefined) {
1415
+ // if one of these is not defined we know the other is defined and therefore
1416
+ // not equal
1417
+ if (existing_namespace === undefined || incoming_namespace === undefined) {
1418
+ return false;
1419
+ }
1420
+ if (!(existing_namespace === incoming_namespace)) {
1421
+ return false;
1422
+ }
1423
+ }
1424
+ const existing_status = existing.status;
1425
+ const incoming_status = incoming.status;
1426
+ // if at least one of these optionals is defined
1427
+ if (existing_status !== undefined || incoming_status !== undefined) {
1428
+ // if one of these is not defined we know the other is defined and therefore
1429
+ // not equal
1430
+ if (existing_status === undefined || incoming_status === undefined) {
1431
+ return false;
1432
+ }
1433
+ if (!(existing_status === incoming_status)) {
1434
+ return false;
1435
+ }
1436
+ }
1437
+ const existing_url = existing.url;
1438
+ const incoming_url = incoming.url;
1439
+ // if at least one of these optionals is defined
1440
+ if (existing_url !== undefined || incoming_url !== undefined) {
1441
+ // if one of these is not defined we know the other is defined and therefore
1442
+ // not equal
1443
+ if (existing_url === undefined || incoming_url === undefined) {
1444
+ return false;
1445
+ }
1446
+ if (!(existing_url === incoming_url)) {
1447
+ return false;
1448
+ }
1449
+ }
1450
+ const existing_createdBy = existing.createdBy;
1451
+ const incoming_createdBy = incoming.createdBy;
1452
+ // if at least one of these optionals is defined
1453
+ if (existing_createdBy !== undefined || incoming_createdBy !== undefined) {
1454
+ // if one of these is not defined we know the other is defined and therefore
1455
+ // not equal
1456
+ if (existing_createdBy === undefined || incoming_createdBy === undefined) {
1457
+ return false;
1458
+ }
1459
+ if (!(equals$8(existing_createdBy, incoming_createdBy))) {
1460
+ return false;
1461
+ }
1462
+ }
1463
+ const existing_dataspacesInfo = existing.dataspacesInfo;
1464
+ const incoming_dataspacesInfo = incoming.dataspacesInfo;
1465
+ const equals_dataspacesInfo_items = equalsArray(existing_dataspacesInfo, incoming_dataspacesInfo, (existing_dataspacesInfo_item, incoming_dataspacesInfo_item) => {
1466
+ if (!(equals$5(existing_dataspacesInfo_item, incoming_dataspacesInfo_item))) {
1467
+ return false;
1468
+ }
1469
+ });
1470
+ if (equals_dataspacesInfo_items === false) {
1471
+ return false;
1472
+ }
1473
+ const existing_description = existing.description;
1474
+ const incoming_description = incoming.description;
1475
+ // if at least one of these optionals is defined
1476
+ if (existing_description !== undefined || incoming_description !== undefined) {
1477
+ // if one of these is not defined we know the other is defined and therefore
1478
+ // not equal
1479
+ if (existing_description === undefined || incoming_description === undefined) {
1480
+ return false;
1481
+ }
1482
+ if (!(existing_description === incoming_description)) {
1483
+ return false;
1484
+ }
1485
+ }
1486
+ const existing_dimensions = existing.dimensions;
1487
+ const incoming_dimensions = incoming.dimensions;
1488
+ const equals_dimensions_items = equalsArray(existing_dimensions, incoming_dimensions, (existing_dimensions_item, incoming_dimensions_item) => {
1489
+ if (!(equals$3(existing_dimensions_item, incoming_dimensions_item))) {
1490
+ return false;
1491
+ }
1492
+ });
1493
+ if (equals_dimensions_items === false) {
1494
+ return false;
1495
+ }
1496
+ const existing_lastModifiedBy = existing.lastModifiedBy;
1497
+ const incoming_lastModifiedBy = incoming.lastModifiedBy;
1498
+ // if at least one of these optionals is defined
1499
+ if (existing_lastModifiedBy !== undefined || incoming_lastModifiedBy !== undefined) {
1500
+ // if one of these is not defined we know the other is defined and therefore
1501
+ // not equal
1502
+ if (existing_lastModifiedBy === undefined || incoming_lastModifiedBy === undefined) {
1503
+ return false;
1504
+ }
1505
+ if (!(equals$8(existing_lastModifiedBy, incoming_lastModifiedBy))) {
1506
+ return false;
1507
+ }
1508
+ }
1509
+ return true;
1510
+ }
1511
+ const ingest$1 = function CommunicationCappingRepresentationIngest(input, path, luvio, store, timestamp) {
1512
+ if (process.env.NODE_ENV !== 'production') {
1513
+ const validateError = validate$2(input);
1514
+ if (validateError !== null) {
1515
+ throw validateError;
1516
+ }
1517
+ }
1518
+ const key = path.fullPath;
1519
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
1520
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "communication-capping", VERSION$2, RepresentationType$1, equals$2);
1521
+ return createLink(key);
1522
+ };
1523
+ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
1524
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1525
+ const rootKey = fullPathFactory();
1526
+ rootKeySet.set(rootKey, {
1527
+ namespace: keyPrefix,
1528
+ representationName: RepresentationType$1,
1529
+ mergeable: false
1530
+ });
1531
+ }
1532
+
1533
+ function select$3(luvio, params) {
1534
+ return select$4();
1535
+ }
1536
+ function keyBuilder$2(luvio, params) {
1537
+ return keyPrefix + '::CommunicationCappingRepresentation:(' + 'idOrName:' + params.urlParams.idOrName + ')';
1538
+ }
1539
+ function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
1540
+ getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$2(luvio, resourceParams));
1541
+ }
1542
+ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
1543
+ const { body } = response;
1544
+ const key = keyBuilder$2(luvio, resourceParams);
1545
+ luvio.storeIngest(key, ingest$1, body);
1546
+ const snapshot = luvio.storeLookup({
1547
+ recordId: key,
1548
+ node: select$3(),
1549
+ variables: {},
1550
+ }, snapshotRefresh);
1551
+ if (process.env.NODE_ENV !== 'production') {
1552
+ if (snapshot.state !== 'Fulfilled') {
1553
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1554
+ }
1555
+ }
1556
+ deepFreeze(snapshot.data);
1557
+ return snapshot;
1558
+ }
1559
+ function ingestError(luvio, params, error, snapshotRefresh) {
1560
+ const key = keyBuilder$2(luvio, params);
1561
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1562
+ luvio.storeIngestError(key, errorSnapshot);
1563
+ return errorSnapshot;
1564
+ }
1565
+ function createResourceRequest$1(config) {
1566
+ const headers = {};
1567
+ return {
1568
+ baseUri: '/services/data/v66.0',
1569
+ basePath: '/ssot/communication-cappings/' + config.urlParams.idOrName + '',
1570
+ method: 'get',
1571
+ body: null,
1572
+ urlParams: config.urlParams,
1573
+ queryParams: {},
1574
+ headers,
1575
+ priority: 'normal',
1576
+ };
1577
+ }
1578
+
1579
+ const adapterName$1 = 'getCommunicationCappingRepresentation';
1580
+ const getCommunicationCappingRepresentation_ConfigPropertyMetadata = [
1581
+ generateParamConfigMetadata('idOrName', true, 0 /* UrlParameter */, 0 /* String */),
1582
+ ];
1583
+ const getCommunicationCappingRepresentation_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getCommunicationCappingRepresentation_ConfigPropertyMetadata);
1584
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$2(getCommunicationCappingRepresentation_ConfigPropertyMetadata);
1585
+ function keyBuilder$1(luvio, config) {
1586
+ const resourceParams = createResourceParams$1(config);
1587
+ return keyBuilder$2(luvio, resourceParams);
1588
+ }
1589
+ function typeCheckConfig$1(untrustedConfig) {
1590
+ const config = {};
1591
+ typeCheckConfig$2(untrustedConfig, config, getCommunicationCappingRepresentation_ConfigPropertyMetadata);
1592
+ return config;
1593
+ }
1594
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1595
+ if (!untrustedIsObject(untrustedConfig)) {
1596
+ return null;
1597
+ }
1598
+ if (process.env.NODE_ENV !== 'production') {
1599
+ validateConfig(untrustedConfig, configPropertyNames);
1600
+ }
1601
+ const config = typeCheckConfig$1(untrustedConfig);
1602
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1603
+ return null;
1604
+ }
1605
+ return config;
1606
+ }
1607
+ function adapterFragment(luvio, config) {
1608
+ createResourceParams$1(config);
1609
+ return select$3();
1610
+ }
1611
+ function onFetchResponseSuccess(luvio, config, resourceParams, response) {
1612
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
1613
+ config,
1614
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1615
+ });
1616
+ return luvio.storeBroadcast().then(() => snapshot);
1617
+ }
1618
+ function onFetchResponseError(luvio, config, resourceParams, response) {
1619
+ const snapshot = ingestError(luvio, resourceParams, response, {
1620
+ config,
1621
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1622
+ });
1623
+ return luvio.storeBroadcast().then(() => snapshot);
1624
+ }
1625
+ function buildNetworkSnapshot$1(luvio, config, options) {
1626
+ const resourceParams = createResourceParams$1(config);
1627
+ const request = createResourceRequest$1(resourceParams);
1628
+ return luvio.dispatchResourceRequest(request, options)
1629
+ .then((response) => {
1630
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
1631
+ const cache = new StoreKeyMap();
1632
+ getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
1633
+ return cache;
1634
+ });
1635
+ }, (response) => {
1636
+ return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
1637
+ });
1638
+ }
1639
+ function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
1640
+ return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
1641
+ }
1642
+ function buildCachedSnapshotCachePolicy(context, storeLookup) {
1643
+ const { luvio, config } = context;
1644
+ const selector = {
1645
+ recordId: keyBuilder$1(luvio, config),
1646
+ node: adapterFragment(luvio, config),
1647
+ variables: {},
1648
+ };
1649
+ const cacheSnapshot = storeLookup(selector, {
1650
+ config,
1651
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1652
+ });
1653
+ return cacheSnapshot;
1654
+ }
1655
+ const getCommunicationCappingRepresentationAdapterFactory = (luvio) => function communicationCapping__getCommunicationCappingRepresentation(untrustedConfig, requestContext) {
1656
+ const config = validateAdapterConfig$1(untrustedConfig, getCommunicationCappingRepresentation_ConfigPropertyNames);
1657
+ // Invalid or incomplete config
1658
+ if (config === null) {
1659
+ return null;
1660
+ }
1661
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1662
+ buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
1663
+ };
1664
+
1665
+ const VERSION$1 = "70c253ff0d0ce928bf7196b1a24d910f";
1666
+ function validate$1(obj, path = 'CdpErrorRepresentation') {
1667
+ const v_error = (() => {
1668
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1669
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1670
+ }
1671
+ if (obj.errorCode !== undefined) {
1672
+ const obj_errorCode = obj.errorCode;
1673
+ const path_errorCode = path + '.errorCode';
1674
+ if (typeof obj_errorCode !== 'string') {
1675
+ return new TypeError('Expected "string" but received "' + typeof obj_errorCode + '" (at "' + path_errorCode + '")');
1676
+ }
1677
+ }
1678
+ if (obj.message !== undefined) {
1679
+ const obj_message = obj.message;
1680
+ const path_message = path + '.message';
1681
+ if (typeof obj_message !== 'string') {
1682
+ return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
1683
+ }
1684
+ }
1685
+ })();
1686
+ return v_error === undefined ? null : v_error;
1687
+ }
1688
+ const select$2 = function CdpErrorRepresentationSelect() {
1689
+ return {
1690
+ kind: 'Fragment',
1691
+ version: VERSION$1,
1692
+ private: [],
1693
+ selections: [
1694
+ {
1695
+ name: 'errorCode',
1696
+ kind: 'Scalar',
1697
+ required: false
1698
+ },
1699
+ {
1700
+ name: 'message',
1701
+ kind: 'Scalar',
1702
+ required: false
1703
+ }
1704
+ ]
1705
+ };
1706
+ };
1707
+ function equals$1(existing, incoming) {
1708
+ const existing_errorCode = existing.errorCode;
1709
+ const incoming_errorCode = incoming.errorCode;
1710
+ // if at least one of these optionals is defined
1711
+ if (existing_errorCode !== undefined || incoming_errorCode !== undefined) {
1712
+ // if one of these is not defined we know the other is defined and therefore
1713
+ // not equal
1714
+ if (existing_errorCode === undefined || incoming_errorCode === undefined) {
1715
+ return false;
1716
+ }
1717
+ if (!(existing_errorCode === incoming_errorCode)) {
1718
+ return false;
1719
+ }
1720
+ }
1721
+ const existing_message = existing.message;
1722
+ const incoming_message = incoming.message;
1723
+ // if at least one of these optionals is defined
1724
+ if (existing_message !== undefined || incoming_message !== undefined) {
1725
+ // if one of these is not defined we know the other is defined and therefore
1726
+ // not equal
1727
+ if (existing_message === undefined || incoming_message === undefined) {
1728
+ return false;
1729
+ }
1730
+ if (!(existing_message === incoming_message)) {
1731
+ return false;
1732
+ }
1733
+ }
1734
+ return true;
1735
+ }
1736
+
1737
+ const VERSION = "dff02814b99940016ea8b72cf560f333";
1738
+ function validate(obj, path = 'CommunicationCappingActionResponseRepresentation') {
1739
+ const v_error = (() => {
1740
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1741
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1742
+ }
1743
+ const obj_errors = obj.errors;
1744
+ const path_errors = path + '.errors';
1745
+ if (!ArrayIsArray(obj_errors)) {
1746
+ return new TypeError('Expected "array" but received "' + typeof obj_errors + '" (at "' + path_errors + '")');
1747
+ }
1748
+ for (let i = 0; i < obj_errors.length; i++) {
1749
+ const obj_errors_item = obj_errors[i];
1750
+ const path_errors_item = path_errors + '[' + i + ']';
1751
+ const referencepath_errors_itemValidationError = validate$1(obj_errors_item, path_errors_item);
1752
+ if (referencepath_errors_itemValidationError !== null) {
1753
+ let message = 'Object doesn\'t match CdpErrorRepresentation (at "' + path_errors_item + '")\n';
1754
+ message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1755
+ return new TypeError(message);
1756
+ }
1757
+ }
1758
+ const obj_success = obj.success;
1759
+ const path_success = path + '.success';
1760
+ if (typeof obj_success !== 'boolean') {
1761
+ return new TypeError('Expected "boolean" but received "' + typeof obj_success + '" (at "' + path_success + '")');
1762
+ }
1763
+ })();
1764
+ return v_error === undefined ? null : v_error;
1765
+ }
1766
+ const RepresentationType = 'CommunicationCappingActionResponseRepresentation';
1767
+ function keyBuilder(luvio, config) {
1768
+ return keyPrefix + '::' + RepresentationType + ':' + config.success;
1769
+ }
1770
+ function keyBuilderFromType(luvio, object) {
1771
+ const keyParams = {
1772
+ success: object.success
1773
+ };
1774
+ return keyBuilder(luvio, keyParams);
1775
+ }
1776
+ function normalize(input, existing, path, luvio, store, timestamp) {
1777
+ return input;
1778
+ }
1779
+ const select$1 = function CommunicationCappingActionResponseRepresentationSelect() {
1780
+ const { selections: CdpErrorRepresentation__selections, opaque: CdpErrorRepresentation__opaque, } = select$2();
1781
+ return {
1782
+ kind: 'Fragment',
1783
+ version: VERSION,
1784
+ private: [],
1785
+ selections: [
1786
+ {
1787
+ name: 'errors',
1788
+ kind: 'Object',
1789
+ plural: true,
1790
+ selections: CdpErrorRepresentation__selections
1791
+ },
1792
+ {
1793
+ name: 'success',
1794
+ kind: 'Scalar'
1795
+ }
1796
+ ]
1797
+ };
1798
+ };
1799
+ function equals(existing, incoming) {
1800
+ const existing_success = existing.success;
1801
+ const incoming_success = incoming.success;
1802
+ if (!(existing_success === incoming_success)) {
1803
+ return false;
1804
+ }
1805
+ const existing_errors = existing.errors;
1806
+ const incoming_errors = incoming.errors;
1807
+ const equals_errors_items = equalsArray(existing_errors, incoming_errors, (existing_errors_item, incoming_errors_item) => {
1808
+ if (!(equals$1(existing_errors_item, incoming_errors_item))) {
1809
+ return false;
1810
+ }
1811
+ });
1812
+ if (equals_errors_items === false) {
1813
+ return false;
1814
+ }
1815
+ return true;
1816
+ }
1817
+ const ingest = function CommunicationCappingActionResponseRepresentationIngest(input, path, luvio, store, timestamp) {
1818
+ if (process.env.NODE_ENV !== 'production') {
1819
+ const validateError = validate(input);
1820
+ if (validateError !== null) {
1821
+ throw validateError;
1822
+ }
1823
+ }
1824
+ const key = keyBuilderFromType(luvio, input);
1825
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
1826
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "communication-capping", VERSION, RepresentationType, equals);
1827
+ return createLink(key);
1828
+ };
1829
+ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
1830
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1831
+ const rootKey = keyBuilderFromType(luvio, input);
1832
+ rootKeySet.set(rootKey, {
1833
+ namespace: keyPrefix,
1834
+ representationName: RepresentationType,
1835
+ mergeable: false
1836
+ });
1837
+ }
1838
+
1839
+ function select(luvio, params) {
1840
+ return select$1();
1841
+ }
1842
+ function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
1843
+ getTypeCacheKeys(storeKeyMap, luvio, response);
1844
+ }
1845
+ function ingestSuccess(luvio, resourceParams, response) {
1846
+ const { body } = response;
1847
+ const key = keyBuilderFromType(luvio, body);
1848
+ luvio.storeIngest(key, ingest, body);
1849
+ const snapshot = luvio.storeLookup({
1850
+ recordId: key,
1851
+ node: select(),
1852
+ variables: {},
1853
+ });
1854
+ if (process.env.NODE_ENV !== 'production') {
1855
+ if (snapshot.state !== 'Fulfilled') {
1856
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1857
+ }
1858
+ }
1859
+ deepFreeze(snapshot.data);
1860
+ return snapshot;
1861
+ }
1862
+ function createResourceRequest(config) {
1863
+ const headers = {};
1864
+ return {
1865
+ baseUri: '/services/data/v66.0',
1866
+ basePath: '/ssot/communication-cappings/' + config.urlParams.idOrName + '/actions/retry',
1867
+ method: 'post',
1868
+ body: null,
1869
+ urlParams: config.urlParams,
1870
+ queryParams: {},
1871
+ headers,
1872
+ priority: 'normal',
1873
+ };
1874
+ }
1875
+
1876
+ const adapterName = 'triggerDMOCICreation';
1877
+ const triggerDMOCICreation_ConfigPropertyMetadata = [
1878
+ generateParamConfigMetadata('idOrName', true, 0 /* UrlParameter */, 0 /* String */),
1879
+ ];
1880
+ const triggerDMOCICreation_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, triggerDMOCICreation_ConfigPropertyMetadata);
1881
+ const createResourceParams = /*#__PURE__*/ createResourceParams$2(triggerDMOCICreation_ConfigPropertyMetadata);
1882
+ function typeCheckConfig(untrustedConfig) {
1883
+ const config = {};
1884
+ typeCheckConfig$2(untrustedConfig, config, triggerDMOCICreation_ConfigPropertyMetadata);
1885
+ return config;
1886
+ }
1887
+ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
1888
+ if (!untrustedIsObject(untrustedConfig)) {
1889
+ return null;
1890
+ }
1891
+ if (process.env.NODE_ENV !== 'production') {
1892
+ validateConfig(untrustedConfig, configPropertyNames);
1893
+ }
1894
+ const config = typeCheckConfig(untrustedConfig);
1895
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1896
+ return null;
1897
+ }
1898
+ return config;
1899
+ }
1900
+ function buildNetworkSnapshot(luvio, config, options) {
1901
+ const resourceParams = createResourceParams(config);
1902
+ const request = createResourceRequest(resourceParams);
1903
+ return luvio.dispatchResourceRequest(request, options)
1904
+ .then((response) => {
1905
+ return luvio.handleSuccessResponse(() => {
1906
+ const snapshot = ingestSuccess(luvio, resourceParams, response);
1907
+ return luvio.storeBroadcast().then(() => snapshot);
1908
+ }, () => {
1909
+ const cache = new StoreKeyMap();
1910
+ getResponseCacheKeys(cache, luvio, resourceParams, response.body);
1911
+ return cache;
1912
+ });
1913
+ }, (response) => {
1914
+ deepFreeze(response);
1915
+ throw response;
1916
+ });
1917
+ }
1918
+ const triggerDMOCICreationAdapterFactory = (luvio) => {
1919
+ return function triggerDMOCICreation(untrustedConfig) {
1920
+ const config = validateAdapterConfig(untrustedConfig, triggerDMOCICreation_ConfigPropertyNames);
1921
+ // Invalid or incomplete config
1922
+ if (config === null) {
1923
+ throw new Error('Invalid config for "triggerDMOCICreation"');
1924
+ }
1925
+ return buildNetworkSnapshot(luvio, config);
1926
+ };
1927
+ };
1928
+
1929
+ let getCommunicationCappingRepresentation;
1930
+ let triggerDMOCICreation;
1931
+ // Imperative GET Adapters
1932
+ let getCommunicationCappingRepresentation_imperative;
1933
+ // Adapter Metadata
1934
+ const getCommunicationCappingRepresentationMetadata = {
1935
+ apiFamily: 'communicationcapping',
1936
+ name: 'getCommunicationCappingRepresentation',
1937
+ };
1938
+ // Notify Update Available
1939
+ function bindExportsTo(luvio) {
1940
+ // LDS Adapters
1941
+ const getCommunicationCappingRepresentation_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getCommunicationCappingRepresentation', getCommunicationCappingRepresentationAdapterFactory), getCommunicationCappingRepresentationMetadata);
1942
+ function unwrapSnapshotData(factory) {
1943
+ const adapter = factory(luvio);
1944
+ return (config) => adapter(config).then((snapshot) => snapshot.data);
1945
+ }
1946
+ return {
1947
+ getCommunicationCappingRepresentation: createWireAdapterConstructor(luvio, getCommunicationCappingRepresentation_ldsAdapter, getCommunicationCappingRepresentationMetadata),
1948
+ triggerDMOCICreation: unwrapSnapshotData(triggerDMOCICreationAdapterFactory),
1949
+ // Imperative GET Adapters
1950
+ getCommunicationCappingRepresentation_imperative: createImperativeAdapter(luvio, getCommunicationCappingRepresentation_ldsAdapter, getCommunicationCappingRepresentationMetadata),
1951
+ // Notify Update Availables
1952
+ };
1953
+ }
1954
+ withDefaultLuvio((luvio) => {
1955
+ ({
1956
+ getCommunicationCappingRepresentation,
1957
+ triggerDMOCICreation,
1958
+ getCommunicationCappingRepresentation_imperative,
1959
+ } = bindExportsTo(luvio));
1960
+ });
1961
+
1962
+ export { getCommunicationCappingRepresentation, getCommunicationCappingRepresentation_imperative, triggerDMOCICreation };
1963
+ // version: 0.1.0-dev1-c978a7b010