@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,24 +1,61 @@
1
1
  import { z } from 'zod';
2
2
  export declare const PlanSchema: 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
- controller: z.ZodObject<{
10
- last_hash: z.ZodNullable<z.ZodString>;
11
- status: z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error"]>>;
12
- timestamp: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
13
- }, "strict", z.ZodTypeAny, {
14
- status: "error" | "waiting" | "processing" | "complete";
15
- last_hash: string | null;
16
- timestamp: import("../_common/unix-timestamp.js").UnixTimestamp | null;
9
+ apps: z.ZodDefault<z.ZodObject<{
10
+ controller: z.ZodDefault<z.ZodObject<{
11
+ last_hash: z.ZodDefault<z.ZodNullable<z.ZodString>>;
12
+ status: z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error", "skipped"]>>;
13
+ timestamp: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>>>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ status: "waiting" | "processing" | "complete" | "error" | "skipped";
16
+ last_hash: string | null;
17
+ timestamp: import("../index.js").UnixTimestamp | null;
18
+ }, {
19
+ status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined;
20
+ last_hash?: string | null | undefined;
21
+ timestamp?: number | null | undefined;
22
+ }>>;
23
+ merger: z.ZodDefault<z.ZodObject<{
24
+ last_hash: z.ZodDefault<z.ZodNullable<z.ZodString>>;
25
+ status: z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error", "skipped"]>>;
26
+ timestamp: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>>>;
27
+ }, "strip", z.ZodTypeAny, {
28
+ status: "waiting" | "processing" | "complete" | "error" | "skipped";
29
+ last_hash: string | null;
30
+ timestamp: import("../index.js").UnixTimestamp | null;
31
+ }, {
32
+ status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined;
33
+ last_hash?: string | null | undefined;
34
+ timestamp?: number | null | undefined;
35
+ }>>;
36
+ }, "strip", z.ZodTypeAny, {
37
+ controller: {
38
+ status: "waiting" | "processing" | "complete" | "error" | "skipped";
39
+ last_hash: string | null;
40
+ timestamp: import("../index.js").UnixTimestamp | null;
41
+ };
42
+ merger: {
43
+ status: "waiting" | "processing" | "complete" | "error" | "skipped";
44
+ last_hash: string | null;
45
+ timestamp: import("../index.js").UnixTimestamp | null;
46
+ };
17
47
  }, {
18
- last_hash: string | null;
19
- timestamp: number | null;
20
- status?: "error" | "waiting" | "processing" | "complete" | undefined;
21
- }>;
48
+ controller?: {
49
+ status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined;
50
+ last_hash?: string | null | undefined;
51
+ timestamp?: number | null | undefined;
52
+ } | undefined;
53
+ merger?: {
54
+ status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined;
55
+ last_hash?: string | null | undefined;
56
+ timestamp?: number | null | undefined;
57
+ } | undefined;
58
+ }>>;
22
59
  gtfs_agency: z.ZodObject<{
23
60
  agency_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
24
61
  agency_fare_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -51,21 +88,21 @@ export declare const PlanSchema: z.ZodObject<{
51
88
  default_lang: z.ZodOptional<z.ZodNullable<z.ZodString>>;
52
89
  feed_contact_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
53
90
  feed_contact_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
54
- feed_end_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>>>;
91
+ feed_end_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("../index.js").OperationalDate, string>>>;
55
92
  feed_lang: z.ZodString;
56
93
  feed_publisher_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
57
94
  feed_publisher_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
58
- feed_start_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>>>;
95
+ feed_start_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("../index.js").OperationalDate, string>>>;
59
96
  feed_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
60
97
  }, "strip", z.ZodTypeAny, {
61
98
  feed_lang: string;
62
99
  default_lang?: string | null | undefined;
63
100
  feed_contact_email?: string | null | undefined;
64
101
  feed_contact_url?: string | null | undefined;
65
- feed_end_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
102
+ feed_end_date?: import("../index.js").OperationalDate | null | undefined;
66
103
  feed_publisher_name?: string | null | undefined;
67
104
  feed_publisher_url?: string | null | undefined;
68
- feed_start_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
105
+ feed_start_date?: import("../index.js").OperationalDate | null | undefined;
69
106
  feed_version?: string | null | undefined;
70
107
  }, {
71
108
  feed_lang: string;
@@ -88,8 +125,7 @@ export declare const PlanSchema: z.ZodObject<{
88
125
  }, {
89
126
  operation_plan_id: string | null;
90
127
  }>;
91
- status_merger: z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error"]>>;
92
- }, "strict", z.ZodTypeAny, {
128
+ }, "strip", z.ZodTypeAny, {
93
129
  _id: string;
94
130
  created_at: number & {
95
131
  __brand: "UnixTimestamp";
@@ -113,23 +149,29 @@ export declare const PlanSchema: z.ZodObject<{
113
149
  default_lang?: string | null | undefined;
114
150
  feed_contact_email?: string | null | undefined;
115
151
  feed_contact_url?: string | null | undefined;
116
- feed_end_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
152
+ feed_end_date?: import("../index.js").OperationalDate | null | undefined;
117
153
  feed_publisher_name?: string | null | undefined;
118
154
  feed_publisher_url?: string | null | undefined;
119
- feed_start_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
155
+ feed_start_date?: import("../index.js").OperationalDate | null | undefined;
120
156
  feed_version?: string | null | undefined;
121
157
  };
122
- controller: {
123
- status: "error" | "waiting" | "processing" | "complete";
124
- last_hash: string | null;
125
- timestamp: import("../_common/unix-timestamp.js").UnixTimestamp | null;
158
+ apps: {
159
+ controller: {
160
+ status: "waiting" | "processing" | "complete" | "error" | "skipped";
161
+ last_hash: string | null;
162
+ timestamp: import("../index.js").UnixTimestamp | null;
163
+ };
164
+ merger: {
165
+ status: "waiting" | "processing" | "complete" | "error" | "skipped";
166
+ last_hash: string | null;
167
+ timestamp: import("../index.js").UnixTimestamp | null;
168
+ };
126
169
  };
127
170
  hash: string;
128
171
  operation_file_id: string;
129
172
  pcgi_legacy: {
130
173
  operation_plan_id: string | null;
131
174
  };
132
- status_merger: "error" | "waiting" | "processing" | "complete";
133
175
  created_by?: string | undefined;
134
176
  updated_by?: string | undefined;
135
177
  }, {
@@ -157,11 +199,6 @@ export declare const PlanSchema: z.ZodObject<{
157
199
  feed_start_date?: string | null | undefined;
158
200
  feed_version?: string | null | undefined;
159
201
  };
160
- controller: {
161
- last_hash: string | null;
162
- timestamp: number | null;
163
- status?: "error" | "waiting" | "processing" | "complete" | undefined;
164
- };
165
202
  hash: string;
166
203
  operation_file_id: string;
167
204
  pcgi_legacy: {
@@ -170,28 +207,76 @@ export declare const PlanSchema: z.ZodObject<{
170
207
  created_by?: string | undefined;
171
208
  updated_by?: string | undefined;
172
209
  is_locked?: boolean | undefined;
173
- status_merger?: "error" | "waiting" | "processing" | "complete" | undefined;
210
+ apps?: {
211
+ controller?: {
212
+ status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined;
213
+ last_hash?: string | null | undefined;
214
+ timestamp?: number | null | undefined;
215
+ } | undefined;
216
+ merger?: {
217
+ status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined;
218
+ last_hash?: string | null | undefined;
219
+ timestamp?: number | null | undefined;
220
+ } | undefined;
221
+ } | undefined;
174
222
  }>;
175
223
  export declare const CreatePlanSchema: z.ZodObject<Omit<{
176
224
  _id: z.ZodString;
177
- created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
225
+ created_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
178
226
  created_by: z.ZodOptional<z.ZodString>;
179
- updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
227
+ updated_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
180
228
  updated_by: z.ZodOptional<z.ZodString>;
181
229
  } & {
182
- controller: z.ZodObject<{
183
- last_hash: z.ZodNullable<z.ZodString>;
184
- status: z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error"]>>;
185
- timestamp: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
186
- }, "strict", z.ZodTypeAny, {
187
- status: "error" | "waiting" | "processing" | "complete";
188
- last_hash: string | null;
189
- timestamp: import("../_common/unix-timestamp.js").UnixTimestamp | null;
230
+ apps: z.ZodDefault<z.ZodObject<{
231
+ controller: z.ZodDefault<z.ZodObject<{
232
+ last_hash: z.ZodDefault<z.ZodNullable<z.ZodString>>;
233
+ status: z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error", "skipped"]>>;
234
+ timestamp: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>>>;
235
+ }, "strip", z.ZodTypeAny, {
236
+ status: "waiting" | "processing" | "complete" | "error" | "skipped";
237
+ last_hash: string | null;
238
+ timestamp: import("../index.js").UnixTimestamp | null;
239
+ }, {
240
+ status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined;
241
+ last_hash?: string | null | undefined;
242
+ timestamp?: number | null | undefined;
243
+ }>>;
244
+ merger: z.ZodDefault<z.ZodObject<{
245
+ last_hash: z.ZodDefault<z.ZodNullable<z.ZodString>>;
246
+ status: z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error", "skipped"]>>;
247
+ timestamp: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>>>;
248
+ }, "strip", z.ZodTypeAny, {
249
+ status: "waiting" | "processing" | "complete" | "error" | "skipped";
250
+ last_hash: string | null;
251
+ timestamp: import("../index.js").UnixTimestamp | null;
252
+ }, {
253
+ status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined;
254
+ last_hash?: string | null | undefined;
255
+ timestamp?: number | null | undefined;
256
+ }>>;
257
+ }, "strip", z.ZodTypeAny, {
258
+ controller: {
259
+ status: "waiting" | "processing" | "complete" | "error" | "skipped";
260
+ last_hash: string | null;
261
+ timestamp: import("../index.js").UnixTimestamp | null;
262
+ };
263
+ merger: {
264
+ status: "waiting" | "processing" | "complete" | "error" | "skipped";
265
+ last_hash: string | null;
266
+ timestamp: import("../index.js").UnixTimestamp | null;
267
+ };
190
268
  }, {
191
- last_hash: string | null;
192
- timestamp: number | null;
193
- status?: "error" | "waiting" | "processing" | "complete" | undefined;
194
- }>;
269
+ controller?: {
270
+ status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined;
271
+ last_hash?: string | null | undefined;
272
+ timestamp?: number | null | undefined;
273
+ } | undefined;
274
+ merger?: {
275
+ status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined;
276
+ last_hash?: string | null | undefined;
277
+ timestamp?: number | null | undefined;
278
+ } | undefined;
279
+ }>>;
195
280
  gtfs_agency: z.ZodObject<{
196
281
  agency_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
197
282
  agency_fare_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -224,21 +309,21 @@ export declare const CreatePlanSchema: z.ZodObject<Omit<{
224
309
  default_lang: z.ZodOptional<z.ZodNullable<z.ZodString>>;
225
310
  feed_contact_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
226
311
  feed_contact_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
227
- feed_end_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>>>;
312
+ feed_end_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("../index.js").OperationalDate, string>>>;
228
313
  feed_lang: z.ZodString;
229
314
  feed_publisher_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
230
315
  feed_publisher_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
231
- feed_start_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>>>;
316
+ feed_start_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("../index.js").OperationalDate, string>>>;
232
317
  feed_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
233
318
  }, "strip", z.ZodTypeAny, {
234
319
  feed_lang: string;
235
320
  default_lang?: string | null | undefined;
236
321
  feed_contact_email?: string | null | undefined;
237
322
  feed_contact_url?: string | null | undefined;
238
- feed_end_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
323
+ feed_end_date?: import("../index.js").OperationalDate | null | undefined;
239
324
  feed_publisher_name?: string | null | undefined;
240
325
  feed_publisher_url?: string | null | undefined;
241
- feed_start_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
326
+ feed_start_date?: import("../index.js").OperationalDate | null | undefined;
242
327
  feed_version?: string | null | undefined;
243
328
  }, {
244
329
  feed_lang: string;
@@ -261,8 +346,7 @@ export declare const CreatePlanSchema: z.ZodObject<Omit<{
261
346
  }, {
262
347
  operation_plan_id: string | null;
263
348
  }>;
264
- status_merger: z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error"]>>;
265
- }, "_id" | "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
349
+ }, "_id" | "created_at" | "updated_at">, "strip", z.ZodTypeAny, {
266
350
  is_locked: boolean;
267
351
  gtfs_agency: {
268
352
  agency_id: string;
@@ -279,23 +363,29 @@ export declare const CreatePlanSchema: z.ZodObject<Omit<{
279
363
  default_lang?: string | null | undefined;
280
364
  feed_contact_email?: string | null | undefined;
281
365
  feed_contact_url?: string | null | undefined;
282
- feed_end_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
366
+ feed_end_date?: import("../index.js").OperationalDate | null | undefined;
283
367
  feed_publisher_name?: string | null | undefined;
284
368
  feed_publisher_url?: string | null | undefined;
285
- feed_start_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
369
+ feed_start_date?: import("../index.js").OperationalDate | null | undefined;
286
370
  feed_version?: string | null | undefined;
287
371
  };
288
- controller: {
289
- status: "error" | "waiting" | "processing" | "complete";
290
- last_hash: string | null;
291
- timestamp: import("../_common/unix-timestamp.js").UnixTimestamp | null;
372
+ apps: {
373
+ controller: {
374
+ status: "waiting" | "processing" | "complete" | "error" | "skipped";
375
+ last_hash: string | null;
376
+ timestamp: import("../index.js").UnixTimestamp | null;
377
+ };
378
+ merger: {
379
+ status: "waiting" | "processing" | "complete" | "error" | "skipped";
380
+ last_hash: string | null;
381
+ timestamp: import("../index.js").UnixTimestamp | null;
382
+ };
292
383
  };
293
384
  hash: string;
294
385
  operation_file_id: string;
295
386
  pcgi_legacy: {
296
387
  operation_plan_id: string | null;
297
388
  };
298
- status_merger: "error" | "waiting" | "processing" | "complete";
299
389
  created_by?: string | undefined;
300
390
  updated_by?: string | undefined;
301
391
  }, {
@@ -320,11 +410,6 @@ export declare const CreatePlanSchema: z.ZodObject<Omit<{
320
410
  feed_start_date?: string | null | undefined;
321
411
  feed_version?: string | null | undefined;
322
412
  };
323
- controller: {
324
- last_hash: string | null;
325
- timestamp: number | null;
326
- status?: "error" | "waiting" | "processing" | "complete" | undefined;
327
- };
328
413
  hash: string;
329
414
  operation_file_id: string;
330
415
  pcgi_legacy: {
@@ -333,7 +418,18 @@ export declare const CreatePlanSchema: z.ZodObject<Omit<{
333
418
  created_by?: string | undefined;
334
419
  updated_by?: string | undefined;
335
420
  is_locked?: boolean | undefined;
336
- status_merger?: "error" | "waiting" | "processing" | "complete" | undefined;
421
+ apps?: {
422
+ controller?: {
423
+ status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined;
424
+ last_hash?: string | null | undefined;
425
+ timestamp?: number | null | undefined;
426
+ } | undefined;
427
+ merger?: {
428
+ status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined;
429
+ last_hash?: string | null | undefined;
430
+ timestamp?: number | null | undefined;
431
+ } | undefined;
432
+ } | undefined;
337
433
  }>;
338
434
  export declare const UpdatePlanSchema: z.ZodObject<{
339
435
  updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>;
@@ -370,21 +466,21 @@ export declare const UpdatePlanSchema: z.ZodObject<{
370
466
  default_lang: z.ZodOptional<z.ZodNullable<z.ZodString>>;
371
467
  feed_contact_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
372
468
  feed_contact_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
373
- feed_end_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>>>;
469
+ feed_end_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("../index.js").OperationalDate, string>>>;
374
470
  feed_lang: z.ZodString;
375
471
  feed_publisher_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
376
472
  feed_publisher_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
377
- feed_start_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>>>;
473
+ feed_start_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("../index.js").OperationalDate, string>>>;
378
474
  feed_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
379
475
  }, "strip", z.ZodTypeAny, {
380
476
  feed_lang: string;
381
477
  default_lang?: string | null | undefined;
382
478
  feed_contact_email?: string | null | undefined;
383
479
  feed_contact_url?: string | null | undefined;
384
- feed_end_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
480
+ feed_end_date?: import("../index.js").OperationalDate | null | undefined;
385
481
  feed_publisher_name?: string | null | undefined;
386
482
  feed_publisher_url?: string | null | undefined;
387
- feed_start_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
483
+ feed_start_date?: import("../index.js").OperationalDate | null | undefined;
388
484
  feed_version?: string | null | undefined;
389
485
  }, {
390
486
  feed_lang: string;
@@ -397,19 +493,56 @@ export declare const UpdatePlanSchema: z.ZodObject<{
397
493
  feed_start_date?: string | null | undefined;
398
494
  feed_version?: string | null | undefined;
399
495
  }>>;
400
- controller: z.ZodOptional<z.ZodObject<{
401
- last_hash: z.ZodNullable<z.ZodString>;
402
- status: z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error"]>>;
403
- timestamp: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
404
- }, "strict", z.ZodTypeAny, {
405
- status: "error" | "waiting" | "processing" | "complete";
406
- last_hash: string | null;
407
- timestamp: import("../_common/unix-timestamp.js").UnixTimestamp | null;
496
+ apps: z.ZodOptional<z.ZodDefault<z.ZodObject<{
497
+ controller: z.ZodDefault<z.ZodObject<{
498
+ last_hash: z.ZodDefault<z.ZodNullable<z.ZodString>>;
499
+ status: z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error", "skipped"]>>;
500
+ timestamp: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>>>;
501
+ }, "strip", z.ZodTypeAny, {
502
+ status: "waiting" | "processing" | "complete" | "error" | "skipped";
503
+ last_hash: string | null;
504
+ timestamp: import("../index.js").UnixTimestamp | null;
505
+ }, {
506
+ status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined;
507
+ last_hash?: string | null | undefined;
508
+ timestamp?: number | null | undefined;
509
+ }>>;
510
+ merger: z.ZodDefault<z.ZodObject<{
511
+ last_hash: z.ZodDefault<z.ZodNullable<z.ZodString>>;
512
+ status: z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error", "skipped"]>>;
513
+ timestamp: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>>>;
514
+ }, "strip", z.ZodTypeAny, {
515
+ status: "waiting" | "processing" | "complete" | "error" | "skipped";
516
+ last_hash: string | null;
517
+ timestamp: import("../index.js").UnixTimestamp | null;
518
+ }, {
519
+ status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined;
520
+ last_hash?: string | null | undefined;
521
+ timestamp?: number | null | undefined;
522
+ }>>;
523
+ }, "strip", z.ZodTypeAny, {
524
+ controller: {
525
+ status: "waiting" | "processing" | "complete" | "error" | "skipped";
526
+ last_hash: string | null;
527
+ timestamp: import("../index.js").UnixTimestamp | null;
528
+ };
529
+ merger: {
530
+ status: "waiting" | "processing" | "complete" | "error" | "skipped";
531
+ last_hash: string | null;
532
+ timestamp: import("../index.js").UnixTimestamp | null;
533
+ };
408
534
  }, {
409
- last_hash: string | null;
410
- timestamp: number | null;
411
- status?: "error" | "waiting" | "processing" | "complete" | undefined;
412
- }>>;
535
+ controller?: {
536
+ status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined;
537
+ last_hash?: string | null | undefined;
538
+ timestamp?: number | null | undefined;
539
+ } | undefined;
540
+ merger?: {
541
+ status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined;
542
+ last_hash?: string | null | undefined;
543
+ timestamp?: number | null | undefined;
544
+ } | undefined;
545
+ }>>>;
413
546
  hash: z.ZodOptional<z.ZodString>;
414
547
  operation_file_id: z.ZodOptional<z.ZodString>;
415
548
  pcgi_legacy: z.ZodOptional<z.ZodObject<{
@@ -419,8 +552,7 @@ export declare const UpdatePlanSchema: z.ZodObject<{
419
552
  }, {
420
553
  operation_plan_id: string | null;
421
554
  }>>;
422
- status_merger: z.ZodOptional<z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error"]>>>;
423
- }, "strict", z.ZodTypeAny, {
555
+ }, "strip", z.ZodTypeAny, {
424
556
  updated_by?: string | undefined;
425
557
  is_locked?: boolean | undefined;
426
558
  gtfs_agency?: {
@@ -438,23 +570,29 @@ export declare const UpdatePlanSchema: z.ZodObject<{
438
570
  default_lang?: string | null | undefined;
439
571
  feed_contact_email?: string | null | undefined;
440
572
  feed_contact_url?: string | null | undefined;
441
- feed_end_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
573
+ feed_end_date?: import("../index.js").OperationalDate | null | undefined;
442
574
  feed_publisher_name?: string | null | undefined;
443
575
  feed_publisher_url?: string | null | undefined;
444
- feed_start_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
576
+ feed_start_date?: import("../index.js").OperationalDate | null | undefined;
445
577
  feed_version?: string | null | undefined;
446
578
  } | undefined;
447
- controller?: {
448
- status: "error" | "waiting" | "processing" | "complete";
449
- last_hash: string | null;
450
- timestamp: import("../_common/unix-timestamp.js").UnixTimestamp | null;
579
+ apps?: {
580
+ controller: {
581
+ status: "waiting" | "processing" | "complete" | "error" | "skipped";
582
+ last_hash: string | null;
583
+ timestamp: import("../index.js").UnixTimestamp | null;
584
+ };
585
+ merger: {
586
+ status: "waiting" | "processing" | "complete" | "error" | "skipped";
587
+ last_hash: string | null;
588
+ timestamp: import("../index.js").UnixTimestamp | null;
589
+ };
451
590
  } | undefined;
452
591
  hash?: string | undefined;
453
592
  operation_file_id?: string | undefined;
454
593
  pcgi_legacy?: {
455
594
  operation_plan_id: string | null;
456
595
  } | undefined;
457
- status_merger?: "error" | "waiting" | "processing" | "complete" | undefined;
458
596
  }, {
459
597
  updated_by?: string | undefined;
460
598
  is_locked?: boolean | undefined;
@@ -479,17 +617,23 @@ export declare const UpdatePlanSchema: z.ZodObject<{
479
617
  feed_start_date?: string | null | undefined;
480
618
  feed_version?: string | null | undefined;
481
619
  } | undefined;
482
- controller?: {
483
- last_hash: string | null;
484
- timestamp: number | null;
485
- status?: "error" | "waiting" | "processing" | "complete" | undefined;
620
+ apps?: {
621
+ controller?: {
622
+ status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined;
623
+ last_hash?: string | null | undefined;
624
+ timestamp?: number | null | undefined;
625
+ } | undefined;
626
+ merger?: {
627
+ status?: "waiting" | "processing" | "complete" | "error" | "skipped" | undefined;
628
+ last_hash?: string | null | undefined;
629
+ timestamp?: number | null | undefined;
630
+ } | undefined;
486
631
  } | undefined;
487
632
  hash?: string | undefined;
488
633
  operation_file_id?: string | undefined;
489
634
  pcgi_legacy?: {
490
635
  operation_plan_id: string | null;
491
636
  } | undefined;
492
- status_merger?: "error" | "waiting" | "processing" | "complete" | undefined;
493
637
  }>;
494
638
  export type Plan = z.infer<typeof PlanSchema>;
495
639
  export type CreatePlanDto = z.infer<typeof CreatePlanSchema>;
@@ -500,11 +644,3 @@ export interface HashablePlanMetadata {
500
644
  gtfs_feed_info: Plan['gtfs_feed_info'];
501
645
  operation_file_id: Plan['operation_file_id'];
502
646
  }
503
- export declare const PlanPermissionSchema: z.ZodObject<{
504
- agency_ids: z.ZodArray<z.ZodString, "many">;
505
- }, "strip", z.ZodTypeAny, {
506
- agency_ids: string[];
507
- }, {
508
- agency_ids: string[];
509
- }>;
510
- export type PlanPermission = z.infer<typeof PlanPermissionSchema>;
@@ -1,24 +1,22 @@
1
1
  /* * */
2
2
  import { DocumentSchema } from '../_common/document.js';
3
- import { GtfsAgencySchema, GtfsFeedInfoSchema } from '../gtfs.js';
4
- import { PlanControllerSchema } from './plan-controller.js';
3
+ import { GtfsAgencySchema } from '../gtfs/agency.js';
4
+ import { GtfsFeedInfoSchema } from '../gtfs/feed-info.js';
5
+ import { PlanAppStatusSchema } from './plan-app-status.js';
5
6
  import { PlanPcgiLegacySchema } from './plan-pcgi-legacy.js';
6
- import { ProcessingStatusSchema } from '../system/processing-status.js';
7
7
  import { z } from 'zod';
8
8
  /* * */
9
9
  export const PlanSchema = DocumentSchema.extend({
10
- controller: PlanControllerSchema,
10
+ apps: z.object({
11
+ controller: PlanAppStatusSchema,
12
+ merger: PlanAppStatusSchema,
13
+ }).default({}),
11
14
  gtfs_agency: GtfsAgencySchema,
12
15
  gtfs_feed_info: GtfsFeedInfoSchema,
13
16
  hash: z.string(),
14
17
  is_locked: z.boolean().default(false),
15
18
  operation_file_id: z.string(),
16
19
  pcgi_legacy: PlanPcgiLegacySchema,
17
- status_merger: ProcessingStatusSchema.default('waiting'),
18
- }).strict();
20
+ });
19
21
  export const CreatePlanSchema = PlanSchema.omit({ _id: true, created_at: true, updated_at: true });
20
22
  export const UpdatePlanSchema = CreatePlanSchema.omit({ created_by: true }).partial();
21
- /* * */
22
- export const PlanPermissionSchema = z.object({
23
- agency_ids: z.array(z.string()),
24
- });