@tmlmobilidade/types 20251031.1051.3 → 20251202.1817.5
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/{src/_common → _common}/index.d.ts +4 -2
- package/dist/{src/_common → _common}/index.js +4 -2
- package/dist/_common/mongo.d.ts +3 -0
- package/dist/_common/status.d.ts +13 -0
- package/dist/_common/status.js +20 -0
- package/dist/_common/utility.js +1 -0
- package/dist/{src/agency.d.ts → agency.d.ts} +4 -15
- package/dist/{src/agency.js → agency.js} +1 -6
- package/dist/{src/alert.d.ts → alert.d.ts} +20 -21
- package/dist/{src/alert.js → alert.js} +8 -14
- package/dist/{src/simplified-apex → apex}/simplified-apex-validation.d.ts +20 -20
- package/dist/{src/auth → auth}/index.d.ts +1 -1
- package/dist/{src/auth → auth}/index.js +1 -1
- package/dist/{src/auth → auth}/password-requirements.js +2 -1
- package/dist/auth/role.d.ts +958 -0
- package/dist/{src/auth → auth}/role.js +2 -2
- package/dist/{src/auth → auth}/session.d.ts +13 -9
- package/dist/{src/auth → auth}/session.js +1 -1
- package/dist/auth/user.d.ts +1281 -0
- package/dist/{src/auth → auth}/user.js +11 -14
- package/dist/{src/file-exports → file-exports}/common.d.ts +9 -8
- package/dist/{src/file-exports → file-exports}/common.js +1 -1
- package/dist/file-exports/index.d.ts +121 -0
- package/dist/file-exports/ride-export.d.ts +410 -0
- package/dist/file-exports/ride-export.js +131 -0
- package/dist/{src/file.d.ts → file.d.ts} +18 -18
- package/dist/gtfs/agency.d.ts +30 -0
- package/dist/gtfs/agency.js +13 -0
- package/dist/gtfs/feed-info.d.ts +33 -0
- package/dist/{src/gtfs.js → gtfs/feed-info.js} +1 -11
- package/dist/{src/gtfs → gtfs}/index.d.ts +3 -0
- package/dist/{src/gtfs → gtfs}/index.js +3 -0
- package/dist/gtfs/service-alert.d.ts +26 -0
- package/dist/index.d.ts +22 -22
- package/dist/index.js +22 -22
- package/dist/locations/census.d.ts +211 -0
- package/dist/locations/census.js +2 -0
- package/dist/locations/district.d.ts +24 -0
- package/dist/locations/district.js +2 -0
- package/dist/locations/index.d.ts +6 -0
- package/dist/locations/index.js +6 -0
- package/dist/locations/locality.d.ts +27 -0
- package/dist/locations/locality.js +2 -0
- package/dist/locations/municipality.d.ts +25 -0
- package/dist/locations/municipality.js +2 -0
- package/dist/locations/parish.d.ts +26 -0
- package/dist/locations/parish.js +2 -0
- package/dist/locations/queries.d.ts +117 -0
- package/dist/{src/locations.js → locations/queries.js} +5 -16
- package/dist/metrics/demand/demand_by_agency.d.ts +210 -0
- package/dist/metrics/demand/demand_by_agency.js +39 -0
- package/dist/metrics/demand/demand_by_category.d.ts +475 -0
- package/dist/metrics/demand/demand_by_category.js +114 -0
- package/dist/metrics/demand/demand_by_line.d.ts +246 -0
- package/dist/metrics/demand/demand_by_line.js +56 -0
- package/dist/metrics/demand/demand_by_pattern.d.ts +332 -0
- package/dist/metrics/demand/demand_by_pattern.js +56 -0
- package/dist/metrics/demand/demand_by_product.d.ts +475 -0
- package/dist/metrics/demand/demand_by_product.js +114 -0
- package/dist/metrics/demand/index.d.ts +6 -0
- package/dist/metrics/demand/index.js +8 -0
- package/dist/metrics/demand/records.d.ts +320 -0
- package/dist/metrics/demand/records.js +53 -0
- package/dist/metrics/index.d.ts +2647 -0
- package/dist/metrics/index.js +48 -0
- package/dist/metrics/realtime.d.ts +667 -0
- package/dist/metrics/realtime.js +41 -0
- package/dist/{src/notification.d.ts → notification.d.ts} +4 -4
- package/dist/{src/organization.d.ts → organization.d.ts} +32 -32
- package/dist/{src/organization.js → organization.js} +7 -7
- package/dist/permissions/agencies.d.ts +12 -0
- package/dist/permissions/agencies.js +13 -0
- package/dist/permissions/alerts.d.ts +36 -0
- package/dist/permissions/alerts.js +25 -0
- package/dist/permissions/controller.d.ts +36 -0
- package/dist/permissions/controller.js +30 -0
- package/dist/permissions/gtfs-validations.d.ts +25 -0
- package/dist/permissions/gtfs-validations.js +14 -0
- package/dist/permissions/home.d.ts +12 -0
- package/dist/permissions/home.js +10 -0
- package/dist/permissions/index.d.ts +268 -0
- package/dist/permissions/index.js +149 -0
- package/dist/permissions/organizations.d.ts +12 -0
- package/dist/permissions/organizations.js +12 -0
- package/dist/permissions/performance.d.ts +12 -0
- package/dist/permissions/performance.js +9 -0
- package/dist/permissions/plans.d.ts +25 -0
- package/dist/permissions/plans.js +22 -0
- package/dist/permissions/roles.d.ts +12 -0
- package/dist/permissions/roles.js +12 -0
- package/dist/permissions/stops.d.ts +30 -0
- package/dist/permissions/stops.js +17 -0
- package/dist/permissions/users.d.ts +12 -0
- package/dist/permissions/users.js +12 -0
- package/dist/{src/plans → plans}/gtfs-validation.d.ts +55 -63
- package/dist/{src/plans → plans}/gtfs-validation.js +3 -6
- package/dist/plans/plan-app-status.d.ts +15 -0
- package/dist/plans/plan-app-status.js +10 -0
- package/dist/{src/plans → plans}/plan.d.ts +240 -104
- package/dist/{src/plans → plans}/plan.js +8 -10
- package/dist/{src/_common/proposed-change.d.ts → proposed-change.d.ts} +21 -22
- package/dist/{src/_common/proposed-change.js → proposed-change.js} +5 -7
- package/dist/{src/rides → rides}/index.d.ts +1 -0
- package/dist/{src/rides → rides}/index.js +1 -0
- package/dist/{src/rides → rides}/ride-acceptance.d.ts +65 -65
- package/dist/{src/rides → rides}/ride-analysis.d.ts +34 -34
- package/dist/{src/rides → rides}/ride-audit.d.ts +10 -10
- package/dist/rides/ride-normalized.d.ts +29 -0
- package/dist/rides/ride-normalized.js +2 -0
- package/dist/{src/rides → rides}/ride.d.ts +523 -567
- package/dist/{src/rides → rides}/ride.js +2 -16
- package/dist/{src/sams → sams}/sam-analysis.d.ts +11 -11
- package/dist/{src/sams → sams}/sam-analysis.js +4 -4
- package/dist/{src/sams → sams}/sam.d.ts +76 -76
- package/dist/{src/sams → sams}/sam.js +1 -1
- package/dist/{src/stop.d.ts → stop.d.ts} +32 -43
- package/dist/{src/stop.js → stop.js} +3 -8
- package/dist/vehicle-events/gtfs-rt-vehicle-event-extended.d.ts +77 -0
- package/dist/vehicle-events/gtfs-rt-vehicle-event-extended.js +21 -0
- package/dist/vehicle-events/index.d.ts +2 -0
- package/dist/vehicle-events/index.js +2 -0
- package/dist/{src/vehicle-event.d.ts → vehicle-events/simplified-vehicle-event.d.ts} +9 -9
- package/dist/{src/vehicle-event.js → vehicle-events/simplified-vehicle-event.js} +3 -3
- package/dist/wiki.js +2 -0
- package/dist/{src/zone.d.ts → zone.d.ts} +2 -16
- package/dist/{src/zone.js → zone.js} +0 -6
- package/package.json +18 -21
- package/README.md +0 -13
- package/dist/src/_common/email.d.ts +0 -4
- package/dist/src/_common/email.js +0 -7
- package/dist/src/auth/permission.d.ts +0 -19
- package/dist/src/auth/permission.js +0 -8
- package/dist/src/auth/role.d.ts +0 -127
- package/dist/src/auth/user.d.ts +0 -311
- package/dist/src/file-exports/index.d.ts +0 -121
- package/dist/src/file-exports/ride-export.d.ts +0 -470
- package/dist/src/file-exports/ride-export.js +0 -128
- package/dist/src/gtfs.d.ts +0 -88
- package/dist/src/locations.d.ts +0 -319
- package/dist/src/metrics/demand.d.ts +0 -803
- package/dist/src/metrics/demand.js +0 -153
- package/dist/src/metrics/index.d.ts +0 -806
- package/dist/src/metrics/index.js +0 -19
- package/dist/src/plans/plan-controller.d.ts +0 -15
- package/dist/src/plans/plan-controller.js +0 -10
- package/dist/src/system/index.d.ts +0 -2
- package/dist/src/system/index.js +0 -2
- package/dist/src/system/processing-status.d.ts +0 -9
- package/dist/src/system/processing-status.js +0 -5
- package/dist/{src/_common → _common}/comment.d.ts +8 -8
- package/dist/{src/_common → _common}/comment.js +0 -0
- package/dist/{src/_common → _common}/document.d.ts +0 -0
- package/dist/{src/_common → _common}/document.js +0 -0
- package/dist/{src/system → _common}/environment.d.ts +0 -0
- package/dist/{src/system → _common}/environment.js +0 -0
- package/dist/{src/_common → _common}/fastify.d.ts +0 -0
- package/dist/{src/_common → _common}/fastify.js +0 -0
- package/dist/{src/_common/utility.js → _common/mongo.js} +0 -0
- package/dist/{src/_common → _common}/operational-date.d.ts +0 -0
- package/dist/{src/_common → _common}/operational-date.js +0 -0
- package/dist/{src/_common → _common}/unix-timestamp.d.ts +0 -0
- package/dist/{src/_common → _common}/unix-timestamp.js +0 -0
- package/dist/{src/_common → _common}/utility.d.ts +0 -0
- package/dist/{src/simplified-apex → apex}/index.d.ts +0 -0
- package/dist/{src/simplified-apex → apex}/index.js +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-inspection-decision.d.ts +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-inspection-decision.js +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-inspection.d.ts +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-inspection.js +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-location.d.ts +16 -16
- package/dist/{src/simplified-apex → apex}/simplified-apex-location.js +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-on-board-refund.d.ts +20 -20
- package/dist/{src/simplified-apex → apex}/simplified-apex-on-board-refund.js +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-on-board-sale.d.ts +25 -25
- package/dist/{src/simplified-apex → apex}/simplified-apex-on-board-sale.js +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-type.d.ts +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-type.js +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-validation.js +0 -0
- package/dist/{src/auth → auth}/login.d.ts +0 -0
- package/dist/{src/auth → auth}/login.js +0 -0
- package/dist/{src/auth → auth}/password-requirements.d.ts +0 -0
- package/dist/{src/auth → auth}/verification-token.d.ts +0 -0
- package/dist/{src/auth → auth}/verification-token.js +0 -0
- package/dist/{src/file-exports → file-exports}/index.js +0 -0
- package/dist/{src/file.js → file.js} +0 -0
- package/dist/{src/gtfs → gtfs}/calendar-dates.d.ts +0 -0
- package/dist/{src/gtfs → gtfs}/calendar-dates.js +0 -0
- package/dist/{src/gtfs → gtfs}/calendar.d.ts +0 -0
- package/dist/{src/gtfs → gtfs}/calendar.js +0 -0
- package/dist/{src/gtfs → gtfs}/cause-effetcs.d.ts +0 -0
- package/dist/{src/gtfs → gtfs}/cause-effetcs.js +0 -0
- package/dist/{src/gtfs → gtfs}/common.d.ts +0 -0
- package/dist/{src/gtfs → gtfs}/common.js +0 -0
- package/dist/{src/gtfs → gtfs}/routes.d.ts +0 -0
- package/dist/{src/gtfs → gtfs}/routes.js +0 -0
- package/dist/{src/pcgi/pcgi-apex-location.js → gtfs/service-alert.js} +0 -0
- package/dist/{src/gtfs → gtfs}/shapes.d.ts +0 -0
- package/dist/{src/gtfs → gtfs}/shapes.js +0 -0
- package/dist/{src/gtfs → gtfs}/stop-times.d.ts +0 -0
- package/dist/{src/gtfs → gtfs}/stop-times.js +0 -0
- package/dist/{src/gtfs → gtfs}/stops.d.ts +0 -0
- package/dist/{src/gtfs → gtfs}/stops.js +0 -0
- package/dist/{src/gtfs → gtfs}/trips.d.ts +0 -0
- package/dist/{src/gtfs → gtfs}/trips.js +0 -0
- package/dist/{src/metrics → metrics}/common.d.ts +0 -0
- package/dist/{src/metrics → metrics}/common.js +0 -0
- package/dist/{src/notification.js → notification.js} +0 -0
- package/dist/{src/pcgi → pcgi}/index.d.ts +0 -0
- package/dist/{src/pcgi → pcgi}/index.js +0 -0
- package/dist/{src/pcgi → pcgi}/pcgi-apex-location.d.ts +0 -0
- package/dist/{src/pcgi/pcgi-apex-refund.js → pcgi/pcgi-apex-location.js} +0 -0
- package/dist/{src/pcgi → pcgi}/pcgi-apex-refund.d.ts +0 -0
- package/dist/{src/pcgi/pcgi-apex-sale.js → pcgi/pcgi-apex-refund.js} +0 -0
- package/dist/{src/pcgi → pcgi}/pcgi-apex-sale.d.ts +0 -0
- package/dist/{src/pcgi/pcgi-apex-validation.js → pcgi/pcgi-apex-sale.js} +0 -0
- package/dist/{src/pcgi → pcgi}/pcgi-apex-validation.d.ts +0 -0
- package/dist/{src/pcgi/pcgi-transaction-entity.js → pcgi/pcgi-apex-validation.js} +0 -0
- package/dist/{src/pcgi → pcgi}/pcgi-transaction-entity.d.ts +0 -0
- package/dist/{src/rides/hashed-shape.js → pcgi/pcgi-transaction-entity.js} +0 -0
- package/dist/{src/plans → plans}/index.d.ts +0 -0
- package/dist/{src/plans → plans}/index.js +0 -0
- package/dist/{src/plans → plans}/plan-pcgi-legacy.d.ts +0 -0
- package/dist/{src/plans → plans}/plan-pcgi-legacy.js +0 -0
- package/dist/{src/rides → rides}/hashed-shape.d.ts +0 -0
- package/dist/{src/rides/hashed-trip.js → rides/hashed-shape.js} +0 -0
- package/dist/{src/rides → rides}/hashed-trip.d.ts +0 -0
- package/dist/{src/wiki.js → rides/hashed-trip.js} +0 -0
- package/dist/{src/rides → rides}/ride-acceptance.js +1 -1
- /package/dist/{src/rides → rides}/ride-analysis.js +0 -0
- /package/dist/{src/rides → rides}/ride-audit.js +0 -0
- /package/dist/{src/rides → rides}/ride-overrides.d.ts +0 -0
- /package/dist/{src/rides → rides}/ride-overrides.js +0 -0
- /package/dist/{src/sams → sams}/index.d.ts +0 -0
- /package/dist/{src/sams → sams}/index.js +0 -0
- /package/dist/{src/wiki.d.ts → wiki.d.ts} +0 -0
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * from './comment.js';
|
|
2
2
|
export * from './document.js';
|
|
3
|
-
export * from './
|
|
3
|
+
export * from './environment.js';
|
|
4
4
|
export * from './fastify.js';
|
|
5
|
+
export * from './mongo.js';
|
|
5
6
|
export * from './operational-date.js';
|
|
6
|
-
export * from './
|
|
7
|
+
export * from './status.js';
|
|
8
|
+
export * from './status.js';
|
|
7
9
|
export * from './unix-timestamp.js';
|
|
8
10
|
export * from './utility.js';
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * from './comment.js';
|
|
2
2
|
export * from './document.js';
|
|
3
|
-
export * from './
|
|
3
|
+
export * from './environment.js';
|
|
4
4
|
export * from './fastify.js';
|
|
5
|
+
export * from './mongo.js';
|
|
5
6
|
export * from './operational-date.js';
|
|
6
|
-
export * from './
|
|
7
|
+
export * from './status.js';
|
|
8
|
+
export * from './status.js';
|
|
7
9
|
export * from './unix-timestamp.js';
|
|
8
10
|
export * from './utility.js';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ProcessingStatusSchema: z.ZodEnum<["waiting", "processing", "complete", "error", "skipped"]>;
|
|
3
|
+
export type ProcessingStatus = z.infer<typeof ProcessingStatusSchema>;
|
|
4
|
+
export declare const DelayStatusSchema: z.ZodEnum<["delayed", "early", "ontime", "none"]>;
|
|
5
|
+
export type DelayStatus = z.infer<typeof DelayStatusSchema>;
|
|
6
|
+
export declare const SeenStatusSchema: z.ZodEnum<["gone", "seen", "unseen"]>;
|
|
7
|
+
export type SeenStatus = z.infer<typeof SeenStatusSchema>;
|
|
8
|
+
export declare const OperationalStatusSchema: z.ZodEnum<["ended", "missed", "running", "scheduled"]>;
|
|
9
|
+
export type OperationalStatus = z.infer<typeof OperationalStatusSchema>;
|
|
10
|
+
export declare const PublishStatusSchema: z.ZodEnum<["PUBLISHED", "ARCHIVED", "DRAFT"]>;
|
|
11
|
+
export type PublishStatus = z.infer<typeof PublishStatusSchema>;
|
|
12
|
+
export declare const ApprovalStatusSchema: z.ZodEnum<["pending", "approved", "rejected", "none"]>;
|
|
13
|
+
export type ApprovalStatus = z.infer<typeof ApprovalStatusSchema>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
/* PROCESSING STATUS */
|
|
4
|
+
/* * */
|
|
5
|
+
export const ProcessingStatusSchema = z.enum(['waiting', 'processing', 'complete', 'error', 'skipped']);
|
|
6
|
+
/* DELAY STATUS */
|
|
7
|
+
/* * */
|
|
8
|
+
export const DelayStatusSchema = z.enum(['delayed', 'early', 'ontime', 'none']);
|
|
9
|
+
/* SEEN STATUS */
|
|
10
|
+
/* * */
|
|
11
|
+
export const SeenStatusSchema = z.enum(['gone', 'seen', 'unseen']);
|
|
12
|
+
/* OPERATIONAL STATUS */
|
|
13
|
+
/* * */
|
|
14
|
+
export const OperationalStatusSchema = z.enum(['ended', 'missed', 'running', 'scheduled']);
|
|
15
|
+
/* PUBLISH STATUS */
|
|
16
|
+
/* * */
|
|
17
|
+
export const PublishStatusSchema = z.enum(['PUBLISHED', 'ARCHIVED', 'DRAFT']);
|
|
18
|
+
/* APPROVAL STATUS */
|
|
19
|
+
/* * */
|
|
20
|
+
export const ApprovalStatusSchema = z.enum(['pending', 'approved', 'rejected', 'none']);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const AgencySchema: z.ZodObject<{
|
|
3
3
|
_id: z.ZodString;
|
|
4
|
-
created_at: z.ZodEffects<z.ZodNumber, import("./
|
|
4
|
+
created_at: z.ZodEffects<z.ZodNumber, import("./index.js").UnixTimestamp, number>;
|
|
5
5
|
created_by: z.ZodOptional<z.ZodString>;
|
|
6
|
-
updated_at: z.ZodEffects<z.ZodNumber, import("./
|
|
6
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("./index.js").UnixTimestamp, number>;
|
|
7
7
|
updated_by: z.ZodOptional<z.ZodString>;
|
|
8
8
|
} & {
|
|
9
9
|
contact_emails_pta: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -75,9 +75,9 @@ export declare const AgencySchema: z.ZodObject<{
|
|
|
75
75
|
}>;
|
|
76
76
|
export declare const CreateAgencySchema: z.ZodObject<Omit<{
|
|
77
77
|
_id: z.ZodString;
|
|
78
|
-
created_at: z.ZodEffects<z.ZodNumber, import("./
|
|
78
|
+
created_at: z.ZodEffects<z.ZodNumber, import("./index.js").UnixTimestamp, number>;
|
|
79
79
|
created_by: z.ZodOptional<z.ZodString>;
|
|
80
|
-
updated_at: z.ZodEffects<z.ZodNumber, import("./
|
|
80
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("./index.js").UnixTimestamp, number>;
|
|
81
81
|
updated_by: z.ZodOptional<z.ZodString>;
|
|
82
82
|
} & {
|
|
83
83
|
contact_emails_pta: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -200,14 +200,3 @@ export declare const UpdateAgencySchema: z.ZodObject<{
|
|
|
200
200
|
export type Agency = z.infer<typeof AgencySchema>;
|
|
201
201
|
export type CreateAgencyDto = z.infer<typeof CreateAgencySchema>;
|
|
202
202
|
export type UpdateAgencyDto = z.infer<typeof UpdateAgencySchema>;
|
|
203
|
-
export declare const AgencyPermissionSchema: z.ZodObject<{
|
|
204
|
-
agency_ids: z.ZodArray<z.ZodString, "many">;
|
|
205
|
-
municipality_ids: z.ZodArray<z.ZodString, "many">;
|
|
206
|
-
}, "strip", z.ZodTypeAny, {
|
|
207
|
-
agency_ids: string[];
|
|
208
|
-
municipality_ids: string[];
|
|
209
|
-
}, {
|
|
210
|
-
agency_ids: string[];
|
|
211
|
-
municipality_ids: string[];
|
|
212
|
-
}>;
|
|
213
|
-
export type AgencyPermission = z.infer<typeof AgencyPermissionSchema>;
|
|
@@ -18,11 +18,6 @@ export const AgencySchema = DocumentSchema.extend({
|
|
|
18
18
|
short_name: z.string(),
|
|
19
19
|
timezone: z.string().default('Europe/Lisbon'),
|
|
20
20
|
website_url: z.string().url(),
|
|
21
|
-
})
|
|
21
|
+
});
|
|
22
22
|
export const CreateAgencySchema = AgencySchema.omit({ created_at: true, updated_at: true });
|
|
23
23
|
export const UpdateAgencySchema = CreateAgencySchema.omit({ created_by: true }).partial();
|
|
24
|
-
/* * */
|
|
25
|
-
export const AgencyPermissionSchema = z.object({
|
|
26
|
-
agency_ids: z.array(z.string()),
|
|
27
|
-
municipality_ids: z.array(z.string()),
|
|
28
|
-
});
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export
|
|
5
|
-
export type
|
|
6
|
-
export type AlertType = z.infer<typeof alertTypeSchema>;
|
|
7
|
-
export type ReferenceType = z.infer<typeof referenceTypeSchema>;
|
|
2
|
+
export declare const AlertTypeSchema: z.ZodEnum<["PLANNED", "REALTIME"]>;
|
|
3
|
+
export declare const ReferenceTypeSchema: z.ZodEnum<["LINE", "STOP", "AGENCY", "TRIP"]>;
|
|
4
|
+
export type AlertType = z.infer<typeof AlertTypeSchema>;
|
|
5
|
+
export type ReferenceType = z.infer<typeof ReferenceTypeSchema>;
|
|
8
6
|
export declare const AlertSchema: z.ZodObject<{
|
|
9
7
|
_id: z.ZodString;
|
|
10
8
|
created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
@@ -18,6 +16,7 @@ export declare const AlertSchema: z.ZodObject<{
|
|
|
18
16
|
created_by: z.ZodString;
|
|
19
17
|
description: z.ZodString;
|
|
20
18
|
effect: z.ZodEnum<["ACCESSIBILITY_ISSUE", "ADDITIONAL_SERVICE", "DETOUR", "MODIFIED_SERVICE", "NO_EFFECT", "NO_SERVICE", "OTHER_EFFECT", "REDUCED_SERVICE", "SIGNIFICANT_DELAYS", "STOP_MOVED", "UNKNOWN_EFFECT"]>;
|
|
19
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
21
20
|
file_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
21
|
info_url: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
23
22
|
modified_by: z.ZodString;
|
|
@@ -48,7 +47,6 @@ export declare const AlertSchema: z.ZodObject<{
|
|
|
48
47
|
__brand: "UnixTimestamp";
|
|
49
48
|
};
|
|
50
49
|
type: "PLANNED" | "REALTIME";
|
|
51
|
-
municipality_ids: string[];
|
|
52
50
|
active_period_start_date: number & {
|
|
53
51
|
__brand: "UnixTimestamp";
|
|
54
52
|
};
|
|
@@ -56,6 +54,7 @@ export declare const AlertSchema: z.ZodObject<{
|
|
|
56
54
|
description: string;
|
|
57
55
|
effect: "ACCESSIBILITY_ISSUE" | "ADDITIONAL_SERVICE" | "DETOUR" | "MODIFIED_SERVICE" | "NO_EFFECT" | "NO_SERVICE" | "OTHER_EFFECT" | "REDUCED_SERVICE" | "SIGNIFICANT_DELAYS" | "STOP_MOVED" | "UNKNOWN_EFFECT";
|
|
58
56
|
modified_by: string;
|
|
57
|
+
municipality_ids: string[];
|
|
59
58
|
publish_start_date: number & {
|
|
60
59
|
__brand: "UnixTimestamp";
|
|
61
60
|
};
|
|
@@ -69,6 +68,7 @@ export declare const AlertSchema: z.ZodObject<{
|
|
|
69
68
|
updated_by?: string | undefined;
|
|
70
69
|
active_period_end_date?: import("./_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
71
70
|
coordinates?: [number, number] | null | undefined;
|
|
71
|
+
external_id?: string | null | undefined;
|
|
72
72
|
file_id?: string | null | undefined;
|
|
73
73
|
info_url?: string | undefined;
|
|
74
74
|
publish_end_date?: import("./_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
@@ -78,12 +78,12 @@ export declare const AlertSchema: z.ZodObject<{
|
|
|
78
78
|
created_by: string;
|
|
79
79
|
updated_at: number;
|
|
80
80
|
type: "PLANNED" | "REALTIME";
|
|
81
|
-
municipality_ids: string[];
|
|
82
81
|
active_period_start_date: number;
|
|
83
82
|
cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "HOLIDAY" | "MAINTENANCE" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "STRIKE" | "TECHNICAL_PROBLEM" | "UNKNOWN_CAUSE" | "WEATHER" | "DRIVER_ABSENCE" | "DRIVER_ISSUE" | "HIGH_PASSENGER_LOAD" | "ROAD_INCIDENT" | "SYSTEM_FAILURE" | "TRAFFIC_JAM" | "VEHICLE_ISSUE";
|
|
84
83
|
description: string;
|
|
85
84
|
effect: "ACCESSIBILITY_ISSUE" | "ADDITIONAL_SERVICE" | "DETOUR" | "MODIFIED_SERVICE" | "NO_EFFECT" | "NO_SERVICE" | "OTHER_EFFECT" | "REDUCED_SERVICE" | "SIGNIFICANT_DELAYS" | "STOP_MOVED" | "UNKNOWN_EFFECT";
|
|
86
85
|
modified_by: string;
|
|
86
|
+
municipality_ids: string[];
|
|
87
87
|
publish_start_date: number;
|
|
88
88
|
publish_status: "PUBLISHED" | "ARCHIVED" | "DRAFT";
|
|
89
89
|
reference_type: "LINE" | "STOP" | "AGENCY" | "TRIP";
|
|
@@ -95,6 +95,7 @@ export declare const AlertSchema: z.ZodObject<{
|
|
|
95
95
|
updated_by?: string | undefined;
|
|
96
96
|
active_period_end_date?: number | null | undefined;
|
|
97
97
|
coordinates?: [number, number] | null | undefined;
|
|
98
|
+
external_id?: string | null | undefined;
|
|
98
99
|
file_id?: string | null | undefined;
|
|
99
100
|
info_url?: string | undefined;
|
|
100
101
|
publish_end_date?: number | null | undefined;
|
|
@@ -112,6 +113,7 @@ export declare const CreateAlertSchema: z.ZodObject<Omit<{
|
|
|
112
113
|
created_by: z.ZodString;
|
|
113
114
|
description: z.ZodString;
|
|
114
115
|
effect: z.ZodEnum<["ACCESSIBILITY_ISSUE", "ADDITIONAL_SERVICE", "DETOUR", "MODIFIED_SERVICE", "NO_EFFECT", "NO_SERVICE", "OTHER_EFFECT", "REDUCED_SERVICE", "SIGNIFICANT_DELAYS", "STOP_MOVED", "UNKNOWN_EFFECT"]>;
|
|
116
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
115
117
|
file_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
116
118
|
info_url: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
117
119
|
modified_by: z.ZodString;
|
|
@@ -135,7 +137,6 @@ export declare const CreateAlertSchema: z.ZodObject<Omit<{
|
|
|
135
137
|
}, "_id" | "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
|
|
136
138
|
created_by: string;
|
|
137
139
|
type: "PLANNED" | "REALTIME";
|
|
138
|
-
municipality_ids: string[];
|
|
139
140
|
active_period_start_date: number & {
|
|
140
141
|
__brand: "UnixTimestamp";
|
|
141
142
|
};
|
|
@@ -143,6 +144,7 @@ export declare const CreateAlertSchema: z.ZodObject<Omit<{
|
|
|
143
144
|
description: string;
|
|
144
145
|
effect: "ACCESSIBILITY_ISSUE" | "ADDITIONAL_SERVICE" | "DETOUR" | "MODIFIED_SERVICE" | "NO_EFFECT" | "NO_SERVICE" | "OTHER_EFFECT" | "REDUCED_SERVICE" | "SIGNIFICANT_DELAYS" | "STOP_MOVED" | "UNKNOWN_EFFECT";
|
|
145
146
|
modified_by: string;
|
|
147
|
+
municipality_ids: string[];
|
|
146
148
|
publish_start_date: number & {
|
|
147
149
|
__brand: "UnixTimestamp";
|
|
148
150
|
};
|
|
@@ -156,18 +158,19 @@ export declare const CreateAlertSchema: z.ZodObject<Omit<{
|
|
|
156
158
|
updated_by?: string | undefined;
|
|
157
159
|
active_period_end_date?: import("./_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
158
160
|
coordinates?: [number, number] | null | undefined;
|
|
161
|
+
external_id?: string | null | undefined;
|
|
159
162
|
file_id?: string | null | undefined;
|
|
160
163
|
info_url?: string | undefined;
|
|
161
164
|
publish_end_date?: import("./_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
162
165
|
}, {
|
|
163
166
|
created_by: string;
|
|
164
167
|
type: "PLANNED" | "REALTIME";
|
|
165
|
-
municipality_ids: string[];
|
|
166
168
|
active_period_start_date: number;
|
|
167
169
|
cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "HOLIDAY" | "MAINTENANCE" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "STRIKE" | "TECHNICAL_PROBLEM" | "UNKNOWN_CAUSE" | "WEATHER" | "DRIVER_ABSENCE" | "DRIVER_ISSUE" | "HIGH_PASSENGER_LOAD" | "ROAD_INCIDENT" | "SYSTEM_FAILURE" | "TRAFFIC_JAM" | "VEHICLE_ISSUE";
|
|
168
170
|
description: string;
|
|
169
171
|
effect: "ACCESSIBILITY_ISSUE" | "ADDITIONAL_SERVICE" | "DETOUR" | "MODIFIED_SERVICE" | "NO_EFFECT" | "NO_SERVICE" | "OTHER_EFFECT" | "REDUCED_SERVICE" | "SIGNIFICANT_DELAYS" | "STOP_MOVED" | "UNKNOWN_EFFECT";
|
|
170
172
|
modified_by: string;
|
|
173
|
+
municipality_ids: string[];
|
|
171
174
|
publish_start_date: number;
|
|
172
175
|
publish_status: "PUBLISHED" | "ARCHIVED" | "DRAFT";
|
|
173
176
|
reference_type: "LINE" | "STOP" | "AGENCY" | "TRIP";
|
|
@@ -179,6 +182,7 @@ export declare const CreateAlertSchema: z.ZodObject<Omit<{
|
|
|
179
182
|
updated_by?: string | undefined;
|
|
180
183
|
active_period_end_date?: number | null | undefined;
|
|
181
184
|
coordinates?: [number, number] | null | undefined;
|
|
185
|
+
external_id?: string | null | undefined;
|
|
182
186
|
file_id?: string | null | undefined;
|
|
183
187
|
info_url?: string | undefined;
|
|
184
188
|
publish_end_date?: number | null | undefined;
|
|
@@ -186,16 +190,17 @@ export declare const CreateAlertSchema: z.ZodObject<Omit<{
|
|
|
186
190
|
export declare const UpdateAlertSchema: z.ZodObject<{
|
|
187
191
|
updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
188
192
|
type: z.ZodOptional<z.ZodEnum<["PLANNED", "REALTIME"]>>;
|
|
189
|
-
municipality_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
190
193
|
active_period_end_date: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>>;
|
|
191
194
|
active_period_start_date: z.ZodOptional<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>;
|
|
192
195
|
cause: z.ZodOptional<z.ZodEnum<["ACCIDENT", "CONSTRUCTION", "DEMONSTRATION", "HOLIDAY", "MAINTENANCE", "MEDICAL_EMERGENCY", "OTHER_CAUSE", "POLICE_ACTIVITY", "STRIKE", "TECHNICAL_PROBLEM", "UNKNOWN_CAUSE", "WEATHER", "DRIVER_ABSENCE", "DRIVER_ISSUE", "HIGH_PASSENGER_LOAD", "ROAD_INCIDENT", "SYSTEM_FAILURE", "TRAFFIC_JAM", "VEHICLE_ISSUE"]>>;
|
|
193
196
|
coordinates: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>>;
|
|
194
197
|
description: z.ZodOptional<z.ZodString>;
|
|
195
198
|
effect: z.ZodOptional<z.ZodEnum<["ACCESSIBILITY_ISSUE", "ADDITIONAL_SERVICE", "DETOUR", "MODIFIED_SERVICE", "NO_EFFECT", "NO_SERVICE", "OTHER_EFFECT", "REDUCED_SERVICE", "SIGNIFICANT_DELAYS", "STOP_MOVED", "UNKNOWN_EFFECT"]>>;
|
|
199
|
+
external_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
196
200
|
file_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
197
201
|
info_url: z.ZodOptional<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>;
|
|
198
202
|
modified_by: z.ZodOptional<z.ZodString>;
|
|
203
|
+
municipality_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
199
204
|
publish_end_date: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>>;
|
|
200
205
|
publish_start_date: z.ZodOptional<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>;
|
|
201
206
|
publish_status: z.ZodOptional<z.ZodEnum<["PUBLISHED", "ARCHIVED", "DRAFT"]>>;
|
|
@@ -214,16 +219,17 @@ export declare const UpdateAlertSchema: z.ZodObject<{
|
|
|
214
219
|
}, "strict", z.ZodTypeAny, {
|
|
215
220
|
updated_by?: string | undefined;
|
|
216
221
|
type?: "PLANNED" | "REALTIME" | undefined;
|
|
217
|
-
municipality_ids?: string[] | undefined;
|
|
218
222
|
active_period_end_date?: import("./_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
219
223
|
active_period_start_date?: import("./_common/unix-timestamp.js").UnixTimestamp | undefined;
|
|
220
224
|
cause?: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "HOLIDAY" | "MAINTENANCE" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "STRIKE" | "TECHNICAL_PROBLEM" | "UNKNOWN_CAUSE" | "WEATHER" | "DRIVER_ABSENCE" | "DRIVER_ISSUE" | "HIGH_PASSENGER_LOAD" | "ROAD_INCIDENT" | "SYSTEM_FAILURE" | "TRAFFIC_JAM" | "VEHICLE_ISSUE" | undefined;
|
|
221
225
|
coordinates?: [number, number] | null | undefined;
|
|
222
226
|
description?: string | undefined;
|
|
223
227
|
effect?: "ACCESSIBILITY_ISSUE" | "ADDITIONAL_SERVICE" | "DETOUR" | "MODIFIED_SERVICE" | "NO_EFFECT" | "NO_SERVICE" | "OTHER_EFFECT" | "REDUCED_SERVICE" | "SIGNIFICANT_DELAYS" | "STOP_MOVED" | "UNKNOWN_EFFECT" | undefined;
|
|
228
|
+
external_id?: string | null | undefined;
|
|
224
229
|
file_id?: string | null | undefined;
|
|
225
230
|
info_url?: string | undefined;
|
|
226
231
|
modified_by?: string | undefined;
|
|
232
|
+
municipality_ids?: string[] | undefined;
|
|
227
233
|
publish_end_date?: import("./_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
228
234
|
publish_start_date?: import("./_common/unix-timestamp.js").UnixTimestamp | undefined;
|
|
229
235
|
publish_status?: "PUBLISHED" | "ARCHIVED" | "DRAFT" | undefined;
|
|
@@ -236,16 +242,17 @@ export declare const UpdateAlertSchema: z.ZodObject<{
|
|
|
236
242
|
}, {
|
|
237
243
|
updated_by?: string | undefined;
|
|
238
244
|
type?: "PLANNED" | "REALTIME" | undefined;
|
|
239
|
-
municipality_ids?: string[] | undefined;
|
|
240
245
|
active_period_end_date?: number | null | undefined;
|
|
241
246
|
active_period_start_date?: number | undefined;
|
|
242
247
|
cause?: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "HOLIDAY" | "MAINTENANCE" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "STRIKE" | "TECHNICAL_PROBLEM" | "UNKNOWN_CAUSE" | "WEATHER" | "DRIVER_ABSENCE" | "DRIVER_ISSUE" | "HIGH_PASSENGER_LOAD" | "ROAD_INCIDENT" | "SYSTEM_FAILURE" | "TRAFFIC_JAM" | "VEHICLE_ISSUE" | undefined;
|
|
243
248
|
coordinates?: [number, number] | null | undefined;
|
|
244
249
|
description?: string | undefined;
|
|
245
250
|
effect?: "ACCESSIBILITY_ISSUE" | "ADDITIONAL_SERVICE" | "DETOUR" | "MODIFIED_SERVICE" | "NO_EFFECT" | "NO_SERVICE" | "OTHER_EFFECT" | "REDUCED_SERVICE" | "SIGNIFICANT_DELAYS" | "STOP_MOVED" | "UNKNOWN_EFFECT" | undefined;
|
|
251
|
+
external_id?: string | null | undefined;
|
|
246
252
|
file_id?: string | null | undefined;
|
|
247
253
|
info_url?: string | undefined;
|
|
248
254
|
modified_by?: string | undefined;
|
|
255
|
+
municipality_ids?: string[] | undefined;
|
|
249
256
|
publish_end_date?: number | null | undefined;
|
|
250
257
|
publish_start_date?: number | undefined;
|
|
251
258
|
publish_status?: "PUBLISHED" | "ARCHIVED" | "DRAFT" | undefined;
|
|
@@ -259,14 +266,6 @@ export declare const UpdateAlertSchema: z.ZodObject<{
|
|
|
259
266
|
export type Alert = z.infer<typeof AlertSchema>;
|
|
260
267
|
export type CreateAlertDto = z.infer<typeof CreateAlertSchema>;
|
|
261
268
|
export type UpdateAlertDto = z.infer<typeof UpdateAlertSchema>;
|
|
262
|
-
export declare const AlertPermissionSchema: z.ZodObject<{
|
|
263
|
-
agency_ids: z.ZodArray<z.ZodString, "many">;
|
|
264
|
-
}, "strip", z.ZodTypeAny, {
|
|
265
|
-
agency_ids: string[];
|
|
266
|
-
}, {
|
|
267
|
-
agency_ids: string[];
|
|
268
|
-
}>;
|
|
269
|
-
export type AlertPermission = z.infer<typeof AlertPermissionSchema>;
|
|
270
269
|
export declare const GetAllAlertsQuerySchema: z.ZodObject<{
|
|
271
270
|
realtime: z.ZodEffects<z.ZodBoolean, boolean, unknown>;
|
|
272
271
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
/* * */
|
|
2
2
|
import { DocumentSchema } from './_common/document.js';
|
|
3
|
+
import { PublishStatusSchema } from './_common/status.js';
|
|
3
4
|
import { unixTimeStampSchema } from './_common/unix-timestamp.js';
|
|
4
|
-
import { z } from 'zod';
|
|
5
5
|
import { gtfsCauseSchema, gtfsEffectSchema } from './gtfs/cause-effetcs.js';
|
|
6
|
+
import { z } from 'zod';
|
|
6
7
|
/* * */
|
|
7
8
|
// Define constants for enum values for better maintainability
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const REFERENCE_TYPE_VALUES = ['LINE', 'STOP', 'AGENCY', 'TRIP'];
|
|
11
|
-
export const publishStatusSchema = z.enum(PUBLISH_STATUS_VALUES);
|
|
12
|
-
export const alertTypeSchema = z.enum(ALERT_TYPE_VALUES);
|
|
13
|
-
export const referenceTypeSchema = z.enum(REFERENCE_TYPE_VALUES);
|
|
9
|
+
export const AlertTypeSchema = z.enum(['PLANNED', 'REALTIME']);
|
|
10
|
+
export const ReferenceTypeSchema = z.enum(['LINE', 'STOP', 'AGENCY', 'TRIP']);
|
|
14
11
|
/* * */
|
|
15
12
|
// Base schema for alerts with common validation rules
|
|
16
13
|
export const AlertSchema = DocumentSchema.extend({
|
|
@@ -21,28 +18,25 @@ export const AlertSchema = DocumentSchema.extend({
|
|
|
21
18
|
created_by: z.string().min(1),
|
|
22
19
|
description: z.string(),
|
|
23
20
|
effect: gtfsEffectSchema,
|
|
21
|
+
external_id: z.string().nullish(),
|
|
24
22
|
file_id: z.string().nullish(),
|
|
25
23
|
info_url: z.string().url().optional().or(z.literal('')),
|
|
26
24
|
modified_by: z.string().min(1),
|
|
27
25
|
municipality_ids: z.array(z.string().min(1)),
|
|
28
26
|
publish_end_date: unixTimeStampSchema.nullish(),
|
|
29
27
|
publish_start_date: unixTimeStampSchema,
|
|
30
|
-
publish_status:
|
|
31
|
-
reference_type:
|
|
28
|
+
publish_status: PublishStatusSchema,
|
|
29
|
+
reference_type: ReferenceTypeSchema,
|
|
32
30
|
references: z.array(z.object({
|
|
33
31
|
child_ids: z.array(z.string().min(1)),
|
|
34
32
|
parent_id: z.string().min(1),
|
|
35
33
|
})),
|
|
36
34
|
title: z.string().min(1),
|
|
37
|
-
type:
|
|
35
|
+
type: AlertTypeSchema,
|
|
38
36
|
}).strict();
|
|
39
37
|
export const CreateAlertSchema = AlertSchema.omit({ _id: true, created_at: true, updated_at: true });
|
|
40
38
|
export const UpdateAlertSchema = CreateAlertSchema.omit({ created_by: true }).partial();
|
|
41
39
|
/* * */
|
|
42
|
-
export const AlertPermissionSchema = z.object({
|
|
43
|
-
agency_ids: z.array(z.string()),
|
|
44
|
-
});
|
|
45
|
-
/* * */
|
|
46
40
|
export const GetAllAlertsQuerySchema = z.object({
|
|
47
41
|
realtime: z.preprocess((val) => val === 'true' || val === '1', z.boolean()),
|
|
48
42
|
});
|
|
@@ -250,18 +250,18 @@ export declare const SimplifiedApexValidationSchema: z.ZodObject<{
|
|
|
250
250
|
__brand: "UnixTimestamp";
|
|
251
251
|
};
|
|
252
252
|
agency_id: string;
|
|
253
|
-
line_id: string;
|
|
254
|
-
pattern_id: string;
|
|
255
|
-
trip_id: string;
|
|
256
253
|
apex_version: string;
|
|
257
254
|
device_id: string;
|
|
258
|
-
|
|
255
|
+
line_id: string;
|
|
259
256
|
mac_ase_counter_value: number;
|
|
260
257
|
mac_sam_serial_number: number;
|
|
258
|
+
pattern_id: string;
|
|
261
259
|
received_at: number & {
|
|
262
260
|
__brand: "UnixTimestamp";
|
|
263
261
|
};
|
|
264
262
|
stop_id: string;
|
|
263
|
+
trip_id: string;
|
|
264
|
+
vehicle_id: number;
|
|
265
265
|
card_serial_number: string;
|
|
266
266
|
on_board_sale_id: string | null;
|
|
267
267
|
is_passenger: boolean;
|
|
@@ -270,7 +270,7 @@ export declare const SimplifiedApexValidationSchema: z.ZodObject<{
|
|
|
270
270
|
event_type: number;
|
|
271
271
|
product_id: string;
|
|
272
272
|
units_qty: number | null;
|
|
273
|
-
validation_status: 0 | 1 | 2 |
|
|
273
|
+
validation_status: 0 | 1 | 2 | 5 | 4 | 3 | 12 | 11 | 6 | 7 | 8 | 9 | 10 | 13;
|
|
274
274
|
created_by?: string | undefined;
|
|
275
275
|
updated_by?: string | undefined;
|
|
276
276
|
}, {
|
|
@@ -278,16 +278,16 @@ export declare const SimplifiedApexValidationSchema: z.ZodObject<{
|
|
|
278
278
|
created_at: number;
|
|
279
279
|
updated_at: number;
|
|
280
280
|
agency_id: string;
|
|
281
|
-
line_id: string;
|
|
282
|
-
pattern_id: string;
|
|
283
|
-
trip_id: string;
|
|
284
281
|
apex_version: string;
|
|
285
282
|
device_id: string;
|
|
286
|
-
|
|
283
|
+
line_id: string;
|
|
287
284
|
mac_ase_counter_value: number;
|
|
288
285
|
mac_sam_serial_number: number;
|
|
286
|
+
pattern_id: string;
|
|
289
287
|
received_at: number;
|
|
290
288
|
stop_id: string;
|
|
289
|
+
trip_id: string;
|
|
290
|
+
vehicle_id: number;
|
|
291
291
|
card_serial_number: string;
|
|
292
292
|
on_board_sale_id: string | null;
|
|
293
293
|
is_passenger: boolean;
|
|
@@ -296,7 +296,7 @@ export declare const SimplifiedApexValidationSchema: z.ZodObject<{
|
|
|
296
296
|
event_type: number;
|
|
297
297
|
product_id: string;
|
|
298
298
|
units_qty: number | null;
|
|
299
|
-
validation_status: 0 | 1 | 2 |
|
|
299
|
+
validation_status: 0 | 1 | 2 | 5 | 4 | 3 | 12 | 11 | 6 | 7 | 8 | 9 | 10 | 13;
|
|
300
300
|
created_by?: string | undefined;
|
|
301
301
|
updated_by?: string | undefined;
|
|
302
302
|
}>;
|
|
@@ -404,16 +404,16 @@ export declare const UpdateSimplifiedApexValidationSchema: z.ZodObject<{
|
|
|
404
404
|
updated_at?: import("../_common/unix-timestamp.js").UnixTimestamp | undefined;
|
|
405
405
|
updated_by?: string | undefined;
|
|
406
406
|
agency_id?: string | undefined;
|
|
407
|
-
line_id?: string | undefined;
|
|
408
|
-
pattern_id?: string | undefined;
|
|
409
|
-
trip_id?: string | undefined;
|
|
410
407
|
apex_version?: string | undefined;
|
|
411
408
|
device_id?: string | undefined;
|
|
412
|
-
|
|
409
|
+
line_id?: string | undefined;
|
|
413
410
|
mac_ase_counter_value?: number | undefined;
|
|
414
411
|
mac_sam_serial_number?: number | undefined;
|
|
412
|
+
pattern_id?: string | undefined;
|
|
415
413
|
received_at?: import("../_common/unix-timestamp.js").UnixTimestamp | undefined;
|
|
416
414
|
stop_id?: string | undefined;
|
|
415
|
+
trip_id?: string | undefined;
|
|
416
|
+
vehicle_id?: number | undefined;
|
|
417
417
|
card_serial_number?: string | undefined;
|
|
418
418
|
on_board_sale_id?: string | null | undefined;
|
|
419
419
|
is_passenger?: boolean | undefined;
|
|
@@ -422,7 +422,7 @@ export declare const UpdateSimplifiedApexValidationSchema: z.ZodObject<{
|
|
|
422
422
|
event_type?: number | undefined;
|
|
423
423
|
product_id?: string | undefined;
|
|
424
424
|
units_qty?: number | null | undefined;
|
|
425
|
-
validation_status?: 0 | 1 | 2 |
|
|
425
|
+
validation_status?: 0 | 1 | 2 | 5 | 4 | 3 | 12 | 11 | 6 | 7 | 8 | 9 | 10 | 13 | undefined;
|
|
426
426
|
}, {
|
|
427
427
|
_id?: string | undefined;
|
|
428
428
|
created_at?: number | undefined;
|
|
@@ -430,16 +430,16 @@ export declare const UpdateSimplifiedApexValidationSchema: z.ZodObject<{
|
|
|
430
430
|
updated_at?: number | undefined;
|
|
431
431
|
updated_by?: string | undefined;
|
|
432
432
|
agency_id?: string | undefined;
|
|
433
|
-
line_id?: string | undefined;
|
|
434
|
-
pattern_id?: string | undefined;
|
|
435
|
-
trip_id?: string | undefined;
|
|
436
433
|
apex_version?: string | undefined;
|
|
437
434
|
device_id?: string | undefined;
|
|
438
|
-
|
|
435
|
+
line_id?: string | undefined;
|
|
439
436
|
mac_ase_counter_value?: number | undefined;
|
|
440
437
|
mac_sam_serial_number?: number | undefined;
|
|
438
|
+
pattern_id?: string | undefined;
|
|
441
439
|
received_at?: number | undefined;
|
|
442
440
|
stop_id?: string | undefined;
|
|
441
|
+
trip_id?: string | undefined;
|
|
442
|
+
vehicle_id?: number | undefined;
|
|
443
443
|
card_serial_number?: string | undefined;
|
|
444
444
|
on_board_sale_id?: string | null | undefined;
|
|
445
445
|
is_passenger?: boolean | undefined;
|
|
@@ -448,7 +448,7 @@ export declare const UpdateSimplifiedApexValidationSchema: z.ZodObject<{
|
|
|
448
448
|
event_type?: number | undefined;
|
|
449
449
|
product_id?: string | undefined;
|
|
450
450
|
units_qty?: number | null | undefined;
|
|
451
|
-
validation_status?: 0 | 1 | 2 |
|
|
451
|
+
validation_status?: 0 | 1 | 2 | 5 | 4 | 3 | 12 | 11 | 6 | 7 | 8 | 9 | 10 | 13 | undefined;
|
|
452
452
|
}>;
|
|
453
453
|
/**
|
|
454
454
|
* APEX Validations are APEX transactions of type 11 that are generated when a card holder touches a validator
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from './login.js';
|
|
2
2
|
export * from './password-requirements.js';
|
|
3
|
-
export * from './permission.js';
|
|
4
3
|
export * from './role.js';
|
|
5
4
|
export * from './session.js';
|
|
6
5
|
export * from './user.js';
|
|
7
6
|
export * from './verification-token.js';
|
|
7
|
+
export * from '../permissions/alerts.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from './login.js';
|
|
2
2
|
export * from './password-requirements.js';
|
|
3
|
-
export * from './permission.js';
|
|
4
3
|
export * from './role.js';
|
|
5
4
|
export * from './session.js';
|
|
6
5
|
export * from './user.js';
|
|
7
6
|
export * from './verification-token.js';
|
|
7
|
+
export * from '../permissions/alerts.js';
|