@tmlmobilidade/types 20250909.1559.44 → 20250910.1526.7

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 (37) hide show
  1. package/dist/src/_common/comment.d.ts +247 -16
  2. package/dist/src/_common/comment.js +36 -5
  3. package/dist/src/_common/document.d.ts +14 -8
  4. package/dist/src/_common/document.js +5 -3
  5. package/dist/src/_common/proposed-change.d.ts +37 -19
  6. package/dist/src/_common/unix-timestamp.d.ts +1 -1
  7. package/dist/src/_common/unix-timestamp.js +1 -2
  8. package/dist/src/agency.d.ts +30 -12
  9. package/dist/src/alert.d.ts +52 -59
  10. package/dist/src/auth/role.d.ts +30 -12
  11. package/dist/src/auth/session.d.ts +30 -12
  12. package/dist/src/auth/user.d.ts +30 -12
  13. package/dist/src/auth/verification-token.d.ts +30 -12
  14. package/dist/src/file.d.ts +23 -23
  15. package/dist/src/organization.d.ts +30 -12
  16. package/dist/src/plans/gtfs-validation.d.ts +30 -12
  17. package/dist/src/plans/plan.d.ts +30 -12
  18. package/dist/src/rides/index.d.ts +2 -1
  19. package/dist/src/rides/index.js +2 -1
  20. package/dist/src/rides/ride-audit.d.ts +729 -0
  21. package/dist/src/rides/ride-audit.js +12 -0
  22. package/dist/src/rides/ride-justification.d.ts +959 -0
  23. package/dist/src/rides/ride-justification.js +64 -0
  24. package/dist/src/rides/ride-overrides.d.ts +9 -0
  25. package/dist/src/rides/ride-overrides.js +6 -0
  26. package/dist/src/rides/ride.d.ts +38 -20
  27. package/dist/src/sams/sam.d.ts +30 -12
  28. package/dist/src/simplified-apex/simplified-apex-location.d.ts +32 -24
  29. package/dist/src/simplified-apex/simplified-apex-on-board-refund.d.ts +32 -24
  30. package/dist/src/simplified-apex/simplified-apex-on-board-sale.d.ts +32 -24
  31. package/dist/src/simplified-apex/simplified-apex-validation.d.ts +36 -28
  32. package/dist/src/stop.d.ts +713 -188
  33. package/dist/src/vehicle-event.d.ts +18 -12
  34. package/dist/src/zone.d.ts +24 -6
  35. package/package.json +1 -1
  36. package/dist/src/rides/ride-annotation.d.ts +0 -579
  37. package/dist/src/rides/ride-annotation.js +0 -34
@@ -7,11 +7,12 @@ export declare const alertTypeSchema: z.ZodEnum<["PLANNED", "REALTIME"]>;
7
7
  export declare const referenceTypeSchema: z.ZodEnum<["LINE", "STOP", "AGENCY", "TRIP"]>;
8
8
  export declare const AlertSchema: z.ZodObject<{
9
9
  _id: z.ZodString;
10
- created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
11
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
10
+ created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
11
+ updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
12
+ updated_by: z.ZodDefault<z.ZodString>;
12
13
  } & {
13
- active_period_end_date: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
14
- active_period_start_date: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
14
+ active_period_end_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>;
15
+ active_period_start_date: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
15
16
  cause: z.ZodEnum<["ACCIDENT", "CONSTRUCTION", "DEMONSTRATION", "HOLIDAY", "MAINTENANCE", "MEDICAL_EMERGENCY", "OTHER_CAUSE", "POLICE_ACTIVITY", "STRIKE", "TECHNICAL_PROBLEM", "UNKNOWN_CAUSE", "WEATHER"]>;
16
17
  coordinates: z.ZodOptional<z.ZodNullable<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
17
18
  created_by: z.ZodString;
@@ -21,8 +22,8 @@ export declare const AlertSchema: z.ZodObject<{
21
22
  info_url: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
22
23
  modified_by: z.ZodString;
23
24
  municipality_ids: z.ZodArray<z.ZodString, "many">;
24
- publish_end_date: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
25
- publish_start_date: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
25
+ publish_end_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>;
26
+ publish_start_date: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
26
27
  publish_status: z.ZodEnum<["PUBLISHED", "ARCHIVED", "DRAFT"]>;
27
28
  reference_type: z.ZodEnum<["LINE", "STOP", "AGENCY", "TRIP"]>;
28
29
  references: z.ZodArray<z.ZodObject<{
@@ -39,19 +40,26 @@ export declare const AlertSchema: z.ZodObject<{
39
40
  type: z.ZodEnum<["PLANNED", "REALTIME"]>;
40
41
  }, "strict", z.ZodTypeAny, {
41
42
  _id: string;
42
- type: "PLANNED" | "REALTIME";
43
+ created_at: number & {
44
+ __brand: "UnixTimestamp";
45
+ };
43
46
  created_by: string;
47
+ updated_at: number & {
48
+ __brand: "UnixTimestamp";
49
+ };
50
+ updated_by: string;
51
+ type: "PLANNED" | "REALTIME";
44
52
  municipality_ids: string[];
45
53
  active_period_start_date: number & {
46
54
  __brand: "UnixTimestamp";
47
- } & z.BRAND<"UnixTimestamp">;
55
+ };
48
56
  cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "HOLIDAY" | "MAINTENANCE" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "STRIKE" | "TECHNICAL_PROBLEM" | "UNKNOWN_CAUSE" | "WEATHER";
49
57
  description: string;
50
58
  effect: "ACCESSIBILITY_ISSUE" | "ADDITIONAL_SERVICE" | "DETOUR" | "MODIFIED_SERVICE" | "NO_EFFECT" | "NO_SERVICE" | "OTHER_EFFECT" | "REDUCED_SERVICE" | "SIGNIFICANT_DELAYS" | "STOP_MOVED" | "UNKNOWN_EFFECT";
51
59
  modified_by: string;
52
60
  publish_start_date: number & {
53
61
  __brand: "UnixTimestamp";
54
- } & z.BRAND<"UnixTimestamp">;
62
+ };
55
63
  publish_status: "PUBLISHED" | "ARCHIVED" | "DRAFT";
56
64
  reference_type: "LINE" | "STOP" | "AGENCY" | "TRIP";
57
65
  references: {
@@ -59,25 +67,17 @@ export declare const AlertSchema: z.ZodObject<{
59
67
  parent_id: string;
60
68
  }[];
61
69
  title: string;
62
- created_at?: (number & {
63
- __brand: "UnixTimestamp";
64
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
65
- updated_at?: (number & {
66
- __brand: "UnixTimestamp";
67
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
68
- active_period_end_date?: (number & {
69
- __brand: "UnixTimestamp";
70
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
70
+ active_period_end_date?: UnixTimestamp | null | undefined;
71
71
  coordinates?: [number, number] | null | undefined;
72
72
  file_id?: string | null | undefined;
73
73
  info_url?: string | undefined;
74
- publish_end_date?: (number & {
75
- __brand: "UnixTimestamp";
76
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
74
+ publish_end_date?: UnixTimestamp | null | undefined;
77
75
  }, {
78
76
  _id: string;
79
- type: "PLANNED" | "REALTIME";
77
+ created_at: number;
80
78
  created_by: string;
79
+ updated_at: number;
80
+ type: "PLANNED" | "REALTIME";
81
81
  municipality_ids: string[];
82
82
  active_period_start_date: number;
83
83
  cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "HOLIDAY" | "MAINTENANCE" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "STRIKE" | "TECHNICAL_PROBLEM" | "UNKNOWN_CAUSE" | "WEATHER";
@@ -92,8 +92,7 @@ export declare const AlertSchema: z.ZodObject<{
92
92
  parent_id: string;
93
93
  }[];
94
94
  title: string;
95
- created_at?: number | null | undefined;
96
- updated_at?: number | null | undefined;
95
+ updated_by?: string | undefined;
97
96
  active_period_end_date?: number | null | undefined;
98
97
  coordinates?: [number, number] | null | undefined;
99
98
  file_id?: string | null | undefined;
@@ -102,11 +101,12 @@ export declare const AlertSchema: z.ZodObject<{
102
101
  }>;
103
102
  export declare const CreateAlertSchema: z.ZodObject<Omit<{
104
103
  _id: z.ZodString;
105
- created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
106
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
104
+ created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
105
+ updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
106
+ updated_by: z.ZodDefault<z.ZodString>;
107
107
  } & {
108
- active_period_end_date: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
109
- active_period_start_date: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
108
+ active_period_end_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>;
109
+ active_period_start_date: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
110
110
  cause: z.ZodEnum<["ACCIDENT", "CONSTRUCTION", "DEMONSTRATION", "HOLIDAY", "MAINTENANCE", "MEDICAL_EMERGENCY", "OTHER_CAUSE", "POLICE_ACTIVITY", "STRIKE", "TECHNICAL_PROBLEM", "UNKNOWN_CAUSE", "WEATHER"]>;
111
111
  coordinates: z.ZodOptional<z.ZodNullable<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
112
112
  created_by: z.ZodString;
@@ -116,8 +116,8 @@ export declare const CreateAlertSchema: z.ZodObject<Omit<{
116
116
  info_url: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
117
117
  modified_by: z.ZodString;
118
118
  municipality_ids: z.ZodArray<z.ZodString, "many">;
119
- publish_end_date: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
120
- publish_start_date: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
119
+ publish_end_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>;
120
+ publish_start_date: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
121
121
  publish_status: z.ZodEnum<["PUBLISHED", "ARCHIVED", "DRAFT"]>;
122
122
  reference_type: z.ZodEnum<["LINE", "STOP", "AGENCY", "TRIP"]>;
123
123
  references: z.ZodArray<z.ZodObject<{
@@ -133,19 +133,20 @@ export declare const CreateAlertSchema: z.ZodObject<Omit<{
133
133
  title: z.ZodString;
134
134
  type: z.ZodEnum<["PLANNED", "REALTIME"]>;
135
135
  }, "_id" | "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
136
- type: "PLANNED" | "REALTIME";
137
136
  created_by: string;
137
+ updated_by: string;
138
+ type: "PLANNED" | "REALTIME";
138
139
  municipality_ids: string[];
139
140
  active_period_start_date: number & {
140
141
  __brand: "UnixTimestamp";
141
- } & z.BRAND<"UnixTimestamp">;
142
+ };
142
143
  cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "HOLIDAY" | "MAINTENANCE" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "STRIKE" | "TECHNICAL_PROBLEM" | "UNKNOWN_CAUSE" | "WEATHER";
143
144
  description: string;
144
145
  effect: "ACCESSIBILITY_ISSUE" | "ADDITIONAL_SERVICE" | "DETOUR" | "MODIFIED_SERVICE" | "NO_EFFECT" | "NO_SERVICE" | "OTHER_EFFECT" | "REDUCED_SERVICE" | "SIGNIFICANT_DELAYS" | "STOP_MOVED" | "UNKNOWN_EFFECT";
145
146
  modified_by: string;
146
147
  publish_start_date: number & {
147
148
  __brand: "UnixTimestamp";
148
- } & z.BRAND<"UnixTimestamp">;
149
+ };
149
150
  publish_status: "PUBLISHED" | "ARCHIVED" | "DRAFT";
150
151
  reference_type: "LINE" | "STOP" | "AGENCY" | "TRIP";
151
152
  references: {
@@ -153,18 +154,14 @@ export declare const CreateAlertSchema: z.ZodObject<Omit<{
153
154
  parent_id: string;
154
155
  }[];
155
156
  title: string;
156
- active_period_end_date?: (number & {
157
- __brand: "UnixTimestamp";
158
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
157
+ active_period_end_date?: UnixTimestamp | null | undefined;
159
158
  coordinates?: [number, number] | null | undefined;
160
159
  file_id?: string | null | undefined;
161
160
  info_url?: string | undefined;
162
- publish_end_date?: (number & {
163
- __brand: "UnixTimestamp";
164
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
161
+ publish_end_date?: UnixTimestamp | null | undefined;
165
162
  }, {
166
- type: "PLANNED" | "REALTIME";
167
163
  created_by: string;
164
+ type: "PLANNED" | "REALTIME";
168
165
  municipality_ids: string[];
169
166
  active_period_start_date: number;
170
167
  cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "HOLIDAY" | "MAINTENANCE" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "STRIKE" | "TECHNICAL_PROBLEM" | "UNKNOWN_CAUSE" | "WEATHER";
@@ -179,6 +176,7 @@ export declare const CreateAlertSchema: z.ZodObject<Omit<{
179
176
  parent_id: string;
180
177
  }[];
181
178
  title: string;
179
+ updated_by?: string | undefined;
182
180
  active_period_end_date?: number | null | undefined;
183
181
  coordinates?: [number, number] | null | undefined;
184
182
  file_id?: string | null | undefined;
@@ -186,11 +184,12 @@ export declare const CreateAlertSchema: z.ZodObject<Omit<{
186
184
  publish_end_date?: number | null | undefined;
187
185
  }>;
188
186
  export declare const UpdateAlertSchema: z.ZodObject<{
189
- type: z.ZodOptional<z.ZodEnum<["PLANNED", "REALTIME"]>>;
190
187
  created_by: z.ZodOptional<z.ZodString>;
188
+ updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
189
+ type: z.ZodOptional<z.ZodEnum<["PLANNED", "REALTIME"]>>;
191
190
  municipality_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
192
- active_period_end_date: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>>;
193
- active_period_start_date: z.ZodOptional<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
191
+ active_period_end_date: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>>;
192
+ active_period_start_date: z.ZodOptional<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>;
194
193
  cause: z.ZodOptional<z.ZodEnum<["ACCIDENT", "CONSTRUCTION", "DEMONSTRATION", "HOLIDAY", "MAINTENANCE", "MEDICAL_EMERGENCY", "OTHER_CAUSE", "POLICE_ACTIVITY", "STRIKE", "TECHNICAL_PROBLEM", "UNKNOWN_CAUSE", "WEATHER"]>>;
195
194
  coordinates: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>>;
196
195
  description: z.ZodOptional<z.ZodString>;
@@ -198,8 +197,8 @@ export declare const UpdateAlertSchema: z.ZodObject<{
198
197
  file_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
199
198
  info_url: z.ZodOptional<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>;
200
199
  modified_by: z.ZodOptional<z.ZodString>;
201
- publish_end_date: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>>;
202
- publish_start_date: z.ZodOptional<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
200
+ publish_end_date: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>>;
201
+ publish_start_date: z.ZodOptional<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>;
203
202
  publish_status: z.ZodOptional<z.ZodEnum<["PUBLISHED", "ARCHIVED", "DRAFT"]>>;
204
203
  reference_type: z.ZodOptional<z.ZodEnum<["LINE", "STOP", "AGENCY", "TRIP"]>>;
205
204
  references: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -214,15 +213,12 @@ export declare const UpdateAlertSchema: z.ZodObject<{
214
213
  }>, "many">>;
215
214
  title: z.ZodOptional<z.ZodString>;
216
215
  }, "strict", z.ZodTypeAny, {
217
- type?: "PLANNED" | "REALTIME" | undefined;
218
216
  created_by?: string | undefined;
217
+ updated_by?: string | undefined;
218
+ type?: "PLANNED" | "REALTIME" | undefined;
219
219
  municipality_ids?: string[] | undefined;
220
- active_period_end_date?: (number & {
221
- __brand: "UnixTimestamp";
222
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
223
- active_period_start_date?: (number & {
224
- __brand: "UnixTimestamp";
225
- } & z.BRAND<"UnixTimestamp">) | undefined;
220
+ active_period_end_date?: UnixTimestamp | null | undefined;
221
+ active_period_start_date?: UnixTimestamp | undefined;
226
222
  cause?: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "HOLIDAY" | "MAINTENANCE" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "STRIKE" | "TECHNICAL_PROBLEM" | "UNKNOWN_CAUSE" | "WEATHER" | undefined;
227
223
  coordinates?: [number, number] | null | undefined;
228
224
  description?: string | undefined;
@@ -230,12 +226,8 @@ export declare const UpdateAlertSchema: z.ZodObject<{
230
226
  file_id?: string | null | undefined;
231
227
  info_url?: string | undefined;
232
228
  modified_by?: string | undefined;
233
- publish_end_date?: (number & {
234
- __brand: "UnixTimestamp";
235
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
236
- publish_start_date?: (number & {
237
- __brand: "UnixTimestamp";
238
- } & z.BRAND<"UnixTimestamp">) | undefined;
229
+ publish_end_date?: UnixTimestamp | null | undefined;
230
+ publish_start_date?: UnixTimestamp | undefined;
239
231
  publish_status?: "PUBLISHED" | "ARCHIVED" | "DRAFT" | undefined;
240
232
  reference_type?: "LINE" | "STOP" | "AGENCY" | "TRIP" | undefined;
241
233
  references?: {
@@ -244,8 +236,9 @@ export declare const UpdateAlertSchema: z.ZodObject<{
244
236
  }[] | undefined;
245
237
  title?: string | undefined;
246
238
  }, {
247
- type?: "PLANNED" | "REALTIME" | undefined;
248
239
  created_by?: string | undefined;
240
+ updated_by?: string | undefined;
241
+ type?: "PLANNED" | "REALTIME" | undefined;
249
242
  municipality_ids?: string[] | undefined;
250
243
  active_period_end_date?: number | null | undefined;
251
244
  active_period_start_date?: number | undefined;
@@ -2,8 +2,10 @@ import { type UnixTimestamp } from '../_common/unix-timestamp.js';
2
2
  import { z } from 'zod';
3
3
  export declare const RoleSchema: z.ZodObject<{
4
4
  _id: z.ZodString;
5
- created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
6
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
5
+ created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
6
+ created_by: z.ZodDefault<z.ZodString>;
7
+ updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
8
+ updated_by: z.ZodDefault<z.ZodString>;
7
9
  } & {
8
10
  name: z.ZodString;
9
11
  permissions: z.ZodArray<z.ZodObject<{
@@ -21,33 +23,39 @@ export declare const RoleSchema: z.ZodObject<{
21
23
  }>, "many">;
22
24
  }, "strict", z.ZodTypeAny, {
23
25
  _id: string;
26
+ created_at: number & {
27
+ __brand: "UnixTimestamp";
28
+ };
29
+ created_by: string;
30
+ updated_at: number & {
31
+ __brand: "UnixTimestamp";
32
+ };
33
+ updated_by: string;
24
34
  name: string;
25
35
  permissions: {
26
36
  scope: string;
27
37
  action: string;
28
38
  resource?: Record<string, any> | null | undefined;
29
39
  }[];
30
- created_at?: (number & {
31
- __brand: "UnixTimestamp";
32
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
33
- updated_at?: (number & {
34
- __brand: "UnixTimestamp";
35
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
36
40
  }, {
37
41
  _id: string;
42
+ created_at: number;
43
+ updated_at: number;
38
44
  name: string;
39
45
  permissions: {
40
46
  scope: string;
41
47
  action: string;
42
48
  resource?: Record<string, any> | null | undefined;
43
49
  }[];
44
- created_at?: number | null | undefined;
45
- updated_at?: number | null | undefined;
50
+ created_by?: string | undefined;
51
+ updated_by?: string | undefined;
46
52
  }>;
47
53
  export declare const CreateRoleSchema: z.ZodObject<Omit<{
48
54
  _id: z.ZodString;
49
- created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
50
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
55
+ created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
56
+ created_by: z.ZodDefault<z.ZodString>;
57
+ updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
58
+ updated_by: z.ZodDefault<z.ZodString>;
51
59
  } & {
52
60
  name: z.ZodString;
53
61
  permissions: z.ZodArray<z.ZodObject<{
@@ -64,6 +72,8 @@ export declare const CreateRoleSchema: z.ZodObject<Omit<{
64
72
  resource?: Record<string, any> | null | undefined;
65
73
  }>, "many">;
66
74
  }, "_id" | "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
75
+ created_by: string;
76
+ updated_by: string;
67
77
  name: string;
68
78
  permissions: {
69
79
  scope: string;
@@ -77,8 +87,12 @@ export declare const CreateRoleSchema: z.ZodObject<Omit<{
77
87
  action: string;
78
88
  resource?: Record<string, any> | null | undefined;
79
89
  }[];
90
+ created_by?: string | undefined;
91
+ updated_by?: string | undefined;
80
92
  }>;
81
93
  export declare const UpdateRoleSchema: z.ZodObject<{
94
+ created_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
95
+ updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
82
96
  name: z.ZodOptional<z.ZodString>;
83
97
  permissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
84
98
  action: z.ZodString;
@@ -94,6 +108,8 @@ export declare const UpdateRoleSchema: z.ZodObject<{
94
108
  resource?: Record<string, any> | null | undefined;
95
109
  }>, "many">>;
96
110
  }, "strict", z.ZodTypeAny, {
111
+ created_by?: string | undefined;
112
+ updated_by?: string | undefined;
97
113
  name?: string | undefined;
98
114
  permissions?: {
99
115
  scope: string;
@@ -101,6 +117,8 @@ export declare const UpdateRoleSchema: z.ZodObject<{
101
117
  resource?: Record<string, any> | null | undefined;
102
118
  }[] | undefined;
103
119
  }, {
120
+ created_by?: string | undefined;
121
+ updated_by?: string | undefined;
104
122
  name?: string | undefined;
105
123
  permissions?: {
106
124
  scope: string;
@@ -2,42 +2,52 @@ import { type UnixTimestamp } from '../_common/unix-timestamp.js';
2
2
  import { z } from 'zod';
3
3
  export declare const SessionSchema: z.ZodObject<{
4
4
  _id: z.ZodString;
5
- created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
6
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
5
+ created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
6
+ created_by: z.ZodDefault<z.ZodString>;
7
+ updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
8
+ updated_by: z.ZodDefault<z.ZodString>;
7
9
  } & {
8
10
  expires_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
9
11
  token: z.ZodString;
10
12
  user_id: z.ZodString;
11
13
  }, "strict", z.ZodTypeAny, {
12
14
  _id: string;
13
- user_id: string;
14
- token: string;
15
- created_at?: (number & {
15
+ created_at: number & {
16
16
  __brand: "UnixTimestamp";
17
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
18
- updated_at?: (number & {
17
+ };
18
+ created_by: string;
19
+ updated_at: number & {
19
20
  __brand: "UnixTimestamp";
20
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
21
+ };
22
+ updated_by: string;
23
+ user_id: string;
24
+ token: string;
21
25
  expires_at?: (number & {
22
26
  __brand: "UnixTimestamp";
23
27
  } & z.BRAND<"UnixTimestamp">) | null | undefined;
24
28
  }, {
25
29
  _id: string;
30
+ created_at: number;
31
+ updated_at: number;
26
32
  user_id: string;
27
33
  token: string;
28
- created_at?: number | null | undefined;
29
- updated_at?: number | null | undefined;
34
+ created_by?: string | undefined;
35
+ updated_by?: string | undefined;
30
36
  expires_at?: number | null | undefined;
31
37
  }>;
32
38
  export declare const CreateSessionSchema: z.ZodObject<Omit<{
33
39
  _id: z.ZodString;
34
- created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
35
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
40
+ created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
41
+ created_by: z.ZodDefault<z.ZodString>;
42
+ updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
43
+ updated_by: z.ZodDefault<z.ZodString>;
36
44
  } & {
37
45
  expires_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
38
46
  token: z.ZodString;
39
47
  user_id: z.ZodString;
40
48
  }, "_id" | "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
49
+ created_by: string;
50
+ updated_by: string;
41
51
  user_id: string;
42
52
  token: string;
43
53
  expires_at?: (number & {
@@ -46,19 +56,27 @@ export declare const CreateSessionSchema: z.ZodObject<Omit<{
46
56
  }, {
47
57
  user_id: string;
48
58
  token: string;
59
+ created_by?: string | undefined;
60
+ updated_by?: string | undefined;
49
61
  expires_at?: number | null | undefined;
50
62
  }>;
51
63
  export declare const UpdateSessionSchema: z.ZodObject<{
64
+ created_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
65
+ updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
52
66
  user_id: z.ZodOptional<z.ZodString>;
53
67
  expires_at: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>>;
54
68
  token: z.ZodOptional<z.ZodString>;
55
69
  }, "strict", z.ZodTypeAny, {
70
+ created_by?: string | undefined;
71
+ updated_by?: string | undefined;
56
72
  user_id?: string | undefined;
57
73
  expires_at?: (number & {
58
74
  __brand: "UnixTimestamp";
59
75
  } & z.BRAND<"UnixTimestamp">) | null | undefined;
60
76
  token?: string | undefined;
61
77
  }, {
78
+ created_by?: string | undefined;
79
+ updated_by?: string | undefined;
62
80
  user_id?: string | undefined;
63
81
  expires_at?: number | null | undefined;
64
82
  token?: string | undefined;
@@ -5,8 +5,10 @@ export declare const UserPreferenceValueSchema: z.ZodUnion<[z.ZodString, z.ZodNu
5
5
  export type UserPreferenceValue = z.infer<typeof UserPreferenceValueSchema>;
6
6
  export declare const UserSchema: z.ZodObject<{
7
7
  _id: z.ZodString;
8
- created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
9
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
8
+ created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
9
+ created_by: z.ZodDefault<z.ZodString>;
10
+ updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
11
+ updated_by: z.ZodDefault<z.ZodString>;
10
12
  } & {
11
13
  avatar: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
14
  bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -37,6 +39,14 @@ export declare const UserSchema: z.ZodObject<{
37
39
  verification_token_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
38
40
  }, "strict", z.ZodTypeAny, {
39
41
  _id: string;
42
+ created_at: number & {
43
+ __brand: "UnixTimestamp";
44
+ };
45
+ created_by: string;
46
+ updated_at: number & {
47
+ __brand: "UnixTimestamp";
48
+ };
49
+ updated_by: string;
40
50
  email: string;
41
51
  permissions: {
42
52
  scope: string;
@@ -49,12 +59,6 @@ export declare const UserSchema: z.ZodObject<{
49
59
  role_ids: string[];
50
60
  session_ids: string[];
51
61
  verification_token_ids: string[];
52
- created_at?: (number & {
53
- __brand: "UnixTimestamp";
54
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
55
- updated_at?: (number & {
56
- __brand: "UnixTimestamp";
57
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
58
62
  phone?: string | null | undefined;
59
63
  avatar?: string | null | undefined;
60
64
  bio?: string | null | undefined;
@@ -66,6 +70,8 @@ export declare const UserSchema: z.ZodObject<{
66
70
  theme_id?: string | null | undefined;
67
71
  }, {
68
72
  _id: string;
73
+ created_at: number;
74
+ updated_at: number;
69
75
  email: string;
70
76
  permissions: {
71
77
  scope: string;
@@ -74,8 +80,8 @@ export declare const UserSchema: z.ZodObject<{
74
80
  }[];
75
81
  first_name: string;
76
82
  last_name: string;
77
- created_at?: number | null | undefined;
78
- updated_at?: number | null | undefined;
83
+ created_by?: string | undefined;
84
+ updated_by?: string | undefined;
79
85
  phone?: string | null | undefined;
80
86
  avatar?: string | null | undefined;
81
87
  bio?: string | null | undefined;
@@ -90,8 +96,10 @@ export declare const UserSchema: z.ZodObject<{
90
96
  }>;
91
97
  export declare const CreateUserSchema: z.ZodObject<Omit<{
92
98
  _id: z.ZodString;
93
- created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
94
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
99
+ created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
100
+ created_by: z.ZodDefault<z.ZodString>;
101
+ updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
102
+ updated_by: z.ZodDefault<z.ZodString>;
95
103
  } & {
96
104
  avatar: z.ZodOptional<z.ZodNullable<z.ZodString>>;
97
105
  bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -121,6 +129,8 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
121
129
  theme_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
122
130
  verification_token_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
123
131
  }, "_id" | "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
132
+ created_by: string;
133
+ updated_by: string;
124
134
  email: string;
125
135
  permissions: {
126
136
  scope: string;
@@ -151,6 +161,8 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
151
161
  }[];
152
162
  first_name: string;
153
163
  last_name: string;
164
+ created_by?: string | undefined;
165
+ updated_by?: string | undefined;
154
166
  phone?: string | null | undefined;
155
167
  avatar?: string | null | undefined;
156
168
  bio?: string | null | undefined;
@@ -164,6 +176,8 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
164
176
  verification_token_ids?: string[] | undefined;
165
177
  }>;
166
178
  export declare const UpdateUserSchema: z.ZodObject<{
179
+ created_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
180
+ updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
167
181
  phone: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
168
182
  email: z.ZodOptional<z.ZodString>;
169
183
  permissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -192,6 +206,8 @@ export declare const UpdateUserSchema: z.ZodObject<{
192
206
  theme_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
193
207
  verification_token_ids: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
194
208
  }, "strict", z.ZodTypeAny, {
209
+ created_by?: string | undefined;
210
+ updated_by?: string | undefined;
195
211
  phone?: string | null | undefined;
196
212
  email?: string | undefined;
197
213
  permissions?: {
@@ -214,6 +230,8 @@ export declare const UpdateUserSchema: z.ZodObject<{
214
230
  theme_id?: string | null | undefined;
215
231
  verification_token_ids?: string[] | undefined;
216
232
  }, {
233
+ created_by?: string | undefined;
234
+ updated_by?: string | undefined;
217
235
  phone?: string | null | undefined;
218
236
  email?: string | undefined;
219
237
  permissions?: {
@@ -2,42 +2,52 @@ import { type UnixTimestamp } from '../_common/unix-timestamp.js';
2
2
  import { z } from 'zod';
3
3
  export declare const VerificationTokenSchema: z.ZodObject<{
4
4
  _id: z.ZodString;
5
- created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
6
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
5
+ created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
6
+ created_by: z.ZodDefault<z.ZodString>;
7
+ updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
8
+ updated_by: z.ZodDefault<z.ZodString>;
7
9
  } & {
8
10
  expires_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
9
11
  token: z.ZodString;
10
12
  user_id: z.ZodString;
11
13
  }, "strict", z.ZodTypeAny, {
12
14
  _id: string;
15
+ created_at: number & {
16
+ __brand: "UnixTimestamp";
17
+ };
18
+ created_by: string;
19
+ updated_at: number & {
20
+ __brand: "UnixTimestamp";
21
+ };
22
+ updated_by: string;
13
23
  user_id: string;
14
24
  expires_at: number & {
15
25
  __brand: "UnixTimestamp";
16
26
  } & z.BRAND<"UnixTimestamp">;
17
27
  token: string;
18
- created_at?: (number & {
19
- __brand: "UnixTimestamp";
20
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
21
- updated_at?: (number & {
22
- __brand: "UnixTimestamp";
23
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
24
28
  }, {
25
29
  _id: string;
30
+ created_at: number;
31
+ updated_at: number;
26
32
  user_id: string;
27
33
  expires_at: number;
28
34
  token: string;
29
- created_at?: number | null | undefined;
30
- updated_at?: number | null | undefined;
35
+ created_by?: string | undefined;
36
+ updated_by?: string | undefined;
31
37
  }>;
32
38
  export declare const CreateVerificationTokenSchema: z.ZodObject<Omit<{
33
39
  _id: z.ZodString;
34
- created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
35
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
40
+ created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
41
+ created_by: z.ZodDefault<z.ZodString>;
42
+ updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
43
+ updated_by: z.ZodDefault<z.ZodString>;
36
44
  } & {
37
45
  expires_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
38
46
  token: z.ZodString;
39
47
  user_id: z.ZodString;
40
48
  }, "_id" | "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
49
+ created_by: string;
50
+ updated_by: string;
41
51
  user_id: string;
42
52
  expires_at: number & {
43
53
  __brand: "UnixTimestamp";
@@ -47,18 +57,26 @@ export declare const CreateVerificationTokenSchema: z.ZodObject<Omit<{
47
57
  user_id: string;
48
58
  expires_at: number;
49
59
  token: string;
60
+ created_by?: string | undefined;
61
+ updated_by?: string | undefined;
50
62
  }>;
51
63
  export declare const UpdateVerificationTokenSchema: z.ZodObject<{
64
+ created_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
65
+ updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
52
66
  user_id: z.ZodOptional<z.ZodString>;
53
67
  expires_at: z.ZodOptional<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
54
68
  token: z.ZodOptional<z.ZodString>;
55
69
  }, "strict", z.ZodTypeAny, {
70
+ created_by?: string | undefined;
71
+ updated_by?: string | undefined;
56
72
  user_id?: string | undefined;
57
73
  expires_at?: (number & {
58
74
  __brand: "UnixTimestamp";
59
75
  } & z.BRAND<"UnixTimestamp">) | undefined;
60
76
  token?: string | undefined;
61
77
  }, {
78
+ created_by?: string | undefined;
79
+ updated_by?: string | undefined;
62
80
  user_id?: string | undefined;
63
81
  expires_at?: number | undefined;
64
82
  token?: string | undefined;