hububb-saas-shared 1.0.83 → 1.0.85
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 +18 -18
- package/dist/schemas/thread/index.js +1 -1
- package/dist/schemas/user-permission/index.d.ts +41 -0
- package/dist/schemas/user-permission/index.js +19 -0
- package/dist/types/user/index.d.ts +2 -0
- package/dist/types/user-permission/index.d.ts +9 -0
- package/dist/types/user-permission/index.js +2 -0
- package/package.json +1 -1
|
@@ -268,7 +268,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
|
|
|
268
268
|
onboardingStep: z.ZodNumber;
|
|
269
269
|
onboardingType: z.ZodUnion<[z.ZodLiteral<"AIRBNB_CONNECT">, z.ZodLiteral<"MANUAL_LISTING">]>;
|
|
270
270
|
}, {
|
|
271
|
-
userRole: z.ZodObject<{
|
|
271
|
+
userRole: z.ZodOptional<z.ZodObject<{
|
|
272
272
|
id: z.ZodNumber;
|
|
273
273
|
name: z.ZodString;
|
|
274
274
|
createdAt: z.ZodDate;
|
|
@@ -283,7 +283,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
|
|
|
283
283
|
id: number;
|
|
284
284
|
createdAt: Date;
|
|
285
285
|
updatedAt: Date;
|
|
286
|
-
}
|
|
286
|
+
}>>;
|
|
287
287
|
}>, "strip", z.ZodTypeAny, {
|
|
288
288
|
name: string;
|
|
289
289
|
id: string;
|
|
@@ -298,14 +298,14 @@ export declare const ChatThreadSchema: z.ZodObject<{
|
|
|
298
298
|
userRoleId: number;
|
|
299
299
|
onboardingStep: number;
|
|
300
300
|
onboardingType: "AIRBNB_CONNECT" | "MANUAL_LISTING";
|
|
301
|
-
|
|
301
|
+
photoUrl?: string | undefined;
|
|
302
|
+
stripeCustomerId?: string | undefined;
|
|
303
|
+
userRole?: {
|
|
302
304
|
name: string;
|
|
303
305
|
id: number;
|
|
304
306
|
createdAt: Date;
|
|
305
307
|
updatedAt: Date;
|
|
306
|
-
};
|
|
307
|
-
photoUrl?: string | undefined;
|
|
308
|
-
stripeCustomerId?: string | undefined;
|
|
308
|
+
} | undefined;
|
|
309
309
|
}, {
|
|
310
310
|
name: string;
|
|
311
311
|
id: string;
|
|
@@ -320,14 +320,14 @@ export declare const ChatThreadSchema: z.ZodObject<{
|
|
|
320
320
|
userRoleId: number;
|
|
321
321
|
onboardingStep: number;
|
|
322
322
|
onboardingType: "AIRBNB_CONNECT" | "MANUAL_LISTING";
|
|
323
|
-
|
|
323
|
+
photoUrl?: string | undefined;
|
|
324
|
+
stripeCustomerId?: string | undefined;
|
|
325
|
+
userRole?: {
|
|
324
326
|
name: string;
|
|
325
327
|
id: number;
|
|
326
328
|
createdAt: Date;
|
|
327
329
|
updatedAt: Date;
|
|
328
|
-
};
|
|
329
|
-
photoUrl?: string | undefined;
|
|
330
|
-
stripeCustomerId?: string | undefined;
|
|
330
|
+
} | undefined;
|
|
331
331
|
}>, "many">>;
|
|
332
332
|
type: z.ZodUnion<[z.ZodLiteral<"ONE_TO_ONE">, z.ZodLiteral<"GROUP">, z.ZodLiteral<"OPERATIONS_GROUP">, z.ZodLiteral<"OPERATIONS_ONE_TO_ONE">]>;
|
|
333
333
|
source: z.ZodOptional<z.ZodString>;
|
|
@@ -631,14 +631,14 @@ export declare const ChatThreadSchema: z.ZodObject<{
|
|
|
631
631
|
userRoleId: number;
|
|
632
632
|
onboardingStep: number;
|
|
633
633
|
onboardingType: "AIRBNB_CONNECT" | "MANUAL_LISTING";
|
|
634
|
-
|
|
634
|
+
photoUrl?: string | undefined;
|
|
635
|
+
stripeCustomerId?: string | undefined;
|
|
636
|
+
userRole?: {
|
|
635
637
|
name: string;
|
|
636
638
|
id: number;
|
|
637
639
|
createdAt: Date;
|
|
638
640
|
updatedAt: Date;
|
|
639
|
-
};
|
|
640
|
-
photoUrl?: string | undefined;
|
|
641
|
-
stripeCustomerId?: string | undefined;
|
|
641
|
+
} | undefined;
|
|
642
642
|
}[] | undefined;
|
|
643
643
|
externalThreadId?: string | undefined;
|
|
644
644
|
externalSource?: string | undefined;
|
|
@@ -756,14 +756,14 @@ export declare const ChatThreadSchema: z.ZodObject<{
|
|
|
756
756
|
userRoleId: number;
|
|
757
757
|
onboardingStep: number;
|
|
758
758
|
onboardingType: "AIRBNB_CONNECT" | "MANUAL_LISTING";
|
|
759
|
-
|
|
759
|
+
photoUrl?: string | undefined;
|
|
760
|
+
stripeCustomerId?: string | undefined;
|
|
761
|
+
userRole?: {
|
|
760
762
|
name: string;
|
|
761
763
|
id: number;
|
|
762
764
|
createdAt: Date;
|
|
763
765
|
updatedAt: Date;
|
|
764
|
-
};
|
|
765
|
-
photoUrl?: string | undefined;
|
|
766
|
-
stripeCustomerId?: string | undefined;
|
|
766
|
+
} | undefined;
|
|
767
767
|
}[] | undefined;
|
|
768
768
|
externalThreadId?: string | undefined;
|
|
769
769
|
externalSource?: string | undefined;
|
|
@@ -35,7 +35,7 @@ exports.ChatThreadSchema = (0, zod_1.object)({
|
|
|
35
35
|
lastMessage: (0, zod_1.optional)(exports.ChatMessageSchema),
|
|
36
36
|
participantIds: (0, zod_1.array)((0, zod_1.string)()),
|
|
37
37
|
participants: (0, zod_1.optional)((0, zod_1.array)(user_1.userSchema.extend({
|
|
38
|
-
userRole: user_role_1.userRoleSchema,
|
|
38
|
+
userRole: (0, zod_1.optional)(user_role_1.userRoleSchema),
|
|
39
39
|
}))),
|
|
40
40
|
type: (0, zod_1.union)([
|
|
41
41
|
(0, zod_1.literal)("ONE_TO_ONE"),
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare const permissionSchema: import("zod").ZodObject<{
|
|
2
|
+
id: import("zod").ZodNumber;
|
|
3
|
+
name: import("zod").ZodString;
|
|
4
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
5
|
+
categoryId: import("zod").ZodNumber;
|
|
6
|
+
createdAt: import("zod").ZodDate;
|
|
7
|
+
updatedAt: import("zod").ZodDate;
|
|
8
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
9
|
+
name: string;
|
|
10
|
+
id: number;
|
|
11
|
+
createdAt: Date;
|
|
12
|
+
updatedAt: Date;
|
|
13
|
+
categoryId: number;
|
|
14
|
+
description?: string | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
name: string;
|
|
17
|
+
id: number;
|
|
18
|
+
createdAt: Date;
|
|
19
|
+
updatedAt: Date;
|
|
20
|
+
categoryId: number;
|
|
21
|
+
description?: string | undefined;
|
|
22
|
+
}>;
|
|
23
|
+
export declare const permissionCategorySchema: import("zod").ZodObject<{
|
|
24
|
+
id: import("zod").ZodNumber;
|
|
25
|
+
name: import("zod").ZodString;
|
|
26
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
27
|
+
createdAt: import("zod").ZodDate;
|
|
28
|
+
updatedAt: import("zod").ZodDate;
|
|
29
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
30
|
+
name: string;
|
|
31
|
+
id: number;
|
|
32
|
+
createdAt: Date;
|
|
33
|
+
updatedAt: Date;
|
|
34
|
+
description?: string | undefined;
|
|
35
|
+
}, {
|
|
36
|
+
name: string;
|
|
37
|
+
id: number;
|
|
38
|
+
createdAt: Date;
|
|
39
|
+
updatedAt: Date;
|
|
40
|
+
description?: string | undefined;
|
|
41
|
+
}>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.permissionCategorySchema = exports.permissionSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.permissionSchema = (0, zod_1.object)({
|
|
6
|
+
id: (0, zod_1.number)(),
|
|
7
|
+
name: (0, zod_1.string)(),
|
|
8
|
+
description: (0, zod_1.string)().optional(),
|
|
9
|
+
categoryId: (0, zod_1.number)(),
|
|
10
|
+
createdAt: (0, zod_1.date)(),
|
|
11
|
+
updatedAt: (0, zod_1.date)(),
|
|
12
|
+
});
|
|
13
|
+
exports.permissionCategorySchema = (0, zod_1.object)({
|
|
14
|
+
id: (0, zod_1.number)(),
|
|
15
|
+
name: (0, zod_1.string)(),
|
|
16
|
+
description: (0, zod_1.string)().optional(),
|
|
17
|
+
createdAt: (0, zod_1.date)(),
|
|
18
|
+
updatedAt: (0, zod_1.date)(),
|
|
19
|
+
});
|
|
@@ -6,6 +6,7 @@ import { UserRole } from "../user-role";
|
|
|
6
6
|
import { Subscription } from "../subscription";
|
|
7
7
|
import { PaymentMethod } from "../payment-method";
|
|
8
8
|
import { Invoice } from "../invoice";
|
|
9
|
+
import { Permission } from "../user-permission";
|
|
9
10
|
export interface User extends infer<typeof userSchema> {
|
|
10
11
|
tier?: Tier;
|
|
11
12
|
properties?: Property[];
|
|
@@ -13,4 +14,5 @@ export interface User extends infer<typeof userSchema> {
|
|
|
13
14
|
subscription?: Subscription;
|
|
14
15
|
paymentMethods?: PaymentMethod[];
|
|
15
16
|
invoices?: Invoice[];
|
|
17
|
+
permissions?: Permission[];
|
|
16
18
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { infer } from "zod";
|
|
2
|
+
import { permissionCategorySchema, permissionSchema } from "../../schemas/user-permission";
|
|
3
|
+
import { User } from "../user";
|
|
4
|
+
export interface PermissionCategory extends infer<typeof permissionCategorySchema> {
|
|
5
|
+
}
|
|
6
|
+
export interface Permission extends infer<typeof permissionSchema> {
|
|
7
|
+
category: PermissionCategory;
|
|
8
|
+
users?: User[];
|
|
9
|
+
}
|