@salesforce/lds-adapters-industries-claim 1.365.0 → 1.366.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/es2018/industries-claim.js +328 -51
- package/dist/es/es2018/types/src/generated/adapters/CreateClaimCoverage.d.ts +25 -0
- package/dist/es/es2018/types/src/generated/adapters/UpdateClaimCoverage.d.ts +19 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +3 -1
- package/dist/es/es2018/types/src/generated/resources/patchConnectClaimsCoveragesByClaimIdAndCoverageId.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/resources/postConnectClaimsCoveragesByClaimId.d.ts +24 -0
- package/dist/es/es2018/types/src/generated/types/ClaimCoverageOutputRepresentation.d.ts +45 -0
- package/dist/es/es2018/types/src/generated/types/CreateClaimCoverageInputRepresentation.d.ts +55 -0
- package/dist/es/es2018/types/src/generated/types/UpdateClaimCoverageInputRepresentation.d.ts +34 -0
- package/package.json +3 -3
- package/sfdc/index.js +366 -85
- package/src/raml/api.raml +118 -0
- package/src/raml/luvio.raml +21 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$3, typeCheckConfig as typeCheckConfig$3 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -72,7 +72,7 @@ function createLink(ref) {
|
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
function validate$
|
|
75
|
+
function validate$d(obj, path = 'ClaimAttributeInputRepresentation') {
|
|
76
76
|
const v_error = (() => {
|
|
77
77
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
78
78
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -95,7 +95,7 @@ function validate$c(obj, path = 'ClaimAttributeInputRepresentation') {
|
|
|
95
95
|
return v_error === undefined ? null : v_error;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
function validate$
|
|
98
|
+
function validate$c(obj, path = 'ClaimAttributesInput') {
|
|
99
99
|
const v_error = (() => {
|
|
100
100
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
101
101
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -108,7 +108,7 @@ function validate$b(obj, path = 'ClaimAttributesInput') {
|
|
|
108
108
|
for (let i = 0; i < obj_list.length; i++) {
|
|
109
109
|
const obj_list_item = obj_list[i];
|
|
110
110
|
const path_list_item = path_list + '[' + i + ']';
|
|
111
|
-
const referencepath_list_itemValidationError = validate$
|
|
111
|
+
const referencepath_list_itemValidationError = validate$d(obj_list_item, path_list_item);
|
|
112
112
|
if (referencepath_list_itemValidationError !== null) {
|
|
113
113
|
let message = 'Object doesn\'t match ClaimAttributeInputRepresentation (at "' + path_list_item + '")\n';
|
|
114
114
|
message += referencepath_list_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -119,7 +119,7 @@ function validate$b(obj, path = 'ClaimAttributesInput') {
|
|
|
119
119
|
return v_error === undefined ? null : v_error;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
function validate$
|
|
122
|
+
function validate$b(obj, path = 'ClaimRelatedObjectInputRepresentation') {
|
|
123
123
|
const v_error = (() => {
|
|
124
124
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
125
125
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -142,7 +142,7 @@ function validate$a(obj, path = 'ClaimRelatedObjectInputRepresentation') {
|
|
|
142
142
|
return v_error === undefined ? null : v_error;
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
function validate$
|
|
145
|
+
function validate$a(obj, path = 'ClaimRelatedObjectsInput') {
|
|
146
146
|
const v_error = (() => {
|
|
147
147
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
148
148
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -155,7 +155,7 @@ function validate$9(obj, path = 'ClaimRelatedObjectsInput') {
|
|
|
155
155
|
for (let i = 0; i < obj_list.length; i++) {
|
|
156
156
|
const obj_list_item = obj_list[i];
|
|
157
157
|
const path_list_item = path_list + '[' + i + ']';
|
|
158
|
-
const referencepath_list_itemValidationError = validate$
|
|
158
|
+
const referencepath_list_itemValidationError = validate$b(obj_list_item, path_list_item);
|
|
159
159
|
if (referencepath_list_itemValidationError !== null) {
|
|
160
160
|
let message = 'Object doesn\'t match ClaimRelatedObjectInputRepresentation (at "' + path_list_item + '")\n';
|
|
161
161
|
message += referencepath_list_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -166,7 +166,7 @@ function validate$9(obj, path = 'ClaimRelatedObjectsInput') {
|
|
|
166
166
|
return v_error === undefined ? null : v_error;
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
function validate$
|
|
169
|
+
function validate$9(obj, path = 'ClaimItemInputRepresentation') {
|
|
170
170
|
const v_error = (() => {
|
|
171
171
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
172
172
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -186,7 +186,7 @@ function validate$8(obj, path = 'ClaimItemInputRepresentation') {
|
|
|
186
186
|
if (obj.attributes !== undefined) {
|
|
187
187
|
const obj_attributes = obj.attributes;
|
|
188
188
|
const path_attributes = path + '.attributes';
|
|
189
|
-
const referencepath_attributesValidationError = validate$
|
|
189
|
+
const referencepath_attributesValidationError = validate$c(obj_attributes, path_attributes);
|
|
190
190
|
if (referencepath_attributesValidationError !== null) {
|
|
191
191
|
let message = 'Object doesn\'t match ClaimAttributesInput (at "' + path_attributes + '")\n';
|
|
192
192
|
message += referencepath_attributesValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -243,7 +243,7 @@ function validate$8(obj, path = 'ClaimItemInputRepresentation') {
|
|
|
243
243
|
if (obj.relatedObjects !== undefined) {
|
|
244
244
|
const obj_relatedObjects = obj.relatedObjects;
|
|
245
245
|
const path_relatedObjects = path + '.relatedObjects';
|
|
246
|
-
const referencepath_relatedObjectsValidationError = validate$
|
|
246
|
+
const referencepath_relatedObjectsValidationError = validate$a(obj_relatedObjects, path_relatedObjects);
|
|
247
247
|
if (referencepath_relatedObjectsValidationError !== null) {
|
|
248
248
|
let message = 'Object doesn\'t match ClaimRelatedObjectsInput (at "' + path_relatedObjects + '")\n';
|
|
249
249
|
message += referencepath_relatedObjectsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -254,7 +254,7 @@ function validate$8(obj, path = 'ClaimItemInputRepresentation') {
|
|
|
254
254
|
return v_error === undefined ? null : v_error;
|
|
255
255
|
}
|
|
256
256
|
|
|
257
|
-
function validate$
|
|
257
|
+
function validate$8(obj, path = 'ClaimItemsInput') {
|
|
258
258
|
const v_error = (() => {
|
|
259
259
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
260
260
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -267,7 +267,7 @@ function validate$7(obj, path = 'ClaimItemsInput') {
|
|
|
267
267
|
for (let i = 0; i < obj_list.length; i++) {
|
|
268
268
|
const obj_list_item = obj_list[i];
|
|
269
269
|
const path_list_item = path_list + '[' + i + ']';
|
|
270
|
-
const referencepath_list_itemValidationError = validate$
|
|
270
|
+
const referencepath_list_itemValidationError = validate$9(obj_list_item, path_list_item);
|
|
271
271
|
if (referencepath_list_itemValidationError !== null) {
|
|
272
272
|
let message = 'Object doesn\'t match ClaimItemInputRepresentation (at "' + path_list_item + '")\n';
|
|
273
273
|
message += referencepath_list_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -278,7 +278,7 @@ function validate$7(obj, path = 'ClaimItemsInput') {
|
|
|
278
278
|
return v_error === undefined ? null : v_error;
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
-
function validate$
|
|
281
|
+
function validate$7(obj, path = 'ClaimParticipantRolesInput') {
|
|
282
282
|
const v_error = (() => {
|
|
283
283
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
284
284
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -301,7 +301,7 @@ function validate$6(obj, path = 'ClaimParticipantRolesInput') {
|
|
|
301
301
|
return v_error === undefined ? null : v_error;
|
|
302
302
|
}
|
|
303
303
|
|
|
304
|
-
function validate$
|
|
304
|
+
function validate$6(obj, path = 'ClaimParticipantInputRepresentation') {
|
|
305
305
|
const v_error = (() => {
|
|
306
306
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
307
307
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -354,7 +354,7 @@ function validate$5(obj, path = 'ClaimParticipantInputRepresentation') {
|
|
|
354
354
|
if (obj.roles !== undefined) {
|
|
355
355
|
const obj_roles = obj.roles;
|
|
356
356
|
const path_roles = path + '.roles';
|
|
357
|
-
const referencepath_rolesValidationError = validate$
|
|
357
|
+
const referencepath_rolesValidationError = validate$7(obj_roles, path_roles);
|
|
358
358
|
if (referencepath_rolesValidationError !== null) {
|
|
359
359
|
let message = 'Object doesn\'t match ClaimParticipantRolesInput (at "' + path_roles + '")\n';
|
|
360
360
|
message += referencepath_rolesValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -365,7 +365,7 @@ function validate$5(obj, path = 'ClaimParticipantInputRepresentation') {
|
|
|
365
365
|
return v_error === undefined ? null : v_error;
|
|
366
366
|
}
|
|
367
367
|
|
|
368
|
-
function validate$
|
|
368
|
+
function validate$5(obj, path = 'ClaimParticipantsInput') {
|
|
369
369
|
const v_error = (() => {
|
|
370
370
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
371
371
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -378,7 +378,7 @@ function validate$4(obj, path = 'ClaimParticipantsInput') {
|
|
|
378
378
|
for (let i = 0; i < obj_list.length; i++) {
|
|
379
379
|
const obj_list_item = obj_list[i];
|
|
380
380
|
const path_list_item = path_list + '[' + i + ']';
|
|
381
|
-
const referencepath_list_itemValidationError = validate$
|
|
381
|
+
const referencepath_list_itemValidationError = validate$6(obj_list_item, path_list_item);
|
|
382
382
|
if (referencepath_list_itemValidationError !== null) {
|
|
383
383
|
let message = 'Object doesn\'t match ClaimParticipantInputRepresentation (at "' + path_list_item + '")\n';
|
|
384
384
|
message += referencepath_list_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -389,7 +389,7 @@ function validate$4(obj, path = 'ClaimParticipantsInput') {
|
|
|
389
389
|
return v_error === undefined ? null : v_error;
|
|
390
390
|
}
|
|
391
391
|
|
|
392
|
-
function validate$
|
|
392
|
+
function validate$4(obj, path = 'ClaimInputRepresentation') {
|
|
393
393
|
const v_error = (() => {
|
|
394
394
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
395
395
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -411,7 +411,7 @@ function validate$3(obj, path = 'ClaimInputRepresentation') {
|
|
|
411
411
|
if (obj.attributes !== undefined) {
|
|
412
412
|
const obj_attributes = obj.attributes;
|
|
413
413
|
const path_attributes = path + '.attributes';
|
|
414
|
-
const referencepath_attributesValidationError = validate$
|
|
414
|
+
const referencepath_attributesValidationError = validate$c(obj_attributes, path_attributes);
|
|
415
415
|
if (referencepath_attributesValidationError !== null) {
|
|
416
416
|
let message = 'Object doesn\'t match ClaimAttributesInput (at "' + path_attributes + '")\n';
|
|
417
417
|
message += referencepath_attributesValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -456,7 +456,7 @@ function validate$3(obj, path = 'ClaimInputRepresentation') {
|
|
|
456
456
|
if (obj.items !== undefined) {
|
|
457
457
|
const obj_items = obj.items;
|
|
458
458
|
const path_items = path + '.items';
|
|
459
|
-
const referencepath_itemsValidationError = validate$
|
|
459
|
+
const referencepath_itemsValidationError = validate$8(obj_items, path_items);
|
|
460
460
|
if (referencepath_itemsValidationError !== null) {
|
|
461
461
|
let message = 'Object doesn\'t match ClaimItemsInput (at "' + path_items + '")\n';
|
|
462
462
|
message += referencepath_itemsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -494,7 +494,7 @@ function validate$3(obj, path = 'ClaimInputRepresentation') {
|
|
|
494
494
|
if (obj.participants !== undefined) {
|
|
495
495
|
const obj_participants = obj.participants;
|
|
496
496
|
const path_participants = path + '.participants';
|
|
497
|
-
const referencepath_participantsValidationError = validate$
|
|
497
|
+
const referencepath_participantsValidationError = validate$5(obj_participants, path_participants);
|
|
498
498
|
if (referencepath_participantsValidationError !== null) {
|
|
499
499
|
let message = 'Object doesn\'t match ClaimParticipantsInput (at "' + path_participants + '")\n';
|
|
500
500
|
message += referencepath_participantsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -512,7 +512,7 @@ function validate$3(obj, path = 'ClaimInputRepresentation') {
|
|
|
512
512
|
return v_error === undefined ? null : v_error;
|
|
513
513
|
}
|
|
514
514
|
|
|
515
|
-
function validate$
|
|
515
|
+
function validate$3(obj, path = 'ClaimErrorOutputRepresentation') {
|
|
516
516
|
const v_error = (() => {
|
|
517
517
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
518
518
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -531,7 +531,7 @@ function validate$2(obj, path = 'ClaimErrorOutputRepresentation') {
|
|
|
531
531
|
return v_error === undefined ? null : v_error;
|
|
532
532
|
}
|
|
533
533
|
|
|
534
|
-
function validate$
|
|
534
|
+
function validate$2(obj, path = 'ClaimErrorsOutput') {
|
|
535
535
|
const v_error = (() => {
|
|
536
536
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
537
537
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -544,7 +544,7 @@ function validate$1(obj, path = 'ClaimErrorsOutput') {
|
|
|
544
544
|
for (let i = 0; i < obj_list.length; i++) {
|
|
545
545
|
const obj_list_item = obj_list[i];
|
|
546
546
|
const path_list_item = path_list + '[' + i + ']';
|
|
547
|
-
const referencepath_list_itemValidationError = validate$
|
|
547
|
+
const referencepath_list_itemValidationError = validate$3(obj_list_item, path_list_item);
|
|
548
548
|
if (referencepath_list_itemValidationError !== null) {
|
|
549
549
|
let message = 'Object doesn\'t match ClaimErrorOutputRepresentation (at "' + path_list_item + '")\n';
|
|
550
550
|
message += referencepath_list_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -555,9 +555,9 @@ function validate$1(obj, path = 'ClaimErrorsOutput') {
|
|
|
555
555
|
return v_error === undefined ? null : v_error;
|
|
556
556
|
}
|
|
557
557
|
|
|
558
|
-
const TTL = 1000;
|
|
559
|
-
const VERSION = "cfe519428dbc15b5957bdd77685559d4";
|
|
560
|
-
function validate(obj, path = 'CreateClaimOutputRepresentation') {
|
|
558
|
+
const TTL$1 = 1000;
|
|
559
|
+
const VERSION$1 = "cfe519428dbc15b5957bdd77685559d4";
|
|
560
|
+
function validate$1(obj, path = 'CreateClaimOutputRepresentation') {
|
|
561
561
|
const v_error = (() => {
|
|
562
562
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
563
563
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -570,7 +570,7 @@ function validate(obj, path = 'CreateClaimOutputRepresentation') {
|
|
|
570
570
|
if (obj.errors !== undefined) {
|
|
571
571
|
const obj_errors = obj.errors;
|
|
572
572
|
const path_errors = path + '.errors';
|
|
573
|
-
const referencepath_errorsValidationError = validate$
|
|
573
|
+
const referencepath_errorsValidationError = validate$2(obj_errors, path_errors);
|
|
574
574
|
if (referencepath_errorsValidationError !== null) {
|
|
575
575
|
let message = 'Object doesn\'t match ClaimErrorsOutput (at "' + path_errors + '")\n';
|
|
576
576
|
message += referencepath_errorsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -585,20 +585,195 @@ function validate(obj, path = 'CreateClaimOutputRepresentation') {
|
|
|
585
585
|
})();
|
|
586
586
|
return v_error === undefined ? null : v_error;
|
|
587
587
|
}
|
|
588
|
-
const RepresentationType = 'CreateClaimOutputRepresentation';
|
|
588
|
+
const RepresentationType$1 = 'CreateClaimOutputRepresentation';
|
|
589
|
+
function keyBuilder$1(luvio, config) {
|
|
590
|
+
return keyPrefix + '::' + RepresentationType$1 + ':' + config.claim_id;
|
|
591
|
+
}
|
|
592
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
593
|
+
const keyParams = {
|
|
594
|
+
claim_id: object.claimId
|
|
595
|
+
};
|
|
596
|
+
return keyBuilder$1(luvio, keyParams);
|
|
597
|
+
}
|
|
598
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
599
|
+
return input;
|
|
600
|
+
}
|
|
601
|
+
const select$4 = function CreateClaimOutputRepresentationSelect() {
|
|
602
|
+
return {
|
|
603
|
+
kind: 'Fragment',
|
|
604
|
+
version: VERSION$1,
|
|
605
|
+
private: [],
|
|
606
|
+
opaque: true
|
|
607
|
+
};
|
|
608
|
+
};
|
|
609
|
+
function equals$1(existing, incoming) {
|
|
610
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
611
|
+
return false;
|
|
612
|
+
}
|
|
613
|
+
return true;
|
|
614
|
+
}
|
|
615
|
+
const ingest$1 = function CreateClaimOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
616
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
617
|
+
const validateError = validate$1(input);
|
|
618
|
+
if (validateError !== null) {
|
|
619
|
+
throw validateError;
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
623
|
+
const ttlToUse = TTL$1;
|
|
624
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "Claim", VERSION$1, RepresentationType$1, equals$1);
|
|
625
|
+
return createLink(key);
|
|
626
|
+
};
|
|
627
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
628
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
629
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
630
|
+
rootKeySet.set(rootKey, {
|
|
631
|
+
namespace: keyPrefix,
|
|
632
|
+
representationName: RepresentationType$1,
|
|
633
|
+
mergeable: false
|
|
634
|
+
});
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
function select$3(luvio, params) {
|
|
638
|
+
return select$4();
|
|
639
|
+
}
|
|
640
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
641
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
642
|
+
}
|
|
643
|
+
function ingestSuccess$2(luvio, resourceParams, response) {
|
|
644
|
+
const { body } = response;
|
|
645
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
646
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
647
|
+
const snapshot = luvio.storeLookup({
|
|
648
|
+
recordId: key,
|
|
649
|
+
node: select$3(),
|
|
650
|
+
variables: {},
|
|
651
|
+
});
|
|
652
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
653
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
654
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
deepFreeze(snapshot.data);
|
|
658
|
+
return snapshot;
|
|
659
|
+
}
|
|
660
|
+
function createResourceRequest$2(config) {
|
|
661
|
+
const headers = {};
|
|
662
|
+
return {
|
|
663
|
+
baseUri: '/services/data/v65.0',
|
|
664
|
+
basePath: '/connect/claims/' + config.urlParams.claimId + '',
|
|
665
|
+
method: 'patch',
|
|
666
|
+
body: config.body,
|
|
667
|
+
urlParams: config.urlParams,
|
|
668
|
+
queryParams: {},
|
|
669
|
+
headers,
|
|
670
|
+
priority: 'normal',
|
|
671
|
+
};
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
const adapterName$2 = 'UpdateClaim';
|
|
675
|
+
const UpdateClaim_ConfigPropertyMetadata = [
|
|
676
|
+
generateParamConfigMetadata('claimId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
677
|
+
generateParamConfigMetadata('updateClaimInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
678
|
+
];
|
|
679
|
+
const UpdateClaim_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, UpdateClaim_ConfigPropertyMetadata);
|
|
680
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(UpdateClaim_ConfigPropertyMetadata);
|
|
681
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
682
|
+
const config = {};
|
|
683
|
+
typeCheckConfig$3(untrustedConfig, config, UpdateClaim_ConfigPropertyMetadata);
|
|
684
|
+
const untrustedConfig_updateClaimInput = untrustedConfig.updateClaimInput;
|
|
685
|
+
const referenceClaimInputRepresentationValidationError = validate$4(untrustedConfig_updateClaimInput);
|
|
686
|
+
if (referenceClaimInputRepresentationValidationError === null) {
|
|
687
|
+
config.updateClaimInput = untrustedConfig_updateClaimInput;
|
|
688
|
+
}
|
|
689
|
+
return config;
|
|
690
|
+
}
|
|
691
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
692
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
693
|
+
return null;
|
|
694
|
+
}
|
|
695
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
696
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
697
|
+
}
|
|
698
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
699
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
700
|
+
return null;
|
|
701
|
+
}
|
|
702
|
+
return config;
|
|
703
|
+
}
|
|
704
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
705
|
+
const resourceParams = createResourceParams$2(config);
|
|
706
|
+
const request = createResourceRequest$2(resourceParams);
|
|
707
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
708
|
+
.then((response) => {
|
|
709
|
+
return luvio.handleSuccessResponse(() => {
|
|
710
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response);
|
|
711
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
712
|
+
}, () => {
|
|
713
|
+
const cache = new StoreKeyMap();
|
|
714
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
715
|
+
return cache;
|
|
716
|
+
});
|
|
717
|
+
}, (response) => {
|
|
718
|
+
deepFreeze(response);
|
|
719
|
+
throw response;
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
const UpdateClaimAdapterFactory = (luvio) => {
|
|
723
|
+
return function UpdateClaim(untrustedConfig) {
|
|
724
|
+
const config = validateAdapterConfig$2(untrustedConfig, UpdateClaim_ConfigPropertyNames);
|
|
725
|
+
// Invalid or incomplete config
|
|
726
|
+
if (config === null) {
|
|
727
|
+
throw new Error('Invalid config for "UpdateClaim"');
|
|
728
|
+
}
|
|
729
|
+
return buildNetworkSnapshot$2(luvio, config);
|
|
730
|
+
};
|
|
731
|
+
};
|
|
732
|
+
|
|
733
|
+
const TTL = 1000;
|
|
734
|
+
const VERSION = "35f177f27215c8f2ce3f8fb56ff7c2be";
|
|
735
|
+
function validate(obj, path = 'ClaimCoverageOutputRepresentation') {
|
|
736
|
+
const v_error = (() => {
|
|
737
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
738
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
739
|
+
}
|
|
740
|
+
const obj_coverageId = obj.coverageId;
|
|
741
|
+
const path_coverageId = path + '.coverageId';
|
|
742
|
+
if (typeof obj_coverageId !== 'string') {
|
|
743
|
+
return new TypeError('Expected "string" but received "' + typeof obj_coverageId + '" (at "' + path_coverageId + '")');
|
|
744
|
+
}
|
|
745
|
+
if (obj.errors !== undefined) {
|
|
746
|
+
const obj_errors = obj.errors;
|
|
747
|
+
const path_errors = path + '.errors';
|
|
748
|
+
const referencepath_errorsValidationError = validate$2(obj_errors, path_errors);
|
|
749
|
+
if (referencepath_errorsValidationError !== null) {
|
|
750
|
+
let message = 'Object doesn\'t match ClaimErrorsOutput (at "' + path_errors + '")\n';
|
|
751
|
+
message += referencepath_errorsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
752
|
+
return new TypeError(message);
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
const obj_isSuccess = obj.isSuccess;
|
|
756
|
+
const path_isSuccess = path + '.isSuccess';
|
|
757
|
+
if (typeof obj_isSuccess !== 'boolean') {
|
|
758
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
|
|
759
|
+
}
|
|
760
|
+
})();
|
|
761
|
+
return v_error === undefined ? null : v_error;
|
|
762
|
+
}
|
|
763
|
+
const RepresentationType = 'ClaimCoverageOutputRepresentation';
|
|
589
764
|
function keyBuilder(luvio, config) {
|
|
590
|
-
return keyPrefix + '::' + RepresentationType + ':' + config.
|
|
765
|
+
return keyPrefix + '::' + RepresentationType + ':' + config.coverageId;
|
|
591
766
|
}
|
|
592
767
|
function keyBuilderFromType(luvio, object) {
|
|
593
768
|
const keyParams = {
|
|
594
|
-
|
|
769
|
+
coverageId: object.coverageId
|
|
595
770
|
};
|
|
596
771
|
return keyBuilder(luvio, keyParams);
|
|
597
772
|
}
|
|
598
773
|
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
599
774
|
return input;
|
|
600
775
|
}
|
|
601
|
-
const select$
|
|
776
|
+
const select$2 = function ClaimCoverageOutputRepresentationSelect() {
|
|
602
777
|
return {
|
|
603
778
|
kind: 'Fragment',
|
|
604
779
|
version: VERSION,
|
|
@@ -612,7 +787,7 @@ function equals(existing, incoming) {
|
|
|
612
787
|
}
|
|
613
788
|
return true;
|
|
614
789
|
}
|
|
615
|
-
const ingest = function
|
|
790
|
+
const ingest = function ClaimCoverageOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
616
791
|
if (process.env.NODE_ENV !== 'production') {
|
|
617
792
|
const validateError = validate(input);
|
|
618
793
|
if (validateError !== null) {
|
|
@@ -634,8 +809,110 @@ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
634
809
|
});
|
|
635
810
|
}
|
|
636
811
|
|
|
812
|
+
function select$1(luvio, params) {
|
|
813
|
+
return select$2();
|
|
814
|
+
}
|
|
815
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
816
|
+
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
817
|
+
}
|
|
818
|
+
function ingestSuccess$1(luvio, resourceParams, response) {
|
|
819
|
+
const { body } = response;
|
|
820
|
+
const key = keyBuilderFromType(luvio, body);
|
|
821
|
+
luvio.storeIngest(key, ingest, body);
|
|
822
|
+
const snapshot = luvio.storeLookup({
|
|
823
|
+
recordId: key,
|
|
824
|
+
node: select$1(),
|
|
825
|
+
variables: {},
|
|
826
|
+
});
|
|
827
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
828
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
829
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
deepFreeze(snapshot.data);
|
|
833
|
+
return snapshot;
|
|
834
|
+
}
|
|
835
|
+
function createResourceRequest$1(config) {
|
|
836
|
+
const headers = {};
|
|
837
|
+
return {
|
|
838
|
+
baseUri: '/services/data/v65.0',
|
|
839
|
+
basePath: '/connect/claims/' + config.urlParams.claimId + '/coverages',
|
|
840
|
+
method: 'post',
|
|
841
|
+
body: config.body,
|
|
842
|
+
urlParams: config.urlParams,
|
|
843
|
+
queryParams: {},
|
|
844
|
+
headers,
|
|
845
|
+
priority: 'normal',
|
|
846
|
+
};
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
const adapterName$1 = 'CreateClaimCoverage';
|
|
850
|
+
const CreateClaimCoverage_ConfigPropertyMetadata = [
|
|
851
|
+
generateParamConfigMetadata('claimId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
852
|
+
generateParamConfigMetadata('additionalFields', false, 2 /* Body */, 4 /* Unsupported */),
|
|
853
|
+
generateParamConfigMetadata('claimItemId', true, 2 /* Body */, 0 /* String */),
|
|
854
|
+
generateParamConfigMetadata('claimParticipantId', true, 2 /* Body */, 0 /* String */),
|
|
855
|
+
generateParamConfigMetadata('currencyIsoCode', false, 2 /* Body */, 0 /* String */),
|
|
856
|
+
generateParamConfigMetadata('expenseReserveAmount', false, 2 /* Body */, 2 /* Number */),
|
|
857
|
+
generateParamConfigMetadata('insurancePolicyAssetId', false, 2 /* Body */, 0 /* String */),
|
|
858
|
+
generateParamConfigMetadata('insurancePolicyCoverageId', false, 2 /* Body */, 0 /* String */),
|
|
859
|
+
generateParamConfigMetadata('lossReserveAmount', false, 2 /* Body */, 2 /* Number */),
|
|
860
|
+
generateParamConfigMetadata('name', false, 2 /* Body */, 0 /* String */),
|
|
861
|
+
generateParamConfigMetadata('reserveProcessingMode', true, 2 /* Body */, 0 /* String */),
|
|
862
|
+
];
|
|
863
|
+
const CreateClaimCoverage_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, CreateClaimCoverage_ConfigPropertyMetadata);
|
|
864
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(CreateClaimCoverage_ConfigPropertyMetadata);
|
|
865
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
866
|
+
const config = {};
|
|
867
|
+
typeCheckConfig$3(untrustedConfig, config, CreateClaimCoverage_ConfigPropertyMetadata);
|
|
868
|
+
const untrustedConfig_additionalFields = untrustedConfig.additionalFields;
|
|
869
|
+
config.additionalFields = untrustedConfig_additionalFields;
|
|
870
|
+
return config;
|
|
871
|
+
}
|
|
872
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
873
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
874
|
+
return null;
|
|
875
|
+
}
|
|
876
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
877
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
878
|
+
}
|
|
879
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
880
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
881
|
+
return null;
|
|
882
|
+
}
|
|
883
|
+
return config;
|
|
884
|
+
}
|
|
885
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
886
|
+
const resourceParams = createResourceParams$1(config);
|
|
887
|
+
const request = createResourceRequest$1(resourceParams);
|
|
888
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
889
|
+
.then((response) => {
|
|
890
|
+
return luvio.handleSuccessResponse(() => {
|
|
891
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response);
|
|
892
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
893
|
+
}, () => {
|
|
894
|
+
const cache = new StoreKeyMap();
|
|
895
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
896
|
+
return cache;
|
|
897
|
+
});
|
|
898
|
+
}, (response) => {
|
|
899
|
+
deepFreeze(response);
|
|
900
|
+
throw response;
|
|
901
|
+
});
|
|
902
|
+
}
|
|
903
|
+
const CreateClaimCoverageAdapterFactory = (luvio) => {
|
|
904
|
+
return function CreateClaimCoverage(untrustedConfig) {
|
|
905
|
+
const config = validateAdapterConfig$1(untrustedConfig, CreateClaimCoverage_ConfigPropertyNames);
|
|
906
|
+
// Invalid or incomplete config
|
|
907
|
+
if (config === null) {
|
|
908
|
+
throw new Error('Invalid config for "CreateClaimCoverage"');
|
|
909
|
+
}
|
|
910
|
+
return buildNetworkSnapshot$1(luvio, config);
|
|
911
|
+
};
|
|
912
|
+
};
|
|
913
|
+
|
|
637
914
|
function select(luvio, params) {
|
|
638
|
-
return select$
|
|
915
|
+
return select$2();
|
|
639
916
|
}
|
|
640
917
|
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
641
918
|
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
@@ -661,7 +938,7 @@ function createResourceRequest(config) {
|
|
|
661
938
|
const headers = {};
|
|
662
939
|
return {
|
|
663
940
|
baseUri: '/services/data/v65.0',
|
|
664
|
-
basePath: '/connect/claims/' + config.urlParams.claimId + '',
|
|
941
|
+
basePath: '/connect/claims/' + config.urlParams.claimId + '/coverages/' + config.urlParams.coverageId + '',
|
|
665
942
|
method: 'patch',
|
|
666
943
|
body: config.body,
|
|
667
944
|
urlParams: config.urlParams,
|
|
@@ -671,21 +948,21 @@ function createResourceRequest(config) {
|
|
|
671
948
|
};
|
|
672
949
|
}
|
|
673
950
|
|
|
674
|
-
const adapterName = '
|
|
675
|
-
const
|
|
951
|
+
const adapterName = 'UpdateClaimCoverage';
|
|
952
|
+
const UpdateClaimCoverage_ConfigPropertyMetadata = [
|
|
676
953
|
generateParamConfigMetadata('claimId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
677
|
-
generateParamConfigMetadata('
|
|
954
|
+
generateParamConfigMetadata('coverageId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
955
|
+
generateParamConfigMetadata('additionalFields', false, 2 /* Body */, 4 /* Unsupported */),
|
|
956
|
+
generateParamConfigMetadata('expenseReserveAmount', false, 2 /* Body */, 2 /* Number */),
|
|
957
|
+
generateParamConfigMetadata('lossReserveAmount', false, 2 /* Body */, 2 /* Number */),
|
|
678
958
|
];
|
|
679
|
-
const
|
|
680
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
959
|
+
const UpdateClaimCoverage_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, UpdateClaimCoverage_ConfigPropertyMetadata);
|
|
960
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$3(UpdateClaimCoverage_ConfigPropertyMetadata);
|
|
681
961
|
function typeCheckConfig(untrustedConfig) {
|
|
682
962
|
const config = {};
|
|
683
|
-
typeCheckConfig$
|
|
684
|
-
const
|
|
685
|
-
|
|
686
|
-
if (referenceClaimInputRepresentationValidationError === null) {
|
|
687
|
-
config.updateClaimInput = untrustedConfig_updateClaimInput;
|
|
688
|
-
}
|
|
963
|
+
typeCheckConfig$3(untrustedConfig, config, UpdateClaimCoverage_ConfigPropertyMetadata);
|
|
964
|
+
const untrustedConfig_additionalFields = untrustedConfig.additionalFields;
|
|
965
|
+
config.additionalFields = untrustedConfig_additionalFields;
|
|
689
966
|
return config;
|
|
690
967
|
}
|
|
691
968
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -719,15 +996,15 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
719
996
|
throw response;
|
|
720
997
|
});
|
|
721
998
|
}
|
|
722
|
-
const
|
|
723
|
-
return function
|
|
724
|
-
const config = validateAdapterConfig(untrustedConfig,
|
|
999
|
+
const UpdateClaimCoverageAdapterFactory = (luvio) => {
|
|
1000
|
+
return function UpdateClaimCoverage(untrustedConfig) {
|
|
1001
|
+
const config = validateAdapterConfig(untrustedConfig, UpdateClaimCoverage_ConfigPropertyNames);
|
|
725
1002
|
// Invalid or incomplete config
|
|
726
1003
|
if (config === null) {
|
|
727
|
-
throw new Error('Invalid config for "
|
|
1004
|
+
throw new Error('Invalid config for "UpdateClaimCoverage"');
|
|
728
1005
|
}
|
|
729
1006
|
return buildNetworkSnapshot(luvio, config);
|
|
730
1007
|
};
|
|
731
1008
|
};
|
|
732
1009
|
|
|
733
|
-
export { UpdateClaimAdapterFactory };
|
|
1010
|
+
export { CreateClaimCoverageAdapterFactory, UpdateClaimAdapterFactory, UpdateClaimCoverageAdapterFactory };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata, Luvio as $64$luvio_engine_Luvio, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
|
|
2
|
+
import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
|
|
3
|
+
import { ResourceRequestConfig as resources_postConnectClaimsCoveragesByClaimId_ResourceRequestConfig } from '../resources/postConnectClaimsCoveragesByClaimId';
|
|
4
|
+
import { ClaimCoverageOutputRepresentation as types_ClaimCoverageOutputRepresentation_ClaimCoverageOutputRepresentation } from '../types/ClaimCoverageOutputRepresentation';
|
|
5
|
+
export declare const adapterName = "CreateClaimCoverage";
|
|
6
|
+
export declare const CreateClaimCoverage_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
7
|
+
export declare const CreateClaimCoverage_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
8
|
+
export interface CreateClaimCoverageConfig {
|
|
9
|
+
claimId: string;
|
|
10
|
+
additionalFields?: unknown;
|
|
11
|
+
claimItemId: string;
|
|
12
|
+
claimParticipantId: string;
|
|
13
|
+
currencyIsoCode?: string;
|
|
14
|
+
expenseReserveAmount?: number;
|
|
15
|
+
insurancePolicyAssetId?: string;
|
|
16
|
+
insurancePolicyCoverageId?: string;
|
|
17
|
+
lossReserveAmount?: number;
|
|
18
|
+
name?: string;
|
|
19
|
+
reserveProcessingMode: string;
|
|
20
|
+
}
|
|
21
|
+
export declare const createResourceParams: (config: CreateClaimCoverageConfig) => resources_postConnectClaimsCoveragesByClaimId_ResourceRequestConfig;
|
|
22
|
+
export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<CreateClaimCoverageConfig>): adapter$45$utils_Untrusted<CreateClaimCoverageConfig>;
|
|
23
|
+
export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): CreateClaimCoverageConfig | null;
|
|
24
|
+
export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: CreateClaimCoverageConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<import("@luvio/engine").FulfilledSnapshot<types_ClaimCoverageOutputRepresentation_ClaimCoverageOutputRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_ClaimCoverageOutputRepresentation_ClaimCoverageOutputRepresentation, {}> | import("@luvio/engine").PendingSnapshot<types_ClaimCoverageOutputRepresentation_ClaimCoverageOutputRepresentation, any>>;
|
|
25
|
+
export declare const CreateClaimCoverageAdapterFactory: $64$luvio_engine_AdapterFactory<CreateClaimCoverageConfig, types_ClaimCoverageOutputRepresentation_ClaimCoverageOutputRepresentation>;
|