@tmlmobilidade/interfaces 20251222.1647.5 → 20251222.1756.6
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/interfaces/agencies/agencies.d.ts +0 -2
- package/dist/interfaces/agencies/agencies.js +2 -8
- package/dist/interfaces/alerts/alerts.d.ts +1 -1
- package/dist/interfaces/alerts/alerts.js +2 -2
- package/dist/interfaces/auth/roles.js +2 -2
- package/dist/interfaces/auth/sessions.d.ts +1 -1
- package/dist/interfaces/auth/sessions.js +4 -3
- package/dist/interfaces/auth/users.js +1 -0
- package/dist/interfaces/auth/verification-tokens.js +1 -0
- package/dist/interfaces/dates/annotations.js +2 -2
- package/dist/interfaces/notifications/notifications.d.ts +1 -2
- package/dist/interfaces/notifications/notifications.js +3 -5
- package/dist/interfaces/organizations/organizations.d.ts +1 -2
- package/dist/interfaces/organizations/organizations.js +2 -5
- package/dist/interfaces/plans/plans.js +2 -2
- package/dist/interfaces/rides/ride-acceptances.d.ts +1 -1
- package/dist/interfaces/rides/ride-acceptances.js +2 -2
- package/dist/interfaces/rides/rides.d.ts +1 -1
- package/dist/interfaces/rides/rides.js +2 -2
- package/dist/interfaces/sams/sams.js +2 -2
- package/dist/interfaces/stops/stops.js +2 -2
- package/dist/interfaces/zones/zones.d.ts +1 -1
- package/dist/interfaces/zones/zones.js +2 -2
- package/package.json +1 -1
|
@@ -62,9 +62,7 @@ declare class AgenciesClass extends MongoCollectionClass<Agency, CreateAgencyDto
|
|
|
62
62
|
}>>;
|
|
63
63
|
protected getCollectionIndexes(): IndexDescription[];
|
|
64
64
|
protected getCollectionName(): string;
|
|
65
|
-
protected getCreateSchema(): z.ZodSchema;
|
|
66
65
|
protected getEnvName(): string;
|
|
67
|
-
protected getUpdateSchema(): z.ZodSchema;
|
|
68
66
|
}
|
|
69
67
|
export declare const agencies: AgenciesClass;
|
|
70
68
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* * */
|
|
2
2
|
import { MongoCollectionClass } from '../../common/mongo-collection.js';
|
|
3
|
-
import {
|
|
3
|
+
import { CreateAgencySchema, UpdateAgencySchema } from '@tmlmobilidade/types';
|
|
4
4
|
import { AsyncSingletonProxy } from '@tmlmobilidade/utils';
|
|
5
5
|
/* * */
|
|
6
6
|
class AgenciesClass extends MongoCollectionClass {
|
|
7
7
|
static _instance;
|
|
8
|
-
createSchema =
|
|
8
|
+
createSchema = CreateAgencySchema;
|
|
9
9
|
updateSchema = UpdateAgencySchema;
|
|
10
10
|
constructor() {
|
|
11
11
|
super();
|
|
@@ -34,15 +34,9 @@ class AgenciesClass extends MongoCollectionClass {
|
|
|
34
34
|
getCollectionName() {
|
|
35
35
|
return 'agencies';
|
|
36
36
|
}
|
|
37
|
-
getCreateSchema() {
|
|
38
|
-
return AgencySchema;
|
|
39
|
-
}
|
|
40
37
|
getEnvName() {
|
|
41
38
|
return 'DATABASE_URI';
|
|
42
39
|
}
|
|
43
|
-
getUpdateSchema() {
|
|
44
|
-
return UpdateAgencySchema;
|
|
45
|
-
}
|
|
46
40
|
}
|
|
47
41
|
/* * */
|
|
48
42
|
export const agencies = AsyncSingletonProxy(AgenciesClass);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MongoCollectionClass } from '../../common/mongo-collection.js';
|
|
2
|
-
import { Alert, CreateAlertDto, UpdateAlertDto } from '@tmlmobilidade/types';
|
|
2
|
+
import { type Alert, type CreateAlertDto, type UpdateAlertDto } from '@tmlmobilidade/types';
|
|
3
3
|
import { IndexDescription } from 'mongodb';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
declare class AlertsClass extends MongoCollectionClass<Alert, CreateAlertDto, UpdateAlertDto> {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* * */
|
|
2
2
|
import { MongoCollectionClass } from '../../common/mongo-collection.js';
|
|
3
|
-
import {
|
|
3
|
+
import { CreateAlertSchema, UpdateAlertSchema } from '@tmlmobilidade/types';
|
|
4
4
|
import { AsyncSingletonProxy } from '@tmlmobilidade/utils';
|
|
5
5
|
/* * */
|
|
6
6
|
class AlertsClass extends MongoCollectionClass {
|
|
7
7
|
static _instance;
|
|
8
|
-
createSchema =
|
|
8
|
+
createSchema = CreateAlertSchema;
|
|
9
9
|
updateSchema = UpdateAlertSchema;
|
|
10
10
|
constructor() {
|
|
11
11
|
super();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* * */
|
|
2
2
|
import { MongoCollectionClass } from '../../common/mongo-collection.js';
|
|
3
|
-
import {
|
|
3
|
+
import { CreateRoleSchema, PermissionCatalog, UpdateRoleSchema } from '@tmlmobilidade/types';
|
|
4
4
|
import { AsyncSingletonProxy } from '@tmlmobilidade/utils';
|
|
5
5
|
/* * */
|
|
6
6
|
class RolesClass extends MongoCollectionClass {
|
|
7
7
|
static _instance;
|
|
8
|
-
createSchema =
|
|
8
|
+
createSchema = CreateRoleSchema;
|
|
9
9
|
updateSchema = UpdateRoleSchema;
|
|
10
10
|
constructor() {
|
|
11
11
|
super();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MongoCollectionClass } from '../../common/mongo-collection.js';
|
|
2
|
-
import { CreateSessionDto, Session, UpdateSessionDto } from '@tmlmobilidade/types';
|
|
2
|
+
import { type CreateSessionDto, Session, type UpdateSessionDto } from '@tmlmobilidade/types';
|
|
3
3
|
import { IndexDescription } from 'mongodb';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
declare class SessionsClass extends MongoCollectionClass<Session, CreateSessionDto, UpdateSessionDto> {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/* * */
|
|
2
2
|
import { MongoCollectionClass } from '../../common/mongo-collection.js';
|
|
3
|
-
import {
|
|
3
|
+
import { CreateSessionSchema, UpdateSessionSchema } from '@tmlmobilidade/types';
|
|
4
4
|
import { AsyncSingletonProxy } from '@tmlmobilidade/utils';
|
|
5
5
|
/* * */
|
|
6
6
|
class SessionsClass extends MongoCollectionClass {
|
|
7
7
|
static _instance;
|
|
8
|
-
createSchema =
|
|
9
|
-
updateSchema =
|
|
8
|
+
createSchema = CreateSessionSchema;
|
|
9
|
+
updateSchema = UpdateSessionSchema;
|
|
10
10
|
constructor() {
|
|
11
11
|
super();
|
|
12
12
|
}
|
|
@@ -32,4 +32,5 @@ class SessionsClass extends MongoCollectionClass {
|
|
|
32
32
|
return 'DATABASE_URI';
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
+
/* * */
|
|
35
36
|
export const sessions = AsyncSingletonProxy(SessionsClass);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* * */
|
|
2
2
|
import { MongoCollectionClass } from '../../common/mongo-collection.js';
|
|
3
|
-
import {
|
|
3
|
+
import { CreateAnnotationSchema, UpdateAnnotationSchema } from '@tmlmobilidade/types';
|
|
4
4
|
import { AsyncSingletonProxy } from '@tmlmobilidade/utils';
|
|
5
5
|
/* * */
|
|
6
6
|
class AnnotationsClass extends MongoCollectionClass {
|
|
7
7
|
static _instance;
|
|
8
|
-
createSchema =
|
|
8
|
+
createSchema = CreateAnnotationSchema;
|
|
9
9
|
updateSchema = UpdateAnnotationSchema;
|
|
10
10
|
constructor() {
|
|
11
11
|
super();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MongoCollectionClass } from '../../common/mongo-collection.js';
|
|
2
|
-
import { CreateNotificationDto, Notification, UpdateNotificationDto, User } from '@tmlmobilidade/types';
|
|
2
|
+
import { type CreateNotificationDto, type Notification, UpdateNotificationDto, User } from '@tmlmobilidade/types';
|
|
3
3
|
import { IndexDescription } from 'mongodb';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
declare class NotificationsClass extends MongoCollectionClass<Notification, CreateNotificationDto, UpdateNotificationDto> {
|
|
@@ -11,7 +11,6 @@ declare class NotificationsClass extends MongoCollectionClass<Notification, Crea
|
|
|
11
11
|
sendNotification(scope: string, topic: string, user: User, id: string, title: string, description: string): Promise<void>;
|
|
12
12
|
protected getCollectionIndexes(): IndexDescription[];
|
|
13
13
|
protected getCollectionName(): string;
|
|
14
|
-
protected getCreateSchema(): z.ZodSchema;
|
|
15
14
|
protected getEnvName(): string;
|
|
16
15
|
/**
|
|
17
16
|
* Collects all effective permissions of a user (direct + via roles),
|
|
@@ -4,12 +4,12 @@ import { roles } from '../auth/roles.js';
|
|
|
4
4
|
import { users } from '../auth/users.js';
|
|
5
5
|
import { getAppConfig } from '@tmlmobilidade/consts';
|
|
6
6
|
import { sendNotificationEmail } from '@tmlmobilidade/emails';
|
|
7
|
-
import {
|
|
7
|
+
import { CreateNotificationSchema, UpdateNotificationSchema } from '@tmlmobilidade/types';
|
|
8
8
|
import { AsyncSingletonProxy, mergeObjects } from '@tmlmobilidade/utils';
|
|
9
9
|
/* * */
|
|
10
10
|
class NotificationsClass extends MongoCollectionClass {
|
|
11
11
|
static _instance;
|
|
12
|
-
createSchema =
|
|
12
|
+
createSchema = CreateNotificationSchema;
|
|
13
13
|
updateSchema = UpdateNotificationSchema;
|
|
14
14
|
constructor() {
|
|
15
15
|
super();
|
|
@@ -79,9 +79,6 @@ class NotificationsClass extends MongoCollectionClass {
|
|
|
79
79
|
getCollectionName() {
|
|
80
80
|
return 'notifications';
|
|
81
81
|
}
|
|
82
|
-
getCreateSchema() {
|
|
83
|
-
return NotificationSchema;
|
|
84
|
-
}
|
|
85
82
|
getEnvName() {
|
|
86
83
|
return 'DATABASE_URI';
|
|
87
84
|
}
|
|
@@ -110,4 +107,5 @@ class NotificationsClass extends MongoCollectionClass {
|
|
|
110
107
|
return permission['resource']?.send_mail ?? false;
|
|
111
108
|
}
|
|
112
109
|
}
|
|
110
|
+
/* * */
|
|
113
111
|
export const notifications = AsyncSingletonProxy(NotificationsClass);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MongoCollectionClass } from '../../common/mongo-collection.js';
|
|
2
|
-
import { CreateOrganizationDto, Organization, UpdateOrganizationDto } from '@tmlmobilidade/types';
|
|
2
|
+
import { type CreateOrganizationDto, type Organization, type UpdateOrganizationDto } from '@tmlmobilidade/types';
|
|
3
3
|
import { IndexDescription } from 'mongodb';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
declare class OrganizationsClass extends MongoCollectionClass<Organization, CreateOrganizationDto, UpdateOrganizationDto> {
|
|
@@ -10,7 +10,6 @@ declare class OrganizationsClass extends MongoCollectionClass<Organization, Crea
|
|
|
10
10
|
static getInstance(): Promise<OrganizationsClass>;
|
|
11
11
|
protected getCollectionIndexes(): IndexDescription[];
|
|
12
12
|
protected getCollectionName(): string;
|
|
13
|
-
protected getCreateSchema(): z.ZodSchema;
|
|
14
13
|
protected getEnvName(): string;
|
|
15
14
|
}
|
|
16
15
|
export declare const organizations: OrganizationsClass;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* * */
|
|
2
2
|
import { MongoCollectionClass } from '../../common/mongo-collection.js';
|
|
3
|
-
import {
|
|
3
|
+
import { CreateOrganizationSchema, UpdateOrganizationSchema } from '@tmlmobilidade/types';
|
|
4
4
|
import { AsyncSingletonProxy } from '@tmlmobilidade/utils';
|
|
5
5
|
/* * */
|
|
6
6
|
class OrganizationsClass extends MongoCollectionClass {
|
|
7
7
|
static _instance;
|
|
8
|
-
createSchema =
|
|
8
|
+
createSchema = CreateOrganizationSchema;
|
|
9
9
|
updateSchema = UpdateOrganizationSchema;
|
|
10
10
|
constructor() {
|
|
11
11
|
super();
|
|
@@ -26,9 +26,6 @@ class OrganizationsClass extends MongoCollectionClass {
|
|
|
26
26
|
getCollectionName() {
|
|
27
27
|
return 'organizations';
|
|
28
28
|
}
|
|
29
|
-
getCreateSchema() {
|
|
30
|
-
return OrganizationSchema;
|
|
31
|
-
}
|
|
32
29
|
getEnvName() {
|
|
33
30
|
return 'DATABASE_URI';
|
|
34
31
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* * */
|
|
2
2
|
import { MongoCollectionClass } from '../../common/mongo-collection.js';
|
|
3
|
-
import {
|
|
3
|
+
import { CreatePlanSchema, UpdatePlanSchema } from '@tmlmobilidade/types';
|
|
4
4
|
import { AsyncSingletonProxy } from '@tmlmobilidade/utils';
|
|
5
5
|
/* * */
|
|
6
6
|
class PlansClass extends MongoCollectionClass {
|
|
7
7
|
static _instance;
|
|
8
|
-
createSchema =
|
|
8
|
+
createSchema = CreatePlanSchema;
|
|
9
9
|
updateSchema = UpdatePlanSchema;
|
|
10
10
|
constructor() {
|
|
11
11
|
super();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MongoCollectionClass } from '../../common/mongo-collection.js';
|
|
2
|
-
import { CreateRideAcceptanceDto, RideAcceptance, UpdateRideAcceptanceDto } from '@tmlmobilidade/types';
|
|
2
|
+
import { type CreateRideAcceptanceDto, type RideAcceptance, type UpdateRideAcceptanceDto } from '@tmlmobilidade/types';
|
|
3
3
|
import { IndexDescription, InsertOneOptions, UpdateOptions } from 'mongodb';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
declare class RideAcceptanceClass extends MongoCollectionClass<RideAcceptance, CreateRideAcceptanceDto, UpdateRideAcceptanceDto> {
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import { MongoCollectionClass } from '../../common/mongo-collection.js';
|
|
3
3
|
import { HttpException, HttpStatus } from '@tmlmobilidade/consts';
|
|
4
4
|
import { Dates } from '@tmlmobilidade/dates';
|
|
5
|
-
import {
|
|
5
|
+
import { CreateRideAcceptanceSchema, UpdateRideAcceptanceSchema } from '@tmlmobilidade/types';
|
|
6
6
|
import { AsyncSingletonProxy, compareObjects, flattenObject } from '@tmlmobilidade/utils';
|
|
7
7
|
/* * */
|
|
8
8
|
class RideAcceptanceClass extends MongoCollectionClass {
|
|
9
9
|
static _instance;
|
|
10
|
-
createSchema =
|
|
10
|
+
createSchema = CreateRideAcceptanceSchema;
|
|
11
11
|
updateSchema = UpdateRideAcceptanceSchema;
|
|
12
12
|
constructor() {
|
|
13
13
|
super();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MongoCollectionClass } from '../../common/mongo-collection.js';
|
|
2
|
-
import { CreateRideDto, Ride, UpdateRideDto } from '@tmlmobilidade/types';
|
|
2
|
+
import { type CreateRideDto, type Ride, type UpdateRideDto } from '@tmlmobilidade/types';
|
|
3
3
|
import { IndexDescription } from 'mongodb';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
declare class RidesClass extends MongoCollectionClass<Ride, CreateRideDto, UpdateRideDto> {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* * */
|
|
2
2
|
import { MongoCollectionClass } from '../../common/mongo-collection.js';
|
|
3
|
-
import {
|
|
3
|
+
import { CreateRideSchema, UpdateRideSchema } from '@tmlmobilidade/types';
|
|
4
4
|
import { AsyncSingletonProxy } from '@tmlmobilidade/utils';
|
|
5
5
|
/* * */
|
|
6
6
|
class RidesClass extends MongoCollectionClass {
|
|
7
7
|
static _instance;
|
|
8
|
-
createSchema =
|
|
8
|
+
createSchema = CreateRideSchema;
|
|
9
9
|
updateSchema = UpdateRideSchema;
|
|
10
10
|
constructor() {
|
|
11
11
|
super();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* * */
|
|
2
2
|
import { MongoCollectionClass } from '../../common/mongo-collection.js';
|
|
3
|
-
import {
|
|
3
|
+
import { CreateSamSchema, UpdateSamSchema } from '@tmlmobilidade/types';
|
|
4
4
|
import { AsyncSingletonProxy } from '@tmlmobilidade/utils';
|
|
5
5
|
/* * */
|
|
6
6
|
class SamsClass extends MongoCollectionClass {
|
|
7
7
|
static _instance;
|
|
8
|
-
createSchema =
|
|
8
|
+
createSchema = CreateSamSchema;
|
|
9
9
|
updateSchema = UpdateSamSchema;
|
|
10
10
|
constructor() {
|
|
11
11
|
super();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* * */
|
|
2
2
|
import { MongoCollectionClass } from '../../common/mongo-collection.js';
|
|
3
|
-
import {
|
|
3
|
+
import { CreateStopSchema, UpdateStopSchema } from '@tmlmobilidade/types';
|
|
4
4
|
import { AsyncSingletonProxy } from '@tmlmobilidade/utils';
|
|
5
5
|
/* * */
|
|
6
6
|
class StopsClass extends MongoCollectionClass {
|
|
7
7
|
static _instance;
|
|
8
|
-
createSchema =
|
|
8
|
+
createSchema = CreateStopSchema;
|
|
9
9
|
updateSchema = UpdateStopSchema;
|
|
10
10
|
constructor() {
|
|
11
11
|
super();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MongoCollectionClass } from '../../common/mongo-collection.js';
|
|
2
|
-
import { CreateZoneDto, UpdateZoneDto, Zone } from '@tmlmobilidade/types';
|
|
2
|
+
import { type CreateZoneDto, type UpdateZoneDto, type Zone } from '@tmlmobilidade/types';
|
|
3
3
|
import { IndexDescription } from 'mongodb';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
declare class ZonesClass extends MongoCollectionClass<Zone, CreateZoneDto, UpdateZoneDto> {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* * */
|
|
2
2
|
import { MongoCollectionClass } from '../../common/mongo-collection.js';
|
|
3
|
-
import {
|
|
3
|
+
import { CreateZoneSchema, UpdateZoneSchema } from '@tmlmobilidade/types';
|
|
4
4
|
import { AsyncSingletonProxy } from '@tmlmobilidade/utils';
|
|
5
5
|
/* * */
|
|
6
6
|
class ZonesClass extends MongoCollectionClass {
|
|
7
7
|
static _instance;
|
|
8
|
-
createSchema =
|
|
8
|
+
createSchema = CreateZoneSchema;
|
|
9
9
|
updateSchema = UpdateZoneSchema;
|
|
10
10
|
constructor() {
|
|
11
11
|
super();
|