@tmlmobilidade/types 20250915.1142.45 → 20250915.1306.2
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/src/auth/user.d.ts +9 -9
- package/dist/src/auth/user.js +1 -1
- package/dist/src/organization.d.ts +56 -18
- package/dist/src/organization.js +15 -2
- package/package.json +1 -1
package/dist/src/auth/user.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
15
15
|
email_verified: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
16
16
|
first_name: z.ZodString;
|
|
17
17
|
last_name: z.ZodString;
|
|
18
|
-
|
|
18
|
+
organization_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
19
19
|
password_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
20
20
|
permissions: z.ZodArray<z.ZodObject<{
|
|
21
21
|
action: z.ZodString;
|
|
@@ -52,7 +52,6 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
52
52
|
}[];
|
|
53
53
|
first_name: string;
|
|
54
54
|
last_name: string;
|
|
55
|
-
organization_ids: string[];
|
|
56
55
|
role_ids: string[];
|
|
57
56
|
session_ids: string[];
|
|
58
57
|
verification_token_ids: string[];
|
|
@@ -62,6 +61,7 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
62
61
|
avatar?: string | null | undefined;
|
|
63
62
|
bio?: string | null | undefined;
|
|
64
63
|
email_verified?: import("../_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
64
|
+
organization_id?: string | null | undefined;
|
|
65
65
|
password_hash?: string | null | undefined;
|
|
66
66
|
preferences?: Record<string, Record<string, string | number | boolean | string[] | number[]>> | null | undefined;
|
|
67
67
|
theme_id?: string | null | undefined;
|
|
@@ -83,7 +83,7 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
83
83
|
avatar?: string | null | undefined;
|
|
84
84
|
bio?: string | null | undefined;
|
|
85
85
|
email_verified?: number | null | undefined;
|
|
86
|
-
|
|
86
|
+
organization_id?: string | null | undefined;
|
|
87
87
|
password_hash?: string | null | undefined;
|
|
88
88
|
preferences?: Record<string, Record<string, string | number | boolean | string[] | number[]>> | null | undefined;
|
|
89
89
|
role_ids?: string[] | undefined;
|
|
@@ -104,7 +104,7 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
|
|
|
104
104
|
email_verified: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
105
105
|
first_name: z.ZodString;
|
|
106
106
|
last_name: z.ZodString;
|
|
107
|
-
|
|
107
|
+
organization_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
108
108
|
password_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
109
109
|
permissions: z.ZodArray<z.ZodObject<{
|
|
110
110
|
action: z.ZodString;
|
|
@@ -134,7 +134,6 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
|
|
|
134
134
|
}[];
|
|
135
135
|
first_name: string;
|
|
136
136
|
last_name: string;
|
|
137
|
-
organization_ids: string[];
|
|
138
137
|
role_ids: string[];
|
|
139
138
|
session_ids: string[];
|
|
140
139
|
verification_token_ids: string[];
|
|
@@ -144,6 +143,7 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
|
|
|
144
143
|
avatar?: string | null | undefined;
|
|
145
144
|
bio?: string | null | undefined;
|
|
146
145
|
email_verified?: import("../_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
146
|
+
organization_id?: string | null | undefined;
|
|
147
147
|
password_hash?: string | null | undefined;
|
|
148
148
|
preferences?: Record<string, Record<string, string | number | boolean | string[] | number[]>> | null | undefined;
|
|
149
149
|
theme_id?: string | null | undefined;
|
|
@@ -162,7 +162,7 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
|
|
|
162
162
|
avatar?: string | null | undefined;
|
|
163
163
|
bio?: string | null | undefined;
|
|
164
164
|
email_verified?: number | null | undefined;
|
|
165
|
-
|
|
165
|
+
organization_id?: string | null | undefined;
|
|
166
166
|
password_hash?: string | null | undefined;
|
|
167
167
|
preferences?: Record<string, Record<string, string | number | boolean | string[] | number[]>> | null | undefined;
|
|
168
168
|
role_ids?: string[] | undefined;
|
|
@@ -192,7 +192,7 @@ export declare const UpdateUserSchema: z.ZodObject<{
|
|
|
192
192
|
email_verified: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>>;
|
|
193
193
|
first_name: z.ZodOptional<z.ZodString>;
|
|
194
194
|
last_name: z.ZodOptional<z.ZodString>;
|
|
195
|
-
|
|
195
|
+
organization_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
196
196
|
password_hash: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
197
197
|
preferences: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">]>>>>>>;
|
|
198
198
|
role_ids: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
|
|
@@ -213,7 +213,7 @@ export declare const UpdateUserSchema: z.ZodObject<{
|
|
|
213
213
|
email_verified?: import("../_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
214
214
|
first_name?: string | undefined;
|
|
215
215
|
last_name?: string | undefined;
|
|
216
|
-
|
|
216
|
+
organization_id?: string | null | undefined;
|
|
217
217
|
password_hash?: string | null | undefined;
|
|
218
218
|
preferences?: Record<string, Record<string, string | number | boolean | string[] | number[]>> | null | undefined;
|
|
219
219
|
role_ids?: string[] | undefined;
|
|
@@ -234,7 +234,7 @@ export declare const UpdateUserSchema: z.ZodObject<{
|
|
|
234
234
|
email_verified?: number | null | undefined;
|
|
235
235
|
first_name?: string | undefined;
|
|
236
236
|
last_name?: string | undefined;
|
|
237
|
-
|
|
237
|
+
organization_id?: string | null | undefined;
|
|
238
238
|
password_hash?: string | null | undefined;
|
|
239
239
|
preferences?: Record<string, Record<string, string | number | boolean | string[] | number[]>> | null | undefined;
|
|
240
240
|
role_ids?: string[] | undefined;
|
package/dist/src/auth/user.js
CHANGED
|
@@ -19,7 +19,7 @@ export const UserSchema = DocumentSchema.extend({
|
|
|
19
19
|
email_verified: unixTimeStampSchema.nullish(),
|
|
20
20
|
first_name: z.string().nonempty(),
|
|
21
21
|
last_name: z.string().nonempty(),
|
|
22
|
-
|
|
22
|
+
organization_id: z.string().nullish(),
|
|
23
23
|
password_hash: z.string().nullish(),
|
|
24
24
|
permissions: z.array(PermissionSchema),
|
|
25
25
|
phone: z.string().nullish(),
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
export declare const OrganizationValueSchema: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodString, "many">, z.ZodString]>;
|
|
3
|
+
export type OrganizationValue = z.infer<typeof OrganizationValueSchema>;
|
|
2
4
|
export declare const OrganizationSchema: z.ZodObject<{
|
|
3
5
|
_id: z.ZodString;
|
|
4
6
|
created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
@@ -6,8 +8,12 @@ export declare const OrganizationSchema: z.ZodObject<{
|
|
|
6
8
|
updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
7
9
|
updated_by: z.ZodOptional<z.ZodString>;
|
|
8
10
|
} & {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
home_links: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
12
|
+
home_wikis: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
13
|
+
logo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
|
+
longname: z.ZodString;
|
|
15
|
+
shortname: z.ZodString;
|
|
16
|
+
theme: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
11
17
|
}, "strict", z.ZodTypeAny, {
|
|
12
18
|
_id: string;
|
|
13
19
|
created_at: number & {
|
|
@@ -16,18 +22,26 @@ export declare const OrganizationSchema: z.ZodObject<{
|
|
|
16
22
|
updated_at: number & {
|
|
17
23
|
__brand: "UnixTimestamp";
|
|
18
24
|
};
|
|
19
|
-
|
|
20
|
-
|
|
25
|
+
home_links: string[];
|
|
26
|
+
home_wikis: string[];
|
|
27
|
+
longname: string;
|
|
28
|
+
shortname: string;
|
|
21
29
|
created_by?: string | undefined;
|
|
22
30
|
updated_by?: string | undefined;
|
|
31
|
+
logo?: string | null | undefined;
|
|
32
|
+
theme?: string | null | undefined;
|
|
23
33
|
}, {
|
|
24
34
|
_id: string;
|
|
25
35
|
created_at: number;
|
|
26
36
|
updated_at: number;
|
|
27
|
-
|
|
28
|
-
|
|
37
|
+
longname: string;
|
|
38
|
+
shortname: string;
|
|
29
39
|
created_by?: string | undefined;
|
|
30
40
|
updated_by?: string | undefined;
|
|
41
|
+
home_links?: string[] | undefined;
|
|
42
|
+
home_wikis?: string[] | undefined;
|
|
43
|
+
logo?: string | null | undefined;
|
|
44
|
+
theme?: string | null | undefined;
|
|
31
45
|
}>;
|
|
32
46
|
export declare const CreateOrganizationSchema: z.ZodObject<Omit<{
|
|
33
47
|
_id: z.ZodString;
|
|
@@ -36,31 +50,55 @@ export declare const CreateOrganizationSchema: z.ZodObject<Omit<{
|
|
|
36
50
|
updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
37
51
|
updated_by: z.ZodOptional<z.ZodString>;
|
|
38
52
|
} & {
|
|
39
|
-
|
|
40
|
-
|
|
53
|
+
home_links: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
54
|
+
home_wikis: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
55
|
+
logo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
56
|
+
longname: z.ZodString;
|
|
57
|
+
shortname: z.ZodString;
|
|
58
|
+
theme: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
41
59
|
}, "_id" | "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
|
|
42
|
-
|
|
43
|
-
|
|
60
|
+
home_links: string[];
|
|
61
|
+
home_wikis: string[];
|
|
62
|
+
longname: string;
|
|
63
|
+
shortname: string;
|
|
44
64
|
created_by?: string | undefined;
|
|
45
65
|
updated_by?: string | undefined;
|
|
66
|
+
logo?: string | null | undefined;
|
|
67
|
+
theme?: string | null | undefined;
|
|
46
68
|
}, {
|
|
47
|
-
|
|
48
|
-
|
|
69
|
+
longname: string;
|
|
70
|
+
shortname: string;
|
|
49
71
|
created_by?: string | undefined;
|
|
50
72
|
updated_by?: string | undefined;
|
|
73
|
+
home_links?: string[] | undefined;
|
|
74
|
+
home_wikis?: string[] | undefined;
|
|
75
|
+
logo?: string | null | undefined;
|
|
76
|
+
theme?: string | null | undefined;
|
|
51
77
|
}>;
|
|
52
78
|
export declare const UpdateOrganizationSchema: z.ZodObject<{
|
|
53
79
|
updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
54
|
-
|
|
55
|
-
|
|
80
|
+
home_links: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
|
|
81
|
+
home_wikis: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
|
|
82
|
+
logo: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
83
|
+
longname: z.ZodOptional<z.ZodString>;
|
|
84
|
+
shortname: z.ZodOptional<z.ZodString>;
|
|
85
|
+
theme: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
56
86
|
}, "strict", z.ZodTypeAny, {
|
|
57
87
|
updated_by?: string | undefined;
|
|
58
|
-
|
|
59
|
-
|
|
88
|
+
home_links?: string[] | undefined;
|
|
89
|
+
home_wikis?: string[] | undefined;
|
|
90
|
+
logo?: string | null | undefined;
|
|
91
|
+
longname?: string | undefined;
|
|
92
|
+
shortname?: string | undefined;
|
|
93
|
+
theme?: string | null | undefined;
|
|
60
94
|
}, {
|
|
61
95
|
updated_by?: string | undefined;
|
|
62
|
-
|
|
63
|
-
|
|
96
|
+
home_links?: string[] | undefined;
|
|
97
|
+
home_wikis?: string[] | undefined;
|
|
98
|
+
logo?: string | null | undefined;
|
|
99
|
+
longname?: string | undefined;
|
|
100
|
+
shortname?: string | undefined;
|
|
101
|
+
theme?: string | null | undefined;
|
|
64
102
|
}>;
|
|
65
103
|
export type Organization = z.infer<typeof OrganizationSchema>;
|
|
66
104
|
export type CreateOrganizationDto = z.infer<typeof CreateOrganizationSchema>;
|
package/dist/src/organization.js
CHANGED
|
@@ -2,9 +2,22 @@
|
|
|
2
2
|
import { DocumentSchema } from './_common/document.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
/* * */
|
|
5
|
+
export const OrganizationValueSchema = z.union([
|
|
6
|
+
z.string(),
|
|
7
|
+
z.string(),
|
|
8
|
+
z.boolean(),
|
|
9
|
+
z.array(z.string()),
|
|
10
|
+
z.array(z.string()),
|
|
11
|
+
z.string(),
|
|
12
|
+
]);
|
|
13
|
+
/* * */
|
|
5
14
|
export const OrganizationSchema = DocumentSchema.extend({
|
|
6
|
-
|
|
7
|
-
|
|
15
|
+
home_links: z.array(z.string()).default([]),
|
|
16
|
+
home_wikis: z.array(z.string()).default([]),
|
|
17
|
+
logo: z.string().nullish(),
|
|
18
|
+
longname: z.string().nonempty(),
|
|
19
|
+
shortname: z.string().nonempty(),
|
|
20
|
+
theme: z.string().nullish(),
|
|
8
21
|
}).strict();
|
|
9
22
|
export const CreateOrganizationSchema = OrganizationSchema.omit({ _id: true, created_at: true, updated_at: true });
|
|
10
23
|
export const UpdateOrganizationSchema = CreateOrganizationSchema.omit({ created_by: true }).partial();
|
package/package.json
CHANGED