@tmlmobilidade/types 20250910.1541.13 → 20250911.1325.18

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.
Files changed (51) hide show
  1. package/dist/src/_common/operational-date.d.ts +1 -1
  2. package/dist/src/_common/operational-date.js +1 -2
  3. package/dist/src/_common/proposed-change.d.ts +9 -31
  4. package/dist/src/_common/proposed-change.js +5 -14
  5. package/dist/src/agency.d.ts +10 -21
  6. package/dist/src/agency.js +1 -1
  7. package/dist/src/alert.d.ts +32 -58
  8. package/dist/src/alert.js +8 -48
  9. package/dist/src/auth/login.js +2 -8
  10. package/dist/src/auth/role.d.ts +6 -13
  11. package/dist/src/auth/role.js +1 -1
  12. package/dist/src/auth/session.d.ts +13 -29
  13. package/dist/src/auth/session.js +3 -3
  14. package/dist/src/auth/user.d.ts +13 -32
  15. package/dist/src/auth/user.js +3 -3
  16. package/dist/src/auth/verification-token.d.ts +13 -25
  17. package/dist/src/auth/verification-token.js +3 -3
  18. package/dist/src/gtfs.d.ts +6 -17
  19. package/dist/src/organization.d.ts +1 -4
  20. package/dist/src/organization.js +1 -1
  21. package/dist/src/plans/gtfs-validation.d.ts +25 -63
  22. package/dist/src/plans/gtfs-validation.js +2 -6
  23. package/dist/src/plans/plan-controller.d.ts +3 -8
  24. package/dist/src/plans/plan-controller.js +2 -2
  25. package/dist/src/plans/plan.d.ts +34 -86
  26. package/dist/src/plans/plan.js +2 -6
  27. package/dist/src/rides/ride-audit.d.ts +52 -1168
  28. package/dist/src/rides/ride-audit.js +3 -5
  29. package/dist/src/rides/ride-justification.d.ts +84 -9
  30. package/dist/src/rides/ride-justification.js +4 -1
  31. package/dist/src/rides/ride.d.ts +54 -105
  32. package/dist/src/rides/ride.js +8 -8
  33. package/dist/src/sams/sam-analysis.d.ts +5 -13
  34. package/dist/src/sams/sam-analysis.js +3 -3
  35. package/dist/src/sams/sam.d.ts +37 -88
  36. package/dist/src/sams/sam.js +4 -4
  37. package/dist/src/simplified-apex/simplified-apex-location.d.ts +16 -23
  38. package/dist/src/simplified-apex/simplified-apex-location.js +2 -2
  39. package/dist/src/simplified-apex/simplified-apex-on-board-refund.d.ts +16 -23
  40. package/dist/src/simplified-apex/simplified-apex-on-board-refund.js +2 -2
  41. package/dist/src/simplified-apex/simplified-apex-on-board-sale.d.ts +27 -37
  42. package/dist/src/simplified-apex/simplified-apex-on-board-sale.js +3 -3
  43. package/dist/src/simplified-apex/simplified-apex-validation.d.ts +16 -23
  44. package/dist/src/simplified-apex/simplified-apex-validation.js +2 -2
  45. package/dist/src/stop.d.ts +68 -86
  46. package/dist/src/stop.js +11 -74
  47. package/dist/src/vehicle-event.d.ts +7 -12
  48. package/dist/src/vehicle-event.js +2 -2
  49. package/dist/src/zone.d.ts +0 -3
  50. package/dist/src/zone.js +1 -1
  51. package/package.json +1 -1
@@ -1,13 +1,12 @@
1
- import { type UnixTimestamp } from '../_common/unix-timestamp.js';
2
1
  import { z } from 'zod';
3
2
  export declare const SessionSchema: z.ZodObject<{
4
3
  _id: z.ZodString;
5
- created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
4
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
6
5
  created_by: z.ZodDefault<z.ZodString>;
7
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
6
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
8
7
  updated_by: z.ZodDefault<z.ZodString>;
9
8
  } & {
10
- expires_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
9
+ expires_at: z.ZodOptional<z.ZodNullable<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, {
@@ -22,9 +21,7 @@ export declare const SessionSchema: z.ZodObject<{
22
21
  updated_by: string;
23
22
  user_id: string;
24
23
  token: string;
25
- expires_at?: (number & {
26
- __brand: "UnixTimestamp";
27
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
24
+ expires_at?: import("../_common/unix-timestamp.js").UnixTimestamp | null | undefined;
28
25
  }, {
29
26
  _id: string;
30
27
  created_at: number;
@@ -37,12 +34,12 @@ export declare const SessionSchema: z.ZodObject<{
37
34
  }>;
38
35
  export declare const CreateSessionSchema: z.ZodObject<Omit<{
39
36
  _id: z.ZodString;
40
- created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
37
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
41
38
  created_by: z.ZodDefault<z.ZodString>;
42
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
39
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
43
40
  updated_by: z.ZodDefault<z.ZodString>;
44
41
  } & {
45
- expires_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
42
+ expires_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>;
46
43
  token: z.ZodString;
47
44
  user_id: z.ZodString;
48
45
  }, "_id" | "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
@@ -50,9 +47,7 @@ export declare const CreateSessionSchema: z.ZodObject<Omit<{
50
47
  updated_by: string;
51
48
  user_id: string;
52
49
  token: string;
53
- expires_at?: (number & {
54
- __brand: "UnixTimestamp";
55
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
50
+ expires_at?: import("../_common/unix-timestamp.js").UnixTimestamp | null | undefined;
56
51
  }, {
57
52
  user_id: string;
58
53
  token: string;
@@ -61,32 +56,21 @@ export declare const CreateSessionSchema: z.ZodObject<Omit<{
61
56
  expires_at?: number | null | undefined;
62
57
  }>;
63
58
  export declare const UpdateSessionSchema: z.ZodObject<{
64
- created_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
65
59
  updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
66
60
  user_id: z.ZodOptional<z.ZodString>;
67
- expires_at: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>>;
61
+ expires_at: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>>;
68
62
  token: z.ZodOptional<z.ZodString>;
69
63
  }, "strict", z.ZodTypeAny, {
70
- created_by?: string | undefined;
71
64
  updated_by?: string | undefined;
72
65
  user_id?: string | undefined;
73
- expires_at?: (number & {
74
- __brand: "UnixTimestamp";
75
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
66
+ expires_at?: import("../_common/unix-timestamp.js").UnixTimestamp | null | undefined;
76
67
  token?: string | undefined;
77
68
  }, {
78
- created_by?: string | undefined;
79
69
  updated_by?: string | undefined;
80
70
  user_id?: string | undefined;
81
71
  expires_at?: number | null | undefined;
82
72
  token?: string | undefined;
83
73
  }>;
84
- export interface Session extends Omit<z.infer<typeof SessionSchema>, 'created_at' | 'expires_at' | 'updated_at'> {
85
- created_at: UnixTimestamp;
86
- expires_at?: UnixTimestamp;
87
- updated_at: UnixTimestamp;
88
- }
89
- export interface CreateSessionDto extends Omit<z.infer<typeof CreateSessionSchema>, 'expires_at'> {
90
- expires_at?: UnixTimestamp;
91
- }
92
- export type UpdateSessionDto = Partial<CreateSessionDto>;
74
+ export type Session = z.infer<typeof SessionSchema>;
75
+ export type CreateSessionDto = z.infer<typeof CreateSessionSchema>;
76
+ export type UpdateSessionDto = z.infer<typeof UpdateSessionSchema>;
@@ -1,12 +1,12 @@
1
1
  /* * */
2
2
  import { DocumentSchema } from '../_common/document.js';
3
- import { validateUnixTimestamp } from '../_common/unix-timestamp.js';
3
+ import { unixTimeStampSchema } from '../_common/unix-timestamp.js';
4
4
  import { z } from 'zod';
5
5
  /* * */
6
6
  export const SessionSchema = DocumentSchema.extend({
7
- expires_at: z.number().transform(validateUnixTimestamp).brand('UnixTimestamp').nullish(),
7
+ expires_at: unixTimeStampSchema.nullish(),
8
8
  token: z.string(),
9
9
  user_id: z.string(),
10
10
  }).strict();
11
11
  export const CreateSessionSchema = SessionSchema.omit({ _id: true, created_at: true, updated_at: true });
12
- export const UpdateSessionSchema = CreateSessionSchema.partial();
12
+ export const UpdateSessionSchema = CreateSessionSchema.omit({ created_by: true }).partial();
@@ -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>;
7
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
9
8
  created_by: z.ZodDefault<z.ZodString>;
10
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
9
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
11
10
  updated_by: z.ZodDefault<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.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
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">>;
@@ -62,9 +61,7 @@ export declare const UserSchema: z.ZodObject<{
62
61
  phone?: string | null | undefined;
63
62
  avatar?: string | null | undefined;
64
63
  bio?: string | null | undefined;
65
- email_verified?: (number & {
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>;
96
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
100
97
  created_by: z.ZodDefault<z.ZodString>;
101
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
98
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
102
99
  updated_by: z.ZodDefault<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.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
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">>;
@@ -146,9 +143,7 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
146
143
  phone?: string | null | undefined;
147
144
  avatar?: string | null | undefined;
148
145
  bio?: string | null | undefined;
149
- email_verified?: (number & {
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,7 +171,6 @@ 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
- created_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
180
174
  updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
181
175
  phone: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
182
176
  email: z.ZodOptional<z.ZodString>;
@@ -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.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>>;
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?: (number & {
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>, 'created_at' | 'email_verified' | 'permissions' | 'updated_at'> {
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 UpdateUserDto = Partial<CreateUserDto> & {
267
- password_hash?: string;
268
- };
248
+ export type CreateUserDto = z.infer<typeof CreateUserSchema>;
249
+ export type UpdateUserDto = z.infer<typeof UpdateUserSchema>;
@@ -1,6 +1,6 @@
1
1
  /* * */
2
2
  import { DocumentSchema } from '../_common/document.js';
3
- import { validateUnixTimestamp } from '../_common/unix-timestamp.js';
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: z.number().transform(validateUnixTimestamp).brand('UnixTimestamp').nullish(),
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>;
4
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
6
5
  created_by: z.ZodDefault<z.ZodString>;
7
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
6
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
8
7
  updated_by: z.ZodDefault<z.ZodString>;
9
8
  } & {
10
- expires_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
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, {
@@ -23,7 +22,7 @@ export declare const VerificationTokenSchema: z.ZodObject<{
23
22
  user_id: string;
24
23
  expires_at: number & {
25
24
  __brand: "UnixTimestamp";
26
- } & z.BRAND<"UnixTimestamp">;
25
+ };
27
26
  token: string;
28
27
  }, {
29
28
  _id: string;
@@ -37,12 +36,12 @@ 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>;
39
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
41
40
  created_by: z.ZodDefault<z.ZodString>;
42
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
41
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
43
42
  updated_by: z.ZodDefault<z.ZodString>;
44
43
  } & {
45
- expires_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
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, {
@@ -51,7 +50,7 @@ export declare const CreateVerificationTokenSchema: z.ZodObject<Omit<{
51
50
  user_id: string;
52
51
  expires_at: number & {
53
52
  __brand: "UnixTimestamp";
54
- } & z.BRAND<"UnixTimestamp">;
53
+ };
55
54
  token: string;
56
55
  }, {
57
56
  user_id: string;
@@ -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
- created_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
65
63
  updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
66
64
  user_id: z.ZodOptional<z.ZodString>;
67
- expires_at: z.ZodOptional<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
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?: (number & {
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 interface VerificationToken extends Omit<z.infer<typeof VerificationTokenSchema>, 'created_at' | 'expires_at' | 'updated_at'> {
85
- created_at: UnixTimestamp;
86
- expires_at: UnixTimestamp;
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 { validateUnixTimestamp } from '../_common/unix-timestamp.js';
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: z.number().transform(validateUnixTimestamp).brand('UnixTimestamp'),
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();
@@ -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.ZodBranded<z.ZodEffects<z.ZodString, OperationalDate, string>, "OperationalDate">>>;
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.ZodBranded<z.ZodEffects<z.ZodString, OperationalDate, string>, "OperationalDate">>>;
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?: (string & {
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?: (string & {
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 = Omit<z.infer<typeof GtfsFeedInfoSchema>, 'feed_end_date' | 'feed_start_date'> & {
68
- feed_end_date?: null | OperationalDate;
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];
@@ -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
- created_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
54
53
  updated_by: z.ZodOptional<z.ZodDefault<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 = Partial<CreateOrganizationDto>;
67
+ export type UpdateOrganizationDto = z.infer<typeof UpdateOrganizationSchema>;
@@ -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();