hububb-models 1.1.8 → 1.1.10
Sign up to get free protection for your applications and to get access to all the features.
package/dist/models/thread.d.ts
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
import { z } from "zod";
|
2
|
-
import { ChatMessageSchema, ChatThreadSchema, MessageAutomationTemplateSchema } from "../schemas/thread";
|
2
|
+
import { ChatMessageSchema, ChatMessageTypeSchema, ChatThreadSchema, MessageAutomationTemplateSchema, SavedReplySchema } from "../schemas/thread";
|
3
3
|
export type ChatMessage = z.infer<typeof ChatMessageSchema>;
|
4
4
|
export type ChatThread = z.infer<typeof ChatThreadSchema>;
|
5
5
|
export type MessageAutomationTemplate = z.infer<typeof MessageAutomationTemplateSchema>;
|
6
|
+
export type ChatMessageType = z.infer<typeof ChatMessageTypeSchema>;
|
7
|
+
export type SavedReply = z.infer<typeof SavedReplySchema>;
|
@@ -14,9 +14,9 @@ export declare const calendarEntrySchema: import("zod").ZodObject<{
|
|
14
14
|
status: string;
|
15
15
|
currency: string;
|
16
16
|
date: string;
|
17
|
+
note: string | null;
|
17
18
|
price: number;
|
18
19
|
base_price: number;
|
19
|
-
note: string | null;
|
20
20
|
reservation_id: number | null;
|
21
21
|
listing_id: string;
|
22
22
|
auto_pricing: number;
|
@@ -25,9 +25,9 @@ export declare const calendarEntrySchema: import("zod").ZodObject<{
|
|
25
25
|
status: string;
|
26
26
|
currency: string;
|
27
27
|
date: string;
|
28
|
+
note: string | null;
|
28
29
|
price: number;
|
29
30
|
base_price: number;
|
30
|
-
note: string | null;
|
31
31
|
reservation_id: number | null;
|
32
32
|
listing_id: string;
|
33
33
|
auto_pricing: number;
|
@@ -48,9 +48,9 @@ export declare const calendarSchema: import("zod").ZodArray<import("zod").ZodObj
|
|
48
48
|
status: string;
|
49
49
|
currency: string;
|
50
50
|
date: string;
|
51
|
+
note: string | null;
|
51
52
|
price: number;
|
52
53
|
base_price: number;
|
53
|
-
note: string | null;
|
54
54
|
reservation_id: number | null;
|
55
55
|
listing_id: string;
|
56
56
|
auto_pricing: number;
|
@@ -59,9 +59,9 @@ export declare const calendarSchema: import("zod").ZodArray<import("zod").ZodObj
|
|
59
59
|
status: string;
|
60
60
|
currency: string;
|
61
61
|
date: string;
|
62
|
+
note: string | null;
|
62
63
|
price: number;
|
63
64
|
base_price: number;
|
64
|
-
note: string | null;
|
65
65
|
reservation_id: number | null;
|
66
66
|
listing_id: string;
|
67
67
|
auto_pricing: number;
|
package/dist/schemas/thread.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
export declare const ChatMessageTypeSchema: import("zod").ZodUnion<[import("zod").ZodLiteral<"message">, import("zod").ZodLiteral<"note">]>;
|
1
2
|
export declare const ChatMessageSchema: import("zod").ZodObject<{
|
2
3
|
id: import("zod").ZodString;
|
3
4
|
createdAt: import("zod").ZodType<import("@firebase/firestore-types").Timestamp, import("zod").ZodTypeDef, import("@firebase/firestore-types").Timestamp>;
|
@@ -164,6 +165,7 @@ export declare const ChatMessageSchema: import("zod").ZodObject<{
|
|
164
165
|
source: import("zod").ZodOptional<import("zod").ZodString>;
|
165
166
|
externalMessageId: import("zod").ZodOptional<import("zod").ZodString>;
|
166
167
|
attachments: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
168
|
+
type: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"message">, import("zod").ZodLiteral<"note">]>>;
|
167
169
|
}, "strip", import("zod").ZodTypeAny, {
|
168
170
|
id: string;
|
169
171
|
body: string;
|
@@ -172,6 +174,7 @@ export declare const ChatMessageSchema: import("zod").ZodObject<{
|
|
172
174
|
authorId: string;
|
173
175
|
contentType: string;
|
174
176
|
seen: Record<string, import("@firebase/firestore-types").Timestamp>;
|
177
|
+
type?: "message" | "note" | undefined;
|
175
178
|
source?: string | undefined;
|
176
179
|
author?: {
|
177
180
|
id: string;
|
@@ -216,6 +219,7 @@ export declare const ChatMessageSchema: import("zod").ZodObject<{
|
|
216
219
|
authorId: string;
|
217
220
|
contentType: string;
|
218
221
|
seen: Record<string, import("@firebase/firestore-types").Timestamp>;
|
222
|
+
type?: "message" | "note" | undefined;
|
219
223
|
source?: string | undefined;
|
220
224
|
author?: {
|
221
225
|
id: string;
|
@@ -423,6 +427,7 @@ export declare const ChatThreadSchema: import("zod").ZodObject<{
|
|
423
427
|
source: import("zod").ZodOptional<import("zod").ZodString>;
|
424
428
|
externalMessageId: import("zod").ZodOptional<import("zod").ZodString>;
|
425
429
|
attachments: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
430
|
+
type: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"message">, import("zod").ZodLiteral<"note">]>>;
|
426
431
|
}, "strip", import("zod").ZodTypeAny, {
|
427
432
|
id: string;
|
428
433
|
body: string;
|
@@ -431,6 +436,7 @@ export declare const ChatThreadSchema: import("zod").ZodObject<{
|
|
431
436
|
authorId: string;
|
432
437
|
contentType: string;
|
433
438
|
seen: Record<string, import("@firebase/firestore-types").Timestamp>;
|
439
|
+
type?: "message" | "note" | undefined;
|
434
440
|
source?: string | undefined;
|
435
441
|
author?: {
|
436
442
|
id: string;
|
@@ -475,6 +481,7 @@ export declare const ChatThreadSchema: import("zod").ZodObject<{
|
|
475
481
|
authorId: string;
|
476
482
|
contentType: string;
|
477
483
|
seen: Record<string, import("@firebase/firestore-types").Timestamp>;
|
484
|
+
type?: "message" | "note" | undefined;
|
478
485
|
source?: string | undefined;
|
479
486
|
author?: {
|
480
487
|
id: string;
|
@@ -696,6 +703,7 @@ export declare const ChatThreadSchema: import("zod").ZodObject<{
|
|
696
703
|
authorId: string;
|
697
704
|
contentType: string;
|
698
705
|
seen: Record<string, import("@firebase/firestore-types").Timestamp>;
|
706
|
+
type?: "message" | "note" | undefined;
|
699
707
|
source?: string | undefined;
|
700
708
|
author?: {
|
701
709
|
id: string;
|
@@ -788,6 +796,7 @@ export declare const ChatThreadSchema: import("zod").ZodObject<{
|
|
788
796
|
authorId: string;
|
789
797
|
contentType: string;
|
790
798
|
seen: Record<string, import("@firebase/firestore-types").Timestamp>;
|
799
|
+
type?: "message" | "note" | undefined;
|
791
800
|
source?: string | undefined;
|
792
801
|
author?: {
|
793
802
|
id: string;
|
@@ -890,3 +899,19 @@ export declare const MessageAutomationTemplateSchema: import("zod").ZodObject<{
|
|
890
899
|
daysAfterAction?: number | undefined;
|
891
900
|
timeForDayAfterAction?: number | undefined;
|
892
901
|
}>;
|
902
|
+
export declare const SavedReplySchema: import("zod").ZodObject<{
|
903
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
904
|
+
name: import("zod").ZodString;
|
905
|
+
createdAt: import("zod").ZodType<import("@firebase/firestore-types").Timestamp, import("zod").ZodTypeDef, import("@firebase/firestore-types").Timestamp>;
|
906
|
+
message: import("zod").ZodString;
|
907
|
+
}, "strip", import("zod").ZodTypeAny, {
|
908
|
+
message: string;
|
909
|
+
name: string;
|
910
|
+
createdAt: import("@firebase/firestore-types").Timestamp;
|
911
|
+
id?: string | undefined;
|
912
|
+
}, {
|
913
|
+
message: string;
|
914
|
+
name: string;
|
915
|
+
createdAt: import("@firebase/firestore-types").Timestamp;
|
916
|
+
id?: string | undefined;
|
917
|
+
}>;
|
package/dist/schemas/thread.js
CHANGED
@@ -1,10 +1,14 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.MessageAutomationTemplateSchema = exports.ChatThreadSchema = exports.ChatMessageSchema = void 0;
|
3
|
+
exports.SavedReplySchema = exports.MessageAutomationTemplateSchema = exports.ChatThreadSchema = exports.ChatMessageSchema = exports.ChatMessageTypeSchema = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
5
|
const helpers_1 = require("../helpers");
|
6
6
|
const user_1 = require("./user");
|
7
7
|
const SeenBySchema = (0, zod_1.record)((0, zod_1.string)(), helpers_1.firestoreTimestampSchema);
|
8
|
+
exports.ChatMessageTypeSchema = (0, zod_1.union)([
|
9
|
+
(0, zod_1.literal)("message"),
|
10
|
+
(0, zod_1.literal)("note"),
|
11
|
+
]);
|
8
12
|
exports.ChatMessageSchema = (0, zod_1.object)({
|
9
13
|
id: (0, zod_1.string)(),
|
10
14
|
createdAt: helpers_1.firestoreTimestampSchema,
|
@@ -18,6 +22,7 @@ exports.ChatMessageSchema = (0, zod_1.object)({
|
|
18
22
|
source: (0, zod_1.optional)((0, zod_1.string)()),
|
19
23
|
externalMessageId: (0, zod_1.optional)((0, zod_1.string)()),
|
20
24
|
attachments: (0, zod_1.optional)((0, zod_1.array)((0, zod_1.string)())),
|
25
|
+
type: (0, zod_1.optional)(exports.ChatMessageTypeSchema),
|
21
26
|
});
|
22
27
|
exports.ChatThreadSchema = (0, zod_1.object)({
|
23
28
|
id: (0, zod_1.optional)((0, zod_1.string)()),
|
@@ -51,3 +56,9 @@ exports.MessageAutomationTemplateSchema = (0, zod_1.object)({
|
|
51
56
|
daysAfterAction: (0, zod_1.optional)((0, zod_1.number)()),
|
52
57
|
timeForDayAfterAction: (0, zod_1.optional)((0, zod_1.number)()),
|
53
58
|
});
|
59
|
+
exports.SavedReplySchema = (0, zod_1.object)({
|
60
|
+
id: (0, zod_1.optional)((0, zod_1.string)()),
|
61
|
+
name: (0, zod_1.string)(),
|
62
|
+
createdAt: helpers_1.firestoreTimestampSchema,
|
63
|
+
message: (0, zod_1.string)(),
|
64
|
+
});
|