hububb-saas-shared 1.0.65 → 1.0.67
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.
|
@@ -198,7 +198,7 @@ export declare const updatePropertySchema: z.ZodObject<{
|
|
|
198
198
|
latitude?: number | undefined;
|
|
199
199
|
longitude?: number | undefined;
|
|
200
200
|
}>>;
|
|
201
|
-
amenities: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
201
|
+
amenities: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString]>, "many">>;
|
|
202
202
|
}, "strip", z.ZodTypeAny, {
|
|
203
203
|
address?: {
|
|
204
204
|
state?: string | undefined;
|
|
@@ -246,7 +246,7 @@ export declare const updatePropertySchema: z.ZodObject<{
|
|
|
246
246
|
maximumNights?: number | undefined;
|
|
247
247
|
airbnbId?: string | undefined;
|
|
248
248
|
} | undefined;
|
|
249
|
-
amenities?: number[] | undefined;
|
|
249
|
+
amenities?: (string | number)[] | undefined;
|
|
250
250
|
}, {
|
|
251
251
|
address?: {
|
|
252
252
|
state?: string | undefined;
|
|
@@ -294,5 +294,5 @@ export declare const updatePropertySchema: z.ZodObject<{
|
|
|
294
294
|
maximumNights?: number | undefined;
|
|
295
295
|
airbnbId?: string | undefined;
|
|
296
296
|
} | undefined;
|
|
297
|
-
amenities?: number[] | undefined;
|
|
297
|
+
amenities?: (string | number)[] | undefined;
|
|
298
298
|
}>;
|
|
@@ -80,5 +80,5 @@ exports.updatePropertySchema = (0, zod_1.object)({
|
|
|
80
80
|
longitude: (0, zod_1.number)().int().optional(),
|
|
81
81
|
full: (0, zod_1.string)().optional(),
|
|
82
82
|
}).optional(),
|
|
83
|
-
amenities: (0, zod_1.number)().
|
|
83
|
+
amenities: zod_1.z.array(zod_1.z.union([(0, zod_1.number)(), (0, zod_1.string)()])).optional(),
|
|
84
84
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import
|
|
2
|
+
import * as admin from "firebase-admin";
|
|
3
3
|
export declare const ChatMessageTypeSchema: z.ZodUnion<[z.ZodLiteral<"message">, z.ZodLiteral<"note">, z.ZodLiteral<"whatsapp-message">]>;
|
|
4
4
|
export declare const ChatMessageSchema: z.ZodObject<{
|
|
5
5
|
id: z.ZodString;
|
|
6
|
-
createdAt: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>;
|
|
6
|
+
createdAt: z.ZodType<admin.firestore.Timestamp, z.ZodTypeDef, admin.firestore.Timestamp>;
|
|
7
7
|
threadId: z.ZodString;
|
|
8
8
|
authorId: z.ZodString;
|
|
9
9
|
author: z.ZodOptional<z.ZodObject<{
|
|
@@ -57,8 +57,8 @@ export declare const ChatMessageSchema: z.ZodObject<{
|
|
|
57
57
|
}>>;
|
|
58
58
|
contentType: z.ZodString;
|
|
59
59
|
body: z.ZodString;
|
|
60
|
-
seen: z.ZodRecord<z.ZodString, z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>>;
|
|
61
|
-
lastSeen: z.ZodOptional<z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>>;
|
|
60
|
+
seen: z.ZodRecord<z.ZodString, z.ZodType<admin.firestore.Timestamp, z.ZodTypeDef, admin.firestore.Timestamp>>;
|
|
61
|
+
lastSeen: z.ZodOptional<z.ZodType<admin.firestore.Timestamp, z.ZodTypeDef, admin.firestore.Timestamp>>;
|
|
62
62
|
source: z.ZodOptional<z.ZodString>;
|
|
63
63
|
externalMessageId: z.ZodOptional<z.ZodString>;
|
|
64
64
|
attachments: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -66,11 +66,11 @@ export declare const ChatMessageSchema: z.ZodObject<{
|
|
|
66
66
|
}, "strip", z.ZodTypeAny, {
|
|
67
67
|
id: string;
|
|
68
68
|
body: string;
|
|
69
|
-
createdAt: Timestamp;
|
|
69
|
+
createdAt: admin.firestore.Timestamp;
|
|
70
70
|
threadId: string;
|
|
71
|
-
authorId: string;
|
|
72
71
|
contentType: string;
|
|
73
|
-
|
|
72
|
+
authorId: string;
|
|
73
|
+
seen: Record<string, admin.firestore.Timestamp>;
|
|
74
74
|
type?: "message" | "note" | "whatsapp-message" | undefined;
|
|
75
75
|
source?: string | undefined;
|
|
76
76
|
attachments?: string[] | undefined;
|
|
@@ -91,16 +91,16 @@ export declare const ChatMessageSchema: z.ZodObject<{
|
|
|
91
91
|
photoUrl?: string | undefined;
|
|
92
92
|
stripeCustomerId?: string | undefined;
|
|
93
93
|
} | undefined;
|
|
94
|
-
lastSeen?: Timestamp | undefined;
|
|
94
|
+
lastSeen?: admin.firestore.Timestamp | undefined;
|
|
95
95
|
externalMessageId?: string | undefined;
|
|
96
96
|
}, {
|
|
97
97
|
id: string;
|
|
98
98
|
body: string;
|
|
99
|
-
createdAt: Timestamp;
|
|
99
|
+
createdAt: admin.firestore.Timestamp;
|
|
100
100
|
threadId: string;
|
|
101
|
-
authorId: string;
|
|
102
101
|
contentType: string;
|
|
103
|
-
|
|
102
|
+
authorId: string;
|
|
103
|
+
seen: Record<string, admin.firestore.Timestamp>;
|
|
104
104
|
type?: "message" | "note" | "whatsapp-message" | undefined;
|
|
105
105
|
source?: string | undefined;
|
|
106
106
|
attachments?: string[] | undefined;
|
|
@@ -121,16 +121,16 @@ export declare const ChatMessageSchema: z.ZodObject<{
|
|
|
121
121
|
photoUrl?: string | undefined;
|
|
122
122
|
stripeCustomerId?: string | undefined;
|
|
123
123
|
} | undefined;
|
|
124
|
-
lastSeen?: Timestamp | undefined;
|
|
124
|
+
lastSeen?: admin.firestore.Timestamp | undefined;
|
|
125
125
|
externalMessageId?: string | undefined;
|
|
126
126
|
}>;
|
|
127
127
|
export declare const ChatThreadSchema: z.ZodObject<{
|
|
128
128
|
id: z.ZodOptional<z.ZodString>;
|
|
129
|
-
createdAt: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>;
|
|
130
|
-
updatedAt: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>;
|
|
129
|
+
createdAt: z.ZodType<admin.firestore.Timestamp, z.ZodTypeDef, admin.firestore.Timestamp>;
|
|
130
|
+
updatedAt: z.ZodType<admin.firestore.Timestamp, z.ZodTypeDef, admin.firestore.Timestamp>;
|
|
131
131
|
lastMessage: z.ZodOptional<z.ZodObject<{
|
|
132
132
|
id: z.ZodString;
|
|
133
|
-
createdAt: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>;
|
|
133
|
+
createdAt: z.ZodType<admin.firestore.Timestamp, z.ZodTypeDef, admin.firestore.Timestamp>;
|
|
134
134
|
threadId: z.ZodString;
|
|
135
135
|
authorId: z.ZodString;
|
|
136
136
|
author: z.ZodOptional<z.ZodObject<{
|
|
@@ -184,8 +184,8 @@ export declare const ChatThreadSchema: z.ZodObject<{
|
|
|
184
184
|
}>>;
|
|
185
185
|
contentType: z.ZodString;
|
|
186
186
|
body: z.ZodString;
|
|
187
|
-
seen: z.ZodRecord<z.ZodString, z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>>;
|
|
188
|
-
lastSeen: z.ZodOptional<z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>>;
|
|
187
|
+
seen: z.ZodRecord<z.ZodString, z.ZodType<admin.firestore.Timestamp, z.ZodTypeDef, admin.firestore.Timestamp>>;
|
|
188
|
+
lastSeen: z.ZodOptional<z.ZodType<admin.firestore.Timestamp, z.ZodTypeDef, admin.firestore.Timestamp>>;
|
|
189
189
|
source: z.ZodOptional<z.ZodString>;
|
|
190
190
|
externalMessageId: z.ZodOptional<z.ZodString>;
|
|
191
191
|
attachments: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -193,11 +193,11 @@ export declare const ChatThreadSchema: z.ZodObject<{
|
|
|
193
193
|
}, "strip", z.ZodTypeAny, {
|
|
194
194
|
id: string;
|
|
195
195
|
body: string;
|
|
196
|
-
createdAt: Timestamp;
|
|
196
|
+
createdAt: admin.firestore.Timestamp;
|
|
197
197
|
threadId: string;
|
|
198
|
-
authorId: string;
|
|
199
198
|
contentType: string;
|
|
200
|
-
|
|
199
|
+
authorId: string;
|
|
200
|
+
seen: Record<string, admin.firestore.Timestamp>;
|
|
201
201
|
type?: "message" | "note" | "whatsapp-message" | undefined;
|
|
202
202
|
source?: string | undefined;
|
|
203
203
|
attachments?: string[] | undefined;
|
|
@@ -218,16 +218,16 @@ export declare const ChatThreadSchema: z.ZodObject<{
|
|
|
218
218
|
photoUrl?: string | undefined;
|
|
219
219
|
stripeCustomerId?: string | undefined;
|
|
220
220
|
} | undefined;
|
|
221
|
-
lastSeen?: Timestamp | undefined;
|
|
221
|
+
lastSeen?: admin.firestore.Timestamp | undefined;
|
|
222
222
|
externalMessageId?: string | undefined;
|
|
223
223
|
}, {
|
|
224
224
|
id: string;
|
|
225
225
|
body: string;
|
|
226
|
-
createdAt: Timestamp;
|
|
226
|
+
createdAt: admin.firestore.Timestamp;
|
|
227
227
|
threadId: string;
|
|
228
|
-
authorId: string;
|
|
229
228
|
contentType: string;
|
|
230
|
-
|
|
229
|
+
authorId: string;
|
|
230
|
+
seen: Record<string, admin.firestore.Timestamp>;
|
|
231
231
|
type?: "message" | "note" | "whatsapp-message" | undefined;
|
|
232
232
|
source?: string | undefined;
|
|
233
233
|
attachments?: string[] | undefined;
|
|
@@ -248,7 +248,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
|
|
|
248
248
|
photoUrl?: string | undefined;
|
|
249
249
|
stripeCustomerId?: string | undefined;
|
|
250
250
|
} | undefined;
|
|
251
|
-
lastSeen?: Timestamp | undefined;
|
|
251
|
+
lastSeen?: admin.firestore.Timestamp | undefined;
|
|
252
252
|
externalMessageId?: string | undefined;
|
|
253
253
|
}>>;
|
|
254
254
|
participantIds: z.ZodArray<z.ZodString, "many">;
|
|
@@ -306,7 +306,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
|
|
|
306
306
|
externalThreadId: z.ZodOptional<z.ZodString>;
|
|
307
307
|
externalSource: z.ZodOptional<z.ZodString>;
|
|
308
308
|
title: z.ZodOptional<z.ZodString>;
|
|
309
|
-
seenBy: z.ZodRecord<z.ZodString, z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>>;
|
|
309
|
+
seenBy: z.ZodRecord<z.ZodString, z.ZodType<admin.firestore.Timestamp, z.ZodTypeDef, admin.firestore.Timestamp>>;
|
|
310
310
|
isImportant: z.ZodOptional<z.ZodBoolean>;
|
|
311
311
|
needsAttention: z.ZodArray<z.ZodString, "many">;
|
|
312
312
|
needsAttentionMap: z.ZodRecord<z.ZodString, z.ZodBoolean>;
|
|
@@ -473,10 +473,10 @@ export declare const ChatThreadSchema: z.ZodObject<{
|
|
|
473
473
|
whatsappUserReplied: z.ZodOptional<z.ZodBoolean>;
|
|
474
474
|
}, "strip", z.ZodTypeAny, {
|
|
475
475
|
type: "ONE_TO_ONE" | "GROUP";
|
|
476
|
-
createdAt: Timestamp;
|
|
477
|
-
updatedAt: Timestamp;
|
|
476
|
+
createdAt: admin.firestore.Timestamp;
|
|
477
|
+
updatedAt: admin.firestore.Timestamp;
|
|
478
478
|
participantIds: string[];
|
|
479
|
-
seenBy: Record<string, Timestamp>;
|
|
479
|
+
seenBy: Record<string, admin.firestore.Timestamp>;
|
|
480
480
|
needsAttention: string[];
|
|
481
481
|
needsAttentionMap: Record<string, boolean>;
|
|
482
482
|
id?: string | undefined;
|
|
@@ -486,11 +486,11 @@ export declare const ChatThreadSchema: z.ZodObject<{
|
|
|
486
486
|
lastMessage?: {
|
|
487
487
|
id: string;
|
|
488
488
|
body: string;
|
|
489
|
-
createdAt: Timestamp;
|
|
489
|
+
createdAt: admin.firestore.Timestamp;
|
|
490
490
|
threadId: string;
|
|
491
|
-
authorId: string;
|
|
492
491
|
contentType: string;
|
|
493
|
-
|
|
492
|
+
authorId: string;
|
|
493
|
+
seen: Record<string, admin.firestore.Timestamp>;
|
|
494
494
|
type?: "message" | "note" | "whatsapp-message" | undefined;
|
|
495
495
|
source?: string | undefined;
|
|
496
496
|
attachments?: string[] | undefined;
|
|
@@ -511,7 +511,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
|
|
|
511
511
|
photoUrl?: string | undefined;
|
|
512
512
|
stripeCustomerId?: string | undefined;
|
|
513
513
|
} | undefined;
|
|
514
|
-
lastSeen?: Timestamp | undefined;
|
|
514
|
+
lastSeen?: admin.firestore.Timestamp | undefined;
|
|
515
515
|
externalMessageId?: string | undefined;
|
|
516
516
|
} | undefined;
|
|
517
517
|
participants?: {
|
|
@@ -572,10 +572,10 @@ export declare const ChatThreadSchema: z.ZodObject<{
|
|
|
572
572
|
whatsappUserReplied?: boolean | undefined;
|
|
573
573
|
}, {
|
|
574
574
|
type: "ONE_TO_ONE" | "GROUP";
|
|
575
|
-
createdAt: Timestamp;
|
|
576
|
-
updatedAt: Timestamp;
|
|
575
|
+
createdAt: admin.firestore.Timestamp;
|
|
576
|
+
updatedAt: admin.firestore.Timestamp;
|
|
577
577
|
participantIds: string[];
|
|
578
|
-
seenBy: Record<string, Timestamp>;
|
|
578
|
+
seenBy: Record<string, admin.firestore.Timestamp>;
|
|
579
579
|
needsAttention: string[];
|
|
580
580
|
needsAttentionMap: Record<string, boolean>;
|
|
581
581
|
id?: string | undefined;
|
|
@@ -585,11 +585,11 @@ export declare const ChatThreadSchema: z.ZodObject<{
|
|
|
585
585
|
lastMessage?: {
|
|
586
586
|
id: string;
|
|
587
587
|
body: string;
|
|
588
|
-
createdAt: Timestamp;
|
|
588
|
+
createdAt: admin.firestore.Timestamp;
|
|
589
589
|
threadId: string;
|
|
590
|
-
authorId: string;
|
|
591
590
|
contentType: string;
|
|
592
|
-
|
|
591
|
+
authorId: string;
|
|
592
|
+
seen: Record<string, admin.firestore.Timestamp>;
|
|
593
593
|
type?: "message" | "note" | "whatsapp-message" | undefined;
|
|
594
594
|
source?: string | undefined;
|
|
595
595
|
attachments?: string[] | undefined;
|
|
@@ -610,7 +610,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
|
|
|
610
610
|
photoUrl?: string | undefined;
|
|
611
611
|
stripeCustomerId?: string | undefined;
|
|
612
612
|
} | undefined;
|
|
613
|
-
lastSeen?: Timestamp | undefined;
|
|
613
|
+
lastSeen?: admin.firestore.Timestamp | undefined;
|
|
614
614
|
externalMessageId?: string | undefined;
|
|
615
615
|
} | undefined;
|
|
616
616
|
participants?: {
|
|
@@ -673,7 +673,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
|
|
|
673
673
|
export declare const MessageAutomationTemplateSchema: z.ZodObject<{
|
|
674
674
|
id: z.ZodOptional<z.ZodString>;
|
|
675
675
|
name: z.ZodString;
|
|
676
|
-
createdAt: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>;
|
|
676
|
+
createdAt: z.ZodType<admin.firestore.Timestamp, z.ZodTypeDef, admin.firestore.Timestamp>;
|
|
677
677
|
message: z.ZodString;
|
|
678
678
|
action: z.ZodUnion<[z.ZodLiteral<"booking-confirmed">, z.ZodLiteral<"check-in">, z.ZodLiteral<"check-out">]>;
|
|
679
679
|
minutesAfterBookingConfirmed: z.ZodOptional<z.ZodNumber>;
|
|
@@ -683,7 +683,7 @@ export declare const MessageAutomationTemplateSchema: z.ZodObject<{
|
|
|
683
683
|
name: string;
|
|
684
684
|
message: string;
|
|
685
685
|
action: "booking-confirmed" | "check-in" | "check-out";
|
|
686
|
-
createdAt: Timestamp;
|
|
686
|
+
createdAt: admin.firestore.Timestamp;
|
|
687
687
|
id?: string | undefined;
|
|
688
688
|
minutesAfterBookingConfirmed?: number | undefined;
|
|
689
689
|
daysAfterAction?: number | undefined;
|
|
@@ -692,7 +692,7 @@ export declare const MessageAutomationTemplateSchema: z.ZodObject<{
|
|
|
692
692
|
name: string;
|
|
693
693
|
message: string;
|
|
694
694
|
action: "booking-confirmed" | "check-in" | "check-out";
|
|
695
|
-
createdAt: Timestamp;
|
|
695
|
+
createdAt: admin.firestore.Timestamp;
|
|
696
696
|
id?: string | undefined;
|
|
697
697
|
minutesAfterBookingConfirmed?: number | undefined;
|
|
698
698
|
daysAfterAction?: number | undefined;
|
|
@@ -701,16 +701,16 @@ export declare const MessageAutomationTemplateSchema: z.ZodObject<{
|
|
|
701
701
|
export declare const SavedReplySchema: z.ZodObject<{
|
|
702
702
|
id: z.ZodOptional<z.ZodString>;
|
|
703
703
|
name: z.ZodString;
|
|
704
|
-
createdAt: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>;
|
|
704
|
+
createdAt: z.ZodType<admin.firestore.Timestamp, z.ZodTypeDef, admin.firestore.Timestamp>;
|
|
705
705
|
message: z.ZodString;
|
|
706
706
|
}, "strip", z.ZodTypeAny, {
|
|
707
707
|
name: string;
|
|
708
708
|
message: string;
|
|
709
|
-
createdAt: Timestamp;
|
|
709
|
+
createdAt: admin.firestore.Timestamp;
|
|
710
710
|
id?: string | undefined;
|
|
711
711
|
}, {
|
|
712
712
|
name: string;
|
|
713
713
|
message: string;
|
|
714
|
-
createdAt: Timestamp;
|
|
714
|
+
createdAt: admin.firestore.Timestamp;
|
|
715
715
|
id?: string | undefined;
|
|
716
716
|
}>;
|
|
@@ -1,12 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.SavedReplySchema = exports.MessageAutomationTemplateSchema = exports.ChatThreadSchema = exports.ChatMessageSchema = exports.ChatMessageTypeSchema = void 0;
|
|
4
37
|
const zod_1 = require("zod");
|
|
5
38
|
const user_1 = require("../user");
|
|
6
39
|
const reservation_1 = require("../reservation");
|
|
7
40
|
const property_1 = require("../property");
|
|
8
|
-
|
|
9
|
-
const
|
|
41
|
+
// import { Timestamp } from "@firebase/firestore-types";
|
|
42
|
+
const admin = __importStar(require("firebase-admin"));
|
|
43
|
+
const SeenBySchema = (0, zod_1.record)((0, zod_1.string)(), zod_1.z.instanceof(admin.firestore.Timestamp));
|
|
10
44
|
exports.ChatMessageTypeSchema = (0, zod_1.union)([
|
|
11
45
|
(0, zod_1.literal)("message"),
|
|
12
46
|
(0, zod_1.literal)("note"),
|
|
@@ -14,14 +48,14 @@ exports.ChatMessageTypeSchema = (0, zod_1.union)([
|
|
|
14
48
|
]);
|
|
15
49
|
exports.ChatMessageSchema = (0, zod_1.object)({
|
|
16
50
|
id: (0, zod_1.string)(),
|
|
17
|
-
createdAt: zod_1.z.instanceof(
|
|
51
|
+
createdAt: zod_1.z.instanceof(admin.firestore.Timestamp),
|
|
18
52
|
threadId: (0, zod_1.string)(),
|
|
19
53
|
authorId: (0, zod_1.string)(),
|
|
20
54
|
author: (0, zod_1.optional)(user_1.userSchema),
|
|
21
55
|
contentType: (0, zod_1.string)(),
|
|
22
56
|
body: (0, zod_1.string)(),
|
|
23
57
|
seen: SeenBySchema,
|
|
24
|
-
lastSeen: (0, zod_1.optional)(zod_1.z.instanceof(
|
|
58
|
+
lastSeen: (0, zod_1.optional)(zod_1.z.instanceof(admin.firestore.Timestamp)),
|
|
25
59
|
source: (0, zod_1.optional)((0, zod_1.string)()),
|
|
26
60
|
externalMessageId: (0, zod_1.optional)((0, zod_1.string)()),
|
|
27
61
|
attachments: (0, zod_1.optional)((0, zod_1.array)((0, zod_1.string)())),
|
|
@@ -29,8 +63,8 @@ exports.ChatMessageSchema = (0, zod_1.object)({
|
|
|
29
63
|
});
|
|
30
64
|
exports.ChatThreadSchema = (0, zod_1.object)({
|
|
31
65
|
id: (0, zod_1.optional)((0, zod_1.string)()),
|
|
32
|
-
createdAt: zod_1.z.instanceof(
|
|
33
|
-
updatedAt: zod_1.z.instanceof(
|
|
66
|
+
createdAt: zod_1.z.instanceof(admin.firestore.Timestamp),
|
|
67
|
+
updatedAt: zod_1.z.instanceof(admin.firestore.Timestamp),
|
|
34
68
|
lastMessage: (0, zod_1.optional)(exports.ChatMessageSchema),
|
|
35
69
|
participantIds: (0, zod_1.array)((0, zod_1.string)()),
|
|
36
70
|
participants: (0, zod_1.optional)((0, zod_1.array)(user_1.userSchema)),
|
|
@@ -39,7 +73,7 @@ exports.ChatThreadSchema = (0, zod_1.object)({
|
|
|
39
73
|
externalThreadId: (0, zod_1.optional)((0, zod_1.string)()),
|
|
40
74
|
externalSource: (0, zod_1.optional)((0, zod_1.string)()),
|
|
41
75
|
title: (0, zod_1.optional)((0, zod_1.string)()),
|
|
42
|
-
seenBy: (0, zod_1.record)((0, zod_1.string)(), zod_1.z.instanceof(
|
|
76
|
+
seenBy: (0, zod_1.record)((0, zod_1.string)(), zod_1.z.instanceof(admin.firestore.Timestamp)),
|
|
43
77
|
isImportant: (0, zod_1.optional)((0, zod_1.boolean)()),
|
|
44
78
|
needsAttention: (0, zod_1.array)((0, zod_1.string)()),
|
|
45
79
|
needsAttentionMap: (0, zod_1.record)((0, zod_1.string)(), (0, zod_1.boolean)()),
|
|
@@ -63,7 +97,7 @@ exports.ChatThreadSchema = (0, zod_1.object)({
|
|
|
63
97
|
exports.MessageAutomationTemplateSchema = (0, zod_1.object)({
|
|
64
98
|
id: (0, zod_1.optional)((0, zod_1.string)()),
|
|
65
99
|
name: (0, zod_1.string)(),
|
|
66
|
-
createdAt: zod_1.z.instanceof(
|
|
100
|
+
createdAt: zod_1.z.instanceof(admin.firestore.Timestamp),
|
|
67
101
|
message: (0, zod_1.string)(),
|
|
68
102
|
action: (0, zod_1.union)([
|
|
69
103
|
(0, zod_1.literal)("booking-confirmed"),
|
|
@@ -77,6 +111,6 @@ exports.MessageAutomationTemplateSchema = (0, zod_1.object)({
|
|
|
77
111
|
exports.SavedReplySchema = (0, zod_1.object)({
|
|
78
112
|
id: (0, zod_1.optional)((0, zod_1.string)()),
|
|
79
113
|
name: (0, zod_1.string)(),
|
|
80
|
-
createdAt: zod_1.z.instanceof(
|
|
114
|
+
createdAt: zod_1.z.instanceof(admin.firestore.Timestamp),
|
|
81
115
|
message: (0, zod_1.string)(),
|
|
82
116
|
});
|