@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.
Files changed (235) hide show
  1. package/dist/{src/_common → _common}/index.d.ts +4 -2
  2. package/dist/{src/_common → _common}/index.js +4 -2
  3. package/dist/_common/mongo.d.ts +3 -0
  4. package/dist/_common/status.d.ts +13 -0
  5. package/dist/_common/status.js +20 -0
  6. package/dist/_common/utility.js +1 -0
  7. package/dist/{src/agency.d.ts → agency.d.ts} +4 -15
  8. package/dist/{src/agency.js → agency.js} +1 -6
  9. package/dist/{src/alert.d.ts → alert.d.ts} +20 -21
  10. package/dist/{src/alert.js → alert.js} +8 -14
  11. package/dist/{src/simplified-apex → apex}/simplified-apex-validation.d.ts +20 -20
  12. package/dist/{src/auth → auth}/index.d.ts +1 -1
  13. package/dist/{src/auth → auth}/index.js +1 -1
  14. package/dist/{src/auth → auth}/password-requirements.js +2 -1
  15. package/dist/auth/role.d.ts +958 -0
  16. package/dist/{src/auth → auth}/role.js +2 -2
  17. package/dist/{src/auth → auth}/session.d.ts +13 -9
  18. package/dist/{src/auth → auth}/session.js +1 -1
  19. package/dist/auth/user.d.ts +1281 -0
  20. package/dist/{src/auth → auth}/user.js +11 -14
  21. package/dist/{src/file-exports → file-exports}/common.d.ts +9 -8
  22. package/dist/{src/file-exports → file-exports}/common.js +1 -1
  23. package/dist/file-exports/index.d.ts +121 -0
  24. package/dist/file-exports/ride-export.d.ts +410 -0
  25. package/dist/file-exports/ride-export.js +131 -0
  26. package/dist/{src/file.d.ts → file.d.ts} +18 -18
  27. package/dist/gtfs/agency.d.ts +30 -0
  28. package/dist/gtfs/agency.js +13 -0
  29. package/dist/gtfs/feed-info.d.ts +33 -0
  30. package/dist/{src/gtfs.js → gtfs/feed-info.js} +1 -11
  31. package/dist/{src/gtfs → gtfs}/index.d.ts +3 -0
  32. package/dist/{src/gtfs → gtfs}/index.js +3 -0
  33. package/dist/gtfs/service-alert.d.ts +26 -0
  34. package/dist/index.d.ts +22 -22
  35. package/dist/index.js +22 -22
  36. package/dist/locations/census.d.ts +211 -0
  37. package/dist/locations/census.js +2 -0
  38. package/dist/locations/district.d.ts +24 -0
  39. package/dist/locations/district.js +2 -0
  40. package/dist/locations/index.d.ts +6 -0
  41. package/dist/locations/index.js +6 -0
  42. package/dist/locations/locality.d.ts +27 -0
  43. package/dist/locations/locality.js +2 -0
  44. package/dist/locations/municipality.d.ts +25 -0
  45. package/dist/locations/municipality.js +2 -0
  46. package/dist/locations/parish.d.ts +26 -0
  47. package/dist/locations/parish.js +2 -0
  48. package/dist/locations/queries.d.ts +117 -0
  49. package/dist/{src/locations.js → locations/queries.js} +5 -16
  50. package/dist/metrics/demand/demand_by_agency.d.ts +210 -0
  51. package/dist/metrics/demand/demand_by_agency.js +39 -0
  52. package/dist/metrics/demand/demand_by_category.d.ts +475 -0
  53. package/dist/metrics/demand/demand_by_category.js +114 -0
  54. package/dist/metrics/demand/demand_by_line.d.ts +246 -0
  55. package/dist/metrics/demand/demand_by_line.js +56 -0
  56. package/dist/metrics/demand/demand_by_pattern.d.ts +332 -0
  57. package/dist/metrics/demand/demand_by_pattern.js +56 -0
  58. package/dist/metrics/demand/demand_by_product.d.ts +475 -0
  59. package/dist/metrics/demand/demand_by_product.js +114 -0
  60. package/dist/metrics/demand/index.d.ts +6 -0
  61. package/dist/metrics/demand/index.js +8 -0
  62. package/dist/metrics/demand/records.d.ts +320 -0
  63. package/dist/metrics/demand/records.js +53 -0
  64. package/dist/metrics/index.d.ts +2647 -0
  65. package/dist/metrics/index.js +48 -0
  66. package/dist/metrics/realtime.d.ts +667 -0
  67. package/dist/metrics/realtime.js +41 -0
  68. package/dist/{src/notification.d.ts → notification.d.ts} +4 -4
  69. package/dist/{src/organization.d.ts → organization.d.ts} +32 -32
  70. package/dist/{src/organization.js → organization.js} +7 -7
  71. package/dist/permissions/agencies.d.ts +12 -0
  72. package/dist/permissions/agencies.js +13 -0
  73. package/dist/permissions/alerts.d.ts +36 -0
  74. package/dist/permissions/alerts.js +25 -0
  75. package/dist/permissions/controller.d.ts +36 -0
  76. package/dist/permissions/controller.js +30 -0
  77. package/dist/permissions/gtfs-validations.d.ts +25 -0
  78. package/dist/permissions/gtfs-validations.js +14 -0
  79. package/dist/permissions/home.d.ts +12 -0
  80. package/dist/permissions/home.js +10 -0
  81. package/dist/permissions/index.d.ts +268 -0
  82. package/dist/permissions/index.js +149 -0
  83. package/dist/permissions/organizations.d.ts +12 -0
  84. package/dist/permissions/organizations.js +12 -0
  85. package/dist/permissions/performance.d.ts +12 -0
  86. package/dist/permissions/performance.js +9 -0
  87. package/dist/permissions/plans.d.ts +25 -0
  88. package/dist/permissions/plans.js +22 -0
  89. package/dist/permissions/roles.d.ts +12 -0
  90. package/dist/permissions/roles.js +12 -0
  91. package/dist/permissions/stops.d.ts +30 -0
  92. package/dist/permissions/stops.js +17 -0
  93. package/dist/permissions/users.d.ts +12 -0
  94. package/dist/permissions/users.js +12 -0
  95. package/dist/{src/plans → plans}/gtfs-validation.d.ts +55 -63
  96. package/dist/{src/plans → plans}/gtfs-validation.js +3 -6
  97. package/dist/plans/plan-app-status.d.ts +15 -0
  98. package/dist/plans/plan-app-status.js +10 -0
  99. package/dist/{src/plans → plans}/plan.d.ts +240 -104
  100. package/dist/{src/plans → plans}/plan.js +8 -10
  101. package/dist/{src/_common/proposed-change.d.ts → proposed-change.d.ts} +21 -22
  102. package/dist/{src/_common/proposed-change.js → proposed-change.js} +5 -7
  103. package/dist/{src/rides → rides}/index.d.ts +1 -0
  104. package/dist/{src/rides → rides}/index.js +1 -0
  105. package/dist/{src/rides → rides}/ride-acceptance.d.ts +65 -65
  106. package/dist/{src/rides → rides}/ride-analysis.d.ts +34 -34
  107. package/dist/{src/rides → rides}/ride-audit.d.ts +10 -10
  108. package/dist/rides/ride-normalized.d.ts +29 -0
  109. package/dist/rides/ride-normalized.js +2 -0
  110. package/dist/{src/rides → rides}/ride.d.ts +523 -567
  111. package/dist/{src/rides → rides}/ride.js +2 -16
  112. package/dist/{src/sams → sams}/sam-analysis.d.ts +11 -11
  113. package/dist/{src/sams → sams}/sam-analysis.js +4 -4
  114. package/dist/{src/sams → sams}/sam.d.ts +76 -76
  115. package/dist/{src/sams → sams}/sam.js +1 -1
  116. package/dist/{src/stop.d.ts → stop.d.ts} +32 -43
  117. package/dist/{src/stop.js → stop.js} +3 -8
  118. package/dist/vehicle-events/gtfs-rt-vehicle-event-extended.d.ts +77 -0
  119. package/dist/vehicle-events/gtfs-rt-vehicle-event-extended.js +21 -0
  120. package/dist/vehicle-events/index.d.ts +2 -0
  121. package/dist/vehicle-events/index.js +2 -0
  122. package/dist/{src/vehicle-event.d.ts → vehicle-events/simplified-vehicle-event.d.ts} +9 -9
  123. package/dist/{src/vehicle-event.js → vehicle-events/simplified-vehicle-event.js} +3 -3
  124. package/dist/wiki.js +2 -0
  125. package/dist/{src/zone.d.ts → zone.d.ts} +2 -16
  126. package/dist/{src/zone.js → zone.js} +0 -6
  127. package/package.json +18 -21
  128. package/README.md +0 -13
  129. package/dist/src/_common/email.d.ts +0 -4
  130. package/dist/src/_common/email.js +0 -7
  131. package/dist/src/auth/permission.d.ts +0 -19
  132. package/dist/src/auth/permission.js +0 -8
  133. package/dist/src/auth/role.d.ts +0 -127
  134. package/dist/src/auth/user.d.ts +0 -311
  135. package/dist/src/file-exports/index.d.ts +0 -121
  136. package/dist/src/file-exports/ride-export.d.ts +0 -470
  137. package/dist/src/file-exports/ride-export.js +0 -128
  138. package/dist/src/gtfs.d.ts +0 -88
  139. package/dist/src/locations.d.ts +0 -319
  140. package/dist/src/metrics/demand.d.ts +0 -803
  141. package/dist/src/metrics/demand.js +0 -153
  142. package/dist/src/metrics/index.d.ts +0 -806
  143. package/dist/src/metrics/index.js +0 -19
  144. package/dist/src/plans/plan-controller.d.ts +0 -15
  145. package/dist/src/plans/plan-controller.js +0 -10
  146. package/dist/src/system/index.d.ts +0 -2
  147. package/dist/src/system/index.js +0 -2
  148. package/dist/src/system/processing-status.d.ts +0 -9
  149. package/dist/src/system/processing-status.js +0 -5
  150. package/dist/{src/_common → _common}/comment.d.ts +8 -8
  151. package/dist/{src/_common → _common}/comment.js +0 -0
  152. package/dist/{src/_common → _common}/document.d.ts +0 -0
  153. package/dist/{src/_common → _common}/document.js +0 -0
  154. package/dist/{src/system → _common}/environment.d.ts +0 -0
  155. package/dist/{src/system → _common}/environment.js +0 -0
  156. package/dist/{src/_common → _common}/fastify.d.ts +0 -0
  157. package/dist/{src/_common → _common}/fastify.js +0 -0
  158. package/dist/{src/_common/utility.js → _common/mongo.js} +0 -0
  159. package/dist/{src/_common → _common}/operational-date.d.ts +0 -0
  160. package/dist/{src/_common → _common}/operational-date.js +0 -0
  161. package/dist/{src/_common → _common}/unix-timestamp.d.ts +0 -0
  162. package/dist/{src/_common → _common}/unix-timestamp.js +0 -0
  163. package/dist/{src/_common → _common}/utility.d.ts +0 -0
  164. package/dist/{src/simplified-apex → apex}/index.d.ts +0 -0
  165. package/dist/{src/simplified-apex → apex}/index.js +0 -0
  166. package/dist/{src/simplified-apex → apex}/simplified-apex-inspection-decision.d.ts +0 -0
  167. package/dist/{src/simplified-apex → apex}/simplified-apex-inspection-decision.js +0 -0
  168. package/dist/{src/simplified-apex → apex}/simplified-apex-inspection.d.ts +0 -0
  169. package/dist/{src/simplified-apex → apex}/simplified-apex-inspection.js +0 -0
  170. package/dist/{src/simplified-apex → apex}/simplified-apex-location.d.ts +16 -16
  171. package/dist/{src/simplified-apex → apex}/simplified-apex-location.js +0 -0
  172. package/dist/{src/simplified-apex → apex}/simplified-apex-on-board-refund.d.ts +20 -20
  173. package/dist/{src/simplified-apex → apex}/simplified-apex-on-board-refund.js +0 -0
  174. package/dist/{src/simplified-apex → apex}/simplified-apex-on-board-sale.d.ts +25 -25
  175. package/dist/{src/simplified-apex → apex}/simplified-apex-on-board-sale.js +0 -0
  176. package/dist/{src/simplified-apex → apex}/simplified-apex-type.d.ts +0 -0
  177. package/dist/{src/simplified-apex → apex}/simplified-apex-type.js +0 -0
  178. package/dist/{src/simplified-apex → apex}/simplified-apex-validation.js +0 -0
  179. package/dist/{src/auth → auth}/login.d.ts +0 -0
  180. package/dist/{src/auth → auth}/login.js +0 -0
  181. package/dist/{src/auth → auth}/password-requirements.d.ts +0 -0
  182. package/dist/{src/auth → auth}/verification-token.d.ts +0 -0
  183. package/dist/{src/auth → auth}/verification-token.js +0 -0
  184. package/dist/{src/file-exports → file-exports}/index.js +0 -0
  185. package/dist/{src/file.js → file.js} +0 -0
  186. package/dist/{src/gtfs → gtfs}/calendar-dates.d.ts +0 -0
  187. package/dist/{src/gtfs → gtfs}/calendar-dates.js +0 -0
  188. package/dist/{src/gtfs → gtfs}/calendar.d.ts +0 -0
  189. package/dist/{src/gtfs → gtfs}/calendar.js +0 -0
  190. package/dist/{src/gtfs → gtfs}/cause-effetcs.d.ts +0 -0
  191. package/dist/{src/gtfs → gtfs}/cause-effetcs.js +0 -0
  192. package/dist/{src/gtfs → gtfs}/common.d.ts +0 -0
  193. package/dist/{src/gtfs → gtfs}/common.js +0 -0
  194. package/dist/{src/gtfs → gtfs}/routes.d.ts +0 -0
  195. package/dist/{src/gtfs → gtfs}/routes.js +0 -0
  196. package/dist/{src/pcgi/pcgi-apex-location.js → gtfs/service-alert.js} +0 -0
  197. package/dist/{src/gtfs → gtfs}/shapes.d.ts +0 -0
  198. package/dist/{src/gtfs → gtfs}/shapes.js +0 -0
  199. package/dist/{src/gtfs → gtfs}/stop-times.d.ts +0 -0
  200. package/dist/{src/gtfs → gtfs}/stop-times.js +0 -0
  201. package/dist/{src/gtfs → gtfs}/stops.d.ts +0 -0
  202. package/dist/{src/gtfs → gtfs}/stops.js +0 -0
  203. package/dist/{src/gtfs → gtfs}/trips.d.ts +0 -0
  204. package/dist/{src/gtfs → gtfs}/trips.js +0 -0
  205. package/dist/{src/metrics → metrics}/common.d.ts +0 -0
  206. package/dist/{src/metrics → metrics}/common.js +0 -0
  207. package/dist/{src/notification.js → notification.js} +0 -0
  208. package/dist/{src/pcgi → pcgi}/index.d.ts +0 -0
  209. package/dist/{src/pcgi → pcgi}/index.js +0 -0
  210. package/dist/{src/pcgi → pcgi}/pcgi-apex-location.d.ts +0 -0
  211. package/dist/{src/pcgi/pcgi-apex-refund.js → pcgi/pcgi-apex-location.js} +0 -0
  212. package/dist/{src/pcgi → pcgi}/pcgi-apex-refund.d.ts +0 -0
  213. package/dist/{src/pcgi/pcgi-apex-sale.js → pcgi/pcgi-apex-refund.js} +0 -0
  214. package/dist/{src/pcgi → pcgi}/pcgi-apex-sale.d.ts +0 -0
  215. package/dist/{src/pcgi/pcgi-apex-validation.js → pcgi/pcgi-apex-sale.js} +0 -0
  216. package/dist/{src/pcgi → pcgi}/pcgi-apex-validation.d.ts +0 -0
  217. package/dist/{src/pcgi/pcgi-transaction-entity.js → pcgi/pcgi-apex-validation.js} +0 -0
  218. package/dist/{src/pcgi → pcgi}/pcgi-transaction-entity.d.ts +0 -0
  219. package/dist/{src/rides/hashed-shape.js → pcgi/pcgi-transaction-entity.js} +0 -0
  220. package/dist/{src/plans → plans}/index.d.ts +0 -0
  221. package/dist/{src/plans → plans}/index.js +0 -0
  222. package/dist/{src/plans → plans}/plan-pcgi-legacy.d.ts +0 -0
  223. package/dist/{src/plans → plans}/plan-pcgi-legacy.js +0 -0
  224. package/dist/{src/rides → rides}/hashed-shape.d.ts +0 -0
  225. package/dist/{src/rides/hashed-trip.js → rides/hashed-shape.js} +0 -0
  226. package/dist/{src/rides → rides}/hashed-trip.d.ts +0 -0
  227. package/dist/{src/wiki.js → rides/hashed-trip.js} +0 -0
  228. package/dist/{src/rides → rides}/ride-acceptance.js +1 -1
  229. /package/dist/{src/rides → rides}/ride-analysis.js +0 -0
  230. /package/dist/{src/rides → rides}/ride-audit.js +0 -0
  231. /package/dist/{src/rides → rides}/ride-overrides.d.ts +0 -0
  232. /package/dist/{src/rides → rides}/ride-overrides.js +0 -0
  233. /package/dist/{src/sams → sams}/index.d.ts +0 -0
  234. /package/dist/{src/sams → sams}/index.js +0 -0
  235. /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 './email.js';
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 './proposed-change.js';
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 './email.js';
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 './proposed-change.js';
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,3 @@
1
+ export interface MongoCollections {
2
+ agencies: string;
3
+ }
@@ -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("./_common/unix-timestamp.js").UnixTimestamp, number>;
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("./_common/unix-timestamp.js").UnixTimestamp, number>;
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("./_common/unix-timestamp.js").UnixTimestamp, number>;
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("./_common/unix-timestamp.js").UnixTimestamp, number>;
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
- }).strip();
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 publishStatusSchema: z.ZodEnum<["PUBLISHED", "ARCHIVED", "DRAFT"]>;
3
- export declare const alertTypeSchema: z.ZodEnum<["PLANNED", "REALTIME"]>;
4
- export declare const referenceTypeSchema: z.ZodEnum<["LINE", "STOP", "AGENCY", "TRIP"]>;
5
- export type PublishStatus = z.infer<typeof publishStatusSchema>;
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 PUBLISH_STATUS_VALUES = ['PUBLISHED', 'ARCHIVED', 'DRAFT'];
9
- const ALERT_TYPE_VALUES = ['PLANNED', 'REALTIME'];
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: publishStatusSchema,
31
- reference_type: referenceTypeSchema,
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: alertTypeSchema,
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
- vehicle_id: number;
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 | 3 | 5 | 4 | 12 | 11 | 8 | 6 | 10 | 7 | 9 | 13;
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
- vehicle_id: number;
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 | 3 | 5 | 4 | 12 | 11 | 8 | 6 | 10 | 7 | 9 | 13;
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
- vehicle_id?: number | undefined;
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 | 3 | 5 | 4 | 12 | 11 | 8 | 6 | 10 | 7 | 9 | 13 | undefined;
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
- vehicle_id?: number | undefined;
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 | 3 | 5 | 4 | 12 | 11 | 8 | 6 | 10 | 7 | 9 | 13 | undefined;
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';
@@ -1,7 +1,8 @@
1
1
  /* * */
2
2
  import { z } from 'zod';
3
3
  /* * */
4
- export const PasswordRequirementsSchema = z.object({
4
+ export const PasswordRequirementsSchema = z
5
+ .object({
5
6
  password: z.string(),
6
7
  })
7
8
  .superRefine(({ password }, checkPassComplexity) => {