@salesforce/lds-adapters-revenue-billing-batch 1.316.0 → 1.318.0

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.
@@ -4,7 +4,7 @@
4
4
  * For full license text, see the LICENSE.txt file
5
5
  */
6
6
 
7
- import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$5, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1, typeCheckConfig as typeCheckConfig$5 } from '@luvio/engine';
7
+ import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$6, typeCheckConfig as typeCheckConfig$6, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1 } from '@luvio/engine';
8
8
 
9
9
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
10
  const { keys: ObjectKeys, create: ObjectCreate } = Object;
@@ -275,7 +275,7 @@ function keyBuilderFromType$3(luvio, object) {
275
275
  function normalize$4(input, existing, path, luvio, store, timestamp) {
276
276
  return input;
277
277
  }
278
- const select$a = function PaymentsBatchSchedulerOutputRepresentationSelect() {
278
+ const select$b = function PaymentsBatchSchedulerOutputRepresentationSelect() {
279
279
  return {
280
280
  kind: 'Fragment',
281
281
  version: VERSION$5,
@@ -311,19 +311,19 @@ function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
311
311
  });
312
312
  }
313
313
 
314
- function select$9(luvio, params) {
315
- return select$a();
314
+ function select$a(luvio, params) {
315
+ return select$b();
316
316
  }
317
- function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
317
+ function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
318
318
  getTypeCacheKeys$4(storeKeyMap, luvio, response);
319
319
  }
320
- function ingestSuccess$4(luvio, resourceParams, response) {
320
+ function ingestSuccess$5(luvio, resourceParams, response) {
321
321
  const { body } = response;
322
322
  const key = keyBuilderFromType$3(luvio, body);
323
323
  luvio.storeIngest(key, ingest$4, body);
324
324
  const snapshot = luvio.storeLookup({
325
325
  recordId: key,
326
- node: select$9(),
326
+ node: select$a(),
327
327
  variables: {},
328
328
  });
329
329
  if (process.env.NODE_ENV !== 'production') {
@@ -334,7 +334,7 @@ function ingestSuccess$4(luvio, resourceParams, response) {
334
334
  deepFreeze(snapshot.data);
335
335
  return snapshot;
336
336
  }
337
- function createResourceRequest$4(config) {
337
+ function createResourceRequest$5(config) {
338
338
  const headers = {};
339
339
  return {
340
340
  baseUri: '/services/data/v63.0',
@@ -348,13 +348,13 @@ function createResourceRequest$4(config) {
348
348
  };
349
349
  }
350
350
 
351
- const adapterName$4 = 'createPaymentsBatchScheduler';
351
+ const adapterName$5 = 'createPaymentsBatchScheduler';
352
352
  const createPaymentsBatchScheduler_ConfigPropertyMetadata = [
353
353
  generateParamConfigMetadata('PaymentsBatchSchedulerInput', true, 2 /* Body */, 4 /* Unsupported */),
354
354
  ];
355
- const createPaymentsBatchScheduler_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, createPaymentsBatchScheduler_ConfigPropertyMetadata);
356
- const createResourceParams$4 = /*#__PURE__*/ createResourceParams$5(createPaymentsBatchScheduler_ConfigPropertyMetadata);
357
- function typeCheckConfig$4(untrustedConfig) {
355
+ const createPaymentsBatchScheduler_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, createPaymentsBatchScheduler_ConfigPropertyMetadata);
356
+ const createResourceParams$5 = /*#__PURE__*/ createResourceParams$6(createPaymentsBatchScheduler_ConfigPropertyMetadata);
357
+ function typeCheckConfig$5(untrustedConfig) {
358
358
  const config = {};
359
359
  const untrustedConfig_PaymentsBatchSchedulerInput = untrustedConfig.PaymentsBatchSchedulerInput;
360
360
  const referencePaymentsBatchSchedulerInputRepresentationValidationError = validate$9(untrustedConfig_PaymentsBatchSchedulerInput);
@@ -363,30 +363,30 @@ function typeCheckConfig$4(untrustedConfig) {
363
363
  }
364
364
  return config;
365
365
  }
366
- function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
366
+ function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
367
367
  if (!untrustedIsObject(untrustedConfig)) {
368
368
  return null;
369
369
  }
370
370
  if (process.env.NODE_ENV !== 'production') {
371
371
  validateConfig(untrustedConfig, configPropertyNames);
372
372
  }
373
- const config = typeCheckConfig$4(untrustedConfig);
373
+ const config = typeCheckConfig$5(untrustedConfig);
374
374
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
375
375
  return null;
376
376
  }
377
377
  return config;
378
378
  }
379
- function buildNetworkSnapshot$4(luvio, config, options) {
380
- const resourceParams = createResourceParams$4(config);
381
- const request = createResourceRequest$4(resourceParams);
379
+ function buildNetworkSnapshot$5(luvio, config, options) {
380
+ const resourceParams = createResourceParams$5(config);
381
+ const request = createResourceRequest$5(resourceParams);
382
382
  return luvio.dispatchResourceRequest(request, options)
383
383
  .then((response) => {
384
384
  return luvio.handleSuccessResponse(() => {
385
- const snapshot = ingestSuccess$4(luvio, resourceParams, response);
385
+ const snapshot = ingestSuccess$5(luvio, resourceParams, response);
386
386
  return luvio.storeBroadcast().then(() => snapshot);
387
387
  }, () => {
388
388
  const cache = new StoreKeyMap();
389
- getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
389
+ getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
390
390
  return cache;
391
391
  });
392
392
  }, (response) => {
@@ -396,12 +396,12 @@ function buildNetworkSnapshot$4(luvio, config, options) {
396
396
  }
397
397
  const createPaymentsBatchSchedulerAdapterFactory = (luvio) => {
398
398
  return function createPaymentsBatchScheduler(untrustedConfig) {
399
- const config = validateAdapterConfig$4(untrustedConfig, createPaymentsBatchScheduler_ConfigPropertyNames);
399
+ const config = validateAdapterConfig$5(untrustedConfig, createPaymentsBatchScheduler_ConfigPropertyNames);
400
400
  // Invalid or incomplete config
401
401
  if (config === null) {
402
402
  throw new Error('Invalid config for "createPaymentsBatchScheduler"');
403
403
  }
404
- return buildNetworkSnapshot$4(luvio, config);
404
+ return buildNetworkSnapshot$5(luvio, config);
405
405
  };
406
406
  };
407
407
 
@@ -520,7 +520,7 @@ function keyBuilderFromType$2(luvio, object) {
520
520
  function normalize$3(input, existing, path, luvio, store, timestamp) {
521
521
  return input;
522
522
  }
523
- const select$8 = function InvoicesBatchSchedulerOutputRepresentationSelect() {
523
+ const select$9 = function InvoicesBatchSchedulerOutputRepresentationSelect() {
524
524
  return {
525
525
  kind: 'Fragment',
526
526
  version: VERSION$4,
@@ -556,8 +556,102 @@ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
556
556
  });
557
557
  }
558
558
 
559
+ function select$8(luvio, params) {
560
+ return select$9();
561
+ }
562
+ function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
563
+ getTypeCacheKeys$3(storeKeyMap, luvio, response);
564
+ }
565
+ function ingestSuccess$4(luvio, resourceParams, response) {
566
+ const { body } = response;
567
+ const key = keyBuilderFromType$2(luvio, body);
568
+ luvio.storeIngest(key, ingest$3, body);
569
+ const snapshot = luvio.storeLookup({
570
+ recordId: key,
571
+ node: select$8(),
572
+ variables: {},
573
+ });
574
+ if (process.env.NODE_ENV !== 'production') {
575
+ if (snapshot.state !== 'Fulfilled') {
576
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
577
+ }
578
+ }
579
+ deepFreeze(snapshot.data);
580
+ return snapshot;
581
+ }
582
+ function createResourceRequest$4(config) {
583
+ const headers = {};
584
+ return {
585
+ baseUri: '/services/data/v63.0',
586
+ basePath: '/commerce/invoicing/invoice-schedulers',
587
+ method: 'post',
588
+ body: config.body,
589
+ urlParams: {},
590
+ queryParams: {},
591
+ headers,
592
+ priority: 'normal',
593
+ };
594
+ }
595
+
596
+ const adapterName$4 = 'createInvoicesBatchScheduler';
597
+ const createInvoicesBatchScheduler_ConfigPropertyMetadata = [
598
+ generateParamConfigMetadata('BatchInvoiceSchedulerInput', true, 2 /* Body */, 4 /* Unsupported */),
599
+ ];
600
+ const createInvoicesBatchScheduler_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, createInvoicesBatchScheduler_ConfigPropertyMetadata);
601
+ const createResourceParams$4 = /*#__PURE__*/ createResourceParams$6(createInvoicesBatchScheduler_ConfigPropertyMetadata);
602
+ function typeCheckConfig$4(untrustedConfig) {
603
+ const config = {};
604
+ const untrustedConfig_BatchInvoiceSchedulerInput = untrustedConfig.BatchInvoiceSchedulerInput;
605
+ const referenceBatchInvoiceSchedulerInputRepresentationValidationError = validate$5(untrustedConfig_BatchInvoiceSchedulerInput);
606
+ if (referenceBatchInvoiceSchedulerInputRepresentationValidationError === null) {
607
+ config.BatchInvoiceSchedulerInput = untrustedConfig_BatchInvoiceSchedulerInput;
608
+ }
609
+ return config;
610
+ }
611
+ function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
612
+ if (!untrustedIsObject(untrustedConfig)) {
613
+ return null;
614
+ }
615
+ if (process.env.NODE_ENV !== 'production') {
616
+ validateConfig(untrustedConfig, configPropertyNames);
617
+ }
618
+ const config = typeCheckConfig$4(untrustedConfig);
619
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
620
+ return null;
621
+ }
622
+ return config;
623
+ }
624
+ function buildNetworkSnapshot$4(luvio, config, options) {
625
+ const resourceParams = createResourceParams$4(config);
626
+ const request = createResourceRequest$4(resourceParams);
627
+ return luvio.dispatchResourceRequest(request, options)
628
+ .then((response) => {
629
+ return luvio.handleSuccessResponse(() => {
630
+ const snapshot = ingestSuccess$4(luvio, resourceParams, response);
631
+ return luvio.storeBroadcast().then(() => snapshot);
632
+ }, () => {
633
+ const cache = new StoreKeyMap();
634
+ getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
635
+ return cache;
636
+ });
637
+ }, (response) => {
638
+ deepFreeze(response);
639
+ throw response;
640
+ });
641
+ }
642
+ const createInvoicesBatchSchedulerAdapterFactory = (luvio) => {
643
+ return function createInvoicesBatchScheduler(untrustedConfig) {
644
+ const config = validateAdapterConfig$4(untrustedConfig, createInvoicesBatchScheduler_ConfigPropertyNames);
645
+ // Invalid or incomplete config
646
+ if (config === null) {
647
+ throw new Error('Invalid config for "createInvoicesBatchScheduler"');
648
+ }
649
+ return buildNetworkSnapshot$4(luvio, config);
650
+ };
651
+ };
652
+
559
653
  function select$7(luvio, params) {
560
- return select$8();
654
+ return select$9();
561
655
  }
562
656
  function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
563
657
  getTypeCacheKeys$3(storeKeyMap, luvio, response);
@@ -583,24 +677,26 @@ function createResourceRequest$3(config) {
583
677
  const headers = {};
584
678
  return {
585
679
  baseUri: '/services/data/v63.0',
586
- basePath: '/commerce/invoicing/invoice-schedulers',
587
- method: 'post',
680
+ basePath: '/commerce/invoicing/invoice-schedulers/' + config.urlParams.billingBatchSchedulerId + '',
681
+ method: 'put',
588
682
  body: config.body,
589
- urlParams: {},
683
+ urlParams: config.urlParams,
590
684
  queryParams: {},
591
685
  headers,
592
686
  priority: 'normal',
593
687
  };
594
688
  }
595
689
 
596
- const adapterName$3 = 'createInvoicesBatchScheduler';
597
- const createInvoicesBatchScheduler_ConfigPropertyMetadata = [
690
+ const adapterName$3 = 'editInvoicesBatchScheduler';
691
+ const editInvoicesBatchScheduler_ConfigPropertyMetadata = [
692
+ generateParamConfigMetadata('billingBatchSchedulerId', true, 0 /* UrlParameter */, 0 /* String */),
598
693
  generateParamConfigMetadata('BatchInvoiceSchedulerInput', true, 2 /* Body */, 4 /* Unsupported */),
599
694
  ];
600
- const createInvoicesBatchScheduler_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, createInvoicesBatchScheduler_ConfigPropertyMetadata);
601
- const createResourceParams$3 = /*#__PURE__*/ createResourceParams$5(createInvoicesBatchScheduler_ConfigPropertyMetadata);
695
+ const editInvoicesBatchScheduler_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, editInvoicesBatchScheduler_ConfigPropertyMetadata);
696
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$6(editInvoicesBatchScheduler_ConfigPropertyMetadata);
602
697
  function typeCheckConfig$3(untrustedConfig) {
603
698
  const config = {};
699
+ typeCheckConfig$6(untrustedConfig, config, editInvoicesBatchScheduler_ConfigPropertyMetadata);
604
700
  const untrustedConfig_BatchInvoiceSchedulerInput = untrustedConfig.BatchInvoiceSchedulerInput;
605
701
  const referenceBatchInvoiceSchedulerInputRepresentationValidationError = validate$5(untrustedConfig_BatchInvoiceSchedulerInput);
606
702
  if (referenceBatchInvoiceSchedulerInputRepresentationValidationError === null) {
@@ -639,12 +735,12 @@ function buildNetworkSnapshot$3(luvio, config, options) {
639
735
  throw response;
640
736
  });
641
737
  }
642
- const createInvoicesBatchSchedulerAdapterFactory = (luvio) => {
643
- return function createInvoicesBatchScheduler(untrustedConfig) {
644
- const config = validateAdapterConfig$3(untrustedConfig, createInvoicesBatchScheduler_ConfigPropertyNames);
738
+ const editInvoicesBatchSchedulerAdapterFactory = (luvio) => {
739
+ return function editInvoicesBatchScheduler(untrustedConfig) {
740
+ const config = validateAdapterConfig$3(untrustedConfig, editInvoicesBatchScheduler_ConfigPropertyNames);
645
741
  // Invalid or incomplete config
646
742
  if (config === null) {
647
- throw new Error('Invalid config for "createInvoicesBatchScheduler"');
743
+ throw new Error('Invalid config for "editInvoicesBatchScheduler"');
648
744
  }
649
745
  return buildNetworkSnapshot$3(luvio, config);
650
746
  };
@@ -783,14 +879,14 @@ const postBatchDraftInvoices_ConfigPropertyMetadata = [
783
879
  generateParamConfigMetadata('invoiceBatchRunId', true, 0 /* UrlParameter */, 0 /* String */),
784
880
  ];
785
881
  const postBatchDraftInvoices_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, postBatchDraftInvoices_ConfigPropertyMetadata);
786
- const createResourceParams$2 = /*#__PURE__*/ createResourceParams$5(postBatchDraftInvoices_ConfigPropertyMetadata);
882
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$6(postBatchDraftInvoices_ConfigPropertyMetadata);
787
883
  function keyBuilder$2(luvio, config) {
788
884
  const resourceParams = createResourceParams$2(config);
789
885
  return keyBuilder$3(luvio, resourceParams);
790
886
  }
791
887
  function typeCheckConfig$2(untrustedConfig) {
792
888
  const config = {};
793
- typeCheckConfig$5(untrustedConfig, config, postBatchDraftInvoices_ConfigPropertyMetadata);
889
+ typeCheckConfig$6(untrustedConfig, config, postBatchDraftInvoices_ConfigPropertyMetadata);
794
890
  return config;
795
891
  }
796
892
  function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
@@ -1074,10 +1170,10 @@ const postBatchInvoiceDocGen_ConfigPropertyMetadata = [
1074
1170
  generateParamConfigMetadata('actionName', true, 0 /* UrlParameter */, 0 /* String */),
1075
1171
  ];
1076
1172
  const postBatchInvoiceDocGen_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, postBatchInvoiceDocGen_ConfigPropertyMetadata);
1077
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$5(postBatchInvoiceDocGen_ConfigPropertyMetadata);
1173
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$6(postBatchInvoiceDocGen_ConfigPropertyMetadata);
1078
1174
  function typeCheckConfig$1(untrustedConfig) {
1079
1175
  const config = {};
1080
- typeCheckConfig$5(untrustedConfig, config, postBatchInvoiceDocGen_ConfigPropertyMetadata);
1176
+ typeCheckConfig$6(untrustedConfig, config, postBatchInvoiceDocGen_ConfigPropertyMetadata);
1081
1177
  return config;
1082
1178
  }
1083
1179
  function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
@@ -1253,10 +1349,10 @@ const postCronExecutionDates_ConfigPropertyMetadata = [
1253
1349
  generateParamConfigMetadata('preferredTime', true, 2 /* Body */, 0 /* String */),
1254
1350
  ];
1255
1351
  const postCronExecutionDates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, postCronExecutionDates_ConfigPropertyMetadata);
1256
- const createResourceParams = /*#__PURE__*/ createResourceParams$5(postCronExecutionDates_ConfigPropertyMetadata);
1352
+ const createResourceParams = /*#__PURE__*/ createResourceParams$6(postCronExecutionDates_ConfigPropertyMetadata);
1257
1353
  function typeCheckConfig(untrustedConfig) {
1258
1354
  const config = {};
1259
- typeCheckConfig$5(untrustedConfig, config, postCronExecutionDates_ConfigPropertyMetadata);
1355
+ typeCheckConfig$6(untrustedConfig, config, postCronExecutionDates_ConfigPropertyMetadata);
1260
1356
  const untrustedConfig_frequencyCadenceOptions = untrustedConfig.frequencyCadenceOptions;
1261
1357
  config.frequencyCadenceOptions = untrustedConfig_frequencyCadenceOptions;
1262
1358
  return config;
@@ -1303,4 +1399,4 @@ const postCronExecutionDatesAdapterFactory = (luvio) => {
1303
1399
  };
1304
1400
  };
1305
1401
 
1306
- export { createInvoicesBatchSchedulerAdapterFactory, createPaymentsBatchSchedulerAdapterFactory, postBatchDraftInvoicesAdapterFactory, postBatchInvoiceDocGenAdapterFactory, postCronExecutionDatesAdapterFactory };
1402
+ export { createInvoicesBatchSchedulerAdapterFactory, createPaymentsBatchSchedulerAdapterFactory, editInvoicesBatchSchedulerAdapterFactory, postBatchDraftInvoicesAdapterFactory, postBatchInvoiceDocGenAdapterFactory, postCronExecutionDatesAdapterFactory };
@@ -0,0 +1,17 @@
1
+ import { AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata, Luvio as $64$luvio_engine_Luvio, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
2
+ import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
3
+ import { BatchInvoiceSchedulerInputRepresentation as types_BatchInvoiceSchedulerInputRepresentation_BatchInvoiceSchedulerInputRepresentation } from '../types/BatchInvoiceSchedulerInputRepresentation';
4
+ import { ResourceRequestConfig as resources_putCommerceInvoicingInvoiceSchedulersByBillingBatchSchedulerId_ResourceRequestConfig } from '../resources/putCommerceInvoicingInvoiceSchedulersByBillingBatchSchedulerId';
5
+ import { InvoicesBatchSchedulerOutputRepresentation as types_InvoicesBatchSchedulerOutputRepresentation_InvoicesBatchSchedulerOutputRepresentation } from '../types/InvoicesBatchSchedulerOutputRepresentation';
6
+ export declare const adapterName = "editInvoicesBatchScheduler";
7
+ export declare const editInvoicesBatchScheduler_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
8
+ export declare const editInvoicesBatchScheduler_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
9
+ export interface EditInvoicesBatchSchedulerConfig {
10
+ billingBatchSchedulerId: string;
11
+ BatchInvoiceSchedulerInput: types_BatchInvoiceSchedulerInputRepresentation_BatchInvoiceSchedulerInputRepresentation;
12
+ }
13
+ export declare const createResourceParams: (config: EditInvoicesBatchSchedulerConfig) => resources_putCommerceInvoicingInvoiceSchedulersByBillingBatchSchedulerId_ResourceRequestConfig;
14
+ export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<EditInvoicesBatchSchedulerConfig>): adapter$45$utils_Untrusted<EditInvoicesBatchSchedulerConfig>;
15
+ export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): EditInvoicesBatchSchedulerConfig | null;
16
+ export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: EditInvoicesBatchSchedulerConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<import("@luvio/engine").FulfilledSnapshot<types_InvoicesBatchSchedulerOutputRepresentation_InvoicesBatchSchedulerOutputRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_InvoicesBatchSchedulerOutputRepresentation_InvoicesBatchSchedulerOutputRepresentation, {}> | import("@luvio/engine").PendingSnapshot<types_InvoicesBatchSchedulerOutputRepresentation_InvoicesBatchSchedulerOutputRepresentation, any>>;
17
+ export declare const editInvoicesBatchSchedulerAdapterFactory: $64$luvio_engine_AdapterFactory<EditInvoicesBatchSchedulerConfig, types_InvoicesBatchSchedulerOutputRepresentation_InvoicesBatchSchedulerOutputRepresentation>;
@@ -1,5 +1,6 @@
1
1
  export { createPaymentsBatchSchedulerAdapterFactory } from '../adapters/createPaymentsBatchScheduler';
2
2
  export { createInvoicesBatchSchedulerAdapterFactory } from '../adapters/createInvoicesBatchScheduler';
3
+ export { editInvoicesBatchSchedulerAdapterFactory } from '../adapters/editInvoicesBatchScheduler';
3
4
  export { postBatchDraftInvoicesAdapterFactory } from '../adapters/postBatchDraftInvoices';
4
5
  export { postBatchInvoiceDocGenAdapterFactory } from '../adapters/postBatchInvoiceDocGen';
5
6
  export { postCronExecutionDatesAdapterFactory } from '../adapters/postCronExecutionDates';
@@ -1,7 +1,8 @@
1
1
  declare let createInvoicesBatchScheduler: any;
2
2
  declare let createPaymentsBatchScheduler: any;
3
+ declare let editInvoicesBatchScheduler: any;
3
4
  declare let postBatchDraftInvoices: any;
4
5
  declare let postBatchInvoiceDocGen: any;
5
6
  declare let postCronExecutionDates: any;
6
7
  declare let postBatchDraftInvoices_imperative: any;
7
- export { createInvoicesBatchScheduler, createPaymentsBatchScheduler, postBatchDraftInvoices, postBatchInvoiceDocGen, postCronExecutionDates, postBatchDraftInvoices_imperative, };
8
+ export { createInvoicesBatchScheduler, createPaymentsBatchScheduler, editInvoicesBatchScheduler, postBatchDraftInvoices, postBatchInvoiceDocGen, postCronExecutionDates, postBatchDraftInvoices_imperative, };
@@ -0,0 +1,16 @@
1
+ import { BatchInvoiceSchedulerInputRepresentation as types_BatchInvoiceSchedulerInputRepresentation_BatchInvoiceSchedulerInputRepresentation } from '../types/BatchInvoiceSchedulerInputRepresentation';
2
+ import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment, FetchResponse as $64$luvio_engine_FetchResponse, FulfilledSnapshot as $64$luvio_engine_FulfilledSnapshot, StaleSnapshot as $64$luvio_engine_StaleSnapshot, PendingSnapshot as $64$luvio_engine_PendingSnapshot, ResourceRequest as $64$luvio_engine_ResourceRequest } from '@luvio/engine';
3
+ import { InvoicesBatchSchedulerOutputRepresentation as types_InvoicesBatchSchedulerOutputRepresentation_InvoicesBatchSchedulerOutputRepresentation } from '../types/InvoicesBatchSchedulerOutputRepresentation';
4
+ export interface ResourceRequestConfig {
5
+ urlParams: {
6
+ billingBatchSchedulerId: string;
7
+ };
8
+ body: {
9
+ BatchInvoiceSchedulerInput: types_BatchInvoiceSchedulerInputRepresentation_BatchInvoiceSchedulerInputRepresentation;
10
+ };
11
+ }
12
+ export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
13
+ export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_InvoicesBatchSchedulerOutputRepresentation_InvoicesBatchSchedulerOutputRepresentation): void;
14
+ export declare function ingestSuccess(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_InvoicesBatchSchedulerOutputRepresentation_InvoicesBatchSchedulerOutputRepresentation>): $64$luvio_engine_FulfilledSnapshot<types_InvoicesBatchSchedulerOutputRepresentation_InvoicesBatchSchedulerOutputRepresentation, {}> | $64$luvio_engine_StaleSnapshot<types_InvoicesBatchSchedulerOutputRepresentation_InvoicesBatchSchedulerOutputRepresentation, {}> | $64$luvio_engine_PendingSnapshot<types_InvoicesBatchSchedulerOutputRepresentation_InvoicesBatchSchedulerOutputRepresentation, any>;
15
+ export declare function createResourceRequest(config: ResourceRequestConfig): $64$luvio_engine_ResourceRequest;
16
+ export default createResourceRequest;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-revenue-billing-batch",
3
- "version": "1.316.0",
3
+ "version": "1.318.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "This API family is meant for all APIs required for Billing Batch.",
6
6
  "main": "dist/es/es2018/revenue-billing-batch.js",
@@ -40,11 +40,11 @@
40
40
  "test:unit": "jest"
41
41
  },
42
42
  "dependencies": {
43
- "@salesforce/lds-bindings": "^1.316.0"
43
+ "@salesforce/lds-bindings": "^1.318.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@salesforce/lds-compiler-plugins": "^1.316.0",
47
- "@salesforce/lds-karma": "^1.316.0"
46
+ "@salesforce/lds-compiler-plugins": "^1.318.0",
47
+ "@salesforce/lds-karma": "^1.318.0"
48
48
  },
49
49
  "nx": {
50
50
  "targets": {
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, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1, typeCheckConfig as typeCheckConfig$5 } from 'force/luvioEngine';
17
+ import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$6, typeCheckConfig as typeCheckConfig$6, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1 } from 'force/luvioEngine';
18
18
 
19
19
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
20
20
  const { keys: ObjectKeys, create: ObjectCreate } = Object;
@@ -287,7 +287,7 @@ function keyBuilderFromType$3(luvio, object) {
287
287
  function normalize$4(input, existing, path, luvio, store, timestamp) {
288
288
  return input;
289
289
  }
290
- const select$a = function InvoicesBatchSchedulerOutputRepresentationSelect() {
290
+ const select$b = function InvoicesBatchSchedulerOutputRepresentationSelect() {
291
291
  return {
292
292
  kind: 'Fragment',
293
293
  version: VERSION$5,
@@ -323,19 +323,19 @@ function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
323
323
  });
324
324
  }
325
325
 
326
- function select$9(luvio, params) {
327
- return select$a();
326
+ function select$a(luvio, params) {
327
+ return select$b();
328
328
  }
329
- function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
329
+ function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
330
330
  getTypeCacheKeys$4(storeKeyMap, luvio, response);
331
331
  }
332
- function ingestSuccess$4(luvio, resourceParams, response) {
332
+ function ingestSuccess$5(luvio, resourceParams, response) {
333
333
  const { body } = response;
334
334
  const key = keyBuilderFromType$3(luvio, body);
335
335
  luvio.storeIngest(key, ingest$4, body);
336
336
  const snapshot = luvio.storeLookup({
337
337
  recordId: key,
338
- node: select$9(),
338
+ node: select$a(),
339
339
  variables: {},
340
340
  });
341
341
  if (process.env.NODE_ENV !== 'production') {
@@ -346,7 +346,7 @@ function ingestSuccess$4(luvio, resourceParams, response) {
346
346
  deepFreeze(snapshot.data);
347
347
  return snapshot;
348
348
  }
349
- function createResourceRequest$4(config) {
349
+ function createResourceRequest$5(config) {
350
350
  const headers = {};
351
351
  return {
352
352
  baseUri: '/services/data/v63.0',
@@ -360,13 +360,13 @@ function createResourceRequest$4(config) {
360
360
  };
361
361
  }
362
362
 
363
- const adapterName$4 = 'createInvoicesBatchScheduler';
363
+ const adapterName$5 = 'createInvoicesBatchScheduler';
364
364
  const createInvoicesBatchScheduler_ConfigPropertyMetadata = [
365
365
  generateParamConfigMetadata('BatchInvoiceSchedulerInput', true, 2 /* Body */, 4 /* Unsupported */),
366
366
  ];
367
- const createInvoicesBatchScheduler_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, createInvoicesBatchScheduler_ConfigPropertyMetadata);
368
- const createResourceParams$4 = /*#__PURE__*/ createResourceParams$5(createInvoicesBatchScheduler_ConfigPropertyMetadata);
369
- function typeCheckConfig$4(untrustedConfig) {
367
+ const createInvoicesBatchScheduler_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, createInvoicesBatchScheduler_ConfigPropertyMetadata);
368
+ const createResourceParams$5 = /*#__PURE__*/ createResourceParams$6(createInvoicesBatchScheduler_ConfigPropertyMetadata);
369
+ function typeCheckConfig$5(untrustedConfig) {
370
370
  const config = {};
371
371
  const untrustedConfig_BatchInvoiceSchedulerInput = untrustedConfig.BatchInvoiceSchedulerInput;
372
372
  const referenceBatchInvoiceSchedulerInputRepresentationValidationError = validate$9(untrustedConfig_BatchInvoiceSchedulerInput);
@@ -375,30 +375,30 @@ function typeCheckConfig$4(untrustedConfig) {
375
375
  }
376
376
  return config;
377
377
  }
378
- function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
378
+ function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
379
379
  if (!untrustedIsObject(untrustedConfig)) {
380
380
  return null;
381
381
  }
382
382
  if (process.env.NODE_ENV !== 'production') {
383
383
  validateConfig(untrustedConfig, configPropertyNames);
384
384
  }
385
- const config = typeCheckConfig$4(untrustedConfig);
385
+ const config = typeCheckConfig$5(untrustedConfig);
386
386
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
387
387
  return null;
388
388
  }
389
389
  return config;
390
390
  }
391
- function buildNetworkSnapshot$4(luvio, config, options) {
392
- const resourceParams = createResourceParams$4(config);
393
- const request = createResourceRequest$4(resourceParams);
391
+ function buildNetworkSnapshot$5(luvio, config, options) {
392
+ const resourceParams = createResourceParams$5(config);
393
+ const request = createResourceRequest$5(resourceParams);
394
394
  return luvio.dispatchResourceRequest(request, options)
395
395
  .then((response) => {
396
396
  return luvio.handleSuccessResponse(() => {
397
- const snapshot = ingestSuccess$4(luvio, resourceParams, response);
397
+ const snapshot = ingestSuccess$5(luvio, resourceParams, response);
398
398
  return luvio.storeBroadcast().then(() => snapshot);
399
399
  }, () => {
400
400
  const cache = new StoreKeyMap();
401
- getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
401
+ getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
402
402
  return cache;
403
403
  });
404
404
  }, (response) => {
@@ -408,12 +408,12 @@ function buildNetworkSnapshot$4(luvio, config, options) {
408
408
  }
409
409
  const createInvoicesBatchSchedulerAdapterFactory = (luvio) => {
410
410
  return function createInvoicesBatchScheduler(untrustedConfig) {
411
- const config = validateAdapterConfig$4(untrustedConfig, createInvoicesBatchScheduler_ConfigPropertyNames);
411
+ const config = validateAdapterConfig$5(untrustedConfig, createInvoicesBatchScheduler_ConfigPropertyNames);
412
412
  // Invalid or incomplete config
413
413
  if (config === null) {
414
414
  throw new Error('Invalid config for "createInvoicesBatchScheduler"');
415
415
  }
416
- return buildNetworkSnapshot$4(luvio, config);
416
+ return buildNetworkSnapshot$5(luvio, config);
417
417
  };
418
418
  };
419
419
 
@@ -530,7 +530,7 @@ function keyBuilderFromType$2(luvio, object) {
530
530
  function normalize$3(input, existing, path, luvio, store, timestamp) {
531
531
  return input;
532
532
  }
533
- const select$8 = function PaymentsBatchSchedulerOutputRepresentationSelect() {
533
+ const select$9 = function PaymentsBatchSchedulerOutputRepresentationSelect() {
534
534
  return {
535
535
  kind: 'Fragment',
536
536
  version: VERSION$4,
@@ -566,19 +566,19 @@ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
566
566
  });
567
567
  }
568
568
 
569
- function select$7(luvio, params) {
570
- return select$8();
569
+ function select$8(luvio, params) {
570
+ return select$9();
571
571
  }
572
- function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
572
+ function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
573
573
  getTypeCacheKeys$3(storeKeyMap, luvio, response);
574
574
  }
575
- function ingestSuccess$3(luvio, resourceParams, response) {
575
+ function ingestSuccess$4(luvio, resourceParams, response) {
576
576
  const { body } = response;
577
577
  const key = keyBuilderFromType$2(luvio, body);
578
578
  luvio.storeIngest(key, ingest$3, body);
579
579
  const snapshot = luvio.storeLookup({
580
580
  recordId: key,
581
- node: select$7(),
581
+ node: select$8(),
582
582
  variables: {},
583
583
  });
584
584
  if (process.env.NODE_ENV !== 'production') {
@@ -589,7 +589,7 @@ function ingestSuccess$3(luvio, resourceParams, response) {
589
589
  deepFreeze(snapshot.data);
590
590
  return snapshot;
591
591
  }
592
- function createResourceRequest$3(config) {
592
+ function createResourceRequest$4(config) {
593
593
  const headers = {};
594
594
  return {
595
595
  baseUri: '/services/data/v63.0',
@@ -603,13 +603,13 @@ function createResourceRequest$3(config) {
603
603
  };
604
604
  }
605
605
 
606
- const adapterName$3 = 'createPaymentsBatchScheduler';
606
+ const adapterName$4 = 'createPaymentsBatchScheduler';
607
607
  const createPaymentsBatchScheduler_ConfigPropertyMetadata = [
608
608
  generateParamConfigMetadata('PaymentsBatchSchedulerInput', true, 2 /* Body */, 4 /* Unsupported */),
609
609
  ];
610
- const createPaymentsBatchScheduler_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, createPaymentsBatchScheduler_ConfigPropertyMetadata);
611
- const createResourceParams$3 = /*#__PURE__*/ createResourceParams$5(createPaymentsBatchScheduler_ConfigPropertyMetadata);
612
- function typeCheckConfig$3(untrustedConfig) {
610
+ const createPaymentsBatchScheduler_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, createPaymentsBatchScheduler_ConfigPropertyMetadata);
611
+ const createResourceParams$4 = /*#__PURE__*/ createResourceParams$6(createPaymentsBatchScheduler_ConfigPropertyMetadata);
612
+ function typeCheckConfig$4(untrustedConfig) {
613
613
  const config = {};
614
614
  const untrustedConfig_PaymentsBatchSchedulerInput = untrustedConfig.PaymentsBatchSchedulerInput;
615
615
  const referencePaymentsBatchSchedulerInputRepresentationValidationError = validate$5(untrustedConfig_PaymentsBatchSchedulerInput);
@@ -618,6 +618,102 @@ function typeCheckConfig$3(untrustedConfig) {
618
618
  }
619
619
  return config;
620
620
  }
621
+ function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
622
+ if (!untrustedIsObject(untrustedConfig)) {
623
+ return null;
624
+ }
625
+ if (process.env.NODE_ENV !== 'production') {
626
+ validateConfig(untrustedConfig, configPropertyNames);
627
+ }
628
+ const config = typeCheckConfig$4(untrustedConfig);
629
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
630
+ return null;
631
+ }
632
+ return config;
633
+ }
634
+ function buildNetworkSnapshot$4(luvio, config, options) {
635
+ const resourceParams = createResourceParams$4(config);
636
+ const request = createResourceRequest$4(resourceParams);
637
+ return luvio.dispatchResourceRequest(request, options)
638
+ .then((response) => {
639
+ return luvio.handleSuccessResponse(() => {
640
+ const snapshot = ingestSuccess$4(luvio, resourceParams, response);
641
+ return luvio.storeBroadcast().then(() => snapshot);
642
+ }, () => {
643
+ const cache = new StoreKeyMap();
644
+ getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
645
+ return cache;
646
+ });
647
+ }, (response) => {
648
+ deepFreeze(response);
649
+ throw response;
650
+ });
651
+ }
652
+ const createPaymentsBatchSchedulerAdapterFactory = (luvio) => {
653
+ return function createPaymentsBatchScheduler(untrustedConfig) {
654
+ const config = validateAdapterConfig$4(untrustedConfig, createPaymentsBatchScheduler_ConfigPropertyNames);
655
+ // Invalid or incomplete config
656
+ if (config === null) {
657
+ throw new Error('Invalid config for "createPaymentsBatchScheduler"');
658
+ }
659
+ return buildNetworkSnapshot$4(luvio, config);
660
+ };
661
+ };
662
+
663
+ function select$7(luvio, params) {
664
+ return select$b();
665
+ }
666
+ function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
667
+ getTypeCacheKeys$4(storeKeyMap, luvio, response);
668
+ }
669
+ function ingestSuccess$3(luvio, resourceParams, response) {
670
+ const { body } = response;
671
+ const key = keyBuilderFromType$3(luvio, body);
672
+ luvio.storeIngest(key, ingest$4, body);
673
+ const snapshot = luvio.storeLookup({
674
+ recordId: key,
675
+ node: select$7(),
676
+ variables: {},
677
+ });
678
+ if (process.env.NODE_ENV !== 'production') {
679
+ if (snapshot.state !== 'Fulfilled') {
680
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
681
+ }
682
+ }
683
+ deepFreeze(snapshot.data);
684
+ return snapshot;
685
+ }
686
+ function createResourceRequest$3(config) {
687
+ const headers = {};
688
+ return {
689
+ baseUri: '/services/data/v63.0',
690
+ basePath: '/commerce/invoicing/invoice-schedulers/' + config.urlParams.billingBatchSchedulerId + '',
691
+ method: 'put',
692
+ body: config.body,
693
+ urlParams: config.urlParams,
694
+ queryParams: {},
695
+ headers,
696
+ priority: 'normal',
697
+ };
698
+ }
699
+
700
+ const adapterName$3 = 'editInvoicesBatchScheduler';
701
+ const editInvoicesBatchScheduler_ConfigPropertyMetadata = [
702
+ generateParamConfigMetadata('billingBatchSchedulerId', true, 0 /* UrlParameter */, 0 /* String */),
703
+ generateParamConfigMetadata('BatchInvoiceSchedulerInput', true, 2 /* Body */, 4 /* Unsupported */),
704
+ ];
705
+ const editInvoicesBatchScheduler_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, editInvoicesBatchScheduler_ConfigPropertyMetadata);
706
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$6(editInvoicesBatchScheduler_ConfigPropertyMetadata);
707
+ function typeCheckConfig$3(untrustedConfig) {
708
+ const config = {};
709
+ typeCheckConfig$6(untrustedConfig, config, editInvoicesBatchScheduler_ConfigPropertyMetadata);
710
+ const untrustedConfig_BatchInvoiceSchedulerInput = untrustedConfig.BatchInvoiceSchedulerInput;
711
+ const referenceBatchInvoiceSchedulerInputRepresentationValidationError = validate$9(untrustedConfig_BatchInvoiceSchedulerInput);
712
+ if (referenceBatchInvoiceSchedulerInputRepresentationValidationError === null) {
713
+ config.BatchInvoiceSchedulerInput = untrustedConfig_BatchInvoiceSchedulerInput;
714
+ }
715
+ return config;
716
+ }
621
717
  function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
622
718
  if (!untrustedIsObject(untrustedConfig)) {
623
719
  return null;
@@ -649,12 +745,12 @@ function buildNetworkSnapshot$3(luvio, config, options) {
649
745
  throw response;
650
746
  });
651
747
  }
652
- const createPaymentsBatchSchedulerAdapterFactory = (luvio) => {
653
- return function createPaymentsBatchScheduler(untrustedConfig) {
654
- const config = validateAdapterConfig$3(untrustedConfig, createPaymentsBatchScheduler_ConfigPropertyNames);
748
+ const editInvoicesBatchSchedulerAdapterFactory = (luvio) => {
749
+ return function editInvoicesBatchScheduler(untrustedConfig) {
750
+ const config = validateAdapterConfig$3(untrustedConfig, editInvoicesBatchScheduler_ConfigPropertyNames);
655
751
  // Invalid or incomplete config
656
752
  if (config === null) {
657
- throw new Error('Invalid config for "createPaymentsBatchScheduler"');
753
+ throw new Error('Invalid config for "editInvoicesBatchScheduler"');
658
754
  }
659
755
  return buildNetworkSnapshot$3(luvio, config);
660
756
  };
@@ -793,14 +889,14 @@ const postBatchDraftInvoices_ConfigPropertyMetadata = [
793
889
  generateParamConfigMetadata('invoiceBatchRunId', true, 0 /* UrlParameter */, 0 /* String */),
794
890
  ];
795
891
  const postBatchDraftInvoices_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, postBatchDraftInvoices_ConfigPropertyMetadata);
796
- const createResourceParams$2 = /*#__PURE__*/ createResourceParams$5(postBatchDraftInvoices_ConfigPropertyMetadata);
892
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$6(postBatchDraftInvoices_ConfigPropertyMetadata);
797
893
  function keyBuilder$2(luvio, config) {
798
894
  const resourceParams = createResourceParams$2(config);
799
895
  return keyBuilder$3(luvio, resourceParams);
800
896
  }
801
897
  function typeCheckConfig$2(untrustedConfig) {
802
898
  const config = {};
803
- typeCheckConfig$5(untrustedConfig, config, postBatchDraftInvoices_ConfigPropertyMetadata);
899
+ typeCheckConfig$6(untrustedConfig, config, postBatchDraftInvoices_ConfigPropertyMetadata);
804
900
  return config;
805
901
  }
806
902
  function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
@@ -1084,10 +1180,10 @@ const postBatchInvoiceDocGen_ConfigPropertyMetadata = [
1084
1180
  generateParamConfigMetadata('actionName', true, 0 /* UrlParameter */, 0 /* String */),
1085
1181
  ];
1086
1182
  const postBatchInvoiceDocGen_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, postBatchInvoiceDocGen_ConfigPropertyMetadata);
1087
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$5(postBatchInvoiceDocGen_ConfigPropertyMetadata);
1183
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$6(postBatchInvoiceDocGen_ConfigPropertyMetadata);
1088
1184
  function typeCheckConfig$1(untrustedConfig) {
1089
1185
  const config = {};
1090
- typeCheckConfig$5(untrustedConfig, config, postBatchInvoiceDocGen_ConfigPropertyMetadata);
1186
+ typeCheckConfig$6(untrustedConfig, config, postBatchInvoiceDocGen_ConfigPropertyMetadata);
1091
1187
  return config;
1092
1188
  }
1093
1189
  function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
@@ -1263,10 +1359,10 @@ const postCronExecutionDates_ConfigPropertyMetadata = [
1263
1359
  generateParamConfigMetadata('preferredTime', true, 2 /* Body */, 0 /* String */),
1264
1360
  ];
1265
1361
  const postCronExecutionDates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, postCronExecutionDates_ConfigPropertyMetadata);
1266
- const createResourceParams = /*#__PURE__*/ createResourceParams$5(postCronExecutionDates_ConfigPropertyMetadata);
1362
+ const createResourceParams = /*#__PURE__*/ createResourceParams$6(postCronExecutionDates_ConfigPropertyMetadata);
1267
1363
  function typeCheckConfig(untrustedConfig) {
1268
1364
  const config = {};
1269
- typeCheckConfig$5(untrustedConfig, config, postCronExecutionDates_ConfigPropertyMetadata);
1365
+ typeCheckConfig$6(untrustedConfig, config, postCronExecutionDates_ConfigPropertyMetadata);
1270
1366
  const untrustedConfig_frequencyCadenceOptions = untrustedConfig.frequencyCadenceOptions;
1271
1367
  config.frequencyCadenceOptions = untrustedConfig_frequencyCadenceOptions;
1272
1368
  return config;
@@ -1315,6 +1411,7 @@ const postCronExecutionDatesAdapterFactory = (luvio) => {
1315
1411
 
1316
1412
  let createInvoicesBatchScheduler;
1317
1413
  let createPaymentsBatchScheduler;
1414
+ let editInvoicesBatchScheduler;
1318
1415
  let postBatchDraftInvoices;
1319
1416
  let postBatchInvoiceDocGen;
1320
1417
  let postCronExecutionDates;
@@ -1336,6 +1433,7 @@ function bindExportsTo(luvio) {
1336
1433
  return {
1337
1434
  createInvoicesBatchScheduler: unwrapSnapshotData(createInvoicesBatchSchedulerAdapterFactory),
1338
1435
  createPaymentsBatchScheduler: unwrapSnapshotData(createPaymentsBatchSchedulerAdapterFactory),
1436
+ editInvoicesBatchScheduler: unwrapSnapshotData(editInvoicesBatchSchedulerAdapterFactory),
1339
1437
  postBatchDraftInvoices: createWireAdapterConstructor(luvio, postBatchDraftInvoices_ldsAdapter, postBatchDraftInvoicesMetadata),
1340
1438
  postBatchInvoiceDocGen: unwrapSnapshotData(postBatchInvoiceDocGenAdapterFactory),
1341
1439
  postCronExecutionDates: unwrapSnapshotData(postCronExecutionDatesAdapterFactory),
@@ -1348,6 +1446,7 @@ withDefaultLuvio((luvio) => {
1348
1446
  ({
1349
1447
  createInvoicesBatchScheduler,
1350
1448
  createPaymentsBatchScheduler,
1449
+ editInvoicesBatchScheduler,
1351
1450
  postBatchDraftInvoices,
1352
1451
  postBatchInvoiceDocGen,
1353
1452
  postCronExecutionDates,
@@ -1355,5 +1454,5 @@ withDefaultLuvio((luvio) => {
1355
1454
  } = bindExportsTo(luvio));
1356
1455
  });
1357
1456
 
1358
- export { createInvoicesBatchScheduler, createPaymentsBatchScheduler, postBatchDraftInvoices, postBatchDraftInvoices_imperative, postBatchInvoiceDocGen, postCronExecutionDates };
1359
- // version: 1.316.0-4453f1e2b6
1457
+ export { createInvoicesBatchScheduler, createPaymentsBatchScheduler, editInvoicesBatchScheduler, postBatchDraftInvoices, postBatchDraftInvoices_imperative, postBatchInvoiceDocGen, postCronExecutionDates };
1458
+ // version: 1.318.0-46c39b8717
package/src/raml/api.raml CHANGED
@@ -310,7 +310,24 @@ types:
310
310
  type: BatchInvoiceSchedulerInputWrapperRepresentation
311
311
  #required: false # TODO handrolled W-9314597
312
312
  (oas-body-name): BatchInvoiceSchedulerInput
313
-
313
+ /commerce/invoicing/invoice-schedulers/{billingBatchSchedulerId}:
314
+ put:
315
+ displayName: editInvoicesBatchScheduler
316
+ description: Edit Invoices Batch Job Scheduler
317
+ responses:
318
+ '200':
319
+ description: Success
320
+ body:
321
+ application/json:
322
+ type: InvoicesBatchSchedulerOutputRepresentation
323
+ body:
324
+ application/json:
325
+ type: BatchInvoiceSchedulerInputWrapperRepresentation
326
+ (oas-body-name): BatchInvoiceSchedulerInput
327
+ uriParameters:
328
+ billingBatchSchedulerId:
329
+ type: string
330
+ required: true
314
331
  /commerce/invoicing/invoice-batch-runs/{invoiceBatchRunId}/actions/draft-to-posted:
315
332
  post:
316
333
  displayName: postInvoiceBatchDraftToPosted
@@ -331,6 +331,260 @@ types:
331
331
  }
332
332
  }
333
333
 
334
+ /commerce/invoicing/invoice-schedulers/{billingBatchSchedulerId}:
335
+ put:
336
+ (luvio.adapter):
337
+ name: editInvoicesBatchScheduler
338
+ tests:
339
+ validConfigs:
340
+ - |
341
+ {
342
+ "billingBatchSchedulerId": "5BSxx0000004CoyGAE",
343
+ "BatchInvoiceSchedulerInput":
344
+ {
345
+ "schedulerName": "Invoice Batch Scheduler",
346
+ "startDate": "2021-05-11",
347
+ "endDate": "2021-05-15",
348
+ "preferredTime": "10:00 AM",
349
+ "frequencyCadence": "Monthly",
350
+ "timezone": "America/Los_Angeles",
351
+ "status" : "Active",
352
+ "frequencyCadenceOptions": {
353
+ "recurringSubType": "Every",
354
+ "recursOn": "First",
355
+ "recursOnDay": "Monday"
356
+ },
357
+ "filterCriteria":
358
+ [
359
+ {
360
+ "objectName": "BillingSchedule",
361
+ "fieldName": "Currency_Iso_code",
362
+ "operation": "Equals",
363
+ "value": "USD",
364
+ "criteriaSequence": 1
365
+ },
366
+ {
367
+ "objectName": "BillingSchedule",
368
+ "fieldName": "InvoiceRunBatch",
369
+ "operation": "Equals",
370
+ "value": "Batch1",
371
+ "criteriaSequence": 2
372
+ }
373
+ ]
374
+ }
375
+ }
376
+ - |
377
+ {
378
+ "billingBatchSchedulerId": "5BSxx0000004CoyGAE",
379
+ "BatchInvoiceSchedulerInput":
380
+ {
381
+ "schedulerName": "Invoice Batch Scheduler",
382
+ "startDate": "2021-05-11",
383
+ "endDate": "2021-05-15",
384
+ "preferredTime": "10:00 AM",
385
+ "frequencyCadence": "Monthly",
386
+ "timezone": "America/Los_Angeles",
387
+ "status" : "Active",
388
+ "frequencyCadenceOptions": {
389
+ "recurringSubType": "SpecificDate",
390
+ "recursOnDate": "21"
391
+ },
392
+ "filterCriteria":
393
+ [
394
+ {
395
+ "objectName": "BillingSchedule",
396
+ "fieldName": "Currency_Iso_code",
397
+ "operation": "Equals",
398
+ "value": "USD",
399
+ "criteriaSequence": 1
400
+ },
401
+ {
402
+ "objectName": "BillingSchedule",
403
+ "fieldName": "InvoiceRunBatch",
404
+ "operation": "Equals",
405
+ "value": "Batch1",
406
+ "criteriaSequence": 2
407
+ }
408
+ ]
409
+ }
410
+ }
411
+ - |
412
+ {
413
+ "billingBatchSchedulerId": "5BSxx0000004CoyGAE",
414
+ "BatchInvoiceSchedulerInput":
415
+ {
416
+ "schedulerName": "Invoice Batch Scheduler",
417
+ "startDate": "2021-05-11",
418
+ "endDate": "2021-05-15",
419
+ "preferredTime": "10:00 AM",
420
+ "frequencyCadence": "Daily",
421
+ "timezone": "America/Los_Angeles",
422
+ "status" : "Active",
423
+ "frequencyCadenceOptions": {
424
+ },
425
+ "filterCriteria":
426
+ [
427
+ {
428
+ "objectName": "BillingSchedule",
429
+ "fieldName": "Currency_Iso_code",
430
+ "operation": "Equals",
431
+ "value": "USD",
432
+ "criteriaSequence": 1
433
+ },
434
+ {
435
+ "objectName": "BillingSchedule",
436
+ "fieldName": "InvoiceRunBatch",
437
+ "operation": "Equals",
438
+ "value": "Batch1",
439
+ "criteriaSequence": 2
440
+ }
441
+ ]
442
+ }
443
+ }
444
+ - |
445
+ {
446
+ "billingBatchSchedulerId": "5BSxx0000004CoyGAE",
447
+ "BatchInvoiceSchedulerInput":
448
+ {
449
+ "schedulerName": "Invoice Batch Scheduler",
450
+ "startDate": "2021-05-11",
451
+ "preferredTime": "10:00 AM",
452
+ "frequencyCadence": "Once",
453
+ "timezone": "America/Los_Angeles",
454
+ "status" : "Active",
455
+ "frequencyCadenceOptions": {
456
+ },
457
+ "filterCriteria":
458
+ [
459
+ {
460
+ "objectName": "BillingSchedule",
461
+ "fieldName": "Currency_Iso_code",
462
+ "operation": "Equals",
463
+ "value": "USD",
464
+ "criteriaSequence": 1
465
+ },
466
+ {
467
+ "objectName": "BillingSchedule",
468
+ "fieldName": "InvoiceRunBatch",
469
+ "operation": "Equals",
470
+ "value": "Batch1",
471
+ "criteriaSequence": 2
472
+ }
473
+ ]
474
+ }
475
+ }
476
+ - |
477
+ {
478
+ "billingBatchSchedulerId": "5BSxx0000004CoyGAE",
479
+ "BatchInvoiceSchedulerInput":
480
+ {
481
+ "schedulerName": "Invoice Batch Scheduler",
482
+ "startDate": "2021-05-11",
483
+ "endDate": "2021-05-15",
484
+ "preferredTime": "10:00 AM",
485
+ "frequencyCadence": "Weekly",
486
+ "timezone": "America/Los_Angeles",
487
+ "status" : "Active",
488
+ "frequencyCadenceOptions": {
489
+ "recursOnDay": "Monday"
490
+ },
491
+ "filterCriteria":
492
+ [
493
+ {
494
+ "objectName": "BillingSchedule",
495
+ "fieldName": "Currency_Iso_code",
496
+ "operation": "Equals",
497
+ "value": "USD",
498
+ "criteriaSequence": 1
499
+ },
500
+ {
501
+ "objectName": "BillingSchedule",
502
+ "fieldName": "InvoiceRunBatch",
503
+ "operation": "Equals",
504
+ "value": "Batch1",
505
+ "criteriaSequence": 2
506
+ }
507
+ ]
508
+ }
509
+ }
510
+ - |
511
+ {
512
+ "billingBatchSchedulerId": "5BSxx0000004CoyGAE",
513
+ "BatchInvoiceSchedulerInput":
514
+ {
515
+ "schedulerName": "Invoice Batch Scheduler",
516
+ "startDate": "2021-05-11",
517
+ "endDate": "2021-05-15",
518
+ "preferredTime": "10:00 AM",
519
+ "frequencyCadence": "Monthly",
520
+ "timezone": "America/Los_Angeles",
521
+ "status" : "Active",
522
+ "frequencyCadenceOptions": {
523
+ "recurringSubType": "Every",
524
+ "recursOn": "First",
525
+ "recursOnDay": "Monday"
526
+ },
527
+ "filterCriteria": []
528
+ }
529
+ }
530
+ invalidConfigs:
531
+ - |
532
+ {
533
+ "schedulerName": "Batch Scheduler"
534
+ }
535
+ - |
536
+ {
537
+ "schedulerName": "Batch Scheduler",
538
+ "startDate": "2021-05-11",
539
+ "endDate": "2021-05-15",
540
+ "preferredTime": "10:00 AM",
541
+ "frequencyCadence": "Daily",
542
+ "timezone": "America/Los_Angeles",
543
+ "status" : "Draft",
544
+ "frequencyCadenceOptions": {
545
+ "recurringSubType": "Every",
546
+ "recursOn": "First",
547
+ "recursOnDay": "Monday"
548
+ },
549
+ "filterCriteria": []
550
+ }
551
+ - |
552
+ {
553
+ "schedulerName": "Batch Scheduler",
554
+ "startDate": "2021-05-11",
555
+ "endDate": "2021-05-15",
556
+ "preferredTime": "10:00 AM",
557
+ "frequencyCadence": "Daily",
558
+ "timezone": "America/Los_Angeles",
559
+ "status" : "Draft",
560
+ "frequencyCadenceOptions": {
561
+ "recurringSubType": "Every",
562
+ "recursOn": "First",
563
+ "recursOnDate": "21",
564
+ "recursOnDay": "Monday"
565
+ },
566
+ "filterCriteria": []
567
+ }
568
+ - |
569
+ {
570
+ "BatchInvoiceSchedulerInput":
571
+ {
572
+ "schedulerName": "Batch Scheduler"
573
+ }
574
+ }
575
+ - |
576
+ {
577
+ "billingBatchSchedulerId": "5BSxx0000004CoyGAE"
578
+ }
579
+ - |
580
+ {
581
+ "BatchInvoiceSchedulerInput":
582
+ {
583
+ "schedulerName": "Batch Scheduler"
584
+ },
585
+ "billingBatchSchedulerId": "5BSxx0000004CoyGAE"
586
+ }
587
+
334
588
  /commerce/invoicing/invoice-batch-runs/{invoiceBatchRunId}/actions/draft-to-posted:
335
589
  post:
336
590
  (luvio.method): get