@salesforce/lds-adapters-cdp-data-clean-room 1.332.0-dev22 → 1.332.0-dev24
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/cdp-data-clean-room.js +1406 -107
- package/dist/es/es2018/types/src/generated/adapters/createDataCleanRoomCollaboration.d.ts +21 -0
- package/dist/es/es2018/types/src/generated/adapters/createDataCleanRoomSpecification.d.ts +22 -0
- package/dist/es/es2018/types/src/generated/adapters/getDataCleanRoomProvidersPaginated.d.ts +1 -1
- package/dist/es/es2018/types/src/generated/adapters/getDataCleanRoomSpecificationsPaginated.d.ts +30 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +3 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +5 -1
- package/dist/es/es2018/types/src/generated/resources/getSsotDataCleanRoomProviders.d.ts +1 -1
- package/dist/es/es2018/types/src/generated/resources/getSsotDataCleanRoomSpecifications.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/resources/postSsotDataCleanRoomCollaborations.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/resources/postSsotDataCleanRoomSpecifications.d.ts +19 -0
- package/dist/es/es2018/types/src/generated/types/DataCleanRoomCollaborationInputRepresentation.d.ts +46 -0
- package/dist/es/es2018/types/src/generated/types/DataCleanRoomCollaborationRepresentation.d.ts +78 -0
- package/dist/es/es2018/types/src/generated/types/DataCleanRoomDataSpecificationInputRepresentation.d.ts +49 -0
- package/dist/es/es2018/types/src/generated/types/DataCleanRoomDataSpecificationRepresentation.d.ts +84 -0
- package/dist/es/es2018/types/src/generated/types/DataCleanRoomMemberRepresentation.d.ts +49 -0
- package/dist/es/es2018/types/src/generated/types/DataCleanRoomSpecificationCollectionRepresentation.d.ts +53 -0
- package/dist/es/es2018/types/src/generated/types/DataCleanRoomTemplateRepresentation.d.ts +62 -0
- package/dist/es/es2018/types/src/generated/types/UseCaseTemplateMappingAttributeRepresentation.d.ts +69 -0
- package/dist/es/es2018/types/src/generated/types/UseCaseTemplateMappingPathAttributeRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/UseCaseTemplateMappingRepresentation.d.ts +60 -0
- package/dist/es/es2018/types/src/generated/types/UseCaseTemplateMappingSubjectAttributeRepresentation.d.ts +37 -0
- package/package.json +3 -3
- package/sfdc/index.js +1515 -199
- package/src/raml/api.raml +488 -36
- package/src/raml/luvio.raml +27 -7
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2, typeCheckConfig as typeCheckConfig$5, StoreKeyMap, createResourceParams as createResourceParams$5 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -92,7 +92,7 @@ function createLink(ref) {
|
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
function validate$
|
|
95
|
+
function validate$b(obj, path = 'CdpUserRepresentation') {
|
|
96
96
|
const v_error = (() => {
|
|
97
97
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
98
98
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -120,8 +120,8 @@ function validate$2(obj, path = 'CdpUserRepresentation') {
|
|
|
120
120
|
return v_error === undefined ? null : v_error;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
const VERSION$
|
|
124
|
-
function validate$
|
|
123
|
+
const VERSION$4 = "929b1bcf37fe62f914c2364146a0f5e6";
|
|
124
|
+
function validate$a(obj, path = 'DataCleanRoomProviderRepresentation') {
|
|
125
125
|
const v_error = (() => {
|
|
126
126
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
127
127
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -129,7 +129,7 @@ function validate$1(obj, path = 'DataCleanRoomProviderRepresentation') {
|
|
|
129
129
|
if (obj.createdBy !== undefined) {
|
|
130
130
|
const obj_createdBy = obj.createdBy;
|
|
131
131
|
const path_createdBy = path + '.createdBy';
|
|
132
|
-
const referencepath_createdByValidationError = validate$
|
|
132
|
+
const referencepath_createdByValidationError = validate$b(obj_createdBy, path_createdBy);
|
|
133
133
|
if (referencepath_createdByValidationError !== null) {
|
|
134
134
|
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_createdBy + '")\n';
|
|
135
135
|
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -168,7 +168,7 @@ function validate$1(obj, path = 'DataCleanRoomProviderRepresentation') {
|
|
|
168
168
|
if (obj.lastModifiedBy !== undefined) {
|
|
169
169
|
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
170
170
|
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
171
|
-
const referencepath_lastModifiedByValidationError = validate$
|
|
171
|
+
const referencepath_lastModifiedByValidationError = validate$b(obj_lastModifiedBy, path_lastModifiedBy);
|
|
172
172
|
if (referencepath_lastModifiedByValidationError !== null) {
|
|
173
173
|
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_lastModifiedBy + '")\n';
|
|
174
174
|
message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -225,57 +225,57 @@ function validate$1(obj, path = 'DataCleanRoomProviderRepresentation') {
|
|
|
225
225
|
})();
|
|
226
226
|
return v_error === undefined ? null : v_error;
|
|
227
227
|
}
|
|
228
|
-
const RepresentationType$
|
|
229
|
-
function keyBuilder$
|
|
230
|
-
return keyPrefix + '::' + RepresentationType$
|
|
228
|
+
const RepresentationType$4 = 'DataCleanRoomProviderRepresentation';
|
|
229
|
+
function keyBuilder$6(luvio, config) {
|
|
230
|
+
return keyPrefix + '::' + RepresentationType$4 + ':' + config.id;
|
|
231
231
|
}
|
|
232
|
-
function keyBuilderFromType(luvio, object) {
|
|
232
|
+
function keyBuilderFromType$2(luvio, object) {
|
|
233
233
|
const keyParams = {
|
|
234
234
|
id: object.id
|
|
235
235
|
};
|
|
236
|
-
return keyBuilder$
|
|
236
|
+
return keyBuilder$6(luvio, keyParams);
|
|
237
237
|
}
|
|
238
|
-
function normalize$
|
|
238
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
239
239
|
return input;
|
|
240
240
|
}
|
|
241
|
-
const select$
|
|
241
|
+
const select$9 = function DataCleanRoomProviderRepresentationSelect() {
|
|
242
242
|
return {
|
|
243
243
|
kind: 'Fragment',
|
|
244
|
-
version: VERSION$
|
|
244
|
+
version: VERSION$4,
|
|
245
245
|
private: [],
|
|
246
246
|
opaque: true
|
|
247
247
|
};
|
|
248
248
|
};
|
|
249
|
-
function equals$
|
|
249
|
+
function equals$4(existing, incoming) {
|
|
250
250
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
251
251
|
return false;
|
|
252
252
|
}
|
|
253
253
|
return true;
|
|
254
254
|
}
|
|
255
|
-
const ingest$
|
|
255
|
+
const ingest$4 = function DataCleanRoomProviderRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
256
256
|
if (process.env.NODE_ENV !== 'production') {
|
|
257
|
-
const validateError = validate$
|
|
257
|
+
const validateError = validate$a(input);
|
|
258
258
|
if (validateError !== null) {
|
|
259
259
|
throw validateError;
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
|
-
const key = keyBuilderFromType(luvio, input);
|
|
262
|
+
const key = keyBuilderFromType$2(luvio, input);
|
|
263
263
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
264
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
264
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "data-clean-room", VERSION$4, RepresentationType$4, equals$4);
|
|
265
265
|
return createLink(key);
|
|
266
266
|
};
|
|
267
|
-
function getTypeCacheKeys$
|
|
267
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
268
268
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
269
|
-
const rootKey = keyBuilderFromType(luvio, input);
|
|
269
|
+
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
270
270
|
rootKeySet.set(rootKey, {
|
|
271
271
|
namespace: keyPrefix,
|
|
272
|
-
representationName: RepresentationType$
|
|
272
|
+
representationName: RepresentationType$4,
|
|
273
273
|
mergeable: false
|
|
274
274
|
});
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
-
const VERSION = "52237eeecd4f8f11ae22e265d9abe5ca";
|
|
278
|
-
function validate(obj, path = 'DataCleanRoomProviderCollectionRepresentation') {
|
|
277
|
+
const VERSION$3 = "52237eeecd4f8f11ae22e265d9abe5ca";
|
|
278
|
+
function validate$9(obj, path = 'DataCleanRoomProviderCollectionRepresentation') {
|
|
279
279
|
const v_error = (() => {
|
|
280
280
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
281
281
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -351,14 +351,14 @@ function validate(obj, path = 'DataCleanRoomProviderCollectionRepresentation') {
|
|
|
351
351
|
})();
|
|
352
352
|
return v_error === undefined ? null : v_error;
|
|
353
353
|
}
|
|
354
|
-
const RepresentationType = 'DataCleanRoomProviderCollectionRepresentation';
|
|
355
|
-
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
354
|
+
const RepresentationType$3 = 'DataCleanRoomProviderCollectionRepresentation';
|
|
355
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
356
356
|
const input_providers = input.providers;
|
|
357
357
|
const input_providers_id = path.fullPath + '__providers';
|
|
358
358
|
for (let i = 0; i < input_providers.length; i++) {
|
|
359
359
|
const input_providers_item = input_providers[i];
|
|
360
360
|
let input_providers_item_id = input_providers_id + '__' + i;
|
|
361
|
-
input_providers[i] = ingest$
|
|
361
|
+
input_providers[i] = ingest$4(input_providers_item, {
|
|
362
362
|
fullPath: input_providers_item_id,
|
|
363
363
|
propertyName: i,
|
|
364
364
|
parent: {
|
|
@@ -371,10 +371,10 @@ function normalize(input, existing, path, luvio, store, timestamp) {
|
|
|
371
371
|
}
|
|
372
372
|
return input;
|
|
373
373
|
}
|
|
374
|
-
const select$
|
|
374
|
+
const select$8 = function DataCleanRoomProviderCollectionRepresentationSelect() {
|
|
375
375
|
return {
|
|
376
376
|
kind: 'Fragment',
|
|
377
|
-
version: VERSION,
|
|
377
|
+
version: VERSION$3,
|
|
378
378
|
private: [],
|
|
379
379
|
selections: [
|
|
380
380
|
{
|
|
@@ -401,7 +401,7 @@ const select$2 = function DataCleanRoomProviderCollectionRepresentationSelect()
|
|
|
401
401
|
name: 'providers',
|
|
402
402
|
kind: 'Link',
|
|
403
403
|
plural: true,
|
|
404
|
-
fragment: select$
|
|
404
|
+
fragment: select$9()
|
|
405
405
|
},
|
|
406
406
|
{
|
|
407
407
|
name: 'totalSize',
|
|
@@ -411,7 +411,7 @@ const select$2 = function DataCleanRoomProviderCollectionRepresentationSelect()
|
|
|
411
411
|
]
|
|
412
412
|
};
|
|
413
413
|
};
|
|
414
|
-
function equals(existing, incoming) {
|
|
414
|
+
function equals$3(existing, incoming) {
|
|
415
415
|
const existing_limit = existing.limit;
|
|
416
416
|
const incoming_limit = incoming.limit;
|
|
417
417
|
// if at least one of these optionals is defined
|
|
@@ -489,48 +489,48 @@ function equals(existing, incoming) {
|
|
|
489
489
|
}
|
|
490
490
|
return true;
|
|
491
491
|
}
|
|
492
|
-
const ingest = function DataCleanRoomProviderCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
492
|
+
const ingest$3 = function DataCleanRoomProviderCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
493
493
|
if (process.env.NODE_ENV !== 'production') {
|
|
494
|
-
const validateError = validate(input);
|
|
494
|
+
const validateError = validate$9(input);
|
|
495
495
|
if (validateError !== null) {
|
|
496
496
|
throw validateError;
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
499
|
const key = path.fullPath;
|
|
500
500
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
501
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "data-clean-room", VERSION, RepresentationType, equals);
|
|
501
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "data-clean-room", VERSION$3, RepresentationType$3, equals$3);
|
|
502
502
|
return createLink(key);
|
|
503
503
|
};
|
|
504
|
-
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
504
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
505
505
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
506
506
|
const rootKey = fullPathFactory();
|
|
507
507
|
rootKeySet.set(rootKey, {
|
|
508
508
|
namespace: keyPrefix,
|
|
509
|
-
representationName: RepresentationType,
|
|
509
|
+
representationName: RepresentationType$3,
|
|
510
510
|
mergeable: false
|
|
511
511
|
});
|
|
512
512
|
const input_providers_length = input.providers.length;
|
|
513
513
|
for (let i = 0; i < input_providers_length; i++) {
|
|
514
|
-
getTypeCacheKeys$
|
|
514
|
+
getTypeCacheKeys$4(rootKeySet, luvio, input.providers[i]);
|
|
515
515
|
}
|
|
516
516
|
}
|
|
517
517
|
|
|
518
|
-
function select$
|
|
519
|
-
return select$
|
|
518
|
+
function select$7(luvio, params) {
|
|
519
|
+
return select$8();
|
|
520
520
|
}
|
|
521
|
-
function keyBuilder$
|
|
522
|
-
return keyPrefix + '::DataCleanRoomProviderCollectionRepresentation:(' + '
|
|
521
|
+
function keyBuilder$5(luvio, params) {
|
|
522
|
+
return keyPrefix + '::DataCleanRoomProviderCollectionRepresentation:(' + 'filters:' + params.queryParams.filters + ',' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'orderBy:' + params.queryParams.orderBy + ')';
|
|
523
523
|
}
|
|
524
|
-
function getResponseCacheKeys$
|
|
525
|
-
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$
|
|
524
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
525
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$5(luvio, resourceParams));
|
|
526
526
|
}
|
|
527
|
-
function ingestSuccess$
|
|
527
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
528
528
|
const { body } = response;
|
|
529
|
-
const key = keyBuilder$
|
|
530
|
-
luvio.storeIngest(key, ingest, body);
|
|
529
|
+
const key = keyBuilder$5(luvio, resourceParams);
|
|
530
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
531
531
|
const snapshot = luvio.storeLookup({
|
|
532
532
|
recordId: key,
|
|
533
|
-
node: select$
|
|
533
|
+
node: select$7(),
|
|
534
534
|
variables: {},
|
|
535
535
|
}, snapshotRefresh);
|
|
536
536
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -541,13 +541,13 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
541
541
|
deepFreeze(snapshot.data);
|
|
542
542
|
return snapshot;
|
|
543
543
|
}
|
|
544
|
-
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
545
|
-
const key = keyBuilder$
|
|
544
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
545
|
+
const key = keyBuilder$5(luvio, params);
|
|
546
546
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
547
547
|
luvio.storeIngestError(key, errorSnapshot);
|
|
548
548
|
return errorSnapshot;
|
|
549
549
|
}
|
|
550
|
-
function createResourceRequest$
|
|
550
|
+
function createResourceRequest$4(config) {
|
|
551
551
|
const headers = {};
|
|
552
552
|
return {
|
|
553
553
|
baseUri: '/services/data/v63.0',
|
|
@@ -561,108 +561,108 @@ function createResourceRequest$1(config) {
|
|
|
561
561
|
};
|
|
562
562
|
}
|
|
563
563
|
|
|
564
|
-
const adapterName$
|
|
564
|
+
const adapterName$4 = 'getDataCleanRoomProvidersPaginated';
|
|
565
565
|
const getDataCleanRoomProvidersPaginated_ConfigPropertyMetadata = [
|
|
566
|
-
generateParamConfigMetadata('batchSize', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
567
566
|
generateParamConfigMetadata('filters', false, 1 /* QueryParameter */, 0 /* String */),
|
|
567
|
+
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
568
568
|
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
569
569
|
generateParamConfigMetadata('orderBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
570
570
|
];
|
|
571
|
-
const getDataCleanRoomProvidersPaginated_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
572
|
-
const createResourceParams$
|
|
573
|
-
function keyBuilder(luvio, config) {
|
|
574
|
-
const resourceParams = createResourceParams$
|
|
575
|
-
return keyBuilder$
|
|
571
|
+
const getDataCleanRoomProvidersPaginated_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getDataCleanRoomProvidersPaginated_ConfigPropertyMetadata);
|
|
572
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$5(getDataCleanRoomProvidersPaginated_ConfigPropertyMetadata);
|
|
573
|
+
function keyBuilder$4(luvio, config) {
|
|
574
|
+
const resourceParams = createResourceParams$4(config);
|
|
575
|
+
return keyBuilder$5(luvio, resourceParams);
|
|
576
576
|
}
|
|
577
|
-
function typeCheckConfig$
|
|
577
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
578
578
|
const config = {};
|
|
579
|
-
typeCheckConfig$
|
|
579
|
+
typeCheckConfig$5(untrustedConfig, config, getDataCleanRoomProvidersPaginated_ConfigPropertyMetadata);
|
|
580
580
|
return config;
|
|
581
581
|
}
|
|
582
|
-
function validateAdapterConfig$
|
|
582
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
583
583
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
584
584
|
return null;
|
|
585
585
|
}
|
|
586
586
|
if (process.env.NODE_ENV !== 'production') {
|
|
587
587
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
588
588
|
}
|
|
589
|
-
const config = typeCheckConfig$
|
|
589
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
590
590
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
591
591
|
return null;
|
|
592
592
|
}
|
|
593
593
|
return config;
|
|
594
594
|
}
|
|
595
|
-
function adapterFragment(luvio, config) {
|
|
596
|
-
createResourceParams$
|
|
597
|
-
return select$
|
|
595
|
+
function adapterFragment$1(luvio, config) {
|
|
596
|
+
createResourceParams$4(config);
|
|
597
|
+
return select$7();
|
|
598
598
|
}
|
|
599
|
-
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
600
|
-
const snapshot = ingestSuccess$
|
|
599
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
600
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
601
601
|
config,
|
|
602
|
-
resolve: () => buildNetworkSnapshot$
|
|
602
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
603
603
|
});
|
|
604
604
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
605
605
|
}
|
|
606
|
-
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
607
|
-
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
606
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
607
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
608
608
|
config,
|
|
609
|
-
resolve: () => buildNetworkSnapshot$
|
|
609
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
610
610
|
});
|
|
611
611
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
612
612
|
}
|
|
613
|
-
function buildNetworkSnapshot$
|
|
614
|
-
const resourceParams = createResourceParams$
|
|
615
|
-
const request = createResourceRequest$
|
|
613
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
614
|
+
const resourceParams = createResourceParams$4(config);
|
|
615
|
+
const request = createResourceRequest$4(resourceParams);
|
|
616
616
|
return luvio.dispatchResourceRequest(request, options)
|
|
617
617
|
.then((response) => {
|
|
618
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
618
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
619
619
|
const cache = new StoreKeyMap();
|
|
620
|
-
getResponseCacheKeys$
|
|
620
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
621
621
|
return cache;
|
|
622
622
|
});
|
|
623
623
|
}, (response) => {
|
|
624
|
-
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
624
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
625
625
|
});
|
|
626
626
|
}
|
|
627
|
-
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
628
|
-
return buildNetworkSnapshotCachePolicy$
|
|
627
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
628
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
629
629
|
}
|
|
630
|
-
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
630
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
631
631
|
const { luvio, config } = context;
|
|
632
632
|
const selector = {
|
|
633
|
-
recordId: keyBuilder(luvio, config),
|
|
634
|
-
node: adapterFragment(luvio, config),
|
|
633
|
+
recordId: keyBuilder$4(luvio, config),
|
|
634
|
+
node: adapterFragment$1(luvio, config),
|
|
635
635
|
variables: {},
|
|
636
636
|
};
|
|
637
637
|
const cacheSnapshot = storeLookup(selector, {
|
|
638
638
|
config,
|
|
639
|
-
resolve: () => buildNetworkSnapshot$
|
|
639
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
640
640
|
});
|
|
641
641
|
return cacheSnapshot;
|
|
642
642
|
}
|
|
643
643
|
const getDataCleanRoomProvidersPaginatedAdapterFactory = (luvio) => function dataCleanRoom__getDataCleanRoomProvidersPaginated(untrustedConfig, requestContext) {
|
|
644
|
-
const config = validateAdapterConfig$
|
|
644
|
+
const config = validateAdapterConfig$4(untrustedConfig, getDataCleanRoomProvidersPaginated_ConfigPropertyNames);
|
|
645
645
|
// Invalid or incomplete config
|
|
646
646
|
if (config === null) {
|
|
647
647
|
return null;
|
|
648
648
|
}
|
|
649
649
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
650
|
-
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
650
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
651
651
|
};
|
|
652
652
|
|
|
653
|
-
function select(luvio, params) {
|
|
654
|
-
return select$
|
|
653
|
+
function select$6(luvio, params) {
|
|
654
|
+
return select$9();
|
|
655
655
|
}
|
|
656
|
-
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
657
|
-
getTypeCacheKeys$
|
|
656
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
657
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response);
|
|
658
658
|
}
|
|
659
|
-
function ingestSuccess(luvio, resourceParams, response) {
|
|
659
|
+
function ingestSuccess$3(luvio, resourceParams, response) {
|
|
660
660
|
const { body } = response;
|
|
661
|
-
const key = keyBuilderFromType(luvio, body);
|
|
662
|
-
luvio.storeIngest(key, ingest$
|
|
661
|
+
const key = keyBuilderFromType$2(luvio, body);
|
|
662
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
663
663
|
const snapshot = luvio.storeLookup({
|
|
664
664
|
recordId: key,
|
|
665
|
-
node: select(),
|
|
665
|
+
node: select$6(),
|
|
666
666
|
variables: {},
|
|
667
667
|
});
|
|
668
668
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -673,7 +673,7 @@ function ingestSuccess(luvio, resourceParams, response) {
|
|
|
673
673
|
deepFreeze(snapshot.data);
|
|
674
674
|
return snapshot;
|
|
675
675
|
}
|
|
676
|
-
function createResourceRequest(config) {
|
|
676
|
+
function createResourceRequest$3(config) {
|
|
677
677
|
const headers = {};
|
|
678
678
|
return {
|
|
679
679
|
baseUri: '/services/data/v63.0',
|
|
@@ -687,7 +687,7 @@ function createResourceRequest(config) {
|
|
|
687
687
|
};
|
|
688
688
|
}
|
|
689
689
|
|
|
690
|
-
const adapterName = 'createProvider';
|
|
690
|
+
const adapterName$3 = 'createProvider';
|
|
691
691
|
const createProvider_ConfigPropertyMetadata = [
|
|
692
692
|
generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
|
|
693
693
|
generateParamConfigMetadata('description', true, 2 /* Body */, 0 /* String */),
|
|
@@ -697,37 +697,37 @@ const createProvider_ConfigPropertyMetadata = [
|
|
|
697
697
|
generateParamConfigMetadata('name', false, 2 /* Body */, 0 /* String */),
|
|
698
698
|
generateParamConfigMetadata('logoUrl', false, 2 /* Body */, 0 /* String */),
|
|
699
699
|
];
|
|
700
|
-
const createProvider_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, createProvider_ConfigPropertyMetadata);
|
|
701
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
702
|
-
function typeCheckConfig(untrustedConfig) {
|
|
700
|
+
const createProvider_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, createProvider_ConfigPropertyMetadata);
|
|
701
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$5(createProvider_ConfigPropertyMetadata);
|
|
702
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
703
703
|
const config = {};
|
|
704
|
-
typeCheckConfig$
|
|
704
|
+
typeCheckConfig$5(untrustedConfig, config, createProvider_ConfigPropertyMetadata);
|
|
705
705
|
return config;
|
|
706
706
|
}
|
|
707
|
-
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
707
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
708
708
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
709
709
|
return null;
|
|
710
710
|
}
|
|
711
711
|
if (process.env.NODE_ENV !== 'production') {
|
|
712
712
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
713
713
|
}
|
|
714
|
-
const config = typeCheckConfig(untrustedConfig);
|
|
714
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
715
715
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
716
716
|
return null;
|
|
717
717
|
}
|
|
718
718
|
return config;
|
|
719
719
|
}
|
|
720
|
-
function buildNetworkSnapshot(luvio, config, options) {
|
|
721
|
-
const resourceParams = createResourceParams(config);
|
|
722
|
-
const request = createResourceRequest(resourceParams);
|
|
720
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
721
|
+
const resourceParams = createResourceParams$3(config);
|
|
722
|
+
const request = createResourceRequest$3(resourceParams);
|
|
723
723
|
return luvio.dispatchResourceRequest(request, options)
|
|
724
724
|
.then((response) => {
|
|
725
725
|
return luvio.handleSuccessResponse(() => {
|
|
726
|
-
const snapshot = ingestSuccess(luvio, resourceParams, response);
|
|
726
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response);
|
|
727
727
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
728
728
|
}, () => {
|
|
729
729
|
const cache = new StoreKeyMap();
|
|
730
|
-
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
730
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
731
731
|
return cache;
|
|
732
732
|
});
|
|
733
733
|
}, (response) => {
|
|
@@ -737,13 +737,1312 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
737
737
|
}
|
|
738
738
|
const createProviderAdapterFactory = (luvio) => {
|
|
739
739
|
return function createProvider(untrustedConfig) {
|
|
740
|
-
const config = validateAdapterConfig(untrustedConfig, createProvider_ConfigPropertyNames);
|
|
740
|
+
const config = validateAdapterConfig$3(untrustedConfig, createProvider_ConfigPropertyNames);
|
|
741
741
|
// Invalid or incomplete config
|
|
742
742
|
if (config === null) {
|
|
743
743
|
throw new Error('Invalid config for "createProvider"');
|
|
744
744
|
}
|
|
745
|
+
return buildNetworkSnapshot$3(luvio, config);
|
|
746
|
+
};
|
|
747
|
+
};
|
|
748
|
+
|
|
749
|
+
function validate$8(obj, path = 'UseCaseTemplateMappingPathAttributeRepresentation') {
|
|
750
|
+
const v_error = (() => {
|
|
751
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
752
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
753
|
+
}
|
|
754
|
+
const obj_sourceAttribute = obj.sourceAttribute;
|
|
755
|
+
const path_sourceAttribute = path + '.sourceAttribute';
|
|
756
|
+
if (obj_sourceAttribute === undefined) {
|
|
757
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_sourceAttribute + '" (at "' + path_sourceAttribute + '")');
|
|
758
|
+
}
|
|
759
|
+
const obj_targetAttribute = obj.targetAttribute;
|
|
760
|
+
const path_targetAttribute = path + '.targetAttribute';
|
|
761
|
+
if (obj_targetAttribute === undefined) {
|
|
762
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_targetAttribute + '" (at "' + path_targetAttribute + '")');
|
|
763
|
+
}
|
|
764
|
+
})();
|
|
765
|
+
return v_error === undefined ? null : v_error;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
function validate$7(obj, path = 'UseCaseTemplateMappingSubjectAttributeRepresentation') {
|
|
769
|
+
const v_error = (() => {
|
|
770
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
771
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
772
|
+
}
|
|
773
|
+
const obj_fieldLabel = obj.fieldLabel;
|
|
774
|
+
const path_fieldLabel = path + '.fieldLabel';
|
|
775
|
+
if (typeof obj_fieldLabel !== 'string') {
|
|
776
|
+
return new TypeError('Expected "string" but received "' + typeof obj_fieldLabel + '" (at "' + path_fieldLabel + '")');
|
|
777
|
+
}
|
|
778
|
+
const obj_fieldName = obj.fieldName;
|
|
779
|
+
const path_fieldName = path + '.fieldName';
|
|
780
|
+
if (typeof obj_fieldName !== 'string') {
|
|
781
|
+
return new TypeError('Expected "string" but received "' + typeof obj_fieldName + '" (at "' + path_fieldName + '")');
|
|
782
|
+
}
|
|
783
|
+
const obj_objectLabel = obj.objectLabel;
|
|
784
|
+
const path_objectLabel = path + '.objectLabel';
|
|
785
|
+
if (typeof obj_objectLabel !== 'string') {
|
|
786
|
+
return new TypeError('Expected "string" but received "' + typeof obj_objectLabel + '" (at "' + path_objectLabel + '")');
|
|
787
|
+
}
|
|
788
|
+
const obj_objectName = obj.objectName;
|
|
789
|
+
const path_objectName = path + '.objectName';
|
|
790
|
+
if (typeof obj_objectName !== 'string') {
|
|
791
|
+
return new TypeError('Expected "string" but received "' + typeof obj_objectName + '" (at "' + path_objectName + '")');
|
|
792
|
+
}
|
|
793
|
+
})();
|
|
794
|
+
return v_error === undefined ? null : v_error;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
function validate$6(obj, path = 'UseCaseTemplateMappingAttributeRepresentation') {
|
|
798
|
+
const v_error = (() => {
|
|
799
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
800
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
801
|
+
}
|
|
802
|
+
const obj_alias = obj.alias;
|
|
803
|
+
const path_alias = path + '.alias';
|
|
804
|
+
if (typeof obj_alias !== 'string') {
|
|
805
|
+
return new TypeError('Expected "string" but received "' + typeof obj_alias + '" (at "' + path_alias + '")');
|
|
806
|
+
}
|
|
807
|
+
if (obj.attributeId !== undefined) {
|
|
808
|
+
const obj_attributeId = obj.attributeId;
|
|
809
|
+
const path_attributeId = path + '.attributeId';
|
|
810
|
+
if (typeof obj_attributeId !== 'string') {
|
|
811
|
+
return new TypeError('Expected "string" but received "' + typeof obj_attributeId + '" (at "' + path_attributeId + '")');
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
if (obj.createdBy !== undefined) {
|
|
815
|
+
const obj_createdBy = obj.createdBy;
|
|
816
|
+
const path_createdBy = path + '.createdBy';
|
|
817
|
+
const referencepath_createdByValidationError = validate$b(obj_createdBy, path_createdBy);
|
|
818
|
+
if (referencepath_createdByValidationError !== null) {
|
|
819
|
+
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_createdBy + '")\n';
|
|
820
|
+
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
821
|
+
return new TypeError(message);
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
if (obj.createdDate !== undefined) {
|
|
825
|
+
const obj_createdDate = obj.createdDate;
|
|
826
|
+
const path_createdDate = path + '.createdDate';
|
|
827
|
+
if (typeof obj_createdDate !== 'string') {
|
|
828
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
if (obj.dataMapping !== undefined) {
|
|
832
|
+
const obj_dataMapping = obj.dataMapping;
|
|
833
|
+
const path_dataMapping = path + '.dataMapping';
|
|
834
|
+
const referencepath_dataMappingValidationError = validate$5(obj_dataMapping, path_dataMapping);
|
|
835
|
+
if (referencepath_dataMappingValidationError !== null) {
|
|
836
|
+
let message = 'Object doesn\'t match UseCaseTemplateMappingRepresentation (at "' + path_dataMapping + '")\n';
|
|
837
|
+
message += referencepath_dataMappingValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
838
|
+
return new TypeError(message);
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
if (obj.id !== undefined) {
|
|
842
|
+
const obj_id = obj.id;
|
|
843
|
+
const path_id = path + '.id';
|
|
844
|
+
if (typeof obj_id !== 'string') {
|
|
845
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
if (obj.label !== undefined) {
|
|
849
|
+
const obj_label = obj.label;
|
|
850
|
+
const path_label = path + '.label';
|
|
851
|
+
if (typeof obj_label !== 'string') {
|
|
852
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
if (obj.lastModifiedBy !== undefined) {
|
|
856
|
+
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
857
|
+
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
858
|
+
const referencepath_lastModifiedByValidationError = validate$b(obj_lastModifiedBy, path_lastModifiedBy);
|
|
859
|
+
if (referencepath_lastModifiedByValidationError !== null) {
|
|
860
|
+
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_lastModifiedBy + '")\n';
|
|
861
|
+
message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
862
|
+
return new TypeError(message);
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
if (obj.lastModifiedDate !== undefined) {
|
|
866
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
867
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
868
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
869
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
if (obj.name !== undefined) {
|
|
873
|
+
const obj_name = obj.name;
|
|
874
|
+
const path_name = path + '.name';
|
|
875
|
+
if (typeof obj_name !== 'string') {
|
|
876
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
if (obj.namespace !== undefined) {
|
|
880
|
+
const obj_namespace = obj.namespace;
|
|
881
|
+
const path_namespace = path + '.namespace';
|
|
882
|
+
if (typeof obj_namespace !== 'string') {
|
|
883
|
+
return new TypeError('Expected "string" but received "' + typeof obj_namespace + '" (at "' + path_namespace + '")');
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
const obj_path = obj.path;
|
|
887
|
+
const path_path = path + '.path';
|
|
888
|
+
if (!ArrayIsArray(obj_path)) {
|
|
889
|
+
return new TypeError('Expected "array" but received "' + typeof obj_path + '" (at "' + path_path + '")');
|
|
890
|
+
}
|
|
891
|
+
for (let i = 0; i < obj_path.length; i++) {
|
|
892
|
+
const obj_path_item = obj_path[i];
|
|
893
|
+
const path_path_item = path_path + '[' + i + ']';
|
|
894
|
+
const referencepath_path_itemValidationError = validate$8(obj_path_item, path_path_item);
|
|
895
|
+
if (referencepath_path_itemValidationError !== null) {
|
|
896
|
+
let message = 'Object doesn\'t match UseCaseTemplateMappingPathAttributeRepresentation (at "' + path_path_item + '")\n';
|
|
897
|
+
message += referencepath_path_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
898
|
+
return new TypeError(message);
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
const obj_subjectAttribute = obj.subjectAttribute;
|
|
902
|
+
const path_subjectAttribute = path + '.subjectAttribute';
|
|
903
|
+
const referencepath_subjectAttributeValidationError = validate$7(obj_subjectAttribute, path_subjectAttribute);
|
|
904
|
+
if (referencepath_subjectAttributeValidationError !== null) {
|
|
905
|
+
let message = 'Object doesn\'t match UseCaseTemplateMappingSubjectAttributeRepresentation (at "' + path_subjectAttribute + '")\n';
|
|
906
|
+
message += referencepath_subjectAttributeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
907
|
+
return new TypeError(message);
|
|
908
|
+
}
|
|
909
|
+
if (obj.url !== undefined) {
|
|
910
|
+
const obj_url = obj.url;
|
|
911
|
+
const path_url = path + '.url';
|
|
912
|
+
if (typeof obj_url !== 'string') {
|
|
913
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
})();
|
|
917
|
+
return v_error === undefined ? null : v_error;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
function validate$5(obj, path = 'UseCaseTemplateMappingRepresentation') {
|
|
921
|
+
const v_error = (() => {
|
|
922
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
923
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
924
|
+
}
|
|
925
|
+
const obj_attributes = obj.attributes;
|
|
926
|
+
const path_attributes = path + '.attributes';
|
|
927
|
+
if (!ArrayIsArray(obj_attributes)) {
|
|
928
|
+
return new TypeError('Expected "array" but received "' + typeof obj_attributes + '" (at "' + path_attributes + '")');
|
|
929
|
+
}
|
|
930
|
+
for (let i = 0; i < obj_attributes.length; i++) {
|
|
931
|
+
const obj_attributes_item = obj_attributes[i];
|
|
932
|
+
const path_attributes_item = path_attributes + '[' + i + ']';
|
|
933
|
+
const referencepath_attributes_itemValidationError = validate$6(obj_attributes_item, path_attributes_item);
|
|
934
|
+
if (referencepath_attributes_itemValidationError !== null) {
|
|
935
|
+
let message = 'Object doesn\'t match UseCaseTemplateMappingAttributeRepresentation (at "' + path_attributes_item + '")\n';
|
|
936
|
+
message += referencepath_attributes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
937
|
+
return new TypeError(message);
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
const obj_collaborationEntity = obj.collaborationEntity;
|
|
941
|
+
const path_collaborationEntity = path + '.collaborationEntity';
|
|
942
|
+
if (typeof obj_collaborationEntity !== 'string') {
|
|
943
|
+
return new TypeError('Expected "string" but received "' + typeof obj_collaborationEntity + '" (at "' + path_collaborationEntity + '")');
|
|
944
|
+
}
|
|
945
|
+
if (obj.createdBy !== undefined) {
|
|
946
|
+
const obj_createdBy = obj.createdBy;
|
|
947
|
+
const path_createdBy = path + '.createdBy';
|
|
948
|
+
const referencepath_createdByValidationError = validate$b(obj_createdBy, path_createdBy);
|
|
949
|
+
if (referencepath_createdByValidationError !== null) {
|
|
950
|
+
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_createdBy + '")\n';
|
|
951
|
+
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
952
|
+
return new TypeError(message);
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
if (obj.createdDate !== undefined) {
|
|
956
|
+
const obj_createdDate = obj.createdDate;
|
|
957
|
+
const path_createdDate = path + '.createdDate';
|
|
958
|
+
if (typeof obj_createdDate !== 'string') {
|
|
959
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
if (obj.id !== undefined) {
|
|
963
|
+
const obj_id = obj.id;
|
|
964
|
+
const path_id = path + '.id';
|
|
965
|
+
if (typeof obj_id !== 'string') {
|
|
966
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
if (obj.label !== undefined) {
|
|
970
|
+
const obj_label = obj.label;
|
|
971
|
+
const path_label = path + '.label';
|
|
972
|
+
if (typeof obj_label !== 'string') {
|
|
973
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
if (obj.lastModifiedBy !== undefined) {
|
|
977
|
+
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
978
|
+
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
979
|
+
const referencepath_lastModifiedByValidationError = validate$b(obj_lastModifiedBy, path_lastModifiedBy);
|
|
980
|
+
if (referencepath_lastModifiedByValidationError !== null) {
|
|
981
|
+
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_lastModifiedBy + '")\n';
|
|
982
|
+
message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
983
|
+
return new TypeError(message);
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
if (obj.lastModifiedDate !== undefined) {
|
|
987
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
988
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
989
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
990
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
if (obj.name !== undefined) {
|
|
994
|
+
const obj_name = obj.name;
|
|
995
|
+
const path_name = path + '.name';
|
|
996
|
+
if (typeof obj_name !== 'string') {
|
|
997
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
if (obj.namespace !== undefined) {
|
|
1001
|
+
const obj_namespace = obj.namespace;
|
|
1002
|
+
const path_namespace = path + '.namespace';
|
|
1003
|
+
if (typeof obj_namespace !== 'string') {
|
|
1004
|
+
return new TypeError('Expected "string" but received "' + typeof obj_namespace + '" (at "' + path_namespace + '")');
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
if (obj.url !== undefined) {
|
|
1008
|
+
const obj_url = obj.url;
|
|
1009
|
+
const path_url = path + '.url';
|
|
1010
|
+
if (typeof obj_url !== 'string') {
|
|
1011
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
})();
|
|
1015
|
+
return v_error === undefined ? null : v_error;
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
const VERSION$2 = "422829d0bdee7c37a92811d97b2c7c2b";
|
|
1019
|
+
function validate$4(obj, path = 'DataCleanRoomDataSpecificationRepresentation') {
|
|
1020
|
+
const v_error = (() => {
|
|
1021
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1022
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1023
|
+
}
|
|
1024
|
+
if (obj.createdBy !== undefined) {
|
|
1025
|
+
const obj_createdBy = obj.createdBy;
|
|
1026
|
+
const path_createdBy = path + '.createdBy';
|
|
1027
|
+
const referencepath_createdByValidationError = validate$b(obj_createdBy, path_createdBy);
|
|
1028
|
+
if (referencepath_createdByValidationError !== null) {
|
|
1029
|
+
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_createdBy + '")\n';
|
|
1030
|
+
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1031
|
+
return new TypeError(message);
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
if (obj.createdDate !== undefined) {
|
|
1035
|
+
const obj_createdDate = obj.createdDate;
|
|
1036
|
+
const path_createdDate = path + '.createdDate';
|
|
1037
|
+
if (typeof obj_createdDate !== 'string') {
|
|
1038
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
const obj_dataMapping = obj.dataMapping;
|
|
1042
|
+
const path_dataMapping = path + '.dataMapping';
|
|
1043
|
+
const referencepath_dataMappingValidationError = validate$5(obj_dataMapping, path_dataMapping);
|
|
1044
|
+
if (referencepath_dataMappingValidationError !== null) {
|
|
1045
|
+
let message = 'Object doesn\'t match UseCaseTemplateMappingRepresentation (at "' + path_dataMapping + '")\n';
|
|
1046
|
+
message += referencepath_dataMappingValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1047
|
+
return new TypeError(message);
|
|
1048
|
+
}
|
|
1049
|
+
const obj_dataSpaceName = obj.dataSpaceName;
|
|
1050
|
+
const path_dataSpaceName = path + '.dataSpaceName';
|
|
1051
|
+
if (typeof obj_dataSpaceName !== 'string') {
|
|
1052
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dataSpaceName + '" (at "' + path_dataSpaceName + '")');
|
|
1053
|
+
}
|
|
1054
|
+
const obj_description = obj.description;
|
|
1055
|
+
const path_description = path + '.description';
|
|
1056
|
+
if (typeof obj_description !== 'string') {
|
|
1057
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
1058
|
+
}
|
|
1059
|
+
const obj_id = obj.id;
|
|
1060
|
+
const path_id = path + '.id';
|
|
1061
|
+
if (typeof obj_id !== 'string') {
|
|
1062
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1063
|
+
}
|
|
1064
|
+
if (obj.label !== undefined) {
|
|
1065
|
+
const obj_label = obj.label;
|
|
1066
|
+
const path_label = path + '.label';
|
|
1067
|
+
if (typeof obj_label !== 'string') {
|
|
1068
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
if (obj.lastModifiedBy !== undefined) {
|
|
1072
|
+
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
1073
|
+
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
1074
|
+
const referencepath_lastModifiedByValidationError = validate$b(obj_lastModifiedBy, path_lastModifiedBy);
|
|
1075
|
+
if (referencepath_lastModifiedByValidationError !== null) {
|
|
1076
|
+
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_lastModifiedBy + '")\n';
|
|
1077
|
+
message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1078
|
+
return new TypeError(message);
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
if (obj.lastModifiedDate !== undefined) {
|
|
1082
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
1083
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
1084
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
1085
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
const obj_memberType = obj.memberType;
|
|
1089
|
+
const path_memberType = path + '.memberType';
|
|
1090
|
+
if (typeof obj_memberType !== 'string') {
|
|
1091
|
+
return new TypeError('Expected "string" but received "' + typeof obj_memberType + '" (at "' + path_memberType + '")');
|
|
1092
|
+
}
|
|
1093
|
+
if (obj.name !== undefined) {
|
|
1094
|
+
const obj_name = obj.name;
|
|
1095
|
+
const path_name = path + '.name';
|
|
1096
|
+
if (typeof obj_name !== 'string') {
|
|
1097
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
if (obj.namespace !== undefined) {
|
|
1101
|
+
const obj_namespace = obj.namespace;
|
|
1102
|
+
const path_namespace = path + '.namespace';
|
|
1103
|
+
if (typeof obj_namespace !== 'string') {
|
|
1104
|
+
return new TypeError('Expected "string" but received "' + typeof obj_namespace + '" (at "' + path_namespace + '")');
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
if (obj.ownerOrgId !== undefined) {
|
|
1108
|
+
const obj_ownerOrgId = obj.ownerOrgId;
|
|
1109
|
+
const path_ownerOrgId = path + '.ownerOrgId';
|
|
1110
|
+
if (typeof obj_ownerOrgId !== 'string') {
|
|
1111
|
+
return new TypeError('Expected "string" but received "' + typeof obj_ownerOrgId + '" (at "' + path_ownerOrgId + '")');
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
const obj_status = obj.status;
|
|
1115
|
+
const path_status = path + '.status';
|
|
1116
|
+
if (typeof obj_status !== 'string') {
|
|
1117
|
+
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
1118
|
+
}
|
|
1119
|
+
const obj_templateName = obj.templateName;
|
|
1120
|
+
const path_templateName = path + '.templateName';
|
|
1121
|
+
if (typeof obj_templateName !== 'string') {
|
|
1122
|
+
return new TypeError('Expected "string" but received "' + typeof obj_templateName + '" (at "' + path_templateName + '")');
|
|
1123
|
+
}
|
|
1124
|
+
if (obj.url !== undefined) {
|
|
1125
|
+
const obj_url = obj.url;
|
|
1126
|
+
const path_url = path + '.url';
|
|
1127
|
+
if (typeof obj_url !== 'string') {
|
|
1128
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
})();
|
|
1132
|
+
return v_error === undefined ? null : v_error;
|
|
1133
|
+
}
|
|
1134
|
+
const RepresentationType$2 = 'DataCleanRoomDataSpecificationRepresentation';
|
|
1135
|
+
function keyBuilder$3(luvio, config) {
|
|
1136
|
+
return keyPrefix + '::' + RepresentationType$2 + ':' + config.id;
|
|
1137
|
+
}
|
|
1138
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
1139
|
+
const keyParams = {
|
|
1140
|
+
id: object.id
|
|
1141
|
+
};
|
|
1142
|
+
return keyBuilder$3(luvio, keyParams);
|
|
1143
|
+
}
|
|
1144
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
1145
|
+
return input;
|
|
1146
|
+
}
|
|
1147
|
+
const select$5 = function DataCleanRoomDataSpecificationRepresentationSelect() {
|
|
1148
|
+
return {
|
|
1149
|
+
kind: 'Fragment',
|
|
1150
|
+
version: VERSION$2,
|
|
1151
|
+
private: [],
|
|
1152
|
+
opaque: true
|
|
1153
|
+
};
|
|
1154
|
+
};
|
|
1155
|
+
function equals$2(existing, incoming) {
|
|
1156
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1157
|
+
return false;
|
|
1158
|
+
}
|
|
1159
|
+
return true;
|
|
1160
|
+
}
|
|
1161
|
+
const ingest$2 = function DataCleanRoomDataSpecificationRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1162
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1163
|
+
const validateError = validate$4(input);
|
|
1164
|
+
if (validateError !== null) {
|
|
1165
|
+
throw validateError;
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
1169
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1170
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "data-clean-room", VERSION$2, RepresentationType$2, equals$2);
|
|
1171
|
+
return createLink(key);
|
|
1172
|
+
};
|
|
1173
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
1174
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1175
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
1176
|
+
rootKeySet.set(rootKey, {
|
|
1177
|
+
namespace: keyPrefix,
|
|
1178
|
+
representationName: RepresentationType$2,
|
|
1179
|
+
mergeable: false
|
|
1180
|
+
});
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
const VERSION$1 = "6fb37e337652e88218f2171d1e56647b";
|
|
1184
|
+
function validate$3(obj, path = 'DataCleanRoomSpecificationCollectionRepresentation') {
|
|
1185
|
+
const v_error = (() => {
|
|
1186
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1187
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1188
|
+
}
|
|
1189
|
+
const obj_cleanroomSpecifications = obj.cleanroomSpecifications;
|
|
1190
|
+
const path_cleanroomSpecifications = path + '.cleanroomSpecifications';
|
|
1191
|
+
if (!ArrayIsArray(obj_cleanroomSpecifications)) {
|
|
1192
|
+
return new TypeError('Expected "array" but received "' + typeof obj_cleanroomSpecifications + '" (at "' + path_cleanroomSpecifications + '")');
|
|
1193
|
+
}
|
|
1194
|
+
for (let i = 0; i < obj_cleanroomSpecifications.length; i++) {
|
|
1195
|
+
const obj_cleanroomSpecifications_item = obj_cleanroomSpecifications[i];
|
|
1196
|
+
const path_cleanroomSpecifications_item = path_cleanroomSpecifications + '[' + i + ']';
|
|
1197
|
+
if (typeof obj_cleanroomSpecifications_item !== 'object') {
|
|
1198
|
+
return new TypeError('Expected "object" but received "' + typeof obj_cleanroomSpecifications_item + '" (at "' + path_cleanroomSpecifications_item + '")');
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
if (obj.currentPageUrl !== undefined) {
|
|
1202
|
+
const obj_currentPageUrl = obj.currentPageUrl;
|
|
1203
|
+
const path_currentPageUrl = path + '.currentPageUrl';
|
|
1204
|
+
if (typeof obj_currentPageUrl !== 'string') {
|
|
1205
|
+
return new TypeError('Expected "string" but received "' + typeof obj_currentPageUrl + '" (at "' + path_currentPageUrl + '")');
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
const obj_limit = obj.limit;
|
|
1209
|
+
const path_limit = path + '.limit';
|
|
1210
|
+
if (typeof obj_limit !== 'number' || (typeof obj_limit === 'number' && Math.floor(obj_limit) !== obj_limit)) {
|
|
1211
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_limit + '" (at "' + path_limit + '")');
|
|
1212
|
+
}
|
|
1213
|
+
if (obj.nextPageUrl !== undefined) {
|
|
1214
|
+
const obj_nextPageUrl = obj.nextPageUrl;
|
|
1215
|
+
const path_nextPageUrl = path + '.nextPageUrl';
|
|
1216
|
+
let obj_nextPageUrl_union0 = null;
|
|
1217
|
+
const obj_nextPageUrl_union0_error = (() => {
|
|
1218
|
+
if (typeof obj_nextPageUrl !== 'string') {
|
|
1219
|
+
return new TypeError('Expected "string" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
|
|
1220
|
+
}
|
|
1221
|
+
})();
|
|
1222
|
+
if (obj_nextPageUrl_union0_error != null) {
|
|
1223
|
+
obj_nextPageUrl_union0 = obj_nextPageUrl_union0_error.message;
|
|
1224
|
+
}
|
|
1225
|
+
let obj_nextPageUrl_union1 = null;
|
|
1226
|
+
const obj_nextPageUrl_union1_error = (() => {
|
|
1227
|
+
if (obj_nextPageUrl !== null) {
|
|
1228
|
+
return new TypeError('Expected "null" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
|
|
1229
|
+
}
|
|
1230
|
+
})();
|
|
1231
|
+
if (obj_nextPageUrl_union1_error != null) {
|
|
1232
|
+
obj_nextPageUrl_union1 = obj_nextPageUrl_union1_error.message;
|
|
1233
|
+
}
|
|
1234
|
+
if (obj_nextPageUrl_union0 && obj_nextPageUrl_union1) {
|
|
1235
|
+
let message = 'Object doesn\'t match union (at "' + path_nextPageUrl + '")';
|
|
1236
|
+
message += '\n' + obj_nextPageUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1237
|
+
message += '\n' + obj_nextPageUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1238
|
+
return new TypeError(message);
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
const obj_offset = obj.offset;
|
|
1242
|
+
const path_offset = path + '.offset';
|
|
1243
|
+
if (typeof obj_offset !== 'number' || (typeof obj_offset === 'number' && Math.floor(obj_offset) !== obj_offset)) {
|
|
1244
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_offset + '" (at "' + path_offset + '")');
|
|
1245
|
+
}
|
|
1246
|
+
if (obj.totalSize !== undefined) {
|
|
1247
|
+
const obj_totalSize = obj.totalSize;
|
|
1248
|
+
const path_totalSize = path + '.totalSize';
|
|
1249
|
+
if (typeof obj_totalSize !== 'number' || (typeof obj_totalSize === 'number' && Math.floor(obj_totalSize) !== obj_totalSize)) {
|
|
1250
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_totalSize + '" (at "' + path_totalSize + '")');
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
})();
|
|
1254
|
+
return v_error === undefined ? null : v_error;
|
|
1255
|
+
}
|
|
1256
|
+
const RepresentationType$1 = 'DataCleanRoomSpecificationCollectionRepresentation';
|
|
1257
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
1258
|
+
const input_cleanroomSpecifications = input.cleanroomSpecifications;
|
|
1259
|
+
const input_cleanroomSpecifications_id = path.fullPath + '__cleanroomSpecifications';
|
|
1260
|
+
for (let i = 0; i < input_cleanroomSpecifications.length; i++) {
|
|
1261
|
+
const input_cleanroomSpecifications_item = input_cleanroomSpecifications[i];
|
|
1262
|
+
let input_cleanroomSpecifications_item_id = input_cleanroomSpecifications_id + '__' + i;
|
|
1263
|
+
input_cleanroomSpecifications[i] = ingest$2(input_cleanroomSpecifications_item, {
|
|
1264
|
+
fullPath: input_cleanroomSpecifications_item_id,
|
|
1265
|
+
propertyName: i,
|
|
1266
|
+
parent: {
|
|
1267
|
+
data: input,
|
|
1268
|
+
key: path.fullPath,
|
|
1269
|
+
existing: existing,
|
|
1270
|
+
},
|
|
1271
|
+
ttl: path.ttl
|
|
1272
|
+
}, luvio, store, timestamp);
|
|
1273
|
+
}
|
|
1274
|
+
return input;
|
|
1275
|
+
}
|
|
1276
|
+
const select$4 = function DataCleanRoomSpecificationCollectionRepresentationSelect() {
|
|
1277
|
+
return {
|
|
1278
|
+
kind: 'Fragment',
|
|
1279
|
+
version: VERSION$1,
|
|
1280
|
+
private: [],
|
|
1281
|
+
selections: [
|
|
1282
|
+
{
|
|
1283
|
+
name: 'cleanroomSpecifications',
|
|
1284
|
+
kind: 'Link',
|
|
1285
|
+
plural: true,
|
|
1286
|
+
fragment: select$5()
|
|
1287
|
+
},
|
|
1288
|
+
{
|
|
1289
|
+
name: 'currentPageUrl',
|
|
1290
|
+
kind: 'Scalar',
|
|
1291
|
+
required: false
|
|
1292
|
+
},
|
|
1293
|
+
{
|
|
1294
|
+
name: 'limit',
|
|
1295
|
+
kind: 'Scalar'
|
|
1296
|
+
},
|
|
1297
|
+
{
|
|
1298
|
+
name: 'nextPageUrl',
|
|
1299
|
+
kind: 'Scalar',
|
|
1300
|
+
required: false
|
|
1301
|
+
},
|
|
1302
|
+
{
|
|
1303
|
+
name: 'offset',
|
|
1304
|
+
kind: 'Scalar'
|
|
1305
|
+
},
|
|
1306
|
+
{
|
|
1307
|
+
name: 'totalSize',
|
|
1308
|
+
kind: 'Scalar',
|
|
1309
|
+
required: false
|
|
1310
|
+
}
|
|
1311
|
+
]
|
|
1312
|
+
};
|
|
1313
|
+
};
|
|
1314
|
+
function equals$1(existing, incoming) {
|
|
1315
|
+
const existing_limit = existing.limit;
|
|
1316
|
+
const incoming_limit = incoming.limit;
|
|
1317
|
+
if (!(existing_limit === incoming_limit)) {
|
|
1318
|
+
return false;
|
|
1319
|
+
}
|
|
1320
|
+
const existing_offset = existing.offset;
|
|
1321
|
+
const incoming_offset = incoming.offset;
|
|
1322
|
+
if (!(existing_offset === incoming_offset)) {
|
|
1323
|
+
return false;
|
|
1324
|
+
}
|
|
1325
|
+
const existing_totalSize = existing.totalSize;
|
|
1326
|
+
const incoming_totalSize = incoming.totalSize;
|
|
1327
|
+
// if at least one of these optionals is defined
|
|
1328
|
+
if (existing_totalSize !== undefined || incoming_totalSize !== undefined) {
|
|
1329
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1330
|
+
// not equal
|
|
1331
|
+
if (existing_totalSize === undefined || incoming_totalSize === undefined) {
|
|
1332
|
+
return false;
|
|
1333
|
+
}
|
|
1334
|
+
if (!(existing_totalSize === incoming_totalSize)) {
|
|
1335
|
+
return false;
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
const existing_currentPageUrl = existing.currentPageUrl;
|
|
1339
|
+
const incoming_currentPageUrl = incoming.currentPageUrl;
|
|
1340
|
+
// if at least one of these optionals is defined
|
|
1341
|
+
if (existing_currentPageUrl !== undefined || incoming_currentPageUrl !== undefined) {
|
|
1342
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1343
|
+
// not equal
|
|
1344
|
+
if (existing_currentPageUrl === undefined || incoming_currentPageUrl === undefined) {
|
|
1345
|
+
return false;
|
|
1346
|
+
}
|
|
1347
|
+
if (!(existing_currentPageUrl === incoming_currentPageUrl)) {
|
|
1348
|
+
return false;
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
const existing_cleanroomSpecifications = existing.cleanroomSpecifications;
|
|
1352
|
+
const incoming_cleanroomSpecifications = incoming.cleanroomSpecifications;
|
|
1353
|
+
const equals_cleanroomSpecifications_items = equalsArray(existing_cleanroomSpecifications, incoming_cleanroomSpecifications, (existing_cleanroomSpecifications_item, incoming_cleanroomSpecifications_item) => {
|
|
1354
|
+
if (!(existing_cleanroomSpecifications_item.__ref === incoming_cleanroomSpecifications_item.__ref)) {
|
|
1355
|
+
return false;
|
|
1356
|
+
}
|
|
1357
|
+
});
|
|
1358
|
+
if (equals_cleanroomSpecifications_items === false) {
|
|
1359
|
+
return false;
|
|
1360
|
+
}
|
|
1361
|
+
const existing_nextPageUrl = existing.nextPageUrl;
|
|
1362
|
+
const incoming_nextPageUrl = incoming.nextPageUrl;
|
|
1363
|
+
// if at least one of these optionals is defined
|
|
1364
|
+
if (existing_nextPageUrl !== undefined || incoming_nextPageUrl !== undefined) {
|
|
1365
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1366
|
+
// not equal
|
|
1367
|
+
if (existing_nextPageUrl === undefined || incoming_nextPageUrl === undefined) {
|
|
1368
|
+
return false;
|
|
1369
|
+
}
|
|
1370
|
+
if (!(existing_nextPageUrl === incoming_nextPageUrl)) {
|
|
1371
|
+
return false;
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
return true;
|
|
1375
|
+
}
|
|
1376
|
+
const ingest$1 = function DataCleanRoomSpecificationCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1377
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1378
|
+
const validateError = validate$3(input);
|
|
1379
|
+
if (validateError !== null) {
|
|
1380
|
+
throw validateError;
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
const key = path.fullPath;
|
|
1384
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1385
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "data-clean-room", VERSION$1, RepresentationType$1, equals$1);
|
|
1386
|
+
return createLink(key);
|
|
1387
|
+
};
|
|
1388
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
1389
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1390
|
+
const rootKey = fullPathFactory();
|
|
1391
|
+
rootKeySet.set(rootKey, {
|
|
1392
|
+
namespace: keyPrefix,
|
|
1393
|
+
representationName: RepresentationType$1,
|
|
1394
|
+
mergeable: false
|
|
1395
|
+
});
|
|
1396
|
+
const input_cleanroomSpecifications_length = input.cleanroomSpecifications.length;
|
|
1397
|
+
for (let i = 0; i < input_cleanroomSpecifications_length; i++) {
|
|
1398
|
+
getTypeCacheKeys$2(rootKeySet, luvio, input.cleanroomSpecifications[i]);
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
function select$3(luvio, params) {
|
|
1403
|
+
return select$4();
|
|
1404
|
+
}
|
|
1405
|
+
function keyBuilder$2(luvio, params) {
|
|
1406
|
+
return keyPrefix + '::DataCleanRoomSpecificationCollectionRepresentation:(' + 'filters:' + params.queryParams.filters + ',' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'orderBy:' + params.queryParams.orderBy + ')';
|
|
1407
|
+
}
|
|
1408
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
1409
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$2(luvio, resourceParams));
|
|
1410
|
+
}
|
|
1411
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
1412
|
+
const { body } = response;
|
|
1413
|
+
const key = keyBuilder$2(luvio, resourceParams);
|
|
1414
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
1415
|
+
const snapshot = luvio.storeLookup({
|
|
1416
|
+
recordId: key,
|
|
1417
|
+
node: select$3(),
|
|
1418
|
+
variables: {},
|
|
1419
|
+
}, snapshotRefresh);
|
|
1420
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1421
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1422
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
deepFreeze(snapshot.data);
|
|
1426
|
+
return snapshot;
|
|
1427
|
+
}
|
|
1428
|
+
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
1429
|
+
const key = keyBuilder$2(luvio, params);
|
|
1430
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1431
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
1432
|
+
return errorSnapshot;
|
|
1433
|
+
}
|
|
1434
|
+
function createResourceRequest$2(config) {
|
|
1435
|
+
const headers = {};
|
|
1436
|
+
return {
|
|
1437
|
+
baseUri: '/services/data/v63.0',
|
|
1438
|
+
basePath: '/ssot/data-clean-room/specifications',
|
|
1439
|
+
method: 'get',
|
|
1440
|
+
body: null,
|
|
1441
|
+
urlParams: {},
|
|
1442
|
+
queryParams: config.queryParams,
|
|
1443
|
+
headers,
|
|
1444
|
+
priority: 'normal',
|
|
1445
|
+
};
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
const adapterName$2 = 'getDataCleanRoomSpecificationsPaginated';
|
|
1449
|
+
const getDataCleanRoomSpecificationsPaginated_ConfigPropertyMetadata = [
|
|
1450
|
+
generateParamConfigMetadata('filters', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1451
|
+
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1452
|
+
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1453
|
+
generateParamConfigMetadata('orderBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1454
|
+
];
|
|
1455
|
+
const getDataCleanRoomSpecificationsPaginated_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getDataCleanRoomSpecificationsPaginated_ConfigPropertyMetadata);
|
|
1456
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$5(getDataCleanRoomSpecificationsPaginated_ConfigPropertyMetadata);
|
|
1457
|
+
function keyBuilder$1(luvio, config) {
|
|
1458
|
+
const resourceParams = createResourceParams$2(config);
|
|
1459
|
+
return keyBuilder$2(luvio, resourceParams);
|
|
1460
|
+
}
|
|
1461
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
1462
|
+
const config = {};
|
|
1463
|
+
typeCheckConfig$5(untrustedConfig, config, getDataCleanRoomSpecificationsPaginated_ConfigPropertyMetadata);
|
|
1464
|
+
return config;
|
|
1465
|
+
}
|
|
1466
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
1467
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1468
|
+
return null;
|
|
1469
|
+
}
|
|
1470
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1471
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1472
|
+
}
|
|
1473
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
1474
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1475
|
+
return null;
|
|
1476
|
+
}
|
|
1477
|
+
return config;
|
|
1478
|
+
}
|
|
1479
|
+
function adapterFragment(luvio, config) {
|
|
1480
|
+
createResourceParams$2(config);
|
|
1481
|
+
return select$3();
|
|
1482
|
+
}
|
|
1483
|
+
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
1484
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
1485
|
+
config,
|
|
1486
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1487
|
+
});
|
|
1488
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1489
|
+
}
|
|
1490
|
+
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
1491
|
+
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
1492
|
+
config,
|
|
1493
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1494
|
+
});
|
|
1495
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1496
|
+
}
|
|
1497
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
1498
|
+
const resourceParams = createResourceParams$2(config);
|
|
1499
|
+
const request = createResourceRequest$2(resourceParams);
|
|
1500
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1501
|
+
.then((response) => {
|
|
1502
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
1503
|
+
const cache = new StoreKeyMap();
|
|
1504
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
1505
|
+
return cache;
|
|
1506
|
+
});
|
|
1507
|
+
}, (response) => {
|
|
1508
|
+
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
1509
|
+
});
|
|
1510
|
+
}
|
|
1511
|
+
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
1512
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
1513
|
+
}
|
|
1514
|
+
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
1515
|
+
const { luvio, config } = context;
|
|
1516
|
+
const selector = {
|
|
1517
|
+
recordId: keyBuilder$1(luvio, config),
|
|
1518
|
+
node: adapterFragment(luvio, config),
|
|
1519
|
+
variables: {},
|
|
1520
|
+
};
|
|
1521
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1522
|
+
config,
|
|
1523
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1524
|
+
});
|
|
1525
|
+
return cacheSnapshot;
|
|
1526
|
+
}
|
|
1527
|
+
const getDataCleanRoomSpecificationsPaginatedAdapterFactory = (luvio) => function dataCleanRoom__getDataCleanRoomSpecificationsPaginated(untrustedConfig, requestContext) {
|
|
1528
|
+
const config = validateAdapterConfig$2(untrustedConfig, getDataCleanRoomSpecificationsPaginated_ConfigPropertyNames);
|
|
1529
|
+
// Invalid or incomplete config
|
|
1530
|
+
if (config === null) {
|
|
1531
|
+
return null;
|
|
1532
|
+
}
|
|
1533
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1534
|
+
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
1535
|
+
};
|
|
1536
|
+
|
|
1537
|
+
function select$2(luvio, params) {
|
|
1538
|
+
return select$5();
|
|
1539
|
+
}
|
|
1540
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
1541
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
1542
|
+
}
|
|
1543
|
+
function ingestSuccess$1(luvio, resourceParams, response) {
|
|
1544
|
+
const { body } = response;
|
|
1545
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
1546
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
1547
|
+
const snapshot = luvio.storeLookup({
|
|
1548
|
+
recordId: key,
|
|
1549
|
+
node: select$2(),
|
|
1550
|
+
variables: {},
|
|
1551
|
+
});
|
|
1552
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1553
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1554
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
deepFreeze(snapshot.data);
|
|
1558
|
+
return snapshot;
|
|
1559
|
+
}
|
|
1560
|
+
function createResourceRequest$1(config) {
|
|
1561
|
+
const headers = {};
|
|
1562
|
+
return {
|
|
1563
|
+
baseUri: '/services/data/v63.0',
|
|
1564
|
+
basePath: '/ssot/data-clean-room/specifications',
|
|
1565
|
+
method: 'post',
|
|
1566
|
+
body: config.body,
|
|
1567
|
+
urlParams: {},
|
|
1568
|
+
queryParams: {},
|
|
1569
|
+
headers,
|
|
1570
|
+
priority: 'normal',
|
|
1571
|
+
};
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
const adapterName$1 = 'createDataCleanRoomSpecification';
|
|
1575
|
+
const createDataCleanRoomSpecification_ConfigPropertyMetadata = [
|
|
1576
|
+
generateParamConfigMetadata('dataMapping', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
1577
|
+
generateParamConfigMetadata('memberType', true, 2 /* Body */, 0 /* String */),
|
|
1578
|
+
generateParamConfigMetadata('ownerOrgId', true, 2 /* Body */, 0 /* String */),
|
|
1579
|
+
generateParamConfigMetadata('templateName', true, 2 /* Body */, 0 /* String */),
|
|
1580
|
+
generateParamConfigMetadata('name', false, 2 /* Body */, 0 /* String */),
|
|
1581
|
+
generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
|
|
1582
|
+
generateParamConfigMetadata('description', true, 2 /* Body */, 0 /* String */),
|
|
1583
|
+
generateParamConfigMetadata('dataspaceName', false, 2 /* Body */, 0 /* String */),
|
|
1584
|
+
];
|
|
1585
|
+
const createDataCleanRoomSpecification_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, createDataCleanRoomSpecification_ConfigPropertyMetadata);
|
|
1586
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$5(createDataCleanRoomSpecification_ConfigPropertyMetadata);
|
|
1587
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
1588
|
+
const config = {};
|
|
1589
|
+
typeCheckConfig$5(untrustedConfig, config, createDataCleanRoomSpecification_ConfigPropertyMetadata);
|
|
1590
|
+
const untrustedConfig_dataMapping = untrustedConfig.dataMapping;
|
|
1591
|
+
if (ArrayIsArray$1(untrustedConfig_dataMapping)) {
|
|
1592
|
+
const untrustedConfig_dataMapping_array = [];
|
|
1593
|
+
for (let i = 0, arrayLength = untrustedConfig_dataMapping.length; i < arrayLength; i++) {
|
|
1594
|
+
const untrustedConfig_dataMapping_item = untrustedConfig_dataMapping[i];
|
|
1595
|
+
untrustedConfig_dataMapping_array.push(untrustedConfig_dataMapping_item);
|
|
1596
|
+
}
|
|
1597
|
+
config.dataMapping = untrustedConfig_dataMapping_array;
|
|
1598
|
+
}
|
|
1599
|
+
return config;
|
|
1600
|
+
}
|
|
1601
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
1602
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1603
|
+
return null;
|
|
1604
|
+
}
|
|
1605
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1606
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1607
|
+
}
|
|
1608
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
1609
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1610
|
+
return null;
|
|
1611
|
+
}
|
|
1612
|
+
return config;
|
|
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(() => {
|
|
1620
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response);
|
|
1621
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1622
|
+
}, () => {
|
|
1623
|
+
const cache = new StoreKeyMap();
|
|
1624
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
1625
|
+
return cache;
|
|
1626
|
+
});
|
|
1627
|
+
}, (response) => {
|
|
1628
|
+
deepFreeze(response);
|
|
1629
|
+
throw response;
|
|
1630
|
+
});
|
|
1631
|
+
}
|
|
1632
|
+
const createDataCleanRoomSpecificationAdapterFactory = (luvio) => {
|
|
1633
|
+
return function createDataCleanRoomSpecification(untrustedConfig) {
|
|
1634
|
+
const config = validateAdapterConfig$1(untrustedConfig, createDataCleanRoomSpecification_ConfigPropertyNames);
|
|
1635
|
+
// Invalid or incomplete config
|
|
1636
|
+
if (config === null) {
|
|
1637
|
+
throw new Error('Invalid config for "createDataCleanRoomSpecification"');
|
|
1638
|
+
}
|
|
1639
|
+
return buildNetworkSnapshot$1(luvio, config);
|
|
1640
|
+
};
|
|
1641
|
+
};
|
|
1642
|
+
|
|
1643
|
+
function validate$2(obj, path = 'DataCleanRoomMemberRepresentation') {
|
|
1644
|
+
const v_error = (() => {
|
|
1645
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1646
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1647
|
+
}
|
|
1648
|
+
const obj_invitationId = obj.invitationId;
|
|
1649
|
+
const path_invitationId = path + '.invitationId';
|
|
1650
|
+
if (typeof obj_invitationId !== 'string') {
|
|
1651
|
+
return new TypeError('Expected "string" but received "' + typeof obj_invitationId + '" (at "' + path_invitationId + '")');
|
|
1652
|
+
}
|
|
1653
|
+
const obj_invitationStatus = obj.invitationStatus;
|
|
1654
|
+
const path_invitationStatus = path + '.invitationStatus';
|
|
1655
|
+
if (typeof obj_invitationStatus !== 'string') {
|
|
1656
|
+
return new TypeError('Expected "string" but received "' + typeof obj_invitationStatus + '" (at "' + path_invitationStatus + '")');
|
|
1657
|
+
}
|
|
1658
|
+
const obj_memberId = obj.memberId;
|
|
1659
|
+
const path_memberId = path + '.memberId';
|
|
1660
|
+
if (typeof obj_memberId !== 'string') {
|
|
1661
|
+
return new TypeError('Expected "string" but received "' + typeof obj_memberId + '" (at "' + path_memberId + '")');
|
|
1662
|
+
}
|
|
1663
|
+
const obj_memberOrgId = obj.memberOrgId;
|
|
1664
|
+
const path_memberOrgId = path + '.memberOrgId';
|
|
1665
|
+
if (typeof obj_memberOrgId !== 'string') {
|
|
1666
|
+
return new TypeError('Expected "string" but received "' + typeof obj_memberOrgId + '" (at "' + path_memberOrgId + '")');
|
|
1667
|
+
}
|
|
1668
|
+
const obj_memberStatus = obj.memberStatus;
|
|
1669
|
+
const path_memberStatus = path + '.memberStatus';
|
|
1670
|
+
if (typeof obj_memberStatus !== 'string') {
|
|
1671
|
+
return new TypeError('Expected "string" but received "' + typeof obj_memberStatus + '" (at "' + path_memberStatus + '")');
|
|
1672
|
+
}
|
|
1673
|
+
const obj_memberType = obj.memberType;
|
|
1674
|
+
const path_memberType = path + '.memberType';
|
|
1675
|
+
if (typeof obj_memberType !== 'string') {
|
|
1676
|
+
return new TypeError('Expected "string" but received "' + typeof obj_memberType + '" (at "' + path_memberType + '")');
|
|
1677
|
+
}
|
|
1678
|
+
const obj_providerId = obj.providerId;
|
|
1679
|
+
const path_providerId = path + '.providerId';
|
|
1680
|
+
if (typeof obj_providerId !== 'string') {
|
|
1681
|
+
return new TypeError('Expected "string" but received "' + typeof obj_providerId + '" (at "' + path_providerId + '")');
|
|
1682
|
+
}
|
|
1683
|
+
if (obj.specificationId !== undefined) {
|
|
1684
|
+
const obj_specificationId = obj.specificationId;
|
|
1685
|
+
const path_specificationId = path + '.specificationId';
|
|
1686
|
+
if (typeof obj_specificationId !== 'string') {
|
|
1687
|
+
return new TypeError('Expected "string" but received "' + typeof obj_specificationId + '" (at "' + path_specificationId + '")');
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1690
|
+
})();
|
|
1691
|
+
return v_error === undefined ? null : v_error;
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
function validate$1(obj, path = 'DataCleanRoomTemplateRepresentation') {
|
|
1695
|
+
const v_error = (() => {
|
|
1696
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1697
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1698
|
+
}
|
|
1699
|
+
const obj_configuration = obj.configuration;
|
|
1700
|
+
const path_configuration = path + '.configuration';
|
|
1701
|
+
if (obj_configuration === undefined) {
|
|
1702
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_configuration + '" (at "' + path_configuration + '")');
|
|
1703
|
+
}
|
|
1704
|
+
if (obj.createdBy !== undefined) {
|
|
1705
|
+
const obj_createdBy = obj.createdBy;
|
|
1706
|
+
const path_createdBy = path + '.createdBy';
|
|
1707
|
+
const referencepath_createdByValidationError = validate$b(obj_createdBy, path_createdBy);
|
|
1708
|
+
if (referencepath_createdByValidationError !== null) {
|
|
1709
|
+
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_createdBy + '")\n';
|
|
1710
|
+
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1711
|
+
return new TypeError(message);
|
|
1712
|
+
}
|
|
1713
|
+
}
|
|
1714
|
+
if (obj.createdDate !== undefined) {
|
|
1715
|
+
const obj_createdDate = obj.createdDate;
|
|
1716
|
+
const path_createdDate = path + '.createdDate';
|
|
1717
|
+
if (typeof obj_createdDate !== 'string') {
|
|
1718
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
1719
|
+
}
|
|
1720
|
+
}
|
|
1721
|
+
const obj_description = obj.description;
|
|
1722
|
+
const path_description = path + '.description';
|
|
1723
|
+
if (typeof obj_description !== 'string') {
|
|
1724
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
1725
|
+
}
|
|
1726
|
+
const obj_id = obj.id;
|
|
1727
|
+
const path_id = path + '.id';
|
|
1728
|
+
if (typeof obj_id !== 'string') {
|
|
1729
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1730
|
+
}
|
|
1731
|
+
if (obj.label !== undefined) {
|
|
1732
|
+
const obj_label = obj.label;
|
|
1733
|
+
const path_label = path + '.label';
|
|
1734
|
+
if (typeof obj_label !== 'string') {
|
|
1735
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
if (obj.lastModifiedBy !== undefined) {
|
|
1739
|
+
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
1740
|
+
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
1741
|
+
const referencepath_lastModifiedByValidationError = validate$b(obj_lastModifiedBy, path_lastModifiedBy);
|
|
1742
|
+
if (referencepath_lastModifiedByValidationError !== null) {
|
|
1743
|
+
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_lastModifiedBy + '")\n';
|
|
1744
|
+
message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1745
|
+
return new TypeError(message);
|
|
1746
|
+
}
|
|
1747
|
+
}
|
|
1748
|
+
if (obj.lastModifiedDate !== undefined) {
|
|
1749
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
1750
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
1751
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
1752
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
if (obj.name !== undefined) {
|
|
1756
|
+
const obj_name = obj.name;
|
|
1757
|
+
const path_name = path + '.name';
|
|
1758
|
+
if (typeof obj_name !== 'string') {
|
|
1759
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
if (obj.namespace !== undefined) {
|
|
1763
|
+
const obj_namespace = obj.namespace;
|
|
1764
|
+
const path_namespace = path + '.namespace';
|
|
1765
|
+
if (typeof obj_namespace !== 'string') {
|
|
1766
|
+
return new TypeError('Expected "string" but received "' + typeof obj_namespace + '" (at "' + path_namespace + '")');
|
|
1767
|
+
}
|
|
1768
|
+
}
|
|
1769
|
+
const obj_queryTemplate = obj.queryTemplate;
|
|
1770
|
+
const path_queryTemplate = path + '.queryTemplate';
|
|
1771
|
+
if (obj_queryTemplate === undefined) {
|
|
1772
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_queryTemplate + '" (at "' + path_queryTemplate + '")');
|
|
1773
|
+
}
|
|
1774
|
+
if (obj.url !== undefined) {
|
|
1775
|
+
const obj_url = obj.url;
|
|
1776
|
+
const path_url = path + '.url';
|
|
1777
|
+
if (typeof obj_url !== 'string') {
|
|
1778
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
})();
|
|
1782
|
+
return v_error === undefined ? null : v_error;
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
const VERSION = "30341cb5fc17b6b6a436ef81c0f1def0";
|
|
1786
|
+
function validate(obj, path = 'DataCleanRoomCollaborationRepresentation') {
|
|
1787
|
+
const v_error = (() => {
|
|
1788
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1789
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1790
|
+
}
|
|
1791
|
+
if (obj.createdBy !== undefined) {
|
|
1792
|
+
const obj_createdBy = obj.createdBy;
|
|
1793
|
+
const path_createdBy = path + '.createdBy';
|
|
1794
|
+
const referencepath_createdByValidationError = validate$b(obj_createdBy, path_createdBy);
|
|
1795
|
+
if (referencepath_createdByValidationError !== null) {
|
|
1796
|
+
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_createdBy + '")\n';
|
|
1797
|
+
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1798
|
+
return new TypeError(message);
|
|
1799
|
+
}
|
|
1800
|
+
}
|
|
1801
|
+
if (obj.createdDate !== undefined) {
|
|
1802
|
+
const obj_createdDate = obj.createdDate;
|
|
1803
|
+
const path_createdDate = path + '.createdDate';
|
|
1804
|
+
if (typeof obj_createdDate !== 'string') {
|
|
1805
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
1806
|
+
}
|
|
1807
|
+
}
|
|
1808
|
+
if (obj.dataSpaceName !== undefined) {
|
|
1809
|
+
const obj_dataSpaceName = obj.dataSpaceName;
|
|
1810
|
+
const path_dataSpaceName = path + '.dataSpaceName';
|
|
1811
|
+
if (typeof obj_dataSpaceName !== 'string') {
|
|
1812
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dataSpaceName + '" (at "' + path_dataSpaceName + '")');
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1815
|
+
if (obj.description !== undefined) {
|
|
1816
|
+
const obj_description = obj.description;
|
|
1817
|
+
const path_description = path + '.description';
|
|
1818
|
+
if (typeof obj_description !== 'string') {
|
|
1819
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
const obj_id = obj.id;
|
|
1823
|
+
const path_id = path + '.id';
|
|
1824
|
+
if (typeof obj_id !== 'string') {
|
|
1825
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1826
|
+
}
|
|
1827
|
+
if (obj.label !== undefined) {
|
|
1828
|
+
const obj_label = obj.label;
|
|
1829
|
+
const path_label = path + '.label';
|
|
1830
|
+
if (typeof obj_label !== 'string') {
|
|
1831
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1834
|
+
if (obj.lastModifiedBy !== undefined) {
|
|
1835
|
+
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
1836
|
+
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
1837
|
+
const referencepath_lastModifiedByValidationError = validate$b(obj_lastModifiedBy, path_lastModifiedBy);
|
|
1838
|
+
if (referencepath_lastModifiedByValidationError !== null) {
|
|
1839
|
+
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_lastModifiedBy + '")\n';
|
|
1840
|
+
message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1841
|
+
return new TypeError(message);
|
|
1842
|
+
}
|
|
1843
|
+
}
|
|
1844
|
+
if (obj.lastModifiedDate !== undefined) {
|
|
1845
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
1846
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
1847
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
1848
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
1849
|
+
}
|
|
1850
|
+
}
|
|
1851
|
+
const obj_members = obj.members;
|
|
1852
|
+
const path_members = path + '.members';
|
|
1853
|
+
if (!ArrayIsArray(obj_members)) {
|
|
1854
|
+
return new TypeError('Expected "array" but received "' + typeof obj_members + '" (at "' + path_members + '")');
|
|
1855
|
+
}
|
|
1856
|
+
for (let i = 0; i < obj_members.length; i++) {
|
|
1857
|
+
const obj_members_item = obj_members[i];
|
|
1858
|
+
const path_members_item = path_members + '[' + i + ']';
|
|
1859
|
+
const referencepath_members_itemValidationError = validate$2(obj_members_item, path_members_item);
|
|
1860
|
+
if (referencepath_members_itemValidationError !== null) {
|
|
1861
|
+
let message = 'Object doesn\'t match DataCleanRoomMemberRepresentation (at "' + path_members_item + '")\n';
|
|
1862
|
+
message += referencepath_members_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1863
|
+
return new TypeError(message);
|
|
1864
|
+
}
|
|
1865
|
+
}
|
|
1866
|
+
if (obj.name !== undefined) {
|
|
1867
|
+
const obj_name = obj.name;
|
|
1868
|
+
const path_name = path + '.name';
|
|
1869
|
+
if (typeof obj_name !== 'string') {
|
|
1870
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1871
|
+
}
|
|
1872
|
+
}
|
|
1873
|
+
if (obj.namespace !== undefined) {
|
|
1874
|
+
const obj_namespace = obj.namespace;
|
|
1875
|
+
const path_namespace = path + '.namespace';
|
|
1876
|
+
if (typeof obj_namespace !== 'string') {
|
|
1877
|
+
return new TypeError('Expected "string" but received "' + typeof obj_namespace + '" (at "' + path_namespace + '")');
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
const obj_status = obj.status;
|
|
1881
|
+
const path_status = path + '.status';
|
|
1882
|
+
if (typeof obj_status !== 'string') {
|
|
1883
|
+
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
1884
|
+
}
|
|
1885
|
+
const obj_templateVersion = obj.templateVersion;
|
|
1886
|
+
const path_templateVersion = path + '.templateVersion';
|
|
1887
|
+
const referencepath_templateVersionValidationError = validate$1(obj_templateVersion, path_templateVersion);
|
|
1888
|
+
if (referencepath_templateVersionValidationError !== null) {
|
|
1889
|
+
let message = 'Object doesn\'t match DataCleanRoomTemplateRepresentation (at "' + path_templateVersion + '")\n';
|
|
1890
|
+
message += referencepath_templateVersionValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1891
|
+
return new TypeError(message);
|
|
1892
|
+
}
|
|
1893
|
+
if (obj.url !== undefined) {
|
|
1894
|
+
const obj_url = obj.url;
|
|
1895
|
+
const path_url = path + '.url';
|
|
1896
|
+
if (typeof obj_url !== 'string') {
|
|
1897
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
})();
|
|
1901
|
+
return v_error === undefined ? null : v_error;
|
|
1902
|
+
}
|
|
1903
|
+
const RepresentationType = 'DataCleanRoomCollaborationRepresentation';
|
|
1904
|
+
function keyBuilder(luvio, config) {
|
|
1905
|
+
return keyPrefix + '::' + RepresentationType + ':' + config.id;
|
|
1906
|
+
}
|
|
1907
|
+
function keyBuilderFromType(luvio, object) {
|
|
1908
|
+
const keyParams = {
|
|
1909
|
+
id: object.id
|
|
1910
|
+
};
|
|
1911
|
+
return keyBuilder(luvio, keyParams);
|
|
1912
|
+
}
|
|
1913
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
1914
|
+
return input;
|
|
1915
|
+
}
|
|
1916
|
+
const select$1 = function DataCleanRoomCollaborationRepresentationSelect() {
|
|
1917
|
+
return {
|
|
1918
|
+
kind: 'Fragment',
|
|
1919
|
+
version: VERSION,
|
|
1920
|
+
private: [],
|
|
1921
|
+
opaque: true
|
|
1922
|
+
};
|
|
1923
|
+
};
|
|
1924
|
+
function equals(existing, incoming) {
|
|
1925
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1926
|
+
return false;
|
|
1927
|
+
}
|
|
1928
|
+
return true;
|
|
1929
|
+
}
|
|
1930
|
+
const ingest = function DataCleanRoomCollaborationRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1931
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1932
|
+
const validateError = validate(input);
|
|
1933
|
+
if (validateError !== null) {
|
|
1934
|
+
throw validateError;
|
|
1935
|
+
}
|
|
1936
|
+
}
|
|
1937
|
+
const key = keyBuilderFromType(luvio, input);
|
|
1938
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1939
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "data-clean-room", VERSION, RepresentationType, equals);
|
|
1940
|
+
return createLink(key);
|
|
1941
|
+
};
|
|
1942
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
1943
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1944
|
+
const rootKey = keyBuilderFromType(luvio, input);
|
|
1945
|
+
rootKeySet.set(rootKey, {
|
|
1946
|
+
namespace: keyPrefix,
|
|
1947
|
+
representationName: RepresentationType,
|
|
1948
|
+
mergeable: false
|
|
1949
|
+
});
|
|
1950
|
+
}
|
|
1951
|
+
|
|
1952
|
+
function select(luvio, params) {
|
|
1953
|
+
return select$1();
|
|
1954
|
+
}
|
|
1955
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
1956
|
+
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
1957
|
+
}
|
|
1958
|
+
function ingestSuccess(luvio, resourceParams, response) {
|
|
1959
|
+
const { body } = response;
|
|
1960
|
+
const key = keyBuilderFromType(luvio, body);
|
|
1961
|
+
luvio.storeIngest(key, ingest, body);
|
|
1962
|
+
const snapshot = luvio.storeLookup({
|
|
1963
|
+
recordId: key,
|
|
1964
|
+
node: select(),
|
|
1965
|
+
variables: {},
|
|
1966
|
+
});
|
|
1967
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1968
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1969
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1970
|
+
}
|
|
1971
|
+
}
|
|
1972
|
+
deepFreeze(snapshot.data);
|
|
1973
|
+
return snapshot;
|
|
1974
|
+
}
|
|
1975
|
+
function createResourceRequest(config) {
|
|
1976
|
+
const headers = {};
|
|
1977
|
+
return {
|
|
1978
|
+
baseUri: '/services/data/v63.0',
|
|
1979
|
+
basePath: '/ssot/data-clean-room/collaborations',
|
|
1980
|
+
method: 'post',
|
|
1981
|
+
body: config.body,
|
|
1982
|
+
urlParams: {},
|
|
1983
|
+
queryParams: {},
|
|
1984
|
+
headers,
|
|
1985
|
+
priority: 'normal',
|
|
1986
|
+
};
|
|
1987
|
+
}
|
|
1988
|
+
|
|
1989
|
+
const adapterName = 'createDataCleanRoomCollaboration';
|
|
1990
|
+
const createDataCleanRoomCollaboration_ConfigPropertyMetadata = [
|
|
1991
|
+
generateParamConfigMetadata('apiKey', false, 2 /* Body */, 0 /* String */),
|
|
1992
|
+
generateParamConfigMetadata('dataCloudOrgId', true, 2 /* Body */, 0 /* String */),
|
|
1993
|
+
generateParamConfigMetadata('dataSpaceName', false, 2 /* Body */, 0 /* String */),
|
|
1994
|
+
generateParamConfigMetadata('providerDevName', true, 2 /* Body */, 0 /* String */),
|
|
1995
|
+
generateParamConfigMetadata('specificationDevName', true, 2 /* Body */, 0 /* String */),
|
|
1996
|
+
generateParamConfigMetadata('templateName', true, 2 /* Body */, 0 /* String */),
|
|
1997
|
+
generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
|
|
1998
|
+
];
|
|
1999
|
+
const createDataCleanRoomCollaboration_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, createDataCleanRoomCollaboration_ConfigPropertyMetadata);
|
|
2000
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$5(createDataCleanRoomCollaboration_ConfigPropertyMetadata);
|
|
2001
|
+
function typeCheckConfig(untrustedConfig) {
|
|
2002
|
+
const config = {};
|
|
2003
|
+
typeCheckConfig$5(untrustedConfig, config, createDataCleanRoomCollaboration_ConfigPropertyMetadata);
|
|
2004
|
+
return config;
|
|
2005
|
+
}
|
|
2006
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
2007
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
2008
|
+
return null;
|
|
2009
|
+
}
|
|
2010
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2011
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2012
|
+
}
|
|
2013
|
+
const config = typeCheckConfig(untrustedConfig);
|
|
2014
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2015
|
+
return null;
|
|
2016
|
+
}
|
|
2017
|
+
return config;
|
|
2018
|
+
}
|
|
2019
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
2020
|
+
const resourceParams = createResourceParams(config);
|
|
2021
|
+
const request = createResourceRequest(resourceParams);
|
|
2022
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2023
|
+
.then((response) => {
|
|
2024
|
+
return luvio.handleSuccessResponse(() => {
|
|
2025
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response);
|
|
2026
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2027
|
+
}, () => {
|
|
2028
|
+
const cache = new StoreKeyMap();
|
|
2029
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
2030
|
+
return cache;
|
|
2031
|
+
});
|
|
2032
|
+
}, (response) => {
|
|
2033
|
+
deepFreeze(response);
|
|
2034
|
+
throw response;
|
|
2035
|
+
});
|
|
2036
|
+
}
|
|
2037
|
+
const createDataCleanRoomCollaborationAdapterFactory = (luvio) => {
|
|
2038
|
+
return function createDataCleanRoomCollaboration(untrustedConfig) {
|
|
2039
|
+
const config = validateAdapterConfig(untrustedConfig, createDataCleanRoomCollaboration_ConfigPropertyNames);
|
|
2040
|
+
// Invalid or incomplete config
|
|
2041
|
+
if (config === null) {
|
|
2042
|
+
throw new Error('Invalid config for "createDataCleanRoomCollaboration"');
|
|
2043
|
+
}
|
|
745
2044
|
return buildNetworkSnapshot(luvio, config);
|
|
746
2045
|
};
|
|
747
2046
|
};
|
|
748
2047
|
|
|
749
|
-
export { createProviderAdapterFactory, getDataCleanRoomProvidersPaginatedAdapterFactory };
|
|
2048
|
+
export { createDataCleanRoomCollaborationAdapterFactory, createDataCleanRoomSpecificationAdapterFactory, createProviderAdapterFactory, getDataCleanRoomProvidersPaginatedAdapterFactory, getDataCleanRoomSpecificationsPaginatedAdapterFactory };
|