@salesforce/lds-adapters-revenue-billing-batch 1.284.0 → 1.285.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.
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$3, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1, typeCheckConfig as typeCheckConfig$3 } from 'force/luvioEngine';
17
+ import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$4, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1, typeCheckConfig as typeCheckConfig$4 } from 'force/luvioEngine';
18
18
 
19
19
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
20
20
  const { keys: ObjectKeys, create: ObjectCreate } = Object;
@@ -139,13 +139,26 @@ const keyPrefix = 'BillingBatch';
139
139
 
140
140
  const { isArray: ArrayIsArray } = Array;
141
141
  const { stringify: JSONStringify } = JSON;
142
+ function equalsArray(a, b, equalsItem) {
143
+ const aLength = a.length;
144
+ const bLength = b.length;
145
+ if (aLength !== bLength) {
146
+ return false;
147
+ }
148
+ for (let i = 0; i < aLength; i++) {
149
+ if (equalsItem(a[i], b[i]) === false) {
150
+ return false;
151
+ }
152
+ }
153
+ return true;
154
+ }
142
155
  function createLink(ref) {
143
156
  return {
144
157
  __ref: serializeStructuredKey(ref),
145
158
  };
146
159
  }
147
160
 
148
- function validate$7(obj, path = 'ScheduleOptionsInputRepresentationForInvoice') {
161
+ function validate$9(obj, path = 'ScheduleOptionsInputRepresentationForInvoice') {
149
162
  const v_error = (() => {
150
163
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
151
164
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -196,8 +209,8 @@ function validate$7(obj, path = 'ScheduleOptionsInputRepresentationForInvoice')
196
209
  return v_error === undefined ? null : v_error;
197
210
  }
198
211
 
199
- function validate$6(obj, path = 'BatchInvoiceSchedulerInputRepresentation') {
200
- const validateScheduleOptionsInputRepresentationForInvoice_validateError = validate$7(obj, path);
212
+ function validate$8(obj, path = 'BatchInvoiceSchedulerInputRepresentation') {
213
+ const validateScheduleOptionsInputRepresentationForInvoice_validateError = validate$9(obj, path);
201
214
  if (validateScheduleOptionsInputRepresentationForInvoice_validateError !== null) {
202
215
  return validateScheduleOptionsInputRepresentationForInvoice_validateError;
203
216
  }
@@ -223,7 +236,7 @@ function validate$6(obj, path = 'BatchInvoiceSchedulerInputRepresentation') {
223
236
  return v_error === undefined ? null : v_error;
224
237
  }
225
238
 
226
- function validate$5(obj, path = 'BillingBatchSchedulerRepresentation') {
239
+ function validate$7(obj, path = 'BillingBatchSchedulerRepresentation') {
227
240
  const v_error = (() => {
228
241
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
229
242
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -237,16 +250,16 @@ function validate$5(obj, path = 'BillingBatchSchedulerRepresentation') {
237
250
  return v_error === undefined ? null : v_error;
238
251
  }
239
252
 
240
- const TTL$2 = 1000;
241
- const VERSION$2 = "15c358b0b4903143c526f63f4010b958";
242
- function validate$4(obj, path = 'InvoicesBatchSchedulerOutputRepresentation') {
253
+ const TTL$3 = 1000;
254
+ const VERSION$4 = "15c358b0b4903143c526f63f4010b958";
255
+ function validate$6(obj, path = 'InvoicesBatchSchedulerOutputRepresentation') {
243
256
  const v_error = (() => {
244
257
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
245
258
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
246
259
  }
247
260
  const obj_billingBatchScheduler = obj.billingBatchScheduler;
248
261
  const path_billingBatchScheduler = path + '.billingBatchScheduler';
249
- const referencepath_billingBatchSchedulerValidationError = validate$5(obj_billingBatchScheduler, path_billingBatchScheduler);
262
+ const referencepath_billingBatchSchedulerValidationError = validate$7(obj_billingBatchScheduler, path_billingBatchScheduler);
250
263
  if (referencepath_billingBatchSchedulerValidationError !== null) {
251
264
  let message = 'Object doesn\'t match BillingBatchSchedulerRepresentation (at "' + path_billingBatchScheduler + '")\n';
252
265
  message += referencepath_billingBatchSchedulerValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -255,68 +268,68 @@ function validate$4(obj, path = 'InvoicesBatchSchedulerOutputRepresentation') {
255
268
  })();
256
269
  return v_error === undefined ? null : v_error;
257
270
  }
258
- const RepresentationType$2 = 'InvoicesBatchSchedulerOutputRepresentation';
259
- function keyBuilder$3(luvio, config) {
260
- return keyPrefix + '::' + RepresentationType$2 + ':' + config.billingBatchSchedulerId;
271
+ const RepresentationType$3 = 'InvoicesBatchSchedulerOutputRepresentation';
272
+ function keyBuilder$4(luvio, config) {
273
+ return keyPrefix + '::' + RepresentationType$3 + ':' + config.billingBatchSchedulerId;
261
274
  }
262
- function keyBuilderFromType$1(luvio, object) {
275
+ function keyBuilderFromType$2(luvio, object) {
263
276
  const keyParams = {
264
277
  billingBatchSchedulerId: object.billingBatchScheduler.id
265
278
  };
266
- return keyBuilder$3(luvio, keyParams);
279
+ return keyBuilder$4(luvio, keyParams);
267
280
  }
268
- function normalize$2(input, existing, path, luvio, store, timestamp) {
281
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
269
282
  return input;
270
283
  }
271
- const select$5 = function InvoicesBatchSchedulerOutputRepresentationSelect() {
284
+ const select$8 = function InvoicesBatchSchedulerOutputRepresentationSelect() {
272
285
  return {
273
286
  kind: 'Fragment',
274
- version: VERSION$2,
287
+ version: VERSION$4,
275
288
  private: [],
276
289
  opaque: true
277
290
  };
278
291
  };
279
- function equals$2(existing, incoming) {
292
+ function equals$4(existing, incoming) {
280
293
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
281
294
  return false;
282
295
  }
283
296
  return true;
284
297
  }
285
- const ingest$2 = function InvoicesBatchSchedulerOutputRepresentationIngest(input, path, luvio, store, timestamp) {
298
+ const ingest$3 = function InvoicesBatchSchedulerOutputRepresentationIngest(input, path, luvio, store, timestamp) {
286
299
  if (process.env.NODE_ENV !== 'production') {
287
- const validateError = validate$4(input);
300
+ const validateError = validate$6(input);
288
301
  if (validateError !== null) {
289
302
  throw validateError;
290
303
  }
291
304
  }
292
- const key = keyBuilderFromType$1(luvio, input);
293
- const ttlToUse = TTL$2;
294
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "BillingBatch", VERSION$2, RepresentationType$2, equals$2);
305
+ const key = keyBuilderFromType$2(luvio, input);
306
+ const ttlToUse = TTL$3;
307
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "BillingBatch", VERSION$4, RepresentationType$3, equals$4);
295
308
  return createLink(key);
296
309
  };
297
- function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
310
+ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
298
311
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
299
- const rootKey = keyBuilderFromType$1(luvio, input);
312
+ const rootKey = keyBuilderFromType$2(luvio, input);
300
313
  rootKeySet.set(rootKey, {
301
314
  namespace: keyPrefix,
302
- representationName: RepresentationType$2,
315
+ representationName: RepresentationType$3,
303
316
  mergeable: false
304
317
  });
305
318
  }
306
319
 
307
- function select$4(luvio, params) {
308
- return select$5();
320
+ function select$7(luvio, params) {
321
+ return select$8();
309
322
  }
310
- function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
311
- getTypeCacheKeys$2(storeKeyMap, luvio, response);
323
+ function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
324
+ getTypeCacheKeys$3(storeKeyMap, luvio, response);
312
325
  }
313
- function ingestSuccess$2(luvio, resourceParams, response) {
326
+ function ingestSuccess$3(luvio, resourceParams, response) {
314
327
  const { body } = response;
315
- const key = keyBuilderFromType$1(luvio, body);
316
- luvio.storeIngest(key, ingest$2, body);
328
+ const key = keyBuilderFromType$2(luvio, body);
329
+ luvio.storeIngest(key, ingest$3, body);
317
330
  const snapshot = luvio.storeLookup({
318
331
  recordId: key,
319
- node: select$4(),
332
+ node: select$7(),
320
333
  variables: {},
321
334
  });
322
335
  if (process.env.NODE_ENV !== 'production') {
@@ -327,7 +340,7 @@ function ingestSuccess$2(luvio, resourceParams, response) {
327
340
  deepFreeze(snapshot.data);
328
341
  return snapshot;
329
342
  }
330
- function createResourceRequest$2(config) {
343
+ function createResourceRequest$3(config) {
331
344
  const headers = {};
332
345
  return {
333
346
  baseUri: '/services/data/v61.0',
@@ -341,45 +354,45 @@ function createResourceRequest$2(config) {
341
354
  };
342
355
  }
343
356
 
344
- const adapterName$2 = 'createInvoicesBatchScheduler';
357
+ const adapterName$3 = 'createInvoicesBatchScheduler';
345
358
  const createInvoicesBatchScheduler_ConfigPropertyMetadata = [
346
359
  generateParamConfigMetadata('BatchInvoiceSchedulerInput', true, 2 /* Body */, 4 /* Unsupported */),
347
360
  ];
348
- const createInvoicesBatchScheduler_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, createInvoicesBatchScheduler_ConfigPropertyMetadata);
349
- const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(createInvoicesBatchScheduler_ConfigPropertyMetadata);
350
- function typeCheckConfig$2(untrustedConfig) {
361
+ const createInvoicesBatchScheduler_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, createInvoicesBatchScheduler_ConfigPropertyMetadata);
362
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$4(createInvoicesBatchScheduler_ConfigPropertyMetadata);
363
+ function typeCheckConfig$3(untrustedConfig) {
351
364
  const config = {};
352
365
  const untrustedConfig_BatchInvoiceSchedulerInput = untrustedConfig.BatchInvoiceSchedulerInput;
353
- const referenceBatchInvoiceSchedulerInputRepresentationValidationError = validate$6(untrustedConfig_BatchInvoiceSchedulerInput);
366
+ const referenceBatchInvoiceSchedulerInputRepresentationValidationError = validate$8(untrustedConfig_BatchInvoiceSchedulerInput);
354
367
  if (referenceBatchInvoiceSchedulerInputRepresentationValidationError === null) {
355
368
  config.BatchInvoiceSchedulerInput = untrustedConfig_BatchInvoiceSchedulerInput;
356
369
  }
357
370
  return config;
358
371
  }
359
- function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
372
+ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
360
373
  if (!untrustedIsObject(untrustedConfig)) {
361
374
  return null;
362
375
  }
363
376
  if (process.env.NODE_ENV !== 'production') {
364
377
  validateConfig(untrustedConfig, configPropertyNames);
365
378
  }
366
- const config = typeCheckConfig$2(untrustedConfig);
379
+ const config = typeCheckConfig$3(untrustedConfig);
367
380
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
368
381
  return null;
369
382
  }
370
383
  return config;
371
384
  }
372
- function buildNetworkSnapshot$2(luvio, config, options) {
373
- const resourceParams = createResourceParams$2(config);
374
- const request = createResourceRequest$2(resourceParams);
385
+ function buildNetworkSnapshot$3(luvio, config, options) {
386
+ const resourceParams = createResourceParams$3(config);
387
+ const request = createResourceRequest$3(resourceParams);
375
388
  return luvio.dispatchResourceRequest(request, options)
376
389
  .then((response) => {
377
390
  return luvio.handleSuccessResponse(() => {
378
- const snapshot = ingestSuccess$2(luvio, resourceParams, response);
391
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response);
379
392
  return luvio.storeBroadcast().then(() => snapshot);
380
393
  }, () => {
381
394
  const cache = new StoreKeyMap();
382
- getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
395
+ getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
383
396
  return cache;
384
397
  });
385
398
  }, (response) => {
@@ -389,16 +402,16 @@ function buildNetworkSnapshot$2(luvio, config, options) {
389
402
  }
390
403
  const createInvoicesBatchSchedulerAdapterFactory = (luvio) => {
391
404
  return function createInvoicesBatchScheduler(untrustedConfig) {
392
- const config = validateAdapterConfig$2(untrustedConfig, createInvoicesBatchScheduler_ConfigPropertyNames);
405
+ const config = validateAdapterConfig$3(untrustedConfig, createInvoicesBatchScheduler_ConfigPropertyNames);
393
406
  // Invalid or incomplete config
394
407
  if (config === null) {
395
408
  throw new Error('Invalid config for "createInvoicesBatchScheduler"');
396
409
  }
397
- return buildNetworkSnapshot$2(luvio, config);
410
+ return buildNetworkSnapshot$3(luvio, config);
398
411
  };
399
412
  };
400
413
 
401
- function validate$3(obj, path = 'ScheduleOptionsInputRepresentation') {
414
+ function validate$5(obj, path = 'ScheduleOptionsInputRepresentation') {
402
415
  const v_error = (() => {
403
416
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
404
417
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -446,8 +459,8 @@ function validate$3(obj, path = 'ScheduleOptionsInputRepresentation') {
446
459
  return v_error === undefined ? null : v_error;
447
460
  }
448
461
 
449
- function validate$2(obj, path = 'PaymentsBatchSchedulerInputRepresentation') {
450
- const validateScheduleOptionsInputRepresentation_validateError = validate$3(obj, path);
462
+ function validate$4(obj, path = 'PaymentsBatchSchedulerInputRepresentation') {
463
+ const validateScheduleOptionsInputRepresentation_validateError = validate$5(obj, path);
451
464
  if (validateScheduleOptionsInputRepresentation_validateError !== null) {
452
465
  return validateScheduleOptionsInputRepresentation_validateError;
453
466
  }
@@ -480,16 +493,16 @@ function validate$2(obj, path = 'PaymentsBatchSchedulerInputRepresentation') {
480
493
  return v_error === undefined ? null : v_error;
481
494
  }
482
495
 
483
- const TTL$1 = 1000;
484
- const VERSION$1 = "eff71edc32270b9a1e6e1779cb811c3c";
485
- function validate$1(obj, path = 'PaymentsBatchSchedulerOutputRepresentation') {
496
+ const TTL$2 = 1000;
497
+ const VERSION$3 = "eff71edc32270b9a1e6e1779cb811c3c";
498
+ function validate$3(obj, path = 'PaymentsBatchSchedulerOutputRepresentation') {
486
499
  const v_error = (() => {
487
500
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
488
501
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
489
502
  }
490
503
  const obj_billingBatchScheduler = obj.billingBatchScheduler;
491
504
  const path_billingBatchScheduler = path + '.billingBatchScheduler';
492
- const referencepath_billingBatchSchedulerValidationError = validate$5(obj_billingBatchScheduler, path_billingBatchScheduler);
505
+ const referencepath_billingBatchSchedulerValidationError = validate$7(obj_billingBatchScheduler, path_billingBatchScheduler);
493
506
  if (referencepath_billingBatchSchedulerValidationError !== null) {
494
507
  let message = 'Object doesn\'t match BillingBatchSchedulerRepresentation (at "' + path_billingBatchScheduler + '")\n';
495
508
  message += referencepath_billingBatchSchedulerValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -498,68 +511,68 @@ function validate$1(obj, path = 'PaymentsBatchSchedulerOutputRepresentation') {
498
511
  })();
499
512
  return v_error === undefined ? null : v_error;
500
513
  }
501
- const RepresentationType$1 = 'PaymentsBatchSchedulerOutputRepresentation';
502
- function keyBuilder$2(luvio, config) {
503
- return keyPrefix + '::' + RepresentationType$1 + ':' + config.billingBatchSchedulerId;
514
+ const RepresentationType$2 = 'PaymentsBatchSchedulerOutputRepresentation';
515
+ function keyBuilder$3(luvio, config) {
516
+ return keyPrefix + '::' + RepresentationType$2 + ':' + config.billingBatchSchedulerId;
504
517
  }
505
- function keyBuilderFromType(luvio, object) {
518
+ function keyBuilderFromType$1(luvio, object) {
506
519
  const keyParams = {
507
520
  billingBatchSchedulerId: object.billingBatchScheduler.id
508
521
  };
509
- return keyBuilder$2(luvio, keyParams);
522
+ return keyBuilder$3(luvio, keyParams);
510
523
  }
511
- function normalize$1(input, existing, path, luvio, store, timestamp) {
524
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
512
525
  return input;
513
526
  }
514
- const select$3 = function PaymentsBatchSchedulerOutputRepresentationSelect() {
527
+ const select$6 = function PaymentsBatchSchedulerOutputRepresentationSelect() {
515
528
  return {
516
529
  kind: 'Fragment',
517
- version: VERSION$1,
530
+ version: VERSION$3,
518
531
  private: [],
519
532
  opaque: true
520
533
  };
521
534
  };
522
- function equals$1(existing, incoming) {
535
+ function equals$3(existing, incoming) {
523
536
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
524
537
  return false;
525
538
  }
526
539
  return true;
527
540
  }
528
- const ingest$1 = function PaymentsBatchSchedulerOutputRepresentationIngest(input, path, luvio, store, timestamp) {
541
+ const ingest$2 = function PaymentsBatchSchedulerOutputRepresentationIngest(input, path, luvio, store, timestamp) {
529
542
  if (process.env.NODE_ENV !== 'production') {
530
- const validateError = validate$1(input);
543
+ const validateError = validate$3(input);
531
544
  if (validateError !== null) {
532
545
  throw validateError;
533
546
  }
534
547
  }
535
- const key = keyBuilderFromType(luvio, input);
536
- const ttlToUse = TTL$1;
537
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "BillingBatch", VERSION$1, RepresentationType$1, equals$1);
548
+ const key = keyBuilderFromType$1(luvio, input);
549
+ const ttlToUse = TTL$2;
550
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "BillingBatch", VERSION$3, RepresentationType$2, equals$3);
538
551
  return createLink(key);
539
552
  };
540
- function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
553
+ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
541
554
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
542
- const rootKey = keyBuilderFromType(luvio, input);
555
+ const rootKey = keyBuilderFromType$1(luvio, input);
543
556
  rootKeySet.set(rootKey, {
544
557
  namespace: keyPrefix,
545
- representationName: RepresentationType$1,
558
+ representationName: RepresentationType$2,
546
559
  mergeable: false
547
560
  });
548
561
  }
549
562
 
550
- function select$2(luvio, params) {
551
- return select$3();
563
+ function select$5(luvio, params) {
564
+ return select$6();
552
565
  }
553
- function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
554
- getTypeCacheKeys$1(storeKeyMap, luvio, response);
566
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
567
+ getTypeCacheKeys$2(storeKeyMap, luvio, response);
555
568
  }
556
- function ingestSuccess$1(luvio, resourceParams, response) {
569
+ function ingestSuccess$2(luvio, resourceParams, response) {
557
570
  const { body } = response;
558
- const key = keyBuilderFromType(luvio, body);
559
- luvio.storeIngest(key, ingest$1, body);
571
+ const key = keyBuilderFromType$1(luvio, body);
572
+ luvio.storeIngest(key, ingest$2, body);
560
573
  const snapshot = luvio.storeLookup({
561
574
  recordId: key,
562
- node: select$2(),
575
+ node: select$5(),
563
576
  variables: {},
564
577
  });
565
578
  if (process.env.NODE_ENV !== 'production') {
@@ -570,7 +583,7 @@ function ingestSuccess$1(luvio, resourceParams, response) {
570
583
  deepFreeze(snapshot.data);
571
584
  return snapshot;
572
585
  }
573
- function createResourceRequest$1(config) {
586
+ function createResourceRequest$2(config) {
574
587
  const headers = {};
575
588
  return {
576
589
  baseUri: '/services/data/v61.0',
@@ -584,45 +597,45 @@ function createResourceRequest$1(config) {
584
597
  };
585
598
  }
586
599
 
587
- const adapterName$1 = 'createPaymentsBatchScheduler';
600
+ const adapterName$2 = 'createPaymentsBatchScheduler';
588
601
  const createPaymentsBatchScheduler_ConfigPropertyMetadata = [
589
602
  generateParamConfigMetadata('PaymentsBatchSchedulerInput', true, 2 /* Body */, 4 /* Unsupported */),
590
603
  ];
591
- const createPaymentsBatchScheduler_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, createPaymentsBatchScheduler_ConfigPropertyMetadata);
592
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(createPaymentsBatchScheduler_ConfigPropertyMetadata);
593
- function typeCheckConfig$1(untrustedConfig) {
604
+ const createPaymentsBatchScheduler_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, createPaymentsBatchScheduler_ConfigPropertyMetadata);
605
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$4(createPaymentsBatchScheduler_ConfigPropertyMetadata);
606
+ function typeCheckConfig$2(untrustedConfig) {
594
607
  const config = {};
595
608
  const untrustedConfig_PaymentsBatchSchedulerInput = untrustedConfig.PaymentsBatchSchedulerInput;
596
- const referencePaymentsBatchSchedulerInputRepresentationValidationError = validate$2(untrustedConfig_PaymentsBatchSchedulerInput);
609
+ const referencePaymentsBatchSchedulerInputRepresentationValidationError = validate$4(untrustedConfig_PaymentsBatchSchedulerInput);
597
610
  if (referencePaymentsBatchSchedulerInputRepresentationValidationError === null) {
598
611
  config.PaymentsBatchSchedulerInput = untrustedConfig_PaymentsBatchSchedulerInput;
599
612
  }
600
613
  return config;
601
614
  }
602
- function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
615
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
603
616
  if (!untrustedIsObject(untrustedConfig)) {
604
617
  return null;
605
618
  }
606
619
  if (process.env.NODE_ENV !== 'production') {
607
620
  validateConfig(untrustedConfig, configPropertyNames);
608
621
  }
609
- const config = typeCheckConfig$1(untrustedConfig);
622
+ const config = typeCheckConfig$2(untrustedConfig);
610
623
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
611
624
  return null;
612
625
  }
613
626
  return config;
614
627
  }
615
- function buildNetworkSnapshot$1(luvio, config, options) {
616
- const resourceParams = createResourceParams$1(config);
617
- const request = createResourceRequest$1(resourceParams);
628
+ function buildNetworkSnapshot$2(luvio, config, options) {
629
+ const resourceParams = createResourceParams$2(config);
630
+ const request = createResourceRequest$2(resourceParams);
618
631
  return luvio.dispatchResourceRequest(request, options)
619
632
  .then((response) => {
620
633
  return luvio.handleSuccessResponse(() => {
621
- const snapshot = ingestSuccess$1(luvio, resourceParams, response);
634
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response);
622
635
  return luvio.storeBroadcast().then(() => snapshot);
623
636
  }, () => {
624
637
  const cache = new StoreKeyMap();
625
- getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
638
+ getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
626
639
  return cache;
627
640
  });
628
641
  }, (response) => {
@@ -632,18 +645,18 @@ function buildNetworkSnapshot$1(luvio, config, options) {
632
645
  }
633
646
  const createPaymentsBatchSchedulerAdapterFactory = (luvio) => {
634
647
  return function createPaymentsBatchScheduler(untrustedConfig) {
635
- const config = validateAdapterConfig$1(untrustedConfig, createPaymentsBatchScheduler_ConfigPropertyNames);
648
+ const config = validateAdapterConfig$2(untrustedConfig, createPaymentsBatchScheduler_ConfigPropertyNames);
636
649
  // Invalid or incomplete config
637
650
  if (config === null) {
638
651
  throw new Error('Invalid config for "createPaymentsBatchScheduler"');
639
652
  }
640
- return buildNetworkSnapshot$1(luvio, config);
653
+ return buildNetworkSnapshot$2(luvio, config);
641
654
  };
642
655
  };
643
656
 
644
- const TTL = 1000;
645
- const VERSION = "1b89e7904345b50c1a8bfa0fc6e7dff0";
646
- function validate(obj, path = 'InvoiceBatchDraftToPostedOutputRepresentation') {
657
+ const TTL$1 = 1000;
658
+ const VERSION$2 = "1b89e7904345b50c1a8bfa0fc6e7dff0";
659
+ function validate$2(obj, path = 'InvoiceBatchDraftToPostedOutputRepresentation') {
647
660
  const v_error = (() => {
648
661
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
649
662
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -661,14 +674,14 @@ function validate(obj, path = 'InvoiceBatchDraftToPostedOutputRepresentation') {
661
674
  })();
662
675
  return v_error === undefined ? null : v_error;
663
676
  }
664
- const RepresentationType = 'InvoiceBatchDraftToPostedOutputRepresentation';
665
- function normalize(input, existing, path, luvio, store, timestamp) {
677
+ const RepresentationType$1 = 'InvoiceBatchDraftToPostedOutputRepresentation';
678
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
666
679
  return input;
667
680
  }
668
- const select$1 = function InvoiceBatchDraftToPostedOutputRepresentationSelect() {
681
+ const select$4 = function InvoiceBatchDraftToPostedOutputRepresentationSelect() {
669
682
  return {
670
683
  kind: 'Fragment',
671
- version: VERSION,
684
+ version: VERSION$2,
672
685
  private: [],
673
686
  selections: [
674
687
  {
@@ -682,7 +695,7 @@ const select$1 = function InvoiceBatchDraftToPostedOutputRepresentationSelect()
682
695
  ]
683
696
  };
684
697
  };
685
- function equals(existing, incoming) {
698
+ function equals$2(existing, incoming) {
686
699
  const existing_success = existing.success;
687
700
  const incoming_success = incoming.success;
688
701
  if (!(existing_success === incoming_success)) {
@@ -695,44 +708,44 @@ function equals(existing, incoming) {
695
708
  }
696
709
  return true;
697
710
  }
698
- const ingest = function InvoiceBatchDraftToPostedOutputRepresentationIngest(input, path, luvio, store, timestamp) {
711
+ const ingest$1 = function InvoiceBatchDraftToPostedOutputRepresentationIngest(input, path, luvio, store, timestamp) {
699
712
  if (process.env.NODE_ENV !== 'production') {
700
- const validateError = validate(input);
713
+ const validateError = validate$2(input);
701
714
  if (validateError !== null) {
702
715
  throw validateError;
703
716
  }
704
717
  }
705
718
  const key = path.fullPath;
706
- const ttlToUse = TTL;
707
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "BillingBatch", VERSION, RepresentationType, equals);
719
+ const ttlToUse = TTL$1;
720
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "BillingBatch", VERSION$2, RepresentationType$1, equals$2);
708
721
  return createLink(key);
709
722
  };
710
- function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
723
+ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
711
724
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
712
725
  const rootKey = fullPathFactory();
713
726
  rootKeySet.set(rootKey, {
714
727
  namespace: keyPrefix,
715
- representationName: RepresentationType,
728
+ representationName: RepresentationType$1,
716
729
  mergeable: false
717
730
  });
718
731
  }
719
732
 
720
- function select(luvio, params) {
721
- return select$1();
733
+ function select$3(luvio, params) {
734
+ return select$4();
722
735
  }
723
- function keyBuilder$1(luvio, params) {
736
+ function keyBuilder$2(luvio, params) {
724
737
  return keyPrefix + '::InvoiceBatchDraftToPostedOutputRepresentation:(' + 'invoiceBatchRunId:' + params.urlParams.invoiceBatchRunId + ',' + stableJSONStringify(params.body) + ')';
725
738
  }
726
- function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
727
- getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
739
+ function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
740
+ getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$2(luvio, resourceParams));
728
741
  }
729
- function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
742
+ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
730
743
  const { body } = response;
731
- const key = keyBuilder$1(luvio, resourceParams);
732
- luvio.storeIngest(key, ingest, body);
744
+ const key = keyBuilder$2(luvio, resourceParams);
745
+ luvio.storeIngest(key, ingest$1, body);
733
746
  const snapshot = luvio.storeLookup({
734
747
  recordId: key,
735
- node: select(),
748
+ node: select$3(),
736
749
  variables: {},
737
750
  }, snapshotRefresh);
738
751
  if (process.env.NODE_ENV !== 'production') {
@@ -744,18 +757,18 @@ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
744
757
  return snapshot;
745
758
  }
746
759
  function ingestError(luvio, params, error, snapshotRefresh) {
747
- const key = keyBuilder$1(luvio, params);
760
+ const key = keyBuilder$2(luvio, params);
748
761
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
749
762
  const storeMetadataParams = {
750
- ttl: TTL,
763
+ ttl: TTL$1,
751
764
  namespace: keyPrefix,
752
- version: VERSION,
753
- representationName: RepresentationType
765
+ version: VERSION$2,
766
+ representationName: RepresentationType$1
754
767
  };
755
768
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
756
769
  return errorSnapshot;
757
770
  }
758
- function createResourceRequest(config) {
771
+ function createResourceRequest$1(config) {
759
772
  const headers = {};
760
773
  return {
761
774
  baseUri: '/services/data/v61.0',
@@ -769,60 +782,60 @@ function createResourceRequest(config) {
769
782
  };
770
783
  }
771
784
 
772
- const adapterName = 'postBatchDraftInvoices';
785
+ const adapterName$1 = 'postBatchDraftInvoices';
773
786
  const postBatchDraftInvoices_ConfigPropertyMetadata = [
774
787
  generateParamConfigMetadata('invoiceBatchRunId', true, 0 /* UrlParameter */, 0 /* String */),
775
788
  ];
776
- const postBatchDraftInvoices_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, postBatchDraftInvoices_ConfigPropertyMetadata);
777
- const createResourceParams = /*#__PURE__*/ createResourceParams$3(postBatchDraftInvoices_ConfigPropertyMetadata);
778
- function keyBuilder(luvio, config) {
779
- const resourceParams = createResourceParams(config);
780
- return keyBuilder$1(luvio, resourceParams);
789
+ const postBatchDraftInvoices_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, postBatchDraftInvoices_ConfigPropertyMetadata);
790
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$4(postBatchDraftInvoices_ConfigPropertyMetadata);
791
+ function keyBuilder$1(luvio, config) {
792
+ const resourceParams = createResourceParams$1(config);
793
+ return keyBuilder$2(luvio, resourceParams);
781
794
  }
782
- function typeCheckConfig(untrustedConfig) {
795
+ function typeCheckConfig$1(untrustedConfig) {
783
796
  const config = {};
784
- typeCheckConfig$3(untrustedConfig, config, postBatchDraftInvoices_ConfigPropertyMetadata);
797
+ typeCheckConfig$4(untrustedConfig, config, postBatchDraftInvoices_ConfigPropertyMetadata);
785
798
  return config;
786
799
  }
787
- function validateAdapterConfig(untrustedConfig, configPropertyNames) {
800
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
788
801
  if (!untrustedIsObject(untrustedConfig)) {
789
802
  return null;
790
803
  }
791
804
  if (process.env.NODE_ENV !== 'production') {
792
805
  validateConfig(untrustedConfig, configPropertyNames);
793
806
  }
794
- const config = typeCheckConfig(untrustedConfig);
807
+ const config = typeCheckConfig$1(untrustedConfig);
795
808
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
796
809
  return null;
797
810
  }
798
811
  return config;
799
812
  }
800
813
  function adapterFragment(luvio, config) {
801
- createResourceParams(config);
802
- return select();
814
+ createResourceParams$1(config);
815
+ return select$3();
803
816
  }
804
817
  function onFetchResponseSuccess(luvio, config, resourceParams, response) {
805
- const snapshot = ingestSuccess(luvio, resourceParams, response, {
818
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
806
819
  config,
807
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
820
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
808
821
  });
809
822
  return luvio.storeBroadcast().then(() => snapshot);
810
823
  }
811
824
  function onFetchResponseError(luvio, config, resourceParams, response) {
812
825
  const snapshot = ingestError(luvio, resourceParams, response, {
813
826
  config,
814
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
827
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
815
828
  });
816
829
  return luvio.storeBroadcast().then(() => snapshot);
817
830
  }
818
- function buildNetworkSnapshot(luvio, config, options) {
819
- const resourceParams = createResourceParams(config);
820
- const request = createResourceRequest(resourceParams);
831
+ function buildNetworkSnapshot$1(luvio, config, options) {
832
+ const resourceParams = createResourceParams$1(config);
833
+ const request = createResourceRequest$1(resourceParams);
821
834
  return luvio.dispatchResourceRequest(request, options)
822
835
  .then((response) => {
823
836
  return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
824
837
  const cache = new StoreKeyMap();
825
- getResponseCacheKeys(cache, luvio, resourceParams, response.body);
838
+ getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
826
839
  return cache;
827
840
  });
828
841
  }, (response) => {
@@ -830,23 +843,23 @@ function buildNetworkSnapshot(luvio, config, options) {
830
843
  });
831
844
  }
832
845
  function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
833
- return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot, 'get', false);
846
+ return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, 'get', false);
834
847
  }
835
848
  function buildCachedSnapshotCachePolicy(context, storeLookup) {
836
849
  const { luvio, config } = context;
837
850
  const selector = {
838
- recordId: keyBuilder(luvio, config),
851
+ recordId: keyBuilder$1(luvio, config),
839
852
  node: adapterFragment(luvio, config),
840
853
  variables: {},
841
854
  };
842
855
  const cacheSnapshot = storeLookup(selector, {
843
856
  config,
844
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
857
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
845
858
  });
846
859
  return cacheSnapshot;
847
860
  }
848
861
  const postBatchDraftInvoicesAdapterFactory = (luvio) => function BillingBatch__postBatchDraftInvoices(untrustedConfig, requestContext) {
849
- const config = validateAdapterConfig(untrustedConfig, postBatchDraftInvoices_ConfigPropertyNames);
862
+ const config = validateAdapterConfig$1(untrustedConfig, postBatchDraftInvoices_ConfigPropertyNames);
850
863
  // Invalid or incomplete config
851
864
  if (config === null) {
852
865
  return null;
@@ -855,9 +868,267 @@ const postBatchDraftInvoicesAdapterFactory = (luvio) => function BillingBatch__p
855
868
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
856
869
  };
857
870
 
871
+ const VERSION$1 = "ae245aac2922b53e1ff758392e317d39";
872
+ function validate$1(obj, path = 'BatchInvoiceDocGenErrorRepresentation') {
873
+ const v_error = (() => {
874
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
875
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
876
+ }
877
+ const obj_errorCode = obj.errorCode;
878
+ const path_errorCode = path + '.errorCode';
879
+ if (typeof obj_errorCode !== 'string') {
880
+ return new TypeError('Expected "string" but received "' + typeof obj_errorCode + '" (at "' + path_errorCode + '")');
881
+ }
882
+ const obj_errorMessage = obj.errorMessage;
883
+ const path_errorMessage = path + '.errorMessage';
884
+ if (typeof obj_errorMessage !== 'string') {
885
+ return new TypeError('Expected "string" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
886
+ }
887
+ })();
888
+ return v_error === undefined ? null : v_error;
889
+ }
890
+ const select$2 = function BatchInvoiceDocGenErrorRepresentationSelect() {
891
+ return {
892
+ kind: 'Fragment',
893
+ version: VERSION$1,
894
+ private: [],
895
+ selections: [
896
+ {
897
+ name: 'errorCode',
898
+ kind: 'Scalar'
899
+ },
900
+ {
901
+ name: 'errorMessage',
902
+ kind: 'Scalar'
903
+ }
904
+ ]
905
+ };
906
+ };
907
+ function equals$1(existing, incoming) {
908
+ const existing_errorCode = existing.errorCode;
909
+ const incoming_errorCode = incoming.errorCode;
910
+ if (!(existing_errorCode === incoming_errorCode)) {
911
+ return false;
912
+ }
913
+ const existing_errorMessage = existing.errorMessage;
914
+ const incoming_errorMessage = incoming.errorMessage;
915
+ if (!(existing_errorMessage === incoming_errorMessage)) {
916
+ return false;
917
+ }
918
+ return true;
919
+ }
920
+
921
+ const TTL = 1000;
922
+ const VERSION = "1630988ffc3067417295a90783bd1812";
923
+ function validate(obj, path = 'BatchInvoiceDocGenOutputRepresentation') {
924
+ const v_error = (() => {
925
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
926
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
927
+ }
928
+ const obj_errors = obj.errors;
929
+ const path_errors = path + '.errors';
930
+ if (!ArrayIsArray(obj_errors)) {
931
+ return new TypeError('Expected "array" but received "' + typeof obj_errors + '" (at "' + path_errors + '")');
932
+ }
933
+ for (let i = 0; i < obj_errors.length; i++) {
934
+ const obj_errors_item = obj_errors[i];
935
+ const path_errors_item = path_errors + '[' + i + ']';
936
+ const referencepath_errors_itemValidationError = validate$1(obj_errors_item, path_errors_item);
937
+ if (referencepath_errors_itemValidationError !== null) {
938
+ let message = 'Object doesn\'t match BatchInvoiceDocGenErrorRepresentation (at "' + path_errors_item + '")\n';
939
+ message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
940
+ return new TypeError(message);
941
+ }
942
+ }
943
+ const obj_requestIdentifier = obj.requestIdentifier;
944
+ const path_requestIdentifier = path + '.requestIdentifier';
945
+ if (typeof obj_requestIdentifier !== 'string') {
946
+ return new TypeError('Expected "string" but received "' + typeof obj_requestIdentifier + '" (at "' + path_requestIdentifier + '")');
947
+ }
948
+ const obj_success = obj.success;
949
+ const path_success = path + '.success';
950
+ if (typeof obj_success !== 'boolean') {
951
+ return new TypeError('Expected "boolean" but received "' + typeof obj_success + '" (at "' + path_success + '")');
952
+ }
953
+ })();
954
+ return v_error === undefined ? null : v_error;
955
+ }
956
+ const RepresentationType = 'BatchInvoiceDocGenOutputRepresentation';
957
+ function keyBuilder(luvio, config) {
958
+ return keyPrefix + '::' + RepresentationType + ':' + config.requestIdentifier;
959
+ }
960
+ function keyBuilderFromType(luvio, object) {
961
+ const keyParams = {
962
+ requestIdentifier: object.requestIdentifier
963
+ };
964
+ return keyBuilder(luvio, keyParams);
965
+ }
966
+ function normalize(input, existing, path, luvio, store, timestamp) {
967
+ return input;
968
+ }
969
+ const select$1 = function BatchInvoiceDocGenOutputRepresentationSelect() {
970
+ const { selections: BatchInvoiceDocGenErrorRepresentation__selections, opaque: BatchInvoiceDocGenErrorRepresentation__opaque, } = select$2();
971
+ return {
972
+ kind: 'Fragment',
973
+ version: VERSION,
974
+ private: [],
975
+ selections: [
976
+ {
977
+ name: 'errors',
978
+ kind: 'Object',
979
+ plural: true,
980
+ selections: BatchInvoiceDocGenErrorRepresentation__selections
981
+ },
982
+ {
983
+ name: 'requestIdentifier',
984
+ kind: 'Scalar'
985
+ },
986
+ {
987
+ name: 'success',
988
+ kind: 'Scalar'
989
+ }
990
+ ]
991
+ };
992
+ };
993
+ function equals(existing, incoming) {
994
+ const existing_success = existing.success;
995
+ const incoming_success = incoming.success;
996
+ if (!(existing_success === incoming_success)) {
997
+ return false;
998
+ }
999
+ const existing_requestIdentifier = existing.requestIdentifier;
1000
+ const incoming_requestIdentifier = incoming.requestIdentifier;
1001
+ if (!(existing_requestIdentifier === incoming_requestIdentifier)) {
1002
+ return false;
1003
+ }
1004
+ const existing_errors = existing.errors;
1005
+ const incoming_errors = incoming.errors;
1006
+ const equals_errors_items = equalsArray(existing_errors, incoming_errors, (existing_errors_item, incoming_errors_item) => {
1007
+ if (!(equals$1(existing_errors_item, incoming_errors_item))) {
1008
+ return false;
1009
+ }
1010
+ });
1011
+ if (equals_errors_items === false) {
1012
+ return false;
1013
+ }
1014
+ return true;
1015
+ }
1016
+ const ingest = function BatchInvoiceDocGenOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1017
+ if (process.env.NODE_ENV !== 'production') {
1018
+ const validateError = validate(input);
1019
+ if (validateError !== null) {
1020
+ throw validateError;
1021
+ }
1022
+ }
1023
+ const key = keyBuilderFromType(luvio, input);
1024
+ const ttlToUse = TTL;
1025
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "BillingBatch", VERSION, RepresentationType, equals);
1026
+ return createLink(key);
1027
+ };
1028
+ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
1029
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1030
+ const rootKey = keyBuilderFromType(luvio, input);
1031
+ rootKeySet.set(rootKey, {
1032
+ namespace: keyPrefix,
1033
+ representationName: RepresentationType,
1034
+ mergeable: false
1035
+ });
1036
+ }
1037
+
1038
+ function select(luvio, params) {
1039
+ return select$1();
1040
+ }
1041
+ function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
1042
+ getTypeCacheKeys(storeKeyMap, luvio, response);
1043
+ }
1044
+ function ingestSuccess(luvio, resourceParams, response) {
1045
+ const { body } = response;
1046
+ const key = keyBuilderFromType(luvio, body);
1047
+ luvio.storeIngest(key, ingest, body);
1048
+ const snapshot = luvio.storeLookup({
1049
+ recordId: key,
1050
+ node: select(),
1051
+ variables: {},
1052
+ });
1053
+ if (process.env.NODE_ENV !== 'production') {
1054
+ if (snapshot.state !== 'Fulfilled') {
1055
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1056
+ }
1057
+ }
1058
+ deepFreeze(snapshot.data);
1059
+ return snapshot;
1060
+ }
1061
+ function createResourceRequest(config) {
1062
+ const headers = {};
1063
+ return {
1064
+ baseUri: '/services/data/v61.0',
1065
+ basePath: '/commerce/billing/invoices/invoice-batch-docgen/' + config.urlParams.invoiceBatchRunId + '/actions/run',
1066
+ method: 'post',
1067
+ body: null,
1068
+ urlParams: config.urlParams,
1069
+ queryParams: {},
1070
+ headers,
1071
+ priority: 'normal',
1072
+ };
1073
+ }
1074
+
1075
+ const adapterName = 'postBatchInvoiceDocGen';
1076
+ const postBatchInvoiceDocGen_ConfigPropertyMetadata = [
1077
+ generateParamConfigMetadata('invoiceBatchRunId', true, 0 /* UrlParameter */, 0 /* String */),
1078
+ ];
1079
+ const postBatchInvoiceDocGen_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, postBatchInvoiceDocGen_ConfigPropertyMetadata);
1080
+ const createResourceParams = /*#__PURE__*/ createResourceParams$4(postBatchInvoiceDocGen_ConfigPropertyMetadata);
1081
+ function typeCheckConfig(untrustedConfig) {
1082
+ const config = {};
1083
+ typeCheckConfig$4(untrustedConfig, config, postBatchInvoiceDocGen_ConfigPropertyMetadata);
1084
+ return config;
1085
+ }
1086
+ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
1087
+ if (!untrustedIsObject(untrustedConfig)) {
1088
+ return null;
1089
+ }
1090
+ if (process.env.NODE_ENV !== 'production') {
1091
+ validateConfig(untrustedConfig, configPropertyNames);
1092
+ }
1093
+ const config = typeCheckConfig(untrustedConfig);
1094
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1095
+ return null;
1096
+ }
1097
+ return config;
1098
+ }
1099
+ function buildNetworkSnapshot(luvio, config, options) {
1100
+ const resourceParams = createResourceParams(config);
1101
+ const request = createResourceRequest(resourceParams);
1102
+ return luvio.dispatchResourceRequest(request, options)
1103
+ .then((response) => {
1104
+ return luvio.handleSuccessResponse(() => {
1105
+ const snapshot = ingestSuccess(luvio, resourceParams, response);
1106
+ return luvio.storeBroadcast().then(() => snapshot);
1107
+ }, () => {
1108
+ const cache = new StoreKeyMap();
1109
+ getResponseCacheKeys(cache, luvio, resourceParams, response.body);
1110
+ return cache;
1111
+ });
1112
+ }, (response) => {
1113
+ deepFreeze(response);
1114
+ throw response;
1115
+ });
1116
+ }
1117
+ const postBatchInvoiceDocGenAdapterFactory = (luvio) => {
1118
+ return function postBatchInvoiceDocGen(untrustedConfig) {
1119
+ const config = validateAdapterConfig(untrustedConfig, postBatchInvoiceDocGen_ConfigPropertyNames);
1120
+ // Invalid or incomplete config
1121
+ if (config === null) {
1122
+ throw new Error('Invalid config for "postBatchInvoiceDocGen"');
1123
+ }
1124
+ return buildNetworkSnapshot(luvio, config);
1125
+ };
1126
+ };
1127
+
858
1128
  let createInvoicesBatchScheduler;
859
1129
  let createPaymentsBatchScheduler;
860
1130
  let postBatchDraftInvoices;
1131
+ let postBatchInvoiceDocGen;
861
1132
  // Imperative GET Adapters
862
1133
  let postBatchDraftInvoices_imperative;
863
1134
  const postBatchDraftInvoicesMetadata = {
@@ -877,6 +1148,7 @@ function bindExportsTo(luvio) {
877
1148
  createInvoicesBatchScheduler: unwrapSnapshotData(createInvoicesBatchSchedulerAdapterFactory),
878
1149
  createPaymentsBatchScheduler: unwrapSnapshotData(createPaymentsBatchSchedulerAdapterFactory),
879
1150
  postBatchDraftInvoices: createWireAdapterConstructor(luvio, postBatchDraftInvoices_ldsAdapter, postBatchDraftInvoicesMetadata),
1151
+ postBatchInvoiceDocGen: unwrapSnapshotData(postBatchInvoiceDocGenAdapterFactory),
880
1152
  // Imperative GET Adapters
881
1153
  postBatchDraftInvoices_imperative: createImperativeAdapter(luvio, postBatchDraftInvoices_ldsAdapter, postBatchDraftInvoicesMetadata),
882
1154
  // Notify Update Availables
@@ -887,9 +1159,10 @@ withDefaultLuvio((luvio) => {
887
1159
  createInvoicesBatchScheduler,
888
1160
  createPaymentsBatchScheduler,
889
1161
  postBatchDraftInvoices,
1162
+ postBatchInvoiceDocGen,
890
1163
  postBatchDraftInvoices_imperative,
891
1164
  } = bindExportsTo(luvio));
892
1165
  });
893
1166
 
894
- export { createInvoicesBatchScheduler, createPaymentsBatchScheduler, postBatchDraftInvoices, postBatchDraftInvoices_imperative };
895
- // version: 1.284.0-8b78b708e
1167
+ export { createInvoicesBatchScheduler, createPaymentsBatchScheduler, postBatchDraftInvoices, postBatchDraftInvoices_imperative, postBatchInvoiceDocGen };
1168
+ // version: 1.285.0-c97dec82e