@star-insure/sdk 0.4.3 → 0.4.6

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
- id: number;
3
- name: string | null;
4
- description: string | null;
5
- sort_order: number | null;
6
- icon: string | null;
2
+ id?: number;
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
  }
@@ -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.3",
5
+ "version": "0.4.6",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
@@ -1,7 +1,16 @@
1
1
  export interface PolicyBenefit {
2
- id: number;
3
- name: string | null;
4
- description: string | null;
5
- sort_order: number | null;
6
- icon: string | null;
2
+ id?: number;
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
  }
@@ -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';