@salesforce/lds-adapters-cdp-byoc 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 (25) hide show
  1. package/dist/es/es2018/cdp-byoc.js +1039 -209
  2. package/dist/es/es2018/types/src/generated/adapters/createCustomCodeDeployment.d.ts +1 -0
  3. package/dist/es/es2018/types/src/generated/adapters/getCustomCodeDeployments.d.ts +3 -0
  4. package/dist/es/es2018/types/src/generated/adapters/getCustomCodeExecution.d.ts +28 -0
  5. package/dist/es/es2018/types/src/generated/adapters/getCustomCodeExecutionLogs.d.ts +28 -0
  6. package/dist/es/es2018/types/src/generated/adapters/getCustomCodeExecutions.d.ts +29 -0
  7. package/dist/es/es2018/types/src/generated/adapters/updateCustomCodeDeployment.d.ts +1 -0
  8. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +3 -0
  9. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +7 -1
  10. package/dist/es/es2018/types/src/generated/resources/getSsotDataCustomCode.d.ts +3 -0
  11. package/dist/es/es2018/types/src/generated/resources/getSsotDataCustomCodeExecutionsByCustomCodeExecutionIdAndCustomCodeNameOrId.d.ts +16 -0
  12. package/dist/es/es2018/types/src/generated/resources/getSsotDataCustomCodeExecutionsByCustomCodeNameOrId.d.ts +19 -0
  13. package/dist/es/es2018/types/src/generated/resources/getSsotDataCustomCodeExecutionsLogsByCustomCodeExecutionIdAndCustomCodeNameOrId.d.ts +16 -0
  14. package/dist/es/es2018/types/src/generated/resources/patchSsotDataCustomCodeByCustomCodeNameOrId.d.ts +1 -0
  15. package/dist/es/es2018/types/src/generated/resources/postSsotDataCustomCode.d.ts +1 -0
  16. package/dist/es/es2018/types/src/generated/types/CustomCodeDeploymentInputRepresentation.d.ts +4 -1
  17. package/dist/es/es2018/types/src/generated/types/CustomCodeDeploymentRepresentation.d.ts +3 -3
  18. package/dist/es/es2018/types/src/generated/types/CustomCodeExecutionBaseRepresentation.d.ts +55 -0
  19. package/dist/es/es2018/types/src/generated/types/CustomCodeExecutionCollectionRepresentation.d.ts +38 -0
  20. package/dist/es/es2018/types/src/generated/types/CustomCodeExecutionLogRepresentation.d.ts +28 -0
  21. package/dist/es/es2018/types/src/generated/types/CustomCodePatchInputRepresentation.d.ts +4 -1
  22. package/package.json +3 -3
  23. package/sfdc/index.js +1108 -251
  24. package/src/raml/api.raml +167 -2
  25. package/src/raml/luvio.raml +14 -0
package/sfdc/index.js CHANGED
@@ -14,7 +14,7 @@
14
14
  /* proxy-compat-disable */
15
15
  import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
16
16
  import { withDefaultLuvio } from 'force/ldsEngine';
17
- import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$5, typeCheckConfig as typeCheckConfig$5, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2 } from 'force/luvioEngine';
17
+ import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$8, typeCheckConfig as typeCheckConfig$8, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$5 } from 'force/luvioEngine';
18
18
 
19
19
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
20
20
  const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
@@ -83,6 +83,7 @@ const keyPrefix = 'byoc';
83
83
 
84
84
  const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
85
85
  const { isArray: ArrayIsArray } = Array;
86
+ const { stringify: JSONStringify } = JSON;
86
87
  function equalsArray(a, b, equalsItem) {
87
88
  const aLength = a.length;
88
89
  const bLength = b.length;
@@ -121,8 +122,8 @@ function createLink(ref) {
121
122
  };
122
123
  }
123
124
 
124
- const VERSION$2 = "2fe1bfd9fd1c6a94767d2ea000d6d318";
125
- function validate$2(obj, path = 'CdpUserRepresentation') {
125
+ const VERSION$5 = "2fe1bfd9fd1c6a94767d2ea000d6d318";
126
+ function validate$5(obj, path = 'CdpUserRepresentation') {
126
127
  const v_error = (() => {
127
128
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
128
129
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -145,10 +146,10 @@ function validate$2(obj, path = 'CdpUserRepresentation') {
145
146
  })();
146
147
  return v_error === undefined ? null : v_error;
147
148
  }
148
- const select$6 = function CdpUserRepresentationSelect() {
149
+ const select$c = function CdpUserRepresentationSelect() {
149
150
  return {
150
151
  kind: 'Fragment',
151
- version: VERSION$2,
152
+ version: VERSION$5,
152
153
  private: [],
153
154
  selections: [
154
155
  {
@@ -166,7 +167,7 @@ const select$6 = function CdpUserRepresentationSelect() {
166
167
  ]
167
168
  };
168
169
  };
169
- function equals$2(existing, incoming) {
170
+ function equals$5(existing, incoming) {
170
171
  const existing_id = existing.id;
171
172
  const incoming_id = incoming.id;
172
173
  if (!(existing_id === incoming_id)) {
@@ -185,8 +186,8 @@ function equals$2(existing, incoming) {
185
186
  return true;
186
187
  }
187
188
 
188
- const VERSION$1 = "bc7c21323d31a68bdc0ef7484dc4fa2b";
189
- function validate$1(obj, path = 'CustomCodeDeploymentRepresentation') {
189
+ const VERSION$4 = "3a8185ac626c1463f8bf0540517ef2e2";
190
+ function validate$4(obj, path = 'CustomCodeDeploymentRepresentation') {
190
191
  const v_error = (() => {
191
192
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
192
193
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -203,7 +204,7 @@ function validate$1(obj, path = 'CustomCodeDeploymentRepresentation') {
203
204
  }
204
205
  const obj_createdBy = obj.createdBy;
205
206
  const path_createdBy = path + '.createdBy';
206
- const referencepath_createdByValidationError = validate$2(obj_createdBy, path_createdBy);
207
+ const referencepath_createdByValidationError = validate$5(obj_createdBy, path_createdBy);
207
208
  if (referencepath_createdByValidationError !== null) {
208
209
  let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_createdBy + '")\n';
209
210
  message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -271,7 +272,7 @@ function validate$1(obj, path = 'CustomCodeDeploymentRepresentation') {
271
272
  }
272
273
  const obj_lastModifiedBy = obj.lastModifiedBy;
273
274
  const path_lastModifiedBy = path + '.lastModifiedBy';
274
- const referencepath_lastModifiedByValidationError = validate$2(obj_lastModifiedBy, path_lastModifiedBy);
275
+ const referencepath_lastModifiedByValidationError = validate$5(obj_lastModifiedBy, path_lastModifiedBy);
275
276
  if (referencepath_lastModifiedByValidationError !== null) {
276
277
  let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_lastModifiedBy + '")\n';
277
278
  message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -304,8 +305,8 @@ function validate$1(obj, path = 'CustomCodeDeploymentRepresentation') {
304
305
  const key = obj_parameters_keys[i];
305
306
  const obj_parameters_prop = obj_parameters[key];
306
307
  const path_parameters_prop = path_parameters + '["' + key + '"]';
307
- if (typeof obj_parameters_prop !== 'string') {
308
- return new TypeError('Expected "string" but received "' + typeof obj_parameters_prop + '" (at "' + path_parameters_prop + '")');
308
+ if (obj_parameters_prop === undefined) {
309
+ return new TypeError('Expected "defined" but received "' + typeof obj_parameters_prop + '" (at "' + path_parameters_prop + '")');
309
310
  }
310
311
  }
311
312
  const obj_status = obj.status;
@@ -326,24 +327,24 @@ function validate$1(obj, path = 'CustomCodeDeploymentRepresentation') {
326
327
  })();
327
328
  return v_error === undefined ? null : v_error;
328
329
  }
329
- const RepresentationType$1 = 'CustomCodeDeploymentRepresentation';
330
- function keyBuilder$5(luvio, config) {
331
- return keyPrefix + '::' + RepresentationType$1 + ':' + config.id;
330
+ const RepresentationType$4 = 'CustomCodeDeploymentRepresentation';
331
+ function keyBuilder$b(luvio, config) {
332
+ return keyPrefix + '::' + RepresentationType$4 + ':' + config.id;
332
333
  }
333
334
  function keyBuilderFromType(luvio, object) {
334
335
  const keyParams = {
335
336
  id: object.id
336
337
  };
337
- return keyBuilder$5(luvio, keyParams);
338
+ return keyBuilder$b(luvio, keyParams);
338
339
  }
339
- function normalize$1(input, existing, path, luvio, store, timestamp) {
340
+ function normalize$4(input, existing, path, luvio, store, timestamp) {
340
341
  return input;
341
342
  }
342
- const select$5 = function CustomCodeDeploymentRepresentationSelect() {
343
- const { selections: CdpUserRepresentation__selections, opaque: CdpUserRepresentation__opaque, } = select$6();
343
+ const select$b = function CustomCodeDeploymentRepresentationSelect() {
344
+ const { selections: CdpUserRepresentation__selections, opaque: CdpUserRepresentation__opaque, } = select$c();
344
345
  return {
345
346
  kind: 'Fragment',
346
- version: VERSION$1,
347
+ version: VERSION$4,
347
348
  private: [],
348
349
  selections: [
349
350
  {
@@ -420,8 +421,8 @@ const select$5 = function CustomCodeDeploymentRepresentationSelect() {
420
421
  },
421
422
  {
422
423
  name: 'parameters',
423
- kind: 'Scalar',
424
- map: true
424
+ kind: 'Object',
425
+ // any
425
426
  },
426
427
  {
427
428
  name: 'status',
@@ -438,7 +439,7 @@ const select$5 = function CustomCodeDeploymentRepresentationSelect() {
438
439
  ]
439
440
  };
440
441
  };
441
- function equals$1(existing, incoming) {
442
+ function equals$4(existing, incoming) {
442
443
  const existing_deploymentFailureCode = existing.deploymentFailureCode;
443
444
  const incoming_deploymentFailureCode = incoming.deploymentFailureCode;
444
445
  // if at least one of these optionals is defined
@@ -553,7 +554,7 @@ function equals$1(existing, incoming) {
553
554
  }
554
555
  const existing_createdBy = existing.createdBy;
555
556
  const incoming_createdBy = incoming.createdBy;
556
- if (!(equals$2(existing_createdBy, incoming_createdBy))) {
557
+ if (!(equals$5(existing_createdBy, incoming_createdBy))) {
557
558
  return false;
558
559
  }
559
560
  const existing_functionInvokeOptions = existing.functionInvokeOptions;
@@ -576,13 +577,13 @@ function equals$1(existing, incoming) {
576
577
  }
577
578
  const existing_lastModifiedBy = existing.lastModifiedBy;
578
579
  const incoming_lastModifiedBy = incoming.lastModifiedBy;
579
- if (!(equals$2(existing_lastModifiedBy, incoming_lastModifiedBy))) {
580
+ if (!(equals$5(existing_lastModifiedBy, incoming_lastModifiedBy))) {
580
581
  return false;
581
582
  }
582
583
  const existing_parameters = existing.parameters;
583
584
  const incoming_parameters = incoming.parameters;
584
585
  const equals_parameters_props = equalsObject(existing_parameters, incoming_parameters, (existing_parameters_prop, incoming_parameters_prop) => {
585
- if (!(existing_parameters_prop === incoming_parameters_prop)) {
586
+ if (JSONStringify(incoming_parameters_prop) !== JSONStringify(existing_parameters_prop)) {
586
587
  return false;
587
588
  }
588
589
  });
@@ -591,41 +592,41 @@ function equals$1(existing, incoming) {
591
592
  }
592
593
  return true;
593
594
  }
594
- const ingest$1 = function CustomCodeDeploymentRepresentationIngest(input, path, luvio, store, timestamp) {
595
+ const ingest$4 = function CustomCodeDeploymentRepresentationIngest(input, path, luvio, store, timestamp) {
595
596
  if (process.env.NODE_ENV !== 'production') {
596
- const validateError = validate$1(input);
597
+ const validateError = validate$4(input);
597
598
  if (validateError !== null) {
598
599
  throw validateError;
599
600
  }
600
601
  }
601
602
  const key = keyBuilderFromType(luvio, input);
602
603
  const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
603
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "byoc", VERSION$1, RepresentationType$1, equals$1);
604
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "byoc", VERSION$4, RepresentationType$4, equals$4);
604
605
  return createLink(key);
605
606
  };
606
- function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
607
+ function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
607
608
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
608
609
  const rootKey = keyBuilderFromType(luvio, input);
609
610
  rootKeySet.set(rootKey, {
610
611
  namespace: keyPrefix,
611
- representationName: RepresentationType$1,
612
+ representationName: RepresentationType$4,
612
613
  mergeable: false
613
614
  });
614
615
  }
615
616
 
616
- function select$4(luvio, params) {
617
- return select$5();
617
+ function select$a(luvio, params) {
618
+ return select$b();
618
619
  }
619
- function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
620
- getTypeCacheKeys$1(storeKeyMap, luvio, response);
620
+ function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
621
+ getTypeCacheKeys$4(storeKeyMap, luvio, response);
621
622
  }
622
- function ingestSuccess$3(luvio, resourceParams, response) {
623
+ function ingestSuccess$6(luvio, resourceParams, response) {
623
624
  const { body } = response;
624
625
  const key = keyBuilderFromType(luvio, body);
625
- luvio.storeIngest(key, ingest$1, body);
626
+ luvio.storeIngest(key, ingest$4, body);
626
627
  const snapshot = luvio.storeLookup({
627
628
  recordId: key,
628
- node: select$4(),
629
+ node: select$a(),
629
630
  variables: {},
630
631
  });
631
632
  if (process.env.NODE_ENV !== 'production') {
@@ -636,10 +637,10 @@ function ingestSuccess$3(luvio, resourceParams, response) {
636
637
  deepFreeze(snapshot.data);
637
638
  return snapshot;
638
639
  }
639
- function createResourceRequest$4(config) {
640
+ function createResourceRequest$7(config) {
640
641
  const headers = {};
641
642
  return {
642
- baseUri: '/services/data/v63.0',
643
+ baseUri: '/services/data/v64.0',
643
644
  basePath: '/ssot/data-custom-code',
644
645
  method: 'post',
645
646
  body: config.body,
@@ -650,9 +651,10 @@ function createResourceRequest$4(config) {
650
651
  };
651
652
  }
652
653
 
653
- const adapterName$4 = 'createCustomCodeDeployment';
654
+ const adapterName$7 = 'createCustomCodeDeployment';
654
655
  const createCustomCodeDeployment_ConfigPropertyMetadata = [
655
656
  generateParamConfigMetadata('codeType', false, 2 /* Body */, 0 /* String */),
657
+ generateParamConfigMetadata('functionInvokeOptions', false, 2 /* Body */, 0 /* String */, true),
656
658
  generateParamConfigMetadata('computeType', true, 2 /* Body */, 0 /* String */),
657
659
  generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
658
660
  generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
@@ -662,11 +664,11 @@ const createCustomCodeDeployment_ConfigPropertyMetadata = [
662
664
  generateParamConfigMetadata('parameters', false, 2 /* Body */, 4 /* Unsupported */),
663
665
  generateParamConfigMetadata('version', true, 2 /* Body */, 0 /* String */),
664
666
  ];
665
- const createCustomCodeDeployment_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, createCustomCodeDeployment_ConfigPropertyMetadata);
666
- const createResourceParams$4 = /*#__PURE__*/ createResourceParams$5(createCustomCodeDeployment_ConfigPropertyMetadata);
667
- function typeCheckConfig$4(untrustedConfig) {
667
+ const createCustomCodeDeployment_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, createCustomCodeDeployment_ConfigPropertyMetadata);
668
+ const createResourceParams$7 = /*#__PURE__*/ createResourceParams$8(createCustomCodeDeployment_ConfigPropertyMetadata);
669
+ function typeCheckConfig$7(untrustedConfig) {
668
670
  const config = {};
669
- typeCheckConfig$5(untrustedConfig, config, createCustomCodeDeployment_ConfigPropertyMetadata);
671
+ typeCheckConfig$8(untrustedConfig, config, createCustomCodeDeployment_ConfigPropertyMetadata);
670
672
  const untrustedConfig_parameters = untrustedConfig.parameters;
671
673
  if (untrustedIsObject(untrustedConfig_parameters)) {
672
674
  const untrustedConfig_parameters_object = {};
@@ -686,30 +688,30 @@ function typeCheckConfig$4(untrustedConfig) {
686
688
  }
687
689
  return config;
688
690
  }
689
- function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
691
+ function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
690
692
  if (!untrustedIsObject(untrustedConfig)) {
691
693
  return null;
692
694
  }
693
695
  if (process.env.NODE_ENV !== 'production') {
694
696
  validateConfig(untrustedConfig, configPropertyNames);
695
697
  }
696
- const config = typeCheckConfig$4(untrustedConfig);
698
+ const config = typeCheckConfig$7(untrustedConfig);
697
699
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
698
700
  return null;
699
701
  }
700
702
  return config;
701
703
  }
702
- function buildNetworkSnapshot$4(luvio, config, options) {
703
- const resourceParams = createResourceParams$4(config);
704
- const request = createResourceRequest$4(resourceParams);
704
+ function buildNetworkSnapshot$7(luvio, config, options) {
705
+ const resourceParams = createResourceParams$7(config);
706
+ const request = createResourceRequest$7(resourceParams);
705
707
  return luvio.dispatchResourceRequest(request, options)
706
708
  .then((response) => {
707
709
  return luvio.handleSuccessResponse(() => {
708
- const snapshot = ingestSuccess$3(luvio, resourceParams, response);
710
+ const snapshot = ingestSuccess$6(luvio, resourceParams, response);
709
711
  return luvio.storeBroadcast().then(() => snapshot);
710
712
  }, () => {
711
713
  const cache = new StoreKeyMap();
712
- getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
714
+ getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
713
715
  return cache;
714
716
  });
715
717
  }, (response) => {
@@ -719,36 +721,36 @@ function buildNetworkSnapshot$4(luvio, config, options) {
719
721
  }
720
722
  const createCustomCodeDeploymentAdapterFactory = (luvio) => {
721
723
  return function createCustomCodeDeployment(untrustedConfig) {
722
- const config = validateAdapterConfig$4(untrustedConfig, createCustomCodeDeployment_ConfigPropertyNames);
724
+ const config = validateAdapterConfig$7(untrustedConfig, createCustomCodeDeployment_ConfigPropertyNames);
723
725
  // Invalid or incomplete config
724
726
  if (config === null) {
725
727
  throw new Error('Invalid config for "createCustomCodeDeployment"');
726
728
  }
727
- return buildNetworkSnapshot$4(luvio, config);
729
+ return buildNetworkSnapshot$7(luvio, config);
728
730
  };
729
731
  };
730
732
 
731
- function keyBuilder$4(luvio, params) {
732
- return keyBuilder$5(luvio, {
733
+ function keyBuilder$a(luvio, params) {
734
+ return keyBuilder$b(luvio, {
733
735
  id: params.urlParams.customCodeNameOrId
734
736
  });
735
737
  }
736
- function getResponseCacheKeys$3(cacheKeyMap, luvio, resourceParams) {
737
- const key = keyBuilder$4(luvio, resourceParams);
738
+ function getResponseCacheKeys$6(cacheKeyMap, luvio, resourceParams) {
739
+ const key = keyBuilder$a(luvio, resourceParams);
738
740
  cacheKeyMap.set(key, {
739
741
  namespace: keyPrefix,
740
- representationName: RepresentationType$1,
742
+ representationName: RepresentationType$4,
741
743
  mergeable: false
742
744
  });
743
745
  }
744
746
  function evictSuccess(luvio, resourceParams) {
745
- const key = keyBuilder$4(luvio, resourceParams);
747
+ const key = keyBuilder$a(luvio, resourceParams);
746
748
  luvio.storeEvict(key);
747
749
  }
748
- function createResourceRequest$3(config) {
750
+ function createResourceRequest$6(config) {
749
751
  const headers = {};
750
752
  return {
751
- baseUri: '/services/data/v63.0',
753
+ baseUri: '/services/data/v64.0',
752
754
  basePath: '/ssot/data-custom-code/' + config.urlParams.customCodeNameOrId + '',
753
755
  method: 'delete',
754
756
  body: null,
@@ -759,33 +761,33 @@ function createResourceRequest$3(config) {
759
761
  };
760
762
  }
761
763
 
762
- const adapterName$3 = 'deleteCustomCodeDeployment';
764
+ const adapterName$6 = 'deleteCustomCodeDeployment';
763
765
  const deleteCustomCodeDeployment_ConfigPropertyMetadata = [
764
766
  generateParamConfigMetadata('customCodeNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
765
767
  ];
766
- const deleteCustomCodeDeployment_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, deleteCustomCodeDeployment_ConfigPropertyMetadata);
767
- const createResourceParams$3 = /*#__PURE__*/ createResourceParams$5(deleteCustomCodeDeployment_ConfigPropertyMetadata);
768
- function typeCheckConfig$3(untrustedConfig) {
768
+ const deleteCustomCodeDeployment_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, deleteCustomCodeDeployment_ConfigPropertyMetadata);
769
+ const createResourceParams$6 = /*#__PURE__*/ createResourceParams$8(deleteCustomCodeDeployment_ConfigPropertyMetadata);
770
+ function typeCheckConfig$6(untrustedConfig) {
769
771
  const config = {};
770
- typeCheckConfig$5(untrustedConfig, config, deleteCustomCodeDeployment_ConfigPropertyMetadata);
772
+ typeCheckConfig$8(untrustedConfig, config, deleteCustomCodeDeployment_ConfigPropertyMetadata);
771
773
  return config;
772
774
  }
773
- function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
775
+ function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
774
776
  if (!untrustedIsObject(untrustedConfig)) {
775
777
  return null;
776
778
  }
777
779
  if (process.env.NODE_ENV !== 'production') {
778
780
  validateConfig(untrustedConfig, configPropertyNames);
779
781
  }
780
- const config = typeCheckConfig$3(untrustedConfig);
782
+ const config = typeCheckConfig$6(untrustedConfig);
781
783
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
782
784
  return null;
783
785
  }
784
786
  return config;
785
787
  }
786
- function buildNetworkSnapshot$3(luvio, config, options) {
787
- const resourceParams = createResourceParams$3(config);
788
- const request = createResourceRequest$3(resourceParams);
788
+ function buildNetworkSnapshot$6(luvio, config, options) {
789
+ const resourceParams = createResourceParams$6(config);
790
+ const request = createResourceRequest$6(resourceParams);
789
791
  return luvio.dispatchResourceRequest(request, options)
790
792
  .then(() => {
791
793
  return luvio.handleSuccessResponse(() => {
@@ -793,7 +795,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
793
795
  return luvio.storeBroadcast();
794
796
  }, () => {
795
797
  const cache = new StoreKeyMap();
796
- getResponseCacheKeys$3(cache, luvio, resourceParams);
798
+ getResponseCacheKeys$6(cache, luvio, resourceParams);
797
799
  return cache;
798
800
  });
799
801
  }, (response) => {
@@ -803,33 +805,33 @@ function buildNetworkSnapshot$3(luvio, config, options) {
803
805
  }
804
806
  const deleteCustomCodeDeploymentAdapterFactory = (luvio) => {
805
807
  return function byocdeleteCustomCodeDeployment(untrustedConfig) {
806
- const config = validateAdapterConfig$3(untrustedConfig, deleteCustomCodeDeployment_ConfigPropertyNames);
808
+ const config = validateAdapterConfig$6(untrustedConfig, deleteCustomCodeDeployment_ConfigPropertyNames);
807
809
  // Invalid or incomplete config
808
810
  if (config === null) {
809
- throw new Error(`Invalid config for "${adapterName$3}"`);
811
+ throw new Error(`Invalid config for "${adapterName$6}"`);
810
812
  }
811
- return buildNetworkSnapshot$3(luvio, config);
813
+ return buildNetworkSnapshot$6(luvio, config);
812
814
  };
813
815
  };
814
816
 
815
- function select$3(luvio, params) {
816
- return select$5();
817
+ function select$9(luvio, params) {
818
+ return select$b();
817
819
  }
818
- function keyBuilder$3(luvio, params) {
819
- return keyBuilder$5(luvio, {
820
+ function keyBuilder$9(luvio, params) {
821
+ return keyBuilder$b(luvio, {
820
822
  id: params.urlParams.customCodeNameOrId
821
823
  });
822
824
  }
823
- function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
824
- getTypeCacheKeys$1(storeKeyMap, luvio, response);
825
+ function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
826
+ getTypeCacheKeys$4(storeKeyMap, luvio, response);
825
827
  }
826
- function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
828
+ function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
827
829
  const { body } = response;
828
- const key = keyBuilder$3(luvio, resourceParams);
829
- luvio.storeIngest(key, ingest$1, body);
830
+ const key = keyBuilder$9(luvio, resourceParams);
831
+ luvio.storeIngest(key, ingest$4, body);
830
832
  const snapshot = luvio.storeLookup({
831
833
  recordId: key,
832
- node: select$3(),
834
+ node: select$9(),
833
835
  variables: {},
834
836
  }, snapshotRefresh);
835
837
  if (process.env.NODE_ENV !== 'production') {
@@ -840,16 +842,16 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
840
842
  deepFreeze(snapshot.data);
841
843
  return snapshot;
842
844
  }
843
- function ingestError$1(luvio, params, error, snapshotRefresh) {
844
- const key = keyBuilder$3(luvio, params);
845
+ function ingestError$4(luvio, params, error, snapshotRefresh) {
846
+ const key = keyBuilder$9(luvio, params);
845
847
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
846
848
  luvio.storeIngestError(key, errorSnapshot);
847
849
  return errorSnapshot;
848
850
  }
849
- function createResourceRequest$2(config) {
851
+ function createResourceRequest$5(config) {
850
852
  const headers = {};
851
853
  return {
852
- baseUri: '/services/data/v63.0',
854
+ baseUri: '/services/data/v64.0',
853
855
  basePath: '/ssot/data-custom-code/' + config.urlParams.customCodeNameOrId + '',
854
856
  method: 'get',
855
857
  body: null,
@@ -864,97 +866,97 @@ function createResourceRequestFromRepresentation(representation) {
864
866
  urlParams: {},
865
867
  };
866
868
  config.urlParams.customCodeNameOrId = representation.id;
867
- return createResourceRequest$2(config);
869
+ return createResourceRequest$5(config);
868
870
  }
869
871
 
870
- const adapterName$2 = 'getCustomCodeDeployment';
872
+ const adapterName$5 = 'getCustomCodeDeployment';
871
873
  const getCustomCodeDeployment_ConfigPropertyMetadata = [
872
874
  generateParamConfigMetadata('customCodeNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
873
875
  ];
874
- const getCustomCodeDeployment_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getCustomCodeDeployment_ConfigPropertyMetadata);
875
- const createResourceParams$2 = /*#__PURE__*/ createResourceParams$5(getCustomCodeDeployment_ConfigPropertyMetadata);
876
- function keyBuilder$2(luvio, config) {
877
- const resourceParams = createResourceParams$2(config);
878
- return keyBuilder$3(luvio, resourceParams);
876
+ const getCustomCodeDeployment_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getCustomCodeDeployment_ConfigPropertyMetadata);
877
+ const createResourceParams$5 = /*#__PURE__*/ createResourceParams$8(getCustomCodeDeployment_ConfigPropertyMetadata);
878
+ function keyBuilder$8(luvio, config) {
879
+ const resourceParams = createResourceParams$5(config);
880
+ return keyBuilder$9(luvio, resourceParams);
879
881
  }
880
- function typeCheckConfig$2(untrustedConfig) {
882
+ function typeCheckConfig$5(untrustedConfig) {
881
883
  const config = {};
882
- typeCheckConfig$5(untrustedConfig, config, getCustomCodeDeployment_ConfigPropertyMetadata);
884
+ typeCheckConfig$8(untrustedConfig, config, getCustomCodeDeployment_ConfigPropertyMetadata);
883
885
  return config;
884
886
  }
885
- function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
887
+ function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
886
888
  if (!untrustedIsObject(untrustedConfig)) {
887
889
  return null;
888
890
  }
889
891
  if (process.env.NODE_ENV !== 'production') {
890
892
  validateConfig(untrustedConfig, configPropertyNames);
891
893
  }
892
- const config = typeCheckConfig$2(untrustedConfig);
894
+ const config = typeCheckConfig$5(untrustedConfig);
893
895
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
894
896
  return null;
895
897
  }
896
898
  return config;
897
899
  }
898
- function adapterFragment$1(luvio, config) {
899
- createResourceParams$2(config);
900
- return select$3();
900
+ function adapterFragment$4(luvio, config) {
901
+ createResourceParams$5(config);
902
+ return select$9();
901
903
  }
902
- function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
903
- const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
904
+ function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
905
+ const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
904
906
  config,
905
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
907
+ resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
906
908
  });
907
909
  return luvio.storeBroadcast().then(() => snapshot);
908
910
  }
909
- function onFetchResponseError$1(luvio, config, resourceParams, response) {
910
- const snapshot = ingestError$1(luvio, resourceParams, response, {
911
+ function onFetchResponseError$4(luvio, config, resourceParams, response) {
912
+ const snapshot = ingestError$4(luvio, resourceParams, response, {
911
913
  config,
912
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
914
+ resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
913
915
  });
914
916
  return luvio.storeBroadcast().then(() => snapshot);
915
917
  }
916
- function buildNetworkSnapshot$2(luvio, config, options) {
917
- const resourceParams = createResourceParams$2(config);
918
- const request = createResourceRequest$2(resourceParams);
918
+ function buildNetworkSnapshot$5(luvio, config, options) {
919
+ const resourceParams = createResourceParams$5(config);
920
+ const request = createResourceRequest$5(resourceParams);
919
921
  return luvio.dispatchResourceRequest(request, options)
920
922
  .then((response) => {
921
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
923
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
922
924
  const cache = new StoreKeyMap();
923
- getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
925
+ getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
924
926
  return cache;
925
927
  });
926
928
  }, (response) => {
927
- return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
929
+ return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
928
930
  });
929
931
  }
930
- function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
931
- return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
932
+ function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
933
+ return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
932
934
  }
933
- function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
935
+ function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
934
936
  const { luvio, config } = context;
935
937
  const selector = {
936
- recordId: keyBuilder$2(luvio, config),
937
- node: adapterFragment$1(luvio, config),
938
+ recordId: keyBuilder$8(luvio, config),
939
+ node: adapterFragment$4(luvio, config),
938
940
  variables: {},
939
941
  };
940
942
  const cacheSnapshot = storeLookup(selector, {
941
943
  config,
942
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
944
+ resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
943
945
  });
944
946
  return cacheSnapshot;
945
947
  }
946
948
  const getCustomCodeDeploymentAdapterFactory = (luvio) => function byoc__getCustomCodeDeployment(untrustedConfig, requestContext) {
947
- const config = validateAdapterConfig$2(untrustedConfig, getCustomCodeDeployment_ConfigPropertyNames);
949
+ const config = validateAdapterConfig$5(untrustedConfig, getCustomCodeDeployment_ConfigPropertyNames);
948
950
  // Invalid or incomplete config
949
951
  if (config === null) {
950
952
  return null;
951
953
  }
952
954
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
953
- buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
955
+ buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
954
956
  };
955
957
  const notifyChangeFactory = (luvio, options) => {
956
958
  return function getSsotDataCustomCodeByCustomCodeNameOrIdNotifyChange(configs) {
957
- const keys = configs.map(c => keyBuilder$5(luvio, c));
959
+ const keys = configs.map(c => keyBuilder$b(luvio, c));
958
960
  luvio.getNotifyChangeStoreEntries(keys).then(entries => {
959
961
  for (let i = 0, len = entries.length; i < len; i++) {
960
962
  const { key, record: val } = entries[i];
@@ -963,11 +965,11 @@ const notifyChangeFactory = (luvio, options) => {
963
965
  .then((response) => {
964
966
  return luvio.handleSuccessResponse(() => {
965
967
  const { body } = response;
966
- luvio.storeIngest(key, ingest$1, body);
968
+ luvio.storeIngest(key, ingest$4, body);
967
969
  return luvio.storeBroadcast();
968
970
  }, () => {
969
971
  const cache = new StoreKeyMap();
970
- getTypeCacheKeys$1(cache, luvio, response.body);
972
+ getTypeCacheKeys$4(cache, luvio, response.body);
971
973
  return cache;
972
974
  });
973
975
  }, (error) => {
@@ -982,8 +984,8 @@ const notifyChangeFactory = (luvio, options) => {
982
984
  };
983
985
  };
984
986
 
985
- const VERSION = "3d9a814ca87df7e7c79c5d385c146820";
986
- function validate(obj, path = 'CustomCodeDeploymentCollectionRepresentation') {
987
+ const VERSION$3 = "3d9a814ca87df7e7c79c5d385c146820";
988
+ function validate$3(obj, path = 'CustomCodeDeploymentCollectionRepresentation') {
987
989
  const v_error = (() => {
988
990
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
989
991
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1020,14 +1022,14 @@ function validate(obj, path = 'CustomCodeDeploymentCollectionRepresentation') {
1020
1022
  })();
1021
1023
  return v_error === undefined ? null : v_error;
1022
1024
  }
1023
- const RepresentationType = 'CustomCodeDeploymentCollectionRepresentation';
1024
- function normalize(input, existing, path, luvio, store, timestamp) {
1025
+ const RepresentationType$3 = 'CustomCodeDeploymentCollectionRepresentation';
1026
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
1025
1027
  const input_customCodeDeployments = input.customCodeDeployments;
1026
1028
  const input_customCodeDeployments_id = path.fullPath + '__customCodeDeployments';
1027
1029
  for (let i = 0; i < input_customCodeDeployments.length; i++) {
1028
1030
  const input_customCodeDeployments_item = input_customCodeDeployments[i];
1029
1031
  let input_customCodeDeployments_item_id = input_customCodeDeployments_id + '__' + i;
1030
- input_customCodeDeployments[i] = ingest$1(input_customCodeDeployments_item, {
1032
+ input_customCodeDeployments[i] = ingest$4(input_customCodeDeployments_item, {
1031
1033
  fullPath: input_customCodeDeployments_item_id,
1032
1034
  propertyName: i,
1033
1035
  parent: {
@@ -1040,10 +1042,10 @@ function normalize(input, existing, path, luvio, store, timestamp) {
1040
1042
  }
1041
1043
  return input;
1042
1044
  }
1043
- const select$2 = function CustomCodeDeploymentCollectionRepresentationSelect() {
1045
+ const select$8 = function CustomCodeDeploymentCollectionRepresentationSelect() {
1044
1046
  return {
1045
1047
  kind: 'Fragment',
1046
- version: VERSION,
1048
+ version: VERSION$3,
1047
1049
  private: [],
1048
1050
  selections: [
1049
1051
  {
@@ -1054,7 +1056,7 @@ const select$2 = function CustomCodeDeploymentCollectionRepresentationSelect() {
1054
1056
  name: 'customCodeDeployments',
1055
1057
  kind: 'Link',
1056
1058
  plural: true,
1057
- fragment: select$5()
1059
+ fragment: select$b()
1058
1060
  },
1059
1061
  {
1060
1062
  name: 'nextPageUrl',
@@ -1068,7 +1070,7 @@ const select$2 = function CustomCodeDeploymentCollectionRepresentationSelect() {
1068
1070
  ]
1069
1071
  };
1070
1072
  };
1071
- function equals(existing, incoming) {
1073
+ function equals$3(existing, incoming) {
1072
1074
  const existing_totalSize = existing.totalSize;
1073
1075
  const incoming_totalSize = incoming.totalSize;
1074
1076
  if (!(existing_totalSize === incoming_totalSize)) {
@@ -1104,48 +1106,48 @@ function equals(existing, incoming) {
1104
1106
  }
1105
1107
  return true;
1106
1108
  }
1107
- const ingest = function CustomCodeDeploymentCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
1109
+ const ingest$3 = function CustomCodeDeploymentCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
1108
1110
  if (process.env.NODE_ENV !== 'production') {
1109
- const validateError = validate(input);
1111
+ const validateError = validate$3(input);
1110
1112
  if (validateError !== null) {
1111
1113
  throw validateError;
1112
1114
  }
1113
1115
  }
1114
1116
  const key = path.fullPath;
1115
1117
  const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
1116
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "byoc", VERSION, RepresentationType, equals);
1118
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "byoc", VERSION$3, RepresentationType$3, equals$3);
1117
1119
  return createLink(key);
1118
1120
  };
1119
- function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
1121
+ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
1120
1122
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1121
1123
  const rootKey = fullPathFactory();
1122
1124
  rootKeySet.set(rootKey, {
1123
1125
  namespace: keyPrefix,
1124
- representationName: RepresentationType,
1126
+ representationName: RepresentationType$3,
1125
1127
  mergeable: false
1126
1128
  });
1127
1129
  const input_customCodeDeployments_length = input.customCodeDeployments.length;
1128
1130
  for (let i = 0; i < input_customCodeDeployments_length; i++) {
1129
- getTypeCacheKeys$1(rootKeySet, luvio, input.customCodeDeployments[i]);
1131
+ getTypeCacheKeys$4(rootKeySet, luvio, input.customCodeDeployments[i]);
1130
1132
  }
1131
1133
  }
1132
1134
 
1133
- function select$1(luvio, params) {
1134
- return select$2();
1135
+ function select$7(luvio, params) {
1136
+ return select$8();
1135
1137
  }
1136
- function keyBuilder$1(luvio, params) {
1137
- return keyPrefix + '::CustomCodeDeploymentCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'orderBy:' + params.queryParams.orderBy + ')';
1138
+ function keyBuilder$7(luvio, params) {
1139
+ return keyPrefix + '::CustomCodeDeploymentCollectionRepresentation:(' + 'codeType:' + params.queryParams.codeType + ',' + 'deploymentStatus:' + params.queryParams.deploymentStatus + ',' + 'label:' + params.queryParams.label + ',' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'orderBy:' + params.queryParams.orderBy + ')';
1138
1140
  }
1139
- function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
1140
- getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
1141
+ function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
1142
+ getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$7(luvio, resourceParams));
1141
1143
  }
1142
- function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
1144
+ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
1143
1145
  const { body } = response;
1144
- const key = keyBuilder$1(luvio, resourceParams);
1145
- luvio.storeIngest(key, ingest, body);
1146
+ const key = keyBuilder$7(luvio, resourceParams);
1147
+ luvio.storeIngest(key, ingest$3, body);
1146
1148
  const snapshot = luvio.storeLookup({
1147
1149
  recordId: key,
1148
- node: select$1(),
1150
+ node: select$7(),
1149
1151
  variables: {},
1150
1152
  }, snapshotRefresh);
1151
1153
  if (process.env.NODE_ENV !== 'production') {
@@ -1156,16 +1158,16 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
1156
1158
  deepFreeze(snapshot.data);
1157
1159
  return snapshot;
1158
1160
  }
1159
- function ingestError(luvio, params, error, snapshotRefresh) {
1160
- const key = keyBuilder$1(luvio, params);
1161
+ function ingestError$3(luvio, params, error, snapshotRefresh) {
1162
+ const key = keyBuilder$7(luvio, params);
1161
1163
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1162
1164
  luvio.storeIngestError(key, errorSnapshot);
1163
1165
  return errorSnapshot;
1164
1166
  }
1165
- function createResourceRequest$1(config) {
1167
+ function createResourceRequest$4(config) {
1166
1168
  const headers = {};
1167
1169
  return {
1168
- baseUri: '/services/data/v63.0',
1170
+ baseUri: '/services/data/v64.0',
1169
1171
  basePath: '/ssot/data-custom-code',
1170
1172
  method: 'get',
1171
1173
  body: null,
@@ -1176,160 +1178,988 @@ function createResourceRequest$1(config) {
1176
1178
  };
1177
1179
  }
1178
1180
 
1179
- const adapterName$1 = 'getCustomCodeDeployments';
1181
+ const adapterName$4 = 'getCustomCodeDeployments';
1180
1182
  const getCustomCodeDeployments_ConfigPropertyMetadata = [
1183
+ generateParamConfigMetadata('codeType', false, 1 /* QueryParameter */, 0 /* String */),
1184
+ generateParamConfigMetadata('deploymentStatus', false, 1 /* QueryParameter */, 0 /* String */),
1185
+ generateParamConfigMetadata('label', false, 1 /* QueryParameter */, 0 /* String */),
1181
1186
  generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
1182
1187
  generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
1183
1188
  generateParamConfigMetadata('orderBy', false, 1 /* QueryParameter */, 0 /* String */),
1184
1189
  ];
1185
- const getCustomCodeDeployments_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getCustomCodeDeployments_ConfigPropertyMetadata);
1186
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$5(getCustomCodeDeployments_ConfigPropertyMetadata);
1187
- function keyBuilder(luvio, config) {
1188
- const resourceParams = createResourceParams$1(config);
1189
- return keyBuilder$1(luvio, resourceParams);
1190
+ const getCustomCodeDeployments_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getCustomCodeDeployments_ConfigPropertyMetadata);
1191
+ const createResourceParams$4 = /*#__PURE__*/ createResourceParams$8(getCustomCodeDeployments_ConfigPropertyMetadata);
1192
+ function keyBuilder$6(luvio, config) {
1193
+ const resourceParams = createResourceParams$4(config);
1194
+ return keyBuilder$7(luvio, resourceParams);
1190
1195
  }
1191
- function typeCheckConfig$1(untrustedConfig) {
1196
+ function typeCheckConfig$4(untrustedConfig) {
1192
1197
  const config = {};
1193
- typeCheckConfig$5(untrustedConfig, config, getCustomCodeDeployments_ConfigPropertyMetadata);
1198
+ typeCheckConfig$8(untrustedConfig, config, getCustomCodeDeployments_ConfigPropertyMetadata);
1194
1199
  return config;
1195
1200
  }
1196
- function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1201
+ function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
1197
1202
  if (!untrustedIsObject(untrustedConfig)) {
1198
1203
  return null;
1199
1204
  }
1200
1205
  if (process.env.NODE_ENV !== 'production') {
1201
1206
  validateConfig(untrustedConfig, configPropertyNames);
1202
1207
  }
1203
- const config = typeCheckConfig$1(untrustedConfig);
1208
+ const config = typeCheckConfig$4(untrustedConfig);
1204
1209
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1205
1210
  return null;
1206
1211
  }
1207
1212
  return config;
1208
1213
  }
1209
- function adapterFragment(luvio, config) {
1210
- createResourceParams$1(config);
1211
- return select$1();
1214
+ function adapterFragment$3(luvio, config) {
1215
+ createResourceParams$4(config);
1216
+ return select$7();
1212
1217
  }
1213
- function onFetchResponseSuccess(luvio, config, resourceParams, response) {
1214
- const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
1218
+ function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
1219
+ const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
1215
1220
  config,
1216
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1221
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
1217
1222
  });
1218
1223
  return luvio.storeBroadcast().then(() => snapshot);
1219
1224
  }
1220
- function onFetchResponseError(luvio, config, resourceParams, response) {
1221
- const snapshot = ingestError(luvio, resourceParams, response, {
1225
+ function onFetchResponseError$3(luvio, config, resourceParams, response) {
1226
+ const snapshot = ingestError$3(luvio, resourceParams, response, {
1222
1227
  config,
1223
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1228
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
1224
1229
  });
1225
1230
  return luvio.storeBroadcast().then(() => snapshot);
1226
1231
  }
1227
- function buildNetworkSnapshot$1(luvio, config, options) {
1228
- const resourceParams = createResourceParams$1(config);
1229
- const request = createResourceRequest$1(resourceParams);
1232
+ function buildNetworkSnapshot$4(luvio, config, options) {
1233
+ const resourceParams = createResourceParams$4(config);
1234
+ const request = createResourceRequest$4(resourceParams);
1230
1235
  return luvio.dispatchResourceRequest(request, options)
1231
1236
  .then((response) => {
1232
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
1237
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
1233
1238
  const cache = new StoreKeyMap();
1234
- getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
1239
+ getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
1235
1240
  return cache;
1236
1241
  });
1237
1242
  }, (response) => {
1238
- return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
1243
+ return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
1239
1244
  });
1240
1245
  }
1241
- function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
1242
- return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
1246
+ function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
1247
+ return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
1243
1248
  }
1244
- function buildCachedSnapshotCachePolicy(context, storeLookup) {
1249
+ function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
1245
1250
  const { luvio, config } = context;
1246
1251
  const selector = {
1247
- recordId: keyBuilder(luvio, config),
1248
- node: adapterFragment(luvio, config),
1252
+ recordId: keyBuilder$6(luvio, config),
1253
+ node: adapterFragment$3(luvio, config),
1249
1254
  variables: {},
1250
1255
  };
1251
1256
  const cacheSnapshot = storeLookup(selector, {
1252
1257
  config,
1253
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1258
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
1254
1259
  });
1255
1260
  return cacheSnapshot;
1256
1261
  }
1257
1262
  const getCustomCodeDeploymentsAdapterFactory = (luvio) => function byoc__getCustomCodeDeployments(untrustedConfig, requestContext) {
1258
- const config = validateAdapterConfig$1(untrustedConfig, getCustomCodeDeployments_ConfigPropertyNames);
1263
+ const config = validateAdapterConfig$4(untrustedConfig, getCustomCodeDeployments_ConfigPropertyNames);
1259
1264
  // Invalid or incomplete config
1260
1265
  if (config === null) {
1261
1266
  return null;
1262
1267
  }
1263
1268
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1264
- buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
1269
+ buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
1265
1270
  };
1266
1271
 
1267
- function select(luvio, params) {
1268
- return select$5();
1269
- }
1270
- function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
1271
- getTypeCacheKeys$1(storeKeyMap, luvio, response);
1272
- }
1273
- function ingestSuccess(luvio, resourceParams, response) {
1274
- const { body } = response;
1275
- const key = keyBuilderFromType(luvio, body);
1276
- luvio.storeIngest(key, ingest$1, body);
1277
- const snapshot = luvio.storeLookup({
1278
- recordId: key,
1279
- node: select(),
1280
- variables: {},
1281
- });
1282
- if (process.env.NODE_ENV !== 'production') {
1283
- if (snapshot.state !== 'Fulfilled') {
1284
- throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1272
+ const VERSION$2 = "16ba4e83f3e94d331bcbdba6f3d301b9";
1273
+ function validate$2(obj, path = 'CustomCodeExecutionBaseRepresentation') {
1274
+ const v_error = (() => {
1275
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1276
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1285
1277
  }
1286
- }
1287
- deepFreeze(snapshot.data);
1288
- return snapshot;
1278
+ const obj_durationInSeconds = obj.durationInSeconds;
1279
+ const path_durationInSeconds = path + '.durationInSeconds';
1280
+ if (typeof obj_durationInSeconds !== 'number' || (typeof obj_durationInSeconds === 'number' && Math.floor(obj_durationInSeconds) !== obj_durationInSeconds)) {
1281
+ return new TypeError('Expected "integer" but received "' + typeof obj_durationInSeconds + '" (at "' + path_durationInSeconds + '")');
1282
+ }
1283
+ const obj_endTime = obj.endTime;
1284
+ const path_endTime = path + '.endTime';
1285
+ if (typeof obj_endTime !== 'string') {
1286
+ return new TypeError('Expected "string" but received "' + typeof obj_endTime + '" (at "' + path_endTime + '")');
1287
+ }
1288
+ if (obj.errorCode !== undefined) {
1289
+ const obj_errorCode = obj.errorCode;
1290
+ const path_errorCode = path + '.errorCode';
1291
+ if (typeof obj_errorCode !== 'number' || (typeof obj_errorCode === 'number' && Math.floor(obj_errorCode) !== obj_errorCode)) {
1292
+ return new TypeError('Expected "integer" but received "' + typeof obj_errorCode + '" (at "' + path_errorCode + '")');
1293
+ }
1294
+ }
1295
+ if (obj.errorMessage !== undefined) {
1296
+ const obj_errorMessage = obj.errorMessage;
1297
+ const path_errorMessage = path + '.errorMessage';
1298
+ if (typeof obj_errorMessage !== 'string') {
1299
+ return new TypeError('Expected "string" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
1300
+ }
1301
+ }
1302
+ const obj_id = obj.id;
1303
+ const path_id = path + '.id';
1304
+ if (typeof obj_id !== 'string') {
1305
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
1306
+ }
1307
+ const obj_rowsRead = obj.rowsRead;
1308
+ const path_rowsRead = path + '.rowsRead';
1309
+ if (typeof obj_rowsRead !== 'number' || (typeof obj_rowsRead === 'number' && Math.floor(obj_rowsRead) !== obj_rowsRead)) {
1310
+ return new TypeError('Expected "integer" but received "' + typeof obj_rowsRead + '" (at "' + path_rowsRead + '")');
1311
+ }
1312
+ const obj_rowsWritten = obj.rowsWritten;
1313
+ const path_rowsWritten = path + '.rowsWritten';
1314
+ if (typeof obj_rowsWritten !== 'number' || (typeof obj_rowsWritten === 'number' && Math.floor(obj_rowsWritten) !== obj_rowsWritten)) {
1315
+ return new TypeError('Expected "integer" but received "' + typeof obj_rowsWritten + '" (at "' + path_rowsWritten + '")');
1316
+ }
1317
+ const obj_startTime = obj.startTime;
1318
+ const path_startTime = path + '.startTime';
1319
+ if (typeof obj_startTime !== 'string') {
1320
+ return new TypeError('Expected "string" but received "' + typeof obj_startTime + '" (at "' + path_startTime + '")');
1321
+ }
1322
+ const obj_status = obj.status;
1323
+ const path_status = path + '.status';
1324
+ if (typeof obj_status !== 'string') {
1325
+ return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
1326
+ }
1327
+ const obj_submittedTime = obj.submittedTime;
1328
+ const path_submittedTime = path + '.submittedTime';
1329
+ if (typeof obj_submittedTime !== 'string') {
1330
+ return new TypeError('Expected "string" but received "' + typeof obj_submittedTime + '" (at "' + path_submittedTime + '")');
1331
+ }
1332
+ })();
1333
+ return v_error === undefined ? null : v_error;
1289
1334
  }
1290
- function createResourceRequest(config) {
1291
- const headers = {};
1335
+ const RepresentationType$2 = 'CustomCodeExecutionBaseRepresentation';
1336
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
1337
+ return input;
1338
+ }
1339
+ const select$6 = function CustomCodeExecutionBaseRepresentationSelect() {
1292
1340
  return {
1293
- baseUri: '/services/data/v63.0',
1294
- basePath: '/ssot/data-custom-code/' + config.urlParams.customCodeNameOrId + '',
1295
- method: 'patch',
1296
- body: config.body,
1297
- urlParams: config.urlParams,
1298
- queryParams: {},
1299
- headers,
1300
- priority: 'normal',
1341
+ kind: 'Fragment',
1342
+ version: VERSION$2,
1343
+ private: [],
1344
+ selections: [
1345
+ {
1346
+ name: 'durationInSeconds',
1347
+ kind: 'Scalar'
1348
+ },
1349
+ {
1350
+ name: 'endTime',
1351
+ kind: 'Scalar'
1352
+ },
1353
+ {
1354
+ name: 'errorCode',
1355
+ kind: 'Scalar',
1356
+ required: false
1357
+ },
1358
+ {
1359
+ name: 'errorMessage',
1360
+ kind: 'Scalar',
1361
+ required: false
1362
+ },
1363
+ {
1364
+ name: 'id',
1365
+ kind: 'Scalar'
1366
+ },
1367
+ {
1368
+ name: 'rowsRead',
1369
+ kind: 'Scalar'
1370
+ },
1371
+ {
1372
+ name: 'rowsWritten',
1373
+ kind: 'Scalar'
1374
+ },
1375
+ {
1376
+ name: 'startTime',
1377
+ kind: 'Scalar'
1378
+ },
1379
+ {
1380
+ name: 'status',
1381
+ kind: 'Scalar'
1382
+ },
1383
+ {
1384
+ name: 'submittedTime',
1385
+ kind: 'Scalar'
1386
+ }
1387
+ ]
1301
1388
  };
1302
- }
1303
-
1304
- const adapterName = 'updateCustomCodeDeployment';
1305
- const updateCustomCodeDeployment_ConfigPropertyMetadata = [
1306
- generateParamConfigMetadata('customCodeNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
1307
- generateParamConfigMetadata('computeType', false, 2 /* Body */, 0 /* String */),
1308
- generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
1309
- generateParamConfigMetadata('label', false, 2 /* Body */, 0 /* String */),
1310
- generateParamConfigMetadata('version', false, 2 /* Body */, 0 /* String */),
1311
- ];
1312
- const updateCustomCodeDeployment_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, updateCustomCodeDeployment_ConfigPropertyMetadata);
1313
- const createResourceParams = /*#__PURE__*/ createResourceParams$5(updateCustomCodeDeployment_ConfigPropertyMetadata);
1314
- function typeCheckConfig(untrustedConfig) {
1315
- const config = {};
1316
- typeCheckConfig$5(untrustedConfig, config, updateCustomCodeDeployment_ConfigPropertyMetadata);
1317
- return config;
1318
- }
1319
- function validateAdapterConfig(untrustedConfig, configPropertyNames) {
1320
- if (!untrustedIsObject(untrustedConfig)) {
1321
- return null;
1389
+ };
1390
+ function equals$2(existing, incoming) {
1391
+ const existing_durationInSeconds = existing.durationInSeconds;
1392
+ const incoming_durationInSeconds = incoming.durationInSeconds;
1393
+ if (!(existing_durationInSeconds === incoming_durationInSeconds)) {
1394
+ return false;
1322
1395
  }
1323
- if (process.env.NODE_ENV !== 'production') {
1324
- validateConfig(untrustedConfig, configPropertyNames);
1396
+ const existing_errorCode = existing.errorCode;
1397
+ const incoming_errorCode = incoming.errorCode;
1398
+ // if at least one of these optionals is defined
1399
+ if (existing_errorCode !== undefined || incoming_errorCode !== undefined) {
1400
+ // if one of these is not defined we know the other is defined and therefore
1401
+ // not equal
1402
+ if (existing_errorCode === undefined || incoming_errorCode === undefined) {
1403
+ return false;
1404
+ }
1405
+ if (!(existing_errorCode === incoming_errorCode)) {
1406
+ return false;
1407
+ }
1325
1408
  }
1326
- const config = typeCheckConfig(untrustedConfig);
1327
- if (!areRequiredParametersPresent(config, configPropertyNames)) {
1328
- return null;
1409
+ const existing_rowsRead = existing.rowsRead;
1410
+ const incoming_rowsRead = incoming.rowsRead;
1411
+ if (!(existing_rowsRead === incoming_rowsRead)) {
1412
+ return false;
1329
1413
  }
1330
- return config;
1331
- }
1332
- function buildNetworkSnapshot(luvio, config, options) {
1414
+ const existing_rowsWritten = existing.rowsWritten;
1415
+ const incoming_rowsWritten = incoming.rowsWritten;
1416
+ if (!(existing_rowsWritten === incoming_rowsWritten)) {
1417
+ return false;
1418
+ }
1419
+ const existing_endTime = existing.endTime;
1420
+ const incoming_endTime = incoming.endTime;
1421
+ if (!(existing_endTime === incoming_endTime)) {
1422
+ return false;
1423
+ }
1424
+ const existing_errorMessage = existing.errorMessage;
1425
+ const incoming_errorMessage = incoming.errorMessage;
1426
+ // if at least one of these optionals is defined
1427
+ if (existing_errorMessage !== undefined || incoming_errorMessage !== undefined) {
1428
+ // if one of these is not defined we know the other is defined and therefore
1429
+ // not equal
1430
+ if (existing_errorMessage === undefined || incoming_errorMessage === undefined) {
1431
+ return false;
1432
+ }
1433
+ if (!(existing_errorMessage === incoming_errorMessage)) {
1434
+ return false;
1435
+ }
1436
+ }
1437
+ const existing_id = existing.id;
1438
+ const incoming_id = incoming.id;
1439
+ if (!(existing_id === incoming_id)) {
1440
+ return false;
1441
+ }
1442
+ const existing_startTime = existing.startTime;
1443
+ const incoming_startTime = incoming.startTime;
1444
+ if (!(existing_startTime === incoming_startTime)) {
1445
+ return false;
1446
+ }
1447
+ const existing_status = existing.status;
1448
+ const incoming_status = incoming.status;
1449
+ if (!(existing_status === incoming_status)) {
1450
+ return false;
1451
+ }
1452
+ const existing_submittedTime = existing.submittedTime;
1453
+ const incoming_submittedTime = incoming.submittedTime;
1454
+ if (!(existing_submittedTime === incoming_submittedTime)) {
1455
+ return false;
1456
+ }
1457
+ return true;
1458
+ }
1459
+ const ingest$2 = function CustomCodeExecutionBaseRepresentationIngest(input, path, luvio, store, timestamp) {
1460
+ if (process.env.NODE_ENV !== 'production') {
1461
+ const validateError = validate$2(input);
1462
+ if (validateError !== null) {
1463
+ throw validateError;
1464
+ }
1465
+ }
1466
+ const key = path.fullPath;
1467
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
1468
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "byoc", VERSION$2, RepresentationType$2, equals$2);
1469
+ return createLink(key);
1470
+ };
1471
+ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
1472
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1473
+ const rootKey = fullPathFactory();
1474
+ rootKeySet.set(rootKey, {
1475
+ namespace: keyPrefix,
1476
+ representationName: RepresentationType$2,
1477
+ mergeable: false
1478
+ });
1479
+ }
1480
+
1481
+ function select$5(luvio, params) {
1482
+ return select$6();
1483
+ }
1484
+ function keyBuilder$5(luvio, params) {
1485
+ return keyPrefix + '::CustomCodeExecutionBaseRepresentation:(' + 'customCodeExecutionId:' + params.urlParams.customCodeExecutionId + ',' + 'customCodeNameOrId:' + params.urlParams.customCodeNameOrId + ')';
1486
+ }
1487
+ function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
1488
+ getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$5(luvio, resourceParams));
1489
+ }
1490
+ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
1491
+ const { body } = response;
1492
+ const key = keyBuilder$5(luvio, resourceParams);
1493
+ luvio.storeIngest(key, ingest$2, body);
1494
+ const snapshot = luvio.storeLookup({
1495
+ recordId: key,
1496
+ node: select$5(),
1497
+ variables: {},
1498
+ }, snapshotRefresh);
1499
+ if (process.env.NODE_ENV !== 'production') {
1500
+ if (snapshot.state !== 'Fulfilled') {
1501
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1502
+ }
1503
+ }
1504
+ deepFreeze(snapshot.data);
1505
+ return snapshot;
1506
+ }
1507
+ function ingestError$2(luvio, params, error, snapshotRefresh) {
1508
+ const key = keyBuilder$5(luvio, params);
1509
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1510
+ luvio.storeIngestError(key, errorSnapshot);
1511
+ return errorSnapshot;
1512
+ }
1513
+ function createResourceRequest$3(config) {
1514
+ const headers = {};
1515
+ return {
1516
+ baseUri: '/services/data/v64.0',
1517
+ basePath: '/ssot/data-custom-code/' + config.urlParams.customCodeNameOrId + '/executions/' + config.urlParams.customCodeExecutionId + '',
1518
+ method: 'get',
1519
+ body: null,
1520
+ urlParams: config.urlParams,
1521
+ queryParams: {},
1522
+ headers,
1523
+ priority: 'normal',
1524
+ };
1525
+ }
1526
+
1527
+ const adapterName$3 = 'getCustomCodeExecution';
1528
+ const getCustomCodeExecution_ConfigPropertyMetadata = [
1529
+ generateParamConfigMetadata('customCodeExecutionId', true, 0 /* UrlParameter */, 0 /* String */),
1530
+ generateParamConfigMetadata('customCodeNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
1531
+ ];
1532
+ const getCustomCodeExecution_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getCustomCodeExecution_ConfigPropertyMetadata);
1533
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$8(getCustomCodeExecution_ConfigPropertyMetadata);
1534
+ function keyBuilder$4(luvio, config) {
1535
+ const resourceParams = createResourceParams$3(config);
1536
+ return keyBuilder$5(luvio, resourceParams);
1537
+ }
1538
+ function typeCheckConfig$3(untrustedConfig) {
1539
+ const config = {};
1540
+ typeCheckConfig$8(untrustedConfig, config, getCustomCodeExecution_ConfigPropertyMetadata);
1541
+ return config;
1542
+ }
1543
+ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
1544
+ if (!untrustedIsObject(untrustedConfig)) {
1545
+ return null;
1546
+ }
1547
+ if (process.env.NODE_ENV !== 'production') {
1548
+ validateConfig(untrustedConfig, configPropertyNames);
1549
+ }
1550
+ const config = typeCheckConfig$3(untrustedConfig);
1551
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1552
+ return null;
1553
+ }
1554
+ return config;
1555
+ }
1556
+ function adapterFragment$2(luvio, config) {
1557
+ createResourceParams$3(config);
1558
+ return select$5();
1559
+ }
1560
+ function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
1561
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
1562
+ config,
1563
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
1564
+ });
1565
+ return luvio.storeBroadcast().then(() => snapshot);
1566
+ }
1567
+ function onFetchResponseError$2(luvio, config, resourceParams, response) {
1568
+ const snapshot = ingestError$2(luvio, resourceParams, response, {
1569
+ config,
1570
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
1571
+ });
1572
+ return luvio.storeBroadcast().then(() => snapshot);
1573
+ }
1574
+ function buildNetworkSnapshot$3(luvio, config, options) {
1575
+ const resourceParams = createResourceParams$3(config);
1576
+ const request = createResourceRequest$3(resourceParams);
1577
+ return luvio.dispatchResourceRequest(request, options)
1578
+ .then((response) => {
1579
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
1580
+ const cache = new StoreKeyMap();
1581
+ getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
1582
+ return cache;
1583
+ });
1584
+ }, (response) => {
1585
+ return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
1586
+ });
1587
+ }
1588
+ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
1589
+ return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
1590
+ }
1591
+ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
1592
+ const { luvio, config } = context;
1593
+ const selector = {
1594
+ recordId: keyBuilder$4(luvio, config),
1595
+ node: adapterFragment$2(luvio, config),
1596
+ variables: {},
1597
+ };
1598
+ const cacheSnapshot = storeLookup(selector, {
1599
+ config,
1600
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
1601
+ });
1602
+ return cacheSnapshot;
1603
+ }
1604
+ const getCustomCodeExecutionAdapterFactory = (luvio) => function byoc__getCustomCodeExecution(untrustedConfig, requestContext) {
1605
+ const config = validateAdapterConfig$3(untrustedConfig, getCustomCodeExecution_ConfigPropertyNames);
1606
+ // Invalid or incomplete config
1607
+ if (config === null) {
1608
+ return null;
1609
+ }
1610
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1611
+ buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
1612
+ };
1613
+
1614
+ const VERSION$1 = "67e4b6c0a2163a4de44249f2a2dc7bd0";
1615
+ function validate$1(obj, path = 'CustomCodeExecutionLogRepresentation') {
1616
+ const v_error = (() => {
1617
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1618
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1619
+ }
1620
+ const obj_downloadUrl = obj.downloadUrl;
1621
+ const path_downloadUrl = path + '.downloadUrl';
1622
+ if (typeof obj_downloadUrl !== 'string') {
1623
+ return new TypeError('Expected "string" but received "' + typeof obj_downloadUrl + '" (at "' + path_downloadUrl + '")');
1624
+ }
1625
+ })();
1626
+ return v_error === undefined ? null : v_error;
1627
+ }
1628
+ const RepresentationType$1 = 'CustomCodeExecutionLogRepresentation';
1629
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
1630
+ return input;
1631
+ }
1632
+ const select$4 = function CustomCodeExecutionLogRepresentationSelect() {
1633
+ return {
1634
+ kind: 'Fragment',
1635
+ version: VERSION$1,
1636
+ private: [],
1637
+ selections: [
1638
+ {
1639
+ name: 'downloadUrl',
1640
+ kind: 'Scalar'
1641
+ }
1642
+ ]
1643
+ };
1644
+ };
1645
+ function equals$1(existing, incoming) {
1646
+ const existing_downloadUrl = existing.downloadUrl;
1647
+ const incoming_downloadUrl = incoming.downloadUrl;
1648
+ if (!(existing_downloadUrl === incoming_downloadUrl)) {
1649
+ return false;
1650
+ }
1651
+ return true;
1652
+ }
1653
+ const ingest$1 = function CustomCodeExecutionLogRepresentationIngest(input, path, luvio, store, timestamp) {
1654
+ if (process.env.NODE_ENV !== 'production') {
1655
+ const validateError = validate$1(input);
1656
+ if (validateError !== null) {
1657
+ throw validateError;
1658
+ }
1659
+ }
1660
+ const key = path.fullPath;
1661
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
1662
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "byoc", VERSION$1, RepresentationType$1, equals$1);
1663
+ return createLink(key);
1664
+ };
1665
+ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
1666
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1667
+ const rootKey = fullPathFactory();
1668
+ rootKeySet.set(rootKey, {
1669
+ namespace: keyPrefix,
1670
+ representationName: RepresentationType$1,
1671
+ mergeable: false
1672
+ });
1673
+ }
1674
+
1675
+ function select$3(luvio, params) {
1676
+ return select$4();
1677
+ }
1678
+ function keyBuilder$3(luvio, params) {
1679
+ return keyPrefix + '::CustomCodeExecutionLogRepresentation:(' + 'customCodeExecutionId:' + params.urlParams.customCodeExecutionId + ',' + 'customCodeNameOrId:' + params.urlParams.customCodeNameOrId + ')';
1680
+ }
1681
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
1682
+ getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
1683
+ }
1684
+ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
1685
+ const { body } = response;
1686
+ const key = keyBuilder$3(luvio, resourceParams);
1687
+ luvio.storeIngest(key, ingest$1, body);
1688
+ const snapshot = luvio.storeLookup({
1689
+ recordId: key,
1690
+ node: select$3(),
1691
+ variables: {},
1692
+ }, snapshotRefresh);
1693
+ if (process.env.NODE_ENV !== 'production') {
1694
+ if (snapshot.state !== 'Fulfilled') {
1695
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1696
+ }
1697
+ }
1698
+ deepFreeze(snapshot.data);
1699
+ return snapshot;
1700
+ }
1701
+ function ingestError$1(luvio, params, error, snapshotRefresh) {
1702
+ const key = keyBuilder$3(luvio, params);
1703
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1704
+ luvio.storeIngestError(key, errorSnapshot);
1705
+ return errorSnapshot;
1706
+ }
1707
+ function createResourceRequest$2(config) {
1708
+ const headers = {};
1709
+ return {
1710
+ baseUri: '/services/data/v64.0',
1711
+ basePath: '/ssot/data-custom-code/' + config.urlParams.customCodeNameOrId + '/executions/' + config.urlParams.customCodeExecutionId + '/logs',
1712
+ method: 'get',
1713
+ body: null,
1714
+ urlParams: config.urlParams,
1715
+ queryParams: {},
1716
+ headers,
1717
+ priority: 'normal',
1718
+ };
1719
+ }
1720
+
1721
+ const adapterName$2 = 'getCustomCodeExecutionLogs';
1722
+ const getCustomCodeExecutionLogs_ConfigPropertyMetadata = [
1723
+ generateParamConfigMetadata('customCodeExecutionId', true, 0 /* UrlParameter */, 0 /* String */),
1724
+ generateParamConfigMetadata('customCodeNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
1725
+ ];
1726
+ const getCustomCodeExecutionLogs_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getCustomCodeExecutionLogs_ConfigPropertyMetadata);
1727
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$8(getCustomCodeExecutionLogs_ConfigPropertyMetadata);
1728
+ function keyBuilder$2(luvio, config) {
1729
+ const resourceParams = createResourceParams$2(config);
1730
+ return keyBuilder$3(luvio, resourceParams);
1731
+ }
1732
+ function typeCheckConfig$2(untrustedConfig) {
1733
+ const config = {};
1734
+ typeCheckConfig$8(untrustedConfig, config, getCustomCodeExecutionLogs_ConfigPropertyMetadata);
1735
+ return config;
1736
+ }
1737
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
1738
+ if (!untrustedIsObject(untrustedConfig)) {
1739
+ return null;
1740
+ }
1741
+ if (process.env.NODE_ENV !== 'production') {
1742
+ validateConfig(untrustedConfig, configPropertyNames);
1743
+ }
1744
+ const config = typeCheckConfig$2(untrustedConfig);
1745
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1746
+ return null;
1747
+ }
1748
+ return config;
1749
+ }
1750
+ function adapterFragment$1(luvio, config) {
1751
+ createResourceParams$2(config);
1752
+ return select$3();
1753
+ }
1754
+ function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
1755
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
1756
+ config,
1757
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1758
+ });
1759
+ return luvio.storeBroadcast().then(() => snapshot);
1760
+ }
1761
+ function onFetchResponseError$1(luvio, config, resourceParams, response) {
1762
+ const snapshot = ingestError$1(luvio, resourceParams, response, {
1763
+ config,
1764
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1765
+ });
1766
+ return luvio.storeBroadcast().then(() => snapshot);
1767
+ }
1768
+ function buildNetworkSnapshot$2(luvio, config, options) {
1769
+ const resourceParams = createResourceParams$2(config);
1770
+ const request = createResourceRequest$2(resourceParams);
1771
+ return luvio.dispatchResourceRequest(request, options)
1772
+ .then((response) => {
1773
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
1774
+ const cache = new StoreKeyMap();
1775
+ getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
1776
+ return cache;
1777
+ });
1778
+ }, (response) => {
1779
+ return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
1780
+ });
1781
+ }
1782
+ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
1783
+ return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
1784
+ }
1785
+ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
1786
+ const { luvio, config } = context;
1787
+ const selector = {
1788
+ recordId: keyBuilder$2(luvio, config),
1789
+ node: adapterFragment$1(luvio, config),
1790
+ variables: {},
1791
+ };
1792
+ const cacheSnapshot = storeLookup(selector, {
1793
+ config,
1794
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1795
+ });
1796
+ return cacheSnapshot;
1797
+ }
1798
+ const getCustomCodeExecutionLogsAdapterFactory = (luvio) => function byoc__getCustomCodeExecutionLogs(untrustedConfig, requestContext) {
1799
+ const config = validateAdapterConfig$2(untrustedConfig, getCustomCodeExecutionLogs_ConfigPropertyNames);
1800
+ // Invalid or incomplete config
1801
+ if (config === null) {
1802
+ return null;
1803
+ }
1804
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1805
+ buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
1806
+ };
1807
+
1808
+ const VERSION = "eff3ca61ebb18d80a094043be3f81c07";
1809
+ function validate(obj, path = 'CustomCodeExecutionCollectionRepresentation') {
1810
+ const v_error = (() => {
1811
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1812
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1813
+ }
1814
+ if (obj.currentPageUrl !== undefined) {
1815
+ const obj_currentPageUrl = obj.currentPageUrl;
1816
+ const path_currentPageUrl = path + '.currentPageUrl';
1817
+ if (typeof obj_currentPageUrl !== 'string') {
1818
+ return new TypeError('Expected "string" but received "' + typeof obj_currentPageUrl + '" (at "' + path_currentPageUrl + '")');
1819
+ }
1820
+ }
1821
+ const obj_executions = obj.executions;
1822
+ const path_executions = path + '.executions';
1823
+ if (!ArrayIsArray(obj_executions)) {
1824
+ return new TypeError('Expected "array" but received "' + typeof obj_executions + '" (at "' + path_executions + '")');
1825
+ }
1826
+ for (let i = 0; i < obj_executions.length; i++) {
1827
+ const obj_executions_item = obj_executions[i];
1828
+ const path_executions_item = path_executions + '[' + i + ']';
1829
+ const referencepath_executions_itemValidationError = validate$2(obj_executions_item, path_executions_item);
1830
+ if (referencepath_executions_itemValidationError !== null) {
1831
+ let message = 'Object doesn\'t match CustomCodeExecutionBaseRepresentation (at "' + path_executions_item + '")\n';
1832
+ message += referencepath_executions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1833
+ return new TypeError(message);
1834
+ }
1835
+ }
1836
+ if (obj.nextPageUrl !== undefined) {
1837
+ const obj_nextPageUrl = obj.nextPageUrl;
1838
+ const path_nextPageUrl = path + '.nextPageUrl';
1839
+ if (typeof obj_nextPageUrl !== 'string') {
1840
+ return new TypeError('Expected "string" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
1841
+ }
1842
+ }
1843
+ if (obj.totalSize !== undefined) {
1844
+ const obj_totalSize = obj.totalSize;
1845
+ const path_totalSize = path + '.totalSize';
1846
+ if (typeof obj_totalSize !== 'number' || (typeof obj_totalSize === 'number' && Math.floor(obj_totalSize) !== obj_totalSize)) {
1847
+ return new TypeError('Expected "integer" but received "' + typeof obj_totalSize + '" (at "' + path_totalSize + '")');
1848
+ }
1849
+ }
1850
+ })();
1851
+ return v_error === undefined ? null : v_error;
1852
+ }
1853
+ const RepresentationType = 'CustomCodeExecutionCollectionRepresentation';
1854
+ function normalize(input, existing, path, luvio, store, timestamp) {
1855
+ return input;
1856
+ }
1857
+ const select$2 = function CustomCodeExecutionCollectionRepresentationSelect() {
1858
+ const { selections: CustomCodeExecutionBaseRepresentation__selections, opaque: CustomCodeExecutionBaseRepresentation__opaque, } = select$6();
1859
+ return {
1860
+ kind: 'Fragment',
1861
+ version: VERSION,
1862
+ private: [],
1863
+ selections: [
1864
+ {
1865
+ name: 'currentPageUrl',
1866
+ kind: 'Scalar',
1867
+ required: false
1868
+ },
1869
+ {
1870
+ name: 'executions',
1871
+ kind: 'Object',
1872
+ plural: true,
1873
+ selections: CustomCodeExecutionBaseRepresentation__selections
1874
+ },
1875
+ {
1876
+ name: 'nextPageUrl',
1877
+ kind: 'Scalar',
1878
+ required: false
1879
+ },
1880
+ {
1881
+ name: 'totalSize',
1882
+ kind: 'Scalar',
1883
+ required: false
1884
+ }
1885
+ ]
1886
+ };
1887
+ };
1888
+ function equals(existing, incoming) {
1889
+ const existing_totalSize = existing.totalSize;
1890
+ const incoming_totalSize = incoming.totalSize;
1891
+ // if at least one of these optionals is defined
1892
+ if (existing_totalSize !== undefined || incoming_totalSize !== undefined) {
1893
+ // if one of these is not defined we know the other is defined and therefore
1894
+ // not equal
1895
+ if (existing_totalSize === undefined || incoming_totalSize === undefined) {
1896
+ return false;
1897
+ }
1898
+ if (!(existing_totalSize === incoming_totalSize)) {
1899
+ return false;
1900
+ }
1901
+ }
1902
+ const existing_currentPageUrl = existing.currentPageUrl;
1903
+ const incoming_currentPageUrl = incoming.currentPageUrl;
1904
+ // if at least one of these optionals is defined
1905
+ if (existing_currentPageUrl !== undefined || incoming_currentPageUrl !== undefined) {
1906
+ // if one of these is not defined we know the other is defined and therefore
1907
+ // not equal
1908
+ if (existing_currentPageUrl === undefined || incoming_currentPageUrl === undefined) {
1909
+ return false;
1910
+ }
1911
+ if (!(existing_currentPageUrl === incoming_currentPageUrl)) {
1912
+ return false;
1913
+ }
1914
+ }
1915
+ const existing_nextPageUrl = existing.nextPageUrl;
1916
+ const incoming_nextPageUrl = incoming.nextPageUrl;
1917
+ // if at least one of these optionals is defined
1918
+ if (existing_nextPageUrl !== undefined || incoming_nextPageUrl !== undefined) {
1919
+ // if one of these is not defined we know the other is defined and therefore
1920
+ // not equal
1921
+ if (existing_nextPageUrl === undefined || incoming_nextPageUrl === undefined) {
1922
+ return false;
1923
+ }
1924
+ if (!(existing_nextPageUrl === incoming_nextPageUrl)) {
1925
+ return false;
1926
+ }
1927
+ }
1928
+ const existing_executions = existing.executions;
1929
+ const incoming_executions = incoming.executions;
1930
+ const equals_executions_items = equalsArray(existing_executions, incoming_executions, (existing_executions_item, incoming_executions_item) => {
1931
+ if (!(equals$2(existing_executions_item, incoming_executions_item))) {
1932
+ return false;
1933
+ }
1934
+ });
1935
+ if (equals_executions_items === false) {
1936
+ return false;
1937
+ }
1938
+ return true;
1939
+ }
1940
+ const ingest = function CustomCodeExecutionCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
1941
+ if (process.env.NODE_ENV !== 'production') {
1942
+ const validateError = validate(input);
1943
+ if (validateError !== null) {
1944
+ throw validateError;
1945
+ }
1946
+ }
1947
+ const key = path.fullPath;
1948
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
1949
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "byoc", VERSION, RepresentationType, equals);
1950
+ return createLink(key);
1951
+ };
1952
+ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
1953
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1954
+ const rootKey = fullPathFactory();
1955
+ rootKeySet.set(rootKey, {
1956
+ namespace: keyPrefix,
1957
+ representationName: RepresentationType,
1958
+ mergeable: false
1959
+ });
1960
+ }
1961
+
1962
+ function select$1(luvio, params) {
1963
+ return select$2();
1964
+ }
1965
+ function keyBuilder$1(luvio, params) {
1966
+ return keyPrefix + '::CustomCodeExecutionCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'customCodeNameOrId:' + params.urlParams.customCodeNameOrId + ')';
1967
+ }
1968
+ function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
1969
+ getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
1970
+ }
1971
+ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
1972
+ const { body } = response;
1973
+ const key = keyBuilder$1(luvio, resourceParams);
1974
+ luvio.storeIngest(key, ingest, body);
1975
+ const snapshot = luvio.storeLookup({
1976
+ recordId: key,
1977
+ node: select$1(),
1978
+ variables: {},
1979
+ }, snapshotRefresh);
1980
+ if (process.env.NODE_ENV !== 'production') {
1981
+ if (snapshot.state !== 'Fulfilled') {
1982
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1983
+ }
1984
+ }
1985
+ deepFreeze(snapshot.data);
1986
+ return snapshot;
1987
+ }
1988
+ function ingestError(luvio, params, error, snapshotRefresh) {
1989
+ const key = keyBuilder$1(luvio, params);
1990
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1991
+ luvio.storeIngestError(key, errorSnapshot);
1992
+ return errorSnapshot;
1993
+ }
1994
+ function createResourceRequest$1(config) {
1995
+ const headers = {};
1996
+ return {
1997
+ baseUri: '/services/data/v64.0',
1998
+ basePath: '/ssot/data-custom-code/' + config.urlParams.customCodeNameOrId + '/executions',
1999
+ method: 'get',
2000
+ body: null,
2001
+ urlParams: config.urlParams,
2002
+ queryParams: config.queryParams,
2003
+ headers,
2004
+ priority: 'normal',
2005
+ };
2006
+ }
2007
+
2008
+ const adapterName$1 = 'getCustomCodeExecutions';
2009
+ const getCustomCodeExecutions_ConfigPropertyMetadata = [
2010
+ generateParamConfigMetadata('customCodeNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
2011
+ generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
2012
+ generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
2013
+ ];
2014
+ const getCustomCodeExecutions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getCustomCodeExecutions_ConfigPropertyMetadata);
2015
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$8(getCustomCodeExecutions_ConfigPropertyMetadata);
2016
+ function keyBuilder(luvio, config) {
2017
+ const resourceParams = createResourceParams$1(config);
2018
+ return keyBuilder$1(luvio, resourceParams);
2019
+ }
2020
+ function typeCheckConfig$1(untrustedConfig) {
2021
+ const config = {};
2022
+ typeCheckConfig$8(untrustedConfig, config, getCustomCodeExecutions_ConfigPropertyMetadata);
2023
+ return config;
2024
+ }
2025
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
2026
+ if (!untrustedIsObject(untrustedConfig)) {
2027
+ return null;
2028
+ }
2029
+ if (process.env.NODE_ENV !== 'production') {
2030
+ validateConfig(untrustedConfig, configPropertyNames);
2031
+ }
2032
+ const config = typeCheckConfig$1(untrustedConfig);
2033
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
2034
+ return null;
2035
+ }
2036
+ return config;
2037
+ }
2038
+ function adapterFragment(luvio, config) {
2039
+ createResourceParams$1(config);
2040
+ return select$1();
2041
+ }
2042
+ function onFetchResponseSuccess(luvio, config, resourceParams, response) {
2043
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
2044
+ config,
2045
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
2046
+ });
2047
+ return luvio.storeBroadcast().then(() => snapshot);
2048
+ }
2049
+ function onFetchResponseError(luvio, config, resourceParams, response) {
2050
+ const snapshot = ingestError(luvio, resourceParams, response, {
2051
+ config,
2052
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
2053
+ });
2054
+ return luvio.storeBroadcast().then(() => snapshot);
2055
+ }
2056
+ function buildNetworkSnapshot$1(luvio, config, options) {
2057
+ const resourceParams = createResourceParams$1(config);
2058
+ const request = createResourceRequest$1(resourceParams);
2059
+ return luvio.dispatchResourceRequest(request, options)
2060
+ .then((response) => {
2061
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
2062
+ const cache = new StoreKeyMap();
2063
+ getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
2064
+ return cache;
2065
+ });
2066
+ }, (response) => {
2067
+ return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
2068
+ });
2069
+ }
2070
+ function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
2071
+ return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
2072
+ }
2073
+ function buildCachedSnapshotCachePolicy(context, storeLookup) {
2074
+ const { luvio, config } = context;
2075
+ const selector = {
2076
+ recordId: keyBuilder(luvio, config),
2077
+ node: adapterFragment(luvio, config),
2078
+ variables: {},
2079
+ };
2080
+ const cacheSnapshot = storeLookup(selector, {
2081
+ config,
2082
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
2083
+ });
2084
+ return cacheSnapshot;
2085
+ }
2086
+ const getCustomCodeExecutionsAdapterFactory = (luvio) => function byoc__getCustomCodeExecutions(untrustedConfig, requestContext) {
2087
+ const config = validateAdapterConfig$1(untrustedConfig, getCustomCodeExecutions_ConfigPropertyNames);
2088
+ // Invalid or incomplete config
2089
+ if (config === null) {
2090
+ return null;
2091
+ }
2092
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
2093
+ buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
2094
+ };
2095
+
2096
+ function select(luvio, params) {
2097
+ return select$b();
2098
+ }
2099
+ function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
2100
+ getTypeCacheKeys$4(storeKeyMap, luvio, response);
2101
+ }
2102
+ function ingestSuccess(luvio, resourceParams, response) {
2103
+ const { body } = response;
2104
+ const key = keyBuilderFromType(luvio, body);
2105
+ luvio.storeIngest(key, ingest$4, body);
2106
+ const snapshot = luvio.storeLookup({
2107
+ recordId: key,
2108
+ node: select(),
2109
+ variables: {},
2110
+ });
2111
+ if (process.env.NODE_ENV !== 'production') {
2112
+ if (snapshot.state !== 'Fulfilled') {
2113
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
2114
+ }
2115
+ }
2116
+ deepFreeze(snapshot.data);
2117
+ return snapshot;
2118
+ }
2119
+ function createResourceRequest(config) {
2120
+ const headers = {};
2121
+ return {
2122
+ baseUri: '/services/data/v64.0',
2123
+ basePath: '/ssot/data-custom-code/' + config.urlParams.customCodeNameOrId + '',
2124
+ method: 'patch',
2125
+ body: config.body,
2126
+ urlParams: config.urlParams,
2127
+ queryParams: {},
2128
+ headers,
2129
+ priority: 'normal',
2130
+ };
2131
+ }
2132
+
2133
+ const adapterName = 'updateCustomCodeDeployment';
2134
+ const updateCustomCodeDeployment_ConfigPropertyMetadata = [
2135
+ generateParamConfigMetadata('customCodeNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
2136
+ generateParamConfigMetadata('computeType', false, 2 /* Body */, 0 /* String */),
2137
+ generateParamConfigMetadata('functionInvokeOptions', false, 2 /* Body */, 0 /* String */, true),
2138
+ generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
2139
+ generateParamConfigMetadata('label', false, 2 /* Body */, 0 /* String */),
2140
+ generateParamConfigMetadata('version', false, 2 /* Body */, 0 /* String */),
2141
+ ];
2142
+ const updateCustomCodeDeployment_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, updateCustomCodeDeployment_ConfigPropertyMetadata);
2143
+ const createResourceParams = /*#__PURE__*/ createResourceParams$8(updateCustomCodeDeployment_ConfigPropertyMetadata);
2144
+ function typeCheckConfig(untrustedConfig) {
2145
+ const config = {};
2146
+ typeCheckConfig$8(untrustedConfig, config, updateCustomCodeDeployment_ConfigPropertyMetadata);
2147
+ return config;
2148
+ }
2149
+ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
2150
+ if (!untrustedIsObject(untrustedConfig)) {
2151
+ return null;
2152
+ }
2153
+ if (process.env.NODE_ENV !== 'production') {
2154
+ validateConfig(untrustedConfig, configPropertyNames);
2155
+ }
2156
+ const config = typeCheckConfig(untrustedConfig);
2157
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
2158
+ return null;
2159
+ }
2160
+ return config;
2161
+ }
2162
+ function buildNetworkSnapshot(luvio, config, options) {
1333
2163
  const resourceParams = createResourceParams(config);
1334
2164
  const request = createResourceRequest(resourceParams);
1335
2165
  return luvio.dispatchResourceRequest(request, options)
@@ -1363,31 +2193,52 @@ let deleteCustomCodeDeployment;
1363
2193
  let getCustomCodeDeployment;
1364
2194
  let getCustomCodeDeploymentNotifyChange;
1365
2195
  let getCustomCodeDeployments;
2196
+ let getCustomCodeExecution;
2197
+ let getCustomCodeExecutionLogs;
2198
+ let getCustomCodeExecutions;
1366
2199
  let updateCustomCodeDeployment;
1367
2200
  // Imperative GET Adapters
1368
2201
  let getCustomCodeDeployment_imperative;
1369
2202
  let getCustomCodeDeployments_imperative;
2203
+ let getCustomCodeExecution_imperative;
2204
+ let getCustomCodeExecutionLogs_imperative;
2205
+ let getCustomCodeExecutions_imperative;
1370
2206
  const getCustomCodeDeploymentMetadata = { apiFamily: 'byoc', name: 'getCustomCodeDeployment' };
1371
2207
  const getCustomCodeDeploymentsMetadata = { apiFamily: 'byoc', name: 'getCustomCodeDeployments' };
2208
+ const getCustomCodeExecutionMetadata = { apiFamily: 'byoc', name: 'getCustomCodeExecution' };
2209
+ const getCustomCodeExecutionLogsMetadata = {
2210
+ apiFamily: 'byoc',
2211
+ name: 'getCustomCodeExecutionLogs',
2212
+ };
2213
+ const getCustomCodeExecutionsMetadata = { apiFamily: 'byoc', name: 'getCustomCodeExecutions' };
1372
2214
  // Notify Update Available
1373
2215
  function bindExportsTo(luvio) {
1374
2216
  // LDS Adapters
1375
2217
  const getCustomCodeDeployment_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getCustomCodeDeployment', getCustomCodeDeploymentAdapterFactory), getCustomCodeDeploymentMetadata);
1376
2218
  const getCustomCodeDeployments_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getCustomCodeDeployments', getCustomCodeDeploymentsAdapterFactory), getCustomCodeDeploymentsMetadata);
2219
+ const getCustomCodeExecution_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getCustomCodeExecution', getCustomCodeExecutionAdapterFactory), getCustomCodeExecutionMetadata);
2220
+ const getCustomCodeExecutionLogs_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getCustomCodeExecutionLogs', getCustomCodeExecutionLogsAdapterFactory), getCustomCodeExecutionLogsMetadata);
2221
+ const getCustomCodeExecutions_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getCustomCodeExecutions', getCustomCodeExecutionsAdapterFactory), getCustomCodeExecutionsMetadata);
1377
2222
  function unwrapSnapshotData(factory) {
1378
2223
  const adapter = factory(luvio);
1379
2224
  return (config) => adapter(config).then((snapshot) => snapshot.data);
1380
2225
  }
1381
2226
  return {
1382
2227
  createCustomCodeDeployment: unwrapSnapshotData(createCustomCodeDeploymentAdapterFactory),
1383
- deleteCustomCodeDeployment: createLDSAdapter(luvio, adapterName$3, deleteCustomCodeDeploymentAdapterFactory),
2228
+ deleteCustomCodeDeployment: createLDSAdapter(luvio, adapterName$6, deleteCustomCodeDeploymentAdapterFactory),
1384
2229
  getCustomCodeDeployment: createWireAdapterConstructor(luvio, getCustomCodeDeployment_ldsAdapter, getCustomCodeDeploymentMetadata),
1385
2230
  getCustomCodeDeploymentNotifyChange: createLDSAdapter(luvio, 'getCustomCodeDeploymentNotifyChange', notifyChangeFactory),
1386
2231
  getCustomCodeDeployments: createWireAdapterConstructor(luvio, getCustomCodeDeployments_ldsAdapter, getCustomCodeDeploymentsMetadata),
2232
+ getCustomCodeExecution: createWireAdapterConstructor(luvio, getCustomCodeExecution_ldsAdapter, getCustomCodeExecutionMetadata),
2233
+ getCustomCodeExecutionLogs: createWireAdapterConstructor(luvio, getCustomCodeExecutionLogs_ldsAdapter, getCustomCodeExecutionLogsMetadata),
2234
+ getCustomCodeExecutions: createWireAdapterConstructor(luvio, getCustomCodeExecutions_ldsAdapter, getCustomCodeExecutionsMetadata),
1387
2235
  updateCustomCodeDeployment: unwrapSnapshotData(updateCustomCodeDeploymentAdapterFactory),
1388
2236
  // Imperative GET Adapters
1389
2237
  getCustomCodeDeployment_imperative: createImperativeAdapter(luvio, getCustomCodeDeployment_ldsAdapter, getCustomCodeDeploymentMetadata),
1390
2238
  getCustomCodeDeployments_imperative: createImperativeAdapter(luvio, getCustomCodeDeployments_ldsAdapter, getCustomCodeDeploymentsMetadata),
2239
+ getCustomCodeExecution_imperative: createImperativeAdapter(luvio, getCustomCodeExecution_ldsAdapter, getCustomCodeExecutionMetadata),
2240
+ getCustomCodeExecutionLogs_imperative: createImperativeAdapter(luvio, getCustomCodeExecutionLogs_ldsAdapter, getCustomCodeExecutionLogsMetadata),
2241
+ getCustomCodeExecutions_imperative: createImperativeAdapter(luvio, getCustomCodeExecutions_ldsAdapter, getCustomCodeExecutionsMetadata),
1391
2242
  // Notify Update Availables
1392
2243
  };
1393
2244
  }
@@ -1398,11 +2249,17 @@ withDefaultLuvio((luvio) => {
1398
2249
  getCustomCodeDeployment,
1399
2250
  getCustomCodeDeploymentNotifyChange,
1400
2251
  getCustomCodeDeployments,
2252
+ getCustomCodeExecution,
2253
+ getCustomCodeExecutionLogs,
2254
+ getCustomCodeExecutions,
1401
2255
  updateCustomCodeDeployment,
1402
2256
  getCustomCodeDeployment_imperative,
1403
2257
  getCustomCodeDeployments_imperative,
2258
+ getCustomCodeExecution_imperative,
2259
+ getCustomCodeExecutionLogs_imperative,
2260
+ getCustomCodeExecutions_imperative,
1404
2261
  } = bindExportsTo(luvio));
1405
2262
  });
1406
2263
 
1407
- export { createCustomCodeDeployment, deleteCustomCodeDeployment, getCustomCodeDeployment, getCustomCodeDeploymentNotifyChange, getCustomCodeDeployment_imperative, getCustomCodeDeployments, getCustomCodeDeployments_imperative, updateCustomCodeDeployment };
1408
- // version: 1.354.0-dev2-493c24af5a
2264
+ export { createCustomCodeDeployment, deleteCustomCodeDeployment, getCustomCodeDeployment, getCustomCodeDeploymentNotifyChange, getCustomCodeDeployment_imperative, getCustomCodeDeployments, getCustomCodeDeployments_imperative, getCustomCodeExecution, getCustomCodeExecutionLogs, getCustomCodeExecutionLogs_imperative, getCustomCodeExecution_imperative, getCustomCodeExecutions, getCustomCodeExecutions_imperative, updateCustomCodeDeployment };
2265
+ // version: 1.354.0-dev21-5f69ab6bb6