@instabrain-sdks/api-client 1.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 +318 -0
- package/dist/client/instabrain-client.d.ts +83 -0
- package/dist/client/instabrain-client.d.ts.map +1 -0
- package/dist/client/instabrain-client.js +117 -0
- package/dist/client/instabrain-client.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +36 -0
- package/dist/index.js.map +1 -0
- package/dist/services/application.service.d.ts +16 -0
- package/dist/services/application.service.d.ts.map +1 -0
- package/dist/services/application.service.js +42 -0
- package/dist/services/application.service.js.map +1 -0
- package/dist/services/auth.service.d.ts +35 -0
- package/dist/services/auth.service.d.ts.map +1 -0
- package/dist/services/auth.service.js +74 -0
- package/dist/services/auth.service.js.map +1 -0
- package/dist/services/quote.service.d.ts +32 -0
- package/dist/services/quote.service.d.ts.map +1 -0
- package/dist/services/quote.service.js +93 -0
- package/dist/services/quote.service.js.map +1 -0
- package/dist/services/reports.service.d.ts +64 -0
- package/dist/services/reports.service.d.ts.map +1 -0
- package/dist/services/reports.service.js +184 -0
- package/dist/services/reports.service.js.map +1 -0
- package/dist/types/application.types.d.ts +14 -0
- package/dist/types/application.types.d.ts.map +1 -0
- package/dist/types/application.types.js +3 -0
- package/dist/types/application.types.js.map +1 -0
- package/dist/types/auth.types.d.ts +8 -0
- package/dist/types/auth.types.d.ts.map +1 -0
- package/dist/types/auth.types.js +3 -0
- package/dist/types/auth.types.js.map +1 -0
- package/dist/types/constants.d.ts +66 -0
- package/dist/types/constants.d.ts.map +1 -0
- package/dist/types/constants.js +55 -0
- package/dist/types/constants.js.map +1 -0
- package/dist/types/enums.d.ts +40 -0
- package/dist/types/enums.d.ts.map +1 -0
- package/dist/types/enums.js +55 -0
- package/dist/types/enums.js.map +1 -0
- package/dist/types/errors.d.ts +30 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/errors.js +69 -0
- package/dist/types/errors.js.map +1 -0
- package/dist/types/index.d.ts +43 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +25 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/quote.types.d.ts +187 -0
- package/dist/types/quote.types.d.ts.map +1 -0
- package/dist/types/quote.types.js +3 -0
- package/dist/types/quote.types.js.map +1 -0
- package/dist/types/reports.types.d.ts +194 -0
- package/dist/types/reports.types.d.ts.map +1 -0
- package/dist/types/reports.types.js +22 -0
- package/dist/types/reports.types.js.map +1 -0
- package/dist/utils/http-client.d.ts +62 -0
- package/dist/utils/http-client.d.ts.map +1 -0
- package/dist/utils/http-client.js +176 -0
- package/dist/utils/http-client.js.map +1 -0
- package/package.json +51 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* State and Rider Availability Reference
|
|
4
|
+
* This information is provided for developer reference only.
|
|
5
|
+
* All validation is handled by the API.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.BENEFIT_PERIOD_AVAILABILITY = exports.FACE_AMOUNT_LIMITS_BY_AGE = exports.AGE_LIMITS = exports.RIDER_LIMITS = exports.NO_RIDERS_AVAILABLE_STATES = exports.CHILD_RIDER_UNAVAILABLE_STATES = exports.CHILD_RIDER_AVAILABLE_STATES = exports.ADB_RIDER_AVAILABLE_STATES = exports.UNAVAILABLE_STATES = void 0;
|
|
9
|
+
/** States where the product is not available */
|
|
10
|
+
exports.UNAVAILABLE_STATES = ['WY', 'NY'];
|
|
11
|
+
/** States where ADB Rider is available */
|
|
12
|
+
exports.ADB_RIDER_AVAILABLE_STATES = [
|
|
13
|
+
'AL', 'AK', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DC', 'DE', 'FL', 'GA', 'HI', 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NC', 'ND', 'OH', 'OK', 'OR', 'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VA', 'WV', 'WI'
|
|
14
|
+
];
|
|
15
|
+
/** States where Child Rider is available */
|
|
16
|
+
exports.CHILD_RIDER_AVAILABLE_STATES = [
|
|
17
|
+
'AL', 'AK', 'AZ', 'AR', 'CO', 'CT', 'DC', 'DE', 'GA', 'HI', 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NC', 'OH', 'OK', 'OR', 'PA', 'RI', 'SC', 'TN', 'TX', 'UT', 'VA', 'WV', 'WI'
|
|
18
|
+
];
|
|
19
|
+
/** States where Child Rider is NOT available */
|
|
20
|
+
exports.CHILD_RIDER_UNAVAILABLE_STATES = ['CA', 'FL', 'ME', 'ND', 'SD', 'VT', 'WA'];
|
|
21
|
+
/** States where NO riders are available */
|
|
22
|
+
exports.NO_RIDERS_AVAILABLE_STATES = ['WA'];
|
|
23
|
+
/** Coverage limits for riders */
|
|
24
|
+
exports.RIDER_LIMITS = {
|
|
25
|
+
ADB_RIDER: {
|
|
26
|
+
MIN: 25000,
|
|
27
|
+
MAX: 250000
|
|
28
|
+
},
|
|
29
|
+
DEPENDENT_CHILD_RIDER: {
|
|
30
|
+
MIN: 5000,
|
|
31
|
+
MAX: 25000
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
/** Age limits for the product */
|
|
35
|
+
exports.AGE_LIMITS = {
|
|
36
|
+
MIN: 18,
|
|
37
|
+
MAX: 60
|
|
38
|
+
};
|
|
39
|
+
/** Face amount limits by age */
|
|
40
|
+
exports.FACE_AMOUNT_LIMITS_BY_AGE = {
|
|
41
|
+
UP_TO_55: { MIN: 50000, MAX: 1000000 },
|
|
42
|
+
AGE_56: { MIN: 50000, MAX: 900000 },
|
|
43
|
+
AGE_57: { MIN: 50000, MAX: 800000 },
|
|
44
|
+
AGE_58: { MIN: 50000, MAX: 700000 },
|
|
45
|
+
AGE_59: { MIN: 50000, MAX: 600000 },
|
|
46
|
+
AGE_60: { MIN: 50000, MAX: 500000 }
|
|
47
|
+
};
|
|
48
|
+
/** Benefit period availability by age and tobacco use */
|
|
49
|
+
exports.BENEFIT_PERIOD_AVAILABILITY = {
|
|
50
|
+
UP_TO_45: [10, 20, 30],
|
|
51
|
+
AGE_45_50_NON_TOBACCO: [10, 20, 30],
|
|
52
|
+
AGE_45_50_TOBACCO: [10, 20],
|
|
53
|
+
AGE_51_60: [10, 20]
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/types/constants.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,gDAAgD;AACnC,QAAA,kBAAkB,GAAG,CAAC,IAAI,EAAE,IAAI,CAAU,CAAC;AAExD,0CAA0C;AAC7B,QAAA,0BAA0B,GAAG;IACxC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAA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AG,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE;IACnC,MAAM,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE;IACnC,MAAM,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE;IACnC,MAAM,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE;IACnC,MAAM,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE;CAC3B,CAAC;AAEX,yDAAyD;AAC5C,QAAA,2BAA2B,GAAG;IACzC,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;IACtB,qBAAqB,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;IACnC,iBAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;IAC3B,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;CACX,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare enum Gender {
|
|
2
|
+
Male = 1,
|
|
3
|
+
Female = 2
|
|
4
|
+
}
|
|
5
|
+
export declare enum PaymentFrequency {
|
|
6
|
+
Annual = 1,
|
|
7
|
+
Monthly = 12
|
|
8
|
+
}
|
|
9
|
+
export declare enum RateClass {
|
|
10
|
+
PreferredPlus = "Preferred Plus",
|
|
11
|
+
Preferred = "Preferred",
|
|
12
|
+
Standard = "Standard",
|
|
13
|
+
StandardExtra = "Standard Extra"
|
|
14
|
+
}
|
|
15
|
+
export declare enum HealthClass {
|
|
16
|
+
Excellent = "Excellent",
|
|
17
|
+
Great = "Great",
|
|
18
|
+
Good = "Good",
|
|
19
|
+
Average = "Average"
|
|
20
|
+
}
|
|
21
|
+
export declare enum RiderType {
|
|
22
|
+
ADBRider = "ADB Rider",
|
|
23
|
+
DependentChildRider = "Dependent Child Rider"
|
|
24
|
+
}
|
|
25
|
+
export declare enum APIErrorCode {
|
|
26
|
+
StateNotFound = "stateNotFound",
|
|
27
|
+
RateClassNotFound = "RateClassNotFound",
|
|
28
|
+
RiderNotAvailable = "RiderNotAvailable",
|
|
29
|
+
HeightNotValid = "HeightNotValid",
|
|
30
|
+
InvalidRateclass = "InvalidRateclass",
|
|
31
|
+
InvalidHealthClass = "InvalidHealthClass",
|
|
32
|
+
ZipCodeNotFound = "ZipCodeNotFound",
|
|
33
|
+
OutsideBuildChart = "outsideBuildChart",
|
|
34
|
+
QuoteNotEligibleForGivenConditions = "QuoteNotEligibleForGivenConditions",
|
|
35
|
+
NotAvailableForState = "NotAvailableForState",
|
|
36
|
+
BenefitPeriodNotAvailable = "BenefitPeriodNotAvailable",
|
|
37
|
+
CoverageNotAvailable = "CoverageNotAvailable",
|
|
38
|
+
RiderFaceAmountNotValid = "RiderFaceAmountNotValid"
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=enums.d.ts.map
|
|
@@ -0,0 +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;CACpD"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.APIErrorCode = exports.RiderType = exports.HealthClass = exports.RateClass = exports.PaymentFrequency = exports.Gender = void 0;
|
|
4
|
+
// Gender enum
|
|
5
|
+
var Gender;
|
|
6
|
+
(function (Gender) {
|
|
7
|
+
Gender[Gender["Male"] = 1] = "Male";
|
|
8
|
+
Gender[Gender["Female"] = 2] = "Female";
|
|
9
|
+
})(Gender || (exports.Gender = Gender = {}));
|
|
10
|
+
// Payment frequency enum
|
|
11
|
+
var PaymentFrequency;
|
|
12
|
+
(function (PaymentFrequency) {
|
|
13
|
+
PaymentFrequency[PaymentFrequency["Annual"] = 1] = "Annual";
|
|
14
|
+
PaymentFrequency[PaymentFrequency["Monthly"] = 12] = "Monthly";
|
|
15
|
+
})(PaymentFrequency || (exports.PaymentFrequency = PaymentFrequency = {}));
|
|
16
|
+
// Rate class enum - matches API values exactly
|
|
17
|
+
var RateClass;
|
|
18
|
+
(function (RateClass) {
|
|
19
|
+
RateClass["PreferredPlus"] = "Preferred Plus";
|
|
20
|
+
RateClass["Preferred"] = "Preferred";
|
|
21
|
+
RateClass["Standard"] = "Standard";
|
|
22
|
+
RateClass["StandardExtra"] = "Standard Extra";
|
|
23
|
+
})(RateClass || (exports.RateClass = RateClass = {}));
|
|
24
|
+
// Health class enum - matches API values exactly
|
|
25
|
+
var HealthClass;
|
|
26
|
+
(function (HealthClass) {
|
|
27
|
+
HealthClass["Excellent"] = "Excellent";
|
|
28
|
+
HealthClass["Great"] = "Great";
|
|
29
|
+
HealthClass["Good"] = "Good";
|
|
30
|
+
HealthClass["Average"] = "Average";
|
|
31
|
+
})(HealthClass || (exports.HealthClass = HealthClass = {}));
|
|
32
|
+
// Rider types enum
|
|
33
|
+
var RiderType;
|
|
34
|
+
(function (RiderType) {
|
|
35
|
+
RiderType["ADBRider"] = "ADB Rider";
|
|
36
|
+
RiderType["DependentChildRider"] = "Dependent Child Rider";
|
|
37
|
+
})(RiderType || (exports.RiderType = RiderType = {}));
|
|
38
|
+
// API Error codes enum
|
|
39
|
+
var APIErrorCode;
|
|
40
|
+
(function (APIErrorCode) {
|
|
41
|
+
APIErrorCode["StateNotFound"] = "stateNotFound";
|
|
42
|
+
APIErrorCode["RateClassNotFound"] = "RateClassNotFound";
|
|
43
|
+
APIErrorCode["RiderNotAvailable"] = "RiderNotAvailable";
|
|
44
|
+
APIErrorCode["HeightNotValid"] = "HeightNotValid";
|
|
45
|
+
APIErrorCode["InvalidRateclass"] = "InvalidRateclass";
|
|
46
|
+
APIErrorCode["InvalidHealthClass"] = "InvalidHealthClass";
|
|
47
|
+
APIErrorCode["ZipCodeNotFound"] = "ZipCodeNotFound";
|
|
48
|
+
APIErrorCode["OutsideBuildChart"] = "outsideBuildChart";
|
|
49
|
+
APIErrorCode["QuoteNotEligibleForGivenConditions"] = "QuoteNotEligibleForGivenConditions";
|
|
50
|
+
APIErrorCode["NotAvailableForState"] = "NotAvailableForState";
|
|
51
|
+
APIErrorCode["BenefitPeriodNotAvailable"] = "BenefitPeriodNotAvailable";
|
|
52
|
+
APIErrorCode["CoverageNotAvailable"] = "CoverageNotAvailable";
|
|
53
|
+
APIErrorCode["RiderFaceAmountNotValid"] = "RiderFaceAmountNotValid";
|
|
54
|
+
})(APIErrorCode || (exports.APIErrorCode = APIErrorCode = {}));
|
|
55
|
+
//# sourceMappingURL=enums.js.map
|
|
@@ -0,0 +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,YAcX;AAdD,WAAY,YAAY;IACtB,+CAA+B,CAAA;IAC/B,uDAAuC,CAAA;IACvC,uDAAuC,CAAA;IACvC,iDAAiC,CAAA;IACjC,qDAAqC,CAAA;IACrC,yDAAyC,CAAA;IACzC,mDAAmC,CAAA;IACnC,uDAAuC,CAAA;IACvC,yFAAyE,CAAA;IACzE,6DAA6C,CAAA;IAC7C,uEAAuD,CAAA;IACvD,6DAA6C,CAAA;IAC7C,mEAAmD,CAAA;AACrD,CAAC,EAdW,YAAY,4BAAZ,YAAY,QAcvB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare class InstaBrainError extends Error {
|
|
2
|
+
statusCode?: number | undefined;
|
|
3
|
+
response?: any;
|
|
4
|
+
errorCode?: string | undefined;
|
|
5
|
+
constructor(message: string, statusCode?: number | undefined, response?: any, errorCode?: string | undefined);
|
|
6
|
+
}
|
|
7
|
+
export declare class AuthenticationError extends InstaBrainError {
|
|
8
|
+
constructor(message?: string);
|
|
9
|
+
}
|
|
10
|
+
export declare class ValidationError extends InstaBrainError {
|
|
11
|
+
constructor(message?: string, errorCode?: string);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* API-specific error for when flagStatus is false
|
|
15
|
+
* Contains detailed error information from the InstaBrain API
|
|
16
|
+
*/
|
|
17
|
+
export declare class APIValidationError extends InstaBrainError {
|
|
18
|
+
errorCode: string;
|
|
19
|
+
response?: any;
|
|
20
|
+
constructor(message: string, errorCode: string, response?: any);
|
|
21
|
+
/**
|
|
22
|
+
* Check if this is a specific type of API error
|
|
23
|
+
*/
|
|
24
|
+
isErrorType(errorCode: string): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Get user-friendly error message based on error code
|
|
27
|
+
*/
|
|
28
|
+
getUserFriendlyMessage(): string;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +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;CAmBjC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.APIValidationError = exports.ValidationError = exports.AuthenticationError = exports.InstaBrainError = void 0;
|
|
4
|
+
// Error Types
|
|
5
|
+
class InstaBrainError extends Error {
|
|
6
|
+
constructor(message, statusCode, response, errorCode) {
|
|
7
|
+
super(message);
|
|
8
|
+
this.statusCode = statusCode;
|
|
9
|
+
this.response = response;
|
|
10
|
+
this.errorCode = errorCode;
|
|
11
|
+
this.name = 'InstaBrainError';
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.InstaBrainError = InstaBrainError;
|
|
15
|
+
class AuthenticationError extends InstaBrainError {
|
|
16
|
+
constructor(message = 'Authentication failed') {
|
|
17
|
+
super(message, 401);
|
|
18
|
+
this.name = 'AuthenticationError';
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.AuthenticationError = AuthenticationError;
|
|
22
|
+
class ValidationError extends InstaBrainError {
|
|
23
|
+
constructor(message = 'Validation failed', errorCode) {
|
|
24
|
+
super(message, 400, null, errorCode);
|
|
25
|
+
this.name = 'ValidationError';
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.ValidationError = ValidationError;
|
|
29
|
+
/**
|
|
30
|
+
* API-specific error for when flagStatus is false
|
|
31
|
+
* Contains detailed error information from the InstaBrain API
|
|
32
|
+
*/
|
|
33
|
+
class APIValidationError extends InstaBrainError {
|
|
34
|
+
constructor(message, errorCode, response) {
|
|
35
|
+
super(message, 400, response, errorCode);
|
|
36
|
+
this.errorCode = errorCode;
|
|
37
|
+
this.response = response;
|
|
38
|
+
this.name = 'APIValidationError';
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Check if this is a specific type of API error
|
|
42
|
+
*/
|
|
43
|
+
isErrorType(errorCode) {
|
|
44
|
+
return this.errorCode === errorCode;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Get user-friendly error message based on error code
|
|
48
|
+
*/
|
|
49
|
+
getUserFriendlyMessage() {
|
|
50
|
+
const errorMessages = {
|
|
51
|
+
'stateNotFound': 'The state code provided is not recognized by the system.',
|
|
52
|
+
'RateClassNotFound': 'Rate class, health class, or height/weight information is required.',
|
|
53
|
+
'RiderNotAvailable': 'The requested rider is not available in this state or for this age.',
|
|
54
|
+
'HeightNotValid': 'The height provided is not valid.',
|
|
55
|
+
'InvalidRateclass': 'The rate class provided is not recognized by the system.',
|
|
56
|
+
'InvalidHealthClass': 'The health class provided is not recognized by the system.',
|
|
57
|
+
'ZipCodeNotFound': 'The zip code provided is not recognized by the system.',
|
|
58
|
+
'outsideBuildChart': 'The height and weight combination is not eligible for this product.',
|
|
59
|
+
'QuoteNotEligibleForGivenConditions': 'Product is not available for the given combination of state, age, or tobacco usage.',
|
|
60
|
+
'NotAvailableForState': 'Product is not available in the specified state.',
|
|
61
|
+
'BenefitPeriodNotAvailable': 'The requested benefit period is not available for the given conditions.',
|
|
62
|
+
'CoverageNotAvailable': 'The requested coverage amount is not available for the given conditions.',
|
|
63
|
+
'RiderFaceAmountNotValid': 'The rider coverage amount requested is not valid.'
|
|
64
|
+
};
|
|
65
|
+
return errorMessages[this.errorCode] || this.message;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.APIValidationError = APIValidationError;
|
|
69
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/types/errors.ts"],"names":[],"mappings":";;;AAAA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E,mCAAmC;YACrD,kBAAkB,EAAE,0DAA0D;YAC9E,oBAAoB,EAAE,4DAA4D;YAClF,iBAAiB,EAAE,wDAAwD;YAC3E,mBAAmB,EAAE,qEAAqE;YAC1F,oCAAoC,EAAE,qFAAqF;YAC3H,sBAAsB,EAAE,kDAAkD;YAC1E,2BAA2B,EAAE,yEAAyE;YACtG,sBAAsB,EAAE,0EAA0E;YAClG,yBAAyB,EAAE,mDAAmD;SAC/E,CAAC;QAEF,OAAO,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC;IACvD,CAAC;CACF;AAvCD,gDAuCC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export * from './auth.types';
|
|
2
|
+
export * from './quote.types';
|
|
3
|
+
export * from './application.types';
|
|
4
|
+
export * from './reports.types';
|
|
5
|
+
export * from './enums';
|
|
6
|
+
export * from './errors';
|
|
7
|
+
export * from './constants';
|
|
8
|
+
/**
|
|
9
|
+
* Base configuration for the InstaBrain SDK
|
|
10
|
+
*/
|
|
11
|
+
export interface InstaBrainConfig {
|
|
12
|
+
/** Base URL for the API (e.g., 'https://api.instabrain.io' for production) */
|
|
13
|
+
baseUrl?: string;
|
|
14
|
+
/** Request timeout in milliseconds */
|
|
15
|
+
timeout?: number;
|
|
16
|
+
/** Additional headers to send with requests */
|
|
17
|
+
headers?: Record<string, string>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Environment type for different API endpoints
|
|
21
|
+
*/
|
|
22
|
+
export type Environment = 'production' | 'sandbox';
|
|
23
|
+
/**
|
|
24
|
+
* Base response structure for all API responses
|
|
25
|
+
*/
|
|
26
|
+
export interface BaseResponse<T> {
|
|
27
|
+
flagStatus: boolean;
|
|
28
|
+
value: T;
|
|
29
|
+
error: string | null;
|
|
30
|
+
}
|
|
31
|
+
export interface AgentPortalReq {
|
|
32
|
+
startDate?: string;
|
|
33
|
+
endDate?: string;
|
|
34
|
+
dayCount?: number;
|
|
35
|
+
pageSize: number;
|
|
36
|
+
pageIndex: number;
|
|
37
|
+
}
|
|
38
|
+
export interface ThirdPartyQuoterCategory {
|
|
39
|
+
categoryId: string;
|
|
40
|
+
categoryType: string | null;
|
|
41
|
+
categoryLabel: string | null;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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;AAE5B;;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;CACtB;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"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
// Main types exports - re-exports from organized type files
|
|
18
|
+
__exportStar(require("./auth.types"), exports);
|
|
19
|
+
__exportStar(require("./quote.types"), exports);
|
|
20
|
+
__exportStar(require("./application.types"), exports);
|
|
21
|
+
__exportStar(require("./reports.types"), exports);
|
|
22
|
+
__exportStar(require("./enums"), exports);
|
|
23
|
+
__exportStar(require("./errors"), exports);
|
|
24
|
+
__exportStar(require("./constants"), exports);
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { Gender, PaymentFrequency, RateClass, HealthClass } from './enums';
|
|
2
|
+
export interface ThirdPartyQuoteReqHeight {
|
|
3
|
+
/** Height in feet (required if weightInLbs provided) */
|
|
4
|
+
feet: number;
|
|
5
|
+
/** Height in inches component (0-11, required if weightInLbs provided) */
|
|
6
|
+
inches: number;
|
|
7
|
+
}
|
|
8
|
+
export interface ThirdPartyQuoteReqRider {
|
|
9
|
+
/**
|
|
10
|
+
* Rider name - Available riders:
|
|
11
|
+
* - "ADB Rider" (25,000 - 250,000 coverage)
|
|
12
|
+
* - "Dependent Child Rider" (5,000 - 25,000 coverage)
|
|
13
|
+
*
|
|
14
|
+
* Note: Availability depends on state and age restrictions
|
|
15
|
+
*/
|
|
16
|
+
rider: string | null;
|
|
17
|
+
/**
|
|
18
|
+
* Rider coverage amount
|
|
19
|
+
* - ADB Rider: 25,000 to 250,000
|
|
20
|
+
* - Dependent Child Rider: 5,000 to 25,000
|
|
21
|
+
* - Must not exceed overall coverage amount
|
|
22
|
+
*/
|
|
23
|
+
riderFaceAmount: number;
|
|
24
|
+
}
|
|
25
|
+
export interface ThirdPartyQuoteReq {
|
|
26
|
+
/**
|
|
27
|
+
* Coverage amount for the quote
|
|
28
|
+
*
|
|
29
|
+
* Age-based limits:
|
|
30
|
+
* - Up to 55: 50,000 to 1,000,000
|
|
31
|
+
* - 56: 50,000 to 900,000
|
|
32
|
+
* - 57: 50,000 to 800,000
|
|
33
|
+
* - 58: 50,000 to 700,000
|
|
34
|
+
* - 59: 50,000 to 600,000
|
|
35
|
+
* - 60: 50,000 to 500,000
|
|
36
|
+
*/
|
|
37
|
+
faceAmount: number;
|
|
38
|
+
/**
|
|
39
|
+
* Term length for the quote in years
|
|
40
|
+
*
|
|
41
|
+
* Age-based availability:
|
|
42
|
+
* - Up to 45: 10, 20, 30
|
|
43
|
+
* - 45-50 (non-tobacco): 10, 20, 30
|
|
44
|
+
* - 45-50 (tobacco): 10, 20
|
|
45
|
+
* - 51-60: 10, 20
|
|
46
|
+
*/
|
|
47
|
+
benefitPeriod: number;
|
|
48
|
+
/** Indicates whether requester uses nicotine/tobacco */
|
|
49
|
+
flagTobaccoUse: boolean;
|
|
50
|
+
/** Gender of the requester */
|
|
51
|
+
gender: Gender;
|
|
52
|
+
/**
|
|
53
|
+
* Current US State of the requester (2-character code)
|
|
54
|
+
* Note: Not available in WY and NY
|
|
55
|
+
* Note: Not required if zipCode is provided
|
|
56
|
+
*/
|
|
57
|
+
stateCode: string | null;
|
|
58
|
+
/**
|
|
59
|
+
* US Zip Code where requester currently lives
|
|
60
|
+
* Note: Either stateCode or zipCode required
|
|
61
|
+
* Note: If both provided, zipCode takes priority
|
|
62
|
+
*/
|
|
63
|
+
zipCode: string | null;
|
|
64
|
+
/**
|
|
65
|
+
* Rate Class of the requester
|
|
66
|
+
* Note: Not required if healthClass or height/weight are provided
|
|
67
|
+
*/
|
|
68
|
+
rateClass: RateClass | null;
|
|
69
|
+
/**
|
|
70
|
+
* Health Class of the requester
|
|
71
|
+
* Note: Not required if rateClass or height/weight are provided
|
|
72
|
+
*/
|
|
73
|
+
healthClass: HealthClass | null;
|
|
74
|
+
/**
|
|
75
|
+
* Height information
|
|
76
|
+
* Note: Required if weightInLbs is provided
|
|
77
|
+
* Note: Not required if rateClass or healthClass are provided
|
|
78
|
+
*/
|
|
79
|
+
height: ThirdPartyQuoteReqHeight;
|
|
80
|
+
/**
|
|
81
|
+
* Weight of requester in pounds
|
|
82
|
+
* Note: Required if height is provided
|
|
83
|
+
* Note: Not required if rateClass or healthClass are provided
|
|
84
|
+
*/
|
|
85
|
+
weightInLbs: number | null;
|
|
86
|
+
/**
|
|
87
|
+
* Age of the requester (18 to 60)
|
|
88
|
+
* Note: Not required if dateOfBirth is provided
|
|
89
|
+
*/
|
|
90
|
+
age: number | null;
|
|
91
|
+
/**
|
|
92
|
+
* Date of Birth of the requester
|
|
93
|
+
* Note: Must result in age 18-60
|
|
94
|
+
* Note: Not required if age is provided
|
|
95
|
+
* Note: If both provided, dateOfBirth takes priority
|
|
96
|
+
*/
|
|
97
|
+
dateOfBirth: string | null;
|
|
98
|
+
/**
|
|
99
|
+
* Array of rider objects
|
|
100
|
+
* Note: Availability depends on state and age
|
|
101
|
+
* Note: riderFaceAmount must not exceed overall coverage amount
|
|
102
|
+
*/
|
|
103
|
+
riders: ThirdPartyQuoteReqRider[] | null;
|
|
104
|
+
/** Payment frequency preference */
|
|
105
|
+
paymentFreq: PaymentFrequency;
|
|
106
|
+
/** First name of customer (optional) */
|
|
107
|
+
firstName: string | null;
|
|
108
|
+
/** Last name of customer (optional) */
|
|
109
|
+
lastName: string | null;
|
|
110
|
+
/** Email of the customer - must be valid email format (optional) */
|
|
111
|
+
email: string | null;
|
|
112
|
+
/**
|
|
113
|
+
* Phone number of the customer (optional)
|
|
114
|
+
* Note: Must be 10-digit number, properly formatted to avoid errors
|
|
115
|
+
*/
|
|
116
|
+
phoneNum: string | null;
|
|
117
|
+
}
|
|
118
|
+
export interface RidersList {
|
|
119
|
+
riderValue: string | null;
|
|
120
|
+
riderLabel: string | null;
|
|
121
|
+
riderQuoteAmount: number;
|
|
122
|
+
faceAmount: number | null;
|
|
123
|
+
}
|
|
124
|
+
export interface QuoteParts {
|
|
125
|
+
quotePartRespId: string;
|
|
126
|
+
quotePartSequence: number;
|
|
127
|
+
termLengthPart: number;
|
|
128
|
+
quoteAmount: number;
|
|
129
|
+
premiumSaveWhenSelectingAnnual: number | null;
|
|
130
|
+
}
|
|
131
|
+
export interface OverallBenefit {
|
|
132
|
+
earnings: number;
|
|
133
|
+
accountValue: number;
|
|
134
|
+
surrenderValue: number;
|
|
135
|
+
annualInterestRate: number;
|
|
136
|
+
}
|
|
137
|
+
export interface FarmersDetailsAfterEachBenefitPeriod {
|
|
138
|
+
afterBenefitPeriod: number;
|
|
139
|
+
surrenderPercentage: number;
|
|
140
|
+
age: number;
|
|
141
|
+
interestPercentage: number;
|
|
142
|
+
earnings: number;
|
|
143
|
+
accountValue: number;
|
|
144
|
+
surrenderValue: number;
|
|
145
|
+
}
|
|
146
|
+
export interface TableColumn {
|
|
147
|
+
columnName: string | null;
|
|
148
|
+
columnLabel: string | null;
|
|
149
|
+
}
|
|
150
|
+
export interface HintTable {
|
|
151
|
+
tableTitle: string | null;
|
|
152
|
+
columns: TableColumn[] | null;
|
|
153
|
+
}
|
|
154
|
+
export interface Hint {
|
|
155
|
+
title: string | null;
|
|
156
|
+
description: string | null;
|
|
157
|
+
hintTable: HintTable;
|
|
158
|
+
}
|
|
159
|
+
export interface Quote {
|
|
160
|
+
quoteResponseId: string;
|
|
161
|
+
index: number;
|
|
162
|
+
quoteAmount: number | null;
|
|
163
|
+
premiumSaveWhenSelectingAnnual: number | null;
|
|
164
|
+
maxQuoteAmount: number | null;
|
|
165
|
+
minQuoteAmount: number | null;
|
|
166
|
+
farmersOverallBenefit: OverallBenefit;
|
|
167
|
+
farmersDetailsAfterEachBenefitPeriods: FarmersDetailsAfterEachBenefitPeriod[] | null;
|
|
168
|
+
faceAmount: number;
|
|
169
|
+
faceAmountLabel: string | null;
|
|
170
|
+
benefitPeriod: number | null;
|
|
171
|
+
benefitPeriodUnit: string | null;
|
|
172
|
+
benefitPeriodLabel: string | null;
|
|
173
|
+
waitingPeriod: number | null;
|
|
174
|
+
waitingPeriodUnit: string | null;
|
|
175
|
+
waitingPeriodLabel: string | null;
|
|
176
|
+
paymentFrequency: string | null;
|
|
177
|
+
isMedicalRequired: boolean;
|
|
178
|
+
selectedRiders: RidersList[] | null;
|
|
179
|
+
hint: Hint;
|
|
180
|
+
flagMultipleQuote: boolean;
|
|
181
|
+
quoteParts: QuoteParts[] | null;
|
|
182
|
+
}
|
|
183
|
+
export interface ThirdPartyQuoteResp {
|
|
184
|
+
productName: string | null;
|
|
185
|
+
selectedQuote: Quote;
|
|
186
|
+
}
|
|
187
|
+
//# sourceMappingURL=quote.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file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