@salesforce/lds-adapters-revenue-billing-batch 1.124.2 → 1.124.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/es/es2018/revenue-billing-batch.js +597 -597
  2. package/dist/{types → es/es2018/types}/src/generated/adapters/adapter-utils.d.ts +66 -66
  3. package/dist/{types → es/es2018/types}/src/generated/adapters/createInvoicesBatchScheduler.d.ts +15 -15
  4. package/dist/{types → es/es2018/types}/src/generated/adapters/createPaymentsBatchScheduler.d.ts +15 -15
  5. package/dist/{types → es/es2018/types}/src/generated/artifacts/main.d.ts +2 -2
  6. package/dist/{types → es/es2018/types}/src/generated/artifacts/sfdc.d.ts +3 -3
  7. package/dist/{types → es/es2018/types}/src/generated/resources/postCommerceInvoicingInvoiceSchedulers.d.ts +13 -13
  8. package/dist/{types → es/es2018/types}/src/generated/resources/postCommercePaymentsPaymentSchedulers.d.ts +13 -13
  9. package/dist/{types → es/es2018/types}/src/generated/types/BatchFilterCriteriaInputRepresentation.d.ts +35 -35
  10. package/dist/{types → es/es2018/types}/src/generated/types/BatchInvoiceSchedulerInputRepresentation.d.ts +30 -30
  11. package/dist/{types → es/es2018/types}/src/generated/types/BatchInvoiceSchedulerInputWrapperRepresentation.d.ts +29 -29
  12. package/dist/{types → es/es2018/types}/src/generated/types/BillingBatchSchedulerRepresentation.d.ts +29 -29
  13. package/dist/{types → es/es2018/types}/src/generated/types/InvoicesBatchSchedulerOutputRepresentation.d.ts +40 -40
  14. package/dist/{types → es/es2018/types}/src/generated/types/PaymentRunBatchFilterCriteriaInputRepresentation.d.ts +33 -33
  15. package/dist/{types → es/es2018/types}/src/generated/types/PaymentRunBatchFilterCriteriaInputRepresentations.d.ts +29 -29
  16. package/dist/{types → es/es2018/types}/src/generated/types/PaymentsBatchSchedulerInputRepresentation.d.ts +33 -33
  17. package/dist/{types → es/es2018/types}/src/generated/types/PaymentsBatchSchedulerInputWrapperRepresentation.d.ts +29 -29
  18. package/dist/{types → es/es2018/types}/src/generated/types/PaymentsBatchSchedulerOutputRepresentation.d.ts +40 -40
  19. package/dist/{types → es/es2018/types}/src/generated/types/ScheduleOptionsInputRepresentation.d.ts +47 -47
  20. package/dist/{types → es/es2018/types}/src/generated/types/ScheduleOptionsInputRepresentationForInvoice.d.ts +50 -50
  21. package/dist/{types → es/es2018/types}/src/generated/types/type-utils.d.ts +39 -39
  22. package/package.json +5 -5
  23. package/sfdc/index.d.ts +1 -1
  24. package/sfdc/index.js +616 -616
  25. package/dist/umd/es2018/revenue-billing-batch.js +0 -641
  26. package/dist/umd/es5/revenue-billing-batch.js +0 -648
package/sfdc/index.js CHANGED
@@ -15,648 +15,648 @@
15
15
  import { withDefaultLuvio } from 'force/ldsEngine';
16
16
  import { serializeStructuredKey, StoreKeyMap } from 'force/luvioEngine';
17
17
 
18
- const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
19
- const { keys: ObjectKeys$1, freeze: ObjectFreeze$1, create: ObjectCreate$1 } = Object;
20
- const { isArray: ArrayIsArray$1 } = Array;
21
- /**
22
- * Validates an adapter config is well-formed.
23
- * @param config The config to validate.
24
- * @param adapter The adapter validation configuration.
25
- * @param oneOf The keys the config must contain at least one of.
26
- * @throws A TypeError if config doesn't satisfy the adapter's config validation.
27
- */
28
- function validateConfig(config, adapter, oneOf) {
29
- const { displayName } = adapter;
30
- const { required, optional, unsupported } = adapter.parameters;
31
- if (config === undefined ||
32
- required.every(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
33
- throw new TypeError(`adapter ${displayName} configuration must specify ${required.sort().join(', ')}`);
34
- }
35
- if (oneOf && oneOf.some(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
36
- throw new TypeError(`adapter ${displayName} configuration must specify one of ${oneOf.sort().join(', ')}`);
37
- }
38
- if (unsupported !== undefined &&
39
- unsupported.some(req => ObjectPrototypeHasOwnProperty.call(config, req))) {
40
- throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
41
- }
42
- const supported = required.concat(optional);
43
- if (ObjectKeys$1(config).some(key => !supported.includes(key))) {
44
- throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
45
- }
46
- }
47
- function untrustedIsObject(untrusted) {
48
- return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
49
- }
50
- function areRequiredParametersPresent(config, configPropertyNames) {
51
- return configPropertyNames.parameters.required.every(req => req in config);
52
- }
18
+ const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
19
+ const { keys: ObjectKeys$1, freeze: ObjectFreeze$1, create: ObjectCreate$1 } = Object;
20
+ const { isArray: ArrayIsArray$1 } = Array;
21
+ /**
22
+ * Validates an adapter config is well-formed.
23
+ * @param config The config to validate.
24
+ * @param adapter The adapter validation configuration.
25
+ * @param oneOf The keys the config must contain at least one of.
26
+ * @throws A TypeError if config doesn't satisfy the adapter's config validation.
27
+ */
28
+ function validateConfig(config, adapter, oneOf) {
29
+ const { displayName } = adapter;
30
+ const { required, optional, unsupported } = adapter.parameters;
31
+ if (config === undefined ||
32
+ required.every(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
33
+ throw new TypeError(`adapter ${displayName} configuration must specify ${required.sort().join(', ')}`);
34
+ }
35
+ if (oneOf && oneOf.some(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
36
+ throw new TypeError(`adapter ${displayName} configuration must specify one of ${oneOf.sort().join(', ')}`);
37
+ }
38
+ if (unsupported !== undefined &&
39
+ unsupported.some(req => ObjectPrototypeHasOwnProperty.call(config, req))) {
40
+ throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
41
+ }
42
+ const supported = required.concat(optional);
43
+ if (ObjectKeys$1(config).some(key => !supported.includes(key))) {
44
+ throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
45
+ }
46
+ }
47
+ function untrustedIsObject(untrusted) {
48
+ return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
49
+ }
50
+ function areRequiredParametersPresent(config, configPropertyNames) {
51
+ return configPropertyNames.parameters.required.every(req => req in config);
52
+ }
53
53
  const keyPrefix = 'BillingBatch';
54
54
 
55
- const { freeze: ObjectFreeze, keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
56
- const { isArray: ArrayIsArray } = Array;
57
- const { stringify: JSONStringify } = JSON;
58
- function deepFreeze$3(value) {
59
- // No need to freeze primitives
60
- if (typeof value !== 'object' || value === null) {
61
- return;
62
- }
63
- if (ArrayIsArray(value)) {
64
- for (let i = 0, len = value.length; i < len; i += 1) {
65
- deepFreeze$3(value[i]);
66
- }
67
- }
68
- else {
69
- const keys = ObjectKeys(value);
70
- for (let i = 0, len = keys.length; i < len; i += 1) {
71
- deepFreeze$3(value[keys[i]]);
72
- }
73
- }
74
- ObjectFreeze(value);
75
- }
76
- function createLink(ref) {
77
- return {
78
- __ref: serializeStructuredKey(ref),
79
- };
55
+ const { freeze: ObjectFreeze, keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
56
+ const { isArray: ArrayIsArray } = Array;
57
+ const { stringify: JSONStringify } = JSON;
58
+ function deepFreeze$3(value) {
59
+ // No need to freeze primitives
60
+ if (typeof value !== 'object' || value === null) {
61
+ return;
62
+ }
63
+ if (ArrayIsArray(value)) {
64
+ for (let i = 0, len = value.length; i < len; i += 1) {
65
+ deepFreeze$3(value[i]);
66
+ }
67
+ }
68
+ else {
69
+ const keys = ObjectKeys(value);
70
+ for (let i = 0, len = keys.length; i < len; i += 1) {
71
+ deepFreeze$3(value[keys[i]]);
72
+ }
73
+ }
74
+ ObjectFreeze(value);
75
+ }
76
+ function createLink(ref) {
77
+ return {
78
+ __ref: serializeStructuredKey(ref),
79
+ };
80
80
  }
81
81
 
82
- function validate$6(obj, path = 'ScheduleOptionsInputRepresentationForInvoice') {
83
- const v_error = (() => {
84
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
85
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
86
- }
87
- if (obj.endDate !== undefined) {
88
- const obj_endDate = obj.endDate;
89
- const path_endDate = path + '.endDate';
90
- if (typeof obj_endDate !== 'string') {
91
- return new TypeError('Expected "string" but received "' + typeof obj_endDate + '" (at "' + path_endDate + '")');
92
- }
93
- }
94
- const obj_frequencyCadence = obj.frequencyCadence;
95
- const path_frequencyCadence = path + '.frequencyCadence';
96
- if (typeof obj_frequencyCadence !== 'string') {
97
- return new TypeError('Expected "string" but received "' + typeof obj_frequencyCadence + '" (at "' + path_frequencyCadence + '")');
98
- }
99
- const obj_frequencyCadenceOptions = obj.frequencyCadenceOptions;
100
- const path_frequencyCadenceOptions = path + '.frequencyCadenceOptions';
101
- if (typeof obj_frequencyCadenceOptions !== 'object' || ArrayIsArray(obj_frequencyCadenceOptions) || obj_frequencyCadenceOptions === null) {
102
- return new TypeError('Expected "object" but received "' + typeof obj_frequencyCadenceOptions + '" (at "' + path_frequencyCadenceOptions + '")');
103
- }
104
- const obj_preferredTime = obj.preferredTime;
105
- const path_preferredTime = path + '.preferredTime';
106
- if (typeof obj_preferredTime !== 'string') {
107
- return new TypeError('Expected "string" but received "' + typeof obj_preferredTime + '" (at "' + path_preferredTime + '")');
108
- }
109
- const obj_schedulerName = obj.schedulerName;
110
- const path_schedulerName = path + '.schedulerName';
111
- if (typeof obj_schedulerName !== 'string') {
112
- return new TypeError('Expected "string" but received "' + typeof obj_schedulerName + '" (at "' + path_schedulerName + '")');
113
- }
114
- const obj_startDate = obj.startDate;
115
- const path_startDate = path + '.startDate';
116
- if (typeof obj_startDate !== 'string') {
117
- return new TypeError('Expected "string" but received "' + typeof obj_startDate + '" (at "' + path_startDate + '")');
118
- }
119
- const obj_status = obj.status;
120
- const path_status = path + '.status';
121
- if (typeof obj_status !== 'string') {
122
- return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
123
- }
124
- const obj_timezone = obj.timezone;
125
- const path_timezone = path + '.timezone';
126
- if (typeof obj_timezone !== 'string') {
127
- return new TypeError('Expected "string" but received "' + typeof obj_timezone + '" (at "' + path_timezone + '")');
128
- }
129
- })();
130
- return v_error === undefined ? null : v_error;
82
+ function validate$6(obj, path = 'ScheduleOptionsInputRepresentationForInvoice') {
83
+ const v_error = (() => {
84
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
85
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
86
+ }
87
+ if (obj.endDate !== undefined) {
88
+ const obj_endDate = obj.endDate;
89
+ const path_endDate = path + '.endDate';
90
+ if (typeof obj_endDate !== 'string') {
91
+ return new TypeError('Expected "string" but received "' + typeof obj_endDate + '" (at "' + path_endDate + '")');
92
+ }
93
+ }
94
+ const obj_frequencyCadence = obj.frequencyCadence;
95
+ const path_frequencyCadence = path + '.frequencyCadence';
96
+ if (typeof obj_frequencyCadence !== 'string') {
97
+ return new TypeError('Expected "string" but received "' + typeof obj_frequencyCadence + '" (at "' + path_frequencyCadence + '")');
98
+ }
99
+ const obj_frequencyCadenceOptions = obj.frequencyCadenceOptions;
100
+ const path_frequencyCadenceOptions = path + '.frequencyCadenceOptions';
101
+ if (typeof obj_frequencyCadenceOptions !== 'object' || ArrayIsArray(obj_frequencyCadenceOptions) || obj_frequencyCadenceOptions === null) {
102
+ return new TypeError('Expected "object" but received "' + typeof obj_frequencyCadenceOptions + '" (at "' + path_frequencyCadenceOptions + '")');
103
+ }
104
+ const obj_preferredTime = obj.preferredTime;
105
+ const path_preferredTime = path + '.preferredTime';
106
+ if (typeof obj_preferredTime !== 'string') {
107
+ return new TypeError('Expected "string" but received "' + typeof obj_preferredTime + '" (at "' + path_preferredTime + '")');
108
+ }
109
+ const obj_schedulerName = obj.schedulerName;
110
+ const path_schedulerName = path + '.schedulerName';
111
+ if (typeof obj_schedulerName !== 'string') {
112
+ return new TypeError('Expected "string" but received "' + typeof obj_schedulerName + '" (at "' + path_schedulerName + '")');
113
+ }
114
+ const obj_startDate = obj.startDate;
115
+ const path_startDate = path + '.startDate';
116
+ if (typeof obj_startDate !== 'string') {
117
+ return new TypeError('Expected "string" but received "' + typeof obj_startDate + '" (at "' + path_startDate + '")');
118
+ }
119
+ const obj_status = obj.status;
120
+ const path_status = path + '.status';
121
+ if (typeof obj_status !== 'string') {
122
+ return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
123
+ }
124
+ const obj_timezone = obj.timezone;
125
+ const path_timezone = path + '.timezone';
126
+ if (typeof obj_timezone !== 'string') {
127
+ return new TypeError('Expected "string" but received "' + typeof obj_timezone + '" (at "' + path_timezone + '")');
128
+ }
129
+ })();
130
+ return v_error === undefined ? null : v_error;
131
131
  }
132
132
 
133
- function validate$5(obj, path = 'BatchInvoiceSchedulerInputRepresentation') {
134
- const validateScheduleOptionsInputRepresentationForInvoice_validateError = validate$6(obj, path);
135
- if (validateScheduleOptionsInputRepresentationForInvoice_validateError !== null) {
136
- return validateScheduleOptionsInputRepresentationForInvoice_validateError;
137
- }
138
- const v_error = (() => {
139
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
140
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
141
- }
142
- if (obj.filterCriteria !== undefined) {
143
- const obj_filterCriteria = obj.filterCriteria;
144
- const path_filterCriteria = path + '.filterCriteria';
145
- if (!ArrayIsArray(obj_filterCriteria)) {
146
- return new TypeError('Expected "array" but received "' + typeof obj_filterCriteria + '" (at "' + path_filterCriteria + '")');
147
- }
148
- for (let i = 0; i < obj_filterCriteria.length; i++) {
149
- const obj_filterCriteria_item = obj_filterCriteria[i];
150
- const path_filterCriteria_item = path_filterCriteria + '[' + i + ']';
151
- if (typeof obj_filterCriteria_item !== 'object' || ArrayIsArray(obj_filterCriteria_item) || obj_filterCriteria_item === null) {
152
- return new TypeError('Expected "object" but received "' + typeof obj_filterCriteria_item + '" (at "' + path_filterCriteria_item + '")');
153
- }
154
- }
155
- }
156
- })();
157
- return v_error === undefined ? null : v_error;
133
+ function validate$5(obj, path = 'BatchInvoiceSchedulerInputRepresentation') {
134
+ const validateScheduleOptionsInputRepresentationForInvoice_validateError = validate$6(obj, path);
135
+ if (validateScheduleOptionsInputRepresentationForInvoice_validateError !== null) {
136
+ return validateScheduleOptionsInputRepresentationForInvoice_validateError;
137
+ }
138
+ const v_error = (() => {
139
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
140
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
141
+ }
142
+ if (obj.filterCriteria !== undefined) {
143
+ const obj_filterCriteria = obj.filterCriteria;
144
+ const path_filterCriteria = path + '.filterCriteria';
145
+ if (!ArrayIsArray(obj_filterCriteria)) {
146
+ return new TypeError('Expected "array" but received "' + typeof obj_filterCriteria + '" (at "' + path_filterCriteria + '")');
147
+ }
148
+ for (let i = 0; i < obj_filterCriteria.length; i++) {
149
+ const obj_filterCriteria_item = obj_filterCriteria[i];
150
+ const path_filterCriteria_item = path_filterCriteria + '[' + i + ']';
151
+ if (typeof obj_filterCriteria_item !== 'object' || ArrayIsArray(obj_filterCriteria_item) || obj_filterCriteria_item === null) {
152
+ return new TypeError('Expected "object" but received "' + typeof obj_filterCriteria_item + '" (at "' + path_filterCriteria_item + '")');
153
+ }
154
+ }
155
+ }
156
+ })();
157
+ return v_error === undefined ? null : v_error;
158
158
  }
159
159
 
160
- function validate$4(obj, path = 'BillingBatchSchedulerRepresentation') {
161
- const v_error = (() => {
162
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
163
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
164
- }
165
- const obj_id = obj.id;
166
- const path_id = path + '.id';
167
- if (typeof obj_id !== 'string') {
168
- return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
169
- }
170
- })();
171
- return v_error === undefined ? null : v_error;
172
- }
173
- function deepFreeze$2(input) {
174
- ObjectFreeze(input);
160
+ function validate$4(obj, path = 'BillingBatchSchedulerRepresentation') {
161
+ const v_error = (() => {
162
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
163
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
164
+ }
165
+ const obj_id = obj.id;
166
+ const path_id = path + '.id';
167
+ if (typeof obj_id !== 'string') {
168
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
169
+ }
170
+ })();
171
+ return v_error === undefined ? null : v_error;
172
+ }
173
+ function deepFreeze$2(input) {
174
+ ObjectFreeze(input);
175
175
  }
176
176
 
177
- const TTL$1 = 1000;
178
- const VERSION$1 = "15c358b0b4903143c526f63f4010b958";
179
- function validate$3(obj, path = 'InvoicesBatchSchedulerOutputRepresentation') {
180
- const v_error = (() => {
181
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
182
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
183
- }
184
- const obj_billingBatchScheduler = obj.billingBatchScheduler;
185
- const path_billingBatchScheduler = path + '.billingBatchScheduler';
186
- const referencepath_billingBatchSchedulerValidationError = validate$4(obj_billingBatchScheduler, path_billingBatchScheduler);
187
- if (referencepath_billingBatchSchedulerValidationError !== null) {
188
- let message = 'Object doesn\'t match BillingBatchSchedulerRepresentation (at "' + path_billingBatchScheduler + '")\n';
189
- message += referencepath_billingBatchSchedulerValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
190
- return new TypeError(message);
191
- }
192
- })();
193
- return v_error === undefined ? null : v_error;
194
- }
195
- const RepresentationType$1 = 'InvoicesBatchSchedulerOutputRepresentation';
196
- function keyBuilder$1(luvio, config) {
197
- return keyPrefix + '::' + RepresentationType$1 + ':' + config.billingBatchSchedulerId;
198
- }
199
- function keyBuilderFromType$1(luvio, object) {
200
- const keyParams = {
201
- billingBatchSchedulerId: object.billingBatchScheduler.id
202
- };
203
- return keyBuilder$1(luvio, keyParams);
204
- }
205
- function normalize$1(input, existing, path, luvio, store, timestamp) {
206
- return input;
207
- }
208
- const select$3 = function InvoicesBatchSchedulerOutputRepresentationSelect() {
209
- return {
210
- kind: 'Fragment',
211
- version: VERSION$1,
212
- private: [],
213
- opaque: true
214
- };
215
- };
216
- function equals$1(existing, incoming) {
217
- if (JSONStringify(incoming) !== JSONStringify(existing)) {
218
- return false;
219
- }
220
- return true;
221
- }
222
- function deepFreeze$1(input) {
223
- const input_billingBatchScheduler = input.billingBatchScheduler;
224
- deepFreeze$2(input_billingBatchScheduler);
225
- ObjectFreeze(input);
226
- }
227
- const ingest$1 = function InvoicesBatchSchedulerOutputRepresentationIngest(input, path, luvio, store, timestamp) {
228
- if (process.env.NODE_ENV !== 'production') {
229
- const validateError = validate$3(input);
230
- if (validateError !== null) {
231
- throw validateError;
232
- }
233
- }
234
- const key = keyBuilderFromType$1(luvio, input);
235
- const existingRecord = store.readEntry(key);
236
- const ttlToUse = TTL$1;
237
- let incomingRecord = normalize$1(input, store.readEntry(key), {
238
- fullPath: key,
239
- parent: path.parent,
240
- propertyName: path.propertyName,
241
- ttl: ttlToUse
242
- });
243
- deepFreeze$1(input);
244
- if (existingRecord === undefined || equals$1(existingRecord, incomingRecord) === false) {
245
- luvio.storePublish(key, incomingRecord);
246
- }
247
- {
248
- const storeMetadataParams = {
249
- ttl: ttlToUse,
250
- namespace: "BillingBatch",
251
- version: VERSION$1,
252
- representationName: RepresentationType$1,
253
- };
254
- luvio.publishStoreMetadata(key, storeMetadataParams);
255
- }
256
- return createLink(key);
257
- };
258
- function getTypeCacheKeys$1(luvio, input, fullPathFactory) {
259
- const rootKeySet = new StoreKeyMap();
260
- // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
261
- const rootKey = keyBuilderFromType$1(luvio, input);
262
- rootKeySet.set(rootKey, {
263
- namespace: keyPrefix,
264
- representationName: RepresentationType$1,
265
- mergeable: false
266
- });
267
- return rootKeySet;
177
+ const TTL$1 = 1000;
178
+ const VERSION$1 = "15c358b0b4903143c526f63f4010b958";
179
+ function validate$3(obj, path = 'InvoicesBatchSchedulerOutputRepresentation') {
180
+ const v_error = (() => {
181
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
182
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
183
+ }
184
+ const obj_billingBatchScheduler = obj.billingBatchScheduler;
185
+ const path_billingBatchScheduler = path + '.billingBatchScheduler';
186
+ const referencepath_billingBatchSchedulerValidationError = validate$4(obj_billingBatchScheduler, path_billingBatchScheduler);
187
+ if (referencepath_billingBatchSchedulerValidationError !== null) {
188
+ let message = 'Object doesn\'t match BillingBatchSchedulerRepresentation (at "' + path_billingBatchScheduler + '")\n';
189
+ message += referencepath_billingBatchSchedulerValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
190
+ return new TypeError(message);
191
+ }
192
+ })();
193
+ return v_error === undefined ? null : v_error;
194
+ }
195
+ const RepresentationType$1 = 'InvoicesBatchSchedulerOutputRepresentation';
196
+ function keyBuilder$1(luvio, config) {
197
+ return keyPrefix + '::' + RepresentationType$1 + ':' + config.billingBatchSchedulerId;
198
+ }
199
+ function keyBuilderFromType$1(luvio, object) {
200
+ const keyParams = {
201
+ billingBatchSchedulerId: object.billingBatchScheduler.id
202
+ };
203
+ return keyBuilder$1(luvio, keyParams);
204
+ }
205
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
206
+ return input;
207
+ }
208
+ const select$3 = function InvoicesBatchSchedulerOutputRepresentationSelect() {
209
+ return {
210
+ kind: 'Fragment',
211
+ version: VERSION$1,
212
+ private: [],
213
+ opaque: true
214
+ };
215
+ };
216
+ function equals$1(existing, incoming) {
217
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
218
+ return false;
219
+ }
220
+ return true;
221
+ }
222
+ function deepFreeze$1(input) {
223
+ const input_billingBatchScheduler = input.billingBatchScheduler;
224
+ deepFreeze$2(input_billingBatchScheduler);
225
+ ObjectFreeze(input);
226
+ }
227
+ const ingest$1 = function InvoicesBatchSchedulerOutputRepresentationIngest(input, path, luvio, store, timestamp) {
228
+ if (process.env.NODE_ENV !== 'production') {
229
+ const validateError = validate$3(input);
230
+ if (validateError !== null) {
231
+ throw validateError;
232
+ }
233
+ }
234
+ const key = keyBuilderFromType$1(luvio, input);
235
+ const existingRecord = store.readEntry(key);
236
+ const ttlToUse = TTL$1;
237
+ let incomingRecord = normalize$1(input, store.readEntry(key), {
238
+ fullPath: key,
239
+ parent: path.parent,
240
+ propertyName: path.propertyName,
241
+ ttl: ttlToUse
242
+ });
243
+ deepFreeze$1(input);
244
+ if (existingRecord === undefined || equals$1(existingRecord, incomingRecord) === false) {
245
+ luvio.storePublish(key, incomingRecord);
246
+ }
247
+ {
248
+ const storeMetadataParams = {
249
+ ttl: ttlToUse,
250
+ namespace: "BillingBatch",
251
+ version: VERSION$1,
252
+ representationName: RepresentationType$1,
253
+ };
254
+ luvio.publishStoreMetadata(key, storeMetadataParams);
255
+ }
256
+ return createLink(key);
257
+ };
258
+ function getTypeCacheKeys$1(luvio, input, fullPathFactory) {
259
+ const rootKeySet = new StoreKeyMap();
260
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
261
+ const rootKey = keyBuilderFromType$1(luvio, input);
262
+ rootKeySet.set(rootKey, {
263
+ namespace: keyPrefix,
264
+ representationName: RepresentationType$1,
265
+ mergeable: false
266
+ });
267
+ return rootKeySet;
268
268
  }
269
269
 
270
- function select$2(luvio, params) {
271
- return select$3();
272
- }
273
- function getResponseCacheKeys$1(luvio, resourceParams, response) {
274
- return getTypeCacheKeys$1(luvio, response);
275
- }
276
- function ingestSuccess$1(luvio, resourceParams, response) {
277
- const { body } = response;
278
- const key = keyBuilderFromType$1(luvio, body);
279
- luvio.storeIngest(key, ingest$1, body);
280
- const snapshot = luvio.storeLookup({
281
- recordId: key,
282
- node: select$2(),
283
- variables: {},
284
- });
285
- if (process.env.NODE_ENV !== 'production') {
286
- if (snapshot.state !== 'Fulfilled') {
287
- throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
288
- }
289
- }
290
- return snapshot;
291
- }
292
- function createResourceRequest$1(config) {
293
- const headers = {};
294
- return {
295
- baseUri: '/services/data/v58.0',
296
- basePath: '/commerce/invoicing/invoice-schedulers',
297
- method: 'post',
298
- body: config.body,
299
- urlParams: {},
300
- queryParams: {},
301
- headers,
302
- priority: 'normal',
303
- };
270
+ function select$2(luvio, params) {
271
+ return select$3();
272
+ }
273
+ function getResponseCacheKeys$1(luvio, resourceParams, response) {
274
+ return getTypeCacheKeys$1(luvio, response);
275
+ }
276
+ function ingestSuccess$1(luvio, resourceParams, response) {
277
+ const { body } = response;
278
+ const key = keyBuilderFromType$1(luvio, body);
279
+ luvio.storeIngest(key, ingest$1, body);
280
+ const snapshot = luvio.storeLookup({
281
+ recordId: key,
282
+ node: select$2(),
283
+ variables: {},
284
+ });
285
+ if (process.env.NODE_ENV !== 'production') {
286
+ if (snapshot.state !== 'Fulfilled') {
287
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
288
+ }
289
+ }
290
+ return snapshot;
291
+ }
292
+ function createResourceRequest$1(config) {
293
+ const headers = {};
294
+ return {
295
+ baseUri: '/services/data/v58.0',
296
+ basePath: '/commerce/invoicing/invoice-schedulers',
297
+ method: 'post',
298
+ body: config.body,
299
+ urlParams: {},
300
+ queryParams: {},
301
+ headers,
302
+ priority: 'normal',
303
+ };
304
304
  }
305
305
 
306
- const createInvoicesBatchScheduler_ConfigPropertyNames = {
307
- displayName: 'createInvoicesBatchScheduler',
308
- parameters: {
309
- required: ['BatchInvoiceSchedulerInput'],
310
- optional: []
311
- }
312
- };
313
- function createResourceParams$1(config) {
314
- const resourceParams = {
315
- body: {
316
- BatchInvoiceSchedulerInput: config.BatchInvoiceSchedulerInput
317
- }
318
- };
319
- return resourceParams;
320
- }
321
- function typeCheckConfig$1(untrustedConfig) {
322
- const config = {};
323
- const untrustedConfig_BatchInvoiceSchedulerInput = untrustedConfig.BatchInvoiceSchedulerInput;
324
- const referenceBatchInvoiceSchedulerInputRepresentationValidationError = validate$5(untrustedConfig_BatchInvoiceSchedulerInput);
325
- if (referenceBatchInvoiceSchedulerInputRepresentationValidationError === null) {
326
- config.BatchInvoiceSchedulerInput = untrustedConfig_BatchInvoiceSchedulerInput;
327
- }
328
- return config;
329
- }
330
- function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
331
- if (!untrustedIsObject(untrustedConfig)) {
332
- return null;
333
- }
334
- if (process.env.NODE_ENV !== 'production') {
335
- validateConfig(untrustedConfig, configPropertyNames);
336
- }
337
- const config = typeCheckConfig$1(untrustedConfig);
338
- if (!areRequiredParametersPresent(config, configPropertyNames)) {
339
- return null;
340
- }
341
- return config;
342
- }
343
- function buildNetworkSnapshot$1(luvio, config, options) {
344
- const resourceParams = createResourceParams$1(config);
345
- const request = createResourceRequest$1(resourceParams);
346
- return luvio.dispatchResourceRequest(request, options)
347
- .then((response) => {
348
- return luvio.handleSuccessResponse(() => {
349
- const snapshot = ingestSuccess$1(luvio, resourceParams, response);
350
- return luvio.storeBroadcast().then(() => snapshot);
351
- }, () => getResponseCacheKeys$1(luvio, resourceParams, response.body));
352
- }, (response) => {
353
- deepFreeze$3(response);
354
- throw response;
355
- });
356
- }
357
- const createInvoicesBatchSchedulerAdapterFactory = (luvio) => {
358
- return function createInvoicesBatchScheduler(untrustedConfig) {
359
- const config = validateAdapterConfig$1(untrustedConfig, createInvoicesBatchScheduler_ConfigPropertyNames);
360
- // Invalid or incomplete config
361
- if (config === null) {
362
- throw new Error('Invalid config for "createInvoicesBatchScheduler"');
363
- }
364
- return buildNetworkSnapshot$1(luvio, config);
365
- };
306
+ const createInvoicesBatchScheduler_ConfigPropertyNames = {
307
+ displayName: 'createInvoicesBatchScheduler',
308
+ parameters: {
309
+ required: ['BatchInvoiceSchedulerInput'],
310
+ optional: []
311
+ }
312
+ };
313
+ function createResourceParams$1(config) {
314
+ const resourceParams = {
315
+ body: {
316
+ BatchInvoiceSchedulerInput: config.BatchInvoiceSchedulerInput
317
+ }
318
+ };
319
+ return resourceParams;
320
+ }
321
+ function typeCheckConfig$1(untrustedConfig) {
322
+ const config = {};
323
+ const untrustedConfig_BatchInvoiceSchedulerInput = untrustedConfig.BatchInvoiceSchedulerInput;
324
+ const referenceBatchInvoiceSchedulerInputRepresentationValidationError = validate$5(untrustedConfig_BatchInvoiceSchedulerInput);
325
+ if (referenceBatchInvoiceSchedulerInputRepresentationValidationError === null) {
326
+ config.BatchInvoiceSchedulerInput = untrustedConfig_BatchInvoiceSchedulerInput;
327
+ }
328
+ return config;
329
+ }
330
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
331
+ if (!untrustedIsObject(untrustedConfig)) {
332
+ return null;
333
+ }
334
+ if (process.env.NODE_ENV !== 'production') {
335
+ validateConfig(untrustedConfig, configPropertyNames);
336
+ }
337
+ const config = typeCheckConfig$1(untrustedConfig);
338
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
339
+ return null;
340
+ }
341
+ return config;
342
+ }
343
+ function buildNetworkSnapshot$1(luvio, config, options) {
344
+ const resourceParams = createResourceParams$1(config);
345
+ const request = createResourceRequest$1(resourceParams);
346
+ return luvio.dispatchResourceRequest(request, options)
347
+ .then((response) => {
348
+ return luvio.handleSuccessResponse(() => {
349
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response);
350
+ return luvio.storeBroadcast().then(() => snapshot);
351
+ }, () => getResponseCacheKeys$1(luvio, resourceParams, response.body));
352
+ }, (response) => {
353
+ deepFreeze$3(response);
354
+ throw response;
355
+ });
356
+ }
357
+ const createInvoicesBatchSchedulerAdapterFactory = (luvio) => {
358
+ return function createInvoicesBatchScheduler(untrustedConfig) {
359
+ const config = validateAdapterConfig$1(untrustedConfig, createInvoicesBatchScheduler_ConfigPropertyNames);
360
+ // Invalid or incomplete config
361
+ if (config === null) {
362
+ throw new Error('Invalid config for "createInvoicesBatchScheduler"');
363
+ }
364
+ return buildNetworkSnapshot$1(luvio, config);
365
+ };
366
366
  };
367
367
 
368
- function validate$2(obj, path = 'ScheduleOptionsInputRepresentation') {
369
- const v_error = (() => {
370
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
371
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
372
- }
373
- if (obj.endDate !== undefined) {
374
- const obj_endDate = obj.endDate;
375
- const path_endDate = path + '.endDate';
376
- if (typeof obj_endDate !== 'string') {
377
- return new TypeError('Expected "string" but received "' + typeof obj_endDate + '" (at "' + path_endDate + '")');
378
- }
379
- }
380
- const obj_frequencyCadence = obj.frequencyCadence;
381
- const path_frequencyCadence = path + '.frequencyCadence';
382
- if (typeof obj_frequencyCadence !== 'string') {
383
- return new TypeError('Expected "string" but received "' + typeof obj_frequencyCadence + '" (at "' + path_frequencyCadence + '")');
384
- }
385
- const obj_preferredTime = obj.preferredTime;
386
- const path_preferredTime = path + '.preferredTime';
387
- if (typeof obj_preferredTime !== 'string') {
388
- return new TypeError('Expected "string" but received "' + typeof obj_preferredTime + '" (at "' + path_preferredTime + '")');
389
- }
390
- if (obj.recursEveryMonthOnDay !== undefined) {
391
- const obj_recursEveryMonthOnDay = obj.recursEveryMonthOnDay;
392
- const path_recursEveryMonthOnDay = path + '.recursEveryMonthOnDay';
393
- if (typeof obj_recursEveryMonthOnDay !== 'string') {
394
- return new TypeError('Expected "string" but received "' + typeof obj_recursEveryMonthOnDay + '" (at "' + path_recursEveryMonthOnDay + '")');
395
- }
396
- }
397
- const obj_schedulerName = obj.schedulerName;
398
- const path_schedulerName = path + '.schedulerName';
399
- if (typeof obj_schedulerName !== 'string') {
400
- return new TypeError('Expected "string" but received "' + typeof obj_schedulerName + '" (at "' + path_schedulerName + '")');
401
- }
402
- const obj_startDate = obj.startDate;
403
- const path_startDate = path + '.startDate';
404
- if (typeof obj_startDate !== 'string') {
405
- return new TypeError('Expected "string" but received "' + typeof obj_startDate + '" (at "' + path_startDate + '")');
406
- }
407
- const obj_status = obj.status;
408
- const path_status = path + '.status';
409
- if (typeof obj_status !== 'string') {
410
- return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
411
- }
412
- })();
413
- return v_error === undefined ? null : v_error;
368
+ function validate$2(obj, path = 'ScheduleOptionsInputRepresentation') {
369
+ const v_error = (() => {
370
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
371
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
372
+ }
373
+ if (obj.endDate !== undefined) {
374
+ const obj_endDate = obj.endDate;
375
+ const path_endDate = path + '.endDate';
376
+ if (typeof obj_endDate !== 'string') {
377
+ return new TypeError('Expected "string" but received "' + typeof obj_endDate + '" (at "' + path_endDate + '")');
378
+ }
379
+ }
380
+ const obj_frequencyCadence = obj.frequencyCadence;
381
+ const path_frequencyCadence = path + '.frequencyCadence';
382
+ if (typeof obj_frequencyCadence !== 'string') {
383
+ return new TypeError('Expected "string" but received "' + typeof obj_frequencyCadence + '" (at "' + path_frequencyCadence + '")');
384
+ }
385
+ const obj_preferredTime = obj.preferredTime;
386
+ const path_preferredTime = path + '.preferredTime';
387
+ if (typeof obj_preferredTime !== 'string') {
388
+ return new TypeError('Expected "string" but received "' + typeof obj_preferredTime + '" (at "' + path_preferredTime + '")');
389
+ }
390
+ if (obj.recursEveryMonthOnDay !== undefined) {
391
+ const obj_recursEveryMonthOnDay = obj.recursEveryMonthOnDay;
392
+ const path_recursEveryMonthOnDay = path + '.recursEveryMonthOnDay';
393
+ if (typeof obj_recursEveryMonthOnDay !== 'string') {
394
+ return new TypeError('Expected "string" but received "' + typeof obj_recursEveryMonthOnDay + '" (at "' + path_recursEveryMonthOnDay + '")');
395
+ }
396
+ }
397
+ const obj_schedulerName = obj.schedulerName;
398
+ const path_schedulerName = path + '.schedulerName';
399
+ if (typeof obj_schedulerName !== 'string') {
400
+ return new TypeError('Expected "string" but received "' + typeof obj_schedulerName + '" (at "' + path_schedulerName + '")');
401
+ }
402
+ const obj_startDate = obj.startDate;
403
+ const path_startDate = path + '.startDate';
404
+ if (typeof obj_startDate !== 'string') {
405
+ return new TypeError('Expected "string" but received "' + typeof obj_startDate + '" (at "' + path_startDate + '")');
406
+ }
407
+ const obj_status = obj.status;
408
+ const path_status = path + '.status';
409
+ if (typeof obj_status !== 'string') {
410
+ return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
411
+ }
412
+ })();
413
+ return v_error === undefined ? null : v_error;
414
414
  }
415
415
 
416
- function validate$1(obj, path = 'PaymentsBatchSchedulerInputRepresentation') {
417
- const validateScheduleOptionsInputRepresentation_validateError = validate$2(obj, path);
418
- if (validateScheduleOptionsInputRepresentation_validateError !== null) {
419
- return validateScheduleOptionsInputRepresentation_validateError;
420
- }
421
- const v_error = (() => {
422
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
423
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
424
- }
425
- if (obj.criteriaMatchType !== undefined) {
426
- const obj_criteriaMatchType = obj.criteriaMatchType;
427
- const path_criteriaMatchType = path + '.criteriaMatchType';
428
- if (typeof obj_criteriaMatchType !== 'string') {
429
- return new TypeError('Expected "string" but received "' + typeof obj_criteriaMatchType + '" (at "' + path_criteriaMatchType + '")');
430
- }
431
- }
432
- if (obj.filterCriteria !== undefined) {
433
- const obj_filterCriteria = obj.filterCriteria;
434
- const path_filterCriteria = path + '.filterCriteria';
435
- if (!ArrayIsArray(obj_filterCriteria)) {
436
- return new TypeError('Expected "array" but received "' + typeof obj_filterCriteria + '" (at "' + path_filterCriteria + '")');
437
- }
438
- for (let i = 0; i < obj_filterCriteria.length; i++) {
439
- const obj_filterCriteria_item = obj_filterCriteria[i];
440
- const path_filterCriteria_item = path_filterCriteria + '[' + i + ']';
441
- if (typeof obj_filterCriteria_item !== 'object' || ArrayIsArray(obj_filterCriteria_item) || obj_filterCriteria_item === null) {
442
- return new TypeError('Expected "object" but received "' + typeof obj_filterCriteria_item + '" (at "' + path_filterCriteria_item + '")');
443
- }
444
- }
445
- }
446
- })();
447
- return v_error === undefined ? null : v_error;
416
+ function validate$1(obj, path = 'PaymentsBatchSchedulerInputRepresentation') {
417
+ const validateScheduleOptionsInputRepresentation_validateError = validate$2(obj, path);
418
+ if (validateScheduleOptionsInputRepresentation_validateError !== null) {
419
+ return validateScheduleOptionsInputRepresentation_validateError;
420
+ }
421
+ const v_error = (() => {
422
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
423
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
424
+ }
425
+ if (obj.criteriaMatchType !== undefined) {
426
+ const obj_criteriaMatchType = obj.criteriaMatchType;
427
+ const path_criteriaMatchType = path + '.criteriaMatchType';
428
+ if (typeof obj_criteriaMatchType !== 'string') {
429
+ return new TypeError('Expected "string" but received "' + typeof obj_criteriaMatchType + '" (at "' + path_criteriaMatchType + '")');
430
+ }
431
+ }
432
+ if (obj.filterCriteria !== undefined) {
433
+ const obj_filterCriteria = obj.filterCriteria;
434
+ const path_filterCriteria = path + '.filterCriteria';
435
+ if (!ArrayIsArray(obj_filterCriteria)) {
436
+ return new TypeError('Expected "array" but received "' + typeof obj_filterCriteria + '" (at "' + path_filterCriteria + '")');
437
+ }
438
+ for (let i = 0; i < obj_filterCriteria.length; i++) {
439
+ const obj_filterCriteria_item = obj_filterCriteria[i];
440
+ const path_filterCriteria_item = path_filterCriteria + '[' + i + ']';
441
+ if (typeof obj_filterCriteria_item !== 'object' || ArrayIsArray(obj_filterCriteria_item) || obj_filterCriteria_item === null) {
442
+ return new TypeError('Expected "object" but received "' + typeof obj_filterCriteria_item + '" (at "' + path_filterCriteria_item + '")');
443
+ }
444
+ }
445
+ }
446
+ })();
447
+ return v_error === undefined ? null : v_error;
448
448
  }
449
449
 
450
- const TTL = 1000;
451
- const VERSION = "eff71edc32270b9a1e6e1779cb811c3c";
452
- function validate(obj, path = 'PaymentsBatchSchedulerOutputRepresentation') {
453
- const v_error = (() => {
454
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
455
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
456
- }
457
- const obj_billingBatchScheduler = obj.billingBatchScheduler;
458
- const path_billingBatchScheduler = path + '.billingBatchScheduler';
459
- const referencepath_billingBatchSchedulerValidationError = validate$4(obj_billingBatchScheduler, path_billingBatchScheduler);
460
- if (referencepath_billingBatchSchedulerValidationError !== null) {
461
- let message = 'Object doesn\'t match BillingBatchSchedulerRepresentation (at "' + path_billingBatchScheduler + '")\n';
462
- message += referencepath_billingBatchSchedulerValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
463
- return new TypeError(message);
464
- }
465
- })();
466
- return v_error === undefined ? null : v_error;
467
- }
468
- const RepresentationType = 'PaymentsBatchSchedulerOutputRepresentation';
469
- function keyBuilder(luvio, config) {
470
- return keyPrefix + '::' + RepresentationType + ':' + config.billingBatchSchedulerId;
471
- }
472
- function keyBuilderFromType(luvio, object) {
473
- const keyParams = {
474
- billingBatchSchedulerId: object.billingBatchScheduler.id
475
- };
476
- return keyBuilder(luvio, keyParams);
477
- }
478
- function normalize(input, existing, path, luvio, store, timestamp) {
479
- return input;
480
- }
481
- const select$1 = function PaymentsBatchSchedulerOutputRepresentationSelect() {
482
- return {
483
- kind: 'Fragment',
484
- version: VERSION,
485
- private: [],
486
- opaque: true
487
- };
488
- };
489
- function equals(existing, incoming) {
490
- if (JSONStringify(incoming) !== JSONStringify(existing)) {
491
- return false;
492
- }
493
- return true;
494
- }
495
- function deepFreeze(input) {
496
- const input_billingBatchScheduler = input.billingBatchScheduler;
497
- deepFreeze$2(input_billingBatchScheduler);
498
- ObjectFreeze(input);
499
- }
500
- const ingest = function PaymentsBatchSchedulerOutputRepresentationIngest(input, path, luvio, store, timestamp) {
501
- if (process.env.NODE_ENV !== 'production') {
502
- const validateError = validate(input);
503
- if (validateError !== null) {
504
- throw validateError;
505
- }
506
- }
507
- const key = keyBuilderFromType(luvio, input);
508
- const existingRecord = store.readEntry(key);
509
- const ttlToUse = TTL;
510
- let incomingRecord = normalize(input, store.readEntry(key), {
511
- fullPath: key,
512
- parent: path.parent,
513
- propertyName: path.propertyName,
514
- ttl: ttlToUse
515
- });
516
- deepFreeze(input);
517
- if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
518
- luvio.storePublish(key, incomingRecord);
519
- }
520
- {
521
- const storeMetadataParams = {
522
- ttl: ttlToUse,
523
- namespace: "BillingBatch",
524
- version: VERSION,
525
- representationName: RepresentationType,
526
- };
527
- luvio.publishStoreMetadata(key, storeMetadataParams);
528
- }
529
- return createLink(key);
530
- };
531
- function getTypeCacheKeys(luvio, input, fullPathFactory) {
532
- const rootKeySet = new StoreKeyMap();
533
- // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
534
- const rootKey = keyBuilderFromType(luvio, input);
535
- rootKeySet.set(rootKey, {
536
- namespace: keyPrefix,
537
- representationName: RepresentationType,
538
- mergeable: false
539
- });
540
- return rootKeySet;
450
+ const TTL = 1000;
451
+ const VERSION = "eff71edc32270b9a1e6e1779cb811c3c";
452
+ function validate(obj, path = 'PaymentsBatchSchedulerOutputRepresentation') {
453
+ const v_error = (() => {
454
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
455
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
456
+ }
457
+ const obj_billingBatchScheduler = obj.billingBatchScheduler;
458
+ const path_billingBatchScheduler = path + '.billingBatchScheduler';
459
+ const referencepath_billingBatchSchedulerValidationError = validate$4(obj_billingBatchScheduler, path_billingBatchScheduler);
460
+ if (referencepath_billingBatchSchedulerValidationError !== null) {
461
+ let message = 'Object doesn\'t match BillingBatchSchedulerRepresentation (at "' + path_billingBatchScheduler + '")\n';
462
+ message += referencepath_billingBatchSchedulerValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
463
+ return new TypeError(message);
464
+ }
465
+ })();
466
+ return v_error === undefined ? null : v_error;
467
+ }
468
+ const RepresentationType = 'PaymentsBatchSchedulerOutputRepresentation';
469
+ function keyBuilder(luvio, config) {
470
+ return keyPrefix + '::' + RepresentationType + ':' + config.billingBatchSchedulerId;
471
+ }
472
+ function keyBuilderFromType(luvio, object) {
473
+ const keyParams = {
474
+ billingBatchSchedulerId: object.billingBatchScheduler.id
475
+ };
476
+ return keyBuilder(luvio, keyParams);
477
+ }
478
+ function normalize(input, existing, path, luvio, store, timestamp) {
479
+ return input;
480
+ }
481
+ const select$1 = function PaymentsBatchSchedulerOutputRepresentationSelect() {
482
+ return {
483
+ kind: 'Fragment',
484
+ version: VERSION,
485
+ private: [],
486
+ opaque: true
487
+ };
488
+ };
489
+ function equals(existing, incoming) {
490
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
491
+ return false;
492
+ }
493
+ return true;
494
+ }
495
+ function deepFreeze(input) {
496
+ const input_billingBatchScheduler = input.billingBatchScheduler;
497
+ deepFreeze$2(input_billingBatchScheduler);
498
+ ObjectFreeze(input);
499
+ }
500
+ const ingest = function PaymentsBatchSchedulerOutputRepresentationIngest(input, path, luvio, store, timestamp) {
501
+ if (process.env.NODE_ENV !== 'production') {
502
+ const validateError = validate(input);
503
+ if (validateError !== null) {
504
+ throw validateError;
505
+ }
506
+ }
507
+ const key = keyBuilderFromType(luvio, input);
508
+ const existingRecord = store.readEntry(key);
509
+ const ttlToUse = TTL;
510
+ let incomingRecord = normalize(input, store.readEntry(key), {
511
+ fullPath: key,
512
+ parent: path.parent,
513
+ propertyName: path.propertyName,
514
+ ttl: ttlToUse
515
+ });
516
+ deepFreeze(input);
517
+ if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
518
+ luvio.storePublish(key, incomingRecord);
519
+ }
520
+ {
521
+ const storeMetadataParams = {
522
+ ttl: ttlToUse,
523
+ namespace: "BillingBatch",
524
+ version: VERSION,
525
+ representationName: RepresentationType,
526
+ };
527
+ luvio.publishStoreMetadata(key, storeMetadataParams);
528
+ }
529
+ return createLink(key);
530
+ };
531
+ function getTypeCacheKeys(luvio, input, fullPathFactory) {
532
+ const rootKeySet = new StoreKeyMap();
533
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
534
+ const rootKey = keyBuilderFromType(luvio, input);
535
+ rootKeySet.set(rootKey, {
536
+ namespace: keyPrefix,
537
+ representationName: RepresentationType,
538
+ mergeable: false
539
+ });
540
+ return rootKeySet;
541
541
  }
542
542
 
543
- function select(luvio, params) {
544
- return select$1();
545
- }
546
- function getResponseCacheKeys(luvio, resourceParams, response) {
547
- return getTypeCacheKeys(luvio, response);
548
- }
549
- function ingestSuccess(luvio, resourceParams, response) {
550
- const { body } = response;
551
- const key = keyBuilderFromType(luvio, body);
552
- luvio.storeIngest(key, ingest, body);
553
- const snapshot = luvio.storeLookup({
554
- recordId: key,
555
- node: select(),
556
- variables: {},
557
- });
558
- if (process.env.NODE_ENV !== 'production') {
559
- if (snapshot.state !== 'Fulfilled') {
560
- throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
561
- }
562
- }
563
- return snapshot;
564
- }
565
- function createResourceRequest(config) {
566
- const headers = {};
567
- return {
568
- baseUri: '/services/data/v58.0',
569
- basePath: '/commerce/payments/payment-schedulers',
570
- method: 'post',
571
- body: config.body,
572
- urlParams: {},
573
- queryParams: {},
574
- headers,
575
- priority: 'normal',
576
- };
543
+ function select(luvio, params) {
544
+ return select$1();
545
+ }
546
+ function getResponseCacheKeys(luvio, resourceParams, response) {
547
+ return getTypeCacheKeys(luvio, response);
548
+ }
549
+ function ingestSuccess(luvio, resourceParams, response) {
550
+ const { body } = response;
551
+ const key = keyBuilderFromType(luvio, body);
552
+ luvio.storeIngest(key, ingest, body);
553
+ const snapshot = luvio.storeLookup({
554
+ recordId: key,
555
+ node: select(),
556
+ variables: {},
557
+ });
558
+ if (process.env.NODE_ENV !== 'production') {
559
+ if (snapshot.state !== 'Fulfilled') {
560
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
561
+ }
562
+ }
563
+ return snapshot;
564
+ }
565
+ function createResourceRequest(config) {
566
+ const headers = {};
567
+ return {
568
+ baseUri: '/services/data/v58.0',
569
+ basePath: '/commerce/payments/payment-schedulers',
570
+ method: 'post',
571
+ body: config.body,
572
+ urlParams: {},
573
+ queryParams: {},
574
+ headers,
575
+ priority: 'normal',
576
+ };
577
577
  }
578
578
 
579
- const createPaymentsBatchScheduler_ConfigPropertyNames = {
580
- displayName: 'createPaymentsBatchScheduler',
581
- parameters: {
582
- required: ['PaymentsBatchSchedulerInput'],
583
- optional: []
584
- }
585
- };
586
- function createResourceParams(config) {
587
- const resourceParams = {
588
- body: {
589
- PaymentsBatchSchedulerInput: config.PaymentsBatchSchedulerInput
590
- }
591
- };
592
- return resourceParams;
593
- }
594
- function typeCheckConfig(untrustedConfig) {
595
- const config = {};
596
- const untrustedConfig_PaymentsBatchSchedulerInput = untrustedConfig.PaymentsBatchSchedulerInput;
597
- const referencePaymentsBatchSchedulerInputRepresentationValidationError = validate$1(untrustedConfig_PaymentsBatchSchedulerInput);
598
- if (referencePaymentsBatchSchedulerInputRepresentationValidationError === null) {
599
- config.PaymentsBatchSchedulerInput = untrustedConfig_PaymentsBatchSchedulerInput;
600
- }
601
- return config;
602
- }
603
- function validateAdapterConfig(untrustedConfig, configPropertyNames) {
604
- if (!untrustedIsObject(untrustedConfig)) {
605
- return null;
606
- }
607
- if (process.env.NODE_ENV !== 'production') {
608
- validateConfig(untrustedConfig, configPropertyNames);
609
- }
610
- const config = typeCheckConfig(untrustedConfig);
611
- if (!areRequiredParametersPresent(config, configPropertyNames)) {
612
- return null;
613
- }
614
- return config;
615
- }
616
- function buildNetworkSnapshot(luvio, config, options) {
617
- const resourceParams = createResourceParams(config);
618
- const request = createResourceRequest(resourceParams);
619
- return luvio.dispatchResourceRequest(request, options)
620
- .then((response) => {
621
- return luvio.handleSuccessResponse(() => {
622
- const snapshot = ingestSuccess(luvio, resourceParams, response);
623
- return luvio.storeBroadcast().then(() => snapshot);
624
- }, () => getResponseCacheKeys(luvio, resourceParams, response.body));
625
- }, (response) => {
626
- deepFreeze$3(response);
627
- throw response;
628
- });
629
- }
630
- const createPaymentsBatchSchedulerAdapterFactory = (luvio) => {
631
- return function createPaymentsBatchScheduler(untrustedConfig) {
632
- const config = validateAdapterConfig(untrustedConfig, createPaymentsBatchScheduler_ConfigPropertyNames);
633
- // Invalid or incomplete config
634
- if (config === null) {
635
- throw new Error('Invalid config for "createPaymentsBatchScheduler"');
636
- }
637
- return buildNetworkSnapshot(luvio, config);
638
- };
579
+ const createPaymentsBatchScheduler_ConfigPropertyNames = {
580
+ displayName: 'createPaymentsBatchScheduler',
581
+ parameters: {
582
+ required: ['PaymentsBatchSchedulerInput'],
583
+ optional: []
584
+ }
585
+ };
586
+ function createResourceParams(config) {
587
+ const resourceParams = {
588
+ body: {
589
+ PaymentsBatchSchedulerInput: config.PaymentsBatchSchedulerInput
590
+ }
591
+ };
592
+ return resourceParams;
593
+ }
594
+ function typeCheckConfig(untrustedConfig) {
595
+ const config = {};
596
+ const untrustedConfig_PaymentsBatchSchedulerInput = untrustedConfig.PaymentsBatchSchedulerInput;
597
+ const referencePaymentsBatchSchedulerInputRepresentationValidationError = validate$1(untrustedConfig_PaymentsBatchSchedulerInput);
598
+ if (referencePaymentsBatchSchedulerInputRepresentationValidationError === null) {
599
+ config.PaymentsBatchSchedulerInput = untrustedConfig_PaymentsBatchSchedulerInput;
600
+ }
601
+ return config;
602
+ }
603
+ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
604
+ if (!untrustedIsObject(untrustedConfig)) {
605
+ return null;
606
+ }
607
+ if (process.env.NODE_ENV !== 'production') {
608
+ validateConfig(untrustedConfig, configPropertyNames);
609
+ }
610
+ const config = typeCheckConfig(untrustedConfig);
611
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
612
+ return null;
613
+ }
614
+ return config;
615
+ }
616
+ function buildNetworkSnapshot(luvio, config, options) {
617
+ const resourceParams = createResourceParams(config);
618
+ const request = createResourceRequest(resourceParams);
619
+ return luvio.dispatchResourceRequest(request, options)
620
+ .then((response) => {
621
+ return luvio.handleSuccessResponse(() => {
622
+ const snapshot = ingestSuccess(luvio, resourceParams, response);
623
+ return luvio.storeBroadcast().then(() => snapshot);
624
+ }, () => getResponseCacheKeys(luvio, resourceParams, response.body));
625
+ }, (response) => {
626
+ deepFreeze$3(response);
627
+ throw response;
628
+ });
629
+ }
630
+ const createPaymentsBatchSchedulerAdapterFactory = (luvio) => {
631
+ return function createPaymentsBatchScheduler(untrustedConfig) {
632
+ const config = validateAdapterConfig(untrustedConfig, createPaymentsBatchScheduler_ConfigPropertyNames);
633
+ // Invalid or incomplete config
634
+ if (config === null) {
635
+ throw new Error('Invalid config for "createPaymentsBatchScheduler"');
636
+ }
637
+ return buildNetworkSnapshot(luvio, config);
638
+ };
639
639
  };
640
640
 
641
- let createInvoicesBatchScheduler;
642
- let createPaymentsBatchScheduler;
643
- function bindExportsTo(luvio) {
644
- function unwrapSnapshotData(factory) {
645
- const adapter = factory(luvio);
646
- return (config) => adapter(config).then(snapshot => snapshot.data);
647
- }
648
- return {
649
- createInvoicesBatchScheduler: unwrapSnapshotData(createInvoicesBatchSchedulerAdapterFactory),
650
- createPaymentsBatchScheduler: unwrapSnapshotData(createPaymentsBatchSchedulerAdapterFactory),
651
- // Imperative GET Adapters
652
- };
653
- }
654
- withDefaultLuvio((luvio) => {
655
- ({
656
- createInvoicesBatchScheduler,
657
- createPaymentsBatchScheduler,
658
- } = bindExportsTo(luvio));
641
+ let createInvoicesBatchScheduler;
642
+ let createPaymentsBatchScheduler;
643
+ function bindExportsTo(luvio) {
644
+ function unwrapSnapshotData(factory) {
645
+ const adapter = factory(luvio);
646
+ return (config) => adapter(config).then(snapshot => snapshot.data);
647
+ }
648
+ return {
649
+ createInvoicesBatchScheduler: unwrapSnapshotData(createInvoicesBatchSchedulerAdapterFactory),
650
+ createPaymentsBatchScheduler: unwrapSnapshotData(createPaymentsBatchSchedulerAdapterFactory),
651
+ // Imperative GET Adapters
652
+ };
653
+ }
654
+ withDefaultLuvio((luvio) => {
655
+ ({
656
+ createInvoicesBatchScheduler,
657
+ createPaymentsBatchScheduler,
658
+ } = bindExportsTo(luvio));
659
659
  });
660
660
 
661
661
  export { createInvoicesBatchScheduler, createPaymentsBatchScheduler };
662
- // version: 1.124.2-4dc3034f1
662
+ // version: 1.124.4-fc08995da