@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.
- package/dist/types/models/quotes/PolicyBenefit.d.ts +12 -4
- package/dist/types/models/quotes/PolicyEnhancement.d.ts +7 -7
- package/dist/types/models/quotes/QuoteRequest.d.ts +2 -1
- package/dist/types/models/quotes/QuoteRequestPurchaseOption.d.ts +23 -21
- package/package.json +1 -1
- package/src/types/models/quotes/PolicyBenefit.ts +13 -4
- package/src/types/models/quotes/PolicyEnhancement.ts +7 -7
- package/src/types/models/quotes/QuoteRequest.ts +2 -1
- package/src/types/models/quotes/QuoteRequestPurchaseOption.ts +23 -21
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
export interface PolicyBenefit {
|
|
2
2
|
id: number;
|
|
3
|
-
name: string
|
|
4
|
-
description: string
|
|
5
|
-
sort_order: number
|
|
6
|
-
icon: string
|
|
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
|
|
4
|
-
name
|
|
5
|
-
description
|
|
6
|
-
premium
|
|
7
|
-
disable_rounding
|
|
8
|
-
auto_select
|
|
9
|
-
purchase_option_id
|
|
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 = '
|
|
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
|
|
5
|
-
quote_request_id
|
|
6
|
-
level_of_insurance_id
|
|
7
|
-
sort_order
|
|
8
|
-
description
|
|
9
|
-
premium
|
|
10
|
-
monthly_premium
|
|
11
|
-
show_monthly
|
|
12
|
-
fsl
|
|
13
|
-
gst
|
|
14
|
-
premium_type
|
|
15
|
-
policy_starts_at
|
|
16
|
-
sold_at
|
|
17
|
-
is_paid
|
|
18
|
-
payment_frequency
|
|
19
|
-
excess_details
|
|
20
|
-
terms
|
|
21
|
-
authorised_drivers
|
|
22
|
-
|
|
23
|
-
|
|
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.
|
|
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
|
|
4
|
-
description: string
|
|
5
|
-
sort_order: number
|
|
6
|
-
icon: string
|
|
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
|
|
5
|
-
name
|
|
6
|
-
description
|
|
7
|
-
premium
|
|
8
|
-
disable_rounding
|
|
9
|
-
auto_select
|
|
10
|
-
purchase_option_id
|
|
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 = '
|
|
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
|
|
6
|
-
quote_request_id
|
|
7
|
-
level_of_insurance_id
|
|
8
|
-
sort_order
|
|
9
|
-
description
|
|
10
|
-
premium
|
|
11
|
-
monthly_premium
|
|
12
|
-
show_monthly
|
|
13
|
-
fsl
|
|
14
|
-
gst
|
|
15
|
-
premium_type
|
|
16
|
-
policy_starts_at
|
|
17
|
-
sold_at
|
|
18
|
-
is_paid
|
|
19
|
-
payment_frequency
|
|
20
|
-
excess_details
|
|
21
|
-
terms
|
|
22
|
-
authorised_drivers
|
|
23
|
-
|
|
24
|
-
|
|
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';
|