@vulog/aima-booking 1.2.29 → 1.2.31
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/index.cjs +465 -0
- package/dist/index.d.cts +362 -0
- package/dist/index.d.mts +288 -262
- package/dist/index.mjs +399 -548
- package/package.json +20 -7
- package/src/cancelBookingRequest.test.ts +1 -3
- package/src/getAvailableVehicles.ts +30 -0
- package/src/getBookingRequest.test.ts +27 -35
- package/src/getBookingRequests.test.ts +3 -5
- package/src/getBookingRequestsByUserId.test.ts +2 -6
- package/src/getSATBookingRequests.test.ts +3 -3
- package/src/getStation.test.ts +93 -88
- package/src/index.ts +1 -0
- package/src/releaseBRPayment.test.ts +9 -15
- package/src/triggerBRPayment.test.ts +4 -6
- package/src/types.ts +12 -0
- package/{tsup.config.ts → tsdown.config.ts} +1 -1
- package/dist/index.d.ts +0 -336
- package/dist/index.js +0 -626
- /package/{.eslintrc.js → .eslintrc.cjs} +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,336 +1,362 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { UUID } from
|
|
1
|
+
import { PaginableOptions, PaginableResponse } from "@vulog/aima-core";
|
|
2
|
+
import z$1, { z } from "zod";
|
|
3
|
+
import { Client } from "@vulog/aima-client";
|
|
4
|
+
import { UUID } from "crypto";
|
|
5
5
|
|
|
6
|
+
//#region src/types.d.ts
|
|
6
7
|
type PaymentReceipts = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
id: string;
|
|
9
|
+
pspName: string;
|
|
10
|
+
pspReference: string;
|
|
11
|
+
amount: number;
|
|
12
|
+
currency: string;
|
|
13
|
+
date: string;
|
|
14
|
+
status: string;
|
|
15
|
+
paymentMethodType: string;
|
|
16
|
+
paymentIntentPspReference?: string;
|
|
17
|
+
number: number;
|
|
18
|
+
metadatas: {
|
|
19
|
+
scope: string;
|
|
20
|
+
};
|
|
20
21
|
};
|
|
21
22
|
/** Payment intent or receipt item as returned by trigger BR payment (and similar payment endpoints). */
|
|
22
23
|
type BRPaymentItem = {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
};
|
|
47
|
-
type: string;
|
|
24
|
+
id: string;
|
|
25
|
+
pspName: string;
|
|
26
|
+
pspReference: string;
|
|
27
|
+
pspPublishableKey: string;
|
|
28
|
+
amount: number;
|
|
29
|
+
currency: string;
|
|
30
|
+
date: string;
|
|
31
|
+
captureBefore: string;
|
|
32
|
+
status: string;
|
|
33
|
+
paymentMethodType: string;
|
|
34
|
+
paymentMethodPspReference: string;
|
|
35
|
+
paymentIntentPspReference: string;
|
|
36
|
+
number: number;
|
|
37
|
+
code?: string;
|
|
38
|
+
declineCode?: string;
|
|
39
|
+
pspClientSecret?: string;
|
|
40
|
+
reason?: string;
|
|
41
|
+
note?: string;
|
|
42
|
+
nextAction?: {
|
|
43
|
+
nextActionRedirectUrl: {
|
|
44
|
+
url: string;
|
|
45
|
+
method: string;
|
|
46
|
+
data: Record<string, string>;
|
|
48
47
|
};
|
|
49
|
-
|
|
48
|
+
type: string;
|
|
49
|
+
};
|
|
50
|
+
metadatas: Record<string, string>;
|
|
50
51
|
};
|
|
51
52
|
/** Credit entry in a booking request (e.g. trigger BR payment response). */
|
|
52
53
|
type BookingCredit = {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
id: string;
|
|
55
|
+
fleetId: string;
|
|
56
|
+
amount: number;
|
|
57
|
+
availableAmount: number;
|
|
58
|
+
status: string;
|
|
59
|
+
walletId: string;
|
|
60
|
+
date: string;
|
|
60
61
|
};
|
|
61
62
|
/** Preferred payment method entry in request/response. */
|
|
62
63
|
type PreferredPaymentMethod = {
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
pspReference: string;
|
|
65
|
+
amount: number;
|
|
65
66
|
};
|
|
66
67
|
type CustomPrice = {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
id: string;
|
|
69
|
+
fleetId: string;
|
|
70
|
+
type: 'CUSTOM_FIXED_PRICE' | 'EXTENDED_FIXED_PRICE';
|
|
71
|
+
amount: number;
|
|
72
|
+
reason: string;
|
|
73
|
+
pricingReferenceId: string | null;
|
|
73
74
|
};
|
|
74
75
|
type BaseBookingRequest = {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
76
|
+
bookingReferenceId?: string;
|
|
77
|
+
cityId: string;
|
|
78
|
+
completed: boolean;
|
|
79
|
+
contractType?: string;
|
|
80
|
+
creationDate: string;
|
|
81
|
+
customPrice: CustomPrice | null;
|
|
82
|
+
deliveryAddress?: string;
|
|
83
|
+
deliveryAddressAdditionalInfo?: string;
|
|
84
|
+
deliveryCity?: string;
|
|
85
|
+
deliveryPostalCode?: string;
|
|
86
|
+
dropOffStation?: string;
|
|
87
|
+
fleetId: string;
|
|
88
|
+
id: string;
|
|
89
|
+
notes?: string;
|
|
90
|
+
planDurationInMonths?: number;
|
|
91
|
+
plannedReturnDate?: string;
|
|
92
|
+
pricingDetails: {
|
|
93
|
+
pricingId: string;
|
|
94
|
+
providerType: string;
|
|
95
|
+
}[];
|
|
96
|
+
productIds: string[];
|
|
97
|
+
profileId: string;
|
|
98
|
+
rollingContract: boolean;
|
|
99
|
+
serviceId: string;
|
|
100
|
+
startDate: string;
|
|
101
|
+
status: string;
|
|
102
|
+
userId: string;
|
|
102
103
|
};
|
|
103
104
|
type BookingRequest = BaseBookingRequest & {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
105
|
+
[key: string]: any;
|
|
106
|
+
cancellationDate?: string;
|
|
107
|
+
cancelledBy?: string;
|
|
108
|
+
credit?: string;
|
|
109
|
+
endDate: string;
|
|
110
|
+
entityName?: string;
|
|
111
|
+
journeyId?: string;
|
|
112
|
+
modelId: number;
|
|
113
|
+
modelName?: string;
|
|
114
|
+
paymentReceipts?: PaymentReceipts[];
|
|
115
|
+
pricePerUnit?: string;
|
|
116
|
+
profileType?: 'Single' | 'Business';
|
|
117
|
+
realStartDate?: string;
|
|
118
|
+
returnedDate?: string;
|
|
119
|
+
station: string;
|
|
120
|
+
vehicleId?: string;
|
|
121
|
+
vehicleResidualValue?: number;
|
|
122
|
+
warning?: string;
|
|
122
123
|
};
|
|
123
124
|
type SATBookingRequest = BaseBookingRequest & {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
125
|
+
cancellationDate: string | null;
|
|
126
|
+
cancelledBy: string | null;
|
|
127
|
+
endDate: string | null;
|
|
128
|
+
entityName: string | null;
|
|
129
|
+
journeyId: string | null;
|
|
130
|
+
modelId: number | null;
|
|
131
|
+
profileType: string | null;
|
|
132
|
+
realStartDate: string | null;
|
|
133
|
+
returnedDate: string | null;
|
|
134
|
+
station: string | null;
|
|
135
|
+
vehicleId: string | null;
|
|
136
|
+
cancellationFeeAmount: number | null;
|
|
137
|
+
credits: string | null;
|
|
138
|
+
earlyCancelledByUser: boolean;
|
|
139
|
+
email: string | null;
|
|
140
|
+
failureReason: string | null;
|
|
141
|
+
latitude: number;
|
|
142
|
+
longitude: number;
|
|
143
|
+
parentId: string | null;
|
|
144
|
+
planName: string | null;
|
|
145
|
+
preallocatedVehicleId: string | null;
|
|
146
|
+
previous: any | null;
|
|
147
|
+
price: any | null;
|
|
148
|
+
radius: number;
|
|
149
|
+
requiresActionReturnURL: string | null;
|
|
150
|
+
thresholdDateLimit: string | null;
|
|
151
|
+
trip: any | null;
|
|
152
|
+
warning: string | null;
|
|
152
153
|
};
|
|
153
154
|
/** Response of the trigger BR payment endpoint (booking request + payment intents/receipts). */
|
|
154
155
|
type TriggerBRPaymentResponse = Omit<SATBookingRequest, 'credits'> & {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
156
|
+
paymentIntents: BRPaymentItem[];
|
|
157
|
+
paymentReceipts: BRPaymentItem[];
|
|
158
|
+
credits: BookingCredit[];
|
|
159
|
+
preferredPaymentMethods?: PreferredPaymentMethod[];
|
|
159
160
|
};
|
|
160
161
|
type GeoInfo = {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
162
|
+
name: string;
|
|
163
|
+
coordinates: {
|
|
164
|
+
latitude: number;
|
|
165
|
+
longitude: number;
|
|
166
|
+
};
|
|
167
|
+
geoProperties: {
|
|
168
|
+
[key: string]: any;
|
|
169
|
+
};
|
|
169
170
|
};
|
|
170
171
|
type Service = {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
172
|
+
id: string;
|
|
173
|
+
models: {
|
|
174
|
+
id: number;
|
|
175
|
+
vehicles: string[];
|
|
176
|
+
}[];
|
|
176
177
|
};
|
|
177
178
|
type ServiceInfo = {
|
|
178
|
-
|
|
179
|
+
services: Service[];
|
|
179
180
|
};
|
|
180
181
|
type Days = 'MONDAY' | 'TUESDAY' | 'WEDNESDAY' | 'THURSDAY' | 'FRIDAY' | 'SATURDAY' | 'SUNDAY';
|
|
181
182
|
type DayOpeningHours = {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
183
|
+
id: number;
|
|
184
|
+
closed: boolean;
|
|
185
|
+
openAt: string;
|
|
186
|
+
closeAt: string;
|
|
186
187
|
};
|
|
187
188
|
type Timetable = Record<Days, DayOpeningHours[]>;
|
|
188
189
|
type OpeningHours = {
|
|
189
|
-
|
|
190
|
-
|
|
190
|
+
alwaysOpen: boolean;
|
|
191
|
+
timetable: Timetable;
|
|
191
192
|
};
|
|
192
193
|
type Station = Partial<GeoInfo> & Partial<ServiceInfo> & {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
194
|
+
id: string;
|
|
195
|
+
zoneId: string;
|
|
196
|
+
poiId: string;
|
|
197
|
+
modificationDate: string;
|
|
198
|
+
fleetId: string;
|
|
199
|
+
openingHours?: OpeningHours;
|
|
200
|
+
[key: string]: any;
|
|
200
201
|
};
|
|
201
|
-
|
|
202
|
+
/** Vehicle as returned by the available vehicles endpoint. */
|
|
203
|
+
type Vehicle = {
|
|
204
|
+
vehicleId: string;
|
|
205
|
+
[key: string]: unknown;
|
|
206
|
+
};
|
|
207
|
+
/** Response of the subscription stations vehicles/available endpoint. */
|
|
208
|
+
type AvailableVehiclesResponse = {
|
|
209
|
+
stationId: string;
|
|
210
|
+
vehicles: Vehicle[];
|
|
211
|
+
};
|
|
212
|
+
//#endregion
|
|
213
|
+
//#region src/getBookingRequests.d.ts
|
|
202
214
|
declare const BookingRequestStatusSchema: z.ZodEnum<["ALERT", "UPCOMING", "ONGOING", "COMPLETED", "CANCELLED", "PENDING_APPROVAL", "CONFIRMED", "PENDING", "LATE"]>;
|
|
203
215
|
type BookingRequestStatus = z.infer<typeof BookingRequestStatusSchema>;
|
|
204
216
|
declare const ServiceTypeSchema: z.ZodEnum<["SUBSCRIPTION", "ROUND_TRIP_BOOKING", "SCHEDULED_BOOKING_STATION"]>;
|
|
205
217
|
type ServiceType = z.infer<typeof ServiceTypeSchema>;
|
|
206
218
|
type SpecificBookingRequestFilters = {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
219
|
+
serviceIds?: string[];
|
|
220
|
+
userId?: string;
|
|
221
|
+
modelId?: number;
|
|
222
|
+
vehicleId?: string;
|
|
223
|
+
stationId?: string;
|
|
224
|
+
/**
|
|
225
|
+
* Format: yyyy-MM-dd
|
|
226
|
+
*/
|
|
227
|
+
creationDate?: string;
|
|
228
|
+
/**
|
|
229
|
+
* Format: yyyy-MM-dd'T'HH:mm:ssZ
|
|
230
|
+
* default now
|
|
231
|
+
*/
|
|
232
|
+
startDate?: string;
|
|
233
|
+
/**
|
|
234
|
+
* Format: yyyy-MM-dd'T'HH:mm:ssZ
|
|
235
|
+
* default now plus 2 months
|
|
236
|
+
*/
|
|
237
|
+
endDate?: string;
|
|
238
|
+
includeProducts?: 'true' | 'false';
|
|
227
239
|
};
|
|
228
240
|
type BookingRequestFilters = SpecificBookingRequestFilters & {
|
|
229
|
-
|
|
241
|
+
serviceTypes?: ServiceType[];
|
|
230
242
|
};
|
|
231
243
|
declare const getBookingRequests: (client: Client, status: BookingRequestStatus, options?: PaginableOptions<BookingRequestFilters>) => Promise<PaginableResponse<BookingRequest>>;
|
|
232
244
|
declare const getScheduleBookingRequests: (client: Client, status: BookingRequestStatus, options?: PaginableOptions<SpecificBookingRequestFilters>) => Promise<PaginableResponse<BookingRequest>>;
|
|
233
245
|
declare const getSubscriptionBookingRequests: (client: Client, status: BookingRequestStatus, options?: PaginableOptions<SpecificBookingRequestFilters>) => Promise<PaginableResponse<BookingRequest>>;
|
|
234
|
-
|
|
246
|
+
//#endregion
|
|
247
|
+
//#region src/getSATBookingRequests.d.ts
|
|
235
248
|
declare const SATBookingRequestStatusSchema: z.ZodEnum<["ALERT", "CANCELLED", "COMPLETED", "CONFIRMED", "LATE_RETURN", "ONGOING", "PENDING_PAYMENT", "PENDING", "UPCOMING_ALLOCATED", "UPCOMING_NOT_ALLOCATED"]>;
|
|
236
249
|
type SATBookingRequestStatus = z.infer<typeof SATBookingRequestStatusSchema>;
|
|
237
250
|
declare const getSATBookingRequests: (client: Client, status: SATBookingRequestStatus, options?: PaginableOptions<void, keyof SATBookingRequest>) => Promise<PaginableResponse<SATBookingRequest>>;
|
|
238
|
-
|
|
251
|
+
//#endregion
|
|
252
|
+
//#region src/getBookingRequest.d.ts
|
|
239
253
|
declare const getBookingRequestById: (client: Client, id: string) => Promise<BookingRequest>;
|
|
240
254
|
declare const getBookingRequestByTrip: (client: Client, tripId: string) => Promise<BookingRequest>;
|
|
241
255
|
declare const getSubscriptionBookingRequestById: (client: Client, id: string) => Promise<BookingRequest>;
|
|
242
|
-
|
|
256
|
+
//#endregion
|
|
257
|
+
//#region src/getAvailableVehicles.d.ts
|
|
258
|
+
declare const getAvailableVehicles: (client: Client, stationId: string, startDate: string) => Promise<AvailableVehiclesResponse>;
|
|
259
|
+
//#endregion
|
|
260
|
+
//#region src/getStations.d.ts
|
|
243
261
|
declare const IncludeSchema$1: z.ZodEnum<["INFO", "OPEN_HOUR", "SERVICES"]>;
|
|
244
262
|
type Include = z.infer<typeof IncludeSchema$1>;
|
|
245
263
|
declare const getStations: (client: Client, includes?: Include[]) => Promise<Station[]>;
|
|
246
|
-
|
|
264
|
+
//#endregion
|
|
265
|
+
//#region src/getStation.d.ts
|
|
247
266
|
declare const IncludeSchema: z.ZodEnum<["INFO", "SERVICES"]>;
|
|
248
267
|
type IncludeStation = z.infer<typeof IncludeSchema>;
|
|
249
268
|
declare const getStationById: (client: Client, id: string, includes?: IncludeStation[]) => Promise<Station | null>;
|
|
250
|
-
|
|
269
|
+
//#endregion
|
|
270
|
+
//#region src/allocateVehicle.d.ts
|
|
251
271
|
declare const allocateVehicle: (client: Client, bookingRequestId: UUID, vehicleId: UUID, serviceId: UUID) => Promise<SATBookingRequest>;
|
|
252
|
-
|
|
272
|
+
//#endregion
|
|
273
|
+
//#region src/deallocateVehicle.d.ts
|
|
253
274
|
declare const deallocateVehicle: (client: Client, bookingRequestId: UUID, vehicleId: UUID) => Promise<SATBookingRequest>;
|
|
254
|
-
|
|
275
|
+
//#endregion
|
|
276
|
+
//#region src/updateScheduleBooking.d.ts
|
|
255
277
|
declare const updateScheduleBooking: (client: Client, bookingRequestId: string, updateData: Record<string, unknown>) => Promise<SATBookingRequest>;
|
|
256
|
-
|
|
278
|
+
//#endregion
|
|
279
|
+
//#region src/triggerBRPayment.d.ts
|
|
257
280
|
declare const triggerBRPaymentSchema: z$1.ZodObject<{
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
}, "strip", z$1.ZodTypeAny, {
|
|
269
|
-
pspReference: string;
|
|
270
|
-
amount: number;
|
|
271
|
-
}, {
|
|
272
|
-
pspReference: string;
|
|
273
|
-
amount?: number | undefined;
|
|
274
|
-
}>, "many">>;
|
|
275
|
-
profileId: z$1.ZodString;
|
|
281
|
+
bookingRequestId: z$1.ZodString;
|
|
282
|
+
body: z$1.ZodObject<{
|
|
283
|
+
scope: z$1.ZodEnum<["RENTAL", "DEPOSIT"]>;
|
|
284
|
+
requiresActionReturnURL: z$1.ZodOptional<z$1.ZodString>;
|
|
285
|
+
online: z$1.ZodBoolean;
|
|
286
|
+
amountType: z$1.ZodEnum<["FIXED", "PERCENTAGE"]>;
|
|
287
|
+
amountValue: z$1.ZodNumber;
|
|
288
|
+
preferredPaymentMethods: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
289
|
+
pspReference: z$1.ZodString;
|
|
290
|
+
amount: z$1.ZodDefault<z$1.ZodNumber>;
|
|
276
291
|
}, "strip", z$1.ZodTypeAny, {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
online: boolean;
|
|
280
|
-
amountType: "FIXED" | "PERCENTAGE";
|
|
281
|
-
amountValue: number;
|
|
282
|
-
requiresActionReturnURL?: string | undefined;
|
|
283
|
-
preferredPaymentMethods?: {
|
|
284
|
-
pspReference: string;
|
|
285
|
-
amount: number;
|
|
286
|
-
}[] | undefined;
|
|
292
|
+
pspReference: string;
|
|
293
|
+
amount: number;
|
|
287
294
|
}, {
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
295
|
+
pspReference: string;
|
|
296
|
+
amount?: number | undefined;
|
|
297
|
+
}>, "many">>;
|
|
298
|
+
profileId: z$1.ZodString;
|
|
299
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
300
|
+
scope: "RENTAL" | "DEPOSIT";
|
|
301
|
+
online: boolean;
|
|
302
|
+
amountType: "FIXED" | "PERCENTAGE";
|
|
303
|
+
amountValue: number;
|
|
304
|
+
profileId: string;
|
|
305
|
+
requiresActionReturnURL?: string | undefined;
|
|
306
|
+
preferredPaymentMethods?: {
|
|
307
|
+
pspReference: string;
|
|
308
|
+
amount: number;
|
|
309
|
+
}[] | undefined;
|
|
310
|
+
}, {
|
|
311
|
+
scope: "RENTAL" | "DEPOSIT";
|
|
312
|
+
online: boolean;
|
|
313
|
+
amountType: "FIXED" | "PERCENTAGE";
|
|
314
|
+
amountValue: number;
|
|
315
|
+
profileId: string;
|
|
316
|
+
requiresActionReturnURL?: string | undefined;
|
|
317
|
+
preferredPaymentMethods?: {
|
|
318
|
+
pspReference: string;
|
|
319
|
+
amount?: number | undefined;
|
|
320
|
+
}[] | undefined;
|
|
321
|
+
}>;
|
|
299
322
|
}, "strip", z$1.ZodTypeAny, {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
};
|
|
312
|
-
|
|
323
|
+
bookingRequestId: string;
|
|
324
|
+
body: {
|
|
325
|
+
scope: "RENTAL" | "DEPOSIT";
|
|
326
|
+
online: boolean;
|
|
327
|
+
amountType: "FIXED" | "PERCENTAGE";
|
|
328
|
+
amountValue: number;
|
|
329
|
+
profileId: string;
|
|
330
|
+
requiresActionReturnURL?: string | undefined;
|
|
331
|
+
preferredPaymentMethods?: {
|
|
332
|
+
pspReference: string;
|
|
333
|
+
amount: number;
|
|
334
|
+
}[] | undefined;
|
|
335
|
+
};
|
|
313
336
|
}, {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
};
|
|
326
|
-
|
|
337
|
+
bookingRequestId: string;
|
|
338
|
+
body: {
|
|
339
|
+
scope: "RENTAL" | "DEPOSIT";
|
|
340
|
+
online: boolean;
|
|
341
|
+
amountType: "FIXED" | "PERCENTAGE";
|
|
342
|
+
amountValue: number;
|
|
343
|
+
profileId: string;
|
|
344
|
+
requiresActionReturnURL?: string | undefined;
|
|
345
|
+
preferredPaymentMethods?: {
|
|
346
|
+
pspReference: string;
|
|
347
|
+
amount?: number | undefined;
|
|
348
|
+
}[] | undefined;
|
|
349
|
+
};
|
|
327
350
|
}>;
|
|
328
351
|
declare const triggerBRPayment: (client: Client, bookingRequestId: UUID, body: z$1.infer<typeof triggerBRPaymentSchema>["body"]) => Promise<TriggerBRPaymentResponse>;
|
|
329
|
-
|
|
352
|
+
//#endregion
|
|
353
|
+
//#region src/getBookingRequestsByUserId.d.ts
|
|
330
354
|
declare const getBookingRequestsByUserId: (client: Client, userId: string) => Promise<BookingRequest[]>;
|
|
331
|
-
|
|
355
|
+
//#endregion
|
|
356
|
+
//#region src/releaseBRPayment.d.ts
|
|
332
357
|
declare const releaseBRPayment: (client: Client, bookingRequestId: UUID, pspReference: string) => Promise<SATBookingRequest>;
|
|
333
|
-
|
|
358
|
+
//#endregion
|
|
359
|
+
//#region src/cancelBookingRequest.d.ts
|
|
334
360
|
declare const cancelBookingRequest: (client: Client, id: string) => Promise<SATBookingRequest>;
|
|
335
|
-
|
|
336
|
-
export {
|
|
361
|
+
//#endregion
|
|
362
|
+
export { AvailableVehiclesResponse, BRPaymentItem, BaseBookingRequest, BookingCredit, BookingRequest, type BookingRequestFilters, type BookingRequestStatus, CustomPrice, DayOpeningHours, Days, GeoInfo, type Include, type IncludeStation, OpeningHours, PaymentReceipts, PreferredPaymentMethod, SATBookingRequest, type SATBookingRequestStatus, Service, ServiceInfo, type ServiceType, Station, Timetable, TriggerBRPaymentResponse, Vehicle, allocateVehicle, cancelBookingRequest, deallocateVehicle, getAvailableVehicles, getBookingRequestById, getBookingRequestByTrip, getBookingRequests, getBookingRequestsByUserId, getSATBookingRequests, getScheduleBookingRequests, getStationById, getStations, getSubscriptionBookingRequestById, getSubscriptionBookingRequests, releaseBRPayment, triggerBRPayment, updateScheduleBooking };
|