@salesforce/lds-adapters-revenue-billing-batch 1.301.0 → 1.303.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/dist/es/es2018/revenue-billing-batch.js +357 -183
- package/dist/es/es2018/types/src/generated/adapters/postCronExecutionDates.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +2 -1
- package/dist/es/es2018/types/src/generated/resources/postConnectBillingBatchCronExecutionDates.d.ts +11 -0
- package/dist/es/es2018/types/src/generated/types/CronExecutionDatesInputRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/CronExecutionDatesOutputRepresentation.d.ts +38 -0
- package/package.json +4 -4
- package/sfdc/index.js +361 -184
- package/src/raml/api.raml +32 -1
- package/src/raml/luvio.raml +8 -0
|
@@ -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$
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$5, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1, typeCheckConfig as typeCheckConfig$5 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -148,7 +148,7 @@ function createLink(ref) {
|
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
function validate$
|
|
151
|
+
function validate$a(obj, path = 'ScheduleOptionsInputRepresentation') {
|
|
152
152
|
const v_error = (() => {
|
|
153
153
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
154
154
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -196,8 +196,8 @@ function validate$9(obj, path = 'ScheduleOptionsInputRepresentation') {
|
|
|
196
196
|
return v_error === undefined ? null : v_error;
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
-
function validate$
|
|
200
|
-
const validateScheduleOptionsInputRepresentation_validateError = validate$
|
|
199
|
+
function validate$9(obj, path = 'PaymentsBatchSchedulerInputRepresentation') {
|
|
200
|
+
const validateScheduleOptionsInputRepresentation_validateError = validate$a(obj, path);
|
|
201
201
|
if (validateScheduleOptionsInputRepresentation_validateError !== null) {
|
|
202
202
|
return validateScheduleOptionsInputRepresentation_validateError;
|
|
203
203
|
}
|
|
@@ -230,7 +230,7 @@ function validate$8(obj, path = 'PaymentsBatchSchedulerInputRepresentation') {
|
|
|
230
230
|
return v_error === undefined ? null : v_error;
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
-
function validate$
|
|
233
|
+
function validate$8(obj, path = 'BillingBatchSchedulerRepresentation') {
|
|
234
234
|
const v_error = (() => {
|
|
235
235
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
236
236
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -244,16 +244,16 @@ function validate$7(obj, path = 'BillingBatchSchedulerRepresentation') {
|
|
|
244
244
|
return v_error === undefined ? null : v_error;
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
-
const TTL$
|
|
248
|
-
const VERSION$
|
|
249
|
-
function validate$
|
|
247
|
+
const TTL$4 = 1000;
|
|
248
|
+
const VERSION$5 = "eff71edc32270b9a1e6e1779cb811c3c";
|
|
249
|
+
function validate$7(obj, path = 'PaymentsBatchSchedulerOutputRepresentation') {
|
|
250
250
|
const v_error = (() => {
|
|
251
251
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
252
252
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
253
253
|
}
|
|
254
254
|
const obj_billingBatchScheduler = obj.billingBatchScheduler;
|
|
255
255
|
const path_billingBatchScheduler = path + '.billingBatchScheduler';
|
|
256
|
-
const referencepath_billingBatchSchedulerValidationError = validate$
|
|
256
|
+
const referencepath_billingBatchSchedulerValidationError = validate$8(obj_billingBatchScheduler, path_billingBatchScheduler);
|
|
257
257
|
if (referencepath_billingBatchSchedulerValidationError !== null) {
|
|
258
258
|
let message = 'Object doesn\'t match BillingBatchSchedulerRepresentation (at "' + path_billingBatchScheduler + '")\n';
|
|
259
259
|
message += referencepath_billingBatchSchedulerValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -262,68 +262,68 @@ function validate$6(obj, path = 'PaymentsBatchSchedulerOutputRepresentation') {
|
|
|
262
262
|
})();
|
|
263
263
|
return v_error === undefined ? null : v_error;
|
|
264
264
|
}
|
|
265
|
-
const RepresentationType$
|
|
266
|
-
function keyBuilder$
|
|
267
|
-
return keyPrefix + '::' + RepresentationType$
|
|
265
|
+
const RepresentationType$4 = 'PaymentsBatchSchedulerOutputRepresentation';
|
|
266
|
+
function keyBuilder$5(luvio, config) {
|
|
267
|
+
return keyPrefix + '::' + RepresentationType$4 + ':' + config.billingBatchSchedulerId;
|
|
268
268
|
}
|
|
269
|
-
function keyBuilderFromType$
|
|
269
|
+
function keyBuilderFromType$3(luvio, object) {
|
|
270
270
|
const keyParams = {
|
|
271
271
|
billingBatchSchedulerId: object.billingBatchScheduler.id
|
|
272
272
|
};
|
|
273
|
-
return keyBuilder$
|
|
273
|
+
return keyBuilder$5(luvio, keyParams);
|
|
274
274
|
}
|
|
275
|
-
function normalize$
|
|
275
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
276
276
|
return input;
|
|
277
277
|
}
|
|
278
|
-
const select$
|
|
278
|
+
const select$a = function PaymentsBatchSchedulerOutputRepresentationSelect() {
|
|
279
279
|
return {
|
|
280
280
|
kind: 'Fragment',
|
|
281
|
-
version: VERSION$
|
|
281
|
+
version: VERSION$5,
|
|
282
282
|
private: [],
|
|
283
283
|
opaque: true
|
|
284
284
|
};
|
|
285
285
|
};
|
|
286
|
-
function equals$
|
|
286
|
+
function equals$5(existing, incoming) {
|
|
287
287
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
288
288
|
return false;
|
|
289
289
|
}
|
|
290
290
|
return true;
|
|
291
291
|
}
|
|
292
|
-
const ingest$
|
|
292
|
+
const ingest$4 = function PaymentsBatchSchedulerOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
293
293
|
if (process.env.NODE_ENV !== 'production') {
|
|
294
|
-
const validateError = validate$
|
|
294
|
+
const validateError = validate$7(input);
|
|
295
295
|
if (validateError !== null) {
|
|
296
296
|
throw validateError;
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
|
-
const key = keyBuilderFromType$
|
|
300
|
-
const ttlToUse = TTL$
|
|
301
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
299
|
+
const key = keyBuilderFromType$3(luvio, input);
|
|
300
|
+
const ttlToUse = TTL$4;
|
|
301
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "BillingBatch", VERSION$5, RepresentationType$4, equals$5);
|
|
302
302
|
return createLink(key);
|
|
303
303
|
};
|
|
304
|
-
function getTypeCacheKeys$
|
|
304
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
305
305
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
306
|
-
const rootKey = keyBuilderFromType$
|
|
306
|
+
const rootKey = keyBuilderFromType$3(luvio, input);
|
|
307
307
|
rootKeySet.set(rootKey, {
|
|
308
308
|
namespace: keyPrefix,
|
|
309
|
-
representationName: RepresentationType$
|
|
309
|
+
representationName: RepresentationType$4,
|
|
310
310
|
mergeable: false
|
|
311
311
|
});
|
|
312
312
|
}
|
|
313
313
|
|
|
314
|
-
function select$
|
|
315
|
-
return select$
|
|
314
|
+
function select$9(luvio, params) {
|
|
315
|
+
return select$a();
|
|
316
316
|
}
|
|
317
|
-
function getResponseCacheKeys$
|
|
318
|
-
getTypeCacheKeys$
|
|
317
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
318
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response);
|
|
319
319
|
}
|
|
320
|
-
function ingestSuccess$
|
|
320
|
+
function ingestSuccess$4(luvio, resourceParams, response) {
|
|
321
321
|
const { body } = response;
|
|
322
|
-
const key = keyBuilderFromType$
|
|
323
|
-
luvio.storeIngest(key, ingest$
|
|
322
|
+
const key = keyBuilderFromType$3(luvio, body);
|
|
323
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
324
324
|
const snapshot = luvio.storeLookup({
|
|
325
325
|
recordId: key,
|
|
326
|
-
node: select$
|
|
326
|
+
node: select$9(),
|
|
327
327
|
variables: {},
|
|
328
328
|
});
|
|
329
329
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -334,7 +334,7 @@ function ingestSuccess$3(luvio, resourceParams, response) {
|
|
|
334
334
|
deepFreeze(snapshot.data);
|
|
335
335
|
return snapshot;
|
|
336
336
|
}
|
|
337
|
-
function createResourceRequest$
|
|
337
|
+
function createResourceRequest$4(config) {
|
|
338
338
|
const headers = {};
|
|
339
339
|
return {
|
|
340
340
|
baseUri: '/services/data/v62.0',
|
|
@@ -348,45 +348,45 @@ function createResourceRequest$3(config) {
|
|
|
348
348
|
};
|
|
349
349
|
}
|
|
350
350
|
|
|
351
|
-
const adapterName$
|
|
351
|
+
const adapterName$4 = 'createPaymentsBatchScheduler';
|
|
352
352
|
const createPaymentsBatchScheduler_ConfigPropertyMetadata = [
|
|
353
353
|
generateParamConfigMetadata('PaymentsBatchSchedulerInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
354
354
|
];
|
|
355
|
-
const createPaymentsBatchScheduler_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
356
|
-
const createResourceParams$
|
|
357
|
-
function typeCheckConfig$
|
|
355
|
+
const createPaymentsBatchScheduler_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, createPaymentsBatchScheduler_ConfigPropertyMetadata);
|
|
356
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$5(createPaymentsBatchScheduler_ConfigPropertyMetadata);
|
|
357
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
358
358
|
const config = {};
|
|
359
359
|
const untrustedConfig_PaymentsBatchSchedulerInput = untrustedConfig.PaymentsBatchSchedulerInput;
|
|
360
|
-
const referencePaymentsBatchSchedulerInputRepresentationValidationError = validate$
|
|
360
|
+
const referencePaymentsBatchSchedulerInputRepresentationValidationError = validate$9(untrustedConfig_PaymentsBatchSchedulerInput);
|
|
361
361
|
if (referencePaymentsBatchSchedulerInputRepresentationValidationError === null) {
|
|
362
362
|
config.PaymentsBatchSchedulerInput = untrustedConfig_PaymentsBatchSchedulerInput;
|
|
363
363
|
}
|
|
364
364
|
return config;
|
|
365
365
|
}
|
|
366
|
-
function validateAdapterConfig$
|
|
366
|
+
function validateAdapterConfig$4(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$
|
|
373
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
374
374
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
375
375
|
return null;
|
|
376
376
|
}
|
|
377
377
|
return config;
|
|
378
378
|
}
|
|
379
|
-
function buildNetworkSnapshot$
|
|
380
|
-
const resourceParams = createResourceParams$
|
|
381
|
-
const request = createResourceRequest$
|
|
379
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
380
|
+
const resourceParams = createResourceParams$4(config);
|
|
381
|
+
const request = createResourceRequest$4(resourceParams);
|
|
382
382
|
return luvio.dispatchResourceRequest(request, options)
|
|
383
383
|
.then((response) => {
|
|
384
384
|
return luvio.handleSuccessResponse(() => {
|
|
385
|
-
const snapshot = ingestSuccess$
|
|
385
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response);
|
|
386
386
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
387
387
|
}, () => {
|
|
388
388
|
const cache = new StoreKeyMap();
|
|
389
|
-
getResponseCacheKeys$
|
|
389
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
390
390
|
return cache;
|
|
391
391
|
});
|
|
392
392
|
}, (response) => {
|
|
@@ -396,16 +396,16 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
396
396
|
}
|
|
397
397
|
const createPaymentsBatchSchedulerAdapterFactory = (luvio) => {
|
|
398
398
|
return function createPaymentsBatchScheduler(untrustedConfig) {
|
|
399
|
-
const config = validateAdapterConfig$
|
|
399
|
+
const config = validateAdapterConfig$4(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$
|
|
404
|
+
return buildNetworkSnapshot$4(luvio, config);
|
|
405
405
|
};
|
|
406
406
|
};
|
|
407
407
|
|
|
408
|
-
function validate$
|
|
408
|
+
function validate$6(obj, path = 'ScheduleOptionsInputRepresentationForInvoice') {
|
|
409
409
|
const v_error = (() => {
|
|
410
410
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
411
411
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -456,8 +456,8 @@ function validate$5(obj, path = 'ScheduleOptionsInputRepresentationForInvoice')
|
|
|
456
456
|
return v_error === undefined ? null : v_error;
|
|
457
457
|
}
|
|
458
458
|
|
|
459
|
-
function validate$
|
|
460
|
-
const validateScheduleOptionsInputRepresentationForInvoice_validateError = validate$
|
|
459
|
+
function validate$5(obj, path = 'BatchInvoiceSchedulerInputRepresentation') {
|
|
460
|
+
const validateScheduleOptionsInputRepresentationForInvoice_validateError = validate$6(obj, path);
|
|
461
461
|
if (validateScheduleOptionsInputRepresentationForInvoice_validateError !== null) {
|
|
462
462
|
return validateScheduleOptionsInputRepresentationForInvoice_validateError;
|
|
463
463
|
}
|
|
@@ -483,16 +483,16 @@ function validate$4(obj, path = 'BatchInvoiceSchedulerInputRepresentation') {
|
|
|
483
483
|
return v_error === undefined ? null : v_error;
|
|
484
484
|
}
|
|
485
485
|
|
|
486
|
-
const TTL$
|
|
487
|
-
const VERSION$
|
|
488
|
-
function validate$
|
|
486
|
+
const TTL$3 = 1000;
|
|
487
|
+
const VERSION$4 = "15c358b0b4903143c526f63f4010b958";
|
|
488
|
+
function validate$4(obj, path = 'InvoicesBatchSchedulerOutputRepresentation') {
|
|
489
489
|
const v_error = (() => {
|
|
490
490
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
491
491
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
492
492
|
}
|
|
493
493
|
const obj_billingBatchScheduler = obj.billingBatchScheduler;
|
|
494
494
|
const path_billingBatchScheduler = path + '.billingBatchScheduler';
|
|
495
|
-
const referencepath_billingBatchSchedulerValidationError = validate$
|
|
495
|
+
const referencepath_billingBatchSchedulerValidationError = validate$8(obj_billingBatchScheduler, path_billingBatchScheduler);
|
|
496
496
|
if (referencepath_billingBatchSchedulerValidationError !== null) {
|
|
497
497
|
let message = 'Object doesn\'t match BillingBatchSchedulerRepresentation (at "' + path_billingBatchScheduler + '")\n';
|
|
498
498
|
message += referencepath_billingBatchSchedulerValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -501,68 +501,68 @@ function validate$3(obj, path = 'InvoicesBatchSchedulerOutputRepresentation') {
|
|
|
501
501
|
})();
|
|
502
502
|
return v_error === undefined ? null : v_error;
|
|
503
503
|
}
|
|
504
|
-
const RepresentationType$
|
|
505
|
-
function keyBuilder$
|
|
506
|
-
return keyPrefix + '::' + RepresentationType$
|
|
504
|
+
const RepresentationType$3 = 'InvoicesBatchSchedulerOutputRepresentation';
|
|
505
|
+
function keyBuilder$4(luvio, config) {
|
|
506
|
+
return keyPrefix + '::' + RepresentationType$3 + ':' + config.billingBatchSchedulerId;
|
|
507
507
|
}
|
|
508
|
-
function keyBuilderFromType$
|
|
508
|
+
function keyBuilderFromType$2(luvio, object) {
|
|
509
509
|
const keyParams = {
|
|
510
510
|
billingBatchSchedulerId: object.billingBatchScheduler.id
|
|
511
511
|
};
|
|
512
|
-
return keyBuilder$
|
|
512
|
+
return keyBuilder$4(luvio, keyParams);
|
|
513
513
|
}
|
|
514
|
-
function normalize$
|
|
514
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
515
515
|
return input;
|
|
516
516
|
}
|
|
517
|
-
const select$
|
|
517
|
+
const select$8 = function InvoicesBatchSchedulerOutputRepresentationSelect() {
|
|
518
518
|
return {
|
|
519
519
|
kind: 'Fragment',
|
|
520
|
-
version: VERSION$
|
|
520
|
+
version: VERSION$4,
|
|
521
521
|
private: [],
|
|
522
522
|
opaque: true
|
|
523
523
|
};
|
|
524
524
|
};
|
|
525
|
-
function equals$
|
|
525
|
+
function equals$4(existing, incoming) {
|
|
526
526
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
527
527
|
return false;
|
|
528
528
|
}
|
|
529
529
|
return true;
|
|
530
530
|
}
|
|
531
|
-
const ingest$
|
|
531
|
+
const ingest$3 = function InvoicesBatchSchedulerOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
532
532
|
if (process.env.NODE_ENV !== 'production') {
|
|
533
|
-
const validateError = validate$
|
|
533
|
+
const validateError = validate$4(input);
|
|
534
534
|
if (validateError !== null) {
|
|
535
535
|
throw validateError;
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
|
-
const key = keyBuilderFromType$
|
|
539
|
-
const ttlToUse = TTL$
|
|
540
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
538
|
+
const key = keyBuilderFromType$2(luvio, input);
|
|
539
|
+
const ttlToUse = TTL$3;
|
|
540
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "BillingBatch", VERSION$4, RepresentationType$3, equals$4);
|
|
541
541
|
return createLink(key);
|
|
542
542
|
};
|
|
543
|
-
function getTypeCacheKeys$
|
|
543
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
544
544
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
545
|
-
const rootKey = keyBuilderFromType$
|
|
545
|
+
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
546
546
|
rootKeySet.set(rootKey, {
|
|
547
547
|
namespace: keyPrefix,
|
|
548
|
-
representationName: RepresentationType$
|
|
548
|
+
representationName: RepresentationType$3,
|
|
549
549
|
mergeable: false
|
|
550
550
|
});
|
|
551
551
|
}
|
|
552
552
|
|
|
553
|
-
function select$
|
|
554
|
-
return select$
|
|
553
|
+
function select$7(luvio, params) {
|
|
554
|
+
return select$8();
|
|
555
555
|
}
|
|
556
|
-
function getResponseCacheKeys$
|
|
557
|
-
getTypeCacheKeys$
|
|
556
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
557
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response);
|
|
558
558
|
}
|
|
559
|
-
function ingestSuccess$
|
|
559
|
+
function ingestSuccess$3(luvio, resourceParams, response) {
|
|
560
560
|
const { body } = response;
|
|
561
|
-
const key = keyBuilderFromType$
|
|
562
|
-
luvio.storeIngest(key, ingest$
|
|
561
|
+
const key = keyBuilderFromType$2(luvio, body);
|
|
562
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
563
563
|
const snapshot = luvio.storeLookup({
|
|
564
564
|
recordId: key,
|
|
565
|
-
node: select$
|
|
565
|
+
node: select$7(),
|
|
566
566
|
variables: {},
|
|
567
567
|
});
|
|
568
568
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -573,7 +573,7 @@ function ingestSuccess$2(luvio, resourceParams, response) {
|
|
|
573
573
|
deepFreeze(snapshot.data);
|
|
574
574
|
return snapshot;
|
|
575
575
|
}
|
|
576
|
-
function createResourceRequest$
|
|
576
|
+
function createResourceRequest$3(config) {
|
|
577
577
|
const headers = {};
|
|
578
578
|
return {
|
|
579
579
|
baseUri: '/services/data/v62.0',
|
|
@@ -587,45 +587,45 @@ function createResourceRequest$2(config) {
|
|
|
587
587
|
};
|
|
588
588
|
}
|
|
589
589
|
|
|
590
|
-
const adapterName$
|
|
590
|
+
const adapterName$3 = 'createInvoicesBatchScheduler';
|
|
591
591
|
const createInvoicesBatchScheduler_ConfigPropertyMetadata = [
|
|
592
592
|
generateParamConfigMetadata('BatchInvoiceSchedulerInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
593
593
|
];
|
|
594
|
-
const createInvoicesBatchScheduler_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
595
|
-
const createResourceParams$
|
|
596
|
-
function typeCheckConfig$
|
|
594
|
+
const createInvoicesBatchScheduler_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, createInvoicesBatchScheduler_ConfigPropertyMetadata);
|
|
595
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$5(createInvoicesBatchScheduler_ConfigPropertyMetadata);
|
|
596
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
597
597
|
const config = {};
|
|
598
598
|
const untrustedConfig_BatchInvoiceSchedulerInput = untrustedConfig.BatchInvoiceSchedulerInput;
|
|
599
|
-
const referenceBatchInvoiceSchedulerInputRepresentationValidationError = validate$
|
|
599
|
+
const referenceBatchInvoiceSchedulerInputRepresentationValidationError = validate$5(untrustedConfig_BatchInvoiceSchedulerInput);
|
|
600
600
|
if (referenceBatchInvoiceSchedulerInputRepresentationValidationError === null) {
|
|
601
601
|
config.BatchInvoiceSchedulerInput = untrustedConfig_BatchInvoiceSchedulerInput;
|
|
602
602
|
}
|
|
603
603
|
return config;
|
|
604
604
|
}
|
|
605
|
-
function validateAdapterConfig$
|
|
605
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
606
606
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
607
607
|
return null;
|
|
608
608
|
}
|
|
609
609
|
if (process.env.NODE_ENV !== 'production') {
|
|
610
610
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
611
611
|
}
|
|
612
|
-
const config = typeCheckConfig$
|
|
612
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
613
613
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
614
614
|
return null;
|
|
615
615
|
}
|
|
616
616
|
return config;
|
|
617
617
|
}
|
|
618
|
-
function buildNetworkSnapshot$
|
|
619
|
-
const resourceParams = createResourceParams$
|
|
620
|
-
const request = createResourceRequest$
|
|
618
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
619
|
+
const resourceParams = createResourceParams$3(config);
|
|
620
|
+
const request = createResourceRequest$3(resourceParams);
|
|
621
621
|
return luvio.dispatchResourceRequest(request, options)
|
|
622
622
|
.then((response) => {
|
|
623
623
|
return luvio.handleSuccessResponse(() => {
|
|
624
|
-
const snapshot = ingestSuccess$
|
|
624
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response);
|
|
625
625
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
626
626
|
}, () => {
|
|
627
627
|
const cache = new StoreKeyMap();
|
|
628
|
-
getResponseCacheKeys$
|
|
628
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
629
629
|
return cache;
|
|
630
630
|
});
|
|
631
631
|
}, (response) => {
|
|
@@ -635,18 +635,18 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
635
635
|
}
|
|
636
636
|
const createInvoicesBatchSchedulerAdapterFactory = (luvio) => {
|
|
637
637
|
return function createInvoicesBatchScheduler(untrustedConfig) {
|
|
638
|
-
const config = validateAdapterConfig$
|
|
638
|
+
const config = validateAdapterConfig$3(untrustedConfig, createInvoicesBatchScheduler_ConfigPropertyNames);
|
|
639
639
|
// Invalid or incomplete config
|
|
640
640
|
if (config === null) {
|
|
641
641
|
throw new Error('Invalid config for "createInvoicesBatchScheduler"');
|
|
642
642
|
}
|
|
643
|
-
return buildNetworkSnapshot$
|
|
643
|
+
return buildNetworkSnapshot$3(luvio, config);
|
|
644
644
|
};
|
|
645
645
|
};
|
|
646
646
|
|
|
647
|
-
const TTL$
|
|
648
|
-
const VERSION$
|
|
649
|
-
function validate$
|
|
647
|
+
const TTL$2 = 1000;
|
|
648
|
+
const VERSION$3 = "1b89e7904345b50c1a8bfa0fc6e7dff0";
|
|
649
|
+
function validate$3(obj, path = 'InvoiceBatchDraftToPostedOutputRepresentation') {
|
|
650
650
|
const v_error = (() => {
|
|
651
651
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
652
652
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -664,14 +664,14 @@ function validate$2(obj, path = 'InvoiceBatchDraftToPostedOutputRepresentation')
|
|
|
664
664
|
})();
|
|
665
665
|
return v_error === undefined ? null : v_error;
|
|
666
666
|
}
|
|
667
|
-
const RepresentationType$
|
|
668
|
-
function normalize$
|
|
667
|
+
const RepresentationType$2 = 'InvoiceBatchDraftToPostedOutputRepresentation';
|
|
668
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
669
669
|
return input;
|
|
670
670
|
}
|
|
671
|
-
const select$
|
|
671
|
+
const select$6 = function InvoiceBatchDraftToPostedOutputRepresentationSelect() {
|
|
672
672
|
return {
|
|
673
673
|
kind: 'Fragment',
|
|
674
|
-
version: VERSION$
|
|
674
|
+
version: VERSION$3,
|
|
675
675
|
private: [],
|
|
676
676
|
selections: [
|
|
677
677
|
{
|
|
@@ -685,7 +685,7 @@ const select$4 = function InvoiceBatchDraftToPostedOutputRepresentationSelect()
|
|
|
685
685
|
]
|
|
686
686
|
};
|
|
687
687
|
};
|
|
688
|
-
function equals$
|
|
688
|
+
function equals$3(existing, incoming) {
|
|
689
689
|
const existing_success = existing.success;
|
|
690
690
|
const incoming_success = incoming.success;
|
|
691
691
|
if (!(existing_success === incoming_success)) {
|
|
@@ -698,44 +698,44 @@ function equals$2(existing, incoming) {
|
|
|
698
698
|
}
|
|
699
699
|
return true;
|
|
700
700
|
}
|
|
701
|
-
const ingest$
|
|
701
|
+
const ingest$2 = function InvoiceBatchDraftToPostedOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
702
702
|
if (process.env.NODE_ENV !== 'production') {
|
|
703
|
-
const validateError = validate$
|
|
703
|
+
const validateError = validate$3(input);
|
|
704
704
|
if (validateError !== null) {
|
|
705
705
|
throw validateError;
|
|
706
706
|
}
|
|
707
707
|
}
|
|
708
708
|
const key = path.fullPath;
|
|
709
|
-
const ttlToUse = TTL$
|
|
710
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
709
|
+
const ttlToUse = TTL$2;
|
|
710
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "BillingBatch", VERSION$3, RepresentationType$2, equals$3);
|
|
711
711
|
return createLink(key);
|
|
712
712
|
};
|
|
713
|
-
function getTypeCacheKeys$
|
|
713
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
714
714
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
715
715
|
const rootKey = fullPathFactory();
|
|
716
716
|
rootKeySet.set(rootKey, {
|
|
717
717
|
namespace: keyPrefix,
|
|
718
|
-
representationName: RepresentationType$
|
|
718
|
+
representationName: RepresentationType$2,
|
|
719
719
|
mergeable: false
|
|
720
720
|
});
|
|
721
721
|
}
|
|
722
722
|
|
|
723
|
-
function select$
|
|
724
|
-
return select$
|
|
723
|
+
function select$5(luvio, params) {
|
|
724
|
+
return select$6();
|
|
725
725
|
}
|
|
726
|
-
function keyBuilder$
|
|
726
|
+
function keyBuilder$3(luvio, params) {
|
|
727
727
|
return keyPrefix + '::InvoiceBatchDraftToPostedOutputRepresentation:(' + 'invoiceBatchRunId:' + params.urlParams.invoiceBatchRunId + ',' + stableJSONStringify(params.body) + ')';
|
|
728
728
|
}
|
|
729
|
-
function getResponseCacheKeys$
|
|
730
|
-
getTypeCacheKeys$
|
|
729
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
730
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
|
|
731
731
|
}
|
|
732
|
-
function ingestSuccess$
|
|
732
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
733
733
|
const { body } = response;
|
|
734
|
-
const key = keyBuilder$
|
|
735
|
-
luvio.storeIngest(key, ingest$
|
|
734
|
+
const key = keyBuilder$3(luvio, resourceParams);
|
|
735
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
736
736
|
const snapshot = luvio.storeLookup({
|
|
737
737
|
recordId: key,
|
|
738
|
-
node: select$
|
|
738
|
+
node: select$5(),
|
|
739
739
|
variables: {},
|
|
740
740
|
}, snapshotRefresh);
|
|
741
741
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -747,18 +747,18 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
747
747
|
return snapshot;
|
|
748
748
|
}
|
|
749
749
|
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
750
|
-
const key = keyBuilder$
|
|
750
|
+
const key = keyBuilder$3(luvio, params);
|
|
751
751
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
752
752
|
const storeMetadataParams = {
|
|
753
|
-
ttl: TTL$
|
|
753
|
+
ttl: TTL$2,
|
|
754
754
|
namespace: keyPrefix,
|
|
755
|
-
version: VERSION$
|
|
756
|
-
representationName: RepresentationType$
|
|
755
|
+
version: VERSION$3,
|
|
756
|
+
representationName: RepresentationType$2
|
|
757
757
|
};
|
|
758
758
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
759
759
|
return errorSnapshot;
|
|
760
760
|
}
|
|
761
|
-
function createResourceRequest$
|
|
761
|
+
function createResourceRequest$2(config) {
|
|
762
762
|
const headers = {};
|
|
763
763
|
return {
|
|
764
764
|
baseUri: '/services/data/v62.0',
|
|
@@ -772,60 +772,60 @@ function createResourceRequest$1(config) {
|
|
|
772
772
|
};
|
|
773
773
|
}
|
|
774
774
|
|
|
775
|
-
const adapterName$
|
|
775
|
+
const adapterName$2 = 'postBatchDraftInvoices';
|
|
776
776
|
const postBatchDraftInvoices_ConfigPropertyMetadata = [
|
|
777
777
|
generateParamConfigMetadata('invoiceBatchRunId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
778
778
|
];
|
|
779
|
-
const postBatchDraftInvoices_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
780
|
-
const createResourceParams$
|
|
781
|
-
function keyBuilder$
|
|
782
|
-
const resourceParams = createResourceParams$
|
|
783
|
-
return keyBuilder$
|
|
779
|
+
const postBatchDraftInvoices_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, postBatchDraftInvoices_ConfigPropertyMetadata);
|
|
780
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$5(postBatchDraftInvoices_ConfigPropertyMetadata);
|
|
781
|
+
function keyBuilder$2(luvio, config) {
|
|
782
|
+
const resourceParams = createResourceParams$2(config);
|
|
783
|
+
return keyBuilder$3(luvio, resourceParams);
|
|
784
784
|
}
|
|
785
|
-
function typeCheckConfig$
|
|
785
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
786
786
|
const config = {};
|
|
787
|
-
typeCheckConfig$
|
|
787
|
+
typeCheckConfig$5(untrustedConfig, config, postBatchDraftInvoices_ConfigPropertyMetadata);
|
|
788
788
|
return config;
|
|
789
789
|
}
|
|
790
|
-
function validateAdapterConfig$
|
|
790
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
791
791
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
792
792
|
return null;
|
|
793
793
|
}
|
|
794
794
|
if (process.env.NODE_ENV !== 'production') {
|
|
795
795
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
796
796
|
}
|
|
797
|
-
const config = typeCheckConfig$
|
|
797
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
798
798
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
799
799
|
return null;
|
|
800
800
|
}
|
|
801
801
|
return config;
|
|
802
802
|
}
|
|
803
803
|
function adapterFragment(luvio, config) {
|
|
804
|
-
createResourceParams$
|
|
805
|
-
return select$
|
|
804
|
+
createResourceParams$2(config);
|
|
805
|
+
return select$5();
|
|
806
806
|
}
|
|
807
807
|
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
808
|
-
const snapshot = ingestSuccess$
|
|
808
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
809
809
|
config,
|
|
810
|
-
resolve: () => buildNetworkSnapshot$
|
|
810
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
811
811
|
});
|
|
812
812
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
813
813
|
}
|
|
814
814
|
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
815
815
|
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
816
816
|
config,
|
|
817
|
-
resolve: () => buildNetworkSnapshot$
|
|
817
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
818
818
|
});
|
|
819
819
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
820
820
|
}
|
|
821
|
-
function buildNetworkSnapshot$
|
|
822
|
-
const resourceParams = createResourceParams$
|
|
823
|
-
const request = createResourceRequest$
|
|
821
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
822
|
+
const resourceParams = createResourceParams$2(config);
|
|
823
|
+
const request = createResourceRequest$2(resourceParams);
|
|
824
824
|
return luvio.dispatchResourceRequest(request, options)
|
|
825
825
|
.then((response) => {
|
|
826
826
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
827
827
|
const cache = new StoreKeyMap();
|
|
828
|
-
getResponseCacheKeys$
|
|
828
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
829
829
|
return cache;
|
|
830
830
|
});
|
|
831
831
|
}, (response) => {
|
|
@@ -833,23 +833,23 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
833
833
|
});
|
|
834
834
|
}
|
|
835
835
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
836
|
-
return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
836
|
+
return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, 'get', false);
|
|
837
837
|
}
|
|
838
838
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
839
839
|
const { luvio, config } = context;
|
|
840
840
|
const selector = {
|
|
841
|
-
recordId: keyBuilder$
|
|
841
|
+
recordId: keyBuilder$2(luvio, config),
|
|
842
842
|
node: adapterFragment(luvio, config),
|
|
843
843
|
variables: {},
|
|
844
844
|
};
|
|
845
845
|
const cacheSnapshot = storeLookup(selector, {
|
|
846
846
|
config,
|
|
847
|
-
resolve: () => buildNetworkSnapshot$
|
|
847
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
848
848
|
});
|
|
849
849
|
return cacheSnapshot;
|
|
850
850
|
}
|
|
851
851
|
const postBatchDraftInvoicesAdapterFactory = (luvio) => function BillingBatch__postBatchDraftInvoices(untrustedConfig, requestContext) {
|
|
852
|
-
const config = validateAdapterConfig$
|
|
852
|
+
const config = validateAdapterConfig$2(untrustedConfig, postBatchDraftInvoices_ConfigPropertyNames);
|
|
853
853
|
// Invalid or incomplete config
|
|
854
854
|
if (config === null) {
|
|
855
855
|
return null;
|
|
@@ -858,8 +858,8 @@ const postBatchDraftInvoicesAdapterFactory = (luvio) => function BillingBatch__p
|
|
|
858
858
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
859
859
|
};
|
|
860
860
|
|
|
861
|
-
const VERSION$
|
|
862
|
-
function validate$
|
|
861
|
+
const VERSION$2 = "ae245aac2922b53e1ff758392e317d39";
|
|
862
|
+
function validate$2(obj, path = 'BatchInvoiceDocGenErrorRepresentation') {
|
|
863
863
|
const v_error = (() => {
|
|
864
864
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
865
865
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -877,10 +877,10 @@ function validate$1(obj, path = 'BatchInvoiceDocGenErrorRepresentation') {
|
|
|
877
877
|
})();
|
|
878
878
|
return v_error === undefined ? null : v_error;
|
|
879
879
|
}
|
|
880
|
-
const select$
|
|
880
|
+
const select$4 = function BatchInvoiceDocGenErrorRepresentationSelect() {
|
|
881
881
|
return {
|
|
882
882
|
kind: 'Fragment',
|
|
883
|
-
version: VERSION$
|
|
883
|
+
version: VERSION$2,
|
|
884
884
|
private: [],
|
|
885
885
|
selections: [
|
|
886
886
|
{
|
|
@@ -894,7 +894,7 @@ const select$2 = function BatchInvoiceDocGenErrorRepresentationSelect() {
|
|
|
894
894
|
]
|
|
895
895
|
};
|
|
896
896
|
};
|
|
897
|
-
function equals$
|
|
897
|
+
function equals$2(existing, incoming) {
|
|
898
898
|
const existing_errorCode = existing.errorCode;
|
|
899
899
|
const incoming_errorCode = incoming.errorCode;
|
|
900
900
|
if (!(existing_errorCode === incoming_errorCode)) {
|
|
@@ -908,9 +908,9 @@ function equals$1(existing, incoming) {
|
|
|
908
908
|
return true;
|
|
909
909
|
}
|
|
910
910
|
|
|
911
|
-
const TTL = 1000;
|
|
912
|
-
const VERSION = "1630988ffc3067417295a90783bd1812";
|
|
913
|
-
function validate(obj, path = 'BatchInvoiceDocGenOutputRepresentation') {
|
|
911
|
+
const TTL$1 = 1000;
|
|
912
|
+
const VERSION$1 = "1630988ffc3067417295a90783bd1812";
|
|
913
|
+
function validate$1(obj, path = 'BatchInvoiceDocGenOutputRepresentation') {
|
|
914
914
|
const v_error = (() => {
|
|
915
915
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
916
916
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -923,7 +923,7 @@ function validate(obj, path = 'BatchInvoiceDocGenOutputRepresentation') {
|
|
|
923
923
|
for (let i = 0; i < obj_errors.length; i++) {
|
|
924
924
|
const obj_errors_item = obj_errors[i];
|
|
925
925
|
const path_errors_item = path_errors + '[' + i + ']';
|
|
926
|
-
const referencepath_errors_itemValidationError = validate$
|
|
926
|
+
const referencepath_errors_itemValidationError = validate$2(obj_errors_item, path_errors_item);
|
|
927
927
|
if (referencepath_errors_itemValidationError !== null) {
|
|
928
928
|
let message = 'Object doesn\'t match BatchInvoiceDocGenErrorRepresentation (at "' + path_errors_item + '")\n';
|
|
929
929
|
message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -943,24 +943,24 @@ function validate(obj, path = 'BatchInvoiceDocGenOutputRepresentation') {
|
|
|
943
943
|
})();
|
|
944
944
|
return v_error === undefined ? null : v_error;
|
|
945
945
|
}
|
|
946
|
-
const RepresentationType = 'BatchInvoiceDocGenOutputRepresentation';
|
|
947
|
-
function keyBuilder(luvio, config) {
|
|
948
|
-
return keyPrefix + '::' + RepresentationType + ':' + config.requestIdentifier;
|
|
946
|
+
const RepresentationType$1 = 'BatchInvoiceDocGenOutputRepresentation';
|
|
947
|
+
function keyBuilder$1(luvio, config) {
|
|
948
|
+
return keyPrefix + '::' + RepresentationType$1 + ':' + config.requestIdentifier;
|
|
949
949
|
}
|
|
950
|
-
function keyBuilderFromType(luvio, object) {
|
|
950
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
951
951
|
const keyParams = {
|
|
952
952
|
requestIdentifier: object.requestIdentifier
|
|
953
953
|
};
|
|
954
|
-
return keyBuilder(luvio, keyParams);
|
|
954
|
+
return keyBuilder$1(luvio, keyParams);
|
|
955
955
|
}
|
|
956
|
-
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
956
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
957
957
|
return input;
|
|
958
958
|
}
|
|
959
|
-
const select$
|
|
960
|
-
const { selections: BatchInvoiceDocGenErrorRepresentation__selections, opaque: BatchInvoiceDocGenErrorRepresentation__opaque, } = select$
|
|
959
|
+
const select$3 = function BatchInvoiceDocGenOutputRepresentationSelect() {
|
|
960
|
+
const { selections: BatchInvoiceDocGenErrorRepresentation__selections, opaque: BatchInvoiceDocGenErrorRepresentation__opaque, } = select$4();
|
|
961
961
|
return {
|
|
962
962
|
kind: 'Fragment',
|
|
963
|
-
version: VERSION,
|
|
963
|
+
version: VERSION$1,
|
|
964
964
|
private: [],
|
|
965
965
|
selections: [
|
|
966
966
|
{
|
|
@@ -980,7 +980,7 @@ const select$1 = function BatchInvoiceDocGenOutputRepresentationSelect() {
|
|
|
980
980
|
]
|
|
981
981
|
};
|
|
982
982
|
};
|
|
983
|
-
function equals(existing, incoming) {
|
|
983
|
+
function equals$1(existing, incoming) {
|
|
984
984
|
const existing_success = existing.success;
|
|
985
985
|
const incoming_success = incoming.success;
|
|
986
986
|
if (!(existing_success === incoming_success)) {
|
|
@@ -994,7 +994,7 @@ function equals(existing, incoming) {
|
|
|
994
994
|
const existing_errors = existing.errors;
|
|
995
995
|
const incoming_errors = incoming.errors;
|
|
996
996
|
const equals_errors_items = equalsArray(existing_errors, incoming_errors, (existing_errors_item, incoming_errors_item) => {
|
|
997
|
-
if (!(equals$
|
|
997
|
+
if (!(equals$2(existing_errors_item, incoming_errors_item))) {
|
|
998
998
|
return false;
|
|
999
999
|
}
|
|
1000
1000
|
});
|
|
@@ -1003,7 +1003,182 @@ function equals(existing, incoming) {
|
|
|
1003
1003
|
}
|
|
1004
1004
|
return true;
|
|
1005
1005
|
}
|
|
1006
|
-
const ingest = function BatchInvoiceDocGenOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1006
|
+
const ingest$1 = function BatchInvoiceDocGenOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1007
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1008
|
+
const validateError = validate$1(input);
|
|
1009
|
+
if (validateError !== null) {
|
|
1010
|
+
throw validateError;
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
1014
|
+
const ttlToUse = TTL$1;
|
|
1015
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "BillingBatch", VERSION$1, RepresentationType$1, equals$1);
|
|
1016
|
+
return createLink(key);
|
|
1017
|
+
};
|
|
1018
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
1019
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1020
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
1021
|
+
rootKeySet.set(rootKey, {
|
|
1022
|
+
namespace: keyPrefix,
|
|
1023
|
+
representationName: RepresentationType$1,
|
|
1024
|
+
mergeable: false
|
|
1025
|
+
});
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
function select$2(luvio, params) {
|
|
1029
|
+
return select$3();
|
|
1030
|
+
}
|
|
1031
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
1032
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
1033
|
+
}
|
|
1034
|
+
function ingestSuccess$1(luvio, resourceParams, response) {
|
|
1035
|
+
const { body } = response;
|
|
1036
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
1037
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
1038
|
+
const snapshot = luvio.storeLookup({
|
|
1039
|
+
recordId: key,
|
|
1040
|
+
node: select$2(),
|
|
1041
|
+
variables: {},
|
|
1042
|
+
});
|
|
1043
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1044
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1045
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
deepFreeze(snapshot.data);
|
|
1049
|
+
return snapshot;
|
|
1050
|
+
}
|
|
1051
|
+
function createResourceRequest$1(config) {
|
|
1052
|
+
const headers = {};
|
|
1053
|
+
return {
|
|
1054
|
+
baseUri: '/services/data/v62.0',
|
|
1055
|
+
basePath: '/commerce/billing/invoices/invoice-batch-docgen/' + config.urlParams.invoiceBatchRunId + '/actions/' + config.urlParams.actionName + '',
|
|
1056
|
+
method: 'post',
|
|
1057
|
+
body: null,
|
|
1058
|
+
urlParams: config.urlParams,
|
|
1059
|
+
queryParams: {},
|
|
1060
|
+
headers,
|
|
1061
|
+
priority: 'normal',
|
|
1062
|
+
};
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
const adapterName$1 = 'postBatchInvoiceDocGen';
|
|
1066
|
+
const postBatchInvoiceDocGen_ConfigPropertyMetadata = [
|
|
1067
|
+
generateParamConfigMetadata('invoiceBatchRunId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1068
|
+
generateParamConfigMetadata('actionName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1069
|
+
];
|
|
1070
|
+
const postBatchInvoiceDocGen_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, postBatchInvoiceDocGen_ConfigPropertyMetadata);
|
|
1071
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$5(postBatchInvoiceDocGen_ConfigPropertyMetadata);
|
|
1072
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
1073
|
+
const config = {};
|
|
1074
|
+
typeCheckConfig$5(untrustedConfig, config, postBatchInvoiceDocGen_ConfigPropertyMetadata);
|
|
1075
|
+
return config;
|
|
1076
|
+
}
|
|
1077
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
1078
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1079
|
+
return null;
|
|
1080
|
+
}
|
|
1081
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1082
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1083
|
+
}
|
|
1084
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
1085
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1086
|
+
return null;
|
|
1087
|
+
}
|
|
1088
|
+
return config;
|
|
1089
|
+
}
|
|
1090
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
1091
|
+
const resourceParams = createResourceParams$1(config);
|
|
1092
|
+
const request = createResourceRequest$1(resourceParams);
|
|
1093
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1094
|
+
.then((response) => {
|
|
1095
|
+
return luvio.handleSuccessResponse(() => {
|
|
1096
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response);
|
|
1097
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1098
|
+
}, () => {
|
|
1099
|
+
const cache = new StoreKeyMap();
|
|
1100
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
1101
|
+
return cache;
|
|
1102
|
+
});
|
|
1103
|
+
}, (response) => {
|
|
1104
|
+
deepFreeze(response);
|
|
1105
|
+
throw response;
|
|
1106
|
+
});
|
|
1107
|
+
}
|
|
1108
|
+
const postBatchInvoiceDocGenAdapterFactory = (luvio) => {
|
|
1109
|
+
return function postBatchInvoiceDocGen(untrustedConfig) {
|
|
1110
|
+
const config = validateAdapterConfig$1(untrustedConfig, postBatchInvoiceDocGen_ConfigPropertyNames);
|
|
1111
|
+
// Invalid or incomplete config
|
|
1112
|
+
if (config === null) {
|
|
1113
|
+
throw new Error('Invalid config for "postBatchInvoiceDocGen"');
|
|
1114
|
+
}
|
|
1115
|
+
return buildNetworkSnapshot$1(luvio, config);
|
|
1116
|
+
};
|
|
1117
|
+
};
|
|
1118
|
+
|
|
1119
|
+
const TTL = 1000;
|
|
1120
|
+
const VERSION = "c7bbc92c6b88cd62361410ec3b1597e5";
|
|
1121
|
+
function validate(obj, path = 'CronExecutionDatesOutputRepresentation') {
|
|
1122
|
+
const v_error = (() => {
|
|
1123
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1124
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1125
|
+
}
|
|
1126
|
+
const obj_executionDates = obj.executionDates;
|
|
1127
|
+
const path_executionDates = path + '.executionDates';
|
|
1128
|
+
if (!ArrayIsArray(obj_executionDates)) {
|
|
1129
|
+
return new TypeError('Expected "array" but received "' + typeof obj_executionDates + '" (at "' + path_executionDates + '")');
|
|
1130
|
+
}
|
|
1131
|
+
for (let i = 0; i < obj_executionDates.length; i++) {
|
|
1132
|
+
const obj_executionDates_item = obj_executionDates[i];
|
|
1133
|
+
const path_executionDates_item = path_executionDates + '[' + i + ']';
|
|
1134
|
+
if (typeof obj_executionDates_item !== 'string') {
|
|
1135
|
+
return new TypeError('Expected "string" but received "' + typeof obj_executionDates_item + '" (at "' + path_executionDates_item + '")');
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
})();
|
|
1139
|
+
return v_error === undefined ? null : v_error;
|
|
1140
|
+
}
|
|
1141
|
+
const RepresentationType = 'CronExecutionDatesOutputRepresentation';
|
|
1142
|
+
function keyBuilder(luvio, config) {
|
|
1143
|
+
return keyPrefix + '::' + RepresentationType + ':' + '[' + config.executionDates.join(',') + ']';
|
|
1144
|
+
}
|
|
1145
|
+
function keyBuilderFromType(luvio, object) {
|
|
1146
|
+
const keyParams = {
|
|
1147
|
+
executionDates: object.executionDates
|
|
1148
|
+
};
|
|
1149
|
+
return keyBuilder(luvio, keyParams);
|
|
1150
|
+
}
|
|
1151
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
1152
|
+
return input;
|
|
1153
|
+
}
|
|
1154
|
+
const select$1 = function CronExecutionDatesOutputRepresentationSelect() {
|
|
1155
|
+
return {
|
|
1156
|
+
kind: 'Fragment',
|
|
1157
|
+
version: VERSION,
|
|
1158
|
+
private: [],
|
|
1159
|
+
selections: [
|
|
1160
|
+
{
|
|
1161
|
+
name: 'executionDates',
|
|
1162
|
+
kind: 'Scalar',
|
|
1163
|
+
plural: true
|
|
1164
|
+
}
|
|
1165
|
+
]
|
|
1166
|
+
};
|
|
1167
|
+
};
|
|
1168
|
+
function equals(existing, incoming) {
|
|
1169
|
+
const existing_executionDates = existing.executionDates;
|
|
1170
|
+
const incoming_executionDates = incoming.executionDates;
|
|
1171
|
+
const equals_executionDates_items = equalsArray(existing_executionDates, incoming_executionDates, (existing_executionDates_item, incoming_executionDates_item) => {
|
|
1172
|
+
if (!(existing_executionDates_item === incoming_executionDates_item)) {
|
|
1173
|
+
return false;
|
|
1174
|
+
}
|
|
1175
|
+
});
|
|
1176
|
+
if (equals_executionDates_items === false) {
|
|
1177
|
+
return false;
|
|
1178
|
+
}
|
|
1179
|
+
return true;
|
|
1180
|
+
}
|
|
1181
|
+
const ingest = function CronExecutionDatesOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1007
1182
|
if (process.env.NODE_ENV !== 'production') {
|
|
1008
1183
|
const validateError = validate(input);
|
|
1009
1184
|
if (validateError !== null) {
|
|
@@ -1052,26 +1227,25 @@ function createResourceRequest(config) {
|
|
|
1052
1227
|
const headers = {};
|
|
1053
1228
|
return {
|
|
1054
1229
|
baseUri: '/services/data/v62.0',
|
|
1055
|
-
basePath: '/
|
|
1230
|
+
basePath: '/connect/billing/batch/cron/execution-dates',
|
|
1056
1231
|
method: 'post',
|
|
1057
|
-
body:
|
|
1058
|
-
urlParams:
|
|
1232
|
+
body: config.body,
|
|
1233
|
+
urlParams: {},
|
|
1059
1234
|
queryParams: {},
|
|
1060
1235
|
headers,
|
|
1061
1236
|
priority: 'normal',
|
|
1062
1237
|
};
|
|
1063
1238
|
}
|
|
1064
1239
|
|
|
1065
|
-
const adapterName = '
|
|
1066
|
-
const
|
|
1067
|
-
generateParamConfigMetadata('
|
|
1068
|
-
generateParamConfigMetadata('actionName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1240
|
+
const adapterName = 'postCronExecutionDates';
|
|
1241
|
+
const postCronExecutionDates_ConfigPropertyMetadata = [
|
|
1242
|
+
generateParamConfigMetadata('numberOfNextExecutionDates', true, 2 /* Body */, 3 /* Integer */),
|
|
1069
1243
|
];
|
|
1070
|
-
const
|
|
1071
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
1244
|
+
const postCronExecutionDates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, postCronExecutionDates_ConfigPropertyMetadata);
|
|
1245
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$5(postCronExecutionDates_ConfigPropertyMetadata);
|
|
1072
1246
|
function typeCheckConfig(untrustedConfig) {
|
|
1073
1247
|
const config = {};
|
|
1074
|
-
typeCheckConfig$
|
|
1248
|
+
typeCheckConfig$5(untrustedConfig, config, postCronExecutionDates_ConfigPropertyMetadata);
|
|
1075
1249
|
return config;
|
|
1076
1250
|
}
|
|
1077
1251
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -1105,15 +1279,15 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
1105
1279
|
throw response;
|
|
1106
1280
|
});
|
|
1107
1281
|
}
|
|
1108
|
-
const
|
|
1109
|
-
return function
|
|
1110
|
-
const config = validateAdapterConfig(untrustedConfig,
|
|
1282
|
+
const postCronExecutionDatesAdapterFactory = (luvio) => {
|
|
1283
|
+
return function postCronExecutionDates(untrustedConfig) {
|
|
1284
|
+
const config = validateAdapterConfig(untrustedConfig, postCronExecutionDates_ConfigPropertyNames);
|
|
1111
1285
|
// Invalid or incomplete config
|
|
1112
1286
|
if (config === null) {
|
|
1113
|
-
throw new Error('Invalid config for "
|
|
1287
|
+
throw new Error('Invalid config for "postCronExecutionDates"');
|
|
1114
1288
|
}
|
|
1115
1289
|
return buildNetworkSnapshot(luvio, config);
|
|
1116
1290
|
};
|
|
1117
1291
|
};
|
|
1118
1292
|
|
|
1119
|
-
export { createInvoicesBatchSchedulerAdapterFactory, createPaymentsBatchSchedulerAdapterFactory, postBatchDraftInvoicesAdapterFactory, postBatchInvoiceDocGenAdapterFactory };
|
|
1293
|
+
export { createInvoicesBatchSchedulerAdapterFactory, createPaymentsBatchSchedulerAdapterFactory, postBatchDraftInvoicesAdapterFactory, postBatchInvoiceDocGenAdapterFactory, postCronExecutionDatesAdapterFactory };
|