@salesforce/lds-adapters-marketing-cdp 1.227.1 → 1.228.0
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/dist/es/es2018/marketing-cdp.js +526 -167
- package/dist/es/es2018/types/src/generated/adapters/createDataGraph.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/adapters/getDataGraphDependency.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +4 -1
- package/dist/es/es2018/types/src/generated/resources/getSsotDataGraphsDependencyByDataGraphName.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/resources/postSsotDataGraphs.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/types/CdpDataGraphDependencyOutputRepresentation.d.ts +34 -0
- package/dist/es/es2018/types/src/generated/types/CdpDataGraphFieldInputRepresentation.d.ts +13 -1
- package/dist/es/es2018/types/src/generated/types/CdpDataGraphFieldOutputRepresentation.d.ts +13 -1
- package/dist/es/es2018/types/src/generated/types/CdpDataGraphInputRepresentation.d.ts +4 -1
- package/dist/es/es2018/types/src/generated/types/CdpDataGraphOutputRepresentation.d.ts +4 -1
- package/dist/es/es2018/types/src/generated/types/CdpDataGraphSourceInputRepresentation.d.ts +4 -1
- package/dist/es/es2018/types/src/generated/types/CdpDataGraphSourceObjectOutputRepresentation.d.ts +4 -1
- package/dist/es/es2018/types/src/generated/types/DependencyOutputRepresentation.d.ts +43 -0
- package/package.json +1 -1
- package/sfdc/index.js +509 -103
- package/src/raml/api.raml +109 -4
- package/src/raml/luvio.raml +8 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$5, typeCheckConfig as typeCheckConfig$5, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -73,13 +73,26 @@ const keyPrefix = 'CDP';
|
|
|
73
73
|
|
|
74
74
|
const { isArray: ArrayIsArray } = Array;
|
|
75
75
|
const { stringify: JSONStringify } = JSON;
|
|
76
|
+
function equalsArray(a, b, equalsItem) {
|
|
77
|
+
const aLength = a.length;
|
|
78
|
+
const bLength = b.length;
|
|
79
|
+
if (aLength !== bLength) {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
for (let i = 0; i < aLength; i++) {
|
|
83
|
+
if (equalsItem(a[i], b[i]) === false) {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
76
89
|
function createLink(ref) {
|
|
77
90
|
return {
|
|
78
91
|
__ref: serializeStructuredKey(ref),
|
|
79
92
|
};
|
|
80
93
|
}
|
|
81
94
|
|
|
82
|
-
function validate$
|
|
95
|
+
function validate$8(obj, path = 'CdpObjectBaseOutputRepresentation') {
|
|
83
96
|
const v_error = (() => {
|
|
84
97
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
85
98
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -153,28 +166,35 @@ function validate$6(obj, path = 'CdpObjectBaseOutputRepresentation') {
|
|
|
153
166
|
})();
|
|
154
167
|
return v_error === undefined ? null : v_error;
|
|
155
168
|
}
|
|
156
|
-
const RepresentationType$
|
|
157
|
-
function keyBuilder$
|
|
158
|
-
return keyPrefix + '::' + RepresentationType$
|
|
169
|
+
const RepresentationType$3 = 'CdpObjectBaseOutputRepresentation';
|
|
170
|
+
function keyBuilder$8(luvio, config) {
|
|
171
|
+
return keyPrefix + '::' + RepresentationType$3 + ':' + config.name;
|
|
159
172
|
}
|
|
160
|
-
function keyBuilderFromType$
|
|
173
|
+
function keyBuilderFromType$3(luvio, object) {
|
|
161
174
|
const keyParams = {
|
|
162
175
|
name: object.name
|
|
163
176
|
};
|
|
164
|
-
return keyBuilder$
|
|
177
|
+
return keyBuilder$8(luvio, keyParams);
|
|
165
178
|
}
|
|
166
|
-
function equals$
|
|
179
|
+
function equals$5(existing, incoming) {
|
|
167
180
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
168
181
|
return false;
|
|
169
182
|
}
|
|
170
183
|
return true;
|
|
171
184
|
}
|
|
172
185
|
|
|
173
|
-
function validate$
|
|
186
|
+
function validate$7(obj, path = 'CdpDataGraphFieldOutputRepresentation') {
|
|
174
187
|
const v_error = (() => {
|
|
175
188
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
176
189
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
177
190
|
}
|
|
191
|
+
if (obj.ciFieldType !== undefined) {
|
|
192
|
+
const obj_ciFieldType = obj.ciFieldType;
|
|
193
|
+
const path_ciFieldType = path + '.ciFieldType';
|
|
194
|
+
if (typeof obj_ciFieldType !== 'string') {
|
|
195
|
+
return new TypeError('Expected "string" but received "' + typeof obj_ciFieldType + '" (at "' + path_ciFieldType + '")');
|
|
196
|
+
}
|
|
197
|
+
}
|
|
178
198
|
if (obj.dataType !== undefined) {
|
|
179
199
|
const obj_dataType = obj.dataType;
|
|
180
200
|
const path_dataType = path + '.dataType';
|
|
@@ -187,16 +207,37 @@ function validate$5(obj, path = 'CdpDataGraphFieldOutputRepresentation') {
|
|
|
187
207
|
if (typeof obj_isKeyColumn !== 'boolean') {
|
|
188
208
|
return new TypeError('Expected "boolean" but received "' + typeof obj_isKeyColumn + '" (at "' + path_isKeyColumn + '")');
|
|
189
209
|
}
|
|
210
|
+
if (obj.isProjected !== undefined) {
|
|
211
|
+
const obj_isProjected = obj.isProjected;
|
|
212
|
+
const path_isProjected = path + '.isProjected';
|
|
213
|
+
if (typeof obj_isProjected !== 'boolean') {
|
|
214
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isProjected + '" (at "' + path_isProjected + '")');
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
if (obj.keyQualifierName !== undefined) {
|
|
218
|
+
const obj_keyQualifierName = obj.keyQualifierName;
|
|
219
|
+
const path_keyQualifierName = path + '.keyQualifierName';
|
|
220
|
+
if (typeof obj_keyQualifierName !== 'string') {
|
|
221
|
+
return new TypeError('Expected "string" but received "' + typeof obj_keyQualifierName + '" (at "' + path_keyQualifierName + '")');
|
|
222
|
+
}
|
|
223
|
+
}
|
|
190
224
|
const obj_sourceFieldName = obj.sourceFieldName;
|
|
191
225
|
const path_sourceFieldName = path + '.sourceFieldName';
|
|
192
226
|
if (typeof obj_sourceFieldName !== 'string') {
|
|
193
227
|
return new TypeError('Expected "string" but received "' + typeof obj_sourceFieldName + '" (at "' + path_sourceFieldName + '")');
|
|
194
228
|
}
|
|
229
|
+
if (obj.usageTag !== undefined) {
|
|
230
|
+
const obj_usageTag = obj.usageTag;
|
|
231
|
+
const path_usageTag = path + '.usageTag';
|
|
232
|
+
if (typeof obj_usageTag !== 'string') {
|
|
233
|
+
return new TypeError('Expected "string" but received "' + typeof obj_usageTag + '" (at "' + path_usageTag + '")');
|
|
234
|
+
}
|
|
235
|
+
}
|
|
195
236
|
})();
|
|
196
237
|
return v_error === undefined ? null : v_error;
|
|
197
238
|
}
|
|
198
239
|
|
|
199
|
-
function validate$
|
|
240
|
+
function validate$6(obj, path = 'CdpDataGraphPathToParentOutputRepresentation') {
|
|
200
241
|
const v_error = (() => {
|
|
201
242
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
202
243
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -215,7 +256,7 @@ function validate$4(obj, path = 'CdpDataGraphPathToParentOutputRepresentation')
|
|
|
215
256
|
return v_error === undefined ? null : v_error;
|
|
216
257
|
}
|
|
217
258
|
|
|
218
|
-
function validate$
|
|
259
|
+
function validate$5(obj, path = 'CdpDataGraphRecencyCriteriaOutputRepresentation') {
|
|
219
260
|
const v_error = (() => {
|
|
220
261
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
221
262
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -244,7 +285,7 @@ function validate$3(obj, path = 'CdpDataGraphRecencyCriteriaOutputRepresentation
|
|
|
244
285
|
return v_error === undefined ? null : v_error;
|
|
245
286
|
}
|
|
246
287
|
|
|
247
|
-
function validate$
|
|
288
|
+
function validate$4(obj, path = 'CdpDataGraphSourceObjectOutputRepresentation') {
|
|
248
289
|
const v_error = (() => {
|
|
249
290
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
250
291
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -257,7 +298,7 @@ function validate$2(obj, path = 'CdpDataGraphSourceObjectOutputRepresentation')
|
|
|
257
298
|
for (let i = 0; i < obj_fields.length; i++) {
|
|
258
299
|
const obj_fields_item = obj_fields[i];
|
|
259
300
|
const path_fields_item = path_fields + '[' + i + ']';
|
|
260
|
-
const referencepath_fields_itemValidationError = validate$
|
|
301
|
+
const referencepath_fields_itemValidationError = validate$7(obj_fields_item, path_fields_item);
|
|
261
302
|
if (referencepath_fields_itemValidationError !== null) {
|
|
262
303
|
let message = 'Object doesn\'t match CdpDataGraphFieldOutputRepresentation (at "' + path_fields_item + '")\n';
|
|
263
304
|
message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -271,6 +312,13 @@ function validate$2(obj, path = 'CdpDataGraphSourceObjectOutputRepresentation')
|
|
|
271
312
|
return new TypeError('Expected "string" but received "' + typeof obj_fragmentDMOName + '" (at "' + path_fragmentDMOName + '")');
|
|
272
313
|
}
|
|
273
314
|
}
|
|
315
|
+
if (obj.jsonPath !== undefined) {
|
|
316
|
+
const obj_jsonPath = obj.jsonPath;
|
|
317
|
+
const path_jsonPath = path + '.jsonPath';
|
|
318
|
+
if (typeof obj_jsonPath !== 'string') {
|
|
319
|
+
return new TypeError('Expected "string" but received "' + typeof obj_jsonPath + '" (at "' + path_jsonPath + '")');
|
|
320
|
+
}
|
|
321
|
+
}
|
|
274
322
|
if (obj.path !== undefined) {
|
|
275
323
|
const obj_path = obj.path;
|
|
276
324
|
const path_path = path + '.path';
|
|
@@ -280,7 +328,7 @@ function validate$2(obj, path = 'CdpDataGraphSourceObjectOutputRepresentation')
|
|
|
280
328
|
for (let i = 0; i < obj_path.length; i++) {
|
|
281
329
|
const obj_path_item = obj_path[i];
|
|
282
330
|
const path_path_item = path_path + '[' + i + ']';
|
|
283
|
-
const referencepath_path_itemValidationError = validate$
|
|
331
|
+
const referencepath_path_itemValidationError = validate$6(obj_path_item, path_path_item);
|
|
284
332
|
if (referencepath_path_itemValidationError !== null) {
|
|
285
333
|
let message = 'Object doesn\'t match CdpDataGraphPathToParentOutputRepresentation (at "' + path_path_item + '")\n';
|
|
286
334
|
message += referencepath_path_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -297,7 +345,7 @@ function validate$2(obj, path = 'CdpDataGraphSourceObjectOutputRepresentation')
|
|
|
297
345
|
for (let i = 0; i < obj_recencyCriteria.length; i++) {
|
|
298
346
|
const obj_recencyCriteria_item = obj_recencyCriteria[i];
|
|
299
347
|
const path_recencyCriteria_item = path_recencyCriteria + '[' + i + ']';
|
|
300
|
-
const referencepath_recencyCriteria_itemValidationError = validate$
|
|
348
|
+
const referencepath_recencyCriteria_itemValidationError = validate$5(obj_recencyCriteria_item, path_recencyCriteria_item);
|
|
301
349
|
if (referencepath_recencyCriteria_itemValidationError !== null) {
|
|
302
350
|
let message = 'Object doesn\'t match CdpDataGraphRecencyCriteriaOutputRepresentation (at "' + path_recencyCriteria_item + '")\n';
|
|
303
351
|
message += referencepath_recencyCriteria_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -325,16 +373,16 @@ function validate$2(obj, path = 'CdpDataGraphSourceObjectOutputRepresentation')
|
|
|
325
373
|
})();
|
|
326
374
|
return v_error === undefined ? null : v_error;
|
|
327
375
|
}
|
|
328
|
-
function equals$
|
|
376
|
+
function equals$4(existing, incoming) {
|
|
329
377
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
330
378
|
return false;
|
|
331
379
|
}
|
|
332
380
|
return true;
|
|
333
381
|
}
|
|
334
382
|
|
|
335
|
-
const VERSION$
|
|
336
|
-
function validate$
|
|
337
|
-
const validateCdpObjectBaseOutputRepresentation_validateError = validate$
|
|
383
|
+
const VERSION$2 = "d84f55c15c62e66d204c852f1e650ea4";
|
|
384
|
+
function validate$3(obj, path = 'CdpDataGraphOutputRepresentation') {
|
|
385
|
+
const validateCdpObjectBaseOutputRepresentation_validateError = validate$8(obj, path);
|
|
338
386
|
if (validateCdpObjectBaseOutputRepresentation_validateError !== null) {
|
|
339
387
|
return validateCdpObjectBaseOutputRepresentation_validateError;
|
|
340
388
|
}
|
|
@@ -371,7 +419,7 @@ function validate$1(obj, path = 'CdpDataGraphOutputRepresentation') {
|
|
|
371
419
|
}
|
|
372
420
|
const obj_sourceObject = obj.sourceObject;
|
|
373
421
|
const path_sourceObject = path + '.sourceObject';
|
|
374
|
-
const referencepath_sourceObjectValidationError = validate$
|
|
422
|
+
const referencepath_sourceObjectValidationError = validate$4(obj_sourceObject, path_sourceObject);
|
|
375
423
|
if (referencepath_sourceObjectValidationError !== null) {
|
|
376
424
|
let message = 'Object doesn\'t match CdpDataGraphSourceObjectOutputRepresentation (at "' + path_sourceObject + '")\n';
|
|
377
425
|
message += referencepath_sourceObjectValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -382,6 +430,13 @@ function validate$1(obj, path = 'CdpDataGraphOutputRepresentation') {
|
|
|
382
430
|
if (typeof obj_status !== 'string') {
|
|
383
431
|
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
384
432
|
}
|
|
433
|
+
if (obj.type !== undefined) {
|
|
434
|
+
const obj_type = obj.type;
|
|
435
|
+
const path_type = path + '.type';
|
|
436
|
+
if (typeof obj_type !== 'string') {
|
|
437
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
438
|
+
}
|
|
439
|
+
}
|
|
385
440
|
const obj_valuesDmoName = obj.valuesDmoName;
|
|
386
441
|
const path_valuesDmoName = path + '.valuesDmoName';
|
|
387
442
|
if (typeof obj_valuesDmoName !== 'string') {
|
|
@@ -395,26 +450,26 @@ function validate$1(obj, path = 'CdpDataGraphOutputRepresentation') {
|
|
|
395
450
|
})();
|
|
396
451
|
return v_error === undefined ? null : v_error;
|
|
397
452
|
}
|
|
398
|
-
const RepresentationType$
|
|
399
|
-
function keyBuilder$
|
|
400
|
-
return keyBuilder$
|
|
453
|
+
const RepresentationType$2 = 'CdpDataGraphOutputRepresentation';
|
|
454
|
+
function keyBuilder$7(luvio, config) {
|
|
455
|
+
return keyBuilder$8(luvio, config);
|
|
401
456
|
}
|
|
402
|
-
function keyBuilderFromType$
|
|
403
|
-
return keyBuilderFromType$
|
|
457
|
+
function keyBuilderFromType$2(luvio, object) {
|
|
458
|
+
return keyBuilderFromType$3(luvio, object);
|
|
404
459
|
}
|
|
405
|
-
function normalize$
|
|
460
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
406
461
|
return input;
|
|
407
462
|
}
|
|
408
|
-
const select$
|
|
463
|
+
const select$6 = function CdpDataGraphOutputRepresentationSelect() {
|
|
409
464
|
return {
|
|
410
465
|
kind: 'Fragment',
|
|
411
|
-
version: VERSION$
|
|
466
|
+
version: VERSION$2,
|
|
412
467
|
private: [],
|
|
413
468
|
opaque: true
|
|
414
469
|
};
|
|
415
470
|
};
|
|
416
|
-
function equals$
|
|
417
|
-
if (equals$
|
|
471
|
+
function equals$3(existing, incoming) {
|
|
472
|
+
if (equals$5(existing, incoming) === false) {
|
|
418
473
|
return false;
|
|
419
474
|
}
|
|
420
475
|
const existing_extendedProperties = existing.extendedProperties;
|
|
@@ -455,6 +510,19 @@ function equals$1(existing, incoming) {
|
|
|
455
510
|
if (!(existing_status === incoming_status)) {
|
|
456
511
|
return false;
|
|
457
512
|
}
|
|
513
|
+
const existing_type = existing.type;
|
|
514
|
+
const incoming_type = incoming.type;
|
|
515
|
+
// if at least one of these optionals is defined
|
|
516
|
+
if (existing_type !== undefined || incoming_type !== undefined) {
|
|
517
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
518
|
+
// not equal
|
|
519
|
+
if (existing_type === undefined || incoming_type === undefined) {
|
|
520
|
+
return false;
|
|
521
|
+
}
|
|
522
|
+
if (!(existing_type === incoming_type)) {
|
|
523
|
+
return false;
|
|
524
|
+
}
|
|
525
|
+
}
|
|
458
526
|
const existing_valuesDmoName = existing.valuesDmoName;
|
|
459
527
|
const incoming_valuesDmoName = incoming.valuesDmoName;
|
|
460
528
|
if (!(existing_valuesDmoName === incoming_valuesDmoName)) {
|
|
@@ -467,46 +535,46 @@ function equals$1(existing, incoming) {
|
|
|
467
535
|
}
|
|
468
536
|
const existing_sourceObject = existing.sourceObject;
|
|
469
537
|
const incoming_sourceObject = incoming.sourceObject;
|
|
470
|
-
if (!(equals$
|
|
538
|
+
if (!(equals$4(existing_sourceObject, incoming_sourceObject))) {
|
|
471
539
|
return false;
|
|
472
540
|
}
|
|
473
541
|
return true;
|
|
474
542
|
}
|
|
475
|
-
const ingest$
|
|
543
|
+
const ingest$2 = function CdpDataGraphOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
476
544
|
if (process.env.NODE_ENV !== 'production') {
|
|
477
|
-
const validateError = validate$
|
|
545
|
+
const validateError = validate$3(input);
|
|
478
546
|
if (validateError !== null) {
|
|
479
547
|
throw validateError;
|
|
480
548
|
}
|
|
481
549
|
}
|
|
482
|
-
const key = keyBuilderFromType$
|
|
550
|
+
const key = keyBuilderFromType$2(luvio, input);
|
|
483
551
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 3000000;
|
|
484
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
552
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "CDP", VERSION$2, RepresentationType$2, equals$3);
|
|
485
553
|
return createLink(key);
|
|
486
554
|
};
|
|
487
|
-
function getTypeCacheKeys$
|
|
555
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
488
556
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
489
|
-
const rootKey = keyBuilderFromType$
|
|
557
|
+
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
490
558
|
rootKeySet.set(rootKey, {
|
|
491
559
|
namespace: keyPrefix,
|
|
492
|
-
representationName: RepresentationType$
|
|
560
|
+
representationName: RepresentationType$3,
|
|
493
561
|
mergeable: false
|
|
494
562
|
});
|
|
495
563
|
}
|
|
496
564
|
|
|
497
|
-
function select$
|
|
498
|
-
return select$
|
|
565
|
+
function select$5(luvio, params) {
|
|
566
|
+
return select$6();
|
|
499
567
|
}
|
|
500
|
-
function getResponseCacheKeys$
|
|
501
|
-
getTypeCacheKeys$
|
|
568
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
569
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
502
570
|
}
|
|
503
|
-
function ingestSuccess$
|
|
571
|
+
function ingestSuccess$3(luvio, resourceParams, response) {
|
|
504
572
|
const { body } = response;
|
|
505
|
-
const key = keyBuilderFromType$
|
|
506
|
-
luvio.storeIngest(key, ingest$
|
|
573
|
+
const key = keyBuilderFromType$2(luvio, body);
|
|
574
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
507
575
|
const snapshot = luvio.storeLookup({
|
|
508
576
|
recordId: key,
|
|
509
|
-
node: select$
|
|
577
|
+
node: select$5(),
|
|
510
578
|
variables: {},
|
|
511
579
|
});
|
|
512
580
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -517,7 +585,7 @@ function ingestSuccess$2(luvio, resourceParams, response) {
|
|
|
517
585
|
deepFreeze(snapshot.data);
|
|
518
586
|
return snapshot;
|
|
519
587
|
}
|
|
520
|
-
function createResourceRequest$
|
|
588
|
+
function createResourceRequest$4(config) {
|
|
521
589
|
const headers = {};
|
|
522
590
|
return {
|
|
523
591
|
baseUri: '/services/data/v58.0',
|
|
@@ -531,7 +599,7 @@ function createResourceRequest$3(config) {
|
|
|
531
599
|
};
|
|
532
600
|
}
|
|
533
601
|
|
|
534
|
-
const adapterName$
|
|
602
|
+
const adapterName$4 = 'createDataGraph';
|
|
535
603
|
const createDataGraph_ConfigPropertyMetadata = [
|
|
536
604
|
generateParamConfigMetadata('dataspaceName', false, 2 /* Body */, 0 /* String */),
|
|
537
605
|
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
@@ -540,40 +608,41 @@ const createDataGraph_ConfigPropertyMetadata = [
|
|
|
540
608
|
generateParamConfigMetadata('primaryObjectName', true, 2 /* Body */, 0 /* String */),
|
|
541
609
|
generateParamConfigMetadata('primaryObjectType', true, 2 /* Body */, 0 /* String */),
|
|
542
610
|
generateParamConfigMetadata('sourceObject', true, 2 /* Body */, 4 /* Unsupported */),
|
|
611
|
+
generateParamConfigMetadata('type', false, 2 /* Body */, 0 /* String */),
|
|
543
612
|
];
|
|
544
|
-
const createDataGraph_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
545
|
-
const createResourceParams$
|
|
546
|
-
function typeCheckConfig$
|
|
613
|
+
const createDataGraph_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, createDataGraph_ConfigPropertyMetadata);
|
|
614
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$5(createDataGraph_ConfigPropertyMetadata);
|
|
615
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
547
616
|
const config = {};
|
|
548
|
-
typeCheckConfig$
|
|
617
|
+
typeCheckConfig$5(untrustedConfig, config, createDataGraph_ConfigPropertyMetadata);
|
|
549
618
|
const untrustedConfig_sourceObject = untrustedConfig.sourceObject;
|
|
550
619
|
config.sourceObject = untrustedConfig_sourceObject;
|
|
551
620
|
return config;
|
|
552
621
|
}
|
|
553
|
-
function validateAdapterConfig$
|
|
622
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
554
623
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
555
624
|
return null;
|
|
556
625
|
}
|
|
557
626
|
if (process.env.NODE_ENV !== 'production') {
|
|
558
627
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
559
628
|
}
|
|
560
|
-
const config = typeCheckConfig$
|
|
629
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
561
630
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
562
631
|
return null;
|
|
563
632
|
}
|
|
564
633
|
return config;
|
|
565
634
|
}
|
|
566
|
-
function buildNetworkSnapshot$
|
|
567
|
-
const resourceParams = createResourceParams$
|
|
568
|
-
const request = createResourceRequest$
|
|
635
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
636
|
+
const resourceParams = createResourceParams$4(config);
|
|
637
|
+
const request = createResourceRequest$4(resourceParams);
|
|
569
638
|
return luvio.dispatchResourceRequest(request, options)
|
|
570
639
|
.then((response) => {
|
|
571
640
|
return luvio.handleSuccessResponse(() => {
|
|
572
|
-
const snapshot = ingestSuccess$
|
|
641
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response);
|
|
573
642
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
574
643
|
}, () => {
|
|
575
644
|
const cache = new StoreKeyMap();
|
|
576
|
-
getResponseCacheKeys$
|
|
645
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
577
646
|
return cache;
|
|
578
647
|
});
|
|
579
648
|
}, (response) => {
|
|
@@ -583,33 +652,33 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
583
652
|
}
|
|
584
653
|
const createDataGraphAdapterFactory = (luvio) => {
|
|
585
654
|
return function createDataGraph(untrustedConfig) {
|
|
586
|
-
const config = validateAdapterConfig$
|
|
655
|
+
const config = validateAdapterConfig$4(untrustedConfig, createDataGraph_ConfigPropertyNames);
|
|
587
656
|
// Invalid or incomplete config
|
|
588
657
|
if (config === null) {
|
|
589
658
|
throw new Error('Invalid config for "createDataGraph"');
|
|
590
659
|
}
|
|
591
|
-
return buildNetworkSnapshot$
|
|
660
|
+
return buildNetworkSnapshot$4(luvio, config);
|
|
592
661
|
};
|
|
593
662
|
};
|
|
594
663
|
|
|
595
|
-
function select$
|
|
596
|
-
return select$
|
|
664
|
+
function select$4(luvio, params) {
|
|
665
|
+
return select$6();
|
|
597
666
|
}
|
|
598
|
-
function keyBuilder$
|
|
599
|
-
return keyBuilder$
|
|
667
|
+
function keyBuilder$6(luvio, params) {
|
|
668
|
+
return keyBuilder$7(luvio, {
|
|
600
669
|
name: params.urlParams.dataGraphName
|
|
601
670
|
});
|
|
602
671
|
}
|
|
603
|
-
function getResponseCacheKeys$
|
|
604
|
-
getTypeCacheKeys$
|
|
672
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
673
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
605
674
|
}
|
|
606
|
-
function ingestSuccess$
|
|
675
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
607
676
|
const { body } = response;
|
|
608
|
-
const key = keyBuilder$
|
|
609
|
-
luvio.storeIngest(key, ingest$
|
|
677
|
+
const key = keyBuilder$6(luvio, resourceParams);
|
|
678
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
610
679
|
const snapshot = luvio.storeLookup({
|
|
611
680
|
recordId: key,
|
|
612
|
-
node: select$
|
|
681
|
+
node: select$4(),
|
|
613
682
|
variables: {},
|
|
614
683
|
}, snapshotRefresh);
|
|
615
684
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -620,13 +689,13 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
620
689
|
deepFreeze(snapshot.data);
|
|
621
690
|
return snapshot;
|
|
622
691
|
}
|
|
623
|
-
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
624
|
-
const key = keyBuilder$
|
|
692
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
693
|
+
const key = keyBuilder$6(luvio, params);
|
|
625
694
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
626
695
|
luvio.storeIngestError(key, errorSnapshot);
|
|
627
696
|
return errorSnapshot;
|
|
628
697
|
}
|
|
629
|
-
function createResourceRequest$
|
|
698
|
+
function createResourceRequest$3(config) {
|
|
630
699
|
const headers = {};
|
|
631
700
|
return {
|
|
632
701
|
baseUri: '/services/data/v58.0',
|
|
@@ -640,110 +709,110 @@ function createResourceRequest$2(config) {
|
|
|
640
709
|
};
|
|
641
710
|
}
|
|
642
711
|
|
|
643
|
-
const adapterName$
|
|
712
|
+
const adapterName$3 = 'getDataGraph';
|
|
644
713
|
const getDataGraph_ConfigPropertyMetadata = [
|
|
645
714
|
generateParamConfigMetadata('dataGraphName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
646
715
|
];
|
|
647
|
-
const getDataGraph_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
648
|
-
const createResourceParams$
|
|
649
|
-
function keyBuilder$
|
|
650
|
-
const resourceParams = createResourceParams$
|
|
651
|
-
return keyBuilder$
|
|
716
|
+
const getDataGraph_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getDataGraph_ConfigPropertyMetadata);
|
|
717
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$5(getDataGraph_ConfigPropertyMetadata);
|
|
718
|
+
function keyBuilder$5(luvio, config) {
|
|
719
|
+
const resourceParams = createResourceParams$3(config);
|
|
720
|
+
return keyBuilder$6(luvio, resourceParams);
|
|
652
721
|
}
|
|
653
|
-
function typeCheckConfig$
|
|
722
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
654
723
|
const config = {};
|
|
655
|
-
typeCheckConfig$
|
|
724
|
+
typeCheckConfig$5(untrustedConfig, config, getDataGraph_ConfigPropertyMetadata);
|
|
656
725
|
return config;
|
|
657
726
|
}
|
|
658
|
-
function validateAdapterConfig$
|
|
727
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
659
728
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
660
729
|
return null;
|
|
661
730
|
}
|
|
662
731
|
if (process.env.NODE_ENV !== 'production') {
|
|
663
732
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
664
733
|
}
|
|
665
|
-
const config = typeCheckConfig$
|
|
734
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
666
735
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
667
736
|
return null;
|
|
668
737
|
}
|
|
669
738
|
return config;
|
|
670
739
|
}
|
|
671
|
-
function adapterFragment(luvio, config) {
|
|
672
|
-
createResourceParams$
|
|
673
|
-
return select$
|
|
740
|
+
function adapterFragment$1(luvio, config) {
|
|
741
|
+
createResourceParams$3(config);
|
|
742
|
+
return select$4();
|
|
674
743
|
}
|
|
675
|
-
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
676
|
-
const snapshot = ingestSuccess$
|
|
744
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
745
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
677
746
|
config,
|
|
678
|
-
resolve: () => buildNetworkSnapshot$
|
|
747
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
679
748
|
});
|
|
680
749
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
681
750
|
}
|
|
682
|
-
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
683
|
-
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
751
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
752
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
684
753
|
config,
|
|
685
|
-
resolve: () => buildNetworkSnapshot$
|
|
754
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
686
755
|
});
|
|
687
756
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
688
757
|
}
|
|
689
|
-
function buildNetworkSnapshot$
|
|
690
|
-
const resourceParams = createResourceParams$
|
|
691
|
-
const request = createResourceRequest$
|
|
758
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
759
|
+
const resourceParams = createResourceParams$3(config);
|
|
760
|
+
const request = createResourceRequest$3(resourceParams);
|
|
692
761
|
return luvio.dispatchResourceRequest(request, options)
|
|
693
762
|
.then((response) => {
|
|
694
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
763
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
695
764
|
const cache = new StoreKeyMap();
|
|
696
|
-
getResponseCacheKeys$
|
|
765
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
697
766
|
return cache;
|
|
698
767
|
});
|
|
699
768
|
}, (response) => {
|
|
700
|
-
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
769
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
701
770
|
});
|
|
702
771
|
}
|
|
703
|
-
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
704
|
-
return buildNetworkSnapshotCachePolicy$
|
|
772
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
773
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
705
774
|
}
|
|
706
|
-
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
775
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
707
776
|
const { luvio, config } = context;
|
|
708
777
|
const selector = {
|
|
709
|
-
recordId: keyBuilder$
|
|
710
|
-
node: adapterFragment(luvio, config),
|
|
778
|
+
recordId: keyBuilder$5(luvio, config),
|
|
779
|
+
node: adapterFragment$1(luvio, config),
|
|
711
780
|
variables: {},
|
|
712
781
|
};
|
|
713
782
|
const cacheSnapshot = storeLookup(selector, {
|
|
714
783
|
config,
|
|
715
|
-
resolve: () => buildNetworkSnapshot$
|
|
784
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
716
785
|
});
|
|
717
786
|
return cacheSnapshot;
|
|
718
787
|
}
|
|
719
788
|
const getDataGraphAdapterFactory = (luvio) => function CDP__getDataGraph(untrustedConfig, requestContext) {
|
|
720
|
-
const config = validateAdapterConfig$
|
|
789
|
+
const config = validateAdapterConfig$3(untrustedConfig, getDataGraph_ConfigPropertyNames);
|
|
721
790
|
// Invalid or incomplete config
|
|
722
791
|
if (config === null) {
|
|
723
792
|
return null;
|
|
724
793
|
}
|
|
725
794
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
726
|
-
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
795
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
727
796
|
};
|
|
728
797
|
|
|
729
|
-
function keyBuilder$
|
|
730
|
-
return keyBuilder$
|
|
798
|
+
function keyBuilder$4(luvio, params) {
|
|
799
|
+
return keyBuilder$7(luvio, {
|
|
731
800
|
name: params.urlParams.dataGraphName
|
|
732
801
|
});
|
|
733
802
|
}
|
|
734
|
-
function getResponseCacheKeys$
|
|
735
|
-
const key = keyBuilder$
|
|
803
|
+
function getResponseCacheKeys$2(cacheKeyMap, luvio, resourceParams) {
|
|
804
|
+
const key = keyBuilder$4(luvio, resourceParams);
|
|
736
805
|
cacheKeyMap.set(key, {
|
|
737
806
|
namespace: keyPrefix,
|
|
738
|
-
representationName: RepresentationType$
|
|
807
|
+
representationName: RepresentationType$2,
|
|
739
808
|
mergeable: false
|
|
740
809
|
});
|
|
741
810
|
}
|
|
742
811
|
function evictSuccess(luvio, resourceParams) {
|
|
743
|
-
const key = keyBuilder$
|
|
812
|
+
const key = keyBuilder$4(luvio, resourceParams);
|
|
744
813
|
luvio.storeEvict(key);
|
|
745
814
|
}
|
|
746
|
-
function createResourceRequest$
|
|
815
|
+
function createResourceRequest$2(config) {
|
|
747
816
|
const headers = {};
|
|
748
817
|
return {
|
|
749
818
|
baseUri: '/services/data/v58.0',
|
|
@@ -757,33 +826,33 @@ function createResourceRequest$1(config) {
|
|
|
757
826
|
};
|
|
758
827
|
}
|
|
759
828
|
|
|
760
|
-
const adapterName$
|
|
829
|
+
const adapterName$2 = 'deleteDataGraph';
|
|
761
830
|
const deleteDataGraph_ConfigPropertyMetadata = [
|
|
762
831
|
generateParamConfigMetadata('dataGraphName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
763
832
|
];
|
|
764
|
-
const deleteDataGraph_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
765
|
-
const createResourceParams$
|
|
766
|
-
function typeCheckConfig$
|
|
833
|
+
const deleteDataGraph_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, deleteDataGraph_ConfigPropertyMetadata);
|
|
834
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$5(deleteDataGraph_ConfigPropertyMetadata);
|
|
835
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
767
836
|
const config = {};
|
|
768
|
-
typeCheckConfig$
|
|
837
|
+
typeCheckConfig$5(untrustedConfig, config, deleteDataGraph_ConfigPropertyMetadata);
|
|
769
838
|
return config;
|
|
770
839
|
}
|
|
771
|
-
function validateAdapterConfig$
|
|
840
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
772
841
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
773
842
|
return null;
|
|
774
843
|
}
|
|
775
844
|
if (process.env.NODE_ENV !== 'production') {
|
|
776
845
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
777
846
|
}
|
|
778
|
-
const config = typeCheckConfig$
|
|
847
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
779
848
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
780
849
|
return null;
|
|
781
850
|
}
|
|
782
851
|
return config;
|
|
783
852
|
}
|
|
784
|
-
function buildNetworkSnapshot$
|
|
785
|
-
const resourceParams = createResourceParams$
|
|
786
|
-
const request = createResourceRequest$
|
|
853
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
854
|
+
const resourceParams = createResourceParams$2(config);
|
|
855
|
+
const request = createResourceRequest$2(resourceParams);
|
|
787
856
|
return luvio.dispatchResourceRequest(request, options)
|
|
788
857
|
.then(() => {
|
|
789
858
|
return luvio.handleSuccessResponse(() => {
|
|
@@ -791,7 +860,7 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
791
860
|
return luvio.storeBroadcast();
|
|
792
861
|
}, () => {
|
|
793
862
|
const cache = new StoreKeyMap();
|
|
794
|
-
getResponseCacheKeys$
|
|
863
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams);
|
|
795
864
|
return cache;
|
|
796
865
|
});
|
|
797
866
|
}, (response) => {
|
|
@@ -801,17 +870,17 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
801
870
|
}
|
|
802
871
|
const deleteDataGraphAdapterFactory = (luvio) => {
|
|
803
872
|
return function CDPdeleteDataGraph(untrustedConfig) {
|
|
804
|
-
const config = validateAdapterConfig$
|
|
873
|
+
const config = validateAdapterConfig$2(untrustedConfig, deleteDataGraph_ConfigPropertyNames);
|
|
805
874
|
// Invalid or incomplete config
|
|
806
875
|
if (config === null) {
|
|
807
|
-
throw new Error(`Invalid config for "${adapterName$
|
|
876
|
+
throw new Error(`Invalid config for "${adapterName$2}"`);
|
|
808
877
|
}
|
|
809
|
-
return buildNetworkSnapshot$
|
|
878
|
+
return buildNetworkSnapshot$2(luvio, config);
|
|
810
879
|
};
|
|
811
880
|
};
|
|
812
881
|
|
|
813
|
-
const VERSION = "0c1f279e921d51f73cd64db1eaef780c";
|
|
814
|
-
function validate(obj, path = 'CdpDataGraphRetryOutputRepresentation') {
|
|
882
|
+
const VERSION$1 = "0c1f279e921d51f73cd64db1eaef780c";
|
|
883
|
+
function validate$2(obj, path = 'CdpDataGraphRetryOutputRepresentation') {
|
|
815
884
|
const v_error = (() => {
|
|
816
885
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
817
886
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -834,20 +903,256 @@ function validate(obj, path = 'CdpDataGraphRetryOutputRepresentation') {
|
|
|
834
903
|
})();
|
|
835
904
|
return v_error === undefined ? null : v_error;
|
|
836
905
|
}
|
|
837
|
-
const RepresentationType = 'CdpDataGraphRetryOutputRepresentation';
|
|
838
|
-
function keyBuilder(luvio, config) {
|
|
839
|
-
return keyPrefix + '::' + RepresentationType + ':' + config.name;
|
|
906
|
+
const RepresentationType$1 = 'CdpDataGraphRetryOutputRepresentation';
|
|
907
|
+
function keyBuilder$3(luvio, config) {
|
|
908
|
+
return keyPrefix + '::' + RepresentationType$1 + ':' + config.name;
|
|
840
909
|
}
|
|
841
|
-
function keyBuilderFromType(luvio, object) {
|
|
910
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
842
911
|
const keyParams = {
|
|
843
912
|
name: object.dataGraphName
|
|
844
913
|
};
|
|
845
|
-
return keyBuilder(luvio, keyParams);
|
|
914
|
+
return keyBuilder$3(luvio, keyParams);
|
|
915
|
+
}
|
|
916
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
917
|
+
return input;
|
|
918
|
+
}
|
|
919
|
+
const select$3 = function CdpDataGraphRetryOutputRepresentationSelect() {
|
|
920
|
+
return {
|
|
921
|
+
kind: 'Fragment',
|
|
922
|
+
version: VERSION$1,
|
|
923
|
+
private: [],
|
|
924
|
+
opaque: true
|
|
925
|
+
};
|
|
926
|
+
};
|
|
927
|
+
function equals$2(existing, incoming) {
|
|
928
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
929
|
+
return false;
|
|
930
|
+
}
|
|
931
|
+
return true;
|
|
932
|
+
}
|
|
933
|
+
const ingest$1 = function CdpDataGraphRetryOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
934
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
935
|
+
const validateError = validate$2(input);
|
|
936
|
+
if (validateError !== null) {
|
|
937
|
+
throw validateError;
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
941
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 3000000;
|
|
942
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "CDP", VERSION$1, RepresentationType$1, equals$2);
|
|
943
|
+
return createLink(key);
|
|
944
|
+
};
|
|
945
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
946
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
947
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
948
|
+
rootKeySet.set(rootKey, {
|
|
949
|
+
namespace: keyPrefix,
|
|
950
|
+
representationName: RepresentationType$1,
|
|
951
|
+
mergeable: false
|
|
952
|
+
});
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
function select$2(luvio, params) {
|
|
956
|
+
return select$3();
|
|
957
|
+
}
|
|
958
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
959
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
960
|
+
}
|
|
961
|
+
function ingestSuccess$1(luvio, resourceParams, response) {
|
|
962
|
+
const { body } = response;
|
|
963
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
964
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
965
|
+
const snapshot = luvio.storeLookup({
|
|
966
|
+
recordId: key,
|
|
967
|
+
node: select$2(),
|
|
968
|
+
variables: {},
|
|
969
|
+
});
|
|
970
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
971
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
972
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
deepFreeze(snapshot.data);
|
|
976
|
+
return snapshot;
|
|
977
|
+
}
|
|
978
|
+
function createResourceRequest$1(config) {
|
|
979
|
+
const headers = {};
|
|
980
|
+
return {
|
|
981
|
+
baseUri: '/services/data/v58.0',
|
|
982
|
+
basePath: '/ssot/data-graphs/retry',
|
|
983
|
+
method: 'put',
|
|
984
|
+
body: config.body,
|
|
985
|
+
urlParams: {},
|
|
986
|
+
queryParams: {},
|
|
987
|
+
headers,
|
|
988
|
+
priority: 'normal',
|
|
989
|
+
};
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
const adapterName$1 = 'retryDataGraph';
|
|
993
|
+
const retryDataGraph_ConfigPropertyMetadata = [
|
|
994
|
+
generateParamConfigMetadata('dataGraphName', true, 2 /* Body */, 0 /* String */),
|
|
995
|
+
];
|
|
996
|
+
const retryDataGraph_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, retryDataGraph_ConfigPropertyMetadata);
|
|
997
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$5(retryDataGraph_ConfigPropertyMetadata);
|
|
998
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
999
|
+
const config = {};
|
|
1000
|
+
typeCheckConfig$5(untrustedConfig, config, retryDataGraph_ConfigPropertyMetadata);
|
|
1001
|
+
return config;
|
|
1002
|
+
}
|
|
1003
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
1004
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1005
|
+
return null;
|
|
1006
|
+
}
|
|
1007
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1008
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1009
|
+
}
|
|
1010
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
1011
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1012
|
+
return null;
|
|
1013
|
+
}
|
|
1014
|
+
return config;
|
|
1015
|
+
}
|
|
1016
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
1017
|
+
const resourceParams = createResourceParams$1(config);
|
|
1018
|
+
const request = createResourceRequest$1(resourceParams);
|
|
1019
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1020
|
+
.then((response) => {
|
|
1021
|
+
return luvio.handleSuccessResponse(() => {
|
|
1022
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response);
|
|
1023
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1024
|
+
}, () => {
|
|
1025
|
+
const cache = new StoreKeyMap();
|
|
1026
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
1027
|
+
return cache;
|
|
1028
|
+
});
|
|
1029
|
+
}, (response) => {
|
|
1030
|
+
deepFreeze(response);
|
|
1031
|
+
throw response;
|
|
1032
|
+
});
|
|
1033
|
+
}
|
|
1034
|
+
const retryDataGraphAdapterFactory = (luvio) => {
|
|
1035
|
+
return function retryDataGraph(untrustedConfig) {
|
|
1036
|
+
const config = validateAdapterConfig$1(untrustedConfig, retryDataGraph_ConfigPropertyNames);
|
|
1037
|
+
// Invalid or incomplete config
|
|
1038
|
+
if (config === null) {
|
|
1039
|
+
throw new Error('Invalid config for "retryDataGraph"');
|
|
1040
|
+
}
|
|
1041
|
+
return buildNetworkSnapshot$1(luvio, config);
|
|
1042
|
+
};
|
|
1043
|
+
};
|
|
1044
|
+
|
|
1045
|
+
function validate$1(obj, path = 'DependencyOutputRepresentation') {
|
|
1046
|
+
const v_error = (() => {
|
|
1047
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1048
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1049
|
+
}
|
|
1050
|
+
const obj_developerName = obj.developerName;
|
|
1051
|
+
const path_developerName = path + '.developerName';
|
|
1052
|
+
if (typeof obj_developerName !== 'string') {
|
|
1053
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
1054
|
+
}
|
|
1055
|
+
const obj_displayName = obj.displayName;
|
|
1056
|
+
const path_displayName = path + '.displayName';
|
|
1057
|
+
if (typeof obj_displayName !== 'string') {
|
|
1058
|
+
return new TypeError('Expected "string" but received "' + typeof obj_displayName + '" (at "' + path_displayName + '")');
|
|
1059
|
+
}
|
|
1060
|
+
const obj_entityType = obj.entityType;
|
|
1061
|
+
const path_entityType = path + '.entityType';
|
|
1062
|
+
if (typeof obj_entityType !== 'string') {
|
|
1063
|
+
return new TypeError('Expected "string" but received "' + typeof obj_entityType + '" (at "' + path_entityType + '")');
|
|
1064
|
+
}
|
|
1065
|
+
const obj_entityTypePluralLabel = obj.entityTypePluralLabel;
|
|
1066
|
+
const path_entityTypePluralLabel = path + '.entityTypePluralLabel';
|
|
1067
|
+
if (typeof obj_entityTypePluralLabel !== 'string') {
|
|
1068
|
+
return new TypeError('Expected "string" but received "' + typeof obj_entityTypePluralLabel + '" (at "' + path_entityTypePluralLabel + '")');
|
|
1069
|
+
}
|
|
1070
|
+
const obj_id = obj.id;
|
|
1071
|
+
const path_id = path + '.id';
|
|
1072
|
+
if (typeof obj_id !== 'string') {
|
|
1073
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1074
|
+
}
|
|
1075
|
+
const obj_linkable = obj.linkable;
|
|
1076
|
+
const path_linkable = path + '.linkable';
|
|
1077
|
+
if (typeof obj_linkable !== 'boolean') {
|
|
1078
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_linkable + '" (at "' + path_linkable + '")');
|
|
1079
|
+
}
|
|
1080
|
+
})();
|
|
1081
|
+
return v_error === undefined ? null : v_error;
|
|
1082
|
+
}
|
|
1083
|
+
function equals$1(existing, incoming) {
|
|
1084
|
+
const existing_linkable = existing.linkable;
|
|
1085
|
+
const incoming_linkable = incoming.linkable;
|
|
1086
|
+
if (!(existing_linkable === incoming_linkable)) {
|
|
1087
|
+
return false;
|
|
1088
|
+
}
|
|
1089
|
+
const existing_developerName = existing.developerName;
|
|
1090
|
+
const incoming_developerName = incoming.developerName;
|
|
1091
|
+
if (!(existing_developerName === incoming_developerName)) {
|
|
1092
|
+
return false;
|
|
1093
|
+
}
|
|
1094
|
+
const existing_displayName = existing.displayName;
|
|
1095
|
+
const incoming_displayName = incoming.displayName;
|
|
1096
|
+
if (!(existing_displayName === incoming_displayName)) {
|
|
1097
|
+
return false;
|
|
1098
|
+
}
|
|
1099
|
+
const existing_entityType = existing.entityType;
|
|
1100
|
+
const incoming_entityType = incoming.entityType;
|
|
1101
|
+
if (!(existing_entityType === incoming_entityType)) {
|
|
1102
|
+
return false;
|
|
1103
|
+
}
|
|
1104
|
+
const existing_entityTypePluralLabel = existing.entityTypePluralLabel;
|
|
1105
|
+
const incoming_entityTypePluralLabel = incoming.entityTypePluralLabel;
|
|
1106
|
+
if (!(existing_entityTypePluralLabel === incoming_entityTypePluralLabel)) {
|
|
1107
|
+
return false;
|
|
1108
|
+
}
|
|
1109
|
+
const existing_id = existing.id;
|
|
1110
|
+
const incoming_id = incoming.id;
|
|
1111
|
+
if (!(existing_id === incoming_id)) {
|
|
1112
|
+
return false;
|
|
1113
|
+
}
|
|
1114
|
+
return true;
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
const VERSION = "0c15cc932d3ea4f07bf6a3b0429e3520";
|
|
1118
|
+
function validate(obj, path = 'CdpDataGraphDependencyOutputRepresentation') {
|
|
1119
|
+
const validateCdpObjectBaseOutputRepresentation_validateError = validate$8(obj, path);
|
|
1120
|
+
if (validateCdpObjectBaseOutputRepresentation_validateError !== null) {
|
|
1121
|
+
return validateCdpObjectBaseOutputRepresentation_validateError;
|
|
1122
|
+
}
|
|
1123
|
+
const v_error = (() => {
|
|
1124
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1125
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1126
|
+
}
|
|
1127
|
+
const obj_dependency = obj.dependency;
|
|
1128
|
+
const path_dependency = path + '.dependency';
|
|
1129
|
+
if (!ArrayIsArray(obj_dependency)) {
|
|
1130
|
+
return new TypeError('Expected "array" but received "' + typeof obj_dependency + '" (at "' + path_dependency + '")');
|
|
1131
|
+
}
|
|
1132
|
+
for (let i = 0; i < obj_dependency.length; i++) {
|
|
1133
|
+
const obj_dependency_item = obj_dependency[i];
|
|
1134
|
+
const path_dependency_item = path_dependency + '[' + i + ']';
|
|
1135
|
+
const referencepath_dependency_itemValidationError = validate$1(obj_dependency_item, path_dependency_item);
|
|
1136
|
+
if (referencepath_dependency_itemValidationError !== null) {
|
|
1137
|
+
let message = 'Object doesn\'t match DependencyOutputRepresentation (at "' + path_dependency_item + '")\n';
|
|
1138
|
+
message += referencepath_dependency_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1139
|
+
return new TypeError(message);
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
})();
|
|
1143
|
+
return v_error === undefined ? null : v_error;
|
|
1144
|
+
}
|
|
1145
|
+
const RepresentationType = 'CdpDataGraphDependencyOutputRepresentation';
|
|
1146
|
+
function keyBuilder$2(luvio, config) {
|
|
1147
|
+
return keyBuilder$8(luvio, config);
|
|
1148
|
+
}
|
|
1149
|
+
function keyBuilderFromType(luvio, object) {
|
|
1150
|
+
return keyBuilderFromType$3(luvio, object);
|
|
846
1151
|
}
|
|
847
1152
|
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
848
1153
|
return input;
|
|
849
1154
|
}
|
|
850
|
-
const select$1 = function
|
|
1155
|
+
const select$1 = function CdpDataGraphDependencyOutputRepresentationSelect() {
|
|
851
1156
|
return {
|
|
852
1157
|
kind: 'Fragment',
|
|
853
1158
|
version: VERSION,
|
|
@@ -856,12 +1161,22 @@ const select$1 = function CdpDataGraphRetryOutputRepresentationSelect() {
|
|
|
856
1161
|
};
|
|
857
1162
|
};
|
|
858
1163
|
function equals(existing, incoming) {
|
|
859
|
-
if (
|
|
1164
|
+
if (equals$5(existing, incoming) === false) {
|
|
1165
|
+
return false;
|
|
1166
|
+
}
|
|
1167
|
+
const existing_dependency = existing.dependency;
|
|
1168
|
+
const incoming_dependency = incoming.dependency;
|
|
1169
|
+
const equals_dependency_items = equalsArray(existing_dependency, incoming_dependency, (existing_dependency_item, incoming_dependency_item) => {
|
|
1170
|
+
if (!(equals$1(existing_dependency_item, incoming_dependency_item))) {
|
|
1171
|
+
return false;
|
|
1172
|
+
}
|
|
1173
|
+
});
|
|
1174
|
+
if (equals_dependency_items === false) {
|
|
860
1175
|
return false;
|
|
861
1176
|
}
|
|
862
1177
|
return true;
|
|
863
1178
|
}
|
|
864
|
-
const ingest = function
|
|
1179
|
+
const ingest = function CdpDataGraphDependencyOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
865
1180
|
if (process.env.NODE_ENV !== 'production') {
|
|
866
1181
|
const validateError = validate(input);
|
|
867
1182
|
if (validateError !== null) {
|
|
@@ -878,7 +1193,7 @@ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
878
1193
|
const rootKey = keyBuilderFromType(luvio, input);
|
|
879
1194
|
rootKeySet.set(rootKey, {
|
|
880
1195
|
namespace: keyPrefix,
|
|
881
|
-
representationName: RepresentationType,
|
|
1196
|
+
representationName: RepresentationType$3,
|
|
882
1197
|
mergeable: false
|
|
883
1198
|
});
|
|
884
1199
|
}
|
|
@@ -886,18 +1201,23 @@ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
886
1201
|
function select(luvio, params) {
|
|
887
1202
|
return select$1();
|
|
888
1203
|
}
|
|
1204
|
+
function keyBuilder$1(luvio, params) {
|
|
1205
|
+
return keyBuilder$2(luvio, {
|
|
1206
|
+
name: params.urlParams.dataGraphName
|
|
1207
|
+
});
|
|
1208
|
+
}
|
|
889
1209
|
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
890
1210
|
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
891
1211
|
}
|
|
892
|
-
function ingestSuccess(luvio, resourceParams, response) {
|
|
1212
|
+
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
893
1213
|
const { body } = response;
|
|
894
|
-
const key =
|
|
1214
|
+
const key = keyBuilder$1(luvio, resourceParams);
|
|
895
1215
|
luvio.storeIngest(key, ingest, body);
|
|
896
1216
|
const snapshot = luvio.storeLookup({
|
|
897
1217
|
recordId: key,
|
|
898
1218
|
node: select(),
|
|
899
1219
|
variables: {},
|
|
900
|
-
});
|
|
1220
|
+
}, snapshotRefresh);
|
|
901
1221
|
if (process.env.NODE_ENV !== 'production') {
|
|
902
1222
|
if (snapshot.state !== 'Fulfilled') {
|
|
903
1223
|
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
@@ -906,29 +1226,39 @@ function ingestSuccess(luvio, resourceParams, response) {
|
|
|
906
1226
|
deepFreeze(snapshot.data);
|
|
907
1227
|
return snapshot;
|
|
908
1228
|
}
|
|
1229
|
+
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
1230
|
+
const key = keyBuilder$1(luvio, params);
|
|
1231
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1232
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
1233
|
+
return errorSnapshot;
|
|
1234
|
+
}
|
|
909
1235
|
function createResourceRequest(config) {
|
|
910
1236
|
const headers = {};
|
|
911
1237
|
return {
|
|
912
1238
|
baseUri: '/services/data/v58.0',
|
|
913
|
-
basePath: '/ssot/data-graphs/
|
|
914
|
-
method: '
|
|
915
|
-
body:
|
|
916
|
-
urlParams:
|
|
1239
|
+
basePath: '/ssot/data-graphs/dependency/' + config.urlParams.dataGraphName + '',
|
|
1240
|
+
method: 'get',
|
|
1241
|
+
body: null,
|
|
1242
|
+
urlParams: config.urlParams,
|
|
917
1243
|
queryParams: {},
|
|
918
1244
|
headers,
|
|
919
1245
|
priority: 'normal',
|
|
920
1246
|
};
|
|
921
1247
|
}
|
|
922
1248
|
|
|
923
|
-
const adapterName = '
|
|
924
|
-
const
|
|
925
|
-
generateParamConfigMetadata('dataGraphName', true,
|
|
1249
|
+
const adapterName = 'getDataGraphDependency';
|
|
1250
|
+
const getDataGraphDependency_ConfigPropertyMetadata = [
|
|
1251
|
+
generateParamConfigMetadata('dataGraphName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
926
1252
|
];
|
|
927
|
-
const
|
|
928
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
1253
|
+
const getDataGraphDependency_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getDataGraphDependency_ConfigPropertyMetadata);
|
|
1254
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$5(getDataGraphDependency_ConfigPropertyMetadata);
|
|
1255
|
+
function keyBuilder(luvio, config) {
|
|
1256
|
+
const resourceParams = createResourceParams(config);
|
|
1257
|
+
return keyBuilder$1(luvio, resourceParams);
|
|
1258
|
+
}
|
|
929
1259
|
function typeCheckConfig(untrustedConfig) {
|
|
930
1260
|
const config = {};
|
|
931
|
-
typeCheckConfig$
|
|
1261
|
+
typeCheckConfig$5(untrustedConfig, config, getDataGraphDependency_ConfigPropertyMetadata);
|
|
932
1262
|
return config;
|
|
933
1263
|
}
|
|
934
1264
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -944,33 +1274,62 @@ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
|
944
1274
|
}
|
|
945
1275
|
return config;
|
|
946
1276
|
}
|
|
1277
|
+
function adapterFragment(luvio, config) {
|
|
1278
|
+
createResourceParams(config);
|
|
1279
|
+
return select();
|
|
1280
|
+
}
|
|
1281
|
+
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
1282
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
1283
|
+
config,
|
|
1284
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1285
|
+
});
|
|
1286
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1287
|
+
}
|
|
1288
|
+
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
1289
|
+
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
1290
|
+
config,
|
|
1291
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1292
|
+
});
|
|
1293
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1294
|
+
}
|
|
947
1295
|
function buildNetworkSnapshot(luvio, config, options) {
|
|
948
1296
|
const resourceParams = createResourceParams(config);
|
|
949
1297
|
const request = createResourceRequest(resourceParams);
|
|
950
1298
|
return luvio.dispatchResourceRequest(request, options)
|
|
951
1299
|
.then((response) => {
|
|
952
|
-
return luvio.handleSuccessResponse(() => {
|
|
953
|
-
const snapshot = ingestSuccess(luvio, resourceParams, response);
|
|
954
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
955
|
-
}, () => {
|
|
1300
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
956
1301
|
const cache = new StoreKeyMap();
|
|
957
1302
|
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
958
1303
|
return cache;
|
|
959
1304
|
});
|
|
960
1305
|
}, (response) => {
|
|
961
|
-
|
|
962
|
-
throw response;
|
|
1306
|
+
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
963
1307
|
});
|
|
964
1308
|
}
|
|
965
|
-
|
|
966
|
-
return
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
1309
|
+
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
1310
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
1311
|
+
}
|
|
1312
|
+
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
1313
|
+
const { luvio, config } = context;
|
|
1314
|
+
const selector = {
|
|
1315
|
+
recordId: keyBuilder(luvio, config),
|
|
1316
|
+
node: adapterFragment(luvio, config),
|
|
1317
|
+
variables: {},
|
|
973
1318
|
};
|
|
1319
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1320
|
+
config,
|
|
1321
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1322
|
+
});
|
|
1323
|
+
return cacheSnapshot;
|
|
1324
|
+
}
|
|
1325
|
+
const getDataGraphDependencyAdapterFactory = (luvio) => function CDP__getDataGraphDependency(untrustedConfig, requestContext) {
|
|
1326
|
+
const config = validateAdapterConfig(untrustedConfig, getDataGraphDependency_ConfigPropertyNames);
|
|
1327
|
+
// Invalid or incomplete config
|
|
1328
|
+
if (config === null) {
|
|
1329
|
+
return null;
|
|
1330
|
+
}
|
|
1331
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1332
|
+
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
974
1333
|
};
|
|
975
1334
|
|
|
976
|
-
export { createDataGraphAdapterFactory, deleteDataGraphAdapterFactory, getDataGraphAdapterFactory, retryDataGraphAdapterFactory };
|
|
1335
|
+
export { createDataGraphAdapterFactory, deleteDataGraphAdapterFactory, getDataGraphAdapterFactory, getDataGraphDependencyAdapterFactory, retryDataGraphAdapterFactory };
|