@tmlmobilidade/types 20250911.1034.51 → 20250911.1425.9
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/_common/comment.d.ts +20 -20
- package/dist/src/_common/document.d.ts +4 -4
- package/dist/src/_common/document.js +2 -2
- package/dist/src/_common/operational-date.d.ts +1 -1
- package/dist/src/_common/operational-date.js +1 -2
- package/dist/src/_common/proposed-change.d.ts +18 -40
- package/dist/src/_common/proposed-change.js +5 -14
- package/dist/src/agency.d.ts +19 -30
- package/dist/src/agency.js +1 -1
- package/dist/src/alert.d.ts +37 -63
- package/dist/src/alert.js +8 -48
- package/dist/src/auth/login.js +2 -8
- package/dist/src/auth/role.d.ts +15 -22
- package/dist/src/auth/role.js +1 -1
- package/dist/src/auth/session.d.ts +22 -38
- package/dist/src/auth/session.js +3 -3
- package/dist/src/auth/user.d.ts +22 -41
- package/dist/src/auth/user.js +3 -3
- package/dist/src/auth/verification-token.d.ts +22 -34
- package/dist/src/auth/verification-token.js +3 -3
- package/dist/src/gtfs.d.ts +6 -17
- package/dist/src/organization.d.ts +10 -13
- package/dist/src/organization.js +1 -1
- package/dist/src/plans/gtfs-validation.d.ts +34 -72
- package/dist/src/plans/gtfs-validation.js +2 -6
- package/dist/src/plans/plan-controller.d.ts +3 -8
- package/dist/src/plans/plan-controller.js +2 -2
- package/dist/src/plans/plan.d.ts +43 -95
- package/dist/src/plans/plan.js +2 -6
- package/dist/src/rides/ride-audit.d.ts +27 -30
- package/dist/src/rides/ride-audit.js +1 -1
- package/dist/src/rides/ride-justification.d.ts +69 -72
- package/dist/src/rides/ride-justification.js +1 -1
- package/dist/src/rides/ride.d.ts +55 -106
- package/dist/src/rides/ride.js +8 -8
- package/dist/src/sams/sam-analysis.d.ts +5 -13
- package/dist/src/sams/sam-analysis.js +3 -3
- package/dist/src/sams/sam.d.ts +46 -97
- package/dist/src/sams/sam.js +4 -4
- package/dist/src/simplified-apex/simplified-apex-location.d.ts +18 -25
- package/dist/src/simplified-apex/simplified-apex-location.js +2 -2
- package/dist/src/simplified-apex/simplified-apex-on-board-refund.d.ts +18 -25
- package/dist/src/simplified-apex/simplified-apex-on-board-refund.js +2 -2
- package/dist/src/simplified-apex/simplified-apex-on-board-sale.d.ts +28 -38
- package/dist/src/simplified-apex/simplified-apex-on-board-sale.js +3 -3
- package/dist/src/simplified-apex/simplified-apex-validation.d.ts +18 -25
- package/dist/src/simplified-apex/simplified-apex-validation.js +2 -2
- package/dist/src/stop.d.ts +133 -151
- package/dist/src/stop.js +11 -74
- package/dist/src/vehicle-event.d.ts +9 -14
- package/dist/src/vehicle-event.js +2 -2
- package/dist/src/zone.d.ts +9 -12
- package/dist/src/zone.js +1 -1
- package/package.json +1 -1
package/dist/src/auth/user.d.ts
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { type UnixTimestamp } from '../_common/unix-timestamp.js';
|
|
2
1
|
import { type Permission } from './permission.js';
|
|
3
2
|
import { z } from 'zod';
|
|
4
3
|
export declare const UserPreferenceValueSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">]>;
|
|
5
4
|
export type UserPreferenceValue = z.infer<typeof UserPreferenceValueSchema>;
|
|
6
5
|
export declare const UserSchema: z.ZodObject<{
|
|
7
6
|
_id: z.ZodString;
|
|
8
|
-
created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
9
|
-
created_by: z.
|
|
10
|
-
updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
11
|
-
updated_by: z.
|
|
7
|
+
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
8
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
9
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
10
|
+
updated_by: z.ZodOptional<z.ZodString>;
|
|
12
11
|
} & {
|
|
13
12
|
avatar: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
13
|
bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
15
14
|
email: z.ZodString;
|
|
16
|
-
email_verified: z.ZodOptional<z.ZodNullable<z.
|
|
15
|
+
email_verified: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
17
16
|
first_name: z.ZodString;
|
|
18
17
|
last_name: z.ZodString;
|
|
19
18
|
organization_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -42,11 +41,9 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
42
41
|
created_at: number & {
|
|
43
42
|
__brand: "UnixTimestamp";
|
|
44
43
|
};
|
|
45
|
-
created_by: string;
|
|
46
44
|
updated_at: number & {
|
|
47
45
|
__brand: "UnixTimestamp";
|
|
48
46
|
};
|
|
49
|
-
updated_by: string;
|
|
50
47
|
email: string;
|
|
51
48
|
permissions: {
|
|
52
49
|
scope: string;
|
|
@@ -59,12 +56,12 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
59
56
|
role_ids: string[];
|
|
60
57
|
session_ids: string[];
|
|
61
58
|
verification_token_ids: string[];
|
|
59
|
+
created_by?: string | undefined;
|
|
60
|
+
updated_by?: string | undefined;
|
|
62
61
|
phone?: string | null | undefined;
|
|
63
62
|
avatar?: string | null | undefined;
|
|
64
63
|
bio?: string | null | undefined;
|
|
65
|
-
email_verified?: (
|
|
66
|
-
__brand: "UnixTimestamp";
|
|
67
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
64
|
+
email_verified?: import("../_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
68
65
|
password_hash?: string | null | undefined;
|
|
69
66
|
preferences?: Record<string, Record<string, string | number | boolean | string[] | number[]>> | null | undefined;
|
|
70
67
|
theme_id?: string | null | undefined;
|
|
@@ -96,15 +93,15 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
96
93
|
}>;
|
|
97
94
|
export declare const CreateUserSchema: z.ZodObject<Omit<{
|
|
98
95
|
_id: z.ZodString;
|
|
99
|
-
created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
100
|
-
created_by: z.
|
|
101
|
-
updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
102
|
-
updated_by: z.
|
|
96
|
+
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
97
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
98
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
99
|
+
updated_by: z.ZodOptional<z.ZodString>;
|
|
103
100
|
} & {
|
|
104
101
|
avatar: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
105
102
|
bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
106
103
|
email: z.ZodString;
|
|
107
|
-
email_verified: z.ZodOptional<z.ZodNullable<z.
|
|
104
|
+
email_verified: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
108
105
|
first_name: z.ZodString;
|
|
109
106
|
last_name: z.ZodString;
|
|
110
107
|
organization_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -129,8 +126,6 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
|
|
|
129
126
|
theme_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
130
127
|
verification_token_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
131
128
|
}, "_id" | "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
|
|
132
|
-
created_by: string;
|
|
133
|
-
updated_by: string;
|
|
134
129
|
email: string;
|
|
135
130
|
permissions: {
|
|
136
131
|
scope: string;
|
|
@@ -143,12 +138,12 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
|
|
|
143
138
|
role_ids: string[];
|
|
144
139
|
session_ids: string[];
|
|
145
140
|
verification_token_ids: string[];
|
|
141
|
+
created_by?: string | undefined;
|
|
142
|
+
updated_by?: string | undefined;
|
|
146
143
|
phone?: string | null | undefined;
|
|
147
144
|
avatar?: string | null | undefined;
|
|
148
145
|
bio?: string | null | undefined;
|
|
149
|
-
email_verified?: (
|
|
150
|
-
__brand: "UnixTimestamp";
|
|
151
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
146
|
+
email_verified?: import("../_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
152
147
|
password_hash?: string | null | undefined;
|
|
153
148
|
preferences?: Record<string, Record<string, string | number | boolean | string[] | number[]>> | null | undefined;
|
|
154
149
|
theme_id?: string | null | undefined;
|
|
@@ -176,8 +171,7 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
|
|
|
176
171
|
verification_token_ids?: string[] | undefined;
|
|
177
172
|
}>;
|
|
178
173
|
export declare const UpdateUserSchema: z.ZodObject<{
|
|
179
|
-
|
|
180
|
-
updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
174
|
+
updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
181
175
|
phone: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
182
176
|
email: z.ZodOptional<z.ZodString>;
|
|
183
177
|
permissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -195,7 +189,7 @@ export declare const UpdateUserSchema: z.ZodObject<{
|
|
|
195
189
|
}>, "many">>;
|
|
196
190
|
avatar: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
197
191
|
bio: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
198
|
-
email_verified: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.
|
|
192
|
+
email_verified: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>>;
|
|
199
193
|
first_name: z.ZodOptional<z.ZodString>;
|
|
200
194
|
last_name: z.ZodOptional<z.ZodString>;
|
|
201
195
|
organization_ids: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
|
|
@@ -206,7 +200,6 @@ export declare const UpdateUserSchema: z.ZodObject<{
|
|
|
206
200
|
theme_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
207
201
|
verification_token_ids: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
|
|
208
202
|
}, "strict", z.ZodTypeAny, {
|
|
209
|
-
created_by?: string | undefined;
|
|
210
203
|
updated_by?: string | undefined;
|
|
211
204
|
phone?: string | null | undefined;
|
|
212
205
|
email?: string | undefined;
|
|
@@ -217,9 +210,7 @@ export declare const UpdateUserSchema: z.ZodObject<{
|
|
|
217
210
|
}[] | undefined;
|
|
218
211
|
avatar?: string | null | undefined;
|
|
219
212
|
bio?: string | null | undefined;
|
|
220
|
-
email_verified?: (
|
|
221
|
-
__brand: "UnixTimestamp";
|
|
222
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
213
|
+
email_verified?: import("../_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
223
214
|
first_name?: string | undefined;
|
|
224
215
|
last_name?: string | undefined;
|
|
225
216
|
organization_ids?: string[] | undefined;
|
|
@@ -230,7 +221,6 @@ export declare const UpdateUserSchema: z.ZodObject<{
|
|
|
230
221
|
theme_id?: string | null | undefined;
|
|
231
222
|
verification_token_ids?: string[] | undefined;
|
|
232
223
|
}, {
|
|
233
|
-
created_by?: string | undefined;
|
|
234
224
|
updated_by?: string | undefined;
|
|
235
225
|
phone?: string | null | undefined;
|
|
236
226
|
email?: string | undefined;
|
|
@@ -252,17 +242,8 @@ export declare const UpdateUserSchema: z.ZodObject<{
|
|
|
252
242
|
theme_id?: string | null | undefined;
|
|
253
243
|
verification_token_ids?: string[] | undefined;
|
|
254
244
|
}>;
|
|
255
|
-
export interface User extends Omit<z.infer<typeof UserSchema>, '
|
|
256
|
-
created_at: UnixTimestamp;
|
|
257
|
-
email_verified?: null | UnixTimestamp;
|
|
245
|
+
export interface User extends Omit<z.infer<typeof UserSchema>, 'permissions'> {
|
|
258
246
|
permissions: Permission<unknown>[];
|
|
259
|
-
updated_at: UnixTimestamp;
|
|
260
|
-
}
|
|
261
|
-
export interface CreateUserDto extends Omit<z.infer<typeof CreateUserSchema>, 'created_at' | 'email_verified' | 'updated_at'> {
|
|
262
|
-
created_at?: UnixTimestamp;
|
|
263
|
-
email_verified?: null | UnixTimestamp;
|
|
264
|
-
updated_at?: UnixTimestamp;
|
|
265
247
|
}
|
|
266
|
-
export type
|
|
267
|
-
|
|
268
|
-
};
|
|
248
|
+
export type CreateUserDto = z.infer<typeof CreateUserSchema>;
|
|
249
|
+
export type UpdateUserDto = z.infer<typeof UpdateUserSchema>;
|
package/dist/src/auth/user.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* * */
|
|
2
2
|
import { DocumentSchema } from '../_common/document.js';
|
|
3
|
-
import {
|
|
3
|
+
import { unixTimeStampSchema } from '../_common/unix-timestamp.js';
|
|
4
4
|
import { PermissionSchema } from './permission.js';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
/* * */
|
|
@@ -16,7 +16,7 @@ export const UserSchema = DocumentSchema.extend({
|
|
|
16
16
|
avatar: z.string().nullish(),
|
|
17
17
|
bio: z.string().nullish(),
|
|
18
18
|
email: z.string().email(),
|
|
19
|
-
email_verified:
|
|
19
|
+
email_verified: unixTimeStampSchema.nullish(),
|
|
20
20
|
first_name: z.string().nonempty(),
|
|
21
21
|
last_name: z.string().nonempty(),
|
|
22
22
|
organization_ids: z.array(z.string()).default([]),
|
|
@@ -30,4 +30,4 @@ export const UserSchema = DocumentSchema.extend({
|
|
|
30
30
|
verification_token_ids: z.array(z.string()).default([]),
|
|
31
31
|
}).strict();
|
|
32
32
|
export const CreateUserSchema = UserSchema.omit({ _id: true, created_at: true, updated_at: true });
|
|
33
|
-
export const UpdateUserSchema = CreateUserSchema.partial();
|
|
33
|
+
export const UpdateUserSchema = CreateUserSchema.omit({ created_by: true }).partial();
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { type UnixTimestamp } from '../_common/unix-timestamp.js';
|
|
2
1
|
import { z } from 'zod';
|
|
3
2
|
export declare const VerificationTokenSchema: z.ZodObject<{
|
|
4
3
|
_id: z.ZodString;
|
|
5
|
-
created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
6
|
-
created_by: z.
|
|
7
|
-
updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
8
|
-
updated_by: z.
|
|
4
|
+
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
5
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
6
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
7
|
+
updated_by: z.ZodOptional<z.ZodString>;
|
|
9
8
|
} & {
|
|
10
|
-
expires_at: z.
|
|
9
|
+
expires_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
11
10
|
token: z.ZodString;
|
|
12
11
|
user_id: z.ZodString;
|
|
13
12
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -15,16 +14,16 @@ export declare const VerificationTokenSchema: z.ZodObject<{
|
|
|
15
14
|
created_at: number & {
|
|
16
15
|
__brand: "UnixTimestamp";
|
|
17
16
|
};
|
|
18
|
-
created_by: string;
|
|
19
17
|
updated_at: number & {
|
|
20
18
|
__brand: "UnixTimestamp";
|
|
21
19
|
};
|
|
22
|
-
updated_by: string;
|
|
23
20
|
user_id: string;
|
|
24
21
|
expires_at: number & {
|
|
25
22
|
__brand: "UnixTimestamp";
|
|
26
|
-
}
|
|
23
|
+
};
|
|
27
24
|
token: string;
|
|
25
|
+
created_by?: string | undefined;
|
|
26
|
+
updated_by?: string | undefined;
|
|
28
27
|
}, {
|
|
29
28
|
_id: string;
|
|
30
29
|
created_at: number;
|
|
@@ -37,22 +36,22 @@ export declare const VerificationTokenSchema: z.ZodObject<{
|
|
|
37
36
|
}>;
|
|
38
37
|
export declare const CreateVerificationTokenSchema: z.ZodObject<Omit<{
|
|
39
38
|
_id: z.ZodString;
|
|
40
|
-
created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
41
|
-
created_by: z.
|
|
42
|
-
updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
43
|
-
updated_by: z.
|
|
39
|
+
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
40
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
41
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
42
|
+
updated_by: z.ZodOptional<z.ZodString>;
|
|
44
43
|
} & {
|
|
45
|
-
expires_at: z.
|
|
44
|
+
expires_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
46
45
|
token: z.ZodString;
|
|
47
46
|
user_id: z.ZodString;
|
|
48
47
|
}, "_id" | "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
|
|
49
|
-
created_by: string;
|
|
50
|
-
updated_by: string;
|
|
51
48
|
user_id: string;
|
|
52
49
|
expires_at: number & {
|
|
53
50
|
__brand: "UnixTimestamp";
|
|
54
|
-
}
|
|
51
|
+
};
|
|
55
52
|
token: string;
|
|
53
|
+
created_by?: string | undefined;
|
|
54
|
+
updated_by?: string | undefined;
|
|
56
55
|
}, {
|
|
57
56
|
user_id: string;
|
|
58
57
|
expires_at: number;
|
|
@@ -61,32 +60,21 @@ export declare const CreateVerificationTokenSchema: z.ZodObject<Omit<{
|
|
|
61
60
|
updated_by?: string | undefined;
|
|
62
61
|
}>;
|
|
63
62
|
export declare const UpdateVerificationTokenSchema: z.ZodObject<{
|
|
64
|
-
|
|
65
|
-
updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
63
|
+
updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
66
64
|
user_id: z.ZodOptional<z.ZodString>;
|
|
67
|
-
expires_at: z.ZodOptional<z.
|
|
65
|
+
expires_at: z.ZodOptional<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
|
|
68
66
|
token: z.ZodOptional<z.ZodString>;
|
|
69
67
|
}, "strict", z.ZodTypeAny, {
|
|
70
|
-
created_by?: string | undefined;
|
|
71
68
|
updated_by?: string | undefined;
|
|
72
69
|
user_id?: string | undefined;
|
|
73
|
-
expires_at?: (
|
|
74
|
-
__brand: "UnixTimestamp";
|
|
75
|
-
} & z.BRAND<"UnixTimestamp">) | undefined;
|
|
70
|
+
expires_at?: import("../_common/unix-timestamp.js").UnixTimestamp | undefined;
|
|
76
71
|
token?: string | undefined;
|
|
77
72
|
}, {
|
|
78
|
-
created_by?: string | undefined;
|
|
79
73
|
updated_by?: string | undefined;
|
|
80
74
|
user_id?: string | undefined;
|
|
81
75
|
expires_at?: number | undefined;
|
|
82
76
|
token?: string | undefined;
|
|
83
77
|
}>;
|
|
84
|
-
export
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
updated_at: UnixTimestamp;
|
|
88
|
-
}
|
|
89
|
-
export type CreateVerificationTokenDto = Omit<z.infer<typeof CreateVerificationTokenSchema>, 'expires_at'> & {
|
|
90
|
-
expires_at: UnixTimestamp;
|
|
91
|
-
};
|
|
92
|
-
export type UpdateVerificationTokenDto = Partial<CreateVerificationTokenDto>;
|
|
78
|
+
export type VerificationToken = z.infer<typeof VerificationTokenSchema>;
|
|
79
|
+
export type CreateVerificationTokenDto = z.infer<typeof CreateVerificationTokenSchema>;
|
|
80
|
+
export type UpdateVerificationTokenDto = z.infer<typeof UpdateVerificationTokenSchema>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/* * */
|
|
2
2
|
import { DocumentSchema } from '../_common/document.js';
|
|
3
|
-
import {
|
|
3
|
+
import { unixTimeStampSchema } from '../_common/unix-timestamp.js';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
/* * */
|
|
6
6
|
export const VerificationTokenSchema = DocumentSchema.extend({
|
|
7
|
-
expires_at:
|
|
7
|
+
expires_at: unixTimeStampSchema,
|
|
8
8
|
token: z.string(),
|
|
9
9
|
user_id: z.string(),
|
|
10
10
|
}).strict();
|
|
11
11
|
export const CreateVerificationTokenSchema = VerificationTokenSchema.omit({ _id: true, created_at: true, updated_at: true });
|
|
12
|
-
export const UpdateVerificationTokenSchema = CreateVerificationTokenSchema.partial();
|
|
12
|
+
export const UpdateVerificationTokenSchema = CreateVerificationTokenSchema.omit({ created_by: true }).partial();
|
package/dist/src/gtfs.d.ts
CHANGED
|
@@ -1,29 +1,24 @@
|
|
|
1
1
|
import { type Alert as ServiceAlert } from 'gtfs-types';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { OperationalDate } from './_common/operational-date.js';
|
|
4
3
|
export declare const GtfsFeedInfoSchema: z.ZodObject<{
|
|
5
4
|
default_lang: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6
5
|
feed_contact_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7
6
|
feed_contact_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8
|
-
feed_end_date: z.ZodOptional<z.ZodNullable<z.
|
|
7
|
+
feed_end_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("./_common/operational-date.js").OperationalDate, string>>>;
|
|
9
8
|
feed_lang: z.ZodString;
|
|
10
9
|
feed_publisher_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
11
10
|
feed_publisher_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
12
|
-
feed_start_date: z.ZodOptional<z.ZodNullable<z.
|
|
11
|
+
feed_start_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("./_common/operational-date.js").OperationalDate, string>>>;
|
|
13
12
|
feed_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
13
|
}, "strip", z.ZodTypeAny, {
|
|
15
14
|
feed_lang: string;
|
|
16
15
|
default_lang?: string | null | undefined;
|
|
17
16
|
feed_contact_email?: string | null | undefined;
|
|
18
17
|
feed_contact_url?: string | null | undefined;
|
|
19
|
-
feed_end_date?: (
|
|
20
|
-
__brand: "OperationalDate";
|
|
21
|
-
} & z.BRAND<"OperationalDate">) | null | undefined;
|
|
18
|
+
feed_end_date?: import("./_common/operational-date.js").OperationalDate | null | undefined;
|
|
22
19
|
feed_publisher_name?: string | null | undefined;
|
|
23
20
|
feed_publisher_url?: string | null | undefined;
|
|
24
|
-
feed_start_date?: (
|
|
25
|
-
__brand: "OperationalDate";
|
|
26
|
-
} & z.BRAND<"OperationalDate">) | null | undefined;
|
|
21
|
+
feed_start_date?: import("./_common/operational-date.js").OperationalDate | null | undefined;
|
|
27
22
|
feed_version?: string | null | undefined;
|
|
28
23
|
}, {
|
|
29
24
|
feed_lang: string;
|
|
@@ -64,14 +59,8 @@ export declare const GtfsAgencySchema: z.ZodObject<{
|
|
|
64
59
|
agency_phone?: string | null | undefined;
|
|
65
60
|
agency_url?: string | null | undefined;
|
|
66
61
|
}>;
|
|
67
|
-
export type GtfsFeedInfo =
|
|
68
|
-
|
|
69
|
-
feed_start_date?: null | OperationalDate;
|
|
70
|
-
};
|
|
71
|
-
export type GtfsAgency = Omit<z.infer<typeof GtfsAgencySchema>, 'feed_end_date' | 'feed_start_date'> & {
|
|
72
|
-
feed_end_date?: null | OperationalDate;
|
|
73
|
-
feed_start_date?: null | OperationalDate;
|
|
74
|
-
};
|
|
62
|
+
export type GtfsFeedInfo = z.infer<typeof GtfsFeedInfoSchema>;
|
|
63
|
+
export type GtfsAgency = z.infer<typeof GtfsAgencySchema>;
|
|
75
64
|
export interface ServiceAlertExtended extends Omit<ServiceAlert, 'cause' | 'effect'> {
|
|
76
65
|
cause: string;
|
|
77
66
|
coordinates?: [number, number];
|
|
@@ -2,9 +2,9 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const OrganizationSchema: z.ZodObject<{
|
|
3
3
|
_id: z.ZodString;
|
|
4
4
|
created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
5
|
-
created_by: z.
|
|
5
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
6
6
|
updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
7
|
-
updated_by: z.
|
|
7
|
+
updated_by: z.ZodOptional<z.ZodString>;
|
|
8
8
|
} & {
|
|
9
9
|
code: z.ZodString;
|
|
10
10
|
name: z.ZodString;
|
|
@@ -13,13 +13,13 @@ export declare const OrganizationSchema: z.ZodObject<{
|
|
|
13
13
|
created_at: number & {
|
|
14
14
|
__brand: "UnixTimestamp";
|
|
15
15
|
};
|
|
16
|
-
created_by: string;
|
|
17
16
|
updated_at: number & {
|
|
18
17
|
__brand: "UnixTimestamp";
|
|
19
18
|
};
|
|
20
|
-
updated_by: string;
|
|
21
19
|
code: string;
|
|
22
20
|
name: string;
|
|
21
|
+
created_by?: string | undefined;
|
|
22
|
+
updated_by?: string | undefined;
|
|
23
23
|
}, {
|
|
24
24
|
_id: string;
|
|
25
25
|
created_at: number;
|
|
@@ -32,17 +32,17 @@ export declare const OrganizationSchema: z.ZodObject<{
|
|
|
32
32
|
export declare const CreateOrganizationSchema: z.ZodObject<Omit<{
|
|
33
33
|
_id: z.ZodString;
|
|
34
34
|
created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
35
|
-
created_by: z.
|
|
35
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
36
36
|
updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
37
|
-
updated_by: z.
|
|
37
|
+
updated_by: z.ZodOptional<z.ZodString>;
|
|
38
38
|
} & {
|
|
39
39
|
code: z.ZodString;
|
|
40
40
|
name: z.ZodString;
|
|
41
41
|
}, "_id" | "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
|
|
42
|
-
created_by: string;
|
|
43
|
-
updated_by: string;
|
|
44
42
|
code: string;
|
|
45
43
|
name: string;
|
|
44
|
+
created_by?: string | undefined;
|
|
45
|
+
updated_by?: string | undefined;
|
|
46
46
|
}, {
|
|
47
47
|
code: string;
|
|
48
48
|
name: string;
|
|
@@ -50,21 +50,18 @@ export declare const CreateOrganizationSchema: z.ZodObject<Omit<{
|
|
|
50
50
|
updated_by?: string | undefined;
|
|
51
51
|
}>;
|
|
52
52
|
export declare const UpdateOrganizationSchema: z.ZodObject<{
|
|
53
|
-
|
|
54
|
-
updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
53
|
+
updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
55
54
|
code: z.ZodOptional<z.ZodString>;
|
|
56
55
|
name: z.ZodOptional<z.ZodString>;
|
|
57
56
|
}, "strict", z.ZodTypeAny, {
|
|
58
|
-
created_by?: string | undefined;
|
|
59
57
|
updated_by?: string | undefined;
|
|
60
58
|
code?: string | undefined;
|
|
61
59
|
name?: string | undefined;
|
|
62
60
|
}, {
|
|
63
|
-
created_by?: string | undefined;
|
|
64
61
|
updated_by?: string | undefined;
|
|
65
62
|
code?: string | undefined;
|
|
66
63
|
name?: string | undefined;
|
|
67
64
|
}>;
|
|
68
65
|
export type Organization = z.infer<typeof OrganizationSchema>;
|
|
69
66
|
export type CreateOrganizationDto = z.infer<typeof CreateOrganizationSchema>;
|
|
70
|
-
export type UpdateOrganizationDto =
|
|
67
|
+
export type UpdateOrganizationDto = z.infer<typeof UpdateOrganizationSchema>;
|
package/dist/src/organization.js
CHANGED
|
@@ -7,4 +7,4 @@ export const OrganizationSchema = DocumentSchema.extend({
|
|
|
7
7
|
name: z.string(),
|
|
8
8
|
}).strict();
|
|
9
9
|
export const CreateOrganizationSchema = OrganizationSchema.omit({ _id: true, created_at: true, updated_at: true });
|
|
10
|
-
export const UpdateOrganizationSchema = CreateOrganizationSchema.partial();
|
|
10
|
+
export const UpdateOrganizationSchema = CreateOrganizationSchema.omit({ created_by: true }).partial();
|