@driveflux/api-functions 1.0.71 → 1.0.72
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/auth/confirm.js +29 -24
- package/dist/auth/emails.js +13 -12
- package/dist/auth/formatter.js +5 -5
- package/dist/auth/otp.js +50 -66
- package/dist/auth/register.js +34 -42
- package/dist/auth/tokens.d.ts +3 -3
- package/dist/auth/tokens.js +55 -58
- package/dist/auth/verifications.js +52 -53
- package/dist/constants.js +1 -0
- package/dist/create-logger.js +2 -1
- package/dist/mailjet/calls/manage-contacts-in-list.js +6 -5
- package/dist/mailjet/calls/manage-subscription-status.js +5 -4
- package/dist/mailjet/calls/request-service.js +6 -7
- package/dist/mailjet/refresh-email-preferences.js +12 -11
- package/dist/mailjet/set-contact.js +12 -11
- package/dist/mailjet/types.js +2 -1
- package/dist/mailjet/utils/convert-to-array.js +6 -8
- package/dist/mailjet/utils/extract-email-preferences.js +15 -14
- package/dist/mailjet/utils/lists.js +8 -7
- package/dist/mailjet/utils/update-email-references.js +15 -16
- package/dist/notion/client.js +19 -22
- package/dist/notion/helpful.js +9 -6
- package/dist/notion/schemas/block.js +48 -42
- package/dist/notion/schemas/common.js +14 -9
- package/dist/notion/schemas/database.d.ts +3 -3
- package/dist/notion/schemas/database.js +60 -62
- package/dist/notion/schemas/emoji.js +2 -1
- package/dist/notion/schemas/file.d.ts +1 -1
- package/dist/notion/schemas/file.js +9 -9
- package/dist/notion/schemas/kb.d.ts +4 -4
- package/dist/notion/schemas/kb.js +6 -5
- package/dist/notion/schemas/page.d.ts +4 -4
- package/dist/notion/schemas/page.js +61 -72
- package/dist/notion/schemas/parent.js +5 -4
- package/dist/notion/schemas/user.js +19 -18
- package/dist/reservation/agree.d.ts +308 -1
- package/dist/reservation/agree.js +7 -6
- package/dist/reservation/checks.d.ts +1 -1
- package/dist/reservation/checks.js +4 -3
- package/dist/reservation/display-vehicle.d.ts +21 -16
- package/dist/reservation/display-vehicle.d.ts.map +1 -1
- package/dist/reservation/display-vehicle.js +74 -66
- package/dist/reservation/display-vehicle.js.map +1 -1
- package/dist/reservation/ensure-user-billing-address.js +11 -9
- package/dist/reservation/fetch-or-create.d.ts +2 -2
- package/dist/reservation/fetch-or-create.d.ts.map +1 -1
- package/dist/reservation/fetch-or-create.js +102 -83
- package/dist/reservation/fetch-or-create.js.map +1 -1
- package/dist/reservation/invoice.d.ts +3 -3
- package/dist/reservation/invoice.d.ts.map +1 -1
- package/dist/reservation/invoice.js +125 -76
- package/dist/reservation/invoice.js.map +1 -1
- package/dist/reservation/payer.js +6 -5
- package/dist/reservation/payment-intent-sync.js +6 -4
- package/dist/reservation/reserve.d.ts.map +1 -1
- package/dist/reservation/reserve.js +5 -3
- package/dist/reservation/reserve.js.map +1 -1
- package/dist/reservation/types.d.ts +1 -0
- package/dist/reservation/types.d.ts.map +1 -1
- package/dist/reservation/types.js +2 -1
- package/dist/reservation/vehicle.js +16 -13
- package/dist/slack.js +29 -24
- package/dist/validation.js +79 -77
- package/dist/vehicle/vehicle-pricing/constants.js +19 -22
- package/dist/vehicle/vehicle-pricing/index.js +42 -28
- package/dist/vehicle/vehicle-pricing/types.js +2 -1
- package/package.json +11 -10
|
@@ -1,3 +1,310 @@
|
|
|
1
1
|
import type { ReserveVehicleParams } from './types.js';
|
|
2
|
-
export declare const handleAgreeToTerms: ({ agreedToTerms, subscribingUser, ipAddress, }: Pick<ReserveVehicleParams, "agreedToTerms" | "subscribingUser" | "ipAddress">) => Promise<
|
|
2
|
+
export declare const handleAgreeToTerms: ({ agreedToTerms, subscribingUser, ipAddress, }: Pick<ReserveVehicleParams, "agreedToTerms" | "subscribingUser" | "ipAddress">) => Promise<{
|
|
3
|
+
object: import("@driveflux/db").UserObject;
|
|
4
|
+
phoneNumber: string | null;
|
|
5
|
+
id: string;
|
|
6
|
+
metadata: PrismaJson.SimpleMetadata | null;
|
|
7
|
+
createdAt: Date;
|
|
8
|
+
updatedAt: Date;
|
|
9
|
+
firstName: string | null;
|
|
10
|
+
lastName: string | null;
|
|
11
|
+
jobTitle: string | null;
|
|
12
|
+
email: string;
|
|
13
|
+
businessId: string | null;
|
|
14
|
+
emailVerified: boolean;
|
|
15
|
+
password: string;
|
|
16
|
+
mustResetPassword: boolean;
|
|
17
|
+
phoneNumberVerified: boolean;
|
|
18
|
+
dateOfBirth: Date | null;
|
|
19
|
+
nationality: string | null;
|
|
20
|
+
consented: boolean;
|
|
21
|
+
stripeCustomerId: string | null;
|
|
22
|
+
status: import("@driveflux/db").UserStatus;
|
|
23
|
+
race: import("@driveflux/db").Race | null;
|
|
24
|
+
maritalStatus: import("@driveflux/db").MaritalStatus | null;
|
|
25
|
+
emergencyContactName: string | null;
|
|
26
|
+
emergencyPhoneNumber: string | null;
|
|
27
|
+
companyName: string | null;
|
|
28
|
+
ethnicity: import("@driveflux/db").Ethnicity | null;
|
|
29
|
+
geoRegion: string | null;
|
|
30
|
+
industry: string | null;
|
|
31
|
+
gender: import("@driveflux/db").Gender | null;
|
|
32
|
+
estimatedSalary: number | null;
|
|
33
|
+
department: string | null;
|
|
34
|
+
groups: string[];
|
|
35
|
+
permissions: PrismaJson.any;
|
|
36
|
+
banned: boolean;
|
|
37
|
+
banReason: string | null;
|
|
38
|
+
preferredCurrency: string | null;
|
|
39
|
+
preferredLocale: string | null;
|
|
40
|
+
temporary: boolean;
|
|
41
|
+
temporaryEmail: string | null;
|
|
42
|
+
timezone: string | null;
|
|
43
|
+
slackUserId: string | null;
|
|
44
|
+
notionUserId: string | null;
|
|
45
|
+
referredByUserId: string | null;
|
|
46
|
+
createdOffPlatformTransactionIds: string[];
|
|
47
|
+
approvedOffPlatformTransactionIds: string[];
|
|
48
|
+
registrationComplete: boolean;
|
|
49
|
+
asDriverToSubscriptionIds: string[];
|
|
50
|
+
identification: {
|
|
51
|
+
type: import("@driveflux/db").UserIdentificationType;
|
|
52
|
+
number: string | null;
|
|
53
|
+
expiryDate: Date | null;
|
|
54
|
+
issuedAt: Date | null;
|
|
55
|
+
issuedBy: string | null;
|
|
56
|
+
visaNumber: string | null;
|
|
57
|
+
entryDate: Date | null;
|
|
58
|
+
visaExpiry: Date | null;
|
|
59
|
+
visaValidityMonths: number | null;
|
|
60
|
+
verified: boolean;
|
|
61
|
+
} | null;
|
|
62
|
+
documents: {
|
|
63
|
+
passport: {
|
|
64
|
+
name: string | null;
|
|
65
|
+
description: string | null;
|
|
66
|
+
url: string;
|
|
67
|
+
fileType: string | null;
|
|
68
|
+
mimeType: string | null;
|
|
69
|
+
uploaded: boolean;
|
|
70
|
+
createdAt: Date | null;
|
|
71
|
+
updatedAt: Date | null;
|
|
72
|
+
metadata: PrismaJson.AnyMetadata | null;
|
|
73
|
+
} | null;
|
|
74
|
+
visa: {
|
|
75
|
+
name: string | null;
|
|
76
|
+
description: string | null;
|
|
77
|
+
url: string;
|
|
78
|
+
fileType: string | null;
|
|
79
|
+
mimeType: string | null;
|
|
80
|
+
uploaded: boolean;
|
|
81
|
+
createdAt: Date | null;
|
|
82
|
+
updatedAt: Date | null;
|
|
83
|
+
metadata: PrismaJson.AnyMetadata | null;
|
|
84
|
+
} | null;
|
|
85
|
+
idFront: {
|
|
86
|
+
name: string | null;
|
|
87
|
+
description: string | null;
|
|
88
|
+
url: string;
|
|
89
|
+
fileType: string | null;
|
|
90
|
+
mimeType: string | null;
|
|
91
|
+
uploaded: boolean;
|
|
92
|
+
createdAt: Date | null;
|
|
93
|
+
updatedAt: Date | null;
|
|
94
|
+
metadata: PrismaJson.AnyMetadata | null;
|
|
95
|
+
} | null;
|
|
96
|
+
idBack: {
|
|
97
|
+
name: string | null;
|
|
98
|
+
description: string | null;
|
|
99
|
+
url: string;
|
|
100
|
+
fileType: string | null;
|
|
101
|
+
mimeType: string | null;
|
|
102
|
+
uploaded: boolean;
|
|
103
|
+
createdAt: Date | null;
|
|
104
|
+
updatedAt: Date | null;
|
|
105
|
+
metadata: PrismaJson.AnyMetadata | null;
|
|
106
|
+
} | null;
|
|
107
|
+
drivingLicense: {
|
|
108
|
+
name: string | null;
|
|
109
|
+
description: string | null;
|
|
110
|
+
url: string;
|
|
111
|
+
fileType: string | null;
|
|
112
|
+
mimeType: string | null;
|
|
113
|
+
uploaded: boolean;
|
|
114
|
+
createdAt: Date | null;
|
|
115
|
+
updatedAt: Date | null;
|
|
116
|
+
metadata: PrismaJson.AnyMetadata | null;
|
|
117
|
+
} | null;
|
|
118
|
+
experianReport: {
|
|
119
|
+
name: string | null;
|
|
120
|
+
description: string | null;
|
|
121
|
+
url: string;
|
|
122
|
+
fileType: string | null;
|
|
123
|
+
mimeType: string | null;
|
|
124
|
+
uploaded: boolean;
|
|
125
|
+
createdAt: Date | null;
|
|
126
|
+
updatedAt: Date | null;
|
|
127
|
+
metadata: PrismaJson.AnyMetadata | null;
|
|
128
|
+
} | null;
|
|
129
|
+
pdrm: {
|
|
130
|
+
name: string | null;
|
|
131
|
+
description: string | null;
|
|
132
|
+
url: string;
|
|
133
|
+
fileType: string | null;
|
|
134
|
+
mimeType: string | null;
|
|
135
|
+
uploaded: boolean;
|
|
136
|
+
createdAt: Date | null;
|
|
137
|
+
updatedAt: Date | null;
|
|
138
|
+
metadata: PrismaJson.AnyMetadata | null;
|
|
139
|
+
} | null;
|
|
140
|
+
jpj: {
|
|
141
|
+
name: string | null;
|
|
142
|
+
description: string | null;
|
|
143
|
+
url: string;
|
|
144
|
+
fileType: string | null;
|
|
145
|
+
mimeType: string | null;
|
|
146
|
+
uploaded: boolean;
|
|
147
|
+
createdAt: Date | null;
|
|
148
|
+
updatedAt: Date | null;
|
|
149
|
+
metadata: PrismaJson.AnyMetadata | null;
|
|
150
|
+
} | null;
|
|
151
|
+
bgs: {
|
|
152
|
+
name: string | null;
|
|
153
|
+
description: string | null;
|
|
154
|
+
url: string;
|
|
155
|
+
fileType: string | null;
|
|
156
|
+
mimeType: string | null;
|
|
157
|
+
uploaded: boolean;
|
|
158
|
+
createdAt: Date | null;
|
|
159
|
+
updatedAt: Date | null;
|
|
160
|
+
metadata: PrismaJson.AnyMetadata | null;
|
|
161
|
+
} | null;
|
|
162
|
+
bankStatement: {
|
|
163
|
+
name: string | null;
|
|
164
|
+
description: string | null;
|
|
165
|
+
url: string;
|
|
166
|
+
fileType: string | null;
|
|
167
|
+
mimeType: string | null;
|
|
168
|
+
uploaded: boolean;
|
|
169
|
+
createdAt: Date | null;
|
|
170
|
+
updatedAt: Date | null;
|
|
171
|
+
metadata: PrismaJson.AnyMetadata | null;
|
|
172
|
+
} | null;
|
|
173
|
+
bankStatement2: {
|
|
174
|
+
name: string | null;
|
|
175
|
+
description: string | null;
|
|
176
|
+
url: string;
|
|
177
|
+
fileType: string | null;
|
|
178
|
+
mimeType: string | null;
|
|
179
|
+
uploaded: boolean;
|
|
180
|
+
createdAt: Date | null;
|
|
181
|
+
updatedAt: Date | null;
|
|
182
|
+
metadata: PrismaJson.AnyMetadata | null;
|
|
183
|
+
} | null;
|
|
184
|
+
bankStatement3: {
|
|
185
|
+
name: string | null;
|
|
186
|
+
description: string | null;
|
|
187
|
+
url: string;
|
|
188
|
+
fileType: string | null;
|
|
189
|
+
mimeType: string | null;
|
|
190
|
+
uploaded: boolean;
|
|
191
|
+
createdAt: Date | null;
|
|
192
|
+
updatedAt: Date | null;
|
|
193
|
+
metadata: PrismaJson.AnyMetadata | null;
|
|
194
|
+
} | null;
|
|
195
|
+
epfStatement: {
|
|
196
|
+
name: string | null;
|
|
197
|
+
description: string | null;
|
|
198
|
+
url: string;
|
|
199
|
+
fileType: string | null;
|
|
200
|
+
mimeType: string | null;
|
|
201
|
+
uploaded: boolean;
|
|
202
|
+
createdAt: Date | null;
|
|
203
|
+
updatedAt: Date | null;
|
|
204
|
+
metadata: PrismaJson.AnyMetadata | null;
|
|
205
|
+
} | null;
|
|
206
|
+
offerLetter: {
|
|
207
|
+
name: string | null;
|
|
208
|
+
description: string | null;
|
|
209
|
+
url: string;
|
|
210
|
+
fileType: string | null;
|
|
211
|
+
mimeType: string | null;
|
|
212
|
+
uploaded: boolean;
|
|
213
|
+
createdAt: Date | null;
|
|
214
|
+
updatedAt: Date | null;
|
|
215
|
+
metadata: PrismaJson.AnyMetadata | null;
|
|
216
|
+
} | null;
|
|
217
|
+
} | null;
|
|
218
|
+
paymentMethods: ({
|
|
219
|
+
id: string;
|
|
220
|
+
object: import("@driveflux/db").PaymentMethodObject;
|
|
221
|
+
provider: string;
|
|
222
|
+
chargingMethod: import("@driveflux/db").ChargingMethod;
|
|
223
|
+
type: string;
|
|
224
|
+
providerPaymentMethodId: string | null;
|
|
225
|
+
isDefault: boolean;
|
|
226
|
+
stripeCustomerId: string | null;
|
|
227
|
+
stripeSetupIntentId: string | null;
|
|
228
|
+
payexMandateId: string | null;
|
|
229
|
+
accountType: import("@driveflux/db").PaymentMethodAccountType;
|
|
230
|
+
status: import("@driveflux/db").PaymentMethodStatus;
|
|
231
|
+
statusText: string | null;
|
|
232
|
+
ownerId: string;
|
|
233
|
+
metadata: PrismaJson.SimpleMetadata | null;
|
|
234
|
+
} & {
|
|
235
|
+
payexDetails: {
|
|
236
|
+
bankName: string | null;
|
|
237
|
+
bankLast4: string | null;
|
|
238
|
+
bankAccountType: import("@driveflux/db").BankAccountType | null;
|
|
239
|
+
accountHolderName: string | null;
|
|
240
|
+
} | null;
|
|
241
|
+
card: {
|
|
242
|
+
brand: string | null;
|
|
243
|
+
last4: string | null;
|
|
244
|
+
expMonth: number | null;
|
|
245
|
+
expYear: number | null;
|
|
246
|
+
funding: string | null;
|
|
247
|
+
country: string | null;
|
|
248
|
+
cardholderName: string | null;
|
|
249
|
+
} | null;
|
|
250
|
+
})[];
|
|
251
|
+
addresses: {
|
|
252
|
+
home: {
|
|
253
|
+
name: string | null;
|
|
254
|
+
street1: string;
|
|
255
|
+
street2: string | null;
|
|
256
|
+
city: string;
|
|
257
|
+
state: string;
|
|
258
|
+
country: string;
|
|
259
|
+
postalCode: string;
|
|
260
|
+
} & {
|
|
261
|
+
coordinates: {
|
|
262
|
+
lat: number;
|
|
263
|
+
lng: number;
|
|
264
|
+
} | null;
|
|
265
|
+
};
|
|
266
|
+
billing: {
|
|
267
|
+
name: string | null;
|
|
268
|
+
street1: string;
|
|
269
|
+
street2: string | null;
|
|
270
|
+
city: string;
|
|
271
|
+
state: string;
|
|
272
|
+
country: string;
|
|
273
|
+
postalCode: string;
|
|
274
|
+
};
|
|
275
|
+
} | null;
|
|
276
|
+
verifications: {
|
|
277
|
+
nameMatch: boolean;
|
|
278
|
+
addressMatch: boolean;
|
|
279
|
+
drivingLicense: import("@driveflux/db").DrivingLicense | null;
|
|
280
|
+
iScore: number | null;
|
|
281
|
+
pastBankruptcy: boolean;
|
|
282
|
+
pdrmSummons: number | null;
|
|
283
|
+
jpjSummons: number | null;
|
|
284
|
+
specialAttentionAccounts: number | null;
|
|
285
|
+
legalSuits: number | null;
|
|
286
|
+
badTrade: number | null;
|
|
287
|
+
paymentDefaults: number | null;
|
|
288
|
+
jpjBlacklist: boolean;
|
|
289
|
+
visaEvidence: boolean;
|
|
290
|
+
creditLimit: number | null;
|
|
291
|
+
avgThreeMonthsAccountBalance: number | null;
|
|
292
|
+
monthlyIncome: number | null;
|
|
293
|
+
creditUtilization: number | null;
|
|
294
|
+
onlinePresence: PrismaJson.StringMetadata | null;
|
|
295
|
+
onlineVerifications: PrismaJson.SimpleMetadata | null;
|
|
296
|
+
} | null;
|
|
297
|
+
emailPreferences: {
|
|
298
|
+
generalMarketing: boolean | null;
|
|
299
|
+
noActiveSubs: boolean | null;
|
|
300
|
+
signUpOnly: boolean | null;
|
|
301
|
+
signUpPaymentAdded: boolean | null;
|
|
302
|
+
activeSub: boolean | null;
|
|
303
|
+
expiredSub: boolean | null;
|
|
304
|
+
} | null;
|
|
305
|
+
signupParams: {
|
|
306
|
+
source: string | null;
|
|
307
|
+
method: string | null;
|
|
308
|
+
} | null;
|
|
309
|
+
}>;
|
|
3
310
|
//# sourceMappingURL=agree.d.ts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { prisma } from '@driveflux/db';
|
|
2
2
|
import { generateId } from '@driveflux/db/id';
|
|
3
|
-
export const handleAgreeToTerms = async ({ agreedToTerms, subscribingUser, ipAddress })=>{
|
|
3
|
+
export const handleAgreeToTerms = async ({ agreedToTerms, subscribingUser, ipAddress, }) => {
|
|
4
4
|
if (agreedToTerms && !subscribingUser.consented) {
|
|
5
5
|
subscribingUser = await prisma.user.update({
|
|
6
6
|
where: {
|
|
7
|
-
id: subscribingUser.id
|
|
7
|
+
id: subscribingUser.id,
|
|
8
8
|
},
|
|
9
9
|
data: {
|
|
10
10
|
consented: true,
|
|
@@ -13,11 +13,12 @@ export const handleAgreeToTerms = async ({ agreedToTerms, subscribingUser, ipAdd
|
|
|
13
13
|
id: generateId('UserConsent'),
|
|
14
14
|
ipAddress,
|
|
15
15
|
consentType: 'terms',
|
|
16
|
-
email: subscribingUser.email
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
16
|
+
email: subscribingUser.email,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
return subscribingUser;
|
|
23
23
|
};
|
|
24
|
+
//# sourceMappingURL=agree.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Host, PlanType, Vehicle } from '@driveflux/db';
|
|
2
2
|
import { type PromisedResult } from '@driveflux/result';
|
|
3
3
|
import type { ReserveVehicleParams } from './types.js';
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const getUserAbility: ({ requestUser, }: Pick<ReserveVehicleParams, "requestUser">) => Promise<import("@driveflux/auth/authorization/types").AppAbility>;
|
|
5
5
|
export declare const checkIfVehicleIsAvailableForReservation: (vehicle: Vehicle & {
|
|
6
6
|
host: Pick<Host, "id"> | null;
|
|
7
7
|
}, plan: PlanType, allowDelisted?: boolean) => PromisedResult<Vehicle>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { buildOrDefineAbility } from '@driveflux/auth/authorization';
|
|
2
|
-
import { makeProblem, PROBLEM_CONDITION_FAILED, PROBLEM_RESOURCE_BUSY } from '@driveflux/problem';
|
|
2
|
+
import { makeProblem, PROBLEM_CONDITION_FAILED, PROBLEM_RESOURCE_BUSY, } from '@driveflux/problem';
|
|
3
3
|
import { Err, Ok } from '@driveflux/result';
|
|
4
|
-
export const getUserAbility = async ({ requestUser })=>{
|
|
4
|
+
export const getUserAbility = async ({ requestUser, }) => {
|
|
5
5
|
// Check if the user can reserve
|
|
6
6
|
const requestUserAbility = await buildOrDefineAbility(requestUser);
|
|
7
7
|
return requestUserAbility;
|
|
8
8
|
};
|
|
9
|
-
export const checkIfVehicleIsAvailableForReservation = async (vehicle, plan, allowDelisted)=>{
|
|
9
|
+
export const checkIfVehicleIsAvailableForReservation = async (vehicle, plan, allowDelisted) => {
|
|
10
10
|
if (!vehicle.pricing) {
|
|
11
11
|
return new Err(makeProblem(PROBLEM_RESOURCE_BUSY, 'This vehicle is not available for reservation'));
|
|
12
12
|
}
|
|
@@ -22,3 +22,4 @@ export const checkIfVehicleIsAvailableForReservation = async (vehicle, plan, all
|
|
|
22
22
|
}
|
|
23
23
|
return new Ok(vehicle);
|
|
24
24
|
};
|
|
25
|
+
//# sourceMappingURL=checks.js.map
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { type DisplayVehicle, type MileagePackage, type PlanType, type UltraTier, type Vehicle, type VehicleType } from '@driveflux/db';
|
|
2
2
|
export declare const fetchDisplayVehicle: (displayVehicle: DisplayVehicle | string) => Promise<{
|
|
3
3
|
object: import("@driveflux/db").DisplayVehicleObject;
|
|
4
|
+
type: VehicleType;
|
|
4
5
|
id: string;
|
|
5
6
|
createdAt: Date;
|
|
6
7
|
updatedAt: Date;
|
|
8
|
+
fullBooking: boolean | null;
|
|
7
9
|
make: string;
|
|
8
10
|
vehicleModel: string;
|
|
9
11
|
variant: string;
|
|
10
12
|
year: number;
|
|
11
|
-
type: VehicleType;
|
|
12
13
|
brandSlug: string;
|
|
13
14
|
brandId: string;
|
|
14
15
|
defaultHostId: string;
|
|
15
16
|
vehicleSlug: string;
|
|
17
|
+
availableStock: number | null;
|
|
16
18
|
saveValue: number | null;
|
|
17
19
|
details: ({
|
|
18
20
|
features: string[];
|
|
@@ -123,10 +125,13 @@ export declare const fetchDisplayVehicle: (displayVehicle: DisplayVehicle | stri
|
|
|
123
125
|
};
|
|
124
126
|
};
|
|
125
127
|
pricing: {
|
|
128
|
+
keepPricingIntact: boolean | null;
|
|
126
129
|
tmv: number;
|
|
127
130
|
refundableDeposit: number;
|
|
128
131
|
loanMonthly: number;
|
|
129
132
|
loanAnnualOwnershipCost: number;
|
|
133
|
+
availablePlans: PlanType[];
|
|
134
|
+
availableMileagePackages: MileagePackage[];
|
|
130
135
|
} & {
|
|
131
136
|
matrix: {
|
|
132
137
|
plan60: {
|
|
@@ -191,20 +196,20 @@ export declare const fetchDisplayVehicle: (displayVehicle: DisplayVehicle | stri
|
|
|
191
196
|
export declare const createVehicleFromDisplayVehicle: (displayVehicle: DisplayVehicle | string, selectedColor?: string) => Promise<({
|
|
192
197
|
host: {
|
|
193
198
|
object: import("@driveflux/db").HostObject;
|
|
194
|
-
|
|
199
|
+
phoneNumber: string | null;
|
|
200
|
+
type: import("@driveflux/db").HostType | null;
|
|
195
201
|
id: string;
|
|
196
202
|
metadata: PrismaJson.AnyMetadata | null;
|
|
203
|
+
name: string;
|
|
197
204
|
createdAt: Date;
|
|
198
205
|
updatedAt: Date;
|
|
199
|
-
registrationNumber: string | null;
|
|
200
|
-
type: import("@driveflux/db").HostType | null;
|
|
201
|
-
active: boolean;
|
|
202
206
|
email: string | null;
|
|
203
|
-
phoneNumber: string | null;
|
|
204
207
|
race: import("@driveflux/db").Race | null;
|
|
205
208
|
emergencyContactName: string | null;
|
|
206
209
|
emergencyPhoneNumber: string | null;
|
|
210
|
+
active: boolean;
|
|
207
211
|
commencementDate: Date | null;
|
|
212
|
+
registrationNumber: string | null;
|
|
208
213
|
stripeAccountId: string | null;
|
|
209
214
|
isStripeConnected: boolean;
|
|
210
215
|
serviceCenterIds: string[];
|
|
@@ -262,11 +267,15 @@ export declare const createVehicleFromDisplayVehicle: (displayVehicle: DisplayVe
|
|
|
262
267
|
};
|
|
263
268
|
} & {
|
|
264
269
|
object: import("@driveflux/db").VehicleObject;
|
|
270
|
+
type: VehicleType;
|
|
265
271
|
id: string;
|
|
266
|
-
status: import("@driveflux/db").VehicleStatus;
|
|
267
272
|
metadata: PrismaJson.AnyMetadata | null;
|
|
268
273
|
createdAt: Date;
|
|
269
274
|
updatedAt: Date;
|
|
275
|
+
status: import("@driveflux/db").VehicleStatus;
|
|
276
|
+
temporary: boolean;
|
|
277
|
+
registrationNumber: string | null;
|
|
278
|
+
hostId: string;
|
|
270
279
|
make: string;
|
|
271
280
|
vehicleModel: string;
|
|
272
281
|
variant: string;
|
|
@@ -276,7 +285,6 @@ export declare const createVehicleFromDisplayVehicle: (displayVehicle: DisplayVe
|
|
|
276
285
|
compositeSearchScore: number;
|
|
277
286
|
registrationDate: Date | null;
|
|
278
287
|
mileage: number | null;
|
|
279
|
-
registrationNumber: string | null;
|
|
280
288
|
vin: string | null;
|
|
281
289
|
engineNumber: string | null;
|
|
282
290
|
availability: import("@driveflux/db").VehicleAvailablity | null;
|
|
@@ -291,8 +299,6 @@ export declare const createVehicleFromDisplayVehicle: (displayVehicle: DisplayVe
|
|
|
291
299
|
delistedAt: Date | null;
|
|
292
300
|
imagesNotActual: boolean;
|
|
293
301
|
imagesNotActualMessage: string | null;
|
|
294
|
-
hostId: string;
|
|
295
|
-
type: VehicleType;
|
|
296
302
|
allowedServiceCenterIds: string[];
|
|
297
303
|
displayVehicleId: string | null;
|
|
298
304
|
isHostConfirmed: boolean | null;
|
|
@@ -305,7 +311,6 @@ export declare const createVehicleFromDisplayVehicle: (displayVehicle: DisplayVe
|
|
|
305
311
|
featureOnLandingPage: boolean;
|
|
306
312
|
lastMileageRecordedAt: Date | null;
|
|
307
313
|
locationAvailability: string[];
|
|
308
|
-
temporary: boolean;
|
|
309
314
|
hotDeal: boolean | null;
|
|
310
315
|
activeSubscriptionId: string | null;
|
|
311
316
|
addresses: {
|
|
@@ -689,11 +694,15 @@ export declare const createVehicleFromDisplayVehicle: (displayVehicle: DisplayVe
|
|
|
689
694
|
}) | undefined>;
|
|
690
695
|
export declare const transfromVehicleDisplayToVehicle: (displayVehicle: DisplayVehicle | string, selectedColor: string) => Promise<({
|
|
691
696
|
object: import("@driveflux/db").VehicleObject;
|
|
697
|
+
type: VehicleType;
|
|
692
698
|
id: string;
|
|
693
|
-
status: import("@driveflux/db").VehicleStatus;
|
|
694
699
|
metadata: PrismaJson.AnyMetadata | null;
|
|
695
700
|
createdAt: Date;
|
|
696
701
|
updatedAt: Date;
|
|
702
|
+
status: import("@driveflux/db").VehicleStatus;
|
|
703
|
+
temporary: boolean;
|
|
704
|
+
registrationNumber: string | null;
|
|
705
|
+
hostId: string;
|
|
697
706
|
make: string;
|
|
698
707
|
vehicleModel: string;
|
|
699
708
|
variant: string;
|
|
@@ -703,7 +712,6 @@ export declare const transfromVehicleDisplayToVehicle: (displayVehicle: DisplayV
|
|
|
703
712
|
compositeSearchScore: number;
|
|
704
713
|
registrationDate: Date | null;
|
|
705
714
|
mileage: number | null;
|
|
706
|
-
registrationNumber: string | null;
|
|
707
715
|
vin: string | null;
|
|
708
716
|
engineNumber: string | null;
|
|
709
717
|
availability: import("@driveflux/db").VehicleAvailablity | null;
|
|
@@ -718,8 +726,6 @@ export declare const transfromVehicleDisplayToVehicle: (displayVehicle: DisplayV
|
|
|
718
726
|
delistedAt: Date | null;
|
|
719
727
|
imagesNotActual: boolean;
|
|
720
728
|
imagesNotActualMessage: string | null;
|
|
721
|
-
hostId: string;
|
|
722
|
-
type: VehicleType;
|
|
723
729
|
allowedServiceCenterIds: string[];
|
|
724
730
|
displayVehicleId: string | null;
|
|
725
731
|
isHostConfirmed: boolean | null;
|
|
@@ -732,7 +738,6 @@ export declare const transfromVehicleDisplayToVehicle: (displayVehicle: DisplayV
|
|
|
732
738
|
featureOnLandingPage: boolean;
|
|
733
739
|
lastMileageRecordedAt: Date | null;
|
|
734
740
|
locationAvailability: string[];
|
|
735
|
-
temporary: boolean;
|
|
736
741
|
hotDeal: boolean | null;
|
|
737
742
|
activeSubscriptionId: string | null;
|
|
738
743
|
addresses: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display-vehicle.d.ts","sourceRoot":"","sources":["../../src/reservation/display-vehicle.ts"],"names":[],"mappings":"AACA,OAAO,EACN,KAAK,cAAc,EAEnB,KAAK,cAAc,EACnB,KAAK,QAAQ,EAGb,KAAK,SAAS,EACd,KAAK,OAAO,EAGZ,KAAK,WAAW,EAChB,MAAM,eAAe,CAAA;AAYtB,eAAO,MAAM,mBAAmB,GAC/B,gBAAgB,cAAc,GAAG,MAAM
|
|
1
|
+
{"version":3,"file":"display-vehicle.d.ts","sourceRoot":"","sources":["../../src/reservation/display-vehicle.ts"],"names":[],"mappings":"AACA,OAAO,EACN,KAAK,cAAc,EAEnB,KAAK,cAAc,EACnB,KAAK,QAAQ,EAGb,KAAK,SAAS,EACd,KAAK,OAAO,EAGZ,KAAK,WAAW,EAChB,MAAM,eAAe,CAAA;AAYtB,eAAO,MAAM,mBAAmB,GAC/B,gBAAgB,cAAc,GAAG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAKvC,CAAA;AAED,eAAO,MAAM,+BAA+B,GAC3C,gBAAgB,cAAc,GAAG,MAAM,EACvC,gBAAgB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAsCtB,CAAA;AAED,eAAO,MAAM,gCAAgC,GAC5C,gBAAgB,cAAc,GAAG,MAAM,EACvC,eAAe,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA0BE;QAAE,OAAO,EAAE;YAAE,KAAK,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE;eACrD,CAAA;AAED,eAAO,MAAM,yBAAyB,GAAI,IAAI,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoB3D,CAAA;AAED,eAAO,MAAM,eAAe,GAC3B,QAAQ,cAAc,CAAC,QAAQ,CAAC,KAC9B,OAAO,CAAC,QAAQ,CAMlB,CAAA"}
|