@tmlmobilidade/interfaces 20260714.2327.46 → 20260716.1615.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.
@@ -1,5 +1,4 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
2
- import { users } from '../interfaces/auth/users.js';
1
+ import { goDB } from '@tmlmobilidade/go-interfaces-go-db';
3
2
  import { UserDisplayFields } from '@tmlmobilidade/types';
4
3
  const isUserRefKey = (k) => k === 'created_by' || k === 'updated_by';
5
4
  const isEligibleId = (v) => typeof v === 'string' && v && v !== 'system';
@@ -40,7 +39,7 @@ function replaceRefs(input, map) {
40
39
  async function fetchUsersMap(ids) {
41
40
  if (ids.size === 0)
42
41
  return new Map();
43
- const coll = await users.getCollection();
42
+ const coll = await goDB.core.users.getCollection();
44
43
  // Only fetch UserDisplay fields
45
44
  const projection = Object.keys(UserDisplayFields).reduce((acc, field) => {
46
45
  acc[field] = 1;
@@ -1,6 +1,4 @@
1
- export * from './agencies/index.js';
2
1
  export * from './alerts/index.js';
3
- export * from './auth/index.js';
4
2
  export * from './dates/index.js';
5
3
  export * from './file-exports/index.js';
6
4
  export * from './files/index.js';
@@ -11,7 +9,6 @@ export * from './notifications/index.js';
11
9
  export * from './offer/fares.js';
12
10
  export * from './offer/index.js';
13
11
  export * from './offer/zones.js';
14
- export * from './organizations/index.js';
15
12
  export * from './pcgidb/index.js';
16
13
  export * from './plans/index.js';
17
14
  export * from './proposed-changes/index.js';
@@ -1,6 +1,4 @@
1
- export * from './agencies/index.js';
2
1
  export * from './alerts/index.js';
3
- export * from './auth/index.js';
4
2
  export * from './dates/index.js';
5
3
  export * from './file-exports/index.js';
6
4
  export * from './files/index.js';
@@ -11,7 +9,6 @@ export * from './notifications/index.js';
11
9
  export * from './offer/fares.js';
12
10
  export * from './offer/index.js';
13
11
  export * from './offer/zones.js';
14
- export * from './organizations/index.js';
15
12
  export * from './pcgidb/index.js';
16
13
  export * from './plans/index.js';
17
14
  export * from './proposed-changes/index.js';
@@ -1,8 +1,7 @@
1
1
  /* * */
2
2
  import { MongoCollectionClass } from '../../common/mongo-collection.js';
3
- import { roles } from '../auth/roles.js';
4
- import { users } from '../auth/users.js';
5
3
  import { getModuleConfig } from '@tmlmobilidade/consts';
4
+ import { goDB } from '@tmlmobilidade/go-interfaces-go-db';
6
5
  import { CreateNotificationSchema, UpdateNotificationSchema } from '@tmlmobilidade/types';
7
6
  import { asyncSingletonProxy, mergeObjects } from '@tmlmobilidade/utils';
8
7
  /* * */
@@ -23,9 +22,9 @@ class NotificationsClass extends MongoCollectionClass {
23
22
  }
24
23
  async sendNotification(scope, topic, user, id, title, description) {
25
24
  // Fetch roles and users that have access to this topic
26
- const rolesWithTopic = await roles.findMany({ 'permissions.action': topic });
25
+ const rolesWithTopic = await goDB.core.roles.findMany({ 'permissions.action': topic });
27
26
  const roleIdsWithTopic = rolesWithTopic.map(r => r._id);
28
- const usersWithTopic = await users.findMany({
27
+ const usersWithTopic = await goDB.core.users.findMany({
29
28
  $or: [
30
29
  { 'permissions.action': topic },
31
30
  { role_ids: { $in: roleIdsWithTopic } },
@@ -1,2 +1 @@
1
- export * from './auth/index.js';
2
1
  export * from './storage/index.js';
@@ -1,2 +1 @@
1
- export * from './auth/index.js';
2
1
  export * from './storage/index.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmlmobilidade/interfaces",
3
- "version": "20260714.2327.46",
3
+ "version": "20260716.1615.24",
4
4
  "author": {
5
5
  "email": "iso@tmlmobilidade.pt",
6
6
  "name": "TML-ISO"
@@ -40,6 +40,7 @@
40
40
  "@tmlmobilidade/databases": "*",
41
41
  "@tmlmobilidade/dates": "*",
42
42
  "@tmlmobilidade/files": "*",
43
+ "@tmlmobilidade/go-interfaces-go-db": "*",
43
44
  "@tmlmobilidade/logger": "*",
44
45
  "@tmlmobilidade/mongo": "*",
45
46
  "@tmlmobilidade/ssh": "*",
@@ -1,88 +0,0 @@
1
- import { MongoCollectionClass } from '../../common/mongo-collection.js';
2
- import { type Agency, type CreateAgencyDto, type UpdateAgencyDto } from '@tmlmobilidade/types';
3
- import { IndexDescription } from 'mongodb';
4
- import { z } from 'zod';
5
- declare class AgenciesClass extends MongoCollectionClass<Agency, CreateAgencyDto, UpdateAgencyDto> {
6
- private static _instance;
7
- protected createSchema: z.ZodSchema;
8
- protected updateSchema: z.ZodSchema;
9
- private constructor();
10
- static getInstance(): Promise<AgenciesClass>;
11
- findByCode(code: string): Promise<import("mongodb").WithId<{
12
- _id: string;
13
- created_at: number & {
14
- __brand: "UnixTimestamp";
15
- };
16
- created_by: string | null;
17
- is_locked: boolean;
18
- updated_at: number & {
19
- __brand: "UnixTimestamp";
20
- };
21
- code: string;
22
- name: string;
23
- alerts_map: Partial<Record<"ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "POLICE_ACTIVITY" | "STRIKE" | "TECHNICAL_ISSUE" | "WEATHER" | "ABUSIVE_PARKING" | "DRIVER_ABSENCE" | "DRIVER_ISSUE" | "HIGH_PASSENGER_LOAD" | "NETWORK_UPDATE" | "ROAD_ISSUE" | "TRAFFIC_JAM" | "PUBLIC_DISORDER" | "VEHICLE_ISSUE", Partial<Record<"ACCESSIBILITY_ISSUE" | "ADDITIONAL_SERVICE" | "DETOUR" | "MODIFIED_SERVICE" | "NO_SERVICE" | "REDUCED_SERVICE" | "SIGNIFICANT_DELAYS" | "STOP_MOVED" | "REALTIME_INFO_ISSUE" | "ON_BOARD_SALE_ISSUE", Partial<Record<"agency" | "lines" | "stops" | "rides", boolean>>>>>>;
24
- apex: {
25
- contact_emails: string[];
26
- };
27
- contact_emails_pta: string[];
28
- contact_emails_pto: string[];
29
- fare_url: string;
30
- financials: {
31
- price_per_km: number;
32
- vkm_per_month: number[];
33
- };
34
- operation_start_date: import("@tmlmobilidade/types").OperationalDate | null;
35
- phone: string;
36
- pta_name: string;
37
- public_email: string;
38
- public_name: string;
39
- short_name: string;
40
- timezone: string;
41
- website_url: string;
42
- updated_by?: string | undefined;
43
- validation_rules?: any;
44
- }>>;
45
- updateByCode(code: string, fields: Partial<Agency>): Promise<import("mongodb").UpdateResult<{
46
- _id: string;
47
- created_at: number & {
48
- __brand: "UnixTimestamp";
49
- };
50
- created_by: string | null;
51
- is_locked: boolean;
52
- updated_at: number & {
53
- __brand: "UnixTimestamp";
54
- };
55
- code: string;
56
- name: string;
57
- alerts_map: Partial<Record<"ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "POLICE_ACTIVITY" | "STRIKE" | "TECHNICAL_ISSUE" | "WEATHER" | "ABUSIVE_PARKING" | "DRIVER_ABSENCE" | "DRIVER_ISSUE" | "HIGH_PASSENGER_LOAD" | "NETWORK_UPDATE" | "ROAD_ISSUE" | "TRAFFIC_JAM" | "PUBLIC_DISORDER" | "VEHICLE_ISSUE", Partial<Record<"ACCESSIBILITY_ISSUE" | "ADDITIONAL_SERVICE" | "DETOUR" | "MODIFIED_SERVICE" | "NO_SERVICE" | "REDUCED_SERVICE" | "SIGNIFICANT_DELAYS" | "STOP_MOVED" | "REALTIME_INFO_ISSUE" | "ON_BOARD_SALE_ISSUE", Partial<Record<"agency" | "lines" | "stops" | "rides", boolean>>>>>>;
58
- apex: {
59
- contact_emails: string[];
60
- };
61
- contact_emails_pta: string[];
62
- contact_emails_pto: string[];
63
- fare_url: string;
64
- financials: {
65
- price_per_km: number;
66
- vkm_per_month: number[];
67
- };
68
- operation_start_date: import("@tmlmobilidade/types").OperationalDate | null;
69
- phone: string;
70
- pta_name: string;
71
- public_email: string;
72
- public_name: string;
73
- short_name: string;
74
- timezone: string;
75
- website_url: string;
76
- updated_by?: string | undefined;
77
- validation_rules?: any;
78
- }>>;
79
- protected getCollectionIndexes(): IndexDescription[];
80
- protected getCollectionName(): string;
81
- protected getEnvName(): string;
82
- }
83
- /**
84
- * @deprecated This class is deprecated and will be removed in the future.
85
- * Use `@tmlmobilidade/go-interfaces-go-db` instead.
86
- */
87
- export declare const agencies: AgenciesClass;
88
- export {};
@@ -1,46 +0,0 @@
1
- /* * */
2
- import { MongoCollectionClass } from '../../common/mongo-collection.js';
3
- import { CreateAgencySchema, UpdateAgencySchema } from '@tmlmobilidade/types';
4
- import { asyncSingletonProxy } from '@tmlmobilidade/utils';
5
- /* * */
6
- class AgenciesClass extends MongoCollectionClass {
7
- static _instance;
8
- createSchema = CreateAgencySchema;
9
- updateSchema = UpdateAgencySchema;
10
- constructor() {
11
- super();
12
- }
13
- static async getInstance() {
14
- if (!AgenciesClass._instance) {
15
- const instance = new AgenciesClass();
16
- await instance.connect();
17
- AgenciesClass._instance = instance;
18
- }
19
- return AgenciesClass._instance;
20
- }
21
- async findByCode(code) {
22
- return this.mongoCollection.findOne({ code });
23
- }
24
- async updateByCode(code, fields) {
25
- return this.mongoCollection.updateOne({ code }, { $set: fields });
26
- }
27
- getCollectionIndexes() {
28
- return [
29
- { background: true, key: { name: 1 }, unique: true },
30
- { background: true, key: { code: 1 }, unique: true },
31
- { background: true, key: { email: 1 }, unique: true },
32
- ];
33
- }
34
- getCollectionName() {
35
- return 'agencies';
36
- }
37
- getEnvName() {
38
- return 'DATABASE_URI';
39
- }
40
- }
41
- /* * */
42
- /**
43
- * @deprecated This class is deprecated and will be removed in the future.
44
- * Use `@tmlmobilidade/go-interfaces-go-db` instead.
45
- */
46
- export const agencies = asyncSingletonProxy(AgenciesClass);
@@ -1 +0,0 @@
1
- export * from './agencies.js';
@@ -1 +0,0 @@
1
- export * from './agencies.js';
@@ -1,4 +0,0 @@
1
- export * from './roles.js';
2
- export * from './sessions.js';
3
- export * from './users.js';
4
- export * from './verification-tokens.js';
@@ -1,4 +0,0 @@
1
- export * from './roles.js';
2
- export * from './sessions.js';
3
- export * from './users.js';
4
- export * from './verification-tokens.js';
@@ -1,403 +0,0 @@
1
- import { MongoCollectionClass } from '../../common/mongo-collection.js';
2
- import { type CreateRoleDto, type Role, type UpdateRoleDto } from '@tmlmobilidade/types';
3
- import { type Filter, type FindOptions, type IndexDescription } from 'mongodb';
4
- import { z } from 'zod';
5
- declare class RolesClass extends MongoCollectionClass<Role, CreateRoleDto, UpdateRoleDto> {
6
- private static _instance;
7
- protected createSchema: z.ZodSchema;
8
- protected updateSchema: z.ZodSchema;
9
- private constructor();
10
- static getInstance(): Promise<RolesClass>;
11
- /**
12
- * Finds a user document by its ID.
13
- * @param id The ID of the user document to find
14
- * @param includePasswordHash Whether to include the password hash in the result
15
- * @returns A promise that resolves to the matching user document or null if not found
16
- */
17
- findById(id: string, options?: FindOptions): Promise<{
18
- permissions: ({
19
- scope: "agencies";
20
- action: "create" | "delete" | "read" | "lock" | "update";
21
- } | {
22
- scope: "alerts";
23
- action: "create" | "delete" | "read" | "lock" | "update" | "update_texts" | "update_dates" | "update_publish_status";
24
- resources: {
25
- agency_ids: string[];
26
- reference_types: string[];
27
- };
28
- } | {
29
- scope: "rides";
30
- 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" | "acceptance_comment_activity";
31
- resources: {
32
- agency_ids: string[];
33
- };
34
- } | {
35
- scope: "sams";
36
- action: "read" | "export";
37
- } | {
38
- scope: "gtfs_validations";
39
- action: "create" | "read" | "lock" | "request_approval" | "update_processing_status";
40
- resources: {
41
- agency_ids: string[];
42
- };
43
- } | {
44
- scope: "home";
45
- action: "read_links" | "read_wiki";
46
- } | {
47
- scope: "organizations";
48
- action: "create" | "delete" | "read" | "lock" | "update";
49
- } | {
50
- scope: "performance";
51
- action: "read";
52
- } | {
53
- scope: "plans";
54
- action: "create" | "delete" | "read" | "lock" | "update" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy" | "read_apex_file" | "update_apex_file" | "delete_apex_file" | "send_apex_notification";
55
- resources: {
56
- agency_ids: string[];
57
- };
58
- } | {
59
- scope: "roles";
60
- action: "create" | "delete" | "read" | "lock" | "update";
61
- } | {
62
- scope: "stops";
63
- action: "create" | "delete" | "read" | "lock" | "update" | "export" | "edit_coordinates" | "edit_name";
64
- resources: {
65
- municipality_ids: string[];
66
- agency_ids: string[];
67
- };
68
- } | {
69
- scope: "users";
70
- action: "create" | "delete" | "read" | "lock" | "update";
71
- } | {
72
- scope: "vehicles";
73
- action: "create" | "delete" | "read" | "lock" | "update";
74
- resources: {
75
- agency_ids: string[];
76
- };
77
- } | {
78
- scope: "fares";
79
- action: "create" | "delete" | "lock" | "update" | "nav";
80
- resources: {
81
- agency_ids: string[];
82
- };
83
- } | {
84
- scope: "annotations";
85
- action: "create" | "delete" | "read" | "lock" | "update";
86
- resources: {
87
- agency_ids: string[];
88
- };
89
- } | {
90
- scope: "year_periods";
91
- action: "create" | "delete" | "read" | "lock" | "update";
92
- resources: {
93
- agency_ids: string[];
94
- };
95
- } | {
96
- scope: "holidays";
97
- action: "create" | "delete" | "read" | "lock" | "update";
98
- resources: {
99
- agency_ids: string[];
100
- };
101
- } | {
102
- scope: "events";
103
- action: "create" | "delete" | "read" | "lock" | "update";
104
- resources: {
105
- agency_ids: string[];
106
- };
107
- } | {
108
- scope: "zones";
109
- action: "create" | "delete" | "lock" | "update" | "nav";
110
- resources: {
111
- agency_ids: string[];
112
- };
113
- } | {
114
- scope: "typologies";
115
- action: "create" | "delete" | "lock" | "update" | "nav";
116
- resources: {
117
- agency_ids: string[];
118
- };
119
- } | {
120
- scope: "lines";
121
- action: "create" | "delete" | "read" | "lock" | "update";
122
- resources: {
123
- agency_ids: string[];
124
- };
125
- })[];
126
- created_at: number & {
127
- __brand: "UnixTimestamp";
128
- };
129
- created_by: string | null;
130
- updated_at: number & {
131
- __brand: "UnixTimestamp";
132
- };
133
- updated_by?: string | undefined;
134
- is_locked: boolean;
135
- name: string;
136
- _id: string;
137
- }>;
138
- /**
139
- * Finds multiple documents matching the filter criteria
140
- * with optional pagination and sorting.
141
- * @param filter (Optional) filter criteria to match documents.
142
- * @param perPage (Optional) number of documents per page for pagination.
143
- * @param page (Optional) page number for pagination.
144
- * @param sort (Optional) sort specification.
145
- * @returns A promise that resolves to an array of matching documents.
146
- */
147
- findMany(filter?: Filter<Role>, options?: FindOptions): Promise<{
148
- permissions: ({
149
- scope: "agencies";
150
- action: "create" | "delete" | "read" | "lock" | "update";
151
- } | {
152
- scope: "alerts";
153
- action: "create" | "delete" | "read" | "lock" | "update" | "update_texts" | "update_dates" | "update_publish_status";
154
- resources: {
155
- agency_ids: string[];
156
- reference_types: string[];
157
- };
158
- } | {
159
- scope: "rides";
160
- 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" | "acceptance_comment_activity";
161
- resources: {
162
- agency_ids: string[];
163
- };
164
- } | {
165
- scope: "sams";
166
- action: "read" | "export";
167
- } | {
168
- scope: "gtfs_validations";
169
- action: "create" | "read" | "lock" | "request_approval" | "update_processing_status";
170
- resources: {
171
- agency_ids: string[];
172
- };
173
- } | {
174
- scope: "home";
175
- action: "read_links" | "read_wiki";
176
- } | {
177
- scope: "organizations";
178
- action: "create" | "delete" | "read" | "lock" | "update";
179
- } | {
180
- scope: "performance";
181
- action: "read";
182
- } | {
183
- scope: "plans";
184
- action: "create" | "delete" | "read" | "lock" | "update" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy" | "read_apex_file" | "update_apex_file" | "delete_apex_file" | "send_apex_notification";
185
- resources: {
186
- agency_ids: string[];
187
- };
188
- } | {
189
- scope: "roles";
190
- action: "create" | "delete" | "read" | "lock" | "update";
191
- } | {
192
- scope: "stops";
193
- action: "create" | "delete" | "read" | "lock" | "update" | "export" | "edit_coordinates" | "edit_name";
194
- resources: {
195
- municipality_ids: string[];
196
- agency_ids: string[];
197
- };
198
- } | {
199
- scope: "users";
200
- action: "create" | "delete" | "read" | "lock" | "update";
201
- } | {
202
- scope: "vehicles";
203
- action: "create" | "delete" | "read" | "lock" | "update";
204
- resources: {
205
- agency_ids: string[];
206
- };
207
- } | {
208
- scope: "fares";
209
- action: "create" | "delete" | "lock" | "update" | "nav";
210
- resources: {
211
- agency_ids: string[];
212
- };
213
- } | {
214
- scope: "annotations";
215
- action: "create" | "delete" | "read" | "lock" | "update";
216
- resources: {
217
- agency_ids: string[];
218
- };
219
- } | {
220
- scope: "year_periods";
221
- action: "create" | "delete" | "read" | "lock" | "update";
222
- resources: {
223
- agency_ids: string[];
224
- };
225
- } | {
226
- scope: "holidays";
227
- action: "create" | "delete" | "read" | "lock" | "update";
228
- resources: {
229
- agency_ids: string[];
230
- };
231
- } | {
232
- scope: "events";
233
- action: "create" | "delete" | "read" | "lock" | "update";
234
- resources: {
235
- agency_ids: string[];
236
- };
237
- } | {
238
- scope: "zones";
239
- action: "create" | "delete" | "lock" | "update" | "nav";
240
- resources: {
241
- agency_ids: string[];
242
- };
243
- } | {
244
- scope: "typologies";
245
- action: "create" | "delete" | "lock" | "update" | "nav";
246
- resources: {
247
- agency_ids: string[];
248
- };
249
- } | {
250
- scope: "lines";
251
- action: "create" | "delete" | "read" | "lock" | "update";
252
- resources: {
253
- agency_ids: string[];
254
- };
255
- })[];
256
- created_at: number & {
257
- __brand: "UnixTimestamp";
258
- };
259
- created_by: string | null;
260
- updated_at: number & {
261
- __brand: "UnixTimestamp";
262
- };
263
- updated_by?: string | undefined;
264
- is_locked: boolean;
265
- name: string;
266
- _id: string;
267
- }[]>;
268
- /**
269
- * Finds a single document matching the filter criteria.
270
- * @param filter Filter criteria to match the document.
271
- * @returns A promise that resolves to the matching document or null if not found.
272
- */
273
- findOne(filter: Filter<Role>): Promise<{
274
- permissions: ({
275
- scope: "agencies";
276
- action: "create" | "delete" | "read" | "lock" | "update";
277
- } | {
278
- scope: "alerts";
279
- action: "create" | "delete" | "read" | "lock" | "update" | "update_texts" | "update_dates" | "update_publish_status";
280
- resources: {
281
- agency_ids: string[];
282
- reference_types: string[];
283
- };
284
- } | {
285
- scope: "rides";
286
- 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" | "acceptance_comment_activity";
287
- resources: {
288
- agency_ids: string[];
289
- };
290
- } | {
291
- scope: "sams";
292
- action: "read" | "export";
293
- } | {
294
- scope: "gtfs_validations";
295
- action: "create" | "read" | "lock" | "request_approval" | "update_processing_status";
296
- resources: {
297
- agency_ids: string[];
298
- };
299
- } | {
300
- scope: "home";
301
- action: "read_links" | "read_wiki";
302
- } | {
303
- scope: "organizations";
304
- action: "create" | "delete" | "read" | "lock" | "update";
305
- } | {
306
- scope: "performance";
307
- action: "read";
308
- } | {
309
- scope: "plans";
310
- action: "create" | "delete" | "read" | "lock" | "update" | "read_controller" | "read_pcgi_legacy" | "update_controller" | "update_feed_info_dates" | "update_gtfs_plan" | "update_pcgi_legacy" | "read_apex_file" | "update_apex_file" | "delete_apex_file" | "send_apex_notification";
311
- resources: {
312
- agency_ids: string[];
313
- };
314
- } | {
315
- scope: "roles";
316
- action: "create" | "delete" | "read" | "lock" | "update";
317
- } | {
318
- scope: "stops";
319
- action: "create" | "delete" | "read" | "lock" | "update" | "export" | "edit_coordinates" | "edit_name";
320
- resources: {
321
- municipality_ids: string[];
322
- agency_ids: string[];
323
- };
324
- } | {
325
- scope: "users";
326
- action: "create" | "delete" | "read" | "lock" | "update";
327
- } | {
328
- scope: "vehicles";
329
- action: "create" | "delete" | "read" | "lock" | "update";
330
- resources: {
331
- agency_ids: string[];
332
- };
333
- } | {
334
- scope: "fares";
335
- action: "create" | "delete" | "lock" | "update" | "nav";
336
- resources: {
337
- agency_ids: string[];
338
- };
339
- } | {
340
- scope: "annotations";
341
- action: "create" | "delete" | "read" | "lock" | "update";
342
- resources: {
343
- agency_ids: string[];
344
- };
345
- } | {
346
- scope: "year_periods";
347
- action: "create" | "delete" | "read" | "lock" | "update";
348
- resources: {
349
- agency_ids: string[];
350
- };
351
- } | {
352
- scope: "holidays";
353
- action: "create" | "delete" | "read" | "lock" | "update";
354
- resources: {
355
- agency_ids: string[];
356
- };
357
- } | {
358
- scope: "events";
359
- action: "create" | "delete" | "read" | "lock" | "update";
360
- resources: {
361
- agency_ids: string[];
362
- };
363
- } | {
364
- scope: "zones";
365
- action: "create" | "delete" | "lock" | "update" | "nav";
366
- resources: {
367
- agency_ids: string[];
368
- };
369
- } | {
370
- scope: "typologies";
371
- action: "create" | "delete" | "lock" | "update" | "nav";
372
- resources: {
373
- agency_ids: string[];
374
- };
375
- } | {
376
- scope: "lines";
377
- action: "create" | "delete" | "read" | "lock" | "update";
378
- resources: {
379
- agency_ids: string[];
380
- };
381
- })[];
382
- created_at: number & {
383
- __brand: "UnixTimestamp";
384
- };
385
- created_by: string | null;
386
- updated_at: number & {
387
- __brand: "UnixTimestamp";
388
- };
389
- updated_by?: string | undefined;
390
- is_locked: boolean;
391
- name: string;
392
- _id: string;
393
- }>;
394
- protected getCollectionIndexes(): IndexDescription[];
395
- protected getCollectionName(): string;
396
- protected getEnvName(): string;
397
- }
398
- /**
399
- * @deprecated This class is deprecated and will be removed in the future.
400
- * Use `@tmlmobilidade/go-interfaces-go-db` instead.
401
- */
402
- export declare const roles: RolesClass;
403
- export {};