@instabrain-sdks/api-client 1.0.0 → 2.0.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/README.md +234 -17
- package/dist/client/instabrain-client.d.ts +73 -1
- package/dist/client/instabrain-client.d.ts.map +1 -1
- package/dist/client/instabrain-client.js +94 -0
- package/dist/client/instabrain-client.js.map +1 -1
- package/dist/index.d.ts +0 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -11
- package/dist/index.js.map +1 -1
- package/dist/services/application.service.d.ts +10 -2
- package/dist/services/application.service.d.ts.map +1 -1
- package/dist/services/application.service.js +36 -0
- package/dist/services/application.service.js.map +1 -1
- package/dist/services/auth.service.d.ts +1 -1
- package/dist/services/auth.service.d.ts.map +1 -1
- package/dist/services/auth.service.js.map +1 -1
- package/dist/services/gigdb.service.d.ts +44 -0
- package/dist/services/gigdb.service.d.ts.map +1 -0
- package/dist/services/gigdb.service.js +182 -0
- package/dist/services/gigdb.service.js.map +1 -0
- package/dist/services/quote.service.d.ts +1 -7
- package/dist/services/quote.service.d.ts.map +1 -1
- package/dist/services/quote.service.js +2 -33
- package/dist/services/quote.service.js.map +1 -1
- package/dist/services/reports.service.d.ts +1 -7
- package/dist/services/reports.service.d.ts.map +1 -1
- package/dist/services/reports.service.js +4 -41
- package/dist/services/reports.service.js.map +1 -1
- package/dist/services/secure-sign.service.d.ts +48 -0
- package/dist/services/secure-sign.service.d.ts.map +1 -0
- package/dist/services/secure-sign.service.js +161 -0
- package/dist/services/secure-sign.service.js.map +1 -0
- package/dist/types/application.types.d.ts +4 -0
- package/dist/types/application.types.d.ts.map +1 -1
- package/dist/types/enums.d.ts +23 -1
- package/dist/types/enums.d.ts.map +1 -1
- package/dist/types/enums.js +25 -0
- package/dist/types/enums.js.map +1 -1
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/errors.js +26 -1
- package/dist/types/errors.js.map +1 -1
- package/dist/types/gigdb.types.d.ts +98 -0
- package/dist/types/gigdb.types.d.ts.map +1 -0
- package/dist/types/gigdb.types.js +3 -0
- package/dist/types/gigdb.types.js.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/secure-sign.types.d.ts +82 -0
- package/dist/types/secure-sign.types.d.ts.map +1 -0
- package/dist/types/secure-sign.types.js +5 -0
- package/dist/types/secure-sign.types.js.map +1 -0
- package/dist/utils/error-utils.d.ts +13 -0
- package/dist/utils/error-utils.d.ts.map +1 -0
- package/dist/utils/error-utils.js +31 -0
- package/dist/utils/error-utils.js.map +1 -0
- package/package.json +54 -51
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SecureSignService = void 0;
|
|
4
|
+
const error_utils_1 = require("../utils/error-utils");
|
|
5
|
+
const types_1 = require("../types");
|
|
6
|
+
/**
|
|
7
|
+
* Secure Sign service for document signing flow
|
|
8
|
+
* Shared across all third-party products — not specific to GIGDB.
|
|
9
|
+
* Call these endpoints after EFT payment has been saved successfully.
|
|
10
|
+
*
|
|
11
|
+
* Typical flow:
|
|
12
|
+
* 1. prepareDocsAndGetDeliveryChannels() — prepare signing package, check channels
|
|
13
|
+
* 2. sendPinAndGetDocumentsLink() — send PIN via SMS/Email, get documents link
|
|
14
|
+
* 3. resendPin() (optional) — resend if signer didn't receive PIN
|
|
15
|
+
* 4. verifyPin() — verify PIN to complete signing
|
|
16
|
+
*/
|
|
17
|
+
class SecureSignService {
|
|
18
|
+
constructor(httpClient) {
|
|
19
|
+
this.httpClient = httpClient;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Prepare the signing package and check available delivery channels
|
|
23
|
+
* Always call this first — it prepares the signing package.
|
|
24
|
+
* If isSignCompleted is true, skip the PIN flow and proceed to Final Submit.
|
|
25
|
+
* @param opportunityId - The OpportunityId from the Start Application response
|
|
26
|
+
* @returns Promise with delivery channels and sign completion status
|
|
27
|
+
*/
|
|
28
|
+
async prepareDocsAndGetDeliveryChannels(opportunityId) {
|
|
29
|
+
if (!this.httpClient.isAuthenticated()) {
|
|
30
|
+
throw new types_1.AuthenticationError('Must be authenticated to prepare documents. Call authenticate() first.');
|
|
31
|
+
}
|
|
32
|
+
try {
|
|
33
|
+
const response = await this.httpClient.get('/api/ThirdPartySecureSign/get-delivery-channels-and-prepare-docs', { params: { opportunityId } });
|
|
34
|
+
if (!response.flagStatus) {
|
|
35
|
+
const errorMessage = response.error || 'Failed to prepare documents and get delivery channels';
|
|
36
|
+
const errorCode = (0, error_utils_1.extractErrorCode)(response);
|
|
37
|
+
if (errorCode) {
|
|
38
|
+
throw new types_1.APIValidationError(errorMessage, errorCode, response);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
throw new types_1.InstaBrainError(errorMessage, 400, response);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (!response.value) {
|
|
45
|
+
throw new types_1.InstaBrainError('No document preparation data received from server');
|
|
46
|
+
}
|
|
47
|
+
return response.value;
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
if (error instanceof types_1.InstaBrainError) {
|
|
51
|
+
throw error;
|
|
52
|
+
}
|
|
53
|
+
throw new types_1.InstaBrainError('Failed to prepare documents and get delivery channels: ' + error.message);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Send a verification PIN via SMS and/or Email and receive the documents link
|
|
58
|
+
* At least one of flagSendSms or flagSendEmail must be true.
|
|
59
|
+
* The returned script must be read aloud to the proposed insured before signing.
|
|
60
|
+
* @param request - The send PIN request with delivery preferences
|
|
61
|
+
* @returns Promise with documents link and disclosure script
|
|
62
|
+
*/
|
|
63
|
+
async sendPinAndGetDocumentsLink(request) {
|
|
64
|
+
if (!this.httpClient.isAuthenticated()) {
|
|
65
|
+
throw new types_1.AuthenticationError('Must be authenticated to send PIN. Call authenticate() first.');
|
|
66
|
+
}
|
|
67
|
+
try {
|
|
68
|
+
const response = await this.httpClient.post('/api/ThirdPartySecureSign/send-pin-and-get-documents-link', request);
|
|
69
|
+
if (!response.flagStatus) {
|
|
70
|
+
const errorMessage = response.error || 'Failed to send PIN and get documents link';
|
|
71
|
+
const errorCode = (0, error_utils_1.extractErrorCode)(response);
|
|
72
|
+
if (errorCode) {
|
|
73
|
+
throw new types_1.APIValidationError(errorMessage, errorCode, response);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
throw new types_1.InstaBrainError(errorMessage, 400, response);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
if (!response.value) {
|
|
80
|
+
throw new types_1.InstaBrainError('No PIN/documents data received from server');
|
|
81
|
+
}
|
|
82
|
+
return response.value;
|
|
83
|
+
}
|
|
84
|
+
catch (error) {
|
|
85
|
+
if (error instanceof types_1.InstaBrainError) {
|
|
86
|
+
throw error;
|
|
87
|
+
}
|
|
88
|
+
throw new types_1.InstaBrainError('Failed to send PIN and get documents link: ' + error.message);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Resend the verification PIN if the signer did not receive it
|
|
93
|
+
* Unlike sendPinAndGetDocumentsLink, this does NOT return the documents link.
|
|
94
|
+
* @param request - The resend PIN request with delivery preferences
|
|
95
|
+
* @returns Promise with PIN sent confirmation
|
|
96
|
+
*/
|
|
97
|
+
async resendPin(request) {
|
|
98
|
+
if (!this.httpClient.isAuthenticated()) {
|
|
99
|
+
throw new types_1.AuthenticationError('Must be authenticated to resend PIN. Call authenticate() first.');
|
|
100
|
+
}
|
|
101
|
+
try {
|
|
102
|
+
const response = await this.httpClient.post('/api/ThirdPartySecureSign/resend-pin', request);
|
|
103
|
+
if (!response.flagStatus) {
|
|
104
|
+
const errorMessage = response.error || 'Failed to resend PIN';
|
|
105
|
+
const errorCode = (0, error_utils_1.extractErrorCode)(response);
|
|
106
|
+
if (errorCode) {
|
|
107
|
+
throw new types_1.APIValidationError(errorMessage, errorCode, response);
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
throw new types_1.InstaBrainError(errorMessage, 400, response);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if (!response.value) {
|
|
114
|
+
throw new types_1.InstaBrainError('No resend PIN data received from server');
|
|
115
|
+
}
|
|
116
|
+
return response.value;
|
|
117
|
+
}
|
|
118
|
+
catch (error) {
|
|
119
|
+
if (error instanceof types_1.InstaBrainError) {
|
|
120
|
+
throw error;
|
|
121
|
+
}
|
|
122
|
+
throw new types_1.InstaBrainError('Failed to resend PIN: ' + error.message);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Verify the PIN entered by the signer to complete document signing
|
|
127
|
+
* The disclosure script must have been read aloud before calling this.
|
|
128
|
+
* @param request - The verify PIN request with PIN and script confirmation
|
|
129
|
+
* @returns Promise with verification result
|
|
130
|
+
*/
|
|
131
|
+
async verifyPin(request) {
|
|
132
|
+
if (!this.httpClient.isAuthenticated()) {
|
|
133
|
+
throw new types_1.AuthenticationError('Must be authenticated to verify PIN. Call authenticate() first.');
|
|
134
|
+
}
|
|
135
|
+
try {
|
|
136
|
+
const response = await this.httpClient.post('/api/ThirdPartySecureSign/verify-pin', request);
|
|
137
|
+
if (!response.flagStatus) {
|
|
138
|
+
const errorMessage = response.error || 'Failed to verify PIN';
|
|
139
|
+
const errorCode = (0, error_utils_1.extractErrorCode)(response);
|
|
140
|
+
if (errorCode) {
|
|
141
|
+
throw new types_1.APIValidationError(errorMessage, errorCode, response);
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
throw new types_1.InstaBrainError(errorMessage, 400, response);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
if (!response.value) {
|
|
148
|
+
throw new types_1.InstaBrainError('No PIN verification data received from server');
|
|
149
|
+
}
|
|
150
|
+
return response.value;
|
|
151
|
+
}
|
|
152
|
+
catch (error) {
|
|
153
|
+
if (error instanceof types_1.InstaBrainError) {
|
|
154
|
+
throw error;
|
|
155
|
+
}
|
|
156
|
+
throw new types_1.InstaBrainError('Failed to verify PIN: ' + error.message);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
exports.SecureSignService = SecureSignService;
|
|
161
|
+
//# sourceMappingURL=secure-sign.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secure-sign.service.js","sourceRoot":"","sources":["../../src/services/secure-sign.service.ts"],"names":[],"mappings":";;;AACA,sDAAwD;AACxD,oCAYkB;AAElB;;;;;;;;;;GAUG;AACH,MAAa,iBAAiB;IAC5B,YAA6B,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;IAEvD;;;;;;OAMG;IACH,KAAK,CAAC,iCAAiC,CAAC,aAAqB;QAC3D,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,eAAe,EAAE,EAAE,CAAC;YACvC,MAAM,IAAI,2BAAmB,CAAC,wEAAwE,CAAC,CAAC;QAC1G,CAAC;QAED,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CACxC,kEAAkE,EAClE,EAAE,MAAM,EAAE,EAAE,aAAa,EAAE,EAAE,CAC9B,CAAC;YAEF,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;gBACzB,MAAM,YAAY,GAAG,QAAQ,CAAC,KAAK,IAAI,uDAAuD,CAAC;gBAC/F,MAAM,SAAS,GAAG,IAAA,8BAAgB,EAAC,QAAQ,CAAC,CAAC;gBAE7C,IAAI,SAAS,EAAE,CAAC;oBACd,MAAM,IAAI,0BAAkB,CAAC,YAAY,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;gBAClE,CAAC;qBAAM,CAAC;oBACN,MAAM,IAAI,uBAAe,CAAC,YAAY,EAAE,GAAG,EAAE,QAAQ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interface ThirdPartyStartAppResp {
|
|
|
10
10
|
agentLink: string | null;
|
|
11
11
|
eAppAgentLink: string | null;
|
|
12
12
|
applicantLink: string | null;
|
|
13
|
+
/** Whether the application was declined (GIGDB product) */
|
|
14
|
+
isDeclined: boolean;
|
|
15
|
+
/** Whether the quote changed during application (GIGDB product) */
|
|
16
|
+
isQuoteChanged: boolean;
|
|
13
17
|
}
|
|
14
18
|
//# sourceMappingURL=application.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.types.d.ts","sourceRoot":"","sources":["../../src/types/application.types.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,6BAA6B;IAC5C,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"application.types.d.ts","sourceRoot":"","sources":["../../src/types/application.types.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,6BAA6B;IAC5C,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,2DAA2D;IAC3D,UAAU,EAAE,OAAO,CAAC;IACpB,mEAAmE;IACnE,cAAc,EAAE,OAAO,CAAC;CACzB"}
|
package/dist/types/enums.d.ts
CHANGED
|
@@ -35,6 +35,28 @@ export declare enum APIErrorCode {
|
|
|
35
35
|
NotAvailableForState = "NotAvailableForState",
|
|
36
36
|
BenefitPeriodNotAvailable = "BenefitPeriodNotAvailable",
|
|
37
37
|
CoverageNotAvailable = "CoverageNotAvailable",
|
|
38
|
-
RiderFaceAmountNotValid = "RiderFaceAmountNotValid"
|
|
38
|
+
RiderFaceAmountNotValid = "RiderFaceAmountNotValid",
|
|
39
|
+
AgeNotFound = "AgeNotFound",
|
|
40
|
+
AgentLogout = "AgentLogout",
|
|
41
|
+
DataNotFound = "dataNotFound",
|
|
42
|
+
StateMismatchIdentified = "StateMismatchIdentified",
|
|
43
|
+
InvalidBirthCountry = "InvalidBirthCountry",
|
|
44
|
+
InvalidBirthState = "InvalidBirthState",
|
|
45
|
+
InvalidResidenceState = "InvalidResidenceState",
|
|
46
|
+
OneOfTheExistingCoveragesQuestionsNotFound = "OneOfTheExistingCoveragesQuestionsNotFound",
|
|
47
|
+
PaymentAlreadyMade = "PaymentAlreadyMade",
|
|
48
|
+
ErrorInSaveEftPaymentDetails = "ErrorInSaveEftPaymentDetails",
|
|
49
|
+
InvalidPaymentScheduledDate = "InvalidPaymentScheduledDate",
|
|
50
|
+
ThirdPartyQuoteError = "ThirdPartyQuoteError",
|
|
51
|
+
InvalidQuoteParameters = "InvalidQuoteParameters",
|
|
52
|
+
InvalidRequestFormat = "InvalidRequestFormat",
|
|
53
|
+
QuoteNotFound = "QuoteNotFound",
|
|
54
|
+
PaymentNotMade = "paymentNotMade",
|
|
55
|
+
SecureSignRelatedError = "SecureSignRelatedError",
|
|
56
|
+
SigningPackageNotCreated = "SigningPackageNotCreated",
|
|
57
|
+
SecureSignPinMismatch = "SecureSignPinMismatch",
|
|
58
|
+
PinExpired = "PinExpired",
|
|
59
|
+
DocumentsNotViewed = "DocumentsNotViewed",
|
|
60
|
+
DocumentsAlreadySigned = "DocumentsAlreadySigned"
|
|
39
61
|
}
|
|
40
62
|
//# sourceMappingURL=enums.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../src/types/enums.ts"],"names":[],"mappings":"AACA,oBAAY,MAAM;IAChB,IAAI,IAAI;IACR,MAAM,IAAI;CACX;AAGD,oBAAY,gBAAgB;IAC1B,MAAM,IAAI;IACV,OAAO,KAAK;CACb;AAGD,oBAAY,SAAS;IACnB,aAAa,mBAAmB;IAChC,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,aAAa,mBAAmB;CACjC;AAGD,oBAAY,WAAW;IACrB,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,OAAO,YAAY;CACpB;AAGD,oBAAY,SAAS;IACnB,QAAQ,cAAc;IACtB,mBAAmB,0BAA0B;CAC9C;AAGD,oBAAY,YAAY;IACtB,aAAa,kBAAkB;IAC/B,iBAAiB,sBAAsB;IACvC,iBAAiB,sBAAsB;IACvC,cAAc,mBAAmB;IACjC,gBAAgB,qBAAqB;IACrC,kBAAkB,uBAAuB;IACzC,eAAe,oBAAoB;IACnC,iBAAiB,sBAAsB;IACvC,kCAAkC,uCAAuC;IACzE,oBAAoB,yBAAyB;IAC7C,yBAAyB,8BAA8B;IACvD,oBAAoB,yBAAyB;IAC7C,uBAAuB,4BAA4B;
|
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../src/types/enums.ts"],"names":[],"mappings":"AACA,oBAAY,MAAM;IAChB,IAAI,IAAI;IACR,MAAM,IAAI;CACX;AAGD,oBAAY,gBAAgB;IAC1B,MAAM,IAAI;IACV,OAAO,KAAK;CACb;AAGD,oBAAY,SAAS;IACnB,aAAa,mBAAmB;IAChC,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,aAAa,mBAAmB;CACjC;AAGD,oBAAY,WAAW;IACrB,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,OAAO,YAAY;CACpB;AAGD,oBAAY,SAAS;IACnB,QAAQ,cAAc;IACtB,mBAAmB,0BAA0B;CAC9C;AAGD,oBAAY,YAAY;IACtB,aAAa,kBAAkB;IAC/B,iBAAiB,sBAAsB;IACvC,iBAAiB,sBAAsB;IACvC,cAAc,mBAAmB;IACjC,gBAAgB,qBAAqB;IACrC,kBAAkB,uBAAuB;IACzC,eAAe,oBAAoB;IACnC,iBAAiB,sBAAsB;IACvC,kCAAkC,uCAAuC;IACzE,oBAAoB,yBAAyB;IAC7C,yBAAyB,8BAA8B;IACvD,oBAAoB,yBAAyB;IAC7C,uBAAuB,4BAA4B;IAEnD,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,YAAY,iBAAiB;IAC7B,uBAAuB,4BAA4B;IACnD,mBAAmB,wBAAwB;IAC3C,iBAAiB,sBAAsB;IACvC,qBAAqB,0BAA0B;IAC/C,0CAA0C,+CAA+C;IACzF,kBAAkB,uBAAuB;IACzC,4BAA4B,iCAAiC;IAC7D,2BAA2B,gCAAgC;IAC3D,oBAAoB,yBAAyB;IAC7C,sBAAsB,2BAA2B;IACjD,oBAAoB,yBAAyB;IAC7C,aAAa,kBAAkB;IAE/B,cAAc,mBAAmB;IAEjC,sBAAsB,2BAA2B;IACjD,wBAAwB,6BAA6B;IACrD,qBAAqB,0BAA0B;IAC/C,UAAU,eAAe;IACzB,kBAAkB,uBAAuB;IACzC,sBAAsB,2BAA2B;CAClD"}
|
package/dist/types/enums.js
CHANGED
|
@@ -51,5 +51,30 @@ var APIErrorCode;
|
|
|
51
51
|
APIErrorCode["BenefitPeriodNotAvailable"] = "BenefitPeriodNotAvailable";
|
|
52
52
|
APIErrorCode["CoverageNotAvailable"] = "CoverageNotAvailable";
|
|
53
53
|
APIErrorCode["RiderFaceAmountNotValid"] = "RiderFaceAmountNotValid";
|
|
54
|
+
// GIGDB-specific error codes
|
|
55
|
+
APIErrorCode["AgeNotFound"] = "AgeNotFound";
|
|
56
|
+
APIErrorCode["AgentLogout"] = "AgentLogout";
|
|
57
|
+
APIErrorCode["DataNotFound"] = "dataNotFound";
|
|
58
|
+
APIErrorCode["StateMismatchIdentified"] = "StateMismatchIdentified";
|
|
59
|
+
APIErrorCode["InvalidBirthCountry"] = "InvalidBirthCountry";
|
|
60
|
+
APIErrorCode["InvalidBirthState"] = "InvalidBirthState";
|
|
61
|
+
APIErrorCode["InvalidResidenceState"] = "InvalidResidenceState";
|
|
62
|
+
APIErrorCode["OneOfTheExistingCoveragesQuestionsNotFound"] = "OneOfTheExistingCoveragesQuestionsNotFound";
|
|
63
|
+
APIErrorCode["PaymentAlreadyMade"] = "PaymentAlreadyMade";
|
|
64
|
+
APIErrorCode["ErrorInSaveEftPaymentDetails"] = "ErrorInSaveEftPaymentDetails";
|
|
65
|
+
APIErrorCode["InvalidPaymentScheduledDate"] = "InvalidPaymentScheduledDate";
|
|
66
|
+
APIErrorCode["ThirdPartyQuoteError"] = "ThirdPartyQuoteError";
|
|
67
|
+
APIErrorCode["InvalidQuoteParameters"] = "InvalidQuoteParameters";
|
|
68
|
+
APIErrorCode["InvalidRequestFormat"] = "InvalidRequestFormat";
|
|
69
|
+
APIErrorCode["QuoteNotFound"] = "QuoteNotFound";
|
|
70
|
+
// Final Submit error codes
|
|
71
|
+
APIErrorCode["PaymentNotMade"] = "paymentNotMade";
|
|
72
|
+
// Secure Sign error codes
|
|
73
|
+
APIErrorCode["SecureSignRelatedError"] = "SecureSignRelatedError";
|
|
74
|
+
APIErrorCode["SigningPackageNotCreated"] = "SigningPackageNotCreated";
|
|
75
|
+
APIErrorCode["SecureSignPinMismatch"] = "SecureSignPinMismatch";
|
|
76
|
+
APIErrorCode["PinExpired"] = "PinExpired";
|
|
77
|
+
APIErrorCode["DocumentsNotViewed"] = "DocumentsNotViewed";
|
|
78
|
+
APIErrorCode["DocumentsAlreadySigned"] = "DocumentsAlreadySigned";
|
|
54
79
|
})(APIErrorCode || (exports.APIErrorCode = APIErrorCode = {}));
|
|
55
80
|
//# sourceMappingURL=enums.js.map
|
package/dist/types/enums.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/types/enums.ts"],"names":[],"mappings":";;;AAAA,cAAc;AACd,IAAY,MAGX;AAHD,WAAY,MAAM;IAChB,mCAAQ,CAAA;IACR,uCAAU,CAAA;AACZ,CAAC,EAHW,MAAM,sBAAN,MAAM,QAGjB;AAED,yBAAyB;AACzB,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,2DAAU,CAAA;IACV,8DAAY,CAAA;AACd,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AAED,+CAA+C;AAC/C,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,6CAAgC,CAAA;IAChC,oCAAuB,CAAA;IACvB,kCAAqB,CAAA;IACrB,6CAAgC,CAAA;AAClC,CAAC,EALW,SAAS,yBAAT,SAAS,QAKpB;AAED,iDAAiD;AACjD,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,sCAAuB,CAAA;IACvB,8BAAe,CAAA;IACf,4BAAa,CAAA;IACb,kCAAmB,CAAA;AACrB,CAAC,EALW,WAAW,2BAAX,WAAW,QAKtB;AAED,mBAAmB;AACnB,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,mCAAsB,CAAA;IACtB,0DAA6C,CAAA;AAC/C,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AAED,uBAAuB;AACvB,IAAY,
|
|
1
|
+
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/types/enums.ts"],"names":[],"mappings":";;;AAAA,cAAc;AACd,IAAY,MAGX;AAHD,WAAY,MAAM;IAChB,mCAAQ,CAAA;IACR,uCAAU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D,CAAA;IAC3D,6DAA6C,CAAA;IAC7C,iEAAiD,CAAA;IACjD,6DAA6C,CAAA;IAC7C,+CAA+B,CAAA;IAC/B,2BAA2B;IAC3B,iDAAiC,CAAA;IACjC,0BAA0B;IAC1B,iEAAiD,CAAA;IACjD,qEAAqD,CAAA;IACrD,+DAA+C,CAAA;IAC/C,yCAAyB,CAAA;IACzB,yDAAyC,CAAA;IACzC,iEAAiD,CAAA;AACnD,CAAC,EAvCW,YAAY,4BAAZ,YAAY,QAuCvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/types/errors.ts"],"names":[],"mappings":"AACA,qBAAa,eAAgB,SAAQ,KAAK;IAG/B,UAAU,CAAC,EAAE,MAAM;IACnB,QAAQ,CAAC,EAAE,GAAG;IACd,SAAS,CAAC,EAAE,MAAM;gBAHzB,OAAO,EAAE,MAAM,EACR,UAAU,CAAC,EAAE,MAAM,YAAA,EACnB,QAAQ,CAAC,EAAE,GAAG,EACd,SAAS,CAAC,EAAE,MAAM,YAAA;CAK5B;AAED,qBAAa,mBAAoB,SAAQ,eAAe;gBAC1C,OAAO,GAAE,MAAgC;CAItD;AAED,qBAAa,eAAgB,SAAQ,eAAe;gBAEhD,OAAO,GAAE,MAA4B,EACrC,SAAS,CAAC,EAAE,MAAM;CAKrB;AAED;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,eAAe;IAG5C,SAAS,EAAE,MAAM;IACjB,QAAQ,CAAC,EAAE,GAAG;gBAFrB,OAAO,EAAE,MAAM,EACR,SAAS,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,GAAG;IAMvB;;OAEG;IACH,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAIvC;;OAEG;IACH,sBAAsB,IAAI,MAAM;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/types/errors.ts"],"names":[],"mappings":"AACA,qBAAa,eAAgB,SAAQ,KAAK;IAG/B,UAAU,CAAC,EAAE,MAAM;IACnB,QAAQ,CAAC,EAAE,GAAG;IACd,SAAS,CAAC,EAAE,MAAM;gBAHzB,OAAO,EAAE,MAAM,EACR,UAAU,CAAC,EAAE,MAAM,YAAA,EACnB,QAAQ,CAAC,EAAE,GAAG,EACd,SAAS,CAAC,EAAE,MAAM,YAAA;CAK5B;AAED,qBAAa,mBAAoB,SAAQ,eAAe;gBAC1C,OAAO,GAAE,MAAgC;CAItD;AAED,qBAAa,eAAgB,SAAQ,eAAe;gBAEhD,OAAO,GAAE,MAA4B,EACrC,SAAS,CAAC,EAAE,MAAM;CAKrB;AAED;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,eAAe;IAG5C,SAAS,EAAE,MAAM;IACjB,QAAQ,CAAC,EAAE,GAAG;gBAFrB,OAAO,EAAE,MAAM,EACR,SAAS,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,GAAG;IAMvB;;OAEG;IACH,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAIvC;;OAEG;IACH,sBAAsB,IAAI,MAAM;CA4CjC"}
|
package/dist/types/errors.js
CHANGED
|
@@ -60,7 +60,32 @@ class APIValidationError extends InstaBrainError {
|
|
|
60
60
|
'NotAvailableForState': 'Product is not available in the specified state.',
|
|
61
61
|
'BenefitPeriodNotAvailable': 'The requested benefit period is not available for the given conditions.',
|
|
62
62
|
'CoverageNotAvailable': 'The requested coverage amount is not available for the given conditions.',
|
|
63
|
-
'RiderFaceAmountNotValid': 'The rider coverage amount requested is not valid.'
|
|
63
|
+
'RiderFaceAmountNotValid': 'The rider coverage amount requested is not valid.',
|
|
64
|
+
// GIGDB-specific error messages
|
|
65
|
+
'AgeNotFound': 'The age provided is not valid for this product.',
|
|
66
|
+
'AgentLogout': 'Agent session has expired. Please re-authenticate.',
|
|
67
|
+
'dataNotFound': 'The requested data was not found.',
|
|
68
|
+
'StateMismatchIdentified': 'The state provided does not match the expected state.',
|
|
69
|
+
'InvalidBirthCountry': 'The birth country provided is not valid.',
|
|
70
|
+
'InvalidBirthState': 'The birth state provided is not valid.',
|
|
71
|
+
'InvalidResidenceState': 'The residence state provided is not valid.',
|
|
72
|
+
'OneOfTheExistingCoveragesQuestionsNotFound': 'One or more existing coverage questions were not answered.',
|
|
73
|
+
'PaymentAlreadyMade': 'Payment has already been made for this application.',
|
|
74
|
+
'ErrorInSaveEftPaymentDetails': 'Failed to save EFT payment details. Please verify account information.',
|
|
75
|
+
'InvalidPaymentScheduledDate': 'The scheduled payment date is not valid.',
|
|
76
|
+
'ThirdPartyQuoteError': 'An error occurred while generating the quote.',
|
|
77
|
+
'InvalidQuoteParameters': 'The quote parameters provided are not valid.',
|
|
78
|
+
'InvalidRequestFormat': 'The request format is invalid. Please check required fields.',
|
|
79
|
+
'QuoteNotFound': 'No previous quote found for this opportunity. Please create a quote first.',
|
|
80
|
+
// Final Submit error messages
|
|
81
|
+
'paymentNotMade': 'EFT payment must be completed before submitting the application.',
|
|
82
|
+
// Secure Sign error messages
|
|
83
|
+
'SecureSignRelatedError': 'A signing-related error occurred. Please try again.',
|
|
84
|
+
'SigningPackageNotCreated': 'No signing package exists for this application. Complete previous steps first.',
|
|
85
|
+
'SecureSignPinMismatch': 'The PIN entered is incorrect. Please try again.',
|
|
86
|
+
'PinExpired': 'The PIN has expired. Please request a new one.',
|
|
87
|
+
'DocumentsNotViewed': 'All documents must be viewed before verifying the PIN.',
|
|
88
|
+
'DocumentsAlreadySigned': 'The documents have already been signed for this application.'
|
|
64
89
|
};
|
|
65
90
|
return errorMessages[this.errorCode] || this.message;
|
|
66
91
|
}
|
package/dist/types/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/types/errors.ts"],"names":[],"mappings":";;;AAAA,cAAc;AACd,MAAa,eAAgB,SAAQ,KAAK;IACxC,YACE,OAAe,EACR,UAAmB,EACnB,QAAc,EACd,SAAkB;QAEzB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QAEF,OAAO,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC;IACvD,CAAC;CACF;AAhED,gDAgEC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { Gender, PaymentFrequency } from './enums';
|
|
2
|
+
export interface ThirdPartyGigdbQuoteRequest {
|
|
3
|
+
/** Face amount for GIGDB product ($5,000 - $25,000) */
|
|
4
|
+
faceAmount: number | null;
|
|
5
|
+
/** Gender of the insured */
|
|
6
|
+
gender: Gender;
|
|
7
|
+
/** US state code (2-character) */
|
|
8
|
+
stateCode: string | null;
|
|
9
|
+
/** Age of the insured (50-85) */
|
|
10
|
+
age: number | null;
|
|
11
|
+
/** Date of birth (ISO date string) */
|
|
12
|
+
dateOfBirth: string | null;
|
|
13
|
+
/** Payment frequency */
|
|
14
|
+
paymentFreq: PaymentFrequency;
|
|
15
|
+
/** First name (optional) */
|
|
16
|
+
firstName: string | null;
|
|
17
|
+
/** Last name (optional) */
|
|
18
|
+
lastName: string | null;
|
|
19
|
+
/** Email (optional) */
|
|
20
|
+
email: string | null;
|
|
21
|
+
/** Phone number (optional) */
|
|
22
|
+
phoneNum: string | null;
|
|
23
|
+
/** Whether the insured is a smoker */
|
|
24
|
+
isSmoker: boolean | null;
|
|
25
|
+
}
|
|
26
|
+
export interface ThirdPartyGigdbUpdateQuoteReq {
|
|
27
|
+
/** OpportunityId from Start Application response */
|
|
28
|
+
opportunityId: string;
|
|
29
|
+
/** New face amount ($5,000 - $25,000) */
|
|
30
|
+
faceAmount: number;
|
|
31
|
+
/** New payment frequency */
|
|
32
|
+
paymentFreq: PaymentFrequency;
|
|
33
|
+
}
|
|
34
|
+
export interface GigdbAddress {
|
|
35
|
+
addressLine1: string | null;
|
|
36
|
+
zipcode: string | null;
|
|
37
|
+
city: string | null;
|
|
38
|
+
state: string | null;
|
|
39
|
+
}
|
|
40
|
+
export interface GigdbBirthJurisdiction {
|
|
41
|
+
state: string | null;
|
|
42
|
+
country: string | null;
|
|
43
|
+
}
|
|
44
|
+
export interface GigdbNicotineInfo {
|
|
45
|
+
lastUseDate: string | null;
|
|
46
|
+
}
|
|
47
|
+
export interface GigdbExistingCoverageInfo {
|
|
48
|
+
nameOfTheCompany: string | null;
|
|
49
|
+
insuranceAmount: string | null;
|
|
50
|
+
dateOfIssue: string | null;
|
|
51
|
+
toBeReplaced: boolean | null;
|
|
52
|
+
toBeFinanced: boolean | null;
|
|
53
|
+
}
|
|
54
|
+
export interface GigdbExistingCoverageData {
|
|
55
|
+
existingCoverages: GigdbExistingCoverageInfo[] | null;
|
|
56
|
+
}
|
|
57
|
+
export interface GigdbBeneficiaryPerson {
|
|
58
|
+
firstName: string | null;
|
|
59
|
+
lastName: string | null;
|
|
60
|
+
relationship: string | null;
|
|
61
|
+
}
|
|
62
|
+
export interface GigdbNamedEntity {
|
|
63
|
+
name: string | null;
|
|
64
|
+
taxId: string | null;
|
|
65
|
+
trustDate: string | null;
|
|
66
|
+
}
|
|
67
|
+
export interface GigdbBeneficiaryDetails {
|
|
68
|
+
beneficiaryType: string | null;
|
|
69
|
+
beneficiaryPerson: GigdbBeneficiaryPerson | null;
|
|
70
|
+
namedEntity: GigdbNamedEntity | null;
|
|
71
|
+
}
|
|
72
|
+
export interface ThirdPartyGigdbAppReq {
|
|
73
|
+
quoteResponseId: string;
|
|
74
|
+
firstName: string | null;
|
|
75
|
+
lastName: string | null;
|
|
76
|
+
email: string | null;
|
|
77
|
+
phoneNumber: string | null;
|
|
78
|
+
isUsCitizen: boolean | null;
|
|
79
|
+
isPayerAlsoOwnerAndInsured: boolean | null;
|
|
80
|
+
address: GigdbAddress;
|
|
81
|
+
dateOfBirth: string | null;
|
|
82
|
+
socialSecurityNumber: string | null;
|
|
83
|
+
hasExistingCoverage: boolean | null;
|
|
84
|
+
willOtherCoverageBeReplacedOrFinanced: boolean | null;
|
|
85
|
+
existingCoverageData: GigdbExistingCoverageData | null;
|
|
86
|
+
beneficiaryDetails: GigdbBeneficiaryDetails;
|
|
87
|
+
isSmoker: boolean | null;
|
|
88
|
+
isLegalUsResident: boolean | null;
|
|
89
|
+
birthJurisdiction: GigdbBirthJurisdiction;
|
|
90
|
+
nicotineInfo: GigdbNicotineInfo | null;
|
|
91
|
+
}
|
|
92
|
+
export interface ThirdPartyEftPaymentReq {
|
|
93
|
+
opportunityId: string;
|
|
94
|
+
accountHolderName: string | null;
|
|
95
|
+
routingNumber: string | null;
|
|
96
|
+
accountNumber: string | null;
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=gigdb.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gigdb.types.d.ts","sourceRoot":"","sources":["../../src/types/gigdb.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAGnD,MAAM,WAAW,2BAA2B;IAC1C,uDAAuD;IACvD,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,4BAA4B;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,iCAAiC;IACjC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,sCAAsC;IACtC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,wBAAwB;IACxB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,4BAA4B;IAC5B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,uBAAuB;IACvB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,8BAA8B;IAC9B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,sCAAsC;IACtC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;CAC1B;AAGD,MAAM,WAAW,6BAA6B;IAC5C,oDAAoD;IACpD,a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@@ export * from './reports.types';
|
|
|
5
5
|
export * from './enums';
|
|
6
6
|
export * from './errors';
|
|
7
7
|
export * from './constants';
|
|
8
|
+
export * from './gigdb.types';
|
|
9
|
+
export * from './secure-sign.types';
|
|
8
10
|
/**
|
|
9
11
|
* Base configuration for the InstaBrain SDK
|
|
10
12
|
*/
|
|
@@ -27,6 +29,7 @@ export interface BaseResponse<T> {
|
|
|
27
29
|
flagStatus: boolean;
|
|
28
30
|
value: T;
|
|
29
31
|
error: string | null;
|
|
32
|
+
errorCode?: string;
|
|
30
33
|
}
|
|
31
34
|
export interface AgentPortalReq {
|
|
32
35
|
startDate?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AAEpC;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,SAAS,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,CAAC,CAAC;IACT,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAGD,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B"}
|
package/dist/types/index.js
CHANGED
|
@@ -22,4 +22,6 @@ __exportStar(require("./reports.types"), exports);
|
|
|
22
22
|
__exportStar(require("./enums"), exports);
|
|
23
23
|
__exportStar(require("./errors"), exports);
|
|
24
24
|
__exportStar(require("./constants"), exports);
|
|
25
|
+
__exportStar(require("./gigdb.types"), exports);
|
|
26
|
+
__exportStar(require("./secure-sign.types"), exports);
|
|
25
27
|
//# sourceMappingURL=index.js.map
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA4D;AAC5D,+CAA6B;AAC7B,gDAA8B;AAC9B,sDAAoC;AACpC,kDAAgC;AAChC,0CAAwB;AACxB,2CAAyB;AACzB,8CAA4B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA4D;AAC5D,+CAA6B;AAC7B,gDAA8B;AAC9B,sDAAoC;AACpC,kDAAgC;AAChC,0CAAwB;AACxB,2CAAyB;AACzB,8CAA4B;AAC5B,gDAA8B;AAC9B,sDAAoC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request to send a verification PIN and get the documents link
|
|
3
|
+
*/
|
|
4
|
+
export interface ThirdPartySendPinReq {
|
|
5
|
+
/** The OpportunityId from the Start Application response */
|
|
6
|
+
opportunityId: string;
|
|
7
|
+
/** Set true to deliver the PIN via SMS. At least one of flagSendSms or flagSendEmail must be true */
|
|
8
|
+
flagSendSms: boolean;
|
|
9
|
+
/** Set true to deliver the PIN via Email. At least one of flagSendSms or flagSendEmail must be true */
|
|
10
|
+
flagSendEmail: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Request to resend the verification PIN
|
|
14
|
+
*/
|
|
15
|
+
export interface ThirdPartyResendPinReq {
|
|
16
|
+
/** The OpportunityId from the Start Application response */
|
|
17
|
+
opportunityId: string;
|
|
18
|
+
/** Set true to resend via SMS. At least one delivery flag must be true */
|
|
19
|
+
flagSendSms: boolean;
|
|
20
|
+
/** Set true to resend via Email. At least one delivery flag must be true */
|
|
21
|
+
flagSendEmail: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Request to verify the PIN entered by the signer
|
|
25
|
+
*/
|
|
26
|
+
export interface ThirdPartyVerifyPinReq {
|
|
27
|
+
/** The OpportunityId from the Start Application response */
|
|
28
|
+
opportunityId: string;
|
|
29
|
+
/** The PIN entered by the signer */
|
|
30
|
+
pin: string;
|
|
31
|
+
/** Confirms the agent has read the disclosure script aloud to the proposed insured */
|
|
32
|
+
isScriptReadConfirmed: boolean;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Response from preparing documents and checking delivery channels
|
|
36
|
+
*/
|
|
37
|
+
export interface ThirdPartyPrepareDocsResp {
|
|
38
|
+
/** Whether all documents are already signed. If true, skip the PIN flow and proceed to Final Submit */
|
|
39
|
+
isSignCompleted: boolean;
|
|
40
|
+
/** Whether the SMS delivery channel is available for this opportunity */
|
|
41
|
+
isSmsAvailable: boolean;
|
|
42
|
+
/** Whether the Email delivery channel is available for this opportunity */
|
|
43
|
+
isEmailAvailable: boolean;
|
|
44
|
+
/** Name of the product associated with the application */
|
|
45
|
+
productName: string | null;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Response from sending PIN — includes documents link and disclosure script
|
|
49
|
+
*/
|
|
50
|
+
export interface ThirdPartySendPinResp {
|
|
51
|
+
/** URL for the signer to review and sign the documents */
|
|
52
|
+
link: string | null;
|
|
53
|
+
/** Header displayed above the disclosure bullet points */
|
|
54
|
+
scriptHeader: string | null;
|
|
55
|
+
/** Fixed disclosure bullet points to be read aloud to the proposed insured before signing */
|
|
56
|
+
script: string[] | null;
|
|
57
|
+
/** Consent statement including the applicant's first and last name */
|
|
58
|
+
consentMessage: string | null;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Response from resending PIN
|
|
62
|
+
*/
|
|
63
|
+
export interface ThirdPartyResendPinResp {
|
|
64
|
+
/** true when the PIN has been resent successfully */
|
|
65
|
+
flagPinSent: boolean;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Response from verifying PIN
|
|
69
|
+
*/
|
|
70
|
+
export interface ThirdPartyVerifyPinResp {
|
|
71
|
+
/** true when the PIN matched and documents are now signed */
|
|
72
|
+
isVerified: boolean;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Response from final application submit
|
|
76
|
+
* Note: policyNumber may be null if the carrier has not yet issued a number (pending decision) — this is NOT an error
|
|
77
|
+
*/
|
|
78
|
+
export interface ThirdPartyFinalSubmitResp {
|
|
79
|
+
/** The policy number issued by the carrier. May be null if pending carrier decision */
|
|
80
|
+
policyNumber: string | null;
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=secure-sign.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secure-sign.types.d.ts","sourceRoot":"","sources":["../../src/types/secure-sign.types.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,4DAA4D;IAC5D,aAAa,EAAE,MAAM,CAAC;IACtB,qGAAqG;IACrG,WAAW,EAAE,OAAO,CAAC;IACrB,uGAAuG;IACvG,aAAa,EAAE,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,4DAA4D;IAC5D,aAAa,EAAE,MAAM,CAAC;IACtB,0EAA0E;IAC1E,WAAW,EAAE,OAAO,CAAC;IACrB,4EAA4E;IAC5E,aAAa,EAAE,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,4DAA4D;IAC5D,aAAa,EAAE,MAAM,CAAC;IACtB,oCAAoC;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,sFAAsF;IACtF,qBAAqB,EAAE,OAAO,CAAC;CAChC;AAID;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,uGAAuG;IACvG,eAAe,EAAE,OAAO,CAAC;IACzB,yEAAyE;IACzE,cAAc,EAAE,OAAO,CAAC;IACxB,2EAA2E;IAC3E,gBAAgB,EAAE,OAAO,CAAC;IAC1B,0DAA0D;IAC1D,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,0DAA0D;IAC1D,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,0DAA0D;IAC1D,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,6FAA6F;IAC7F,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACxB,sEAAsE;IACtE,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,qDAAqD;IACrD,WAAW,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,6DAA6D;IAC7D,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,uFAAuF;IACvF,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secure-sign.types.js","sourceRoot":"","sources":["../../src/types/secure-sign.types.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,mDAAmD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extract an error code from an API response.
|
|
3
|
+
*
|
|
4
|
+
* 1. Checks `response.errorCode` first (structured field).
|
|
5
|
+
* 2. Falls back to scanning `response.error` string for known error code substrings.
|
|
6
|
+
*
|
|
7
|
+
* @returns The error code string if found, `null` otherwise.
|
|
8
|
+
*/
|
|
9
|
+
export declare function extractErrorCode(response: {
|
|
10
|
+
errorCode?: string;
|
|
11
|
+
error?: string | null;
|
|
12
|
+
}): string | null;
|
|
13
|
+
//# sourceMappingURL=error-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-utils.d.ts","sourceRoot":"","sources":["../../src/utils/error-utils.ts"],"names":[],"mappings":"AAQA;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GACtD,MAAM,GAAG,IAAI,CAcf"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.extractErrorCode = extractErrorCode;
|
|
4
|
+
const enums_1 = require("../types/enums");
|
|
5
|
+
/**
|
|
6
|
+
* All known API error codes — derived from the APIErrorCode enum so it
|
|
7
|
+
* auto-updates whenever new codes are added.
|
|
8
|
+
*/
|
|
9
|
+
const ALL_KNOWN_ERROR_CODES = Object.values(enums_1.APIErrorCode);
|
|
10
|
+
/**
|
|
11
|
+
* Extract an error code from an API response.
|
|
12
|
+
*
|
|
13
|
+
* 1. Checks `response.errorCode` first (structured field).
|
|
14
|
+
* 2. Falls back to scanning `response.error` string for known error code substrings.
|
|
15
|
+
*
|
|
16
|
+
* @returns The error code string if found, `null` otherwise.
|
|
17
|
+
*/
|
|
18
|
+
function extractErrorCode(response) {
|
|
19
|
+
if (response.errorCode) {
|
|
20
|
+
return response.errorCode;
|
|
21
|
+
}
|
|
22
|
+
if (response.error && typeof response.error === 'string') {
|
|
23
|
+
for (const code of ALL_KNOWN_ERROR_CODES) {
|
|
24
|
+
if (response.error.includes(code)) {
|
|
25
|
+
return code;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=error-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-utils.js","sourceRoot":"","sources":["../../src/utils/error-utils.ts"],"names":[],"mappings":";;AAgBA,4CAgBC;AAhCD,0CAA8C;AAE9C;;;GAGG;AACH,MAAM,qBAAqB,GAAa,MAAM,CAAC,MAAM,CAAC,oBAAY,CAAC,CAAC;AAEpE;;;;;;;GAOG;AACH,SAAgB,gBAAgB,CAC9B,QAAuD;IAEvD,IAAI,QAAQ,CAAC,SAAS,EAAE,CAAC;QACvB,OAAO,QAAQ,CAAC,SAAS,CAAC;IAC5B,CAAC;IAED,IAAI,QAAQ,CAAC,KAAK,IAAI,OAAO,QAAQ,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;QACzD,KAAK,MAAM,IAAI,IAAI,qBAAqB,EAAE,CAAC;YACzC,IAAI,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;gBAClC,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|