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