@tmlmobilidade/types 20251103.1255.55 → 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 -407
  137. package/dist/src/file-exports/ride-export.js +0 -120
  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,21 +1,11 @@
1
1
  /* * */
2
2
  import { DocumentSchema } from '../_common/document.js';
3
3
  import { operationalDateSchema } from '../_common/operational-date.js';
4
+ import { ProcessingStatusSchema } from '../_common/status.js';
4
5
  import { unixTimeStampSchema } from '../_common/unix-timestamp.js';
5
6
  import { atLeastOneVehicleEventOnFirstStopSchema, endedAtLastStopSchema, expectedApexValidationIntervalSchema, expectedDriverIdQtySchema, expectedStartTimeSchema, expectedVehicleEventDelaySchema, expectedVehicleEventIntervalSchema, expectedVehicleEventQtySchema, expectedVehicleIdQtySchema, matchingApexLocationsSchema, matchingVehicleIdsSchema, simpleOneApexValidationSchema, simpleOneVehicleEventOrApexValidationSchema, simpleThreeVehicleEventsSchema, transactionSequentialitySchema } from './ride-analysis.js';
6
- import { ProcessingStatusSchema } from '../system/processing-status.js';
7
7
  import { z } from 'zod';
8
8
  /* * */
9
- /* * */
10
- export const RIDE_OPERATIONAL_STATUS_OPTIONS = ['ended', 'missed', 'running', 'scheduled'];
11
- export const RideOperationalStatusSchema = z.enum(RIDE_OPERATIONAL_STATUS_OPTIONS);
12
- /* * */
13
- export const RIDE_DELAY_STATUS_OPTIONS = ['delayed', 'early', 'ontime', 'none'];
14
- export const RideDelayStatusSchema = z.enum(RIDE_DELAY_STATUS_OPTIONS);
15
- /* * */
16
- export const RIDE_SEEN_STATUS_OPTIONS = ['gone', 'seen', 'unseen'];
17
- export const RideSeenStatusSchema = z.enum(RIDE_SEEN_STATUS_OPTIONS);
18
- /* * */
19
9
  export const RideSchema = DocumentSchema.extend({
20
10
  agency_id: z.string(),
21
11
  analysis: z.object({
@@ -68,10 +58,6 @@ export const RideSchema = DocumentSchema.extend({
68
58
  system_status: ProcessingStatusSchema.default('waiting'),
69
59
  trip_id: z.string(),
70
60
  vehicle_ids: z.array(z.number()),
71
- }).strip();
61
+ });
72
62
  export const CreateRideSchema = RideSchema.partial({ _id: true }).omit({ created_at: true, updated_at: true });
73
63
  export const UpdateRideSchema = CreateRideSchema.omit({ created_by: true }).partial();
74
- /* * */
75
- export const RidePermissionSchema = z.object({
76
- agency_ids: z.array(z.string()),
77
- });
@@ -10,13 +10,14 @@ export declare const SamAnalysisSchema: z.ZodObject<{
10
10
  last_transaction_id: z.ZodNullable<z.ZodString>;
11
11
  last_transaction_type: z.ZodNullable<z.ZodEnum<["location", "on_board_refund", "on_board_sale", "validation"]>>;
12
12
  start_time: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
13
- transactions_expected: z.ZodNullable<z.ZodNumber>;
14
- transactions_found: z.ZodNullable<z.ZodNumber>;
15
- transactions_missing: z.ZodNullable<z.ZodNumber>;
13
+ transactions_expected: z.ZodNumber;
14
+ transactions_found: z.ZodNumber;
15
+ transactions_missing: z.ZodNumber;
16
16
  vehicle_id: z.ZodNullable<z.ZodNumber>;
17
17
  }, "strict", z.ZodTypeAny, {
18
18
  apex_version: string | null;
19
19
  device_id: string | null;
20
+ vehicle_id: number | null;
20
21
  end_time: import("../_common/unix-timestamp.js").UnixTimestamp | null;
21
22
  first_transaction_ase_counter_value: number | null;
22
23
  first_transaction_id: string | null;
@@ -25,13 +26,13 @@ export declare const SamAnalysisSchema: z.ZodObject<{
25
26
  last_transaction_id: string | null;
26
27
  last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
27
28
  start_time: import("../_common/unix-timestamp.js").UnixTimestamp | null;
28
- transactions_expected: number | null;
29
- transactions_found: number | null;
30
- transactions_missing: number | null;
31
- vehicle_id: number | null;
29
+ transactions_expected: number;
30
+ transactions_found: number;
31
+ transactions_missing: number;
32
32
  }, {
33
33
  apex_version: string | null;
34
34
  device_id: string | null;
35
+ vehicle_id: number | null;
35
36
  end_time: number | null;
36
37
  first_transaction_ase_counter_value: number | null;
37
38
  first_transaction_id: string | null;
@@ -40,9 +41,8 @@ export declare const SamAnalysisSchema: z.ZodObject<{
40
41
  last_transaction_id: string | null;
41
42
  last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
42
43
  start_time: number | null;
43
- transactions_expected: number | null;
44
- transactions_found: number | null;
45
- transactions_missing: number | null;
46
- vehicle_id: number | null;
44
+ transactions_expected: number;
45
+ transactions_found: number;
46
+ transactions_missing: number;
47
47
  }>;
48
48
  export type SamAnalysis = z.infer<typeof SamAnalysisSchema>;
@@ -1,6 +1,6 @@
1
1
  /* * */
2
2
  import { unixTimeStampSchema } from '../_common/unix-timestamp.js';
3
- import { SimplifiedApexTypeSchema } from '../simplified-apex/simplified-apex-type.js';
3
+ import { SimplifiedApexTypeSchema } from '../apex/simplified-apex-type.js';
4
4
  import { z } from 'zod';
5
5
  /* * */
6
6
  export const SamAnalysisSchema = z.object({
@@ -14,8 +14,8 @@ export const SamAnalysisSchema = z.object({
14
14
  last_transaction_id: z.string().nullable(),
15
15
  last_transaction_type: SimplifiedApexTypeSchema.nullable(),
16
16
  start_time: unixTimeStampSchema.nullable(),
17
- transactions_expected: z.number().nullable(),
18
- transactions_found: z.number().nullable(),
19
- transactions_missing: z.number().nullable(),
17
+ transactions_expected: z.number(),
18
+ transactions_found: z.number(),
19
+ transactions_missing: z.number(),
20
20
  vehicle_id: z.number().nullable(),
21
21
  }).strict();
@@ -18,13 +18,14 @@ export declare const SamSchema: z.ZodObject<{
18
18
  last_transaction_id: z.ZodNullable<z.ZodString>;
19
19
  last_transaction_type: z.ZodNullable<z.ZodEnum<["location", "on_board_refund", "on_board_sale", "validation"]>>;
20
20
  start_time: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
21
- transactions_expected: z.ZodNullable<z.ZodNumber>;
22
- transactions_found: z.ZodNullable<z.ZodNumber>;
23
- transactions_missing: z.ZodNullable<z.ZodNumber>;
21
+ transactions_expected: z.ZodNumber;
22
+ transactions_found: z.ZodNumber;
23
+ transactions_missing: z.ZodNumber;
24
24
  vehicle_id: z.ZodNullable<z.ZodNumber>;
25
25
  }, "strict", z.ZodTypeAny, {
26
26
  apex_version: string | null;
27
27
  device_id: string | null;
28
+ vehicle_id: number | null;
28
29
  end_time: import("../_common/unix-timestamp.js").UnixTimestamp | null;
29
30
  first_transaction_ase_counter_value: number | null;
30
31
  first_transaction_id: string | null;
@@ -33,13 +34,13 @@ export declare const SamSchema: z.ZodObject<{
33
34
  last_transaction_id: string | null;
34
35
  last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
35
36
  start_time: import("../_common/unix-timestamp.js").UnixTimestamp | null;
36
- transactions_expected: number | null;
37
- transactions_found: number | null;
38
- transactions_missing: number | null;
39
- vehicle_id: number | null;
37
+ transactions_expected: number;
38
+ transactions_found: number;
39
+ transactions_missing: number;
40
40
  }, {
41
41
  apex_version: string | null;
42
42
  device_id: string | null;
43
+ vehicle_id: number | null;
43
44
  end_time: number | null;
44
45
  first_transaction_ase_counter_value: number | null;
45
46
  first_transaction_id: string | null;
@@ -48,16 +49,15 @@ export declare const SamSchema: z.ZodObject<{
48
49
  last_transaction_id: string | null;
49
50
  last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
50
51
  start_time: number | null;
51
- transactions_expected: number | null;
52
- transactions_found: number | null;
53
- transactions_missing: number | null;
54
- vehicle_id: number | null;
52
+ transactions_expected: number;
53
+ transactions_found: number;
54
+ transactions_missing: number;
55
55
  }>, "many">>;
56
56
  latest_apex_version: z.ZodNullable<z.ZodString>;
57
57
  remarks: z.ZodDefault<z.ZodNullable<z.ZodString>>;
58
58
  seen_first_at: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
59
59
  seen_last_at: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
60
- system_status: z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error"]>>;
60
+ system_status: z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error", "skipped"]>>;
61
61
  transactions_expected: z.ZodNullable<z.ZodNumber>;
62
62
  transactions_found: z.ZodNullable<z.ZodNumber>;
63
63
  transactions_missing: z.ZodNullable<z.ZodNumber>;
@@ -70,9 +70,12 @@ export declare const SamSchema: z.ZodObject<{
70
70
  __brand: "UnixTimestamp";
71
71
  };
72
72
  agency_id: string;
73
+ seen_first_at: import("../_common/unix-timestamp.js").UnixTimestamp | null;
74
+ seen_last_at: import("../_common/unix-timestamp.js").UnixTimestamp | null;
73
75
  analysis: {
74
76
  apex_version: string | null;
75
77
  device_id: string | null;
78
+ vehicle_id: number | null;
76
79
  end_time: import("../_common/unix-timestamp.js").UnixTimestamp | null;
77
80
  first_transaction_ase_counter_value: number | null;
78
81
  first_transaction_id: string | null;
@@ -81,14 +84,11 @@ export declare const SamSchema: z.ZodObject<{
81
84
  last_transaction_id: string | null;
82
85
  last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
83
86
  start_time: import("../_common/unix-timestamp.js").UnixTimestamp | null;
84
- transactions_expected: number | null;
85
- transactions_found: number | null;
86
- transactions_missing: number | null;
87
- vehicle_id: number | null;
87
+ transactions_expected: number;
88
+ transactions_found: number;
89
+ transactions_missing: number;
88
90
  }[];
89
- seen_first_at: import("../_common/unix-timestamp.js").UnixTimestamp | null;
90
- seen_last_at: import("../_common/unix-timestamp.js").UnixTimestamp | null;
91
- system_status: "error" | "waiting" | "processing" | "complete";
91
+ system_status: "waiting" | "processing" | "complete" | "error" | "skipped";
92
92
  transactions_expected: number | null;
93
93
  transactions_found: number | null;
94
94
  transactions_missing: number | null;
@@ -112,6 +112,7 @@ export declare const SamSchema: z.ZodObject<{
112
112
  analysis?: {
113
113
  apex_version: string | null;
114
114
  device_id: string | null;
115
+ vehicle_id: number | null;
115
116
  end_time: number | null;
116
117
  first_transaction_ase_counter_value: number | null;
117
118
  first_transaction_id: string | null;
@@ -120,12 +121,11 @@ export declare const SamSchema: z.ZodObject<{
120
121
  last_transaction_id: string | null;
121
122
  last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
122
123
  start_time: number | null;
123
- transactions_expected: number | null;
124
- transactions_found: number | null;
125
- transactions_missing: number | null;
126
- vehicle_id: number | null;
124
+ transactions_expected: number;
125
+ transactions_found: number;
126
+ transactions_missing: number;
127
127
  }[] | undefined;
128
- system_status?: "error" | "waiting" | "processing" | "complete" | undefined;
128
+ system_status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined;
129
129
  remarks?: string | null | undefined;
130
130
  }>;
131
131
  export declare const CreateSamSchema: z.ZodObject<Omit<{
@@ -147,13 +147,14 @@ export declare const CreateSamSchema: z.ZodObject<Omit<{
147
147
  last_transaction_id: z.ZodNullable<z.ZodString>;
148
148
  last_transaction_type: z.ZodNullable<z.ZodEnum<["location", "on_board_refund", "on_board_sale", "validation"]>>;
149
149
  start_time: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
150
- transactions_expected: z.ZodNullable<z.ZodNumber>;
151
- transactions_found: z.ZodNullable<z.ZodNumber>;
152
- transactions_missing: z.ZodNullable<z.ZodNumber>;
150
+ transactions_expected: z.ZodNumber;
151
+ transactions_found: z.ZodNumber;
152
+ transactions_missing: z.ZodNumber;
153
153
  vehicle_id: z.ZodNullable<z.ZodNumber>;
154
154
  }, "strict", z.ZodTypeAny, {
155
155
  apex_version: string | null;
156
156
  device_id: string | null;
157
+ vehicle_id: number | null;
157
158
  end_time: import("../_common/unix-timestamp.js").UnixTimestamp | null;
158
159
  first_transaction_ase_counter_value: number | null;
159
160
  first_transaction_id: string | null;
@@ -162,13 +163,13 @@ export declare const CreateSamSchema: z.ZodObject<Omit<{
162
163
  last_transaction_id: string | null;
163
164
  last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
164
165
  start_time: import("../_common/unix-timestamp.js").UnixTimestamp | null;
165
- transactions_expected: number | null;
166
- transactions_found: number | null;
167
- transactions_missing: number | null;
168
- vehicle_id: number | null;
166
+ transactions_expected: number;
167
+ transactions_found: number;
168
+ transactions_missing: number;
169
169
  }, {
170
170
  apex_version: string | null;
171
171
  device_id: string | null;
172
+ vehicle_id: number | null;
172
173
  end_time: number | null;
173
174
  first_transaction_ase_counter_value: number | null;
174
175
  first_transaction_id: string | null;
@@ -177,25 +178,27 @@ export declare const CreateSamSchema: z.ZodObject<Omit<{
177
178
  last_transaction_id: string | null;
178
179
  last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
179
180
  start_time: number | null;
180
- transactions_expected: number | null;
181
- transactions_found: number | null;
182
- transactions_missing: number | null;
183
- vehicle_id: number | null;
181
+ transactions_expected: number;
182
+ transactions_found: number;
183
+ transactions_missing: number;
184
184
  }>, "many">>;
185
185
  latest_apex_version: z.ZodNullable<z.ZodString>;
186
186
  remarks: z.ZodDefault<z.ZodNullable<z.ZodString>>;
187
187
  seen_first_at: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
188
188
  seen_last_at: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
189
- system_status: z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error"]>>;
189
+ system_status: z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error", "skipped"]>>;
190
190
  transactions_expected: z.ZodNullable<z.ZodNumber>;
191
191
  transactions_found: z.ZodNullable<z.ZodNumber>;
192
192
  transactions_missing: z.ZodNullable<z.ZodNumber>;
193
193
  }, "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
194
194
  _id: number;
195
195
  agency_id: string;
196
+ seen_first_at: import("../_common/unix-timestamp.js").UnixTimestamp | null;
197
+ seen_last_at: import("../_common/unix-timestamp.js").UnixTimestamp | null;
196
198
  analysis: {
197
199
  apex_version: string | null;
198
200
  device_id: string | null;
201
+ vehicle_id: number | null;
199
202
  end_time: import("../_common/unix-timestamp.js").UnixTimestamp | null;
200
203
  first_transaction_ase_counter_value: number | null;
201
204
  first_transaction_id: string | null;
@@ -204,14 +207,11 @@ export declare const CreateSamSchema: z.ZodObject<Omit<{
204
207
  last_transaction_id: string | null;
205
208
  last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
206
209
  start_time: import("../_common/unix-timestamp.js").UnixTimestamp | null;
207
- transactions_expected: number | null;
208
- transactions_found: number | null;
209
- transactions_missing: number | null;
210
- vehicle_id: number | null;
210
+ transactions_expected: number;
211
+ transactions_found: number;
212
+ transactions_missing: number;
211
213
  }[];
212
- seen_first_at: import("../_common/unix-timestamp.js").UnixTimestamp | null;
213
- seen_last_at: import("../_common/unix-timestamp.js").UnixTimestamp | null;
214
- system_status: "error" | "waiting" | "processing" | "complete";
214
+ system_status: "waiting" | "processing" | "complete" | "error" | "skipped";
215
215
  transactions_expected: number | null;
216
216
  transactions_found: number | null;
217
217
  transactions_missing: number | null;
@@ -233,6 +233,7 @@ export declare const CreateSamSchema: z.ZodObject<Omit<{
233
233
  analysis?: {
234
234
  apex_version: string | null;
235
235
  device_id: string | null;
236
+ vehicle_id: number | null;
236
237
  end_time: number | null;
237
238
  first_transaction_ase_counter_value: number | null;
238
239
  first_transaction_id: string | null;
@@ -241,18 +242,19 @@ export declare const CreateSamSchema: z.ZodObject<Omit<{
241
242
  last_transaction_id: string | null;
242
243
  last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
243
244
  start_time: number | null;
244
- transactions_expected: number | null;
245
- transactions_found: number | null;
246
- transactions_missing: number | null;
247
- vehicle_id: number | null;
245
+ transactions_expected: number;
246
+ transactions_found: number;
247
+ transactions_missing: number;
248
248
  }[] | undefined;
249
- system_status?: "error" | "waiting" | "processing" | "complete" | undefined;
249
+ system_status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined;
250
250
  remarks?: string | null | undefined;
251
251
  }>;
252
252
  export declare const UpdateSamSchema: z.ZodObject<{
253
253
  _id: z.ZodOptional<z.ZodNumber>;
254
254
  updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>;
255
255
  agency_id: z.ZodOptional<z.ZodString>;
256
+ seen_first_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>;
257
+ seen_last_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>;
256
258
  analysis: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
257
259
  apex_version: z.ZodNullable<z.ZodString>;
258
260
  device_id: z.ZodNullable<z.ZodString>;
@@ -264,13 +266,14 @@ export declare const UpdateSamSchema: z.ZodObject<{
264
266
  last_transaction_id: z.ZodNullable<z.ZodString>;
265
267
  last_transaction_type: z.ZodNullable<z.ZodEnum<["location", "on_board_refund", "on_board_sale", "validation"]>>;
266
268
  start_time: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
267
- transactions_expected: z.ZodNullable<z.ZodNumber>;
268
- transactions_found: z.ZodNullable<z.ZodNumber>;
269
- transactions_missing: z.ZodNullable<z.ZodNumber>;
269
+ transactions_expected: z.ZodNumber;
270
+ transactions_found: z.ZodNumber;
271
+ transactions_missing: z.ZodNumber;
270
272
  vehicle_id: z.ZodNullable<z.ZodNumber>;
271
273
  }, "strict", z.ZodTypeAny, {
272
274
  apex_version: string | null;
273
275
  device_id: string | null;
276
+ vehicle_id: number | null;
274
277
  end_time: import("../_common/unix-timestamp.js").UnixTimestamp | null;
275
278
  first_transaction_ase_counter_value: number | null;
276
279
  first_transaction_id: string | null;
@@ -279,13 +282,13 @@ export declare const UpdateSamSchema: z.ZodObject<{
279
282
  last_transaction_id: string | null;
280
283
  last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
281
284
  start_time: import("../_common/unix-timestamp.js").UnixTimestamp | null;
282
- transactions_expected: number | null;
283
- transactions_found: number | null;
284
- transactions_missing: number | null;
285
- vehicle_id: number | null;
285
+ transactions_expected: number;
286
+ transactions_found: number;
287
+ transactions_missing: number;
286
288
  }, {
287
289
  apex_version: string | null;
288
290
  device_id: string | null;
291
+ vehicle_id: number | null;
289
292
  end_time: number | null;
290
293
  first_transaction_ase_counter_value: number | null;
291
294
  first_transaction_id: string | null;
@@ -294,14 +297,11 @@ export declare const UpdateSamSchema: z.ZodObject<{
294
297
  last_transaction_id: string | null;
295
298
  last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
296
299
  start_time: number | null;
297
- transactions_expected: number | null;
298
- transactions_found: number | null;
299
- transactions_missing: number | null;
300
- vehicle_id: number | null;
300
+ transactions_expected: number;
301
+ transactions_found: number;
302
+ transactions_missing: number;
301
303
  }>, "many">>>;
302
- seen_first_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>;
303
- seen_last_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>;
304
- system_status: z.ZodOptional<z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error"]>>>;
304
+ system_status: z.ZodOptional<z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error", "skipped"]>>>;
305
305
  transactions_expected: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
306
306
  transactions_found: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
307
307
  transactions_missing: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -311,9 +311,12 @@ export declare const UpdateSamSchema: z.ZodObject<{
311
311
  _id?: number | undefined;
312
312
  updated_by?: string | undefined;
313
313
  agency_id?: string | undefined;
314
+ seen_first_at?: import("../_common/unix-timestamp.js").UnixTimestamp | null | undefined;
315
+ seen_last_at?: import("../_common/unix-timestamp.js").UnixTimestamp | null | undefined;
314
316
  analysis?: {
315
317
  apex_version: string | null;
316
318
  device_id: string | null;
319
+ vehicle_id: number | null;
317
320
  end_time: import("../_common/unix-timestamp.js").UnixTimestamp | null;
318
321
  first_transaction_ase_counter_value: number | null;
319
322
  first_transaction_id: string | null;
@@ -322,14 +325,11 @@ export declare const UpdateSamSchema: z.ZodObject<{
322
325
  last_transaction_id: string | null;
323
326
  last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
324
327
  start_time: import("../_common/unix-timestamp.js").UnixTimestamp | null;
325
- transactions_expected: number | null;
326
- transactions_found: number | null;
327
- transactions_missing: number | null;
328
- vehicle_id: number | null;
328
+ transactions_expected: number;
329
+ transactions_found: number;
330
+ transactions_missing: number;
329
331
  }[] | undefined;
330
- seen_first_at?: import("../_common/unix-timestamp.js").UnixTimestamp | null | undefined;
331
- seen_last_at?: import("../_common/unix-timestamp.js").UnixTimestamp | null | undefined;
332
- system_status?: "error" | "waiting" | "processing" | "complete" | undefined;
332
+ system_status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined;
333
333
  transactions_expected?: number | null | undefined;
334
334
  transactions_found?: number | null | undefined;
335
335
  transactions_missing?: number | null | undefined;
@@ -339,9 +339,12 @@ export declare const UpdateSamSchema: z.ZodObject<{
339
339
  _id?: number | undefined;
340
340
  updated_by?: string | undefined;
341
341
  agency_id?: string | undefined;
342
+ seen_first_at?: number | null | undefined;
343
+ seen_last_at?: number | null | undefined;
342
344
  analysis?: {
343
345
  apex_version: string | null;
344
346
  device_id: string | null;
347
+ vehicle_id: number | null;
345
348
  end_time: number | null;
346
349
  first_transaction_ase_counter_value: number | null;
347
350
  first_transaction_id: string | null;
@@ -350,14 +353,11 @@ export declare const UpdateSamSchema: z.ZodObject<{
350
353
  last_transaction_id: string | null;
351
354
  last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
352
355
  start_time: number | null;
353
- transactions_expected: number | null;
354
- transactions_found: number | null;
355
- transactions_missing: number | null;
356
- vehicle_id: number | null;
356
+ transactions_expected: number;
357
+ transactions_found: number;
358
+ transactions_missing: number;
357
359
  }[] | undefined;
358
- seen_first_at?: number | null | undefined;
359
- seen_last_at?: number | null | undefined;
360
- system_status?: "error" | "waiting" | "processing" | "complete" | undefined;
360
+ system_status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined;
361
361
  transactions_expected?: number | null | undefined;
362
362
  transactions_found?: number | null | undefined;
363
363
  transactions_missing?: number | null | undefined;
@@ -1,8 +1,8 @@
1
1
  /* * */
2
2
  import { DocumentSchema } from '../_common/document.js';
3
+ import { ProcessingStatusSchema } from '../_common/status.js';
3
4
  import { unixTimeStampSchema } from '../_common/unix-timestamp.js';
4
5
  import { SamAnalysisSchema } from './sam-analysis.js';
5
- import { ProcessingStatusSchema } from '../system/processing-status.js';
6
6
  import { z } from 'zod';
7
7
  /* * */
8
8
  export const SamSchema = DocumentSchema.extend({