@star-insure/sdk 0.1.14 → 0.1.17

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.
@@ -0,0 +1,4 @@
1
+ export interface PolicyBenefit {
2
+ id: number;
3
+ name: string | null;
4
+ }
@@ -1,2 +1,13 @@
1
+ import { PremiumType, QuoteRequestPurchaseOption } from "./QuoteRequestPurchaseOption";
1
2
  export interface PolicyEnhancement {
3
+ id: number;
4
+ title: string | null;
5
+ description: string | null;
6
+ premium: number | null;
7
+ monthly_premium: number | null;
8
+ disable_rounding: boolean | null;
9
+ auto_select: boolean | null;
10
+ show_monthly: boolean | null;
11
+ premium_type: PremiumType | null;
12
+ purchase_option_id: QuoteRequestPurchaseOption['id'] | null;
2
13
  }
@@ -1,10 +1,9 @@
1
- import { Product, VehicleType } from "../../api";
2
1
  import { Club } from "./Club";
3
2
  import { Lead } from "./Lead";
4
3
  import { PostalAddress } from "./PostalAddress";
5
4
  import { QuoteRequestDeclaration } from "./QuoteRequestDeclaration";
6
5
  import { QuoteRequestLog } from "./QuoteRequestLog";
7
- import { PaymentFrequency, PremiumType, QuoteRequestPurchaseOption } from "./QuoteRequestPurchaseOption";
6
+ import { QuoteRequestPurchaseOption } from "./QuoteRequestPurchaseOption";
8
7
  import { QuoteRequestReferrer } from "./QuoteRequestReferrer";
9
8
  import { QuoteRequestReferrerCategory } from "./QuoteRequestReferrerCategory";
10
9
  import { QuoteRequestVehicle } from "./QuoteRequestVehicle";
@@ -76,108 +75,3 @@ export interface QuoteRequest {
76
75
  purchase_options?: QuoteRequestPurchaseOption[];
77
76
  logs?: QuoteRequestLog[];
78
77
  }
79
- export interface QuoteRequestForm {
80
- id?: string;
81
- status?: QuoteRequestStatus;
82
- source?: QuoteRequestSource;
83
- reference?: string;
84
- client_number?: string;
85
- first_name?: string;
86
- last_name?: string;
87
- phone?: string;
88
- mobile?: string;
89
- email?: string;
90
- licence?: string;
91
- licence_other?: string;
92
- promo_code?: string;
93
- club_membership_number?: string;
94
- broker_fee?: number;
95
- length_of_insurance?: string;
96
- theme?: string;
97
- dob?: string;
98
- sold_at?: string;
99
- sent_at?: string;
100
- pricing_expires_at?: string;
101
- follow_up_at?: string;
102
- referrer_id?: QuoteRequestReferrer['id'];
103
- referrer_category_id?: QuoteRequestReferrerCategory['id'];
104
- staff_member_id?: QuoteRequestUser['id'];
105
- agent_id?: QuoteRequestUser['id'];
106
- agent_firm_id?: QuoteRequestUserGroup['id'];
107
- broker_firm_id?: QuoteRequestUserGroup['id'];
108
- broker_id?: QuoteRequestUser['id'];
109
- club_id?: Club['id'];
110
- street_address: {
111
- id?: number;
112
- address?: string;
113
- unit?: string;
114
- suburb?: string;
115
- city?: string;
116
- post_code?: string;
117
- };
118
- declaration: {
119
- id?: number;
120
- had_incident?: boolean;
121
- incidents: {
122
- year?: string;
123
- month?: string;
124
- description?: string;
125
- }[];
126
- has_demerit_points?: boolean;
127
- demerit_points?: string;
128
- has_lost_licence?: boolean;
129
- lost_licence_details?: string;
130
- was_refused_insurance?: boolean;
131
- refused_insurance_details?: string;
132
- has_criminal_conviction?: boolean;
133
- criminal_conviction_details?: string;
134
- has_vehicle_modifications?: boolean;
135
- vehicle_modifications_details?: string;
136
- has_previous_insurer?: boolean;
137
- previous_insurer_details?: string;
138
- previous_insurer_expires_at?: string;
139
- additional_details?: string;
140
- };
141
- vehicles: {
142
- id?: number;
143
- vehicle_type?: VehicleType;
144
- registration?: string;
145
- make?: string;
146
- model?: string;
147
- year?: string;
148
- usage?: string;
149
- product?: Product;
150
- has_financially_interested_party?: boolean;
151
- financially_interested_party_detail?: string;
152
- owned_duration?: string;
153
- value?: number;
154
- storage_location?: string;
155
- is_heavy?: boolean;
156
- drivers: {
157
- id?: number;
158
- first_name?: string;
159
- last_name?: string;
160
- dob?: string;
161
- relationship?: string;
162
- licence?: string;
163
- licence_other?: string;
164
- }[];
165
- }[];
166
- purchaseOptions?: {
167
- id?: number;
168
- level_of_insurance_id?: number;
169
- sort_order?: number;
170
- description?: string;
171
- base_premium?: number;
172
- premium?: number;
173
- monthly_premium?: number;
174
- show_monthly?: boolean;
175
- fsl?: number;
176
- gst?: number;
177
- premium_type?: PremiumType;
178
- policy_starts_at?: string;
179
- sold_at?: string;
180
- is_paid?: boolean;
181
- payment_frequency?: PaymentFrequency;
182
- };
183
- }
@@ -0,0 +1,111 @@
1
+ import { Product, VehicleType } from "../../api";
2
+ import { Club } from "./Club";
3
+ import { QuoteRequestSource, QuoteRequestStatus, QuoteRequestUser, QuoteRequestUserGroup } from "./QuoteRequest";
4
+ import { PaymentFrequency, PremiumType } from "./QuoteRequestPurchaseOption";
5
+ import { QuoteRequestReferrer } from "./QuoteRequestReferrer";
6
+ import { QuoteRequestReferrerCategory } from "./QuoteRequestReferrerCategory";
7
+ export interface QuoteRequestForm {
8
+ id?: string;
9
+ status?: QuoteRequestStatus;
10
+ source?: QuoteRequestSource;
11
+ reference?: string;
12
+ client_number?: string;
13
+ first_name?: string;
14
+ last_name?: string;
15
+ phone?: string;
16
+ mobile?: string;
17
+ email?: string;
18
+ licence?: string;
19
+ licence_other?: string;
20
+ promo_code?: string;
21
+ club_membership_number?: string;
22
+ broker_fee?: number;
23
+ length_of_insurance?: string;
24
+ theme?: string;
25
+ dob?: string;
26
+ sold_at?: string;
27
+ sent_at?: string;
28
+ pricing_expires_at?: string;
29
+ follow_up_at?: string;
30
+ referrer_id?: QuoteRequestReferrer['id'];
31
+ referrer_category_id?: QuoteRequestReferrerCategory['id'];
32
+ staff_member_id?: QuoteRequestUser['id'];
33
+ agent_id?: QuoteRequestUser['id'];
34
+ agent_firm_id?: QuoteRequestUserGroup['id'];
35
+ broker_firm_id?: QuoteRequestUserGroup['id'];
36
+ broker_id?: QuoteRequestUser['id'];
37
+ club_id?: Club['id'];
38
+ street_address: {
39
+ id?: number;
40
+ address?: string;
41
+ unit?: string;
42
+ suburb?: string;
43
+ city?: string;
44
+ post_code?: string;
45
+ };
46
+ declaration: {
47
+ id?: number;
48
+ had_incident?: boolean;
49
+ incidents: {
50
+ year?: string;
51
+ month?: string;
52
+ description?: string;
53
+ }[];
54
+ has_demerit_points?: boolean;
55
+ demerit_points?: string;
56
+ has_lost_licence?: boolean;
57
+ lost_licence_details?: string;
58
+ was_refused_insurance?: boolean;
59
+ refused_insurance_details?: string;
60
+ has_criminal_conviction?: boolean;
61
+ criminal_conviction_details?: string;
62
+ has_vehicle_modifications?: boolean;
63
+ vehicle_modifications_details?: string;
64
+ has_previous_insurer?: boolean;
65
+ previous_insurer_details?: string;
66
+ previous_insurer_expires_at?: string;
67
+ additional_details?: string;
68
+ };
69
+ vehicles: {
70
+ id?: number;
71
+ vehicle_type?: VehicleType;
72
+ registration?: string;
73
+ make?: string;
74
+ model?: string;
75
+ year?: string;
76
+ usage?: string;
77
+ product?: Product;
78
+ has_financially_interested_party?: boolean;
79
+ financially_interested_party_detail?: string;
80
+ owned_duration?: string;
81
+ value?: number;
82
+ storage_location?: string;
83
+ is_heavy?: boolean;
84
+ drivers: {
85
+ id?: number;
86
+ first_name?: string;
87
+ last_name?: string;
88
+ dob?: string;
89
+ relationship?: string;
90
+ licence?: string;
91
+ licence_other?: string;
92
+ }[];
93
+ }[];
94
+ purchase_options: {
95
+ id?: number;
96
+ level_of_insurance_id?: number;
97
+ sort_order?: number;
98
+ description?: string;
99
+ base_premium?: number;
100
+ premium?: number;
101
+ monthly_premium?: number;
102
+ show_monthly?: boolean;
103
+ fsl?: number;
104
+ gst?: number;
105
+ premium_type?: PremiumType;
106
+ policy_starts_at?: string;
107
+ sold_at?: string;
108
+ is_paid?: boolean;
109
+ payment_frequency?: PaymentFrequency;
110
+ }[];
111
+ }
@@ -1,20 +1,31 @@
1
+ import { PolicyBenefit } from "./PolicyBenefit";
2
+ import { PolicyEnhancement } from "./PolicyEnhancement";
1
3
  export interface QuoteRequestPurchaseOption {
2
4
  id: number;
3
5
  quote_request_id: string;
4
6
  level_of_insurance_id: number | null;
5
7
  sort_order: number | null;
6
8
  description: string | null;
7
- base_premium: number | null;
8
9
  premium: number | null;
9
10
  monthly_premium: number | null;
10
11
  show_monthly: boolean | null;
11
12
  fsl: number | null;
12
13
  gst: number | null;
13
14
  premium_type: PremiumType | null;
14
- policy_starts_at: string | null | null;
15
- sold_at: string | null | null;
15
+ policy_starts_at: string | null;
16
+ sold_at: string | null;
16
17
  is_paid: boolean | null;
17
18
  payment_frequency: PaymentFrequency | null;
19
+ excess_details: string | null;
20
+ terms: string | null;
21
+ authorised_drivers: string | null;
22
+ level_of_insurance?: LevelOfInsurance;
23
+ enhancements?: PolicyEnhancement[];
24
+ benefits?: PolicyBenefit[];
18
25
  }
19
26
  export declare type PremiumType = 'annual' | 'total-due';
20
27
  export declare type PaymentFrequency = 'monthly' | 'annually';
28
+ export interface LevelOfInsurance {
29
+ id: number;
30
+ name: string;
31
+ }
@@ -13,3 +13,6 @@ export * from './PostalAddress';
13
13
  export * from './QuoteRequestIncident';
14
14
  export * from './QuoteRequestOptions';
15
15
  export * from './RedbookVehicle';
16
+ export * from './QuoteRequestForm';
17
+ export * from './QuoteRequestForm';
18
+ export * from './PolicyBenefit';
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.1.14",
5
+ "version": "0.1.17",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
@@ -0,0 +1,4 @@
1
+ export interface PolicyBenefit {
2
+ id: number;
3
+ name: string | null;
4
+ }
@@ -1,3 +1,14 @@
1
- export interface PolicyEnhancement {
1
+ import { PremiumType, QuoteRequestPurchaseOption } from "./QuoteRequestPurchaseOption";
2
2
 
3
+ export interface PolicyEnhancement {
4
+ id: number;
5
+ title: string | null;
6
+ description: string | null;
7
+ premium: number | null;
8
+ monthly_premium: number | null;
9
+ disable_rounding: boolean | null;
10
+ auto_select: boolean | null;
11
+ show_monthly: boolean | null;
12
+ premium_type: PremiumType | null;
13
+ purchase_option_id: QuoteRequestPurchaseOption['id'] | null;
3
14
  }
@@ -1,10 +1,9 @@
1
- import { Product, VehicleType } from "../../api";
2
1
  import { Club } from "./Club";
3
2
  import { Lead } from "./Lead";
4
3
  import { PostalAddress } from "./PostalAddress";
5
4
  import { QuoteRequestDeclaration } from "./QuoteRequestDeclaration";
6
5
  import { QuoteRequestLog } from "./QuoteRequestLog";
7
- import { PaymentFrequency, PremiumType, QuoteRequestPurchaseOption } from "./QuoteRequestPurchaseOption";
6
+ import { QuoteRequestPurchaseOption } from "./QuoteRequestPurchaseOption";
8
7
  import { QuoteRequestReferrer } from "./QuoteRequestReferrer";
9
8
  import { QuoteRequestReferrerCategory } from "./QuoteRequestReferrerCategory";
10
9
  import { QuoteRequestVehicle } from "./QuoteRequestVehicle";
@@ -88,116 +87,3 @@ export interface QuoteRequest {
88
87
  purchase_options?: QuoteRequestPurchaseOption[];
89
88
  logs?: QuoteRequestLog[];
90
89
  }
91
-
92
- export interface QuoteRequestForm {
93
- id?: string;
94
- status?: QuoteRequestStatus;
95
- source?: QuoteRequestSource;
96
- reference?: string;
97
- client_number?: string;
98
- first_name?: string;
99
- last_name?: string;
100
- phone?: string;
101
- mobile?: string;
102
- email?: string;
103
- licence?: string;
104
- licence_other?: string;
105
- promo_code?: string;
106
- club_membership_number?: string;
107
- broker_fee?: number;
108
- length_of_insurance?: string;
109
- theme?: string;
110
-
111
- dob?: string;
112
- sold_at?: string;
113
- sent_at?: string;
114
- pricing_expires_at?: string;
115
- follow_up_at?: string;
116
-
117
- // Foreign keys
118
- referrer_id?: QuoteRequestReferrer['id'];
119
- referrer_category_id?: QuoteRequestReferrerCategory['id'];
120
- staff_member_id?: QuoteRequestUser['id'];
121
- agent_id?: QuoteRequestUser['id'];
122
- agent_firm_id?: QuoteRequestUserGroup['id'];
123
- broker_firm_id?: QuoteRequestUserGroup['id'];
124
- broker_id?: QuoteRequestUser['id'];
125
- club_id?: Club['id'];
126
-
127
- street_address: {
128
- id?: number;
129
- address?: string;
130
- unit?: string;
131
- suburb?: string;
132
- city?: string;
133
- post_code?: string;
134
- },
135
-
136
- declaration: {
137
- id?: number;
138
- had_incident?: boolean;
139
- incidents: {
140
- year?: string;
141
- month?: string;
142
- description?: string;
143
- }[];
144
- has_demerit_points?: boolean;
145
- demerit_points?: string;
146
- has_lost_licence?: boolean;
147
- lost_licence_details?: string;
148
- was_refused_insurance?: boolean;
149
- refused_insurance_details?: string;
150
- has_criminal_conviction?: boolean;
151
- criminal_conviction_details?: string;
152
- has_vehicle_modifications?: boolean;
153
- vehicle_modifications_details?: string;
154
- has_previous_insurer?: boolean;
155
- previous_insurer_details?: string;
156
- previous_insurer_expires_at?: string;
157
- additional_details?: string;
158
- }
159
-
160
- vehicles: {
161
- id?: number;
162
- vehicle_type?: VehicleType;
163
- registration?: string;
164
- make?: string;
165
- model?: string;
166
- year?: string;
167
- usage?: string;
168
- product?: Product;
169
- has_financially_interested_party?: boolean;
170
- financially_interested_party_detail?: string;
171
- owned_duration?: string;
172
- value?: number;
173
- storage_location?: string;
174
- is_heavy?: boolean;
175
- drivers: {
176
- id?: number;
177
- first_name?: string;
178
- last_name?: string;
179
- dob?: string;
180
- relationship?: string;
181
- licence?: string;
182
- licence_other?: string;
183
- }[];
184
- }[],
185
-
186
- purchaseOptions?: {
187
- id?: number;
188
- level_of_insurance_id?: number;
189
- sort_order?: number;
190
- description?: string;
191
- base_premium?: number;
192
- premium?: number;
193
- monthly_premium?: number;
194
- show_monthly?: boolean;
195
- fsl?: number;
196
- gst?: number;
197
- premium_type?: PremiumType;
198
- policy_starts_at?: string;
199
- sold_at?: string;
200
- is_paid?: boolean;
201
- payment_frequency?: PaymentFrequency;
202
- },
203
- }
@@ -0,0 +1,118 @@
1
+ import { Product, VehicleType } from "../../api";
2
+ import { Club } from "./Club";
3
+ import { QuoteRequestSource, QuoteRequestStatus, QuoteRequestUser, QuoteRequestUserGroup } from "./QuoteRequest";
4
+ import { PaymentFrequency, PremiumType } from "./QuoteRequestPurchaseOption";
5
+ import { QuoteRequestReferrer } from "./QuoteRequestReferrer";
6
+ import { QuoteRequestReferrerCategory } from "./QuoteRequestReferrerCategory";
7
+
8
+ export interface QuoteRequestForm {
9
+ id?: string;
10
+ status?: QuoteRequestStatus;
11
+ source?: QuoteRequestSource;
12
+ reference?: string;
13
+ client_number?: string;
14
+ first_name?: string;
15
+ last_name?: string;
16
+ phone?: string;
17
+ mobile?: string;
18
+ email?: string;
19
+ licence?: string;
20
+ licence_other?: string;
21
+ promo_code?: string;
22
+ club_membership_number?: string;
23
+ broker_fee?: number;
24
+ length_of_insurance?: string;
25
+ theme?: string;
26
+
27
+ dob?: string;
28
+ sold_at?: string;
29
+ sent_at?: string;
30
+ pricing_expires_at?: string;
31
+ follow_up_at?: string;
32
+
33
+ referrer_id?: QuoteRequestReferrer['id'];
34
+ referrer_category_id?: QuoteRequestReferrerCategory['id'];
35
+ staff_member_id?: QuoteRequestUser['id'];
36
+ agent_id?: QuoteRequestUser['id'];
37
+ agent_firm_id?: QuoteRequestUserGroup['id'];
38
+ broker_firm_id?: QuoteRequestUserGroup['id'];
39
+ broker_id?: QuoteRequestUser['id'];
40
+ club_id?: Club['id'];
41
+
42
+ street_address: {
43
+ id?: number;
44
+ address?: string;
45
+ unit?: string;
46
+ suburb?: string;
47
+ city?: string;
48
+ post_code?: string;
49
+ },
50
+
51
+ declaration: {
52
+ id?: number;
53
+ had_incident?: boolean;
54
+ incidents: {
55
+ year?: string;
56
+ month?: string;
57
+ description?: string;
58
+ }[];
59
+ has_demerit_points?: boolean;
60
+ demerit_points?: string;
61
+ has_lost_licence?: boolean;
62
+ lost_licence_details?: string;
63
+ was_refused_insurance?: boolean;
64
+ refused_insurance_details?: string;
65
+ has_criminal_conviction?: boolean;
66
+ criminal_conviction_details?: string;
67
+ has_vehicle_modifications?: boolean;
68
+ vehicle_modifications_details?: string;
69
+ has_previous_insurer?: boolean;
70
+ previous_insurer_details?: string;
71
+ previous_insurer_expires_at?: string;
72
+ additional_details?: string;
73
+ }
74
+
75
+ vehicles: {
76
+ id?: number;
77
+ vehicle_type?: VehicleType;
78
+ registration?: string;
79
+ make?: string;
80
+ model?: string;
81
+ year?: string;
82
+ usage?: string;
83
+ product?: Product;
84
+ has_financially_interested_party?: boolean;
85
+ financially_interested_party_detail?: string;
86
+ owned_duration?: string;
87
+ value?: number;
88
+ storage_location?: string;
89
+ is_heavy?: boolean;
90
+ drivers: {
91
+ id?: number;
92
+ first_name?: string;
93
+ last_name?: string;
94
+ dob?: string;
95
+ relationship?: string;
96
+ licence?: string;
97
+ licence_other?: string;
98
+ }[];
99
+ }[],
100
+
101
+ purchase_options: {
102
+ id?: number;
103
+ level_of_insurance_id?: number;
104
+ sort_order?: number;
105
+ description?: string;
106
+ base_premium?: number;
107
+ premium?: number;
108
+ monthly_premium?: number;
109
+ show_monthly?: boolean;
110
+ fsl?: number;
111
+ gst?: number;
112
+ premium_type?: PremiumType;
113
+ policy_starts_at?: string;
114
+ sold_at?: string;
115
+ is_paid?: boolean;
116
+ payment_frequency?: PaymentFrequency;
117
+ }[],
118
+ }
@@ -1,22 +1,37 @@
1
+ import { PolicyBenefit } from "./PolicyBenefit";
2
+ import { PolicyEnhancement } from "./PolicyEnhancement";
3
+
1
4
  export interface QuoteRequestPurchaseOption {
2
5
  id: number;
3
6
  quote_request_id: string;
4
7
  level_of_insurance_id: number | null;
5
8
  sort_order: number | null;
6
9
  description: string | null;
7
- base_premium: number | null;
8
10
  premium: number | null;
9
11
  monthly_premium: number | null;
10
12
  show_monthly: boolean | null;
11
13
  fsl: number | null;
12
14
  gst: number | null;
13
15
  premium_type: PremiumType | null;
14
- policy_starts_at: string | null | null;
15
- sold_at: string | null | null;
16
+ policy_starts_at: string | null;
17
+ sold_at: string | null;
16
18
  is_paid: boolean | null;
17
19
  payment_frequency: PaymentFrequency | null;
20
+ excess_details: string | null;
21
+ terms: string | null;
22
+ authorised_drivers: string | null;
23
+
24
+ // Relationships
25
+ level_of_insurance?: LevelOfInsurance;
26
+ enhancements?: PolicyEnhancement[];
27
+ benefits?: PolicyBenefit[];
18
28
  }
19
29
 
20
30
  export type PremiumType = 'annual' | 'total-due';
21
31
 
22
32
  export type PaymentFrequency = 'monthly' | 'annually';
33
+
34
+ export interface LevelOfInsurance {
35
+ id: number;
36
+ name: string;
37
+ }
@@ -13,3 +13,6 @@ export * from './PostalAddress';
13
13
  export * from './QuoteRequestIncident';
14
14
  export * from './QuoteRequestOptions';
15
15
  export * from './RedbookVehicle';
16
+ export * from './QuoteRequestForm';
17
+ export * from './QuoteRequestForm';
18
+ export * from './PolicyBenefit';