@salesforce/lds-adapters-cdp-data-transform 1.354.0-dev2 → 1.354.0-dev21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/es2018/cdp-data-transform.js +1708 -88
- package/dist/es/es2018/types/src/generated/adapters/createDataTransform.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/adapters/deleteDataTransform.d.ts +14 -0
- package/dist/es/es2018/types/src/generated/adapters/getDataTransform.d.ts +30 -0
- package/dist/es/es2018/types/src/generated/adapters/updateDataTransform.d.ts +33 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +4 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +7 -1
- package/dist/es/es2018/types/src/generated/resources/deleteSsotDataTransformsByDataTransformNameOrId.d.ts +12 -0
- package/dist/es/es2018/types/src/generated/resources/getSsotDataTransformsByDataTransformNameOrId.d.ts +19 -0
- package/dist/es/es2018/types/src/generated/resources/postSsotDataTransforms.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/resources/putSsotDataTransformsByDataTransformNameOrId.d.ts +34 -0
- package/dist/es/es2018/types/src/generated/types/BaseActionRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/CdpAssetBaseRepresentation.d.ts +20 -6
- package/dist/es/es2018/types/src/generated/types/CdpErrorRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/DataObjectFieldRepresentation.d.ts +3 -3
- package/dist/es/es2018/types/src/generated/types/DataObjectRepresentation.d.ts +15 -11
- package/dist/es/es2018/types/src/generated/types/DataTransformDefinitionRepresentation.d.ts +44 -0
- package/dist/es/es2018/types/src/generated/types/DataTransformRepresentation.d.ts +97 -0
- package/dist/es/es2018/types/src/generated/types/ScheduleRepresentation.d.ts +31 -0
- package/package.json +3 -3
- package/sfdc/index.js +1887 -204
- package/src/raml/api.raml +197 -5
- package/src/raml/luvio.raml +21 -0
package/sfdc/index.js
CHANGED
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
|
|
16
16
|
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
17
|
-
import { serializeStructuredKey, ingestShape, deepFreeze,
|
|
17
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$5, typeCheckConfig as typeCheckConfig$5, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2 } from 'force/luvioEngine';
|
|
18
18
|
|
|
19
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
|
-
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
20
|
+
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
21
21
|
const { stringify: JSONStringify$1 } = JSON;
|
|
22
22
|
const { isArray: ArrayIsArray$1 } = Array;
|
|
23
23
|
/**
|
|
@@ -42,7 +42,7 @@ function validateConfig(config, adapter, oneOf) {
|
|
|
42
42
|
throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
|
|
43
43
|
}
|
|
44
44
|
const supported = required.concat(optional);
|
|
45
|
-
if (ObjectKeys(config).some(key => !supported.includes(key))) {
|
|
45
|
+
if (ObjectKeys$1(config).some(key => !supported.includes(key))) {
|
|
46
46
|
throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -99,7 +99,7 @@ function stableJSONStringify(node) {
|
|
|
99
99
|
if (node === null) {
|
|
100
100
|
return 'null';
|
|
101
101
|
}
|
|
102
|
-
const keys = ObjectKeys(node).sort();
|
|
102
|
+
const keys = ObjectKeys$1(node).sort();
|
|
103
103
|
out = '';
|
|
104
104
|
for (i = 0; i < keys.length; i++) {
|
|
105
105
|
const key = keys[i];
|
|
@@ -137,15 +137,1862 @@ function buildAdapterValidationConfig(displayName, paramsMeta) {
|
|
|
137
137
|
}
|
|
138
138
|
const keyPrefix = 'data-transform';
|
|
139
139
|
|
|
140
|
+
const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
|
|
140
141
|
const { isArray: ArrayIsArray } = Array;
|
|
141
142
|
const { stringify: JSONStringify } = JSON;
|
|
143
|
+
function equalsArray(a, b, equalsItem) {
|
|
144
|
+
const aLength = a.length;
|
|
145
|
+
const bLength = b.length;
|
|
146
|
+
if (aLength !== bLength) {
|
|
147
|
+
return false;
|
|
148
|
+
}
|
|
149
|
+
for (let i = 0; i < aLength; i++) {
|
|
150
|
+
if (equalsItem(a[i], b[i]) === false) {
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return true;
|
|
155
|
+
}
|
|
156
|
+
function equalsObject(a, b, equalsProp) {
|
|
157
|
+
const aKeys = ObjectKeys(a).sort();
|
|
158
|
+
const bKeys = ObjectKeys(b).sort();
|
|
159
|
+
const aKeysLength = aKeys.length;
|
|
160
|
+
const bKeysLength = bKeys.length;
|
|
161
|
+
if (aKeysLength !== bKeysLength) {
|
|
162
|
+
return false;
|
|
163
|
+
}
|
|
164
|
+
for (let i = 0; i < aKeys.length; i++) {
|
|
165
|
+
const key = aKeys[i];
|
|
166
|
+
if (key !== bKeys[i]) {
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
169
|
+
if (equalsProp(a[key], b[key]) === false) {
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return true;
|
|
174
|
+
}
|
|
142
175
|
function createLink(ref) {
|
|
143
176
|
return {
|
|
144
177
|
__ref: serializeStructuredKey(ref),
|
|
145
178
|
};
|
|
146
179
|
}
|
|
147
180
|
|
|
148
|
-
|
|
181
|
+
const VERSION$8 = "efb82c29d2d2d9ec860406b7caae554d";
|
|
182
|
+
function validate$a(obj, path = 'CdpUserRepresentation') {
|
|
183
|
+
const v_error = (() => {
|
|
184
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
185
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
186
|
+
}
|
|
187
|
+
const obj_id = obj.id;
|
|
188
|
+
const path_id = path + '.id';
|
|
189
|
+
if (typeof obj_id !== 'string') {
|
|
190
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
191
|
+
}
|
|
192
|
+
if (obj.name !== undefined) {
|
|
193
|
+
const obj_name = obj.name;
|
|
194
|
+
const path_name = path + '.name';
|
|
195
|
+
if (typeof obj_name !== 'string') {
|
|
196
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
if (obj.profilePhotoUrl !== undefined) {
|
|
200
|
+
const obj_profilePhotoUrl = obj.profilePhotoUrl;
|
|
201
|
+
const path_profilePhotoUrl = path + '.profilePhotoUrl';
|
|
202
|
+
if (typeof obj_profilePhotoUrl !== 'string') {
|
|
203
|
+
return new TypeError('Expected "string" but received "' + typeof obj_profilePhotoUrl + '" (at "' + path_profilePhotoUrl + '")');
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
})();
|
|
207
|
+
return v_error === undefined ? null : v_error;
|
|
208
|
+
}
|
|
209
|
+
const select$c = function CdpUserRepresentationSelect() {
|
|
210
|
+
return {
|
|
211
|
+
kind: 'Fragment',
|
|
212
|
+
version: VERSION$8,
|
|
213
|
+
private: [],
|
|
214
|
+
selections: [
|
|
215
|
+
{
|
|
216
|
+
name: 'id',
|
|
217
|
+
kind: 'Scalar'
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
name: 'name',
|
|
221
|
+
kind: 'Scalar',
|
|
222
|
+
required: false
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
name: 'profilePhotoUrl',
|
|
226
|
+
kind: 'Scalar',
|
|
227
|
+
required: false
|
|
228
|
+
}
|
|
229
|
+
]
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
function equals$9(existing, incoming) {
|
|
233
|
+
const existing_id = existing.id;
|
|
234
|
+
const incoming_id = incoming.id;
|
|
235
|
+
if (!(existing_id === incoming_id)) {
|
|
236
|
+
return false;
|
|
237
|
+
}
|
|
238
|
+
const existing_name = existing.name;
|
|
239
|
+
const incoming_name = incoming.name;
|
|
240
|
+
// if at least one of these optionals is defined
|
|
241
|
+
if (existing_name !== undefined || incoming_name !== undefined) {
|
|
242
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
243
|
+
// not equal
|
|
244
|
+
if (existing_name === undefined || incoming_name === undefined) {
|
|
245
|
+
return false;
|
|
246
|
+
}
|
|
247
|
+
if (!(existing_name === incoming_name)) {
|
|
248
|
+
return false;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
const existing_profilePhotoUrl = existing.profilePhotoUrl;
|
|
252
|
+
const incoming_profilePhotoUrl = incoming.profilePhotoUrl;
|
|
253
|
+
// if at least one of these optionals is defined
|
|
254
|
+
if (existing_profilePhotoUrl !== undefined || incoming_profilePhotoUrl !== undefined) {
|
|
255
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
256
|
+
// not equal
|
|
257
|
+
if (existing_profilePhotoUrl === undefined || incoming_profilePhotoUrl === undefined) {
|
|
258
|
+
return false;
|
|
259
|
+
}
|
|
260
|
+
if (!(existing_profilePhotoUrl === incoming_profilePhotoUrl)) {
|
|
261
|
+
return false;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
return true;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
var DiscriminatorValues;
|
|
268
|
+
(function (DiscriminatorValues) {
|
|
269
|
+
DiscriminatorValues["type"] = "type";
|
|
270
|
+
})(DiscriminatorValues || (DiscriminatorValues = {}));
|
|
271
|
+
const VERSION$7 = "e45ed0cf1759f7e1fe67049f806edc26";
|
|
272
|
+
function validate$9(obj, path = 'CdpAssetBaseRepresentation') {
|
|
273
|
+
const v_error = (() => {
|
|
274
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
275
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
276
|
+
}
|
|
277
|
+
if (obj.createdBy !== undefined) {
|
|
278
|
+
const obj_createdBy = obj.createdBy;
|
|
279
|
+
const path_createdBy = path + '.createdBy';
|
|
280
|
+
const referencepath_createdByValidationError = validate$a(obj_createdBy, path_createdBy);
|
|
281
|
+
if (referencepath_createdByValidationError !== null) {
|
|
282
|
+
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_createdBy + '")\n';
|
|
283
|
+
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
284
|
+
return new TypeError(message);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
if (obj.createdDate !== undefined) {
|
|
288
|
+
const obj_createdDate = obj.createdDate;
|
|
289
|
+
const path_createdDate = path + '.createdDate';
|
|
290
|
+
if (typeof obj_createdDate !== 'string') {
|
|
291
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
const obj_id = obj.id;
|
|
295
|
+
const path_id = path + '.id';
|
|
296
|
+
if (typeof obj_id !== 'string') {
|
|
297
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
298
|
+
}
|
|
299
|
+
if (obj.label !== undefined) {
|
|
300
|
+
const obj_label = obj.label;
|
|
301
|
+
const path_label = path + '.label';
|
|
302
|
+
if (typeof obj_label !== 'string') {
|
|
303
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
if (obj.lastModifiedBy !== undefined) {
|
|
307
|
+
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
308
|
+
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
309
|
+
const referencepath_lastModifiedByValidationError = validate$a(obj_lastModifiedBy, path_lastModifiedBy);
|
|
310
|
+
if (referencepath_lastModifiedByValidationError !== null) {
|
|
311
|
+
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_lastModifiedBy + '")\n';
|
|
312
|
+
message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
313
|
+
return new TypeError(message);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
if (obj.lastModifiedDate !== undefined) {
|
|
317
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
318
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
319
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
320
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
const obj_name = obj.name;
|
|
324
|
+
const path_name = path + '.name';
|
|
325
|
+
if (typeof obj_name !== 'string') {
|
|
326
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
327
|
+
}
|
|
328
|
+
if (obj.namespace !== undefined) {
|
|
329
|
+
const obj_namespace = obj.namespace;
|
|
330
|
+
const path_namespace = path + '.namespace';
|
|
331
|
+
if (typeof obj_namespace !== 'string') {
|
|
332
|
+
return new TypeError('Expected "string" but received "' + typeof obj_namespace + '" (at "' + path_namespace + '")');
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
if (obj.url !== undefined) {
|
|
336
|
+
const obj_url = obj.url;
|
|
337
|
+
const path_url = path + '.url';
|
|
338
|
+
if (typeof obj_url !== 'string') {
|
|
339
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
})();
|
|
343
|
+
return v_error === undefined ? null : v_error;
|
|
344
|
+
}
|
|
345
|
+
const RepresentationType$4 = 'CdpAssetBaseRepresentation';
|
|
346
|
+
function keyBuilder$6(luvio, config) {
|
|
347
|
+
return keyPrefix + '::' + RepresentationType$4 + ':' + config.name;
|
|
348
|
+
}
|
|
349
|
+
function keyBuilderFromType$2(luvio, object) {
|
|
350
|
+
const keyParams = {
|
|
351
|
+
name: object.name
|
|
352
|
+
};
|
|
353
|
+
return keyBuilder$6(luvio, keyParams);
|
|
354
|
+
}
|
|
355
|
+
const select$b = function CdpAssetBaseRepresentationSelect() {
|
|
356
|
+
const { selections: CdpUserRepresentation__selections, opaque: CdpUserRepresentation__opaque, } = select$c();
|
|
357
|
+
return {
|
|
358
|
+
kind: 'Fragment',
|
|
359
|
+
version: VERSION$7,
|
|
360
|
+
private: [],
|
|
361
|
+
selections: [
|
|
362
|
+
{
|
|
363
|
+
name: 'createdBy',
|
|
364
|
+
kind: 'Object',
|
|
365
|
+
selections: CdpUserRepresentation__selections,
|
|
366
|
+
required: false
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
name: 'createdDate',
|
|
370
|
+
kind: 'Scalar',
|
|
371
|
+
required: false
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
name: 'id',
|
|
375
|
+
kind: 'Scalar'
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
name: 'label',
|
|
379
|
+
kind: 'Scalar',
|
|
380
|
+
required: false
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
name: 'lastModifiedBy',
|
|
384
|
+
kind: 'Object',
|
|
385
|
+
selections: CdpUserRepresentation__selections,
|
|
386
|
+
required: false
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
name: 'lastModifiedDate',
|
|
390
|
+
kind: 'Scalar',
|
|
391
|
+
required: false
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
name: 'name',
|
|
395
|
+
kind: 'Scalar'
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
name: 'namespace',
|
|
399
|
+
kind: 'Scalar',
|
|
400
|
+
required: false
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
name: 'url',
|
|
404
|
+
kind: 'Scalar',
|
|
405
|
+
required: false
|
|
406
|
+
}
|
|
407
|
+
]
|
|
408
|
+
};
|
|
409
|
+
};
|
|
410
|
+
function equals$8(existing, incoming) {
|
|
411
|
+
const existing_createdDate = existing.createdDate;
|
|
412
|
+
const incoming_createdDate = incoming.createdDate;
|
|
413
|
+
// if at least one of these optionals is defined
|
|
414
|
+
if (existing_createdDate !== undefined || incoming_createdDate !== undefined) {
|
|
415
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
416
|
+
// not equal
|
|
417
|
+
if (existing_createdDate === undefined || incoming_createdDate === undefined) {
|
|
418
|
+
return false;
|
|
419
|
+
}
|
|
420
|
+
if (!(existing_createdDate === incoming_createdDate)) {
|
|
421
|
+
return false;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
const existing_id = existing.id;
|
|
425
|
+
const incoming_id = incoming.id;
|
|
426
|
+
if (!(existing_id === incoming_id)) {
|
|
427
|
+
return false;
|
|
428
|
+
}
|
|
429
|
+
const existing_label = existing.label;
|
|
430
|
+
const incoming_label = incoming.label;
|
|
431
|
+
// if at least one of these optionals is defined
|
|
432
|
+
if (existing_label !== undefined || incoming_label !== undefined) {
|
|
433
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
434
|
+
// not equal
|
|
435
|
+
if (existing_label === undefined || incoming_label === undefined) {
|
|
436
|
+
return false;
|
|
437
|
+
}
|
|
438
|
+
if (!(existing_label === incoming_label)) {
|
|
439
|
+
return false;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
const existing_lastModifiedDate = existing.lastModifiedDate;
|
|
443
|
+
const incoming_lastModifiedDate = incoming.lastModifiedDate;
|
|
444
|
+
// if at least one of these optionals is defined
|
|
445
|
+
if (existing_lastModifiedDate !== undefined || incoming_lastModifiedDate !== undefined) {
|
|
446
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
447
|
+
// not equal
|
|
448
|
+
if (existing_lastModifiedDate === undefined || incoming_lastModifiedDate === undefined) {
|
|
449
|
+
return false;
|
|
450
|
+
}
|
|
451
|
+
if (!(existing_lastModifiedDate === incoming_lastModifiedDate)) {
|
|
452
|
+
return false;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
const existing_name = existing.name;
|
|
456
|
+
const incoming_name = incoming.name;
|
|
457
|
+
if (!(existing_name === incoming_name)) {
|
|
458
|
+
return false;
|
|
459
|
+
}
|
|
460
|
+
const existing_namespace = existing.namespace;
|
|
461
|
+
const incoming_namespace = incoming.namespace;
|
|
462
|
+
// if at least one of these optionals is defined
|
|
463
|
+
if (existing_namespace !== undefined || incoming_namespace !== undefined) {
|
|
464
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
465
|
+
// not equal
|
|
466
|
+
if (existing_namespace === undefined || incoming_namespace === undefined) {
|
|
467
|
+
return false;
|
|
468
|
+
}
|
|
469
|
+
if (!(existing_namespace === incoming_namespace)) {
|
|
470
|
+
return false;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
const existing_url = existing.url;
|
|
474
|
+
const incoming_url = incoming.url;
|
|
475
|
+
// if at least one of these optionals is defined
|
|
476
|
+
if (existing_url !== undefined || incoming_url !== undefined) {
|
|
477
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
478
|
+
// not equal
|
|
479
|
+
if (existing_url === undefined || incoming_url === undefined) {
|
|
480
|
+
return false;
|
|
481
|
+
}
|
|
482
|
+
if (!(existing_url === incoming_url)) {
|
|
483
|
+
return false;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
const existing_createdBy = existing.createdBy;
|
|
487
|
+
const incoming_createdBy = incoming.createdBy;
|
|
488
|
+
// if at least one of these optionals is defined
|
|
489
|
+
if (existing_createdBy !== undefined || incoming_createdBy !== undefined) {
|
|
490
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
491
|
+
// not equal
|
|
492
|
+
if (existing_createdBy === undefined || incoming_createdBy === undefined) {
|
|
493
|
+
return false;
|
|
494
|
+
}
|
|
495
|
+
if (!(equals$9(existing_createdBy, incoming_createdBy))) {
|
|
496
|
+
return false;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
const existing_lastModifiedBy = existing.lastModifiedBy;
|
|
500
|
+
const incoming_lastModifiedBy = incoming.lastModifiedBy;
|
|
501
|
+
// if at least one of these optionals is defined
|
|
502
|
+
if (existing_lastModifiedBy !== undefined || incoming_lastModifiedBy !== undefined) {
|
|
503
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
504
|
+
// not equal
|
|
505
|
+
if (existing_lastModifiedBy === undefined || incoming_lastModifiedBy === undefined) {
|
|
506
|
+
return false;
|
|
507
|
+
}
|
|
508
|
+
if (!(equals$9(existing_lastModifiedBy, incoming_lastModifiedBy))) {
|
|
509
|
+
return false;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
return true;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
const VERSION$6 = "3fd0683a6603c98784b3d4aeb83ea69b";
|
|
516
|
+
function validate$8(obj, path = 'BaseActionRepresentation') {
|
|
517
|
+
const v_error = (() => {
|
|
518
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
519
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
520
|
+
}
|
|
521
|
+
const obj_refreshStatusAction = obj.refreshStatusAction;
|
|
522
|
+
const path_refreshStatusAction = path + '.refreshStatusAction';
|
|
523
|
+
if (typeof obj_refreshStatusAction !== 'string') {
|
|
524
|
+
return new TypeError('Expected "string" but received "' + typeof obj_refreshStatusAction + '" (at "' + path_refreshStatusAction + '")');
|
|
525
|
+
}
|
|
526
|
+
const obj_retryAction = obj.retryAction;
|
|
527
|
+
const path_retryAction = path + '.retryAction';
|
|
528
|
+
if (typeof obj_retryAction !== 'string') {
|
|
529
|
+
return new TypeError('Expected "string" but received "' + typeof obj_retryAction + '" (at "' + path_retryAction + '")');
|
|
530
|
+
}
|
|
531
|
+
})();
|
|
532
|
+
return v_error === undefined ? null : v_error;
|
|
533
|
+
}
|
|
534
|
+
const select$a = function BaseActionRepresentationSelect() {
|
|
535
|
+
return {
|
|
536
|
+
kind: 'Fragment',
|
|
537
|
+
version: VERSION$6,
|
|
538
|
+
private: [],
|
|
539
|
+
selections: [
|
|
540
|
+
{
|
|
541
|
+
name: 'refreshStatusAction',
|
|
542
|
+
kind: 'Scalar'
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
name: 'retryAction',
|
|
546
|
+
kind: 'Scalar'
|
|
547
|
+
}
|
|
548
|
+
]
|
|
549
|
+
};
|
|
550
|
+
};
|
|
551
|
+
function equals$7(existing, incoming) {
|
|
552
|
+
const existing_refreshStatusAction = existing.refreshStatusAction;
|
|
553
|
+
const incoming_refreshStatusAction = incoming.refreshStatusAction;
|
|
554
|
+
if (!(existing_refreshStatusAction === incoming_refreshStatusAction)) {
|
|
555
|
+
return false;
|
|
556
|
+
}
|
|
557
|
+
const existing_retryAction = existing.retryAction;
|
|
558
|
+
const incoming_retryAction = incoming.retryAction;
|
|
559
|
+
if (!(existing_retryAction === incoming_retryAction)) {
|
|
560
|
+
return false;
|
|
561
|
+
}
|
|
562
|
+
return true;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
const VERSION$5 = "2acfba62fd425f0dc2a8b2bcadde2466";
|
|
566
|
+
function validate$7(obj, path = 'CdpErrorRepresentation') {
|
|
567
|
+
const v_error = (() => {
|
|
568
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
569
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
570
|
+
}
|
|
571
|
+
const obj_errorCode = obj.errorCode;
|
|
572
|
+
const path_errorCode = path + '.errorCode';
|
|
573
|
+
if (typeof obj_errorCode !== 'string') {
|
|
574
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorCode + '" (at "' + path_errorCode + '")');
|
|
575
|
+
}
|
|
576
|
+
const obj_message = obj.message;
|
|
577
|
+
const path_message = path + '.message';
|
|
578
|
+
if (typeof obj_message !== 'string') {
|
|
579
|
+
return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
|
|
580
|
+
}
|
|
581
|
+
})();
|
|
582
|
+
return v_error === undefined ? null : v_error;
|
|
583
|
+
}
|
|
584
|
+
const select$9 = function CdpErrorRepresentationSelect() {
|
|
585
|
+
return {
|
|
586
|
+
kind: 'Fragment',
|
|
587
|
+
version: VERSION$5,
|
|
588
|
+
private: [],
|
|
589
|
+
selections: [
|
|
590
|
+
{
|
|
591
|
+
name: 'errorCode',
|
|
592
|
+
kind: 'Scalar'
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
name: 'message',
|
|
596
|
+
kind: 'Scalar'
|
|
597
|
+
}
|
|
598
|
+
]
|
|
599
|
+
};
|
|
600
|
+
};
|
|
601
|
+
function equals$6(existing, incoming) {
|
|
602
|
+
const existing_errorCode = existing.errorCode;
|
|
603
|
+
const incoming_errorCode = incoming.errorCode;
|
|
604
|
+
if (!(existing_errorCode === incoming_errorCode)) {
|
|
605
|
+
return false;
|
|
606
|
+
}
|
|
607
|
+
const existing_message = existing.message;
|
|
608
|
+
const incoming_message = incoming.message;
|
|
609
|
+
if (!(existing_message === incoming_message)) {
|
|
610
|
+
return false;
|
|
611
|
+
}
|
|
612
|
+
return true;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
const VERSION$4 = "9570db02ffdff852b102fde54128dc2f";
|
|
616
|
+
function validate$6(obj, path = 'ScheduleRepresentation') {
|
|
617
|
+
const v_error = (() => {
|
|
618
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
619
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
620
|
+
}
|
|
621
|
+
const obj_schedule = obj.schedule;
|
|
622
|
+
const path_schedule = path + '.schedule';
|
|
623
|
+
if (typeof obj_schedule !== 'string') {
|
|
624
|
+
return new TypeError('Expected "string" but received "' + typeof obj_schedule + '" (at "' + path_schedule + '")');
|
|
625
|
+
}
|
|
626
|
+
const obj_url = obj.url;
|
|
627
|
+
const path_url = path + '.url';
|
|
628
|
+
if (typeof obj_url !== 'string') {
|
|
629
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
630
|
+
}
|
|
631
|
+
})();
|
|
632
|
+
return v_error === undefined ? null : v_error;
|
|
633
|
+
}
|
|
634
|
+
const select$8 = function ScheduleRepresentationSelect() {
|
|
635
|
+
return {
|
|
636
|
+
kind: 'Fragment',
|
|
637
|
+
version: VERSION$4,
|
|
638
|
+
private: [],
|
|
639
|
+
selections: [
|
|
640
|
+
{
|
|
641
|
+
name: 'schedule',
|
|
642
|
+
kind: 'Scalar'
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
name: 'url',
|
|
646
|
+
kind: 'Scalar'
|
|
647
|
+
}
|
|
648
|
+
]
|
|
649
|
+
};
|
|
650
|
+
};
|
|
651
|
+
function equals$5(existing, incoming) {
|
|
652
|
+
const existing_schedule = existing.schedule;
|
|
653
|
+
const incoming_schedule = incoming.schedule;
|
|
654
|
+
if (!(existing_schedule === incoming_schedule)) {
|
|
655
|
+
return false;
|
|
656
|
+
}
|
|
657
|
+
const existing_url = existing.url;
|
|
658
|
+
const incoming_url = incoming.url;
|
|
659
|
+
if (!(existing_url === incoming_url)) {
|
|
660
|
+
return false;
|
|
661
|
+
}
|
|
662
|
+
return true;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
function validate$5(obj, path = 'DataObjectFieldRepresentation') {
|
|
666
|
+
const v_error = (() => {
|
|
667
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
668
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
669
|
+
}
|
|
670
|
+
const obj_isPrimaryKey = obj.isPrimaryKey;
|
|
671
|
+
const path_isPrimaryKey = path + '.isPrimaryKey';
|
|
672
|
+
if (typeof obj_isPrimaryKey !== 'boolean') {
|
|
673
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isPrimaryKey + '" (at "' + path_isPrimaryKey + '")');
|
|
674
|
+
}
|
|
675
|
+
if (obj.keyQualifierField !== undefined) {
|
|
676
|
+
const obj_keyQualifierField = obj.keyQualifierField;
|
|
677
|
+
const path_keyQualifierField = path + '.keyQualifierField';
|
|
678
|
+
if (typeof obj_keyQualifierField !== 'string') {
|
|
679
|
+
return new TypeError('Expected "string" but received "' + typeof obj_keyQualifierField + '" (at "' + path_keyQualifierField + '")');
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
const obj_label = obj.label;
|
|
683
|
+
const path_label = path + '.label';
|
|
684
|
+
if (typeof obj_label !== 'string') {
|
|
685
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
686
|
+
}
|
|
687
|
+
const obj_name = obj.name;
|
|
688
|
+
const path_name = path + '.name';
|
|
689
|
+
if (typeof obj_name !== 'string') {
|
|
690
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
691
|
+
}
|
|
692
|
+
const obj_type = obj.type;
|
|
693
|
+
const path_type = path + '.type';
|
|
694
|
+
if (typeof obj_type !== 'string') {
|
|
695
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
696
|
+
}
|
|
697
|
+
})();
|
|
698
|
+
return v_error === undefined ? null : v_error;
|
|
699
|
+
}
|
|
700
|
+
function equals$4(existing, incoming) {
|
|
701
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
702
|
+
return false;
|
|
703
|
+
}
|
|
704
|
+
return true;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
const VERSION$3 = "8242b57b93fc99780862de37f9209bc2";
|
|
708
|
+
function validate$4(obj, path = 'DataObjectRepresentation') {
|
|
709
|
+
const validateCdpAssetBaseRepresentation_validateError = validate$9(obj, path);
|
|
710
|
+
if (validateCdpAssetBaseRepresentation_validateError !== null) {
|
|
711
|
+
return validateCdpAssetBaseRepresentation_validateError;
|
|
712
|
+
}
|
|
713
|
+
const v_error = (() => {
|
|
714
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
715
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
716
|
+
}
|
|
717
|
+
if (obj.category !== undefined) {
|
|
718
|
+
const obj_category = obj.category;
|
|
719
|
+
const path_category = path + '.category';
|
|
720
|
+
if (typeof obj_category !== 'string') {
|
|
721
|
+
return new TypeError('Expected "string" but received "' + typeof obj_category + '" (at "' + path_category + '")');
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
if (obj.eventDateTimeFieldName !== undefined) {
|
|
725
|
+
const obj_eventDateTimeFieldName = obj.eventDateTimeFieldName;
|
|
726
|
+
const path_eventDateTimeFieldName = path + '.eventDateTimeFieldName';
|
|
727
|
+
if (typeof obj_eventDateTimeFieldName !== 'string') {
|
|
728
|
+
return new TypeError('Expected "string" but received "' + typeof obj_eventDateTimeFieldName + '" (at "' + path_eventDateTimeFieldName + '")');
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
if (obj.fields !== undefined) {
|
|
732
|
+
const obj_fields = obj.fields;
|
|
733
|
+
const path_fields = path + '.fields';
|
|
734
|
+
if (!ArrayIsArray(obj_fields)) {
|
|
735
|
+
return new TypeError('Expected "array" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
|
|
736
|
+
}
|
|
737
|
+
for (let i = 0; i < obj_fields.length; i++) {
|
|
738
|
+
const obj_fields_item = obj_fields[i];
|
|
739
|
+
const path_fields_item = path_fields + '[' + i + ']';
|
|
740
|
+
const referencepath_fields_itemValidationError = validate$5(obj_fields_item, path_fields_item);
|
|
741
|
+
if (referencepath_fields_itemValidationError !== null) {
|
|
742
|
+
let message = 'Object doesn\'t match DataObjectFieldRepresentation (at "' + path_fields_item + '")\n';
|
|
743
|
+
message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
744
|
+
return new TypeError(message);
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
if (obj.recordModifiedFieldName !== undefined) {
|
|
749
|
+
const obj_recordModifiedFieldName = obj.recordModifiedFieldName;
|
|
750
|
+
const path_recordModifiedFieldName = path + '.recordModifiedFieldName';
|
|
751
|
+
if (typeof obj_recordModifiedFieldName !== 'string') {
|
|
752
|
+
return new TypeError('Expected "string" but received "' + typeof obj_recordModifiedFieldName + '" (at "' + path_recordModifiedFieldName + '")');
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
if (obj.type !== undefined) {
|
|
756
|
+
const obj_type = obj.type;
|
|
757
|
+
const path_type = path + '.type';
|
|
758
|
+
if (typeof obj_type !== 'string') {
|
|
759
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
})();
|
|
763
|
+
return v_error === undefined ? null : v_error;
|
|
764
|
+
}
|
|
765
|
+
const RepresentationType$3 = 'DataObjectRepresentation';
|
|
766
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
767
|
+
return keyBuilderFromType$2(luvio, object);
|
|
768
|
+
}
|
|
769
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
770
|
+
return input;
|
|
771
|
+
}
|
|
772
|
+
const select$7 = function DataObjectRepresentationSelect() {
|
|
773
|
+
return {
|
|
774
|
+
kind: 'Fragment',
|
|
775
|
+
version: VERSION$3,
|
|
776
|
+
private: [],
|
|
777
|
+
opaque: true
|
|
778
|
+
};
|
|
779
|
+
};
|
|
780
|
+
function equals$3(existing, incoming) {
|
|
781
|
+
if (equals$8(existing, incoming) === false) {
|
|
782
|
+
return false;
|
|
783
|
+
}
|
|
784
|
+
const existing_category = existing.category;
|
|
785
|
+
const incoming_category = incoming.category;
|
|
786
|
+
// if at least one of these optionals is defined
|
|
787
|
+
if (existing_category !== undefined || incoming_category !== undefined) {
|
|
788
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
789
|
+
// not equal
|
|
790
|
+
if (existing_category === undefined || incoming_category === undefined) {
|
|
791
|
+
return false;
|
|
792
|
+
}
|
|
793
|
+
if (!(existing_category === incoming_category)) {
|
|
794
|
+
return false;
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
const existing_eventDateTimeFieldName = existing.eventDateTimeFieldName;
|
|
798
|
+
const incoming_eventDateTimeFieldName = incoming.eventDateTimeFieldName;
|
|
799
|
+
// if at least one of these optionals is defined
|
|
800
|
+
if (existing_eventDateTimeFieldName !== undefined || incoming_eventDateTimeFieldName !== undefined) {
|
|
801
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
802
|
+
// not equal
|
|
803
|
+
if (existing_eventDateTimeFieldName === undefined || incoming_eventDateTimeFieldName === undefined) {
|
|
804
|
+
return false;
|
|
805
|
+
}
|
|
806
|
+
if (!(existing_eventDateTimeFieldName === incoming_eventDateTimeFieldName)) {
|
|
807
|
+
return false;
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
const existing_recordModifiedFieldName = existing.recordModifiedFieldName;
|
|
811
|
+
const incoming_recordModifiedFieldName = incoming.recordModifiedFieldName;
|
|
812
|
+
// if at least one of these optionals is defined
|
|
813
|
+
if (existing_recordModifiedFieldName !== undefined || incoming_recordModifiedFieldName !== undefined) {
|
|
814
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
815
|
+
// not equal
|
|
816
|
+
if (existing_recordModifiedFieldName === undefined || incoming_recordModifiedFieldName === undefined) {
|
|
817
|
+
return false;
|
|
818
|
+
}
|
|
819
|
+
if (!(existing_recordModifiedFieldName === incoming_recordModifiedFieldName)) {
|
|
820
|
+
return false;
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
const existing_type = existing.type;
|
|
824
|
+
const incoming_type = incoming.type;
|
|
825
|
+
// if at least one of these optionals is defined
|
|
826
|
+
if (existing_type !== undefined || incoming_type !== undefined) {
|
|
827
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
828
|
+
// not equal
|
|
829
|
+
if (existing_type === undefined || incoming_type === undefined) {
|
|
830
|
+
return false;
|
|
831
|
+
}
|
|
832
|
+
if (!(existing_type === incoming_type)) {
|
|
833
|
+
return false;
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
const existing_fields = existing.fields;
|
|
837
|
+
const incoming_fields = incoming.fields;
|
|
838
|
+
// if at least one of these optionals is defined
|
|
839
|
+
if (existing_fields !== undefined || incoming_fields !== undefined) {
|
|
840
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
841
|
+
// not equal
|
|
842
|
+
if (existing_fields === undefined || incoming_fields === undefined) {
|
|
843
|
+
return false;
|
|
844
|
+
}
|
|
845
|
+
const equals_fields_items = equalsArray(existing_fields, incoming_fields, (existing_fields_item, incoming_fields_item) => {
|
|
846
|
+
if (!(equals$4(existing_fields_item, incoming_fields_item))) {
|
|
847
|
+
return false;
|
|
848
|
+
}
|
|
849
|
+
});
|
|
850
|
+
if (equals_fields_items === false) {
|
|
851
|
+
return false;
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
return true;
|
|
855
|
+
}
|
|
856
|
+
const ingest$3 = function DataObjectRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
857
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
858
|
+
const validateError = validate$4(input);
|
|
859
|
+
if (validateError !== null) {
|
|
860
|
+
throw validateError;
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
864
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 3000000;
|
|
865
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "data-transform", VERSION$3, RepresentationType$3, equals$3);
|
|
866
|
+
return createLink(key);
|
|
867
|
+
};
|
|
868
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
869
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
870
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
871
|
+
rootKeySet.set(rootKey, {
|
|
872
|
+
namespace: keyPrefix,
|
|
873
|
+
representationName: RepresentationType$4,
|
|
874
|
+
mergeable: false
|
|
875
|
+
});
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
const VERSION$2 = "6ef7bcc16bd2f432497fc85ead97bca0";
|
|
879
|
+
function validate$3(obj, path = 'DataTransformDefinitionRepresentation') {
|
|
880
|
+
const v_error = (() => {
|
|
881
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
882
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
883
|
+
}
|
|
884
|
+
const obj_outputDataObjects = obj.outputDataObjects;
|
|
885
|
+
const path_outputDataObjects = path + '.outputDataObjects';
|
|
886
|
+
if (!ArrayIsArray(obj_outputDataObjects)) {
|
|
887
|
+
return new TypeError('Expected "array" but received "' + typeof obj_outputDataObjects + '" (at "' + path_outputDataObjects + '")');
|
|
888
|
+
}
|
|
889
|
+
for (let i = 0; i < obj_outputDataObjects.length; i++) {
|
|
890
|
+
const obj_outputDataObjects_item = obj_outputDataObjects[i];
|
|
891
|
+
const path_outputDataObjects_item = path_outputDataObjects + '[' + i + ']';
|
|
892
|
+
if (typeof obj_outputDataObjects_item !== 'object') {
|
|
893
|
+
return new TypeError('Expected "object" but received "' + typeof obj_outputDataObjects_item + '" (at "' + path_outputDataObjects_item + '")');
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
const obj_type = obj.type;
|
|
897
|
+
const path_type = path + '.type';
|
|
898
|
+
if (typeof obj_type !== 'string') {
|
|
899
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
900
|
+
}
|
|
901
|
+
const obj_version = obj.version;
|
|
902
|
+
const path_version = path + '.version';
|
|
903
|
+
if (typeof obj_version !== 'string') {
|
|
904
|
+
return new TypeError('Expected "string" but received "' + typeof obj_version + '" (at "' + path_version + '")');
|
|
905
|
+
}
|
|
906
|
+
})();
|
|
907
|
+
return v_error === undefined ? null : v_error;
|
|
908
|
+
}
|
|
909
|
+
const RepresentationType$2 = 'DataTransformDefinitionRepresentation';
|
|
910
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
911
|
+
const input_outputDataObjects = input.outputDataObjects;
|
|
912
|
+
const input_outputDataObjects_id = path.fullPath + '__outputDataObjects';
|
|
913
|
+
for (let i = 0; i < input_outputDataObjects.length; i++) {
|
|
914
|
+
const input_outputDataObjects_item = input_outputDataObjects[i];
|
|
915
|
+
let input_outputDataObjects_item_id = input_outputDataObjects_id + '__' + i;
|
|
916
|
+
input_outputDataObjects[i] = ingest$3(input_outputDataObjects_item, {
|
|
917
|
+
fullPath: input_outputDataObjects_item_id,
|
|
918
|
+
propertyName: i,
|
|
919
|
+
parent: {
|
|
920
|
+
data: input,
|
|
921
|
+
key: path.fullPath,
|
|
922
|
+
existing: existing,
|
|
923
|
+
},
|
|
924
|
+
ttl: path.ttl
|
|
925
|
+
}, luvio, store, timestamp);
|
|
926
|
+
}
|
|
927
|
+
return input;
|
|
928
|
+
}
|
|
929
|
+
const select$6 = function DataTransformDefinitionRepresentationSelect() {
|
|
930
|
+
return {
|
|
931
|
+
kind: 'Fragment',
|
|
932
|
+
version: VERSION$2,
|
|
933
|
+
private: [],
|
|
934
|
+
selections: [
|
|
935
|
+
{
|
|
936
|
+
name: 'outputDataObjects',
|
|
937
|
+
kind: 'Link',
|
|
938
|
+
plural: true,
|
|
939
|
+
fragment: select$7()
|
|
940
|
+
},
|
|
941
|
+
{
|
|
942
|
+
name: 'type',
|
|
943
|
+
kind: 'Scalar'
|
|
944
|
+
},
|
|
945
|
+
{
|
|
946
|
+
name: 'version',
|
|
947
|
+
kind: 'Scalar'
|
|
948
|
+
}
|
|
949
|
+
]
|
|
950
|
+
};
|
|
951
|
+
};
|
|
952
|
+
function equals$2(existing, incoming) {
|
|
953
|
+
const existing_type = existing.type;
|
|
954
|
+
const incoming_type = incoming.type;
|
|
955
|
+
if (!(existing_type === incoming_type)) {
|
|
956
|
+
return false;
|
|
957
|
+
}
|
|
958
|
+
const existing_version = existing.version;
|
|
959
|
+
const incoming_version = incoming.version;
|
|
960
|
+
if (!(existing_version === incoming_version)) {
|
|
961
|
+
return false;
|
|
962
|
+
}
|
|
963
|
+
const existing_outputDataObjects = existing.outputDataObjects;
|
|
964
|
+
const incoming_outputDataObjects = incoming.outputDataObjects;
|
|
965
|
+
const equals_outputDataObjects_items = equalsArray(existing_outputDataObjects, incoming_outputDataObjects, (existing_outputDataObjects_item, incoming_outputDataObjects_item) => {
|
|
966
|
+
if (!(existing_outputDataObjects_item.__ref === incoming_outputDataObjects_item.__ref)) {
|
|
967
|
+
return false;
|
|
968
|
+
}
|
|
969
|
+
});
|
|
970
|
+
if (equals_outputDataObjects_items === false) {
|
|
971
|
+
return false;
|
|
972
|
+
}
|
|
973
|
+
return true;
|
|
974
|
+
}
|
|
975
|
+
const ingest$2 = function DataTransformDefinitionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
976
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
977
|
+
const validateError = validate$3(input);
|
|
978
|
+
if (validateError !== null) {
|
|
979
|
+
throw validateError;
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
const key = path.fullPath;
|
|
983
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 3000000;
|
|
984
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "data-transform", VERSION$2, RepresentationType$2, equals$2);
|
|
985
|
+
return createLink(key);
|
|
986
|
+
};
|
|
987
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
988
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
989
|
+
const rootKey = fullPathFactory();
|
|
990
|
+
rootKeySet.set(rootKey, {
|
|
991
|
+
namespace: keyPrefix,
|
|
992
|
+
representationName: RepresentationType$2,
|
|
993
|
+
mergeable: false
|
|
994
|
+
});
|
|
995
|
+
const input_outputDataObjects_length = input.outputDataObjects.length;
|
|
996
|
+
for (let i = 0; i < input_outputDataObjects_length; i++) {
|
|
997
|
+
getTypeCacheKeys$3(rootKeySet, luvio, input.outputDataObjects[i]);
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
const VERSION$1 = "3a9081497eeed505968a3ef0ca548f46";
|
|
1002
|
+
function validate$2(obj, path = 'DataTransformRepresentation') {
|
|
1003
|
+
const validateCdpAssetBaseRepresentation_validateError = validate$9(obj, path);
|
|
1004
|
+
if (validateCdpAssetBaseRepresentation_validateError !== null) {
|
|
1005
|
+
return validateCdpAssetBaseRepresentation_validateError;
|
|
1006
|
+
}
|
|
1007
|
+
const v_error = (() => {
|
|
1008
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1009
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1010
|
+
}
|
|
1011
|
+
const obj_actionUrls = obj.actionUrls;
|
|
1012
|
+
const path_actionUrls = path + '.actionUrls';
|
|
1013
|
+
const referencepath_actionUrlsValidationError = validate$8(obj_actionUrls, path_actionUrls);
|
|
1014
|
+
if (referencepath_actionUrlsValidationError !== null) {
|
|
1015
|
+
let message = 'Object doesn\'t match BaseActionRepresentation (at "' + path_actionUrls + '")\n';
|
|
1016
|
+
message += referencepath_actionUrlsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1017
|
+
return new TypeError(message);
|
|
1018
|
+
}
|
|
1019
|
+
if (obj.capabilities !== undefined) {
|
|
1020
|
+
const obj_capabilities = obj.capabilities;
|
|
1021
|
+
const path_capabilities = path + '.capabilities';
|
|
1022
|
+
if (typeof obj_capabilities !== 'object' || ArrayIsArray(obj_capabilities) || obj_capabilities === null) {
|
|
1023
|
+
return new TypeError('Expected "object" but received "' + typeof obj_capabilities + '" (at "' + path_capabilities + '")');
|
|
1024
|
+
}
|
|
1025
|
+
const obj_capabilities_keys = ObjectKeys(obj_capabilities);
|
|
1026
|
+
for (let i = 0; i < obj_capabilities_keys.length; i++) {
|
|
1027
|
+
const key = obj_capabilities_keys[i];
|
|
1028
|
+
const obj_capabilities_prop = obj_capabilities[key];
|
|
1029
|
+
const path_capabilities_prop = path_capabilities + '["' + key + '"]';
|
|
1030
|
+
if (typeof obj_capabilities_prop !== 'boolean') {
|
|
1031
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_capabilities_prop + '" (at "' + path_capabilities_prop + '")');
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
const obj_creationType = obj.creationType;
|
|
1036
|
+
const path_creationType = path + '.creationType';
|
|
1037
|
+
if (typeof obj_creationType !== 'string') {
|
|
1038
|
+
return new TypeError('Expected "string" but received "' + typeof obj_creationType + '" (at "' + path_creationType + '")');
|
|
1039
|
+
}
|
|
1040
|
+
if (obj.dataSpaceName !== undefined) {
|
|
1041
|
+
const obj_dataSpaceName = obj.dataSpaceName;
|
|
1042
|
+
const path_dataSpaceName = path + '.dataSpaceName';
|
|
1043
|
+
if (typeof obj_dataSpaceName !== 'string') {
|
|
1044
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dataSpaceName + '" (at "' + path_dataSpaceName + '")');
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
const obj_definition = obj.definition;
|
|
1048
|
+
const path_definition = path + '.definition';
|
|
1049
|
+
if (typeof obj_definition !== 'object') {
|
|
1050
|
+
return new TypeError('Expected "object" but received "' + typeof obj_definition + '" (at "' + path_definition + '")');
|
|
1051
|
+
}
|
|
1052
|
+
if (obj.description !== undefined) {
|
|
1053
|
+
const obj_description = obj.description;
|
|
1054
|
+
const path_description = path + '.description';
|
|
1055
|
+
if (typeof obj_description !== 'string') {
|
|
1056
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
if (obj.lastRunDate !== undefined) {
|
|
1060
|
+
const obj_lastRunDate = obj.lastRunDate;
|
|
1061
|
+
const path_lastRunDate = path + '.lastRunDate';
|
|
1062
|
+
if (typeof obj_lastRunDate !== 'string') {
|
|
1063
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastRunDate + '" (at "' + path_lastRunDate + '")');
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
if (obj.lastRunErrorCode !== undefined) {
|
|
1067
|
+
const obj_lastRunErrorCode = obj.lastRunErrorCode;
|
|
1068
|
+
const path_lastRunErrorCode = path + '.lastRunErrorCode';
|
|
1069
|
+
const referencepath_lastRunErrorCodeValidationError = validate$7(obj_lastRunErrorCode, path_lastRunErrorCode);
|
|
1070
|
+
if (referencepath_lastRunErrorCodeValidationError !== null) {
|
|
1071
|
+
let message = 'Object doesn\'t match CdpErrorRepresentation (at "' + path_lastRunErrorCode + '")\n';
|
|
1072
|
+
message += referencepath_lastRunErrorCodeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1073
|
+
return new TypeError(message);
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
if (obj.lastRunErrorMessage !== undefined) {
|
|
1077
|
+
const obj_lastRunErrorMessage = obj.lastRunErrorMessage;
|
|
1078
|
+
const path_lastRunErrorMessage = path + '.lastRunErrorMessage';
|
|
1079
|
+
if (typeof obj_lastRunErrorMessage !== 'string') {
|
|
1080
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastRunErrorMessage + '" (at "' + path_lastRunErrorMessage + '")');
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
if (obj.lastRunStatus !== undefined) {
|
|
1084
|
+
const obj_lastRunStatus = obj.lastRunStatus;
|
|
1085
|
+
const path_lastRunStatus = path + '.lastRunStatus';
|
|
1086
|
+
if (typeof obj_lastRunStatus !== 'string') {
|
|
1087
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastRunStatus + '" (at "' + path_lastRunStatus + '")');
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
if (obj.schedule !== undefined) {
|
|
1091
|
+
const obj_schedule = obj.schedule;
|
|
1092
|
+
const path_schedule = path + '.schedule';
|
|
1093
|
+
const referencepath_scheduleValidationError = validate$6(obj_schedule, path_schedule);
|
|
1094
|
+
if (referencepath_scheduleValidationError !== null) {
|
|
1095
|
+
let message = 'Object doesn\'t match ScheduleRepresentation (at "' + path_schedule + '")\n';
|
|
1096
|
+
message += referencepath_scheduleValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1097
|
+
return new TypeError(message);
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
const obj_status = obj.status;
|
|
1101
|
+
const path_status = path + '.status';
|
|
1102
|
+
if (typeof obj_status !== 'string') {
|
|
1103
|
+
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
1104
|
+
}
|
|
1105
|
+
if (obj.tags !== undefined) {
|
|
1106
|
+
const obj_tags = obj.tags;
|
|
1107
|
+
const path_tags = path + '.tags';
|
|
1108
|
+
if (typeof obj_tags !== 'object' || ArrayIsArray(obj_tags) || obj_tags === null) {
|
|
1109
|
+
return new TypeError('Expected "object" but received "' + typeof obj_tags + '" (at "' + path_tags + '")');
|
|
1110
|
+
}
|
|
1111
|
+
const obj_tags_keys = ObjectKeys(obj_tags);
|
|
1112
|
+
for (let i = 0; i < obj_tags_keys.length; i++) {
|
|
1113
|
+
const key = obj_tags_keys[i];
|
|
1114
|
+
const obj_tags_prop = obj_tags[key];
|
|
1115
|
+
const path_tags_prop = path_tags + '["' + key + '"]';
|
|
1116
|
+
if (typeof obj_tags_prop !== 'string') {
|
|
1117
|
+
return new TypeError('Expected "string" but received "' + typeof obj_tags_prop + '" (at "' + path_tags_prop + '")');
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
const obj_type = obj.type;
|
|
1122
|
+
const path_type = path + '.type';
|
|
1123
|
+
if (typeof obj_type !== 'string') {
|
|
1124
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
1125
|
+
}
|
|
1126
|
+
if (obj.version !== undefined) {
|
|
1127
|
+
obj.version;
|
|
1128
|
+
}
|
|
1129
|
+
})();
|
|
1130
|
+
return v_error === undefined ? null : v_error;
|
|
1131
|
+
}
|
|
1132
|
+
const RepresentationType$1 = 'DataTransformRepresentation';
|
|
1133
|
+
function keyBuilder$5(luvio, config) {
|
|
1134
|
+
return keyBuilder$6(luvio, config);
|
|
1135
|
+
}
|
|
1136
|
+
function keyBuilderFromType(luvio, object) {
|
|
1137
|
+
return keyBuilderFromType$2(luvio, object);
|
|
1138
|
+
}
|
|
1139
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
1140
|
+
const input_definition = input.definition;
|
|
1141
|
+
const input_definition_id = path.fullPath + '__definition';
|
|
1142
|
+
input.definition = ingest$2(input_definition, {
|
|
1143
|
+
fullPath: input_definition_id,
|
|
1144
|
+
propertyName: 'definition',
|
|
1145
|
+
parent: {
|
|
1146
|
+
data: input,
|
|
1147
|
+
key: path.fullPath,
|
|
1148
|
+
existing: existing,
|
|
1149
|
+
},
|
|
1150
|
+
ttl: path.ttl
|
|
1151
|
+
}, luvio, store, timestamp);
|
|
1152
|
+
return input;
|
|
1153
|
+
}
|
|
1154
|
+
const select$5 = function DataTransformRepresentationSelect() {
|
|
1155
|
+
const { selections: CdpAssetBaseRepresentationSelections } = select$b();
|
|
1156
|
+
const { selections: BaseActionRepresentation__selections, opaque: BaseActionRepresentation__opaque, } = select$a();
|
|
1157
|
+
const { selections: CdpErrorRepresentation__selections, opaque: CdpErrorRepresentation__opaque, } = select$9();
|
|
1158
|
+
const { selections: ScheduleRepresentation__selections, opaque: ScheduleRepresentation__opaque, } = select$8();
|
|
1159
|
+
return {
|
|
1160
|
+
kind: 'Fragment',
|
|
1161
|
+
version: VERSION$1,
|
|
1162
|
+
private: [],
|
|
1163
|
+
selections: [
|
|
1164
|
+
...CdpAssetBaseRepresentationSelections,
|
|
1165
|
+
{
|
|
1166
|
+
name: 'actionUrls',
|
|
1167
|
+
kind: 'Object',
|
|
1168
|
+
selections: BaseActionRepresentation__selections
|
|
1169
|
+
},
|
|
1170
|
+
{
|
|
1171
|
+
name: 'capabilities',
|
|
1172
|
+
kind: 'Scalar',
|
|
1173
|
+
map: true,
|
|
1174
|
+
required: false
|
|
1175
|
+
},
|
|
1176
|
+
{
|
|
1177
|
+
name: 'creationType',
|
|
1178
|
+
kind: 'Scalar'
|
|
1179
|
+
},
|
|
1180
|
+
{
|
|
1181
|
+
name: 'dataSpaceName',
|
|
1182
|
+
kind: 'Scalar',
|
|
1183
|
+
required: false
|
|
1184
|
+
},
|
|
1185
|
+
{
|
|
1186
|
+
name: 'definition',
|
|
1187
|
+
kind: 'Link',
|
|
1188
|
+
fragment: select$6()
|
|
1189
|
+
},
|
|
1190
|
+
{
|
|
1191
|
+
name: 'description',
|
|
1192
|
+
kind: 'Scalar',
|
|
1193
|
+
required: false
|
|
1194
|
+
},
|
|
1195
|
+
{
|
|
1196
|
+
name: 'lastRunDate',
|
|
1197
|
+
kind: 'Scalar',
|
|
1198
|
+
required: false
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
name: 'lastRunErrorCode',
|
|
1202
|
+
kind: 'Object',
|
|
1203
|
+
selections: CdpErrorRepresentation__selections,
|
|
1204
|
+
required: false
|
|
1205
|
+
},
|
|
1206
|
+
{
|
|
1207
|
+
name: 'lastRunErrorMessage',
|
|
1208
|
+
kind: 'Scalar',
|
|
1209
|
+
required: false
|
|
1210
|
+
},
|
|
1211
|
+
{
|
|
1212
|
+
name: 'lastRunStatus',
|
|
1213
|
+
kind: 'Scalar',
|
|
1214
|
+
required: false
|
|
1215
|
+
},
|
|
1216
|
+
{
|
|
1217
|
+
name: 'schedule',
|
|
1218
|
+
kind: 'Object',
|
|
1219
|
+
selections: ScheduleRepresentation__selections,
|
|
1220
|
+
required: false
|
|
1221
|
+
},
|
|
1222
|
+
{
|
|
1223
|
+
name: 'status',
|
|
1224
|
+
kind: 'Scalar'
|
|
1225
|
+
},
|
|
1226
|
+
{
|
|
1227
|
+
name: 'tags',
|
|
1228
|
+
kind: 'Scalar',
|
|
1229
|
+
map: true,
|
|
1230
|
+
required: false
|
|
1231
|
+
},
|
|
1232
|
+
{
|
|
1233
|
+
name: 'type',
|
|
1234
|
+
kind: 'Scalar'
|
|
1235
|
+
},
|
|
1236
|
+
{
|
|
1237
|
+
name: 'version',
|
|
1238
|
+
kind: 'Scalar',
|
|
1239
|
+
required: false
|
|
1240
|
+
}
|
|
1241
|
+
]
|
|
1242
|
+
};
|
|
1243
|
+
};
|
|
1244
|
+
function equals$1(existing, incoming) {
|
|
1245
|
+
if (equals$8(existing, incoming) === false) {
|
|
1246
|
+
return false;
|
|
1247
|
+
}
|
|
1248
|
+
const existing_creationType = existing.creationType;
|
|
1249
|
+
const incoming_creationType = incoming.creationType;
|
|
1250
|
+
if (!(existing_creationType === incoming_creationType)) {
|
|
1251
|
+
return false;
|
|
1252
|
+
}
|
|
1253
|
+
const existing_dataSpaceName = existing.dataSpaceName;
|
|
1254
|
+
const incoming_dataSpaceName = incoming.dataSpaceName;
|
|
1255
|
+
// if at least one of these optionals is defined
|
|
1256
|
+
if (existing_dataSpaceName !== undefined || incoming_dataSpaceName !== undefined) {
|
|
1257
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1258
|
+
// not equal
|
|
1259
|
+
if (existing_dataSpaceName === undefined || incoming_dataSpaceName === undefined) {
|
|
1260
|
+
return false;
|
|
1261
|
+
}
|
|
1262
|
+
if (!(existing_dataSpaceName === incoming_dataSpaceName)) {
|
|
1263
|
+
return false;
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
const existing_description = existing.description;
|
|
1267
|
+
const incoming_description = incoming.description;
|
|
1268
|
+
// if at least one of these optionals is defined
|
|
1269
|
+
if (existing_description !== undefined || incoming_description !== undefined) {
|
|
1270
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1271
|
+
// not equal
|
|
1272
|
+
if (existing_description === undefined || incoming_description === undefined) {
|
|
1273
|
+
return false;
|
|
1274
|
+
}
|
|
1275
|
+
if (!(existing_description === incoming_description)) {
|
|
1276
|
+
return false;
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
const existing_lastRunDate = existing.lastRunDate;
|
|
1280
|
+
const incoming_lastRunDate = incoming.lastRunDate;
|
|
1281
|
+
// if at least one of these optionals is defined
|
|
1282
|
+
if (existing_lastRunDate !== undefined || incoming_lastRunDate !== undefined) {
|
|
1283
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1284
|
+
// not equal
|
|
1285
|
+
if (existing_lastRunDate === undefined || incoming_lastRunDate === undefined) {
|
|
1286
|
+
return false;
|
|
1287
|
+
}
|
|
1288
|
+
if (!(existing_lastRunDate === incoming_lastRunDate)) {
|
|
1289
|
+
return false;
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
const existing_lastRunErrorMessage = existing.lastRunErrorMessage;
|
|
1293
|
+
const incoming_lastRunErrorMessage = incoming.lastRunErrorMessage;
|
|
1294
|
+
// if at least one of these optionals is defined
|
|
1295
|
+
if (existing_lastRunErrorMessage !== undefined || incoming_lastRunErrorMessage !== undefined) {
|
|
1296
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1297
|
+
// not equal
|
|
1298
|
+
if (existing_lastRunErrorMessage === undefined || incoming_lastRunErrorMessage === undefined) {
|
|
1299
|
+
return false;
|
|
1300
|
+
}
|
|
1301
|
+
if (!(existing_lastRunErrorMessage === incoming_lastRunErrorMessage)) {
|
|
1302
|
+
return false;
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
const existing_lastRunStatus = existing.lastRunStatus;
|
|
1306
|
+
const incoming_lastRunStatus = incoming.lastRunStatus;
|
|
1307
|
+
// if at least one of these optionals is defined
|
|
1308
|
+
if (existing_lastRunStatus !== undefined || incoming_lastRunStatus !== undefined) {
|
|
1309
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1310
|
+
// not equal
|
|
1311
|
+
if (existing_lastRunStatus === undefined || incoming_lastRunStatus === undefined) {
|
|
1312
|
+
return false;
|
|
1313
|
+
}
|
|
1314
|
+
if (!(existing_lastRunStatus === incoming_lastRunStatus)) {
|
|
1315
|
+
return false;
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
const existing_status = existing.status;
|
|
1319
|
+
const incoming_status = incoming.status;
|
|
1320
|
+
if (!(existing_status === incoming_status)) {
|
|
1321
|
+
return false;
|
|
1322
|
+
}
|
|
1323
|
+
const existing_type = existing.type;
|
|
1324
|
+
const incoming_type = incoming.type;
|
|
1325
|
+
if (!(existing_type === incoming_type)) {
|
|
1326
|
+
return false;
|
|
1327
|
+
}
|
|
1328
|
+
const existing_version = existing.version;
|
|
1329
|
+
const incoming_version = incoming.version;
|
|
1330
|
+
// if at least one of these optionals is defined
|
|
1331
|
+
if (existing_version !== undefined || incoming_version !== undefined) {
|
|
1332
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1333
|
+
// not equal
|
|
1334
|
+
if (existing_version === undefined || incoming_version === undefined) {
|
|
1335
|
+
return false;
|
|
1336
|
+
}
|
|
1337
|
+
if (!(existing_version === incoming_version)) {
|
|
1338
|
+
return false;
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
const existing_actionUrls = existing.actionUrls;
|
|
1342
|
+
const incoming_actionUrls = incoming.actionUrls;
|
|
1343
|
+
if (!(equals$7(existing_actionUrls, incoming_actionUrls))) {
|
|
1344
|
+
return false;
|
|
1345
|
+
}
|
|
1346
|
+
const existing_capabilities = existing.capabilities;
|
|
1347
|
+
const incoming_capabilities = incoming.capabilities;
|
|
1348
|
+
// if at least one of these optionals is defined
|
|
1349
|
+
if (existing_capabilities !== undefined || incoming_capabilities !== undefined) {
|
|
1350
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1351
|
+
// not equal
|
|
1352
|
+
if (existing_capabilities === undefined || incoming_capabilities === undefined) {
|
|
1353
|
+
return false;
|
|
1354
|
+
}
|
|
1355
|
+
const equals_capabilities_props = equalsObject(existing_capabilities, incoming_capabilities, (existing_capabilities_prop, incoming_capabilities_prop) => {
|
|
1356
|
+
if (!(existing_capabilities_prop === incoming_capabilities_prop)) {
|
|
1357
|
+
return false;
|
|
1358
|
+
}
|
|
1359
|
+
});
|
|
1360
|
+
if (equals_capabilities_props === false) {
|
|
1361
|
+
return false;
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
const existing_definition = existing.definition;
|
|
1365
|
+
const incoming_definition = incoming.definition;
|
|
1366
|
+
if (!(existing_definition.__ref === incoming_definition.__ref)) {
|
|
1367
|
+
return false;
|
|
1368
|
+
}
|
|
1369
|
+
const existing_lastRunErrorCode = existing.lastRunErrorCode;
|
|
1370
|
+
const incoming_lastRunErrorCode = incoming.lastRunErrorCode;
|
|
1371
|
+
// if at least one of these optionals is defined
|
|
1372
|
+
if (existing_lastRunErrorCode !== undefined || incoming_lastRunErrorCode !== undefined) {
|
|
1373
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1374
|
+
// not equal
|
|
1375
|
+
if (existing_lastRunErrorCode === undefined || incoming_lastRunErrorCode === undefined) {
|
|
1376
|
+
return false;
|
|
1377
|
+
}
|
|
1378
|
+
if (!(equals$6(existing_lastRunErrorCode, incoming_lastRunErrorCode))) {
|
|
1379
|
+
return false;
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
const existing_schedule = existing.schedule;
|
|
1383
|
+
const incoming_schedule = incoming.schedule;
|
|
1384
|
+
// if at least one of these optionals is defined
|
|
1385
|
+
if (existing_schedule !== undefined || incoming_schedule !== undefined) {
|
|
1386
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1387
|
+
// not equal
|
|
1388
|
+
if (existing_schedule === undefined || incoming_schedule === undefined) {
|
|
1389
|
+
return false;
|
|
1390
|
+
}
|
|
1391
|
+
if (!(equals$5(existing_schedule, incoming_schedule))) {
|
|
1392
|
+
return false;
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
const existing_tags = existing.tags;
|
|
1396
|
+
const incoming_tags = incoming.tags;
|
|
1397
|
+
// if at least one of these optionals is defined
|
|
1398
|
+
if (existing_tags !== undefined || incoming_tags !== undefined) {
|
|
1399
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1400
|
+
// not equal
|
|
1401
|
+
if (existing_tags === undefined || incoming_tags === undefined) {
|
|
1402
|
+
return false;
|
|
1403
|
+
}
|
|
1404
|
+
const equals_tags_props = equalsObject(existing_tags, incoming_tags, (existing_tags_prop, incoming_tags_prop) => {
|
|
1405
|
+
if (!(existing_tags_prop === incoming_tags_prop)) {
|
|
1406
|
+
return false;
|
|
1407
|
+
}
|
|
1408
|
+
});
|
|
1409
|
+
if (equals_tags_props === false) {
|
|
1410
|
+
return false;
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
return true;
|
|
1414
|
+
}
|
|
1415
|
+
const ingest$1 = function DataTransformRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1416
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1417
|
+
const validateError = validate$2(input);
|
|
1418
|
+
if (validateError !== null) {
|
|
1419
|
+
throw validateError;
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
const key = keyBuilderFromType(luvio, input);
|
|
1423
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 3000000;
|
|
1424
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "data-transform", VERSION$1, RepresentationType$1, equals$1);
|
|
1425
|
+
return createLink(key);
|
|
1426
|
+
};
|
|
1427
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
1428
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1429
|
+
const rootKey = keyBuilderFromType(luvio, input);
|
|
1430
|
+
rootKeySet.set(rootKey, {
|
|
1431
|
+
namespace: keyPrefix,
|
|
1432
|
+
representationName: RepresentationType$4,
|
|
1433
|
+
mergeable: false
|
|
1434
|
+
});
|
|
1435
|
+
getTypeCacheKeys$2(rootKeySet, luvio, input.definition, () => rootKey + "__" + "definition");
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
function select$4(luvio, params) {
|
|
1439
|
+
return select$5();
|
|
1440
|
+
}
|
|
1441
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
1442
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
1443
|
+
}
|
|
1444
|
+
function ingestSuccess$3(luvio, resourceParams, response) {
|
|
1445
|
+
const { body } = response;
|
|
1446
|
+
const key = keyBuilderFromType(luvio, body);
|
|
1447
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
1448
|
+
const snapshot = luvio.storeLookup({
|
|
1449
|
+
recordId: key,
|
|
1450
|
+
node: select$4(),
|
|
1451
|
+
variables: {},
|
|
1452
|
+
});
|
|
1453
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1454
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1455
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
deepFreeze(snapshot.data);
|
|
1459
|
+
return snapshot;
|
|
1460
|
+
}
|
|
1461
|
+
function createResourceRequest$4(config) {
|
|
1462
|
+
const headers = {};
|
|
1463
|
+
return {
|
|
1464
|
+
baseUri: '/services/data/v62.0',
|
|
1465
|
+
basePath: '/ssot/data-transforms',
|
|
1466
|
+
method: 'post',
|
|
1467
|
+
body: config.body,
|
|
1468
|
+
urlParams: {},
|
|
1469
|
+
queryParams: config.queryParams,
|
|
1470
|
+
headers,
|
|
1471
|
+
priority: 'normal',
|
|
1472
|
+
};
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
const adapterName$4 = 'createDataTransform';
|
|
1476
|
+
const createDataTransform_ConfigPropertyMetadata = [
|
|
1477
|
+
generateParamConfigMetadata('filterGroup', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1478
|
+
generateParamConfigMetadata('capabilities', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1479
|
+
generateParamConfigMetadata('creationType', true, 2 /* Body */, 0 /* String */),
|
|
1480
|
+
generateParamConfigMetadata('currencyIsoCode', false, 2 /* Body */, 0 /* String */),
|
|
1481
|
+
generateParamConfigMetadata('dataSpaceName', false, 2 /* Body */, 0 /* String */),
|
|
1482
|
+
generateParamConfigMetadata('definition', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1483
|
+
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
1484
|
+
generateParamConfigMetadata('label', false, 2 /* Body */, 0 /* String */),
|
|
1485
|
+
generateParamConfigMetadata('name', false, 2 /* Body */, 0 /* String */),
|
|
1486
|
+
generateParamConfigMetadata('primarySource', false, 2 /* Body */, 0 /* String */),
|
|
1487
|
+
generateParamConfigMetadata('tags', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1488
|
+
generateParamConfigMetadata('type', true, 2 /* Body */, 0 /* String */),
|
|
1489
|
+
];
|
|
1490
|
+
const createDataTransform_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, createDataTransform_ConfigPropertyMetadata);
|
|
1491
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$5(createDataTransform_ConfigPropertyMetadata);
|
|
1492
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
1493
|
+
const config = {};
|
|
1494
|
+
typeCheckConfig$5(untrustedConfig, config, createDataTransform_ConfigPropertyMetadata);
|
|
1495
|
+
const untrustedConfig_capabilities = untrustedConfig.capabilities;
|
|
1496
|
+
if (untrustedIsObject(untrustedConfig_capabilities)) {
|
|
1497
|
+
const untrustedConfig_capabilities_object = {};
|
|
1498
|
+
const untrustedConfig_capabilities_keys = Object.keys(untrustedConfig_capabilities);
|
|
1499
|
+
for (let i = 0, arrayLength = untrustedConfig_capabilities_keys.length; i < arrayLength; i++) {
|
|
1500
|
+
const key = untrustedConfig_capabilities_keys[i];
|
|
1501
|
+
const untrustedConfig_capabilities_prop = untrustedConfig_capabilities[key];
|
|
1502
|
+
if (typeof untrustedConfig_capabilities_prop === 'boolean') {
|
|
1503
|
+
if (untrustedConfig_capabilities_object !== undefined) {
|
|
1504
|
+
untrustedConfig_capabilities_object[key] = untrustedConfig_capabilities_prop;
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
if (untrustedConfig_capabilities_object !== undefined && Object.keys(untrustedConfig_capabilities_object).length >= 0) {
|
|
1509
|
+
config.capabilities = untrustedConfig_capabilities_object;
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
const untrustedConfig_definition = untrustedConfig.definition;
|
|
1513
|
+
if (untrustedIsObject(untrustedConfig_definition)) {
|
|
1514
|
+
const untrustedConfig_definition_object = {};
|
|
1515
|
+
const untrustedConfig_definition_keys = Object.keys(untrustedConfig_definition);
|
|
1516
|
+
for (let i = 0, arrayLength = untrustedConfig_definition_keys.length; i < arrayLength; i++) {
|
|
1517
|
+
const key = untrustedConfig_definition_keys[i];
|
|
1518
|
+
const untrustedConfig_definition_prop = untrustedConfig_definition[key];
|
|
1519
|
+
if (untrustedConfig_definition_object !== undefined) {
|
|
1520
|
+
untrustedConfig_definition_object[key] = untrustedConfig_definition_prop;
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
if (untrustedConfig_definition_object !== undefined && Object.keys(untrustedConfig_definition_object).length >= 0) {
|
|
1524
|
+
config.definition = untrustedConfig_definition_object;
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
const untrustedConfig_tags = untrustedConfig.tags;
|
|
1528
|
+
if (untrustedIsObject(untrustedConfig_tags)) {
|
|
1529
|
+
const untrustedConfig_tags_object = {};
|
|
1530
|
+
const untrustedConfig_tags_keys = Object.keys(untrustedConfig_tags);
|
|
1531
|
+
for (let i = 0, arrayLength = untrustedConfig_tags_keys.length; i < arrayLength; i++) {
|
|
1532
|
+
const key = untrustedConfig_tags_keys[i];
|
|
1533
|
+
const untrustedConfig_tags_prop = untrustedConfig_tags[key];
|
|
1534
|
+
if (typeof untrustedConfig_tags_prop === 'string') {
|
|
1535
|
+
if (untrustedConfig_tags_object !== undefined) {
|
|
1536
|
+
untrustedConfig_tags_object[key] = untrustedConfig_tags_prop;
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
if (untrustedConfig_tags_object !== undefined && Object.keys(untrustedConfig_tags_object).length >= 0) {
|
|
1541
|
+
config.tags = untrustedConfig_tags_object;
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
return config;
|
|
1545
|
+
}
|
|
1546
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
1547
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1548
|
+
return null;
|
|
1549
|
+
}
|
|
1550
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1551
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1552
|
+
}
|
|
1553
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
1554
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1555
|
+
return null;
|
|
1556
|
+
}
|
|
1557
|
+
return config;
|
|
1558
|
+
}
|
|
1559
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
1560
|
+
const resourceParams = createResourceParams$4(config);
|
|
1561
|
+
const request = createResourceRequest$4(resourceParams);
|
|
1562
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1563
|
+
.then((response) => {
|
|
1564
|
+
return luvio.handleSuccessResponse(() => {
|
|
1565
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response);
|
|
1566
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1567
|
+
}, () => {
|
|
1568
|
+
const cache = new StoreKeyMap();
|
|
1569
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
1570
|
+
return cache;
|
|
1571
|
+
});
|
|
1572
|
+
}, (response) => {
|
|
1573
|
+
deepFreeze(response);
|
|
1574
|
+
throw response;
|
|
1575
|
+
});
|
|
1576
|
+
}
|
|
1577
|
+
const createDataTransformAdapterFactory = (luvio) => {
|
|
1578
|
+
return function createDataTransform(untrustedConfig) {
|
|
1579
|
+
const config = validateAdapterConfig$4(untrustedConfig, createDataTransform_ConfigPropertyNames);
|
|
1580
|
+
// Invalid or incomplete config
|
|
1581
|
+
if (config === null) {
|
|
1582
|
+
throw new Error('Invalid config for "createDataTransform"');
|
|
1583
|
+
}
|
|
1584
|
+
return buildNetworkSnapshot$4(luvio, config);
|
|
1585
|
+
};
|
|
1586
|
+
};
|
|
1587
|
+
|
|
1588
|
+
function keyBuilder$4(luvio, params) {
|
|
1589
|
+
return keyBuilder$5(luvio, {
|
|
1590
|
+
name: params.urlParams.dataTransformNameOrId
|
|
1591
|
+
});
|
|
1592
|
+
}
|
|
1593
|
+
function getResponseCacheKeys$3(cacheKeyMap, luvio, resourceParams) {
|
|
1594
|
+
const key = keyBuilder$4(luvio, resourceParams);
|
|
1595
|
+
cacheKeyMap.set(key, {
|
|
1596
|
+
namespace: keyPrefix,
|
|
1597
|
+
representationName: RepresentationType$1,
|
|
1598
|
+
mergeable: false
|
|
1599
|
+
});
|
|
1600
|
+
}
|
|
1601
|
+
function evictSuccess(luvio, resourceParams) {
|
|
1602
|
+
const key = keyBuilder$4(luvio, resourceParams);
|
|
1603
|
+
luvio.storeEvict(key);
|
|
1604
|
+
}
|
|
1605
|
+
function createResourceRequest$3(config) {
|
|
1606
|
+
const headers = {};
|
|
1607
|
+
return {
|
|
1608
|
+
baseUri: '/services/data/v62.0',
|
|
1609
|
+
basePath: '/ssot/data-transforms/' + config.urlParams.dataTransformNameOrId + '',
|
|
1610
|
+
method: 'delete',
|
|
1611
|
+
body: null,
|
|
1612
|
+
urlParams: config.urlParams,
|
|
1613
|
+
queryParams: {},
|
|
1614
|
+
headers,
|
|
1615
|
+
priority: 'normal',
|
|
1616
|
+
};
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
const adapterName$3 = 'deleteDataTransform';
|
|
1620
|
+
const deleteDataTransform_ConfigPropertyMetadata = [
|
|
1621
|
+
generateParamConfigMetadata('dataTransformNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1622
|
+
];
|
|
1623
|
+
const deleteDataTransform_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, deleteDataTransform_ConfigPropertyMetadata);
|
|
1624
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$5(deleteDataTransform_ConfigPropertyMetadata);
|
|
1625
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
1626
|
+
const config = {};
|
|
1627
|
+
typeCheckConfig$5(untrustedConfig, config, deleteDataTransform_ConfigPropertyMetadata);
|
|
1628
|
+
return config;
|
|
1629
|
+
}
|
|
1630
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
1631
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1632
|
+
return null;
|
|
1633
|
+
}
|
|
1634
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1635
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1636
|
+
}
|
|
1637
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
1638
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1639
|
+
return null;
|
|
1640
|
+
}
|
|
1641
|
+
return config;
|
|
1642
|
+
}
|
|
1643
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
1644
|
+
const resourceParams = createResourceParams$3(config);
|
|
1645
|
+
const request = createResourceRequest$3(resourceParams);
|
|
1646
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1647
|
+
.then(() => {
|
|
1648
|
+
return luvio.handleSuccessResponse(() => {
|
|
1649
|
+
evictSuccess(luvio, resourceParams);
|
|
1650
|
+
return luvio.storeBroadcast();
|
|
1651
|
+
}, () => {
|
|
1652
|
+
const cache = new StoreKeyMap();
|
|
1653
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams);
|
|
1654
|
+
return cache;
|
|
1655
|
+
});
|
|
1656
|
+
}, (response) => {
|
|
1657
|
+
deepFreeze(response);
|
|
1658
|
+
throw response;
|
|
1659
|
+
});
|
|
1660
|
+
}
|
|
1661
|
+
const deleteDataTransformAdapterFactory = (luvio) => {
|
|
1662
|
+
return function dataTransformdeleteDataTransform(untrustedConfig) {
|
|
1663
|
+
const config = validateAdapterConfig$3(untrustedConfig, deleteDataTransform_ConfigPropertyNames);
|
|
1664
|
+
// Invalid or incomplete config
|
|
1665
|
+
if (config === null) {
|
|
1666
|
+
throw new Error(`Invalid config for "${adapterName$3}"`);
|
|
1667
|
+
}
|
|
1668
|
+
return buildNetworkSnapshot$3(luvio, config);
|
|
1669
|
+
};
|
|
1670
|
+
};
|
|
1671
|
+
|
|
1672
|
+
function select$3(luvio, params) {
|
|
1673
|
+
return select$5();
|
|
1674
|
+
}
|
|
1675
|
+
function keyBuilder$3(luvio, params) {
|
|
1676
|
+
return keyBuilder$5(luvio, {
|
|
1677
|
+
name: params.urlParams.dataTransformNameOrId
|
|
1678
|
+
});
|
|
1679
|
+
}
|
|
1680
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
1681
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
1682
|
+
}
|
|
1683
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
1684
|
+
const { body } = response;
|
|
1685
|
+
const key = keyBuilder$3(luvio, resourceParams);
|
|
1686
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
1687
|
+
const snapshot = luvio.storeLookup({
|
|
1688
|
+
recordId: key,
|
|
1689
|
+
node: select$3(),
|
|
1690
|
+
variables: {},
|
|
1691
|
+
}, snapshotRefresh);
|
|
1692
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1693
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1694
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1695
|
+
}
|
|
1696
|
+
}
|
|
1697
|
+
deepFreeze(snapshot.data);
|
|
1698
|
+
return snapshot;
|
|
1699
|
+
}
|
|
1700
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
1701
|
+
const key = keyBuilder$3(luvio, params);
|
|
1702
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1703
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
1704
|
+
return errorSnapshot;
|
|
1705
|
+
}
|
|
1706
|
+
function createResourceRequest$2(config) {
|
|
1707
|
+
const headers = {};
|
|
1708
|
+
return {
|
|
1709
|
+
baseUri: '/services/data/v62.0',
|
|
1710
|
+
basePath: '/ssot/data-transforms/' + config.urlParams.dataTransformNameOrId + '',
|
|
1711
|
+
method: 'get',
|
|
1712
|
+
body: null,
|
|
1713
|
+
urlParams: config.urlParams,
|
|
1714
|
+
queryParams: config.queryParams,
|
|
1715
|
+
headers,
|
|
1716
|
+
priority: 'normal',
|
|
1717
|
+
};
|
|
1718
|
+
}
|
|
1719
|
+
function createResourceRequestFromRepresentation(representation) {
|
|
1720
|
+
const config = {
|
|
1721
|
+
urlParams: {},
|
|
1722
|
+
queryParams: {},
|
|
1723
|
+
};
|
|
1724
|
+
config.urlParams.dataTransformNameOrId = representation.name;
|
|
1725
|
+
return createResourceRequest$2(config);
|
|
1726
|
+
}
|
|
1727
|
+
|
|
1728
|
+
const adapterName$2 = 'getDataTransform';
|
|
1729
|
+
const getDataTransform_ConfigPropertyMetadata = [
|
|
1730
|
+
generateParamConfigMetadata('dataTransformNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1731
|
+
generateParamConfigMetadata('filterGroup', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1732
|
+
];
|
|
1733
|
+
const getDataTransform_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getDataTransform_ConfigPropertyMetadata);
|
|
1734
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$5(getDataTransform_ConfigPropertyMetadata);
|
|
1735
|
+
function keyBuilder$2(luvio, config) {
|
|
1736
|
+
const resourceParams = createResourceParams$2(config);
|
|
1737
|
+
return keyBuilder$3(luvio, resourceParams);
|
|
1738
|
+
}
|
|
1739
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
1740
|
+
const config = {};
|
|
1741
|
+
typeCheckConfig$5(untrustedConfig, config, getDataTransform_ConfigPropertyMetadata);
|
|
1742
|
+
return config;
|
|
1743
|
+
}
|
|
1744
|
+
function validateAdapterConfig$2(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$2(untrustedConfig);
|
|
1752
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1753
|
+
return null;
|
|
1754
|
+
}
|
|
1755
|
+
return config;
|
|
1756
|
+
}
|
|
1757
|
+
function adapterFragment$1(luvio, config) {
|
|
1758
|
+
createResourceParams$2(config);
|
|
1759
|
+
return select$3();
|
|
1760
|
+
}
|
|
1761
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
1762
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
1763
|
+
config,
|
|
1764
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1765
|
+
});
|
|
1766
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1767
|
+
}
|
|
1768
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
1769
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
1770
|
+
config,
|
|
1771
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1772
|
+
});
|
|
1773
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1774
|
+
}
|
|
1775
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
1776
|
+
const resourceParams = createResourceParams$2(config);
|
|
1777
|
+
const request = createResourceRequest$2(resourceParams);
|
|
1778
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1779
|
+
.then((response) => {
|
|
1780
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
1781
|
+
const cache = new StoreKeyMap();
|
|
1782
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
1783
|
+
return cache;
|
|
1784
|
+
});
|
|
1785
|
+
}, (response) => {
|
|
1786
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
1787
|
+
});
|
|
1788
|
+
}
|
|
1789
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
1790
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
1791
|
+
}
|
|
1792
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
1793
|
+
const { luvio, config } = context;
|
|
1794
|
+
const selector = {
|
|
1795
|
+
recordId: keyBuilder$2(luvio, config),
|
|
1796
|
+
node: adapterFragment$1(luvio, config),
|
|
1797
|
+
variables: {},
|
|
1798
|
+
};
|
|
1799
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1800
|
+
config,
|
|
1801
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1802
|
+
});
|
|
1803
|
+
return cacheSnapshot;
|
|
1804
|
+
}
|
|
1805
|
+
const getDataTransformAdapterFactory = (luvio) => function dataTransform__getDataTransform(untrustedConfig, requestContext) {
|
|
1806
|
+
const config = validateAdapterConfig$2(untrustedConfig, getDataTransform_ConfigPropertyNames);
|
|
1807
|
+
// Invalid or incomplete config
|
|
1808
|
+
if (config === null) {
|
|
1809
|
+
return null;
|
|
1810
|
+
}
|
|
1811
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1812
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
1813
|
+
};
|
|
1814
|
+
const notifyChangeFactory = (luvio, options) => {
|
|
1815
|
+
return function getSsotDataTransformsByDataTransformNameOrIdNotifyChange(configs) {
|
|
1816
|
+
const keys = configs.map(c => keyBuilder$5(luvio, c));
|
|
1817
|
+
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
1818
|
+
for (let i = 0, len = entries.length; i < len; i++) {
|
|
1819
|
+
const { key, record: val } = entries[i];
|
|
1820
|
+
const refreshRequest = createResourceRequestFromRepresentation(val);
|
|
1821
|
+
luvio.dispatchResourceRequest(refreshRequest, options)
|
|
1822
|
+
.then((response) => {
|
|
1823
|
+
return luvio.handleSuccessResponse(() => {
|
|
1824
|
+
const { body } = response;
|
|
1825
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
1826
|
+
return luvio.storeBroadcast();
|
|
1827
|
+
}, () => {
|
|
1828
|
+
const cache = new StoreKeyMap();
|
|
1829
|
+
getTypeCacheKeys$1(cache, luvio, response.body);
|
|
1830
|
+
return cache;
|
|
1831
|
+
});
|
|
1832
|
+
}, (error) => {
|
|
1833
|
+
return luvio.handleErrorResponse(() => {
|
|
1834
|
+
const errorSnapshot = luvio.errorSnapshot(error);
|
|
1835
|
+
luvio.storeIngestError(key, errorSnapshot, undefined);
|
|
1836
|
+
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
1837
|
+
});
|
|
1838
|
+
});
|
|
1839
|
+
}
|
|
1840
|
+
});
|
|
1841
|
+
};
|
|
1842
|
+
};
|
|
1843
|
+
|
|
1844
|
+
function select$2(luvio, params) {
|
|
1845
|
+
return select$5();
|
|
1846
|
+
}
|
|
1847
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
1848
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
1849
|
+
}
|
|
1850
|
+
function ingestSuccess$1(luvio, resourceParams, response) {
|
|
1851
|
+
const { body } = response;
|
|
1852
|
+
const key = keyBuilderFromType(luvio, body);
|
|
1853
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
1854
|
+
const snapshot = luvio.storeLookup({
|
|
1855
|
+
recordId: key,
|
|
1856
|
+
node: select$2(),
|
|
1857
|
+
variables: {},
|
|
1858
|
+
});
|
|
1859
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1860
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1861
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
deepFreeze(snapshot.data);
|
|
1865
|
+
return snapshot;
|
|
1866
|
+
}
|
|
1867
|
+
function createResourceRequest$1(config) {
|
|
1868
|
+
const headers = {};
|
|
1869
|
+
return {
|
|
1870
|
+
baseUri: '/services/data/v62.0',
|
|
1871
|
+
basePath: '/ssot/data-transforms/' + config.urlParams.dataTransformNameOrId + '',
|
|
1872
|
+
method: 'put',
|
|
1873
|
+
body: config.body,
|
|
1874
|
+
urlParams: config.urlParams,
|
|
1875
|
+
queryParams: config.queryParams,
|
|
1876
|
+
headers,
|
|
1877
|
+
priority: 'normal',
|
|
1878
|
+
};
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1881
|
+
const adapterName$1 = 'updateDataTransform';
|
|
1882
|
+
const updateDataTransform_ConfigPropertyMetadata = [
|
|
1883
|
+
generateParamConfigMetadata('dataTransformNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1884
|
+
generateParamConfigMetadata('filterGroup', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1885
|
+
generateParamConfigMetadata('capabilities', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1886
|
+
generateParamConfigMetadata('creationType', true, 2 /* Body */, 0 /* String */),
|
|
1887
|
+
generateParamConfigMetadata('currencyIsoCode', false, 2 /* Body */, 0 /* String */),
|
|
1888
|
+
generateParamConfigMetadata('dataSpaceName', false, 2 /* Body */, 0 /* String */),
|
|
1889
|
+
generateParamConfigMetadata('definition', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1890
|
+
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
1891
|
+
generateParamConfigMetadata('label', false, 2 /* Body */, 0 /* String */),
|
|
1892
|
+
generateParamConfigMetadata('name', false, 2 /* Body */, 0 /* String */),
|
|
1893
|
+
generateParamConfigMetadata('primarySource', false, 2 /* Body */, 0 /* String */),
|
|
1894
|
+
generateParamConfigMetadata('tags', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1895
|
+
generateParamConfigMetadata('type', true, 2 /* Body */, 0 /* String */),
|
|
1896
|
+
];
|
|
1897
|
+
const updateDataTransform_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, updateDataTransform_ConfigPropertyMetadata);
|
|
1898
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$5(updateDataTransform_ConfigPropertyMetadata);
|
|
1899
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
1900
|
+
const config = {};
|
|
1901
|
+
typeCheckConfig$5(untrustedConfig, config, updateDataTransform_ConfigPropertyMetadata);
|
|
1902
|
+
const untrustedConfig_capabilities = untrustedConfig.capabilities;
|
|
1903
|
+
if (untrustedIsObject(untrustedConfig_capabilities)) {
|
|
1904
|
+
const untrustedConfig_capabilities_object = {};
|
|
1905
|
+
const untrustedConfig_capabilities_keys = Object.keys(untrustedConfig_capabilities);
|
|
1906
|
+
for (let i = 0, arrayLength = untrustedConfig_capabilities_keys.length; i < arrayLength; i++) {
|
|
1907
|
+
const key = untrustedConfig_capabilities_keys[i];
|
|
1908
|
+
const untrustedConfig_capabilities_prop = untrustedConfig_capabilities[key];
|
|
1909
|
+
if (typeof untrustedConfig_capabilities_prop === 'boolean') {
|
|
1910
|
+
if (untrustedConfig_capabilities_object !== undefined) {
|
|
1911
|
+
untrustedConfig_capabilities_object[key] = untrustedConfig_capabilities_prop;
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
}
|
|
1915
|
+
if (untrustedConfig_capabilities_object !== undefined && Object.keys(untrustedConfig_capabilities_object).length >= 0) {
|
|
1916
|
+
config.capabilities = untrustedConfig_capabilities_object;
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
const untrustedConfig_definition = untrustedConfig.definition;
|
|
1920
|
+
if (untrustedIsObject(untrustedConfig_definition)) {
|
|
1921
|
+
const untrustedConfig_definition_object = {};
|
|
1922
|
+
const untrustedConfig_definition_keys = Object.keys(untrustedConfig_definition);
|
|
1923
|
+
for (let i = 0, arrayLength = untrustedConfig_definition_keys.length; i < arrayLength; i++) {
|
|
1924
|
+
const key = untrustedConfig_definition_keys[i];
|
|
1925
|
+
const untrustedConfig_definition_prop = untrustedConfig_definition[key];
|
|
1926
|
+
if (untrustedConfig_definition_object !== undefined) {
|
|
1927
|
+
untrustedConfig_definition_object[key] = untrustedConfig_definition_prop;
|
|
1928
|
+
}
|
|
1929
|
+
}
|
|
1930
|
+
if (untrustedConfig_definition_object !== undefined && Object.keys(untrustedConfig_definition_object).length >= 0) {
|
|
1931
|
+
config.definition = untrustedConfig_definition_object;
|
|
1932
|
+
}
|
|
1933
|
+
}
|
|
1934
|
+
const untrustedConfig_tags = untrustedConfig.tags;
|
|
1935
|
+
if (untrustedIsObject(untrustedConfig_tags)) {
|
|
1936
|
+
const untrustedConfig_tags_object = {};
|
|
1937
|
+
const untrustedConfig_tags_keys = Object.keys(untrustedConfig_tags);
|
|
1938
|
+
for (let i = 0, arrayLength = untrustedConfig_tags_keys.length; i < arrayLength; i++) {
|
|
1939
|
+
const key = untrustedConfig_tags_keys[i];
|
|
1940
|
+
const untrustedConfig_tags_prop = untrustedConfig_tags[key];
|
|
1941
|
+
if (typeof untrustedConfig_tags_prop === 'string') {
|
|
1942
|
+
if (untrustedConfig_tags_object !== undefined) {
|
|
1943
|
+
untrustedConfig_tags_object[key] = untrustedConfig_tags_prop;
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1946
|
+
}
|
|
1947
|
+
if (untrustedConfig_tags_object !== undefined && Object.keys(untrustedConfig_tags_object).length >= 0) {
|
|
1948
|
+
config.tags = untrustedConfig_tags_object;
|
|
1949
|
+
}
|
|
1950
|
+
}
|
|
1951
|
+
return config;
|
|
1952
|
+
}
|
|
1953
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
1954
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1955
|
+
return null;
|
|
1956
|
+
}
|
|
1957
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1958
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1959
|
+
}
|
|
1960
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
1961
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1962
|
+
return null;
|
|
1963
|
+
}
|
|
1964
|
+
return config;
|
|
1965
|
+
}
|
|
1966
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
1967
|
+
const resourceParams = createResourceParams$1(config);
|
|
1968
|
+
const request = createResourceRequest$1(resourceParams);
|
|
1969
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1970
|
+
.then((response) => {
|
|
1971
|
+
return luvio.handleSuccessResponse(() => {
|
|
1972
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response);
|
|
1973
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1974
|
+
}, () => {
|
|
1975
|
+
const cache = new StoreKeyMap();
|
|
1976
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
1977
|
+
return cache;
|
|
1978
|
+
});
|
|
1979
|
+
}, (response) => {
|
|
1980
|
+
deepFreeze(response);
|
|
1981
|
+
throw response;
|
|
1982
|
+
});
|
|
1983
|
+
}
|
|
1984
|
+
const updateDataTransformAdapterFactory = (luvio) => {
|
|
1985
|
+
return function updateDataTransform(untrustedConfig) {
|
|
1986
|
+
const config = validateAdapterConfig$1(untrustedConfig, updateDataTransform_ConfigPropertyNames);
|
|
1987
|
+
// Invalid or incomplete config
|
|
1988
|
+
if (config === null) {
|
|
1989
|
+
throw new Error('Invalid config for "updateDataTransform"');
|
|
1990
|
+
}
|
|
1991
|
+
return buildNetworkSnapshot$1(luvio, config);
|
|
1992
|
+
};
|
|
1993
|
+
};
|
|
1994
|
+
|
|
1995
|
+
function validate$1(obj, path = 'TransformValidationIssueRepresentation') {
|
|
149
1996
|
const v_error = (() => {
|
|
150
1997
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
151
1998
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -173,196 +2020,6 @@ function validate$5(obj, path = 'TransformValidationIssueRepresentation') {
|
|
|
173
2020
|
return v_error === undefined ? null : v_error;
|
|
174
2021
|
}
|
|
175
2022
|
|
|
176
|
-
function validate$4(obj, path = 'CdpUserRepresentation') {
|
|
177
|
-
const v_error = (() => {
|
|
178
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
179
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
180
|
-
}
|
|
181
|
-
const obj_id = obj.id;
|
|
182
|
-
const path_id = path + '.id';
|
|
183
|
-
if (typeof obj_id !== 'string') {
|
|
184
|
-
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
185
|
-
}
|
|
186
|
-
if (obj.name !== undefined) {
|
|
187
|
-
const obj_name = obj.name;
|
|
188
|
-
const path_name = path + '.name';
|
|
189
|
-
if (typeof obj_name !== 'string') {
|
|
190
|
-
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
if (obj.profilePhotoUrl !== undefined) {
|
|
194
|
-
const obj_profilePhotoUrl = obj.profilePhotoUrl;
|
|
195
|
-
const path_profilePhotoUrl = path + '.profilePhotoUrl';
|
|
196
|
-
if (typeof obj_profilePhotoUrl !== 'string') {
|
|
197
|
-
return new TypeError('Expected "string" but received "' + typeof obj_profilePhotoUrl + '" (at "' + path_profilePhotoUrl + '")');
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
})();
|
|
201
|
-
return v_error === undefined ? null : v_error;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
function validate$3(obj, path = 'CdpAssetBaseRepresentation') {
|
|
205
|
-
const v_error = (() => {
|
|
206
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
207
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
208
|
-
}
|
|
209
|
-
if (obj.createdBy !== undefined) {
|
|
210
|
-
const obj_createdBy = obj.createdBy;
|
|
211
|
-
const path_createdBy = path + '.createdBy';
|
|
212
|
-
const referencepath_createdByValidationError = validate$4(obj_createdBy, path_createdBy);
|
|
213
|
-
if (referencepath_createdByValidationError !== null) {
|
|
214
|
-
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_createdBy + '")\n';
|
|
215
|
-
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
216
|
-
return new TypeError(message);
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
if (obj.createdDate !== undefined) {
|
|
220
|
-
const obj_createdDate = obj.createdDate;
|
|
221
|
-
const path_createdDate = path + '.createdDate';
|
|
222
|
-
if (typeof obj_createdDate !== 'string') {
|
|
223
|
-
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
const obj_id = obj.id;
|
|
227
|
-
const path_id = path + '.id';
|
|
228
|
-
if (typeof obj_id !== 'string') {
|
|
229
|
-
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
230
|
-
}
|
|
231
|
-
if (obj.label !== undefined) {
|
|
232
|
-
const obj_label = obj.label;
|
|
233
|
-
const path_label = path + '.label';
|
|
234
|
-
if (typeof obj_label !== 'string') {
|
|
235
|
-
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
if (obj.lastModifiedBy !== undefined) {
|
|
239
|
-
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
240
|
-
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
241
|
-
const referencepath_lastModifiedByValidationError = validate$4(obj_lastModifiedBy, path_lastModifiedBy);
|
|
242
|
-
if (referencepath_lastModifiedByValidationError !== null) {
|
|
243
|
-
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_lastModifiedBy + '")\n';
|
|
244
|
-
message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
245
|
-
return new TypeError(message);
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
if (obj.lastModifiedDate !== undefined) {
|
|
249
|
-
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
250
|
-
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
251
|
-
if (typeof obj_lastModifiedDate !== 'string') {
|
|
252
|
-
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
if (obj.name !== undefined) {
|
|
256
|
-
const obj_name = obj.name;
|
|
257
|
-
const path_name = path + '.name';
|
|
258
|
-
if (typeof obj_name !== 'string') {
|
|
259
|
-
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
if (obj.namespace !== undefined) {
|
|
263
|
-
const obj_namespace = obj.namespace;
|
|
264
|
-
const path_namespace = path + '.namespace';
|
|
265
|
-
if (typeof obj_namespace !== 'string') {
|
|
266
|
-
return new TypeError('Expected "string" but received "' + typeof obj_namespace + '" (at "' + path_namespace + '")');
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
if (obj.url !== undefined) {
|
|
270
|
-
const obj_url = obj.url;
|
|
271
|
-
const path_url = path + '.url';
|
|
272
|
-
if (typeof obj_url !== 'string') {
|
|
273
|
-
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
})();
|
|
277
|
-
return v_error === undefined ? null : v_error;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
function validate$2(obj, path = 'DataObjectFieldRepresentation') {
|
|
281
|
-
const v_error = (() => {
|
|
282
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
283
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
284
|
-
}
|
|
285
|
-
const obj_isPrimaryKey = obj.isPrimaryKey;
|
|
286
|
-
const path_isPrimaryKey = path + '.isPrimaryKey';
|
|
287
|
-
if (typeof obj_isPrimaryKey !== 'boolean') {
|
|
288
|
-
return new TypeError('Expected "boolean" but received "' + typeof obj_isPrimaryKey + '" (at "' + path_isPrimaryKey + '")');
|
|
289
|
-
}
|
|
290
|
-
const obj_keyQualifierField = obj.keyQualifierField;
|
|
291
|
-
const path_keyQualifierField = path + '.keyQualifierField';
|
|
292
|
-
if (typeof obj_keyQualifierField !== 'string') {
|
|
293
|
-
return new TypeError('Expected "string" but received "' + typeof obj_keyQualifierField + '" (at "' + path_keyQualifierField + '")');
|
|
294
|
-
}
|
|
295
|
-
const obj_label = obj.label;
|
|
296
|
-
const path_label = path + '.label';
|
|
297
|
-
if (typeof obj_label !== 'string') {
|
|
298
|
-
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
299
|
-
}
|
|
300
|
-
const obj_name = obj.name;
|
|
301
|
-
const path_name = path + '.name';
|
|
302
|
-
if (typeof obj_name !== 'string') {
|
|
303
|
-
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
304
|
-
}
|
|
305
|
-
const obj_type = obj.type;
|
|
306
|
-
const path_type = path + '.type';
|
|
307
|
-
if (typeof obj_type !== 'string') {
|
|
308
|
-
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
309
|
-
}
|
|
310
|
-
})();
|
|
311
|
-
return v_error === undefined ? null : v_error;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
function validate$1(obj, path = 'DataObjectRepresentation') {
|
|
315
|
-
const validateCdpAssetBaseRepresentation_validateError = validate$3(obj, path);
|
|
316
|
-
if (validateCdpAssetBaseRepresentation_validateError !== null) {
|
|
317
|
-
return validateCdpAssetBaseRepresentation_validateError;
|
|
318
|
-
}
|
|
319
|
-
const v_error = (() => {
|
|
320
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
321
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
322
|
-
}
|
|
323
|
-
const obj_category = obj.category;
|
|
324
|
-
const path_category = path + '.category';
|
|
325
|
-
if (typeof obj_category !== 'string') {
|
|
326
|
-
return new TypeError('Expected "string" but received "' + typeof obj_category + '" (at "' + path_category + '")');
|
|
327
|
-
}
|
|
328
|
-
if (obj.eventDateTimeFieldName !== undefined) {
|
|
329
|
-
const obj_eventDateTimeFieldName = obj.eventDateTimeFieldName;
|
|
330
|
-
const path_eventDateTimeFieldName = path + '.eventDateTimeFieldName';
|
|
331
|
-
if (typeof obj_eventDateTimeFieldName !== 'string') {
|
|
332
|
-
return new TypeError('Expected "string" but received "' + typeof obj_eventDateTimeFieldName + '" (at "' + path_eventDateTimeFieldName + '")');
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
const obj_fields = obj.fields;
|
|
336
|
-
const path_fields = path + '.fields';
|
|
337
|
-
if (!ArrayIsArray(obj_fields)) {
|
|
338
|
-
return new TypeError('Expected "array" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
|
|
339
|
-
}
|
|
340
|
-
for (let i = 0; i < obj_fields.length; i++) {
|
|
341
|
-
const obj_fields_item = obj_fields[i];
|
|
342
|
-
const path_fields_item = path_fields + '[' + i + ']';
|
|
343
|
-
const referencepath_fields_itemValidationError = validate$2(obj_fields_item, path_fields_item);
|
|
344
|
-
if (referencepath_fields_itemValidationError !== null) {
|
|
345
|
-
let message = 'Object doesn\'t match DataObjectFieldRepresentation (at "' + path_fields_item + '")\n';
|
|
346
|
-
message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
347
|
-
return new TypeError(message);
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
if (obj.recordModifiedFieldName !== undefined) {
|
|
351
|
-
const obj_recordModifiedFieldName = obj.recordModifiedFieldName;
|
|
352
|
-
const path_recordModifiedFieldName = path + '.recordModifiedFieldName';
|
|
353
|
-
if (typeof obj_recordModifiedFieldName !== 'string') {
|
|
354
|
-
return new TypeError('Expected "string" but received "' + typeof obj_recordModifiedFieldName + '" (at "' + path_recordModifiedFieldName + '")');
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
const obj_type = obj.type;
|
|
358
|
-
const path_type = path + '.type';
|
|
359
|
-
if (typeof obj_type !== 'string') {
|
|
360
|
-
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
361
|
-
}
|
|
362
|
-
})();
|
|
363
|
-
return v_error === undefined ? null : v_error;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
2023
|
const VERSION = "21a4cd3206473ce28645099a11735bc6";
|
|
367
2024
|
function validate(obj, path = 'DataTransformValidationRepresentation') {
|
|
368
2025
|
const v_error = (() => {
|
|
@@ -378,7 +2035,7 @@ function validate(obj, path = 'DataTransformValidationRepresentation') {
|
|
|
378
2035
|
for (let i = 0; i < obj_issues.length; i++) {
|
|
379
2036
|
const obj_issues_item = obj_issues[i];
|
|
380
2037
|
const path_issues_item = path_issues + '[' + i + ']';
|
|
381
|
-
const referencepath_issues_itemValidationError = validate$
|
|
2038
|
+
const referencepath_issues_itemValidationError = validate$1(obj_issues_item, path_issues_item);
|
|
382
2039
|
if (referencepath_issues_itemValidationError !== null) {
|
|
383
2040
|
let message = 'Object doesn\'t match TransformValidationIssueRepresentation (at "' + path_issues_item + '")\n';
|
|
384
2041
|
message += referencepath_issues_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -395,7 +2052,7 @@ function validate(obj, path = 'DataTransformValidationRepresentation') {
|
|
|
395
2052
|
for (let i = 0; i < obj_outputDataObjects.length; i++) {
|
|
396
2053
|
const obj_outputDataObjects_item = obj_outputDataObjects[i];
|
|
397
2054
|
const path_outputDataObjects_item = path_outputDataObjects + '[' + i + ']';
|
|
398
|
-
const referencepath_outputDataObjects_itemValidationError = validate$
|
|
2055
|
+
const referencepath_outputDataObjects_itemValidationError = validate$4(obj_outputDataObjects_item, path_outputDataObjects_item);
|
|
399
2056
|
if (referencepath_outputDataObjects_itemValidationError !== null) {
|
|
400
2057
|
let message = 'Object doesn\'t match DataObjectRepresentation (at "' + path_outputDataObjects_item + '")\n';
|
|
401
2058
|
message += referencepath_outputDataObjects_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -507,14 +2164,14 @@ const validateDataTransforms_ConfigPropertyMetadata = [
|
|
|
507
2164
|
generateParamConfigMetadata('type', true, 2 /* Body */, 0 /* String */),
|
|
508
2165
|
];
|
|
509
2166
|
const validateDataTransforms_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, validateDataTransforms_ConfigPropertyMetadata);
|
|
510
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
2167
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$5(validateDataTransforms_ConfigPropertyMetadata);
|
|
511
2168
|
function keyBuilder(luvio, config) {
|
|
512
2169
|
const resourceParams = createResourceParams(config);
|
|
513
2170
|
return keyBuilder$1(luvio, resourceParams);
|
|
514
2171
|
}
|
|
515
2172
|
function typeCheckConfig(untrustedConfig) {
|
|
516
2173
|
const config = {};
|
|
517
|
-
typeCheckConfig$
|
|
2174
|
+
typeCheckConfig$5(untrustedConfig, config, validateDataTransforms_ConfigPropertyMetadata);
|
|
518
2175
|
const untrustedConfig_capabilities = untrustedConfig.capabilities;
|
|
519
2176
|
if (untrustedIsObject(untrustedConfig_capabilities)) {
|
|
520
2177
|
const untrustedConfig_capabilities_object = {};
|
|
@@ -612,7 +2269,7 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
612
2269
|
});
|
|
613
2270
|
}
|
|
614
2271
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
615
|
-
return buildNetworkSnapshotCachePolicy$
|
|
2272
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot, 'get', false);
|
|
616
2273
|
}
|
|
617
2274
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
618
2275
|
const { luvio, config } = context;
|
|
@@ -637,10 +2294,16 @@ const validateDataTransformsAdapterFactory = (luvio) => function dataTransform__
|
|
|
637
2294
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
638
2295
|
};
|
|
639
2296
|
|
|
2297
|
+
let createDataTransform;
|
|
2298
|
+
let deleteDataTransform;
|
|
2299
|
+
let getDataTransform;
|
|
2300
|
+
let getDataTransformNotifyChange;
|
|
2301
|
+
let updateDataTransform;
|
|
640
2302
|
let validateDataTransforms;
|
|
641
2303
|
// Imperative GET Adapters
|
|
2304
|
+
let getDataTransform_imperative;
|
|
642
2305
|
let validateDataTransforms_imperative;
|
|
643
|
-
|
|
2306
|
+
const getDataTransformMetadata = { apiFamily: 'datatransform', name: 'getDataTransform' };
|
|
644
2307
|
const validateDataTransformsMetadata = {
|
|
645
2308
|
apiFamily: 'datatransform',
|
|
646
2309
|
name: 'validateDataTransforms',
|
|
@@ -648,17 +2311,37 @@ const validateDataTransformsMetadata = {
|
|
|
648
2311
|
// Notify Update Available
|
|
649
2312
|
function bindExportsTo(luvio) {
|
|
650
2313
|
// LDS Adapters
|
|
2314
|
+
const getDataTransform_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getDataTransform', getDataTransformAdapterFactory), getDataTransformMetadata);
|
|
651
2315
|
const validateDataTransforms_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'validateDataTransforms', validateDataTransformsAdapterFactory), validateDataTransformsMetadata);
|
|
2316
|
+
function unwrapSnapshotData(factory) {
|
|
2317
|
+
const adapter = factory(luvio);
|
|
2318
|
+
return (config) => adapter(config).then((snapshot) => snapshot.data);
|
|
2319
|
+
}
|
|
652
2320
|
return {
|
|
2321
|
+
createDataTransform: unwrapSnapshotData(createDataTransformAdapterFactory),
|
|
2322
|
+
deleteDataTransform: createLDSAdapter(luvio, adapterName$3, deleteDataTransformAdapterFactory),
|
|
2323
|
+
getDataTransform: createWireAdapterConstructor(luvio, getDataTransform_ldsAdapter, getDataTransformMetadata),
|
|
2324
|
+
getDataTransformNotifyChange: createLDSAdapter(luvio, 'getDataTransformNotifyChange', notifyChangeFactory),
|
|
2325
|
+
updateDataTransform: unwrapSnapshotData(updateDataTransformAdapterFactory),
|
|
653
2326
|
validateDataTransforms: createWireAdapterConstructor(luvio, validateDataTransforms_ldsAdapter, validateDataTransformsMetadata),
|
|
654
2327
|
// Imperative GET Adapters
|
|
2328
|
+
getDataTransform_imperative: createImperativeAdapter(luvio, getDataTransform_ldsAdapter, getDataTransformMetadata),
|
|
655
2329
|
validateDataTransforms_imperative: createImperativeAdapter(luvio, validateDataTransforms_ldsAdapter, validateDataTransformsMetadata),
|
|
656
2330
|
// Notify Update Availables
|
|
657
2331
|
};
|
|
658
2332
|
}
|
|
659
2333
|
withDefaultLuvio((luvio) => {
|
|
660
|
-
({
|
|
2334
|
+
({
|
|
2335
|
+
createDataTransform,
|
|
2336
|
+
deleteDataTransform,
|
|
2337
|
+
getDataTransform,
|
|
2338
|
+
getDataTransformNotifyChange,
|
|
2339
|
+
updateDataTransform,
|
|
2340
|
+
validateDataTransforms,
|
|
2341
|
+
getDataTransform_imperative,
|
|
2342
|
+
validateDataTransforms_imperative,
|
|
2343
|
+
} = bindExportsTo(luvio));
|
|
661
2344
|
});
|
|
662
2345
|
|
|
663
|
-
export { validateDataTransforms, validateDataTransforms_imperative };
|
|
664
|
-
// version: 1.354.0-
|
|
2346
|
+
export { createDataTransform, deleteDataTransform, getDataTransform, getDataTransformNotifyChange, getDataTransform_imperative, updateDataTransform, validateDataTransforms, validateDataTransforms_imperative };
|
|
2347
|
+
// version: 1.354.0-dev21-5f69ab6bb6
|