@instabrain-sdks/api-client 2.2.2 → 2.3.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.
@@ -48,24 +48,25 @@ class APIValidationError extends InstaBrainError {
48
48
  */
49
49
  getUserFriendlyMessage() {
50
50
  const errorMessages = {
51
+ // Quote business errors (ADB / GIGDB / IB Term)
51
52
  '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
53
  'NotAvailableForState': 'Product is not available in the specified state.',
61
- 'BenefitPeriodNotAvailable': 'The requested benefit period is not available for the given conditions.',
54
+ 'QuoteNotEligibleForGivenConditions': 'Product is not available for the given combination of state, age, or tobacco usage.',
62
55
  'CoverageNotAvailable': 'The requested coverage amount is not available for the given conditions.',
56
+ 'RiderNotAvailable': 'The requested rider is not available in this state or for this age.',
63
57
  '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.',
58
+ 'AgeNotFound': 'Either age or date of birth must be provided.',
59
+ // IB Term Quote — additional business errors
60
+ 'BenefitPeriodNotAvailable': 'The requested benefit period is not available for the given state, age, and smoker status.',
61
+ 'outsideBuildChart': 'The height and weight combination is not eligible for this product.',
62
+ 'HeightNotValid': 'The height provided is not valid.',
63
+ // Start Application — business top-level errors (ADB / GIGDB / IB Term)
64
+ 'StateMismatchIdentified': 'Quote state and Start Application Address.State refer to different US states. Re-quote with the correct residence state.',
65
+ 'agentNotFound': 'The quote cannot be linked to an agent account. Please verify the agent token and try again.',
66
+ 'internalServerError': 'An unexpected error occurred while processing the application. Please retry; if the issue persists, contact InstaBrain support.',
67
+ // Session
66
68
  '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
+ // ── DEPRECATED — surfaced as field-level messages under InvalidRequestFormat ──
69
70
  'InvalidBirthCountry': 'The birth country provided is not valid.',
70
71
  'InvalidBirthState': 'The birth state provided is not valid.',
71
72
  'InvalidResidenceState': 'The residence state provided is not valid.',
@@ -75,8 +76,13 @@ class APIValidationError extends InstaBrainError {
75
76
  'InvalidPaymentScheduledDate': 'The scheduled payment date is not valid.',
76
77
  'ThirdPartyQuoteError': 'An error occurred while generating the quote.',
77
78
  'InvalidQuoteParameters': 'The quote parameters provided are not valid.',
78
- 'InvalidRequestFormat': 'The request format is invalid. Please check required fields.',
79
+ 'InvalidRequestFormat': 'The request format is invalid. Inspect value.fields for per-field details.',
79
80
  'QuoteNotFound': 'No previous quote found for this opportunity. Please create a quote first.',
81
+ // ADB-specific (deprecated — now surfaced as field-level messages under InvalidRequestFormat)
82
+ 'InvalidStateCode': 'State not supported for ADB (MA, NH, AK unavailable; CA coming next release).',
83
+ 'InvalidAdbAgeRange': 'Age must be between 20 and 59 for ADB.',
84
+ // Start Application — duplicate-detection limit (ADB / GIGDB only; IB Term does NOT use this)
85
+ 'ApplicationLimitReached': 'An application with the same SSN, email, or phone already has a policy generated within the last 30 days.',
80
86
  // Final Submit error messages
81
87
  'paymentNotMade': 'EFT payment must be completed before submitting the application.',
82
88
  // Secure Sign error messages
@@ -19,7 +19,7 @@ export interface ThirdPartyGigdbQuoteRequest {
19
19
  lastName: string | null;
20
20
  /** Email (optional) */
21
21
  email: string | null;
22
- /** Phone number (optional) */
22
+ /** Phone number (optional). 10-digit local (e.g. `1234567890`) or E.164 format (e.g. `+11234567890`; optional space allowed: `+1 1234567890`). */
23
23
  phoneNum: string | null;
24
24
  /** Whether the insured is a smoker */
25
25
  isSmoker: boolean | null;
@@ -0,0 +1,310 @@
1
+ import { Gender, TobaccoNicotineLastUsedPeriod, TobaccoNicotineProductType } from './enums';
2
+ import { BeneficiaryDetails } from './beneficiary.types';
3
+ /** A single IB Term rider option returned for a state/age/nicotine combination. */
4
+ export interface IBTermRider {
5
+ /**
6
+ * Pass into the IB Term Quote request `riders[n].rider` to include this rider in the quote.
7
+ * Typed as string; tighten to an enum once the concrete value set is known.
8
+ */
9
+ riderCode: string;
10
+ /** Display title for UI rendering. */
11
+ riderTitle: string;
12
+ /** Display description for UI rendering. */
13
+ riderDescription: string;
14
+ }
15
+ /**
16
+ * Response from `GET /api/ThirdPartyIbTermLookup/get-rider-details`.
17
+ *
18
+ * Optional pre-quote step that filters available IB Term riders by state, age,
19
+ * and nicotine use. When `flagProductNotAvailableForState` is `true`, the
20
+ * `riders` array is empty and IB Term is not available for the given inputs —
21
+ * do not proceed to the Quote API.
22
+ */
23
+ export interface IBTermRiderDetailsResp {
24
+ /**
25
+ * `true` → IB Term not available for the given `stateCode` / `age` /
26
+ * `flagNicotineUse` combination; the SDK returns this response as-is
27
+ * (it is a valid business state, not an error).
28
+ *
29
+ * `false` → IB Term is available; `riders` lists the eligible rider options
30
+ * (may still be empty if no optional riders are configured for the combo).
31
+ */
32
+ flagProductNotAvailableForState: boolean;
33
+ /** Available riders for the state/age/nicotine combo. */
34
+ riders: IBTermRider[];
35
+ }
36
+ /**
37
+ * Request shape for the IB Term Get Existing Quote lookup
38
+ * (`GET /api/ThirdPartyIbTermQuote/get-existing-quote?opportunityId={guid}`).
39
+ *
40
+ * The `getExistingIBTermQuote()` facade takes a plain `opportunityId` string to
41
+ * match the ADB / GIGDB convention; this interface is exported for callers who
42
+ * prefer to type their own request object. `opportunityId` must be a valid UUID.
43
+ */
44
+ export interface IBTermGetExistingQuoteRequest {
45
+ opportunityId: string;
46
+ }
47
+ export interface IBTermAddress {
48
+ addressLine1: string;
49
+ city: string;
50
+ /** 2-letter US state code; must match the state used on the quote. */
51
+ state: string;
52
+ /** 5-digit US ZIP code */
53
+ zipcode: string;
54
+ }
55
+ export interface IBTermBirthJurisdiction {
56
+ /** ISO country code (e.g. "US") */
57
+ country: string;
58
+ /** 2-letter US state code; required when country === "US". */
59
+ state?: string;
60
+ }
61
+ export interface IBTermHeight {
62
+ /** 1–8 inclusive */
63
+ feet: number;
64
+ /** 0–11 inclusive */
65
+ inches: number;
66
+ }
67
+ export interface IBTermPhysicianDetails {
68
+ /** Physician's name. Backend field: `PhysicianDetails.PhysicianName`. */
69
+ physicianName: string;
70
+ /** City the physician practices in. Backend field: `PhysicianDetails.City`. */
71
+ city: string;
72
+ /** 2-letter US state code; "Outside Of The USA" is not accepted. Backend field: `PhysicianDetails.StateCode`. */
73
+ stateCode: string;
74
+ /** YYYY-MM, must be in the past. */
75
+ lastSeen: string;
76
+ }
77
+ /**
78
+ * IB Term tobacco / nicotine usage history.
79
+ *
80
+ * IB Term uses this structured object — it is NOT a boolean `isSmoker` flag
81
+ * like ADB / GIGDB. The applicant must always supply this object on the
82
+ * Start Application request.
83
+ */
84
+ export interface IBTermTobaccoNicotineUsage {
85
+ /** Bucket describing how recently the applicant last used tobacco / nicotine. */
86
+ lastUsedPeriod: TobaccoNicotineLastUsedPeriod;
87
+ /**
88
+ * `YYYY-MM`, in the past. **Must be `null`** when `lastUsedPeriod === Never`
89
+ * (`'never used'`); required (non-null) otherwise.
90
+ */
91
+ lastTimeUsed: string | null;
92
+ /**
93
+ * At least one product type must be selected when the applicant has ever
94
+ * used tobacco/nicotine. **Must be `null`** when `lastUsedPeriod === Never`
95
+ * (`'never used'`); required (non-null, non-empty) otherwise.
96
+ * Backend field: `TobaccoNicotineUsage.ProductTypesUsed`.
97
+ */
98
+ productTypesUsed: TobaccoNicotineProductType[] | null;
99
+ /**
100
+ * Annual cigar usage count. Required (1–999) when `productTypesUsed`
101
+ * includes `Cigars`; may be omitted otherwise.
102
+ */
103
+ cigarUsagePerYear?: number;
104
+ }
105
+ export interface IBTermExistingCoverageInfo {
106
+ nameOfTheCompany: string;
107
+ insuranceAmount: string;
108
+ /** YYYY-MM */
109
+ dateOfIssue: string;
110
+ toBeReplaced: boolean;
111
+ toBeFinanced: boolean;
112
+ /** Required when address.state === "MA" */
113
+ requestsYieldIndices?: boolean;
114
+ /** Required when address.state === "OK" */
115
+ notifyPresentInsurer?: boolean;
116
+ /** Required when address.state is "DE" or "GA" */
117
+ wantsPolicySummary?: boolean;
118
+ /** Required when address.state === "FL" */
119
+ wantsComparativeInformationForm?: boolean;
120
+ }
121
+ export interface IBTermExistingCoverageData {
122
+ isExistingPolicyBeingTerminated: boolean;
123
+ existingCoverages: IBTermExistingCoverageInfo[];
124
+ /** Required when address.state is "RI" or "WV" */
125
+ areExistingPoliciesIssuedByFidelity?: boolean;
126
+ }
127
+ /**
128
+ * Washington-only replacement disclosure block — all 7 booleans are server-required.
129
+ * Each `specify*` field is required when its paired boolean is `true`.
130
+ *
131
+ * Shape mirrors `GigdbOtherInsuranceReplacementData` for cross-product consistency.
132
+ */
133
+ export interface IBTermOtherInsuranceReplacementData {
134
+ mayReduceBenefitsIncreasePremiums: boolean;
135
+ /** Required when mayReduceBenefitsIncreasePremiums === true */
136
+ specifyReduceBenefitsIncreasePremiums?: string | null;
137
+ hasNewPolicyCharges: boolean;
138
+ /** Required when hasNewPolicyCharges === true */
139
+ specifyNewPolicyCharges?: string | null;
140
+ hasPriorPolicyCharges: boolean;
141
+ /** Required when hasPriorPolicyCharges === true */
142
+ specifyPriorPolicyCharges?: string | null;
143
+ hasTaxConsequences: boolean;
144
+ /** Required when hasTaxConsequences === true */
145
+ specifyTaxConsequences?: string | null;
146
+ hasInterestConsiderations: boolean;
147
+ /** Required when hasInterestConsiderations === true */
148
+ specifyInterestConsiderations?: string | null;
149
+ hasMinRequirementsBeforeInterest: boolean;
150
+ /** Required when hasMinRequirementsBeforeInterest === true */
151
+ specifyMinRequirementsBeforeInterest?: string | null;
152
+ hasOtherAdverseEffects: boolean;
153
+ /** Required when hasOtherAdverseEffects === true */
154
+ specifyOtherAdverseEffects?: string | null;
155
+ }
156
+ /**
157
+ * Top-level wrapper for KS / WA replacement-or-financing disclosures.
158
+ * Required when address.state is "KS" or "WA" AND willOtherCoverageBeReplacedOrFinanced === true.
159
+ */
160
+ export interface IBTermWillOtherCoverageBeReplacedOrFinancedData {
161
+ /** Required for KS when willOtherCoverageBeReplacedOrFinanced === true */
162
+ areReplacedPoliciesIssuedByFidelity?: boolean;
163
+ /** Required for WA when willOtherCoverageBeReplacedOrFinanced === true */
164
+ otherInsuranceReplacementData?: IBTermOtherInsuranceReplacementData;
165
+ }
166
+ /** One child to be insured under the Dependent Child Rider. */
167
+ export interface IBTermChildToBeInsured {
168
+ firstName: string;
169
+ lastName: string;
170
+ gender: Gender;
171
+ /**
172
+ * ISO date; must be between 15 days and under 18 years of age.
173
+ * Backend field name: `DOB` (serializes as `dob`).
174
+ */
175
+ dob: string;
176
+ /** Child height — feet 0–8, inches 0–11. */
177
+ height: IBTermHeight;
178
+ /** Positive number. */
179
+ weight: number;
180
+ /**
181
+ * Relationship of the child to the insured applicant.
182
+ * Backend field name: `Relation` (serializes as `relation`).
183
+ */
184
+ relation: string;
185
+ }
186
+ /**
187
+ * Existing coverage record for one child insured under the Dependent Child Rider.
188
+ * Backend field source: `ExistingCoverageInfoForChildren.cs`.
189
+ */
190
+ export interface IBTermChildExistingCoverage {
191
+ nameOfTheCompany: string;
192
+ /**
193
+ * Coverage amount as a string (matches adult `IBTermExistingCoverageInfo.insuranceAmount`).
194
+ * Total of "not-being-replaced" coverages across children must not exceed $100,000.
195
+ */
196
+ insuranceAmount: string;
197
+ policyNumber: string;
198
+ /** `YYYY-MM`. */
199
+ dateOfIssue: string;
200
+ /** Whether this child policy is being replaced by the new IB Term policy. */
201
+ toBeReplaced: boolean;
202
+ /** Whether premiums on the new policy will be financed from this existing child policy. */
203
+ toBeFinanced: boolean;
204
+ }
205
+ /**
206
+ * Child rider details — required when the Dependent Child Rider was included
207
+ * in the originating IB Term quote (`quoteResponseId`).
208
+ *
209
+ * Knockout questions: setting any of the 4 health questions to `true` results
210
+ * in a declined application.
211
+ */
212
+ export interface IBTermChildRiderInfo {
213
+ hasExistingCoverageForChildren: boolean;
214
+ /** Knockout question — true declines the application. */
215
+ isAnyChildTakingMedication: boolean;
216
+ /** Knockout question — true declines the application. */
217
+ isAnyChildDiagnosedWithDisability: boolean;
218
+ /** Knockout question — true declines the application. */
219
+ isAnyChildDiagnosedWithSevereCondition: boolean;
220
+ /** Knockout question — true declines the application. */
221
+ isAnyChildAdvisedForSurgery: boolean;
222
+ /** At least 1, max 10. */
223
+ childrenToBeInsuredDetails: IBTermChildToBeInsured[];
224
+ /** Required when hasExistingCoverageForChildren === true; max 10 entries. */
225
+ existingCoverageInfoForChildren?: IBTermChildExistingCoverage[];
226
+ }
227
+ /**
228
+ * Request body for `POST /api/ThirdPartyIBTermApplication/start-application`.
229
+ *
230
+ * Source of truth: `THIRD_PARTY_ERROR_CODES.md` (IB Term Start Application section,
231
+ * 2026-05). IB Term has product-specific fields ADB and GIGDB do not — height,
232
+ * weight, driver license, primary care physician, structured tobacco/nicotine
233
+ * usage, and the Dependent Child Rider's nested child + child-existing-coverage
234
+ * arrays.
235
+ *
236
+ * Knockout returns `isDeclined: true` with no `opportunityId` created. IB Term
237
+ * does NOT use `ApplicationLimitReached` (that applies to ADB/GIGDB only).
238
+ *
239
+ * Eligible age range: 18–60 (derived from `dateOfBirth`).
240
+ * Beneficiary types accepted: Person, Trust, Insured Estate, All Children Of The
241
+ * Insured Equally, All Children Of The Marriage Equally. (Business / Corporation
242
+ * / Charitable Organization / Employer / Other are NOT accepted by IB Term.)
243
+ */
244
+ export interface IBTermStartApplicationReq {
245
+ /** UUID from the IB Term quote response. */
246
+ quoteResponseId: string;
247
+ firstName: string;
248
+ lastName: string;
249
+ email: string;
250
+ /** 10-digit local (e.g. `1234567890`) or E.164 (e.g. `+11234567890`). */
251
+ phoneNumber: string;
252
+ /**
253
+ * IB Term combines the US-citizen and permanent-resident questions into one
254
+ * boolean. This is named differently from ADB/GIGDB's `isUsCitizen`.
255
+ */
256
+ isUsCitizenOrIsPermanentResident: boolean;
257
+ /** Must be true to proceed — applicant must be both owner and insured. */
258
+ isPayerAlsoOwnerAndInsured: boolean;
259
+ /** ISO date; age must be 18–60. */
260
+ dateOfBirth: string;
261
+ /** Format: XXXXXXXXX (9 digits) or XXX-XX-XXXX — both formats accepted by IB Term. */
262
+ socialSecurityNumber: string;
263
+ address: IBTermAddress;
264
+ birthJurisdiction: IBTermBirthJurisdiction;
265
+ height: IBTermHeight;
266
+ /** Positive. */
267
+ weight: number;
268
+ isHoldingValidDriverLicense: boolean;
269
+ /**
270
+ * 2-letter US state code. Required (non-null) when
271
+ * `isHoldingValidDriverLicense === true`; must be `null` when `false`.
272
+ * Backend property: `DriverLicenseState` (top-level on `ThirdPartyIBTermAppReq`).
273
+ */
274
+ driverLicenseState: string | null;
275
+ /**
276
+ * Driver license number. Required (non-null) when
277
+ * `isHoldingValidDriverLicense === true`; must be `null` when `false`.
278
+ * Backend property: `DriverLicenseNumber` (top-level on `ThirdPartyIBTermAppReq`).
279
+ */
280
+ driverLicenseNumber: string | null;
281
+ hasPrimaryCarePhysician: boolean;
282
+ /**
283
+ * Required when `hasPrimaryCarePhysician === true`. Must be `null` when
284
+ * `hasPrimaryCarePhysician === false`.
285
+ */
286
+ physicianDetails?: IBTermPhysicianDetails | null;
287
+ tobaccoNicotineUsage: IBTermTobaccoNicotineUsage;
288
+ /** Required boolean — applicant confirms none of the listed conditions apply. */
289
+ areListedConditionsNotApplicable: boolean;
290
+ hasExistingCoverage: boolean;
291
+ /** Required when hasExistingCoverage === true */
292
+ willOtherCoverageBeReplacedOrFinanced?: boolean;
293
+ /** Required when hasExistingCoverage === true */
294
+ existingCoverageData?: IBTermExistingCoverageData;
295
+ /** Required when address.state is "KS" or "WA" AND willOtherCoverageBeReplacedOrFinanced === true */
296
+ willOtherCoverageBeReplacedOrFinancedData?: IBTermWillOtherCoverageBeReplacedOrFinancedData;
297
+ /**
298
+ * Beneficiary details. IB Term restricts `beneficiaryType` to:
299
+ * `Person`, `Trust`, `Insured Estate`, `All Children Of The Insured Equally`,
300
+ * `All Children Of The Marriage Equally`. The SDK uses the shared
301
+ * `BeneficiaryDetails` union; restriction is enforced server-side.
302
+ */
303
+ beneficiaryDetails: BeneficiaryDetails;
304
+ /**
305
+ * Required when the Dependent Child Rider was selected on the originating
306
+ * quote. Setting any of the four knockout questions to `true` declines
307
+ * the application.
308
+ */
309
+ childRiderInfo?: IBTermChildRiderInfo;
310
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -8,6 +8,7 @@ export * from './constants';
8
8
  export * from './beneficiary.types';
9
9
  export * from './gigdb.types';
10
10
  export * from './adb.types';
11
+ export * from './ibterm.types';
11
12
  export * from './secure-sign.types';
12
13
  /**
13
14
  * Base configuration for the InstaBrain SDK
@@ -25,4 +25,5 @@ __exportStar(require("./constants"), exports);
25
25
  __exportStar(require("./beneficiary.types"), exports);
26
26
  __exportStar(require("./gigdb.types"), exports);
27
27
  __exportStar(require("./adb.types"), exports);
28
+ __exportStar(require("./ibterm.types"), exports);
28
29
  __exportStar(require("./secure-sign.types"), exports);
@@ -22,6 +22,39 @@ export interface ThirdPartyQuoteReqRider {
22
22
  */
23
23
  riderFaceAmount: number;
24
24
  }
25
+ /**
26
+ * IB Term quote request (`POST /api/ThirdPartyIbTermQuote/get`).
27
+ *
28
+ * Validation rules (enforced server-side):
29
+ *
30
+ * - **`benefitPeriod` is required.**
31
+ * - **One rating input group is required** — supply ONE of:
32
+ * (a) `rateClass`, OR
33
+ * (b) `healthClass`, OR
34
+ * (c) `height` + `weightInLbs` (both together).
35
+ * Providing only one group is sufficient; do not send all three.
36
+ * - **`age` OR `dateOfBirth` is required** (resolved age must be 18–60; if both
37
+ * provided, `dateOfBirth` takes priority).
38
+ * - **`stateCode` OR `zipCode` is required** (if both, `zipCode` takes priority).
39
+ *
40
+ * The endpoint returns failures in **two shapes**:
41
+ *
42
+ * 1. **Request validation** (HTTP 400, `value.fields`): top-level `error` is
43
+ * `InvalidRequestFormat` for most field failures. The two cross-field
44
+ * eligibility checks below can also be returned as top-level codes here:
45
+ * - `BenefitPeriodNotAvailable` — `BenefitPeriod` is not allowed for the
46
+ * selected state, age, and smoker status.
47
+ * - `CoverageNotAvailable` — `FaceAmount` is outside the min/max/step for
48
+ * the selected state, age, and smoker status.
49
+ *
50
+ * 2. **Business rules** (HTTP 400, `value: null`): top-level `error` is one of:
51
+ * `BenefitPeriodNotAvailable`, `CoverageNotAvailable`, `outsideBuildChart`,
52
+ * `QuoteNotEligibleForGivenConditions`, `NotAvailableForState`,
53
+ * `RiderNotAvailable`, `RiderFaceAmountNotValid`. Returned when the request
54
+ * is well-formed but no quote can be produced.
55
+ *
56
+ * Detect specific failures via `err.isErrorType(APIErrorCode.X)`.
57
+ */
25
58
  export interface ThirdPartyQuoteReq {
26
59
  /**
27
60
  * Coverage amount for the quote
@@ -33,16 +66,22 @@ export interface ThirdPartyQuoteReq {
33
66
  * - 58: 50,000 to 700,000
34
67
  * - 59: 50,000 to 600,000
35
68
  * - 60: 50,000 to 500,000
69
+ *
70
+ * Returns `CoverageNotAvailable` when the amount is not offered for the
71
+ * resolved state + age combination.
36
72
  */
37
73
  faceAmount: number;
38
74
  /**
39
- * Term length for the quote in years
75
+ * Term length for the quote in years. **Required.**
40
76
  *
41
77
  * Age-based availability:
42
78
  * - Up to 45: 10, 20, 30
43
79
  * - 45-50 (non-tobacco): 10, 20, 30
44
80
  * - 45-50 (tobacco): 10, 20
45
81
  * - 51-60: 10, 20
82
+ *
83
+ * Returns `BenefitPeriodNotAvailable` when the period is not offered for the
84
+ * resolved state + age combination.
46
85
  */
47
86
  benefitPeriod: number;
48
87
  /** Indicates whether requester uses nicotine/tobacco */
@@ -73,10 +112,11 @@ export interface ThirdPartyQuoteReq {
73
112
  healthClass: HealthClass | null;
74
113
  /**
75
114
  * Height information
76
- * Note: Required if weightInLbs is provided
77
- * Note: Not required if rateClass or healthClass are provided
115
+ * Note: Required (together with weightInLbs) only when using the height+weight
116
+ * rating path — i.e. when neither rateClass nor healthClass is provided.
117
+ * Note: Omit when rating via rateClass or healthClass.
78
118
  */
79
- height: ThirdPartyQuoteReqHeight;
119
+ height?: ThirdPartyQuoteReqHeight | null;
80
120
  /**
81
121
  * Weight of requester in pounds
82
122
  * Note: Required if height is provided
@@ -111,7 +151,7 @@ export interface ThirdPartyQuoteReq {
111
151
  email: string | null;
112
152
  /**
113
153
  * Phone number of the customer (optional)
114
- * Note: Must be 10-digit number, properly formatted to avoid errors
154
+ * Accepts 10-digit local (e.g. `1234567890`) or E.164 format (e.g. `+11234567890`; optional space allowed: `+1 1234567890`).
115
155
  */
116
156
  phoneNum: string | null;
117
157
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instabrain-sdks/api-client",
3
- "version": "2.2.2",
3
+ "version": "2.3.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",