@instabrain-sdks/api-client 2.3.2 → 2.4.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.
@@ -26,4 +26,6 @@ __exportStar(require("./beneficiary.types"), exports);
26
26
  __exportStar(require("./gigdb.types"), exports);
27
27
  __exportStar(require("./adb.types"), exports);
28
28
  __exportStar(require("./ibterm.types"), exports);
29
+ __exportStar(require("./pureterm.types"), exports);
30
+ __exportStar(require("./finalexpense.types"), exports);
29
31
  __exportStar(require("./secure-sign.types"), exports);
@@ -0,0 +1,59 @@
1
+ import { Gender, PaymentFrequency, PureTermRateClass, HealthClass } from './enums';
2
+ import { ThirdPartyQuoteReqHeight, ThirdPartyQuoteReqRider } from './quote.types';
3
+ /**
4
+ * Request body for `POST /api/ThirdPartyIbPureTermQuote/get`.
5
+ *
6
+ * Source of truth: ThirdPartyTermQuoteRequest.cs (InstaPureTerm product).
7
+ *
8
+ * **Validation rules (enforced server-side):**
9
+ * - `benefitPeriod` is required.
10
+ * - **One rating input group is required** — supply ONE of:
11
+ * (a) `rateClass`, OR
12
+ * (b) `healthClass`, OR
13
+ * (c) `height` + `weightInLbs` (both together).
14
+ * - `age` OR `dateOfBirth` required; resolved age must be 18–60. When both
15
+ * are provided, `dateOfBirth` takes priority.
16
+ * - `stateCode` required.
17
+ */
18
+ export interface ThirdPartyPureTermQuoteReq {
19
+ /**
20
+ * Coverage amount in dollars.
21
+ * Age-based limits apply — same schedule as IB Term.
22
+ */
23
+ faceAmount?: number | null;
24
+ /** Term length in years. **Required.** Available: 10, 20, 30 (state/age/tobacco dependent). */
25
+ benefitPeriod?: number | null;
26
+ /** Whether the applicant uses tobacco or nicotine. */
27
+ flagTobaccoUse: boolean;
28
+ /** Applicant gender. */
29
+ gender?: Gender | null;
30
+ /** 2-letter US state code. Required. */
31
+ stateCode?: string | null;
32
+ /** Rate class — one of the three rating groups (†). */
33
+ rateClass?: PureTermRateClass | null;
34
+ /** Health class — one of the three rating groups (†). */
35
+ healthClass?: HealthClass | null;
36
+ /**
37
+ * Applicant height. Required together with `weightInLbs` when using the
38
+ * height/weight rating path. Omit when rating via `rateClass` or `healthClass`.
39
+ */
40
+ height?: ThirdPartyQuoteReqHeight | null;
41
+ /** Applicant weight in lbs. Required together with `height`. */
42
+ weightInLbs?: number | null;
43
+ /** Applicant age (18–60). Provide `age` OR `dateOfBirth`. */
44
+ age?: number | null;
45
+ /** Applicant date of birth (ISO 8601). Takes priority over `age` when both are provided. */
46
+ dateOfBirth?: string | null;
47
+ /** Riders to include. Use `riderCode` values returned by the rider lookup endpoint. */
48
+ riders?: ThirdPartyQuoteReqRider[] | null;
49
+ /** Payment frequency. */
50
+ paymentFreq?: PaymentFrequency | null;
51
+ /** First name — alphabetic only. Lead capture. */
52
+ firstName?: string | null;
53
+ /** Last name — alphabetic only. Lead capture. */
54
+ lastName?: string | null;
55
+ /** Email address. Lead capture. */
56
+ email?: string | null;
57
+ /** Phone number — 10-digit local or E.164 format. Lead capture. */
58
+ phoneNum?: string | null;
59
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -71,11 +71,33 @@ export interface ThirdPartyVerifyPinResp {
71
71
  /** true when the PIN matched and documents are now signed */
72
72
  isVerified: boolean;
73
73
  }
74
+ import { FinalSubmitApplicationStatus } from './finalexpense.types';
74
75
  /**
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
76
+ * Response from final application submit.
77
+ *
78
+ * Behavior differs by product:
79
+ * - **Synchronous (ADB, GIGDB):** a successful (`flagStatus: true`) response
80
+ * **guarantees a non-null `policyNumber`**, and `applicationStatus` is absent
81
+ * from the JSON.
82
+ * - **Asynchronous (Final Expense):** `policyNumber` is `null` on the first call
83
+ * and `applicationStatus` is `'InProgress'`. Poll
84
+ * `pollFinalExpenseUnderwritingStatus()` for the terminal decision; the
85
+ * `policyNumber` is issued there once the status is `'Approved'`.
86
+ *
87
+ * Note: a `null` policyNumber is only expected for Final Expense (pending async
88
+ * underwriting) — it is NOT an error.
77
89
  */
78
90
  export interface ThirdPartyFinalSubmitResp {
79
- /** The policy number issued by the carrier. May be null if pending carrier decision */
91
+ /**
92
+ * The policy number issued by the carrier. **Non-null** for ADB/GIGDB on a
93
+ * successful submit. `null` only for Final Expense on the async first call
94
+ * (the number is issued later via `pollFinalExpenseUnderwritingStatus()`).
95
+ */
80
96
  policyNumber: string | null;
97
+ /**
98
+ * Present only for asynchronous-underwriting products (Final Expense), where
99
+ * it is `'InProgress'` on the first call. Absent for ADB/GIGDB. When
100
+ * `'InProgress'`, call `pollFinalExpenseUnderwritingStatus()`.
101
+ */
102
+ applicationStatus?: FinalSubmitApplicationStatus;
81
103
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instabrain-sdks/api-client",
3
- "version": "2.3.2",
3
+ "version": "2.4.0",
4
4
  "description": "Official Node.js SDK for InstaBrain APIs - Insurance quotes and application processing",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",