hububb-saas-shared 1.0.81 → 1.0.83

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.
@@ -251,7 +251,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
251
251
  externalMessageId?: string | undefined;
252
252
  }>>;
253
253
  participantIds: z.ZodArray<z.ZodString, "many">;
254
- participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
254
+ participants: z.ZodOptional<z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
255
255
  id: z.ZodString;
256
256
  name: z.ZodString;
257
257
  email: z.ZodString;
@@ -267,7 +267,24 @@ export declare const ChatThreadSchema: z.ZodObject<{
267
267
  stripeCustomerId: z.ZodOptional<z.ZodString>;
268
268
  onboardingStep: z.ZodNumber;
269
269
  onboardingType: z.ZodUnion<[z.ZodLiteral<"AIRBNB_CONNECT">, z.ZodLiteral<"MANUAL_LISTING">]>;
270
- }, "strip", z.ZodTypeAny, {
270
+ }, {
271
+ userRole: z.ZodObject<{
272
+ id: z.ZodNumber;
273
+ name: z.ZodString;
274
+ createdAt: z.ZodDate;
275
+ updatedAt: z.ZodDate;
276
+ }, "strip", z.ZodTypeAny, {
277
+ name: string;
278
+ id: number;
279
+ createdAt: Date;
280
+ updatedAt: Date;
281
+ }, {
282
+ name: string;
283
+ id: number;
284
+ createdAt: Date;
285
+ updatedAt: Date;
286
+ }>;
287
+ }>, "strip", z.ZodTypeAny, {
271
288
  name: string;
272
289
  id: string;
273
290
  email: string;
@@ -281,6 +298,12 @@ export declare const ChatThreadSchema: z.ZodObject<{
281
298
  userRoleId: number;
282
299
  onboardingStep: number;
283
300
  onboardingType: "AIRBNB_CONNECT" | "MANUAL_LISTING";
301
+ userRole: {
302
+ name: string;
303
+ id: number;
304
+ createdAt: Date;
305
+ updatedAt: Date;
306
+ };
284
307
  photoUrl?: string | undefined;
285
308
  stripeCustomerId?: string | undefined;
286
309
  }, {
@@ -297,6 +320,12 @@ export declare const ChatThreadSchema: z.ZodObject<{
297
320
  userRoleId: number;
298
321
  onboardingStep: number;
299
322
  onboardingType: "AIRBNB_CONNECT" | "MANUAL_LISTING";
323
+ userRole: {
324
+ name: string;
325
+ id: number;
326
+ createdAt: Date;
327
+ updatedAt: Date;
328
+ };
300
329
  photoUrl?: string | undefined;
301
330
  stripeCustomerId?: string | undefined;
302
331
  }>, "many">>;
@@ -481,6 +510,70 @@ export declare const ChatThreadSchema: z.ZodObject<{
481
510
  whatsappTemplateSent: z.ZodOptional<z.ZodBoolean>;
482
511
  whatsappUserReplied: z.ZodOptional<z.ZodBoolean>;
483
512
  lastWhatsappMessageSentAt: z.ZodOptional<z.ZodType<import("../../helpers").Timestamp, z.ZodTypeDef, import("../../helpers").Timestamp>>;
513
+ landlord: z.ZodOptional<z.ZodObject<Pick<{
514
+ id: z.ZodString;
515
+ name: z.ZodString;
516
+ email: z.ZodString;
517
+ createdAt: z.ZodDate;
518
+ updatedAt: z.ZodDate;
519
+ tierId: z.ZodNumber;
520
+ firstName: z.ZodString;
521
+ lastName: z.ZodString;
522
+ phone: z.ZodString;
523
+ photoUrl: z.ZodOptional<z.ZodString>;
524
+ isOnboardingCompleted: z.ZodBoolean;
525
+ userRoleId: z.ZodNumber;
526
+ stripeCustomerId: z.ZodOptional<z.ZodString>;
527
+ onboardingStep: z.ZodNumber;
528
+ onboardingType: z.ZodUnion<[z.ZodLiteral<"AIRBNB_CONNECT">, z.ZodLiteral<"MANUAL_LISTING">]>;
529
+ }, "name" | "id" | "email" | "firstName" | "lastName" | "phone" | "photoUrl" | "userRoleId">, "strip", z.ZodTypeAny, {
530
+ name: string;
531
+ id: string;
532
+ email: string;
533
+ firstName: string;
534
+ lastName: string;
535
+ phone: string;
536
+ userRoleId: number;
537
+ photoUrl?: string | undefined;
538
+ }, {
539
+ name: string;
540
+ id: string;
541
+ email: string;
542
+ firstName: string;
543
+ lastName: string;
544
+ phone: string;
545
+ userRoleId: number;
546
+ photoUrl?: string | undefined;
547
+ }>>;
548
+ operator: z.ZodOptional<z.ZodObject<Pick<{
549
+ id: z.ZodString;
550
+ name: z.ZodString;
551
+ email: z.ZodString;
552
+ createdAt: z.ZodDate;
553
+ updatedAt: z.ZodDate;
554
+ tierId: z.ZodNumber;
555
+ firstName: z.ZodString;
556
+ lastName: z.ZodString;
557
+ phone: z.ZodString;
558
+ photoUrl: z.ZodOptional<z.ZodString>;
559
+ isOnboardingCompleted: z.ZodBoolean;
560
+ userRoleId: z.ZodNumber;
561
+ stripeCustomerId: z.ZodOptional<z.ZodString>;
562
+ onboardingStep: z.ZodNumber;
563
+ onboardingType: z.ZodUnion<[z.ZodLiteral<"AIRBNB_CONNECT">, z.ZodLiteral<"MANUAL_LISTING">]>;
564
+ }, "name" | "id" | "firstName" | "lastName" | "photoUrl">, "strip", z.ZodTypeAny, {
565
+ name: string;
566
+ id: string;
567
+ firstName: string;
568
+ lastName: string;
569
+ photoUrl?: string | undefined;
570
+ }, {
571
+ name: string;
572
+ id: string;
573
+ firstName: string;
574
+ lastName: string;
575
+ photoUrl?: string | undefined;
576
+ }>>;
484
577
  }, "strip", z.ZodTypeAny, {
485
578
  type: "ONE_TO_ONE" | "GROUP" | "OPERATIONS_GROUP" | "OPERATIONS_ONE_TO_ONE";
486
579
  createdAt: import("../../helpers").Timestamp;
@@ -538,6 +631,12 @@ export declare const ChatThreadSchema: z.ZodObject<{
538
631
  userRoleId: number;
539
632
  onboardingStep: number;
540
633
  onboardingType: "AIRBNB_CONNECT" | "MANUAL_LISTING";
634
+ userRole: {
635
+ name: string;
636
+ id: number;
637
+ createdAt: Date;
638
+ updatedAt: Date;
639
+ };
541
640
  photoUrl?: string | undefined;
542
641
  stripeCustomerId?: string | undefined;
543
642
  }[] | undefined;
@@ -583,6 +682,23 @@ export declare const ChatThreadSchema: z.ZodObject<{
583
682
  whatsappTemplateSent?: boolean | undefined;
584
683
  whatsappUserReplied?: boolean | undefined;
585
684
  lastWhatsappMessageSentAt?: import("../../helpers").Timestamp | undefined;
685
+ landlord?: {
686
+ name: string;
687
+ id: string;
688
+ email: string;
689
+ firstName: string;
690
+ lastName: string;
691
+ phone: string;
692
+ userRoleId: number;
693
+ photoUrl?: string | undefined;
694
+ } | undefined;
695
+ operator?: {
696
+ name: string;
697
+ id: string;
698
+ firstName: string;
699
+ lastName: string;
700
+ photoUrl?: string | undefined;
701
+ } | undefined;
586
702
  }, {
587
703
  type: "ONE_TO_ONE" | "GROUP" | "OPERATIONS_GROUP" | "OPERATIONS_ONE_TO_ONE";
588
704
  createdAt: import("../../helpers").Timestamp;
@@ -640,6 +756,12 @@ export declare const ChatThreadSchema: z.ZodObject<{
640
756
  userRoleId: number;
641
757
  onboardingStep: number;
642
758
  onboardingType: "AIRBNB_CONNECT" | "MANUAL_LISTING";
759
+ userRole: {
760
+ name: string;
761
+ id: number;
762
+ createdAt: Date;
763
+ updatedAt: Date;
764
+ };
643
765
  photoUrl?: string | undefined;
644
766
  stripeCustomerId?: string | undefined;
645
767
  }[] | undefined;
@@ -685,6 +807,23 @@ export declare const ChatThreadSchema: z.ZodObject<{
685
807
  whatsappTemplateSent?: boolean | undefined;
686
808
  whatsappUserReplied?: boolean | undefined;
687
809
  lastWhatsappMessageSentAt?: import("../../helpers").Timestamp | undefined;
810
+ landlord?: {
811
+ name: string;
812
+ id: string;
813
+ email: string;
814
+ firstName: string;
815
+ lastName: string;
816
+ phone: string;
817
+ userRoleId: number;
818
+ photoUrl?: string | undefined;
819
+ } | undefined;
820
+ operator?: {
821
+ name: string;
822
+ id: string;
823
+ firstName: string;
824
+ lastName: string;
825
+ photoUrl?: string | undefined;
826
+ } | undefined;
688
827
  }>;
689
828
  export declare const MessageAutomationTemplateSchema: z.ZodObject<{
690
829
  id: z.ZodOptional<z.ZodString>;
@@ -6,6 +6,7 @@ const user_1 = require("../user");
6
6
  const reservation_1 = require("../reservation");
7
7
  const property_1 = require("../property");
8
8
  const helpers_1 = require("../../helpers");
9
+ const user_role_1 = require("../user-role");
9
10
  const SeenBySchema = (0, zod_1.record)((0, zod_1.string)(), helpers_1.firestoreTimestampSchema);
10
11
  exports.ChatMessageTypeSchema = (0, zod_1.union)([
11
12
  (0, zod_1.literal)("message"),
@@ -33,7 +34,9 @@ exports.ChatThreadSchema = (0, zod_1.object)({
33
34
  updatedAt: helpers_1.firestoreTimestampSchema,
34
35
  lastMessage: (0, zod_1.optional)(exports.ChatMessageSchema),
35
36
  participantIds: (0, zod_1.array)((0, zod_1.string)()),
36
- participants: (0, zod_1.optional)((0, zod_1.array)(user_1.userSchema)),
37
+ participants: (0, zod_1.optional)((0, zod_1.array)(user_1.userSchema.extend({
38
+ userRole: user_role_1.userRoleSchema,
39
+ }))),
37
40
  type: (0, zod_1.union)([
38
41
  (0, zod_1.literal)("ONE_TO_ONE"),
39
42
  (0, zod_1.literal)("GROUP"),
@@ -65,6 +68,23 @@ exports.ChatThreadSchema = (0, zod_1.object)({
65
68
  whatsappTemplateSent: (0, zod_1.optional)((0, zod_1.boolean)()),
66
69
  whatsappUserReplied: (0, zod_1.optional)((0, zod_1.boolean)()),
67
70
  lastWhatsappMessageSentAt: (0, zod_1.optional)(helpers_1.firestoreTimestampSchema),
71
+ landlord: (0, zod_1.optional)(user_1.userSchema.pick({
72
+ id: true,
73
+ name: true,
74
+ photoUrl: true,
75
+ firstName: true,
76
+ lastName: true,
77
+ email: true,
78
+ phone: true,
79
+ userRoleId: true,
80
+ })),
81
+ operator: (0, zod_1.optional)(user_1.userSchema.pick({
82
+ id: true,
83
+ name: true,
84
+ photoUrl: true,
85
+ firstName: true,
86
+ lastName: true,
87
+ })),
68
88
  });
69
89
  exports.MessageAutomationTemplateSchema = (0, zod_1.object)({
70
90
  id: (0, zod_1.optional)((0, zod_1.string)()),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "commonjs",
3
3
  "name": "hububb-saas-shared",
4
- "version": "1.0.81",
4
+ "version": "1.0.83",
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",