@instabrain-sdks/api-client 2.1.0 → 2.2.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 +253 -29
- package/dist/client/instabrain-client.d.ts +30 -12
- package/dist/client/instabrain-client.js +35 -13
- package/dist/services/adb.service.d.ts +30 -13
- package/dist/services/adb.service.js +39 -16
- package/dist/types/adb.types.d.ts +41 -6
- package/dist/types/enums.d.ts +5 -0
- package/dist/types/enums.js +12 -2
- package/dist/types/gigdb.types.d.ts +49 -0
- package/package.json +1 -1
- package/dist/client/instabrain-client.d.ts.map +0 -1
- package/dist/client/instabrain-client.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/services/application.service.d.ts.map +0 -1
- package/dist/services/application.service.js.map +0 -1
- package/dist/services/auth.service.d.ts.map +0 -1
- package/dist/services/auth.service.js.map +0 -1
- package/dist/services/gigdb.service.d.ts.map +0 -1
- package/dist/services/gigdb.service.js.map +0 -1
- package/dist/services/quote.service.d.ts.map +0 -1
- package/dist/services/quote.service.js.map +0 -1
- package/dist/services/reports.service.d.ts.map +0 -1
- package/dist/services/reports.service.js.map +0 -1
- package/dist/services/secure-sign.service.d.ts.map +0 -1
- package/dist/services/secure-sign.service.js.map +0 -1
- package/dist/types/application.types.d.ts.map +0 -1
- package/dist/types/application.types.js.map +0 -1
- package/dist/types/auth.types.d.ts.map +0 -1
- package/dist/types/auth.types.js.map +0 -1
- package/dist/types/constants.d.ts.map +0 -1
- package/dist/types/constants.js.map +0 -1
- package/dist/types/enums.d.ts.map +0 -1
- package/dist/types/enums.js.map +0 -1
- package/dist/types/errors.d.ts.map +0 -1
- package/dist/types/errors.js.map +0 -1
- package/dist/types/gigdb.types.d.ts.map +0 -1
- package/dist/types/gigdb.types.js.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js.map +0 -1
- package/dist/types/quote.types.d.ts.map +0 -1
- package/dist/types/quote.types.js.map +0 -1
- package/dist/types/reports.types.d.ts.map +0 -1
- package/dist/types/reports.types.js.map +0 -1
- package/dist/types/secure-sign.types.d.ts.map +0 -1
- package/dist/types/secure-sign.types.js.map +0 -1
- package/dist/utils/error-utils.d.ts.map +0 -1
- package/dist/utils/error-utils.js.map +0 -1
- package/dist/utils/http-client.d.ts.map +0 -1
- package/dist/utils/http-client.js.map +0 -1
package/README.md
CHANGED
|
@@ -91,7 +91,7 @@ const jwt = await client.authenticate(userId, accessToken);
|
|
|
91
91
|
| `isDeclined` | Yes | Yes | No |
|
|
92
92
|
| `isQuoteChanged` | Yes | No | No |
|
|
93
93
|
| Response links | None | None | `agentLink`, `eAppAgentLink`, `applicantLink` |
|
|
94
|
-
| EFT method | `saveEftPayment()` | `
|
|
94
|
+
| EFT method | `saveEftPayment()` | `saveEftPayment()` | N/A |
|
|
95
95
|
| Unavailable states | NY, MT | MA, NH, AK *(CA: next release)* | WY, NY |
|
|
96
96
|
| Status | **Primary** | **Primary** | Secondary *(not fully live yet)* |
|
|
97
97
|
|
|
@@ -202,6 +202,66 @@ const { opportunityId, isQuoteChanged } = appResp;
|
|
|
202
202
|
|
|
203
203
|
`**isQuoteChanged: true**` - the carrier adjusted the premium based on application data. Proceed to Step 3.
|
|
204
204
|
|
|
205
|
+
#### State-specific Other Insurance fields (Q-08)
|
|
206
|
+
|
|
207
|
+
> Third-party integrations must display the exact regulated question text below to applicants — paraphrasing is not sufficient. Source: Confluence page 687800321 (GIGDB Start Application API).
|
|
208
|
+
|
|
209
|
+
When `hasExistingCoverage === true`, the following per-coverage flags are required for specific states:
|
|
210
|
+
|
|
211
|
+
| State | Field on `existingCoverages[]` | Type | Exact applicant-facing question text |
|
|
212
|
+
|-----------|------------------------------------|-----------|---------------------------------------|
|
|
213
|
+
| MA | `requestsYieldIndices` | `boolean` | *Would you like to request yield indices for cash value policies?* |
|
|
214
|
+
| OK | `notifyPresentInsurer` | `boolean` | *Please notify my present insurer(s) regarding this transaction?* |
|
|
215
|
+
| DE / GA | `wantsPolicySummary` | `boolean` | *Do you want a policy summary statement from your existing insurer?* |
|
|
216
|
+
| FL | `wantsComparativeInformationForm` | `boolean` | *Indicate whether or not you wish a Comparative Information Form from the proposed company and your existing insurer or insurers?* |
|
|
217
|
+
|
|
218
|
+
For **RI** or **WV**, set `existingCoverageData.areExistingPoliciesIssuedByFidelity: boolean`.
|
|
219
|
+
> Question text: *"Are any of your existing policies issued by Fidelity Life Association?"*
|
|
220
|
+
|
|
221
|
+
When `willOtherCoverageBeReplacedOrFinanced === true` and the state is **KS** or **WA**, populate the new top-level `willOtherCoverageBeReplacedOrFinancedData` object:
|
|
222
|
+
|
|
223
|
+
- **KS** → `areReplacedPoliciesIssuedByFidelity: boolean`
|
|
224
|
+
> Question text: *"Are any of the policies you are considering replacing issued by Fidelity Life Association?"*
|
|
225
|
+
- **WA** → `otherInsuranceReplacementData` — all 7 booleans are required; each `specify*` string is required when its boolean is `true`. See `GigdbOtherInsuranceReplacementData` for the full field list.
|
|
226
|
+
|
|
227
|
+
##### WA `otherInsuranceReplacementData` — exact question text per field
|
|
228
|
+
|
|
229
|
+
| Field | Exact applicant-facing question text |
|
|
230
|
+
|---|---|
|
|
231
|
+
| `mayReduceBenefitsIncreasePremiums` | *Can there be reduced benefits or increased premiums in later years?* |
|
|
232
|
+
| `specifyReduceBenefitsIncreasePremiums` | *Please explain* |
|
|
233
|
+
| `hasNewPolicyCharges` | *Are there penalties, set up or surrender charges for the new policy?* |
|
|
234
|
+
| `specifyNewPolicyCharges` | *Please explain, emphasizing any extra cost for early withdrawal.* |
|
|
235
|
+
| `hasPriorPolicyCharges` | *Will there be penalties or surrender charges under the existing insurance as a result of the proposed transaction?* |
|
|
236
|
+
| `specifyPriorPolicyCharges` | *Please explain* |
|
|
237
|
+
| `hasTaxConsequences` | *Are there adverse tax consequences from the replacement under current tax law?* |
|
|
238
|
+
| `specifyTaxConsequences` | *Please explain* |
|
|
239
|
+
| `hasInterestConsiderations` | *Are interest earnings a consideration in this replacement?* |
|
|
240
|
+
| `specifyInterestConsiderations` | *Please explain what portions of premiums or contributions will produce limited or no earnings. As pertinent, include the need for minimum deposits to enhance earnings, and the reduction of earnings that may result from set up charges, policy fees, and other factors.* |
|
|
241
|
+
| `hasMinRequirementsBeforeInterest` | *Are minimum amounts required to be on deposit before excess interest will be paid?* |
|
|
242
|
+
| `specifyMinRequirementsBeforeInterest`| *Please explain* |
|
|
243
|
+
| `hasOtherAdverseEffects` | *Are there other short or long term effects from the replacement that might be materially adverse?* |
|
|
244
|
+
| `specifyOtherAdverseEffects` | *Please explain* |
|
|
245
|
+
|
|
246
|
+
Example WA payload (replacement disclosure):
|
|
247
|
+
|
|
248
|
+
```typescript
|
|
249
|
+
willOtherCoverageBeReplacedOrFinancedData: {
|
|
250
|
+
otherInsuranceReplacementData: {
|
|
251
|
+
mayReduceBenefitsIncreasePremiums: true,
|
|
252
|
+
specifyReduceBenefitsIncreasePremiums: 'Premiums may rise after year 5',
|
|
253
|
+
hasNewPolicyCharges: true,
|
|
254
|
+
specifyNewPolicyCharges: 'Surrender charges in years 1-3',
|
|
255
|
+
hasPriorPolicyCharges: false,
|
|
256
|
+
hasTaxConsequences: false,
|
|
257
|
+
hasInterestConsiderations: true,
|
|
258
|
+
specifyInterestConsiderations: 'Lower guaranteed rate on new policy',
|
|
259
|
+
hasMinRequirementsBeforeInterest: false,
|
|
260
|
+
hasOtherAdverseEffects: false
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
```
|
|
264
|
+
|
|
205
265
|
### Step 3 - Handle quote change (conditional)
|
|
206
266
|
|
|
207
267
|
```typescript
|
|
@@ -251,7 +311,7 @@ See [Secure Sign Flow](#secure-sign-flow) and [Final Submit](#final-submit).
|
|
|
251
311
|
|
|
252
312
|
> **Not available in:** MA, NH, AK
|
|
253
313
|
>
|
|
254
|
-
> **CA:**
|
|
314
|
+
> **CA:** Supported. The ADB application requires the `occupation` field for California residents — populate it via `getAdbOccupationOptions()`.
|
|
255
315
|
|
|
256
316
|
ADB (Accidental Death Benefit) provides coverage for accidental deaths for ages 20–59.
|
|
257
317
|
|
|
@@ -260,15 +320,19 @@ ADB (Accidental Death Benefit) provides coverage for accidental deaths for ages
|
|
|
260
320
|
```
|
|
261
321
|
getAdbRiderDetails() ← check state availability & collect riderCodes
|
|
262
322
|
↓
|
|
323
|
+
getAdbOccupationOptions() ← CA only — lookup occupation labels for the application
|
|
324
|
+
↓
|
|
263
325
|
getAdbQuote()
|
|
264
326
|
↓
|
|
265
327
|
startAdbApplication()
|
|
266
328
|
↓
|
|
267
329
|
[if isDeclined = true] → stop - applicant not eligible
|
|
268
330
|
↓
|
|
269
|
-
updateAdbQuote()
|
|
331
|
+
updateAdbQuote() ← optional — MUST be before saveEftPayment
|
|
332
|
+
↓
|
|
333
|
+
getExistingAdbQuote() ← optional — fetch the current quote after update
|
|
270
334
|
↓
|
|
271
|
-
|
|
335
|
+
saveEftPayment() ← shared with GIGDB; quote cannot be updated after this point
|
|
272
336
|
↓
|
|
273
337
|
prepareDocsAndGetDeliveryChannels()
|
|
274
338
|
↓
|
|
@@ -300,10 +364,25 @@ const selectedRiderCodes = riderDetails.riders.map(r => r.riderCode);
|
|
|
300
364
|
|
|
301
365
|
> **Note:** `riders` may be an empty array even when `flagProductNotAvailableForState = false` — this means no optional riders are configured for that state.
|
|
302
366
|
|
|
367
|
+
### Step 0a - `getAdbOccupationOptions(query?: string)` (CA only)
|
|
368
|
+
|
|
369
|
+
Search occupation labels for the ADB product. Required only when `address.state === "CA"` on the application — the `occupation` field on `ThirdPartyAdbAppReq` must be populated with one or more labels returned by this endpoint.
|
|
370
|
+
|
|
371
|
+
```typescript
|
|
372
|
+
// Filter to a short list
|
|
373
|
+
const matches = await client.getAdbOccupationOptions('nurse');
|
|
374
|
+
// ['Registered Nurse', 'Nurse Practitioner', 'Licensed Practical Nurse', ...]
|
|
375
|
+
|
|
376
|
+
// Or fetch the full list (omit the query)
|
|
377
|
+
const allOccupations = await client.getAdbOccupationOptions();
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
> Skip this call entirely for non-CA states — `occupation` should be omitted from the application request when the state is not CA.
|
|
381
|
+
|
|
303
382
|
### Step 1 - `getAdbQuote(request: ThirdPartyAdbQuoteRequest)`
|
|
304
383
|
|
|
305
384
|
```typescript
|
|
306
|
-
import { InstaBrainClient, Gender, PaymentFrequency,
|
|
385
|
+
import { InstaBrainClient, Gender, PaymentFrequency, AdbRiderType } from '@instabrain-sdks/api-client';
|
|
307
386
|
|
|
308
387
|
const quoteResp = await client.getAdbQuote({
|
|
309
388
|
faceAmount: 100000,
|
|
@@ -311,7 +390,7 @@ const quoteResp = await client.getAdbQuote({
|
|
|
311
390
|
stateCode: 'TX',
|
|
312
391
|
age: 35,
|
|
313
392
|
paymentFreq: PaymentFrequency.Monthly,
|
|
314
|
-
riders: [
|
|
393
|
+
riders: [AdbRiderType.FamilyADB],
|
|
315
394
|
firstName: 'John',
|
|
316
395
|
lastName: 'Smith',
|
|
317
396
|
email: 'john.smith@example.com'
|
|
@@ -322,7 +401,8 @@ const { quoteResponseId } = quoteResp.selectedQuote;
|
|
|
322
401
|
|
|
323
402
|
**Rider notes:**
|
|
324
403
|
|
|
325
|
-
- `riders` is `
|
|
404
|
+
- `riders` is `AdbRiderType[]` - use the ADB-specific enum: `AdbRiderType.FamilyADB`, `AdbRiderType.ReturnOfPremium`, `AdbRiderType.InflationBenefit`
|
|
405
|
+
- Do **not** reuse the Term product's `RiderType` enum — those values (`'ADB Rider'`, `'Dependent Child Rider'`) are display titles, not ADB rider codes
|
|
326
406
|
- Rider availability varies by state - see [ADB Rider Availability](#adb-rider-availability)
|
|
327
407
|
|
|
328
408
|
### Step 2 - `startAdbApplication(request: ThirdPartyAdbAppReq)`
|
|
@@ -370,6 +450,51 @@ const { opportunityId } = appResp;
|
|
|
370
450
|
- `isPayerAlsoOwnerAndInsured === false` → declined
|
|
371
451
|
- `isUsCitizen === false` AND `isLegalUsResident === false` → declined
|
|
372
452
|
|
|
453
|
+
**California residents — `occupation` field required:**
|
|
454
|
+
|
|
455
|
+
```typescript
|
|
456
|
+
const appResp = await client.startAdbApplication({
|
|
457
|
+
// ...same fields as above, with CA address...
|
|
458
|
+
address: { addressLine1: '...', city: 'Los Angeles', state: 'CA', zipcode: '90001' },
|
|
459
|
+
occupation: ['Registered Nurse'], // populate from getAdbOccupationOptions()
|
|
460
|
+
// ...
|
|
461
|
+
});
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
- `occupation` is an optional `string[]` on `ThirdPartyAdbAppReq`
|
|
465
|
+
- Required only when `address.state === "CA"` — omit for all other states
|
|
466
|
+
- Values must come from `getAdbOccupationOptions()`
|
|
467
|
+
|
|
468
|
+
**District of Columbia residents — three top-level ACA acknowledgement booleans required:**
|
|
469
|
+
|
|
470
|
+
> Third-party integrations must display the exact regulated question text below to applicants — paraphrasing is not sufficient. Source: Confluence page 699924481 (ADB Start Application API).
|
|
471
|
+
|
|
472
|
+
| Field | Exact applicant-facing question text |
|
|
473
|
+
|---|---|
|
|
474
|
+
| `hasMedicalCoverage` | *Do you have comprehensive medical coverage including the minimum essential coverage required by the Affordable Care Act (ACA) or are you treated as having minimum essential coverage due to your status as a bona fide resident of any possession of the United States?* |
|
|
475
|
+
| `understandsBenefits` | *Do you understand most supplemental only policies may not pay full benefits if your ACA compliant minimum essential coverage plan is not in force?* |
|
|
476
|
+
| `understandsLimitedBenefits`| *Do you understand that the benefits provided under this policy may be limited?* |
|
|
477
|
+
|
|
478
|
+
```typescript
|
|
479
|
+
await client.startAdbApplication({
|
|
480
|
+
// ...same fields as above...
|
|
481
|
+
address: { addressLine1: '100 7th St NW', city: 'Washington', state: 'DC', zipcode: '20001' },
|
|
482
|
+
hasMedicalCoverage: true, // ACA minimum essential coverage
|
|
483
|
+
understandsBenefits: true, // supplemental policy benefits acknowledgement
|
|
484
|
+
understandsLimitedBenefits: true // limited benefits acknowledgement
|
|
485
|
+
});
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
**OK / FL / DE residents with existing coverage — per-coverage acknowledgement:**
|
|
489
|
+
|
|
490
|
+
When `hasExistingCoverage === true`, set the corresponding flag on each `existingCoverages[]` item. Display the exact regulated question text:
|
|
491
|
+
|
|
492
|
+
| State | Field on `existingCoverages[]` | Exact applicant-facing question text |
|
|
493
|
+
|-------|------------------------------------|---------------------------------------|
|
|
494
|
+
| OK | `notifyPresentInsurer` | *Please notify my present insurer(s) regarding this transaction?* |
|
|
495
|
+
| FL | `wantsComparativeInformationForm` | *Indicate whether or not you wish a Comparative Information Form from the proposed company and your existing insurer or insurers?* |
|
|
496
|
+
| DE | `wantsPolicySummary` | *Do you want a policy summary statement from your existing insurer?* |
|
|
497
|
+
|
|
373
498
|
**ADB response differences from GIGDB/IB Term:**
|
|
374
499
|
|
|
375
500
|
- Response type is `ThirdPartyAdbStartAppResp` - contains only `opportunityId` and `isDeclined`
|
|
@@ -377,14 +502,38 @@ const { opportunityId } = appResp;
|
|
|
377
502
|
- No `isQuoteChanged`
|
|
378
503
|
- No `birthJurisdiction` field in the application request (unlike GIGDB)
|
|
379
504
|
|
|
380
|
-
### Step 3 -
|
|
505
|
+
### Step 3 - `updateAdbQuote(request: ThirdPartyAdbUpdateQuoteReq)` (optional - must be called BEFORE `saveEftPayment`)
|
|
506
|
+
|
|
507
|
+
Re-quote an in-flight ADB opportunity with a new `faceAmount`, `paymentFreq`, or `riders` list. The quote cannot be updated after EFT payment details are saved — the API returns `"Quote update is not allowed when payment is already made"`.
|
|
508
|
+
|
|
509
|
+
```typescript
|
|
510
|
+
import { PaymentFrequency } from '@instabrain-sdks/api-client';
|
|
511
|
+
|
|
512
|
+
const updatedQuote = await client.updateAdbQuote({
|
|
513
|
+
opportunityId,
|
|
514
|
+
faceAmount: 150000,
|
|
515
|
+
paymentFreq: PaymentFrequency.Monthly,
|
|
516
|
+
riders: [] // pass [] to clear all riders
|
|
517
|
+
});
|
|
381
518
|
|
|
382
|
-
|
|
519
|
+
const { quoteResponseId, quoteAmount } = updatedQuote.selectedQuote;
|
|
520
|
+
```
|
|
383
521
|
|
|
384
|
-
### Step
|
|
522
|
+
### Step 3a - `getExistingAdbQuote(opportunityId: string)` (optional)
|
|
523
|
+
|
|
524
|
+
Retrieve the current quote for an in-flight ADB opportunity. Useful any time you need to display or re-read the current premium after `updateAdbQuote()` or in the agent portal.
|
|
385
525
|
|
|
386
526
|
```typescript
|
|
387
|
-
await client.
|
|
527
|
+
const currentQuote = await client.getExistingAdbQuote(opportunityId);
|
|
528
|
+
console.log(currentQuote.selectedQuote.quoteAmount);
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
### Step 4 - `saveEftPayment(request: ThirdPartyEftPaymentReq)`
|
|
532
|
+
|
|
533
|
+
Same shared method as GIGDB — both products use the same `POST /api/ThirdPartyPayment/save-eft-payment` endpoint.
|
|
534
|
+
|
|
535
|
+
```typescript
|
|
536
|
+
await client.saveEftPayment({
|
|
388
537
|
opportunityId,
|
|
389
538
|
accountHolderName: 'John Smith',
|
|
390
539
|
routingNumber: '021000021',
|
|
@@ -393,8 +542,6 @@ await client.saveAdbEftPayment({
|
|
|
393
542
|
// After this point, the quote can no longer be updated.
|
|
394
543
|
```
|
|
395
544
|
|
|
396
|
-
> **Important:** Use `saveAdbEftPayment()` for ADB - not `saveEftPayment()`. Both accept the same `ThirdPartyEftPaymentReq` type but call different backend endpoints.
|
|
397
|
-
|
|
398
545
|
### Steps 5–6 - Secure Sign → Final Submit
|
|
399
546
|
|
|
400
547
|
See [Secure Sign Flow](#secure-sign-flow) and [Final Submit](#final-submit).
|
|
@@ -588,7 +735,7 @@ console.log('Policy number:', submitResp.policyNumber);
|
|
|
588
735
|
|
|
589
736
|
> `**policyNumber: null**` is normal - the carrier may not issue a policy number immediately (pending underwriting decision). This is **not** an error.
|
|
590
737
|
|
|
591
|
-
> **Throws `PaymentNotMade`** if `saveEftPayment()`
|
|
738
|
+
> **Throws `PaymentNotMade`** if `saveEftPayment()` was not called before this step.
|
|
592
739
|
|
|
593
740
|
---
|
|
594
741
|
|
|
@@ -722,6 +869,7 @@ filters: [
|
|
|
722
869
|
| `hasExistingCoverage` | `boolean | null` | Yes |
|
|
723
870
|
| `willOtherCoverageBeReplacedOrFinanced` | `boolean | null` | No |
|
|
724
871
|
| `existingCoverageData` | `GigdbExistingCoverageData | null` | No |
|
|
872
|
+
| `willOtherCoverageBeReplacedOrFinancedData` | `GigdbWillOtherCoverageBeReplacedOrFinancedData | null` | No | Required when `address.state` is `"KS"` or `"WA"` AND `willOtherCoverageBeReplacedOrFinanced === true` |
|
|
725
873
|
| `beneficiaryDetails` | `BeneficiaryDetails` | Yes | See [Beneficiary Reference](#beneficiary-reference) |
|
|
726
874
|
|
|
727
875
|
|
|
@@ -748,22 +896,58 @@ filters: [
|
|
|
748
896
|
`**GigdbExistingCoverageData`:**
|
|
749
897
|
|
|
750
898
|
|
|
751
|
-
| Field
|
|
752
|
-
|
|
|
753
|
-
| `isExistingPolicyBeingTerminated`
|
|
754
|
-
| `existingCoverages`
|
|
899
|
+
| Field | Type | Required | Notes |
|
|
900
|
+
| --------------------------------------- | ---------------------------- | -------- | ----- |
|
|
901
|
+
| `isExistingPolicyBeingTerminated` | `boolean | null` | No |
|
|
902
|
+
| `existingCoverages` | `GigdbExistingCoverageInfo[] | null` | Yes (when `hasExistingCoverage === true`) |
|
|
903
|
+
| `areExistingPoliciesIssuedByFidelity` | `boolean | null` | No | Required when `address.state` is `"RI"` or `"WV"` |
|
|
755
904
|
|
|
756
905
|
|
|
757
906
|
`**GigdbExistingCoverageInfo`:**
|
|
758
907
|
|
|
759
908
|
|
|
760
|
-
| Field
|
|
761
|
-
|
|
|
762
|
-
| `nameOfTheCompany`
|
|
763
|
-
| `insuranceAmount`
|
|
764
|
-
| `dateOfIssue`
|
|
765
|
-
| `toBeReplaced`
|
|
766
|
-
| `toBeFinanced`
|
|
909
|
+
| Field | Type | Required | Notes |
|
|
910
|
+
| --------------------------------- | ---------------- | -------- | ----- |
|
|
911
|
+
| `nameOfTheCompany` | `string | null` | Yes | |
|
|
912
|
+
| `insuranceAmount` | `string | null` | Yes | |
|
|
913
|
+
| `dateOfIssue` | `string | null` | Yes | `YYYY-MM` |
|
|
914
|
+
| `toBeReplaced` | `boolean | null` | Yes | |
|
|
915
|
+
| `toBeFinanced` | `boolean | null` | Yes | |
|
|
916
|
+
| `requestsYieldIndices` | `boolean | null` | No | Required when `address.state === "MA"` (per-coverage Q-08) |
|
|
917
|
+
| `notifyPresentInsurer` | `boolean | null` | No | Required when `address.state === "OK"` (per-coverage Q-08) |
|
|
918
|
+
| `wantsPolicySummary` | `boolean | null` | No | Required when `address.state` is `"DE"` or `"GA"` (per-coverage Q-08) |
|
|
919
|
+
| `wantsComparativeInformationForm` | `boolean | null` | No | Required when `address.state === "FL"` (per-coverage Q-08) |
|
|
920
|
+
|
|
921
|
+
|
|
922
|
+
`**GigdbWillOtherCoverageBeReplacedOrFinancedData`:** *(new — IBS-63)*
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
| Field | Type | Required | Notes |
|
|
926
|
+
| -------------------------------------- | ------------------------------------- | -------- | ----- |
|
|
927
|
+
| `areReplacedPoliciesIssuedByFidelity` | `boolean | null` | No | Required when `address.state === "KS"` AND `willOtherCoverageBeReplacedOrFinanced === true` |
|
|
928
|
+
| `otherInsuranceReplacementData` | `GigdbOtherInsuranceReplacementData | null` | No | Required when `address.state === "WA"` AND `willOtherCoverageBeReplacedOrFinanced === true` |
|
|
929
|
+
|
|
930
|
+
|
|
931
|
+
`**GigdbOtherInsuranceReplacementData`:** *(new — IBS-63, WA-only)*
|
|
932
|
+
|
|
933
|
+
> All 7 booleans are server-required (must be non-null). For each boolean set to `true`, the paired `specify*` string must be a non-empty explanation. When the boolean is `false`, the paired `specify*` may be omitted or `null`.
|
|
934
|
+
|
|
935
|
+
| Field | Type | Required when | Exact applicant-facing question text |
|
|
936
|
+
| ------------------------------------------- | ---------------- | ------------------------------------------------- | --- |
|
|
937
|
+
| `mayReduceBenefitsIncreasePremiums` | `boolean` | Always (WA) | *Can there be reduced benefits or increased premiums in later years?* |
|
|
938
|
+
| `specifyReduceBenefitsIncreasePremiums` | `string | null` | When `mayReduceBenefitsIncreasePremiums === true` | *Please explain* |
|
|
939
|
+
| `hasNewPolicyCharges` | `boolean` | Always (WA) | *Are there penalties, set up or surrender charges for the new policy?* |
|
|
940
|
+
| `specifyNewPolicyCharges` | `string | null` | When `hasNewPolicyCharges === true` | *Please explain, emphasizing any extra cost for early withdrawal.* |
|
|
941
|
+
| `hasPriorPolicyCharges` | `boolean` | Always (WA) | *Will there be penalties or surrender charges under the existing insurance as a result of the proposed transaction?* |
|
|
942
|
+
| `specifyPriorPolicyCharges` | `string | null` | When `hasPriorPolicyCharges === true` | *Please explain* |
|
|
943
|
+
| `hasTaxConsequences` | `boolean` | Always (WA) | *Are there adverse tax consequences from the replacement under current tax law?* |
|
|
944
|
+
| `specifyTaxConsequences` | `string | null` | When `hasTaxConsequences === true` | *Please explain* |
|
|
945
|
+
| `hasInterestConsiderations` | `boolean` | Always (WA) | *Are interest earnings a consideration in this replacement?* |
|
|
946
|
+
| `specifyInterestConsiderations` | `string | null` | When `hasInterestConsiderations === true` | *Please explain what portions of premiums or contributions will produce limited or no earnings. As pertinent, include the need for minimum deposits to enhance earnings, and the reduction of earnings that may result from set up charges, policy fees, and other factors.* |
|
|
947
|
+
| `hasMinRequirementsBeforeInterest` | `boolean` | Always (WA) | *Are minimum amounts required to be on deposit before excess interest will be paid?* |
|
|
948
|
+
| `specifyMinRequirementsBeforeInterest` | `string | null` | When `hasMinRequirementsBeforeInterest === true` | *Please explain* |
|
|
949
|
+
| `hasOtherAdverseEffects` | `boolean` | Always (WA) | *Are there other short or long term effects from the replacement that might be materially adverse?* |
|
|
950
|
+
| `specifyOtherAdverseEffects` | `string | null` | When `hasOtherAdverseEffects === true` | *Please explain* |
|
|
767
951
|
|
|
768
952
|
|
|
769
953
|
### `ThirdPartyGigdbUpdateQuoteReq`
|
|
@@ -789,7 +973,7 @@ filters: [
|
|
|
789
973
|
| `age` | `number` | Yes* | 20–59; required if `dateOfBirth` not provided |
|
|
790
974
|
| `dateOfBirth` | `string` | Yes* | ISO 8601; required if `age` not provided |
|
|
791
975
|
| `paymentFreq` | `PaymentFrequency` | Yes | |
|
|
792
|
-
| `riders` | `
|
|
976
|
+
| `riders` | `AdbRiderType[]` | No | Use `AdbRiderType` enum values; availability varies by state |
|
|
793
977
|
| `firstName` | `string` | No | Max 35 chars |
|
|
794
978
|
| `lastName` | `string` | No | Max 35 chars |
|
|
795
979
|
| `email` | `string` | No | Valid email format |
|
|
@@ -811,10 +995,14 @@ filters: [
|
|
|
811
995
|
| `isPayerAlsoOwnerAndInsured` | `boolean` | Yes | Must be `true`; knockout if `false` |
|
|
812
996
|
| `address` | `AdbAddress` | Yes | See sub-fields below |
|
|
813
997
|
| `dateOfBirth` | `string` | Yes | ISO 8601; age must be 20–59 |
|
|
814
|
-
| `socialSecurityNumber` | `string` | Yes | Format:
|
|
998
|
+
| `socialSecurityNumber` | `string` | Yes | Format: `XXXXXXXXX` (9 digits, no dashes) |
|
|
815
999
|
| `hasExistingCoverage` | `boolean` | Yes | |
|
|
816
1000
|
| `willOtherCoverageBeReplacedOrFinanced` | `boolean` | No | Required if `hasExistingCoverage = true` |
|
|
817
1001
|
| `existingCoverageData` | `AdbExistingCoverageData` | No | Required if `hasExistingCoverage = true` |
|
|
1002
|
+
| `occupation` | `string[]` | No | Required when `address.state === "CA"`; values from `getAdbOccupationOptions()` |
|
|
1003
|
+
| `hasMedicalCoverage` | `boolean` | No | Required when `address.state === "DC"` (ACA acknowledgement) |
|
|
1004
|
+
| `understandsBenefits` | `boolean` | No | Required when `address.state === "DC"` (ACA acknowledgement) |
|
|
1005
|
+
| `understandsLimitedBenefits` | `boolean` | No | Required when `address.state === "DC"` (ACA acknowledgement) |
|
|
818
1006
|
| `beneficiaryDetails` | `BeneficiaryDetails` | Yes | See [Beneficiary Reference](#beneficiary-reference) |
|
|
819
1007
|
|
|
820
1008
|
|
|
@@ -829,6 +1017,30 @@ filters: [
|
|
|
829
1017
|
| `zipcode` | `string` | 5-digit numeric |
|
|
830
1018
|
|
|
831
1019
|
|
|
1020
|
+
`**AdbExistingCoverageData`:**
|
|
1021
|
+
|
|
1022
|
+
|
|
1023
|
+
| Field | Type | Required | Notes |
|
|
1024
|
+
| --------------------------------- | -------------------------- | -------- | ----- |
|
|
1025
|
+
| `isExistingPolicyBeingTerminated` | `boolean` | Yes | |
|
|
1026
|
+
| `existingCoverages` | `AdbExistingCoverageInfo[]`| Yes | At least one entry required when present |
|
|
1027
|
+
|
|
1028
|
+
|
|
1029
|
+
`**AdbExistingCoverageInfo`:**
|
|
1030
|
+
|
|
1031
|
+
|
|
1032
|
+
| Field | Type | Required | Notes |
|
|
1033
|
+
| --------------------------------- | --------- | -------- | ----- |
|
|
1034
|
+
| `nameOfTheCompany` | `string` | Yes | |
|
|
1035
|
+
| `insuranceAmount` | `string` | Yes | |
|
|
1036
|
+
| `dateOfIssue` | `string` | Yes | `YYYY-MM` |
|
|
1037
|
+
| `toBeReplaced` | `boolean` | Yes | |
|
|
1038
|
+
| `toBeFinanced` | `boolean` | Yes | |
|
|
1039
|
+
| `notifyPresentInsurer` | `boolean` | No | Required when `address.state === "OK"` AND `hasExistingCoverage === true` |
|
|
1040
|
+
| `wantsComparativeInformationForm` | `boolean` | No | Required when `address.state === "FL"` AND `hasExistingCoverage === true` |
|
|
1041
|
+
| `wantsPolicySummary` | `boolean` | No | Required when `address.state === "DE"` AND `hasExistingCoverage === true` |
|
|
1042
|
+
|
|
1043
|
+
|
|
832
1044
|
### `ThirdPartyEftPaymentReq` (shared - GIGDB and ADB)
|
|
833
1045
|
|
|
834
1046
|
|
|
@@ -840,7 +1052,7 @@ filters: [
|
|
|
840
1052
|
| `accountNumber` | `string | null` | Yes |
|
|
841
1053
|
|
|
842
1054
|
|
|
843
|
-
> Use `saveEftPayment()` for GIGDB and
|
|
1055
|
+
> Use `saveEftPayment()` for both GIGDB and ADB — both products share the same `POST /api/ThirdPartyPayment/save-eft-payment` endpoint.
|
|
844
1056
|
|
|
845
1057
|
### `ThirdPartyQuoteReq` (IB Term - Secondary)
|
|
846
1058
|
|
|
@@ -993,7 +1205,7 @@ Returned by `getAdbRiderDetails()`.
|
|
|
993
1205
|
|
|
994
1206
|
| Field | Type | Description |
|
|
995
1207
|
|---|---|---|
|
|
996
|
-
| `riderCode` | `
|
|
1208
|
+
| `riderCode` | `AdbRiderType` | Pass into `ThirdPartyAdbQuoteRequest.riders` to include this rider in the quote. Values: `FamilyADB`, `ReturnOfPremium`, `InflationBenefit`. |
|
|
997
1209
|
| `riderTitle` | `string` | Display title for UI rendering. |
|
|
998
1210
|
| `riderDescription` | `string` | Display description for UI rendering. |
|
|
999
1211
|
|
|
@@ -1113,6 +1325,18 @@ Returned by `startAdbApplication()`. Contains only two fields - no links, no `is
|
|
|
1113
1325
|
|
|
1114
1326
|
> **Note:** Values contain spaces - always use enum members.
|
|
1115
1327
|
|
|
1328
|
+
### `AdbRiderType` (ADB product only)
|
|
1329
|
+
|
|
1330
|
+
Rider codes accepted by `ThirdPartyAdbQuoteRequest.riders` and `ThirdPartyAdbUpdateQuoteReq.riders`, and returned by `getAdbRiderDetails()` as `AdbRiderResp.riderCode`.
|
|
1331
|
+
|
|
1332
|
+
| Enum Member | Value |
|
|
1333
|
+
| ------------------------------ | -------------------- |
|
|
1334
|
+
| `AdbRiderType.FamilyADB` | `'FamilyADB'` |
|
|
1335
|
+
| `AdbRiderType.ReturnOfPremium` | `'ReturnOfPremium'` |
|
|
1336
|
+
| `AdbRiderType.InflationBenefit` | `'InflationBenefit'` |
|
|
1337
|
+
|
|
1338
|
+
> **Note:** ADB has its own rider enum. Do NOT reuse the Term product's `RiderType` — those values (`'ADB Rider'`, `'Dependent Child Rider'`) are display titles, not the codes the ADB API expects.
|
|
1339
|
+
|
|
1116
1340
|
### `State`
|
|
1117
1341
|
|
|
1118
1342
|
All 50 US states + DC and 12 Canadian provinces/territories:
|
|
@@ -5,7 +5,7 @@ import { ReportsService } from '../services/reports.service';
|
|
|
5
5
|
import { GigdbService } from '../services/gigdb.service';
|
|
6
6
|
import { AdbService } from '../services/adb.service';
|
|
7
7
|
import { SecureSignService } from '../services/secure-sign.service';
|
|
8
|
-
import { InstaBrainConfig, Environment, ThirdPartyQuoteReq, ThirdPartyQuoteResp, ThirdPartyStartApplicationReq, ThirdPartyStartAppResp, AgentPortalReq, ThirdPartyProspectsResp, ThirdPartySalesReportRes, ThirdPartyApplicationReportRes, ThirdPartyGigdbQuoteRequest, ThirdPartyGigdbUpdateQuoteReq, ThirdPartyGigdbAppReq, ThirdPartyEftPaymentReq, ThirdPartyAdbQuoteRequest, ThirdPartyAdbAppReq, ThirdPartyAdbStartAppResp, AdbRiderDetailsResp, ThirdPartySendPinReq, ThirdPartyResendPinReq, ThirdPartyVerifyPinReq, ThirdPartyPrepareDocsResp, ThirdPartySendPinResp, ThirdPartyResendPinResp, ThirdPartyVerifyPinResp, ThirdPartyFinalSubmitResp } from '../types';
|
|
8
|
+
import { InstaBrainConfig, Environment, ThirdPartyQuoteReq, ThirdPartyQuoteResp, ThirdPartyStartApplicationReq, ThirdPartyStartAppResp, AgentPortalReq, ThirdPartyProspectsResp, ThirdPartySalesReportRes, ThirdPartyApplicationReportRes, ThirdPartyGigdbQuoteRequest, ThirdPartyGigdbUpdateQuoteReq, ThirdPartyGigdbAppReq, ThirdPartyEftPaymentReq, ThirdPartyAdbQuoteRequest, ThirdPartyAdbUpdateQuoteReq, ThirdPartyAdbAppReq, ThirdPartyAdbStartAppResp, AdbRiderDetailsResp, ThirdPartySendPinReq, ThirdPartyResendPinReq, ThirdPartyVerifyPinReq, ThirdPartyPrepareDocsResp, ThirdPartySendPinResp, ThirdPartyResendPinResp, ThirdPartyVerifyPinResp, ThirdPartyFinalSubmitResp } from '../types';
|
|
9
9
|
/**
|
|
10
10
|
* Main InstaBrain SDK client
|
|
11
11
|
*/
|
|
@@ -75,9 +75,10 @@ export declare class InstaBrainClient {
|
|
|
75
75
|
*/
|
|
76
76
|
startGigdbApplication(request: ThirdPartyGigdbAppReq): Promise<ThirdPartyStartAppResp>;
|
|
77
77
|
/**
|
|
78
|
-
* Save EFT payment details for a GIGDB application
|
|
79
|
-
*
|
|
80
|
-
* @
|
|
78
|
+
* Save EFT payment details for a GIGDB or ADB application
|
|
79
|
+
* Must be called after startGigdbApplication / startAdbApplication and before the SecureSign flow.
|
|
80
|
+
* @param request - The EFT payment request with opportunityId and bank account details
|
|
81
|
+
* @returns Promise resolving to true on success
|
|
81
82
|
*/
|
|
82
83
|
saveEftPayment(request: ThirdPartyEftPaymentReq): Promise<boolean>;
|
|
83
84
|
/**
|
|
@@ -104,18 +105,11 @@ export declare class InstaBrainClient {
|
|
|
104
105
|
* Start an ADB application from a quote
|
|
105
106
|
* Note: isDeclined=true is a valid success response (knockout), not an error.
|
|
106
107
|
* Knockout conditions: isPayerAlsoOwnerAndInsured=false, or isUsCitizen=false AND isLegalUsResident=false.
|
|
107
|
-
* After this, call
|
|
108
|
+
* After this, call saveEftPayment() then the shared SecureSign flow then finalSubmit().
|
|
108
109
|
* @param request - The ADB application request parameters
|
|
109
110
|
* @returns Promise with opportunityId and isDeclined flag
|
|
110
111
|
*/
|
|
111
112
|
startAdbApplication(request: ThirdPartyAdbAppReq): Promise<ThirdPartyAdbStartAppResp>;
|
|
112
|
-
/**
|
|
113
|
-
* Save EFT payment details for an ADB application
|
|
114
|
-
* Must be called after startAdbApplication (when not declined) and before the SecureSign flow.
|
|
115
|
-
* @param request - The EFT payment request with opportunityId and bank account details
|
|
116
|
-
* @returns Promise resolving to true on success
|
|
117
|
-
*/
|
|
118
|
-
saveAdbEftPayment(request: ThirdPartyEftPaymentReq): Promise<boolean>;
|
|
119
113
|
/**
|
|
120
114
|
* Get available riders for the ADB product in a given US state.
|
|
121
115
|
* Call this before getAdbQuote() to check if ADB is available in the state
|
|
@@ -125,6 +119,30 @@ export declare class InstaBrainClient {
|
|
|
125
119
|
* @returns Promise with riders list and product availability flag
|
|
126
120
|
*/
|
|
127
121
|
getAdbRiderDetails(stateCode: string): Promise<AdbRiderDetailsResp>;
|
|
122
|
+
/**
|
|
123
|
+
* Update an ADB quote with a different face amount, payment frequency, or riders.
|
|
124
|
+
* Use after application has been started to re-quote for the same opportunity.
|
|
125
|
+
* Business error: "Quote update is not allowed when payment is already made".
|
|
126
|
+
* @param request - The update quote request with opportunityId, faceAmount, paymentFreq, and riders
|
|
127
|
+
* @returns Promise with the updated quote response
|
|
128
|
+
*/
|
|
129
|
+
updateAdbQuote(request: ThirdPartyAdbUpdateQuoteReq): Promise<ThirdPartyQuoteResp>;
|
|
130
|
+
/**
|
|
131
|
+
* Get the existing quote for an ADB opportunity.
|
|
132
|
+
* Use when startAdbApplication returns isQuoteChanged=true, or any time you need
|
|
133
|
+
* the current quote details for an in-flight ADB opportunity.
|
|
134
|
+
* @param opportunityId - The OpportunityId from the Start Application response
|
|
135
|
+
* @returns Promise with the current quote response
|
|
136
|
+
*/
|
|
137
|
+
getExistingAdbQuote(opportunityId: string): Promise<ThirdPartyQuoteResp>;
|
|
138
|
+
/**
|
|
139
|
+
* Search occupation labels for the ADB product.
|
|
140
|
+
* Required only for California residents — occupation must be supplied on
|
|
141
|
+
* ThirdPartyAdbAppReq when address.state === "CA".
|
|
142
|
+
* @param query - Optional filter term. When omitted, returns the full list.
|
|
143
|
+
* @returns Promise with the list of matching occupation labels
|
|
144
|
+
*/
|
|
145
|
+
getAdbOccupationOptions(query?: string): Promise<string[]>;
|
|
128
146
|
/**
|
|
129
147
|
* Prepare the signing package and check available delivery channels
|
|
130
148
|
* Always call this first in the signing flow. If isSignCompleted is true, skip to finalSubmit().
|
|
@@ -102,9 +102,10 @@ class InstaBrainClient {
|
|
|
102
102
|
return this.gigdb.startApplication(request);
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
|
-
* Save EFT payment details for a GIGDB application
|
|
106
|
-
*
|
|
107
|
-
* @
|
|
105
|
+
* Save EFT payment details for a GIGDB or ADB application
|
|
106
|
+
* Must be called after startGigdbApplication / startAdbApplication and before the SecureSign flow.
|
|
107
|
+
* @param request - The EFT payment request with opportunityId and bank account details
|
|
108
|
+
* @returns Promise resolving to true on success
|
|
108
109
|
*/
|
|
109
110
|
async saveEftPayment(request) {
|
|
110
111
|
return this.gigdb.saveEftPayment(request);
|
|
@@ -140,22 +141,13 @@ class InstaBrainClient {
|
|
|
140
141
|
* Start an ADB application from a quote
|
|
141
142
|
* Note: isDeclined=true is a valid success response (knockout), not an error.
|
|
142
143
|
* Knockout conditions: isPayerAlsoOwnerAndInsured=false, or isUsCitizen=false AND isLegalUsResident=false.
|
|
143
|
-
* After this, call
|
|
144
|
+
* After this, call saveEftPayment() then the shared SecureSign flow then finalSubmit().
|
|
144
145
|
* @param request - The ADB application request parameters
|
|
145
146
|
* @returns Promise with opportunityId and isDeclined flag
|
|
146
147
|
*/
|
|
147
148
|
async startAdbApplication(request) {
|
|
148
149
|
return this.adb.startApplication(request);
|
|
149
150
|
}
|
|
150
|
-
/**
|
|
151
|
-
* Save EFT payment details for an ADB application
|
|
152
|
-
* Must be called after startAdbApplication (when not declined) and before the SecureSign flow.
|
|
153
|
-
* @param request - The EFT payment request with opportunityId and bank account details
|
|
154
|
-
* @returns Promise resolving to true on success
|
|
155
|
-
*/
|
|
156
|
-
async saveAdbEftPayment(request) {
|
|
157
|
-
return this.adb.saveEftPayment(request);
|
|
158
|
-
}
|
|
159
151
|
/**
|
|
160
152
|
* Get available riders for the ADB product in a given US state.
|
|
161
153
|
* Call this before getAdbQuote() to check if ADB is available in the state
|
|
@@ -167,6 +159,36 @@ class InstaBrainClient {
|
|
|
167
159
|
async getAdbRiderDetails(stateCode) {
|
|
168
160
|
return this.adb.getRiderDetails(stateCode);
|
|
169
161
|
}
|
|
162
|
+
/**
|
|
163
|
+
* Update an ADB quote with a different face amount, payment frequency, or riders.
|
|
164
|
+
* Use after application has been started to re-quote for the same opportunity.
|
|
165
|
+
* Business error: "Quote update is not allowed when payment is already made".
|
|
166
|
+
* @param request - The update quote request with opportunityId, faceAmount, paymentFreq, and riders
|
|
167
|
+
* @returns Promise with the updated quote response
|
|
168
|
+
*/
|
|
169
|
+
async updateAdbQuote(request) {
|
|
170
|
+
return this.adb.updateQuote(request);
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Get the existing quote for an ADB opportunity.
|
|
174
|
+
* Use when startAdbApplication returns isQuoteChanged=true, or any time you need
|
|
175
|
+
* the current quote details for an in-flight ADB opportunity.
|
|
176
|
+
* @param opportunityId - The OpportunityId from the Start Application response
|
|
177
|
+
* @returns Promise with the current quote response
|
|
178
|
+
*/
|
|
179
|
+
async getExistingAdbQuote(opportunityId) {
|
|
180
|
+
return this.adb.getExistingQuote(opportunityId);
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Search occupation labels for the ADB product.
|
|
184
|
+
* Required only for California residents — occupation must be supplied on
|
|
185
|
+
* ThirdPartyAdbAppReq when address.state === "CA".
|
|
186
|
+
* @param query - Optional filter term. When omitted, returns the full list.
|
|
187
|
+
* @returns Promise with the list of matching occupation labels
|
|
188
|
+
*/
|
|
189
|
+
async getAdbOccupationOptions(query) {
|
|
190
|
+
return this.adb.getOccupationOptions(query);
|
|
191
|
+
}
|
|
170
192
|
// ── Secure Sign Methods ─────────────────────────────────────────────
|
|
171
193
|
/**
|
|
172
194
|
* Prepare the signing package and check available delivery channels
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { HttpClient } from '../utils/http-client';
|
|
2
2
|
import { BaseService } from './base.service';
|
|
3
|
-
import { ThirdPartyAdbQuoteRequest, ThirdPartyAdbAppReq, ThirdPartyAdbStartAppResp, ThirdPartyQuoteResp,
|
|
3
|
+
import { ThirdPartyAdbQuoteRequest, ThirdPartyAdbUpdateQuoteReq, ThirdPartyAdbAppReq, ThirdPartyAdbStartAppResp, ThirdPartyQuoteResp, AdbRiderDetailsResp } from '../types';
|
|
4
4
|
/**
|
|
5
5
|
* ADB (Accidental Death Benefit) service
|
|
6
6
|
* Handles quote, application, and EFT payment for the ADB product (ages 20-59)
|
|
7
7
|
* Distributed through Fidelity Life — no medical exam required
|
|
8
8
|
*
|
|
9
9
|
* Flow:
|
|
10
|
-
* 1. getQuote()
|
|
11
|
-
* 2. startApplication()
|
|
12
|
-
* 3. saveEftPayment()
|
|
13
|
-
* 4. SecureSign flow
|
|
14
|
-
* 5. Final Submit
|
|
10
|
+
* 1. getQuote() → quoteResponseId
|
|
11
|
+
* 2. startApplication() → opportunityId (or isDeclined=true)
|
|
12
|
+
* 3. GigdbService.saveEftPayment() → true (shared endpoint — use via InstaBrainClient.saveEftPayment)
|
|
13
|
+
* 4. SecureSign flow → (shared — use SecureSignService)
|
|
14
|
+
* 5. Final Submit → (shared — use ApplicationService.finalSubmit)
|
|
15
15
|
*/
|
|
16
16
|
export declare class AdbService extends BaseService {
|
|
17
17
|
constructor(httpClient: HttpClient);
|
|
@@ -21,6 +21,30 @@ export declare class AdbService extends BaseService {
|
|
|
21
21
|
* @returns Promise with the quote response containing quoteResponseId
|
|
22
22
|
*/
|
|
23
23
|
getQuote(request: ThirdPartyAdbQuoteRequest): Promise<ThirdPartyQuoteResp>;
|
|
24
|
+
/**
|
|
25
|
+
* Update an ADB quote with a different face amount, payment frequency, or riders.
|
|
26
|
+
* Use after application has been started to re-quote for the same opportunity.
|
|
27
|
+
* Business error: "Quote update is not allowed when payment is already made"
|
|
28
|
+
* @param request - The update quote request with opportunityId, faceAmount, paymentFreq, and riders
|
|
29
|
+
* @returns Promise with the updated quote response
|
|
30
|
+
*/
|
|
31
|
+
updateQuote(request: ThirdPartyAdbUpdateQuoteReq): Promise<ThirdPartyQuoteResp>;
|
|
32
|
+
/**
|
|
33
|
+
* Get the existing quote for an ADB opportunity.
|
|
34
|
+
* Use when startAdbApplication returns isQuoteChanged=true, or any time you need
|
|
35
|
+
* the current quote details for an in-flight ADB opportunity.
|
|
36
|
+
* @param opportunityId - The OpportunityId from the Start Application response
|
|
37
|
+
* @returns Promise with the current quote response
|
|
38
|
+
*/
|
|
39
|
+
getExistingQuote(opportunityId: string): Promise<ThirdPartyQuoteResp>;
|
|
40
|
+
/**
|
|
41
|
+
* Search occupation labels for the ADB product.
|
|
42
|
+
* Required only for California residents — occupation must be supplied on
|
|
43
|
+
* ThirdPartyAdbAppReq when address.state === "CA".
|
|
44
|
+
* @param query - Optional filter term. When omitted, returns the full list.
|
|
45
|
+
* @returns Promise with the list of matching occupation labels
|
|
46
|
+
*/
|
|
47
|
+
getOccupationOptions(query?: string): Promise<string[]>;
|
|
24
48
|
/**
|
|
25
49
|
* Start an ADB application from a quote
|
|
26
50
|
* Note: isDeclined=true is a valid success response (knockout), not an error.
|
|
@@ -38,11 +62,4 @@ export declare class AdbService extends BaseService {
|
|
|
38
62
|
* @returns Promise with riders list and flagProductNotAvailableForState flag
|
|
39
63
|
*/
|
|
40
64
|
getRiderDetails(stateCode: string): Promise<AdbRiderDetailsResp>;
|
|
41
|
-
/**
|
|
42
|
-
* Save EFT payment details for an ADB application
|
|
43
|
-
* Must be called after startApplication and before the SecureSign flow.
|
|
44
|
-
* @param request - The EFT payment request with opportunityId and bank account details
|
|
45
|
-
* @returns Promise resolving to true on success
|
|
46
|
-
*/
|
|
47
|
-
saveEftPayment(request: ThirdPartyEftPaymentReq): Promise<boolean>;
|
|
48
65
|
}
|