hububb-models 1.0.70 → 1.0.72

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.
@@ -1,3 +1,4 @@
1
1
  import { z } from "zod";
2
- import { ChannexMessageThreadSchema } from "../../schemas/channex/thread";
2
+ import { ChannexMessageThreadSchema, WebhookChannexMessageSchema } from "../../schemas/channex/thread";
3
3
  export type ChannexThread = z.infer<typeof ChannexMessageThreadSchema>;
4
+ export type WebhookChannexMessage = z.infer<typeof WebhookChannexMessageSchema>;
@@ -241,6 +241,7 @@ declare const apaleoReservationSchema: import("zod").ZodObject<{
241
241
  amount: number;
242
242
  };
243
243
  }>;
244
+ externalCode: import("zod").ZodOptional<import("zod").ZodString>;
244
245
  }, "strip", import("zod").ZodTypeAny, {
245
246
  id: string;
246
247
  status: string;
@@ -328,6 +329,7 @@ declare const apaleoReservationSchema: import("zod").ZodObject<{
328
329
  amount: number;
329
330
  };
330
331
  } | undefined;
332
+ externalCode?: string | undefined;
331
333
  }, {
332
334
  id: string;
333
335
  status: string;
@@ -415,5 +417,6 @@ declare const apaleoReservationSchema: import("zod").ZodObject<{
415
417
  amount: number;
416
418
  };
417
419
  } | undefined;
420
+ externalCode?: string | undefined;
418
421
  }>;
419
422
  export { apaleoReservationSchema };
@@ -80,5 +80,6 @@ const apaleoReservationSchema = (0, zod_1.object)({
80
80
  taxDetails: (0, zod_1.array)(taxDetailSchema),
81
81
  hasCityTax: (0, zod_1.boolean)(),
82
82
  payableAmount: payableAmountSchema,
83
+ externalCode: (0, zod_1.string)().optional(),
83
84
  });
84
85
  exports.apaleoReservationSchema = apaleoReservationSchema;
@@ -237,3 +237,77 @@ export declare const ChannexMessageThreadSchema: import("zod").ZodObject<{
237
237
  };
238
238
  };
239
239
  }>;
240
+ export declare const WebhookChannexMessageSchema: import("zod").ZodObject<{
241
+ timestamp: import("zod").ZodString;
242
+ event: import("zod").ZodString;
243
+ user_id: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodNull, import("zod").ZodString]>>;
244
+ payload: import("zod").ZodObject<{
245
+ id: import("zod").ZodString;
246
+ message: import("zod").ZodString;
247
+ sender: import("zod").ZodString;
248
+ property_id: import("zod").ZodString;
249
+ booking_id: import("zod").ZodString;
250
+ message_thread_id: import("zod").ZodString;
251
+ live_feed_event_id: import("zod").ZodString;
252
+ attachments: import("zod").ZodArray<import("zod").ZodString, "many">;
253
+ have_attachment: import("zod").ZodBoolean;
254
+ ota_message_id: import("zod").ZodString;
255
+ }, "strip", import("zod").ZodTypeAny, {
256
+ message: string;
257
+ id: string;
258
+ property_id: string;
259
+ booking_id: string;
260
+ attachments: string[];
261
+ sender: string;
262
+ message_thread_id: string;
263
+ live_feed_event_id: string;
264
+ have_attachment: boolean;
265
+ ota_message_id: string;
266
+ }, {
267
+ message: string;
268
+ id: string;
269
+ property_id: string;
270
+ booking_id: string;
271
+ attachments: string[];
272
+ sender: string;
273
+ message_thread_id: string;
274
+ live_feed_event_id: string;
275
+ have_attachment: boolean;
276
+ ota_message_id: string;
277
+ }>;
278
+ property_id: import("zod").ZodString;
279
+ }, "strip", import("zod").ZodTypeAny, {
280
+ event: string;
281
+ payload: {
282
+ message: string;
283
+ id: string;
284
+ property_id: string;
285
+ booking_id: string;
286
+ attachments: string[];
287
+ sender: string;
288
+ message_thread_id: string;
289
+ live_feed_event_id: string;
290
+ have_attachment: boolean;
291
+ ota_message_id: string;
292
+ };
293
+ property_id: string;
294
+ timestamp: string;
295
+ user_id?: string | null | undefined;
296
+ }, {
297
+ event: string;
298
+ payload: {
299
+ message: string;
300
+ id: string;
301
+ property_id: string;
302
+ booking_id: string;
303
+ attachments: string[];
304
+ sender: string;
305
+ message_thread_id: string;
306
+ live_feed_event_id: string;
307
+ have_attachment: boolean;
308
+ ota_message_id: string;
309
+ };
310
+ property_id: string;
311
+ timestamp: string;
312
+ user_id?: string | null | undefined;
313
+ }>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ChannexMessageThreadSchema = void 0;
3
+ exports.WebhookChannexMessageSchema = exports.ChannexMessageThreadSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const LastMessageSchema = (0, zod_1.object)({
6
6
  attachments: (0, zod_1.array)((0, zod_1.string)()),
@@ -38,3 +38,22 @@ exports.ChannexMessageThreadSchema = (0, zod_1.object)({
38
38
  }),
39
39
  relationships: RelationshipsSchema,
40
40
  });
41
+ const WebhookChannexMessagePayloadSchema = (0, zod_1.object)({
42
+ id: (0, zod_1.string)(),
43
+ message: (0, zod_1.string)(),
44
+ sender: (0, zod_1.string)(),
45
+ property_id: (0, zod_1.string)(),
46
+ booking_id: (0, zod_1.string)(),
47
+ message_thread_id: (0, zod_1.string)(),
48
+ live_feed_event_id: (0, zod_1.string)(),
49
+ attachments: (0, zod_1.array)((0, zod_1.string)()),
50
+ have_attachment: (0, zod_1.boolean)(),
51
+ ota_message_id: (0, zod_1.string)(),
52
+ });
53
+ exports.WebhookChannexMessageSchema = (0, zod_1.object)({
54
+ timestamp: (0, zod_1.string)(),
55
+ event: (0, zod_1.string)(),
56
+ user_id: (0, zod_1.optional)((0, zod_1.null)().or((0, zod_1.string)())),
57
+ payload: WebhookChannexMessagePayloadSchema,
58
+ property_id: (0, zod_1.string)(),
59
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hububb-models",
3
- "version": "1.0.70",
3
+ "version": "1.0.72",
4
4
  "description": "Models for Hububb application",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",