@salesforce/lds-adapters-revenue-usage-detail 1.306.0 → 1.308.0-dev1
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-usage-detail.js +453 -68
- package/dist/es/es2018/types/src/generated/types/RateAdjustmentsOutputRepresentation.d.ts +15 -15
- package/dist/es/es2018/types/src/generated/types/RateCardEntryOutputRepresentation.d.ts +21 -21
- package/package.json +3 -3
- package/sfdc/index.js +454 -69
- package/src/raml/api.raml +17 -23
|
@@ -155,22 +155,89 @@ function equals$3(existing, incoming) {
|
|
|
155
155
|
return true;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
const VERSION$2 = "
|
|
158
|
+
const VERSION$2 = "b94a180a75f5c1b73e1db5fdf3fe3d98";
|
|
159
159
|
function validate$2(obj, path = 'RateAdjustmentsOutputRepresentation') {
|
|
160
160
|
const v_error = (() => {
|
|
161
161
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
162
162
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
163
163
|
}
|
|
164
|
-
obj.lowerBound;
|
|
164
|
+
const obj_lowerBound = obj.lowerBound;
|
|
165
|
+
const path_lowerBound = path + '.lowerBound';
|
|
166
|
+
let obj_lowerBound_union0 = null;
|
|
167
|
+
const obj_lowerBound_union0_error = (() => {
|
|
168
|
+
if (typeof obj_lowerBound !== 'number') {
|
|
169
|
+
return new TypeError('Expected "number" but received "' + typeof obj_lowerBound + '" (at "' + path_lowerBound + '")');
|
|
170
|
+
}
|
|
171
|
+
})();
|
|
172
|
+
if (obj_lowerBound_union0_error != null) {
|
|
173
|
+
obj_lowerBound_union0 = obj_lowerBound_union0_error.message;
|
|
174
|
+
}
|
|
175
|
+
let obj_lowerBound_union1 = null;
|
|
176
|
+
const obj_lowerBound_union1_error = (() => {
|
|
177
|
+
if (obj_lowerBound !== null) {
|
|
178
|
+
return new TypeError('Expected "null" but received "' + typeof obj_lowerBound + '" (at "' + path_lowerBound + '")');
|
|
179
|
+
}
|
|
180
|
+
})();
|
|
181
|
+
if (obj_lowerBound_union1_error != null) {
|
|
182
|
+
obj_lowerBound_union1 = obj_lowerBound_union1_error.message;
|
|
183
|
+
}
|
|
184
|
+
if (obj_lowerBound_union0 && obj_lowerBound_union1) {
|
|
185
|
+
let message = 'Object doesn\'t match union (at "' + path_lowerBound + '")';
|
|
186
|
+
message += '\n' + obj_lowerBound_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
187
|
+
message += '\n' + obj_lowerBound_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
188
|
+
return new TypeError(message);
|
|
189
|
+
}
|
|
165
190
|
const obj_name = obj.name;
|
|
166
191
|
const path_name = path + '.name';
|
|
167
|
-
|
|
168
|
-
|
|
192
|
+
let obj_name_union0 = null;
|
|
193
|
+
const obj_name_union0_error = (() => {
|
|
194
|
+
if (typeof obj_name !== 'string') {
|
|
195
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
196
|
+
}
|
|
197
|
+
})();
|
|
198
|
+
if (obj_name_union0_error != null) {
|
|
199
|
+
obj_name_union0 = obj_name_union0_error.message;
|
|
200
|
+
}
|
|
201
|
+
let obj_name_union1 = null;
|
|
202
|
+
const obj_name_union1_error = (() => {
|
|
203
|
+
if (obj_name !== null) {
|
|
204
|
+
return new TypeError('Expected "null" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
205
|
+
}
|
|
206
|
+
})();
|
|
207
|
+
if (obj_name_union1_error != null) {
|
|
208
|
+
obj_name_union1 = obj_name_union1_error.message;
|
|
209
|
+
}
|
|
210
|
+
if (obj_name_union0 && obj_name_union1) {
|
|
211
|
+
let message = 'Object doesn\'t match union (at "' + path_name + '")';
|
|
212
|
+
message += '\n' + obj_name_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
213
|
+
message += '\n' + obj_name_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
214
|
+
return new TypeError(message);
|
|
169
215
|
}
|
|
170
216
|
const obj_negotiatedRateAdjustmentId = obj.negotiatedRateAdjustmentId;
|
|
171
217
|
const path_negotiatedRateAdjustmentId = path + '.negotiatedRateAdjustmentId';
|
|
172
|
-
|
|
173
|
-
|
|
218
|
+
let obj_negotiatedRateAdjustmentId_union0 = null;
|
|
219
|
+
const obj_negotiatedRateAdjustmentId_union0_error = (() => {
|
|
220
|
+
if (typeof obj_negotiatedRateAdjustmentId !== 'string') {
|
|
221
|
+
return new TypeError('Expected "string" but received "' + typeof obj_negotiatedRateAdjustmentId + '" (at "' + path_negotiatedRateAdjustmentId + '")');
|
|
222
|
+
}
|
|
223
|
+
})();
|
|
224
|
+
if (obj_negotiatedRateAdjustmentId_union0_error != null) {
|
|
225
|
+
obj_negotiatedRateAdjustmentId_union0 = obj_negotiatedRateAdjustmentId_union0_error.message;
|
|
226
|
+
}
|
|
227
|
+
let obj_negotiatedRateAdjustmentId_union1 = null;
|
|
228
|
+
const obj_negotiatedRateAdjustmentId_union1_error = (() => {
|
|
229
|
+
if (obj_negotiatedRateAdjustmentId !== null) {
|
|
230
|
+
return new TypeError('Expected "null" but received "' + typeof obj_negotiatedRateAdjustmentId + '" (at "' + path_negotiatedRateAdjustmentId + '")');
|
|
231
|
+
}
|
|
232
|
+
})();
|
|
233
|
+
if (obj_negotiatedRateAdjustmentId_union1_error != null) {
|
|
234
|
+
obj_negotiatedRateAdjustmentId_union1 = obj_negotiatedRateAdjustmentId_union1_error.message;
|
|
235
|
+
}
|
|
236
|
+
if (obj_negotiatedRateAdjustmentId_union0 && obj_negotiatedRateAdjustmentId_union1) {
|
|
237
|
+
let message = 'Object doesn\'t match union (at "' + path_negotiatedRateAdjustmentId + '")';
|
|
238
|
+
message += '\n' + obj_negotiatedRateAdjustmentId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
239
|
+
message += '\n' + obj_negotiatedRateAdjustmentId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
240
|
+
return new TypeError(message);
|
|
174
241
|
}
|
|
175
242
|
const obj_rateAdjustmentId = obj.rateAdjustmentId;
|
|
176
243
|
const path_rateAdjustmentId = path + '.rateAdjustmentId';
|
|
@@ -179,16 +246,108 @@ function validate$2(obj, path = 'RateAdjustmentsOutputRepresentation') {
|
|
|
179
246
|
}
|
|
180
247
|
const obj_rateAdjustmentType = obj.rateAdjustmentType;
|
|
181
248
|
const path_rateAdjustmentType = path + '.rateAdjustmentType';
|
|
182
|
-
|
|
183
|
-
|
|
249
|
+
let obj_rateAdjustmentType_union0 = null;
|
|
250
|
+
const obj_rateAdjustmentType_union0_error = (() => {
|
|
251
|
+
if (typeof obj_rateAdjustmentType !== 'string') {
|
|
252
|
+
return new TypeError('Expected "string" but received "' + typeof obj_rateAdjustmentType + '" (at "' + path_rateAdjustmentType + '")');
|
|
253
|
+
}
|
|
254
|
+
})();
|
|
255
|
+
if (obj_rateAdjustmentType_union0_error != null) {
|
|
256
|
+
obj_rateAdjustmentType_union0 = obj_rateAdjustmentType_union0_error.message;
|
|
257
|
+
}
|
|
258
|
+
let obj_rateAdjustmentType_union1 = null;
|
|
259
|
+
const obj_rateAdjustmentType_union1_error = (() => {
|
|
260
|
+
if (obj_rateAdjustmentType !== null) {
|
|
261
|
+
return new TypeError('Expected "null" but received "' + typeof obj_rateAdjustmentType + '" (at "' + path_rateAdjustmentType + '")');
|
|
262
|
+
}
|
|
263
|
+
})();
|
|
264
|
+
if (obj_rateAdjustmentType_union1_error != null) {
|
|
265
|
+
obj_rateAdjustmentType_union1 = obj_rateAdjustmentType_union1_error.message;
|
|
266
|
+
}
|
|
267
|
+
if (obj_rateAdjustmentType_union0 && obj_rateAdjustmentType_union1) {
|
|
268
|
+
let message = 'Object doesn\'t match union (at "' + path_rateAdjustmentType + '")';
|
|
269
|
+
message += '\n' + obj_rateAdjustmentType_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
270
|
+
message += '\n' + obj_rateAdjustmentType_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
271
|
+
return new TypeError(message);
|
|
272
|
+
}
|
|
273
|
+
const obj_rateAdjustmentValue = obj.rateAdjustmentValue;
|
|
274
|
+
const path_rateAdjustmentValue = path + '.rateAdjustmentValue';
|
|
275
|
+
let obj_rateAdjustmentValue_union0 = null;
|
|
276
|
+
const obj_rateAdjustmentValue_union0_error = (() => {
|
|
277
|
+
if (typeof obj_rateAdjustmentValue !== 'number') {
|
|
278
|
+
return new TypeError('Expected "number" but received "' + typeof obj_rateAdjustmentValue + '" (at "' + path_rateAdjustmentValue + '")');
|
|
279
|
+
}
|
|
280
|
+
})();
|
|
281
|
+
if (obj_rateAdjustmentValue_union0_error != null) {
|
|
282
|
+
obj_rateAdjustmentValue_union0 = obj_rateAdjustmentValue_union0_error.message;
|
|
283
|
+
}
|
|
284
|
+
let obj_rateAdjustmentValue_union1 = null;
|
|
285
|
+
const obj_rateAdjustmentValue_union1_error = (() => {
|
|
286
|
+
if (obj_rateAdjustmentValue !== null) {
|
|
287
|
+
return new TypeError('Expected "null" but received "' + typeof obj_rateAdjustmentValue + '" (at "' + path_rateAdjustmentValue + '")');
|
|
288
|
+
}
|
|
289
|
+
})();
|
|
290
|
+
if (obj_rateAdjustmentValue_union1_error != null) {
|
|
291
|
+
obj_rateAdjustmentValue_union1 = obj_rateAdjustmentValue_union1_error.message;
|
|
292
|
+
}
|
|
293
|
+
if (obj_rateAdjustmentValue_union0 && obj_rateAdjustmentValue_union1) {
|
|
294
|
+
let message = 'Object doesn\'t match union (at "' + path_rateAdjustmentValue + '")';
|
|
295
|
+
message += '\n' + obj_rateAdjustmentValue_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
296
|
+
message += '\n' + obj_rateAdjustmentValue_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
297
|
+
return new TypeError(message);
|
|
184
298
|
}
|
|
185
|
-
obj.rateAdjustmentValue;
|
|
186
299
|
const obj_tierUnitOfMeasure = obj.tierUnitOfMeasure;
|
|
187
300
|
const path_tierUnitOfMeasure = path + '.tierUnitOfMeasure';
|
|
188
|
-
|
|
189
|
-
|
|
301
|
+
let obj_tierUnitOfMeasure_union0 = null;
|
|
302
|
+
const obj_tierUnitOfMeasure_union0_error = (() => {
|
|
303
|
+
if (typeof obj_tierUnitOfMeasure !== 'string') {
|
|
304
|
+
return new TypeError('Expected "string" but received "' + typeof obj_tierUnitOfMeasure + '" (at "' + path_tierUnitOfMeasure + '")');
|
|
305
|
+
}
|
|
306
|
+
})();
|
|
307
|
+
if (obj_tierUnitOfMeasure_union0_error != null) {
|
|
308
|
+
obj_tierUnitOfMeasure_union0 = obj_tierUnitOfMeasure_union0_error.message;
|
|
309
|
+
}
|
|
310
|
+
let obj_tierUnitOfMeasure_union1 = null;
|
|
311
|
+
const obj_tierUnitOfMeasure_union1_error = (() => {
|
|
312
|
+
if (obj_tierUnitOfMeasure !== null) {
|
|
313
|
+
return new TypeError('Expected "null" but received "' + typeof obj_tierUnitOfMeasure + '" (at "' + path_tierUnitOfMeasure + '")');
|
|
314
|
+
}
|
|
315
|
+
})();
|
|
316
|
+
if (obj_tierUnitOfMeasure_union1_error != null) {
|
|
317
|
+
obj_tierUnitOfMeasure_union1 = obj_tierUnitOfMeasure_union1_error.message;
|
|
318
|
+
}
|
|
319
|
+
if (obj_tierUnitOfMeasure_union0 && obj_tierUnitOfMeasure_union1) {
|
|
320
|
+
let message = 'Object doesn\'t match union (at "' + path_tierUnitOfMeasure + '")';
|
|
321
|
+
message += '\n' + obj_tierUnitOfMeasure_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
322
|
+
message += '\n' + obj_tierUnitOfMeasure_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
323
|
+
return new TypeError(message);
|
|
324
|
+
}
|
|
325
|
+
const obj_upperBound = obj.upperBound;
|
|
326
|
+
const path_upperBound = path + '.upperBound';
|
|
327
|
+
let obj_upperBound_union0 = null;
|
|
328
|
+
const obj_upperBound_union0_error = (() => {
|
|
329
|
+
if (typeof obj_upperBound !== 'number') {
|
|
330
|
+
return new TypeError('Expected "number" but received "' + typeof obj_upperBound + '" (at "' + path_upperBound + '")');
|
|
331
|
+
}
|
|
332
|
+
})();
|
|
333
|
+
if (obj_upperBound_union0_error != null) {
|
|
334
|
+
obj_upperBound_union0 = obj_upperBound_union0_error.message;
|
|
335
|
+
}
|
|
336
|
+
let obj_upperBound_union1 = null;
|
|
337
|
+
const obj_upperBound_union1_error = (() => {
|
|
338
|
+
if (obj_upperBound !== null) {
|
|
339
|
+
return new TypeError('Expected "null" but received "' + typeof obj_upperBound + '" (at "' + path_upperBound + '")');
|
|
340
|
+
}
|
|
341
|
+
})();
|
|
342
|
+
if (obj_upperBound_union1_error != null) {
|
|
343
|
+
obj_upperBound_union1 = obj_upperBound_union1_error.message;
|
|
344
|
+
}
|
|
345
|
+
if (obj_upperBound_union0 && obj_upperBound_union1) {
|
|
346
|
+
let message = 'Object doesn\'t match union (at "' + path_upperBound + '")';
|
|
347
|
+
message += '\n' + obj_upperBound_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
348
|
+
message += '\n' + obj_upperBound_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
349
|
+
return new TypeError(message);
|
|
190
350
|
}
|
|
191
|
-
obj.upperBound;
|
|
192
351
|
})();
|
|
193
352
|
return v_error === undefined ? null : v_error;
|
|
194
353
|
}
|
|
@@ -234,6 +393,16 @@ const select$5 = function RateAdjustmentsOutputRepresentationSelect() {
|
|
|
234
393
|
};
|
|
235
394
|
};
|
|
236
395
|
function equals$2(existing, incoming) {
|
|
396
|
+
const existing_rateAdjustmentId = existing.rateAdjustmentId;
|
|
397
|
+
const incoming_rateAdjustmentId = incoming.rateAdjustmentId;
|
|
398
|
+
if (!(existing_rateAdjustmentId === incoming_rateAdjustmentId)) {
|
|
399
|
+
return false;
|
|
400
|
+
}
|
|
401
|
+
const existing_lowerBound = existing.lowerBound;
|
|
402
|
+
const incoming_lowerBound = incoming.lowerBound;
|
|
403
|
+
if (!(existing_lowerBound === incoming_lowerBound)) {
|
|
404
|
+
return false;
|
|
405
|
+
}
|
|
237
406
|
const existing_name = existing.name;
|
|
238
407
|
const incoming_name = incoming.name;
|
|
239
408
|
if (!(existing_name === incoming_name)) {
|
|
@@ -244,31 +413,21 @@ function equals$2(existing, incoming) {
|
|
|
244
413
|
if (!(existing_negotiatedRateAdjustmentId === incoming_negotiatedRateAdjustmentId)) {
|
|
245
414
|
return false;
|
|
246
415
|
}
|
|
247
|
-
const existing_rateAdjustmentId = existing.rateAdjustmentId;
|
|
248
|
-
const incoming_rateAdjustmentId = incoming.rateAdjustmentId;
|
|
249
|
-
if (!(existing_rateAdjustmentId === incoming_rateAdjustmentId)) {
|
|
250
|
-
return false;
|
|
251
|
-
}
|
|
252
416
|
const existing_rateAdjustmentType = existing.rateAdjustmentType;
|
|
253
417
|
const incoming_rateAdjustmentType = incoming.rateAdjustmentType;
|
|
254
418
|
if (!(existing_rateAdjustmentType === incoming_rateAdjustmentType)) {
|
|
255
419
|
return false;
|
|
256
420
|
}
|
|
257
|
-
const existing_tierUnitOfMeasure = existing.tierUnitOfMeasure;
|
|
258
|
-
const incoming_tierUnitOfMeasure = incoming.tierUnitOfMeasure;
|
|
259
|
-
if (!(existing_tierUnitOfMeasure === incoming_tierUnitOfMeasure)) {
|
|
260
|
-
return false;
|
|
261
|
-
}
|
|
262
|
-
const existing_lowerBound = existing.lowerBound;
|
|
263
|
-
const incoming_lowerBound = incoming.lowerBound;
|
|
264
|
-
if (!(existing_lowerBound === incoming_lowerBound)) {
|
|
265
|
-
return false;
|
|
266
|
-
}
|
|
267
421
|
const existing_rateAdjustmentValue = existing.rateAdjustmentValue;
|
|
268
422
|
const incoming_rateAdjustmentValue = incoming.rateAdjustmentValue;
|
|
269
423
|
if (!(existing_rateAdjustmentValue === incoming_rateAdjustmentValue)) {
|
|
270
424
|
return false;
|
|
271
425
|
}
|
|
426
|
+
const existing_tierUnitOfMeasure = existing.tierUnitOfMeasure;
|
|
427
|
+
const incoming_tierUnitOfMeasure = incoming.tierUnitOfMeasure;
|
|
428
|
+
if (!(existing_tierUnitOfMeasure === incoming_tierUnitOfMeasure)) {
|
|
429
|
+
return false;
|
|
430
|
+
}
|
|
272
431
|
const existing_upperBound = existing.upperBound;
|
|
273
432
|
const incoming_upperBound = incoming.upperBound;
|
|
274
433
|
if (!(existing_upperBound === incoming_upperBound)) {
|
|
@@ -277,7 +436,7 @@ function equals$2(existing, incoming) {
|
|
|
277
436
|
return true;
|
|
278
437
|
}
|
|
279
438
|
|
|
280
|
-
const VERSION$1 = "
|
|
439
|
+
const VERSION$1 = "a8c9f67fd440c70712d4a6da1f75c72d";
|
|
281
440
|
function validate$1(obj, path = 'RateCardEntryOutputRepresentation') {
|
|
282
441
|
const v_error = (() => {
|
|
283
442
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -285,27 +444,186 @@ function validate$1(obj, path = 'RateCardEntryOutputRepresentation') {
|
|
|
285
444
|
}
|
|
286
445
|
const obj_chargeForOverages = obj.chargeForOverages;
|
|
287
446
|
const path_chargeForOverages = path + '.chargeForOverages';
|
|
288
|
-
|
|
289
|
-
|
|
447
|
+
let obj_chargeForOverages_union0 = null;
|
|
448
|
+
const obj_chargeForOverages_union0_error = (() => {
|
|
449
|
+
if (typeof obj_chargeForOverages !== 'string') {
|
|
450
|
+
return new TypeError('Expected "string" but received "' + typeof obj_chargeForOverages + '" (at "' + path_chargeForOverages + '")');
|
|
451
|
+
}
|
|
452
|
+
})();
|
|
453
|
+
if (obj_chargeForOverages_union0_error != null) {
|
|
454
|
+
obj_chargeForOverages_union0 = obj_chargeForOverages_union0_error.message;
|
|
455
|
+
}
|
|
456
|
+
let obj_chargeForOverages_union1 = null;
|
|
457
|
+
const obj_chargeForOverages_union1_error = (() => {
|
|
458
|
+
if (obj_chargeForOverages !== null) {
|
|
459
|
+
return new TypeError('Expected "null" but received "' + typeof obj_chargeForOverages + '" (at "' + path_chargeForOverages + '")');
|
|
460
|
+
}
|
|
461
|
+
})();
|
|
462
|
+
if (obj_chargeForOverages_union1_error != null) {
|
|
463
|
+
obj_chargeForOverages_union1 = obj_chargeForOverages_union1_error.message;
|
|
464
|
+
}
|
|
465
|
+
if (obj_chargeForOverages_union0 && obj_chargeForOverages_union1) {
|
|
466
|
+
let message = 'Object doesn\'t match union (at "' + path_chargeForOverages + '")';
|
|
467
|
+
message += '\n' + obj_chargeForOverages_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
468
|
+
message += '\n' + obj_chargeForOverages_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
469
|
+
return new TypeError(message);
|
|
290
470
|
}
|
|
291
471
|
const obj_name = obj.name;
|
|
292
472
|
const path_name = path + '.name';
|
|
293
|
-
|
|
294
|
-
|
|
473
|
+
let obj_name_union0 = null;
|
|
474
|
+
const obj_name_union0_error = (() => {
|
|
475
|
+
if (typeof obj_name !== 'string') {
|
|
476
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
477
|
+
}
|
|
478
|
+
})();
|
|
479
|
+
if (obj_name_union0_error != null) {
|
|
480
|
+
obj_name_union0 = obj_name_union0_error.message;
|
|
481
|
+
}
|
|
482
|
+
let obj_name_union1 = null;
|
|
483
|
+
const obj_name_union1_error = (() => {
|
|
484
|
+
if (obj_name !== null) {
|
|
485
|
+
return new TypeError('Expected "null" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
486
|
+
}
|
|
487
|
+
})();
|
|
488
|
+
if (obj_name_union1_error != null) {
|
|
489
|
+
obj_name_union1 = obj_name_union1_error.message;
|
|
490
|
+
}
|
|
491
|
+
if (obj_name_union0 && obj_name_union1) {
|
|
492
|
+
let message = 'Object doesn\'t match union (at "' + path_name + '")';
|
|
493
|
+
message += '\n' + obj_name_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
494
|
+
message += '\n' + obj_name_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
495
|
+
return new TypeError(message);
|
|
295
496
|
}
|
|
296
497
|
const obj_negotiable = obj.negotiable;
|
|
297
498
|
const path_negotiable = path + '.negotiable';
|
|
298
|
-
|
|
299
|
-
|
|
499
|
+
let obj_negotiable_union0 = null;
|
|
500
|
+
const obj_negotiable_union0_error = (() => {
|
|
501
|
+
if (typeof obj_negotiable !== 'string') {
|
|
502
|
+
return new TypeError('Expected "string" but received "' + typeof obj_negotiable + '" (at "' + path_negotiable + '")');
|
|
503
|
+
}
|
|
504
|
+
})();
|
|
505
|
+
if (obj_negotiable_union0_error != null) {
|
|
506
|
+
obj_negotiable_union0 = obj_negotiable_union0_error.message;
|
|
507
|
+
}
|
|
508
|
+
let obj_negotiable_union1 = null;
|
|
509
|
+
const obj_negotiable_union1_error = (() => {
|
|
510
|
+
if (obj_negotiable !== null) {
|
|
511
|
+
return new TypeError('Expected "null" but received "' + typeof obj_negotiable + '" (at "' + path_negotiable + '")');
|
|
512
|
+
}
|
|
513
|
+
})();
|
|
514
|
+
if (obj_negotiable_union1_error != null) {
|
|
515
|
+
obj_negotiable_union1 = obj_negotiable_union1_error.message;
|
|
516
|
+
}
|
|
517
|
+
if (obj_negotiable_union0 && obj_negotiable_union1) {
|
|
518
|
+
let message = 'Object doesn\'t match union (at "' + path_negotiable + '")';
|
|
519
|
+
message += '\n' + obj_negotiable_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
520
|
+
message += '\n' + obj_negotiable_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
521
|
+
return new TypeError(message);
|
|
522
|
+
}
|
|
523
|
+
const obj_negotiatedRate = obj.negotiatedRate;
|
|
524
|
+
const path_negotiatedRate = path + '.negotiatedRate';
|
|
525
|
+
let obj_negotiatedRate_union0 = null;
|
|
526
|
+
const obj_negotiatedRate_union0_error = (() => {
|
|
527
|
+
if (typeof obj_negotiatedRate !== 'number') {
|
|
528
|
+
return new TypeError('Expected "number" but received "' + typeof obj_negotiatedRate + '" (at "' + path_negotiatedRate + '")');
|
|
529
|
+
}
|
|
530
|
+
})();
|
|
531
|
+
if (obj_negotiatedRate_union0_error != null) {
|
|
532
|
+
obj_negotiatedRate_union0 = obj_negotiatedRate_union0_error.message;
|
|
533
|
+
}
|
|
534
|
+
let obj_negotiatedRate_union1 = null;
|
|
535
|
+
const obj_negotiatedRate_union1_error = (() => {
|
|
536
|
+
if (obj_negotiatedRate !== null) {
|
|
537
|
+
return new TypeError('Expected "null" but received "' + typeof obj_negotiatedRate + '" (at "' + path_negotiatedRate + '")');
|
|
538
|
+
}
|
|
539
|
+
})();
|
|
540
|
+
if (obj_negotiatedRate_union1_error != null) {
|
|
541
|
+
obj_negotiatedRate_union1 = obj_negotiatedRate_union1_error.message;
|
|
542
|
+
}
|
|
543
|
+
if (obj_negotiatedRate_union0 && obj_negotiatedRate_union1) {
|
|
544
|
+
let message = 'Object doesn\'t match union (at "' + path_negotiatedRate + '")';
|
|
545
|
+
message += '\n' + obj_negotiatedRate_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
546
|
+
message += '\n' + obj_negotiatedRate_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
547
|
+
return new TypeError(message);
|
|
300
548
|
}
|
|
301
|
-
obj.negotiatedRate;
|
|
302
549
|
const obj_negotiatedRateCardEntryId = obj.negotiatedRateCardEntryId;
|
|
303
550
|
const path_negotiatedRateCardEntryId = path + '.negotiatedRateCardEntryId';
|
|
304
|
-
|
|
305
|
-
|
|
551
|
+
let obj_negotiatedRateCardEntryId_union0 = null;
|
|
552
|
+
const obj_negotiatedRateCardEntryId_union0_error = (() => {
|
|
553
|
+
if (typeof obj_negotiatedRateCardEntryId !== 'string') {
|
|
554
|
+
return new TypeError('Expected "string" but received "' + typeof obj_negotiatedRateCardEntryId + '" (at "' + path_negotiatedRateCardEntryId + '")');
|
|
555
|
+
}
|
|
556
|
+
})();
|
|
557
|
+
if (obj_negotiatedRateCardEntryId_union0_error != null) {
|
|
558
|
+
obj_negotiatedRateCardEntryId_union0 = obj_negotiatedRateCardEntryId_union0_error.message;
|
|
559
|
+
}
|
|
560
|
+
let obj_negotiatedRateCardEntryId_union1 = null;
|
|
561
|
+
const obj_negotiatedRateCardEntryId_union1_error = (() => {
|
|
562
|
+
if (obj_negotiatedRateCardEntryId !== null) {
|
|
563
|
+
return new TypeError('Expected "null" but received "' + typeof obj_negotiatedRateCardEntryId + '" (at "' + path_negotiatedRateCardEntryId + '")');
|
|
564
|
+
}
|
|
565
|
+
})();
|
|
566
|
+
if (obj_negotiatedRateCardEntryId_union1_error != null) {
|
|
567
|
+
obj_negotiatedRateCardEntryId_union1 = obj_negotiatedRateCardEntryId_union1_error.message;
|
|
568
|
+
}
|
|
569
|
+
if (obj_negotiatedRateCardEntryId_union0 && obj_negotiatedRateCardEntryId_union1) {
|
|
570
|
+
let message = 'Object doesn\'t match union (at "' + path_negotiatedRateCardEntryId + '")';
|
|
571
|
+
message += '\n' + obj_negotiatedRateCardEntryId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
572
|
+
message += '\n' + obj_negotiatedRateCardEntryId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
573
|
+
return new TypeError(message);
|
|
574
|
+
}
|
|
575
|
+
const obj_quantity = obj.quantity;
|
|
576
|
+
const path_quantity = path + '.quantity';
|
|
577
|
+
let obj_quantity_union0 = null;
|
|
578
|
+
const obj_quantity_union0_error = (() => {
|
|
579
|
+
if (typeof obj_quantity !== 'number') {
|
|
580
|
+
return new TypeError('Expected "number" but received "' + typeof obj_quantity + '" (at "' + path_quantity + '")');
|
|
581
|
+
}
|
|
582
|
+
})();
|
|
583
|
+
if (obj_quantity_union0_error != null) {
|
|
584
|
+
obj_quantity_union0 = obj_quantity_union0_error.message;
|
|
585
|
+
}
|
|
586
|
+
let obj_quantity_union1 = null;
|
|
587
|
+
const obj_quantity_union1_error = (() => {
|
|
588
|
+
if (obj_quantity !== null) {
|
|
589
|
+
return new TypeError('Expected "null" but received "' + typeof obj_quantity + '" (at "' + path_quantity + '")');
|
|
590
|
+
}
|
|
591
|
+
})();
|
|
592
|
+
if (obj_quantity_union1_error != null) {
|
|
593
|
+
obj_quantity_union1 = obj_quantity_union1_error.message;
|
|
594
|
+
}
|
|
595
|
+
if (obj_quantity_union0 && obj_quantity_union1) {
|
|
596
|
+
let message = 'Object doesn\'t match union (at "' + path_quantity + '")';
|
|
597
|
+
message += '\n' + obj_quantity_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
598
|
+
message += '\n' + obj_quantity_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
599
|
+
return new TypeError(message);
|
|
600
|
+
}
|
|
601
|
+
const obj_rate = obj.rate;
|
|
602
|
+
const path_rate = path + '.rate';
|
|
603
|
+
let obj_rate_union0 = null;
|
|
604
|
+
const obj_rate_union0_error = (() => {
|
|
605
|
+
if (typeof obj_rate !== 'number') {
|
|
606
|
+
return new TypeError('Expected "number" but received "' + typeof obj_rate + '" (at "' + path_rate + '")');
|
|
607
|
+
}
|
|
608
|
+
})();
|
|
609
|
+
if (obj_rate_union0_error != null) {
|
|
610
|
+
obj_rate_union0 = obj_rate_union0_error.message;
|
|
611
|
+
}
|
|
612
|
+
let obj_rate_union1 = null;
|
|
613
|
+
const obj_rate_union1_error = (() => {
|
|
614
|
+
if (obj_rate !== null) {
|
|
615
|
+
return new TypeError('Expected "null" but received "' + typeof obj_rate + '" (at "' + path_rate + '")');
|
|
616
|
+
}
|
|
617
|
+
})();
|
|
618
|
+
if (obj_rate_union1_error != null) {
|
|
619
|
+
obj_rate_union1 = obj_rate_union1_error.message;
|
|
620
|
+
}
|
|
621
|
+
if (obj_rate_union0 && obj_rate_union1) {
|
|
622
|
+
let message = 'Object doesn\'t match union (at "' + path_rate + '")';
|
|
623
|
+
message += '\n' + obj_rate_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
624
|
+
message += '\n' + obj_rate_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
625
|
+
return new TypeError(message);
|
|
306
626
|
}
|
|
307
|
-
obj.quantity;
|
|
308
|
-
obj.rate;
|
|
309
627
|
const obj_rateAdjustments = obj.rateAdjustments;
|
|
310
628
|
const path_rateAdjustments = path + '.rateAdjustments';
|
|
311
629
|
if (!ArrayIsArray(obj_rateAdjustments)) {
|
|
@@ -314,10 +632,31 @@ function validate$1(obj, path = 'RateCardEntryOutputRepresentation') {
|
|
|
314
632
|
for (let i = 0; i < obj_rateAdjustments.length; i++) {
|
|
315
633
|
const obj_rateAdjustments_item = obj_rateAdjustments[i];
|
|
316
634
|
const path_rateAdjustments_item = path_rateAdjustments + '[' + i + ']';
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
635
|
+
let obj_rateAdjustments_item_union0 = null;
|
|
636
|
+
const obj_rateAdjustments_item_union0_error = (() => {
|
|
637
|
+
const referencepath_rateAdjustments_itemValidationError = validate$2(obj_rateAdjustments_item, path_rateAdjustments_item);
|
|
638
|
+
if (referencepath_rateAdjustments_itemValidationError !== null) {
|
|
639
|
+
let message = 'Object doesn\'t match RateAdjustmentsOutputRepresentation (at "' + path_rateAdjustments_item + '")\n';
|
|
640
|
+
message += referencepath_rateAdjustments_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
641
|
+
return new TypeError(message);
|
|
642
|
+
}
|
|
643
|
+
})();
|
|
644
|
+
if (obj_rateAdjustments_item_union0_error != null) {
|
|
645
|
+
obj_rateAdjustments_item_union0 = obj_rateAdjustments_item_union0_error.message;
|
|
646
|
+
}
|
|
647
|
+
let obj_rateAdjustments_item_union1 = null;
|
|
648
|
+
const obj_rateAdjustments_item_union1_error = (() => {
|
|
649
|
+
if (obj_rateAdjustments_item !== null) {
|
|
650
|
+
return new TypeError('Expected "null" but received "' + typeof obj_rateAdjustments_item + '" (at "' + path_rateAdjustments_item + '")');
|
|
651
|
+
}
|
|
652
|
+
})();
|
|
653
|
+
if (obj_rateAdjustments_item_union1_error != null) {
|
|
654
|
+
obj_rateAdjustments_item_union1 = obj_rateAdjustments_item_union1_error.message;
|
|
655
|
+
}
|
|
656
|
+
if (obj_rateAdjustments_item_union0 && obj_rateAdjustments_item_union1) {
|
|
657
|
+
let message = 'Object doesn\'t match union (at "' + path_rateAdjustments_item + '")';
|
|
658
|
+
message += '\n' + obj_rateAdjustments_item_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
659
|
+
message += '\n' + obj_rateAdjustments_item_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
321
660
|
return new TypeError(message);
|
|
322
661
|
}
|
|
323
662
|
}
|
|
@@ -328,13 +667,55 @@ function validate$1(obj, path = 'RateCardEntryOutputRepresentation') {
|
|
|
328
667
|
}
|
|
329
668
|
const obj_unitOfMeasure = obj.unitOfMeasure;
|
|
330
669
|
const path_unitOfMeasure = path + '.unitOfMeasure';
|
|
331
|
-
|
|
332
|
-
|
|
670
|
+
let obj_unitOfMeasure_union0 = null;
|
|
671
|
+
const obj_unitOfMeasure_union0_error = (() => {
|
|
672
|
+
if (typeof obj_unitOfMeasure !== 'string') {
|
|
673
|
+
return new TypeError('Expected "string" but received "' + typeof obj_unitOfMeasure + '" (at "' + path_unitOfMeasure + '")');
|
|
674
|
+
}
|
|
675
|
+
})();
|
|
676
|
+
if (obj_unitOfMeasure_union0_error != null) {
|
|
677
|
+
obj_unitOfMeasure_union0 = obj_unitOfMeasure_union0_error.message;
|
|
678
|
+
}
|
|
679
|
+
let obj_unitOfMeasure_union1 = null;
|
|
680
|
+
const obj_unitOfMeasure_union1_error = (() => {
|
|
681
|
+
if (obj_unitOfMeasure !== null) {
|
|
682
|
+
return new TypeError('Expected "null" but received "' + typeof obj_unitOfMeasure + '" (at "' + path_unitOfMeasure + '")');
|
|
683
|
+
}
|
|
684
|
+
})();
|
|
685
|
+
if (obj_unitOfMeasure_union1_error != null) {
|
|
686
|
+
obj_unitOfMeasure_union1 = obj_unitOfMeasure_union1_error.message;
|
|
687
|
+
}
|
|
688
|
+
if (obj_unitOfMeasure_union0 && obj_unitOfMeasure_union1) {
|
|
689
|
+
let message = 'Object doesn\'t match union (at "' + path_unitOfMeasure + '")';
|
|
690
|
+
message += '\n' + obj_unitOfMeasure_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
691
|
+
message += '\n' + obj_unitOfMeasure_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
692
|
+
return new TypeError(message);
|
|
333
693
|
}
|
|
334
694
|
const obj_unitOfMeasureCode = obj.unitOfMeasureCode;
|
|
335
695
|
const path_unitOfMeasureCode = path + '.unitOfMeasureCode';
|
|
336
|
-
|
|
337
|
-
|
|
696
|
+
let obj_unitOfMeasureCode_union0 = null;
|
|
697
|
+
const obj_unitOfMeasureCode_union0_error = (() => {
|
|
698
|
+
if (typeof obj_unitOfMeasureCode !== 'string') {
|
|
699
|
+
return new TypeError('Expected "string" but received "' + typeof obj_unitOfMeasureCode + '" (at "' + path_unitOfMeasureCode + '")');
|
|
700
|
+
}
|
|
701
|
+
})();
|
|
702
|
+
if (obj_unitOfMeasureCode_union0_error != null) {
|
|
703
|
+
obj_unitOfMeasureCode_union0 = obj_unitOfMeasureCode_union0_error.message;
|
|
704
|
+
}
|
|
705
|
+
let obj_unitOfMeasureCode_union1 = null;
|
|
706
|
+
const obj_unitOfMeasureCode_union1_error = (() => {
|
|
707
|
+
if (obj_unitOfMeasureCode !== null) {
|
|
708
|
+
return new TypeError('Expected "null" but received "' + typeof obj_unitOfMeasureCode + '" (at "' + path_unitOfMeasureCode + '")');
|
|
709
|
+
}
|
|
710
|
+
})();
|
|
711
|
+
if (obj_unitOfMeasureCode_union1_error != null) {
|
|
712
|
+
obj_unitOfMeasureCode_union1 = obj_unitOfMeasureCode_union1_error.message;
|
|
713
|
+
}
|
|
714
|
+
if (obj_unitOfMeasureCode_union0 && obj_unitOfMeasureCode_union1) {
|
|
715
|
+
let message = 'Object doesn\'t match union (at "' + path_unitOfMeasureCode + '")';
|
|
716
|
+
message += '\n' + obj_unitOfMeasureCode_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
717
|
+
message += '\n' + obj_unitOfMeasureCode_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
718
|
+
return new TypeError(message);
|
|
338
719
|
}
|
|
339
720
|
})();
|
|
340
721
|
return v_error === undefined ? null : v_error;
|
|
@@ -377,6 +758,7 @@ const select$4 = function RateCardEntryOutputRepresentationSelect() {
|
|
|
377
758
|
{
|
|
378
759
|
name: 'rateAdjustments',
|
|
379
760
|
kind: 'Object',
|
|
761
|
+
nullable: true,
|
|
380
762
|
plural: true,
|
|
381
763
|
selections: RateAdjustmentsOutputRepresentation__selections
|
|
382
764
|
},
|
|
@@ -396,6 +778,11 @@ const select$4 = function RateCardEntryOutputRepresentationSelect() {
|
|
|
396
778
|
};
|
|
397
779
|
};
|
|
398
780
|
function equals$1(existing, incoming) {
|
|
781
|
+
const existing_rateCardEntryId = existing.rateCardEntryId;
|
|
782
|
+
const incoming_rateCardEntryId = incoming.rateCardEntryId;
|
|
783
|
+
if (!(existing_rateCardEntryId === incoming_rateCardEntryId)) {
|
|
784
|
+
return false;
|
|
785
|
+
}
|
|
399
786
|
const existing_chargeForOverages = existing.chargeForOverages;
|
|
400
787
|
const incoming_chargeForOverages = incoming.chargeForOverages;
|
|
401
788
|
if (!(existing_chargeForOverages === incoming_chargeForOverages)) {
|
|
@@ -411,31 +798,16 @@ function equals$1(existing, incoming) {
|
|
|
411
798
|
if (!(existing_negotiable === incoming_negotiable)) {
|
|
412
799
|
return false;
|
|
413
800
|
}
|
|
414
|
-
const existing_negotiatedRateCardEntryId = existing.negotiatedRateCardEntryId;
|
|
415
|
-
const incoming_negotiatedRateCardEntryId = incoming.negotiatedRateCardEntryId;
|
|
416
|
-
if (!(existing_negotiatedRateCardEntryId === incoming_negotiatedRateCardEntryId)) {
|
|
417
|
-
return false;
|
|
418
|
-
}
|
|
419
|
-
const existing_rateCardEntryId = existing.rateCardEntryId;
|
|
420
|
-
const incoming_rateCardEntryId = incoming.rateCardEntryId;
|
|
421
|
-
if (!(existing_rateCardEntryId === incoming_rateCardEntryId)) {
|
|
422
|
-
return false;
|
|
423
|
-
}
|
|
424
|
-
const existing_unitOfMeasure = existing.unitOfMeasure;
|
|
425
|
-
const incoming_unitOfMeasure = incoming.unitOfMeasure;
|
|
426
|
-
if (!(existing_unitOfMeasure === incoming_unitOfMeasure)) {
|
|
427
|
-
return false;
|
|
428
|
-
}
|
|
429
|
-
const existing_unitOfMeasureCode = existing.unitOfMeasureCode;
|
|
430
|
-
const incoming_unitOfMeasureCode = incoming.unitOfMeasureCode;
|
|
431
|
-
if (!(existing_unitOfMeasureCode === incoming_unitOfMeasureCode)) {
|
|
432
|
-
return false;
|
|
433
|
-
}
|
|
434
801
|
const existing_negotiatedRate = existing.negotiatedRate;
|
|
435
802
|
const incoming_negotiatedRate = incoming.negotiatedRate;
|
|
436
803
|
if (!(existing_negotiatedRate === incoming_negotiatedRate)) {
|
|
437
804
|
return false;
|
|
438
805
|
}
|
|
806
|
+
const existing_negotiatedRateCardEntryId = existing.negotiatedRateCardEntryId;
|
|
807
|
+
const incoming_negotiatedRateCardEntryId = incoming.negotiatedRateCardEntryId;
|
|
808
|
+
if (!(existing_negotiatedRateCardEntryId === incoming_negotiatedRateCardEntryId)) {
|
|
809
|
+
return false;
|
|
810
|
+
}
|
|
439
811
|
const existing_quantity = existing.quantity;
|
|
440
812
|
const incoming_quantity = incoming.quantity;
|
|
441
813
|
if (!(existing_quantity === incoming_quantity)) {
|
|
@@ -449,13 +821,26 @@ function equals$1(existing, incoming) {
|
|
|
449
821
|
const existing_rateAdjustments = existing.rateAdjustments;
|
|
450
822
|
const incoming_rateAdjustments = incoming.rateAdjustments;
|
|
451
823
|
const equals_rateAdjustments_items = equalsArray(existing_rateAdjustments, incoming_rateAdjustments, (existing_rateAdjustments_item, incoming_rateAdjustments_item) => {
|
|
452
|
-
if (!(
|
|
824
|
+
if (!(existing_rateAdjustments_item === incoming_rateAdjustments_item
|
|
825
|
+
|| (existing_rateAdjustments_item != null &&
|
|
826
|
+
incoming_rateAdjustments_item != null &&
|
|
827
|
+
equals$2(existing_rateAdjustments_item, incoming_rateAdjustments_item)))) {
|
|
453
828
|
return false;
|
|
454
829
|
}
|
|
455
830
|
});
|
|
456
831
|
if (equals_rateAdjustments_items === false) {
|
|
457
832
|
return false;
|
|
458
833
|
}
|
|
834
|
+
const existing_unitOfMeasure = existing.unitOfMeasure;
|
|
835
|
+
const incoming_unitOfMeasure = incoming.unitOfMeasure;
|
|
836
|
+
if (!(existing_unitOfMeasure === incoming_unitOfMeasure)) {
|
|
837
|
+
return false;
|
|
838
|
+
}
|
|
839
|
+
const existing_unitOfMeasureCode = existing.unitOfMeasureCode;
|
|
840
|
+
const incoming_unitOfMeasureCode = incoming.unitOfMeasureCode;
|
|
841
|
+
if (!(existing_unitOfMeasureCode === incoming_unitOfMeasureCode)) {
|
|
842
|
+
return false;
|
|
843
|
+
}
|
|
459
844
|
return true;
|
|
460
845
|
}
|
|
461
846
|
|