@star-insure/sdk 0.1.0 → 0.1.3
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/api/enums.d.ts +1 -0
- package/dist/types/api/index.d.ts +1 -0
- package/dist/types/api/responses/claimRequestActions.d.ts +12 -0
- package/dist/types/api/responses/index.d.ts +1 -0
- package/dist/types/models/oracle/Risk.d.ts +1 -0
- package/dist/types/models/oracle/TableData.d.ts +1 -0
- package/dist/types/models/quotes/Club.d.ts +4 -0
- package/dist/types/models/quotes/PolicyEnhancement.d.ts +2 -0
- package/dist/types/models/quotes/PostalAddress.d.ts +7 -0
- package/dist/types/models/quotes/QuoteRequest.d.ts +13 -64
- package/dist/types/models/quotes/QuoteRequestLog.d.ts +9 -0
- package/dist/types/models/quotes/QuoteRequestPurchaseOption.d.ts +20 -0
- package/dist/types/models/quotes/QuoteRequestReferrerCategory.d.ts +4 -0
- package/dist/types/models/quotes/QuoteRequestVehicle.d.ts +20 -0
- package/dist/types/models/quotes/QuoteRequestVehicleDriver.d.ts +10 -0
- package/dist/types/models/quotes/StreetAddress.d.ts +8 -0
- package/dist/types/models/quotes/index.d.ts +11 -0
- package/package.json +1 -1
- package/src/types/api/enums.ts +2 -0
- package/src/types/api/index.ts +1 -0
- package/src/types/api/responses/claimRequestActions.ts +12 -0
- package/src/types/api/responses/index.ts +1 -0
- package/src/types/models/oracle/Risk.ts +1 -0
- package/src/types/models/oracle/TableData.ts +1 -0
- package/src/types/models/quotes/Club.ts +4 -0
- package/src/types/models/quotes/Lead.ts +16 -0
- package/src/types/models/quotes/PolicyEnhancement.ts +3 -0
- package/src/types/models/quotes/PostalAddress.ts +7 -0
- package/src/types/models/quotes/QuoteRequest.ts +14 -71
- package/src/types/models/quotes/QuoteRequestDeclaration.ts +19 -0
- package/src/types/models/quotes/QuoteRequestLog.ts +10 -0
- package/src/types/models/quotes/QuoteRequestPurchaseOption.ts +22 -0
- package/src/types/models/quotes/QuoteRequestReferrer.ts +6 -0
- package/src/types/models/quotes/QuoteRequestReferrerCategory.ts +4 -0
- package/src/types/models/quotes/QuoteRequestVehicle.ts +21 -0
- package/src/types/models/quotes/QuoteRequestVehicleDriver.ts +10 -0
- package/src/types/models/quotes/StreetAddress.ts +8 -0
- package/src/types/models/quotes/index.ts +11 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare type VehicleType = 'car' | 'motorcycle' | 'motorhome';
|
|
2
2
|
export declare type Frequency = 'daily' | 'weekly' | 'fortnightly' | 'monthly' | 'quarterly' | 'annually';
|
|
3
3
|
export declare type Condition = 'poor' | 'fair' | 'good';
|
|
4
|
+
export declare type Product = 'star-enthusiast-prestige-everyday-plus' | 'star-enthusiast' | 'star-prestige' | 'star-everyday' | 'star-plus' | 'star-motorcycle' | 'star-campercare';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface OraclePolicyMatch {
|
|
2
|
+
ply_covernumber: string;
|
|
3
|
+
ply_verno: string;
|
|
4
|
+
ply_clientnumber: string;
|
|
5
|
+
ply_riskcode: string;
|
|
6
|
+
ply_effdate: string;
|
|
7
|
+
ply_current: '-1' | '0';
|
|
8
|
+
client?: {
|
|
9
|
+
cli_clientnumber: string;
|
|
10
|
+
cli_emailaddress?: string;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './claimRequestActions';
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
import { Club } from "./Club";
|
|
2
|
+
import { Lead } from "./Lead";
|
|
3
|
+
import { PostalAddress } from "./PostalAddress";
|
|
4
|
+
import { QuoteRequestDeclaration } from "./QuoteRequestDeclaration";
|
|
5
|
+
import { QuoteRequestLog } from "./QuoteRequestLog";
|
|
6
|
+
import { QuoteRequestPurchaseOption } from "./QuoteRequestPurchaseOption";
|
|
7
|
+
import { QuoteRequestReferrer } from "./QuoteRequestReferrer";
|
|
8
|
+
import { QuoteRequestReferrerCategory } from "./QuoteRequestReferrerCategory";
|
|
9
|
+
import { QuoteRequestVehicle } from "./QuoteRequestVehicle";
|
|
10
|
+
import { StreetAddress } from "./StreetAddress";
|
|
1
11
|
export declare type QuoteRequestStatus = 'new' | 'draft' | 'in-progress' | 'with-customer' | 'sold' | 'bound' | 'customer-modified' | 'closed';
|
|
2
12
|
export declare type QuoteRequestSource = 'web' | 'phone' | 'show' | 'existing-customer' | 'mighway' | 'agent' | 'entry-form' | 'bularangi';
|
|
3
13
|
export declare type QuoteRequestAutomatch = 'QUOTE' | 'EMAIL' | 'REGISTRATION' | 'DUPLICATE' | null;
|
|
@@ -63,68 +73,7 @@ export interface QuoteRequest {
|
|
|
63
73
|
broker_firm?: QuoteRequestUserGroup;
|
|
64
74
|
club?: Club;
|
|
65
75
|
lead?: Lead;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
name: string;
|
|
70
|
-
category_id: QuoteRequestReferrerCategory['id'];
|
|
71
|
-
category?: QuoteRequestReferrerCategory;
|
|
72
|
-
}
|
|
73
|
-
export interface QuoteRequestReferrerCategory {
|
|
74
|
-
id: number;
|
|
75
|
-
name: string;
|
|
76
|
-
}
|
|
77
|
-
export interface Club {
|
|
78
|
-
id: number;
|
|
79
|
-
name: string;
|
|
80
|
-
}
|
|
81
|
-
export interface StreetAddress {
|
|
82
|
-
id: number;
|
|
83
|
-
address: string | null;
|
|
84
|
-
unit: string | null;
|
|
85
|
-
suburb: string | null;
|
|
86
|
-
city: string | null;
|
|
87
|
-
post_code: string | null;
|
|
88
|
-
}
|
|
89
|
-
export interface PostalAddress {
|
|
90
|
-
id: number;
|
|
91
|
-
postal_line_1: string | null;
|
|
92
|
-
postal_line_2: string | null;
|
|
93
|
-
postal_line_3: string | null;
|
|
94
|
-
postal_line_4: string | null;
|
|
95
|
-
}
|
|
96
|
-
export interface Lead {
|
|
97
|
-
id: number;
|
|
98
|
-
first_name: string;
|
|
99
|
-
last_name: string;
|
|
100
|
-
email: string;
|
|
101
|
-
mobile: string;
|
|
102
|
-
status: string;
|
|
103
|
-
source: string;
|
|
104
|
-
postal_address_id: PostalAddress['id'];
|
|
105
|
-
current_insurer: string | null;
|
|
106
|
-
current_insurance_expires_at: string | null;
|
|
107
|
-
current_insurance_is_monthly: boolean;
|
|
108
|
-
vehicle_details: string | null;
|
|
109
|
-
notes: string | null;
|
|
110
|
-
import_data: string | null;
|
|
111
|
-
}
|
|
112
|
-
export interface QuoteRequestDeclaration {
|
|
113
|
-
id: number;
|
|
114
|
-
quote_request_id: QuoteRequest['id'];
|
|
115
|
-
had_incident: boolean;
|
|
116
|
-
has_demerit_points: boolean;
|
|
117
|
-
demerit_points: string | null;
|
|
118
|
-
has_lost_license: boolean;
|
|
119
|
-
lost_license_details: string | null;
|
|
120
|
-
was_refused_insurance: boolean;
|
|
121
|
-
refused_insurance_details: string | null;
|
|
122
|
-
has_criminal_conviction: boolean;
|
|
123
|
-
criminal_conviction_details: string | null;
|
|
124
|
-
has_vehicle_modifications: boolean;
|
|
125
|
-
vehicle_modifications_details: string | null;
|
|
126
|
-
has_previous_insurer: boolean;
|
|
127
|
-
previous_insurer_details: string | null;
|
|
128
|
-
previous_insurer_expires_at: string | null;
|
|
129
|
-
additional_details: string | null;
|
|
76
|
+
vehicles?: QuoteRequestVehicle[];
|
|
77
|
+
purchase_options?: QuoteRequestPurchaseOption[];
|
|
78
|
+
logs?: QuoteRequestLog[];
|
|
130
79
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface QuoteRequestPurchaseOption {
|
|
2
|
+
id: number;
|
|
3
|
+
quote_request_id: string;
|
|
4
|
+
level_of_insurance_id: number;
|
|
5
|
+
sort_order: number;
|
|
6
|
+
description: string;
|
|
7
|
+
base_premium: number;
|
|
8
|
+
premium: number;
|
|
9
|
+
monthly_premium: number;
|
|
10
|
+
show_monthly: boolean;
|
|
11
|
+
fsl: number;
|
|
12
|
+
gst: number;
|
|
13
|
+
premium_type: PremiumType;
|
|
14
|
+
policy_starts_at: string | null;
|
|
15
|
+
sold_at: string | null;
|
|
16
|
+
is_paid: boolean;
|
|
17
|
+
payment_frequency: PaymentFrequency;
|
|
18
|
+
}
|
|
19
|
+
export declare type PremiumType = 'annual' | 'total-due';
|
|
20
|
+
export declare type PaymentFrequency = 'monthly' | 'annually';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Product, VehicleType } from "../../api";
|
|
2
|
+
import { QuoteRequestVehicleDriver } from "./QuoteRequestVehicleDriver";
|
|
3
|
+
export interface QuoteRequestVehicle {
|
|
4
|
+
id: number;
|
|
5
|
+
vehicle_type: VehicleType;
|
|
6
|
+
registration: string | null;
|
|
7
|
+
make: string | null;
|
|
8
|
+
model: string | null;
|
|
9
|
+
year: string | null;
|
|
10
|
+
usage: string | null;
|
|
11
|
+
product: Product;
|
|
12
|
+
has_financially_interested_party: boolean;
|
|
13
|
+
financially_interested_party_detail: string | null;
|
|
14
|
+
owned_duration: string | null;
|
|
15
|
+
value: number | null;
|
|
16
|
+
storage_location: string | null;
|
|
17
|
+
is_heavy: boolean;
|
|
18
|
+
quote_request_id: string;
|
|
19
|
+
drivers?: QuoteRequestVehicleDriver[];
|
|
20
|
+
}
|
|
@@ -1 +1,12 @@
|
|
|
1
1
|
export * from './QuoteRequest';
|
|
2
|
+
export * from './QuoteRequestDeclaration';
|
|
3
|
+
export * from './QuoteRequestVehicle';
|
|
4
|
+
export * from './QuoteRequestVehicleDriver';
|
|
5
|
+
export * from './QuoteRequestPurchaseOption';
|
|
6
|
+
export * from './PolicyEnhancement';
|
|
7
|
+
export * from './QuoteRequestReferrerCategory';
|
|
8
|
+
export * from './QuoteRequestReferrer';
|
|
9
|
+
export * from './Club';
|
|
10
|
+
export * from './Lead';
|
|
11
|
+
export * from './StreetAddress';
|
|
12
|
+
export * from './PostalAddress';
|
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
|
+
"version": "0.1.3",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
package/src/types/api/enums.ts
CHANGED
|
@@ -3,3 +3,5 @@ export type VehicleType = 'car' | 'motorcycle' | 'motorhome';
|
|
|
3
3
|
export type Frequency = 'daily' | 'weekly' | 'fortnightly' | 'monthly' | 'quarterly' | 'annually';
|
|
4
4
|
|
|
5
5
|
export type Condition = 'poor' | 'fair' | 'good';
|
|
6
|
+
|
|
7
|
+
export type Product = 'star-enthusiast-prestige-everyday-plus' | 'star-enthusiast' | 'star-prestige' | 'star-everyday' | 'star-plus' | 'star-motorcycle' | 'star-campercare';
|
package/src/types/api/index.ts
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface OraclePolicyMatch {
|
|
2
|
+
ply_covernumber: string;
|
|
3
|
+
ply_verno: string;
|
|
4
|
+
ply_clientnumber: string;
|
|
5
|
+
ply_riskcode: string;
|
|
6
|
+
ply_effdate: string; // YYYY-MM-DD
|
|
7
|
+
ply_current: '-1' | '0'; // '-1' = yes, '0' = no
|
|
8
|
+
client?: {
|
|
9
|
+
cli_clientnumber: string;
|
|
10
|
+
cli_emailaddress?: string;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './claimRequestActions';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface Lead {
|
|
2
|
+
id: number;
|
|
3
|
+
first_name: string;
|
|
4
|
+
last_name: string;
|
|
5
|
+
email: string;
|
|
6
|
+
mobile: string;
|
|
7
|
+
status: string;
|
|
8
|
+
source: string;
|
|
9
|
+
postal_address_id: PostalAddress['id'];
|
|
10
|
+
current_insurer: string | null;
|
|
11
|
+
current_insurance_expires_at: string | null;
|
|
12
|
+
current_insurance_is_monthly: boolean;
|
|
13
|
+
vehicle_details: string | null;
|
|
14
|
+
notes: string | null;
|
|
15
|
+
import_data: string | null;
|
|
16
|
+
}
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
import { Club } from "./Club";
|
|
2
|
+
import { Lead } from "./Lead";
|
|
3
|
+
import { PostalAddress } from "./PostalAddress";
|
|
4
|
+
import { QuoteRequestDeclaration } from "./QuoteRequestDeclaration";
|
|
5
|
+
import { QuoteRequestLog } from "./QuoteRequestLog";
|
|
6
|
+
import { QuoteRequestPurchaseOption } from "./QuoteRequestPurchaseOption";
|
|
7
|
+
import { QuoteRequestReferrer } from "./QuoteRequestReferrer";
|
|
8
|
+
import { QuoteRequestReferrerCategory } from "./QuoteRequestReferrerCategory";
|
|
9
|
+
import { QuoteRequestVehicle } from "./QuoteRequestVehicle";
|
|
10
|
+
import { StreetAddress } from "./StreetAddress";
|
|
11
|
+
|
|
1
12
|
export type QuoteRequestStatus = 'new' | 'draft' | 'in-progress' | 'with-customer' | 'sold' | 'bound' | 'customer-modified' | 'closed';
|
|
2
13
|
|
|
3
14
|
export type QuoteRequestSource = 'web' | 'phone' | 'show' | 'existing-customer' | 'mighway' | 'agent' | 'entry-form' | 'bularangi';
|
|
@@ -74,75 +85,7 @@ export interface QuoteRequest {
|
|
|
74
85
|
broker_firm?: QuoteRequestUserGroup;
|
|
75
86
|
club?: Club;
|
|
76
87
|
lead?: Lead;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
id: number;
|
|
81
|
-
name: string;
|
|
82
|
-
category_id: QuoteRequestReferrerCategory['id'];
|
|
83
|
-
category?: QuoteRequestReferrerCategory;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export interface QuoteRequestReferrerCategory {
|
|
87
|
-
id: number;
|
|
88
|
-
name: string;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export interface Club {
|
|
92
|
-
id: number;
|
|
93
|
-
name: string;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export interface StreetAddress {
|
|
97
|
-
id: number;
|
|
98
|
-
address: string | null;
|
|
99
|
-
unit: string | null;
|
|
100
|
-
suburb: string | null;
|
|
101
|
-
city: string | null;
|
|
102
|
-
post_code: string | null;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export interface PostalAddress {
|
|
106
|
-
id: number;
|
|
107
|
-
postal_line_1: string | null;
|
|
108
|
-
postal_line_2: string | null;
|
|
109
|
-
postal_line_3: string | null;
|
|
110
|
-
postal_line_4: string | null;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export interface Lead {
|
|
114
|
-
id: number;
|
|
115
|
-
first_name: string;
|
|
116
|
-
last_name: string;
|
|
117
|
-
email: string;
|
|
118
|
-
mobile: string;
|
|
119
|
-
status: string;
|
|
120
|
-
source: string;
|
|
121
|
-
postal_address_id: PostalAddress['id'];
|
|
122
|
-
current_insurer: string | null;
|
|
123
|
-
current_insurance_expires_at: string | null;
|
|
124
|
-
current_insurance_is_monthly: boolean;
|
|
125
|
-
vehicle_details: string | null;
|
|
126
|
-
notes: string | null;
|
|
127
|
-
import_data: string | null;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
export interface QuoteRequestDeclaration {
|
|
131
|
-
id: number;
|
|
132
|
-
quote_request_id: QuoteRequest['id'];
|
|
133
|
-
had_incident: boolean;
|
|
134
|
-
has_demerit_points: boolean;
|
|
135
|
-
demerit_points: string | null;
|
|
136
|
-
has_lost_license: boolean;
|
|
137
|
-
lost_license_details: string | null;
|
|
138
|
-
was_refused_insurance: boolean;
|
|
139
|
-
refused_insurance_details: string | null;
|
|
140
|
-
has_criminal_conviction: boolean;
|
|
141
|
-
criminal_conviction_details: string | null;
|
|
142
|
-
has_vehicle_modifications: boolean;
|
|
143
|
-
vehicle_modifications_details: string | null;
|
|
144
|
-
has_previous_insurer: boolean;
|
|
145
|
-
previous_insurer_details: string | null;
|
|
146
|
-
previous_insurer_expires_at: string | null;
|
|
147
|
-
additional_details: string | null;
|
|
88
|
+
vehicles?: QuoteRequestVehicle[];
|
|
89
|
+
purchase_options?: QuoteRequestPurchaseOption[];
|
|
90
|
+
logs?: QuoteRequestLog[];
|
|
148
91
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface QuoteRequestDeclaration {
|
|
2
|
+
id: number;
|
|
3
|
+
quote_request_id: QuoteRequest['id'];
|
|
4
|
+
had_incident: boolean;
|
|
5
|
+
has_demerit_points: boolean;
|
|
6
|
+
demerit_points: string | null;
|
|
7
|
+
has_lost_license: boolean;
|
|
8
|
+
lost_license_details: string | null;
|
|
9
|
+
was_refused_insurance: boolean;
|
|
10
|
+
refused_insurance_details: string | null;
|
|
11
|
+
has_criminal_conviction: boolean;
|
|
12
|
+
criminal_conviction_details: string | null;
|
|
13
|
+
has_vehicle_modifications: boolean;
|
|
14
|
+
vehicle_modifications_details: string | null;
|
|
15
|
+
has_previous_insurer: boolean;
|
|
16
|
+
previous_insurer_details: string | null;
|
|
17
|
+
previous_insurer_expires_at: string | null;
|
|
18
|
+
additional_details: string | null;
|
|
19
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface QuoteRequestPurchaseOption {
|
|
2
|
+
id: number;
|
|
3
|
+
quote_request_id: string;
|
|
4
|
+
level_of_insurance_id: number;
|
|
5
|
+
sort_order: number;
|
|
6
|
+
description: string;
|
|
7
|
+
base_premium: number;
|
|
8
|
+
premium: number;
|
|
9
|
+
monthly_premium: number;
|
|
10
|
+
show_monthly: boolean;
|
|
11
|
+
fsl: number;
|
|
12
|
+
gst: number;
|
|
13
|
+
premium_type: PremiumType;
|
|
14
|
+
policy_starts_at: string | null;
|
|
15
|
+
sold_at: string | null;
|
|
16
|
+
is_paid: boolean;
|
|
17
|
+
payment_frequency: PaymentFrequency;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type PremiumType = 'annual' | 'total-due';
|
|
21
|
+
|
|
22
|
+
export type PaymentFrequency = 'monthly' | 'annually';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Product, VehicleType } from "../../api";
|
|
2
|
+
import { QuoteRequestVehicleDriver } from "./QuoteRequestVehicleDriver";
|
|
3
|
+
|
|
4
|
+
export interface QuoteRequestVehicle {
|
|
5
|
+
id: number;
|
|
6
|
+
vehicle_type: VehicleType;
|
|
7
|
+
registration: string | null;
|
|
8
|
+
make: string | null;
|
|
9
|
+
model: string | null;
|
|
10
|
+
year: string | null;
|
|
11
|
+
usage: string | null;
|
|
12
|
+
product: Product;
|
|
13
|
+
has_financially_interested_party: boolean;
|
|
14
|
+
financially_interested_party_detail: string | null;
|
|
15
|
+
owned_duration: string | null;
|
|
16
|
+
value: number | null;
|
|
17
|
+
storage_location: string | null;
|
|
18
|
+
is_heavy: boolean;
|
|
19
|
+
quote_request_id: string;
|
|
20
|
+
drivers?: QuoteRequestVehicleDriver[];
|
|
21
|
+
}
|
|
@@ -1 +1,12 @@
|
|
|
1
1
|
export * from './QuoteRequest';
|
|
2
|
+
export * from './QuoteRequestDeclaration';
|
|
3
|
+
export * from './QuoteRequestVehicle';
|
|
4
|
+
export * from './QuoteRequestVehicleDriver';
|
|
5
|
+
export * from './QuoteRequestPurchaseOption';
|
|
6
|
+
export * from './PolicyEnhancement';
|
|
7
|
+
export * from './QuoteRequestReferrerCategory';
|
|
8
|
+
export * from './QuoteRequestReferrer';
|
|
9
|
+
export * from './Club';
|
|
10
|
+
export * from './Lead';
|
|
11
|
+
export * from './StreetAddress';
|
|
12
|
+
export * from './PostalAddress';
|