@vulog/aima-booking 1.2.30 → 1.2.32
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 +281 -267
- package/dist/index.mjs +398 -567
- package/package.json +20 -7
- package/src/cancelBookingRequest.test.ts +1 -3
- 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/releaseBRPayment.test.ts +9 -15
- package/src/triggerBRPayment.test.ts +4 -6
- package/{tsup.config.ts → tsdown.config.ts} +1 -1
- package/dist/index.d.ts +0 -348
- package/dist/index.js +0 -647
- /package/{.eslintrc.js → .eslintrc.cjs} +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,348 +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. */
|
|
202
203
|
type Vehicle = {
|
|
203
|
-
|
|
204
|
-
|
|
204
|
+
vehicleId: string;
|
|
205
|
+
[key: string]: unknown;
|
|
205
206
|
};
|
|
206
207
|
/** Response of the subscription stations vehicles/available endpoint. */
|
|
207
208
|
type AvailableVehiclesResponse = {
|
|
208
|
-
|
|
209
|
-
|
|
209
|
+
stationId: string;
|
|
210
|
+
vehicles: Vehicle[];
|
|
210
211
|
};
|
|
211
|
-
|
|
212
|
+
//#endregion
|
|
213
|
+
//#region src/getBookingRequests.d.ts
|
|
212
214
|
declare const BookingRequestStatusSchema: z.ZodEnum<["ALERT", "UPCOMING", "ONGOING", "COMPLETED", "CANCELLED", "PENDING_APPROVAL", "CONFIRMED", "PENDING", "LATE"]>;
|
|
213
215
|
type BookingRequestStatus = z.infer<typeof BookingRequestStatusSchema>;
|
|
214
216
|
declare const ServiceTypeSchema: z.ZodEnum<["SUBSCRIPTION", "ROUND_TRIP_BOOKING", "SCHEDULED_BOOKING_STATION"]>;
|
|
215
217
|
type ServiceType = z.infer<typeof ServiceTypeSchema>;
|
|
216
218
|
type SpecificBookingRequestFilters = {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
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';
|
|
237
239
|
};
|
|
238
240
|
type BookingRequestFilters = SpecificBookingRequestFilters & {
|
|
239
|
-
|
|
241
|
+
serviceTypes?: ServiceType[];
|
|
240
242
|
};
|
|
241
243
|
declare const getBookingRequests: (client: Client, status: BookingRequestStatus, options?: PaginableOptions<BookingRequestFilters>) => Promise<PaginableResponse<BookingRequest>>;
|
|
242
244
|
declare const getScheduleBookingRequests: (client: Client, status: BookingRequestStatus, options?: PaginableOptions<SpecificBookingRequestFilters>) => Promise<PaginableResponse<BookingRequest>>;
|
|
243
245
|
declare const getSubscriptionBookingRequests: (client: Client, status: BookingRequestStatus, options?: PaginableOptions<SpecificBookingRequestFilters>) => Promise<PaginableResponse<BookingRequest>>;
|
|
244
|
-
|
|
246
|
+
//#endregion
|
|
247
|
+
//#region src/getSATBookingRequests.d.ts
|
|
245
248
|
declare const SATBookingRequestStatusSchema: z.ZodEnum<["ALERT", "CANCELLED", "COMPLETED", "CONFIRMED", "LATE_RETURN", "ONGOING", "PENDING_PAYMENT", "PENDING", "UPCOMING_ALLOCATED", "UPCOMING_NOT_ALLOCATED"]>;
|
|
246
249
|
type SATBookingRequestStatus = z.infer<typeof SATBookingRequestStatusSchema>;
|
|
247
250
|
declare const getSATBookingRequests: (client: Client, status: SATBookingRequestStatus, options?: PaginableOptions<void, keyof SATBookingRequest>) => Promise<PaginableResponse<SATBookingRequest>>;
|
|
248
|
-
|
|
251
|
+
//#endregion
|
|
252
|
+
//#region src/getBookingRequest.d.ts
|
|
249
253
|
declare const getBookingRequestById: (client: Client, id: string) => Promise<BookingRequest>;
|
|
250
254
|
declare const getBookingRequestByTrip: (client: Client, tripId: string) => Promise<BookingRequest>;
|
|
251
255
|
declare const getSubscriptionBookingRequestById: (client: Client, id: string) => Promise<BookingRequest>;
|
|
252
|
-
|
|
256
|
+
//#endregion
|
|
257
|
+
//#region src/getAvailableVehicles.d.ts
|
|
253
258
|
declare const getAvailableVehicles: (client: Client, stationId: string, startDate: string) => Promise<AvailableVehiclesResponse>;
|
|
254
|
-
|
|
259
|
+
//#endregion
|
|
260
|
+
//#region src/getStations.d.ts
|
|
255
261
|
declare const IncludeSchema$1: z.ZodEnum<["INFO", "OPEN_HOUR", "SERVICES"]>;
|
|
256
262
|
type Include = z.infer<typeof IncludeSchema$1>;
|
|
257
263
|
declare const getStations: (client: Client, includes?: Include[]) => Promise<Station[]>;
|
|
258
|
-
|
|
264
|
+
//#endregion
|
|
265
|
+
//#region src/getStation.d.ts
|
|
259
266
|
declare const IncludeSchema: z.ZodEnum<["INFO", "SERVICES"]>;
|
|
260
267
|
type IncludeStation = z.infer<typeof IncludeSchema>;
|
|
261
268
|
declare const getStationById: (client: Client, id: string, includes?: IncludeStation[]) => Promise<Station | null>;
|
|
262
|
-
|
|
269
|
+
//#endregion
|
|
270
|
+
//#region src/allocateVehicle.d.ts
|
|
263
271
|
declare const allocateVehicle: (client: Client, bookingRequestId: UUID, vehicleId: UUID, serviceId: UUID) => Promise<SATBookingRequest>;
|
|
264
|
-
|
|
272
|
+
//#endregion
|
|
273
|
+
//#region src/deallocateVehicle.d.ts
|
|
265
274
|
declare const deallocateVehicle: (client: Client, bookingRequestId: UUID, vehicleId: UUID) => Promise<SATBookingRequest>;
|
|
266
|
-
|
|
275
|
+
//#endregion
|
|
276
|
+
//#region src/updateScheduleBooking.d.ts
|
|
267
277
|
declare const updateScheduleBooking: (client: Client, bookingRequestId: string, updateData: Record<string, unknown>) => Promise<SATBookingRequest>;
|
|
268
|
-
|
|
278
|
+
//#endregion
|
|
279
|
+
//#region src/triggerBRPayment.d.ts
|
|
269
280
|
declare const triggerBRPaymentSchema: z$1.ZodObject<{
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
}, "strip", z$1.ZodTypeAny, {
|
|
281
|
-
pspReference: string;
|
|
282
|
-
amount: number;
|
|
283
|
-
}, {
|
|
284
|
-
pspReference: string;
|
|
285
|
-
amount?: number | undefined;
|
|
286
|
-
}>, "many">>;
|
|
287
|
-
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>;
|
|
288
291
|
}, "strip", z$1.ZodTypeAny, {
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
online: boolean;
|
|
292
|
-
amountType: "FIXED" | "PERCENTAGE";
|
|
293
|
-
amountValue: number;
|
|
294
|
-
requiresActionReturnURL?: string | undefined;
|
|
295
|
-
preferredPaymentMethods?: {
|
|
296
|
-
pspReference: string;
|
|
297
|
-
amount: number;
|
|
298
|
-
}[] | undefined;
|
|
292
|
+
pspReference: string;
|
|
293
|
+
amount: number;
|
|
299
294
|
}, {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
295
|
+
pspReference: string;
|
|
296
|
+
amount?: number | undefined;
|
|
297
|
+
}>, "many">>;
|
|
298
|
+
profileId: z$1.ZodString;
|
|
299
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
300
|
+
profileId: string;
|
|
301
|
+
scope: "RENTAL" | "DEPOSIT";
|
|
302
|
+
online: boolean;
|
|
303
|
+
amountType: "FIXED" | "PERCENTAGE";
|
|
304
|
+
amountValue: number;
|
|
305
|
+
requiresActionReturnURL?: string | undefined;
|
|
306
|
+
preferredPaymentMethods?: {
|
|
307
|
+
pspReference: string;
|
|
308
|
+
amount: number;
|
|
309
|
+
}[] | undefined;
|
|
310
|
+
}, {
|
|
311
|
+
profileId: string;
|
|
312
|
+
scope: "RENTAL" | "DEPOSIT";
|
|
313
|
+
online: boolean;
|
|
314
|
+
amountType: "FIXED" | "PERCENTAGE";
|
|
315
|
+
amountValue: number;
|
|
316
|
+
requiresActionReturnURL?: string | undefined;
|
|
317
|
+
preferredPaymentMethods?: {
|
|
318
|
+
pspReference: string;
|
|
319
|
+
amount?: number | undefined;
|
|
320
|
+
}[] | undefined;
|
|
321
|
+
}>;
|
|
311
322
|
}, "strip", z$1.ZodTypeAny, {
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
};
|
|
324
|
-
|
|
323
|
+
bookingRequestId: string;
|
|
324
|
+
body: {
|
|
325
|
+
profileId: string;
|
|
326
|
+
scope: "RENTAL" | "DEPOSIT";
|
|
327
|
+
online: boolean;
|
|
328
|
+
amountType: "FIXED" | "PERCENTAGE";
|
|
329
|
+
amountValue: number;
|
|
330
|
+
requiresActionReturnURL?: string | undefined;
|
|
331
|
+
preferredPaymentMethods?: {
|
|
332
|
+
pspReference: string;
|
|
333
|
+
amount: number;
|
|
334
|
+
}[] | undefined;
|
|
335
|
+
};
|
|
325
336
|
}, {
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
};
|
|
338
|
-
|
|
337
|
+
bookingRequestId: string;
|
|
338
|
+
body: {
|
|
339
|
+
profileId: string;
|
|
340
|
+
scope: "RENTAL" | "DEPOSIT";
|
|
341
|
+
online: boolean;
|
|
342
|
+
amountType: "FIXED" | "PERCENTAGE";
|
|
343
|
+
amountValue: number;
|
|
344
|
+
requiresActionReturnURL?: string | undefined;
|
|
345
|
+
preferredPaymentMethods?: {
|
|
346
|
+
pspReference: string;
|
|
347
|
+
amount?: number | undefined;
|
|
348
|
+
}[] | undefined;
|
|
349
|
+
};
|
|
339
350
|
}>;
|
|
340
351
|
declare const triggerBRPayment: (client: Client, bookingRequestId: UUID, body: z$1.infer<typeof triggerBRPaymentSchema>["body"]) => Promise<TriggerBRPaymentResponse>;
|
|
341
|
-
|
|
352
|
+
//#endregion
|
|
353
|
+
//#region src/getBookingRequestsByUserId.d.ts
|
|
342
354
|
declare const getBookingRequestsByUserId: (client: Client, userId: string) => Promise<BookingRequest[]>;
|
|
343
|
-
|
|
355
|
+
//#endregion
|
|
356
|
+
//#region src/releaseBRPayment.d.ts
|
|
344
357
|
declare const releaseBRPayment: (client: Client, bookingRequestId: UUID, pspReference: string) => Promise<SATBookingRequest>;
|
|
345
|
-
|
|
358
|
+
//#endregion
|
|
359
|
+
//#region src/cancelBookingRequest.d.ts
|
|
346
360
|
declare const cancelBookingRequest: (client: Client, id: string) => Promise<SATBookingRequest>;
|
|
347
|
-
|
|
348
|
-
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 };
|