hububb-models 1.0.88 → 1.0.90

Sign up to get free protection for your applications and to get access to all the features.
@@ -250,6 +250,12 @@ declare const apaleoReservationSchema: import("zod").ZodObject<{
250
250
  arrival: string;
251
251
  departure: string;
252
252
  channelCode: string;
253
+ primaryGuest: {
254
+ lastName: string;
255
+ email?: string | undefined;
256
+ firstName?: string | undefined;
257
+ phone?: string | undefined;
258
+ };
253
259
  totalGrossAmount: {
254
260
  currency: string;
255
261
  amount: number;
@@ -288,12 +294,6 @@ declare const apaleoReservationSchema: import("zod").ZodObject<{
288
294
  };
289
295
  bookingId: string;
290
296
  created: string;
291
- primaryGuest: {
292
- lastName: string;
293
- email?: string | undefined;
294
- firstName?: string | undefined;
295
- phone?: string | undefined;
296
- };
297
297
  guaranteeType: string;
298
298
  balance: {
299
299
  currency: string;
@@ -338,6 +338,12 @@ declare const apaleoReservationSchema: import("zod").ZodObject<{
338
338
  arrival: string;
339
339
  departure: string;
340
340
  channelCode: string;
341
+ primaryGuest: {
342
+ lastName: string;
343
+ email?: string | undefined;
344
+ firstName?: string | undefined;
345
+ phone?: string | undefined;
346
+ };
341
347
  totalGrossAmount: {
342
348
  currency: string;
343
349
  amount: number;
@@ -376,12 +382,6 @@ declare const apaleoReservationSchema: import("zod").ZodObject<{
376
382
  };
377
383
  bookingId: string;
378
384
  created: string;
379
- primaryGuest: {
380
- lastName: string;
381
- email?: string | undefined;
382
- firstName?: string | undefined;
383
- phone?: string | undefined;
384
- };
385
385
  guaranteeType: string;
386
386
  balance: {
387
387
  currency: string;
@@ -166,11 +166,27 @@ export declare const reservationCreateSchema: import("zod").ZodObject<{
166
166
  lastName: string;
167
167
  phone: string;
168
168
  }>;
169
- reservation: import("zod").ZodObject<{
169
+ reservations: import("zod").ZodArray<import("zod").ZodObject<{
170
170
  arrival: import("zod").ZodString;
171
171
  departure: import("zod").ZodString;
172
172
  adults: import("zod").ZodNumber;
173
173
  channelCode: import("zod").ZodLiteral<"Direct">;
174
+ primaryGuest: import("zod").ZodObject<{
175
+ firstName: import("zod").ZodString;
176
+ lastName: import("zod").ZodString;
177
+ email: import("zod").ZodString;
178
+ phone: import("zod").ZodString;
179
+ }, "strip", import("zod").ZodTypeAny, {
180
+ email: string;
181
+ firstName: string;
182
+ lastName: string;
183
+ phone: string;
184
+ }, {
185
+ email: string;
186
+ firstName: string;
187
+ lastName: string;
188
+ phone: string;
189
+ }>;
174
190
  guarenteeType: import("zod").ZodLiteral<"Prepayment">;
175
191
  timeSlices: import("zod").ZodArray<import("zod").ZodObject<{
176
192
  ratePlanId: import("zod").ZodString;
@@ -222,6 +238,12 @@ export declare const reservationCreateSchema: import("zod").ZodObject<{
222
238
  arrival: string;
223
239
  departure: string;
224
240
  channelCode: "Direct";
241
+ primaryGuest: {
242
+ email: string;
243
+ firstName: string;
244
+ lastName: string;
245
+ phone: string;
246
+ };
225
247
  guarenteeType: "Prepayment";
226
248
  timeSlices: [{
227
249
  ratePlanId: string;
@@ -245,6 +267,12 @@ export declare const reservationCreateSchema: import("zod").ZodObject<{
245
267
  arrival: string;
246
268
  departure: string;
247
269
  channelCode: "Direct";
270
+ primaryGuest: {
271
+ email: string;
272
+ firstName: string;
273
+ lastName: string;
274
+ phone: string;
275
+ };
248
276
  guarenteeType: "Prepayment";
249
277
  timeSlices: [{
250
278
  ratePlanId: string;
@@ -263,24 +291,26 @@ export declare const reservationCreateSchema: import("zod").ZodObject<{
263
291
  amount: number;
264
292
  } | undefined;
265
293
  }[] | undefined;
266
- }>;
294
+ }>, "many">;
267
295
  transactionReference: import("zod").ZodString;
268
- amount: import("zod").ZodNumber;
269
- ratePlanId: import("zod").ZodString;
270
296
  }, "strip", import("zod").ZodTypeAny, {
271
- ratePlanId: string;
272
- amount: number;
273
297
  booker: {
274
298
  email: string;
275
299
  firstName: string;
276
300
  lastName: string;
277
301
  phone: string;
278
302
  };
279
- reservation: {
303
+ reservations: {
280
304
  adults: number;
281
305
  arrival: string;
282
306
  departure: string;
283
307
  channelCode: "Direct";
308
+ primaryGuest: {
309
+ email: string;
310
+ firstName: string;
311
+ lastName: string;
312
+ phone: string;
313
+ };
284
314
  guarenteeType: "Prepayment";
285
315
  timeSlices: [{
286
316
  ratePlanId: string;
@@ -299,22 +329,26 @@ export declare const reservationCreateSchema: import("zod").ZodObject<{
299
329
  amount: number;
300
330
  } | undefined;
301
331
  }[] | undefined;
302
- };
332
+ }[];
303
333
  transactionReference: string;
304
334
  }, {
305
- ratePlanId: string;
306
- amount: number;
307
335
  booker: {
308
336
  email: string;
309
337
  firstName: string;
310
338
  lastName: string;
311
339
  phone: string;
312
340
  };
313
- reservation: {
341
+ reservations: {
314
342
  adults: number;
315
343
  arrival: string;
316
344
  departure: string;
317
345
  channelCode: "Direct";
346
+ primaryGuest: {
347
+ email: string;
348
+ firstName: string;
349
+ lastName: string;
350
+ phone: string;
351
+ };
318
352
  guarenteeType: "Prepayment";
319
353
  timeSlices: [{
320
354
  ratePlanId: string;
@@ -333,7 +367,7 @@ export declare const reservationCreateSchema: import("zod").ZodObject<{
333
367
  amount: number;
334
368
  } | undefined;
335
369
  }[] | undefined;
336
- };
370
+ }[];
337
371
  transactionReference: string;
338
372
  }>;
339
373
  export declare const paymentCreateSchema: import("zod").ZodObject<{
@@ -393,6 +427,22 @@ export declare const paymentCreateSchema: import("zod").ZodObject<{
393
427
  departure: import("zod").ZodString;
394
428
  adults: import("zod").ZodNumber;
395
429
  channelCode: import("zod").ZodLiteral<"Direct">;
430
+ primaryGuest: import("zod").ZodObject<{
431
+ firstName: import("zod").ZodString;
432
+ lastName: import("zod").ZodString;
433
+ email: import("zod").ZodString;
434
+ phone: import("zod").ZodString;
435
+ }, "strip", import("zod").ZodTypeAny, {
436
+ email: string;
437
+ firstName: string;
438
+ lastName: string;
439
+ phone: string;
440
+ }, {
441
+ email: string;
442
+ firstName: string;
443
+ lastName: string;
444
+ phone: string;
445
+ }>;
396
446
  guarenteeType: import("zod").ZodLiteral<"Prepayment">;
397
447
  timeSlices: import("zod").ZodArray<import("zod").ZodObject<{
398
448
  ratePlanId: import("zod").ZodString;
@@ -487,11 +537,6 @@ export declare const paymentCreateSchema: import("zod").ZodObject<{
487
537
  lastName: string;
488
538
  phone: string;
489
539
  };
490
- reservation: {
491
- adults: number;
492
- arrival: string;
493
- departure: string;
494
- };
495
540
  paymentData: {
496
541
  paymentMethod: {
497
542
  encryptedCardNumber: string;
@@ -501,6 +546,11 @@ export declare const paymentCreateSchema: import("zod").ZodObject<{
501
546
  };
502
547
  riskData?: any;
503
548
  };
549
+ reservation: {
550
+ adults: number;
551
+ arrival: string;
552
+ departure: string;
553
+ };
504
554
  services?: {
505
555
  serviceId: string;
506
556
  count?: number | undefined;
@@ -518,11 +568,6 @@ export declare const paymentCreateSchema: import("zod").ZodObject<{
518
568
  lastName: string;
519
569
  phone: string;
520
570
  };
521
- reservation: {
522
- adults: number;
523
- arrival: string;
524
- departure: string;
525
- };
526
571
  paymentData: {
527
572
  paymentMethod: {
528
573
  encryptedCardNumber: string;
@@ -532,6 +577,11 @@ export declare const paymentCreateSchema: import("zod").ZodObject<{
532
577
  };
533
578
  riskData?: any;
534
579
  };
580
+ reservation: {
581
+ adults: number;
582
+ arrival: string;
583
+ departure: string;
584
+ };
535
585
  services?: {
536
586
  serviceId: string;
537
587
  count?: number | undefined;
@@ -66,6 +66,7 @@ const reservationSchema = (0, zod_1.object)({
66
66
  departure: (0, zod_1.string)().min(1, "Departure date is required"),
67
67
  adults: (0, zod_1.number)().min(1, "At least one adult is required"),
68
68
  channelCode: (0, zod_1.literal)("Direct"),
69
+ primaryGuest: bookerSchema,
69
70
  guarenteeType: (0, zod_1.literal)("Prepayment"),
70
71
  timeSlices: (0, zod_1.array)(timeSliceSchema).nonempty("At least one time slice is required"),
71
72
  services: (0, zod_1.array)((0, zod_1.object)({
@@ -80,10 +81,8 @@ const reservationSchema = (0, zod_1.object)({
80
81
  });
81
82
  exports.reservationCreateSchema = (0, zod_1.object)({
82
83
  booker: bookerSchema,
83
- reservation: reservationSchema,
84
+ reservations: (0, zod_1.array)(reservationSchema),
84
85
  transactionReference: (0, zod_1.string)().min(1, "Transaction reference is required"),
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"),
87
86
  });
88
87
  const paymentMethodSchema = (0, zod_1.object)({
89
88
  encryptedCardNumber: (0, zod_1.string)().min(1, "Card number is required"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hububb-models",
3
- "version": "1.0.88",
3
+ "version": "1.0.90",
4
4
  "description": "Models for Hububb application",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",