@star-insure/sdk 0.1.4 → 0.1.7

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,6 +1,6 @@
1
1
  import { Product, VehicleType } from "../../api";
2
2
  import { Club } from "./Club";
3
- import { QuoteRequestIncident } from "./QuoteRequestForm";
3
+ import { QuoteRequestIncident } from "./QuoteRequestIncident";
4
4
  import { Lead } from "./Lead";
5
5
  import { PostalAddress } from "./PostalAddress";
6
6
  import { QuoteRequestDeclaration } from "./QuoteRequestDeclaration";
@@ -33,8 +33,8 @@ export interface QuoteRequest {
33
33
  phone: string | null;
34
34
  mobile: string | null;
35
35
  email: string | null;
36
- license: string | null;
37
- license_other: string | null;
36
+ licence: string | null;
37
+ licence_other: string | null;
38
38
  has_automatch: boolean | null;
39
39
  automatch_by: QuoteRequestAutomatch;
40
40
  automatch_client_id: string | null;
@@ -81,94 +81,100 @@ export interface QuoteRequestForm {
81
81
  id?: string;
82
82
  status?: QuoteRequestStatus;
83
83
  source?: QuoteRequestSource;
84
- reference?: string | null;
85
- client_number?: string | null;
86
- first_name?: string | null;
87
- last_name?: string | null;
88
- phone?: string | null;
89
- mobile?: string | null;
90
- email?: string | null;
91
- license?: string | null;
92
- license_other?: string | null;
93
- promo_code?: string | null;
94
- club_membership_number?: string | null;
95
- broker_fee?: number | null;
96
- length_of_insurance?: string | null;
97
- theme?: string | null;
98
- dob?: string | null;
99
- sold_at?: string | null;
100
- sent_at?: string | null;
101
- pricing_expires_at?: string | null;
102
- follow_up_at?: string | null;
103
- status_id?: QuoteRequestStatus;
104
- source_id?: QuoteRequestSource;
105
- referrer_id?: QuoteRequestReferrer['id'] | null;
106
- referrer_category_id?: QuoteRequestReferrerCategory['id'] | null;
107
- staff_member_id?: QuoteRequestUser['id'] | null;
108
- agent_id?: QuoteRequestUser['id'] | null;
109
- agent_firm_id?: QuoteRequestUserGroup['id'] | null;
110
- broker_firm_id?: QuoteRequestUserGroup['id'] | null;
111
- broker_id?: QuoteRequestUser['id'] | null;
112
- club_id?: Club['id'] | null;
84
+ reference?: string;
85
+ client_number?: string;
86
+ first_name?: string;
87
+ last_name?: string;
88
+ phone?: string;
89
+ mobile?: string;
90
+ email?: string;
91
+ licence?: string;
92
+ licence_other?: string;
93
+ promo_code?: string;
94
+ club_membership_number?: string;
95
+ broker_fee?: number;
96
+ length_of_insurance?: string;
97
+ theme?: string;
98
+ dob?: string;
99
+ sold_at?: string;
100
+ sent_at?: string;
101
+ pricing_expires_at?: string;
102
+ follow_up_at?: string;
103
+ referrer_id?: QuoteRequestReferrer['id'];
104
+ referrer_category_id?: QuoteRequestReferrerCategory['id'];
105
+ staff_member_id?: QuoteRequestUser['id'];
106
+ agent_id?: QuoteRequestUser['id'];
107
+ agent_firm_id?: QuoteRequestUserGroup['id'];
108
+ broker_firm_id?: QuoteRequestUserGroup['id'];
109
+ broker_id?: QuoteRequestUser['id'];
110
+ club_id?: Club['id'];
111
+ street_address: {
112
+ id?: number;
113
+ address?: string;
114
+ unit?: string;
115
+ suburb?: string;
116
+ city?: string;
117
+ post_code?: string;
118
+ };
113
119
  declaration: {
114
120
  id?: number;
115
- had_incident?: boolean | null;
116
- incidents?: QuoteRequestIncident[] | null;
117
- has_demerit_points?: boolean | null;
118
- demerit_points?: string | null;
119
- has_lost_license?: boolean | null;
120
- lost_license_details?: string | null;
121
- was_refused_insurance?: boolean | null;
122
- refused_insurance_details?: string | null;
123
- has_criminal_conviction?: boolean | null;
124
- criminal_conviction_details?: string | null;
125
- has_vehicle_modifications?: boolean | null;
126
- vehicle_modifications_details?: string | null;
127
- has_previous_insurer?: boolean | null;
128
- previous_insurer_details?: string | null;
129
- previous_insurer_expires_at?: string | null;
130
- additional_details?: string | null;
121
+ had_incident?: boolean;
122
+ incidents?: QuoteRequestIncident[];
123
+ has_demerit_points?: boolean;
124
+ demerit_points?: string;
125
+ has_lost_licence?: boolean;
126
+ lost_licence_details?: string;
127
+ was_refused_insurance?: boolean;
128
+ refused_insurance_details?: string;
129
+ has_criminal_conviction?: boolean;
130
+ criminal_conviction_details?: string;
131
+ has_vehicle_modifications?: boolean;
132
+ vehicle_modifications_details?: string;
133
+ has_previous_insurer?: boolean;
134
+ previous_insurer_details?: string;
135
+ previous_insurer_expires_at?: string;
136
+ additional_details?: string;
131
137
  };
132
138
  vehicles: {
133
139
  id?: number;
134
- vehicle_type?: VehicleType | null;
135
- registration?: string | null;
136
- make?: string | null;
137
- model?: string | null;
138
- year?: string | null;
139
- usage?: string | null;
140
- product?: Product | null;
141
- has_financially_interested_party?: boolean | null;
142
- financially_interested_party_detail?: string | null;
143
- owned_duration?: string | null;
144
- value?: number | null;
145
- storage_location?: string | null;
146
- is_heavy?: boolean | null;
140
+ vehicle_type?: VehicleType;
141
+ registration?: string;
142
+ make?: string;
143
+ model?: string;
144
+ year?: string;
145
+ usage?: string;
146
+ product?: Product;
147
+ has_financially_interested_party?: boolean;
148
+ financially_interested_party_detail?: string;
149
+ owned_duration?: string;
150
+ value?: number;
151
+ storage_location?: string;
152
+ is_heavy?: boolean;
147
153
  drivers: {
148
154
  id?: number;
149
155
  first_name?: string;
150
156
  last_name?: string;
151
- dob?: string | null;
152
- relationship?: string | null;
153
- licence?: string | null;
154
- licence_other?: string | null;
157
+ dob?: string;
158
+ relationship?: string;
159
+ licence?: string;
160
+ licence_other?: string;
155
161
  }[];
156
162
  }[];
157
163
  purchaseOptions?: {
158
164
  id?: number;
159
- level_of_insurance_id?: number | null;
160
- sort_order?: number | null;
161
- description?: string | null;
162
- base_premium?: number | null;
163
- premium?: number | null;
164
- monthly_premium?: number | null;
165
- show_monthly?: boolean | null;
166
- fsl?: number | null;
167
- gst?: number | null;
168
- premium_type?: PremiumType | null;
169
- policy_starts_at?: string | null;
170
- sold_at?: string | null;
171
- is_paid?: boolean | null;
172
- payment_frequency?: PaymentFrequency | null;
165
+ level_of_insurance_id?: number;
166
+ sort_order?: number;
167
+ description?: string;
168
+ base_premium?: number;
169
+ premium?: number;
170
+ monthly_premium?: number;
171
+ show_monthly?: boolean;
172
+ fsl?: number;
173
+ gst?: number;
174
+ premium_type?: PremiumType;
175
+ policy_starts_at?: string;
176
+ sold_at?: string;
177
+ is_paid?: boolean;
178
+ payment_frequency?: PaymentFrequency;
173
179
  };
174
180
  }
@@ -1,5 +1,5 @@
1
1
  import { QuoteRequest } from "./QuoteRequest";
2
- import { QuoteRequestIncident } from "./QuoteRequestForm";
2
+ import { QuoteRequestIncident } from "./QuoteRequestIncident";
3
3
  export interface QuoteRequestDeclaration {
4
4
  id: number;
5
5
  quote_request_id: QuoteRequest['id'] | null;
@@ -7,8 +7,8 @@ export interface QuoteRequestDeclaration {
7
7
  incidents: QuoteRequestIncident[] | null;
8
8
  has_demerit_points: boolean | null;
9
9
  demerit_points: string | null;
10
- has_lost_license: boolean | null;
11
- lost_license_details: string | null;
10
+ has_lost_licence: boolean | null;
11
+ lost_licence_details: string | null;
12
12
  was_refused_insurance: boolean | null;
13
13
  refused_insurance_details: string | null;
14
14
  has_criminal_conviction: boolean | null;
@@ -10,4 +10,4 @@ export * from './Club';
10
10
  export * from './Lead';
11
11
  export * from './StreetAddress';
12
12
  export * from './PostalAddress';
13
- export * from './QuoteRequestForm';
13
+ export * from './QuoteRequestIncident';
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.4",
5
+ "version": "0.1.7",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
@@ -1,6 +1,6 @@
1
1
  import { Product, VehicleType } from "../../api";
2
2
  import { Club } from "./Club";
3
- import { QuoteRequestIncident } from "./QuoteRequestForm";
3
+ import { QuoteRequestIncident } from "./QuoteRequestIncident";
4
4
  import { Lead } from "./Lead";
5
5
  import { PostalAddress } from "./PostalAddress";
6
6
  import { QuoteRequestDeclaration } from "./QuoteRequestDeclaration";
@@ -39,8 +39,8 @@ export interface QuoteRequest {
39
39
  phone: string | null;
40
40
  mobile: string | null;
41
41
  email: string | null;
42
- license: string | null;
43
- license_other: string | null;
42
+ licence: string | null;
43
+ licence_other: string | null;
44
44
  has_automatch: boolean | null;
45
45
  automatch_by: QuoteRequestAutomatch;
46
46
  automatch_client_id: string | null;
@@ -94,100 +94,107 @@ export interface QuoteRequestForm {
94
94
  id?: string;
95
95
  status?: QuoteRequestStatus;
96
96
  source?: QuoteRequestSource;
97
- reference?: string | null;
98
- client_number?: string | null;
99
- first_name?: string | null;
100
- last_name?: string | null;
101
- phone?: string | null;
102
- mobile?: string | null;
103
- email?: string | null;
104
- license?: string | null;
105
- license_other?: string | null;
106
- promo_code?: string | null;
107
- club_membership_number?: string | null;
108
- broker_fee?: number | null;
109
- length_of_insurance?: string | null;
110
- theme?: string | null;
111
-
112
- dob?: string | null;
113
- sold_at?: string | null;
114
- sent_at?: string | null;
115
- pricing_expires_at?: string | null;
116
- follow_up_at?: string | null;
97
+ reference?: string;
98
+ client_number?: string;
99
+ first_name?: string;
100
+ last_name?: string;
101
+ phone?: string;
102
+ mobile?: string;
103
+ email?: string;
104
+ licence?: string;
105
+ licence_other?: string;
106
+ promo_code?: string;
107
+ club_membership_number?: string;
108
+ broker_fee?: number;
109
+ length_of_insurance?: string;
110
+ theme?: string;
111
+
112
+ dob?: string;
113
+ sold_at?: string;
114
+ sent_at?: string;
115
+ pricing_expires_at?: string;
116
+ follow_up_at?: string;
117
117
 
118
118
  // Foreign keys
119
- status_id?: QuoteRequestStatus;
120
- source_id?: QuoteRequestSource;
121
- referrer_id?: QuoteRequestReferrer['id'] | null;
122
- referrer_category_id?: QuoteRequestReferrerCategory['id'] | null;
123
- staff_member_id?: QuoteRequestUser['id'] | null;
124
- agent_id?: QuoteRequestUser['id'] | null;
125
- agent_firm_id?: QuoteRequestUserGroup['id'] | null;
126
- broker_firm_id?: QuoteRequestUserGroup['id'] | null;
127
- broker_id?: QuoteRequestUser['id'] | null;
128
- club_id?: Club['id'] | null;
119
+ referrer_id?: QuoteRequestReferrer['id'];
120
+ referrer_category_id?: QuoteRequestReferrerCategory['id'];
121
+ staff_member_id?: QuoteRequestUser['id'];
122
+ agent_id?: QuoteRequestUser['id'];
123
+ agent_firm_id?: QuoteRequestUserGroup['id'];
124
+ broker_firm_id?: QuoteRequestUserGroup['id'];
125
+ broker_id?: QuoteRequestUser['id'];
126
+ club_id?: Club['id'];
127
+
128
+ street_address: {
129
+ id?: number;
130
+ address?: string;
131
+ unit?: string;
132
+ suburb?: string;
133
+ city?: string;
134
+ post_code?: string;
135
+ },
129
136
 
130
137
  declaration: {
131
138
  id?: number;
132
- had_incident?: boolean | null;
133
- incidents?: QuoteRequestIncident[] | null;
134
- has_demerit_points?: boolean | null;
135
- demerit_points?: string | null;
136
- has_lost_license?: boolean | null;
137
- lost_license_details?: string | null;
138
- was_refused_insurance?: boolean | null;
139
- refused_insurance_details?: string | null;
140
- has_criminal_conviction?: boolean | null;
141
- criminal_conviction_details?: string | null;
142
- has_vehicle_modifications?: boolean | null;
143
- vehicle_modifications_details?: string | null;
144
- has_previous_insurer?: boolean | null;
145
- previous_insurer_details?: string | null;
146
- previous_insurer_expires_at?: string | null;
147
- additional_details?: string | null;
139
+ had_incident?: boolean;
140
+ incidents?: QuoteRequestIncident[];
141
+ has_demerit_points?: boolean;
142
+ demerit_points?: string;
143
+ has_lost_licence?: boolean;
144
+ lost_licence_details?: string;
145
+ was_refused_insurance?: boolean;
146
+ refused_insurance_details?: string;
147
+ has_criminal_conviction?: boolean;
148
+ criminal_conviction_details?: string;
149
+ has_vehicle_modifications?: boolean;
150
+ vehicle_modifications_details?: string;
151
+ has_previous_insurer?: boolean;
152
+ previous_insurer_details?: string;
153
+ previous_insurer_expires_at?: string;
154
+ additional_details?: string;
148
155
  }
149
156
 
150
157
  vehicles: {
151
158
  id?: number;
152
- vehicle_type?: VehicleType | null;
153
- registration?: string | null;
154
- make?: string | null;
155
- model?: string | null;
156
- year?: string | null;
157
- usage?: string | null;
158
- product?: Product | null;
159
- has_financially_interested_party?: boolean | null;
160
- financially_interested_party_detail?: string | null;
161
- owned_duration?: string | null;
162
- value?: number | null;
163
- storage_location?: string | null;
164
- is_heavy?: boolean | null;
159
+ vehicle_type?: VehicleType;
160
+ registration?: string;
161
+ make?: string;
162
+ model?: string;
163
+ year?: string;
164
+ usage?: string;
165
+ product?: Product;
166
+ has_financially_interested_party?: boolean;
167
+ financially_interested_party_detail?: string;
168
+ owned_duration?: string;
169
+ value?: number;
170
+ storage_location?: string;
171
+ is_heavy?: boolean;
165
172
  drivers: {
166
173
  id?: number;
167
174
  first_name?: string;
168
175
  last_name?: string;
169
- dob?: string | null;
170
- relationship?: string | null;
171
- licence?: string | null;
172
- licence_other?: string | null;
176
+ dob?: string;
177
+ relationship?: string;
178
+ licence?: string;
179
+ licence_other?: string;
173
180
  }[];
174
181
  }[],
175
182
 
176
183
  purchaseOptions?: {
177
184
  id?: number;
178
- level_of_insurance_id?: number | null;
179
- sort_order?: number | null;
180
- description?: string | null;
181
- base_premium?: number | null;
182
- premium?: number | null;
183
- monthly_premium?: number | null;
184
- show_monthly?: boolean | null;
185
- fsl?: number | null;
186
- gst?: number | null;
187
- premium_type?: PremiumType | null;
188
- policy_starts_at?: string | null;
189
- sold_at?: string | null;
190
- is_paid?: boolean | null;
191
- payment_frequency?: PaymentFrequency | null;
185
+ level_of_insurance_id?: number;
186
+ sort_order?: number;
187
+ description?: string;
188
+ base_premium?: number;
189
+ premium?: number;
190
+ monthly_premium?: number;
191
+ show_monthly?: boolean;
192
+ fsl?: number;
193
+ gst?: number;
194
+ premium_type?: PremiumType;
195
+ policy_starts_at?: string;
196
+ sold_at?: string;
197
+ is_paid?: boolean;
198
+ payment_frequency?: PaymentFrequency;
192
199
  },
193
200
  }
@@ -1,5 +1,6 @@
1
1
  import { QuoteRequest } from "./QuoteRequest";
2
- import { QuoteRequestIncident } from "./QuoteRequestForm";
2
+ import { QuoteRequestIncident } from "./QuoteRequestIncident";
3
+
3
4
  export interface QuoteRequestDeclaration {
4
5
  id: number;
5
6
  quote_request_id: QuoteRequest['id'] | null;
@@ -7,8 +8,8 @@ export interface QuoteRequestDeclaration {
7
8
  incidents: QuoteRequestIncident[] | null;
8
9
  has_demerit_points: boolean | null;
9
10
  demerit_points: string | null;
10
- has_lost_license: boolean | null;
11
- lost_license_details: string | null;
11
+ has_lost_licence: boolean | null;
12
+ lost_licence_details: string | null;
12
13
  was_refused_insurance: boolean | null;
13
14
  refused_insurance_details: string | null;
14
15
  has_criminal_conviction: boolean | null;
@@ -10,4 +10,4 @@ export * from './Club';
10
10
  export * from './Lead';
11
11
  export * from './StreetAddress';
12
12
  export * from './PostalAddress';
13
- export * from './QuoteRequestForm';
13
+ export * from './QuoteRequestIncident';