@salesforce/lds-adapters-cdp-data-transform 1.354.0-dev1 → 1.354.0-dev10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (20) hide show
  1. package/dist/es/es2018/cdp-data-transform.js +1448 -110
  2. package/dist/es/es2018/types/src/generated/adapters/createDataTransform.d.ts +32 -0
  3. package/dist/es/es2018/types/src/generated/adapters/deleteDataTransform.d.ts +14 -0
  4. package/dist/es/es2018/types/src/generated/adapters/getDataTransform.d.ts +30 -0
  5. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +3 -0
  6. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +6 -1
  7. package/dist/es/es2018/types/src/generated/resources/deleteSsotDataTransformsByDataTransformNameOrId.d.ts +12 -0
  8. package/dist/es/es2018/types/src/generated/resources/getSsotDataTransformsByDataTransformNameOrId.d.ts +19 -0
  9. package/dist/es/es2018/types/src/generated/resources/postSsotDataTransforms.d.ts +31 -0
  10. package/dist/es/es2018/types/src/generated/types/BaseActionRepresentation.d.ts +31 -0
  11. package/dist/es/es2018/types/src/generated/types/CdpAssetBaseRepresentation.d.ts +20 -6
  12. package/dist/es/es2018/types/src/generated/types/CdpErrorRepresentation.d.ts +31 -0
  13. package/dist/es/es2018/types/src/generated/types/DataObjectRepresentation.d.ts +9 -5
  14. package/dist/es/es2018/types/src/generated/types/DataTransformDefinitionRepresentation.d.ts +44 -0
  15. package/dist/es/es2018/types/src/generated/types/DataTransformRepresentation.d.ts +97 -0
  16. package/dist/es/es2018/types/src/generated/types/ScheduleRepresentation.d.ts +31 -0
  17. package/package.json +3 -3
  18. package/sfdc/index.js +1603 -205
  19. package/src/raml/api.raml +173 -1
  20. package/src/raml/luvio.raml +18 -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, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1, typeCheckConfig as typeCheckConfig$1, StoreKeyMap, createResourceParams as createResourceParams$1 } from 'force/luvioEngine';
17
+ import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$4, typeCheckConfig as typeCheckConfig$4, 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,1580 @@ 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
- __ref: serializeStructuredKey(ref),
177
+ __ref: serializeStructuredKey(ref),
178
+ };
179
+ }
180
+
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$b = 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$a = function CdpAssetBaseRepresentationSelect() {
356
+ const { selections: CdpUserRepresentation__selections, opaque: CdpUserRepresentation__opaque, } = select$b();
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$9 = 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$8 = 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$7 = 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
+ const obj_keyQualifierField = obj.keyQualifierField;
676
+ const path_keyQualifierField = path + '.keyQualifierField';
677
+ if (typeof obj_keyQualifierField !== 'string') {
678
+ return new TypeError('Expected "string" but received "' + typeof obj_keyQualifierField + '" (at "' + path_keyQualifierField + '")');
679
+ }
680
+ const obj_label = obj.label;
681
+ const path_label = path + '.label';
682
+ if (typeof obj_label !== 'string') {
683
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
684
+ }
685
+ const obj_name = obj.name;
686
+ const path_name = path + '.name';
687
+ if (typeof obj_name !== 'string') {
688
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
689
+ }
690
+ const obj_type = obj.type;
691
+ const path_type = path + '.type';
692
+ if (typeof obj_type !== 'string') {
693
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
694
+ }
695
+ })();
696
+ return v_error === undefined ? null : v_error;
697
+ }
698
+ function equals$4(existing, incoming) {
699
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
700
+ return false;
701
+ }
702
+ return true;
703
+ }
704
+
705
+ const VERSION$3 = "225283ac9b2f9ab35452025c5c47ac83";
706
+ function validate$4(obj, path = 'DataObjectRepresentation') {
707
+ const validateCdpAssetBaseRepresentation_validateError = validate$9(obj, path);
708
+ if (validateCdpAssetBaseRepresentation_validateError !== null) {
709
+ return validateCdpAssetBaseRepresentation_validateError;
710
+ }
711
+ const v_error = (() => {
712
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
713
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
714
+ }
715
+ const obj_category = obj.category;
716
+ const path_category = path + '.category';
717
+ if (typeof obj_category !== 'string') {
718
+ return new TypeError('Expected "string" but received "' + typeof obj_category + '" (at "' + path_category + '")');
719
+ }
720
+ if (obj.eventDateTimeFieldName !== undefined) {
721
+ const obj_eventDateTimeFieldName = obj.eventDateTimeFieldName;
722
+ const path_eventDateTimeFieldName = path + '.eventDateTimeFieldName';
723
+ if (typeof obj_eventDateTimeFieldName !== 'string') {
724
+ return new TypeError('Expected "string" but received "' + typeof obj_eventDateTimeFieldName + '" (at "' + path_eventDateTimeFieldName + '")');
725
+ }
726
+ }
727
+ const obj_fields = obj.fields;
728
+ const path_fields = path + '.fields';
729
+ if (!ArrayIsArray(obj_fields)) {
730
+ return new TypeError('Expected "array" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
731
+ }
732
+ for (let i = 0; i < obj_fields.length; i++) {
733
+ const obj_fields_item = obj_fields[i];
734
+ const path_fields_item = path_fields + '[' + i + ']';
735
+ const referencepath_fields_itemValidationError = validate$5(obj_fields_item, path_fields_item);
736
+ if (referencepath_fields_itemValidationError !== null) {
737
+ let message = 'Object doesn\'t match DataObjectFieldRepresentation (at "' + path_fields_item + '")\n';
738
+ message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
739
+ return new TypeError(message);
740
+ }
741
+ }
742
+ if (obj.recordModifiedFieldName !== undefined) {
743
+ const obj_recordModifiedFieldName = obj.recordModifiedFieldName;
744
+ const path_recordModifiedFieldName = path + '.recordModifiedFieldName';
745
+ if (typeof obj_recordModifiedFieldName !== 'string') {
746
+ return new TypeError('Expected "string" but received "' + typeof obj_recordModifiedFieldName + '" (at "' + path_recordModifiedFieldName + '")');
747
+ }
748
+ }
749
+ const obj_type = obj.type;
750
+ const path_type = path + '.type';
751
+ if (typeof obj_type !== 'string') {
752
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
753
+ }
754
+ })();
755
+ return v_error === undefined ? null : v_error;
756
+ }
757
+ const RepresentationType$3 = 'DataObjectRepresentation';
758
+ function keyBuilderFromType$1(luvio, object) {
759
+ return keyBuilderFromType$2(luvio, object);
760
+ }
761
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
762
+ return input;
763
+ }
764
+ const select$6 = function DataObjectRepresentationSelect() {
765
+ return {
766
+ kind: 'Fragment',
767
+ version: VERSION$3,
768
+ private: [],
769
+ opaque: true
770
+ };
771
+ };
772
+ function equals$3(existing, incoming) {
773
+ if (equals$8(existing, incoming) === false) {
774
+ return false;
775
+ }
776
+ const existing_category = existing.category;
777
+ const incoming_category = incoming.category;
778
+ if (!(existing_category === incoming_category)) {
779
+ return false;
780
+ }
781
+ const existing_eventDateTimeFieldName = existing.eventDateTimeFieldName;
782
+ const incoming_eventDateTimeFieldName = incoming.eventDateTimeFieldName;
783
+ // if at least one of these optionals is defined
784
+ if (existing_eventDateTimeFieldName !== undefined || incoming_eventDateTimeFieldName !== undefined) {
785
+ // if one of these is not defined we know the other is defined and therefore
786
+ // not equal
787
+ if (existing_eventDateTimeFieldName === undefined || incoming_eventDateTimeFieldName === undefined) {
788
+ return false;
789
+ }
790
+ if (!(existing_eventDateTimeFieldName === incoming_eventDateTimeFieldName)) {
791
+ return false;
792
+ }
793
+ }
794
+ const existing_recordModifiedFieldName = existing.recordModifiedFieldName;
795
+ const incoming_recordModifiedFieldName = incoming.recordModifiedFieldName;
796
+ // if at least one of these optionals is defined
797
+ if (existing_recordModifiedFieldName !== undefined || incoming_recordModifiedFieldName !== undefined) {
798
+ // if one of these is not defined we know the other is defined and therefore
799
+ // not equal
800
+ if (existing_recordModifiedFieldName === undefined || incoming_recordModifiedFieldName === undefined) {
801
+ return false;
802
+ }
803
+ if (!(existing_recordModifiedFieldName === incoming_recordModifiedFieldName)) {
804
+ return false;
805
+ }
806
+ }
807
+ const existing_type = existing.type;
808
+ const incoming_type = incoming.type;
809
+ if (!(existing_type === incoming_type)) {
810
+ return false;
811
+ }
812
+ const existing_fields = existing.fields;
813
+ const incoming_fields = incoming.fields;
814
+ const equals_fields_items = equalsArray(existing_fields, incoming_fields, (existing_fields_item, incoming_fields_item) => {
815
+ if (!(equals$4(existing_fields_item, incoming_fields_item))) {
816
+ return false;
817
+ }
818
+ });
819
+ if (equals_fields_items === false) {
820
+ return false;
821
+ }
822
+ return true;
823
+ }
824
+ const ingest$3 = function DataObjectRepresentationIngest(input, path, luvio, store, timestamp) {
825
+ if (process.env.NODE_ENV !== 'production') {
826
+ const validateError = validate$4(input);
827
+ if (validateError !== null) {
828
+ throw validateError;
829
+ }
830
+ }
831
+ const key = keyBuilderFromType$1(luvio, input);
832
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 3000000;
833
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "data-transform", VERSION$3, RepresentationType$3, equals$3);
834
+ return createLink(key);
835
+ };
836
+ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
837
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
838
+ const rootKey = keyBuilderFromType$1(luvio, input);
839
+ rootKeySet.set(rootKey, {
840
+ namespace: keyPrefix,
841
+ representationName: RepresentationType$4,
842
+ mergeable: false
843
+ });
844
+ }
845
+
846
+ const VERSION$2 = "6ef7bcc16bd2f432497fc85ead97bca0";
847
+ function validate$3(obj, path = 'DataTransformDefinitionRepresentation') {
848
+ const v_error = (() => {
849
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
850
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
851
+ }
852
+ const obj_outputDataObjects = obj.outputDataObjects;
853
+ const path_outputDataObjects = path + '.outputDataObjects';
854
+ if (!ArrayIsArray(obj_outputDataObjects)) {
855
+ return new TypeError('Expected "array" but received "' + typeof obj_outputDataObjects + '" (at "' + path_outputDataObjects + '")');
856
+ }
857
+ for (let i = 0; i < obj_outputDataObjects.length; i++) {
858
+ const obj_outputDataObjects_item = obj_outputDataObjects[i];
859
+ const path_outputDataObjects_item = path_outputDataObjects + '[' + i + ']';
860
+ if (typeof obj_outputDataObjects_item !== 'object') {
861
+ return new TypeError('Expected "object" but received "' + typeof obj_outputDataObjects_item + '" (at "' + path_outputDataObjects_item + '")');
862
+ }
863
+ }
864
+ const obj_type = obj.type;
865
+ const path_type = path + '.type';
866
+ if (typeof obj_type !== 'string') {
867
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
868
+ }
869
+ const obj_version = obj.version;
870
+ const path_version = path + '.version';
871
+ if (typeof obj_version !== 'string') {
872
+ return new TypeError('Expected "string" but received "' + typeof obj_version + '" (at "' + path_version + '")');
873
+ }
874
+ })();
875
+ return v_error === undefined ? null : v_error;
876
+ }
877
+ const RepresentationType$2 = 'DataTransformDefinitionRepresentation';
878
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
879
+ const input_outputDataObjects = input.outputDataObjects;
880
+ const input_outputDataObjects_id = path.fullPath + '__outputDataObjects';
881
+ for (let i = 0; i < input_outputDataObjects.length; i++) {
882
+ const input_outputDataObjects_item = input_outputDataObjects[i];
883
+ let input_outputDataObjects_item_id = input_outputDataObjects_id + '__' + i;
884
+ input_outputDataObjects[i] = ingest$3(input_outputDataObjects_item, {
885
+ fullPath: input_outputDataObjects_item_id,
886
+ propertyName: i,
887
+ parent: {
888
+ data: input,
889
+ key: path.fullPath,
890
+ existing: existing,
891
+ },
892
+ ttl: path.ttl
893
+ }, luvio, store, timestamp);
894
+ }
895
+ return input;
896
+ }
897
+ const select$5 = function DataTransformDefinitionRepresentationSelect() {
898
+ return {
899
+ kind: 'Fragment',
900
+ version: VERSION$2,
901
+ private: [],
902
+ selections: [
903
+ {
904
+ name: 'outputDataObjects',
905
+ kind: 'Link',
906
+ plural: true,
907
+ fragment: select$6()
908
+ },
909
+ {
910
+ name: 'type',
911
+ kind: 'Scalar'
912
+ },
913
+ {
914
+ name: 'version',
915
+ kind: 'Scalar'
916
+ }
917
+ ]
918
+ };
919
+ };
920
+ function equals$2(existing, incoming) {
921
+ const existing_type = existing.type;
922
+ const incoming_type = incoming.type;
923
+ if (!(existing_type === incoming_type)) {
924
+ return false;
925
+ }
926
+ const existing_version = existing.version;
927
+ const incoming_version = incoming.version;
928
+ if (!(existing_version === incoming_version)) {
929
+ return false;
930
+ }
931
+ const existing_outputDataObjects = existing.outputDataObjects;
932
+ const incoming_outputDataObjects = incoming.outputDataObjects;
933
+ const equals_outputDataObjects_items = equalsArray(existing_outputDataObjects, incoming_outputDataObjects, (existing_outputDataObjects_item, incoming_outputDataObjects_item) => {
934
+ if (!(existing_outputDataObjects_item.__ref === incoming_outputDataObjects_item.__ref)) {
935
+ return false;
936
+ }
937
+ });
938
+ if (equals_outputDataObjects_items === false) {
939
+ return false;
940
+ }
941
+ return true;
942
+ }
943
+ const ingest$2 = function DataTransformDefinitionRepresentationIngest(input, path, luvio, store, timestamp) {
944
+ if (process.env.NODE_ENV !== 'production') {
945
+ const validateError = validate$3(input);
946
+ if (validateError !== null) {
947
+ throw validateError;
948
+ }
949
+ }
950
+ const key = path.fullPath;
951
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 3000000;
952
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "data-transform", VERSION$2, RepresentationType$2, equals$2);
953
+ return createLink(key);
954
+ };
955
+ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
956
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
957
+ const rootKey = fullPathFactory();
958
+ rootKeySet.set(rootKey, {
959
+ namespace: keyPrefix,
960
+ representationName: RepresentationType$2,
961
+ mergeable: false
962
+ });
963
+ const input_outputDataObjects_length = input.outputDataObjects.length;
964
+ for (let i = 0; i < input_outputDataObjects_length; i++) {
965
+ getTypeCacheKeys$3(rootKeySet, luvio, input.outputDataObjects[i]);
966
+ }
967
+ }
968
+
969
+ const VERSION$1 = "924b289e2a40b63f6d1307278d60bd26";
970
+ function validate$2(obj, path = 'DataTransformRepresentation') {
971
+ const validateCdpAssetBaseRepresentation_validateError = validate$9(obj, path);
972
+ if (validateCdpAssetBaseRepresentation_validateError !== null) {
973
+ return validateCdpAssetBaseRepresentation_validateError;
974
+ }
975
+ const v_error = (() => {
976
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
977
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
978
+ }
979
+ const obj_actionUrls = obj.actionUrls;
980
+ const path_actionUrls = path + '.actionUrls';
981
+ const referencepath_actionUrlsValidationError = validate$8(obj_actionUrls, path_actionUrls);
982
+ if (referencepath_actionUrlsValidationError !== null) {
983
+ let message = 'Object doesn\'t match BaseActionRepresentation (at "' + path_actionUrls + '")\n';
984
+ message += referencepath_actionUrlsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
985
+ return new TypeError(message);
986
+ }
987
+ if (obj.capabilities !== undefined) {
988
+ const obj_capabilities = obj.capabilities;
989
+ const path_capabilities = path + '.capabilities';
990
+ if (typeof obj_capabilities !== 'object' || ArrayIsArray(obj_capabilities) || obj_capabilities === null) {
991
+ return new TypeError('Expected "object" but received "' + typeof obj_capabilities + '" (at "' + path_capabilities + '")');
992
+ }
993
+ const obj_capabilities_keys = ObjectKeys(obj_capabilities);
994
+ for (let i = 0; i < obj_capabilities_keys.length; i++) {
995
+ const key = obj_capabilities_keys[i];
996
+ const obj_capabilities_prop = obj_capabilities[key];
997
+ const path_capabilities_prop = path_capabilities + '["' + key + '"]';
998
+ if (typeof obj_capabilities_prop !== 'boolean') {
999
+ return new TypeError('Expected "boolean" but received "' + typeof obj_capabilities_prop + '" (at "' + path_capabilities_prop + '")');
1000
+ }
1001
+ }
1002
+ }
1003
+ const obj_creationType = obj.creationType;
1004
+ const path_creationType = path + '.creationType';
1005
+ if (typeof obj_creationType !== 'string') {
1006
+ return new TypeError('Expected "string" but received "' + typeof obj_creationType + '" (at "' + path_creationType + '")');
1007
+ }
1008
+ const obj_dataSpaceName = obj.dataSpaceName;
1009
+ const path_dataSpaceName = path + '.dataSpaceName';
1010
+ if (typeof obj_dataSpaceName !== 'string') {
1011
+ return new TypeError('Expected "string" but received "' + typeof obj_dataSpaceName + '" (at "' + path_dataSpaceName + '")');
1012
+ }
1013
+ const obj_definition = obj.definition;
1014
+ const path_definition = path + '.definition';
1015
+ if (typeof obj_definition !== 'object') {
1016
+ return new TypeError('Expected "object" but received "' + typeof obj_definition + '" (at "' + path_definition + '")');
1017
+ }
1018
+ const obj_description = obj.description;
1019
+ const path_description = path + '.description';
1020
+ if (typeof obj_description !== 'string') {
1021
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
1022
+ }
1023
+ const obj_lastRunDate = obj.lastRunDate;
1024
+ const path_lastRunDate = path + '.lastRunDate';
1025
+ if (typeof obj_lastRunDate !== 'string') {
1026
+ return new TypeError('Expected "string" but received "' + typeof obj_lastRunDate + '" (at "' + path_lastRunDate + '")');
1027
+ }
1028
+ const obj_lastRunErrorCode = obj.lastRunErrorCode;
1029
+ const path_lastRunErrorCode = path + '.lastRunErrorCode';
1030
+ const referencepath_lastRunErrorCodeValidationError = validate$7(obj_lastRunErrorCode, path_lastRunErrorCode);
1031
+ if (referencepath_lastRunErrorCodeValidationError !== null) {
1032
+ let message = 'Object doesn\'t match CdpErrorRepresentation (at "' + path_lastRunErrorCode + '")\n';
1033
+ message += referencepath_lastRunErrorCodeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1034
+ return new TypeError(message);
1035
+ }
1036
+ const obj_lastRunErrorMessage = obj.lastRunErrorMessage;
1037
+ const path_lastRunErrorMessage = path + '.lastRunErrorMessage';
1038
+ if (typeof obj_lastRunErrorMessage !== 'string') {
1039
+ return new TypeError('Expected "string" but received "' + typeof obj_lastRunErrorMessage + '" (at "' + path_lastRunErrorMessage + '")');
1040
+ }
1041
+ const obj_lastRunStatus = obj.lastRunStatus;
1042
+ const path_lastRunStatus = path + '.lastRunStatus';
1043
+ if (typeof obj_lastRunStatus !== 'string') {
1044
+ return new TypeError('Expected "string" but received "' + typeof obj_lastRunStatus + '" (at "' + path_lastRunStatus + '")');
1045
+ }
1046
+ const obj_schedule = obj.schedule;
1047
+ const path_schedule = path + '.schedule';
1048
+ const referencepath_scheduleValidationError = validate$6(obj_schedule, path_schedule);
1049
+ if (referencepath_scheduleValidationError !== null) {
1050
+ let message = 'Object doesn\'t match ScheduleRepresentation (at "' + path_schedule + '")\n';
1051
+ message += referencepath_scheduleValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1052
+ return new TypeError(message);
1053
+ }
1054
+ const obj_status = obj.status;
1055
+ const path_status = path + '.status';
1056
+ if (typeof obj_status !== 'string') {
1057
+ return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
1058
+ }
1059
+ const obj_tags = obj.tags;
1060
+ const path_tags = path + '.tags';
1061
+ if (typeof obj_tags !== 'object' || ArrayIsArray(obj_tags) || obj_tags === null) {
1062
+ return new TypeError('Expected "object" but received "' + typeof obj_tags + '" (at "' + path_tags + '")');
1063
+ }
1064
+ const obj_tags_keys = ObjectKeys(obj_tags);
1065
+ for (let i = 0; i < obj_tags_keys.length; i++) {
1066
+ const key = obj_tags_keys[i];
1067
+ const obj_tags_prop = obj_tags[key];
1068
+ const path_tags_prop = path_tags + '["' + key + '"]';
1069
+ if (typeof obj_tags_prop !== 'string') {
1070
+ return new TypeError('Expected "string" but received "' + typeof obj_tags_prop + '" (at "' + path_tags_prop + '")');
1071
+ }
1072
+ }
1073
+ const obj_type = obj.type;
1074
+ const path_type = path + '.type';
1075
+ if (typeof obj_type !== 'string') {
1076
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
1077
+ }
1078
+ obj.version;
1079
+ })();
1080
+ return v_error === undefined ? null : v_error;
1081
+ }
1082
+ const RepresentationType$1 = 'DataTransformRepresentation';
1083
+ function keyBuilder$5(luvio, config) {
1084
+ return keyBuilder$6(luvio, config);
1085
+ }
1086
+ function keyBuilderFromType(luvio, object) {
1087
+ return keyBuilderFromType$2(luvio, object);
1088
+ }
1089
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
1090
+ const input_definition = input.definition;
1091
+ const input_definition_id = path.fullPath + '__definition';
1092
+ input.definition = ingest$2(input_definition, {
1093
+ fullPath: input_definition_id,
1094
+ propertyName: 'definition',
1095
+ parent: {
1096
+ data: input,
1097
+ key: path.fullPath,
1098
+ existing: existing,
1099
+ },
1100
+ ttl: path.ttl
1101
+ }, luvio, store, timestamp);
1102
+ return input;
1103
+ }
1104
+ const select$4 = function DataTransformRepresentationSelect() {
1105
+ const { selections: CdpAssetBaseRepresentationSelections } = select$a();
1106
+ const { selections: BaseActionRepresentation__selections, opaque: BaseActionRepresentation__opaque, } = select$9();
1107
+ const { selections: CdpErrorRepresentation__selections, opaque: CdpErrorRepresentation__opaque, } = select$8();
1108
+ const { selections: ScheduleRepresentation__selections, opaque: ScheduleRepresentation__opaque, } = select$7();
1109
+ return {
1110
+ kind: 'Fragment',
1111
+ version: VERSION$1,
1112
+ private: [],
1113
+ selections: [
1114
+ ...CdpAssetBaseRepresentationSelections,
1115
+ {
1116
+ name: 'actionUrls',
1117
+ kind: 'Object',
1118
+ selections: BaseActionRepresentation__selections
1119
+ },
1120
+ {
1121
+ name: 'capabilities',
1122
+ kind: 'Scalar',
1123
+ map: true,
1124
+ required: false
1125
+ },
1126
+ {
1127
+ name: 'creationType',
1128
+ kind: 'Scalar'
1129
+ },
1130
+ {
1131
+ name: 'dataSpaceName',
1132
+ kind: 'Scalar'
1133
+ },
1134
+ {
1135
+ name: 'definition',
1136
+ kind: 'Link',
1137
+ fragment: select$5()
1138
+ },
1139
+ {
1140
+ name: 'description',
1141
+ kind: 'Scalar'
1142
+ },
1143
+ {
1144
+ name: 'lastRunDate',
1145
+ kind: 'Scalar'
1146
+ },
1147
+ {
1148
+ name: 'lastRunErrorCode',
1149
+ kind: 'Object',
1150
+ selections: CdpErrorRepresentation__selections
1151
+ },
1152
+ {
1153
+ name: 'lastRunErrorMessage',
1154
+ kind: 'Scalar'
1155
+ },
1156
+ {
1157
+ name: 'lastRunStatus',
1158
+ kind: 'Scalar'
1159
+ },
1160
+ {
1161
+ name: 'schedule',
1162
+ kind: 'Object',
1163
+ selections: ScheduleRepresentation__selections
1164
+ },
1165
+ {
1166
+ name: 'status',
1167
+ kind: 'Scalar'
1168
+ },
1169
+ {
1170
+ name: 'tags',
1171
+ kind: 'Scalar',
1172
+ map: true
1173
+ },
1174
+ {
1175
+ name: 'type',
1176
+ kind: 'Scalar'
1177
+ },
1178
+ {
1179
+ name: 'version',
1180
+ kind: 'Scalar'
1181
+ }
1182
+ ]
1183
+ };
1184
+ };
1185
+ function equals$1(existing, incoming) {
1186
+ if (equals$8(existing, incoming) === false) {
1187
+ return false;
1188
+ }
1189
+ const existing_creationType = existing.creationType;
1190
+ const incoming_creationType = incoming.creationType;
1191
+ if (!(existing_creationType === incoming_creationType)) {
1192
+ return false;
1193
+ }
1194
+ const existing_dataSpaceName = existing.dataSpaceName;
1195
+ const incoming_dataSpaceName = incoming.dataSpaceName;
1196
+ if (!(existing_dataSpaceName === incoming_dataSpaceName)) {
1197
+ return false;
1198
+ }
1199
+ const existing_description = existing.description;
1200
+ const incoming_description = incoming.description;
1201
+ if (!(existing_description === incoming_description)) {
1202
+ return false;
1203
+ }
1204
+ const existing_lastRunDate = existing.lastRunDate;
1205
+ const incoming_lastRunDate = incoming.lastRunDate;
1206
+ if (!(existing_lastRunDate === incoming_lastRunDate)) {
1207
+ return false;
1208
+ }
1209
+ const existing_lastRunErrorMessage = existing.lastRunErrorMessage;
1210
+ const incoming_lastRunErrorMessage = incoming.lastRunErrorMessage;
1211
+ if (!(existing_lastRunErrorMessage === incoming_lastRunErrorMessage)) {
1212
+ return false;
1213
+ }
1214
+ const existing_lastRunStatus = existing.lastRunStatus;
1215
+ const incoming_lastRunStatus = incoming.lastRunStatus;
1216
+ if (!(existing_lastRunStatus === incoming_lastRunStatus)) {
1217
+ return false;
1218
+ }
1219
+ const existing_status = existing.status;
1220
+ const incoming_status = incoming.status;
1221
+ if (!(existing_status === incoming_status)) {
1222
+ return false;
1223
+ }
1224
+ const existing_type = existing.type;
1225
+ const incoming_type = incoming.type;
1226
+ if (!(existing_type === incoming_type)) {
1227
+ return false;
1228
+ }
1229
+ const existing_version = existing.version;
1230
+ const incoming_version = incoming.version;
1231
+ if (!(existing_version === incoming_version)) {
1232
+ return false;
1233
+ }
1234
+ const existing_actionUrls = existing.actionUrls;
1235
+ const incoming_actionUrls = incoming.actionUrls;
1236
+ if (!(equals$7(existing_actionUrls, incoming_actionUrls))) {
1237
+ return false;
1238
+ }
1239
+ const existing_capabilities = existing.capabilities;
1240
+ const incoming_capabilities = incoming.capabilities;
1241
+ // if at least one of these optionals is defined
1242
+ if (existing_capabilities !== undefined || incoming_capabilities !== undefined) {
1243
+ // if one of these is not defined we know the other is defined and therefore
1244
+ // not equal
1245
+ if (existing_capabilities === undefined || incoming_capabilities === undefined) {
1246
+ return false;
1247
+ }
1248
+ const equals_capabilities_props = equalsObject(existing_capabilities, incoming_capabilities, (existing_capabilities_prop, incoming_capabilities_prop) => {
1249
+ if (!(existing_capabilities_prop === incoming_capabilities_prop)) {
1250
+ return false;
1251
+ }
1252
+ });
1253
+ if (equals_capabilities_props === false) {
1254
+ return false;
1255
+ }
1256
+ }
1257
+ const existing_definition = existing.definition;
1258
+ const incoming_definition = incoming.definition;
1259
+ if (!(existing_definition.__ref === incoming_definition.__ref)) {
1260
+ return false;
1261
+ }
1262
+ const existing_lastRunErrorCode = existing.lastRunErrorCode;
1263
+ const incoming_lastRunErrorCode = incoming.lastRunErrorCode;
1264
+ if (!(equals$6(existing_lastRunErrorCode, incoming_lastRunErrorCode))) {
1265
+ return false;
1266
+ }
1267
+ const existing_schedule = existing.schedule;
1268
+ const incoming_schedule = incoming.schedule;
1269
+ if (!(equals$5(existing_schedule, incoming_schedule))) {
1270
+ return false;
1271
+ }
1272
+ const existing_tags = existing.tags;
1273
+ const incoming_tags = incoming.tags;
1274
+ const equals_tags_props = equalsObject(existing_tags, incoming_tags, (existing_tags_prop, incoming_tags_prop) => {
1275
+ if (!(existing_tags_prop === incoming_tags_prop)) {
1276
+ return false;
1277
+ }
1278
+ });
1279
+ if (equals_tags_props === false) {
1280
+ return false;
1281
+ }
1282
+ return true;
1283
+ }
1284
+ const ingest$1 = function DataTransformRepresentationIngest(input, path, luvio, store, timestamp) {
1285
+ if (process.env.NODE_ENV !== 'production') {
1286
+ const validateError = validate$2(input);
1287
+ if (validateError !== null) {
1288
+ throw validateError;
1289
+ }
1290
+ }
1291
+ const key = keyBuilderFromType(luvio, input);
1292
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 3000000;
1293
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "data-transform", VERSION$1, RepresentationType$1, equals$1);
1294
+ return createLink(key);
1295
+ };
1296
+ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
1297
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1298
+ const rootKey = keyBuilderFromType(luvio, input);
1299
+ rootKeySet.set(rootKey, {
1300
+ namespace: keyPrefix,
1301
+ representationName: RepresentationType$4,
1302
+ mergeable: false
1303
+ });
1304
+ getTypeCacheKeys$2(rootKeySet, luvio, input.definition, () => rootKey + "__" + "definition");
1305
+ }
1306
+
1307
+ function select$3(luvio, params) {
1308
+ return select$4();
1309
+ }
1310
+ function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
1311
+ getTypeCacheKeys$1(storeKeyMap, luvio, response);
1312
+ }
1313
+ function ingestSuccess$2(luvio, resourceParams, response) {
1314
+ const { body } = response;
1315
+ const key = keyBuilderFromType(luvio, body);
1316
+ luvio.storeIngest(key, ingest$1, body);
1317
+ const snapshot = luvio.storeLookup({
1318
+ recordId: key,
1319
+ node: select$3(),
1320
+ variables: {},
1321
+ });
1322
+ if (process.env.NODE_ENV !== 'production') {
1323
+ if (snapshot.state !== 'Fulfilled') {
1324
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1325
+ }
1326
+ }
1327
+ deepFreeze(snapshot.data);
1328
+ return snapshot;
1329
+ }
1330
+ function createResourceRequest$3(config) {
1331
+ const headers = {};
1332
+ return {
1333
+ baseUri: '/services/data/v62.0',
1334
+ basePath: '/ssot/data-transforms',
1335
+ method: 'post',
1336
+ body: config.body,
1337
+ urlParams: {},
1338
+ queryParams: config.queryParams,
1339
+ headers,
1340
+ priority: 'normal',
1341
+ };
1342
+ }
1343
+
1344
+ const adapterName$3 = 'createDataTransform';
1345
+ const createDataTransform_ConfigPropertyMetadata = [
1346
+ generateParamConfigMetadata('filterGroup', false, 1 /* QueryParameter */, 0 /* String */),
1347
+ generateParamConfigMetadata('capabilities', false, 2 /* Body */, 4 /* Unsupported */),
1348
+ generateParamConfigMetadata('creationType', true, 2 /* Body */, 0 /* String */),
1349
+ generateParamConfigMetadata('currencyIsoCode', false, 2 /* Body */, 0 /* String */),
1350
+ generateParamConfigMetadata('dataSpaceName', false, 2 /* Body */, 0 /* String */),
1351
+ generateParamConfigMetadata('definition', true, 2 /* Body */, 4 /* Unsupported */),
1352
+ generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
1353
+ generateParamConfigMetadata('label', false, 2 /* Body */, 0 /* String */),
1354
+ generateParamConfigMetadata('name', false, 2 /* Body */, 0 /* String */),
1355
+ generateParamConfigMetadata('primarySource', false, 2 /* Body */, 0 /* String */),
1356
+ generateParamConfigMetadata('tags', false, 2 /* Body */, 4 /* Unsupported */),
1357
+ generateParamConfigMetadata('type', true, 2 /* Body */, 0 /* String */),
1358
+ ];
1359
+ const createDataTransform_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, createDataTransform_ConfigPropertyMetadata);
1360
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$4(createDataTransform_ConfigPropertyMetadata);
1361
+ function typeCheckConfig$3(untrustedConfig) {
1362
+ const config = {};
1363
+ typeCheckConfig$4(untrustedConfig, config, createDataTransform_ConfigPropertyMetadata);
1364
+ const untrustedConfig_capabilities = untrustedConfig.capabilities;
1365
+ if (untrustedIsObject(untrustedConfig_capabilities)) {
1366
+ const untrustedConfig_capabilities_object = {};
1367
+ const untrustedConfig_capabilities_keys = Object.keys(untrustedConfig_capabilities);
1368
+ for (let i = 0, arrayLength = untrustedConfig_capabilities_keys.length; i < arrayLength; i++) {
1369
+ const key = untrustedConfig_capabilities_keys[i];
1370
+ const untrustedConfig_capabilities_prop = untrustedConfig_capabilities[key];
1371
+ if (typeof untrustedConfig_capabilities_prop === 'boolean') {
1372
+ if (untrustedConfig_capabilities_object !== undefined) {
1373
+ untrustedConfig_capabilities_object[key] = untrustedConfig_capabilities_prop;
1374
+ }
1375
+ }
1376
+ }
1377
+ if (untrustedConfig_capabilities_object !== undefined && Object.keys(untrustedConfig_capabilities_object).length >= 0) {
1378
+ config.capabilities = untrustedConfig_capabilities_object;
1379
+ }
1380
+ }
1381
+ const untrustedConfig_definition = untrustedConfig.definition;
1382
+ if (untrustedIsObject(untrustedConfig_definition)) {
1383
+ const untrustedConfig_definition_object = {};
1384
+ const untrustedConfig_definition_keys = Object.keys(untrustedConfig_definition);
1385
+ for (let i = 0, arrayLength = untrustedConfig_definition_keys.length; i < arrayLength; i++) {
1386
+ const key = untrustedConfig_definition_keys[i];
1387
+ const untrustedConfig_definition_prop = untrustedConfig_definition[key];
1388
+ if (untrustedConfig_definition_object !== undefined) {
1389
+ untrustedConfig_definition_object[key] = untrustedConfig_definition_prop;
1390
+ }
1391
+ }
1392
+ if (untrustedConfig_definition_object !== undefined && Object.keys(untrustedConfig_definition_object).length >= 0) {
1393
+ config.definition = untrustedConfig_definition_object;
1394
+ }
1395
+ }
1396
+ const untrustedConfig_tags = untrustedConfig.tags;
1397
+ if (untrustedIsObject(untrustedConfig_tags)) {
1398
+ const untrustedConfig_tags_object = {};
1399
+ const untrustedConfig_tags_keys = Object.keys(untrustedConfig_tags);
1400
+ for (let i = 0, arrayLength = untrustedConfig_tags_keys.length; i < arrayLength; i++) {
1401
+ const key = untrustedConfig_tags_keys[i];
1402
+ const untrustedConfig_tags_prop = untrustedConfig_tags[key];
1403
+ if (typeof untrustedConfig_tags_prop === 'string') {
1404
+ if (untrustedConfig_tags_object !== undefined) {
1405
+ untrustedConfig_tags_object[key] = untrustedConfig_tags_prop;
1406
+ }
1407
+ }
1408
+ }
1409
+ if (untrustedConfig_tags_object !== undefined && Object.keys(untrustedConfig_tags_object).length >= 0) {
1410
+ config.tags = untrustedConfig_tags_object;
1411
+ }
1412
+ }
1413
+ return config;
1414
+ }
1415
+ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
1416
+ if (!untrustedIsObject(untrustedConfig)) {
1417
+ return null;
1418
+ }
1419
+ if (process.env.NODE_ENV !== 'production') {
1420
+ validateConfig(untrustedConfig, configPropertyNames);
1421
+ }
1422
+ const config = typeCheckConfig$3(untrustedConfig);
1423
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1424
+ return null;
1425
+ }
1426
+ return config;
1427
+ }
1428
+ function buildNetworkSnapshot$3(luvio, config, options) {
1429
+ const resourceParams = createResourceParams$3(config);
1430
+ const request = createResourceRequest$3(resourceParams);
1431
+ return luvio.dispatchResourceRequest(request, options)
1432
+ .then((response) => {
1433
+ return luvio.handleSuccessResponse(() => {
1434
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response);
1435
+ return luvio.storeBroadcast().then(() => snapshot);
1436
+ }, () => {
1437
+ const cache = new StoreKeyMap();
1438
+ getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
1439
+ return cache;
1440
+ });
1441
+ }, (response) => {
1442
+ deepFreeze(response);
1443
+ throw response;
1444
+ });
1445
+ }
1446
+ const createDataTransformAdapterFactory = (luvio) => {
1447
+ return function createDataTransform(untrustedConfig) {
1448
+ const config = validateAdapterConfig$3(untrustedConfig, createDataTransform_ConfigPropertyNames);
1449
+ // Invalid or incomplete config
1450
+ if (config === null) {
1451
+ throw new Error('Invalid config for "createDataTransform"');
1452
+ }
1453
+ return buildNetworkSnapshot$3(luvio, config);
1454
+ };
1455
+ };
1456
+
1457
+ function keyBuilder$4(luvio, params) {
1458
+ return keyBuilder$5(luvio, {
1459
+ name: params.urlParams.dataTransformNameOrId
1460
+ });
1461
+ }
1462
+ function getResponseCacheKeys$2(cacheKeyMap, luvio, resourceParams) {
1463
+ const key = keyBuilder$4(luvio, resourceParams);
1464
+ cacheKeyMap.set(key, {
1465
+ namespace: keyPrefix,
1466
+ representationName: RepresentationType$1,
1467
+ mergeable: false
1468
+ });
1469
+ }
1470
+ function evictSuccess(luvio, resourceParams) {
1471
+ const key = keyBuilder$4(luvio, resourceParams);
1472
+ luvio.storeEvict(key);
1473
+ }
1474
+ function createResourceRequest$2(config) {
1475
+ const headers = {};
1476
+ return {
1477
+ baseUri: '/services/data/v62.0',
1478
+ basePath: '/ssot/data-transforms/' + config.urlParams.dataTransformNameOrId + '',
1479
+ method: 'delete',
1480
+ body: null,
1481
+ urlParams: config.urlParams,
1482
+ queryParams: {},
1483
+ headers,
1484
+ priority: 'normal',
1485
+ };
1486
+ }
1487
+
1488
+ const adapterName$2 = 'deleteDataTransform';
1489
+ const deleteDataTransform_ConfigPropertyMetadata = [
1490
+ generateParamConfigMetadata('dataTransformNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
1491
+ ];
1492
+ const deleteDataTransform_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, deleteDataTransform_ConfigPropertyMetadata);
1493
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$4(deleteDataTransform_ConfigPropertyMetadata);
1494
+ function typeCheckConfig$2(untrustedConfig) {
1495
+ const config = {};
1496
+ typeCheckConfig$4(untrustedConfig, config, deleteDataTransform_ConfigPropertyMetadata);
1497
+ return config;
1498
+ }
1499
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
1500
+ if (!untrustedIsObject(untrustedConfig)) {
1501
+ return null;
1502
+ }
1503
+ if (process.env.NODE_ENV !== 'production') {
1504
+ validateConfig(untrustedConfig, configPropertyNames);
1505
+ }
1506
+ const config = typeCheckConfig$2(untrustedConfig);
1507
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1508
+ return null;
1509
+ }
1510
+ return config;
1511
+ }
1512
+ function buildNetworkSnapshot$2(luvio, config, options) {
1513
+ const resourceParams = createResourceParams$2(config);
1514
+ const request = createResourceRequest$2(resourceParams);
1515
+ return luvio.dispatchResourceRequest(request, options)
1516
+ .then(() => {
1517
+ return luvio.handleSuccessResponse(() => {
1518
+ evictSuccess(luvio, resourceParams);
1519
+ return luvio.storeBroadcast();
1520
+ }, () => {
1521
+ const cache = new StoreKeyMap();
1522
+ getResponseCacheKeys$2(cache, luvio, resourceParams);
1523
+ return cache;
1524
+ });
1525
+ }, (response) => {
1526
+ deepFreeze(response);
1527
+ throw response;
1528
+ });
1529
+ }
1530
+ const deleteDataTransformAdapterFactory = (luvio) => {
1531
+ return function dataTransformdeleteDataTransform(untrustedConfig) {
1532
+ const config = validateAdapterConfig$2(untrustedConfig, deleteDataTransform_ConfigPropertyNames);
1533
+ // Invalid or incomplete config
1534
+ if (config === null) {
1535
+ throw new Error(`Invalid config for "${adapterName$2}"`);
1536
+ }
1537
+ return buildNetworkSnapshot$2(luvio, config);
1538
+ };
1539
+ };
1540
+
1541
+ function select$2(luvio, params) {
1542
+ return select$4();
1543
+ }
1544
+ function keyBuilder$3(luvio, params) {
1545
+ return keyBuilder$5(luvio, {
1546
+ name: params.urlParams.dataTransformNameOrId
1547
+ });
1548
+ }
1549
+ function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
1550
+ getTypeCacheKeys$1(storeKeyMap, luvio, response);
1551
+ }
1552
+ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
1553
+ const { body } = response;
1554
+ const key = keyBuilder$3(luvio, resourceParams);
1555
+ luvio.storeIngest(key, ingest$1, body);
1556
+ const snapshot = luvio.storeLookup({
1557
+ recordId: key,
1558
+ node: select$2(),
1559
+ variables: {},
1560
+ }, snapshotRefresh);
1561
+ if (process.env.NODE_ENV !== 'production') {
1562
+ if (snapshot.state !== 'Fulfilled') {
1563
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1564
+ }
1565
+ }
1566
+ deepFreeze(snapshot.data);
1567
+ return snapshot;
1568
+ }
1569
+ function ingestError$1(luvio, params, error, snapshotRefresh) {
1570
+ const key = keyBuilder$3(luvio, params);
1571
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1572
+ luvio.storeIngestError(key, errorSnapshot);
1573
+ return errorSnapshot;
1574
+ }
1575
+ function createResourceRequest$1(config) {
1576
+ const headers = {};
1577
+ return {
1578
+ baseUri: '/services/data/v62.0',
1579
+ basePath: '/ssot/data-transforms/' + config.urlParams.dataTransformNameOrId + '',
1580
+ method: 'get',
1581
+ body: null,
1582
+ urlParams: config.urlParams,
1583
+ queryParams: config.queryParams,
1584
+ headers,
1585
+ priority: 'normal',
1586
+ };
1587
+ }
1588
+ function createResourceRequestFromRepresentation(representation) {
1589
+ const config = {
1590
+ urlParams: {},
1591
+ queryParams: {},
1592
+ };
1593
+ config.urlParams.dataTransformNameOrId = representation.name;
1594
+ return createResourceRequest$1(config);
1595
+ }
1596
+
1597
+ const adapterName$1 = 'getDataTransform';
1598
+ const getDataTransform_ConfigPropertyMetadata = [
1599
+ generateParamConfigMetadata('dataTransformNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
1600
+ generateParamConfigMetadata('filterGroup', false, 1 /* QueryParameter */, 0 /* String */),
1601
+ ];
1602
+ const getDataTransform_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getDataTransform_ConfigPropertyMetadata);
1603
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$4(getDataTransform_ConfigPropertyMetadata);
1604
+ function keyBuilder$2(luvio, config) {
1605
+ const resourceParams = createResourceParams$1(config);
1606
+ return keyBuilder$3(luvio, resourceParams);
1607
+ }
1608
+ function typeCheckConfig$1(untrustedConfig) {
1609
+ const config = {};
1610
+ typeCheckConfig$4(untrustedConfig, config, getDataTransform_ConfigPropertyMetadata);
1611
+ return config;
1612
+ }
1613
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1614
+ if (!untrustedIsObject(untrustedConfig)) {
1615
+ return null;
1616
+ }
1617
+ if (process.env.NODE_ENV !== 'production') {
1618
+ validateConfig(untrustedConfig, configPropertyNames);
1619
+ }
1620
+ const config = typeCheckConfig$1(untrustedConfig);
1621
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1622
+ return null;
1623
+ }
1624
+ return config;
1625
+ }
1626
+ function adapterFragment$1(luvio, config) {
1627
+ createResourceParams$1(config);
1628
+ return select$2();
1629
+ }
1630
+ function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
1631
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
1632
+ config,
1633
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1634
+ });
1635
+ return luvio.storeBroadcast().then(() => snapshot);
1636
+ }
1637
+ function onFetchResponseError$1(luvio, config, resourceParams, response) {
1638
+ const snapshot = ingestError$1(luvio, resourceParams, response, {
1639
+ config,
1640
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1641
+ });
1642
+ return luvio.storeBroadcast().then(() => snapshot);
1643
+ }
1644
+ function buildNetworkSnapshot$1(luvio, config, options) {
1645
+ const resourceParams = createResourceParams$1(config);
1646
+ const request = createResourceRequest$1(resourceParams);
1647
+ return luvio.dispatchResourceRequest(request, options)
1648
+ .then((response) => {
1649
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
1650
+ const cache = new StoreKeyMap();
1651
+ getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
1652
+ return cache;
1653
+ });
1654
+ }, (response) => {
1655
+ return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
1656
+ });
1657
+ }
1658
+ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
1659
+ return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
1660
+ }
1661
+ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
1662
+ const { luvio, config } = context;
1663
+ const selector = {
1664
+ recordId: keyBuilder$2(luvio, config),
1665
+ node: adapterFragment$1(luvio, config),
1666
+ variables: {},
145
1667
  };
1668
+ const cacheSnapshot = storeLookup(selector, {
1669
+ config,
1670
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1671
+ });
1672
+ return cacheSnapshot;
146
1673
  }
1674
+ const getDataTransformAdapterFactory = (luvio) => function dataTransform__getDataTransform(untrustedConfig, requestContext) {
1675
+ const config = validateAdapterConfig$1(untrustedConfig, getDataTransform_ConfigPropertyNames);
1676
+ // Invalid or incomplete config
1677
+ if (config === null) {
1678
+ return null;
1679
+ }
1680
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1681
+ buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
1682
+ };
1683
+ const notifyChangeFactory = (luvio, options) => {
1684
+ return function getSsotDataTransformsByDataTransformNameOrIdNotifyChange(configs) {
1685
+ const keys = configs.map(c => keyBuilder$5(luvio, c));
1686
+ luvio.getNotifyChangeStoreEntries(keys).then(entries => {
1687
+ for (let i = 0, len = entries.length; i < len; i++) {
1688
+ const { key, record: val } = entries[i];
1689
+ const refreshRequest = createResourceRequestFromRepresentation(val);
1690
+ luvio.dispatchResourceRequest(refreshRequest, options)
1691
+ .then((response) => {
1692
+ return luvio.handleSuccessResponse(() => {
1693
+ const { body } = response;
1694
+ luvio.storeIngest(key, ingest$1, body);
1695
+ return luvio.storeBroadcast();
1696
+ }, () => {
1697
+ const cache = new StoreKeyMap();
1698
+ getTypeCacheKeys$1(cache, luvio, response.body);
1699
+ return cache;
1700
+ });
1701
+ }, (error) => {
1702
+ return luvio.handleErrorResponse(() => {
1703
+ const errorSnapshot = luvio.errorSnapshot(error);
1704
+ luvio.storeIngestError(key, errorSnapshot, undefined);
1705
+ return luvio.storeBroadcast().then(() => errorSnapshot);
1706
+ });
1707
+ });
1708
+ }
1709
+ });
1710
+ };
1711
+ };
147
1712
 
148
- function validate$5(obj, path = 'TransformValidationIssueRepresentation') {
1713
+ function validate$1(obj, path = 'TransformValidationIssueRepresentation') {
149
1714
  const v_error = (() => {
150
1715
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
151
1716
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -173,196 +1738,6 @@ function validate$5(obj, path = 'TransformValidationIssueRepresentation') {
173
1738
  return v_error === undefined ? null : v_error;
174
1739
  }
175
1740
 
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
1741
  const VERSION = "21a4cd3206473ce28645099a11735bc6";
367
1742
  function validate(obj, path = 'DataTransformValidationRepresentation') {
368
1743
  const v_error = (() => {
@@ -378,7 +1753,7 @@ function validate(obj, path = 'DataTransformValidationRepresentation') {
378
1753
  for (let i = 0; i < obj_issues.length; i++) {
379
1754
  const obj_issues_item = obj_issues[i];
380
1755
  const path_issues_item = path_issues + '[' + i + ']';
381
- const referencepath_issues_itemValidationError = validate$5(obj_issues_item, path_issues_item);
1756
+ const referencepath_issues_itemValidationError = validate$1(obj_issues_item, path_issues_item);
382
1757
  if (referencepath_issues_itemValidationError !== null) {
383
1758
  let message = 'Object doesn\'t match TransformValidationIssueRepresentation (at "' + path_issues_item + '")\n';
384
1759
  message += referencepath_issues_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -395,7 +1770,7 @@ function validate(obj, path = 'DataTransformValidationRepresentation') {
395
1770
  for (let i = 0; i < obj_outputDataObjects.length; i++) {
396
1771
  const obj_outputDataObjects_item = obj_outputDataObjects[i];
397
1772
  const path_outputDataObjects_item = path_outputDataObjects + '[' + i + ']';
398
- const referencepath_outputDataObjects_itemValidationError = validate$1(obj_outputDataObjects_item, path_outputDataObjects_item);
1773
+ const referencepath_outputDataObjects_itemValidationError = validate$4(obj_outputDataObjects_item, path_outputDataObjects_item);
399
1774
  if (referencepath_outputDataObjects_itemValidationError !== null) {
400
1775
  let message = 'Object doesn\'t match DataObjectRepresentation (at "' + path_outputDataObjects_item + '")\n';
401
1776
  message += referencepath_outputDataObjects_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -507,14 +1882,14 @@ const validateDataTransforms_ConfigPropertyMetadata = [
507
1882
  generateParamConfigMetadata('type', true, 2 /* Body */, 0 /* String */),
508
1883
  ];
509
1884
  const validateDataTransforms_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, validateDataTransforms_ConfigPropertyMetadata);
510
- const createResourceParams = /*#__PURE__*/ createResourceParams$1(validateDataTransforms_ConfigPropertyMetadata);
1885
+ const createResourceParams = /*#__PURE__*/ createResourceParams$4(validateDataTransforms_ConfigPropertyMetadata);
511
1886
  function keyBuilder(luvio, config) {
512
1887
  const resourceParams = createResourceParams(config);
513
1888
  return keyBuilder$1(luvio, resourceParams);
514
1889
  }
515
1890
  function typeCheckConfig(untrustedConfig) {
516
1891
  const config = {};
517
- typeCheckConfig$1(untrustedConfig, config, validateDataTransforms_ConfigPropertyMetadata);
1892
+ typeCheckConfig$4(untrustedConfig, config, validateDataTransforms_ConfigPropertyMetadata);
518
1893
  const untrustedConfig_capabilities = untrustedConfig.capabilities;
519
1894
  if (untrustedIsObject(untrustedConfig_capabilities)) {
520
1895
  const untrustedConfig_capabilities_object = {};
@@ -612,7 +1987,7 @@ function buildNetworkSnapshot(luvio, config, options) {
612
1987
  });
613
1988
  }
614
1989
  function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
615
- return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot, 'get', false);
1990
+ return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot, 'get', false);
616
1991
  }
617
1992
  function buildCachedSnapshotCachePolicy(context, storeLookup) {
618
1993
  const { luvio, config } = context;
@@ -637,10 +2012,15 @@ const validateDataTransformsAdapterFactory = (luvio) => function dataTransform__
637
2012
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
638
2013
  };
639
2014
 
2015
+ let createDataTransform;
2016
+ let deleteDataTransform;
2017
+ let getDataTransform;
2018
+ let getDataTransformNotifyChange;
640
2019
  let validateDataTransforms;
641
2020
  // Imperative GET Adapters
2021
+ let getDataTransform_imperative;
642
2022
  let validateDataTransforms_imperative;
643
- // Adapter Metadata
2023
+ const getDataTransformMetadata = { apiFamily: 'datatransform', name: 'getDataTransform' };
644
2024
  const validateDataTransformsMetadata = {
645
2025
  apiFamily: 'datatransform',
646
2026
  name: 'validateDataTransforms',
@@ -648,17 +2028,35 @@ const validateDataTransformsMetadata = {
648
2028
  // Notify Update Available
649
2029
  function bindExportsTo(luvio) {
650
2030
  // LDS Adapters
2031
+ const getDataTransform_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getDataTransform', getDataTransformAdapterFactory), getDataTransformMetadata);
651
2032
  const validateDataTransforms_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'validateDataTransforms', validateDataTransformsAdapterFactory), validateDataTransformsMetadata);
2033
+ function unwrapSnapshotData(factory) {
2034
+ const adapter = factory(luvio);
2035
+ return (config) => adapter(config).then((snapshot) => snapshot.data);
2036
+ }
652
2037
  return {
2038
+ createDataTransform: unwrapSnapshotData(createDataTransformAdapterFactory),
2039
+ deleteDataTransform: createLDSAdapter(luvio, adapterName$2, deleteDataTransformAdapterFactory),
2040
+ getDataTransform: createWireAdapterConstructor(luvio, getDataTransform_ldsAdapter, getDataTransformMetadata),
2041
+ getDataTransformNotifyChange: createLDSAdapter(luvio, 'getDataTransformNotifyChange', notifyChangeFactory),
653
2042
  validateDataTransforms: createWireAdapterConstructor(luvio, validateDataTransforms_ldsAdapter, validateDataTransformsMetadata),
654
2043
  // Imperative GET Adapters
2044
+ getDataTransform_imperative: createImperativeAdapter(luvio, getDataTransform_ldsAdapter, getDataTransformMetadata),
655
2045
  validateDataTransforms_imperative: createImperativeAdapter(luvio, validateDataTransforms_ldsAdapter, validateDataTransformsMetadata),
656
2046
  // Notify Update Availables
657
2047
  };
658
2048
  }
659
2049
  withDefaultLuvio((luvio) => {
660
- ({ validateDataTransforms, validateDataTransforms_imperative } = bindExportsTo(luvio));
2050
+ ({
2051
+ createDataTransform,
2052
+ deleteDataTransform,
2053
+ getDataTransform,
2054
+ getDataTransformNotifyChange,
2055
+ validateDataTransforms,
2056
+ getDataTransform_imperative,
2057
+ validateDataTransforms_imperative,
2058
+ } = bindExportsTo(luvio));
661
2059
  });
662
2060
 
663
- export { validateDataTransforms, validateDataTransforms_imperative };
664
- // version: 1.354.0-dev1-3890a35d35
2061
+ export { createDataTransform, deleteDataTransform, getDataTransform, getDataTransformNotifyChange, getDataTransform_imperative, validateDataTransforms, validateDataTransforms_imperative };
2062
+ // version: 1.354.0-dev10-f675337995