@salesforce/lds-adapters-cdp-data-clean-room 1.354.0-dev1 → 1.354.0-dev10
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 +2698 -114
- package/dist/es/es2018/types/src/generated/adapters/acceptDataCleanRoomInvitation.d.ts +17 -0
- package/dist/es/es2018/types/src/generated/adapters/createDataCleanRoomCollaboration.d.ts +22 -0
- package/dist/es/es2018/types/src/generated/adapters/createDataCleanRoomSpecification.d.ts +22 -0
- package/dist/es/es2018/types/src/generated/adapters/executeDataCleanRoomQuery.d.ts +17 -0
- package/dist/es/es2018/types/src/generated/adapters/getAllDataCleanRoomQueryPaginated.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/adapters/getAllDataCleanRoomsPaginated.d.ts +30 -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/adapters/getDataCleanRoomTemplatePaginated.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/adapters/rejectDataCleanRoomInvitation.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +9 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +14 -1
- package/dist/es/es2018/types/src/generated/resources/getSsotDataCleanRoomCollaborations.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/resources/getSsotDataCleanRoomCollaborationsJobsByCollaborationIdOrApiName.d.ts +21 -0
- 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/getSsotDataCleanRoomTemplates.d.ts +17 -0
- package/dist/es/es2018/types/src/generated/resources/postSsotDataCleanRoomCollaborations.d.ts +19 -0
- package/dist/es/es2018/types/src/generated/resources/postSsotDataCleanRoomCollaborationsActionsRunByCollaborationIdOrApiName.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/resources/postSsotDataCleanRoomSpecifications.d.ts +19 -0
- package/dist/es/es2018/types/src/generated/resources/putSsotDataCleanRoomCollaborationsActionsAcceptInvitationByCollaborationIdOrApiName.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/resources/putSsotDataCleanRoomCollaborationsActionsRejectInvitationByCollaborationIdOrApiName.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/types/CdpUserRepresentation.d.ts +3 -3
- package/dist/es/es2018/types/src/generated/types/DataCleanRoomAcceptInvitationInputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/DataCleanRoomCollaborationCollectionRepresentation.d.ts +44 -0
- package/dist/es/es2018/types/src/generated/types/DataCleanRoomCollaborationInputRepresentation.d.ts +49 -0
- package/dist/es/es2018/types/src/generated/types/DataCleanRoomCollaborationRepresentation.d.ts +81 -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 +58 -0
- package/dist/es/es2018/types/src/generated/types/DataCleanRoomQueryJobHistoryCollectionRepresentation.d.ts +44 -0
- package/dist/es/es2018/types/src/generated/types/DataCleanRoomQueryJobInputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/DataCleanRoomQueryJobRepresentation.d.ts +77 -0
- package/dist/es/es2018/types/src/generated/types/DataCleanRoomRejectInvitationInputRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/DataCleanRoomSpecificationCollectionRepresentation.d.ts +53 -0
- package/dist/es/es2018/types/src/generated/types/DataCleanRoomTemplateCollectionRepresentation.d.ts +44 -0
- package/dist/es/es2018/types/src/generated/types/DataCleanRoomTemplateRepresentation.d.ts +62 -0
- package/dist/es/es2018/types/src/generated/types/UseCaseTemplateMappingAttributeFilterOptionRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/UseCaseTemplateMappingAttributeRepresentation.d.ts +72 -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 +2911 -268
- package/src/raml/api.raml +794 -34
- package/src/raml/luvio.raml +65 -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$5, typeCheckConfig as typeCheckConfig$b, StoreKeyMap, createResourceParams as createResourceParams$b } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -92,15 +92,17 @@ function createLink(ref) {
|
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
function validate$
|
|
95
|
+
function validate$g(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 + '")');
|
|
99
99
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
if (obj.id !== undefined) {
|
|
101
|
+
const obj_id = obj.id;
|
|
102
|
+
const path_id = path + '.id';
|
|
103
|
+
if (typeof obj_id !== 'string') {
|
|
104
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
105
|
+
}
|
|
104
106
|
}
|
|
105
107
|
if (obj.name !== undefined) {
|
|
106
108
|
const obj_name = obj.name;
|
|
@@ -120,8 +122,8 @@ function validate$2(obj, path = 'CdpUserRepresentation') {
|
|
|
120
122
|
return v_error === undefined ? null : v_error;
|
|
121
123
|
}
|
|
122
124
|
|
|
123
|
-
const VERSION$
|
|
124
|
-
function validate$
|
|
125
|
+
const VERSION$9 = "929b1bcf37fe62f914c2364146a0f5e6";
|
|
126
|
+
function validate$f(obj, path = 'DataCleanRoomProviderRepresentation') {
|
|
125
127
|
const v_error = (() => {
|
|
126
128
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
127
129
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -129,7 +131,7 @@ function validate$1(obj, path = 'DataCleanRoomProviderRepresentation') {
|
|
|
129
131
|
if (obj.createdBy !== undefined) {
|
|
130
132
|
const obj_createdBy = obj.createdBy;
|
|
131
133
|
const path_createdBy = path + '.createdBy';
|
|
132
|
-
const referencepath_createdByValidationError = validate$
|
|
134
|
+
const referencepath_createdByValidationError = validate$g(obj_createdBy, path_createdBy);
|
|
133
135
|
if (referencepath_createdByValidationError !== null) {
|
|
134
136
|
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_createdBy + '")\n';
|
|
135
137
|
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -168,7 +170,7 @@ function validate$1(obj, path = 'DataCleanRoomProviderRepresentation') {
|
|
|
168
170
|
if (obj.lastModifiedBy !== undefined) {
|
|
169
171
|
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
170
172
|
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
171
|
-
const referencepath_lastModifiedByValidationError = validate$
|
|
173
|
+
const referencepath_lastModifiedByValidationError = validate$g(obj_lastModifiedBy, path_lastModifiedBy);
|
|
172
174
|
if (referencepath_lastModifiedByValidationError !== null) {
|
|
173
175
|
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_lastModifiedBy + '")\n';
|
|
174
176
|
message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -225,57 +227,57 @@ function validate$1(obj, path = 'DataCleanRoomProviderRepresentation') {
|
|
|
225
227
|
})();
|
|
226
228
|
return v_error === undefined ? null : v_error;
|
|
227
229
|
}
|
|
228
|
-
const RepresentationType$
|
|
229
|
-
function keyBuilder$
|
|
230
|
-
return keyPrefix + '::' + RepresentationType$
|
|
230
|
+
const RepresentationType$9 = 'DataCleanRoomProviderRepresentation';
|
|
231
|
+
function keyBuilder$e(luvio, config) {
|
|
232
|
+
return keyPrefix + '::' + RepresentationType$9 + ':' + config.id;
|
|
231
233
|
}
|
|
232
|
-
function keyBuilderFromType(luvio, object) {
|
|
234
|
+
function keyBuilderFromType$4(luvio, object) {
|
|
233
235
|
const keyParams = {
|
|
234
236
|
id: object.id
|
|
235
237
|
};
|
|
236
|
-
return keyBuilder$
|
|
238
|
+
return keyBuilder$e(luvio, keyParams);
|
|
237
239
|
}
|
|
238
|
-
function normalize$
|
|
240
|
+
function normalize$9(input, existing, path, luvio, store, timestamp) {
|
|
239
241
|
return input;
|
|
240
242
|
}
|
|
241
|
-
const select$
|
|
243
|
+
const select$k = function DataCleanRoomProviderRepresentationSelect() {
|
|
242
244
|
return {
|
|
243
245
|
kind: 'Fragment',
|
|
244
|
-
version: VERSION$
|
|
246
|
+
version: VERSION$9,
|
|
245
247
|
private: [],
|
|
246
248
|
opaque: true
|
|
247
249
|
};
|
|
248
250
|
};
|
|
249
|
-
function equals$
|
|
251
|
+
function equals$9(existing, incoming) {
|
|
250
252
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
251
253
|
return false;
|
|
252
254
|
}
|
|
253
255
|
return true;
|
|
254
256
|
}
|
|
255
|
-
const ingest$
|
|
257
|
+
const ingest$9 = function DataCleanRoomProviderRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
256
258
|
if (process.env.NODE_ENV !== 'production') {
|
|
257
|
-
const validateError = validate$
|
|
259
|
+
const validateError = validate$f(input);
|
|
258
260
|
if (validateError !== null) {
|
|
259
261
|
throw validateError;
|
|
260
262
|
}
|
|
261
263
|
}
|
|
262
|
-
const key = keyBuilderFromType(luvio, input);
|
|
264
|
+
const key = keyBuilderFromType$4(luvio, input);
|
|
263
265
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
264
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
266
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$9, "data-clean-room", VERSION$9, RepresentationType$9, equals$9);
|
|
265
267
|
return createLink(key);
|
|
266
268
|
};
|
|
267
|
-
function getTypeCacheKeys$
|
|
269
|
+
function getTypeCacheKeys$9(rootKeySet, luvio, input, fullPathFactory) {
|
|
268
270
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
269
|
-
const rootKey = keyBuilderFromType(luvio, input);
|
|
271
|
+
const rootKey = keyBuilderFromType$4(luvio, input);
|
|
270
272
|
rootKeySet.set(rootKey, {
|
|
271
273
|
namespace: keyPrefix,
|
|
272
|
-
representationName: RepresentationType$
|
|
274
|
+
representationName: RepresentationType$9,
|
|
273
275
|
mergeable: false
|
|
274
276
|
});
|
|
275
277
|
}
|
|
276
278
|
|
|
277
|
-
const VERSION = "52237eeecd4f8f11ae22e265d9abe5ca";
|
|
278
|
-
function validate(obj, path = 'DataCleanRoomProviderCollectionRepresentation') {
|
|
279
|
+
const VERSION$8 = "52237eeecd4f8f11ae22e265d9abe5ca";
|
|
280
|
+
function validate$e(obj, path = 'DataCleanRoomProviderCollectionRepresentation') {
|
|
279
281
|
const v_error = (() => {
|
|
280
282
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
281
283
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -351,14 +353,14 @@ function validate(obj, path = 'DataCleanRoomProviderCollectionRepresentation') {
|
|
|
351
353
|
})();
|
|
352
354
|
return v_error === undefined ? null : v_error;
|
|
353
355
|
}
|
|
354
|
-
const RepresentationType = 'DataCleanRoomProviderCollectionRepresentation';
|
|
355
|
-
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
356
|
+
const RepresentationType$8 = 'DataCleanRoomProviderCollectionRepresentation';
|
|
357
|
+
function normalize$8(input, existing, path, luvio, store, timestamp) {
|
|
356
358
|
const input_providers = input.providers;
|
|
357
359
|
const input_providers_id = path.fullPath + '__providers';
|
|
358
360
|
for (let i = 0; i < input_providers.length; i++) {
|
|
359
361
|
const input_providers_item = input_providers[i];
|
|
360
362
|
let input_providers_item_id = input_providers_id + '__' + i;
|
|
361
|
-
input_providers[i] = ingest$
|
|
363
|
+
input_providers[i] = ingest$9(input_providers_item, {
|
|
362
364
|
fullPath: input_providers_item_id,
|
|
363
365
|
propertyName: i,
|
|
364
366
|
parent: {
|
|
@@ -371,10 +373,10 @@ function normalize(input, existing, path, luvio, store, timestamp) {
|
|
|
371
373
|
}
|
|
372
374
|
return input;
|
|
373
375
|
}
|
|
374
|
-
const select$
|
|
376
|
+
const select$j = function DataCleanRoomProviderCollectionRepresentationSelect() {
|
|
375
377
|
return {
|
|
376
378
|
kind: 'Fragment',
|
|
377
|
-
version: VERSION,
|
|
379
|
+
version: VERSION$8,
|
|
378
380
|
private: [],
|
|
379
381
|
selections: [
|
|
380
382
|
{
|
|
@@ -401,7 +403,7 @@ const select$2 = function DataCleanRoomProviderCollectionRepresentationSelect()
|
|
|
401
403
|
name: 'providers',
|
|
402
404
|
kind: 'Link',
|
|
403
405
|
plural: true,
|
|
404
|
-
fragment: select$
|
|
406
|
+
fragment: select$k()
|
|
405
407
|
},
|
|
406
408
|
{
|
|
407
409
|
name: 'totalSize',
|
|
@@ -411,7 +413,7 @@ const select$2 = function DataCleanRoomProviderCollectionRepresentationSelect()
|
|
|
411
413
|
]
|
|
412
414
|
};
|
|
413
415
|
};
|
|
414
|
-
function equals(existing, incoming) {
|
|
416
|
+
function equals$8(existing, incoming) {
|
|
415
417
|
const existing_limit = existing.limit;
|
|
416
418
|
const incoming_limit = incoming.limit;
|
|
417
419
|
// if at least one of these optionals is defined
|
|
@@ -489,48 +491,48 @@ function equals(existing, incoming) {
|
|
|
489
491
|
}
|
|
490
492
|
return true;
|
|
491
493
|
}
|
|
492
|
-
const ingest = function DataCleanRoomProviderCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
494
|
+
const ingest$8 = function DataCleanRoomProviderCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
493
495
|
if (process.env.NODE_ENV !== 'production') {
|
|
494
|
-
const validateError = validate(input);
|
|
496
|
+
const validateError = validate$e(input);
|
|
495
497
|
if (validateError !== null) {
|
|
496
498
|
throw validateError;
|
|
497
499
|
}
|
|
498
500
|
}
|
|
499
501
|
const key = path.fullPath;
|
|
500
502
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
501
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "data-clean-room", VERSION, RepresentationType, equals);
|
|
503
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$8, "data-clean-room", VERSION$8, RepresentationType$8, equals$8);
|
|
502
504
|
return createLink(key);
|
|
503
505
|
};
|
|
504
|
-
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
506
|
+
function getTypeCacheKeys$8(rootKeySet, luvio, input, fullPathFactory) {
|
|
505
507
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
506
508
|
const rootKey = fullPathFactory();
|
|
507
509
|
rootKeySet.set(rootKey, {
|
|
508
510
|
namespace: keyPrefix,
|
|
509
|
-
representationName: RepresentationType,
|
|
511
|
+
representationName: RepresentationType$8,
|
|
510
512
|
mergeable: false
|
|
511
513
|
});
|
|
512
514
|
const input_providers_length = input.providers.length;
|
|
513
515
|
for (let i = 0; i < input_providers_length; i++) {
|
|
514
|
-
getTypeCacheKeys$
|
|
516
|
+
getTypeCacheKeys$9(rootKeySet, luvio, input.providers[i]);
|
|
515
517
|
}
|
|
516
518
|
}
|
|
517
519
|
|
|
518
|
-
function select$
|
|
519
|
-
return select$
|
|
520
|
+
function select$i(luvio, params) {
|
|
521
|
+
return select$j();
|
|
520
522
|
}
|
|
521
|
-
function keyBuilder$
|
|
522
|
-
return keyPrefix + '::DataCleanRoomProviderCollectionRepresentation:(' + '
|
|
523
|
+
function keyBuilder$d(luvio, params) {
|
|
524
|
+
return keyPrefix + '::DataCleanRoomProviderCollectionRepresentation:(' + 'filters:' + params.queryParams.filters + ',' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'orderBy:' + params.queryParams.orderBy + ')';
|
|
523
525
|
}
|
|
524
|
-
function getResponseCacheKeys$
|
|
525
|
-
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$
|
|
526
|
+
function getResponseCacheKeys$a(storeKeyMap, luvio, resourceParams, response) {
|
|
527
|
+
getTypeCacheKeys$8(storeKeyMap, luvio, response, () => keyBuilder$d(luvio, resourceParams));
|
|
526
528
|
}
|
|
527
|
-
function ingestSuccess$
|
|
529
|
+
function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
|
|
528
530
|
const { body } = response;
|
|
529
|
-
const key = keyBuilder$
|
|
530
|
-
luvio.storeIngest(key, ingest, body);
|
|
531
|
+
const key = keyBuilder$d(luvio, resourceParams);
|
|
532
|
+
luvio.storeIngest(key, ingest$8, body);
|
|
531
533
|
const snapshot = luvio.storeLookup({
|
|
532
534
|
recordId: key,
|
|
533
|
-
node: select$
|
|
535
|
+
node: select$i(),
|
|
534
536
|
variables: {},
|
|
535
537
|
}, snapshotRefresh);
|
|
536
538
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -541,16 +543,16 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
541
543
|
deepFreeze(snapshot.data);
|
|
542
544
|
return snapshot;
|
|
543
545
|
}
|
|
544
|
-
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
545
|
-
const key = keyBuilder$
|
|
546
|
+
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
547
|
+
const key = keyBuilder$d(luvio, params);
|
|
546
548
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
547
549
|
luvio.storeIngestError(key, errorSnapshot);
|
|
548
550
|
return errorSnapshot;
|
|
549
551
|
}
|
|
550
|
-
function createResourceRequest$
|
|
552
|
+
function createResourceRequest$a(config) {
|
|
551
553
|
const headers = {};
|
|
552
554
|
return {
|
|
553
|
-
baseUri: '/services/data/
|
|
555
|
+
baseUri: '/services/data/v64.0',
|
|
554
556
|
basePath: '/ssot/data-clean-room/providers',
|
|
555
557
|
method: 'get',
|
|
556
558
|
body: null,
|
|
@@ -561,108 +563,108 @@ function createResourceRequest$1(config) {
|
|
|
561
563
|
};
|
|
562
564
|
}
|
|
563
565
|
|
|
564
|
-
const adapterName$
|
|
566
|
+
const adapterName$a = 'getDataCleanRoomProvidersPaginated';
|
|
565
567
|
const getDataCleanRoomProvidersPaginated_ConfigPropertyMetadata = [
|
|
566
|
-
generateParamConfigMetadata('batchSize', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
567
568
|
generateParamConfigMetadata('filters', false, 1 /* QueryParameter */, 0 /* String */),
|
|
569
|
+
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
568
570
|
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
569
571
|
generateParamConfigMetadata('orderBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
570
572
|
];
|
|
571
|
-
const getDataCleanRoomProvidersPaginated_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
572
|
-
const createResourceParams$
|
|
573
|
-
function keyBuilder(luvio, config) {
|
|
574
|
-
const resourceParams = createResourceParams$
|
|
575
|
-
return keyBuilder$
|
|
573
|
+
const getDataCleanRoomProvidersPaginated_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$a, getDataCleanRoomProvidersPaginated_ConfigPropertyMetadata);
|
|
574
|
+
const createResourceParams$a = /*#__PURE__*/ createResourceParams$b(getDataCleanRoomProvidersPaginated_ConfigPropertyMetadata);
|
|
575
|
+
function keyBuilder$c(luvio, config) {
|
|
576
|
+
const resourceParams = createResourceParams$a(config);
|
|
577
|
+
return keyBuilder$d(luvio, resourceParams);
|
|
576
578
|
}
|
|
577
|
-
function typeCheckConfig$
|
|
579
|
+
function typeCheckConfig$a(untrustedConfig) {
|
|
578
580
|
const config = {};
|
|
579
|
-
typeCheckConfig$
|
|
581
|
+
typeCheckConfig$b(untrustedConfig, config, getDataCleanRoomProvidersPaginated_ConfigPropertyMetadata);
|
|
580
582
|
return config;
|
|
581
583
|
}
|
|
582
|
-
function validateAdapterConfig$
|
|
584
|
+
function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
|
|
583
585
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
584
586
|
return null;
|
|
585
587
|
}
|
|
586
588
|
if (process.env.NODE_ENV !== 'production') {
|
|
587
589
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
588
590
|
}
|
|
589
|
-
const config = typeCheckConfig$
|
|
591
|
+
const config = typeCheckConfig$a(untrustedConfig);
|
|
590
592
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
591
593
|
return null;
|
|
592
594
|
}
|
|
593
595
|
return config;
|
|
594
596
|
}
|
|
595
|
-
function adapterFragment(luvio, config) {
|
|
596
|
-
createResourceParams$
|
|
597
|
-
return select$
|
|
597
|
+
function adapterFragment$4(luvio, config) {
|
|
598
|
+
createResourceParams$a(config);
|
|
599
|
+
return select$i();
|
|
598
600
|
}
|
|
599
|
-
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
600
|
-
const snapshot = ingestSuccess$
|
|
601
|
+
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
602
|
+
const snapshot = ingestSuccess$a(luvio, resourceParams, response, {
|
|
601
603
|
config,
|
|
602
|
-
resolve: () => buildNetworkSnapshot$
|
|
604
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
603
605
|
});
|
|
604
606
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
605
607
|
}
|
|
606
|
-
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
607
|
-
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
608
|
+
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
609
|
+
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
608
610
|
config,
|
|
609
|
-
resolve: () => buildNetworkSnapshot$
|
|
611
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
610
612
|
});
|
|
611
613
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
612
614
|
}
|
|
613
|
-
function buildNetworkSnapshot$
|
|
614
|
-
const resourceParams = createResourceParams$
|
|
615
|
-
const request = createResourceRequest$
|
|
615
|
+
function buildNetworkSnapshot$a(luvio, config, options) {
|
|
616
|
+
const resourceParams = createResourceParams$a(config);
|
|
617
|
+
const request = createResourceRequest$a(resourceParams);
|
|
616
618
|
return luvio.dispatchResourceRequest(request, options)
|
|
617
619
|
.then((response) => {
|
|
618
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
620
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
|
|
619
621
|
const cache = new StoreKeyMap();
|
|
620
|
-
getResponseCacheKeys$
|
|
622
|
+
getResponseCacheKeys$a(cache, luvio, resourceParams, response.body);
|
|
621
623
|
return cache;
|
|
622
624
|
});
|
|
623
625
|
}, (response) => {
|
|
624
|
-
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
626
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
|
|
625
627
|
});
|
|
626
628
|
}
|
|
627
|
-
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
628
|
-
return buildNetworkSnapshotCachePolicy$
|
|
629
|
+
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
630
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$a, undefined, false);
|
|
629
631
|
}
|
|
630
|
-
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
632
|
+
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
631
633
|
const { luvio, config } = context;
|
|
632
634
|
const selector = {
|
|
633
|
-
recordId: keyBuilder(luvio, config),
|
|
634
|
-
node: adapterFragment(luvio, config),
|
|
635
|
+
recordId: keyBuilder$c(luvio, config),
|
|
636
|
+
node: adapterFragment$4(luvio, config),
|
|
635
637
|
variables: {},
|
|
636
638
|
};
|
|
637
639
|
const cacheSnapshot = storeLookup(selector, {
|
|
638
640
|
config,
|
|
639
|
-
resolve: () => buildNetworkSnapshot$
|
|
641
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
640
642
|
});
|
|
641
643
|
return cacheSnapshot;
|
|
642
644
|
}
|
|
643
645
|
const getDataCleanRoomProvidersPaginatedAdapterFactory = (luvio) => function dataCleanRoom__getDataCleanRoomProvidersPaginated(untrustedConfig, requestContext) {
|
|
644
|
-
const config = validateAdapterConfig$
|
|
646
|
+
const config = validateAdapterConfig$a(untrustedConfig, getDataCleanRoomProvidersPaginated_ConfigPropertyNames);
|
|
645
647
|
// Invalid or incomplete config
|
|
646
648
|
if (config === null) {
|
|
647
649
|
return null;
|
|
648
650
|
}
|
|
649
651
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
650
|
-
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
652
|
+
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
651
653
|
};
|
|
652
654
|
|
|
653
|
-
function select(luvio, params) {
|
|
654
|
-
return select$
|
|
655
|
+
function select$h(luvio, params) {
|
|
656
|
+
return select$k();
|
|
655
657
|
}
|
|
656
|
-
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
657
|
-
getTypeCacheKeys$
|
|
658
|
+
function getResponseCacheKeys$9(storeKeyMap, luvio, resourceParams, response) {
|
|
659
|
+
getTypeCacheKeys$9(storeKeyMap, luvio, response);
|
|
658
660
|
}
|
|
659
|
-
function ingestSuccess(luvio, resourceParams, response) {
|
|
661
|
+
function ingestSuccess$9(luvio, resourceParams, response) {
|
|
660
662
|
const { body } = response;
|
|
661
|
-
const key = keyBuilderFromType(luvio, body);
|
|
662
|
-
luvio.storeIngest(key, ingest$
|
|
663
|
+
const key = keyBuilderFromType$4(luvio, body);
|
|
664
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
663
665
|
const snapshot = luvio.storeLookup({
|
|
664
666
|
recordId: key,
|
|
665
|
-
node: select(),
|
|
667
|
+
node: select$h(),
|
|
666
668
|
variables: {},
|
|
667
669
|
});
|
|
668
670
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -673,10 +675,10 @@ function ingestSuccess(luvio, resourceParams, response) {
|
|
|
673
675
|
deepFreeze(snapshot.data);
|
|
674
676
|
return snapshot;
|
|
675
677
|
}
|
|
676
|
-
function createResourceRequest(config) {
|
|
678
|
+
function createResourceRequest$9(config) {
|
|
677
679
|
const headers = {};
|
|
678
680
|
return {
|
|
679
|
-
baseUri: '/services/data/
|
|
681
|
+
baseUri: '/services/data/v64.0',
|
|
680
682
|
basePath: '/ssot/data-clean-room/providers',
|
|
681
683
|
method: 'post',
|
|
682
684
|
body: config.body,
|
|
@@ -687,7 +689,7 @@ function createResourceRequest(config) {
|
|
|
687
689
|
};
|
|
688
690
|
}
|
|
689
691
|
|
|
690
|
-
const adapterName = 'createProvider';
|
|
692
|
+
const adapterName$9 = 'createProvider';
|
|
691
693
|
const createProvider_ConfigPropertyMetadata = [
|
|
692
694
|
generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
|
|
693
695
|
generateParamConfigMetadata('description', true, 2 /* Body */, 0 /* String */),
|
|
@@ -697,37 +699,37 @@ const createProvider_ConfigPropertyMetadata = [
|
|
|
697
699
|
generateParamConfigMetadata('name', false, 2 /* Body */, 0 /* String */),
|
|
698
700
|
generateParamConfigMetadata('logoUrl', false, 2 /* Body */, 0 /* String */),
|
|
699
701
|
];
|
|
700
|
-
const createProvider_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, createProvider_ConfigPropertyMetadata);
|
|
701
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
702
|
-
function typeCheckConfig(untrustedConfig) {
|
|
702
|
+
const createProvider_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, createProvider_ConfigPropertyMetadata);
|
|
703
|
+
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$b(createProvider_ConfigPropertyMetadata);
|
|
704
|
+
function typeCheckConfig$9(untrustedConfig) {
|
|
703
705
|
const config = {};
|
|
704
|
-
typeCheckConfig$
|
|
706
|
+
typeCheckConfig$b(untrustedConfig, config, createProvider_ConfigPropertyMetadata);
|
|
705
707
|
return config;
|
|
706
708
|
}
|
|
707
|
-
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
709
|
+
function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
|
|
708
710
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
709
711
|
return null;
|
|
710
712
|
}
|
|
711
713
|
if (process.env.NODE_ENV !== 'production') {
|
|
712
714
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
713
715
|
}
|
|
714
|
-
const config = typeCheckConfig(untrustedConfig);
|
|
716
|
+
const config = typeCheckConfig$9(untrustedConfig);
|
|
715
717
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
716
718
|
return null;
|
|
717
719
|
}
|
|
718
720
|
return config;
|
|
719
721
|
}
|
|
720
|
-
function buildNetworkSnapshot(luvio, config, options) {
|
|
721
|
-
const resourceParams = createResourceParams(config);
|
|
722
|
-
const request = createResourceRequest(resourceParams);
|
|
722
|
+
function buildNetworkSnapshot$9(luvio, config, options) {
|
|
723
|
+
const resourceParams = createResourceParams$9(config);
|
|
724
|
+
const request = createResourceRequest$9(resourceParams);
|
|
723
725
|
return luvio.dispatchResourceRequest(request, options)
|
|
724
726
|
.then((response) => {
|
|
725
727
|
return luvio.handleSuccessResponse(() => {
|
|
726
|
-
const snapshot = ingestSuccess(luvio, resourceParams, response);
|
|
728
|
+
const snapshot = ingestSuccess$9(luvio, resourceParams, response);
|
|
727
729
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
728
730
|
}, () => {
|
|
729
731
|
const cache = new StoreKeyMap();
|
|
730
|
-
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
732
|
+
getResponseCacheKeys$9(cache, luvio, resourceParams, response.body);
|
|
731
733
|
return cache;
|
|
732
734
|
});
|
|
733
735
|
}, (response) => {
|
|
@@ -737,13 +739,2595 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
737
739
|
}
|
|
738
740
|
const createProviderAdapterFactory = (luvio) => {
|
|
739
741
|
return function createProvider(untrustedConfig) {
|
|
740
|
-
const config = validateAdapterConfig(untrustedConfig, createProvider_ConfigPropertyNames);
|
|
742
|
+
const config = validateAdapterConfig$9(untrustedConfig, createProvider_ConfigPropertyNames);
|
|
741
743
|
// Invalid or incomplete config
|
|
742
744
|
if (config === null) {
|
|
743
745
|
throw new Error('Invalid config for "createProvider"');
|
|
744
746
|
}
|
|
745
|
-
return buildNetworkSnapshot(luvio, config);
|
|
747
|
+
return buildNetworkSnapshot$9(luvio, config);
|
|
746
748
|
};
|
|
747
749
|
};
|
|
748
750
|
|
|
749
|
-
|
|
751
|
+
function validate$d(obj, path = 'UseCaseTemplateMappingAttributeFilterOptionRepresentation') {
|
|
752
|
+
const v_error = (() => {
|
|
753
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
754
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
755
|
+
}
|
|
756
|
+
const obj_operator = obj.operator;
|
|
757
|
+
const path_operator = path + '.operator';
|
|
758
|
+
if (typeof obj_operator !== 'string') {
|
|
759
|
+
return new TypeError('Expected "string" but received "' + typeof obj_operator + '" (at "' + path_operator + '")');
|
|
760
|
+
}
|
|
761
|
+
const obj_values = obj.values;
|
|
762
|
+
const path_values = path + '.values';
|
|
763
|
+
if (!ArrayIsArray(obj_values)) {
|
|
764
|
+
return new TypeError('Expected "array" but received "' + typeof obj_values + '" (at "' + path_values + '")');
|
|
765
|
+
}
|
|
766
|
+
for (let i = 0; i < obj_values.length; i++) {
|
|
767
|
+
const obj_values_item = obj_values[i];
|
|
768
|
+
const path_values_item = path_values + '[' + i + ']';
|
|
769
|
+
if (typeof obj_values_item !== 'string') {
|
|
770
|
+
return new TypeError('Expected "string" but received "' + typeof obj_values_item + '" (at "' + path_values_item + '")');
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
})();
|
|
774
|
+
return v_error === undefined ? null : v_error;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
function validate$c(obj, path = 'UseCaseTemplateMappingPathAttributeRepresentation') {
|
|
778
|
+
const v_error = (() => {
|
|
779
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
780
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
781
|
+
}
|
|
782
|
+
const obj_sourceAttribute = obj.sourceAttribute;
|
|
783
|
+
const path_sourceAttribute = path + '.sourceAttribute';
|
|
784
|
+
if (obj_sourceAttribute === undefined) {
|
|
785
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_sourceAttribute + '" (at "' + path_sourceAttribute + '")');
|
|
786
|
+
}
|
|
787
|
+
const obj_targetAttribute = obj.targetAttribute;
|
|
788
|
+
const path_targetAttribute = path + '.targetAttribute';
|
|
789
|
+
if (obj_targetAttribute === undefined) {
|
|
790
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_targetAttribute + '" (at "' + path_targetAttribute + '")');
|
|
791
|
+
}
|
|
792
|
+
})();
|
|
793
|
+
return v_error === undefined ? null : v_error;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
function validate$b(obj, path = 'UseCaseTemplateMappingSubjectAttributeRepresentation') {
|
|
797
|
+
const v_error = (() => {
|
|
798
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
799
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
800
|
+
}
|
|
801
|
+
const obj_fieldLabel = obj.fieldLabel;
|
|
802
|
+
const path_fieldLabel = path + '.fieldLabel';
|
|
803
|
+
if (typeof obj_fieldLabel !== 'string') {
|
|
804
|
+
return new TypeError('Expected "string" but received "' + typeof obj_fieldLabel + '" (at "' + path_fieldLabel + '")');
|
|
805
|
+
}
|
|
806
|
+
const obj_fieldName = obj.fieldName;
|
|
807
|
+
const path_fieldName = path + '.fieldName';
|
|
808
|
+
if (typeof obj_fieldName !== 'string') {
|
|
809
|
+
return new TypeError('Expected "string" but received "' + typeof obj_fieldName + '" (at "' + path_fieldName + '")');
|
|
810
|
+
}
|
|
811
|
+
const obj_objectLabel = obj.objectLabel;
|
|
812
|
+
const path_objectLabel = path + '.objectLabel';
|
|
813
|
+
if (typeof obj_objectLabel !== 'string') {
|
|
814
|
+
return new TypeError('Expected "string" but received "' + typeof obj_objectLabel + '" (at "' + path_objectLabel + '")');
|
|
815
|
+
}
|
|
816
|
+
const obj_objectName = obj.objectName;
|
|
817
|
+
const path_objectName = path + '.objectName';
|
|
818
|
+
if (typeof obj_objectName !== 'string') {
|
|
819
|
+
return new TypeError('Expected "string" but received "' + typeof obj_objectName + '" (at "' + path_objectName + '")');
|
|
820
|
+
}
|
|
821
|
+
})();
|
|
822
|
+
return v_error === undefined ? null : v_error;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
function validate$a(obj, path = 'UseCaseTemplateMappingAttributeRepresentation') {
|
|
826
|
+
const v_error = (() => {
|
|
827
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
828
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
829
|
+
}
|
|
830
|
+
const obj_alias = obj.alias;
|
|
831
|
+
const path_alias = path + '.alias';
|
|
832
|
+
if (typeof obj_alias !== 'string') {
|
|
833
|
+
return new TypeError('Expected "string" but received "' + typeof obj_alias + '" (at "' + path_alias + '")');
|
|
834
|
+
}
|
|
835
|
+
if (obj.attributeId !== undefined) {
|
|
836
|
+
const obj_attributeId = obj.attributeId;
|
|
837
|
+
const path_attributeId = path + '.attributeId';
|
|
838
|
+
if (typeof obj_attributeId !== 'string') {
|
|
839
|
+
return new TypeError('Expected "string" but received "' + typeof obj_attributeId + '" (at "' + path_attributeId + '")');
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
if (obj.createdBy !== undefined) {
|
|
843
|
+
const obj_createdBy = obj.createdBy;
|
|
844
|
+
const path_createdBy = path + '.createdBy';
|
|
845
|
+
const referencepath_createdByValidationError = validate$g(obj_createdBy, path_createdBy);
|
|
846
|
+
if (referencepath_createdByValidationError !== null) {
|
|
847
|
+
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_createdBy + '")\n';
|
|
848
|
+
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
849
|
+
return new TypeError(message);
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
if (obj.createdDate !== undefined) {
|
|
853
|
+
const obj_createdDate = obj.createdDate;
|
|
854
|
+
const path_createdDate = path + '.createdDate';
|
|
855
|
+
if (typeof obj_createdDate !== 'string') {
|
|
856
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
if (obj.dataMapping !== undefined) {
|
|
860
|
+
const obj_dataMapping = obj.dataMapping;
|
|
861
|
+
const path_dataMapping = path + '.dataMapping';
|
|
862
|
+
const referencepath_dataMappingValidationError = validate$9(obj_dataMapping, path_dataMapping);
|
|
863
|
+
if (referencepath_dataMappingValidationError !== null) {
|
|
864
|
+
let message = 'Object doesn\'t match UseCaseTemplateMappingRepresentation (at "' + path_dataMapping + '")\n';
|
|
865
|
+
message += referencepath_dataMappingValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
866
|
+
return new TypeError(message);
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
if (obj.filterOptions !== undefined) {
|
|
870
|
+
const obj_filterOptions = obj.filterOptions;
|
|
871
|
+
const path_filterOptions = path + '.filterOptions';
|
|
872
|
+
const referencepath_filterOptionsValidationError = validate$d(obj_filterOptions, path_filterOptions);
|
|
873
|
+
if (referencepath_filterOptionsValidationError !== null) {
|
|
874
|
+
let message = 'Object doesn\'t match UseCaseTemplateMappingAttributeFilterOptionRepresentation (at "' + path_filterOptions + '")\n';
|
|
875
|
+
message += referencepath_filterOptionsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
876
|
+
return new TypeError(message);
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
if (obj.id !== undefined) {
|
|
880
|
+
const obj_id = obj.id;
|
|
881
|
+
const path_id = path + '.id';
|
|
882
|
+
if (typeof obj_id !== 'string') {
|
|
883
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
if (obj.label !== undefined) {
|
|
887
|
+
const obj_label = obj.label;
|
|
888
|
+
const path_label = path + '.label';
|
|
889
|
+
if (typeof obj_label !== 'string') {
|
|
890
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
if (obj.lastModifiedBy !== undefined) {
|
|
894
|
+
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
895
|
+
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
896
|
+
const referencepath_lastModifiedByValidationError = validate$g(obj_lastModifiedBy, path_lastModifiedBy);
|
|
897
|
+
if (referencepath_lastModifiedByValidationError !== null) {
|
|
898
|
+
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_lastModifiedBy + '")\n';
|
|
899
|
+
message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
900
|
+
return new TypeError(message);
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
if (obj.lastModifiedDate !== undefined) {
|
|
904
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
905
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
906
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
907
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
if (obj.name !== undefined) {
|
|
911
|
+
const obj_name = obj.name;
|
|
912
|
+
const path_name = path + '.name';
|
|
913
|
+
if (typeof obj_name !== 'string') {
|
|
914
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
if (obj.namespace !== undefined) {
|
|
918
|
+
const obj_namespace = obj.namespace;
|
|
919
|
+
const path_namespace = path + '.namespace';
|
|
920
|
+
if (typeof obj_namespace !== 'string') {
|
|
921
|
+
return new TypeError('Expected "string" but received "' + typeof obj_namespace + '" (at "' + path_namespace + '")');
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
const obj_path = obj.path;
|
|
925
|
+
const path_path = path + '.path';
|
|
926
|
+
if (!ArrayIsArray(obj_path)) {
|
|
927
|
+
return new TypeError('Expected "array" but received "' + typeof obj_path + '" (at "' + path_path + '")');
|
|
928
|
+
}
|
|
929
|
+
for (let i = 0; i < obj_path.length; i++) {
|
|
930
|
+
const obj_path_item = obj_path[i];
|
|
931
|
+
const path_path_item = path_path + '[' + i + ']';
|
|
932
|
+
const referencepath_path_itemValidationError = validate$c(obj_path_item, path_path_item);
|
|
933
|
+
if (referencepath_path_itemValidationError !== null) {
|
|
934
|
+
let message = 'Object doesn\'t match UseCaseTemplateMappingPathAttributeRepresentation (at "' + path_path_item + '")\n';
|
|
935
|
+
message += referencepath_path_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
936
|
+
return new TypeError(message);
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
const obj_subjectAttribute = obj.subjectAttribute;
|
|
940
|
+
const path_subjectAttribute = path + '.subjectAttribute';
|
|
941
|
+
const referencepath_subjectAttributeValidationError = validate$b(obj_subjectAttribute, path_subjectAttribute);
|
|
942
|
+
if (referencepath_subjectAttributeValidationError !== null) {
|
|
943
|
+
let message = 'Object doesn\'t match UseCaseTemplateMappingSubjectAttributeRepresentation (at "' + path_subjectAttribute + '")\n';
|
|
944
|
+
message += referencepath_subjectAttributeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
945
|
+
return new TypeError(message);
|
|
946
|
+
}
|
|
947
|
+
if (obj.url !== undefined) {
|
|
948
|
+
const obj_url = obj.url;
|
|
949
|
+
const path_url = path + '.url';
|
|
950
|
+
if (typeof obj_url !== 'string') {
|
|
951
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
})();
|
|
955
|
+
return v_error === undefined ? null : v_error;
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
function validate$9(obj, path = 'UseCaseTemplateMappingRepresentation') {
|
|
959
|
+
const v_error = (() => {
|
|
960
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
961
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
962
|
+
}
|
|
963
|
+
const obj_attributes = obj.attributes;
|
|
964
|
+
const path_attributes = path + '.attributes';
|
|
965
|
+
if (!ArrayIsArray(obj_attributes)) {
|
|
966
|
+
return new TypeError('Expected "array" but received "' + typeof obj_attributes + '" (at "' + path_attributes + '")');
|
|
967
|
+
}
|
|
968
|
+
for (let i = 0; i < obj_attributes.length; i++) {
|
|
969
|
+
const obj_attributes_item = obj_attributes[i];
|
|
970
|
+
const path_attributes_item = path_attributes + '[' + i + ']';
|
|
971
|
+
const referencepath_attributes_itemValidationError = validate$a(obj_attributes_item, path_attributes_item);
|
|
972
|
+
if (referencepath_attributes_itemValidationError !== null) {
|
|
973
|
+
let message = 'Object doesn\'t match UseCaseTemplateMappingAttributeRepresentation (at "' + path_attributes_item + '")\n';
|
|
974
|
+
message += referencepath_attributes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
975
|
+
return new TypeError(message);
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
const obj_collaborationEntity = obj.collaborationEntity;
|
|
979
|
+
const path_collaborationEntity = path + '.collaborationEntity';
|
|
980
|
+
if (typeof obj_collaborationEntity !== 'string') {
|
|
981
|
+
return new TypeError('Expected "string" but received "' + typeof obj_collaborationEntity + '" (at "' + path_collaborationEntity + '")');
|
|
982
|
+
}
|
|
983
|
+
if (obj.createdBy !== undefined) {
|
|
984
|
+
const obj_createdBy = obj.createdBy;
|
|
985
|
+
const path_createdBy = path + '.createdBy';
|
|
986
|
+
const referencepath_createdByValidationError = validate$g(obj_createdBy, path_createdBy);
|
|
987
|
+
if (referencepath_createdByValidationError !== null) {
|
|
988
|
+
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_createdBy + '")\n';
|
|
989
|
+
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
990
|
+
return new TypeError(message);
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
if (obj.createdDate !== undefined) {
|
|
994
|
+
const obj_createdDate = obj.createdDate;
|
|
995
|
+
const path_createdDate = path + '.createdDate';
|
|
996
|
+
if (typeof obj_createdDate !== 'string') {
|
|
997
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
if (obj.id !== undefined) {
|
|
1001
|
+
const obj_id = obj.id;
|
|
1002
|
+
const path_id = path + '.id';
|
|
1003
|
+
if (typeof obj_id !== 'string') {
|
|
1004
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
if (obj.label !== undefined) {
|
|
1008
|
+
const obj_label = obj.label;
|
|
1009
|
+
const path_label = path + '.label';
|
|
1010
|
+
if (typeof obj_label !== 'string') {
|
|
1011
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
if (obj.lastModifiedBy !== undefined) {
|
|
1015
|
+
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
1016
|
+
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
1017
|
+
const referencepath_lastModifiedByValidationError = validate$g(obj_lastModifiedBy, path_lastModifiedBy);
|
|
1018
|
+
if (referencepath_lastModifiedByValidationError !== null) {
|
|
1019
|
+
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_lastModifiedBy + '")\n';
|
|
1020
|
+
message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1021
|
+
return new TypeError(message);
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
if (obj.lastModifiedDate !== undefined) {
|
|
1025
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
1026
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
1027
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
1028
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
if (obj.name !== undefined) {
|
|
1032
|
+
const obj_name = obj.name;
|
|
1033
|
+
const path_name = path + '.name';
|
|
1034
|
+
if (typeof obj_name !== 'string') {
|
|
1035
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
if (obj.namespace !== undefined) {
|
|
1039
|
+
const obj_namespace = obj.namespace;
|
|
1040
|
+
const path_namespace = path + '.namespace';
|
|
1041
|
+
if (typeof obj_namespace !== 'string') {
|
|
1042
|
+
return new TypeError('Expected "string" but received "' + typeof obj_namespace + '" (at "' + path_namespace + '")');
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
if (obj.url !== undefined) {
|
|
1046
|
+
const obj_url = obj.url;
|
|
1047
|
+
const path_url = path + '.url';
|
|
1048
|
+
if (typeof obj_url !== 'string') {
|
|
1049
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
})();
|
|
1053
|
+
return v_error === undefined ? null : v_error;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
const VERSION$7 = "f502169b0ec369d5e3e577700c8835b6";
|
|
1057
|
+
function validate$8(obj, path = 'DataCleanRoomDataSpecificationRepresentation') {
|
|
1058
|
+
const v_error = (() => {
|
|
1059
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1060
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1061
|
+
}
|
|
1062
|
+
if (obj.createdBy !== undefined) {
|
|
1063
|
+
const obj_createdBy = obj.createdBy;
|
|
1064
|
+
const path_createdBy = path + '.createdBy';
|
|
1065
|
+
const referencepath_createdByValidationError = validate$g(obj_createdBy, path_createdBy);
|
|
1066
|
+
if (referencepath_createdByValidationError !== null) {
|
|
1067
|
+
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_createdBy + '")\n';
|
|
1068
|
+
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1069
|
+
return new TypeError(message);
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
if (obj.createdDate !== undefined) {
|
|
1073
|
+
const obj_createdDate = obj.createdDate;
|
|
1074
|
+
const path_createdDate = path + '.createdDate';
|
|
1075
|
+
if (typeof obj_createdDate !== 'string') {
|
|
1076
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
const obj_dataMapping = obj.dataMapping;
|
|
1080
|
+
const path_dataMapping = path + '.dataMapping';
|
|
1081
|
+
const referencepath_dataMappingValidationError = validate$9(obj_dataMapping, path_dataMapping);
|
|
1082
|
+
if (referencepath_dataMappingValidationError !== null) {
|
|
1083
|
+
let message = 'Object doesn\'t match UseCaseTemplateMappingRepresentation (at "' + path_dataMapping + '")\n';
|
|
1084
|
+
message += referencepath_dataMappingValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1085
|
+
return new TypeError(message);
|
|
1086
|
+
}
|
|
1087
|
+
const obj_dataSpaceName = obj.dataSpaceName;
|
|
1088
|
+
const path_dataSpaceName = path + '.dataSpaceName';
|
|
1089
|
+
if (typeof obj_dataSpaceName !== 'string') {
|
|
1090
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dataSpaceName + '" (at "' + path_dataSpaceName + '")');
|
|
1091
|
+
}
|
|
1092
|
+
if (obj.description !== undefined) {
|
|
1093
|
+
const obj_description = obj.description;
|
|
1094
|
+
const path_description = path + '.description';
|
|
1095
|
+
if (typeof obj_description !== 'string') {
|
|
1096
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
const obj_id = obj.id;
|
|
1100
|
+
const path_id = path + '.id';
|
|
1101
|
+
if (typeof obj_id !== 'string') {
|
|
1102
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1103
|
+
}
|
|
1104
|
+
if (obj.label !== undefined) {
|
|
1105
|
+
const obj_label = obj.label;
|
|
1106
|
+
const path_label = path + '.label';
|
|
1107
|
+
if (typeof obj_label !== 'string') {
|
|
1108
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
if (obj.lastModifiedBy !== undefined) {
|
|
1112
|
+
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
1113
|
+
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
1114
|
+
const referencepath_lastModifiedByValidationError = validate$g(obj_lastModifiedBy, path_lastModifiedBy);
|
|
1115
|
+
if (referencepath_lastModifiedByValidationError !== null) {
|
|
1116
|
+
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_lastModifiedBy + '")\n';
|
|
1117
|
+
message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1118
|
+
return new TypeError(message);
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
if (obj.lastModifiedDate !== undefined) {
|
|
1122
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
1123
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
1124
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
1125
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
const obj_memberType = obj.memberType;
|
|
1129
|
+
const path_memberType = path + '.memberType';
|
|
1130
|
+
if (typeof obj_memberType !== 'string') {
|
|
1131
|
+
return new TypeError('Expected "string" but received "' + typeof obj_memberType + '" (at "' + path_memberType + '")');
|
|
1132
|
+
}
|
|
1133
|
+
if (obj.name !== undefined) {
|
|
1134
|
+
const obj_name = obj.name;
|
|
1135
|
+
const path_name = path + '.name';
|
|
1136
|
+
if (typeof obj_name !== 'string') {
|
|
1137
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
if (obj.namespace !== undefined) {
|
|
1141
|
+
const obj_namespace = obj.namespace;
|
|
1142
|
+
const path_namespace = path + '.namespace';
|
|
1143
|
+
if (typeof obj_namespace !== 'string') {
|
|
1144
|
+
return new TypeError('Expected "string" but received "' + typeof obj_namespace + '" (at "' + path_namespace + '")');
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
if (obj.ownerOrgId !== undefined) {
|
|
1148
|
+
const obj_ownerOrgId = obj.ownerOrgId;
|
|
1149
|
+
const path_ownerOrgId = path + '.ownerOrgId';
|
|
1150
|
+
if (typeof obj_ownerOrgId !== 'string') {
|
|
1151
|
+
return new TypeError('Expected "string" but received "' + typeof obj_ownerOrgId + '" (at "' + path_ownerOrgId + '")');
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
const obj_status = obj.status;
|
|
1155
|
+
const path_status = path + '.status';
|
|
1156
|
+
if (typeof obj_status !== 'string') {
|
|
1157
|
+
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
1158
|
+
}
|
|
1159
|
+
const obj_templateName = obj.templateName;
|
|
1160
|
+
const path_templateName = path + '.templateName';
|
|
1161
|
+
if (typeof obj_templateName !== 'string') {
|
|
1162
|
+
return new TypeError('Expected "string" but received "' + typeof obj_templateName + '" (at "' + path_templateName + '")');
|
|
1163
|
+
}
|
|
1164
|
+
if (obj.url !== undefined) {
|
|
1165
|
+
const obj_url = obj.url;
|
|
1166
|
+
const path_url = path + '.url';
|
|
1167
|
+
if (typeof obj_url !== 'string') {
|
|
1168
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
})();
|
|
1172
|
+
return v_error === undefined ? null : v_error;
|
|
1173
|
+
}
|
|
1174
|
+
const RepresentationType$7 = 'DataCleanRoomDataSpecificationRepresentation';
|
|
1175
|
+
function keyBuilder$b(luvio, config) {
|
|
1176
|
+
return keyPrefix + '::' + RepresentationType$7 + ':' + config.id;
|
|
1177
|
+
}
|
|
1178
|
+
function keyBuilderFromType$3(luvio, object) {
|
|
1179
|
+
const keyParams = {
|
|
1180
|
+
id: object.id
|
|
1181
|
+
};
|
|
1182
|
+
return keyBuilder$b(luvio, keyParams);
|
|
1183
|
+
}
|
|
1184
|
+
function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
1185
|
+
return input;
|
|
1186
|
+
}
|
|
1187
|
+
const select$g = function DataCleanRoomDataSpecificationRepresentationSelect() {
|
|
1188
|
+
return {
|
|
1189
|
+
kind: 'Fragment',
|
|
1190
|
+
version: VERSION$7,
|
|
1191
|
+
private: [],
|
|
1192
|
+
opaque: true
|
|
1193
|
+
};
|
|
1194
|
+
};
|
|
1195
|
+
function equals$7(existing, incoming) {
|
|
1196
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1197
|
+
return false;
|
|
1198
|
+
}
|
|
1199
|
+
return true;
|
|
1200
|
+
}
|
|
1201
|
+
const ingest$7 = function DataCleanRoomDataSpecificationRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1202
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1203
|
+
const validateError = validate$8(input);
|
|
1204
|
+
if (validateError !== null) {
|
|
1205
|
+
throw validateError;
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
const key = keyBuilderFromType$3(luvio, input);
|
|
1209
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1210
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "data-clean-room", VERSION$7, RepresentationType$7, equals$7);
|
|
1211
|
+
return createLink(key);
|
|
1212
|
+
};
|
|
1213
|
+
function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
|
|
1214
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1215
|
+
const rootKey = keyBuilderFromType$3(luvio, input);
|
|
1216
|
+
rootKeySet.set(rootKey, {
|
|
1217
|
+
namespace: keyPrefix,
|
|
1218
|
+
representationName: RepresentationType$7,
|
|
1219
|
+
mergeable: false
|
|
1220
|
+
});
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
const VERSION$6 = "6fb37e337652e88218f2171d1e56647b";
|
|
1224
|
+
function validate$7(obj, path = 'DataCleanRoomSpecificationCollectionRepresentation') {
|
|
1225
|
+
const v_error = (() => {
|
|
1226
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1227
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1228
|
+
}
|
|
1229
|
+
const obj_cleanroomSpecifications = obj.cleanroomSpecifications;
|
|
1230
|
+
const path_cleanroomSpecifications = path + '.cleanroomSpecifications';
|
|
1231
|
+
if (!ArrayIsArray(obj_cleanroomSpecifications)) {
|
|
1232
|
+
return new TypeError('Expected "array" but received "' + typeof obj_cleanroomSpecifications + '" (at "' + path_cleanroomSpecifications + '")');
|
|
1233
|
+
}
|
|
1234
|
+
for (let i = 0; i < obj_cleanroomSpecifications.length; i++) {
|
|
1235
|
+
const obj_cleanroomSpecifications_item = obj_cleanroomSpecifications[i];
|
|
1236
|
+
const path_cleanroomSpecifications_item = path_cleanroomSpecifications + '[' + i + ']';
|
|
1237
|
+
if (typeof obj_cleanroomSpecifications_item !== 'object') {
|
|
1238
|
+
return new TypeError('Expected "object" but received "' + typeof obj_cleanroomSpecifications_item + '" (at "' + path_cleanroomSpecifications_item + '")');
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
if (obj.currentPageUrl !== undefined) {
|
|
1242
|
+
const obj_currentPageUrl = obj.currentPageUrl;
|
|
1243
|
+
const path_currentPageUrl = path + '.currentPageUrl';
|
|
1244
|
+
if (typeof obj_currentPageUrl !== 'string') {
|
|
1245
|
+
return new TypeError('Expected "string" but received "' + typeof obj_currentPageUrl + '" (at "' + path_currentPageUrl + '")');
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
const obj_limit = obj.limit;
|
|
1249
|
+
const path_limit = path + '.limit';
|
|
1250
|
+
if (typeof obj_limit !== 'number' || (typeof obj_limit === 'number' && Math.floor(obj_limit) !== obj_limit)) {
|
|
1251
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_limit + '" (at "' + path_limit + '")');
|
|
1252
|
+
}
|
|
1253
|
+
if (obj.nextPageUrl !== undefined) {
|
|
1254
|
+
const obj_nextPageUrl = obj.nextPageUrl;
|
|
1255
|
+
const path_nextPageUrl = path + '.nextPageUrl';
|
|
1256
|
+
let obj_nextPageUrl_union0 = null;
|
|
1257
|
+
const obj_nextPageUrl_union0_error = (() => {
|
|
1258
|
+
if (typeof obj_nextPageUrl !== 'string') {
|
|
1259
|
+
return new TypeError('Expected "string" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
|
|
1260
|
+
}
|
|
1261
|
+
})();
|
|
1262
|
+
if (obj_nextPageUrl_union0_error != null) {
|
|
1263
|
+
obj_nextPageUrl_union0 = obj_nextPageUrl_union0_error.message;
|
|
1264
|
+
}
|
|
1265
|
+
let obj_nextPageUrl_union1 = null;
|
|
1266
|
+
const obj_nextPageUrl_union1_error = (() => {
|
|
1267
|
+
if (obj_nextPageUrl !== null) {
|
|
1268
|
+
return new TypeError('Expected "null" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
|
|
1269
|
+
}
|
|
1270
|
+
})();
|
|
1271
|
+
if (obj_nextPageUrl_union1_error != null) {
|
|
1272
|
+
obj_nextPageUrl_union1 = obj_nextPageUrl_union1_error.message;
|
|
1273
|
+
}
|
|
1274
|
+
if (obj_nextPageUrl_union0 && obj_nextPageUrl_union1) {
|
|
1275
|
+
let message = 'Object doesn\'t match union (at "' + path_nextPageUrl + '")';
|
|
1276
|
+
message += '\n' + obj_nextPageUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1277
|
+
message += '\n' + obj_nextPageUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1278
|
+
return new TypeError(message);
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
const obj_offset = obj.offset;
|
|
1282
|
+
const path_offset = path + '.offset';
|
|
1283
|
+
if (typeof obj_offset !== 'number' || (typeof obj_offset === 'number' && Math.floor(obj_offset) !== obj_offset)) {
|
|
1284
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_offset + '" (at "' + path_offset + '")');
|
|
1285
|
+
}
|
|
1286
|
+
if (obj.totalSize !== undefined) {
|
|
1287
|
+
const obj_totalSize = obj.totalSize;
|
|
1288
|
+
const path_totalSize = path + '.totalSize';
|
|
1289
|
+
if (typeof obj_totalSize !== 'number' || (typeof obj_totalSize === 'number' && Math.floor(obj_totalSize) !== obj_totalSize)) {
|
|
1290
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_totalSize + '" (at "' + path_totalSize + '")');
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
})();
|
|
1294
|
+
return v_error === undefined ? null : v_error;
|
|
1295
|
+
}
|
|
1296
|
+
const RepresentationType$6 = 'DataCleanRoomSpecificationCollectionRepresentation';
|
|
1297
|
+
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
1298
|
+
const input_cleanroomSpecifications = input.cleanroomSpecifications;
|
|
1299
|
+
const input_cleanroomSpecifications_id = path.fullPath + '__cleanroomSpecifications';
|
|
1300
|
+
for (let i = 0; i < input_cleanroomSpecifications.length; i++) {
|
|
1301
|
+
const input_cleanroomSpecifications_item = input_cleanroomSpecifications[i];
|
|
1302
|
+
let input_cleanroomSpecifications_item_id = input_cleanroomSpecifications_id + '__' + i;
|
|
1303
|
+
input_cleanroomSpecifications[i] = ingest$7(input_cleanroomSpecifications_item, {
|
|
1304
|
+
fullPath: input_cleanroomSpecifications_item_id,
|
|
1305
|
+
propertyName: i,
|
|
1306
|
+
parent: {
|
|
1307
|
+
data: input,
|
|
1308
|
+
key: path.fullPath,
|
|
1309
|
+
existing: existing,
|
|
1310
|
+
},
|
|
1311
|
+
ttl: path.ttl
|
|
1312
|
+
}, luvio, store, timestamp);
|
|
1313
|
+
}
|
|
1314
|
+
return input;
|
|
1315
|
+
}
|
|
1316
|
+
const select$f = function DataCleanRoomSpecificationCollectionRepresentationSelect() {
|
|
1317
|
+
return {
|
|
1318
|
+
kind: 'Fragment',
|
|
1319
|
+
version: VERSION$6,
|
|
1320
|
+
private: [],
|
|
1321
|
+
selections: [
|
|
1322
|
+
{
|
|
1323
|
+
name: 'cleanroomSpecifications',
|
|
1324
|
+
kind: 'Link',
|
|
1325
|
+
plural: true,
|
|
1326
|
+
fragment: select$g()
|
|
1327
|
+
},
|
|
1328
|
+
{
|
|
1329
|
+
name: 'currentPageUrl',
|
|
1330
|
+
kind: 'Scalar',
|
|
1331
|
+
required: false
|
|
1332
|
+
},
|
|
1333
|
+
{
|
|
1334
|
+
name: 'limit',
|
|
1335
|
+
kind: 'Scalar'
|
|
1336
|
+
},
|
|
1337
|
+
{
|
|
1338
|
+
name: 'nextPageUrl',
|
|
1339
|
+
kind: 'Scalar',
|
|
1340
|
+
required: false
|
|
1341
|
+
},
|
|
1342
|
+
{
|
|
1343
|
+
name: 'offset',
|
|
1344
|
+
kind: 'Scalar'
|
|
1345
|
+
},
|
|
1346
|
+
{
|
|
1347
|
+
name: 'totalSize',
|
|
1348
|
+
kind: 'Scalar',
|
|
1349
|
+
required: false
|
|
1350
|
+
}
|
|
1351
|
+
]
|
|
1352
|
+
};
|
|
1353
|
+
};
|
|
1354
|
+
function equals$6(existing, incoming) {
|
|
1355
|
+
const existing_limit = existing.limit;
|
|
1356
|
+
const incoming_limit = incoming.limit;
|
|
1357
|
+
if (!(existing_limit === incoming_limit)) {
|
|
1358
|
+
return false;
|
|
1359
|
+
}
|
|
1360
|
+
const existing_offset = existing.offset;
|
|
1361
|
+
const incoming_offset = incoming.offset;
|
|
1362
|
+
if (!(existing_offset === incoming_offset)) {
|
|
1363
|
+
return false;
|
|
1364
|
+
}
|
|
1365
|
+
const existing_totalSize = existing.totalSize;
|
|
1366
|
+
const incoming_totalSize = incoming.totalSize;
|
|
1367
|
+
// if at least one of these optionals is defined
|
|
1368
|
+
if (existing_totalSize !== undefined || incoming_totalSize !== undefined) {
|
|
1369
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1370
|
+
// not equal
|
|
1371
|
+
if (existing_totalSize === undefined || incoming_totalSize === undefined) {
|
|
1372
|
+
return false;
|
|
1373
|
+
}
|
|
1374
|
+
if (!(existing_totalSize === incoming_totalSize)) {
|
|
1375
|
+
return false;
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
const existing_currentPageUrl = existing.currentPageUrl;
|
|
1379
|
+
const incoming_currentPageUrl = incoming.currentPageUrl;
|
|
1380
|
+
// if at least one of these optionals is defined
|
|
1381
|
+
if (existing_currentPageUrl !== undefined || incoming_currentPageUrl !== undefined) {
|
|
1382
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1383
|
+
// not equal
|
|
1384
|
+
if (existing_currentPageUrl === undefined || incoming_currentPageUrl === undefined) {
|
|
1385
|
+
return false;
|
|
1386
|
+
}
|
|
1387
|
+
if (!(existing_currentPageUrl === incoming_currentPageUrl)) {
|
|
1388
|
+
return false;
|
|
1389
|
+
}
|
|
1390
|
+
}
|
|
1391
|
+
const existing_cleanroomSpecifications = existing.cleanroomSpecifications;
|
|
1392
|
+
const incoming_cleanroomSpecifications = incoming.cleanroomSpecifications;
|
|
1393
|
+
const equals_cleanroomSpecifications_items = equalsArray(existing_cleanroomSpecifications, incoming_cleanroomSpecifications, (existing_cleanroomSpecifications_item, incoming_cleanroomSpecifications_item) => {
|
|
1394
|
+
if (!(existing_cleanroomSpecifications_item.__ref === incoming_cleanroomSpecifications_item.__ref)) {
|
|
1395
|
+
return false;
|
|
1396
|
+
}
|
|
1397
|
+
});
|
|
1398
|
+
if (equals_cleanroomSpecifications_items === false) {
|
|
1399
|
+
return false;
|
|
1400
|
+
}
|
|
1401
|
+
const existing_nextPageUrl = existing.nextPageUrl;
|
|
1402
|
+
const incoming_nextPageUrl = incoming.nextPageUrl;
|
|
1403
|
+
// if at least one of these optionals is defined
|
|
1404
|
+
if (existing_nextPageUrl !== undefined || incoming_nextPageUrl !== undefined) {
|
|
1405
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1406
|
+
// not equal
|
|
1407
|
+
if (existing_nextPageUrl === undefined || incoming_nextPageUrl === undefined) {
|
|
1408
|
+
return false;
|
|
1409
|
+
}
|
|
1410
|
+
if (!(existing_nextPageUrl === incoming_nextPageUrl)) {
|
|
1411
|
+
return false;
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
return true;
|
|
1415
|
+
}
|
|
1416
|
+
const ingest$6 = function DataCleanRoomSpecificationCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1417
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1418
|
+
const validateError = validate$7(input);
|
|
1419
|
+
if (validateError !== null) {
|
|
1420
|
+
throw validateError;
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
const key = path.fullPath;
|
|
1424
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1425
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "data-clean-room", VERSION$6, RepresentationType$6, equals$6);
|
|
1426
|
+
return createLink(key);
|
|
1427
|
+
};
|
|
1428
|
+
function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
|
|
1429
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1430
|
+
const rootKey = fullPathFactory();
|
|
1431
|
+
rootKeySet.set(rootKey, {
|
|
1432
|
+
namespace: keyPrefix,
|
|
1433
|
+
representationName: RepresentationType$6,
|
|
1434
|
+
mergeable: false
|
|
1435
|
+
});
|
|
1436
|
+
const input_cleanroomSpecifications_length = input.cleanroomSpecifications.length;
|
|
1437
|
+
for (let i = 0; i < input_cleanroomSpecifications_length; i++) {
|
|
1438
|
+
getTypeCacheKeys$7(rootKeySet, luvio, input.cleanroomSpecifications[i]);
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
function select$e(luvio, params) {
|
|
1443
|
+
return select$f();
|
|
1444
|
+
}
|
|
1445
|
+
function keyBuilder$a(luvio, params) {
|
|
1446
|
+
return keyPrefix + '::DataCleanRoomSpecificationCollectionRepresentation:(' + 'filters:' + params.queryParams.filters + ',' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'orderBy:' + params.queryParams.orderBy + ')';
|
|
1447
|
+
}
|
|
1448
|
+
function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
|
|
1449
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response, () => keyBuilder$a(luvio, resourceParams));
|
|
1450
|
+
}
|
|
1451
|
+
function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
1452
|
+
const { body } = response;
|
|
1453
|
+
const key = keyBuilder$a(luvio, resourceParams);
|
|
1454
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
1455
|
+
const snapshot = luvio.storeLookup({
|
|
1456
|
+
recordId: key,
|
|
1457
|
+
node: select$e(),
|
|
1458
|
+
variables: {},
|
|
1459
|
+
}, snapshotRefresh);
|
|
1460
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1461
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1462
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1463
|
+
}
|
|
1464
|
+
}
|
|
1465
|
+
deepFreeze(snapshot.data);
|
|
1466
|
+
return snapshot;
|
|
1467
|
+
}
|
|
1468
|
+
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
1469
|
+
const key = keyBuilder$a(luvio, params);
|
|
1470
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1471
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
1472
|
+
return errorSnapshot;
|
|
1473
|
+
}
|
|
1474
|
+
function createResourceRequest$8(config) {
|
|
1475
|
+
const headers = {};
|
|
1476
|
+
return {
|
|
1477
|
+
baseUri: '/services/data/v64.0',
|
|
1478
|
+
basePath: '/ssot/data-clean-room/specifications',
|
|
1479
|
+
method: 'get',
|
|
1480
|
+
body: null,
|
|
1481
|
+
urlParams: {},
|
|
1482
|
+
queryParams: config.queryParams,
|
|
1483
|
+
headers,
|
|
1484
|
+
priority: 'normal',
|
|
1485
|
+
};
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
const adapterName$8 = 'getDataCleanRoomSpecificationsPaginated';
|
|
1489
|
+
const getDataCleanRoomSpecificationsPaginated_ConfigPropertyMetadata = [
|
|
1490
|
+
generateParamConfigMetadata('filters', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1491
|
+
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1492
|
+
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1493
|
+
generateParamConfigMetadata('orderBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1494
|
+
];
|
|
1495
|
+
const getDataCleanRoomSpecificationsPaginated_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, getDataCleanRoomSpecificationsPaginated_ConfigPropertyMetadata);
|
|
1496
|
+
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$b(getDataCleanRoomSpecificationsPaginated_ConfigPropertyMetadata);
|
|
1497
|
+
function keyBuilder$9(luvio, config) {
|
|
1498
|
+
const resourceParams = createResourceParams$8(config);
|
|
1499
|
+
return keyBuilder$a(luvio, resourceParams);
|
|
1500
|
+
}
|
|
1501
|
+
function typeCheckConfig$8(untrustedConfig) {
|
|
1502
|
+
const config = {};
|
|
1503
|
+
typeCheckConfig$b(untrustedConfig, config, getDataCleanRoomSpecificationsPaginated_ConfigPropertyMetadata);
|
|
1504
|
+
return config;
|
|
1505
|
+
}
|
|
1506
|
+
function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
|
|
1507
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1508
|
+
return null;
|
|
1509
|
+
}
|
|
1510
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1511
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1512
|
+
}
|
|
1513
|
+
const config = typeCheckConfig$8(untrustedConfig);
|
|
1514
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1515
|
+
return null;
|
|
1516
|
+
}
|
|
1517
|
+
return config;
|
|
1518
|
+
}
|
|
1519
|
+
function adapterFragment$3(luvio, config) {
|
|
1520
|
+
createResourceParams$8(config);
|
|
1521
|
+
return select$e();
|
|
1522
|
+
}
|
|
1523
|
+
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
1524
|
+
const snapshot = ingestSuccess$8(luvio, resourceParams, response, {
|
|
1525
|
+
config,
|
|
1526
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
1527
|
+
});
|
|
1528
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1529
|
+
}
|
|
1530
|
+
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
1531
|
+
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
1532
|
+
config,
|
|
1533
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
1534
|
+
});
|
|
1535
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1536
|
+
}
|
|
1537
|
+
function buildNetworkSnapshot$8(luvio, config, options) {
|
|
1538
|
+
const resourceParams = createResourceParams$8(config);
|
|
1539
|
+
const request = createResourceRequest$8(resourceParams);
|
|
1540
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1541
|
+
.then((response) => {
|
|
1542
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
1543
|
+
const cache = new StoreKeyMap();
|
|
1544
|
+
getResponseCacheKeys$8(cache, luvio, resourceParams, response.body);
|
|
1545
|
+
return cache;
|
|
1546
|
+
});
|
|
1547
|
+
}, (response) => {
|
|
1548
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
|
|
1549
|
+
});
|
|
1550
|
+
}
|
|
1551
|
+
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
1552
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$8, undefined, false);
|
|
1553
|
+
}
|
|
1554
|
+
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
1555
|
+
const { luvio, config } = context;
|
|
1556
|
+
const selector = {
|
|
1557
|
+
recordId: keyBuilder$9(luvio, config),
|
|
1558
|
+
node: adapterFragment$3(luvio, config),
|
|
1559
|
+
variables: {},
|
|
1560
|
+
};
|
|
1561
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1562
|
+
config,
|
|
1563
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
1564
|
+
});
|
|
1565
|
+
return cacheSnapshot;
|
|
1566
|
+
}
|
|
1567
|
+
const getDataCleanRoomSpecificationsPaginatedAdapterFactory = (luvio) => function dataCleanRoom__getDataCleanRoomSpecificationsPaginated(untrustedConfig, requestContext) {
|
|
1568
|
+
const config = validateAdapterConfig$8(untrustedConfig, getDataCleanRoomSpecificationsPaginated_ConfigPropertyNames);
|
|
1569
|
+
// Invalid or incomplete config
|
|
1570
|
+
if (config === null) {
|
|
1571
|
+
return null;
|
|
1572
|
+
}
|
|
1573
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1574
|
+
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
1575
|
+
};
|
|
1576
|
+
|
|
1577
|
+
function select$d(luvio, params) {
|
|
1578
|
+
return select$g();
|
|
1579
|
+
}
|
|
1580
|
+
function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
|
|
1581
|
+
getTypeCacheKeys$7(storeKeyMap, luvio, response);
|
|
1582
|
+
}
|
|
1583
|
+
function ingestSuccess$7(luvio, resourceParams, response) {
|
|
1584
|
+
const { body } = response;
|
|
1585
|
+
const key = keyBuilderFromType$3(luvio, body);
|
|
1586
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
1587
|
+
const snapshot = luvio.storeLookup({
|
|
1588
|
+
recordId: key,
|
|
1589
|
+
node: select$d(),
|
|
1590
|
+
variables: {},
|
|
1591
|
+
});
|
|
1592
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1593
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1594
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
deepFreeze(snapshot.data);
|
|
1598
|
+
return snapshot;
|
|
1599
|
+
}
|
|
1600
|
+
function createResourceRequest$7(config) {
|
|
1601
|
+
const headers = {};
|
|
1602
|
+
return {
|
|
1603
|
+
baseUri: '/services/data/v64.0',
|
|
1604
|
+
basePath: '/ssot/data-clean-room/specifications',
|
|
1605
|
+
method: 'post',
|
|
1606
|
+
body: config.body,
|
|
1607
|
+
urlParams: {},
|
|
1608
|
+
queryParams: {},
|
|
1609
|
+
headers,
|
|
1610
|
+
priority: 'normal',
|
|
1611
|
+
};
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
const adapterName$7 = 'createDataCleanRoomSpecification';
|
|
1615
|
+
const createDataCleanRoomSpecification_ConfigPropertyMetadata = [
|
|
1616
|
+
generateParamConfigMetadata('dataMapping', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1617
|
+
generateParamConfigMetadata('memberType', true, 2 /* Body */, 0 /* String */),
|
|
1618
|
+
generateParamConfigMetadata('ownerOrgId', true, 2 /* Body */, 0 /* String */),
|
|
1619
|
+
generateParamConfigMetadata('templateName', true, 2 /* Body */, 0 /* String */),
|
|
1620
|
+
generateParamConfigMetadata('name', false, 2 /* Body */, 0 /* String */),
|
|
1621
|
+
generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
|
|
1622
|
+
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
1623
|
+
generateParamConfigMetadata('dataspaceName', false, 2 /* Body */, 0 /* String */),
|
|
1624
|
+
];
|
|
1625
|
+
const createDataCleanRoomSpecification_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, createDataCleanRoomSpecification_ConfigPropertyMetadata);
|
|
1626
|
+
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$b(createDataCleanRoomSpecification_ConfigPropertyMetadata);
|
|
1627
|
+
function typeCheckConfig$7(untrustedConfig) {
|
|
1628
|
+
const config = {};
|
|
1629
|
+
typeCheckConfig$b(untrustedConfig, config, createDataCleanRoomSpecification_ConfigPropertyMetadata);
|
|
1630
|
+
const untrustedConfig_dataMapping = untrustedConfig.dataMapping;
|
|
1631
|
+
config.dataMapping = untrustedConfig_dataMapping;
|
|
1632
|
+
return config;
|
|
1633
|
+
}
|
|
1634
|
+
function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
|
|
1635
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1636
|
+
return null;
|
|
1637
|
+
}
|
|
1638
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1639
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1640
|
+
}
|
|
1641
|
+
const config = typeCheckConfig$7(untrustedConfig);
|
|
1642
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1643
|
+
return null;
|
|
1644
|
+
}
|
|
1645
|
+
return config;
|
|
1646
|
+
}
|
|
1647
|
+
function buildNetworkSnapshot$7(luvio, config, options) {
|
|
1648
|
+
const resourceParams = createResourceParams$7(config);
|
|
1649
|
+
const request = createResourceRequest$7(resourceParams);
|
|
1650
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1651
|
+
.then((response) => {
|
|
1652
|
+
return luvio.handleSuccessResponse(() => {
|
|
1653
|
+
const snapshot = ingestSuccess$7(luvio, resourceParams, response);
|
|
1654
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1655
|
+
}, () => {
|
|
1656
|
+
const cache = new StoreKeyMap();
|
|
1657
|
+
getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
|
|
1658
|
+
return cache;
|
|
1659
|
+
});
|
|
1660
|
+
}, (response) => {
|
|
1661
|
+
deepFreeze(response);
|
|
1662
|
+
throw response;
|
|
1663
|
+
});
|
|
1664
|
+
}
|
|
1665
|
+
const createDataCleanRoomSpecificationAdapterFactory = (luvio) => {
|
|
1666
|
+
return function createDataCleanRoomSpecification(untrustedConfig) {
|
|
1667
|
+
const config = validateAdapterConfig$7(untrustedConfig, createDataCleanRoomSpecification_ConfigPropertyNames);
|
|
1668
|
+
// Invalid or incomplete config
|
|
1669
|
+
if (config === null) {
|
|
1670
|
+
throw new Error('Invalid config for "createDataCleanRoomSpecification"');
|
|
1671
|
+
}
|
|
1672
|
+
return buildNetworkSnapshot$7(luvio, config);
|
|
1673
|
+
};
|
|
1674
|
+
};
|
|
1675
|
+
|
|
1676
|
+
const VERSION$5 = "60e6b0a7bcb30c169435125696ac47b1";
|
|
1677
|
+
function validate$6(obj, path = 'DataCleanRoomMemberRepresentation') {
|
|
1678
|
+
const v_error = (() => {
|
|
1679
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1680
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1681
|
+
}
|
|
1682
|
+
const obj_invitationId = obj.invitationId;
|
|
1683
|
+
const path_invitationId = path + '.invitationId';
|
|
1684
|
+
if (typeof obj_invitationId !== 'string') {
|
|
1685
|
+
return new TypeError('Expected "string" but received "' + typeof obj_invitationId + '" (at "' + path_invitationId + '")');
|
|
1686
|
+
}
|
|
1687
|
+
const obj_invitationStatus = obj.invitationStatus;
|
|
1688
|
+
const path_invitationStatus = path + '.invitationStatus';
|
|
1689
|
+
if (typeof obj_invitationStatus !== 'string') {
|
|
1690
|
+
return new TypeError('Expected "string" but received "' + typeof obj_invitationStatus + '" (at "' + path_invitationStatus + '")');
|
|
1691
|
+
}
|
|
1692
|
+
const obj_memberId = obj.memberId;
|
|
1693
|
+
const path_memberId = path + '.memberId';
|
|
1694
|
+
if (typeof obj_memberId !== 'string') {
|
|
1695
|
+
return new TypeError('Expected "string" but received "' + typeof obj_memberId + '" (at "' + path_memberId + '")');
|
|
1696
|
+
}
|
|
1697
|
+
const obj_memberOrgId = obj.memberOrgId;
|
|
1698
|
+
const path_memberOrgId = path + '.memberOrgId';
|
|
1699
|
+
if (typeof obj_memberOrgId !== 'string') {
|
|
1700
|
+
return new TypeError('Expected "string" but received "' + typeof obj_memberOrgId + '" (at "' + path_memberOrgId + '")');
|
|
1701
|
+
}
|
|
1702
|
+
const obj_memberStatus = obj.memberStatus;
|
|
1703
|
+
const path_memberStatus = path + '.memberStatus';
|
|
1704
|
+
if (typeof obj_memberStatus !== 'string') {
|
|
1705
|
+
return new TypeError('Expected "string" but received "' + typeof obj_memberStatus + '" (at "' + path_memberStatus + '")');
|
|
1706
|
+
}
|
|
1707
|
+
const obj_memberType = obj.memberType;
|
|
1708
|
+
const path_memberType = path + '.memberType';
|
|
1709
|
+
if (typeof obj_memberType !== 'string') {
|
|
1710
|
+
return new TypeError('Expected "string" but received "' + typeof obj_memberType + '" (at "' + path_memberType + '")');
|
|
1711
|
+
}
|
|
1712
|
+
const obj_providerId = obj.providerId;
|
|
1713
|
+
const path_providerId = path + '.providerId';
|
|
1714
|
+
if (typeof obj_providerId !== 'string') {
|
|
1715
|
+
return new TypeError('Expected "string" but received "' + typeof obj_providerId + '" (at "' + path_providerId + '")');
|
|
1716
|
+
}
|
|
1717
|
+
if (obj.specificationId !== undefined) {
|
|
1718
|
+
const obj_specificationId = obj.specificationId;
|
|
1719
|
+
const path_specificationId = path + '.specificationId';
|
|
1720
|
+
if (typeof obj_specificationId !== 'string') {
|
|
1721
|
+
return new TypeError('Expected "string" but received "' + typeof obj_specificationId + '" (at "' + path_specificationId + '")');
|
|
1722
|
+
}
|
|
1723
|
+
}
|
|
1724
|
+
})();
|
|
1725
|
+
return v_error === undefined ? null : v_error;
|
|
1726
|
+
}
|
|
1727
|
+
const RepresentationType$5 = 'DataCleanRoomMemberRepresentation';
|
|
1728
|
+
function keyBuilder$8(luvio, config) {
|
|
1729
|
+
return keyPrefix + '::' + RepresentationType$5 + ':' + config.invitationId;
|
|
1730
|
+
}
|
|
1731
|
+
function keyBuilderFromType$2(luvio, object) {
|
|
1732
|
+
const keyParams = {
|
|
1733
|
+
invitationId: object.invitationId
|
|
1734
|
+
};
|
|
1735
|
+
return keyBuilder$8(luvio, keyParams);
|
|
1736
|
+
}
|
|
1737
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
1738
|
+
return input;
|
|
1739
|
+
}
|
|
1740
|
+
const select$c = function DataCleanRoomMemberRepresentationSelect() {
|
|
1741
|
+
return {
|
|
1742
|
+
kind: 'Fragment',
|
|
1743
|
+
version: VERSION$5,
|
|
1744
|
+
private: [],
|
|
1745
|
+
opaque: true
|
|
1746
|
+
};
|
|
1747
|
+
};
|
|
1748
|
+
function equals$5(existing, incoming) {
|
|
1749
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1750
|
+
return false;
|
|
1751
|
+
}
|
|
1752
|
+
return true;
|
|
1753
|
+
}
|
|
1754
|
+
const ingest$5 = function DataCleanRoomMemberRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1755
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1756
|
+
const validateError = validate$6(input);
|
|
1757
|
+
if (validateError !== null) {
|
|
1758
|
+
throw validateError;
|
|
1759
|
+
}
|
|
1760
|
+
}
|
|
1761
|
+
const key = keyBuilderFromType$2(luvio, input);
|
|
1762
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1763
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "data-clean-room", VERSION$5, RepresentationType$5, equals$5);
|
|
1764
|
+
return createLink(key);
|
|
1765
|
+
};
|
|
1766
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
1767
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1768
|
+
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
1769
|
+
rootKeySet.set(rootKey, {
|
|
1770
|
+
namespace: keyPrefix,
|
|
1771
|
+
representationName: RepresentationType$5,
|
|
1772
|
+
mergeable: false
|
|
1773
|
+
});
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1776
|
+
function validate$5(obj, path = 'DataCleanRoomTemplateRepresentation') {
|
|
1777
|
+
const v_error = (() => {
|
|
1778
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1779
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1780
|
+
}
|
|
1781
|
+
const obj_configuration = obj.configuration;
|
|
1782
|
+
const path_configuration = path + '.configuration';
|
|
1783
|
+
if (obj_configuration === undefined) {
|
|
1784
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_configuration + '" (at "' + path_configuration + '")');
|
|
1785
|
+
}
|
|
1786
|
+
if (obj.createdBy !== undefined) {
|
|
1787
|
+
const obj_createdBy = obj.createdBy;
|
|
1788
|
+
const path_createdBy = path + '.createdBy';
|
|
1789
|
+
const referencepath_createdByValidationError = validate$g(obj_createdBy, path_createdBy);
|
|
1790
|
+
if (referencepath_createdByValidationError !== null) {
|
|
1791
|
+
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_createdBy + '")\n';
|
|
1792
|
+
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1793
|
+
return new TypeError(message);
|
|
1794
|
+
}
|
|
1795
|
+
}
|
|
1796
|
+
if (obj.createdDate !== undefined) {
|
|
1797
|
+
const obj_createdDate = obj.createdDate;
|
|
1798
|
+
const path_createdDate = path + '.createdDate';
|
|
1799
|
+
if (typeof obj_createdDate !== 'string') {
|
|
1800
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
1801
|
+
}
|
|
1802
|
+
}
|
|
1803
|
+
const obj_description = obj.description;
|
|
1804
|
+
const path_description = path + '.description';
|
|
1805
|
+
if (typeof obj_description !== 'string') {
|
|
1806
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
1807
|
+
}
|
|
1808
|
+
if (obj.id !== undefined) {
|
|
1809
|
+
const obj_id = obj.id;
|
|
1810
|
+
const path_id = path + '.id';
|
|
1811
|
+
if (typeof obj_id !== 'string') {
|
|
1812
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1815
|
+
if (obj.label !== undefined) {
|
|
1816
|
+
const obj_label = obj.label;
|
|
1817
|
+
const path_label = path + '.label';
|
|
1818
|
+
if (typeof obj_label !== 'string') {
|
|
1819
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
if (obj.lastModifiedBy !== undefined) {
|
|
1823
|
+
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
1824
|
+
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
1825
|
+
const referencepath_lastModifiedByValidationError = validate$g(obj_lastModifiedBy, path_lastModifiedBy);
|
|
1826
|
+
if (referencepath_lastModifiedByValidationError !== null) {
|
|
1827
|
+
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_lastModifiedBy + '")\n';
|
|
1828
|
+
message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1829
|
+
return new TypeError(message);
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
if (obj.lastModifiedDate !== undefined) {
|
|
1833
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
1834
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
1835
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
1836
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
1837
|
+
}
|
|
1838
|
+
}
|
|
1839
|
+
if (obj.name !== undefined) {
|
|
1840
|
+
const obj_name = obj.name;
|
|
1841
|
+
const path_name = path + '.name';
|
|
1842
|
+
if (typeof obj_name !== 'string') {
|
|
1843
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1844
|
+
}
|
|
1845
|
+
}
|
|
1846
|
+
if (obj.namespace !== undefined) {
|
|
1847
|
+
const obj_namespace = obj.namespace;
|
|
1848
|
+
const path_namespace = path + '.namespace';
|
|
1849
|
+
if (typeof obj_namespace !== 'string') {
|
|
1850
|
+
return new TypeError('Expected "string" but received "' + typeof obj_namespace + '" (at "' + path_namespace + '")');
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1853
|
+
const obj_queryTemplate = obj.queryTemplate;
|
|
1854
|
+
const path_queryTemplate = path + '.queryTemplate';
|
|
1855
|
+
if (obj_queryTemplate === undefined) {
|
|
1856
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_queryTemplate + '" (at "' + path_queryTemplate + '")');
|
|
1857
|
+
}
|
|
1858
|
+
if (obj.url !== undefined) {
|
|
1859
|
+
const obj_url = obj.url;
|
|
1860
|
+
const path_url = path + '.url';
|
|
1861
|
+
if (typeof obj_url !== 'string') {
|
|
1862
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
1863
|
+
}
|
|
1864
|
+
}
|
|
1865
|
+
})();
|
|
1866
|
+
return v_error === undefined ? null : v_error;
|
|
1867
|
+
}
|
|
1868
|
+
|
|
1869
|
+
const VERSION$4 = "11bd9b71debcc363b339183bc8d65735";
|
|
1870
|
+
function validate$4(obj, path = 'DataCleanRoomCollaborationRepresentation') {
|
|
1871
|
+
const v_error = (() => {
|
|
1872
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1873
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1874
|
+
}
|
|
1875
|
+
if (obj.apiKey !== undefined) {
|
|
1876
|
+
const obj_apiKey = obj.apiKey;
|
|
1877
|
+
const path_apiKey = path + '.apiKey';
|
|
1878
|
+
if (typeof obj_apiKey !== 'string') {
|
|
1879
|
+
return new TypeError('Expected "string" but received "' + typeof obj_apiKey + '" (at "' + path_apiKey + '")');
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1882
|
+
if (obj.createdBy !== undefined) {
|
|
1883
|
+
const obj_createdBy = obj.createdBy;
|
|
1884
|
+
const path_createdBy = path + '.createdBy';
|
|
1885
|
+
const referencepath_createdByValidationError = validate$g(obj_createdBy, path_createdBy);
|
|
1886
|
+
if (referencepath_createdByValidationError !== null) {
|
|
1887
|
+
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_createdBy + '")\n';
|
|
1888
|
+
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1889
|
+
return new TypeError(message);
|
|
1890
|
+
}
|
|
1891
|
+
}
|
|
1892
|
+
if (obj.createdDate !== undefined) {
|
|
1893
|
+
const obj_createdDate = obj.createdDate;
|
|
1894
|
+
const path_createdDate = path + '.createdDate';
|
|
1895
|
+
if (typeof obj_createdDate !== 'string') {
|
|
1896
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
1897
|
+
}
|
|
1898
|
+
}
|
|
1899
|
+
if (obj.dataSpaceName !== undefined) {
|
|
1900
|
+
const obj_dataSpaceName = obj.dataSpaceName;
|
|
1901
|
+
const path_dataSpaceName = path + '.dataSpaceName';
|
|
1902
|
+
if (typeof obj_dataSpaceName !== 'string') {
|
|
1903
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dataSpaceName + '" (at "' + path_dataSpaceName + '")');
|
|
1904
|
+
}
|
|
1905
|
+
}
|
|
1906
|
+
if (obj.description !== undefined) {
|
|
1907
|
+
const obj_description = obj.description;
|
|
1908
|
+
const path_description = path + '.description';
|
|
1909
|
+
if (typeof obj_description !== 'string') {
|
|
1910
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
1911
|
+
}
|
|
1912
|
+
}
|
|
1913
|
+
const obj_id = obj.id;
|
|
1914
|
+
const path_id = path + '.id';
|
|
1915
|
+
if (typeof obj_id !== 'string') {
|
|
1916
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1917
|
+
}
|
|
1918
|
+
if (obj.label !== undefined) {
|
|
1919
|
+
const obj_label = obj.label;
|
|
1920
|
+
const path_label = path + '.label';
|
|
1921
|
+
if (typeof obj_label !== 'string') {
|
|
1922
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
1923
|
+
}
|
|
1924
|
+
}
|
|
1925
|
+
if (obj.lastModifiedBy !== undefined) {
|
|
1926
|
+
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
1927
|
+
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
1928
|
+
const referencepath_lastModifiedByValidationError = validate$g(obj_lastModifiedBy, path_lastModifiedBy);
|
|
1929
|
+
if (referencepath_lastModifiedByValidationError !== null) {
|
|
1930
|
+
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_lastModifiedBy + '")\n';
|
|
1931
|
+
message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1932
|
+
return new TypeError(message);
|
|
1933
|
+
}
|
|
1934
|
+
}
|
|
1935
|
+
if (obj.lastModifiedDate !== undefined) {
|
|
1936
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
1937
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
1938
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
1939
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
1940
|
+
}
|
|
1941
|
+
}
|
|
1942
|
+
const obj_members = obj.members;
|
|
1943
|
+
const path_members = path + '.members';
|
|
1944
|
+
if (!ArrayIsArray(obj_members)) {
|
|
1945
|
+
return new TypeError('Expected "array" but received "' + typeof obj_members + '" (at "' + path_members + '")');
|
|
1946
|
+
}
|
|
1947
|
+
for (let i = 0; i < obj_members.length; i++) {
|
|
1948
|
+
const obj_members_item = obj_members[i];
|
|
1949
|
+
const path_members_item = path_members + '[' + i + ']';
|
|
1950
|
+
const referencepath_members_itemValidationError = validate$6(obj_members_item, path_members_item);
|
|
1951
|
+
if (referencepath_members_itemValidationError !== null) {
|
|
1952
|
+
let message = 'Object doesn\'t match DataCleanRoomMemberRepresentation (at "' + path_members_item + '")\n';
|
|
1953
|
+
message += referencepath_members_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1954
|
+
return new TypeError(message);
|
|
1955
|
+
}
|
|
1956
|
+
}
|
|
1957
|
+
if (obj.name !== undefined) {
|
|
1958
|
+
const obj_name = obj.name;
|
|
1959
|
+
const path_name = path + '.name';
|
|
1960
|
+
if (typeof obj_name !== 'string') {
|
|
1961
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1962
|
+
}
|
|
1963
|
+
}
|
|
1964
|
+
if (obj.namespace !== undefined) {
|
|
1965
|
+
const obj_namespace = obj.namespace;
|
|
1966
|
+
const path_namespace = path + '.namespace';
|
|
1967
|
+
if (typeof obj_namespace !== 'string') {
|
|
1968
|
+
return new TypeError('Expected "string" but received "' + typeof obj_namespace + '" (at "' + path_namespace + '")');
|
|
1969
|
+
}
|
|
1970
|
+
}
|
|
1971
|
+
const obj_status = obj.status;
|
|
1972
|
+
const path_status = path + '.status';
|
|
1973
|
+
if (typeof obj_status !== 'string') {
|
|
1974
|
+
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
1975
|
+
}
|
|
1976
|
+
const obj_templateVersion = obj.templateVersion;
|
|
1977
|
+
const path_templateVersion = path + '.templateVersion';
|
|
1978
|
+
const referencepath_templateVersionValidationError = validate$5(obj_templateVersion, path_templateVersion);
|
|
1979
|
+
if (referencepath_templateVersionValidationError !== null) {
|
|
1980
|
+
let message = 'Object doesn\'t match DataCleanRoomTemplateRepresentation (at "' + path_templateVersion + '")\n';
|
|
1981
|
+
message += referencepath_templateVersionValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1982
|
+
return new TypeError(message);
|
|
1983
|
+
}
|
|
1984
|
+
if (obj.url !== undefined) {
|
|
1985
|
+
const obj_url = obj.url;
|
|
1986
|
+
const path_url = path + '.url';
|
|
1987
|
+
if (typeof obj_url !== 'string') {
|
|
1988
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
1989
|
+
}
|
|
1990
|
+
}
|
|
1991
|
+
})();
|
|
1992
|
+
return v_error === undefined ? null : v_error;
|
|
1993
|
+
}
|
|
1994
|
+
const RepresentationType$4 = 'DataCleanRoomCollaborationRepresentation';
|
|
1995
|
+
function keyBuilder$7(luvio, config) {
|
|
1996
|
+
return keyPrefix + '::' + RepresentationType$4 + ':' + config.id;
|
|
1997
|
+
}
|
|
1998
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
1999
|
+
const keyParams = {
|
|
2000
|
+
id: object.id
|
|
2001
|
+
};
|
|
2002
|
+
return keyBuilder$7(luvio, keyParams);
|
|
2003
|
+
}
|
|
2004
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
2005
|
+
return input;
|
|
2006
|
+
}
|
|
2007
|
+
const select$b = function DataCleanRoomCollaborationRepresentationSelect() {
|
|
2008
|
+
return {
|
|
2009
|
+
kind: 'Fragment',
|
|
2010
|
+
version: VERSION$4,
|
|
2011
|
+
private: [],
|
|
2012
|
+
opaque: true
|
|
2013
|
+
};
|
|
2014
|
+
};
|
|
2015
|
+
function equals$4(existing, incoming) {
|
|
2016
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
2017
|
+
return false;
|
|
2018
|
+
}
|
|
2019
|
+
return true;
|
|
2020
|
+
}
|
|
2021
|
+
const ingest$4 = function DataCleanRoomCollaborationRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2022
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2023
|
+
const validateError = validate$4(input);
|
|
2024
|
+
if (validateError !== null) {
|
|
2025
|
+
throw validateError;
|
|
2026
|
+
}
|
|
2027
|
+
}
|
|
2028
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
2029
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
2030
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "data-clean-room", VERSION$4, RepresentationType$4, equals$4);
|
|
2031
|
+
return createLink(key);
|
|
2032
|
+
};
|
|
2033
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
2034
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2035
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
2036
|
+
rootKeySet.set(rootKey, {
|
|
2037
|
+
namespace: keyPrefix,
|
|
2038
|
+
representationName: RepresentationType$4,
|
|
2039
|
+
mergeable: false
|
|
2040
|
+
});
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
const VERSION$3 = "9e5eddaaa3330278c7aa483af5dc8d74";
|
|
2044
|
+
function validate$3(obj, path = 'DataCleanRoomCollaborationCollectionRepresentation') {
|
|
2045
|
+
const v_error = (() => {
|
|
2046
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2047
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2048
|
+
}
|
|
2049
|
+
const obj_collaborations = obj.collaborations;
|
|
2050
|
+
const path_collaborations = path + '.collaborations';
|
|
2051
|
+
if (!ArrayIsArray(obj_collaborations)) {
|
|
2052
|
+
return new TypeError('Expected "array" but received "' + typeof obj_collaborations + '" (at "' + path_collaborations + '")');
|
|
2053
|
+
}
|
|
2054
|
+
for (let i = 0; i < obj_collaborations.length; i++) {
|
|
2055
|
+
const obj_collaborations_item = obj_collaborations[i];
|
|
2056
|
+
const path_collaborations_item = path_collaborations + '[' + i + ']';
|
|
2057
|
+
const referencepath_collaborations_itemValidationError = validate$4(obj_collaborations_item, path_collaborations_item);
|
|
2058
|
+
if (referencepath_collaborations_itemValidationError !== null) {
|
|
2059
|
+
let message = 'Object doesn\'t match DataCleanRoomCollaborationRepresentation (at "' + path_collaborations_item + '")\n';
|
|
2060
|
+
message += referencepath_collaborations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2061
|
+
return new TypeError(message);
|
|
2062
|
+
}
|
|
2063
|
+
}
|
|
2064
|
+
if (obj.currentPageUrl !== undefined) {
|
|
2065
|
+
const obj_currentPageUrl = obj.currentPageUrl;
|
|
2066
|
+
const path_currentPageUrl = path + '.currentPageUrl';
|
|
2067
|
+
if (typeof obj_currentPageUrl !== 'string') {
|
|
2068
|
+
return new TypeError('Expected "string" but received "' + typeof obj_currentPageUrl + '" (at "' + path_currentPageUrl + '")');
|
|
2069
|
+
}
|
|
2070
|
+
}
|
|
2071
|
+
const obj_limit = obj.limit;
|
|
2072
|
+
const path_limit = path + '.limit';
|
|
2073
|
+
if (typeof obj_limit !== 'number' || (typeof obj_limit === 'number' && Math.floor(obj_limit) !== obj_limit)) {
|
|
2074
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_limit + '" (at "' + path_limit + '")');
|
|
2075
|
+
}
|
|
2076
|
+
if (obj.nextPageUrl !== undefined) {
|
|
2077
|
+
const obj_nextPageUrl = obj.nextPageUrl;
|
|
2078
|
+
const path_nextPageUrl = path + '.nextPageUrl';
|
|
2079
|
+
let obj_nextPageUrl_union0 = null;
|
|
2080
|
+
const obj_nextPageUrl_union0_error = (() => {
|
|
2081
|
+
if (typeof obj_nextPageUrl !== 'string') {
|
|
2082
|
+
return new TypeError('Expected "string" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
|
|
2083
|
+
}
|
|
2084
|
+
})();
|
|
2085
|
+
if (obj_nextPageUrl_union0_error != null) {
|
|
2086
|
+
obj_nextPageUrl_union0 = obj_nextPageUrl_union0_error.message;
|
|
2087
|
+
}
|
|
2088
|
+
let obj_nextPageUrl_union1 = null;
|
|
2089
|
+
const obj_nextPageUrl_union1_error = (() => {
|
|
2090
|
+
if (obj_nextPageUrl !== null) {
|
|
2091
|
+
return new TypeError('Expected "null" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
|
|
2092
|
+
}
|
|
2093
|
+
})();
|
|
2094
|
+
if (obj_nextPageUrl_union1_error != null) {
|
|
2095
|
+
obj_nextPageUrl_union1 = obj_nextPageUrl_union1_error.message;
|
|
2096
|
+
}
|
|
2097
|
+
if (obj_nextPageUrl_union0 && obj_nextPageUrl_union1) {
|
|
2098
|
+
let message = 'Object doesn\'t match union (at "' + path_nextPageUrl + '")';
|
|
2099
|
+
message += '\n' + obj_nextPageUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2100
|
+
message += '\n' + obj_nextPageUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2101
|
+
return new TypeError(message);
|
|
2102
|
+
}
|
|
2103
|
+
}
|
|
2104
|
+
const obj_offset = obj.offset;
|
|
2105
|
+
const path_offset = path + '.offset';
|
|
2106
|
+
if (typeof obj_offset !== 'number' || (typeof obj_offset === 'number' && Math.floor(obj_offset) !== obj_offset)) {
|
|
2107
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_offset + '" (at "' + path_offset + '")');
|
|
2108
|
+
}
|
|
2109
|
+
if (obj.totalSize !== undefined) {
|
|
2110
|
+
const obj_totalSize = obj.totalSize;
|
|
2111
|
+
const path_totalSize = path + '.totalSize';
|
|
2112
|
+
if (typeof obj_totalSize !== 'number' || (typeof obj_totalSize === 'number' && Math.floor(obj_totalSize) !== obj_totalSize)) {
|
|
2113
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_totalSize + '" (at "' + path_totalSize + '")');
|
|
2114
|
+
}
|
|
2115
|
+
}
|
|
2116
|
+
})();
|
|
2117
|
+
return v_error === undefined ? null : v_error;
|
|
2118
|
+
}
|
|
2119
|
+
const RepresentationType$3 = 'DataCleanRoomCollaborationCollectionRepresentation';
|
|
2120
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
2121
|
+
return input;
|
|
2122
|
+
}
|
|
2123
|
+
const select$a = function DataCleanRoomCollaborationCollectionRepresentationSelect() {
|
|
2124
|
+
return {
|
|
2125
|
+
kind: 'Fragment',
|
|
2126
|
+
version: VERSION$3,
|
|
2127
|
+
private: [],
|
|
2128
|
+
opaque: true
|
|
2129
|
+
};
|
|
2130
|
+
};
|
|
2131
|
+
function equals$3(existing, incoming) {
|
|
2132
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
2133
|
+
return false;
|
|
2134
|
+
}
|
|
2135
|
+
return true;
|
|
2136
|
+
}
|
|
2137
|
+
const ingest$3 = function DataCleanRoomCollaborationCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2138
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2139
|
+
const validateError = validate$3(input);
|
|
2140
|
+
if (validateError !== null) {
|
|
2141
|
+
throw validateError;
|
|
2142
|
+
}
|
|
2143
|
+
}
|
|
2144
|
+
const key = path.fullPath;
|
|
2145
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
2146
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "data-clean-room", VERSION$3, RepresentationType$3, equals$3);
|
|
2147
|
+
return createLink(key);
|
|
2148
|
+
};
|
|
2149
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
2150
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2151
|
+
const rootKey = fullPathFactory();
|
|
2152
|
+
rootKeySet.set(rootKey, {
|
|
2153
|
+
namespace: keyPrefix,
|
|
2154
|
+
representationName: RepresentationType$3,
|
|
2155
|
+
mergeable: false
|
|
2156
|
+
});
|
|
2157
|
+
}
|
|
2158
|
+
|
|
2159
|
+
function select$9(luvio, params) {
|
|
2160
|
+
return select$a();
|
|
2161
|
+
}
|
|
2162
|
+
function keyBuilder$6(luvio, params) {
|
|
2163
|
+
return keyPrefix + '::DataCleanRoomCollaborationCollectionRepresentation:(' + 'filters:' + params.queryParams.filters + ',' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'orderBy:' + params.queryParams.orderBy + ')';
|
|
2164
|
+
}
|
|
2165
|
+
function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
|
|
2166
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$6(luvio, resourceParams));
|
|
2167
|
+
}
|
|
2168
|
+
function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
2169
|
+
const { body } = response;
|
|
2170
|
+
const key = keyBuilder$6(luvio, resourceParams);
|
|
2171
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
2172
|
+
const snapshot = luvio.storeLookup({
|
|
2173
|
+
recordId: key,
|
|
2174
|
+
node: select$9(),
|
|
2175
|
+
variables: {},
|
|
2176
|
+
}, snapshotRefresh);
|
|
2177
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2178
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
2179
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
2180
|
+
}
|
|
2181
|
+
}
|
|
2182
|
+
deepFreeze(snapshot.data);
|
|
2183
|
+
return snapshot;
|
|
2184
|
+
}
|
|
2185
|
+
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
2186
|
+
const key = keyBuilder$6(luvio, params);
|
|
2187
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2188
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
2189
|
+
return errorSnapshot;
|
|
2190
|
+
}
|
|
2191
|
+
function createResourceRequest$6(config) {
|
|
2192
|
+
const headers = {};
|
|
2193
|
+
return {
|
|
2194
|
+
baseUri: '/services/data/v64.0',
|
|
2195
|
+
basePath: '/ssot/data-clean-room/collaborations',
|
|
2196
|
+
method: 'get',
|
|
2197
|
+
body: null,
|
|
2198
|
+
urlParams: {},
|
|
2199
|
+
queryParams: config.queryParams,
|
|
2200
|
+
headers,
|
|
2201
|
+
priority: 'normal',
|
|
2202
|
+
};
|
|
2203
|
+
}
|
|
2204
|
+
|
|
2205
|
+
const adapterName$6 = 'getAllDataCleanRoomsPaginated';
|
|
2206
|
+
const getAllDataCleanRoomsPaginated_ConfigPropertyMetadata = [
|
|
2207
|
+
generateParamConfigMetadata('filters', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2208
|
+
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
2209
|
+
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
2210
|
+
generateParamConfigMetadata('orderBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2211
|
+
];
|
|
2212
|
+
const getAllDataCleanRoomsPaginated_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getAllDataCleanRoomsPaginated_ConfigPropertyMetadata);
|
|
2213
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$b(getAllDataCleanRoomsPaginated_ConfigPropertyMetadata);
|
|
2214
|
+
function keyBuilder$5(luvio, config) {
|
|
2215
|
+
const resourceParams = createResourceParams$6(config);
|
|
2216
|
+
return keyBuilder$6(luvio, resourceParams);
|
|
2217
|
+
}
|
|
2218
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
2219
|
+
const config = {};
|
|
2220
|
+
typeCheckConfig$b(untrustedConfig, config, getAllDataCleanRoomsPaginated_ConfigPropertyMetadata);
|
|
2221
|
+
return config;
|
|
2222
|
+
}
|
|
2223
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
2224
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
2225
|
+
return null;
|
|
2226
|
+
}
|
|
2227
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2228
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2229
|
+
}
|
|
2230
|
+
const config = typeCheckConfig$6(untrustedConfig);
|
|
2231
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2232
|
+
return null;
|
|
2233
|
+
}
|
|
2234
|
+
return config;
|
|
2235
|
+
}
|
|
2236
|
+
function adapterFragment$2(luvio, config) {
|
|
2237
|
+
createResourceParams$6(config);
|
|
2238
|
+
return select$9();
|
|
2239
|
+
}
|
|
2240
|
+
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
2241
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
|
|
2242
|
+
config,
|
|
2243
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
2244
|
+
});
|
|
2245
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2246
|
+
}
|
|
2247
|
+
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
2248
|
+
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
2249
|
+
config,
|
|
2250
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
2251
|
+
});
|
|
2252
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2253
|
+
}
|
|
2254
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
2255
|
+
const resourceParams = createResourceParams$6(config);
|
|
2256
|
+
const request = createResourceRequest$6(resourceParams);
|
|
2257
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2258
|
+
.then((response) => {
|
|
2259
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
2260
|
+
const cache = new StoreKeyMap();
|
|
2261
|
+
getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
|
|
2262
|
+
return cache;
|
|
2263
|
+
});
|
|
2264
|
+
}, (response) => {
|
|
2265
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
|
|
2266
|
+
});
|
|
2267
|
+
}
|
|
2268
|
+
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
2269
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, undefined, false);
|
|
2270
|
+
}
|
|
2271
|
+
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
2272
|
+
const { luvio, config } = context;
|
|
2273
|
+
const selector = {
|
|
2274
|
+
recordId: keyBuilder$5(luvio, config),
|
|
2275
|
+
node: adapterFragment$2(luvio, config),
|
|
2276
|
+
variables: {},
|
|
2277
|
+
};
|
|
2278
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
2279
|
+
config,
|
|
2280
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
2281
|
+
});
|
|
2282
|
+
return cacheSnapshot;
|
|
2283
|
+
}
|
|
2284
|
+
const getAllDataCleanRoomsPaginatedAdapterFactory = (luvio) => function dataCleanRoom__getAllDataCleanRoomsPaginated(untrustedConfig, requestContext) {
|
|
2285
|
+
const config = validateAdapterConfig$6(untrustedConfig, getAllDataCleanRoomsPaginated_ConfigPropertyNames);
|
|
2286
|
+
// Invalid or incomplete config
|
|
2287
|
+
if (config === null) {
|
|
2288
|
+
return null;
|
|
2289
|
+
}
|
|
2290
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2291
|
+
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
2292
|
+
};
|
|
2293
|
+
|
|
2294
|
+
function select$8(luvio, params) {
|
|
2295
|
+
return select$b();
|
|
2296
|
+
}
|
|
2297
|
+
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
2298
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response);
|
|
2299
|
+
}
|
|
2300
|
+
function ingestSuccess$5(luvio, resourceParams, response) {
|
|
2301
|
+
const { body } = response;
|
|
2302
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
2303
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
2304
|
+
const snapshot = luvio.storeLookup({
|
|
2305
|
+
recordId: key,
|
|
2306
|
+
node: select$8(),
|
|
2307
|
+
variables: {},
|
|
2308
|
+
});
|
|
2309
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2310
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
2311
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
2312
|
+
}
|
|
2313
|
+
}
|
|
2314
|
+
deepFreeze(snapshot.data);
|
|
2315
|
+
return snapshot;
|
|
2316
|
+
}
|
|
2317
|
+
function createResourceRequest$5(config) {
|
|
2318
|
+
const headers = {};
|
|
2319
|
+
return {
|
|
2320
|
+
baseUri: '/services/data/v64.0',
|
|
2321
|
+
basePath: '/ssot/data-clean-room/collaborations',
|
|
2322
|
+
method: 'post',
|
|
2323
|
+
body: config.body,
|
|
2324
|
+
urlParams: {},
|
|
2325
|
+
queryParams: {},
|
|
2326
|
+
headers,
|
|
2327
|
+
priority: 'normal',
|
|
2328
|
+
};
|
|
2329
|
+
}
|
|
2330
|
+
|
|
2331
|
+
const adapterName$5 = 'createDataCleanRoomCollaboration';
|
|
2332
|
+
const createDataCleanRoomCollaboration_ConfigPropertyMetadata = [
|
|
2333
|
+
generateParamConfigMetadata('apiKey', false, 2 /* Body */, 0 /* String */),
|
|
2334
|
+
generateParamConfigMetadata('dataCloudOrgId', true, 2 /* Body */, 0 /* String */),
|
|
2335
|
+
generateParamConfigMetadata('dataSpaceName', false, 2 /* Body */, 0 /* String */),
|
|
2336
|
+
generateParamConfigMetadata('providerDevName', true, 2 /* Body */, 0 /* String */),
|
|
2337
|
+
generateParamConfigMetadata('specificationDevName', true, 2 /* Body */, 0 /* String */),
|
|
2338
|
+
generateParamConfigMetadata('templateName', true, 2 /* Body */, 0 /* String */),
|
|
2339
|
+
generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
|
|
2340
|
+
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
2341
|
+
];
|
|
2342
|
+
const createDataCleanRoomCollaboration_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, createDataCleanRoomCollaboration_ConfigPropertyMetadata);
|
|
2343
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$b(createDataCleanRoomCollaboration_ConfigPropertyMetadata);
|
|
2344
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
2345
|
+
const config = {};
|
|
2346
|
+
typeCheckConfig$b(untrustedConfig, config, createDataCleanRoomCollaboration_ConfigPropertyMetadata);
|
|
2347
|
+
return config;
|
|
2348
|
+
}
|
|
2349
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
2350
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
2351
|
+
return null;
|
|
2352
|
+
}
|
|
2353
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2354
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2355
|
+
}
|
|
2356
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
2357
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2358
|
+
return null;
|
|
2359
|
+
}
|
|
2360
|
+
return config;
|
|
2361
|
+
}
|
|
2362
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
2363
|
+
const resourceParams = createResourceParams$5(config);
|
|
2364
|
+
const request = createResourceRequest$5(resourceParams);
|
|
2365
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2366
|
+
.then((response) => {
|
|
2367
|
+
return luvio.handleSuccessResponse(() => {
|
|
2368
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response);
|
|
2369
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2370
|
+
}, () => {
|
|
2371
|
+
const cache = new StoreKeyMap();
|
|
2372
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
2373
|
+
return cache;
|
|
2374
|
+
});
|
|
2375
|
+
}, (response) => {
|
|
2376
|
+
deepFreeze(response);
|
|
2377
|
+
throw response;
|
|
2378
|
+
});
|
|
2379
|
+
}
|
|
2380
|
+
const createDataCleanRoomCollaborationAdapterFactory = (luvio) => {
|
|
2381
|
+
return function createDataCleanRoomCollaboration(untrustedConfig) {
|
|
2382
|
+
const config = validateAdapterConfig$5(untrustedConfig, createDataCleanRoomCollaboration_ConfigPropertyNames);
|
|
2383
|
+
// Invalid or incomplete config
|
|
2384
|
+
if (config === null) {
|
|
2385
|
+
throw new Error('Invalid config for "createDataCleanRoomCollaboration"');
|
|
2386
|
+
}
|
|
2387
|
+
return buildNetworkSnapshot$5(luvio, config);
|
|
2388
|
+
};
|
|
2389
|
+
};
|
|
2390
|
+
|
|
2391
|
+
const VERSION$2 = "779ba86cca8510319a6e95a736d88189";
|
|
2392
|
+
function validate$2(obj, path = 'DataCleanRoomTemplateCollectionRepresentation') {
|
|
2393
|
+
const v_error = (() => {
|
|
2394
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2395
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2396
|
+
}
|
|
2397
|
+
if (obj.currentPageUrl !== undefined) {
|
|
2398
|
+
const obj_currentPageUrl = obj.currentPageUrl;
|
|
2399
|
+
const path_currentPageUrl = path + '.currentPageUrl';
|
|
2400
|
+
if (typeof obj_currentPageUrl !== 'string') {
|
|
2401
|
+
return new TypeError('Expected "string" but received "' + typeof obj_currentPageUrl + '" (at "' + path_currentPageUrl + '")');
|
|
2402
|
+
}
|
|
2403
|
+
}
|
|
2404
|
+
const obj_limit = obj.limit;
|
|
2405
|
+
const path_limit = path + '.limit';
|
|
2406
|
+
if (typeof obj_limit !== 'number' || (typeof obj_limit === 'number' && Math.floor(obj_limit) !== obj_limit)) {
|
|
2407
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_limit + '" (at "' + path_limit + '")');
|
|
2408
|
+
}
|
|
2409
|
+
if (obj.nextPageUrl !== undefined) {
|
|
2410
|
+
const obj_nextPageUrl = obj.nextPageUrl;
|
|
2411
|
+
const path_nextPageUrl = path + '.nextPageUrl';
|
|
2412
|
+
let obj_nextPageUrl_union0 = null;
|
|
2413
|
+
const obj_nextPageUrl_union0_error = (() => {
|
|
2414
|
+
if (typeof obj_nextPageUrl !== 'string') {
|
|
2415
|
+
return new TypeError('Expected "string" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
|
|
2416
|
+
}
|
|
2417
|
+
})();
|
|
2418
|
+
if (obj_nextPageUrl_union0_error != null) {
|
|
2419
|
+
obj_nextPageUrl_union0 = obj_nextPageUrl_union0_error.message;
|
|
2420
|
+
}
|
|
2421
|
+
let obj_nextPageUrl_union1 = null;
|
|
2422
|
+
const obj_nextPageUrl_union1_error = (() => {
|
|
2423
|
+
if (obj_nextPageUrl !== null) {
|
|
2424
|
+
return new TypeError('Expected "null" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
|
|
2425
|
+
}
|
|
2426
|
+
})();
|
|
2427
|
+
if (obj_nextPageUrl_union1_error != null) {
|
|
2428
|
+
obj_nextPageUrl_union1 = obj_nextPageUrl_union1_error.message;
|
|
2429
|
+
}
|
|
2430
|
+
if (obj_nextPageUrl_union0 && obj_nextPageUrl_union1) {
|
|
2431
|
+
let message = 'Object doesn\'t match union (at "' + path_nextPageUrl + '")';
|
|
2432
|
+
message += '\n' + obj_nextPageUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2433
|
+
message += '\n' + obj_nextPageUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2434
|
+
return new TypeError(message);
|
|
2435
|
+
}
|
|
2436
|
+
}
|
|
2437
|
+
const obj_offset = obj.offset;
|
|
2438
|
+
const path_offset = path + '.offset';
|
|
2439
|
+
if (typeof obj_offset !== 'number' || (typeof obj_offset === 'number' && Math.floor(obj_offset) !== obj_offset)) {
|
|
2440
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_offset + '" (at "' + path_offset + '")');
|
|
2441
|
+
}
|
|
2442
|
+
const obj_templates = obj.templates;
|
|
2443
|
+
const path_templates = path + '.templates';
|
|
2444
|
+
if (!ArrayIsArray(obj_templates)) {
|
|
2445
|
+
return new TypeError('Expected "array" but received "' + typeof obj_templates + '" (at "' + path_templates + '")');
|
|
2446
|
+
}
|
|
2447
|
+
for (let i = 0; i < obj_templates.length; i++) {
|
|
2448
|
+
const obj_templates_item = obj_templates[i];
|
|
2449
|
+
const path_templates_item = path_templates + '[' + i + ']';
|
|
2450
|
+
const referencepath_templates_itemValidationError = validate$5(obj_templates_item, path_templates_item);
|
|
2451
|
+
if (referencepath_templates_itemValidationError !== null) {
|
|
2452
|
+
let message = 'Object doesn\'t match DataCleanRoomTemplateRepresentation (at "' + path_templates_item + '")\n';
|
|
2453
|
+
message += referencepath_templates_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2454
|
+
return new TypeError(message);
|
|
2455
|
+
}
|
|
2456
|
+
}
|
|
2457
|
+
if (obj.totalSize !== undefined) {
|
|
2458
|
+
const obj_totalSize = obj.totalSize;
|
|
2459
|
+
const path_totalSize = path + '.totalSize';
|
|
2460
|
+
if (typeof obj_totalSize !== 'number' || (typeof obj_totalSize === 'number' && Math.floor(obj_totalSize) !== obj_totalSize)) {
|
|
2461
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_totalSize + '" (at "' + path_totalSize + '")');
|
|
2462
|
+
}
|
|
2463
|
+
}
|
|
2464
|
+
})();
|
|
2465
|
+
return v_error === undefined ? null : v_error;
|
|
2466
|
+
}
|
|
2467
|
+
const RepresentationType$2 = 'DataCleanRoomTemplateCollectionRepresentation';
|
|
2468
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
2469
|
+
return input;
|
|
2470
|
+
}
|
|
2471
|
+
const select$7 = function DataCleanRoomTemplateCollectionRepresentationSelect() {
|
|
2472
|
+
return {
|
|
2473
|
+
kind: 'Fragment',
|
|
2474
|
+
version: VERSION$2,
|
|
2475
|
+
private: [],
|
|
2476
|
+
opaque: true
|
|
2477
|
+
};
|
|
2478
|
+
};
|
|
2479
|
+
function equals$2(existing, incoming) {
|
|
2480
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
2481
|
+
return false;
|
|
2482
|
+
}
|
|
2483
|
+
return true;
|
|
2484
|
+
}
|
|
2485
|
+
const ingest$2 = function DataCleanRoomTemplateCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2486
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2487
|
+
const validateError = validate$2(input);
|
|
2488
|
+
if (validateError !== null) {
|
|
2489
|
+
throw validateError;
|
|
2490
|
+
}
|
|
2491
|
+
}
|
|
2492
|
+
const key = path.fullPath;
|
|
2493
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
2494
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "data-clean-room", VERSION$2, RepresentationType$2, equals$2);
|
|
2495
|
+
return createLink(key);
|
|
2496
|
+
};
|
|
2497
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
2498
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2499
|
+
const rootKey = fullPathFactory();
|
|
2500
|
+
rootKeySet.set(rootKey, {
|
|
2501
|
+
namespace: keyPrefix,
|
|
2502
|
+
representationName: RepresentationType$2,
|
|
2503
|
+
mergeable: false
|
|
2504
|
+
});
|
|
2505
|
+
}
|
|
2506
|
+
|
|
2507
|
+
function select$6(luvio, params) {
|
|
2508
|
+
return select$7();
|
|
2509
|
+
}
|
|
2510
|
+
function keyBuilder$4(luvio, params) {
|
|
2511
|
+
return keyPrefix + '::DataCleanRoomTemplateCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'orderBy:' + params.queryParams.orderBy + ')';
|
|
2512
|
+
}
|
|
2513
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
2514
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$4(luvio, resourceParams));
|
|
2515
|
+
}
|
|
2516
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
2517
|
+
const { body } = response;
|
|
2518
|
+
const key = keyBuilder$4(luvio, resourceParams);
|
|
2519
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
2520
|
+
const snapshot = luvio.storeLookup({
|
|
2521
|
+
recordId: key,
|
|
2522
|
+
node: select$6(),
|
|
2523
|
+
variables: {},
|
|
2524
|
+
}, snapshotRefresh);
|
|
2525
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2526
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
2527
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
2528
|
+
}
|
|
2529
|
+
}
|
|
2530
|
+
deepFreeze(snapshot.data);
|
|
2531
|
+
return snapshot;
|
|
2532
|
+
}
|
|
2533
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
2534
|
+
const key = keyBuilder$4(luvio, params);
|
|
2535
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2536
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
2537
|
+
return errorSnapshot;
|
|
2538
|
+
}
|
|
2539
|
+
function createResourceRequest$4(config) {
|
|
2540
|
+
const headers = {};
|
|
2541
|
+
return {
|
|
2542
|
+
baseUri: '/services/data/v64.0',
|
|
2543
|
+
basePath: '/ssot/data-clean-room/templates',
|
|
2544
|
+
method: 'get',
|
|
2545
|
+
body: null,
|
|
2546
|
+
urlParams: {},
|
|
2547
|
+
queryParams: config.queryParams,
|
|
2548
|
+
headers,
|
|
2549
|
+
priority: 'normal',
|
|
2550
|
+
};
|
|
2551
|
+
}
|
|
2552
|
+
|
|
2553
|
+
const adapterName$4 = 'getDataCleanRoomTemplatePaginated';
|
|
2554
|
+
const getDataCleanRoomTemplatePaginated_ConfigPropertyMetadata = [
|
|
2555
|
+
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
2556
|
+
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
2557
|
+
generateParamConfigMetadata('orderBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2558
|
+
];
|
|
2559
|
+
const getDataCleanRoomTemplatePaginated_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getDataCleanRoomTemplatePaginated_ConfigPropertyMetadata);
|
|
2560
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$b(getDataCleanRoomTemplatePaginated_ConfigPropertyMetadata);
|
|
2561
|
+
function keyBuilder$3(luvio, config) {
|
|
2562
|
+
const resourceParams = createResourceParams$4(config);
|
|
2563
|
+
return keyBuilder$4(luvio, resourceParams);
|
|
2564
|
+
}
|
|
2565
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
2566
|
+
const config = {};
|
|
2567
|
+
typeCheckConfig$b(untrustedConfig, config, getDataCleanRoomTemplatePaginated_ConfigPropertyMetadata);
|
|
2568
|
+
return config;
|
|
2569
|
+
}
|
|
2570
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
2571
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
2572
|
+
return null;
|
|
2573
|
+
}
|
|
2574
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2575
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2576
|
+
}
|
|
2577
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
2578
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2579
|
+
return null;
|
|
2580
|
+
}
|
|
2581
|
+
return config;
|
|
2582
|
+
}
|
|
2583
|
+
function adapterFragment$1(luvio, config) {
|
|
2584
|
+
createResourceParams$4(config);
|
|
2585
|
+
return select$6();
|
|
2586
|
+
}
|
|
2587
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
2588
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
2589
|
+
config,
|
|
2590
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
2591
|
+
});
|
|
2592
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2593
|
+
}
|
|
2594
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
2595
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
2596
|
+
config,
|
|
2597
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
2598
|
+
});
|
|
2599
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2600
|
+
}
|
|
2601
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
2602
|
+
const resourceParams = createResourceParams$4(config);
|
|
2603
|
+
const request = createResourceRequest$4(resourceParams);
|
|
2604
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2605
|
+
.then((response) => {
|
|
2606
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
2607
|
+
const cache = new StoreKeyMap();
|
|
2608
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
2609
|
+
return cache;
|
|
2610
|
+
});
|
|
2611
|
+
}, (response) => {
|
|
2612
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
2613
|
+
});
|
|
2614
|
+
}
|
|
2615
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
2616
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
2617
|
+
}
|
|
2618
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
2619
|
+
const { luvio, config } = context;
|
|
2620
|
+
const selector = {
|
|
2621
|
+
recordId: keyBuilder$3(luvio, config),
|
|
2622
|
+
node: adapterFragment$1(luvio, config),
|
|
2623
|
+
variables: {},
|
|
2624
|
+
};
|
|
2625
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
2626
|
+
config,
|
|
2627
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
2628
|
+
});
|
|
2629
|
+
return cacheSnapshot;
|
|
2630
|
+
}
|
|
2631
|
+
const getDataCleanRoomTemplatePaginatedAdapterFactory = (luvio) => function dataCleanRoom__getDataCleanRoomTemplatePaginated(untrustedConfig, requestContext) {
|
|
2632
|
+
const config = validateAdapterConfig$4(untrustedConfig, getDataCleanRoomTemplatePaginated_ConfigPropertyNames);
|
|
2633
|
+
// Invalid or incomplete config
|
|
2634
|
+
if (config === null) {
|
|
2635
|
+
return null;
|
|
2636
|
+
}
|
|
2637
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2638
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
2639
|
+
};
|
|
2640
|
+
|
|
2641
|
+
function select$5(luvio, params) {
|
|
2642
|
+
return select$c();
|
|
2643
|
+
}
|
|
2644
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
2645
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response);
|
|
2646
|
+
}
|
|
2647
|
+
function ingestSuccess$3(luvio, resourceParams, response) {
|
|
2648
|
+
const { body } = response;
|
|
2649
|
+
const key = keyBuilderFromType$2(luvio, body);
|
|
2650
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
2651
|
+
const snapshot = luvio.storeLookup({
|
|
2652
|
+
recordId: key,
|
|
2653
|
+
node: select$5(),
|
|
2654
|
+
variables: {},
|
|
2655
|
+
});
|
|
2656
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2657
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
2658
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
2659
|
+
}
|
|
2660
|
+
}
|
|
2661
|
+
deepFreeze(snapshot.data);
|
|
2662
|
+
return snapshot;
|
|
2663
|
+
}
|
|
2664
|
+
function createResourceRequest$3(config) {
|
|
2665
|
+
const headers = {};
|
|
2666
|
+
return {
|
|
2667
|
+
baseUri: '/services/data/v64.0',
|
|
2668
|
+
basePath: '/ssot/data-clean-room/collaborations/' + config.urlParams.collaborationIdOrApiName + '/actions/accept-invitation',
|
|
2669
|
+
method: 'put',
|
|
2670
|
+
body: config.body,
|
|
2671
|
+
urlParams: config.urlParams,
|
|
2672
|
+
queryParams: {},
|
|
2673
|
+
headers,
|
|
2674
|
+
priority: 'normal',
|
|
2675
|
+
};
|
|
2676
|
+
}
|
|
2677
|
+
|
|
2678
|
+
const adapterName$3 = 'acceptDataCleanRoomInvitation';
|
|
2679
|
+
const acceptDataCleanRoomInvitation_ConfigPropertyMetadata = [
|
|
2680
|
+
generateParamConfigMetadata('collaborationIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2681
|
+
generateParamConfigMetadata('invitationId', true, 2 /* Body */, 0 /* String */),
|
|
2682
|
+
generateParamConfigMetadata('specificationId', true, 2 /* Body */, 0 /* String */),
|
|
2683
|
+
];
|
|
2684
|
+
const acceptDataCleanRoomInvitation_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, acceptDataCleanRoomInvitation_ConfigPropertyMetadata);
|
|
2685
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$b(acceptDataCleanRoomInvitation_ConfigPropertyMetadata);
|
|
2686
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
2687
|
+
const config = {};
|
|
2688
|
+
typeCheckConfig$b(untrustedConfig, config, acceptDataCleanRoomInvitation_ConfigPropertyMetadata);
|
|
2689
|
+
return config;
|
|
2690
|
+
}
|
|
2691
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
2692
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
2693
|
+
return null;
|
|
2694
|
+
}
|
|
2695
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2696
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2697
|
+
}
|
|
2698
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
2699
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2700
|
+
return null;
|
|
2701
|
+
}
|
|
2702
|
+
return config;
|
|
2703
|
+
}
|
|
2704
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
2705
|
+
const resourceParams = createResourceParams$3(config);
|
|
2706
|
+
const request = createResourceRequest$3(resourceParams);
|
|
2707
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2708
|
+
.then((response) => {
|
|
2709
|
+
return luvio.handleSuccessResponse(() => {
|
|
2710
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response);
|
|
2711
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2712
|
+
}, () => {
|
|
2713
|
+
const cache = new StoreKeyMap();
|
|
2714
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
2715
|
+
return cache;
|
|
2716
|
+
});
|
|
2717
|
+
}, (response) => {
|
|
2718
|
+
deepFreeze(response);
|
|
2719
|
+
throw response;
|
|
2720
|
+
});
|
|
2721
|
+
}
|
|
2722
|
+
const acceptDataCleanRoomInvitationAdapterFactory = (luvio) => {
|
|
2723
|
+
return function acceptDataCleanRoomInvitation(untrustedConfig) {
|
|
2724
|
+
const config = validateAdapterConfig$3(untrustedConfig, acceptDataCleanRoomInvitation_ConfigPropertyNames);
|
|
2725
|
+
// Invalid or incomplete config
|
|
2726
|
+
if (config === null) {
|
|
2727
|
+
throw new Error('Invalid config for "acceptDataCleanRoomInvitation"');
|
|
2728
|
+
}
|
|
2729
|
+
return buildNetworkSnapshot$3(luvio, config);
|
|
2730
|
+
};
|
|
2731
|
+
};
|
|
2732
|
+
|
|
2733
|
+
function select$4(luvio, params) {
|
|
2734
|
+
return select$c();
|
|
2735
|
+
}
|
|
2736
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
2737
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response);
|
|
2738
|
+
}
|
|
2739
|
+
function ingestSuccess$2(luvio, resourceParams, response) {
|
|
2740
|
+
const { body } = response;
|
|
2741
|
+
const key = keyBuilderFromType$2(luvio, body);
|
|
2742
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
2743
|
+
const snapshot = luvio.storeLookup({
|
|
2744
|
+
recordId: key,
|
|
2745
|
+
node: select$4(),
|
|
2746
|
+
variables: {},
|
|
2747
|
+
});
|
|
2748
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2749
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
2750
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
2751
|
+
}
|
|
2752
|
+
}
|
|
2753
|
+
deepFreeze(snapshot.data);
|
|
2754
|
+
return snapshot;
|
|
2755
|
+
}
|
|
2756
|
+
function createResourceRequest$2(config) {
|
|
2757
|
+
const headers = {};
|
|
2758
|
+
return {
|
|
2759
|
+
baseUri: '/services/data/v64.0',
|
|
2760
|
+
basePath: '/ssot/data-clean-room/collaborations/' + config.urlParams.collaborationIdOrApiName + '/actions/reject-invitation',
|
|
2761
|
+
method: 'put',
|
|
2762
|
+
body: config.body,
|
|
2763
|
+
urlParams: config.urlParams,
|
|
2764
|
+
queryParams: {},
|
|
2765
|
+
headers,
|
|
2766
|
+
priority: 'normal',
|
|
2767
|
+
};
|
|
2768
|
+
}
|
|
2769
|
+
|
|
2770
|
+
const adapterName$2 = 'rejectDataCleanRoomInvitation';
|
|
2771
|
+
const rejectDataCleanRoomInvitation_ConfigPropertyMetadata = [
|
|
2772
|
+
generateParamConfigMetadata('collaborationIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2773
|
+
generateParamConfigMetadata('invitationId', true, 2 /* Body */, 0 /* String */),
|
|
2774
|
+
];
|
|
2775
|
+
const rejectDataCleanRoomInvitation_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, rejectDataCleanRoomInvitation_ConfigPropertyMetadata);
|
|
2776
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$b(rejectDataCleanRoomInvitation_ConfigPropertyMetadata);
|
|
2777
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
2778
|
+
const config = {};
|
|
2779
|
+
typeCheckConfig$b(untrustedConfig, config, rejectDataCleanRoomInvitation_ConfigPropertyMetadata);
|
|
2780
|
+
return config;
|
|
2781
|
+
}
|
|
2782
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
2783
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
2784
|
+
return null;
|
|
2785
|
+
}
|
|
2786
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2787
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2788
|
+
}
|
|
2789
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
2790
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2791
|
+
return null;
|
|
2792
|
+
}
|
|
2793
|
+
return config;
|
|
2794
|
+
}
|
|
2795
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
2796
|
+
const resourceParams = createResourceParams$2(config);
|
|
2797
|
+
const request = createResourceRequest$2(resourceParams);
|
|
2798
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2799
|
+
.then((response) => {
|
|
2800
|
+
return luvio.handleSuccessResponse(() => {
|
|
2801
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response);
|
|
2802
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2803
|
+
}, () => {
|
|
2804
|
+
const cache = new StoreKeyMap();
|
|
2805
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
2806
|
+
return cache;
|
|
2807
|
+
});
|
|
2808
|
+
}, (response) => {
|
|
2809
|
+
deepFreeze(response);
|
|
2810
|
+
throw response;
|
|
2811
|
+
});
|
|
2812
|
+
}
|
|
2813
|
+
const rejectDataCleanRoomInvitationAdapterFactory = (luvio) => {
|
|
2814
|
+
return function rejectDataCleanRoomInvitation(untrustedConfig) {
|
|
2815
|
+
const config = validateAdapterConfig$2(untrustedConfig, rejectDataCleanRoomInvitation_ConfigPropertyNames);
|
|
2816
|
+
// Invalid or incomplete config
|
|
2817
|
+
if (config === null) {
|
|
2818
|
+
throw new Error('Invalid config for "rejectDataCleanRoomInvitation"');
|
|
2819
|
+
}
|
|
2820
|
+
return buildNetworkSnapshot$2(luvio, config);
|
|
2821
|
+
};
|
|
2822
|
+
};
|
|
2823
|
+
|
|
2824
|
+
const VERSION$1 = "a9f0b009de72ece59b856eea14e4af5c";
|
|
2825
|
+
function validate$1(obj, path = 'DataCleanRoomQueryJobRepresentation') {
|
|
2826
|
+
const v_error = (() => {
|
|
2827
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2828
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2829
|
+
}
|
|
2830
|
+
if (obj.completedDate !== undefined) {
|
|
2831
|
+
const obj_completedDate = obj.completedDate;
|
|
2832
|
+
const path_completedDate = path + '.completedDate';
|
|
2833
|
+
if (typeof obj_completedDate !== 'string') {
|
|
2834
|
+
return new TypeError('Expected "string" but received "' + typeof obj_completedDate + '" (at "' + path_completedDate + '")');
|
|
2835
|
+
}
|
|
2836
|
+
}
|
|
2837
|
+
if (obj.createdBy !== undefined) {
|
|
2838
|
+
const obj_createdBy = obj.createdBy;
|
|
2839
|
+
const path_createdBy = path + '.createdBy';
|
|
2840
|
+
const referencepath_createdByValidationError = validate$g(obj_createdBy, path_createdBy);
|
|
2841
|
+
if (referencepath_createdByValidationError !== null) {
|
|
2842
|
+
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_createdBy + '")\n';
|
|
2843
|
+
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2844
|
+
return new TypeError(message);
|
|
2845
|
+
}
|
|
2846
|
+
}
|
|
2847
|
+
if (obj.createdDate !== undefined) {
|
|
2848
|
+
const obj_createdDate = obj.createdDate;
|
|
2849
|
+
const path_createdDate = path + '.createdDate';
|
|
2850
|
+
if (typeof obj_createdDate !== 'string') {
|
|
2851
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
2852
|
+
}
|
|
2853
|
+
}
|
|
2854
|
+
if (obj.errorCode !== undefined) {
|
|
2855
|
+
const obj_errorCode = obj.errorCode;
|
|
2856
|
+
const path_errorCode = path + '.errorCode';
|
|
2857
|
+
if (typeof obj_errorCode !== 'string') {
|
|
2858
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorCode + '" (at "' + path_errorCode + '")');
|
|
2859
|
+
}
|
|
2860
|
+
}
|
|
2861
|
+
if (obj.errorMessage !== undefined) {
|
|
2862
|
+
const obj_errorMessage = obj.errorMessage;
|
|
2863
|
+
const path_errorMessage = path + '.errorMessage';
|
|
2864
|
+
if (typeof obj_errorMessage !== 'string') {
|
|
2865
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
|
|
2866
|
+
}
|
|
2867
|
+
}
|
|
2868
|
+
const obj_id = obj.id;
|
|
2869
|
+
const path_id = path + '.id';
|
|
2870
|
+
if (typeof obj_id !== 'string') {
|
|
2871
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
2872
|
+
}
|
|
2873
|
+
if (obj.label !== undefined) {
|
|
2874
|
+
const obj_label = obj.label;
|
|
2875
|
+
const path_label = path + '.label';
|
|
2876
|
+
if (typeof obj_label !== 'string') {
|
|
2877
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
2878
|
+
}
|
|
2879
|
+
}
|
|
2880
|
+
if (obj.lastModifiedBy !== undefined) {
|
|
2881
|
+
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
2882
|
+
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
2883
|
+
const referencepath_lastModifiedByValidationError = validate$g(obj_lastModifiedBy, path_lastModifiedBy);
|
|
2884
|
+
if (referencepath_lastModifiedByValidationError !== null) {
|
|
2885
|
+
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_lastModifiedBy + '")\n';
|
|
2886
|
+
message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2887
|
+
return new TypeError(message);
|
|
2888
|
+
}
|
|
2889
|
+
}
|
|
2890
|
+
if (obj.lastModifiedDate !== undefined) {
|
|
2891
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
2892
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
2893
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
2894
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
2895
|
+
}
|
|
2896
|
+
}
|
|
2897
|
+
if (obj.name !== undefined) {
|
|
2898
|
+
const obj_name = obj.name;
|
|
2899
|
+
const path_name = path + '.name';
|
|
2900
|
+
if (typeof obj_name !== 'string') {
|
|
2901
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
2902
|
+
}
|
|
2903
|
+
}
|
|
2904
|
+
if (obj.result !== undefined) {
|
|
2905
|
+
const obj_result = obj.result;
|
|
2906
|
+
const path_result = path + '.result';
|
|
2907
|
+
if (typeof obj_result !== 'number' || (typeof obj_result === 'number' && Math.floor(obj_result) !== obj_result)) {
|
|
2908
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_result + '" (at "' + path_result + '")');
|
|
2909
|
+
}
|
|
2910
|
+
}
|
|
2911
|
+
if (obj.segmentNames !== undefined) {
|
|
2912
|
+
const obj_segmentNames = obj.segmentNames;
|
|
2913
|
+
const path_segmentNames = path + '.segmentNames';
|
|
2914
|
+
if (!ArrayIsArray(obj_segmentNames)) {
|
|
2915
|
+
return new TypeError('Expected "array" but received "' + typeof obj_segmentNames + '" (at "' + path_segmentNames + '")');
|
|
2916
|
+
}
|
|
2917
|
+
for (let i = 0; i < obj_segmentNames.length; i++) {
|
|
2918
|
+
const obj_segmentNames_item = obj_segmentNames[i];
|
|
2919
|
+
const path_segmentNames_item = path_segmentNames + '[' + i + ']';
|
|
2920
|
+
if (typeof obj_segmentNames_item !== 'string') {
|
|
2921
|
+
return new TypeError('Expected "string" but received "' + typeof obj_segmentNames_item + '" (at "' + path_segmentNames_item + '")');
|
|
2922
|
+
}
|
|
2923
|
+
}
|
|
2924
|
+
}
|
|
2925
|
+
const obj_status = obj.status;
|
|
2926
|
+
const path_status = path + '.status';
|
|
2927
|
+
if (typeof obj_status !== 'string') {
|
|
2928
|
+
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
2929
|
+
}
|
|
2930
|
+
if (obj.triggeredDate !== undefined) {
|
|
2931
|
+
const obj_triggeredDate = obj.triggeredDate;
|
|
2932
|
+
const path_triggeredDate = path + '.triggeredDate';
|
|
2933
|
+
if (typeof obj_triggeredDate !== 'string') {
|
|
2934
|
+
return new TypeError('Expected "string" but received "' + typeof obj_triggeredDate + '" (at "' + path_triggeredDate + '")');
|
|
2935
|
+
}
|
|
2936
|
+
}
|
|
2937
|
+
})();
|
|
2938
|
+
return v_error === undefined ? null : v_error;
|
|
2939
|
+
}
|
|
2940
|
+
const RepresentationType$1 = 'DataCleanRoomQueryJobRepresentation';
|
|
2941
|
+
function keyBuilder$2(luvio, config) {
|
|
2942
|
+
return keyPrefix + '::' + RepresentationType$1 + ':' + config.id;
|
|
2943
|
+
}
|
|
2944
|
+
function keyBuilderFromType(luvio, object) {
|
|
2945
|
+
const keyParams = {
|
|
2946
|
+
id: object.id
|
|
2947
|
+
};
|
|
2948
|
+
return keyBuilder$2(luvio, keyParams);
|
|
2949
|
+
}
|
|
2950
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
2951
|
+
return input;
|
|
2952
|
+
}
|
|
2953
|
+
const select$3 = function DataCleanRoomQueryJobRepresentationSelect() {
|
|
2954
|
+
return {
|
|
2955
|
+
kind: 'Fragment',
|
|
2956
|
+
version: VERSION$1,
|
|
2957
|
+
private: [],
|
|
2958
|
+
opaque: true
|
|
2959
|
+
};
|
|
2960
|
+
};
|
|
2961
|
+
function equals$1(existing, incoming) {
|
|
2962
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
2963
|
+
return false;
|
|
2964
|
+
}
|
|
2965
|
+
return true;
|
|
2966
|
+
}
|
|
2967
|
+
const ingest$1 = function DataCleanRoomQueryJobRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2968
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2969
|
+
const validateError = validate$1(input);
|
|
2970
|
+
if (validateError !== null) {
|
|
2971
|
+
throw validateError;
|
|
2972
|
+
}
|
|
2973
|
+
}
|
|
2974
|
+
const key = keyBuilderFromType(luvio, input);
|
|
2975
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
2976
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "data-clean-room", VERSION$1, RepresentationType$1, equals$1);
|
|
2977
|
+
return createLink(key);
|
|
2978
|
+
};
|
|
2979
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
2980
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2981
|
+
const rootKey = keyBuilderFromType(luvio, input);
|
|
2982
|
+
rootKeySet.set(rootKey, {
|
|
2983
|
+
namespace: keyPrefix,
|
|
2984
|
+
representationName: RepresentationType$1,
|
|
2985
|
+
mergeable: false
|
|
2986
|
+
});
|
|
2987
|
+
}
|
|
2988
|
+
|
|
2989
|
+
function select$2(luvio, params) {
|
|
2990
|
+
return select$3();
|
|
2991
|
+
}
|
|
2992
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
2993
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
2994
|
+
}
|
|
2995
|
+
function ingestSuccess$1(luvio, resourceParams, response) {
|
|
2996
|
+
const { body } = response;
|
|
2997
|
+
const key = keyBuilderFromType(luvio, body);
|
|
2998
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
2999
|
+
const snapshot = luvio.storeLookup({
|
|
3000
|
+
recordId: key,
|
|
3001
|
+
node: select$2(),
|
|
3002
|
+
variables: {},
|
|
3003
|
+
});
|
|
3004
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3005
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
3006
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
3007
|
+
}
|
|
3008
|
+
}
|
|
3009
|
+
deepFreeze(snapshot.data);
|
|
3010
|
+
return snapshot;
|
|
3011
|
+
}
|
|
3012
|
+
function createResourceRequest$1(config) {
|
|
3013
|
+
const headers = {};
|
|
3014
|
+
return {
|
|
3015
|
+
baseUri: '/services/data/v64.0',
|
|
3016
|
+
basePath: '/ssot/data-clean-room/collaborations/' + config.urlParams.collaborationIdOrApiName + '/actions/run',
|
|
3017
|
+
method: 'post',
|
|
3018
|
+
body: config.body,
|
|
3019
|
+
urlParams: config.urlParams,
|
|
3020
|
+
queryParams: {},
|
|
3021
|
+
headers,
|
|
3022
|
+
priority: 'normal',
|
|
3023
|
+
};
|
|
3024
|
+
}
|
|
3025
|
+
|
|
3026
|
+
const adapterName$1 = 'executeDataCleanRoomQuery';
|
|
3027
|
+
const executeDataCleanRoomQuery_ConfigPropertyMetadata = [
|
|
3028
|
+
generateParamConfigMetadata('collaborationIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3029
|
+
generateParamConfigMetadata('queryExecutionName', true, 2 /* Body */, 0 /* String */),
|
|
3030
|
+
generateParamConfigMetadata('segmentIds', true, 2 /* Body */, 0 /* String */, true),
|
|
3031
|
+
];
|
|
3032
|
+
const executeDataCleanRoomQuery_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, executeDataCleanRoomQuery_ConfigPropertyMetadata);
|
|
3033
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$b(executeDataCleanRoomQuery_ConfigPropertyMetadata);
|
|
3034
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
3035
|
+
const config = {};
|
|
3036
|
+
typeCheckConfig$b(untrustedConfig, config, executeDataCleanRoomQuery_ConfigPropertyMetadata);
|
|
3037
|
+
return config;
|
|
3038
|
+
}
|
|
3039
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
3040
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
3041
|
+
return null;
|
|
3042
|
+
}
|
|
3043
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3044
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
3045
|
+
}
|
|
3046
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
3047
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3048
|
+
return null;
|
|
3049
|
+
}
|
|
3050
|
+
return config;
|
|
3051
|
+
}
|
|
3052
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
3053
|
+
const resourceParams = createResourceParams$1(config);
|
|
3054
|
+
const request = createResourceRequest$1(resourceParams);
|
|
3055
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
3056
|
+
.then((response) => {
|
|
3057
|
+
return luvio.handleSuccessResponse(() => {
|
|
3058
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response);
|
|
3059
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3060
|
+
}, () => {
|
|
3061
|
+
const cache = new StoreKeyMap();
|
|
3062
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
3063
|
+
return cache;
|
|
3064
|
+
});
|
|
3065
|
+
}, (response) => {
|
|
3066
|
+
deepFreeze(response);
|
|
3067
|
+
throw response;
|
|
3068
|
+
});
|
|
3069
|
+
}
|
|
3070
|
+
const executeDataCleanRoomQueryAdapterFactory = (luvio) => {
|
|
3071
|
+
return function executeDataCleanRoomQuery(untrustedConfig) {
|
|
3072
|
+
const config = validateAdapterConfig$1(untrustedConfig, executeDataCleanRoomQuery_ConfigPropertyNames);
|
|
3073
|
+
// Invalid or incomplete config
|
|
3074
|
+
if (config === null) {
|
|
3075
|
+
throw new Error('Invalid config for "executeDataCleanRoomQuery"');
|
|
3076
|
+
}
|
|
3077
|
+
return buildNetworkSnapshot$1(luvio, config);
|
|
3078
|
+
};
|
|
3079
|
+
};
|
|
3080
|
+
|
|
3081
|
+
const VERSION = "7aaafdce5d4ed7457442ab5701329217";
|
|
3082
|
+
function validate(obj, path = 'DataCleanRoomQueryJobHistoryCollectionRepresentation') {
|
|
3083
|
+
const v_error = (() => {
|
|
3084
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3085
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3086
|
+
}
|
|
3087
|
+
if (obj.currentPageUrl !== undefined) {
|
|
3088
|
+
const obj_currentPageUrl = obj.currentPageUrl;
|
|
3089
|
+
const path_currentPageUrl = path + '.currentPageUrl';
|
|
3090
|
+
if (typeof obj_currentPageUrl !== 'string') {
|
|
3091
|
+
return new TypeError('Expected "string" but received "' + typeof obj_currentPageUrl + '" (at "' + path_currentPageUrl + '")');
|
|
3092
|
+
}
|
|
3093
|
+
}
|
|
3094
|
+
const obj_limit = obj.limit;
|
|
3095
|
+
const path_limit = path + '.limit';
|
|
3096
|
+
if (typeof obj_limit !== 'number' || (typeof obj_limit === 'number' && Math.floor(obj_limit) !== obj_limit)) {
|
|
3097
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_limit + '" (at "' + path_limit + '")');
|
|
3098
|
+
}
|
|
3099
|
+
if (obj.nextPageUrl !== undefined) {
|
|
3100
|
+
const obj_nextPageUrl = obj.nextPageUrl;
|
|
3101
|
+
const path_nextPageUrl = path + '.nextPageUrl';
|
|
3102
|
+
let obj_nextPageUrl_union0 = null;
|
|
3103
|
+
const obj_nextPageUrl_union0_error = (() => {
|
|
3104
|
+
if (typeof obj_nextPageUrl !== 'string') {
|
|
3105
|
+
return new TypeError('Expected "string" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
|
|
3106
|
+
}
|
|
3107
|
+
})();
|
|
3108
|
+
if (obj_nextPageUrl_union0_error != null) {
|
|
3109
|
+
obj_nextPageUrl_union0 = obj_nextPageUrl_union0_error.message;
|
|
3110
|
+
}
|
|
3111
|
+
let obj_nextPageUrl_union1 = null;
|
|
3112
|
+
const obj_nextPageUrl_union1_error = (() => {
|
|
3113
|
+
if (obj_nextPageUrl !== null) {
|
|
3114
|
+
return new TypeError('Expected "null" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
|
|
3115
|
+
}
|
|
3116
|
+
})();
|
|
3117
|
+
if (obj_nextPageUrl_union1_error != null) {
|
|
3118
|
+
obj_nextPageUrl_union1 = obj_nextPageUrl_union1_error.message;
|
|
3119
|
+
}
|
|
3120
|
+
if (obj_nextPageUrl_union0 && obj_nextPageUrl_union1) {
|
|
3121
|
+
let message = 'Object doesn\'t match union (at "' + path_nextPageUrl + '")';
|
|
3122
|
+
message += '\n' + obj_nextPageUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3123
|
+
message += '\n' + obj_nextPageUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3124
|
+
return new TypeError(message);
|
|
3125
|
+
}
|
|
3126
|
+
}
|
|
3127
|
+
const obj_offset = obj.offset;
|
|
3128
|
+
const path_offset = path + '.offset';
|
|
3129
|
+
if (typeof obj_offset !== 'number' || (typeof obj_offset === 'number' && Math.floor(obj_offset) !== obj_offset)) {
|
|
3130
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_offset + '" (at "' + path_offset + '")');
|
|
3131
|
+
}
|
|
3132
|
+
const obj_queryJobs = obj.queryJobs;
|
|
3133
|
+
const path_queryJobs = path + '.queryJobs';
|
|
3134
|
+
if (!ArrayIsArray(obj_queryJobs)) {
|
|
3135
|
+
return new TypeError('Expected "array" but received "' + typeof obj_queryJobs + '" (at "' + path_queryJobs + '")');
|
|
3136
|
+
}
|
|
3137
|
+
for (let i = 0; i < obj_queryJobs.length; i++) {
|
|
3138
|
+
const obj_queryJobs_item = obj_queryJobs[i];
|
|
3139
|
+
const path_queryJobs_item = path_queryJobs + '[' + i + ']';
|
|
3140
|
+
const referencepath_queryJobs_itemValidationError = validate$1(obj_queryJobs_item, path_queryJobs_item);
|
|
3141
|
+
if (referencepath_queryJobs_itemValidationError !== null) {
|
|
3142
|
+
let message = 'Object doesn\'t match DataCleanRoomQueryJobRepresentation (at "' + path_queryJobs_item + '")\n';
|
|
3143
|
+
message += referencepath_queryJobs_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3144
|
+
return new TypeError(message);
|
|
3145
|
+
}
|
|
3146
|
+
}
|
|
3147
|
+
if (obj.totalSize !== undefined) {
|
|
3148
|
+
const obj_totalSize = obj.totalSize;
|
|
3149
|
+
const path_totalSize = path + '.totalSize';
|
|
3150
|
+
if (typeof obj_totalSize !== 'number' || (typeof obj_totalSize === 'number' && Math.floor(obj_totalSize) !== obj_totalSize)) {
|
|
3151
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_totalSize + '" (at "' + path_totalSize + '")');
|
|
3152
|
+
}
|
|
3153
|
+
}
|
|
3154
|
+
})();
|
|
3155
|
+
return v_error === undefined ? null : v_error;
|
|
3156
|
+
}
|
|
3157
|
+
const RepresentationType = 'DataCleanRoomQueryJobHistoryCollectionRepresentation';
|
|
3158
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
3159
|
+
return input;
|
|
3160
|
+
}
|
|
3161
|
+
const select$1 = function DataCleanRoomQueryJobHistoryCollectionRepresentationSelect() {
|
|
3162
|
+
return {
|
|
3163
|
+
kind: 'Fragment',
|
|
3164
|
+
version: VERSION,
|
|
3165
|
+
private: [],
|
|
3166
|
+
opaque: true
|
|
3167
|
+
};
|
|
3168
|
+
};
|
|
3169
|
+
function equals(existing, incoming) {
|
|
3170
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
3171
|
+
return false;
|
|
3172
|
+
}
|
|
3173
|
+
return true;
|
|
3174
|
+
}
|
|
3175
|
+
const ingest = function DataCleanRoomQueryJobHistoryCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3176
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3177
|
+
const validateError = validate(input);
|
|
3178
|
+
if (validateError !== null) {
|
|
3179
|
+
throw validateError;
|
|
3180
|
+
}
|
|
3181
|
+
}
|
|
3182
|
+
const key = path.fullPath;
|
|
3183
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
3184
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "data-clean-room", VERSION, RepresentationType, equals);
|
|
3185
|
+
return createLink(key);
|
|
3186
|
+
};
|
|
3187
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
3188
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3189
|
+
const rootKey = fullPathFactory();
|
|
3190
|
+
rootKeySet.set(rootKey, {
|
|
3191
|
+
namespace: keyPrefix,
|
|
3192
|
+
representationName: RepresentationType,
|
|
3193
|
+
mergeable: false
|
|
3194
|
+
});
|
|
3195
|
+
}
|
|
3196
|
+
|
|
3197
|
+
function select(luvio, params) {
|
|
3198
|
+
return select$1();
|
|
3199
|
+
}
|
|
3200
|
+
function keyBuilder$1(luvio, params) {
|
|
3201
|
+
return keyPrefix + '::DataCleanRoomQueryJobHistoryCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'filters:' + params.queryParams.filters + ',' + 'offset:' + params.queryParams.offset + ',' + 'orderBy:' + params.queryParams.orderBy + ',' + 'collaborationIdOrApiName:' + params.urlParams.collaborationIdOrApiName + ')';
|
|
3202
|
+
}
|
|
3203
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
3204
|
+
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
3205
|
+
}
|
|
3206
|
+
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
3207
|
+
const { body } = response;
|
|
3208
|
+
const key = keyBuilder$1(luvio, resourceParams);
|
|
3209
|
+
luvio.storeIngest(key, ingest, body);
|
|
3210
|
+
const snapshot = luvio.storeLookup({
|
|
3211
|
+
recordId: key,
|
|
3212
|
+
node: select(),
|
|
3213
|
+
variables: {},
|
|
3214
|
+
}, snapshotRefresh);
|
|
3215
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3216
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
3217
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
3218
|
+
}
|
|
3219
|
+
}
|
|
3220
|
+
deepFreeze(snapshot.data);
|
|
3221
|
+
return snapshot;
|
|
3222
|
+
}
|
|
3223
|
+
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
3224
|
+
const key = keyBuilder$1(luvio, params);
|
|
3225
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3226
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
3227
|
+
return errorSnapshot;
|
|
3228
|
+
}
|
|
3229
|
+
function createResourceRequest(config) {
|
|
3230
|
+
const headers = {};
|
|
3231
|
+
return {
|
|
3232
|
+
baseUri: '/services/data/v64.0',
|
|
3233
|
+
basePath: '/ssot/data-clean-room/collaborations/' + config.urlParams.collaborationIdOrApiName + '/jobs',
|
|
3234
|
+
method: 'get',
|
|
3235
|
+
body: null,
|
|
3236
|
+
urlParams: config.urlParams,
|
|
3237
|
+
queryParams: config.queryParams,
|
|
3238
|
+
headers,
|
|
3239
|
+
priority: 'normal',
|
|
3240
|
+
};
|
|
3241
|
+
}
|
|
3242
|
+
|
|
3243
|
+
const adapterName = 'getAllDataCleanRoomQueryPaginated';
|
|
3244
|
+
const getAllDataCleanRoomQueryPaginated_ConfigPropertyMetadata = [
|
|
3245
|
+
generateParamConfigMetadata('collaborationIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3246
|
+
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
3247
|
+
generateParamConfigMetadata('filters', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3248
|
+
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
3249
|
+
generateParamConfigMetadata('orderBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3250
|
+
];
|
|
3251
|
+
const getAllDataCleanRoomQueryPaginated_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getAllDataCleanRoomQueryPaginated_ConfigPropertyMetadata);
|
|
3252
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$b(getAllDataCleanRoomQueryPaginated_ConfigPropertyMetadata);
|
|
3253
|
+
function keyBuilder(luvio, config) {
|
|
3254
|
+
const resourceParams = createResourceParams(config);
|
|
3255
|
+
return keyBuilder$1(luvio, resourceParams);
|
|
3256
|
+
}
|
|
3257
|
+
function typeCheckConfig(untrustedConfig) {
|
|
3258
|
+
const config = {};
|
|
3259
|
+
typeCheckConfig$b(untrustedConfig, config, getAllDataCleanRoomQueryPaginated_ConfigPropertyMetadata);
|
|
3260
|
+
return config;
|
|
3261
|
+
}
|
|
3262
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
3263
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
3264
|
+
return null;
|
|
3265
|
+
}
|
|
3266
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3267
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
3268
|
+
}
|
|
3269
|
+
const config = typeCheckConfig(untrustedConfig);
|
|
3270
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3271
|
+
return null;
|
|
3272
|
+
}
|
|
3273
|
+
return config;
|
|
3274
|
+
}
|
|
3275
|
+
function adapterFragment(luvio, config) {
|
|
3276
|
+
createResourceParams(config);
|
|
3277
|
+
return select();
|
|
3278
|
+
}
|
|
3279
|
+
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
3280
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
3281
|
+
config,
|
|
3282
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
3283
|
+
});
|
|
3284
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3285
|
+
}
|
|
3286
|
+
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
3287
|
+
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
3288
|
+
config,
|
|
3289
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
3290
|
+
});
|
|
3291
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3292
|
+
}
|
|
3293
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
3294
|
+
const resourceParams = createResourceParams(config);
|
|
3295
|
+
const request = createResourceRequest(resourceParams);
|
|
3296
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
3297
|
+
.then((response) => {
|
|
3298
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
3299
|
+
const cache = new StoreKeyMap();
|
|
3300
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
3301
|
+
return cache;
|
|
3302
|
+
});
|
|
3303
|
+
}, (response) => {
|
|
3304
|
+
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
3305
|
+
});
|
|
3306
|
+
}
|
|
3307
|
+
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
3308
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
3309
|
+
}
|
|
3310
|
+
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
3311
|
+
const { luvio, config } = context;
|
|
3312
|
+
const selector = {
|
|
3313
|
+
recordId: keyBuilder(luvio, config),
|
|
3314
|
+
node: adapterFragment(luvio, config),
|
|
3315
|
+
variables: {},
|
|
3316
|
+
};
|
|
3317
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
3318
|
+
config,
|
|
3319
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
3320
|
+
});
|
|
3321
|
+
return cacheSnapshot;
|
|
3322
|
+
}
|
|
3323
|
+
const getAllDataCleanRoomQueryPaginatedAdapterFactory = (luvio) => function dataCleanRoom__getAllDataCleanRoomQueryPaginated(untrustedConfig, requestContext) {
|
|
3324
|
+
const config = validateAdapterConfig(untrustedConfig, getAllDataCleanRoomQueryPaginated_ConfigPropertyNames);
|
|
3325
|
+
// Invalid or incomplete config
|
|
3326
|
+
if (config === null) {
|
|
3327
|
+
return null;
|
|
3328
|
+
}
|
|
3329
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3330
|
+
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
3331
|
+
};
|
|
3332
|
+
|
|
3333
|
+
export { acceptDataCleanRoomInvitationAdapterFactory, createDataCleanRoomCollaborationAdapterFactory, createDataCleanRoomSpecificationAdapterFactory, createProviderAdapterFactory, executeDataCleanRoomQueryAdapterFactory, getAllDataCleanRoomQueryPaginatedAdapterFactory, getAllDataCleanRoomsPaginatedAdapterFactory, getDataCleanRoomProvidersPaginatedAdapterFactory, getDataCleanRoomSpecificationsPaginatedAdapterFactory, getDataCleanRoomTemplatePaginatedAdapterFactory, rejectDataCleanRoomInvitationAdapterFactory };
|