@star-insure/sdk 0.3.22 → 0.4.0
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/QuoteRequest.d.ts +40 -39
- package/dist/types/models/quotes/QuoteRequestForm.d.ts +1 -0
- package/dist/types/models/quotes/RedbookVehicle.d.ts +31 -0
- package/package.json +1 -1
- package/src/types/models/quotes/QuoteRequest.ts +40 -39
- package/src/types/models/quotes/QuoteRequestForm.ts +1 -0
- package/src/types/models/quotes/RedbookVehicle.ts +35 -0
|
@@ -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 = 'QUOTE' | 'EMAIL' | 'REGISTRATION' | 'DUPLICATE'
|
|
14
|
+
export declare type QuoteRequestAutomatch = 'QUOTE' | 'EMAIL' | 'REGISTRATION' | 'DUPLICATE';
|
|
15
15
|
export interface QuoteRequestUser {
|
|
16
16
|
id: number;
|
|
17
17
|
name: string;
|
|
@@ -22,44 +22,45 @@ export interface QuoteRequestUserGroup {
|
|
|
22
22
|
name: string;
|
|
23
23
|
}
|
|
24
24
|
export interface QuoteRequest {
|
|
25
|
-
id
|
|
26
|
-
status
|
|
27
|
-
source
|
|
28
|
-
reference
|
|
29
|
-
client_number
|
|
30
|
-
policy_number
|
|
31
|
-
first_name
|
|
32
|
-
last_name
|
|
33
|
-
phone
|
|
34
|
-
mobile
|
|
35
|
-
email
|
|
36
|
-
licence
|
|
37
|
-
licence_other
|
|
38
|
-
has_automatch
|
|
39
|
-
automatch_by
|
|
40
|
-
automatch_client_id
|
|
41
|
-
promo_code
|
|
42
|
-
club_membership_number
|
|
43
|
-
broker_fee
|
|
44
|
-
length_of_insurance
|
|
45
|
-
theme
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
25
|
+
id?: string;
|
|
26
|
+
status?: QuoteRequestStatus;
|
|
27
|
+
source?: QuoteRequestSource;
|
|
28
|
+
reference?: string;
|
|
29
|
+
client_number?: string;
|
|
30
|
+
policy_number?: string;
|
|
31
|
+
first_name?: string;
|
|
32
|
+
last_name?: string;
|
|
33
|
+
phone?: string;
|
|
34
|
+
mobile?: string;
|
|
35
|
+
email?: string;
|
|
36
|
+
licence?: string;
|
|
37
|
+
licence_other?: string;
|
|
38
|
+
has_automatch?: boolean;
|
|
39
|
+
automatch_by?: QuoteRequestAutomatch;
|
|
40
|
+
automatch_client_id?: string;
|
|
41
|
+
promo_code?: string;
|
|
42
|
+
club_membership_number?: string;
|
|
43
|
+
broker_fee?: number;
|
|
44
|
+
length_of_insurance?: string;
|
|
45
|
+
theme?: string;
|
|
46
|
+
notes?: string;
|
|
47
|
+
created_at?: string;
|
|
48
|
+
updated_at?: string;
|
|
49
|
+
dob?: string;
|
|
50
|
+
sold_at?: string;
|
|
51
|
+
sent_at?: string;
|
|
52
|
+
pricing_expires_at?: string;
|
|
53
|
+
follow_up_at?: string;
|
|
54
|
+
resubmit_id?: QuoteRequest['id'];
|
|
55
|
+
referrer_id?: QuoteRequestReferrer['id'];
|
|
56
|
+
referrer_category_id?: QuoteRequestReferrerCategory['id'];
|
|
57
|
+
staff_member_id?: QuoteRequestUser['id'];
|
|
58
|
+
agent_id?: QuoteRequestUser['id'];
|
|
59
|
+
agent_firm_id?: QuoteRequestUserGroup['id'];
|
|
60
|
+
broker_firm_id?: QuoteRequestUserGroup['id'];
|
|
61
|
+
broker_id?: QuoteRequestUser['id'];
|
|
62
|
+
club_id?: Club['id'];
|
|
63
|
+
lead_id?: Lead['id'];
|
|
63
64
|
declaration?: QuoteRequestDeclaration;
|
|
64
65
|
street_address?: StreetAddress;
|
|
65
66
|
postal_address?: PostalAddress;
|
|
@@ -21,4 +21,35 @@ export interface RedbookVehicle {
|
|
|
21
21
|
vin: string | null;
|
|
22
22
|
weight: number | null;
|
|
23
23
|
year: number | null;
|
|
24
|
+
valuation_details: Valuation[] | null;
|
|
25
|
+
chassis_number: string | null;
|
|
26
|
+
fuel_type: string | null;
|
|
27
|
+
previous_registered_country: string | null;
|
|
28
|
+
overseas_first_registered_year: number | null;
|
|
29
|
+
overseas_first_registered_month: number | null;
|
|
30
|
+
}
|
|
31
|
+
export interface Valuation {
|
|
32
|
+
matchedRedbookVehicle: MatchedRedbookVehicle;
|
|
33
|
+
valuationDetail: ValuationDetail;
|
|
34
|
+
}
|
|
35
|
+
export interface MatchedRedbookVehicle {
|
|
36
|
+
make?: string;
|
|
37
|
+
model?: string;
|
|
38
|
+
year?: number;
|
|
39
|
+
description?: string;
|
|
40
|
+
redbookCode: string;
|
|
41
|
+
}
|
|
42
|
+
export interface ValuationDetail {
|
|
43
|
+
newRetailValue: number;
|
|
44
|
+
targetConditionTypeAvailable: boolean;
|
|
45
|
+
newValueAvailable: boolean;
|
|
46
|
+
pricingBandAvailable: boolean;
|
|
47
|
+
retailValueList: RetailValueList[];
|
|
48
|
+
}
|
|
49
|
+
export interface RetailValueList {
|
|
50
|
+
condition: string;
|
|
51
|
+
lowerPricingRange: number;
|
|
52
|
+
upperPricingRange: number;
|
|
53
|
+
value: number;
|
|
54
|
+
kilometers: number;
|
|
24
55
|
}
|
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.
|
|
5
|
+
"version": "0.4.0",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -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 = 'QUOTE' | 'EMAIL' | 'REGISTRATION' | 'DUPLICATE'
|
|
17
|
+
export type QuoteRequestAutomatch = 'QUOTE' | 'EMAIL' | 'REGISTRATION' | 'DUPLICATE';
|
|
18
18
|
|
|
19
19
|
export interface QuoteRequestUser {
|
|
20
20
|
id: number;
|
|
@@ -28,48 +28,49 @@ export interface QuoteRequestUserGroup {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export interface QuoteRequest {
|
|
31
|
-
id
|
|
32
|
-
status
|
|
33
|
-
source
|
|
34
|
-
reference
|
|
35
|
-
client_number
|
|
36
|
-
policy_number
|
|
37
|
-
first_name
|
|
38
|
-
last_name
|
|
39
|
-
phone
|
|
40
|
-
mobile
|
|
41
|
-
email
|
|
42
|
-
licence
|
|
43
|
-
licence_other
|
|
44
|
-
has_automatch
|
|
45
|
-
automatch_by
|
|
46
|
-
automatch_client_id
|
|
47
|
-
promo_code
|
|
48
|
-
club_membership_number
|
|
49
|
-
broker_fee
|
|
50
|
-
length_of_insurance
|
|
51
|
-
theme
|
|
31
|
+
id?: string;
|
|
32
|
+
status?: QuoteRequestStatus;
|
|
33
|
+
source?: QuoteRequestSource;
|
|
34
|
+
reference?: string;
|
|
35
|
+
client_number?: string;
|
|
36
|
+
policy_number?: string;
|
|
37
|
+
first_name?: string;
|
|
38
|
+
last_name?: string;
|
|
39
|
+
phone?: string;
|
|
40
|
+
mobile?: string;
|
|
41
|
+
email?: string;
|
|
42
|
+
licence?: string;
|
|
43
|
+
licence_other?: string;
|
|
44
|
+
has_automatch?: boolean;
|
|
45
|
+
automatch_by?: QuoteRequestAutomatch;
|
|
46
|
+
automatch_client_id?: string;
|
|
47
|
+
promo_code?: string;
|
|
48
|
+
club_membership_number?: string;
|
|
49
|
+
broker_fee?: number;
|
|
50
|
+
length_of_insurance?: string;
|
|
51
|
+
theme?: string;
|
|
52
|
+
notes?: string;
|
|
52
53
|
|
|
53
54
|
// Dates
|
|
54
|
-
created_at
|
|
55
|
-
updated_at
|
|
56
|
-
dob
|
|
57
|
-
sold_at
|
|
58
|
-
sent_at
|
|
59
|
-
pricing_expires_at
|
|
60
|
-
follow_up_at
|
|
55
|
+
created_at?: string;
|
|
56
|
+
updated_at?: string;
|
|
57
|
+
dob?: string;
|
|
58
|
+
sold_at?: string;
|
|
59
|
+
sent_at?: string;
|
|
60
|
+
pricing_expires_at?: string;
|
|
61
|
+
follow_up_at?: string;
|
|
61
62
|
|
|
62
63
|
// Foreign keys
|
|
63
|
-
resubmit_id
|
|
64
|
-
referrer_id
|
|
65
|
-
referrer_category_id
|
|
66
|
-
staff_member_id
|
|
67
|
-
agent_id
|
|
68
|
-
agent_firm_id
|
|
69
|
-
broker_firm_id
|
|
70
|
-
broker_id
|
|
71
|
-
club_id
|
|
72
|
-
lead_id
|
|
64
|
+
resubmit_id?: QuoteRequest['id'];
|
|
65
|
+
referrer_id?: QuoteRequestReferrer['id'];
|
|
66
|
+
referrer_category_id?: QuoteRequestReferrerCategory['id'];
|
|
67
|
+
staff_member_id?: QuoteRequestUser['id'];
|
|
68
|
+
agent_id?: QuoteRequestUser['id'];
|
|
69
|
+
agent_firm_id?: QuoteRequestUserGroup['id'];
|
|
70
|
+
broker_firm_id?: QuoteRequestUserGroup['id'];
|
|
71
|
+
broker_id?: QuoteRequestUser['id'];
|
|
72
|
+
club_id?: Club['id'];
|
|
73
|
+
lead_id?: Lead['id'];
|
|
73
74
|
|
|
74
75
|
// Relationships
|
|
75
76
|
declaration?: QuoteRequestDeclaration;
|
|
@@ -21,4 +21,39 @@ export interface RedbookVehicle {
|
|
|
21
21
|
vin: string | null;
|
|
22
22
|
weight: number | null;
|
|
23
23
|
year: number | null;
|
|
24
|
+
valuation_details: Valuation[] | null;
|
|
25
|
+
chassis_number: string | null;
|
|
26
|
+
fuel_type: string | null;
|
|
27
|
+
previous_registered_country: string | null;
|
|
28
|
+
overseas_first_registered_year: number | null;
|
|
29
|
+
overseas_first_registered_month: number | null;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface Valuation {
|
|
33
|
+
matchedRedbookVehicle: MatchedRedbookVehicle;
|
|
34
|
+
valuationDetail: ValuationDetail;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export interface MatchedRedbookVehicle {
|
|
38
|
+
make?: string;
|
|
39
|
+
model?: string;
|
|
40
|
+
year?: number;
|
|
41
|
+
description?: string;
|
|
42
|
+
redbookCode: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface ValuationDetail {
|
|
46
|
+
newRetailValue: number;
|
|
47
|
+
targetConditionTypeAvailable: boolean;
|
|
48
|
+
newValueAvailable: boolean;
|
|
49
|
+
pricingBandAvailable: boolean;
|
|
50
|
+
retailValueList: RetailValueList[];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface RetailValueList {
|
|
54
|
+
condition: string;
|
|
55
|
+
lowerPricingRange: number;
|
|
56
|
+
upperPricingRange: number;
|
|
57
|
+
value: number;
|
|
58
|
+
kilometers: number;
|
|
24
59
|
}
|