hububb-saas-shared 1.0.64 → 1.0.66

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,6 +1,7 @@
1
1
  export declare enum ServiceType {
2
- ON_DEMAND = "FULL",
3
- SUBSCRIPTION = "PRORATED"
2
+ INTEGRATION = "INTEGRATION",
3
+ ON_DEMAND = "ON_DEMAND",
4
+ RECURRING = "RECURRING"
4
5
  }
5
6
  export declare enum TaskStatus {
6
7
  PENDING = "PENDING",
@@ -3,8 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SubscriptionStatus = exports.PurchaseStatus = exports.PriceType = exports.InvoiceStatus = exports.InvoiceType = exports.TaskPriority = exports.TaskStatus = exports.ServiceType = void 0;
4
4
  var ServiceType;
5
5
  (function (ServiceType) {
6
- ServiceType["ON_DEMAND"] = "FULL";
7
- ServiceType["SUBSCRIPTION"] = "PRORATED";
6
+ ServiceType["INTEGRATION"] = "INTEGRATION";
7
+ ServiceType["ON_DEMAND"] = "ON_DEMAND";
8
+ ServiceType["RECURRING"] = "RECURRING";
8
9
  })(ServiceType || (exports.ServiceType = ServiceType = {}));
9
10
  var TaskStatus;
10
11
  (function (TaskStatus) {
@@ -1,9 +1,9 @@
1
1
  import { z } from "zod";
2
- import { Timestamp } from "@firebase/firestore-types";
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<{
@@ -21,7 +21,7 @@ export declare const ChatMessageSchema: z.ZodObject<{
21
21
  userRoleId: z.ZodNumber;
22
22
  stripeCustomerId: z.ZodOptional<z.ZodString>;
23
23
  onboardingStep: z.ZodNumber;
24
- onboardingType: z.ZodNativeEnum<typeof import("../..").OnboardingType>;
24
+ onboardingType: z.ZodUnion<[z.ZodLiteral<"AIRBNB_CONNECT">, z.ZodLiteral<"MANUAL_LISTING">]>;
25
25
  }, "strip", z.ZodTypeAny, {
26
26
  name: string;
27
27
  id: string;
@@ -35,7 +35,7 @@ export declare const ChatMessageSchema: z.ZodObject<{
35
35
  isOnboardingCompleted: boolean;
36
36
  userRoleId: number;
37
37
  onboardingStep: number;
38
- onboardingType: import("../..").OnboardingType;
38
+ onboardingType: "AIRBNB_CONNECT" | "MANUAL_LISTING";
39
39
  photoUrl?: string | undefined;
40
40
  stripeCustomerId?: string | undefined;
41
41
  }, {
@@ -51,14 +51,14 @@ export declare const ChatMessageSchema: z.ZodObject<{
51
51
  isOnboardingCompleted: boolean;
52
52
  userRoleId: number;
53
53
  onboardingStep: number;
54
- onboardingType: import("../..").OnboardingType;
54
+ onboardingType: "AIRBNB_CONNECT" | "MANUAL_LISTING";
55
55
  photoUrl?: string | undefined;
56
56
  stripeCustomerId?: string | undefined;
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
- seen: Record<string, Timestamp>;
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;
@@ -87,20 +87,20 @@ export declare const ChatMessageSchema: z.ZodObject<{
87
87
  isOnboardingCompleted: boolean;
88
88
  userRoleId: number;
89
89
  onboardingStep: number;
90
- onboardingType: import("../..").OnboardingType;
90
+ onboardingType: "AIRBNB_CONNECT" | "MANUAL_LISTING";
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
- seen: Record<string, Timestamp>;
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;
@@ -117,20 +117,20 @@ export declare const ChatMessageSchema: z.ZodObject<{
117
117
  isOnboardingCompleted: boolean;
118
118
  userRoleId: number;
119
119
  onboardingStep: number;
120
- onboardingType: import("../..").OnboardingType;
120
+ onboardingType: "AIRBNB_CONNECT" | "MANUAL_LISTING";
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<{
@@ -148,7 +148,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
148
148
  userRoleId: z.ZodNumber;
149
149
  stripeCustomerId: z.ZodOptional<z.ZodString>;
150
150
  onboardingStep: z.ZodNumber;
151
- onboardingType: z.ZodNativeEnum<typeof import("../..").OnboardingType>;
151
+ onboardingType: z.ZodUnion<[z.ZodLiteral<"AIRBNB_CONNECT">, z.ZodLiteral<"MANUAL_LISTING">]>;
152
152
  }, "strip", z.ZodTypeAny, {
153
153
  name: string;
154
154
  id: string;
@@ -162,7 +162,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
162
162
  isOnboardingCompleted: boolean;
163
163
  userRoleId: number;
164
164
  onboardingStep: number;
165
- onboardingType: import("../..").OnboardingType;
165
+ onboardingType: "AIRBNB_CONNECT" | "MANUAL_LISTING";
166
166
  photoUrl?: string | undefined;
167
167
  stripeCustomerId?: string | undefined;
168
168
  }, {
@@ -178,14 +178,14 @@ export declare const ChatThreadSchema: z.ZodObject<{
178
178
  isOnboardingCompleted: boolean;
179
179
  userRoleId: number;
180
180
  onboardingStep: number;
181
- onboardingType: import("../..").OnboardingType;
181
+ onboardingType: "AIRBNB_CONNECT" | "MANUAL_LISTING";
182
182
  photoUrl?: string | undefined;
183
183
  stripeCustomerId?: string | undefined;
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
- seen: Record<string, Timestamp>;
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;
@@ -214,20 +214,20 @@ export declare const ChatThreadSchema: z.ZodObject<{
214
214
  isOnboardingCompleted: boolean;
215
215
  userRoleId: number;
216
216
  onboardingStep: number;
217
- onboardingType: import("../..").OnboardingType;
217
+ onboardingType: "AIRBNB_CONNECT" | "MANUAL_LISTING";
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
- seen: Record<string, Timestamp>;
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;
@@ -244,11 +244,11 @@ export declare const ChatThreadSchema: z.ZodObject<{
244
244
  isOnboardingCompleted: boolean;
245
245
  userRoleId: number;
246
246
  onboardingStep: number;
247
- onboardingType: import("../..").OnboardingType;
247
+ onboardingType: "AIRBNB_CONNECT" | "MANUAL_LISTING";
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">;
@@ -267,7 +267,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
267
267
  userRoleId: z.ZodNumber;
268
268
  stripeCustomerId: z.ZodOptional<z.ZodString>;
269
269
  onboardingStep: z.ZodNumber;
270
- onboardingType: z.ZodNativeEnum<typeof import("../..").OnboardingType>;
270
+ onboardingType: z.ZodUnion<[z.ZodLiteral<"AIRBNB_CONNECT">, z.ZodLiteral<"MANUAL_LISTING">]>;
271
271
  }, "strip", z.ZodTypeAny, {
272
272
  name: string;
273
273
  id: string;
@@ -281,7 +281,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
281
281
  isOnboardingCompleted: boolean;
282
282
  userRoleId: number;
283
283
  onboardingStep: number;
284
- onboardingType: import("../..").OnboardingType;
284
+ onboardingType: "AIRBNB_CONNECT" | "MANUAL_LISTING";
285
285
  photoUrl?: string | undefined;
286
286
  stripeCustomerId?: string | undefined;
287
287
  }, {
@@ -297,7 +297,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
297
297
  isOnboardingCompleted: boolean;
298
298
  userRoleId: number;
299
299
  onboardingStep: number;
300
- onboardingType: import("../..").OnboardingType;
300
+ onboardingType: "AIRBNB_CONNECT" | "MANUAL_LISTING";
301
301
  photoUrl?: string | undefined;
302
302
  stripeCustomerId?: string | undefined;
303
303
  }>, "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
- seen: Record<string, Timestamp>;
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;
@@ -507,11 +507,11 @@ export declare const ChatThreadSchema: z.ZodObject<{
507
507
  isOnboardingCompleted: boolean;
508
508
  userRoleId: number;
509
509
  onboardingStep: number;
510
- onboardingType: import("../..").OnboardingType;
510
+ onboardingType: "AIRBNB_CONNECT" | "MANUAL_LISTING";
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?: {
@@ -527,7 +527,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
527
527
  isOnboardingCompleted: boolean;
528
528
  userRoleId: number;
529
529
  onboardingStep: number;
530
- onboardingType: import("../..").OnboardingType;
530
+ onboardingType: "AIRBNB_CONNECT" | "MANUAL_LISTING";
531
531
  photoUrl?: string | undefined;
532
532
  stripeCustomerId?: string | undefined;
533
533
  }[] | undefined;
@@ -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
- seen: Record<string, Timestamp>;
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;
@@ -606,11 +606,11 @@ export declare const ChatThreadSchema: z.ZodObject<{
606
606
  isOnboardingCompleted: boolean;
607
607
  userRoleId: number;
608
608
  onboardingStep: number;
609
- onboardingType: import("../..").OnboardingType;
609
+ onboardingType: "AIRBNB_CONNECT" | "MANUAL_LISTING";
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?: {
@@ -626,7 +626,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
626
626
  isOnboardingCompleted: boolean;
627
627
  userRoleId: number;
628
628
  onboardingStep: number;
629
- onboardingType: import("../..").OnboardingType;
629
+ onboardingType: "AIRBNB_CONNECT" | "MANUAL_LISTING";
630
630
  photoUrl?: string | undefined;
631
631
  stripeCustomerId?: string | undefined;
632
632
  }[] | undefined;
@@ -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
- 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));
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(firestore_types_1.Timestamp),
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(firestore_types_1.Timestamp)),
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(firestore_types_1.Timestamp),
33
- updatedAt: zod_1.z.instanceof(firestore_types_1.Timestamp),
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(firestore_types_1.Timestamp)),
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(firestore_types_1.Timestamp),
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(firestore_types_1.Timestamp),
114
+ createdAt: zod_1.z.instanceof(admin.firestore.Timestamp),
81
115
  message: (0, zod_1.string)(),
82
116
  });
@@ -1,4 +1,3 @@
1
- import { OnboardingType } from "../../types";
2
1
  export declare const userSchema: import("zod").ZodObject<{
3
2
  id: import("zod").ZodString;
4
3
  name: import("zod").ZodString;
@@ -14,7 +13,7 @@ export declare const userSchema: import("zod").ZodObject<{
14
13
  userRoleId: import("zod").ZodNumber;
15
14
  stripeCustomerId: import("zod").ZodOptional<import("zod").ZodString>;
16
15
  onboardingStep: import("zod").ZodNumber;
17
- onboardingType: import("zod").ZodNativeEnum<typeof OnboardingType>;
16
+ onboardingType: import("zod").ZodUnion<[import("zod").ZodLiteral<"AIRBNB_CONNECT">, import("zod").ZodLiteral<"MANUAL_LISTING">]>;
18
17
  }, "strip", import("zod").ZodTypeAny, {
19
18
  name: string;
20
19
  id: string;
@@ -28,7 +27,7 @@ export declare const userSchema: import("zod").ZodObject<{
28
27
  isOnboardingCompleted: boolean;
29
28
  userRoleId: number;
30
29
  onboardingStep: number;
31
- onboardingType: OnboardingType;
30
+ onboardingType: "AIRBNB_CONNECT" | "MANUAL_LISTING";
32
31
  photoUrl?: string | undefined;
33
32
  stripeCustomerId?: string | undefined;
34
33
  }, {
@@ -44,7 +43,7 @@ export declare const userSchema: import("zod").ZodObject<{
44
43
  isOnboardingCompleted: boolean;
45
44
  userRoleId: number;
46
45
  onboardingStep: number;
47
- onboardingType: OnboardingType;
46
+ onboardingType: "AIRBNB_CONNECT" | "MANUAL_LISTING";
48
47
  photoUrl?: string | undefined;
49
48
  stripeCustomerId?: string | undefined;
50
49
  }>;
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.userSchema = void 0;
4
4
  const zod_1 = require("zod");
5
- const types_1 = require("../../types");
6
5
  exports.userSchema = (0, zod_1.object)({
7
6
  id: (0, zod_1.string)(),
8
7
  name: (0, zod_1.string)(),
@@ -18,5 +17,5 @@ exports.userSchema = (0, zod_1.object)({
18
17
  userRoleId: (0, zod_1.number)(),
19
18
  stripeCustomerId: (0, zod_1.string)().optional(),
20
19
  onboardingStep: (0, zod_1.number)(),
21
- onboardingType: (0, zod_1.nativeEnum)(types_1.OnboardingType),
20
+ onboardingType: (0, zod_1.union)([(0, zod_1.literal)("AIRBNB_CONNECT"), (0, zod_1.literal)("MANUAL_LISTING")]),
22
21
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "commonjs",
3
3
  "name": "hububb-saas-shared",
4
- "version": "1.0.64",
4
+ "version": "1.0.66",
5
5
  "description": "This is a shared package for the hububb saas project",
6
6
  "types": "./dist/index.d.ts",
7
7
  "main": "./dist/index.js",