@tmlmobilidade/types 20250909.1538.52 → 20250910.1344.34

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 (35) hide show
  1. package/dist/src/_common/comment.d.ts +20 -12
  2. package/dist/src/_common/comment.js +0 -1
  3. package/dist/src/_common/document.d.ts +14 -8
  4. package/dist/src/_common/document.js +4 -2
  5. package/dist/src/_common/proposed-change.d.ts +37 -19
  6. package/dist/src/agency.d.ts +30 -12
  7. package/dist/src/alert.d.ts +21 -12
  8. package/dist/src/auth/role.d.ts +30 -12
  9. package/dist/src/auth/session.d.ts +30 -12
  10. package/dist/src/auth/user.d.ts +30 -12
  11. package/dist/src/auth/verification-token.d.ts +30 -12
  12. package/dist/src/file.d.ts +23 -23
  13. package/dist/src/organization.d.ts +30 -12
  14. package/dist/src/plans/gtfs-validation.d.ts +30 -12
  15. package/dist/src/plans/plan.d.ts +30 -12
  16. package/dist/src/rides/index.d.ts +2 -1
  17. package/dist/src/rides/index.js +2 -1
  18. package/dist/src/rides/ride-audit.d.ts +219 -0
  19. package/dist/src/rides/ride-audit.js +12 -0
  20. package/dist/src/rides/ride-justification.d.ts +447 -0
  21. package/dist/src/rides/ride-justification.js +43 -0
  22. package/dist/src/rides/ride-overrides.d.ts +9 -0
  23. package/dist/src/rides/ride-overrides.js +6 -0
  24. package/dist/src/rides/ride.d.ts +38 -20
  25. package/dist/src/sams/sam.d.ts +30 -12
  26. package/dist/src/simplified-apex/simplified-apex-location.d.ts +32 -20
  27. package/dist/src/simplified-apex/simplified-apex-on-board-refund.d.ts +32 -20
  28. package/dist/src/simplified-apex/simplified-apex-on-board-sale.d.ts +32 -20
  29. package/dist/src/simplified-apex/simplified-apex-validation.d.ts +32 -20
  30. package/dist/src/stop.d.ts +146 -101
  31. package/dist/src/vehicle-event.d.ts +18 -12
  32. package/dist/src/zone.d.ts +24 -6
  33. package/package.json +1 -1
  34. package/dist/src/rides/ride-annotation.d.ts +0 -579
  35. package/dist/src/rides/ride-annotation.js +0 -34
@@ -1,25 +1,33 @@
1
+ import { type UnixTimestamp } from './unix-timestamp.js';
1
2
  import { z } from 'zod';
2
3
  export declare const CommentSchema: z.ZodObject<{
3
- created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("./unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>;
4
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("./unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>;
4
+ created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
5
+ created_by: z.ZodDefault<z.ZodString>;
6
+ updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
7
+ updated_by: z.ZodDefault<z.ZodString>;
5
8
  } & {
6
9
  _id: z.ZodString;
7
10
  text: z.ZodString;
8
- user_id: z.ZodString;
9
11
  }, "strict", z.ZodTypeAny, {
10
12
  _id: string;
11
- text: string;
12
- user_id: string;
13
- created_at?: (number & {
13
+ created_at: number & {
14
14
  __brand: "UnixTimestamp";
15
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
16
- updated_at?: (number & {
15
+ } & z.BRAND<"UnixTimestamp">;
16
+ created_by: string;
17
+ updated_at: number & {
17
18
  __brand: "UnixTimestamp";
18
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
19
+ } & z.BRAND<"UnixTimestamp">;
20
+ updated_by: string;
21
+ text: string;
19
22
  }, {
20
23
  _id: string;
24
+ created_at: number;
25
+ updated_at: number;
21
26
  text: string;
22
- user_id: string;
23
- created_at?: number | null | undefined;
24
- updated_at?: number | null | undefined;
27
+ created_by?: string | undefined;
28
+ updated_by?: string | undefined;
25
29
  }>;
30
+ export interface Comment extends Omit<z.infer<typeof CommentSchema>, 'created_at' | 'updated_at'> {
31
+ created_at: UnixTimestamp;
32
+ updated_at: UnixTimestamp;
33
+ }
@@ -5,5 +5,4 @@ import { z } from 'zod';
5
5
  export const CommentSchema = DocumentSchema.extend({
6
6
  _id: z.string(),
7
7
  text: z.string(),
8
- user_id: z.string(),
9
8
  }).strict();
@@ -1,18 +1,24 @@
1
1
  import { z } from 'zod';
2
2
  export declare const DocumentSchema: z.ZodObject<{
3
3
  _id: z.ZodString;
4
- created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("./unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>;
5
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("./unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>;
4
+ created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, import("./unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">;
5
+ created_by: z.ZodDefault<z.ZodString>;
6
+ updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, import("./unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">;
7
+ updated_by: z.ZodDefault<z.ZodString>;
6
8
  }, "strip", z.ZodTypeAny, {
7
9
  _id: string;
8
- created_at?: (number & {
10
+ created_at: number & {
9
11
  __brand: "UnixTimestamp";
10
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
11
- updated_at?: (number & {
12
+ } & z.BRAND<"UnixTimestamp">;
13
+ created_by: string;
14
+ updated_at: number & {
12
15
  __brand: "UnixTimestamp";
13
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
16
+ } & z.BRAND<"UnixTimestamp">;
17
+ updated_by: string;
14
18
  }, {
15
19
  _id: string;
16
- created_at?: number | null | undefined;
17
- updated_at?: number | null | undefined;
20
+ created_at: number;
21
+ updated_at: number;
22
+ created_by?: string | undefined;
23
+ updated_by?: string | undefined;
18
24
  }>;
@@ -4,6 +4,8 @@ import { z } from 'zod';
4
4
  /* * */
5
5
  export const DocumentSchema = z.object({
6
6
  _id: z.string(),
7
- created_at: z.number().transform(validateUnixTimestamp).brand('UnixTimestamp').nullish(),
8
- updated_at: z.number().transform(validateUnixTimestamp).brand('UnixTimestamp').nullish(),
7
+ created_at: z.number().transform(validateUnixTimestamp).brand('UnixTimestamp'),
8
+ created_by: z.string().default('system'),
9
+ updated_at: z.number().transform(validateUnixTimestamp).brand('UnixTimestamp'),
10
+ updated_by: z.string().default('system'),
9
11
  });
@@ -4,8 +4,10 @@ export declare const scopeSchema: z.ZodEnum<["stop", "lines"]>;
4
4
  export declare const statusSchema: z.ZodDefault<z.ZodEnum<["pending", "accepted", "declined"]>>;
5
5
  export declare const ProposedChangeSchema: z.ZodObject<{
6
6
  _id: z.ZodString;
7
- created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
8
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
7
+ created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
8
+ created_by: z.ZodDefault<z.ZodString>;
9
+ updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
10
+ updated_by: z.ZodDefault<z.ZodString>;
9
11
  } & {
10
12
  field_path: z.ZodString;
11
13
  field_value: z.ZodAny;
@@ -15,33 +17,39 @@ export declare const ProposedChangeSchema: z.ZodObject<{
15
17
  user_id: z.ZodString;
16
18
  }, "strict", z.ZodTypeAny, {
17
19
  _id: string;
20
+ created_at: number & {
21
+ __brand: "UnixTimestamp";
22
+ } & z.BRAND<"UnixTimestamp">;
18
23
  status: "pending" | "accepted" | "declined";
19
- user_id: string;
24
+ created_by: string;
25
+ updated_at: number & {
26
+ __brand: "UnixTimestamp";
27
+ } & z.BRAND<"UnixTimestamp">;
28
+ updated_by: string;
20
29
  field_path: string;
21
30
  scope: "stop" | "lines";
22
31
  target_id: string;
23
- created_at?: (number & {
24
- __brand: "UnixTimestamp";
25
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
26
- updated_at?: (number & {
27
- __brand: "UnixTimestamp";
28
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
32
+ user_id: string;
29
33
  field_value?: any;
30
34
  }, {
31
35
  _id: string;
32
- user_id: string;
36
+ created_at: number;
37
+ updated_at: number;
33
38
  field_path: string;
34
39
  scope: "stop" | "lines";
35
40
  target_id: string;
36
- created_at?: number | null | undefined;
37
- updated_at?: number | null | undefined;
41
+ user_id: string;
38
42
  status?: "pending" | "accepted" | "declined" | undefined;
43
+ created_by?: string | undefined;
44
+ updated_by?: string | undefined;
39
45
  field_value?: any;
40
46
  }>;
41
47
  export declare const CreateProposedChangeSchema: z.ZodObject<Omit<{
42
48
  _id: z.ZodString;
43
- created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
44
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
49
+ created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
50
+ created_by: z.ZodDefault<z.ZodString>;
51
+ updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
52
+ updated_by: z.ZodDefault<z.ZodString>;
45
53
  } & {
46
54
  field_path: z.ZodString;
47
55
  field_value: z.ZodAny;
@@ -51,40 +59,50 @@ export declare const CreateProposedChangeSchema: z.ZodObject<Omit<{
51
59
  user_id: z.ZodString;
52
60
  }, "_id" | "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
53
61
  status: "pending" | "accepted" | "declined";
54
- user_id: string;
62
+ created_by: string;
63
+ updated_by: string;
55
64
  field_path: string;
56
65
  scope: "stop" | "lines";
57
66
  target_id: string;
67
+ user_id: string;
58
68
  field_value?: any;
59
69
  }, {
60
- user_id: string;
61
70
  field_path: string;
62
71
  scope: "stop" | "lines";
63
72
  target_id: string;
73
+ user_id: string;
64
74
  status?: "pending" | "accepted" | "declined" | undefined;
75
+ created_by?: string | undefined;
76
+ updated_by?: string | undefined;
65
77
  field_value?: any;
66
78
  }>;
67
79
  export declare const UpdateProposedChangeSchema: z.ZodObject<{
68
80
  status: z.ZodOptional<z.ZodDefault<z.ZodEnum<["pending", "accepted", "declined"]>>>;
69
- user_id: z.ZodOptional<z.ZodString>;
81
+ created_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
82
+ updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
70
83
  field_path: z.ZodOptional<z.ZodString>;
71
84
  field_value: z.ZodOptional<z.ZodAny>;
72
85
  scope: z.ZodOptional<z.ZodEnum<["stop", "lines"]>>;
73
86
  target_id: z.ZodOptional<z.ZodString>;
87
+ user_id: z.ZodOptional<z.ZodString>;
74
88
  }, "strict", z.ZodTypeAny, {
75
89
  status?: "pending" | "accepted" | "declined" | undefined;
76
- user_id?: string | undefined;
90
+ created_by?: string | undefined;
91
+ updated_by?: string | undefined;
77
92
  field_path?: string | undefined;
78
93
  field_value?: any;
79
94
  scope?: "stop" | "lines" | undefined;
80
95
  target_id?: string | undefined;
96
+ user_id?: string | undefined;
81
97
  }, {
82
98
  status?: "pending" | "accepted" | "declined" | undefined;
83
- user_id?: string | undefined;
99
+ created_by?: string | undefined;
100
+ updated_by?: string | undefined;
84
101
  field_path?: string | undefined;
85
102
  field_value?: any;
86
103
  scope?: "stop" | "lines" | undefined;
87
104
  target_id?: string | undefined;
105
+ user_id?: string | undefined;
88
106
  }>;
89
107
  export type Scope = z.infer<typeof scopeSchema>;
90
108
  export type Status = z.infer<typeof statusSchema>;
@@ -3,8 +3,10 @@ import { type UnixTimestamp } from './_common/unix-timestamp.js';
3
3
  import { z } from 'zod';
4
4
  export declare const AgencySchema: z.ZodObject<{
5
5
  _id: z.ZodString;
6
- created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
7
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
6
+ created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
7
+ created_by: z.ZodDefault<z.ZodString>;
8
+ updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
9
+ updated_by: z.ZodDefault<z.ZodString>;
8
10
  } & {
9
11
  contact_emails_pta: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
10
12
  contact_emails_pto: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
@@ -28,6 +30,14 @@ export declare const AgencySchema: z.ZodObject<{
28
30
  website_url: z.ZodString;
29
31
  }, "strip", z.ZodTypeAny, {
30
32
  _id: string;
33
+ created_at: number & {
34
+ __brand: "UnixTimestamp";
35
+ } & z.BRAND<"UnixTimestamp">;
36
+ created_by: string;
37
+ updated_at: number & {
38
+ __brand: "UnixTimestamp";
39
+ } & z.BRAND<"UnixTimestamp">;
40
+ updated_by: string;
31
41
  contact_emails_pta: string[];
32
42
  contact_emails_pto: string[];
33
43
  fare_url: string;
@@ -44,14 +54,10 @@ export declare const AgencySchema: z.ZodObject<{
44
54
  short_name: string;
45
55
  timezone: string;
46
56
  website_url: string;
47
- created_at?: (number & {
48
- __brand: "UnixTimestamp";
49
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
50
- updated_at?: (number & {
51
- __brand: "UnixTimestamp";
52
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
53
57
  }, {
54
58
  _id: string;
59
+ created_at: number;
60
+ updated_at: number;
55
61
  fare_url: string;
56
62
  financials: {
57
63
  price_per_km: number;
@@ -63,16 +69,18 @@ export declare const AgencySchema: z.ZodObject<{
63
69
  public_email: string;
64
70
  short_name: string;
65
71
  website_url: string;
66
- created_at?: number | null | undefined;
67
- updated_at?: number | null | undefined;
72
+ created_by?: string | undefined;
73
+ updated_by?: string | undefined;
68
74
  contact_emails_pta?: string[] | undefined;
69
75
  contact_emails_pto?: string[] | undefined;
70
76
  timezone?: string | undefined;
71
77
  }>;
72
78
  export declare const CreateAgencySchema: z.ZodObject<Omit<{
73
79
  _id: z.ZodString;
74
- created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
75
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
80
+ created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
81
+ created_by: z.ZodDefault<z.ZodString>;
82
+ updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
83
+ updated_by: z.ZodDefault<z.ZodString>;
76
84
  } & {
77
85
  contact_emails_pta: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
78
86
  contact_emails_pto: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
@@ -96,6 +104,8 @@ export declare const CreateAgencySchema: z.ZodObject<Omit<{
96
104
  website_url: z.ZodString;
97
105
  }, "created_at" | "updated_at">, "strip", z.ZodTypeAny, {
98
106
  _id: string;
107
+ created_by: string;
108
+ updated_by: string;
99
109
  contact_emails_pta: string[];
100
110
  contact_emails_pto: string[];
101
111
  fare_url: string;
@@ -125,12 +135,16 @@ export declare const CreateAgencySchema: z.ZodObject<Omit<{
125
135
  public_email: string;
126
136
  short_name: string;
127
137
  website_url: string;
138
+ created_by?: string | undefined;
139
+ updated_by?: string | undefined;
128
140
  contact_emails_pta?: string[] | undefined;
129
141
  contact_emails_pto?: string[] | undefined;
130
142
  timezone?: string | undefined;
131
143
  }>;
132
144
  export declare const UpdateAgencySchema: z.ZodObject<{
133
145
  _id: z.ZodOptional<z.ZodString>;
146
+ created_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
147
+ updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
134
148
  contact_emails_pta: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
135
149
  contact_emails_pto: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
136
150
  fare_url: z.ZodOptional<z.ZodString>;
@@ -153,6 +167,8 @@ export declare const UpdateAgencySchema: z.ZodObject<{
153
167
  website_url: z.ZodOptional<z.ZodString>;
154
168
  }, "strip", z.ZodTypeAny, {
155
169
  _id?: string | undefined;
170
+ created_by?: string | undefined;
171
+ updated_by?: string | undefined;
156
172
  contact_emails_pta?: string[] | undefined;
157
173
  contact_emails_pto?: string[] | undefined;
158
174
  fare_url?: string | undefined;
@@ -171,6 +187,8 @@ export declare const UpdateAgencySchema: z.ZodObject<{
171
187
  website_url?: string | undefined;
172
188
  }, {
173
189
  _id?: string | undefined;
190
+ created_by?: string | undefined;
191
+ updated_by?: string | undefined;
174
192
  contact_emails_pta?: string[] | undefined;
175
193
  contact_emails_pto?: string[] | undefined;
176
194
  fare_url?: string | undefined;
@@ -7,8 +7,9 @@ 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.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
11
+ updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
12
+ updated_by: z.ZodDefault<z.ZodString>;
12
13
  } & {
13
14
  active_period_end_date: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
14
15
  active_period_start_date: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
@@ -39,8 +40,15 @@ export declare const AlertSchema: z.ZodObject<{
39
40
  type: z.ZodEnum<["PLANNED", "REALTIME"]>;
40
41
  }, "strict", z.ZodTypeAny, {
41
42
  _id: string;
43
+ created_at: number & {
44
+ __brand: "UnixTimestamp";
45
+ } & z.BRAND<"UnixTimestamp">;
42
46
  type: "PLANNED" | "REALTIME";
43
47
  created_by: string;
48
+ updated_at: number & {
49
+ __brand: "UnixTimestamp";
50
+ } & z.BRAND<"UnixTimestamp">;
51
+ updated_by: string;
44
52
  municipality_ids: string[];
45
53
  active_period_start_date: number & {
46
54
  __brand: "UnixTimestamp";
@@ -59,12 +67,6 @@ 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
70
  active_period_end_date?: (number & {
69
71
  __brand: "UnixTimestamp";
70
72
  } & z.BRAND<"UnixTimestamp">) | null | undefined;
@@ -76,8 +78,10 @@ export declare const AlertSchema: z.ZodObject<{
76
78
  } & z.BRAND<"UnixTimestamp">) | null | undefined;
77
79
  }, {
78
80
  _id: string;
81
+ created_at: number;
79
82
  type: "PLANNED" | "REALTIME";
80
83
  created_by: string;
84
+ updated_at: number;
81
85
  municipality_ids: string[];
82
86
  active_period_start_date: number;
83
87
  cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "HOLIDAY" | "MAINTENANCE" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "STRIKE" | "TECHNICAL_PROBLEM" | "UNKNOWN_CAUSE" | "WEATHER";
@@ -92,8 +96,7 @@ export declare const AlertSchema: z.ZodObject<{
92
96
  parent_id: string;
93
97
  }[];
94
98
  title: string;
95
- created_at?: number | null | undefined;
96
- updated_at?: number | null | undefined;
99
+ updated_by?: string | undefined;
97
100
  active_period_end_date?: number | null | undefined;
98
101
  coordinates?: [number, number] | null | undefined;
99
102
  file_id?: string | null | undefined;
@@ -102,8 +105,9 @@ export declare const AlertSchema: z.ZodObject<{
102
105
  }>;
103
106
  export declare const CreateAlertSchema: z.ZodObject<Omit<{
104
107
  _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">>>;
108
+ created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
109
+ updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
110
+ updated_by: z.ZodDefault<z.ZodString>;
107
111
  } & {
108
112
  active_period_end_date: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
109
113
  active_period_start_date: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
@@ -135,6 +139,7 @@ export declare const CreateAlertSchema: z.ZodObject<Omit<{
135
139
  }, "_id" | "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
136
140
  type: "PLANNED" | "REALTIME";
137
141
  created_by: string;
142
+ updated_by: string;
138
143
  municipality_ids: string[];
139
144
  active_period_start_date: number & {
140
145
  __brand: "UnixTimestamp";
@@ -179,6 +184,7 @@ export declare const CreateAlertSchema: z.ZodObject<Omit<{
179
184
  parent_id: string;
180
185
  }[];
181
186
  title: string;
187
+ updated_by?: string | undefined;
182
188
  active_period_end_date?: number | null | undefined;
183
189
  coordinates?: [number, number] | null | undefined;
184
190
  file_id?: string | null | undefined;
@@ -188,6 +194,7 @@ export declare const CreateAlertSchema: z.ZodObject<Omit<{
188
194
  export declare const UpdateAlertSchema: z.ZodObject<{
189
195
  type: z.ZodOptional<z.ZodEnum<["PLANNED", "REALTIME"]>>;
190
196
  created_by: z.ZodOptional<z.ZodString>;
197
+ updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
191
198
  municipality_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
192
199
  active_period_end_date: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>>;
193
200
  active_period_start_date: z.ZodOptional<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
@@ -216,6 +223,7 @@ export declare const UpdateAlertSchema: z.ZodObject<{
216
223
  }, "strict", z.ZodTypeAny, {
217
224
  type?: "PLANNED" | "REALTIME" | undefined;
218
225
  created_by?: string | undefined;
226
+ updated_by?: string | undefined;
219
227
  municipality_ids?: string[] | undefined;
220
228
  active_period_end_date?: (number & {
221
229
  __brand: "UnixTimestamp";
@@ -246,6 +254,7 @@ export declare const UpdateAlertSchema: z.ZodObject<{
246
254
  }, {
247
255
  type?: "PLANNED" | "REALTIME" | undefined;
248
256
  created_by?: string | undefined;
257
+ updated_by?: string | undefined;
249
258
  municipality_ids?: string[] | undefined;
250
259
  active_period_end_date?: number | null | undefined;
251
260
  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.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
6
+ created_by: z.ZodDefault<z.ZodString>;
7
+ updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
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
+ } & z.BRAND<"UnixTimestamp">;
29
+ created_by: string;
30
+ updated_at: number & {
31
+ __brand: "UnixTimestamp";
32
+ } & z.BRAND<"UnixTimestamp">;
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.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
56
+ created_by: z.ZodDefault<z.ZodString>;
57
+ updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
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.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
6
+ created_by: z.ZodDefault<z.ZodString>;
7
+ updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
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
+ } & z.BRAND<"UnixTimestamp">;
18
+ created_by: string;
19
+ updated_at: number & {
19
20
  __brand: "UnixTimestamp";
20
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
21
+ } & z.BRAND<"UnixTimestamp">;
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.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
41
+ created_by: z.ZodDefault<z.ZodString>;
42
+ updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
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;