@star-insure/sdk 0.4.2 → 0.4.5

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.
@@ -1,7 +1,15 @@
1
1
  export interface PolicyBenefit {
2
2
  id: number;
3
- name: string | null;
4
- description: string | null;
5
- sort_order: number | null;
6
- icon: string | null;
3
+ name: string;
4
+ description: string;
5
+ sort_order: number;
6
+ icon: string;
7
+ template_id: PolicyBenefitTemplate['id'];
8
+ }
9
+ export interface PolicyBenefitTemplate {
10
+ id: number;
11
+ created_at: string;
12
+ updated_at: string;
13
+ name: string;
14
+ sort_order: number;
7
15
  }
@@ -1,10 +1,10 @@
1
1
  import { QuoteRequestPurchaseOption } from "./QuoteRequestPurchaseOption";
2
2
  export interface PolicyEnhancement {
3
- id: number;
4
- name: string | null;
5
- description: string | null;
6
- premium: number | null;
7
- disable_rounding: boolean | null;
8
- auto_select: boolean | null;
9
- purchase_option_id: QuoteRequestPurchaseOption['id'] | null;
3
+ id?: number;
4
+ name?: string;
5
+ description?: string;
6
+ premium?: number;
7
+ disable_rounding?: boolean;
8
+ auto_select?: boolean;
9
+ purchase_option_id?: QuoteRequestPurchaseOption['id'];
10
10
  }
@@ -11,7 +11,7 @@ import { QuoteRequestVehicle } from "./QuoteRequestVehicle";
11
11
  import { StreetAddress } from "./StreetAddress";
12
12
  export declare type QuoteRequestStatus = 'new' | 'draft' | 'in-progress' | 'with-customer' | 'sold' | 'bound' | 'customer-modified' | 'closed';
13
13
  export declare type QuoteRequestSource = 'web' | 'phone' | 'show' | 'existing-customer' | 'mighway' | 'agent' | 'entry-form' | 'bularangi';
14
- export declare type QuoteRequestAutomatch = 'QUOTE' | 'EMAIL' | 'REGISTRATION' | 'DUPLICATE';
14
+ export declare type QuoteRequestAutomatch = 'quote' | 'email' | 'registration' | 'duplicate';
15
15
  export interface QuoteRequestUser {
16
16
  id: number;
17
17
  name: string;
@@ -38,6 +38,7 @@ export interface QuoteRequest {
38
38
  has_automatch?: boolean;
39
39
  automatch_by?: QuoteRequestAutomatch;
40
40
  automatch_client_id?: string;
41
+ automatch_registrations?: string;
41
42
  promo_code?: string;
42
43
  club_membership_number?: string;
43
44
  broker_fee?: number;
@@ -1,29 +1,31 @@
1
- import { PolicyBenefit } from "./PolicyBenefit";
1
+ import { PolicyBenefit, PolicyBenefitTemplate } from "./PolicyBenefit";
2
2
  import { PolicyEnhancement } from "./PolicyEnhancement";
3
3
  export interface QuoteRequestPurchaseOption {
4
- id: number;
5
- quote_request_id: string;
6
- level_of_insurance_id: number | null;
7
- sort_order: number | null;
8
- description: string | null;
9
- premium: number | null;
10
- monthly_premium: number | null;
11
- show_monthly: boolean | null;
12
- fsl: number | null;
13
- gst: number | null;
14
- premium_type: PremiumType | null;
15
- policy_starts_at: string | null;
16
- sold_at: string | null;
17
- is_paid: boolean | null;
18
- payment_frequency: PaymentFrequency | null;
19
- excess_details: string | null;
20
- terms: string | null;
21
- authorised_drivers: string | null;
22
- draft: boolean | null;
23
- benefit_template_id: number | null;
4
+ id?: number;
5
+ quote_request_id?: string;
6
+ level_of_insurance_id?: number;
7
+ sort_order?: number;
8
+ description?: string;
9
+ premium?: number;
10
+ monthly_premium?: number;
11
+ show_monthly?: boolean;
12
+ fsl?: number;
13
+ gst?: number;
14
+ premium_type?: PremiumType;
15
+ policy_starts_at?: string;
16
+ sold_at?: string;
17
+ is_paid?: boolean;
18
+ payment_frequency?: PaymentFrequency;
19
+ excess_details?: string;
20
+ terms?: string;
21
+ authorised_drivers?: string;
22
+ is_draft?: boolean;
23
+ is_direct_debit?: boolean;
24
+ benefit_template_id?: number;
24
25
  level_of_insurance?: LevelOfInsurance;
25
26
  enhancements?: PolicyEnhancement[];
26
27
  benefits?: PolicyBenefit[];
28
+ benefit_template?: PolicyBenefitTemplate;
27
29
  }
28
30
  export declare type PremiumType = 'annual' | 'total-due';
29
31
  export declare type PaymentFrequency = 'monthly' | 'annually';
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@star-insure/sdk",
3
3
  "description": "The SDK for Star Insure client apps with shared helper functions and TypeScript definitions.",
4
4
  "author": "alexclark_nz",
5
- "version": "0.4.2",
5
+ "version": "0.4.5",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
@@ -1,7 +1,16 @@
1
1
  export interface PolicyBenefit {
2
2
  id: number;
3
- name: string | null;
4
- description: string | null;
5
- sort_order: number | null;
6
- icon: string | null;
3
+ name: string;
4
+ description: string;
5
+ sort_order: number;
6
+ icon: string;
7
+ template_id: PolicyBenefitTemplate['id'];
8
+ }
9
+
10
+ export interface PolicyBenefitTemplate {
11
+ id: number;
12
+ created_at: string;
13
+ updated_at: string;
14
+ name: string;
15
+ sort_order: number;
7
16
  }
@@ -1,11 +1,11 @@
1
1
  import { QuoteRequestPurchaseOption } from "./QuoteRequestPurchaseOption";
2
2
 
3
3
  export interface PolicyEnhancement {
4
- id: number;
5
- name: string | null;
6
- description: string | null;
7
- premium: number | null;
8
- disable_rounding: boolean | null;
9
- auto_select: boolean | null;
10
- purchase_option_id: QuoteRequestPurchaseOption['id'] | null;
4
+ id?: number;
5
+ name?: string;
6
+ description?: string;
7
+ premium?: number;
8
+ disable_rounding?: boolean;
9
+ auto_select?: boolean;
10
+ purchase_option_id?: QuoteRequestPurchaseOption['id'];
11
11
  }
@@ -14,7 +14,7 @@ export type QuoteRequestStatus = 'new' | 'draft' | 'in-progress' | 'with-custome
14
14
 
15
15
  export type QuoteRequestSource = 'web' | 'phone' | 'show' | 'existing-customer' | 'mighway' | 'agent' | 'entry-form' | 'bularangi';
16
16
 
17
- export type QuoteRequestAutomatch = 'QUOTE' | 'EMAIL' | 'REGISTRATION' | 'DUPLICATE';
17
+ export type QuoteRequestAutomatch = 'quote' | 'email' | 'registration' | 'duplicate';
18
18
 
19
19
  export interface QuoteRequestUser {
20
20
  id: number;
@@ -44,6 +44,7 @@ export interface QuoteRequest {
44
44
  has_automatch?: boolean;
45
45
  automatch_by?: QuoteRequestAutomatch;
46
46
  automatch_client_id?: string;
47
+ automatch_registrations?: string;
47
48
  promo_code?: string;
48
49
  club_membership_number?: string;
49
50
  broker_fee?: number;
@@ -1,32 +1,34 @@
1
- import { PolicyBenefit } from "./PolicyBenefit";
1
+ import { PolicyBenefit, PolicyBenefitTemplate } from "./PolicyBenefit";
2
2
  import { PolicyEnhancement } from "./PolicyEnhancement";
3
3
 
4
4
  export interface QuoteRequestPurchaseOption {
5
- id: number;
6
- quote_request_id: string;
7
- level_of_insurance_id: number | null;
8
- sort_order: number | null;
9
- description: string | null;
10
- premium: number | null;
11
- monthly_premium: number | null;
12
- show_monthly: boolean | null;
13
- fsl: number | null;
14
- gst: number | null;
15
- premium_type: PremiumType | null;
16
- policy_starts_at: string | null;
17
- sold_at: string | null;
18
- is_paid: boolean | null;
19
- payment_frequency: PaymentFrequency | null;
20
- excess_details: string | null;
21
- terms: string | null;
22
- authorised_drivers: string | null;
23
- draft: boolean | null;
24
- benefit_template_id: number | null;
5
+ id?: number;
6
+ quote_request_id?: string;
7
+ level_of_insurance_id?: number;
8
+ sort_order?: number;
9
+ description?: string;
10
+ premium?: number;
11
+ monthly_premium?: number;
12
+ show_monthly?: boolean;
13
+ fsl?: number;
14
+ gst?: number;
15
+ premium_type?: PremiumType;
16
+ policy_starts_at?: string;
17
+ sold_at?: string;
18
+ is_paid?: boolean;
19
+ payment_frequency?: PaymentFrequency;
20
+ excess_details?: string;
21
+ terms?: string;
22
+ authorised_drivers?: string;
23
+ is_draft?: boolean;
24
+ is_direct_debit?: boolean;
25
+ benefit_template_id?: number;
25
26
 
26
27
  // Relationships
27
28
  level_of_insurance?: LevelOfInsurance;
28
29
  enhancements?: PolicyEnhancement[];
29
30
  benefits?: PolicyBenefit[];
31
+ benefit_template?: PolicyBenefitTemplate;
30
32
  }
31
33
 
32
34
  export type PremiumType = 'annual' | 'total-due';