hububb-saas-shared 1.0.62 → 1.0.63
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.
- package/dist/schemas/thread/index.d.ts +195 -193
- package/dist/schemas/thread/index.js +9 -9
- package/package.json +1 -1
|
@@ -1,26 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { Timestamp } from "@firebase/firestore-types";
|
|
3
|
+
export declare const ChatMessageTypeSchema: z.ZodUnion<[z.ZodLiteral<"message">, z.ZodLiteral<"note">, z.ZodLiteral<"whatsapp-message">]>;
|
|
4
|
+
export declare const ChatMessageSchema: z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
createdAt: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>;
|
|
7
|
+
threadId: z.ZodString;
|
|
8
|
+
authorId: z.ZodString;
|
|
9
|
+
author: z.ZodOptional<z.ZodObject<{
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
name: z.ZodString;
|
|
12
|
+
email: z.ZodString;
|
|
13
|
+
createdAt: z.ZodDate;
|
|
14
|
+
updatedAt: z.ZodDate;
|
|
15
|
+
tierId: z.ZodNumber;
|
|
16
|
+
firstName: z.ZodString;
|
|
17
|
+
lastName: z.ZodString;
|
|
18
|
+
phone: z.ZodString;
|
|
19
|
+
photoUrl: z.ZodOptional<z.ZodString>;
|
|
20
|
+
isOnboardingCompleted: z.ZodBoolean;
|
|
21
|
+
userRoleId: z.ZodNumber;
|
|
22
|
+
stripeCustomerId: z.ZodOptional<z.ZodString>;
|
|
23
|
+
onboardingStep: z.ZodNumber;
|
|
24
|
+
onboardingType: z.ZodNativeEnum<typeof import("../..").OnboardingType>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
26
|
name: string;
|
|
25
27
|
id: string;
|
|
26
28
|
email: string;
|
|
@@ -53,22 +55,22 @@ export declare const ChatMessageSchema: import("zod").ZodObject<{
|
|
|
53
55
|
photoUrl?: string | undefined;
|
|
54
56
|
stripeCustomerId?: string | undefined;
|
|
55
57
|
}>>;
|
|
56
|
-
contentType:
|
|
57
|
-
body:
|
|
58
|
-
seen:
|
|
59
|
-
lastSeen:
|
|
60
|
-
source:
|
|
61
|
-
externalMessageId:
|
|
62
|
-
attachments:
|
|
63
|
-
type:
|
|
64
|
-
}, "strip",
|
|
58
|
+
contentType: z.ZodString;
|
|
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>>;
|
|
62
|
+
source: z.ZodOptional<z.ZodString>;
|
|
63
|
+
externalMessageId: z.ZodOptional<z.ZodString>;
|
|
64
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
65
|
+
type: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"message">, z.ZodLiteral<"note">, z.ZodLiteral<"whatsapp-message">]>>;
|
|
66
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
67
|
id: string;
|
|
66
68
|
body: string;
|
|
67
|
-
createdAt:
|
|
69
|
+
createdAt: Timestamp;
|
|
68
70
|
threadId: string;
|
|
69
71
|
authorId: string;
|
|
70
72
|
contentType: string;
|
|
71
|
-
seen: Record<string,
|
|
73
|
+
seen: Record<string, Timestamp>;
|
|
72
74
|
type?: "message" | "note" | "whatsapp-message" | undefined;
|
|
73
75
|
source?: string | undefined;
|
|
74
76
|
attachments?: string[] | undefined;
|
|
@@ -89,16 +91,16 @@ export declare const ChatMessageSchema: import("zod").ZodObject<{
|
|
|
89
91
|
photoUrl?: string | undefined;
|
|
90
92
|
stripeCustomerId?: string | undefined;
|
|
91
93
|
} | undefined;
|
|
92
|
-
lastSeen?:
|
|
94
|
+
lastSeen?: Timestamp | undefined;
|
|
93
95
|
externalMessageId?: string | undefined;
|
|
94
96
|
}, {
|
|
95
97
|
id: string;
|
|
96
98
|
body: string;
|
|
97
|
-
createdAt:
|
|
99
|
+
createdAt: Timestamp;
|
|
98
100
|
threadId: string;
|
|
99
101
|
authorId: string;
|
|
100
102
|
contentType: string;
|
|
101
|
-
seen: Record<string,
|
|
103
|
+
seen: Record<string, Timestamp>;
|
|
102
104
|
type?: "message" | "note" | "whatsapp-message" | undefined;
|
|
103
105
|
source?: string | undefined;
|
|
104
106
|
attachments?: string[] | undefined;
|
|
@@ -119,35 +121,35 @@ export declare const ChatMessageSchema: import("zod").ZodObject<{
|
|
|
119
121
|
photoUrl?: string | undefined;
|
|
120
122
|
stripeCustomerId?: string | undefined;
|
|
121
123
|
} | undefined;
|
|
122
|
-
lastSeen?:
|
|
124
|
+
lastSeen?: Timestamp | undefined;
|
|
123
125
|
externalMessageId?: string | undefined;
|
|
124
126
|
}>;
|
|
125
|
-
export declare const ChatThreadSchema:
|
|
126
|
-
id:
|
|
127
|
-
createdAt:
|
|
128
|
-
updatedAt:
|
|
129
|
-
lastMessage:
|
|
130
|
-
id:
|
|
131
|
-
createdAt:
|
|
132
|
-
threadId:
|
|
133
|
-
authorId:
|
|
134
|
-
author:
|
|
135
|
-
id:
|
|
136
|
-
name:
|
|
137
|
-
email:
|
|
138
|
-
createdAt:
|
|
139
|
-
updatedAt:
|
|
140
|
-
tierId:
|
|
141
|
-
firstName:
|
|
142
|
-
lastName:
|
|
143
|
-
phone:
|
|
144
|
-
photoUrl:
|
|
145
|
-
isOnboardingCompleted:
|
|
146
|
-
userRoleId:
|
|
147
|
-
stripeCustomerId:
|
|
148
|
-
onboardingStep:
|
|
149
|
-
onboardingType:
|
|
150
|
-
}, "strip",
|
|
127
|
+
export declare const ChatThreadSchema: z.ZodObject<{
|
|
128
|
+
id: z.ZodOptional<z.ZodString>;
|
|
129
|
+
createdAt: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>;
|
|
130
|
+
updatedAt: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>;
|
|
131
|
+
lastMessage: z.ZodOptional<z.ZodObject<{
|
|
132
|
+
id: z.ZodString;
|
|
133
|
+
createdAt: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>;
|
|
134
|
+
threadId: z.ZodString;
|
|
135
|
+
authorId: z.ZodString;
|
|
136
|
+
author: z.ZodOptional<z.ZodObject<{
|
|
137
|
+
id: z.ZodString;
|
|
138
|
+
name: z.ZodString;
|
|
139
|
+
email: z.ZodString;
|
|
140
|
+
createdAt: z.ZodDate;
|
|
141
|
+
updatedAt: z.ZodDate;
|
|
142
|
+
tierId: z.ZodNumber;
|
|
143
|
+
firstName: z.ZodString;
|
|
144
|
+
lastName: z.ZodString;
|
|
145
|
+
phone: z.ZodString;
|
|
146
|
+
photoUrl: z.ZodOptional<z.ZodString>;
|
|
147
|
+
isOnboardingCompleted: z.ZodBoolean;
|
|
148
|
+
userRoleId: z.ZodNumber;
|
|
149
|
+
stripeCustomerId: z.ZodOptional<z.ZodString>;
|
|
150
|
+
onboardingStep: z.ZodNumber;
|
|
151
|
+
onboardingType: z.ZodNativeEnum<typeof import("../..").OnboardingType>;
|
|
152
|
+
}, "strip", z.ZodTypeAny, {
|
|
151
153
|
name: string;
|
|
152
154
|
id: string;
|
|
153
155
|
email: string;
|
|
@@ -180,22 +182,22 @@ export declare const ChatThreadSchema: import("zod").ZodObject<{
|
|
|
180
182
|
photoUrl?: string | undefined;
|
|
181
183
|
stripeCustomerId?: string | undefined;
|
|
182
184
|
}>>;
|
|
183
|
-
contentType:
|
|
184
|
-
body:
|
|
185
|
-
seen:
|
|
186
|
-
lastSeen:
|
|
187
|
-
source:
|
|
188
|
-
externalMessageId:
|
|
189
|
-
attachments:
|
|
190
|
-
type:
|
|
191
|
-
}, "strip",
|
|
185
|
+
contentType: z.ZodString;
|
|
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>>;
|
|
189
|
+
source: z.ZodOptional<z.ZodString>;
|
|
190
|
+
externalMessageId: z.ZodOptional<z.ZodString>;
|
|
191
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
192
|
+
type: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"message">, z.ZodLiteral<"note">, z.ZodLiteral<"whatsapp-message">]>>;
|
|
193
|
+
}, "strip", z.ZodTypeAny, {
|
|
192
194
|
id: string;
|
|
193
195
|
body: string;
|
|
194
|
-
createdAt:
|
|
196
|
+
createdAt: Timestamp;
|
|
195
197
|
threadId: string;
|
|
196
198
|
authorId: string;
|
|
197
199
|
contentType: string;
|
|
198
|
-
seen: Record<string,
|
|
200
|
+
seen: Record<string, Timestamp>;
|
|
199
201
|
type?: "message" | "note" | "whatsapp-message" | undefined;
|
|
200
202
|
source?: string | undefined;
|
|
201
203
|
attachments?: string[] | undefined;
|
|
@@ -216,16 +218,16 @@ export declare const ChatThreadSchema: import("zod").ZodObject<{
|
|
|
216
218
|
photoUrl?: string | undefined;
|
|
217
219
|
stripeCustomerId?: string | undefined;
|
|
218
220
|
} | undefined;
|
|
219
|
-
lastSeen?:
|
|
221
|
+
lastSeen?: Timestamp | undefined;
|
|
220
222
|
externalMessageId?: string | undefined;
|
|
221
223
|
}, {
|
|
222
224
|
id: string;
|
|
223
225
|
body: string;
|
|
224
|
-
createdAt:
|
|
226
|
+
createdAt: Timestamp;
|
|
225
227
|
threadId: string;
|
|
226
228
|
authorId: string;
|
|
227
229
|
contentType: string;
|
|
228
|
-
seen: Record<string,
|
|
230
|
+
seen: Record<string, Timestamp>;
|
|
229
231
|
type?: "message" | "note" | "whatsapp-message" | undefined;
|
|
230
232
|
source?: string | undefined;
|
|
231
233
|
attachments?: string[] | undefined;
|
|
@@ -246,27 +248,27 @@ export declare const ChatThreadSchema: import("zod").ZodObject<{
|
|
|
246
248
|
photoUrl?: string | undefined;
|
|
247
249
|
stripeCustomerId?: string | undefined;
|
|
248
250
|
} | undefined;
|
|
249
|
-
lastSeen?:
|
|
251
|
+
lastSeen?: Timestamp | undefined;
|
|
250
252
|
externalMessageId?: string | undefined;
|
|
251
253
|
}>>;
|
|
252
|
-
participantIds:
|
|
253
|
-
participants:
|
|
254
|
-
id:
|
|
255
|
-
name:
|
|
256
|
-
email:
|
|
257
|
-
createdAt:
|
|
258
|
-
updatedAt:
|
|
259
|
-
tierId:
|
|
260
|
-
firstName:
|
|
261
|
-
lastName:
|
|
262
|
-
phone:
|
|
263
|
-
photoUrl:
|
|
264
|
-
isOnboardingCompleted:
|
|
265
|
-
userRoleId:
|
|
266
|
-
stripeCustomerId:
|
|
267
|
-
onboardingStep:
|
|
268
|
-
onboardingType:
|
|
269
|
-
}, "strip",
|
|
254
|
+
participantIds: z.ZodArray<z.ZodString, "many">;
|
|
255
|
+
participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
256
|
+
id: z.ZodString;
|
|
257
|
+
name: z.ZodString;
|
|
258
|
+
email: z.ZodString;
|
|
259
|
+
createdAt: z.ZodDate;
|
|
260
|
+
updatedAt: z.ZodDate;
|
|
261
|
+
tierId: z.ZodNumber;
|
|
262
|
+
firstName: z.ZodString;
|
|
263
|
+
lastName: z.ZodString;
|
|
264
|
+
phone: z.ZodString;
|
|
265
|
+
photoUrl: z.ZodOptional<z.ZodString>;
|
|
266
|
+
isOnboardingCompleted: z.ZodBoolean;
|
|
267
|
+
userRoleId: z.ZodNumber;
|
|
268
|
+
stripeCustomerId: z.ZodOptional<z.ZodString>;
|
|
269
|
+
onboardingStep: z.ZodNumber;
|
|
270
|
+
onboardingType: z.ZodNativeEnum<typeof import("../..").OnboardingType>;
|
|
271
|
+
}, "strip", z.ZodTypeAny, {
|
|
270
272
|
name: string;
|
|
271
273
|
id: string;
|
|
272
274
|
email: string;
|
|
@@ -299,66 +301,66 @@ export declare const ChatThreadSchema: import("zod").ZodObject<{
|
|
|
299
301
|
photoUrl?: string | undefined;
|
|
300
302
|
stripeCustomerId?: string | undefined;
|
|
301
303
|
}>, "many">>;
|
|
302
|
-
type:
|
|
303
|
-
source:
|
|
304
|
-
externalThreadId:
|
|
305
|
-
externalSource:
|
|
306
|
-
title:
|
|
307
|
-
seenBy:
|
|
308
|
-
isImportant:
|
|
309
|
-
needsAttention:
|
|
310
|
-
needsAttentionMap:
|
|
311
|
-
propertyId:
|
|
312
|
-
tags:
|
|
313
|
-
reservation:
|
|
314
|
-
id:
|
|
315
|
-
status:
|
|
316
|
-
currency:
|
|
317
|
-
amount:
|
|
318
|
-
createdAt:
|
|
319
|
-
updatedAt:
|
|
320
|
-
otaName:
|
|
321
|
-
channelId:
|
|
322
|
-
propertyId:
|
|
323
|
-
channexPropertyId:
|
|
324
|
-
children:
|
|
325
|
-
adults:
|
|
326
|
-
channexId:
|
|
327
|
-
checkIn:
|
|
328
|
-
checkOut:
|
|
329
|
-
notes:
|
|
330
|
-
refNumber:
|
|
331
|
-
paymentType:
|
|
332
|
-
otaCommission:
|
|
333
|
-
checkedInMark:
|
|
334
|
-
checkedOutMark:
|
|
335
|
-
threadId:
|
|
336
|
-
paymentLink:
|
|
304
|
+
type: z.ZodUnion<[z.ZodLiteral<"ONE_TO_ONE">, z.ZodLiteral<"GROUP">]>;
|
|
305
|
+
source: z.ZodOptional<z.ZodString>;
|
|
306
|
+
externalThreadId: z.ZodOptional<z.ZodString>;
|
|
307
|
+
externalSource: z.ZodOptional<z.ZodString>;
|
|
308
|
+
title: z.ZodOptional<z.ZodString>;
|
|
309
|
+
seenBy: z.ZodRecord<z.ZodString, z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>>;
|
|
310
|
+
isImportant: z.ZodOptional<z.ZodBoolean>;
|
|
311
|
+
needsAttention: z.ZodArray<z.ZodString, "many">;
|
|
312
|
+
needsAttentionMap: z.ZodRecord<z.ZodString, z.ZodBoolean>;
|
|
313
|
+
propertyId: z.ZodOptional<z.ZodNumber>;
|
|
314
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
315
|
+
reservation: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<Pick<{
|
|
316
|
+
id: z.ZodNumber;
|
|
317
|
+
status: z.ZodEnum<["CONFIRMED", "CANCELLED", "PENDING"]>;
|
|
318
|
+
currency: z.ZodString;
|
|
319
|
+
amount: z.ZodString;
|
|
320
|
+
createdAt: z.ZodDate;
|
|
321
|
+
updatedAt: z.ZodDate;
|
|
322
|
+
otaName: z.ZodString;
|
|
323
|
+
channelId: z.ZodString;
|
|
324
|
+
propertyId: z.ZodNumber;
|
|
325
|
+
channexPropertyId: z.ZodString;
|
|
326
|
+
children: z.ZodNumber;
|
|
327
|
+
adults: z.ZodNumber;
|
|
328
|
+
channexId: z.ZodString;
|
|
329
|
+
checkIn: z.ZodDate;
|
|
330
|
+
checkOut: z.ZodDate;
|
|
331
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
332
|
+
refNumber: z.ZodString;
|
|
333
|
+
paymentType: z.ZodString;
|
|
334
|
+
otaCommission: z.ZodString;
|
|
335
|
+
checkedInMark: z.ZodOptional<z.ZodDate>;
|
|
336
|
+
checkedOutMark: z.ZodOptional<z.ZodDate>;
|
|
337
|
+
threadId: z.ZodOptional<z.ZodString>;
|
|
338
|
+
paymentLink: z.ZodOptional<z.ZodString>;
|
|
337
339
|
}, "id" | "status" | "otaName" | "propertyId" | "checkIn" | "checkOut">, {
|
|
338
|
-
propertyNickname:
|
|
339
|
-
property:
|
|
340
|
-
id:
|
|
341
|
-
title:
|
|
342
|
-
description:
|
|
343
|
-
nickname:
|
|
344
|
-
createdAt:
|
|
345
|
-
updatedAt:
|
|
346
|
-
userId:
|
|
347
|
-
propertyType:
|
|
348
|
-
listingType:
|
|
349
|
-
bedrooms:
|
|
350
|
-
bathrooms:
|
|
351
|
-
capacity:
|
|
352
|
-
beds:
|
|
353
|
-
checkInTime:
|
|
354
|
-
checkOutTime:
|
|
355
|
-
channexId:
|
|
356
|
-
hububbId:
|
|
357
|
-
channexRoomTypeId:
|
|
358
|
-
minimumNights:
|
|
359
|
-
maximumNights:
|
|
360
|
-
area:
|
|
361
|
-
}, "strip",
|
|
340
|
+
propertyNickname: z.ZodOptional<z.ZodString>;
|
|
341
|
+
property: z.ZodOptional<z.ZodObject<{
|
|
342
|
+
id: z.ZodNumber;
|
|
343
|
+
title: z.ZodString;
|
|
344
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
345
|
+
nickname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
346
|
+
createdAt: z.ZodDate;
|
|
347
|
+
updatedAt: z.ZodDate;
|
|
348
|
+
userId: z.ZodString;
|
|
349
|
+
propertyType: z.ZodEnum<["HOUSE", "APARTMENT", "STUDIO", "HOTEL", "VILLA", "APARTMENT_BLOCK"]>;
|
|
350
|
+
listingType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
351
|
+
bedrooms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
352
|
+
bathrooms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
353
|
+
capacity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
354
|
+
beds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
355
|
+
checkInTime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
356
|
+
checkOutTime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
357
|
+
channexId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
358
|
+
hububbId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
359
|
+
channexRoomTypeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
360
|
+
minimumNights: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
361
|
+
maximumNights: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
362
|
+
area: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
363
|
+
}, "strip", z.ZodTypeAny, {
|
|
362
364
|
id: number;
|
|
363
365
|
title: string;
|
|
364
366
|
createdAt: Date;
|
|
@@ -403,7 +405,7 @@ export declare const ChatThreadSchema: import("zod").ZodObject<{
|
|
|
403
405
|
minimumNights?: number | null | undefined;
|
|
404
406
|
maximumNights?: number | null | undefined;
|
|
405
407
|
}>>;
|
|
406
|
-
}>, "strip",
|
|
408
|
+
}>, "strip", z.ZodTypeAny, {
|
|
407
409
|
id: number;
|
|
408
410
|
status: "PENDING" | "CONFIRMED" | "CANCELLED";
|
|
409
411
|
otaName: string;
|
|
@@ -466,15 +468,15 @@ export declare const ChatThreadSchema: import("zod").ZodObject<{
|
|
|
466
468
|
} | undefined;
|
|
467
469
|
propertyNickname?: string | undefined;
|
|
468
470
|
}>>;
|
|
469
|
-
isInquiryThread:
|
|
470
|
-
whatsappTemplateSent:
|
|
471
|
-
whatsappUserReplied:
|
|
472
|
-
}, "strip",
|
|
471
|
+
isInquiryThread: z.ZodOptional<z.ZodBoolean>;
|
|
472
|
+
whatsappTemplateSent: z.ZodOptional<z.ZodBoolean>;
|
|
473
|
+
whatsappUserReplied: z.ZodOptional<z.ZodBoolean>;
|
|
474
|
+
}, "strip", z.ZodTypeAny, {
|
|
473
475
|
type: "ONE_TO_ONE" | "GROUP";
|
|
474
|
-
createdAt:
|
|
475
|
-
updatedAt:
|
|
476
|
+
createdAt: Timestamp;
|
|
477
|
+
updatedAt: Timestamp;
|
|
476
478
|
participantIds: string[];
|
|
477
|
-
seenBy: Record<string,
|
|
479
|
+
seenBy: Record<string, Timestamp>;
|
|
478
480
|
needsAttention: string[];
|
|
479
481
|
needsAttentionMap: Record<string, boolean>;
|
|
480
482
|
id?: string | undefined;
|
|
@@ -484,11 +486,11 @@ export declare const ChatThreadSchema: import("zod").ZodObject<{
|
|
|
484
486
|
lastMessage?: {
|
|
485
487
|
id: string;
|
|
486
488
|
body: string;
|
|
487
|
-
createdAt:
|
|
489
|
+
createdAt: Timestamp;
|
|
488
490
|
threadId: string;
|
|
489
491
|
authorId: string;
|
|
490
492
|
contentType: string;
|
|
491
|
-
seen: Record<string,
|
|
493
|
+
seen: Record<string, Timestamp>;
|
|
492
494
|
type?: "message" | "note" | "whatsapp-message" | undefined;
|
|
493
495
|
source?: string | undefined;
|
|
494
496
|
attachments?: string[] | undefined;
|
|
@@ -509,7 +511,7 @@ export declare const ChatThreadSchema: import("zod").ZodObject<{
|
|
|
509
511
|
photoUrl?: string | undefined;
|
|
510
512
|
stripeCustomerId?: string | undefined;
|
|
511
513
|
} | undefined;
|
|
512
|
-
lastSeen?:
|
|
514
|
+
lastSeen?: Timestamp | undefined;
|
|
513
515
|
externalMessageId?: string | undefined;
|
|
514
516
|
} | undefined;
|
|
515
517
|
participants?: {
|
|
@@ -570,10 +572,10 @@ export declare const ChatThreadSchema: import("zod").ZodObject<{
|
|
|
570
572
|
whatsappUserReplied?: boolean | undefined;
|
|
571
573
|
}, {
|
|
572
574
|
type: "ONE_TO_ONE" | "GROUP";
|
|
573
|
-
createdAt:
|
|
574
|
-
updatedAt:
|
|
575
|
+
createdAt: Timestamp;
|
|
576
|
+
updatedAt: Timestamp;
|
|
575
577
|
participantIds: string[];
|
|
576
|
-
seenBy: Record<string,
|
|
578
|
+
seenBy: Record<string, Timestamp>;
|
|
577
579
|
needsAttention: string[];
|
|
578
580
|
needsAttentionMap: Record<string, boolean>;
|
|
579
581
|
id?: string | undefined;
|
|
@@ -583,11 +585,11 @@ export declare const ChatThreadSchema: import("zod").ZodObject<{
|
|
|
583
585
|
lastMessage?: {
|
|
584
586
|
id: string;
|
|
585
587
|
body: string;
|
|
586
|
-
createdAt:
|
|
588
|
+
createdAt: Timestamp;
|
|
587
589
|
threadId: string;
|
|
588
590
|
authorId: string;
|
|
589
591
|
contentType: string;
|
|
590
|
-
seen: Record<string,
|
|
592
|
+
seen: Record<string, Timestamp>;
|
|
591
593
|
type?: "message" | "note" | "whatsapp-message" | undefined;
|
|
592
594
|
source?: string | undefined;
|
|
593
595
|
attachments?: string[] | undefined;
|
|
@@ -608,7 +610,7 @@ export declare const ChatThreadSchema: import("zod").ZodObject<{
|
|
|
608
610
|
photoUrl?: string | undefined;
|
|
609
611
|
stripeCustomerId?: string | undefined;
|
|
610
612
|
} | undefined;
|
|
611
|
-
lastSeen?:
|
|
613
|
+
lastSeen?: Timestamp | undefined;
|
|
612
614
|
externalMessageId?: string | undefined;
|
|
613
615
|
} | undefined;
|
|
614
616
|
participants?: {
|
|
@@ -668,20 +670,20 @@ export declare const ChatThreadSchema: import("zod").ZodObject<{
|
|
|
668
670
|
whatsappTemplateSent?: boolean | undefined;
|
|
669
671
|
whatsappUserReplied?: boolean | undefined;
|
|
670
672
|
}>;
|
|
671
|
-
export declare const MessageAutomationTemplateSchema:
|
|
672
|
-
id:
|
|
673
|
-
name:
|
|
674
|
-
createdAt:
|
|
675
|
-
message:
|
|
676
|
-
action:
|
|
677
|
-
minutesAfterBookingConfirmed:
|
|
678
|
-
daysAfterAction:
|
|
679
|
-
timeForDayAfterAction:
|
|
680
|
-
}, "strip",
|
|
673
|
+
export declare const MessageAutomationTemplateSchema: z.ZodObject<{
|
|
674
|
+
id: z.ZodOptional<z.ZodString>;
|
|
675
|
+
name: z.ZodString;
|
|
676
|
+
createdAt: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>;
|
|
677
|
+
message: z.ZodString;
|
|
678
|
+
action: z.ZodUnion<[z.ZodLiteral<"booking-confirmed">, z.ZodLiteral<"check-in">, z.ZodLiteral<"check-out">]>;
|
|
679
|
+
minutesAfterBookingConfirmed: z.ZodOptional<z.ZodNumber>;
|
|
680
|
+
daysAfterAction: z.ZodOptional<z.ZodNumber>;
|
|
681
|
+
timeForDayAfterAction: z.ZodOptional<z.ZodNumber>;
|
|
682
|
+
}, "strip", z.ZodTypeAny, {
|
|
681
683
|
name: string;
|
|
682
684
|
message: string;
|
|
683
685
|
action: "booking-confirmed" | "check-in" | "check-out";
|
|
684
|
-
createdAt:
|
|
686
|
+
createdAt: Timestamp;
|
|
685
687
|
id?: string | undefined;
|
|
686
688
|
minutesAfterBookingConfirmed?: number | undefined;
|
|
687
689
|
daysAfterAction?: number | undefined;
|
|
@@ -690,25 +692,25 @@ export declare const MessageAutomationTemplateSchema: import("zod").ZodObject<{
|
|
|
690
692
|
name: string;
|
|
691
693
|
message: string;
|
|
692
694
|
action: "booking-confirmed" | "check-in" | "check-out";
|
|
693
|
-
createdAt:
|
|
695
|
+
createdAt: Timestamp;
|
|
694
696
|
id?: string | undefined;
|
|
695
697
|
minutesAfterBookingConfirmed?: number | undefined;
|
|
696
698
|
daysAfterAction?: number | undefined;
|
|
697
699
|
timeForDayAfterAction?: number | undefined;
|
|
698
700
|
}>;
|
|
699
|
-
export declare const SavedReplySchema:
|
|
700
|
-
id:
|
|
701
|
-
name:
|
|
702
|
-
createdAt:
|
|
703
|
-
message:
|
|
704
|
-
}, "strip",
|
|
701
|
+
export declare const SavedReplySchema: z.ZodObject<{
|
|
702
|
+
id: z.ZodOptional<z.ZodString>;
|
|
703
|
+
name: z.ZodString;
|
|
704
|
+
createdAt: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>;
|
|
705
|
+
message: z.ZodString;
|
|
706
|
+
}, "strip", z.ZodTypeAny, {
|
|
705
707
|
name: string;
|
|
706
708
|
message: string;
|
|
707
|
-
createdAt:
|
|
709
|
+
createdAt: Timestamp;
|
|
708
710
|
id?: string | undefined;
|
|
709
711
|
}, {
|
|
710
712
|
name: string;
|
|
711
713
|
message: string;
|
|
712
|
-
createdAt:
|
|
714
|
+
createdAt: Timestamp;
|
|
713
715
|
id?: string | undefined;
|
|
714
716
|
}>;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SavedReplySchema = exports.MessageAutomationTemplateSchema = exports.ChatThreadSchema = exports.ChatMessageSchema = exports.ChatMessageTypeSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const helpers_1 = require("../../helpers");
|
|
6
5
|
const user_1 = require("../user");
|
|
7
6
|
const reservation_1 = require("../reservation");
|
|
8
7
|
const property_1 = require("../property");
|
|
9
|
-
const
|
|
8
|
+
const firestore_types_1 = require("@firebase/firestore-types");
|
|
9
|
+
const SeenBySchema = (0, zod_1.record)((0, zod_1.string)(), zod_1.z.instanceof(firestore_types_1.Timestamp));
|
|
10
10
|
exports.ChatMessageTypeSchema = (0, zod_1.union)([
|
|
11
11
|
(0, zod_1.literal)("message"),
|
|
12
12
|
(0, zod_1.literal)("note"),
|
|
@@ -14,14 +14,14 @@ exports.ChatMessageTypeSchema = (0, zod_1.union)([
|
|
|
14
14
|
]);
|
|
15
15
|
exports.ChatMessageSchema = (0, zod_1.object)({
|
|
16
16
|
id: (0, zod_1.string)(),
|
|
17
|
-
createdAt:
|
|
17
|
+
createdAt: zod_1.z.instanceof(firestore_types_1.Timestamp),
|
|
18
18
|
threadId: (0, zod_1.string)(),
|
|
19
19
|
authorId: (0, zod_1.string)(),
|
|
20
20
|
author: (0, zod_1.optional)(user_1.userSchema),
|
|
21
21
|
contentType: (0, zod_1.string)(),
|
|
22
22
|
body: (0, zod_1.string)(),
|
|
23
23
|
seen: SeenBySchema,
|
|
24
|
-
lastSeen: (0, zod_1.optional)(
|
|
24
|
+
lastSeen: (0, zod_1.optional)(zod_1.z.instanceof(firestore_types_1.Timestamp)),
|
|
25
25
|
source: (0, zod_1.optional)((0, zod_1.string)()),
|
|
26
26
|
externalMessageId: (0, zod_1.optional)((0, zod_1.string)()),
|
|
27
27
|
attachments: (0, zod_1.optional)((0, zod_1.array)((0, zod_1.string)())),
|
|
@@ -29,8 +29,8 @@ exports.ChatMessageSchema = (0, zod_1.object)({
|
|
|
29
29
|
});
|
|
30
30
|
exports.ChatThreadSchema = (0, zod_1.object)({
|
|
31
31
|
id: (0, zod_1.optional)((0, zod_1.string)()),
|
|
32
|
-
createdAt:
|
|
33
|
-
updatedAt:
|
|
32
|
+
createdAt: zod_1.z.instanceof(firestore_types_1.Timestamp),
|
|
33
|
+
updatedAt: zod_1.z.instanceof(firestore_types_1.Timestamp),
|
|
34
34
|
lastMessage: (0, zod_1.optional)(exports.ChatMessageSchema),
|
|
35
35
|
participantIds: (0, zod_1.array)((0, zod_1.string)()),
|
|
36
36
|
participants: (0, zod_1.optional)((0, zod_1.array)(user_1.userSchema)),
|
|
@@ -39,7 +39,7 @@ exports.ChatThreadSchema = (0, zod_1.object)({
|
|
|
39
39
|
externalThreadId: (0, zod_1.optional)((0, zod_1.string)()),
|
|
40
40
|
externalSource: (0, zod_1.optional)((0, zod_1.string)()),
|
|
41
41
|
title: (0, zod_1.optional)((0, zod_1.string)()),
|
|
42
|
-
seenBy: (0, zod_1.record)((0, zod_1.string)(),
|
|
42
|
+
seenBy: (0, zod_1.record)((0, zod_1.string)(), zod_1.z.instanceof(firestore_types_1.Timestamp)),
|
|
43
43
|
isImportant: (0, zod_1.optional)((0, zod_1.boolean)()),
|
|
44
44
|
needsAttention: (0, zod_1.array)((0, zod_1.string)()),
|
|
45
45
|
needsAttentionMap: (0, zod_1.record)((0, zod_1.string)(), (0, zod_1.boolean)()),
|
|
@@ -63,7 +63,7 @@ exports.ChatThreadSchema = (0, zod_1.object)({
|
|
|
63
63
|
exports.MessageAutomationTemplateSchema = (0, zod_1.object)({
|
|
64
64
|
id: (0, zod_1.optional)((0, zod_1.string)()),
|
|
65
65
|
name: (0, zod_1.string)(),
|
|
66
|
-
createdAt:
|
|
66
|
+
createdAt: zod_1.z.instanceof(firestore_types_1.Timestamp),
|
|
67
67
|
message: (0, zod_1.string)(),
|
|
68
68
|
action: (0, zod_1.union)([
|
|
69
69
|
(0, zod_1.literal)("booking-confirmed"),
|
|
@@ -77,6 +77,6 @@ exports.MessageAutomationTemplateSchema = (0, zod_1.object)({
|
|
|
77
77
|
exports.SavedReplySchema = (0, zod_1.object)({
|
|
78
78
|
id: (0, zod_1.optional)((0, zod_1.string)()),
|
|
79
79
|
name: (0, zod_1.string)(),
|
|
80
|
-
createdAt:
|
|
80
|
+
createdAt: zod_1.z.instanceof(firestore_types_1.Timestamp),
|
|
81
81
|
message: (0, zod_1.string)(),
|
|
82
82
|
});
|