@salesforce/lds-adapters-cdp-communication-capping 1.309.0-dev16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +82 -0
- package/dist/es/es2018/cdp-communication-capping.js +1908 -0
- package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +62 -0
- package/dist/es/es2018/types/src/generated/adapters/getCommunicationCappingRepresentation.d.ts +27 -0
- package/dist/es/es2018/types/src/generated/adapters/triggerDMOCICreation.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +4 -0
- package/dist/es/es2018/types/src/generated/resources/getSsotCommunicationCappingsByIdOrName.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/resources/postSsotCommunicationCappingsActionsRetryByIdOrName.d.ts +12 -0
- package/dist/es/es2018/types/src/generated/types/CdpErrorRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/CdpUserRepresentation.d.ts +34 -0
- package/dist/es/es2018/types/src/generated/types/CommunicationCappingActionResponseRepresentation.d.ts +41 -0
- package/dist/es/es2018/types/src/generated/types/CommunicationCappingRepresentation.d.ts +67 -0
- package/dist/es/es2018/types/src/generated/types/DataSpaceFilterConditionRepresentation.d.ts +37 -0
- package/dist/es/es2018/types/src/generated/types/DataSpaceFilterRepresentation.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/types/DataSpaceRepresentation.d.ts +57 -0
- package/dist/es/es2018/types/src/generated/types/DimensionRepresentation.d.ts +63 -0
- package/dist/es/es2018/types/src/generated/types/DimensionValueRepresentation.d.ts +53 -0
- package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
- package/package.json +66 -0
- package/sfdc/index.d.ts +1 -0
- package/sfdc/index.js +1952 -0
- package/src/raml/api.raml +290 -0
- package/src/raml/luvio.raml +24 -0
package/sfdc/index.js
ADDED
|
@@ -0,0 +1,1952 @@
|
|
|
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 = "26273e62ddf505ba98a3cdcf6adb29ad";
|
|
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
|
+
const obj_status = obj.status;
|
|
1262
|
+
const path_status = path + '.status';
|
|
1263
|
+
if (typeof obj_status !== 'string') {
|
|
1264
|
+
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
1265
|
+
}
|
|
1266
|
+
if (obj.url !== undefined) {
|
|
1267
|
+
const obj_url = obj.url;
|
|
1268
|
+
const path_url = path + '.url';
|
|
1269
|
+
if (typeof obj_url !== 'string') {
|
|
1270
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
})();
|
|
1274
|
+
return v_error === undefined ? null : v_error;
|
|
1275
|
+
}
|
|
1276
|
+
const RepresentationType$1 = 'CommunicationCappingRepresentation';
|
|
1277
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
1278
|
+
return input;
|
|
1279
|
+
}
|
|
1280
|
+
const select$4 = function CommunicationCappingRepresentationSelect() {
|
|
1281
|
+
const { selections: CdpUserRepresentation__selections, opaque: CdpUserRepresentation__opaque, } = select$a();
|
|
1282
|
+
const { selections: DataSpaceRepresentation__selections, opaque: DataSpaceRepresentation__opaque, } = select$7();
|
|
1283
|
+
const { selections: DimensionRepresentation__selections, opaque: DimensionRepresentation__opaque, } = select$5();
|
|
1284
|
+
return {
|
|
1285
|
+
kind: 'Fragment',
|
|
1286
|
+
version: VERSION$2,
|
|
1287
|
+
private: [],
|
|
1288
|
+
selections: [
|
|
1289
|
+
{
|
|
1290
|
+
name: 'createdBy',
|
|
1291
|
+
kind: 'Object',
|
|
1292
|
+
selections: CdpUserRepresentation__selections,
|
|
1293
|
+
required: false
|
|
1294
|
+
},
|
|
1295
|
+
{
|
|
1296
|
+
name: 'createdDate',
|
|
1297
|
+
kind: 'Scalar',
|
|
1298
|
+
required: false
|
|
1299
|
+
},
|
|
1300
|
+
{
|
|
1301
|
+
name: 'dataspacesInfo',
|
|
1302
|
+
kind: 'Object',
|
|
1303
|
+
plural: true,
|
|
1304
|
+
selections: DataSpaceRepresentation__selections
|
|
1305
|
+
},
|
|
1306
|
+
{
|
|
1307
|
+
name: 'description',
|
|
1308
|
+
kind: 'Scalar',
|
|
1309
|
+
required: false
|
|
1310
|
+
},
|
|
1311
|
+
{
|
|
1312
|
+
name: 'dimensions',
|
|
1313
|
+
kind: 'Object',
|
|
1314
|
+
plural: true,
|
|
1315
|
+
selections: DimensionRepresentation__selections
|
|
1316
|
+
},
|
|
1317
|
+
{
|
|
1318
|
+
name: 'id',
|
|
1319
|
+
kind: 'Scalar'
|
|
1320
|
+
},
|
|
1321
|
+
{
|
|
1322
|
+
name: 'label',
|
|
1323
|
+
kind: 'Scalar',
|
|
1324
|
+
required: false
|
|
1325
|
+
},
|
|
1326
|
+
{
|
|
1327
|
+
name: 'lastModifiedBy',
|
|
1328
|
+
kind: 'Object',
|
|
1329
|
+
selections: CdpUserRepresentation__selections,
|
|
1330
|
+
required: false
|
|
1331
|
+
},
|
|
1332
|
+
{
|
|
1333
|
+
name: 'lastModifiedDate',
|
|
1334
|
+
kind: 'Scalar',
|
|
1335
|
+
required: false
|
|
1336
|
+
},
|
|
1337
|
+
{
|
|
1338
|
+
name: 'name',
|
|
1339
|
+
kind: 'Scalar'
|
|
1340
|
+
},
|
|
1341
|
+
{
|
|
1342
|
+
name: 'namespace',
|
|
1343
|
+
kind: 'Scalar',
|
|
1344
|
+
required: false
|
|
1345
|
+
},
|
|
1346
|
+
{
|
|
1347
|
+
name: 'status',
|
|
1348
|
+
kind: 'Scalar'
|
|
1349
|
+
},
|
|
1350
|
+
{
|
|
1351
|
+
name: 'url',
|
|
1352
|
+
kind: 'Scalar',
|
|
1353
|
+
required: false
|
|
1354
|
+
}
|
|
1355
|
+
]
|
|
1356
|
+
};
|
|
1357
|
+
};
|
|
1358
|
+
function equals$2(existing, incoming) {
|
|
1359
|
+
const existing_createdDate = existing.createdDate;
|
|
1360
|
+
const incoming_createdDate = incoming.createdDate;
|
|
1361
|
+
// if at least one of these optionals is defined
|
|
1362
|
+
if (existing_createdDate !== undefined || incoming_createdDate !== undefined) {
|
|
1363
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1364
|
+
// not equal
|
|
1365
|
+
if (existing_createdDate === undefined || incoming_createdDate === undefined) {
|
|
1366
|
+
return false;
|
|
1367
|
+
}
|
|
1368
|
+
if (!(existing_createdDate === incoming_createdDate)) {
|
|
1369
|
+
return false;
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
const existing_id = existing.id;
|
|
1373
|
+
const incoming_id = incoming.id;
|
|
1374
|
+
if (!(existing_id === incoming_id)) {
|
|
1375
|
+
return false;
|
|
1376
|
+
}
|
|
1377
|
+
const existing_label = existing.label;
|
|
1378
|
+
const incoming_label = incoming.label;
|
|
1379
|
+
// if at least one of these optionals is defined
|
|
1380
|
+
if (existing_label !== undefined || incoming_label !== undefined) {
|
|
1381
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1382
|
+
// not equal
|
|
1383
|
+
if (existing_label === undefined || incoming_label === undefined) {
|
|
1384
|
+
return false;
|
|
1385
|
+
}
|
|
1386
|
+
if (!(existing_label === incoming_label)) {
|
|
1387
|
+
return false;
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
const existing_lastModifiedDate = existing.lastModifiedDate;
|
|
1391
|
+
const incoming_lastModifiedDate = incoming.lastModifiedDate;
|
|
1392
|
+
// if at least one of these optionals is defined
|
|
1393
|
+
if (existing_lastModifiedDate !== undefined || incoming_lastModifiedDate !== undefined) {
|
|
1394
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1395
|
+
// not equal
|
|
1396
|
+
if (existing_lastModifiedDate === undefined || incoming_lastModifiedDate === undefined) {
|
|
1397
|
+
return false;
|
|
1398
|
+
}
|
|
1399
|
+
if (!(existing_lastModifiedDate === incoming_lastModifiedDate)) {
|
|
1400
|
+
return false;
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
const existing_name = existing.name;
|
|
1404
|
+
const incoming_name = incoming.name;
|
|
1405
|
+
if (!(existing_name === incoming_name)) {
|
|
1406
|
+
return false;
|
|
1407
|
+
}
|
|
1408
|
+
const existing_namespace = existing.namespace;
|
|
1409
|
+
const incoming_namespace = incoming.namespace;
|
|
1410
|
+
// if at least one of these optionals is defined
|
|
1411
|
+
if (existing_namespace !== undefined || incoming_namespace !== undefined) {
|
|
1412
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1413
|
+
// not equal
|
|
1414
|
+
if (existing_namespace === undefined || incoming_namespace === undefined) {
|
|
1415
|
+
return false;
|
|
1416
|
+
}
|
|
1417
|
+
if (!(existing_namespace === incoming_namespace)) {
|
|
1418
|
+
return false;
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
const existing_status = existing.status;
|
|
1422
|
+
const incoming_status = incoming.status;
|
|
1423
|
+
if (!(existing_status === incoming_status)) {
|
|
1424
|
+
return false;
|
|
1425
|
+
}
|
|
1426
|
+
const existing_url = existing.url;
|
|
1427
|
+
const incoming_url = incoming.url;
|
|
1428
|
+
// if at least one of these optionals is defined
|
|
1429
|
+
if (existing_url !== undefined || incoming_url !== undefined) {
|
|
1430
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1431
|
+
// not equal
|
|
1432
|
+
if (existing_url === undefined || incoming_url === undefined) {
|
|
1433
|
+
return false;
|
|
1434
|
+
}
|
|
1435
|
+
if (!(existing_url === incoming_url)) {
|
|
1436
|
+
return false;
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
const existing_createdBy = existing.createdBy;
|
|
1440
|
+
const incoming_createdBy = incoming.createdBy;
|
|
1441
|
+
// if at least one of these optionals is defined
|
|
1442
|
+
if (existing_createdBy !== undefined || incoming_createdBy !== undefined) {
|
|
1443
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1444
|
+
// not equal
|
|
1445
|
+
if (existing_createdBy === undefined || incoming_createdBy === undefined) {
|
|
1446
|
+
return false;
|
|
1447
|
+
}
|
|
1448
|
+
if (!(equals$8(existing_createdBy, incoming_createdBy))) {
|
|
1449
|
+
return false;
|
|
1450
|
+
}
|
|
1451
|
+
}
|
|
1452
|
+
const existing_dataspacesInfo = existing.dataspacesInfo;
|
|
1453
|
+
const incoming_dataspacesInfo = incoming.dataspacesInfo;
|
|
1454
|
+
const equals_dataspacesInfo_items = equalsArray(existing_dataspacesInfo, incoming_dataspacesInfo, (existing_dataspacesInfo_item, incoming_dataspacesInfo_item) => {
|
|
1455
|
+
if (!(equals$5(existing_dataspacesInfo_item, incoming_dataspacesInfo_item))) {
|
|
1456
|
+
return false;
|
|
1457
|
+
}
|
|
1458
|
+
});
|
|
1459
|
+
if (equals_dataspacesInfo_items === false) {
|
|
1460
|
+
return false;
|
|
1461
|
+
}
|
|
1462
|
+
const existing_description = existing.description;
|
|
1463
|
+
const incoming_description = incoming.description;
|
|
1464
|
+
// if at least one of these optionals is defined
|
|
1465
|
+
if (existing_description !== undefined || incoming_description !== undefined) {
|
|
1466
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1467
|
+
// not equal
|
|
1468
|
+
if (existing_description === undefined || incoming_description === undefined) {
|
|
1469
|
+
return false;
|
|
1470
|
+
}
|
|
1471
|
+
if (!(existing_description === incoming_description)) {
|
|
1472
|
+
return false;
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
const existing_dimensions = existing.dimensions;
|
|
1476
|
+
const incoming_dimensions = incoming.dimensions;
|
|
1477
|
+
const equals_dimensions_items = equalsArray(existing_dimensions, incoming_dimensions, (existing_dimensions_item, incoming_dimensions_item) => {
|
|
1478
|
+
if (!(equals$3(existing_dimensions_item, incoming_dimensions_item))) {
|
|
1479
|
+
return false;
|
|
1480
|
+
}
|
|
1481
|
+
});
|
|
1482
|
+
if (equals_dimensions_items === false) {
|
|
1483
|
+
return false;
|
|
1484
|
+
}
|
|
1485
|
+
const existing_lastModifiedBy = existing.lastModifiedBy;
|
|
1486
|
+
const incoming_lastModifiedBy = incoming.lastModifiedBy;
|
|
1487
|
+
// if at least one of these optionals is defined
|
|
1488
|
+
if (existing_lastModifiedBy !== undefined || incoming_lastModifiedBy !== undefined) {
|
|
1489
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1490
|
+
// not equal
|
|
1491
|
+
if (existing_lastModifiedBy === undefined || incoming_lastModifiedBy === undefined) {
|
|
1492
|
+
return false;
|
|
1493
|
+
}
|
|
1494
|
+
if (!(equals$8(existing_lastModifiedBy, incoming_lastModifiedBy))) {
|
|
1495
|
+
return false;
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
return true;
|
|
1499
|
+
}
|
|
1500
|
+
const ingest$1 = function CommunicationCappingRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1501
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1502
|
+
const validateError = validate$2(input);
|
|
1503
|
+
if (validateError !== null) {
|
|
1504
|
+
throw validateError;
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
const key = path.fullPath;
|
|
1508
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1509
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "communication-capping", VERSION$2, RepresentationType$1, equals$2);
|
|
1510
|
+
return createLink(key);
|
|
1511
|
+
};
|
|
1512
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
1513
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1514
|
+
const rootKey = fullPathFactory();
|
|
1515
|
+
rootKeySet.set(rootKey, {
|
|
1516
|
+
namespace: keyPrefix,
|
|
1517
|
+
representationName: RepresentationType$1,
|
|
1518
|
+
mergeable: false
|
|
1519
|
+
});
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1522
|
+
function select$3(luvio, params) {
|
|
1523
|
+
return select$4();
|
|
1524
|
+
}
|
|
1525
|
+
function keyBuilder$2(luvio, params) {
|
|
1526
|
+
return keyPrefix + '::CommunicationCappingRepresentation:(' + 'idOrName:' + params.urlParams.idOrName + ')';
|
|
1527
|
+
}
|
|
1528
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
1529
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$2(luvio, resourceParams));
|
|
1530
|
+
}
|
|
1531
|
+
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
1532
|
+
const { body } = response;
|
|
1533
|
+
const key = keyBuilder$2(luvio, resourceParams);
|
|
1534
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
1535
|
+
const snapshot = luvio.storeLookup({
|
|
1536
|
+
recordId: key,
|
|
1537
|
+
node: select$3(),
|
|
1538
|
+
variables: {},
|
|
1539
|
+
}, snapshotRefresh);
|
|
1540
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1541
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1542
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1543
|
+
}
|
|
1544
|
+
}
|
|
1545
|
+
deepFreeze(snapshot.data);
|
|
1546
|
+
return snapshot;
|
|
1547
|
+
}
|
|
1548
|
+
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
1549
|
+
const key = keyBuilder$2(luvio, params);
|
|
1550
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1551
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
1552
|
+
return errorSnapshot;
|
|
1553
|
+
}
|
|
1554
|
+
function createResourceRequest$1(config) {
|
|
1555
|
+
const headers = {};
|
|
1556
|
+
return {
|
|
1557
|
+
baseUri: '/services/data/v62.0',
|
|
1558
|
+
basePath: '/ssot/communication-cappings/' + config.urlParams.idOrName + '',
|
|
1559
|
+
method: 'get',
|
|
1560
|
+
body: null,
|
|
1561
|
+
urlParams: config.urlParams,
|
|
1562
|
+
queryParams: {},
|
|
1563
|
+
headers,
|
|
1564
|
+
priority: 'normal',
|
|
1565
|
+
};
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
const adapterName$1 = 'getCommunicationCappingRepresentation';
|
|
1569
|
+
const getCommunicationCappingRepresentation_ConfigPropertyMetadata = [
|
|
1570
|
+
generateParamConfigMetadata('idOrName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1571
|
+
];
|
|
1572
|
+
const getCommunicationCappingRepresentation_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getCommunicationCappingRepresentation_ConfigPropertyMetadata);
|
|
1573
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$2(getCommunicationCappingRepresentation_ConfigPropertyMetadata);
|
|
1574
|
+
function keyBuilder$1(luvio, config) {
|
|
1575
|
+
const resourceParams = createResourceParams$1(config);
|
|
1576
|
+
return keyBuilder$2(luvio, resourceParams);
|
|
1577
|
+
}
|
|
1578
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
1579
|
+
const config = {};
|
|
1580
|
+
typeCheckConfig$2(untrustedConfig, config, getCommunicationCappingRepresentation_ConfigPropertyMetadata);
|
|
1581
|
+
return config;
|
|
1582
|
+
}
|
|
1583
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
1584
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1585
|
+
return null;
|
|
1586
|
+
}
|
|
1587
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1588
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1589
|
+
}
|
|
1590
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
1591
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1592
|
+
return null;
|
|
1593
|
+
}
|
|
1594
|
+
return config;
|
|
1595
|
+
}
|
|
1596
|
+
function adapterFragment(luvio, config) {
|
|
1597
|
+
createResourceParams$1(config);
|
|
1598
|
+
return select$3();
|
|
1599
|
+
}
|
|
1600
|
+
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
1601
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
|
|
1602
|
+
config,
|
|
1603
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1604
|
+
});
|
|
1605
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1606
|
+
}
|
|
1607
|
+
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
1608
|
+
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
1609
|
+
config,
|
|
1610
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1611
|
+
});
|
|
1612
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1613
|
+
}
|
|
1614
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
1615
|
+
const resourceParams = createResourceParams$1(config);
|
|
1616
|
+
const request = createResourceRequest$1(resourceParams);
|
|
1617
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1618
|
+
.then((response) => {
|
|
1619
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
1620
|
+
const cache = new StoreKeyMap();
|
|
1621
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
1622
|
+
return cache;
|
|
1623
|
+
});
|
|
1624
|
+
}, (response) => {
|
|
1625
|
+
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
1626
|
+
});
|
|
1627
|
+
}
|
|
1628
|
+
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
1629
|
+
return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
1630
|
+
}
|
|
1631
|
+
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
1632
|
+
const { luvio, config } = context;
|
|
1633
|
+
const selector = {
|
|
1634
|
+
recordId: keyBuilder$1(luvio, config),
|
|
1635
|
+
node: adapterFragment(luvio, config),
|
|
1636
|
+
variables: {},
|
|
1637
|
+
};
|
|
1638
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1639
|
+
config,
|
|
1640
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1641
|
+
});
|
|
1642
|
+
return cacheSnapshot;
|
|
1643
|
+
}
|
|
1644
|
+
const getCommunicationCappingRepresentationAdapterFactory = (luvio) => function communicationCapping__getCommunicationCappingRepresentation(untrustedConfig, requestContext) {
|
|
1645
|
+
const config = validateAdapterConfig$1(untrustedConfig, getCommunicationCappingRepresentation_ConfigPropertyNames);
|
|
1646
|
+
// Invalid or incomplete config
|
|
1647
|
+
if (config === null) {
|
|
1648
|
+
return null;
|
|
1649
|
+
}
|
|
1650
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1651
|
+
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
1652
|
+
};
|
|
1653
|
+
|
|
1654
|
+
const VERSION$1 = "70c253ff0d0ce928bf7196b1a24d910f";
|
|
1655
|
+
function validate$1(obj, path = 'CdpErrorRepresentation') {
|
|
1656
|
+
const v_error = (() => {
|
|
1657
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1658
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1659
|
+
}
|
|
1660
|
+
if (obj.errorCode !== undefined) {
|
|
1661
|
+
const obj_errorCode = obj.errorCode;
|
|
1662
|
+
const path_errorCode = path + '.errorCode';
|
|
1663
|
+
if (typeof obj_errorCode !== 'string') {
|
|
1664
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorCode + '" (at "' + path_errorCode + '")');
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
if (obj.message !== undefined) {
|
|
1668
|
+
const obj_message = obj.message;
|
|
1669
|
+
const path_message = path + '.message';
|
|
1670
|
+
if (typeof obj_message !== 'string') {
|
|
1671
|
+
return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
|
|
1672
|
+
}
|
|
1673
|
+
}
|
|
1674
|
+
})();
|
|
1675
|
+
return v_error === undefined ? null : v_error;
|
|
1676
|
+
}
|
|
1677
|
+
const select$2 = function CdpErrorRepresentationSelect() {
|
|
1678
|
+
return {
|
|
1679
|
+
kind: 'Fragment',
|
|
1680
|
+
version: VERSION$1,
|
|
1681
|
+
private: [],
|
|
1682
|
+
selections: [
|
|
1683
|
+
{
|
|
1684
|
+
name: 'errorCode',
|
|
1685
|
+
kind: 'Scalar',
|
|
1686
|
+
required: false
|
|
1687
|
+
},
|
|
1688
|
+
{
|
|
1689
|
+
name: 'message',
|
|
1690
|
+
kind: 'Scalar',
|
|
1691
|
+
required: false
|
|
1692
|
+
}
|
|
1693
|
+
]
|
|
1694
|
+
};
|
|
1695
|
+
};
|
|
1696
|
+
function equals$1(existing, incoming) {
|
|
1697
|
+
const existing_errorCode = existing.errorCode;
|
|
1698
|
+
const incoming_errorCode = incoming.errorCode;
|
|
1699
|
+
// if at least one of these optionals is defined
|
|
1700
|
+
if (existing_errorCode !== undefined || incoming_errorCode !== undefined) {
|
|
1701
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1702
|
+
// not equal
|
|
1703
|
+
if (existing_errorCode === undefined || incoming_errorCode === undefined) {
|
|
1704
|
+
return false;
|
|
1705
|
+
}
|
|
1706
|
+
if (!(existing_errorCode === incoming_errorCode)) {
|
|
1707
|
+
return false;
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
const existing_message = existing.message;
|
|
1711
|
+
const incoming_message = incoming.message;
|
|
1712
|
+
// if at least one of these optionals is defined
|
|
1713
|
+
if (existing_message !== undefined || incoming_message !== undefined) {
|
|
1714
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1715
|
+
// not equal
|
|
1716
|
+
if (existing_message === undefined || incoming_message === undefined) {
|
|
1717
|
+
return false;
|
|
1718
|
+
}
|
|
1719
|
+
if (!(existing_message === incoming_message)) {
|
|
1720
|
+
return false;
|
|
1721
|
+
}
|
|
1722
|
+
}
|
|
1723
|
+
return true;
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
const VERSION = "dff02814b99940016ea8b72cf560f333";
|
|
1727
|
+
function validate(obj, path = 'CommunicationCappingActionResponseRepresentation') {
|
|
1728
|
+
const v_error = (() => {
|
|
1729
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1730
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1731
|
+
}
|
|
1732
|
+
const obj_errors = obj.errors;
|
|
1733
|
+
const path_errors = path + '.errors';
|
|
1734
|
+
if (!ArrayIsArray(obj_errors)) {
|
|
1735
|
+
return new TypeError('Expected "array" but received "' + typeof obj_errors + '" (at "' + path_errors + '")');
|
|
1736
|
+
}
|
|
1737
|
+
for (let i = 0; i < obj_errors.length; i++) {
|
|
1738
|
+
const obj_errors_item = obj_errors[i];
|
|
1739
|
+
const path_errors_item = path_errors + '[' + i + ']';
|
|
1740
|
+
const referencepath_errors_itemValidationError = validate$1(obj_errors_item, path_errors_item);
|
|
1741
|
+
if (referencepath_errors_itemValidationError !== null) {
|
|
1742
|
+
let message = 'Object doesn\'t match CdpErrorRepresentation (at "' + path_errors_item + '")\n';
|
|
1743
|
+
message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1744
|
+
return new TypeError(message);
|
|
1745
|
+
}
|
|
1746
|
+
}
|
|
1747
|
+
const obj_success = obj.success;
|
|
1748
|
+
const path_success = path + '.success';
|
|
1749
|
+
if (typeof obj_success !== 'boolean') {
|
|
1750
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_success + '" (at "' + path_success + '")');
|
|
1751
|
+
}
|
|
1752
|
+
})();
|
|
1753
|
+
return v_error === undefined ? null : v_error;
|
|
1754
|
+
}
|
|
1755
|
+
const RepresentationType = 'CommunicationCappingActionResponseRepresentation';
|
|
1756
|
+
function keyBuilder(luvio, config) {
|
|
1757
|
+
return keyPrefix + '::' + RepresentationType + ':' + config.success;
|
|
1758
|
+
}
|
|
1759
|
+
function keyBuilderFromType(luvio, object) {
|
|
1760
|
+
const keyParams = {
|
|
1761
|
+
success: object.success
|
|
1762
|
+
};
|
|
1763
|
+
return keyBuilder(luvio, keyParams);
|
|
1764
|
+
}
|
|
1765
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
1766
|
+
return input;
|
|
1767
|
+
}
|
|
1768
|
+
const select$1 = function CommunicationCappingActionResponseRepresentationSelect() {
|
|
1769
|
+
const { selections: CdpErrorRepresentation__selections, opaque: CdpErrorRepresentation__opaque, } = select$2();
|
|
1770
|
+
return {
|
|
1771
|
+
kind: 'Fragment',
|
|
1772
|
+
version: VERSION,
|
|
1773
|
+
private: [],
|
|
1774
|
+
selections: [
|
|
1775
|
+
{
|
|
1776
|
+
name: 'errors',
|
|
1777
|
+
kind: 'Object',
|
|
1778
|
+
plural: true,
|
|
1779
|
+
selections: CdpErrorRepresentation__selections
|
|
1780
|
+
},
|
|
1781
|
+
{
|
|
1782
|
+
name: 'success',
|
|
1783
|
+
kind: 'Scalar'
|
|
1784
|
+
}
|
|
1785
|
+
]
|
|
1786
|
+
};
|
|
1787
|
+
};
|
|
1788
|
+
function equals(existing, incoming) {
|
|
1789
|
+
const existing_success = existing.success;
|
|
1790
|
+
const incoming_success = incoming.success;
|
|
1791
|
+
if (!(existing_success === incoming_success)) {
|
|
1792
|
+
return false;
|
|
1793
|
+
}
|
|
1794
|
+
const existing_errors = existing.errors;
|
|
1795
|
+
const incoming_errors = incoming.errors;
|
|
1796
|
+
const equals_errors_items = equalsArray(existing_errors, incoming_errors, (existing_errors_item, incoming_errors_item) => {
|
|
1797
|
+
if (!(equals$1(existing_errors_item, incoming_errors_item))) {
|
|
1798
|
+
return false;
|
|
1799
|
+
}
|
|
1800
|
+
});
|
|
1801
|
+
if (equals_errors_items === false) {
|
|
1802
|
+
return false;
|
|
1803
|
+
}
|
|
1804
|
+
return true;
|
|
1805
|
+
}
|
|
1806
|
+
const ingest = function CommunicationCappingActionResponseRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1807
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1808
|
+
const validateError = validate(input);
|
|
1809
|
+
if (validateError !== null) {
|
|
1810
|
+
throw validateError;
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
const key = keyBuilderFromType(luvio, input);
|
|
1814
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1815
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "communication-capping", VERSION, RepresentationType, equals);
|
|
1816
|
+
return createLink(key);
|
|
1817
|
+
};
|
|
1818
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
1819
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1820
|
+
const rootKey = keyBuilderFromType(luvio, input);
|
|
1821
|
+
rootKeySet.set(rootKey, {
|
|
1822
|
+
namespace: keyPrefix,
|
|
1823
|
+
representationName: RepresentationType,
|
|
1824
|
+
mergeable: false
|
|
1825
|
+
});
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
function select(luvio, params) {
|
|
1829
|
+
return select$1();
|
|
1830
|
+
}
|
|
1831
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
1832
|
+
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
1833
|
+
}
|
|
1834
|
+
function ingestSuccess(luvio, resourceParams, response) {
|
|
1835
|
+
const { body } = response;
|
|
1836
|
+
const key = keyBuilderFromType(luvio, body);
|
|
1837
|
+
luvio.storeIngest(key, ingest, body);
|
|
1838
|
+
const snapshot = luvio.storeLookup({
|
|
1839
|
+
recordId: key,
|
|
1840
|
+
node: select(),
|
|
1841
|
+
variables: {},
|
|
1842
|
+
});
|
|
1843
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1844
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1845
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1846
|
+
}
|
|
1847
|
+
}
|
|
1848
|
+
deepFreeze(snapshot.data);
|
|
1849
|
+
return snapshot;
|
|
1850
|
+
}
|
|
1851
|
+
function createResourceRequest(config) {
|
|
1852
|
+
const headers = {};
|
|
1853
|
+
return {
|
|
1854
|
+
baseUri: '/services/data/v62.0',
|
|
1855
|
+
basePath: '/ssot/communication-cappings/' + config.urlParams.idOrName + '/actions/retry',
|
|
1856
|
+
method: 'post',
|
|
1857
|
+
body: null,
|
|
1858
|
+
urlParams: config.urlParams,
|
|
1859
|
+
queryParams: {},
|
|
1860
|
+
headers,
|
|
1861
|
+
priority: 'normal',
|
|
1862
|
+
};
|
|
1863
|
+
}
|
|
1864
|
+
|
|
1865
|
+
const adapterName = 'triggerDMOCICreation';
|
|
1866
|
+
const triggerDMOCICreation_ConfigPropertyMetadata = [
|
|
1867
|
+
generateParamConfigMetadata('idOrName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1868
|
+
];
|
|
1869
|
+
const triggerDMOCICreation_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, triggerDMOCICreation_ConfigPropertyMetadata);
|
|
1870
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$2(triggerDMOCICreation_ConfigPropertyMetadata);
|
|
1871
|
+
function typeCheckConfig(untrustedConfig) {
|
|
1872
|
+
const config = {};
|
|
1873
|
+
typeCheckConfig$2(untrustedConfig, config, triggerDMOCICreation_ConfigPropertyMetadata);
|
|
1874
|
+
return config;
|
|
1875
|
+
}
|
|
1876
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
1877
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1878
|
+
return null;
|
|
1879
|
+
}
|
|
1880
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1881
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1882
|
+
}
|
|
1883
|
+
const config = typeCheckConfig(untrustedConfig);
|
|
1884
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1885
|
+
return null;
|
|
1886
|
+
}
|
|
1887
|
+
return config;
|
|
1888
|
+
}
|
|
1889
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
1890
|
+
const resourceParams = createResourceParams(config);
|
|
1891
|
+
const request = createResourceRequest(resourceParams);
|
|
1892
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1893
|
+
.then((response) => {
|
|
1894
|
+
return luvio.handleSuccessResponse(() => {
|
|
1895
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response);
|
|
1896
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1897
|
+
}, () => {
|
|
1898
|
+
const cache = new StoreKeyMap();
|
|
1899
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
1900
|
+
return cache;
|
|
1901
|
+
});
|
|
1902
|
+
}, (response) => {
|
|
1903
|
+
deepFreeze(response);
|
|
1904
|
+
throw response;
|
|
1905
|
+
});
|
|
1906
|
+
}
|
|
1907
|
+
const triggerDMOCICreationAdapterFactory = (luvio) => {
|
|
1908
|
+
return function triggerDMOCICreation(untrustedConfig) {
|
|
1909
|
+
const config = validateAdapterConfig(untrustedConfig, triggerDMOCICreation_ConfigPropertyNames);
|
|
1910
|
+
// Invalid or incomplete config
|
|
1911
|
+
if (config === null) {
|
|
1912
|
+
throw new Error('Invalid config for "triggerDMOCICreation"');
|
|
1913
|
+
}
|
|
1914
|
+
return buildNetworkSnapshot(luvio, config);
|
|
1915
|
+
};
|
|
1916
|
+
};
|
|
1917
|
+
|
|
1918
|
+
let getCommunicationCappingRepresentation;
|
|
1919
|
+
let triggerDMOCICreation;
|
|
1920
|
+
// Imperative GET Adapters
|
|
1921
|
+
let getCommunicationCappingRepresentation_imperative;
|
|
1922
|
+
// Adapter Metadata
|
|
1923
|
+
const getCommunicationCappingRepresentationMetadata = {
|
|
1924
|
+
apiFamily: 'communicationcapping',
|
|
1925
|
+
name: 'getCommunicationCappingRepresentation',
|
|
1926
|
+
};
|
|
1927
|
+
// Notify Update Available
|
|
1928
|
+
function bindExportsTo(luvio) {
|
|
1929
|
+
// LDS Adapters
|
|
1930
|
+
const getCommunicationCappingRepresentation_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getCommunicationCappingRepresentation', getCommunicationCappingRepresentationAdapterFactory), getCommunicationCappingRepresentationMetadata);
|
|
1931
|
+
function unwrapSnapshotData(factory) {
|
|
1932
|
+
const adapter = factory(luvio);
|
|
1933
|
+
return (config) => adapter(config).then((snapshot) => snapshot.data);
|
|
1934
|
+
}
|
|
1935
|
+
return {
|
|
1936
|
+
getCommunicationCappingRepresentation: createWireAdapterConstructor(luvio, getCommunicationCappingRepresentation_ldsAdapter, getCommunicationCappingRepresentationMetadata),
|
|
1937
|
+
triggerDMOCICreation: unwrapSnapshotData(triggerDMOCICreationAdapterFactory),
|
|
1938
|
+
// Imperative GET Adapters
|
|
1939
|
+
getCommunicationCappingRepresentation_imperative: createImperativeAdapter(luvio, getCommunicationCappingRepresentation_ldsAdapter, getCommunicationCappingRepresentationMetadata),
|
|
1940
|
+
// Notify Update Availables
|
|
1941
|
+
};
|
|
1942
|
+
}
|
|
1943
|
+
withDefaultLuvio((luvio) => {
|
|
1944
|
+
({
|
|
1945
|
+
getCommunicationCappingRepresentation,
|
|
1946
|
+
triggerDMOCICreation,
|
|
1947
|
+
getCommunicationCappingRepresentation_imperative,
|
|
1948
|
+
} = bindExportsTo(luvio));
|
|
1949
|
+
});
|
|
1950
|
+
|
|
1951
|
+
export { getCommunicationCappingRepresentation, getCommunicationCappingRepresentation_imperative, triggerDMOCICreation };
|
|
1952
|
+
// version: 1.309.0-dev16-189d0681ed
|