hububb-models 1.0.81 → 1.0.83

Sign up to get free protection for your applications and to get access to all the features.
@@ -221,7 +221,9 @@ export declare const reservationCreateSchema: import("zod").ZodObject<{
221
221
  };
222
222
  }>;
223
223
  transactionReference: import("zod").ZodString;
224
+ amount: import("zod").ZodNumber;
224
225
  }, "strip", import("zod").ZodTypeAny, {
226
+ amount: number;
225
227
  booker: {
226
228
  email: string;
227
229
  firstName: string;
@@ -246,6 +248,7 @@ export declare const reservationCreateSchema: import("zod").ZodObject<{
246
248
  };
247
249
  transactionReference: string;
248
250
  }, {
251
+ amount: number;
249
252
  booker: {
250
253
  email: string;
251
254
  firstName: string;
@@ -270,3 +273,133 @@ export declare const reservationCreateSchema: import("zod").ZodObject<{
270
273
  };
271
274
  transactionReference: string;
272
275
  }>;
276
+ export declare const paymentCreateSchema: import("zod").ZodObject<{
277
+ paymentData: import("zod").ZodObject<{
278
+ paymentMethod: import("zod").ZodObject<{
279
+ encryptedCardNumber: import("zod").ZodString;
280
+ encryptedExpiryMonth: import("zod").ZodString;
281
+ encryptedExpiryYear: import("zod").ZodString;
282
+ encryptedSecurityCode: import("zod").ZodString;
283
+ }, "strip", import("zod").ZodTypeAny, {
284
+ encryptedCardNumber: string;
285
+ encryptedExpiryMonth: string;
286
+ encryptedExpiryYear: string;
287
+ encryptedSecurityCode: string;
288
+ }, {
289
+ encryptedCardNumber: string;
290
+ encryptedExpiryMonth: string;
291
+ encryptedExpiryYear: string;
292
+ encryptedSecurityCode: string;
293
+ }>;
294
+ riskData: import("zod").ZodString;
295
+ }, "strip", import("zod").ZodTypeAny, {
296
+ paymentMethod: {
297
+ encryptedCardNumber: string;
298
+ encryptedExpiryMonth: string;
299
+ encryptedExpiryYear: string;
300
+ encryptedSecurityCode: string;
301
+ };
302
+ riskData: string;
303
+ }, {
304
+ paymentMethod: {
305
+ encryptedCardNumber: string;
306
+ encryptedExpiryMonth: string;
307
+ encryptedExpiryYear: string;
308
+ encryptedSecurityCode: string;
309
+ };
310
+ riskData: string;
311
+ }>;
312
+ booker: import("zod").ZodObject<{
313
+ firstName: import("zod").ZodString;
314
+ lastName: import("zod").ZodString;
315
+ email: import("zod").ZodString;
316
+ phone: import("zod").ZodString;
317
+ }, "strip", import("zod").ZodTypeAny, {
318
+ email: string;
319
+ firstName: string;
320
+ lastName: string;
321
+ phone: string;
322
+ }, {
323
+ email: string;
324
+ firstName: string;
325
+ lastName: string;
326
+ phone: string;
327
+ }>;
328
+ reservation: import("zod").ZodObject<Pick<{
329
+ arrival: import("zod").ZodString;
330
+ departure: import("zod").ZodString;
331
+ adults: import("zod").ZodNumber;
332
+ channelCode: import("zod").ZodLiteral<"Direct">;
333
+ guarenteeType: import("zod").ZodLiteral<"Prepayment">;
334
+ timeSlices: import("zod").ZodArray<import("zod").ZodObject<{
335
+ ratePlanId: import("zod").ZodString;
336
+ }, "strip", import("zod").ZodTypeAny, {
337
+ ratePlanId: string;
338
+ }, {
339
+ ratePlanId: string;
340
+ }>, "atleastone">;
341
+ prePaymentAmount: import("zod").ZodObject<{
342
+ amount: import("zod").ZodNumber;
343
+ currency: import("zod").ZodString;
344
+ }, "strip", import("zod").ZodTypeAny, {
345
+ currency: string;
346
+ amount: number;
347
+ }, {
348
+ currency: string;
349
+ amount: number;
350
+ }>;
351
+ }, "adults" | "arrival" | "departure">, "strip", import("zod").ZodTypeAny, {
352
+ adults: number;
353
+ arrival: string;
354
+ departure: string;
355
+ }, {
356
+ adults: number;
357
+ arrival: string;
358
+ departure: string;
359
+ }>;
360
+ amount: import("zod").ZodNumber;
361
+ }, "strip", import("zod").ZodTypeAny, {
362
+ amount: number;
363
+ booker: {
364
+ email: string;
365
+ firstName: string;
366
+ lastName: string;
367
+ phone: string;
368
+ };
369
+ reservation: {
370
+ adults: number;
371
+ arrival: string;
372
+ departure: string;
373
+ };
374
+ paymentData: {
375
+ paymentMethod: {
376
+ encryptedCardNumber: string;
377
+ encryptedExpiryMonth: string;
378
+ encryptedExpiryYear: string;
379
+ encryptedSecurityCode: string;
380
+ };
381
+ riskData: string;
382
+ };
383
+ }, {
384
+ amount: number;
385
+ booker: {
386
+ email: string;
387
+ firstName: string;
388
+ lastName: string;
389
+ phone: string;
390
+ };
391
+ reservation: {
392
+ adults: number;
393
+ arrival: string;
394
+ departure: string;
395
+ };
396
+ paymentData: {
397
+ paymentMethod: {
398
+ encryptedCardNumber: string;
399
+ encryptedExpiryMonth: string;
400
+ encryptedExpiryYear: string;
401
+ encryptedSecurityCode: string;
402
+ };
403
+ riskData: string;
404
+ };
405
+ }>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.reservationCreateSchema = exports.ReservationSchema = void 0;
3
+ exports.paymentCreateSchema = exports.reservationCreateSchema = exports.ReservationSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const helpers_1 = require("../helpers");
6
6
  const GuestSchema = (0, zod_1.object)({
@@ -74,4 +74,24 @@ exports.reservationCreateSchema = (0, zod_1.object)({
74
74
  booker: bookerSchema,
75
75
  reservation: reservationSchema,
76
76
  transactionReference: (0, zod_1.string)().min(1, "Transaction reference is required"),
77
+ amount: (0, zod_1.number)().positive("Amount must be a positive number"),
78
+ });
79
+ const paymentMethodSchema = (0, zod_1.object)({
80
+ encryptedCardNumber: (0, zod_1.string)().min(1, "Card number is required"),
81
+ encryptedExpiryMonth: (0, zod_1.string)().min(1, "Expiry month is required"),
82
+ encryptedExpiryYear: (0, zod_1.string)().min(1, "Expiry year is required"),
83
+ encryptedSecurityCode: (0, zod_1.string)().min(1, "Security code is required"),
84
+ });
85
+ exports.paymentCreateSchema = (0, zod_1.object)({
86
+ paymentData: (0, zod_1.object)({
87
+ paymentMethod: paymentMethodSchema,
88
+ riskData: (0, zod_1.string)().min(1, "Risk data is required"),
89
+ }),
90
+ booker: bookerSchema,
91
+ reservation: reservationSchema.pick({
92
+ arrival: true,
93
+ departure: true,
94
+ adults: true,
95
+ }),
96
+ amount: (0, zod_1.number)().positive("Amount must be a positive number"),
77
97
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hububb-models",
3
- "version": "1.0.81",
3
+ "version": "1.0.83",
4
4
  "description": "Models for Hububb application",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",