@bisondesk/core-sdk 1.0.305 → 1.0.307
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/lib/cjs/apis/opportunities.js.map +1 -1
- package/lib/cjs/types/{leads.js → comparables.js} +1 -1
- package/lib/cjs/types/comparables.js.map +1 -0
- package/lib/cjs/types/insights.js.map +1 -1
- package/lib/cjs/types/interests.js +10 -0
- package/lib/cjs/types/interests.js.map +1 -0
- package/lib/cjs/types/leasing-settings.js.map +1 -1
- package/lib/cjs/types/opportunities.js.map +1 -1
- package/lib/cjs/types/payments.js +2 -1
- package/lib/cjs/types/payments.js.map +1 -1
- package/lib/cjs/types/quote-settings.js +3 -0
- package/lib/cjs/types/quote-settings.js.map +1 -0
- package/lib/cjs/types/quotes.js.map +1 -1
- package/lib/cjs/types/users.js.map +1 -1
- package/lib/cjs/types/vehicles.js.map +1 -1
- package/lib/esm/apis/opportunities.js.map +1 -1
- package/lib/esm/types/comparables.js +2 -0
- package/lib/esm/types/comparables.js.map +1 -0
- package/lib/esm/types/insights.js.map +1 -1
- package/lib/esm/types/interests.js +6 -0
- package/lib/esm/types/interests.js.map +1 -0
- package/lib/esm/types/leasing-settings.js.map +1 -1
- package/lib/esm/types/opportunities.js.map +1 -1
- package/lib/esm/types/payments.js +1 -0
- package/lib/esm/types/payments.js.map +1 -1
- package/lib/esm/types/quote-settings.js +2 -0
- package/lib/esm/types/quote-settings.js.map +1 -0
- package/lib/esm/types/quotes.js.map +1 -1
- package/lib/esm/types/users.js.map +1 -1
- package/lib/esm/types/vehicles.js.map +1 -1
- package/lib/tsconfig.cjs.tsbuildinfo +1 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/types/apis/opportunities.d.ts +1 -1
- package/lib/types/apis/opportunities.d.ts.map +1 -1
- package/lib/types/types/comparables.d.ts +37 -0
- package/lib/types/types/comparables.d.ts.map +1 -0
- package/lib/types/types/insights.d.ts +15 -26
- package/lib/types/types/insights.d.ts.map +1 -1
- package/lib/types/types/interests.d.ts +72 -0
- package/lib/types/types/interests.d.ts.map +1 -0
- package/lib/types/types/leasing-settings.d.ts +0 -71
- package/lib/types/types/leasing-settings.d.ts.map +1 -1
- package/lib/types/types/opportunities.d.ts +22 -19
- package/lib/types/types/opportunities.d.ts.map +1 -1
- package/lib/types/types/payments.d.ts +1 -0
- package/lib/types/types/payments.d.ts.map +1 -1
- package/lib/types/types/quote-settings.d.ts +89 -0
- package/lib/types/types/quote-settings.d.ts.map +1 -0
- package/lib/types/types/quotes.d.ts +8 -14
- package/lib/types/types/quotes.d.ts.map +1 -1
- package/lib/types/types/users.d.ts +1 -0
- package/lib/types/types/users.d.ts.map +1 -1
- package/lib/types/types/vehicles.d.ts +26 -2
- package/lib/types/types/vehicles.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/apis/opportunities.ts +1 -1
- package/src/types/comparables.ts +40 -0
- package/src/types/insights.ts +18 -26
- package/src/types/interests.ts +87 -0
- package/src/types/leasing-settings.ts +0 -76
- package/src/types/opportunities.ts +29 -25
- package/src/types/payments.ts +2 -0
- package/src/types/quote-settings.ts +93 -0
- package/src/types/quotes.ts +7 -16
- package/src/types/users.ts +1 -0
- package/src/types/vehicles.ts +30 -2
- package/lib/cjs/types/leads.js.map +0 -1
- package/lib/esm/types/leads.js +0 -2
- package/lib/esm/types/leads.js.map +0 -1
- package/lib/types/types/leads.d.ts +0 -134
- package/lib/types/types/leads.d.ts.map +0 -1
- package/src/types/leads.ts +0 -144
package/src/types/quotes.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { AttachmentValue, LocationValue } from '@bisondesk/commons-sdk/types';
|
|
2
2
|
import { OpportunityType } from '../constants';
|
|
3
|
-
import { DeliveryParams } from './delivery-settings';
|
|
4
3
|
import {
|
|
5
4
|
CustomLeasingQuoteExtraInput,
|
|
6
5
|
CustomSalesQuoteExtraInput,
|
|
7
6
|
LeasingDeliveryPackageInput,
|
|
8
7
|
LeasingQuoteExtraInput,
|
|
9
|
-
LeasingQuoteParams,
|
|
10
8
|
SalesQuoteExtraInput,
|
|
11
9
|
} from './leasing-settings';
|
|
12
10
|
import { MatchingRuleValue } from './roi-ratings';
|
|
@@ -62,7 +60,7 @@ type BaseQuoteCalculatorInput = {
|
|
|
62
60
|
id: string;
|
|
63
61
|
category: string;
|
|
64
62
|
bodywork?: string;
|
|
65
|
-
|
|
63
|
+
agreedPriceExclVat: string;
|
|
66
64
|
};
|
|
67
65
|
};
|
|
68
66
|
|
|
@@ -75,6 +73,8 @@ export type LeasingCalculatorInput = BaseQuoteCalculatorInput & {
|
|
|
75
73
|
localLicensePlate: boolean;
|
|
76
74
|
vanCourier: boolean;
|
|
77
75
|
vehicle: BaseQuoteCalculatorInput['vehicle'] & {
|
|
76
|
+
purchasePriceExclVat: string;
|
|
77
|
+
agreedPrice: string;
|
|
78
78
|
purchasePrice: string;
|
|
79
79
|
};
|
|
80
80
|
leasing: {
|
|
@@ -113,6 +113,7 @@ export type LeasingCalculatorInput = BaseQuoteCalculatorInput & {
|
|
|
113
113
|
allRisks: boolean;
|
|
114
114
|
specialTechnicalInsurance: boolean;
|
|
115
115
|
roadAssistance: boolean;
|
|
116
|
+
initialFractionPercentage: string;
|
|
116
117
|
};
|
|
117
118
|
deliveryPackage?: LeasingDeliveryPackageInput;
|
|
118
119
|
extras: LeasingQuoteExtraInput[];
|
|
@@ -164,6 +165,8 @@ export type SalesCalculatorDefaultInput = BaseQuoteCalculatorInput & {
|
|
|
164
165
|
export type SalesCalculatorInput = BaseQuoteCalculatorInput & {
|
|
165
166
|
vehicle: BaseQuoteCalculatorInput['vehicle'] & {
|
|
166
167
|
purchasePrice: string;
|
|
168
|
+
purchasePriceExclVat: string;
|
|
169
|
+
agreedPrice: string;
|
|
167
170
|
premiumPrice?: string;
|
|
168
171
|
vatRate: string;
|
|
169
172
|
minimumPrice: string;
|
|
@@ -189,6 +192,7 @@ export type LeasingCalculatorOutput = {
|
|
|
189
192
|
installmentPrintable: string;
|
|
190
193
|
totalMonthlyAmount: string;
|
|
191
194
|
monthlyTaxesInsurance: string;
|
|
195
|
+
beforeDeliveryExclVat: string;
|
|
192
196
|
beforeDelivery: string;
|
|
193
197
|
financingAmount: string;
|
|
194
198
|
settingId: string;
|
|
@@ -346,19 +350,6 @@ export type CalculatorSalesIO = {
|
|
|
346
350
|
};
|
|
347
351
|
export type CalculatorQuoteIO = CalculatorLeasingIO | CalculatorSalesIO;
|
|
348
352
|
|
|
349
|
-
export type UsedVehiclesSalesParams = {
|
|
350
|
-
id: string;
|
|
351
|
-
modifiedAt: string;
|
|
352
|
-
modifiedBy: string;
|
|
353
|
-
countryCode: 'be';
|
|
354
|
-
name: string;
|
|
355
|
-
profitabilityDealGap: string;
|
|
356
|
-
exaDocumentCosts: string;
|
|
357
|
-
delivery?: DeliveryParams;
|
|
358
|
-
};
|
|
359
|
-
|
|
360
|
-
export type QuoteSettings = LeasingQuoteParams | UsedVehiclesSalesParams;
|
|
361
|
-
|
|
362
353
|
export type DeliveryLocationValue = Omit<LocationValue, 'addressLine1' | 'city'> & {
|
|
363
354
|
addressLine1: string;
|
|
364
355
|
city: string;
|
package/src/types/users.ts
CHANGED
package/src/types/vehicles.ts
CHANGED
|
@@ -72,11 +72,13 @@ export type NewVehicleRequest = {
|
|
|
72
72
|
technicalRemarks?: string;
|
|
73
73
|
};
|
|
74
74
|
logistics: {
|
|
75
|
-
vehicleRole: VehicleInternalInfo['role'];
|
|
76
75
|
parking: string;
|
|
77
76
|
deliveryType: VehiclePurchaseDeliveryType;
|
|
78
|
-
availableDate: string;
|
|
79
77
|
pickupAddress?: LocationValue;
|
|
78
|
+
checkedInAt?: string;
|
|
79
|
+
checkedInBy?: string;
|
|
80
|
+
arrivedAt?: string;
|
|
81
|
+
arrivedBy?: string;
|
|
80
82
|
};
|
|
81
83
|
prices: {
|
|
82
84
|
minimum?: string;
|
|
@@ -109,6 +111,10 @@ export type NewVehicleRequest = {
|
|
|
109
111
|
internalGarage?: string;
|
|
110
112
|
other?: string;
|
|
111
113
|
};
|
|
114
|
+
logistics: {
|
|
115
|
+
availableDate: string;
|
|
116
|
+
vehicleRole: VehicleInternalInfo['role'];
|
|
117
|
+
};
|
|
112
118
|
};
|
|
113
119
|
};
|
|
114
120
|
|
|
@@ -140,6 +146,28 @@ export type VehicleMarketingEvent = {
|
|
|
140
146
|
vehicleId: string;
|
|
141
147
|
};
|
|
142
148
|
|
|
149
|
+
type BaseVehiclePurchaseEvent = {
|
|
150
|
+
actionAt: string;
|
|
151
|
+
userId: string;
|
|
152
|
+
tenantId: string;
|
|
153
|
+
branchId: string;
|
|
154
|
+
vehicleId: string;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
export type VehiclePurchaseCreateEvent = BaseVehiclePurchaseEvent & {
|
|
158
|
+
action: 'create';
|
|
159
|
+
data: VehiclePurchase;
|
|
160
|
+
previousData?: undefined;
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
export type VehiclePurchaseUpdateEvent = BaseVehiclePurchaseEvent & {
|
|
164
|
+
action: 'update';
|
|
165
|
+
data: VehiclePurchase;
|
|
166
|
+
previousData: VehiclePurchase;
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
export type VehiclePurchaseEvent = VehiclePurchaseCreateEvent | VehiclePurchaseUpdateEvent;
|
|
170
|
+
|
|
143
171
|
export type UpdateVehiclesPricesEvent = {
|
|
144
172
|
id: string;
|
|
145
173
|
actionAt: string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"leads.js","sourceRoot":"/","sources":["types/leads.ts"],"names":[],"mappings":"","sourcesContent":["import {\n PhoneNumberRawValue,\n PhoneNumberValue,\n SearchPermissions,\n} from '@bisondesk/commons-sdk/types';\nimport { PublicSearchDefinition } from './definitions';\nimport { ReferenceData } from './utils';\nimport { SearchVehicle } from './vehicles';\n\nexport type SearchLead = Lead;\n\nexport type InputSearchLead = SearchLead & {\n permissions: SearchPermissions;\n};\n\nexport type RankedSearchLead = SearchLead & { score: number };\n\nexport type LeadPublicSearchDefinitions = {\n searchLead: PublicSearchDefinition;\n};\n\nexport type LeadEvent = {\n id: string;\n action: 'upsert' | 'delete';\n actionAt: string;\n userId: string;\n tenantId: string;\n};\n\nexport type LeadContact = {\n accountManager?: string;\n companyName?: string;\n country: string;\n email?: string;\n name: string;\n phone?: PhoneNumberValue | PhoneNumberRawValue;\n remarks?: string;\n\n // Fields used to link lead to existing org and contact.\n organizationId?: string;\n contactId?: string;\n orgNumber?: number;\n};\n\nexport type LeadScore = {\n leadId: string;\n score: number;\n scores: { name: string; value: number }[];\n};\n\nexport type VehicleScore = {\n vehicleId: string;\n score: number;\n};\n\nexport type LeadVehicles = {\n vehicles: VehicleScore[];\n};\n\nexport type VehicleLeads = {\n leads: LeadScore[];\n};\n\nexport type VehicleLeadsResponse = VehicleLeads & {\n leadsById: { [leadId: string]: Lead };\n};\n\nexport type LeadVehiclesResponse = LeadVehicles & {\n vehiclesById: { [vehicleId: string]: SearchVehicle };\n};\n\nexport type LeadStats = {\n lastClientConversation?: string;\n lastClientTx?: string;\n clientTxs?: number;\n};\n\nexport type LeadVehicle = {\n createdAt: string;\n vehicleId: string;\n saleId?: string;\n};\n\nexport type Lead = {\n id: string;\n createdAt: string;\n contact: LeadContact;\n interests: Interest[];\n vehicles: LeadVehicle[];\n stats?: LeadStats;\n};\n\nexport type InterestVersion = {\n make: string;\n models?: string[];\n};\n\nexport type Interest = {\n id: string;\n modifiedAt: string;\n modifiedBy: string;\n extended?: string[];\n heightened?: string[];\n adr?: boolean;\n age?: number;\n axleConfigurations?: string[];\n bodystyle?: string;\n cabins?: string[];\n category: string;\n crane?: boolean;\n damaged?: boolean;\n euronorms?: string[];\n horsepower?: number;\n used?: boolean;\n kilometers?: number;\n versions?: InterestVersion[];\n price?: number;\n leasing?: boolean;\n retarderIntarder?: boolean;\n suspensions?: string[];\n tailgate?: boolean;\n transmissions?: string[];\n autoGenerated?: boolean;\n\n remarks?: string;\n};\n\nexport type InterestResponse = {\n interest: Interest;\n meta: ReferenceData;\n};\n\nexport type InterestSearchRequest = { interest: Interest; offset: number; limit: number };\n\nexport type VehicleLeadsSearchRequest = { vehicleId: string };\n\nexport type InterestAutocompleteRequest = { vehicleId: string };\n\nexport type LeadVehiclesSearchRequest = { leadId: string };\n\nexport type SimilarVehiclesRequest = {\n offset: number;\n limit: number;\n};\n"]}
|
package/lib/esm/types/leads.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"leads.js","sourceRoot":"/","sources":["types/leads.ts"],"names":[],"mappings":"","sourcesContent":["import {\n PhoneNumberRawValue,\n PhoneNumberValue,\n SearchPermissions,\n} from '@bisondesk/commons-sdk/types';\nimport { PublicSearchDefinition } from './definitions';\nimport { ReferenceData } from './utils';\nimport { SearchVehicle } from './vehicles';\n\nexport type SearchLead = Lead;\n\nexport type InputSearchLead = SearchLead & {\n permissions: SearchPermissions;\n};\n\nexport type RankedSearchLead = SearchLead & { score: number };\n\nexport type LeadPublicSearchDefinitions = {\n searchLead: PublicSearchDefinition;\n};\n\nexport type LeadEvent = {\n id: string;\n action: 'upsert' | 'delete';\n actionAt: string;\n userId: string;\n tenantId: string;\n};\n\nexport type LeadContact = {\n accountManager?: string;\n companyName?: string;\n country: string;\n email?: string;\n name: string;\n phone?: PhoneNumberValue | PhoneNumberRawValue;\n remarks?: string;\n\n // Fields used to link lead to existing org and contact.\n organizationId?: string;\n contactId?: string;\n orgNumber?: number;\n};\n\nexport type LeadScore = {\n leadId: string;\n score: number;\n scores: { name: string; value: number }[];\n};\n\nexport type VehicleScore = {\n vehicleId: string;\n score: number;\n};\n\nexport type LeadVehicles = {\n vehicles: VehicleScore[];\n};\n\nexport type VehicleLeads = {\n leads: LeadScore[];\n};\n\nexport type VehicleLeadsResponse = VehicleLeads & {\n leadsById: { [leadId: string]: Lead };\n};\n\nexport type LeadVehiclesResponse = LeadVehicles & {\n vehiclesById: { [vehicleId: string]: SearchVehicle };\n};\n\nexport type LeadStats = {\n lastClientConversation?: string;\n lastClientTx?: string;\n clientTxs?: number;\n};\n\nexport type LeadVehicle = {\n createdAt: string;\n vehicleId: string;\n saleId?: string;\n};\n\nexport type Lead = {\n id: string;\n createdAt: string;\n contact: LeadContact;\n interests: Interest[];\n vehicles: LeadVehicle[];\n stats?: LeadStats;\n};\n\nexport type InterestVersion = {\n make: string;\n models?: string[];\n};\n\nexport type Interest = {\n id: string;\n modifiedAt: string;\n modifiedBy: string;\n extended?: string[];\n heightened?: string[];\n adr?: boolean;\n age?: number;\n axleConfigurations?: string[];\n bodystyle?: string;\n cabins?: string[];\n category: string;\n crane?: boolean;\n damaged?: boolean;\n euronorms?: string[];\n horsepower?: number;\n used?: boolean;\n kilometers?: number;\n versions?: InterestVersion[];\n price?: number;\n leasing?: boolean;\n retarderIntarder?: boolean;\n suspensions?: string[];\n tailgate?: boolean;\n transmissions?: string[];\n autoGenerated?: boolean;\n\n remarks?: string;\n};\n\nexport type InterestResponse = {\n interest: Interest;\n meta: ReferenceData;\n};\n\nexport type InterestSearchRequest = { interest: Interest; offset: number; limit: number };\n\nexport type VehicleLeadsSearchRequest = { vehicleId: string };\n\nexport type InterestAutocompleteRequest = { vehicleId: string };\n\nexport type LeadVehiclesSearchRequest = { leadId: string };\n\nexport type SimilarVehiclesRequest = {\n offset: number;\n limit: number;\n};\n"]}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { PhoneNumberRawValue, PhoneNumberValue, SearchPermissions } from '@bisondesk/commons-sdk/types';
|
|
2
|
-
import { PublicSearchDefinition } from './definitions';
|
|
3
|
-
import { ReferenceData } from './utils';
|
|
4
|
-
import { SearchVehicle } from './vehicles';
|
|
5
|
-
export type SearchLead = Lead;
|
|
6
|
-
export type InputSearchLead = SearchLead & {
|
|
7
|
-
permissions: SearchPermissions;
|
|
8
|
-
};
|
|
9
|
-
export type RankedSearchLead = SearchLead & {
|
|
10
|
-
score: number;
|
|
11
|
-
};
|
|
12
|
-
export type LeadPublicSearchDefinitions = {
|
|
13
|
-
searchLead: PublicSearchDefinition;
|
|
14
|
-
};
|
|
15
|
-
export type LeadEvent = {
|
|
16
|
-
id: string;
|
|
17
|
-
action: 'upsert' | 'delete';
|
|
18
|
-
actionAt: string;
|
|
19
|
-
userId: string;
|
|
20
|
-
tenantId: string;
|
|
21
|
-
};
|
|
22
|
-
export type LeadContact = {
|
|
23
|
-
accountManager?: string;
|
|
24
|
-
companyName?: string;
|
|
25
|
-
country: string;
|
|
26
|
-
email?: string;
|
|
27
|
-
name: string;
|
|
28
|
-
phone?: PhoneNumberValue | PhoneNumberRawValue;
|
|
29
|
-
remarks?: string;
|
|
30
|
-
organizationId?: string;
|
|
31
|
-
contactId?: string;
|
|
32
|
-
orgNumber?: number;
|
|
33
|
-
};
|
|
34
|
-
export type LeadScore = {
|
|
35
|
-
leadId: string;
|
|
36
|
-
score: number;
|
|
37
|
-
scores: {
|
|
38
|
-
name: string;
|
|
39
|
-
value: number;
|
|
40
|
-
}[];
|
|
41
|
-
};
|
|
42
|
-
export type VehicleScore = {
|
|
43
|
-
vehicleId: string;
|
|
44
|
-
score: number;
|
|
45
|
-
};
|
|
46
|
-
export type LeadVehicles = {
|
|
47
|
-
vehicles: VehicleScore[];
|
|
48
|
-
};
|
|
49
|
-
export type VehicleLeads = {
|
|
50
|
-
leads: LeadScore[];
|
|
51
|
-
};
|
|
52
|
-
export type VehicleLeadsResponse = VehicleLeads & {
|
|
53
|
-
leadsById: {
|
|
54
|
-
[leadId: string]: Lead;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
export type LeadVehiclesResponse = LeadVehicles & {
|
|
58
|
-
vehiclesById: {
|
|
59
|
-
[vehicleId: string]: SearchVehicle;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
export type LeadStats = {
|
|
63
|
-
lastClientConversation?: string;
|
|
64
|
-
lastClientTx?: string;
|
|
65
|
-
clientTxs?: number;
|
|
66
|
-
};
|
|
67
|
-
export type LeadVehicle = {
|
|
68
|
-
createdAt: string;
|
|
69
|
-
vehicleId: string;
|
|
70
|
-
saleId?: string;
|
|
71
|
-
};
|
|
72
|
-
export type Lead = {
|
|
73
|
-
id: string;
|
|
74
|
-
createdAt: string;
|
|
75
|
-
contact: LeadContact;
|
|
76
|
-
interests: Interest[];
|
|
77
|
-
vehicles: LeadVehicle[];
|
|
78
|
-
stats?: LeadStats;
|
|
79
|
-
};
|
|
80
|
-
export type InterestVersion = {
|
|
81
|
-
make: string;
|
|
82
|
-
models?: string[];
|
|
83
|
-
};
|
|
84
|
-
export type Interest = {
|
|
85
|
-
id: string;
|
|
86
|
-
modifiedAt: string;
|
|
87
|
-
modifiedBy: string;
|
|
88
|
-
extended?: string[];
|
|
89
|
-
heightened?: string[];
|
|
90
|
-
adr?: boolean;
|
|
91
|
-
age?: number;
|
|
92
|
-
axleConfigurations?: string[];
|
|
93
|
-
bodystyle?: string;
|
|
94
|
-
cabins?: string[];
|
|
95
|
-
category: string;
|
|
96
|
-
crane?: boolean;
|
|
97
|
-
damaged?: boolean;
|
|
98
|
-
euronorms?: string[];
|
|
99
|
-
horsepower?: number;
|
|
100
|
-
used?: boolean;
|
|
101
|
-
kilometers?: number;
|
|
102
|
-
versions?: InterestVersion[];
|
|
103
|
-
price?: number;
|
|
104
|
-
leasing?: boolean;
|
|
105
|
-
retarderIntarder?: boolean;
|
|
106
|
-
suspensions?: string[];
|
|
107
|
-
tailgate?: boolean;
|
|
108
|
-
transmissions?: string[];
|
|
109
|
-
autoGenerated?: boolean;
|
|
110
|
-
remarks?: string;
|
|
111
|
-
};
|
|
112
|
-
export type InterestResponse = {
|
|
113
|
-
interest: Interest;
|
|
114
|
-
meta: ReferenceData;
|
|
115
|
-
};
|
|
116
|
-
export type InterestSearchRequest = {
|
|
117
|
-
interest: Interest;
|
|
118
|
-
offset: number;
|
|
119
|
-
limit: number;
|
|
120
|
-
};
|
|
121
|
-
export type VehicleLeadsSearchRequest = {
|
|
122
|
-
vehicleId: string;
|
|
123
|
-
};
|
|
124
|
-
export type InterestAutocompleteRequest = {
|
|
125
|
-
vehicleId: string;
|
|
126
|
-
};
|
|
127
|
-
export type LeadVehiclesSearchRequest = {
|
|
128
|
-
leadId: string;
|
|
129
|
-
};
|
|
130
|
-
export type SimilarVehiclesRequest = {
|
|
131
|
-
offset: number;
|
|
132
|
-
limit: number;
|
|
133
|
-
};
|
|
134
|
-
//# sourceMappingURL=leads.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"leads.d.ts","sourceRoot":"/","sources":["types/leads.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC;AAE9B,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG;IACzC,WAAW,EAAE,iBAAiB,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D,MAAM,MAAM,2BAA2B,GAAG;IACxC,UAAU,EAAE,sBAAsB,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB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AAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,aAAa,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAAE,QAAQ,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1F,MAAM,MAAM,yBAAyB,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D,MAAM,MAAM,2BAA2B,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhE,MAAM,MAAM,yBAAyB,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3D,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC"}
|
package/src/types/leads.ts
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
PhoneNumberRawValue,
|
|
3
|
-
PhoneNumberValue,
|
|
4
|
-
SearchPermissions,
|
|
5
|
-
} from '@bisondesk/commons-sdk/types';
|
|
6
|
-
import { PublicSearchDefinition } from './definitions';
|
|
7
|
-
import { ReferenceData } from './utils';
|
|
8
|
-
import { SearchVehicle } from './vehicles';
|
|
9
|
-
|
|
10
|
-
export type SearchLead = Lead;
|
|
11
|
-
|
|
12
|
-
export type InputSearchLead = SearchLead & {
|
|
13
|
-
permissions: SearchPermissions;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export type RankedSearchLead = SearchLead & { score: number };
|
|
17
|
-
|
|
18
|
-
export type LeadPublicSearchDefinitions = {
|
|
19
|
-
searchLead: PublicSearchDefinition;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export type LeadEvent = {
|
|
23
|
-
id: string;
|
|
24
|
-
action: 'upsert' | 'delete';
|
|
25
|
-
actionAt: string;
|
|
26
|
-
userId: string;
|
|
27
|
-
tenantId: string;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export type LeadContact = {
|
|
31
|
-
accountManager?: string;
|
|
32
|
-
companyName?: string;
|
|
33
|
-
country: string;
|
|
34
|
-
email?: string;
|
|
35
|
-
name: string;
|
|
36
|
-
phone?: PhoneNumberValue | PhoneNumberRawValue;
|
|
37
|
-
remarks?: string;
|
|
38
|
-
|
|
39
|
-
// Fields used to link lead to existing org and contact.
|
|
40
|
-
organizationId?: string;
|
|
41
|
-
contactId?: string;
|
|
42
|
-
orgNumber?: number;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export type LeadScore = {
|
|
46
|
-
leadId: string;
|
|
47
|
-
score: number;
|
|
48
|
-
scores: { name: string; value: number }[];
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
export type VehicleScore = {
|
|
52
|
-
vehicleId: string;
|
|
53
|
-
score: number;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
export type LeadVehicles = {
|
|
57
|
-
vehicles: VehicleScore[];
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export type VehicleLeads = {
|
|
61
|
-
leads: LeadScore[];
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export type VehicleLeadsResponse = VehicleLeads & {
|
|
65
|
-
leadsById: { [leadId: string]: Lead };
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
export type LeadVehiclesResponse = LeadVehicles & {
|
|
69
|
-
vehiclesById: { [vehicleId: string]: SearchVehicle };
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export type LeadStats = {
|
|
73
|
-
lastClientConversation?: string;
|
|
74
|
-
lastClientTx?: string;
|
|
75
|
-
clientTxs?: number;
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
export type LeadVehicle = {
|
|
79
|
-
createdAt: string;
|
|
80
|
-
vehicleId: string;
|
|
81
|
-
saleId?: string;
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
export type Lead = {
|
|
85
|
-
id: string;
|
|
86
|
-
createdAt: string;
|
|
87
|
-
contact: LeadContact;
|
|
88
|
-
interests: Interest[];
|
|
89
|
-
vehicles: LeadVehicle[];
|
|
90
|
-
stats?: LeadStats;
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export type InterestVersion = {
|
|
94
|
-
make: string;
|
|
95
|
-
models?: string[];
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
export type Interest = {
|
|
99
|
-
id: string;
|
|
100
|
-
modifiedAt: string;
|
|
101
|
-
modifiedBy: string;
|
|
102
|
-
extended?: string[];
|
|
103
|
-
heightened?: string[];
|
|
104
|
-
adr?: boolean;
|
|
105
|
-
age?: number;
|
|
106
|
-
axleConfigurations?: string[];
|
|
107
|
-
bodystyle?: string;
|
|
108
|
-
cabins?: string[];
|
|
109
|
-
category: string;
|
|
110
|
-
crane?: boolean;
|
|
111
|
-
damaged?: boolean;
|
|
112
|
-
euronorms?: string[];
|
|
113
|
-
horsepower?: number;
|
|
114
|
-
used?: boolean;
|
|
115
|
-
kilometers?: number;
|
|
116
|
-
versions?: InterestVersion[];
|
|
117
|
-
price?: number;
|
|
118
|
-
leasing?: boolean;
|
|
119
|
-
retarderIntarder?: boolean;
|
|
120
|
-
suspensions?: string[];
|
|
121
|
-
tailgate?: boolean;
|
|
122
|
-
transmissions?: string[];
|
|
123
|
-
autoGenerated?: boolean;
|
|
124
|
-
|
|
125
|
-
remarks?: string;
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
export type InterestResponse = {
|
|
129
|
-
interest: Interest;
|
|
130
|
-
meta: ReferenceData;
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
export type InterestSearchRequest = { interest: Interest; offset: number; limit: number };
|
|
134
|
-
|
|
135
|
-
export type VehicleLeadsSearchRequest = { vehicleId: string };
|
|
136
|
-
|
|
137
|
-
export type InterestAutocompleteRequest = { vehicleId: string };
|
|
138
|
-
|
|
139
|
-
export type LeadVehiclesSearchRequest = { leadId: string };
|
|
140
|
-
|
|
141
|
-
export type SimilarVehiclesRequest = {
|
|
142
|
-
offset: number;
|
|
143
|
-
limit: number;
|
|
144
|
-
};
|