hububb-models 1.0.84 → 1.0.86

Sign up to get free protection for your applications and to get access to all the features.
@@ -122,8 +122,8 @@ export declare const ChannexBookingSchema: import("zod").ZodObject<{
122
122
  "2024-11-01": string;
123
123
  };
124
124
  amount: string;
125
- taxes: {}[];
126
125
  services: {}[];
126
+ taxes: {}[];
127
127
  rate_plan_id: string;
128
128
  booking_room_id: string;
129
129
  room_type_id: string;
@@ -149,8 +149,8 @@ export declare const ChannexBookingSchema: import("zod").ZodObject<{
149
149
  "2024-11-01": string;
150
150
  };
151
151
  amount: string;
152
- taxes: {}[];
153
152
  services: {}[];
153
+ taxes: {}[];
154
154
  rate_plan_id: string;
155
155
  booking_room_id: string;
156
156
  room_type_id: string;
@@ -239,8 +239,8 @@ export declare const ChannexBookingSchema: import("zod").ZodObject<{
239
239
  "2024-11-01": string;
240
240
  };
241
241
  amount: string;
242
- taxes: {}[];
243
242
  services: {}[];
243
+ taxes: {}[];
244
244
  rate_plan_id: string;
245
245
  booking_room_id: string;
246
246
  room_type_id: string;
@@ -316,8 +316,8 @@ export declare const ChannexBookingSchema: import("zod").ZodObject<{
316
316
  "2024-11-01": string;
317
317
  };
318
318
  amount: string;
319
- taxes: {}[];
320
319
  services: {}[];
320
+ taxes: {}[];
321
321
  rate_plan_id: string;
322
322
  booking_room_id: string;
323
323
  room_type_id: string;
@@ -397,8 +397,8 @@ export declare const ChannexBookingSchema: import("zod").ZodObject<{
397
397
  "2024-11-01": string;
398
398
  };
399
399
  amount: string;
400
- taxes: {}[];
401
400
  services: {}[];
401
+ taxes: {}[];
402
402
  rate_plan_id: string;
403
403
  booking_room_id: string;
404
404
  room_type_id: string;
@@ -478,8 +478,8 @@ export declare const ChannexBookingSchema: import("zod").ZodObject<{
478
478
  "2024-11-01": string;
479
479
  };
480
480
  amount: string;
481
- taxes: {}[];
482
481
  services: {}[];
482
+ taxes: {}[];
483
483
  rate_plan_id: string;
484
484
  booking_room_id: string;
485
485
  room_type_id: string;
@@ -179,6 +179,34 @@ export declare const reservationCreateSchema: import("zod").ZodObject<{
179
179
  }, {
180
180
  ratePlanId: string;
181
181
  }>, "atleastone">;
182
+ services: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
183
+ serviceId: import("zod").ZodString;
184
+ count: import("zod").ZodOptional<import("zod").ZodNumber>;
185
+ amount: import("zod").ZodObject<{
186
+ amount: import("zod").ZodNumber;
187
+ currency: import("zod").ZodString;
188
+ }, "strip", import("zod").ZodTypeAny, {
189
+ currency: string;
190
+ amount: number;
191
+ }, {
192
+ currency: string;
193
+ amount: number;
194
+ }>;
195
+ }, "strip", import("zod").ZodTypeAny, {
196
+ amount: {
197
+ currency: string;
198
+ amount: number;
199
+ };
200
+ serviceId: string;
201
+ count?: number | undefined;
202
+ }, {
203
+ amount: {
204
+ currency: string;
205
+ amount: number;
206
+ };
207
+ serviceId: string;
208
+ count?: number | undefined;
209
+ }>, "many">>;
182
210
  prePaymentAmount: import("zod").ZodObject<{
183
211
  amount: import("zod").ZodNumber;
184
212
  currency: import("zod").ZodString;
@@ -204,6 +232,14 @@ export declare const reservationCreateSchema: import("zod").ZodObject<{
204
232
  currency: string;
205
233
  amount: number;
206
234
  };
235
+ services?: {
236
+ amount: {
237
+ currency: string;
238
+ amount: number;
239
+ };
240
+ serviceId: string;
241
+ count?: number | undefined;
242
+ }[] | undefined;
207
243
  }, {
208
244
  adults: number;
209
245
  arrival: string;
@@ -219,10 +255,20 @@ export declare const reservationCreateSchema: import("zod").ZodObject<{
219
255
  currency: string;
220
256
  amount: number;
221
257
  };
258
+ services?: {
259
+ amount: {
260
+ currency: string;
261
+ amount: number;
262
+ };
263
+ serviceId: string;
264
+ count?: number | undefined;
265
+ }[] | undefined;
222
266
  }>;
223
267
  transactionReference: import("zod").ZodString;
224
268
  amount: import("zod").ZodNumber;
269
+ ratePlanId: import("zod").ZodString;
225
270
  }, "strip", import("zod").ZodTypeAny, {
271
+ ratePlanId: string;
226
272
  amount: number;
227
273
  booker: {
228
274
  email: string;
@@ -245,9 +291,18 @@ export declare const reservationCreateSchema: import("zod").ZodObject<{
245
291
  currency: string;
246
292
  amount: number;
247
293
  };
294
+ services?: {
295
+ amount: {
296
+ currency: string;
297
+ amount: number;
298
+ };
299
+ serviceId: string;
300
+ count?: number | undefined;
301
+ }[] | undefined;
248
302
  };
249
303
  transactionReference: string;
250
304
  }, {
305
+ ratePlanId: string;
251
306
  amount: number;
252
307
  booker: {
253
308
  email: string;
@@ -270,6 +325,14 @@ export declare const reservationCreateSchema: import("zod").ZodObject<{
270
325
  currency: string;
271
326
  amount: number;
272
327
  };
328
+ services?: {
329
+ amount: {
330
+ currency: string;
331
+ amount: number;
332
+ };
333
+ serviceId: string;
334
+ count?: number | undefined;
335
+ }[] | undefined;
273
336
  };
274
337
  transactionReference: string;
275
338
  }>;
@@ -291,7 +354,7 @@ export declare const paymentCreateSchema: import("zod").ZodObject<{
291
354
  encryptedExpiryYear: string;
292
355
  encryptedSecurityCode: string;
293
356
  }>;
294
- riskData: import("zod").ZodString;
357
+ riskData: import("zod").ZodAny;
295
358
  }, "strip", import("zod").ZodTypeAny, {
296
359
  paymentMethod: {
297
360
  encryptedCardNumber: string;
@@ -299,7 +362,7 @@ export declare const paymentCreateSchema: import("zod").ZodObject<{
299
362
  encryptedExpiryYear: string;
300
363
  encryptedSecurityCode: string;
301
364
  };
302
- riskData: string;
365
+ riskData?: any;
303
366
  }, {
304
367
  paymentMethod: {
305
368
  encryptedCardNumber: string;
@@ -307,7 +370,7 @@ export declare const paymentCreateSchema: import("zod").ZodObject<{
307
370
  encryptedExpiryYear: string;
308
371
  encryptedSecurityCode: string;
309
372
  };
310
- riskData: string;
373
+ riskData?: any;
311
374
  }>;
312
375
  booker: import("zod").ZodObject<{
313
376
  firstName: import("zod").ZodString;
@@ -338,6 +401,34 @@ export declare const paymentCreateSchema: import("zod").ZodObject<{
338
401
  }, {
339
402
  ratePlanId: string;
340
403
  }>, "atleastone">;
404
+ services: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
405
+ serviceId: import("zod").ZodString;
406
+ count: import("zod").ZodOptional<import("zod").ZodNumber>;
407
+ amount: import("zod").ZodObject<{
408
+ amount: import("zod").ZodNumber;
409
+ currency: import("zod").ZodString;
410
+ }, "strip", import("zod").ZodTypeAny, {
411
+ currency: string;
412
+ amount: number;
413
+ }, {
414
+ currency: string;
415
+ amount: number;
416
+ }>;
417
+ }, "strip", import("zod").ZodTypeAny, {
418
+ amount: {
419
+ currency: string;
420
+ amount: number;
421
+ };
422
+ serviceId: string;
423
+ count?: number | undefined;
424
+ }, {
425
+ amount: {
426
+ currency: string;
427
+ amount: number;
428
+ };
429
+ serviceId: string;
430
+ count?: number | undefined;
431
+ }>, "many">>;
341
432
  prePaymentAmount: import("zod").ZodObject<{
342
433
  amount: import("zod").ZodNumber;
343
434
  currency: import("zod").ZodString;
@@ -358,7 +449,9 @@ export declare const paymentCreateSchema: import("zod").ZodObject<{
358
449
  departure: string;
359
450
  }>;
360
451
  amount: import("zod").ZodNumber;
452
+ ratePlanId: import("zod").ZodString;
361
453
  }, "strip", import("zod").ZodTypeAny, {
454
+ ratePlanId: string;
362
455
  amount: number;
363
456
  booker: {
364
457
  email: string;
@@ -378,9 +471,10 @@ export declare const paymentCreateSchema: import("zod").ZodObject<{
378
471
  encryptedExpiryYear: string;
379
472
  encryptedSecurityCode: string;
380
473
  };
381
- riskData: string;
474
+ riskData?: any;
382
475
  };
383
476
  }, {
477
+ ratePlanId: string;
384
478
  amount: number;
385
479
  booker: {
386
480
  email: string;
@@ -400,6 +494,6 @@ export declare const paymentCreateSchema: import("zod").ZodObject<{
400
494
  encryptedExpiryYear: string;
401
495
  encryptedSecurityCode: string;
402
496
  };
403
- riskData: string;
497
+ riskData?: any;
404
498
  };
405
499
  }>;
@@ -68,6 +68,14 @@ const reservationSchema = (0, zod_1.object)({
68
68
  channelCode: (0, zod_1.literal)("Direct"),
69
69
  guarenteeType: (0, zod_1.literal)("Prepayment"),
70
70
  timeSlices: (0, zod_1.array)(timeSliceSchema).nonempty("At least one time slice is required"),
71
+ services: (0, zod_1.array)((0, zod_1.object)({
72
+ serviceId: (0, zod_1.string)().min(1, "Service ID is required"),
73
+ count: (0, zod_1.number)().optional(),
74
+ amount: (0, zod_1.object)({
75
+ amount: (0, zod_1.number)().positive("Amount must be a positive number"),
76
+ currency: (0, zod_1.string)().length(3, "Currency code must be 3 characters long"),
77
+ }),
78
+ })).optional(),
71
79
  prePaymentAmount: prePaymentAmountSchema,
72
80
  });
73
81
  exports.reservationCreateSchema = (0, zod_1.object)({
@@ -75,6 +83,7 @@ exports.reservationCreateSchema = (0, zod_1.object)({
75
83
  reservation: reservationSchema,
76
84
  transactionReference: (0, zod_1.string)().min(1, "Transaction reference is required"),
77
85
  amount: (0, zod_1.number)().positive("Amount must be a positive number"),
86
+ ratePlanId: (0, zod_1.string)().min(1, "Rate Plan ID is required"),
78
87
  });
79
88
  const paymentMethodSchema = (0, zod_1.object)({
80
89
  encryptedCardNumber: (0, zod_1.string)().min(1, "Card number is required"),
@@ -85,7 +94,7 @@ const paymentMethodSchema = (0, zod_1.object)({
85
94
  exports.paymentCreateSchema = (0, zod_1.object)({
86
95
  paymentData: (0, zod_1.object)({
87
96
  paymentMethod: paymentMethodSchema,
88
- riskData: (0, zod_1.string)().min(1, "Risk data is required"),
97
+ riskData: (0, zod_1.any)(),
89
98
  }),
90
99
  booker: bookerSchema,
91
100
  reservation: reservationSchema.pick({
@@ -94,4 +103,5 @@ exports.paymentCreateSchema = (0, zod_1.object)({
94
103
  adults: true,
95
104
  }),
96
105
  amount: (0, zod_1.number)().positive("Amount must be a positive number"),
106
+ ratePlanId: (0, zod_1.string)().min(1, "Rate Plan ID is required"),
97
107
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hububb-models",
3
- "version": "1.0.84",
3
+ "version": "1.0.86",
4
4
  "description": "Models for Hububb application",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",