@star-insure/sdk 0.1.5 → 0.1.8

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;
@@ -88,8 +88,8 @@ export interface QuoteRequestForm {
88
88
  phone?: string;
89
89
  mobile?: string;
90
90
  email?: string;
91
- license?: string;
92
- license_other?: string;
91
+ licence?: string;
92
+ licence_other?: string;
93
93
  promo_code?: string;
94
94
  club_membership_number?: string;
95
95
  broker_fee?: number;
@@ -108,14 +108,22 @@ export interface QuoteRequestForm {
108
108
  broker_firm_id?: QuoteRequestUserGroup['id'];
109
109
  broker_id?: QuoteRequestUser['id'];
110
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
+ };
111
119
  declaration: {
112
120
  id?: number;
113
121
  had_incident?: boolean;
114
122
  incidents?: QuoteRequestIncident[];
115
123
  has_demerit_points?: boolean;
116
124
  demerit_points?: string;
117
- has_lost_license?: boolean;
118
- lost_license_details?: string;
125
+ has_lost_licence?: boolean;
126
+ lost_licence_details?: string;
119
127
  was_refused_insurance?: boolean;
120
128
  refused_insurance_details?: string;
121
129
  has_criminal_conviction?: boolean;
@@ -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;
@@ -0,0 +1,40 @@
1
+ export interface QuoteRequestOptions {
2
+ club_options: SimpleOption;
3
+ driver_licence_options: SimpleOption;
4
+ incident_options: SimpleOption;
5
+ insurance_companies: SimpleOption;
6
+ level_of_insurance_options: SimpleOption;
7
+ policy_description_options: SimpleOption;
8
+ referrer_category_options: SimpleOption;
9
+ relationship_options: SimpleOption;
10
+ storage_location_options: SimpleOption;
11
+ vehicle_usage_options: SimpleOption;
12
+ policy_benefit_template_options: SimpleOption;
13
+ referrer_options: {
14
+ id: number;
15
+ name: string;
16
+ category_id: number;
17
+ };
18
+ policy_benefit_options: {
19
+ id: number;
20
+ name: string;
21
+ description: string;
22
+ auto_select: boolean;
23
+ template_id: number;
24
+ sort_order: number;
25
+ };
26
+ policy_enhancement_options: {
27
+ id: number;
28
+ title: string;
29
+ description: string;
30
+ premium: number;
31
+ monthly_premium: number;
32
+ disable_rounding: boolean;
33
+ auto_select: boolean;
34
+ };
35
+ }
36
+ interface SimpleOption {
37
+ id: number;
38
+ name: string;
39
+ }
40
+ export {};
@@ -10,4 +10,5 @@ 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';
14
+ export * from './QuoteRequestOptions';
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.5",
5
+ "version": "0.1.8",
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;
@@ -101,8 +101,8 @@ export interface QuoteRequestForm {
101
101
  phone?: string;
102
102
  mobile?: string;
103
103
  email?: string;
104
- license?: string;
105
- license_other?: string;
104
+ licence?: string;
105
+ licence_other?: string;
106
106
  promo_code?: string;
107
107
  club_membership_number?: string;
108
108
  broker_fee?: number;
@@ -125,14 +125,23 @@ export interface QuoteRequestForm {
125
125
  broker_id?: QuoteRequestUser['id'];
126
126
  club_id?: Club['id'];
127
127
 
128
+ street_address: {
129
+ id?: number;
130
+ address?: string;
131
+ unit?: string;
132
+ suburb?: string;
133
+ city?: string;
134
+ post_code?: string;
135
+ },
136
+
128
137
  declaration: {
129
138
  id?: number;
130
139
  had_incident?: boolean;
131
140
  incidents?: QuoteRequestIncident[];
132
141
  has_demerit_points?: boolean;
133
142
  demerit_points?: string;
134
- has_lost_license?: boolean;
135
- lost_license_details?: string;
143
+ has_lost_licence?: boolean;
144
+ lost_licence_details?: string;
136
145
  was_refused_insurance?: boolean;
137
146
  refused_insurance_details?: string;
138
147
  has_criminal_conviction?: boolean;
@@ -1,5 +1,5 @@
1
1
  import { QuoteRequest } from "./QuoteRequest";
2
- import { QuoteRequestIncident } from "./QuoteRequestForm";
2
+ import { QuoteRequestIncident } from "./QuoteRequestIncident";
3
3
 
4
4
  export interface QuoteRequestDeclaration {
5
5
  id: number;
@@ -8,8 +8,8 @@ export interface QuoteRequestDeclaration {
8
8
  incidents: QuoteRequestIncident[] | null;
9
9
  has_demerit_points: boolean | null;
10
10
  demerit_points: string | null;
11
- has_lost_license: boolean | null;
12
- lost_license_details: string | null;
11
+ has_lost_licence: boolean | null;
12
+ lost_licence_details: string | null;
13
13
  was_refused_insurance: boolean | null;
14
14
  refused_insurance_details: string | null;
15
15
  has_criminal_conviction: boolean | null;
@@ -0,0 +1,40 @@
1
+ export interface QuoteRequestOptions {
2
+ club_options: SimpleOption;
3
+ driver_licence_options: SimpleOption;
4
+ incident_options: SimpleOption;
5
+ insurance_companies: SimpleOption;
6
+ level_of_insurance_options: SimpleOption;
7
+ policy_description_options: SimpleOption;
8
+ referrer_category_options: SimpleOption;
9
+ relationship_options: SimpleOption;
10
+ storage_location_options: SimpleOption;
11
+ vehicle_usage_options: SimpleOption;
12
+ policy_benefit_template_options: SimpleOption;
13
+ referrer_options: {
14
+ id: number;
15
+ name: string;
16
+ category_id: number;
17
+ };
18
+ policy_benefit_options: {
19
+ id: number;
20
+ name: string;
21
+ description: string;
22
+ auto_select: boolean;
23
+ template_id: number;
24
+ sort_order: number;
25
+ };
26
+ policy_enhancement_options: {
27
+ id: number;
28
+ title: string;
29
+ description: string;
30
+ premium: number;
31
+ monthly_premium: number;
32
+ disable_rounding: boolean;
33
+ auto_select: boolean;
34
+ };
35
+ }
36
+
37
+ interface SimpleOption {
38
+ id: number;
39
+ name: string;
40
+ }
@@ -10,4 +10,5 @@ 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';
14
+ export * from './QuoteRequestOptions';