hububb-models 1.0.71 → 1.0.73
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>;
|
@@ -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/dist/schemas/thread.d.ts
CHANGED
@@ -624,12 +624,14 @@ export declare const ChatThreadSchema: import("zod").ZodObject<{
|
|
624
624
|
favorites?: string[] | undefined;
|
625
625
|
}>, "many">>;
|
626
626
|
type: import("zod").ZodUnion<[import("zod").ZodLiteral<"ONE_TO_ONE">, import("zod").ZodLiteral<"GROUP">]>;
|
627
|
+
source: import("zod").ZodOptional<import("zod").ZodString>;
|
627
628
|
}, "strip", import("zod").ZodTypeAny, {
|
628
629
|
type: "ONE_TO_ONE" | "GROUP";
|
629
630
|
createdAt: import("@firebase/firestore").Timestamp;
|
630
631
|
updatedAt: import("@firebase/firestore").Timestamp;
|
631
632
|
participantIds: string[];
|
632
633
|
id?: string | undefined;
|
634
|
+
source?: string | undefined;
|
633
635
|
lastMessage?: {
|
634
636
|
id: string;
|
635
637
|
body: string;
|
@@ -706,6 +708,7 @@ export declare const ChatThreadSchema: import("zod").ZodObject<{
|
|
706
708
|
updatedAt: import("@firebase/firestore").Timestamp;
|
707
709
|
participantIds: string[];
|
708
710
|
id?: string | undefined;
|
711
|
+
source?: string | undefined;
|
709
712
|
lastMessage?: {
|
710
713
|
id: string;
|
711
714
|
body: string;
|
package/dist/schemas/thread.js
CHANGED
@@ -24,4 +24,5 @@ exports.ChatThreadSchema = (0, zod_1.object)({
|
|
24
24
|
participantIds: (0, zod_1.array)((0, zod_1.string)()),
|
25
25
|
participants: (0, zod_1.optional)((0, zod_1.array)(user_1.UserSchema)),
|
26
26
|
type: (0, zod_1.union)([(0, zod_1.literal)("ONE_TO_ONE"), (0, zod_1.literal)("GROUP")]),
|
27
|
+
source: (0, zod_1.optional)((0, zod_1.string)()),
|
27
28
|
});
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "hububb-models",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.73",
|
4
4
|
"description": "Models for Hububb application",
|
5
5
|
"types": "./dist/index.d.ts",
|
6
6
|
"main": "./dist/index.js",
|
@@ -19,6 +19,7 @@
|
|
19
19
|
"@firebase/firestore": "^4.4.0",
|
20
20
|
"@firebase/firestore-types": "^3.0.0",
|
21
21
|
"@firebase/util": "^1.5.1",
|
22
|
+
"hububb-models": "^1.0.72",
|
22
23
|
"lodash": "^4.17.21",
|
23
24
|
"moment": "^2.29.4",
|
24
25
|
"zod": "^3.22.4"
|