@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.
Files changed (23) hide show
  1. package/dist/es/es2018/cdp-data-transform.js +1708 -88
  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/adapters/updateDataTransform.d.ts +33 -0
  6. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +4 -0
  7. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +7 -1
  8. package/dist/es/es2018/types/src/generated/resources/deleteSsotDataTransformsByDataTransformNameOrId.d.ts +12 -0
  9. package/dist/es/es2018/types/src/generated/resources/getSsotDataTransformsByDataTransformNameOrId.d.ts +19 -0
  10. package/dist/es/es2018/types/src/generated/resources/postSsotDataTransforms.d.ts +31 -0
  11. package/dist/es/es2018/types/src/generated/resources/putSsotDataTransformsByDataTransformNameOrId.d.ts +34 -0
  12. package/dist/es/es2018/types/src/generated/types/BaseActionRepresentation.d.ts +31 -0
  13. package/dist/es/es2018/types/src/generated/types/CdpAssetBaseRepresentation.d.ts +20 -6
  14. package/dist/es/es2018/types/src/generated/types/CdpErrorRepresentation.d.ts +31 -0
  15. package/dist/es/es2018/types/src/generated/types/DataObjectFieldRepresentation.d.ts +3 -3
  16. package/dist/es/es2018/types/src/generated/types/DataObjectRepresentation.d.ts +15 -11
  17. package/dist/es/es2018/types/src/generated/types/DataTransformDefinitionRepresentation.d.ts +44 -0
  18. package/dist/es/es2018/types/src/generated/types/DataTransformRepresentation.d.ts +97 -0
  19. package/dist/es/es2018/types/src/generated/types/ScheduleRepresentation.d.ts +31 -0
  20. package/package.json +3 -3
  21. package/sfdc/index.js +1887 -204
  22. package/src/raml/api.raml +197 -5
  23. package/src/raml/luvio.raml +21 -0
@@ -4,10 +4,10 @@
4
4
  * For full license text, see the LICENSE.txt file
5
5
  */
6
6
 
7
- import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1, typeCheckConfig as typeCheckConfig$1, StoreKeyMap, createResourceParams as createResourceParams$1 } from '@luvio/engine';
7
+ import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2, typeCheckConfig as typeCheckConfig$5, StoreKeyMap, createResourceParams as createResourceParams$5 } from '@luvio/engine';
8
8
 
9
9
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
- const { keys: ObjectKeys, create: ObjectCreate } = Object;
10
+ const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
11
11
  const { stringify: JSONStringify$1 } = JSON;
12
12
  const { isArray: ArrayIsArray$1 } = Array;
13
13
  /**
@@ -32,7 +32,7 @@ function validateConfig(config, adapter, oneOf) {
32
32
  throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
33
33
  }
34
34
  const supported = required.concat(optional);
35
- if (ObjectKeys(config).some(key => !supported.includes(key))) {
35
+ if (ObjectKeys$1(config).some(key => !supported.includes(key))) {
36
36
  throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
37
37
  }
38
38
  }
@@ -89,7 +89,7 @@ function stableJSONStringify(node) {
89
89
  if (node === null) {
90
90
  return 'null';
91
91
  }
92
- const keys = ObjectKeys(node).sort();
92
+ const keys = ObjectKeys$1(node).sort();
93
93
  out = '';
94
94
  for (i = 0; i < keys.length; i++) {
95
95
  const key = keys[i];
@@ -127,15 +127,48 @@ function buildAdapterValidationConfig(displayName, paramsMeta) {
127
127
  }
128
128
  const keyPrefix = 'data-transform';
129
129
 
130
+ const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
130
131
  const { isArray: ArrayIsArray } = Array;
131
132
  const { stringify: JSONStringify } = JSON;
133
+ function equalsArray(a, b, equalsItem) {
134
+ const aLength = a.length;
135
+ const bLength = b.length;
136
+ if (aLength !== bLength) {
137
+ return false;
138
+ }
139
+ for (let i = 0; i < aLength; i++) {
140
+ if (equalsItem(a[i], b[i]) === false) {
141
+ return false;
142
+ }
143
+ }
144
+ return true;
145
+ }
146
+ function equalsObject(a, b, equalsProp) {
147
+ const aKeys = ObjectKeys(a).sort();
148
+ const bKeys = ObjectKeys(b).sort();
149
+ const aKeysLength = aKeys.length;
150
+ const bKeysLength = bKeys.length;
151
+ if (aKeysLength !== bKeysLength) {
152
+ return false;
153
+ }
154
+ for (let i = 0; i < aKeys.length; i++) {
155
+ const key = aKeys[i];
156
+ if (key !== bKeys[i]) {
157
+ return false;
158
+ }
159
+ if (equalsProp(a[key], b[key]) === false) {
160
+ return false;
161
+ }
162
+ }
163
+ return true;
164
+ }
132
165
  function createLink(ref) {
133
166
  return {
134
167
  __ref: serializeStructuredKey(ref),
135
168
  };
136
169
  }
137
170
 
138
- function validate$5(obj, path = 'TransformValidationIssueRepresentation') {
171
+ function validate$a(obj, path = 'TransformValidationIssueRepresentation') {
139
172
  const v_error = (() => {
140
173
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
141
174
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -163,7 +196,8 @@ function validate$5(obj, path = 'TransformValidationIssueRepresentation') {
163
196
  return v_error === undefined ? null : v_error;
164
197
  }
165
198
 
166
- function validate$4(obj, path = 'CdpUserRepresentation') {
199
+ const VERSION$8 = "efb82c29d2d2d9ec860406b7caae554d";
200
+ function validate$9(obj, path = 'CdpUserRepresentation') {
167
201
  const v_error = (() => {
168
202
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
169
203
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -190,7 +224,779 @@ function validate$4(obj, path = 'CdpUserRepresentation') {
190
224
  })();
191
225
  return v_error === undefined ? null : v_error;
192
226
  }
227
+ const select$c = function CdpUserRepresentationSelect() {
228
+ return {
229
+ kind: 'Fragment',
230
+ version: VERSION$8,
231
+ private: [],
232
+ selections: [
233
+ {
234
+ name: 'id',
235
+ kind: 'Scalar'
236
+ },
237
+ {
238
+ name: 'name',
239
+ kind: 'Scalar',
240
+ required: false
241
+ },
242
+ {
243
+ name: 'profilePhotoUrl',
244
+ kind: 'Scalar',
245
+ required: false
246
+ }
247
+ ]
248
+ };
249
+ };
250
+ function equals$9(existing, incoming) {
251
+ const existing_id = existing.id;
252
+ const incoming_id = incoming.id;
253
+ if (!(existing_id === incoming_id)) {
254
+ return false;
255
+ }
256
+ const existing_name = existing.name;
257
+ const incoming_name = incoming.name;
258
+ // if at least one of these optionals is defined
259
+ if (existing_name !== undefined || incoming_name !== undefined) {
260
+ // if one of these is not defined we know the other is defined and therefore
261
+ // not equal
262
+ if (existing_name === undefined || incoming_name === undefined) {
263
+ return false;
264
+ }
265
+ if (!(existing_name === incoming_name)) {
266
+ return false;
267
+ }
268
+ }
269
+ const existing_profilePhotoUrl = existing.profilePhotoUrl;
270
+ const incoming_profilePhotoUrl = incoming.profilePhotoUrl;
271
+ // if at least one of these optionals is defined
272
+ if (existing_profilePhotoUrl !== undefined || incoming_profilePhotoUrl !== undefined) {
273
+ // if one of these is not defined we know the other is defined and therefore
274
+ // not equal
275
+ if (existing_profilePhotoUrl === undefined || incoming_profilePhotoUrl === undefined) {
276
+ return false;
277
+ }
278
+ if (!(existing_profilePhotoUrl === incoming_profilePhotoUrl)) {
279
+ return false;
280
+ }
281
+ }
282
+ return true;
283
+ }
284
+
285
+ const VERSION$7 = "3fd0683a6603c98784b3d4aeb83ea69b";
286
+ function validate$8(obj, path = 'BaseActionRepresentation') {
287
+ const v_error = (() => {
288
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
289
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
290
+ }
291
+ const obj_refreshStatusAction = obj.refreshStatusAction;
292
+ const path_refreshStatusAction = path + '.refreshStatusAction';
293
+ if (typeof obj_refreshStatusAction !== 'string') {
294
+ return new TypeError('Expected "string" but received "' + typeof obj_refreshStatusAction + '" (at "' + path_refreshStatusAction + '")');
295
+ }
296
+ const obj_retryAction = obj.retryAction;
297
+ const path_retryAction = path + '.retryAction';
298
+ if (typeof obj_retryAction !== 'string') {
299
+ return new TypeError('Expected "string" but received "' + typeof obj_retryAction + '" (at "' + path_retryAction + '")');
300
+ }
301
+ })();
302
+ return v_error === undefined ? null : v_error;
303
+ }
304
+ const select$b = function BaseActionRepresentationSelect() {
305
+ return {
306
+ kind: 'Fragment',
307
+ version: VERSION$7,
308
+ private: [],
309
+ selections: [
310
+ {
311
+ name: 'refreshStatusAction',
312
+ kind: 'Scalar'
313
+ },
314
+ {
315
+ name: 'retryAction',
316
+ kind: 'Scalar'
317
+ }
318
+ ]
319
+ };
320
+ };
321
+ function equals$8(existing, incoming) {
322
+ const existing_refreshStatusAction = existing.refreshStatusAction;
323
+ const incoming_refreshStatusAction = incoming.refreshStatusAction;
324
+ if (!(existing_refreshStatusAction === incoming_refreshStatusAction)) {
325
+ return false;
326
+ }
327
+ const existing_retryAction = existing.retryAction;
328
+ const incoming_retryAction = incoming.retryAction;
329
+ if (!(existing_retryAction === incoming_retryAction)) {
330
+ return false;
331
+ }
332
+ return true;
333
+ }
334
+
335
+ const VERSION$6 = "2acfba62fd425f0dc2a8b2bcadde2466";
336
+ function validate$7(obj, path = 'CdpErrorRepresentation') {
337
+ const v_error = (() => {
338
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
339
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
340
+ }
341
+ const obj_errorCode = obj.errorCode;
342
+ const path_errorCode = path + '.errorCode';
343
+ if (typeof obj_errorCode !== 'string') {
344
+ return new TypeError('Expected "string" but received "' + typeof obj_errorCode + '" (at "' + path_errorCode + '")');
345
+ }
346
+ const obj_message = obj.message;
347
+ const path_message = path + '.message';
348
+ if (typeof obj_message !== 'string') {
349
+ return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
350
+ }
351
+ })();
352
+ return v_error === undefined ? null : v_error;
353
+ }
354
+ const select$a = function CdpErrorRepresentationSelect() {
355
+ return {
356
+ kind: 'Fragment',
357
+ version: VERSION$6,
358
+ private: [],
359
+ selections: [
360
+ {
361
+ name: 'errorCode',
362
+ kind: 'Scalar'
363
+ },
364
+ {
365
+ name: 'message',
366
+ kind: 'Scalar'
367
+ }
368
+ ]
369
+ };
370
+ };
371
+ function equals$7(existing, incoming) {
372
+ const existing_errorCode = existing.errorCode;
373
+ const incoming_errorCode = incoming.errorCode;
374
+ if (!(existing_errorCode === incoming_errorCode)) {
375
+ return false;
376
+ }
377
+ const existing_message = existing.message;
378
+ const incoming_message = incoming.message;
379
+ if (!(existing_message === incoming_message)) {
380
+ return false;
381
+ }
382
+ return true;
383
+ }
384
+
385
+ const VERSION$5 = "9570db02ffdff852b102fde54128dc2f";
386
+ function validate$6(obj, path = 'ScheduleRepresentation') {
387
+ const v_error = (() => {
388
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
389
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
390
+ }
391
+ const obj_schedule = obj.schedule;
392
+ const path_schedule = path + '.schedule';
393
+ if (typeof obj_schedule !== 'string') {
394
+ return new TypeError('Expected "string" but received "' + typeof obj_schedule + '" (at "' + path_schedule + '")');
395
+ }
396
+ const obj_url = obj.url;
397
+ const path_url = path + '.url';
398
+ if (typeof obj_url !== 'string') {
399
+ return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
400
+ }
401
+ })();
402
+ return v_error === undefined ? null : v_error;
403
+ }
404
+ const select$9 = function ScheduleRepresentationSelect() {
405
+ return {
406
+ kind: 'Fragment',
407
+ version: VERSION$5,
408
+ private: [],
409
+ selections: [
410
+ {
411
+ name: 'schedule',
412
+ kind: 'Scalar'
413
+ },
414
+ {
415
+ name: 'url',
416
+ kind: 'Scalar'
417
+ }
418
+ ]
419
+ };
420
+ };
421
+ function equals$6(existing, incoming) {
422
+ const existing_schedule = existing.schedule;
423
+ const incoming_schedule = incoming.schedule;
424
+ if (!(existing_schedule === incoming_schedule)) {
425
+ return false;
426
+ }
427
+ const existing_url = existing.url;
428
+ const incoming_url = incoming.url;
429
+ if (!(existing_url === incoming_url)) {
430
+ return false;
431
+ }
432
+ return true;
433
+ }
434
+
435
+ const VERSION$4 = "6ef7bcc16bd2f432497fc85ead97bca0";
436
+ function validate$5(obj, path = 'DataTransformDefinitionRepresentation') {
437
+ const v_error = (() => {
438
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
439
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
440
+ }
441
+ const obj_outputDataObjects = obj.outputDataObjects;
442
+ const path_outputDataObjects = path + '.outputDataObjects';
443
+ if (!ArrayIsArray(obj_outputDataObjects)) {
444
+ return new TypeError('Expected "array" but received "' + typeof obj_outputDataObjects + '" (at "' + path_outputDataObjects + '")');
445
+ }
446
+ for (let i = 0; i < obj_outputDataObjects.length; i++) {
447
+ const obj_outputDataObjects_item = obj_outputDataObjects[i];
448
+ const path_outputDataObjects_item = path_outputDataObjects + '[' + i + ']';
449
+ if (typeof obj_outputDataObjects_item !== 'object') {
450
+ return new TypeError('Expected "object" but received "' + typeof obj_outputDataObjects_item + '" (at "' + path_outputDataObjects_item + '")');
451
+ }
452
+ }
453
+ const obj_type = obj.type;
454
+ const path_type = path + '.type';
455
+ if (typeof obj_type !== 'string') {
456
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
457
+ }
458
+ const obj_version = obj.version;
459
+ const path_version = path + '.version';
460
+ if (typeof obj_version !== 'string') {
461
+ return new TypeError('Expected "string" but received "' + typeof obj_version + '" (at "' + path_version + '")');
462
+ }
463
+ })();
464
+ return v_error === undefined ? null : v_error;
465
+ }
466
+ const RepresentationType$4 = 'DataTransformDefinitionRepresentation';
467
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
468
+ const input_outputDataObjects = input.outputDataObjects;
469
+ const input_outputDataObjects_id = path.fullPath + '__outputDataObjects';
470
+ for (let i = 0; i < input_outputDataObjects.length; i++) {
471
+ const input_outputDataObjects_item = input_outputDataObjects[i];
472
+ let input_outputDataObjects_item_id = input_outputDataObjects_id + '__' + i;
473
+ input_outputDataObjects[i] = ingest$1(input_outputDataObjects_item, {
474
+ fullPath: input_outputDataObjects_item_id,
475
+ propertyName: i,
476
+ parent: {
477
+ data: input,
478
+ key: path.fullPath,
479
+ existing: existing,
480
+ },
481
+ ttl: path.ttl
482
+ }, luvio, store, timestamp);
483
+ }
484
+ return input;
485
+ }
486
+ const select$8 = function DataTransformDefinitionRepresentationSelect() {
487
+ return {
488
+ kind: 'Fragment',
489
+ version: VERSION$4,
490
+ private: [],
491
+ selections: [
492
+ {
493
+ name: 'outputDataObjects',
494
+ kind: 'Link',
495
+ plural: true,
496
+ fragment: select$5()
497
+ },
498
+ {
499
+ name: 'type',
500
+ kind: 'Scalar'
501
+ },
502
+ {
503
+ name: 'version',
504
+ kind: 'Scalar'
505
+ }
506
+ ]
507
+ };
508
+ };
509
+ function equals$5(existing, incoming) {
510
+ const existing_type = existing.type;
511
+ const incoming_type = incoming.type;
512
+ if (!(existing_type === incoming_type)) {
513
+ return false;
514
+ }
515
+ const existing_version = existing.version;
516
+ const incoming_version = incoming.version;
517
+ if (!(existing_version === incoming_version)) {
518
+ return false;
519
+ }
520
+ const existing_outputDataObjects = existing.outputDataObjects;
521
+ const incoming_outputDataObjects = incoming.outputDataObjects;
522
+ const equals_outputDataObjects_items = equalsArray(existing_outputDataObjects, incoming_outputDataObjects, (existing_outputDataObjects_item, incoming_outputDataObjects_item) => {
523
+ if (!(existing_outputDataObjects_item.__ref === incoming_outputDataObjects_item.__ref)) {
524
+ return false;
525
+ }
526
+ });
527
+ if (equals_outputDataObjects_items === false) {
528
+ return false;
529
+ }
530
+ return true;
531
+ }
532
+ const ingest$3 = function DataTransformDefinitionRepresentationIngest(input, path, luvio, store, timestamp) {
533
+ if (process.env.NODE_ENV !== 'production') {
534
+ const validateError = validate$5(input);
535
+ if (validateError !== null) {
536
+ throw validateError;
537
+ }
538
+ }
539
+ const key = path.fullPath;
540
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 3000000;
541
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "data-transform", VERSION$4, RepresentationType$4, equals$5);
542
+ return createLink(key);
543
+ };
544
+ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
545
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
546
+ const rootKey = fullPathFactory();
547
+ rootKeySet.set(rootKey, {
548
+ namespace: keyPrefix,
549
+ representationName: RepresentationType$4,
550
+ mergeable: false
551
+ });
552
+ const input_outputDataObjects_length = input.outputDataObjects.length;
553
+ for (let i = 0; i < input_outputDataObjects_length; i++) {
554
+ getTypeCacheKeys$1(rootKeySet, luvio, input.outputDataObjects[i]);
555
+ }
556
+ }
557
+
558
+ const VERSION$3 = "3a9081497eeed505968a3ef0ca548f46";
559
+ function validate$4(obj, path = 'DataTransformRepresentation') {
560
+ const validateCdpAssetBaseRepresentation_validateError = validate$3(obj, path);
561
+ if (validateCdpAssetBaseRepresentation_validateError !== null) {
562
+ return validateCdpAssetBaseRepresentation_validateError;
563
+ }
564
+ const v_error = (() => {
565
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
566
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
567
+ }
568
+ const obj_actionUrls = obj.actionUrls;
569
+ const path_actionUrls = path + '.actionUrls';
570
+ const referencepath_actionUrlsValidationError = validate$8(obj_actionUrls, path_actionUrls);
571
+ if (referencepath_actionUrlsValidationError !== null) {
572
+ let message = 'Object doesn\'t match BaseActionRepresentation (at "' + path_actionUrls + '")\n';
573
+ message += referencepath_actionUrlsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
574
+ return new TypeError(message);
575
+ }
576
+ if (obj.capabilities !== undefined) {
577
+ const obj_capabilities = obj.capabilities;
578
+ const path_capabilities = path + '.capabilities';
579
+ if (typeof obj_capabilities !== 'object' || ArrayIsArray(obj_capabilities) || obj_capabilities === null) {
580
+ return new TypeError('Expected "object" but received "' + typeof obj_capabilities + '" (at "' + path_capabilities + '")');
581
+ }
582
+ const obj_capabilities_keys = ObjectKeys(obj_capabilities);
583
+ for (let i = 0; i < obj_capabilities_keys.length; i++) {
584
+ const key = obj_capabilities_keys[i];
585
+ const obj_capabilities_prop = obj_capabilities[key];
586
+ const path_capabilities_prop = path_capabilities + '["' + key + '"]';
587
+ if (typeof obj_capabilities_prop !== 'boolean') {
588
+ return new TypeError('Expected "boolean" but received "' + typeof obj_capabilities_prop + '" (at "' + path_capabilities_prop + '")');
589
+ }
590
+ }
591
+ }
592
+ const obj_creationType = obj.creationType;
593
+ const path_creationType = path + '.creationType';
594
+ if (typeof obj_creationType !== 'string') {
595
+ return new TypeError('Expected "string" but received "' + typeof obj_creationType + '" (at "' + path_creationType + '")');
596
+ }
597
+ if (obj.dataSpaceName !== undefined) {
598
+ const obj_dataSpaceName = obj.dataSpaceName;
599
+ const path_dataSpaceName = path + '.dataSpaceName';
600
+ if (typeof obj_dataSpaceName !== 'string') {
601
+ return new TypeError('Expected "string" but received "' + typeof obj_dataSpaceName + '" (at "' + path_dataSpaceName + '")');
602
+ }
603
+ }
604
+ const obj_definition = obj.definition;
605
+ const path_definition = path + '.definition';
606
+ if (typeof obj_definition !== 'object') {
607
+ return new TypeError('Expected "object" but received "' + typeof obj_definition + '" (at "' + path_definition + '")');
608
+ }
609
+ if (obj.description !== undefined) {
610
+ const obj_description = obj.description;
611
+ const path_description = path + '.description';
612
+ if (typeof obj_description !== 'string') {
613
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
614
+ }
615
+ }
616
+ if (obj.lastRunDate !== undefined) {
617
+ const obj_lastRunDate = obj.lastRunDate;
618
+ const path_lastRunDate = path + '.lastRunDate';
619
+ if (typeof obj_lastRunDate !== 'string') {
620
+ return new TypeError('Expected "string" but received "' + typeof obj_lastRunDate + '" (at "' + path_lastRunDate + '")');
621
+ }
622
+ }
623
+ if (obj.lastRunErrorCode !== undefined) {
624
+ const obj_lastRunErrorCode = obj.lastRunErrorCode;
625
+ const path_lastRunErrorCode = path + '.lastRunErrorCode';
626
+ const referencepath_lastRunErrorCodeValidationError = validate$7(obj_lastRunErrorCode, path_lastRunErrorCode);
627
+ if (referencepath_lastRunErrorCodeValidationError !== null) {
628
+ let message = 'Object doesn\'t match CdpErrorRepresentation (at "' + path_lastRunErrorCode + '")\n';
629
+ message += referencepath_lastRunErrorCodeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
630
+ return new TypeError(message);
631
+ }
632
+ }
633
+ if (obj.lastRunErrorMessage !== undefined) {
634
+ const obj_lastRunErrorMessage = obj.lastRunErrorMessage;
635
+ const path_lastRunErrorMessage = path + '.lastRunErrorMessage';
636
+ if (typeof obj_lastRunErrorMessage !== 'string') {
637
+ return new TypeError('Expected "string" but received "' + typeof obj_lastRunErrorMessage + '" (at "' + path_lastRunErrorMessage + '")');
638
+ }
639
+ }
640
+ if (obj.lastRunStatus !== undefined) {
641
+ const obj_lastRunStatus = obj.lastRunStatus;
642
+ const path_lastRunStatus = path + '.lastRunStatus';
643
+ if (typeof obj_lastRunStatus !== 'string') {
644
+ return new TypeError('Expected "string" but received "' + typeof obj_lastRunStatus + '" (at "' + path_lastRunStatus + '")');
645
+ }
646
+ }
647
+ if (obj.schedule !== undefined) {
648
+ const obj_schedule = obj.schedule;
649
+ const path_schedule = path + '.schedule';
650
+ const referencepath_scheduleValidationError = validate$6(obj_schedule, path_schedule);
651
+ if (referencepath_scheduleValidationError !== null) {
652
+ let message = 'Object doesn\'t match ScheduleRepresentation (at "' + path_schedule + '")\n';
653
+ message += referencepath_scheduleValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
654
+ return new TypeError(message);
655
+ }
656
+ }
657
+ const obj_status = obj.status;
658
+ const path_status = path + '.status';
659
+ if (typeof obj_status !== 'string') {
660
+ return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
661
+ }
662
+ if (obj.tags !== undefined) {
663
+ const obj_tags = obj.tags;
664
+ const path_tags = path + '.tags';
665
+ if (typeof obj_tags !== 'object' || ArrayIsArray(obj_tags) || obj_tags === null) {
666
+ return new TypeError('Expected "object" but received "' + typeof obj_tags + '" (at "' + path_tags + '")');
667
+ }
668
+ const obj_tags_keys = ObjectKeys(obj_tags);
669
+ for (let i = 0; i < obj_tags_keys.length; i++) {
670
+ const key = obj_tags_keys[i];
671
+ const obj_tags_prop = obj_tags[key];
672
+ const path_tags_prop = path_tags + '["' + key + '"]';
673
+ if (typeof obj_tags_prop !== 'string') {
674
+ return new TypeError('Expected "string" but received "' + typeof obj_tags_prop + '" (at "' + path_tags_prop + '")');
675
+ }
676
+ }
677
+ }
678
+ const obj_type = obj.type;
679
+ const path_type = path + '.type';
680
+ if (typeof obj_type !== 'string') {
681
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
682
+ }
683
+ if (obj.version !== undefined) {
684
+ obj.version;
685
+ }
686
+ })();
687
+ return v_error === undefined ? null : v_error;
688
+ }
689
+ const RepresentationType$3 = 'DataTransformRepresentation';
690
+ function keyBuilder$6(luvio, config) {
691
+ return keyBuilder$5(luvio, config);
692
+ }
693
+ function keyBuilderFromType$2(luvio, object) {
694
+ return keyBuilderFromType$1(luvio, object);
695
+ }
696
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
697
+ const input_definition = input.definition;
698
+ const input_definition_id = path.fullPath + '__definition';
699
+ input.definition = ingest$3(input_definition, {
700
+ fullPath: input_definition_id,
701
+ propertyName: 'definition',
702
+ parent: {
703
+ data: input,
704
+ key: path.fullPath,
705
+ existing: existing,
706
+ },
707
+ ttl: path.ttl
708
+ }, luvio, store, timestamp);
709
+ return input;
710
+ }
711
+ const select$7 = function DataTransformRepresentationSelect() {
712
+ const { selections: CdpAssetBaseRepresentationSelections } = select$6();
713
+ const { selections: BaseActionRepresentation__selections, opaque: BaseActionRepresentation__opaque, } = select$b();
714
+ const { selections: CdpErrorRepresentation__selections, opaque: CdpErrorRepresentation__opaque, } = select$a();
715
+ const { selections: ScheduleRepresentation__selections, opaque: ScheduleRepresentation__opaque, } = select$9();
716
+ return {
717
+ kind: 'Fragment',
718
+ version: VERSION$3,
719
+ private: [],
720
+ selections: [
721
+ ...CdpAssetBaseRepresentationSelections,
722
+ {
723
+ name: 'actionUrls',
724
+ kind: 'Object',
725
+ selections: BaseActionRepresentation__selections
726
+ },
727
+ {
728
+ name: 'capabilities',
729
+ kind: 'Scalar',
730
+ map: true,
731
+ required: false
732
+ },
733
+ {
734
+ name: 'creationType',
735
+ kind: 'Scalar'
736
+ },
737
+ {
738
+ name: 'dataSpaceName',
739
+ kind: 'Scalar',
740
+ required: false
741
+ },
742
+ {
743
+ name: 'definition',
744
+ kind: 'Link',
745
+ fragment: select$8()
746
+ },
747
+ {
748
+ name: 'description',
749
+ kind: 'Scalar',
750
+ required: false
751
+ },
752
+ {
753
+ name: 'lastRunDate',
754
+ kind: 'Scalar',
755
+ required: false
756
+ },
757
+ {
758
+ name: 'lastRunErrorCode',
759
+ kind: 'Object',
760
+ selections: CdpErrorRepresentation__selections,
761
+ required: false
762
+ },
763
+ {
764
+ name: 'lastRunErrorMessage',
765
+ kind: 'Scalar',
766
+ required: false
767
+ },
768
+ {
769
+ name: 'lastRunStatus',
770
+ kind: 'Scalar',
771
+ required: false
772
+ },
773
+ {
774
+ name: 'schedule',
775
+ kind: 'Object',
776
+ selections: ScheduleRepresentation__selections,
777
+ required: false
778
+ },
779
+ {
780
+ name: 'status',
781
+ kind: 'Scalar'
782
+ },
783
+ {
784
+ name: 'tags',
785
+ kind: 'Scalar',
786
+ map: true,
787
+ required: false
788
+ },
789
+ {
790
+ name: 'type',
791
+ kind: 'Scalar'
792
+ },
793
+ {
794
+ name: 'version',
795
+ kind: 'Scalar',
796
+ required: false
797
+ }
798
+ ]
799
+ };
800
+ };
801
+ function equals$4(existing, incoming) {
802
+ if (equals$3(existing, incoming) === false) {
803
+ return false;
804
+ }
805
+ const existing_creationType = existing.creationType;
806
+ const incoming_creationType = incoming.creationType;
807
+ if (!(existing_creationType === incoming_creationType)) {
808
+ return false;
809
+ }
810
+ const existing_dataSpaceName = existing.dataSpaceName;
811
+ const incoming_dataSpaceName = incoming.dataSpaceName;
812
+ // if at least one of these optionals is defined
813
+ if (existing_dataSpaceName !== undefined || incoming_dataSpaceName !== undefined) {
814
+ // if one of these is not defined we know the other is defined and therefore
815
+ // not equal
816
+ if (existing_dataSpaceName === undefined || incoming_dataSpaceName === undefined) {
817
+ return false;
818
+ }
819
+ if (!(existing_dataSpaceName === incoming_dataSpaceName)) {
820
+ return false;
821
+ }
822
+ }
823
+ const existing_description = existing.description;
824
+ const incoming_description = incoming.description;
825
+ // if at least one of these optionals is defined
826
+ if (existing_description !== undefined || incoming_description !== undefined) {
827
+ // if one of these is not defined we know the other is defined and therefore
828
+ // not equal
829
+ if (existing_description === undefined || incoming_description === undefined) {
830
+ return false;
831
+ }
832
+ if (!(existing_description === incoming_description)) {
833
+ return false;
834
+ }
835
+ }
836
+ const existing_lastRunDate = existing.lastRunDate;
837
+ const incoming_lastRunDate = incoming.lastRunDate;
838
+ // if at least one of these optionals is defined
839
+ if (existing_lastRunDate !== undefined || incoming_lastRunDate !== undefined) {
840
+ // if one of these is not defined we know the other is defined and therefore
841
+ // not equal
842
+ if (existing_lastRunDate === undefined || incoming_lastRunDate === undefined) {
843
+ return false;
844
+ }
845
+ if (!(existing_lastRunDate === incoming_lastRunDate)) {
846
+ return false;
847
+ }
848
+ }
849
+ const existing_lastRunErrorMessage = existing.lastRunErrorMessage;
850
+ const incoming_lastRunErrorMessage = incoming.lastRunErrorMessage;
851
+ // if at least one of these optionals is defined
852
+ if (existing_lastRunErrorMessage !== undefined || incoming_lastRunErrorMessage !== undefined) {
853
+ // if one of these is not defined we know the other is defined and therefore
854
+ // not equal
855
+ if (existing_lastRunErrorMessage === undefined || incoming_lastRunErrorMessage === undefined) {
856
+ return false;
857
+ }
858
+ if (!(existing_lastRunErrorMessage === incoming_lastRunErrorMessage)) {
859
+ return false;
860
+ }
861
+ }
862
+ const existing_lastRunStatus = existing.lastRunStatus;
863
+ const incoming_lastRunStatus = incoming.lastRunStatus;
864
+ // if at least one of these optionals is defined
865
+ if (existing_lastRunStatus !== undefined || incoming_lastRunStatus !== undefined) {
866
+ // if one of these is not defined we know the other is defined and therefore
867
+ // not equal
868
+ if (existing_lastRunStatus === undefined || incoming_lastRunStatus === undefined) {
869
+ return false;
870
+ }
871
+ if (!(existing_lastRunStatus === incoming_lastRunStatus)) {
872
+ return false;
873
+ }
874
+ }
875
+ const existing_status = existing.status;
876
+ const incoming_status = incoming.status;
877
+ if (!(existing_status === incoming_status)) {
878
+ return false;
879
+ }
880
+ const existing_type = existing.type;
881
+ const incoming_type = incoming.type;
882
+ if (!(existing_type === incoming_type)) {
883
+ return false;
884
+ }
885
+ const existing_version = existing.version;
886
+ const incoming_version = incoming.version;
887
+ // if at least one of these optionals is defined
888
+ if (existing_version !== undefined || incoming_version !== undefined) {
889
+ // if one of these is not defined we know the other is defined and therefore
890
+ // not equal
891
+ if (existing_version === undefined || incoming_version === undefined) {
892
+ return false;
893
+ }
894
+ if (!(existing_version === incoming_version)) {
895
+ return false;
896
+ }
897
+ }
898
+ const existing_actionUrls = existing.actionUrls;
899
+ const incoming_actionUrls = incoming.actionUrls;
900
+ if (!(equals$8(existing_actionUrls, incoming_actionUrls))) {
901
+ return false;
902
+ }
903
+ const existing_capabilities = existing.capabilities;
904
+ const incoming_capabilities = incoming.capabilities;
905
+ // if at least one of these optionals is defined
906
+ if (existing_capabilities !== undefined || incoming_capabilities !== undefined) {
907
+ // if one of these is not defined we know the other is defined and therefore
908
+ // not equal
909
+ if (existing_capabilities === undefined || incoming_capabilities === undefined) {
910
+ return false;
911
+ }
912
+ const equals_capabilities_props = equalsObject(existing_capabilities, incoming_capabilities, (existing_capabilities_prop, incoming_capabilities_prop) => {
913
+ if (!(existing_capabilities_prop === incoming_capabilities_prop)) {
914
+ return false;
915
+ }
916
+ });
917
+ if (equals_capabilities_props === false) {
918
+ return false;
919
+ }
920
+ }
921
+ const existing_definition = existing.definition;
922
+ const incoming_definition = incoming.definition;
923
+ if (!(existing_definition.__ref === incoming_definition.__ref)) {
924
+ return false;
925
+ }
926
+ const existing_lastRunErrorCode = existing.lastRunErrorCode;
927
+ const incoming_lastRunErrorCode = incoming.lastRunErrorCode;
928
+ // if at least one of these optionals is defined
929
+ if (existing_lastRunErrorCode !== undefined || incoming_lastRunErrorCode !== undefined) {
930
+ // if one of these is not defined we know the other is defined and therefore
931
+ // not equal
932
+ if (existing_lastRunErrorCode === undefined || incoming_lastRunErrorCode === undefined) {
933
+ return false;
934
+ }
935
+ if (!(equals$7(existing_lastRunErrorCode, incoming_lastRunErrorCode))) {
936
+ return false;
937
+ }
938
+ }
939
+ const existing_schedule = existing.schedule;
940
+ const incoming_schedule = incoming.schedule;
941
+ // if at least one of these optionals is defined
942
+ if (existing_schedule !== undefined || incoming_schedule !== undefined) {
943
+ // if one of these is not defined we know the other is defined and therefore
944
+ // not equal
945
+ if (existing_schedule === undefined || incoming_schedule === undefined) {
946
+ return false;
947
+ }
948
+ if (!(equals$6(existing_schedule, incoming_schedule))) {
949
+ return false;
950
+ }
951
+ }
952
+ const existing_tags = existing.tags;
953
+ const incoming_tags = incoming.tags;
954
+ // if at least one of these optionals is defined
955
+ if (existing_tags !== undefined || incoming_tags !== undefined) {
956
+ // if one of these is not defined we know the other is defined and therefore
957
+ // not equal
958
+ if (existing_tags === undefined || incoming_tags === undefined) {
959
+ return false;
960
+ }
961
+ const equals_tags_props = equalsObject(existing_tags, incoming_tags, (existing_tags_prop, incoming_tags_prop) => {
962
+ if (!(existing_tags_prop === incoming_tags_prop)) {
963
+ return false;
964
+ }
965
+ });
966
+ if (equals_tags_props === false) {
967
+ return false;
968
+ }
969
+ }
970
+ return true;
971
+ }
972
+ const ingest$2 = function DataTransformRepresentationIngest(input, path, luvio, store, timestamp) {
973
+ if (process.env.NODE_ENV !== 'production') {
974
+ const validateError = validate$4(input);
975
+ if (validateError !== null) {
976
+ throw validateError;
977
+ }
978
+ }
979
+ const key = keyBuilderFromType$2(luvio, input);
980
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 3000000;
981
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "data-transform", VERSION$3, RepresentationType$3, equals$4);
982
+ return createLink(key);
983
+ };
984
+ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
985
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
986
+ const rootKey = keyBuilderFromType$2(luvio, input);
987
+ rootKeySet.set(rootKey, {
988
+ namespace: keyPrefix,
989
+ representationName: RepresentationType$2,
990
+ mergeable: false
991
+ });
992
+ getTypeCacheKeys$3(rootKeySet, luvio, input.definition, () => rootKey + "__" + "definition");
993
+ }
193
994
 
995
+ var DiscriminatorValues;
996
+ (function (DiscriminatorValues) {
997
+ DiscriminatorValues["type"] = "type";
998
+ })(DiscriminatorValues || (DiscriminatorValues = {}));
999
+ const VERSION$2 = "e45ed0cf1759f7e1fe67049f806edc26";
194
1000
  function validate$3(obj, path = 'CdpAssetBaseRepresentation') {
195
1001
  const v_error = (() => {
196
1002
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -199,7 +1005,7 @@ function validate$3(obj, path = 'CdpAssetBaseRepresentation') {
199
1005
  if (obj.createdBy !== undefined) {
200
1006
  const obj_createdBy = obj.createdBy;
201
1007
  const path_createdBy = path + '.createdBy';
202
- const referencepath_createdByValidationError = validate$4(obj_createdBy, path_createdBy);
1008
+ const referencepath_createdByValidationError = validate$9(obj_createdBy, path_createdBy);
203
1009
  if (referencepath_createdByValidationError !== null) {
204
1010
  let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_createdBy + '")\n';
205
1011
  message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -228,7 +1034,7 @@ function validate$3(obj, path = 'CdpAssetBaseRepresentation') {
228
1034
  if (obj.lastModifiedBy !== undefined) {
229
1035
  const obj_lastModifiedBy = obj.lastModifiedBy;
230
1036
  const path_lastModifiedBy = path + '.lastModifiedBy';
231
- const referencepath_lastModifiedByValidationError = validate$4(obj_lastModifiedBy, path_lastModifiedBy);
1037
+ const referencepath_lastModifiedByValidationError = validate$9(obj_lastModifiedBy, path_lastModifiedBy);
232
1038
  if (referencepath_lastModifiedByValidationError !== null) {
233
1039
  let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_lastModifiedBy + '")\n';
234
1040
  message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -242,12 +1048,10 @@ function validate$3(obj, path = 'CdpAssetBaseRepresentation') {
242
1048
  return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
243
1049
  }
244
1050
  }
245
- if (obj.name !== undefined) {
246
- const obj_name = obj.name;
247
- const path_name = path + '.name';
248
- if (typeof obj_name !== 'string') {
249
- return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
250
- }
1051
+ const obj_name = obj.name;
1052
+ const path_name = path + '.name';
1053
+ if (typeof obj_name !== 'string') {
1054
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
251
1055
  }
252
1056
  if (obj.namespace !== undefined) {
253
1057
  const obj_namespace = obj.namespace;
@@ -266,6 +1070,175 @@ function validate$3(obj, path = 'CdpAssetBaseRepresentation') {
266
1070
  })();
267
1071
  return v_error === undefined ? null : v_error;
268
1072
  }
1073
+ const RepresentationType$2 = 'CdpAssetBaseRepresentation';
1074
+ function keyBuilder$5(luvio, config) {
1075
+ return keyPrefix + '::' + RepresentationType$2 + ':' + config.name;
1076
+ }
1077
+ function keyBuilderFromType$1(luvio, object) {
1078
+ const keyParams = {
1079
+ name: object.name
1080
+ };
1081
+ return keyBuilder$5(luvio, keyParams);
1082
+ }
1083
+ const select$6 = function CdpAssetBaseRepresentationSelect() {
1084
+ const { selections: CdpUserRepresentation__selections, opaque: CdpUserRepresentation__opaque, } = select$c();
1085
+ return {
1086
+ kind: 'Fragment',
1087
+ version: VERSION$2,
1088
+ private: [],
1089
+ selections: [
1090
+ {
1091
+ name: 'createdBy',
1092
+ kind: 'Object',
1093
+ selections: CdpUserRepresentation__selections,
1094
+ required: false
1095
+ },
1096
+ {
1097
+ name: 'createdDate',
1098
+ kind: 'Scalar',
1099
+ required: false
1100
+ },
1101
+ {
1102
+ name: 'id',
1103
+ kind: 'Scalar'
1104
+ },
1105
+ {
1106
+ name: 'label',
1107
+ kind: 'Scalar',
1108
+ required: false
1109
+ },
1110
+ {
1111
+ name: 'lastModifiedBy',
1112
+ kind: 'Object',
1113
+ selections: CdpUserRepresentation__selections,
1114
+ required: false
1115
+ },
1116
+ {
1117
+ name: 'lastModifiedDate',
1118
+ kind: 'Scalar',
1119
+ required: false
1120
+ },
1121
+ {
1122
+ name: 'name',
1123
+ kind: 'Scalar'
1124
+ },
1125
+ {
1126
+ name: 'namespace',
1127
+ kind: 'Scalar',
1128
+ required: false
1129
+ },
1130
+ {
1131
+ name: 'url',
1132
+ kind: 'Scalar',
1133
+ required: false
1134
+ }
1135
+ ]
1136
+ };
1137
+ };
1138
+ function equals$3(existing, incoming) {
1139
+ const existing_createdDate = existing.createdDate;
1140
+ const incoming_createdDate = incoming.createdDate;
1141
+ // if at least one of these optionals is defined
1142
+ if (existing_createdDate !== undefined || incoming_createdDate !== undefined) {
1143
+ // if one of these is not defined we know the other is defined and therefore
1144
+ // not equal
1145
+ if (existing_createdDate === undefined || incoming_createdDate === undefined) {
1146
+ return false;
1147
+ }
1148
+ if (!(existing_createdDate === incoming_createdDate)) {
1149
+ return false;
1150
+ }
1151
+ }
1152
+ const existing_id = existing.id;
1153
+ const incoming_id = incoming.id;
1154
+ if (!(existing_id === incoming_id)) {
1155
+ return false;
1156
+ }
1157
+ const existing_label = existing.label;
1158
+ const incoming_label = incoming.label;
1159
+ // if at least one of these optionals is defined
1160
+ if (existing_label !== undefined || incoming_label !== undefined) {
1161
+ // if one of these is not defined we know the other is defined and therefore
1162
+ // not equal
1163
+ if (existing_label === undefined || incoming_label === undefined) {
1164
+ return false;
1165
+ }
1166
+ if (!(existing_label === incoming_label)) {
1167
+ return false;
1168
+ }
1169
+ }
1170
+ const existing_lastModifiedDate = existing.lastModifiedDate;
1171
+ const incoming_lastModifiedDate = incoming.lastModifiedDate;
1172
+ // if at least one of these optionals is defined
1173
+ if (existing_lastModifiedDate !== undefined || incoming_lastModifiedDate !== undefined) {
1174
+ // if one of these is not defined we know the other is defined and therefore
1175
+ // not equal
1176
+ if (existing_lastModifiedDate === undefined || incoming_lastModifiedDate === undefined) {
1177
+ return false;
1178
+ }
1179
+ if (!(existing_lastModifiedDate === incoming_lastModifiedDate)) {
1180
+ return false;
1181
+ }
1182
+ }
1183
+ const existing_name = existing.name;
1184
+ const incoming_name = incoming.name;
1185
+ if (!(existing_name === incoming_name)) {
1186
+ return false;
1187
+ }
1188
+ const existing_namespace = existing.namespace;
1189
+ const incoming_namespace = incoming.namespace;
1190
+ // if at least one of these optionals is defined
1191
+ if (existing_namespace !== undefined || incoming_namespace !== undefined) {
1192
+ // if one of these is not defined we know the other is defined and therefore
1193
+ // not equal
1194
+ if (existing_namespace === undefined || incoming_namespace === undefined) {
1195
+ return false;
1196
+ }
1197
+ if (!(existing_namespace === incoming_namespace)) {
1198
+ return false;
1199
+ }
1200
+ }
1201
+ const existing_url = existing.url;
1202
+ const incoming_url = incoming.url;
1203
+ // if at least one of these optionals is defined
1204
+ if (existing_url !== undefined || incoming_url !== undefined) {
1205
+ // if one of these is not defined we know the other is defined and therefore
1206
+ // not equal
1207
+ if (existing_url === undefined || incoming_url === undefined) {
1208
+ return false;
1209
+ }
1210
+ if (!(existing_url === incoming_url)) {
1211
+ return false;
1212
+ }
1213
+ }
1214
+ const existing_createdBy = existing.createdBy;
1215
+ const incoming_createdBy = incoming.createdBy;
1216
+ // if at least one of these optionals is defined
1217
+ if (existing_createdBy !== undefined || incoming_createdBy !== undefined) {
1218
+ // if one of these is not defined we know the other is defined and therefore
1219
+ // not equal
1220
+ if (existing_createdBy === undefined || incoming_createdBy === undefined) {
1221
+ return false;
1222
+ }
1223
+ if (!(equals$9(existing_createdBy, incoming_createdBy))) {
1224
+ return false;
1225
+ }
1226
+ }
1227
+ const existing_lastModifiedBy = existing.lastModifiedBy;
1228
+ const incoming_lastModifiedBy = incoming.lastModifiedBy;
1229
+ // if at least one of these optionals is defined
1230
+ if (existing_lastModifiedBy !== undefined || incoming_lastModifiedBy !== undefined) {
1231
+ // if one of these is not defined we know the other is defined and therefore
1232
+ // not equal
1233
+ if (existing_lastModifiedBy === undefined || incoming_lastModifiedBy === undefined) {
1234
+ return false;
1235
+ }
1236
+ if (!(equals$9(existing_lastModifiedBy, incoming_lastModifiedBy))) {
1237
+ return false;
1238
+ }
1239
+ }
1240
+ return true;
1241
+ }
269
1242
 
270
1243
  function validate$2(obj, path = 'DataObjectFieldRepresentation') {
271
1244
  const v_error = (() => {
@@ -277,10 +1250,12 @@ function validate$2(obj, path = 'DataObjectFieldRepresentation') {
277
1250
  if (typeof obj_isPrimaryKey !== 'boolean') {
278
1251
  return new TypeError('Expected "boolean" but received "' + typeof obj_isPrimaryKey + '" (at "' + path_isPrimaryKey + '")');
279
1252
  }
280
- const obj_keyQualifierField = obj.keyQualifierField;
281
- const path_keyQualifierField = path + '.keyQualifierField';
282
- if (typeof obj_keyQualifierField !== 'string') {
283
- return new TypeError('Expected "string" but received "' + typeof obj_keyQualifierField + '" (at "' + path_keyQualifierField + '")');
1253
+ if (obj.keyQualifierField !== undefined) {
1254
+ const obj_keyQualifierField = obj.keyQualifierField;
1255
+ const path_keyQualifierField = path + '.keyQualifierField';
1256
+ if (typeof obj_keyQualifierField !== 'string') {
1257
+ return new TypeError('Expected "string" but received "' + typeof obj_keyQualifierField + '" (at "' + path_keyQualifierField + '")');
1258
+ }
284
1259
  }
285
1260
  const obj_label = obj.label;
286
1261
  const path_label = path + '.label';
@@ -300,7 +1275,14 @@ function validate$2(obj, path = 'DataObjectFieldRepresentation') {
300
1275
  })();
301
1276
  return v_error === undefined ? null : v_error;
302
1277
  }
1278
+ function equals$2(existing, incoming) {
1279
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
1280
+ return false;
1281
+ }
1282
+ return true;
1283
+ }
303
1284
 
1285
+ const VERSION$1 = "8242b57b93fc99780862de37f9209bc2";
304
1286
  function validate$1(obj, path = 'DataObjectRepresentation') {
305
1287
  const validateCdpAssetBaseRepresentation_validateError = validate$3(obj, path);
306
1288
  if (validateCdpAssetBaseRepresentation_validateError !== null) {
@@ -310,10 +1292,12 @@ function validate$1(obj, path = 'DataObjectRepresentation') {
310
1292
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
311
1293
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
312
1294
  }
313
- const obj_category = obj.category;
314
- const path_category = path + '.category';
315
- if (typeof obj_category !== 'string') {
316
- return new TypeError('Expected "string" but received "' + typeof obj_category + '" (at "' + path_category + '")');
1295
+ if (obj.category !== undefined) {
1296
+ const obj_category = obj.category;
1297
+ const path_category = path + '.category';
1298
+ if (typeof obj_category !== 'string') {
1299
+ return new TypeError('Expected "string" but received "' + typeof obj_category + '" (at "' + path_category + '")');
1300
+ }
317
1301
  }
318
1302
  if (obj.eventDateTimeFieldName !== undefined) {
319
1303
  const obj_eventDateTimeFieldName = obj.eventDateTimeFieldName;
@@ -322,19 +1306,21 @@ function validate$1(obj, path = 'DataObjectRepresentation') {
322
1306
  return new TypeError('Expected "string" but received "' + typeof obj_eventDateTimeFieldName + '" (at "' + path_eventDateTimeFieldName + '")');
323
1307
  }
324
1308
  }
325
- const obj_fields = obj.fields;
326
- const path_fields = path + '.fields';
327
- if (!ArrayIsArray(obj_fields)) {
328
- return new TypeError('Expected "array" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
329
- }
330
- for (let i = 0; i < obj_fields.length; i++) {
331
- const obj_fields_item = obj_fields[i];
332
- const path_fields_item = path_fields + '[' + i + ']';
333
- const referencepath_fields_itemValidationError = validate$2(obj_fields_item, path_fields_item);
334
- if (referencepath_fields_itemValidationError !== null) {
335
- let message = 'Object doesn\'t match DataObjectFieldRepresentation (at "' + path_fields_item + '")\n';
336
- message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
337
- return new TypeError(message);
1309
+ if (obj.fields !== undefined) {
1310
+ const obj_fields = obj.fields;
1311
+ const path_fields = path + '.fields';
1312
+ if (!ArrayIsArray(obj_fields)) {
1313
+ return new TypeError('Expected "array" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
1314
+ }
1315
+ for (let i = 0; i < obj_fields.length; i++) {
1316
+ const obj_fields_item = obj_fields[i];
1317
+ const path_fields_item = path_fields + '[' + i + ']';
1318
+ const referencepath_fields_itemValidationError = validate$2(obj_fields_item, path_fields_item);
1319
+ if (referencepath_fields_itemValidationError !== null) {
1320
+ let message = 'Object doesn\'t match DataObjectFieldRepresentation (at "' + path_fields_item + '")\n';
1321
+ message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1322
+ return new TypeError(message);
1323
+ }
338
1324
  }
339
1325
  }
340
1326
  if (obj.recordModifiedFieldName !== undefined) {
@@ -344,14 +1330,128 @@ function validate$1(obj, path = 'DataObjectRepresentation') {
344
1330
  return new TypeError('Expected "string" but received "' + typeof obj_recordModifiedFieldName + '" (at "' + path_recordModifiedFieldName + '")');
345
1331
  }
346
1332
  }
347
- const obj_type = obj.type;
348
- const path_type = path + '.type';
349
- if (typeof obj_type !== 'string') {
350
- return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
1333
+ if (obj.type !== undefined) {
1334
+ const obj_type = obj.type;
1335
+ const path_type = path + '.type';
1336
+ if (typeof obj_type !== 'string') {
1337
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
1338
+ }
351
1339
  }
352
1340
  })();
353
1341
  return v_error === undefined ? null : v_error;
354
1342
  }
1343
+ const RepresentationType$1 = 'DataObjectRepresentation';
1344
+ function keyBuilderFromType(luvio, object) {
1345
+ return keyBuilderFromType$1(luvio, object);
1346
+ }
1347
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
1348
+ return input;
1349
+ }
1350
+ const select$5 = function DataObjectRepresentationSelect() {
1351
+ return {
1352
+ kind: 'Fragment',
1353
+ version: VERSION$1,
1354
+ private: [],
1355
+ opaque: true
1356
+ };
1357
+ };
1358
+ function equals$1(existing, incoming) {
1359
+ if (equals$3(existing, incoming) === false) {
1360
+ return false;
1361
+ }
1362
+ const existing_category = existing.category;
1363
+ const incoming_category = incoming.category;
1364
+ // if at least one of these optionals is defined
1365
+ if (existing_category !== undefined || incoming_category !== undefined) {
1366
+ // if one of these is not defined we know the other is defined and therefore
1367
+ // not equal
1368
+ if (existing_category === undefined || incoming_category === undefined) {
1369
+ return false;
1370
+ }
1371
+ if (!(existing_category === incoming_category)) {
1372
+ return false;
1373
+ }
1374
+ }
1375
+ const existing_eventDateTimeFieldName = existing.eventDateTimeFieldName;
1376
+ const incoming_eventDateTimeFieldName = incoming.eventDateTimeFieldName;
1377
+ // if at least one of these optionals is defined
1378
+ if (existing_eventDateTimeFieldName !== undefined || incoming_eventDateTimeFieldName !== undefined) {
1379
+ // if one of these is not defined we know the other is defined and therefore
1380
+ // not equal
1381
+ if (existing_eventDateTimeFieldName === undefined || incoming_eventDateTimeFieldName === undefined) {
1382
+ return false;
1383
+ }
1384
+ if (!(existing_eventDateTimeFieldName === incoming_eventDateTimeFieldName)) {
1385
+ return false;
1386
+ }
1387
+ }
1388
+ const existing_recordModifiedFieldName = existing.recordModifiedFieldName;
1389
+ const incoming_recordModifiedFieldName = incoming.recordModifiedFieldName;
1390
+ // if at least one of these optionals is defined
1391
+ if (existing_recordModifiedFieldName !== undefined || incoming_recordModifiedFieldName !== undefined) {
1392
+ // if one of these is not defined we know the other is defined and therefore
1393
+ // not equal
1394
+ if (existing_recordModifiedFieldName === undefined || incoming_recordModifiedFieldName === undefined) {
1395
+ return false;
1396
+ }
1397
+ if (!(existing_recordModifiedFieldName === incoming_recordModifiedFieldName)) {
1398
+ return false;
1399
+ }
1400
+ }
1401
+ const existing_type = existing.type;
1402
+ const incoming_type = incoming.type;
1403
+ // if at least one of these optionals is defined
1404
+ if (existing_type !== undefined || incoming_type !== undefined) {
1405
+ // if one of these is not defined we know the other is defined and therefore
1406
+ // not equal
1407
+ if (existing_type === undefined || incoming_type === undefined) {
1408
+ return false;
1409
+ }
1410
+ if (!(existing_type === incoming_type)) {
1411
+ return false;
1412
+ }
1413
+ }
1414
+ const existing_fields = existing.fields;
1415
+ const incoming_fields = incoming.fields;
1416
+ // if at least one of these optionals is defined
1417
+ if (existing_fields !== undefined || incoming_fields !== undefined) {
1418
+ // if one of these is not defined we know the other is defined and therefore
1419
+ // not equal
1420
+ if (existing_fields === undefined || incoming_fields === undefined) {
1421
+ return false;
1422
+ }
1423
+ const equals_fields_items = equalsArray(existing_fields, incoming_fields, (existing_fields_item, incoming_fields_item) => {
1424
+ if (!(equals$2(existing_fields_item, incoming_fields_item))) {
1425
+ return false;
1426
+ }
1427
+ });
1428
+ if (equals_fields_items === false) {
1429
+ return false;
1430
+ }
1431
+ }
1432
+ return true;
1433
+ }
1434
+ const ingest$1 = function DataObjectRepresentationIngest(input, path, luvio, store, timestamp) {
1435
+ if (process.env.NODE_ENV !== 'production') {
1436
+ const validateError = validate$1(input);
1437
+ if (validateError !== null) {
1438
+ throw validateError;
1439
+ }
1440
+ }
1441
+ const key = keyBuilderFromType(luvio, input);
1442
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 3000000;
1443
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "data-transform", VERSION$1, RepresentationType$1, equals$1);
1444
+ return createLink(key);
1445
+ };
1446
+ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
1447
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1448
+ const rootKey = keyBuilderFromType(luvio, input);
1449
+ rootKeySet.set(rootKey, {
1450
+ namespace: keyPrefix,
1451
+ representationName: RepresentationType$2,
1452
+ mergeable: false
1453
+ });
1454
+ }
355
1455
 
356
1456
  const VERSION = "21a4cd3206473ce28645099a11735bc6";
357
1457
  function validate(obj, path = 'DataTransformValidationRepresentation') {
@@ -368,7 +1468,7 @@ function validate(obj, path = 'DataTransformValidationRepresentation') {
368
1468
  for (let i = 0; i < obj_issues.length; i++) {
369
1469
  const obj_issues_item = obj_issues[i];
370
1470
  const path_issues_item = path_issues + '[' + i + ']';
371
- const referencepath_issues_itemValidationError = validate$5(obj_issues_item, path_issues_item);
1471
+ const referencepath_issues_itemValidationError = validate$a(obj_issues_item, path_issues_item);
372
1472
  if (referencepath_issues_itemValidationError !== null) {
373
1473
  let message = 'Object doesn\'t match TransformValidationIssueRepresentation (at "' + path_issues_item + '")\n';
374
1474
  message += referencepath_issues_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -400,7 +1500,7 @@ const RepresentationType = 'DataTransformValidationRepresentation';
400
1500
  function normalize(input, existing, path, luvio, store, timestamp) {
401
1501
  return input;
402
1502
  }
403
- const select$1 = function DataTransformValidationRepresentationSelect() {
1503
+ const select$4 = function DataTransformValidationRepresentationSelect() {
404
1504
  return {
405
1505
  kind: 'Fragment',
406
1506
  version: VERSION,
@@ -436,24 +1536,212 @@ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
436
1536
  });
437
1537
  }
438
1538
 
439
- function select(luvio, params) {
440
- return select$1();
1539
+ function select$3(luvio, params) {
1540
+ return select$4();
1541
+ }
1542
+ function keyBuilder$4(luvio, params) {
1543
+ return keyPrefix + '::DataTransformValidationRepresentation:(' + stableJSONStringify(params.body.capabilities) + '::' + 'creationType:' + params.body.creationType + '::' + (params.body.currencyIsoCode === undefined ? 'currencyIsoCode' : 'currencyIsoCode:' + params.body.currencyIsoCode) + '::' + (params.body.dataSpaceName === undefined ? 'dataSpaceName' : 'dataSpaceName:' + params.body.dataSpaceName) + '::' + stableJSONStringify(params.body.definition) + '::' + (params.body.description === undefined ? 'description' : 'description:' + params.body.description) + '::' + (params.body.label === undefined ? 'label' : 'label:' + params.body.label) + '::' + (params.body.name === undefined ? 'name' : 'name:' + params.body.name) + '::' + (params.body.primarySource === undefined ? 'primarySource' : 'primarySource:' + params.body.primarySource) + '::' + stableJSONStringify(params.body.tags) + '::' + 'type:' + params.body.type + ')';
1544
+ }
1545
+ function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
1546
+ getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$4(luvio, resourceParams));
1547
+ }
1548
+ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
1549
+ const { body } = response;
1550
+ const key = keyBuilder$4(luvio, resourceParams);
1551
+ luvio.storeIngest(key, ingest, body);
1552
+ const snapshot = luvio.storeLookup({
1553
+ recordId: key,
1554
+ node: select$3(),
1555
+ variables: {},
1556
+ }, snapshotRefresh);
1557
+ if (process.env.NODE_ENV !== 'production') {
1558
+ if (snapshot.state !== 'Fulfilled') {
1559
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1560
+ }
1561
+ }
1562
+ deepFreeze(snapshot.data);
1563
+ return snapshot;
1564
+ }
1565
+ function ingestError$1(luvio, params, error, snapshotRefresh) {
1566
+ const key = keyBuilder$4(luvio, params);
1567
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1568
+ luvio.storeIngestError(key, errorSnapshot);
1569
+ return errorSnapshot;
1570
+ }
1571
+ function createResourceRequest$4(config) {
1572
+ const headers = {};
1573
+ return {
1574
+ baseUri: '/services/data/v62.0',
1575
+ basePath: '/ssot/data-transforms-validation',
1576
+ method: 'post',
1577
+ body: config.body,
1578
+ urlParams: {},
1579
+ queryParams: {},
1580
+ headers,
1581
+ priority: 'normal',
1582
+ };
1583
+ }
1584
+
1585
+ const adapterName$4 = 'validateDataTransforms';
1586
+ const validateDataTransforms_ConfigPropertyMetadata = [
1587
+ generateParamConfigMetadata('capabilities', false, 2 /* Body */, 4 /* Unsupported */),
1588
+ generateParamConfigMetadata('creationType', true, 2 /* Body */, 0 /* String */),
1589
+ generateParamConfigMetadata('currencyIsoCode', false, 2 /* Body */, 0 /* String */),
1590
+ generateParamConfigMetadata('dataSpaceName', false, 2 /* Body */, 0 /* String */),
1591
+ generateParamConfigMetadata('definition', true, 2 /* Body */, 4 /* Unsupported */),
1592
+ generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
1593
+ generateParamConfigMetadata('label', false, 2 /* Body */, 0 /* String */),
1594
+ generateParamConfigMetadata('name', false, 2 /* Body */, 0 /* String */),
1595
+ generateParamConfigMetadata('primarySource', false, 2 /* Body */, 0 /* String */),
1596
+ generateParamConfigMetadata('tags', false, 2 /* Body */, 4 /* Unsupported */),
1597
+ generateParamConfigMetadata('type', true, 2 /* Body */, 0 /* String */),
1598
+ ];
1599
+ const validateDataTransforms_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, validateDataTransforms_ConfigPropertyMetadata);
1600
+ const createResourceParams$4 = /*#__PURE__*/ createResourceParams$5(validateDataTransforms_ConfigPropertyMetadata);
1601
+ function keyBuilder$3(luvio, config) {
1602
+ const resourceParams = createResourceParams$4(config);
1603
+ return keyBuilder$4(luvio, resourceParams);
1604
+ }
1605
+ function typeCheckConfig$4(untrustedConfig) {
1606
+ const config = {};
1607
+ typeCheckConfig$5(untrustedConfig, config, validateDataTransforms_ConfigPropertyMetadata);
1608
+ const untrustedConfig_capabilities = untrustedConfig.capabilities;
1609
+ if (untrustedIsObject(untrustedConfig_capabilities)) {
1610
+ const untrustedConfig_capabilities_object = {};
1611
+ const untrustedConfig_capabilities_keys = Object.keys(untrustedConfig_capabilities);
1612
+ for (let i = 0, arrayLength = untrustedConfig_capabilities_keys.length; i < arrayLength; i++) {
1613
+ const key = untrustedConfig_capabilities_keys[i];
1614
+ const untrustedConfig_capabilities_prop = untrustedConfig_capabilities[key];
1615
+ if (typeof untrustedConfig_capabilities_prop === 'boolean') {
1616
+ if (untrustedConfig_capabilities_object !== undefined) {
1617
+ untrustedConfig_capabilities_object[key] = untrustedConfig_capabilities_prop;
1618
+ }
1619
+ }
1620
+ }
1621
+ if (untrustedConfig_capabilities_object !== undefined && Object.keys(untrustedConfig_capabilities_object).length >= 0) {
1622
+ config.capabilities = untrustedConfig_capabilities_object;
1623
+ }
1624
+ }
1625
+ const untrustedConfig_definition = untrustedConfig.definition;
1626
+ if (untrustedIsObject(untrustedConfig_definition)) {
1627
+ const untrustedConfig_definition_object = {};
1628
+ const untrustedConfig_definition_keys = Object.keys(untrustedConfig_definition);
1629
+ for (let i = 0, arrayLength = untrustedConfig_definition_keys.length; i < arrayLength; i++) {
1630
+ const key = untrustedConfig_definition_keys[i];
1631
+ const untrustedConfig_definition_prop = untrustedConfig_definition[key];
1632
+ if (untrustedConfig_definition_object !== undefined) {
1633
+ untrustedConfig_definition_object[key] = untrustedConfig_definition_prop;
1634
+ }
1635
+ }
1636
+ if (untrustedConfig_definition_object !== undefined && Object.keys(untrustedConfig_definition_object).length >= 0) {
1637
+ config.definition = untrustedConfig_definition_object;
1638
+ }
1639
+ }
1640
+ const untrustedConfig_tags = untrustedConfig.tags;
1641
+ if (untrustedIsObject(untrustedConfig_tags)) {
1642
+ const untrustedConfig_tags_object = {};
1643
+ const untrustedConfig_tags_keys = Object.keys(untrustedConfig_tags);
1644
+ for (let i = 0, arrayLength = untrustedConfig_tags_keys.length; i < arrayLength; i++) {
1645
+ const key = untrustedConfig_tags_keys[i];
1646
+ const untrustedConfig_tags_prop = untrustedConfig_tags[key];
1647
+ if (typeof untrustedConfig_tags_prop === 'string') {
1648
+ if (untrustedConfig_tags_object !== undefined) {
1649
+ untrustedConfig_tags_object[key] = untrustedConfig_tags_prop;
1650
+ }
1651
+ }
1652
+ }
1653
+ if (untrustedConfig_tags_object !== undefined && Object.keys(untrustedConfig_tags_object).length >= 0) {
1654
+ config.tags = untrustedConfig_tags_object;
1655
+ }
1656
+ }
1657
+ return config;
1658
+ }
1659
+ function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
1660
+ if (!untrustedIsObject(untrustedConfig)) {
1661
+ return null;
1662
+ }
1663
+ if (process.env.NODE_ENV !== 'production') {
1664
+ validateConfig(untrustedConfig, configPropertyNames);
1665
+ }
1666
+ const config = typeCheckConfig$4(untrustedConfig);
1667
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1668
+ return null;
1669
+ }
1670
+ return config;
1671
+ }
1672
+ function adapterFragment$1(luvio, config) {
1673
+ createResourceParams$4(config);
1674
+ return select$3();
1675
+ }
1676
+ function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
1677
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
1678
+ config,
1679
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
1680
+ });
1681
+ return luvio.storeBroadcast().then(() => snapshot);
1682
+ }
1683
+ function onFetchResponseError$1(luvio, config, resourceParams, response) {
1684
+ const snapshot = ingestError$1(luvio, resourceParams, response, {
1685
+ config,
1686
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
1687
+ });
1688
+ return luvio.storeBroadcast().then(() => snapshot);
1689
+ }
1690
+ function buildNetworkSnapshot$4(luvio, config, options) {
1691
+ const resourceParams = createResourceParams$4(config);
1692
+ const request = createResourceRequest$4(resourceParams);
1693
+ return luvio.dispatchResourceRequest(request, options)
1694
+ .then((response) => {
1695
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
1696
+ const cache = new StoreKeyMap();
1697
+ getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
1698
+ return cache;
1699
+ });
1700
+ }, (response) => {
1701
+ return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
1702
+ });
1703
+ }
1704
+ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
1705
+ return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, 'get', false);
1706
+ }
1707
+ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
1708
+ const { luvio, config } = context;
1709
+ const selector = {
1710
+ recordId: keyBuilder$3(luvio, config),
1711
+ node: adapterFragment$1(luvio, config),
1712
+ variables: {},
1713
+ };
1714
+ const cacheSnapshot = storeLookup(selector, {
1715
+ config,
1716
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
1717
+ });
1718
+ return cacheSnapshot;
441
1719
  }
442
- function keyBuilder$1(luvio, params) {
443
- return keyPrefix + '::DataTransformValidationRepresentation:(' + stableJSONStringify(params.body.capabilities) + '::' + 'creationType:' + params.body.creationType + '::' + (params.body.currencyIsoCode === undefined ? 'currencyIsoCode' : 'currencyIsoCode:' + params.body.currencyIsoCode) + '::' + (params.body.dataSpaceName === undefined ? 'dataSpaceName' : 'dataSpaceName:' + params.body.dataSpaceName) + '::' + stableJSONStringify(params.body.definition) + '::' + (params.body.description === undefined ? 'description' : 'description:' + params.body.description) + '::' + (params.body.label === undefined ? 'label' : 'label:' + params.body.label) + '::' + (params.body.name === undefined ? 'name' : 'name:' + params.body.name) + '::' + (params.body.primarySource === undefined ? 'primarySource' : 'primarySource:' + params.body.primarySource) + '::' + stableJSONStringify(params.body.tags) + '::' + 'type:' + params.body.type + ')';
1720
+ const validateDataTransformsAdapterFactory = (luvio) => function dataTransform__validateDataTransforms(untrustedConfig, requestContext) {
1721
+ const config = validateAdapterConfig$4(untrustedConfig, validateDataTransforms_ConfigPropertyNames);
1722
+ // Invalid or incomplete config
1723
+ if (config === null) {
1724
+ return null;
1725
+ }
1726
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1727
+ buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
1728
+ };
1729
+
1730
+ function select$2(luvio, params) {
1731
+ return select$7();
444
1732
  }
445
- function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
446
- getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
1733
+ function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
1734
+ getTypeCacheKeys$2(storeKeyMap, luvio, response);
447
1735
  }
448
- function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
1736
+ function ingestSuccess$2(luvio, resourceParams, response) {
449
1737
  const { body } = response;
450
- const key = keyBuilder$1(luvio, resourceParams);
451
- luvio.storeIngest(key, ingest, body);
1738
+ const key = keyBuilderFromType$2(luvio, body);
1739
+ luvio.storeIngest(key, ingest$2, body);
452
1740
  const snapshot = luvio.storeLookup({
453
1741
  recordId: key,
454
- node: select(),
1742
+ node: select$2(),
455
1743
  variables: {},
456
- }, snapshotRefresh);
1744
+ });
457
1745
  if (process.env.NODE_ENV !== 'production') {
458
1746
  if (snapshot.state !== 'Fulfilled') {
459
1747
  throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
@@ -462,28 +1750,23 @@ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
462
1750
  deepFreeze(snapshot.data);
463
1751
  return snapshot;
464
1752
  }
465
- function ingestError(luvio, params, error, snapshotRefresh) {
466
- const key = keyBuilder$1(luvio, params);
467
- const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
468
- luvio.storeIngestError(key, errorSnapshot);
469
- return errorSnapshot;
470
- }
471
- function createResourceRequest(config) {
1753
+ function createResourceRequest$3(config) {
472
1754
  const headers = {};
473
1755
  return {
474
1756
  baseUri: '/services/data/v62.0',
475
- basePath: '/ssot/data-transforms-validation',
1757
+ basePath: '/ssot/data-transforms',
476
1758
  method: 'post',
477
1759
  body: config.body,
478
1760
  urlParams: {},
479
- queryParams: {},
1761
+ queryParams: config.queryParams,
480
1762
  headers,
481
1763
  priority: 'normal',
482
1764
  };
483
1765
  }
484
1766
 
485
- const adapterName = 'validateDataTransforms';
486
- const validateDataTransforms_ConfigPropertyMetadata = [
1767
+ const adapterName$3 = 'createDataTransform';
1768
+ const createDataTransform_ConfigPropertyMetadata = [
1769
+ generateParamConfigMetadata('filterGroup', false, 1 /* QueryParameter */, 0 /* String */),
487
1770
  generateParamConfigMetadata('capabilities', false, 2 /* Body */, 4 /* Unsupported */),
488
1771
  generateParamConfigMetadata('creationType', true, 2 /* Body */, 0 /* String */),
489
1772
  generateParamConfigMetadata('currencyIsoCode', false, 2 /* Body */, 0 /* String */),
@@ -496,15 +1779,11 @@ const validateDataTransforms_ConfigPropertyMetadata = [
496
1779
  generateParamConfigMetadata('tags', false, 2 /* Body */, 4 /* Unsupported */),
497
1780
  generateParamConfigMetadata('type', true, 2 /* Body */, 0 /* String */),
498
1781
  ];
499
- const validateDataTransforms_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, validateDataTransforms_ConfigPropertyMetadata);
500
- const createResourceParams = /*#__PURE__*/ createResourceParams$1(validateDataTransforms_ConfigPropertyMetadata);
501
- function keyBuilder(luvio, config) {
502
- const resourceParams = createResourceParams(config);
503
- return keyBuilder$1(luvio, resourceParams);
504
- }
505
- function typeCheckConfig(untrustedConfig) {
1782
+ const createDataTransform_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, createDataTransform_ConfigPropertyMetadata);
1783
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$5(createDataTransform_ConfigPropertyMetadata);
1784
+ function typeCheckConfig$3(untrustedConfig) {
506
1785
  const config = {};
507
- typeCheckConfig$1(untrustedConfig, config, validateDataTransforms_ConfigPropertyMetadata);
1786
+ typeCheckConfig$5(untrustedConfig, config, createDataTransform_ConfigPropertyMetadata);
508
1787
  const untrustedConfig_capabilities = untrustedConfig.capabilities;
509
1788
  if (untrustedIsObject(untrustedConfig_capabilities)) {
510
1789
  const untrustedConfig_capabilities_object = {};
@@ -556,45 +1835,151 @@ function typeCheckConfig(untrustedConfig) {
556
1835
  }
557
1836
  return config;
558
1837
  }
559
- function validateAdapterConfig(untrustedConfig, configPropertyNames) {
1838
+ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
560
1839
  if (!untrustedIsObject(untrustedConfig)) {
561
1840
  return null;
562
1841
  }
563
1842
  if (process.env.NODE_ENV !== 'production') {
564
1843
  validateConfig(untrustedConfig, configPropertyNames);
565
1844
  }
566
- const config = typeCheckConfig(untrustedConfig);
1845
+ const config = typeCheckConfig$3(untrustedConfig);
1846
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1847
+ return null;
1848
+ }
1849
+ return config;
1850
+ }
1851
+ function buildNetworkSnapshot$3(luvio, config, options) {
1852
+ const resourceParams = createResourceParams$3(config);
1853
+ const request = createResourceRequest$3(resourceParams);
1854
+ return luvio.dispatchResourceRequest(request, options)
1855
+ .then((response) => {
1856
+ return luvio.handleSuccessResponse(() => {
1857
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response);
1858
+ return luvio.storeBroadcast().then(() => snapshot);
1859
+ }, () => {
1860
+ const cache = new StoreKeyMap();
1861
+ getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
1862
+ return cache;
1863
+ });
1864
+ }, (response) => {
1865
+ deepFreeze(response);
1866
+ throw response;
1867
+ });
1868
+ }
1869
+ const createDataTransformAdapterFactory = (luvio) => {
1870
+ return function createDataTransform(untrustedConfig) {
1871
+ const config = validateAdapterConfig$3(untrustedConfig, createDataTransform_ConfigPropertyNames);
1872
+ // Invalid or incomplete config
1873
+ if (config === null) {
1874
+ throw new Error('Invalid config for "createDataTransform"');
1875
+ }
1876
+ return buildNetworkSnapshot$3(luvio, config);
1877
+ };
1878
+ };
1879
+
1880
+ function select$1(luvio, params) {
1881
+ return select$7();
1882
+ }
1883
+ function keyBuilder$2(luvio, params) {
1884
+ return keyBuilder$6(luvio, {
1885
+ name: params.urlParams.dataTransformNameOrId
1886
+ });
1887
+ }
1888
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
1889
+ getTypeCacheKeys$2(storeKeyMap, luvio, response);
1890
+ }
1891
+ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
1892
+ const { body } = response;
1893
+ const key = keyBuilder$2(luvio, resourceParams);
1894
+ luvio.storeIngest(key, ingest$2, body);
1895
+ const snapshot = luvio.storeLookup({
1896
+ recordId: key,
1897
+ node: select$1(),
1898
+ variables: {},
1899
+ }, snapshotRefresh);
1900
+ if (process.env.NODE_ENV !== 'production') {
1901
+ if (snapshot.state !== 'Fulfilled') {
1902
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1903
+ }
1904
+ }
1905
+ deepFreeze(snapshot.data);
1906
+ return snapshot;
1907
+ }
1908
+ function ingestError(luvio, params, error, snapshotRefresh) {
1909
+ const key = keyBuilder$2(luvio, params);
1910
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1911
+ luvio.storeIngestError(key, errorSnapshot);
1912
+ return errorSnapshot;
1913
+ }
1914
+ function createResourceRequest$2(config) {
1915
+ const headers = {};
1916
+ return {
1917
+ baseUri: '/services/data/v62.0',
1918
+ basePath: '/ssot/data-transforms/' + config.urlParams.dataTransformNameOrId + '',
1919
+ method: 'get',
1920
+ body: null,
1921
+ urlParams: config.urlParams,
1922
+ queryParams: config.queryParams,
1923
+ headers,
1924
+ priority: 'normal',
1925
+ };
1926
+ }
1927
+
1928
+ const adapterName$2 = 'getDataTransform';
1929
+ const getDataTransform_ConfigPropertyMetadata = [
1930
+ generateParamConfigMetadata('dataTransformNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
1931
+ generateParamConfigMetadata('filterGroup', false, 1 /* QueryParameter */, 0 /* String */),
1932
+ ];
1933
+ const getDataTransform_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getDataTransform_ConfigPropertyMetadata);
1934
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$5(getDataTransform_ConfigPropertyMetadata);
1935
+ function keyBuilder$1(luvio, config) {
1936
+ const resourceParams = createResourceParams$2(config);
1937
+ return keyBuilder$2(luvio, resourceParams);
1938
+ }
1939
+ function typeCheckConfig$2(untrustedConfig) {
1940
+ const config = {};
1941
+ typeCheckConfig$5(untrustedConfig, config, getDataTransform_ConfigPropertyMetadata);
1942
+ return config;
1943
+ }
1944
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
1945
+ if (!untrustedIsObject(untrustedConfig)) {
1946
+ return null;
1947
+ }
1948
+ if (process.env.NODE_ENV !== 'production') {
1949
+ validateConfig(untrustedConfig, configPropertyNames);
1950
+ }
1951
+ const config = typeCheckConfig$2(untrustedConfig);
567
1952
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
568
1953
  return null;
569
1954
  }
570
1955
  return config;
571
1956
  }
572
1957
  function adapterFragment(luvio, config) {
573
- createResourceParams(config);
574
- return select();
1958
+ createResourceParams$2(config);
1959
+ return select$1();
575
1960
  }
576
1961
  function onFetchResponseSuccess(luvio, config, resourceParams, response) {
577
- const snapshot = ingestSuccess(luvio, resourceParams, response, {
1962
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
578
1963
  config,
579
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1964
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
580
1965
  });
581
1966
  return luvio.storeBroadcast().then(() => snapshot);
582
1967
  }
583
1968
  function onFetchResponseError(luvio, config, resourceParams, response) {
584
1969
  const snapshot = ingestError(luvio, resourceParams, response, {
585
1970
  config,
586
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1971
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
587
1972
  });
588
1973
  return luvio.storeBroadcast().then(() => snapshot);
589
1974
  }
590
- function buildNetworkSnapshot(luvio, config, options) {
591
- const resourceParams = createResourceParams(config);
592
- const request = createResourceRequest(resourceParams);
1975
+ function buildNetworkSnapshot$2(luvio, config, options) {
1976
+ const resourceParams = createResourceParams$2(config);
1977
+ const request = createResourceRequest$2(resourceParams);
593
1978
  return luvio.dispatchResourceRequest(request, options)
594
1979
  .then((response) => {
595
1980
  return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
596
1981
  const cache = new StoreKeyMap();
597
- getResponseCacheKeys(cache, luvio, resourceParams, response.body);
1982
+ getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
598
1983
  return cache;
599
1984
  });
600
1985
  }, (response) => {
@@ -602,23 +1987,23 @@ function buildNetworkSnapshot(luvio, config, options) {
602
1987
  });
603
1988
  }
604
1989
  function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
605
- return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot, 'get', false);
1990
+ return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
606
1991
  }
607
1992
  function buildCachedSnapshotCachePolicy(context, storeLookup) {
608
1993
  const { luvio, config } = context;
609
1994
  const selector = {
610
- recordId: keyBuilder(luvio, config),
1995
+ recordId: keyBuilder$1(luvio, config),
611
1996
  node: adapterFragment(luvio, config),
612
1997
  variables: {},
613
1998
  };
614
1999
  const cacheSnapshot = storeLookup(selector, {
615
2000
  config,
616
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
2001
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
617
2002
  });
618
2003
  return cacheSnapshot;
619
2004
  }
620
- const validateDataTransformsAdapterFactory = (luvio) => function dataTransform__validateDataTransforms(untrustedConfig, requestContext) {
621
- const config = validateAdapterConfig(untrustedConfig, validateDataTransforms_ConfigPropertyNames);
2005
+ const getDataTransformAdapterFactory = (luvio) => function dataTransform__getDataTransform(untrustedConfig, requestContext) {
2006
+ const config = validateAdapterConfig$2(untrustedConfig, getDataTransform_ConfigPropertyNames);
622
2007
  // Invalid or incomplete config
623
2008
  if (config === null) {
624
2009
  return null;
@@ -627,4 +2012,239 @@ const validateDataTransformsAdapterFactory = (luvio) => function dataTransform__
627
2012
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
628
2013
  };
629
2014
 
630
- export { validateDataTransformsAdapterFactory };
2015
+ function keyBuilder(luvio, params) {
2016
+ return keyBuilder$6(luvio, {
2017
+ name: params.urlParams.dataTransformNameOrId
2018
+ });
2019
+ }
2020
+ function getResponseCacheKeys$1(cacheKeyMap, luvio, resourceParams) {
2021
+ const key = keyBuilder(luvio, resourceParams);
2022
+ cacheKeyMap.set(key, {
2023
+ namespace: keyPrefix,
2024
+ representationName: RepresentationType$3,
2025
+ mergeable: false
2026
+ });
2027
+ }
2028
+ function evictSuccess(luvio, resourceParams) {
2029
+ const key = keyBuilder(luvio, resourceParams);
2030
+ luvio.storeEvict(key);
2031
+ }
2032
+ function createResourceRequest$1(config) {
2033
+ const headers = {};
2034
+ return {
2035
+ baseUri: '/services/data/v62.0',
2036
+ basePath: '/ssot/data-transforms/' + config.urlParams.dataTransformNameOrId + '',
2037
+ method: 'delete',
2038
+ body: null,
2039
+ urlParams: config.urlParams,
2040
+ queryParams: {},
2041
+ headers,
2042
+ priority: 'normal',
2043
+ };
2044
+ }
2045
+
2046
+ const adapterName$1 = 'deleteDataTransform';
2047
+ const deleteDataTransform_ConfigPropertyMetadata = [
2048
+ generateParamConfigMetadata('dataTransformNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
2049
+ ];
2050
+ const deleteDataTransform_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, deleteDataTransform_ConfigPropertyMetadata);
2051
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$5(deleteDataTransform_ConfigPropertyMetadata);
2052
+ function typeCheckConfig$1(untrustedConfig) {
2053
+ const config = {};
2054
+ typeCheckConfig$5(untrustedConfig, config, deleteDataTransform_ConfigPropertyMetadata);
2055
+ return config;
2056
+ }
2057
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
2058
+ if (!untrustedIsObject(untrustedConfig)) {
2059
+ return null;
2060
+ }
2061
+ if (process.env.NODE_ENV !== 'production') {
2062
+ validateConfig(untrustedConfig, configPropertyNames);
2063
+ }
2064
+ const config = typeCheckConfig$1(untrustedConfig);
2065
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
2066
+ return null;
2067
+ }
2068
+ return config;
2069
+ }
2070
+ function buildNetworkSnapshot$1(luvio, config, options) {
2071
+ const resourceParams = createResourceParams$1(config);
2072
+ const request = createResourceRequest$1(resourceParams);
2073
+ return luvio.dispatchResourceRequest(request, options)
2074
+ .then(() => {
2075
+ return luvio.handleSuccessResponse(() => {
2076
+ evictSuccess(luvio, resourceParams);
2077
+ return luvio.storeBroadcast();
2078
+ }, () => {
2079
+ const cache = new StoreKeyMap();
2080
+ getResponseCacheKeys$1(cache, luvio, resourceParams);
2081
+ return cache;
2082
+ });
2083
+ }, (response) => {
2084
+ deepFreeze(response);
2085
+ throw response;
2086
+ });
2087
+ }
2088
+ const deleteDataTransformAdapterFactory = (luvio) => {
2089
+ return function dataTransformdeleteDataTransform(untrustedConfig) {
2090
+ const config = validateAdapterConfig$1(untrustedConfig, deleteDataTransform_ConfigPropertyNames);
2091
+ // Invalid or incomplete config
2092
+ if (config === null) {
2093
+ throw new Error(`Invalid config for "${adapterName$1}"`);
2094
+ }
2095
+ return buildNetworkSnapshot$1(luvio, config);
2096
+ };
2097
+ };
2098
+
2099
+ function select(luvio, params) {
2100
+ return select$7();
2101
+ }
2102
+ function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
2103
+ getTypeCacheKeys$2(storeKeyMap, luvio, response);
2104
+ }
2105
+ function ingestSuccess(luvio, resourceParams, response) {
2106
+ const { body } = response;
2107
+ const key = keyBuilderFromType$2(luvio, body);
2108
+ luvio.storeIngest(key, ingest$2, body);
2109
+ const snapshot = luvio.storeLookup({
2110
+ recordId: key,
2111
+ node: select(),
2112
+ variables: {},
2113
+ });
2114
+ if (process.env.NODE_ENV !== 'production') {
2115
+ if (snapshot.state !== 'Fulfilled') {
2116
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
2117
+ }
2118
+ }
2119
+ deepFreeze(snapshot.data);
2120
+ return snapshot;
2121
+ }
2122
+ function createResourceRequest(config) {
2123
+ const headers = {};
2124
+ return {
2125
+ baseUri: '/services/data/v62.0',
2126
+ basePath: '/ssot/data-transforms/' + config.urlParams.dataTransformNameOrId + '',
2127
+ method: 'put',
2128
+ body: config.body,
2129
+ urlParams: config.urlParams,
2130
+ queryParams: config.queryParams,
2131
+ headers,
2132
+ priority: 'normal',
2133
+ };
2134
+ }
2135
+
2136
+ const adapterName = 'updateDataTransform';
2137
+ const updateDataTransform_ConfigPropertyMetadata = [
2138
+ generateParamConfigMetadata('dataTransformNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
2139
+ generateParamConfigMetadata('filterGroup', false, 1 /* QueryParameter */, 0 /* String */),
2140
+ generateParamConfigMetadata('capabilities', false, 2 /* Body */, 4 /* Unsupported */),
2141
+ generateParamConfigMetadata('creationType', true, 2 /* Body */, 0 /* String */),
2142
+ generateParamConfigMetadata('currencyIsoCode', false, 2 /* Body */, 0 /* String */),
2143
+ generateParamConfigMetadata('dataSpaceName', false, 2 /* Body */, 0 /* String */),
2144
+ generateParamConfigMetadata('definition', true, 2 /* Body */, 4 /* Unsupported */),
2145
+ generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
2146
+ generateParamConfigMetadata('label', false, 2 /* Body */, 0 /* String */),
2147
+ generateParamConfigMetadata('name', false, 2 /* Body */, 0 /* String */),
2148
+ generateParamConfigMetadata('primarySource', false, 2 /* Body */, 0 /* String */),
2149
+ generateParamConfigMetadata('tags', false, 2 /* Body */, 4 /* Unsupported */),
2150
+ generateParamConfigMetadata('type', true, 2 /* Body */, 0 /* String */),
2151
+ ];
2152
+ const updateDataTransform_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, updateDataTransform_ConfigPropertyMetadata);
2153
+ const createResourceParams = /*#__PURE__*/ createResourceParams$5(updateDataTransform_ConfigPropertyMetadata);
2154
+ function typeCheckConfig(untrustedConfig) {
2155
+ const config = {};
2156
+ typeCheckConfig$5(untrustedConfig, config, updateDataTransform_ConfigPropertyMetadata);
2157
+ const untrustedConfig_capabilities = untrustedConfig.capabilities;
2158
+ if (untrustedIsObject(untrustedConfig_capabilities)) {
2159
+ const untrustedConfig_capabilities_object = {};
2160
+ const untrustedConfig_capabilities_keys = Object.keys(untrustedConfig_capabilities);
2161
+ for (let i = 0, arrayLength = untrustedConfig_capabilities_keys.length; i < arrayLength; i++) {
2162
+ const key = untrustedConfig_capabilities_keys[i];
2163
+ const untrustedConfig_capabilities_prop = untrustedConfig_capabilities[key];
2164
+ if (typeof untrustedConfig_capabilities_prop === 'boolean') {
2165
+ if (untrustedConfig_capabilities_object !== undefined) {
2166
+ untrustedConfig_capabilities_object[key] = untrustedConfig_capabilities_prop;
2167
+ }
2168
+ }
2169
+ }
2170
+ if (untrustedConfig_capabilities_object !== undefined && Object.keys(untrustedConfig_capabilities_object).length >= 0) {
2171
+ config.capabilities = untrustedConfig_capabilities_object;
2172
+ }
2173
+ }
2174
+ const untrustedConfig_definition = untrustedConfig.definition;
2175
+ if (untrustedIsObject(untrustedConfig_definition)) {
2176
+ const untrustedConfig_definition_object = {};
2177
+ const untrustedConfig_definition_keys = Object.keys(untrustedConfig_definition);
2178
+ for (let i = 0, arrayLength = untrustedConfig_definition_keys.length; i < arrayLength; i++) {
2179
+ const key = untrustedConfig_definition_keys[i];
2180
+ const untrustedConfig_definition_prop = untrustedConfig_definition[key];
2181
+ if (untrustedConfig_definition_object !== undefined) {
2182
+ untrustedConfig_definition_object[key] = untrustedConfig_definition_prop;
2183
+ }
2184
+ }
2185
+ if (untrustedConfig_definition_object !== undefined && Object.keys(untrustedConfig_definition_object).length >= 0) {
2186
+ config.definition = untrustedConfig_definition_object;
2187
+ }
2188
+ }
2189
+ const untrustedConfig_tags = untrustedConfig.tags;
2190
+ if (untrustedIsObject(untrustedConfig_tags)) {
2191
+ const untrustedConfig_tags_object = {};
2192
+ const untrustedConfig_tags_keys = Object.keys(untrustedConfig_tags);
2193
+ for (let i = 0, arrayLength = untrustedConfig_tags_keys.length; i < arrayLength; i++) {
2194
+ const key = untrustedConfig_tags_keys[i];
2195
+ const untrustedConfig_tags_prop = untrustedConfig_tags[key];
2196
+ if (typeof untrustedConfig_tags_prop === 'string') {
2197
+ if (untrustedConfig_tags_object !== undefined) {
2198
+ untrustedConfig_tags_object[key] = untrustedConfig_tags_prop;
2199
+ }
2200
+ }
2201
+ }
2202
+ if (untrustedConfig_tags_object !== undefined && Object.keys(untrustedConfig_tags_object).length >= 0) {
2203
+ config.tags = untrustedConfig_tags_object;
2204
+ }
2205
+ }
2206
+ return config;
2207
+ }
2208
+ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
2209
+ if (!untrustedIsObject(untrustedConfig)) {
2210
+ return null;
2211
+ }
2212
+ if (process.env.NODE_ENV !== 'production') {
2213
+ validateConfig(untrustedConfig, configPropertyNames);
2214
+ }
2215
+ const config = typeCheckConfig(untrustedConfig);
2216
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
2217
+ return null;
2218
+ }
2219
+ return config;
2220
+ }
2221
+ function buildNetworkSnapshot(luvio, config, options) {
2222
+ const resourceParams = createResourceParams(config);
2223
+ const request = createResourceRequest(resourceParams);
2224
+ return luvio.dispatchResourceRequest(request, options)
2225
+ .then((response) => {
2226
+ return luvio.handleSuccessResponse(() => {
2227
+ const snapshot = ingestSuccess(luvio, resourceParams, response);
2228
+ return luvio.storeBroadcast().then(() => snapshot);
2229
+ }, () => {
2230
+ const cache = new StoreKeyMap();
2231
+ getResponseCacheKeys(cache, luvio, resourceParams, response.body);
2232
+ return cache;
2233
+ });
2234
+ }, (response) => {
2235
+ deepFreeze(response);
2236
+ throw response;
2237
+ });
2238
+ }
2239
+ const updateDataTransformAdapterFactory = (luvio) => {
2240
+ return function updateDataTransform(untrustedConfig) {
2241
+ const config = validateAdapterConfig(untrustedConfig, updateDataTransform_ConfigPropertyNames);
2242
+ // Invalid or incomplete config
2243
+ if (config === null) {
2244
+ throw new Error('Invalid config for "updateDataTransform"');
2245
+ }
2246
+ return buildNetworkSnapshot(luvio, config);
2247
+ };
2248
+ };
2249
+
2250
+ export { createDataTransformAdapterFactory, deleteDataTransformAdapterFactory, getDataTransformAdapterFactory, updateDataTransformAdapterFactory, validateDataTransformsAdapterFactory };