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