@tmlmobilidade/types 20251217.1540.37 → 20251222.1537.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_common/comment.js +15 -6
- package/dist/_common/document.d.ts +3 -0
- package/dist/_common/document.js +4 -3
- package/dist/_common/status.d.ts +15 -1
- package/dist/_common/status.js +24 -6
- package/dist/_common/unix-timestamp.d.ts +1 -1
- package/dist/_common/unix-timestamp.js +1 -1
- package/dist/agency.d.ts +18 -13
- package/dist/agency.js +1 -1
- package/dist/alert.d.ts +101 -112
- package/dist/alert.js +18 -19
- package/dist/apex/simplified-apex-location.d.ts +5 -4
- package/dist/apex/simplified-apex-location.js +6 -4
- package/dist/apex/simplified-apex-on-board-refund.d.ts +5 -4
- package/dist/apex/simplified-apex-on-board-refund.js +6 -4
- package/dist/apex/simplified-apex-on-board-sale.d.ts +5 -4
- package/dist/apex/simplified-apex-on-board-sale.js +6 -4
- package/dist/apex/simplified-apex-validation.d.ts +9 -8
- package/dist/apex/simplified-apex-validation.js +6 -4
- package/dist/auth/login.d.ts +1 -1
- package/dist/auth/login.js +1 -1
- package/dist/auth/role.d.ts +260 -149
- package/dist/auth/role.js +1 -1
- package/dist/auth/session.d.ts +9 -7
- package/dist/auth/session.js +6 -4
- package/dist/auth/user.d.ts +737 -207
- package/dist/auth/user.js +12 -9
- package/dist/auth/verification-token.d.ts +9 -14
- package/dist/auth/verification-token.js +8 -6
- package/dist/dates/annotation.d.ts +94 -0
- package/dist/dates/annotation.js +14 -0
- package/dist/dates/index.d.ts +1 -0
- package/dist/dates/index.js +1 -0
- package/dist/file-exports/{common.d.ts → base.d.ts} +6 -5
- package/dist/file-exports/{common.js → base.js} +7 -4
- package/dist/file-exports/file-exports.d.ts +124 -0
- package/dist/file-exports/file-exports.js +7 -0
- package/dist/file-exports/index.d.ts +3 -126
- package/dist/file-exports/index.js +3 -9
- package/dist/file-exports/ride-export.d.ts +13 -13
- package/dist/file-exports/ride-export.js +5 -5
- package/dist/file.d.ts +3 -3
- package/dist/file.js +4 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/notification.d.ts +9 -7
- package/dist/notification.js +4 -2
- package/dist/organization.d.ts +24 -15
- package/dist/organization.js +3 -3
- package/dist/permissions/agencies.d.ts +3 -3
- package/dist/permissions/agencies.js +1 -1
- package/dist/permissions/alerts.d.ts +6 -6
- package/dist/permissions/alerts.js +2 -2
- package/dist/permissions/dates.d.ts +25 -0
- package/dist/permissions/dates.js +16 -0
- package/dist/permissions/gtfs-validations.d.ts +3 -3
- package/dist/permissions/gtfs-validations.js +1 -0
- package/dist/permissions/index.d.ts +49 -27
- package/dist/permissions/index.js +2 -0
- package/dist/permissions/organizations.d.ts +3 -3
- package/dist/permissions/organizations.js +1 -0
- package/dist/permissions/plans.d.ts +3 -3
- package/dist/permissions/plans.js +1 -1
- package/dist/permissions/roles.d.ts +3 -3
- package/dist/permissions/roles.js +1 -0
- package/dist/permissions/stops.d.ts +3 -3
- package/dist/permissions/stops.js +1 -1
- package/dist/permissions/users.d.ts +3 -3
- package/dist/permissions/users.js +1 -0
- package/dist/plans/gtfs-validation.d.ts +12 -3
- package/dist/plans/gtfs-validation.js +1 -1
- package/dist/plans/plan-app-status.js +2 -2
- package/dist/plans/plan-pcgi-legacy.d.ts +1 -1
- package/dist/plans/plan-pcgi-legacy.js +1 -1
- package/dist/plans/plan.d.ts +9 -9
- package/dist/proposed-change.d.ts +12 -3
- package/dist/proposed-change.js +1 -1
- package/dist/rides/ride-acceptance.d.ts +23 -19
- package/dist/rides/ride-acceptance.js +5 -3
- package/dist/rides/ride-analysis.d.ts +16 -16
- package/dist/rides/ride-analysis.js +16 -16
- package/dist/rides/ride-audit.d.ts +11 -11
- package/dist/rides/ride-audit.js +1 -1
- package/dist/rides/ride-overrides.d.ts +1 -1
- package/dist/rides/ride-overrides.js +1 -1
- package/dist/rides/ride.d.ts +56 -55
- package/dist/rides/ride.js +10 -8
- package/dist/sams/sam-analysis.d.ts +1 -1
- package/dist/sams/sam-analysis.js +4 -4
- package/dist/sams/sam.d.ts +13 -13
- package/dist/sams/sam.js +7 -5
- package/dist/stops/connections.d.ts +3 -0
- package/dist/stops/connections.js +15 -0
- package/dist/stops/equipment.d.ts +3 -0
- package/dist/stops/equipment.js +9 -0
- package/dist/stops/facilities.d.ts +4 -0
- package/dist/stops/facilities.js +16 -0
- package/dist/stops/index.d.ts +9 -0
- package/dist/stops/index.js +9 -0
- package/dist/stops/jurisdiction.d.ts +4 -0
- package/dist/stops/jurisdiction.js +10 -0
- package/dist/stops/name-abbreviations.d.ts +11 -0
- package/dist/stops/name-abbreviations.js +117 -0
- package/dist/stops/parent-station.d.ts +76 -0
- package/dist/stops/parent-station.js +11 -0
- package/dist/stops/road-type.d.ts +3 -0
- package/dist/stops/road-type.js +13 -0
- package/dist/stops/stop-area.d.ts +67 -0
- package/dist/stops/stop-area.js +10 -0
- package/dist/{stop.d.ts → stops/stop.d.ts} +271 -345
- package/dist/stops/stop.js +78 -0
- package/dist/vehicle-events/gtfs-rt-vehicle-event-extended.d.ts +1 -21
- package/dist/vehicle-events/gtfs-rt-vehicle-event-extended.js +4 -5
- package/dist/vehicle-events/simplified-vehicle-event.d.ts +4 -3
- package/dist/vehicle-events/simplified-vehicle-event.js +6 -4
- package/dist/zone.d.ts +10 -10
- package/dist/zone.js +1 -1
- package/package.json +2 -2
- package/dist/stop.js +0 -102
package/dist/auth/user.d.ts
CHANGED
|
@@ -1,39 +1,40 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const UserPreferenceValueSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">]>;
|
|
3
3
|
export type UserPreferenceValue = z.infer<typeof UserPreferenceValueSchema>;
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const UserSchema_UNSAFE: z.ZodObject<{
|
|
5
5
|
_id: z.ZodString;
|
|
6
6
|
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
7
7
|
created_by: z.ZodOptional<z.ZodString>;
|
|
8
|
+
is_locked: z.ZodDefault<z.ZodBoolean>;
|
|
8
9
|
updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
9
10
|
updated_by: z.ZodOptional<z.ZodString>;
|
|
10
11
|
} & {
|
|
11
12
|
email: z.ZodString;
|
|
12
|
-
email_verified: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number
|
|
13
|
+
email_verified: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
13
14
|
first_name: z.ZodString;
|
|
14
15
|
last_name: z.ZodString;
|
|
15
|
-
organization_id: z.
|
|
16
|
-
password_hash: z.ZodNullable<z.ZodString
|
|
16
|
+
organization_id: z.ZodString;
|
|
17
|
+
password_hash: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
17
18
|
permissions: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"scope", [z.ZodObject<{
|
|
18
|
-
action: z.ZodEnum<["create", "delete", "read", "
|
|
19
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
19
20
|
scope: z.ZodLiteral<"agencies">;
|
|
20
21
|
}, "strip", z.ZodTypeAny, {
|
|
21
22
|
scope: "agencies";
|
|
22
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
23
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
23
24
|
}, {
|
|
24
25
|
scope: "agencies";
|
|
25
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
26
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
26
27
|
}>, z.ZodObject<{
|
|
27
|
-
action: z.ZodEnum<["create", "delete", "read", "
|
|
28
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
28
29
|
scope: z.ZodLiteral<"alerts_scheduled">;
|
|
29
30
|
}, "strip", z.ZodTypeAny, {
|
|
30
31
|
scope: "alerts_scheduled";
|
|
31
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
32
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
32
33
|
}, {
|
|
33
34
|
scope: "alerts_scheduled";
|
|
34
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
35
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
35
36
|
}>, z.ZodObject<{
|
|
36
|
-
action: z.ZodEnum<["create", "delete", "read", "
|
|
37
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
37
38
|
resources: z.ZodDefault<z.ZodObject<{
|
|
38
39
|
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
39
40
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -44,13 +45,13 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
44
45
|
scope: z.ZodLiteral<"alerts_realtime">;
|
|
45
46
|
}, "strip", z.ZodTypeAny, {
|
|
46
47
|
scope: "alerts_realtime";
|
|
47
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
48
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
48
49
|
resources: {
|
|
49
50
|
agency_ids: string[];
|
|
50
51
|
};
|
|
51
52
|
}, {
|
|
52
53
|
scope: "alerts_realtime";
|
|
53
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
54
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
54
55
|
resources?: {
|
|
55
56
|
agency_ids?: string[] | undefined;
|
|
56
57
|
} | undefined;
|
|
@@ -86,7 +87,7 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
86
87
|
scope: "sams";
|
|
87
88
|
action: "read";
|
|
88
89
|
}>, z.ZodObject<{
|
|
89
|
-
action: z.ZodEnum<["create", "read", "request_approval"]>;
|
|
90
|
+
action: z.ZodEnum<["create", "read", "lock", "request_approval"]>;
|
|
90
91
|
resources: z.ZodDefault<z.ZodObject<{
|
|
91
92
|
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
92
93
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -97,13 +98,13 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
97
98
|
scope: z.ZodLiteral<"gtfs_validations">;
|
|
98
99
|
}, "strip", z.ZodTypeAny, {
|
|
99
100
|
scope: "gtfs_validations";
|
|
100
|
-
action: "create" | "read" | "request_approval";
|
|
101
|
+
action: "create" | "read" | "lock" | "request_approval";
|
|
101
102
|
resources: {
|
|
102
103
|
agency_ids: string[];
|
|
103
104
|
};
|
|
104
105
|
}, {
|
|
105
106
|
scope: "gtfs_validations";
|
|
106
|
-
action: "create" | "read" | "request_approval";
|
|
107
|
+
action: "create" | "read" | "lock" | "request_approval";
|
|
107
108
|
resources?: {
|
|
108
109
|
agency_ids?: string[] | undefined;
|
|
109
110
|
} | undefined;
|
|
@@ -117,14 +118,14 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
117
118
|
scope: "home";
|
|
118
119
|
action: "read_links" | "read_wiki";
|
|
119
120
|
}>, z.ZodObject<{
|
|
120
|
-
action: z.ZodEnum<["create", "delete", "read", "update"]>;
|
|
121
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
121
122
|
scope: z.ZodLiteral<"organizations">;
|
|
122
123
|
}, "strip", z.ZodTypeAny, {
|
|
123
124
|
scope: "organizations";
|
|
124
|
-
action: "create" | "update" | "delete" | "read";
|
|
125
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
125
126
|
}, {
|
|
126
127
|
scope: "organizations";
|
|
127
|
-
action: "create" | "update" | "delete" | "read";
|
|
128
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
128
129
|
}>, z.ZodObject<{
|
|
129
130
|
action: z.ZodEnum<["read"]>;
|
|
130
131
|
scope: z.ZodLiteral<"performance">;
|
|
@@ -135,7 +136,7 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
135
136
|
scope: "performance";
|
|
136
137
|
action: "read";
|
|
137
138
|
}>, z.ZodObject<{
|
|
138
|
-
action: z.ZodEnum<["create", "delete", "read", "read_controller", "read_pcgi_legacy", "
|
|
139
|
+
action: z.ZodEnum<["create", "delete", "read", "read_controller", "read_pcgi_legacy", "lock", "update", "update_controller", "update_feed_info_dates", "update_gtfs_plan", "update_pcgi_legacy"]>;
|
|
139
140
|
resources: z.ZodDefault<z.ZodObject<{
|
|
140
141
|
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
141
142
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -146,27 +147,27 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
146
147
|
scope: z.ZodLiteral<"plans">;
|
|
147
148
|
}, "strip", z.ZodTypeAny, {
|
|
148
149
|
scope: "plans";
|
|
149
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
150
|
+
action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
|
|
150
151
|
resources: {
|
|
151
152
|
agency_ids: string[];
|
|
152
153
|
};
|
|
153
154
|
}, {
|
|
154
155
|
scope: "plans";
|
|
155
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
156
|
+
action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
|
|
156
157
|
resources?: {
|
|
157
158
|
agency_ids?: string[] | undefined;
|
|
158
159
|
} | undefined;
|
|
159
160
|
}>, z.ZodObject<{
|
|
160
|
-
action: z.ZodEnum<["create", "delete", "read", "update"]>;
|
|
161
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
161
162
|
scope: z.ZodLiteral<"roles">;
|
|
162
163
|
}, "strip", z.ZodTypeAny, {
|
|
163
164
|
scope: "roles";
|
|
164
|
-
action: "create" | "update" | "delete" | "read";
|
|
165
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
165
166
|
}, {
|
|
166
167
|
scope: "roles";
|
|
167
|
-
action: "create" | "update" | "delete" | "read";
|
|
168
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
168
169
|
}>, z.ZodObject<{
|
|
169
|
-
action: z.ZodEnum<["create", "delete", "read", "
|
|
170
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
170
171
|
resources: z.ZodDefault<z.ZodObject<{
|
|
171
172
|
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
172
173
|
municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -180,31 +181,54 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
180
181
|
scope: z.ZodLiteral<"stops">;
|
|
181
182
|
}, "strip", z.ZodTypeAny, {
|
|
182
183
|
scope: "stops";
|
|
183
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
184
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
184
185
|
resources: {
|
|
185
186
|
municipality_ids: string[];
|
|
186
187
|
agency_ids: string[];
|
|
187
188
|
};
|
|
188
189
|
}, {
|
|
189
190
|
scope: "stops";
|
|
190
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
191
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
191
192
|
resources?: {
|
|
192
193
|
municipality_ids?: string[] | undefined;
|
|
193
194
|
agency_ids?: string[] | undefined;
|
|
194
195
|
} | undefined;
|
|
195
196
|
}>, z.ZodObject<{
|
|
196
|
-
action: z.ZodEnum<["create", "delete", "read", "update"]>;
|
|
197
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
197
198
|
scope: z.ZodLiteral<"users">;
|
|
198
199
|
}, "strip", z.ZodTypeAny, {
|
|
199
200
|
scope: "users";
|
|
200
|
-
action: "create" | "update" | "delete" | "read";
|
|
201
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
201
202
|
}, {
|
|
202
203
|
scope: "users";
|
|
203
|
-
action: "create" | "update" | "delete" | "read";
|
|
204
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
205
|
+
}>, z.ZodObject<{
|
|
206
|
+
action: z.ZodEnum<["create_annotations", "delete_annotations", "read_annotations", "update_annotations", "lock_annotations"]>;
|
|
207
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
208
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
209
|
+
}, "strip", z.ZodTypeAny, {
|
|
210
|
+
agency_ids: string[];
|
|
211
|
+
}, {
|
|
212
|
+
agency_ids?: string[] | undefined;
|
|
213
|
+
}>>;
|
|
214
|
+
scope: z.ZodLiteral<"dates">;
|
|
215
|
+
}, "strip", z.ZodTypeAny, {
|
|
216
|
+
scope: "dates";
|
|
217
|
+
action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
|
|
218
|
+
resources: {
|
|
219
|
+
agency_ids: string[];
|
|
220
|
+
};
|
|
221
|
+
}, {
|
|
222
|
+
scope: "dates";
|
|
223
|
+
action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
|
|
224
|
+
resources?: {
|
|
225
|
+
agency_ids?: string[] | undefined;
|
|
226
|
+
} | undefined;
|
|
204
227
|
}>]>, "many">>;
|
|
205
|
-
phone: z.ZodNullable<z.ZodString
|
|
206
|
-
preferences: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">]
|
|
228
|
+
phone: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
229
|
+
preferences: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">]>>>>>;
|
|
207
230
|
role_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
231
|
+
seen_last_at: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
208
232
|
session_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
209
233
|
verification_token_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
210
234
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -212,6 +236,7 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
212
236
|
created_at: number & {
|
|
213
237
|
__brand: "UnixTimestamp";
|
|
214
238
|
};
|
|
239
|
+
is_locked: boolean;
|
|
215
240
|
updated_at: number & {
|
|
216
241
|
__brand: "UnixTimestamp";
|
|
217
242
|
};
|
|
@@ -219,13 +244,13 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
219
244
|
email: string;
|
|
220
245
|
permissions: ({
|
|
221
246
|
scope: "agencies";
|
|
222
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
247
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
223
248
|
} | {
|
|
224
249
|
scope: "alerts_scheduled";
|
|
225
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
250
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
226
251
|
} | {
|
|
227
252
|
scope: "alerts_realtime";
|
|
228
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
253
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
229
254
|
resources: {
|
|
230
255
|
agency_ids: string[];
|
|
231
256
|
};
|
|
@@ -238,9 +263,15 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
238
263
|
} | {
|
|
239
264
|
scope: "sams";
|
|
240
265
|
action: "read";
|
|
266
|
+
} | {
|
|
267
|
+
scope: "dates";
|
|
268
|
+
action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
|
|
269
|
+
resources: {
|
|
270
|
+
agency_ids: string[];
|
|
271
|
+
};
|
|
241
272
|
} | {
|
|
242
273
|
scope: "gtfs_validations";
|
|
243
|
-
action: "create" | "read" | "request_approval";
|
|
274
|
+
action: "create" | "read" | "lock" | "request_approval";
|
|
244
275
|
resources: {
|
|
245
276
|
agency_ids: string[];
|
|
246
277
|
};
|
|
@@ -249,37 +280,38 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
249
280
|
action: "read_links" | "read_wiki";
|
|
250
281
|
} | {
|
|
251
282
|
scope: "organizations";
|
|
252
|
-
action: "create" | "update" | "delete" | "read";
|
|
283
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
253
284
|
} | {
|
|
254
285
|
scope: "performance";
|
|
255
286
|
action: "read";
|
|
256
287
|
} | {
|
|
257
288
|
scope: "plans";
|
|
258
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
289
|
+
action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
|
|
259
290
|
resources: {
|
|
260
291
|
agency_ids: string[];
|
|
261
292
|
};
|
|
262
293
|
} | {
|
|
263
294
|
scope: "roles";
|
|
264
|
-
action: "create" | "update" | "delete" | "read";
|
|
295
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
265
296
|
} | {
|
|
266
297
|
scope: "stops";
|
|
267
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
298
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
268
299
|
resources: {
|
|
269
300
|
municipality_ids: string[];
|
|
270
301
|
agency_ids: string[];
|
|
271
302
|
};
|
|
272
303
|
} | {
|
|
273
304
|
scope: "users";
|
|
274
|
-
action: "create" | "update" | "delete" | "read";
|
|
305
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
275
306
|
})[];
|
|
276
307
|
email_verified: import("../_common/unix-timestamp.js").UnixTimestamp | null;
|
|
277
308
|
first_name: string;
|
|
278
309
|
last_name: string;
|
|
279
|
-
organization_id: string
|
|
310
|
+
organization_id: string;
|
|
280
311
|
password_hash: string | null;
|
|
281
312
|
preferences: Record<string, Record<string, string | number | boolean | string[] | number[]>> | null;
|
|
282
313
|
role_ids: string[];
|
|
314
|
+
seen_last_at: import("../_common/unix-timestamp.js").UnixTimestamp | null;
|
|
283
315
|
session_ids: string[];
|
|
284
316
|
verification_token_ids: string[];
|
|
285
317
|
created_by?: string | undefined;
|
|
@@ -288,25 +320,23 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
288
320
|
_id: string;
|
|
289
321
|
created_at: number;
|
|
290
322
|
updated_at: number;
|
|
291
|
-
phone: string | null;
|
|
292
323
|
email: string;
|
|
293
|
-
email_verified: number | null;
|
|
294
324
|
first_name: string;
|
|
295
325
|
last_name: string;
|
|
296
|
-
organization_id: string
|
|
297
|
-
password_hash: string | null;
|
|
298
|
-
preferences: Record<string, Record<string, string | number | boolean | string[] | number[]>> | null;
|
|
326
|
+
organization_id: string;
|
|
299
327
|
created_by?: string | undefined;
|
|
328
|
+
is_locked?: boolean | undefined;
|
|
300
329
|
updated_by?: string | undefined;
|
|
330
|
+
phone?: string | null | undefined;
|
|
301
331
|
permissions?: ({
|
|
302
332
|
scope: "agencies";
|
|
303
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
333
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
304
334
|
} | {
|
|
305
335
|
scope: "alerts_scheduled";
|
|
306
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
336
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
307
337
|
} | {
|
|
308
338
|
scope: "alerts_realtime";
|
|
309
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
339
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
310
340
|
resources?: {
|
|
311
341
|
agency_ids?: string[] | undefined;
|
|
312
342
|
} | undefined;
|
|
@@ -319,9 +349,15 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
319
349
|
} | {
|
|
320
350
|
scope: "sams";
|
|
321
351
|
action: "read";
|
|
352
|
+
} | {
|
|
353
|
+
scope: "dates";
|
|
354
|
+
action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
|
|
355
|
+
resources?: {
|
|
356
|
+
agency_ids?: string[] | undefined;
|
|
357
|
+
} | undefined;
|
|
322
358
|
} | {
|
|
323
359
|
scope: "gtfs_validations";
|
|
324
|
-
action: "create" | "read" | "request_approval";
|
|
360
|
+
action: "create" | "read" | "lock" | "request_approval";
|
|
325
361
|
resources?: {
|
|
326
362
|
agency_ids?: string[] | undefined;
|
|
327
363
|
} | undefined;
|
|
@@ -330,31 +366,35 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
330
366
|
action: "read_links" | "read_wiki";
|
|
331
367
|
} | {
|
|
332
368
|
scope: "organizations";
|
|
333
|
-
action: "create" | "update" | "delete" | "read";
|
|
369
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
334
370
|
} | {
|
|
335
371
|
scope: "performance";
|
|
336
372
|
action: "read";
|
|
337
373
|
} | {
|
|
338
374
|
scope: "plans";
|
|
339
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
375
|
+
action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
|
|
340
376
|
resources?: {
|
|
341
377
|
agency_ids?: string[] | undefined;
|
|
342
378
|
} | undefined;
|
|
343
379
|
} | {
|
|
344
380
|
scope: "roles";
|
|
345
|
-
action: "create" | "update" | "delete" | "read";
|
|
381
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
346
382
|
} | {
|
|
347
383
|
scope: "stops";
|
|
348
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
384
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
349
385
|
resources?: {
|
|
350
386
|
municipality_ids?: string[] | undefined;
|
|
351
387
|
agency_ids?: string[] | undefined;
|
|
352
388
|
} | undefined;
|
|
353
389
|
} | {
|
|
354
390
|
scope: "users";
|
|
355
|
-
action: "create" | "update" | "delete" | "read";
|
|
391
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
356
392
|
})[] | undefined;
|
|
393
|
+
email_verified?: number | null | undefined;
|
|
394
|
+
password_hash?: string | null | undefined;
|
|
395
|
+
preferences?: Record<string, Record<string, string | number | boolean | string[] | number[]>> | null | undefined;
|
|
357
396
|
role_ids?: string[] | undefined;
|
|
397
|
+
seen_last_at?: number | null | undefined;
|
|
358
398
|
session_ids?: string[] | undefined;
|
|
359
399
|
verification_token_ids?: string[] | undefined;
|
|
360
400
|
}>;
|
|
@@ -362,35 +402,36 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
|
|
|
362
402
|
_id: z.ZodString;
|
|
363
403
|
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
364
404
|
created_by: z.ZodOptional<z.ZodString>;
|
|
405
|
+
is_locked: z.ZodDefault<z.ZodBoolean>;
|
|
365
406
|
updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
366
407
|
updated_by: z.ZodOptional<z.ZodString>;
|
|
367
408
|
} & {
|
|
368
409
|
email: z.ZodString;
|
|
369
|
-
email_verified: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number
|
|
410
|
+
email_verified: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
370
411
|
first_name: z.ZodString;
|
|
371
412
|
last_name: z.ZodString;
|
|
372
|
-
organization_id: z.
|
|
373
|
-
password_hash: z.ZodNullable<z.ZodString
|
|
413
|
+
organization_id: z.ZodString;
|
|
414
|
+
password_hash: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
374
415
|
permissions: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"scope", [z.ZodObject<{
|
|
375
|
-
action: z.ZodEnum<["create", "delete", "read", "
|
|
416
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
376
417
|
scope: z.ZodLiteral<"agencies">;
|
|
377
418
|
}, "strip", z.ZodTypeAny, {
|
|
378
419
|
scope: "agencies";
|
|
379
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
420
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
380
421
|
}, {
|
|
381
422
|
scope: "agencies";
|
|
382
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
423
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
383
424
|
}>, z.ZodObject<{
|
|
384
|
-
action: z.ZodEnum<["create", "delete", "read", "
|
|
425
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
385
426
|
scope: z.ZodLiteral<"alerts_scheduled">;
|
|
386
427
|
}, "strip", z.ZodTypeAny, {
|
|
387
428
|
scope: "alerts_scheduled";
|
|
388
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
429
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
389
430
|
}, {
|
|
390
431
|
scope: "alerts_scheduled";
|
|
391
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
432
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
392
433
|
}>, z.ZodObject<{
|
|
393
|
-
action: z.ZodEnum<["create", "delete", "read", "
|
|
434
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
394
435
|
resources: z.ZodDefault<z.ZodObject<{
|
|
395
436
|
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
396
437
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -401,13 +442,13 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
|
|
|
401
442
|
scope: z.ZodLiteral<"alerts_realtime">;
|
|
402
443
|
}, "strip", z.ZodTypeAny, {
|
|
403
444
|
scope: "alerts_realtime";
|
|
404
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
445
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
405
446
|
resources: {
|
|
406
447
|
agency_ids: string[];
|
|
407
448
|
};
|
|
408
449
|
}, {
|
|
409
450
|
scope: "alerts_realtime";
|
|
410
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
451
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
411
452
|
resources?: {
|
|
412
453
|
agency_ids?: string[] | undefined;
|
|
413
454
|
} | undefined;
|
|
@@ -443,7 +484,7 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
|
|
|
443
484
|
scope: "sams";
|
|
444
485
|
action: "read";
|
|
445
486
|
}>, z.ZodObject<{
|
|
446
|
-
action: z.ZodEnum<["create", "read", "request_approval"]>;
|
|
487
|
+
action: z.ZodEnum<["create", "read", "lock", "request_approval"]>;
|
|
447
488
|
resources: z.ZodDefault<z.ZodObject<{
|
|
448
489
|
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
449
490
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -454,13 +495,13 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
|
|
|
454
495
|
scope: z.ZodLiteral<"gtfs_validations">;
|
|
455
496
|
}, "strip", z.ZodTypeAny, {
|
|
456
497
|
scope: "gtfs_validations";
|
|
457
|
-
action: "create" | "read" | "request_approval";
|
|
498
|
+
action: "create" | "read" | "lock" | "request_approval";
|
|
458
499
|
resources: {
|
|
459
500
|
agency_ids: string[];
|
|
460
501
|
};
|
|
461
502
|
}, {
|
|
462
503
|
scope: "gtfs_validations";
|
|
463
|
-
action: "create" | "read" | "request_approval";
|
|
504
|
+
action: "create" | "read" | "lock" | "request_approval";
|
|
464
505
|
resources?: {
|
|
465
506
|
agency_ids?: string[] | undefined;
|
|
466
507
|
} | undefined;
|
|
@@ -474,14 +515,14 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
|
|
|
474
515
|
scope: "home";
|
|
475
516
|
action: "read_links" | "read_wiki";
|
|
476
517
|
}>, z.ZodObject<{
|
|
477
|
-
action: z.ZodEnum<["create", "delete", "read", "update"]>;
|
|
518
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
478
519
|
scope: z.ZodLiteral<"organizations">;
|
|
479
520
|
}, "strip", z.ZodTypeAny, {
|
|
480
521
|
scope: "organizations";
|
|
481
|
-
action: "create" | "update" | "delete" | "read";
|
|
522
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
482
523
|
}, {
|
|
483
524
|
scope: "organizations";
|
|
484
|
-
action: "create" | "update" | "delete" | "read";
|
|
525
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
485
526
|
}>, z.ZodObject<{
|
|
486
527
|
action: z.ZodEnum<["read"]>;
|
|
487
528
|
scope: z.ZodLiteral<"performance">;
|
|
@@ -492,7 +533,7 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
|
|
|
492
533
|
scope: "performance";
|
|
493
534
|
action: "read";
|
|
494
535
|
}>, z.ZodObject<{
|
|
495
|
-
action: z.ZodEnum<["create", "delete", "read", "read_controller", "read_pcgi_legacy", "
|
|
536
|
+
action: z.ZodEnum<["create", "delete", "read", "read_controller", "read_pcgi_legacy", "lock", "update", "update_controller", "update_feed_info_dates", "update_gtfs_plan", "update_pcgi_legacy"]>;
|
|
496
537
|
resources: z.ZodDefault<z.ZodObject<{
|
|
497
538
|
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
498
539
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -503,27 +544,27 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
|
|
|
503
544
|
scope: z.ZodLiteral<"plans">;
|
|
504
545
|
}, "strip", z.ZodTypeAny, {
|
|
505
546
|
scope: "plans";
|
|
506
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
547
|
+
action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
|
|
507
548
|
resources: {
|
|
508
549
|
agency_ids: string[];
|
|
509
550
|
};
|
|
510
551
|
}, {
|
|
511
552
|
scope: "plans";
|
|
512
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
553
|
+
action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
|
|
513
554
|
resources?: {
|
|
514
555
|
agency_ids?: string[] | undefined;
|
|
515
556
|
} | undefined;
|
|
516
557
|
}>, z.ZodObject<{
|
|
517
|
-
action: z.ZodEnum<["create", "delete", "read", "update"]>;
|
|
558
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
518
559
|
scope: z.ZodLiteral<"roles">;
|
|
519
560
|
}, "strip", z.ZodTypeAny, {
|
|
520
561
|
scope: "roles";
|
|
521
|
-
action: "create" | "update" | "delete" | "read";
|
|
562
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
522
563
|
}, {
|
|
523
564
|
scope: "roles";
|
|
524
|
-
action: "create" | "update" | "delete" | "read";
|
|
565
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
525
566
|
}>, z.ZodObject<{
|
|
526
|
-
action: z.ZodEnum<["create", "delete", "read", "
|
|
567
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
527
568
|
resources: z.ZodDefault<z.ZodObject<{
|
|
528
569
|
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
529
570
|
municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -537,45 +578,69 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
|
|
|
537
578
|
scope: z.ZodLiteral<"stops">;
|
|
538
579
|
}, "strip", z.ZodTypeAny, {
|
|
539
580
|
scope: "stops";
|
|
540
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
581
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
541
582
|
resources: {
|
|
542
583
|
municipality_ids: string[];
|
|
543
584
|
agency_ids: string[];
|
|
544
585
|
};
|
|
545
586
|
}, {
|
|
546
587
|
scope: "stops";
|
|
547
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
588
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
548
589
|
resources?: {
|
|
549
590
|
municipality_ids?: string[] | undefined;
|
|
550
591
|
agency_ids?: string[] | undefined;
|
|
551
592
|
} | undefined;
|
|
552
593
|
}>, z.ZodObject<{
|
|
553
|
-
action: z.ZodEnum<["create", "delete", "read", "update"]>;
|
|
594
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
554
595
|
scope: z.ZodLiteral<"users">;
|
|
555
596
|
}, "strip", z.ZodTypeAny, {
|
|
556
597
|
scope: "users";
|
|
557
|
-
action: "create" | "update" | "delete" | "read";
|
|
598
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
558
599
|
}, {
|
|
559
600
|
scope: "users";
|
|
560
|
-
action: "create" | "update" | "delete" | "read";
|
|
601
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
602
|
+
}>, z.ZodObject<{
|
|
603
|
+
action: z.ZodEnum<["create_annotations", "delete_annotations", "read_annotations", "update_annotations", "lock_annotations"]>;
|
|
604
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
605
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
606
|
+
}, "strip", z.ZodTypeAny, {
|
|
607
|
+
agency_ids: string[];
|
|
608
|
+
}, {
|
|
609
|
+
agency_ids?: string[] | undefined;
|
|
610
|
+
}>>;
|
|
611
|
+
scope: z.ZodLiteral<"dates">;
|
|
612
|
+
}, "strip", z.ZodTypeAny, {
|
|
613
|
+
scope: "dates";
|
|
614
|
+
action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
|
|
615
|
+
resources: {
|
|
616
|
+
agency_ids: string[];
|
|
617
|
+
};
|
|
618
|
+
}, {
|
|
619
|
+
scope: "dates";
|
|
620
|
+
action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
|
|
621
|
+
resources?: {
|
|
622
|
+
agency_ids?: string[] | undefined;
|
|
623
|
+
} | undefined;
|
|
561
624
|
}>]>, "many">>;
|
|
562
|
-
phone: z.ZodNullable<z.ZodString
|
|
563
|
-
preferences: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">]
|
|
625
|
+
phone: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
626
|
+
preferences: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">]>>>>>;
|
|
564
627
|
role_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
628
|
+
seen_last_at: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
565
629
|
session_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
566
630
|
verification_token_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
567
631
|
}, "_id" | "created_at" | "updated_at">, "strip", z.ZodTypeAny, {
|
|
632
|
+
is_locked: boolean;
|
|
568
633
|
phone: string | null;
|
|
569
634
|
email: string;
|
|
570
635
|
permissions: ({
|
|
571
636
|
scope: "agencies";
|
|
572
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
637
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
573
638
|
} | {
|
|
574
639
|
scope: "alerts_scheduled";
|
|
575
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
640
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
576
641
|
} | {
|
|
577
642
|
scope: "alerts_realtime";
|
|
578
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
643
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
579
644
|
resources: {
|
|
580
645
|
agency_ids: string[];
|
|
581
646
|
};
|
|
@@ -588,9 +653,15 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
|
|
|
588
653
|
} | {
|
|
589
654
|
scope: "sams";
|
|
590
655
|
action: "read";
|
|
656
|
+
} | {
|
|
657
|
+
scope: "dates";
|
|
658
|
+
action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
|
|
659
|
+
resources: {
|
|
660
|
+
agency_ids: string[];
|
|
661
|
+
};
|
|
591
662
|
} | {
|
|
592
663
|
scope: "gtfs_validations";
|
|
593
|
-
action: "create" | "read" | "request_approval";
|
|
664
|
+
action: "create" | "read" | "lock" | "request_approval";
|
|
594
665
|
resources: {
|
|
595
666
|
agency_ids: string[];
|
|
596
667
|
};
|
|
@@ -599,61 +670,60 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
|
|
|
599
670
|
action: "read_links" | "read_wiki";
|
|
600
671
|
} | {
|
|
601
672
|
scope: "organizations";
|
|
602
|
-
action: "create" | "update" | "delete" | "read";
|
|
673
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
603
674
|
} | {
|
|
604
675
|
scope: "performance";
|
|
605
676
|
action: "read";
|
|
606
677
|
} | {
|
|
607
678
|
scope: "plans";
|
|
608
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
679
|
+
action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
|
|
609
680
|
resources: {
|
|
610
681
|
agency_ids: string[];
|
|
611
682
|
};
|
|
612
683
|
} | {
|
|
613
684
|
scope: "roles";
|
|
614
|
-
action: "create" | "update" | "delete" | "read";
|
|
685
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
615
686
|
} | {
|
|
616
687
|
scope: "stops";
|
|
617
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
688
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
618
689
|
resources: {
|
|
619
690
|
municipality_ids: string[];
|
|
620
691
|
agency_ids: string[];
|
|
621
692
|
};
|
|
622
693
|
} | {
|
|
623
694
|
scope: "users";
|
|
624
|
-
action: "create" | "update" | "delete" | "read";
|
|
695
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
625
696
|
})[];
|
|
626
697
|
email_verified: import("../_common/unix-timestamp.js").UnixTimestamp | null;
|
|
627
698
|
first_name: string;
|
|
628
699
|
last_name: string;
|
|
629
|
-
organization_id: string
|
|
700
|
+
organization_id: string;
|
|
630
701
|
password_hash: string | null;
|
|
631
702
|
preferences: Record<string, Record<string, string | number | boolean | string[] | number[]>> | null;
|
|
632
703
|
role_ids: string[];
|
|
704
|
+
seen_last_at: import("../_common/unix-timestamp.js").UnixTimestamp | null;
|
|
633
705
|
session_ids: string[];
|
|
634
706
|
verification_token_ids: string[];
|
|
635
707
|
created_by?: string | undefined;
|
|
636
708
|
updated_by?: string | undefined;
|
|
637
709
|
}, {
|
|
638
|
-
phone: string | null;
|
|
639
710
|
email: string;
|
|
640
|
-
email_verified: number | null;
|
|
641
711
|
first_name: string;
|
|
642
712
|
last_name: string;
|
|
643
|
-
organization_id: string
|
|
644
|
-
password_hash: string | null;
|
|
645
|
-
preferences: Record<string, Record<string, string | number | boolean | string[] | number[]>> | null;
|
|
713
|
+
organization_id: string;
|
|
646
714
|
created_by?: string | undefined;
|
|
715
|
+
is_locked?: boolean | undefined;
|
|
647
716
|
updated_by?: string | undefined;
|
|
717
|
+
phone?: string | null | undefined;
|
|
648
718
|
permissions?: ({
|
|
649
719
|
scope: "agencies";
|
|
650
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
720
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
651
721
|
} | {
|
|
652
722
|
scope: "alerts_scheduled";
|
|
653
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
723
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
654
724
|
} | {
|
|
655
725
|
scope: "alerts_realtime";
|
|
656
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
726
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
657
727
|
resources?: {
|
|
658
728
|
agency_ids?: string[] | undefined;
|
|
659
729
|
} | undefined;
|
|
@@ -666,9 +736,15 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
|
|
|
666
736
|
} | {
|
|
667
737
|
scope: "sams";
|
|
668
738
|
action: "read";
|
|
739
|
+
} | {
|
|
740
|
+
scope: "dates";
|
|
741
|
+
action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
|
|
742
|
+
resources?: {
|
|
743
|
+
agency_ids?: string[] | undefined;
|
|
744
|
+
} | undefined;
|
|
669
745
|
} | {
|
|
670
746
|
scope: "gtfs_validations";
|
|
671
|
-
action: "create" | "read" | "request_approval";
|
|
747
|
+
action: "create" | "read" | "lock" | "request_approval";
|
|
672
748
|
resources?: {
|
|
673
749
|
agency_ids?: string[] | undefined;
|
|
674
750
|
} | undefined;
|
|
@@ -677,58 +753,63 @@ export declare const CreateUserSchema: z.ZodObject<Omit<{
|
|
|
677
753
|
action: "read_links" | "read_wiki";
|
|
678
754
|
} | {
|
|
679
755
|
scope: "organizations";
|
|
680
|
-
action: "create" | "update" | "delete" | "read";
|
|
756
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
681
757
|
} | {
|
|
682
758
|
scope: "performance";
|
|
683
759
|
action: "read";
|
|
684
760
|
} | {
|
|
685
761
|
scope: "plans";
|
|
686
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
762
|
+
action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
|
|
687
763
|
resources?: {
|
|
688
764
|
agency_ids?: string[] | undefined;
|
|
689
765
|
} | undefined;
|
|
690
766
|
} | {
|
|
691
767
|
scope: "roles";
|
|
692
|
-
action: "create" | "update" | "delete" | "read";
|
|
768
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
693
769
|
} | {
|
|
694
770
|
scope: "stops";
|
|
695
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
771
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
696
772
|
resources?: {
|
|
697
773
|
municipality_ids?: string[] | undefined;
|
|
698
774
|
agency_ids?: string[] | undefined;
|
|
699
775
|
} | undefined;
|
|
700
776
|
} | {
|
|
701
777
|
scope: "users";
|
|
702
|
-
action: "create" | "update" | "delete" | "read";
|
|
778
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
703
779
|
})[] | undefined;
|
|
780
|
+
email_verified?: number | null | undefined;
|
|
781
|
+
password_hash?: string | null | undefined;
|
|
782
|
+
preferences?: Record<string, Record<string, string | number | boolean | string[] | number[]>> | null | undefined;
|
|
704
783
|
role_ids?: string[] | undefined;
|
|
784
|
+
seen_last_at?: number | null | undefined;
|
|
705
785
|
session_ids?: string[] | undefined;
|
|
706
786
|
verification_token_ids?: string[] | undefined;
|
|
707
787
|
}>;
|
|
708
788
|
export declare const UpdateUserSchema: z.ZodObject<{
|
|
789
|
+
is_locked: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
709
790
|
updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
710
|
-
phone: z.ZodOptional<z.ZodNullable<z.ZodString
|
|
791
|
+
phone: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
|
|
711
792
|
email: z.ZodOptional<z.ZodString>;
|
|
712
793
|
permissions: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"scope", [z.ZodObject<{
|
|
713
|
-
action: z.ZodEnum<["create", "delete", "read", "
|
|
794
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
714
795
|
scope: z.ZodLiteral<"agencies">;
|
|
715
796
|
}, "strip", z.ZodTypeAny, {
|
|
716
797
|
scope: "agencies";
|
|
717
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
798
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
718
799
|
}, {
|
|
719
800
|
scope: "agencies";
|
|
720
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
801
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
721
802
|
}>, z.ZodObject<{
|
|
722
|
-
action: z.ZodEnum<["create", "delete", "read", "
|
|
803
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
723
804
|
scope: z.ZodLiteral<"alerts_scheduled">;
|
|
724
805
|
}, "strip", z.ZodTypeAny, {
|
|
725
806
|
scope: "alerts_scheduled";
|
|
726
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
807
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
727
808
|
}, {
|
|
728
809
|
scope: "alerts_scheduled";
|
|
729
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
810
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
730
811
|
}>, z.ZodObject<{
|
|
731
|
-
action: z.ZodEnum<["create", "delete", "read", "
|
|
812
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
732
813
|
resources: z.ZodDefault<z.ZodObject<{
|
|
733
814
|
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
734
815
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -739,13 +820,13 @@ export declare const UpdateUserSchema: z.ZodObject<{
|
|
|
739
820
|
scope: z.ZodLiteral<"alerts_realtime">;
|
|
740
821
|
}, "strip", z.ZodTypeAny, {
|
|
741
822
|
scope: "alerts_realtime";
|
|
742
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
823
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
743
824
|
resources: {
|
|
744
825
|
agency_ids: string[];
|
|
745
826
|
};
|
|
746
827
|
}, {
|
|
747
828
|
scope: "alerts_realtime";
|
|
748
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
829
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
749
830
|
resources?: {
|
|
750
831
|
agency_ids?: string[] | undefined;
|
|
751
832
|
} | undefined;
|
|
@@ -781,7 +862,7 @@ export declare const UpdateUserSchema: z.ZodObject<{
|
|
|
781
862
|
scope: "sams";
|
|
782
863
|
action: "read";
|
|
783
864
|
}>, z.ZodObject<{
|
|
784
|
-
action: z.ZodEnum<["create", "read", "request_approval"]>;
|
|
865
|
+
action: z.ZodEnum<["create", "read", "lock", "request_approval"]>;
|
|
785
866
|
resources: z.ZodDefault<z.ZodObject<{
|
|
786
867
|
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
787
868
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -792,13 +873,13 @@ export declare const UpdateUserSchema: z.ZodObject<{
|
|
|
792
873
|
scope: z.ZodLiteral<"gtfs_validations">;
|
|
793
874
|
}, "strip", z.ZodTypeAny, {
|
|
794
875
|
scope: "gtfs_validations";
|
|
795
|
-
action: "create" | "read" | "request_approval";
|
|
876
|
+
action: "create" | "read" | "lock" | "request_approval";
|
|
796
877
|
resources: {
|
|
797
878
|
agency_ids: string[];
|
|
798
879
|
};
|
|
799
880
|
}, {
|
|
800
881
|
scope: "gtfs_validations";
|
|
801
|
-
action: "create" | "read" | "request_approval";
|
|
882
|
+
action: "create" | "read" | "lock" | "request_approval";
|
|
802
883
|
resources?: {
|
|
803
884
|
agency_ids?: string[] | undefined;
|
|
804
885
|
} | undefined;
|
|
@@ -812,14 +893,14 @@ export declare const UpdateUserSchema: z.ZodObject<{
|
|
|
812
893
|
scope: "home";
|
|
813
894
|
action: "read_links" | "read_wiki";
|
|
814
895
|
}>, z.ZodObject<{
|
|
815
|
-
action: z.ZodEnum<["create", "delete", "read", "update"]>;
|
|
896
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
816
897
|
scope: z.ZodLiteral<"organizations">;
|
|
817
898
|
}, "strip", z.ZodTypeAny, {
|
|
818
899
|
scope: "organizations";
|
|
819
|
-
action: "create" | "update" | "delete" | "read";
|
|
900
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
820
901
|
}, {
|
|
821
902
|
scope: "organizations";
|
|
822
|
-
action: "create" | "update" | "delete" | "read";
|
|
903
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
823
904
|
}>, z.ZodObject<{
|
|
824
905
|
action: z.ZodEnum<["read"]>;
|
|
825
906
|
scope: z.ZodLiteral<"performance">;
|
|
@@ -830,7 +911,7 @@ export declare const UpdateUserSchema: z.ZodObject<{
|
|
|
830
911
|
scope: "performance";
|
|
831
912
|
action: "read";
|
|
832
913
|
}>, z.ZodObject<{
|
|
833
|
-
action: z.ZodEnum<["create", "delete", "read", "read_controller", "read_pcgi_legacy", "
|
|
914
|
+
action: z.ZodEnum<["create", "delete", "read", "read_controller", "read_pcgi_legacy", "lock", "update", "update_controller", "update_feed_info_dates", "update_gtfs_plan", "update_pcgi_legacy"]>;
|
|
834
915
|
resources: z.ZodDefault<z.ZodObject<{
|
|
835
916
|
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
836
917
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -841,27 +922,27 @@ export declare const UpdateUserSchema: z.ZodObject<{
|
|
|
841
922
|
scope: z.ZodLiteral<"plans">;
|
|
842
923
|
}, "strip", z.ZodTypeAny, {
|
|
843
924
|
scope: "plans";
|
|
844
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
925
|
+
action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
|
|
845
926
|
resources: {
|
|
846
927
|
agency_ids: string[];
|
|
847
928
|
};
|
|
848
929
|
}, {
|
|
849
930
|
scope: "plans";
|
|
850
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
931
|
+
action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
|
|
851
932
|
resources?: {
|
|
852
933
|
agency_ids?: string[] | undefined;
|
|
853
934
|
} | undefined;
|
|
854
935
|
}>, z.ZodObject<{
|
|
855
|
-
action: z.ZodEnum<["create", "delete", "read", "update"]>;
|
|
936
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
856
937
|
scope: z.ZodLiteral<"roles">;
|
|
857
938
|
}, "strip", z.ZodTypeAny, {
|
|
858
939
|
scope: "roles";
|
|
859
|
-
action: "create" | "update" | "delete" | "read";
|
|
940
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
860
941
|
}, {
|
|
861
942
|
scope: "roles";
|
|
862
|
-
action: "create" | "update" | "delete" | "read";
|
|
943
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
863
944
|
}>, z.ZodObject<{
|
|
864
|
-
action: z.ZodEnum<["create", "delete", "read", "
|
|
945
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
865
946
|
resources: z.ZodDefault<z.ZodObject<{
|
|
866
947
|
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
867
948
|
municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -875,50 +956,72 @@ export declare const UpdateUserSchema: z.ZodObject<{
|
|
|
875
956
|
scope: z.ZodLiteral<"stops">;
|
|
876
957
|
}, "strip", z.ZodTypeAny, {
|
|
877
958
|
scope: "stops";
|
|
878
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
959
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
879
960
|
resources: {
|
|
880
961
|
municipality_ids: string[];
|
|
881
962
|
agency_ids: string[];
|
|
882
963
|
};
|
|
883
964
|
}, {
|
|
884
965
|
scope: "stops";
|
|
885
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
966
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
886
967
|
resources?: {
|
|
887
968
|
municipality_ids?: string[] | undefined;
|
|
888
969
|
agency_ids?: string[] | undefined;
|
|
889
970
|
} | undefined;
|
|
890
971
|
}>, z.ZodObject<{
|
|
891
|
-
action: z.ZodEnum<["create", "delete", "read", "update"]>;
|
|
972
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
892
973
|
scope: z.ZodLiteral<"users">;
|
|
893
974
|
}, "strip", z.ZodTypeAny, {
|
|
894
975
|
scope: "users";
|
|
895
|
-
action: "create" | "update" | "delete" | "read";
|
|
976
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
896
977
|
}, {
|
|
897
978
|
scope: "users";
|
|
898
|
-
action: "create" | "update" | "delete" | "read";
|
|
979
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
980
|
+
}>, z.ZodObject<{
|
|
981
|
+
action: z.ZodEnum<["create_annotations", "delete_annotations", "read_annotations", "update_annotations", "lock_annotations"]>;
|
|
982
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
983
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
984
|
+
}, "strip", z.ZodTypeAny, {
|
|
985
|
+
agency_ids: string[];
|
|
986
|
+
}, {
|
|
987
|
+
agency_ids?: string[] | undefined;
|
|
988
|
+
}>>;
|
|
989
|
+
scope: z.ZodLiteral<"dates">;
|
|
990
|
+
}, "strip", z.ZodTypeAny, {
|
|
991
|
+
scope: "dates";
|
|
992
|
+
action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
|
|
993
|
+
resources: {
|
|
994
|
+
agency_ids: string[];
|
|
995
|
+
};
|
|
996
|
+
}, {
|
|
997
|
+
scope: "dates";
|
|
998
|
+
action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
|
|
999
|
+
resources?: {
|
|
1000
|
+
agency_ids?: string[] | undefined;
|
|
1001
|
+
} | undefined;
|
|
899
1002
|
}>]>, "many">>>;
|
|
900
|
-
email_verified: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number
|
|
1003
|
+
email_verified: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>>;
|
|
901
1004
|
first_name: z.ZodOptional<z.ZodString>;
|
|
902
1005
|
last_name: z.ZodOptional<z.ZodString>;
|
|
903
|
-
organization_id: z.ZodOptional<z.
|
|
904
|
-
password_hash: z.ZodOptional<z.ZodNullable<z.ZodString
|
|
905
|
-
preferences: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">]
|
|
1006
|
+
organization_id: z.ZodOptional<z.ZodString>;
|
|
1007
|
+
password_hash: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
|
|
1008
|
+
preferences: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">]>>>>>>;
|
|
906
1009
|
role_ids: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
|
|
907
|
-
|
|
908
|
-
verification_token_ids: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
|
|
1010
|
+
seen_last_at: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>>;
|
|
909
1011
|
}, "strip", z.ZodTypeAny, {
|
|
1012
|
+
is_locked?: boolean | undefined;
|
|
910
1013
|
updated_by?: string | undefined;
|
|
911
1014
|
phone?: string | null | undefined;
|
|
912
1015
|
email?: string | undefined;
|
|
913
1016
|
permissions?: ({
|
|
914
1017
|
scope: "agencies";
|
|
915
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
1018
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
916
1019
|
} | {
|
|
917
1020
|
scope: "alerts_scheduled";
|
|
918
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
1021
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
919
1022
|
} | {
|
|
920
1023
|
scope: "alerts_realtime";
|
|
921
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
1024
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
922
1025
|
resources: {
|
|
923
1026
|
agency_ids: string[];
|
|
924
1027
|
};
|
|
@@ -931,9 +1034,15 @@ export declare const UpdateUserSchema: z.ZodObject<{
|
|
|
931
1034
|
} | {
|
|
932
1035
|
scope: "sams";
|
|
933
1036
|
action: "read";
|
|
1037
|
+
} | {
|
|
1038
|
+
scope: "dates";
|
|
1039
|
+
action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
|
|
1040
|
+
resources: {
|
|
1041
|
+
agency_ids: string[];
|
|
1042
|
+
};
|
|
934
1043
|
} | {
|
|
935
1044
|
scope: "gtfs_validations";
|
|
936
|
-
action: "create" | "read" | "request_approval";
|
|
1045
|
+
action: "create" | "read" | "lock" | "request_approval";
|
|
937
1046
|
resources: {
|
|
938
1047
|
agency_ids: string[];
|
|
939
1048
|
};
|
|
@@ -942,52 +1051,52 @@ export declare const UpdateUserSchema: z.ZodObject<{
|
|
|
942
1051
|
action: "read_links" | "read_wiki";
|
|
943
1052
|
} | {
|
|
944
1053
|
scope: "organizations";
|
|
945
|
-
action: "create" | "update" | "delete" | "read";
|
|
1054
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
946
1055
|
} | {
|
|
947
1056
|
scope: "performance";
|
|
948
1057
|
action: "read";
|
|
949
1058
|
} | {
|
|
950
1059
|
scope: "plans";
|
|
951
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
1060
|
+
action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
|
|
952
1061
|
resources: {
|
|
953
1062
|
agency_ids: string[];
|
|
954
1063
|
};
|
|
955
1064
|
} | {
|
|
956
1065
|
scope: "roles";
|
|
957
|
-
action: "create" | "update" | "delete" | "read";
|
|
1066
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
958
1067
|
} | {
|
|
959
1068
|
scope: "stops";
|
|
960
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
1069
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
961
1070
|
resources: {
|
|
962
1071
|
municipality_ids: string[];
|
|
963
1072
|
agency_ids: string[];
|
|
964
1073
|
};
|
|
965
1074
|
} | {
|
|
966
1075
|
scope: "users";
|
|
967
|
-
action: "create" | "update" | "delete" | "read";
|
|
1076
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
968
1077
|
})[] | undefined;
|
|
969
1078
|
email_verified?: import("../_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
970
1079
|
first_name?: string | undefined;
|
|
971
1080
|
last_name?: string | undefined;
|
|
972
|
-
organization_id?: string |
|
|
1081
|
+
organization_id?: string | undefined;
|
|
973
1082
|
password_hash?: string | null | undefined;
|
|
974
1083
|
preferences?: Record<string, Record<string, string | number | boolean | string[] | number[]>> | null | undefined;
|
|
975
1084
|
role_ids?: string[] | undefined;
|
|
976
|
-
|
|
977
|
-
verification_token_ids?: string[] | undefined;
|
|
1085
|
+
seen_last_at?: import("../_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
978
1086
|
}, {
|
|
1087
|
+
is_locked?: boolean | undefined;
|
|
979
1088
|
updated_by?: string | undefined;
|
|
980
1089
|
phone?: string | null | undefined;
|
|
981
1090
|
email?: string | undefined;
|
|
982
1091
|
permissions?: ({
|
|
983
1092
|
scope: "agencies";
|
|
984
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
1093
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
985
1094
|
} | {
|
|
986
1095
|
scope: "alerts_scheduled";
|
|
987
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
1096
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
988
1097
|
} | {
|
|
989
1098
|
scope: "alerts_realtime";
|
|
990
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
1099
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
991
1100
|
resources?: {
|
|
992
1101
|
agency_ids?: string[] | undefined;
|
|
993
1102
|
} | undefined;
|
|
@@ -1000,9 +1109,15 @@ export declare const UpdateUserSchema: z.ZodObject<{
|
|
|
1000
1109
|
} | {
|
|
1001
1110
|
scope: "sams";
|
|
1002
1111
|
action: "read";
|
|
1112
|
+
} | {
|
|
1113
|
+
scope: "dates";
|
|
1114
|
+
action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
|
|
1115
|
+
resources?: {
|
|
1116
|
+
agency_ids?: string[] | undefined;
|
|
1117
|
+
} | undefined;
|
|
1003
1118
|
} | {
|
|
1004
1119
|
scope: "gtfs_validations";
|
|
1005
|
-
action: "create" | "read" | "request_approval";
|
|
1120
|
+
action: "create" | "read" | "lock" | "request_approval";
|
|
1006
1121
|
resources?: {
|
|
1007
1122
|
agency_ids?: string[] | undefined;
|
|
1008
1123
|
} | undefined;
|
|
@@ -1011,43 +1126,434 @@ export declare const UpdateUserSchema: z.ZodObject<{
|
|
|
1011
1126
|
action: "read_links" | "read_wiki";
|
|
1012
1127
|
} | {
|
|
1013
1128
|
scope: "organizations";
|
|
1014
|
-
action: "create" | "update" | "delete" | "read";
|
|
1129
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1015
1130
|
} | {
|
|
1016
1131
|
scope: "performance";
|
|
1017
1132
|
action: "read";
|
|
1018
1133
|
} | {
|
|
1019
1134
|
scope: "plans";
|
|
1020
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
1135
|
+
action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
|
|
1021
1136
|
resources?: {
|
|
1022
1137
|
agency_ids?: string[] | undefined;
|
|
1023
1138
|
} | undefined;
|
|
1024
1139
|
} | {
|
|
1025
1140
|
scope: "roles";
|
|
1026
|
-
action: "create" | "update" | "delete" | "read";
|
|
1141
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1027
1142
|
} | {
|
|
1028
1143
|
scope: "stops";
|
|
1029
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
1144
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1030
1145
|
resources?: {
|
|
1031
1146
|
municipality_ids?: string[] | undefined;
|
|
1032
1147
|
agency_ids?: string[] | undefined;
|
|
1033
1148
|
} | undefined;
|
|
1034
1149
|
} | {
|
|
1035
1150
|
scope: "users";
|
|
1036
|
-
action: "create" | "update" | "delete" | "read";
|
|
1151
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1037
1152
|
})[] | undefined;
|
|
1038
1153
|
email_verified?: number | null | undefined;
|
|
1039
1154
|
first_name?: string | undefined;
|
|
1040
1155
|
last_name?: string | undefined;
|
|
1041
|
-
organization_id?: string |
|
|
1156
|
+
organization_id?: string | undefined;
|
|
1042
1157
|
password_hash?: string | null | undefined;
|
|
1043
1158
|
preferences?: Record<string, Record<string, string | number | boolean | string[] | number[]>> | null | undefined;
|
|
1044
1159
|
role_ids?: string[] | undefined;
|
|
1045
|
-
|
|
1046
|
-
verification_token_ids?: string[] | undefined;
|
|
1160
|
+
seen_last_at?: number | null | undefined;
|
|
1047
1161
|
}>;
|
|
1048
|
-
export
|
|
1162
|
+
export declare const UserSchema: z.ZodObject<Omit<{
|
|
1163
|
+
_id: z.ZodString;
|
|
1164
|
+
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
1165
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
1166
|
+
is_locked: z.ZodDefault<z.ZodBoolean>;
|
|
1167
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
1168
|
+
updated_by: z.ZodOptional<z.ZodString>;
|
|
1169
|
+
} & {
|
|
1170
|
+
email: z.ZodString;
|
|
1171
|
+
email_verified: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
1172
|
+
first_name: z.ZodString;
|
|
1173
|
+
last_name: z.ZodString;
|
|
1174
|
+
organization_id: z.ZodString;
|
|
1175
|
+
password_hash: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1176
|
+
permissions: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"scope", [z.ZodObject<{
|
|
1177
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
1178
|
+
scope: z.ZodLiteral<"agencies">;
|
|
1179
|
+
}, "strip", z.ZodTypeAny, {
|
|
1180
|
+
scope: "agencies";
|
|
1181
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1182
|
+
}, {
|
|
1183
|
+
scope: "agencies";
|
|
1184
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1185
|
+
}>, z.ZodObject<{
|
|
1186
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
1187
|
+
scope: z.ZodLiteral<"alerts_scheduled">;
|
|
1188
|
+
}, "strip", z.ZodTypeAny, {
|
|
1189
|
+
scope: "alerts_scheduled";
|
|
1190
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1191
|
+
}, {
|
|
1192
|
+
scope: "alerts_scheduled";
|
|
1193
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1194
|
+
}>, z.ZodObject<{
|
|
1195
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
1196
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
1197
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1198
|
+
}, "strip", z.ZodTypeAny, {
|
|
1199
|
+
agency_ids: string[];
|
|
1200
|
+
}, {
|
|
1201
|
+
agency_ids?: string[] | undefined;
|
|
1202
|
+
}>>;
|
|
1203
|
+
scope: z.ZodLiteral<"alerts_realtime">;
|
|
1204
|
+
}, "strip", z.ZodTypeAny, {
|
|
1205
|
+
scope: "alerts_realtime";
|
|
1206
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1207
|
+
resources: {
|
|
1208
|
+
agency_ids: string[];
|
|
1209
|
+
};
|
|
1210
|
+
}, {
|
|
1211
|
+
scope: "alerts_realtime";
|
|
1212
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1213
|
+
resources?: {
|
|
1214
|
+
agency_ids?: string[] | undefined;
|
|
1215
|
+
} | undefined;
|
|
1216
|
+
}>, z.ZodObject<{
|
|
1217
|
+
action: z.ZodEnum<["acceptance_change_status", "acceptance_justify", "acceptance_lock", "acceptance_read", "analsys_lock", "analysis_lock", "analysis_read", "analysis_reprocess", "analysis_update", "audit_lock", "audit_read", "audit_update"]>;
|
|
1218
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
1219
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1220
|
+
}, "strip", z.ZodTypeAny, {
|
|
1221
|
+
agency_ids: string[];
|
|
1222
|
+
}, {
|
|
1223
|
+
agency_ids?: string[] | undefined;
|
|
1224
|
+
}>>;
|
|
1225
|
+
scope: z.ZodLiteral<"rides">;
|
|
1226
|
+
}, "strip", z.ZodTypeAny, {
|
|
1227
|
+
scope: "rides";
|
|
1228
|
+
action: "acceptance_change_status" | "acceptance_justify" | "acceptance_lock" | "acceptance_read" | "analsys_lock" | "analysis_lock" | "analysis_read" | "analysis_reprocess" | "analysis_update" | "audit_lock" | "audit_read" | "audit_update";
|
|
1229
|
+
resources: {
|
|
1230
|
+
agency_ids: string[];
|
|
1231
|
+
};
|
|
1232
|
+
}, {
|
|
1233
|
+
scope: "rides";
|
|
1234
|
+
action: "acceptance_change_status" | "acceptance_justify" | "acceptance_lock" | "acceptance_read" | "analsys_lock" | "analysis_lock" | "analysis_read" | "analysis_reprocess" | "analysis_update" | "audit_lock" | "audit_read" | "audit_update";
|
|
1235
|
+
resources?: {
|
|
1236
|
+
agency_ids?: string[] | undefined;
|
|
1237
|
+
} | undefined;
|
|
1238
|
+
}>, z.ZodObject<{
|
|
1239
|
+
action: z.ZodEnum<["read"]>;
|
|
1240
|
+
scope: z.ZodLiteral<"sams">;
|
|
1241
|
+
}, "strip", z.ZodTypeAny, {
|
|
1242
|
+
scope: "sams";
|
|
1243
|
+
action: "read";
|
|
1244
|
+
}, {
|
|
1245
|
+
scope: "sams";
|
|
1246
|
+
action: "read";
|
|
1247
|
+
}>, z.ZodObject<{
|
|
1248
|
+
action: z.ZodEnum<["create", "read", "lock", "request_approval"]>;
|
|
1249
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
1250
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1251
|
+
}, "strip", z.ZodTypeAny, {
|
|
1252
|
+
agency_ids: string[];
|
|
1253
|
+
}, {
|
|
1254
|
+
agency_ids?: string[] | undefined;
|
|
1255
|
+
}>>;
|
|
1256
|
+
scope: z.ZodLiteral<"gtfs_validations">;
|
|
1257
|
+
}, "strip", z.ZodTypeAny, {
|
|
1258
|
+
scope: "gtfs_validations";
|
|
1259
|
+
action: "create" | "read" | "lock" | "request_approval";
|
|
1260
|
+
resources: {
|
|
1261
|
+
agency_ids: string[];
|
|
1262
|
+
};
|
|
1263
|
+
}, {
|
|
1264
|
+
scope: "gtfs_validations";
|
|
1265
|
+
action: "create" | "read" | "lock" | "request_approval";
|
|
1266
|
+
resources?: {
|
|
1267
|
+
agency_ids?: string[] | undefined;
|
|
1268
|
+
} | undefined;
|
|
1269
|
+
}>, z.ZodObject<{
|
|
1270
|
+
action: z.ZodEnum<["read_links", "read_wiki"]>;
|
|
1271
|
+
scope: z.ZodLiteral<"home">;
|
|
1272
|
+
}, "strip", z.ZodTypeAny, {
|
|
1273
|
+
scope: "home";
|
|
1274
|
+
action: "read_links" | "read_wiki";
|
|
1275
|
+
}, {
|
|
1276
|
+
scope: "home";
|
|
1277
|
+
action: "read_links" | "read_wiki";
|
|
1278
|
+
}>, z.ZodObject<{
|
|
1279
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
1280
|
+
scope: z.ZodLiteral<"organizations">;
|
|
1281
|
+
}, "strip", z.ZodTypeAny, {
|
|
1282
|
+
scope: "organizations";
|
|
1283
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1284
|
+
}, {
|
|
1285
|
+
scope: "organizations";
|
|
1286
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1287
|
+
}>, z.ZodObject<{
|
|
1288
|
+
action: z.ZodEnum<["read"]>;
|
|
1289
|
+
scope: z.ZodLiteral<"performance">;
|
|
1290
|
+
}, "strip", z.ZodTypeAny, {
|
|
1291
|
+
scope: "performance";
|
|
1292
|
+
action: "read";
|
|
1293
|
+
}, {
|
|
1294
|
+
scope: "performance";
|
|
1295
|
+
action: "read";
|
|
1296
|
+
}>, z.ZodObject<{
|
|
1297
|
+
action: z.ZodEnum<["create", "delete", "read", "read_controller", "read_pcgi_legacy", "lock", "update", "update_controller", "update_feed_info_dates", "update_gtfs_plan", "update_pcgi_legacy"]>;
|
|
1298
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
1299
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1300
|
+
}, "strip", z.ZodTypeAny, {
|
|
1301
|
+
agency_ids: string[];
|
|
1302
|
+
}, {
|
|
1303
|
+
agency_ids?: string[] | undefined;
|
|
1304
|
+
}>>;
|
|
1305
|
+
scope: z.ZodLiteral<"plans">;
|
|
1306
|
+
}, "strip", z.ZodTypeAny, {
|
|
1307
|
+
scope: "plans";
|
|
1308
|
+
action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
|
|
1309
|
+
resources: {
|
|
1310
|
+
agency_ids: string[];
|
|
1311
|
+
};
|
|
1312
|
+
}, {
|
|
1313
|
+
scope: "plans";
|
|
1314
|
+
action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
|
|
1315
|
+
resources?: {
|
|
1316
|
+
agency_ids?: string[] | undefined;
|
|
1317
|
+
} | undefined;
|
|
1318
|
+
}>, z.ZodObject<{
|
|
1319
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
1320
|
+
scope: z.ZodLiteral<"roles">;
|
|
1321
|
+
}, "strip", z.ZodTypeAny, {
|
|
1322
|
+
scope: "roles";
|
|
1323
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1324
|
+
}, {
|
|
1325
|
+
scope: "roles";
|
|
1326
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1327
|
+
}>, z.ZodObject<{
|
|
1328
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
1329
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
1330
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1331
|
+
municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1332
|
+
}, "strip", z.ZodTypeAny, {
|
|
1333
|
+
municipality_ids: string[];
|
|
1334
|
+
agency_ids: string[];
|
|
1335
|
+
}, {
|
|
1336
|
+
municipality_ids?: string[] | undefined;
|
|
1337
|
+
agency_ids?: string[] | undefined;
|
|
1338
|
+
}>>;
|
|
1339
|
+
scope: z.ZodLiteral<"stops">;
|
|
1340
|
+
}, "strip", z.ZodTypeAny, {
|
|
1341
|
+
scope: "stops";
|
|
1342
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1343
|
+
resources: {
|
|
1344
|
+
municipality_ids: string[];
|
|
1345
|
+
agency_ids: string[];
|
|
1346
|
+
};
|
|
1347
|
+
}, {
|
|
1348
|
+
scope: "stops";
|
|
1349
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1350
|
+
resources?: {
|
|
1351
|
+
municipality_ids?: string[] | undefined;
|
|
1352
|
+
agency_ids?: string[] | undefined;
|
|
1353
|
+
} | undefined;
|
|
1354
|
+
}>, z.ZodObject<{
|
|
1355
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
1356
|
+
scope: z.ZodLiteral<"users">;
|
|
1357
|
+
}, "strip", z.ZodTypeAny, {
|
|
1358
|
+
scope: "users";
|
|
1359
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1360
|
+
}, {
|
|
1361
|
+
scope: "users";
|
|
1362
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1363
|
+
}>, z.ZodObject<{
|
|
1364
|
+
action: z.ZodEnum<["create_annotations", "delete_annotations", "read_annotations", "update_annotations", "lock_annotations"]>;
|
|
1365
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
1366
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1367
|
+
}, "strip", z.ZodTypeAny, {
|
|
1368
|
+
agency_ids: string[];
|
|
1369
|
+
}, {
|
|
1370
|
+
agency_ids?: string[] | undefined;
|
|
1371
|
+
}>>;
|
|
1372
|
+
scope: z.ZodLiteral<"dates">;
|
|
1373
|
+
}, "strip", z.ZodTypeAny, {
|
|
1374
|
+
scope: "dates";
|
|
1375
|
+
action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
|
|
1376
|
+
resources: {
|
|
1377
|
+
agency_ids: string[];
|
|
1378
|
+
};
|
|
1379
|
+
}, {
|
|
1380
|
+
scope: "dates";
|
|
1381
|
+
action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
|
|
1382
|
+
resources?: {
|
|
1383
|
+
agency_ids?: string[] | undefined;
|
|
1384
|
+
} | undefined;
|
|
1385
|
+
}>]>, "many">>;
|
|
1386
|
+
phone: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1387
|
+
preferences: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">]>>>>>;
|
|
1388
|
+
role_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1389
|
+
seen_last_at: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
1390
|
+
session_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1391
|
+
verification_token_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1392
|
+
}, "password_hash" | "session_ids" | "verification_token_ids">, "strip", z.ZodTypeAny, {
|
|
1393
|
+
_id: string;
|
|
1394
|
+
created_at: number & {
|
|
1395
|
+
__brand: "UnixTimestamp";
|
|
1396
|
+
};
|
|
1397
|
+
is_locked: boolean;
|
|
1398
|
+
updated_at: number & {
|
|
1399
|
+
__brand: "UnixTimestamp";
|
|
1400
|
+
};
|
|
1401
|
+
phone: string | null;
|
|
1402
|
+
email: string;
|
|
1403
|
+
permissions: ({
|
|
1404
|
+
scope: "agencies";
|
|
1405
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1406
|
+
} | {
|
|
1407
|
+
scope: "alerts_scheduled";
|
|
1408
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1409
|
+
} | {
|
|
1410
|
+
scope: "alerts_realtime";
|
|
1411
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1412
|
+
resources: {
|
|
1413
|
+
agency_ids: string[];
|
|
1414
|
+
};
|
|
1415
|
+
} | {
|
|
1416
|
+
scope: "rides";
|
|
1417
|
+
action: "acceptance_change_status" | "acceptance_justify" | "acceptance_lock" | "acceptance_read" | "analsys_lock" | "analysis_lock" | "analysis_read" | "analysis_reprocess" | "analysis_update" | "audit_lock" | "audit_read" | "audit_update";
|
|
1418
|
+
resources: {
|
|
1419
|
+
agency_ids: string[];
|
|
1420
|
+
};
|
|
1421
|
+
} | {
|
|
1422
|
+
scope: "sams";
|
|
1423
|
+
action: "read";
|
|
1424
|
+
} | {
|
|
1425
|
+
scope: "dates";
|
|
1426
|
+
action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
|
|
1427
|
+
resources: {
|
|
1428
|
+
agency_ids: string[];
|
|
1429
|
+
};
|
|
1430
|
+
} | {
|
|
1431
|
+
scope: "gtfs_validations";
|
|
1432
|
+
action: "create" | "read" | "lock" | "request_approval";
|
|
1433
|
+
resources: {
|
|
1434
|
+
agency_ids: string[];
|
|
1435
|
+
};
|
|
1436
|
+
} | {
|
|
1437
|
+
scope: "home";
|
|
1438
|
+
action: "read_links" | "read_wiki";
|
|
1439
|
+
} | {
|
|
1440
|
+
scope: "organizations";
|
|
1441
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1442
|
+
} | {
|
|
1443
|
+
scope: "performance";
|
|
1444
|
+
action: "read";
|
|
1445
|
+
} | {
|
|
1446
|
+
scope: "plans";
|
|
1447
|
+
action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
|
|
1448
|
+
resources: {
|
|
1449
|
+
agency_ids: string[];
|
|
1450
|
+
};
|
|
1451
|
+
} | {
|
|
1452
|
+
scope: "roles";
|
|
1453
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1454
|
+
} | {
|
|
1455
|
+
scope: "stops";
|
|
1456
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1457
|
+
resources: {
|
|
1458
|
+
municipality_ids: string[];
|
|
1459
|
+
agency_ids: string[];
|
|
1460
|
+
};
|
|
1461
|
+
} | {
|
|
1462
|
+
scope: "users";
|
|
1463
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1464
|
+
})[];
|
|
1465
|
+
email_verified: import("../_common/unix-timestamp.js").UnixTimestamp | null;
|
|
1466
|
+
first_name: string;
|
|
1467
|
+
last_name: string;
|
|
1468
|
+
organization_id: string;
|
|
1469
|
+
preferences: Record<string, Record<string, string | number | boolean | string[] | number[]>> | null;
|
|
1470
|
+
role_ids: string[];
|
|
1471
|
+
seen_last_at: import("../_common/unix-timestamp.js").UnixTimestamp | null;
|
|
1472
|
+
created_by?: string | undefined;
|
|
1473
|
+
updated_by?: string | undefined;
|
|
1474
|
+
}, {
|
|
1475
|
+
_id: string;
|
|
1476
|
+
created_at: number;
|
|
1477
|
+
updated_at: number;
|
|
1478
|
+
email: string;
|
|
1479
|
+
first_name: string;
|
|
1480
|
+
last_name: string;
|
|
1481
|
+
organization_id: string;
|
|
1482
|
+
created_by?: string | undefined;
|
|
1483
|
+
is_locked?: boolean | undefined;
|
|
1484
|
+
updated_by?: string | undefined;
|
|
1485
|
+
phone?: string | null | undefined;
|
|
1486
|
+
permissions?: ({
|
|
1487
|
+
scope: "agencies";
|
|
1488
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1489
|
+
} | {
|
|
1490
|
+
scope: "alerts_scheduled";
|
|
1491
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1492
|
+
} | {
|
|
1493
|
+
scope: "alerts_realtime";
|
|
1494
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1495
|
+
resources?: {
|
|
1496
|
+
agency_ids?: string[] | undefined;
|
|
1497
|
+
} | undefined;
|
|
1498
|
+
} | {
|
|
1499
|
+
scope: "rides";
|
|
1500
|
+
action: "acceptance_change_status" | "acceptance_justify" | "acceptance_lock" | "acceptance_read" | "analsys_lock" | "analysis_lock" | "analysis_read" | "analysis_reprocess" | "analysis_update" | "audit_lock" | "audit_read" | "audit_update";
|
|
1501
|
+
resources?: {
|
|
1502
|
+
agency_ids?: string[] | undefined;
|
|
1503
|
+
} | undefined;
|
|
1504
|
+
} | {
|
|
1505
|
+
scope: "sams";
|
|
1506
|
+
action: "read";
|
|
1507
|
+
} | {
|
|
1508
|
+
scope: "dates";
|
|
1509
|
+
action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
|
|
1510
|
+
resources?: {
|
|
1511
|
+
agency_ids?: string[] | undefined;
|
|
1512
|
+
} | undefined;
|
|
1513
|
+
} | {
|
|
1514
|
+
scope: "gtfs_validations";
|
|
1515
|
+
action: "create" | "read" | "lock" | "request_approval";
|
|
1516
|
+
resources?: {
|
|
1517
|
+
agency_ids?: string[] | undefined;
|
|
1518
|
+
} | undefined;
|
|
1519
|
+
} | {
|
|
1520
|
+
scope: "home";
|
|
1521
|
+
action: "read_links" | "read_wiki";
|
|
1522
|
+
} | {
|
|
1523
|
+
scope: "organizations";
|
|
1524
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1525
|
+
} | {
|
|
1526
|
+
scope: "performance";
|
|
1527
|
+
action: "read";
|
|
1528
|
+
} | {
|
|
1529
|
+
scope: "plans";
|
|
1530
|
+
action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
|
|
1531
|
+
resources?: {
|
|
1532
|
+
agency_ids?: string[] | undefined;
|
|
1533
|
+
} | undefined;
|
|
1534
|
+
} | {
|
|
1535
|
+
scope: "roles";
|
|
1536
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1537
|
+
} | {
|
|
1538
|
+
scope: "stops";
|
|
1539
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1540
|
+
resources?: {
|
|
1541
|
+
municipality_ids?: string[] | undefined;
|
|
1542
|
+
agency_ids?: string[] | undefined;
|
|
1543
|
+
} | undefined;
|
|
1544
|
+
} | {
|
|
1545
|
+
scope: "users";
|
|
1546
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1547
|
+
})[] | undefined;
|
|
1548
|
+
email_verified?: number | null | undefined;
|
|
1549
|
+
preferences?: Record<string, Record<string, string | number | boolean | string[] | number[]>> | null | undefined;
|
|
1550
|
+
role_ids?: string[] | undefined;
|
|
1551
|
+
seen_last_at?: number | null | undefined;
|
|
1552
|
+
}>;
|
|
1553
|
+
export type User_UNSAFE = z.infer<typeof UserSchema_UNSAFE>;
|
|
1049
1554
|
export type CreateUserDto = z.infer<typeof CreateUserSchema>;
|
|
1050
1555
|
export type UpdateUserDto = z.infer<typeof UpdateUserSchema>;
|
|
1556
|
+
export type User = z.infer<typeof UserSchema>;
|
|
1051
1557
|
export declare const UserDisplayFields: {
|
|
1052
1558
|
readonly _id: true;
|
|
1053
1559
|
readonly email: true;
|
|
@@ -1055,39 +1561,40 @@ export declare const UserDisplayFields: {
|
|
|
1055
1561
|
readonly last_name: true;
|
|
1056
1562
|
readonly phone: true;
|
|
1057
1563
|
};
|
|
1058
|
-
export declare const UserDisplaySchema: z.ZodObject<Pick<{
|
|
1564
|
+
export declare const UserDisplaySchema: z.ZodObject<Pick<Omit<{
|
|
1059
1565
|
_id: z.ZodString;
|
|
1060
1566
|
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
1061
1567
|
created_by: z.ZodOptional<z.ZodString>;
|
|
1568
|
+
is_locked: z.ZodDefault<z.ZodBoolean>;
|
|
1062
1569
|
updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
1063
1570
|
updated_by: z.ZodOptional<z.ZodString>;
|
|
1064
1571
|
} & {
|
|
1065
1572
|
email: z.ZodString;
|
|
1066
|
-
email_verified: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number
|
|
1573
|
+
email_verified: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
1067
1574
|
first_name: z.ZodString;
|
|
1068
1575
|
last_name: z.ZodString;
|
|
1069
|
-
organization_id: z.
|
|
1070
|
-
password_hash: z.ZodNullable<z.ZodString
|
|
1576
|
+
organization_id: z.ZodString;
|
|
1577
|
+
password_hash: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1071
1578
|
permissions: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"scope", [z.ZodObject<{
|
|
1072
|
-
action: z.ZodEnum<["create", "delete", "read", "
|
|
1579
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
1073
1580
|
scope: z.ZodLiteral<"agencies">;
|
|
1074
1581
|
}, "strip", z.ZodTypeAny, {
|
|
1075
1582
|
scope: "agencies";
|
|
1076
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
1583
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1077
1584
|
}, {
|
|
1078
1585
|
scope: "agencies";
|
|
1079
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
1586
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1080
1587
|
}>, z.ZodObject<{
|
|
1081
|
-
action: z.ZodEnum<["create", "delete", "read", "
|
|
1588
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
1082
1589
|
scope: z.ZodLiteral<"alerts_scheduled">;
|
|
1083
1590
|
}, "strip", z.ZodTypeAny, {
|
|
1084
1591
|
scope: "alerts_scheduled";
|
|
1085
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
1592
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1086
1593
|
}, {
|
|
1087
1594
|
scope: "alerts_scheduled";
|
|
1088
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
1595
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1089
1596
|
}>, z.ZodObject<{
|
|
1090
|
-
action: z.ZodEnum<["create", "delete", "read", "
|
|
1597
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
1091
1598
|
resources: z.ZodDefault<z.ZodObject<{
|
|
1092
1599
|
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1093
1600
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1098,13 +1605,13 @@ export declare const UserDisplaySchema: z.ZodObject<Pick<{
|
|
|
1098
1605
|
scope: z.ZodLiteral<"alerts_realtime">;
|
|
1099
1606
|
}, "strip", z.ZodTypeAny, {
|
|
1100
1607
|
scope: "alerts_realtime";
|
|
1101
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
1608
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1102
1609
|
resources: {
|
|
1103
1610
|
agency_ids: string[];
|
|
1104
1611
|
};
|
|
1105
1612
|
}, {
|
|
1106
1613
|
scope: "alerts_realtime";
|
|
1107
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
1614
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1108
1615
|
resources?: {
|
|
1109
1616
|
agency_ids?: string[] | undefined;
|
|
1110
1617
|
} | undefined;
|
|
@@ -1140,7 +1647,7 @@ export declare const UserDisplaySchema: z.ZodObject<Pick<{
|
|
|
1140
1647
|
scope: "sams";
|
|
1141
1648
|
action: "read";
|
|
1142
1649
|
}>, z.ZodObject<{
|
|
1143
|
-
action: z.ZodEnum<["create", "read", "request_approval"]>;
|
|
1650
|
+
action: z.ZodEnum<["create", "read", "lock", "request_approval"]>;
|
|
1144
1651
|
resources: z.ZodDefault<z.ZodObject<{
|
|
1145
1652
|
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1146
1653
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1151,13 +1658,13 @@ export declare const UserDisplaySchema: z.ZodObject<Pick<{
|
|
|
1151
1658
|
scope: z.ZodLiteral<"gtfs_validations">;
|
|
1152
1659
|
}, "strip", z.ZodTypeAny, {
|
|
1153
1660
|
scope: "gtfs_validations";
|
|
1154
|
-
action: "create" | "read" | "request_approval";
|
|
1661
|
+
action: "create" | "read" | "lock" | "request_approval";
|
|
1155
1662
|
resources: {
|
|
1156
1663
|
agency_ids: string[];
|
|
1157
1664
|
};
|
|
1158
1665
|
}, {
|
|
1159
1666
|
scope: "gtfs_validations";
|
|
1160
|
-
action: "create" | "read" | "request_approval";
|
|
1667
|
+
action: "create" | "read" | "lock" | "request_approval";
|
|
1161
1668
|
resources?: {
|
|
1162
1669
|
agency_ids?: string[] | undefined;
|
|
1163
1670
|
} | undefined;
|
|
@@ -1171,14 +1678,14 @@ export declare const UserDisplaySchema: z.ZodObject<Pick<{
|
|
|
1171
1678
|
scope: "home";
|
|
1172
1679
|
action: "read_links" | "read_wiki";
|
|
1173
1680
|
}>, z.ZodObject<{
|
|
1174
|
-
action: z.ZodEnum<["create", "delete", "read", "update"]>;
|
|
1681
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
1175
1682
|
scope: z.ZodLiteral<"organizations">;
|
|
1176
1683
|
}, "strip", z.ZodTypeAny, {
|
|
1177
1684
|
scope: "organizations";
|
|
1178
|
-
action: "create" | "update" | "delete" | "read";
|
|
1685
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1179
1686
|
}, {
|
|
1180
1687
|
scope: "organizations";
|
|
1181
|
-
action: "create" | "update" | "delete" | "read";
|
|
1688
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1182
1689
|
}>, z.ZodObject<{
|
|
1183
1690
|
action: z.ZodEnum<["read"]>;
|
|
1184
1691
|
scope: z.ZodLiteral<"performance">;
|
|
@@ -1189,7 +1696,7 @@ export declare const UserDisplaySchema: z.ZodObject<Pick<{
|
|
|
1189
1696
|
scope: "performance";
|
|
1190
1697
|
action: "read";
|
|
1191
1698
|
}>, z.ZodObject<{
|
|
1192
|
-
action: z.ZodEnum<["create", "delete", "read", "read_controller", "read_pcgi_legacy", "
|
|
1699
|
+
action: z.ZodEnum<["create", "delete", "read", "read_controller", "read_pcgi_legacy", "lock", "update", "update_controller", "update_feed_info_dates", "update_gtfs_plan", "update_pcgi_legacy"]>;
|
|
1193
1700
|
resources: z.ZodDefault<z.ZodObject<{
|
|
1194
1701
|
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1195
1702
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1200,27 +1707,27 @@ export declare const UserDisplaySchema: z.ZodObject<Pick<{
|
|
|
1200
1707
|
scope: z.ZodLiteral<"plans">;
|
|
1201
1708
|
}, "strip", z.ZodTypeAny, {
|
|
1202
1709
|
scope: "plans";
|
|
1203
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
1710
|
+
action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
|
|
1204
1711
|
resources: {
|
|
1205
1712
|
agency_ids: string[];
|
|
1206
1713
|
};
|
|
1207
1714
|
}, {
|
|
1208
1715
|
scope: "plans";
|
|
1209
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
1716
|
+
action: "create" | "update" | "delete" | "read" | "lock" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy";
|
|
1210
1717
|
resources?: {
|
|
1211
1718
|
agency_ids?: string[] | undefined;
|
|
1212
1719
|
} | undefined;
|
|
1213
1720
|
}>, z.ZodObject<{
|
|
1214
|
-
action: z.ZodEnum<["create", "delete", "read", "update"]>;
|
|
1721
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
1215
1722
|
scope: z.ZodLiteral<"roles">;
|
|
1216
1723
|
}, "strip", z.ZodTypeAny, {
|
|
1217
1724
|
scope: "roles";
|
|
1218
|
-
action: "create" | "update" | "delete" | "read";
|
|
1725
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1219
1726
|
}, {
|
|
1220
1727
|
scope: "roles";
|
|
1221
|
-
action: "create" | "update" | "delete" | "read";
|
|
1728
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1222
1729
|
}>, z.ZodObject<{
|
|
1223
|
-
action: z.ZodEnum<["create", "delete", "read", "
|
|
1730
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
1224
1731
|
resources: z.ZodDefault<z.ZodObject<{
|
|
1225
1732
|
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1226
1733
|
municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -1234,34 +1741,57 @@ export declare const UserDisplaySchema: z.ZodObject<Pick<{
|
|
|
1234
1741
|
scope: z.ZodLiteral<"stops">;
|
|
1235
1742
|
}, "strip", z.ZodTypeAny, {
|
|
1236
1743
|
scope: "stops";
|
|
1237
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
1744
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1238
1745
|
resources: {
|
|
1239
1746
|
municipality_ids: string[];
|
|
1240
1747
|
agency_ids: string[];
|
|
1241
1748
|
};
|
|
1242
1749
|
}, {
|
|
1243
1750
|
scope: "stops";
|
|
1244
|
-
action: "create" | "update" | "delete" | "read" | "
|
|
1751
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1245
1752
|
resources?: {
|
|
1246
1753
|
municipality_ids?: string[] | undefined;
|
|
1247
1754
|
agency_ids?: string[] | undefined;
|
|
1248
1755
|
} | undefined;
|
|
1249
1756
|
}>, z.ZodObject<{
|
|
1250
|
-
action: z.ZodEnum<["create", "delete", "read", "update"]>;
|
|
1757
|
+
action: z.ZodEnum<["create", "delete", "read", "lock", "update"]>;
|
|
1251
1758
|
scope: z.ZodLiteral<"users">;
|
|
1252
1759
|
}, "strip", z.ZodTypeAny, {
|
|
1253
1760
|
scope: "users";
|
|
1254
|
-
action: "create" | "update" | "delete" | "read";
|
|
1761
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1255
1762
|
}, {
|
|
1256
1763
|
scope: "users";
|
|
1257
|
-
action: "create" | "update" | "delete" | "read";
|
|
1764
|
+
action: "create" | "update" | "delete" | "read" | "lock";
|
|
1765
|
+
}>, z.ZodObject<{
|
|
1766
|
+
action: z.ZodEnum<["create_annotations", "delete_annotations", "read_annotations", "update_annotations", "lock_annotations"]>;
|
|
1767
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
1768
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1769
|
+
}, "strip", z.ZodTypeAny, {
|
|
1770
|
+
agency_ids: string[];
|
|
1771
|
+
}, {
|
|
1772
|
+
agency_ids?: string[] | undefined;
|
|
1773
|
+
}>>;
|
|
1774
|
+
scope: z.ZodLiteral<"dates">;
|
|
1775
|
+
}, "strip", z.ZodTypeAny, {
|
|
1776
|
+
scope: "dates";
|
|
1777
|
+
action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
|
|
1778
|
+
resources: {
|
|
1779
|
+
agency_ids: string[];
|
|
1780
|
+
};
|
|
1781
|
+
}, {
|
|
1782
|
+
scope: "dates";
|
|
1783
|
+
action: "create_annotations" | "delete_annotations" | "read_annotations" | "update_annotations" | "lock_annotations";
|
|
1784
|
+
resources?: {
|
|
1785
|
+
agency_ids?: string[] | undefined;
|
|
1786
|
+
} | undefined;
|
|
1258
1787
|
}>]>, "many">>;
|
|
1259
|
-
phone: z.ZodNullable<z.ZodString
|
|
1260
|
-
preferences: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">]
|
|
1788
|
+
phone: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1789
|
+
preferences: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">]>>>>>;
|
|
1261
1790
|
role_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1791
|
+
seen_last_at: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
1262
1792
|
session_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1263
1793
|
verification_token_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1264
|
-
}, "_id" | "phone" | "email" | "first_name" | "last_name">, "strip", z.ZodTypeAny, {
|
|
1794
|
+
}, "password_hash" | "session_ids" | "verification_token_ids">, "_id" | "phone" | "email" | "first_name" | "last_name">, "strip", z.ZodTypeAny, {
|
|
1265
1795
|
_id: string;
|
|
1266
1796
|
phone: string | null;
|
|
1267
1797
|
email: string;
|
|
@@ -1269,10 +1799,10 @@ export declare const UserDisplaySchema: z.ZodObject<Pick<{
|
|
|
1269
1799
|
last_name: string;
|
|
1270
1800
|
}, {
|
|
1271
1801
|
_id: string;
|
|
1272
|
-
phone: string | null;
|
|
1273
1802
|
email: string;
|
|
1274
1803
|
first_name: string;
|
|
1275
1804
|
last_name: string;
|
|
1805
|
+
phone?: string | null | undefined;
|
|
1276
1806
|
}>;
|
|
1277
1807
|
export type UserDisplay = z.infer<typeof UserDisplaySchema>;
|
|
1278
1808
|
export type WithUser<T> = Omit<T, 'created_by' | 'updated_by'> & {
|