@tmlmobilidade/types 20251217.1540.37 → 20251222.1537.24

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 (119) hide show
  1. package/dist/_common/comment.js +15 -6
  2. package/dist/_common/document.d.ts +3 -0
  3. package/dist/_common/document.js +4 -3
  4. package/dist/_common/status.d.ts +15 -1
  5. package/dist/_common/status.js +24 -6
  6. package/dist/_common/unix-timestamp.d.ts +1 -1
  7. package/dist/_common/unix-timestamp.js +1 -1
  8. package/dist/agency.d.ts +18 -13
  9. package/dist/agency.js +1 -1
  10. package/dist/alert.d.ts +101 -112
  11. package/dist/alert.js +18 -19
  12. package/dist/apex/simplified-apex-location.d.ts +5 -4
  13. package/dist/apex/simplified-apex-location.js +6 -4
  14. package/dist/apex/simplified-apex-on-board-refund.d.ts +5 -4
  15. package/dist/apex/simplified-apex-on-board-refund.js +6 -4
  16. package/dist/apex/simplified-apex-on-board-sale.d.ts +5 -4
  17. package/dist/apex/simplified-apex-on-board-sale.js +6 -4
  18. package/dist/apex/simplified-apex-validation.d.ts +9 -8
  19. package/dist/apex/simplified-apex-validation.js +6 -4
  20. package/dist/auth/login.d.ts +1 -1
  21. package/dist/auth/login.js +1 -1
  22. package/dist/auth/role.d.ts +260 -149
  23. package/dist/auth/role.js +1 -1
  24. package/dist/auth/session.d.ts +9 -7
  25. package/dist/auth/session.js +6 -4
  26. package/dist/auth/user.d.ts +737 -207
  27. package/dist/auth/user.js +12 -9
  28. package/dist/auth/verification-token.d.ts +9 -14
  29. package/dist/auth/verification-token.js +8 -6
  30. package/dist/dates/annotation.d.ts +94 -0
  31. package/dist/dates/annotation.js +14 -0
  32. package/dist/dates/index.d.ts +1 -0
  33. package/dist/dates/index.js +1 -0
  34. package/dist/file-exports/{common.d.ts → base.d.ts} +6 -5
  35. package/dist/file-exports/{common.js → base.js} +7 -4
  36. package/dist/file-exports/file-exports.d.ts +124 -0
  37. package/dist/file-exports/file-exports.js +7 -0
  38. package/dist/file-exports/index.d.ts +3 -126
  39. package/dist/file-exports/index.js +3 -9
  40. package/dist/file-exports/ride-export.d.ts +13 -13
  41. package/dist/file-exports/ride-export.js +5 -5
  42. package/dist/file.d.ts +3 -3
  43. package/dist/file.js +4 -2
  44. package/dist/index.d.ts +2 -1
  45. package/dist/index.js +2 -1
  46. package/dist/notification.d.ts +9 -7
  47. package/dist/notification.js +4 -2
  48. package/dist/organization.d.ts +24 -15
  49. package/dist/organization.js +3 -3
  50. package/dist/permissions/agencies.d.ts +3 -3
  51. package/dist/permissions/agencies.js +1 -1
  52. package/dist/permissions/alerts.d.ts +6 -6
  53. package/dist/permissions/alerts.js +2 -2
  54. package/dist/permissions/dates.d.ts +25 -0
  55. package/dist/permissions/dates.js +16 -0
  56. package/dist/permissions/gtfs-validations.d.ts +3 -3
  57. package/dist/permissions/gtfs-validations.js +1 -0
  58. package/dist/permissions/index.d.ts +49 -27
  59. package/dist/permissions/index.js +2 -0
  60. package/dist/permissions/organizations.d.ts +3 -3
  61. package/dist/permissions/organizations.js +1 -0
  62. package/dist/permissions/plans.d.ts +3 -3
  63. package/dist/permissions/plans.js +1 -1
  64. package/dist/permissions/roles.d.ts +3 -3
  65. package/dist/permissions/roles.js +1 -0
  66. package/dist/permissions/stops.d.ts +3 -3
  67. package/dist/permissions/stops.js +1 -1
  68. package/dist/permissions/users.d.ts +3 -3
  69. package/dist/permissions/users.js +1 -0
  70. package/dist/plans/gtfs-validation.d.ts +12 -3
  71. package/dist/plans/gtfs-validation.js +1 -1
  72. package/dist/plans/plan-app-status.js +2 -2
  73. package/dist/plans/plan-pcgi-legacy.d.ts +1 -1
  74. package/dist/plans/plan-pcgi-legacy.js +1 -1
  75. package/dist/plans/plan.d.ts +9 -9
  76. package/dist/proposed-change.d.ts +12 -3
  77. package/dist/proposed-change.js +1 -1
  78. package/dist/rides/ride-acceptance.d.ts +23 -19
  79. package/dist/rides/ride-acceptance.js +5 -3
  80. package/dist/rides/ride-analysis.d.ts +16 -16
  81. package/dist/rides/ride-analysis.js +16 -16
  82. package/dist/rides/ride-audit.d.ts +11 -11
  83. package/dist/rides/ride-audit.js +1 -1
  84. package/dist/rides/ride-overrides.d.ts +1 -1
  85. package/dist/rides/ride-overrides.js +1 -1
  86. package/dist/rides/ride.d.ts +56 -55
  87. package/dist/rides/ride.js +10 -8
  88. package/dist/sams/sam-analysis.d.ts +1 -1
  89. package/dist/sams/sam-analysis.js +4 -4
  90. package/dist/sams/sam.d.ts +13 -13
  91. package/dist/sams/sam.js +7 -5
  92. package/dist/stops/connections.d.ts +3 -0
  93. package/dist/stops/connections.js +15 -0
  94. package/dist/stops/equipment.d.ts +3 -0
  95. package/dist/stops/equipment.js +9 -0
  96. package/dist/stops/facilities.d.ts +4 -0
  97. package/dist/stops/facilities.js +16 -0
  98. package/dist/stops/index.d.ts +9 -0
  99. package/dist/stops/index.js +9 -0
  100. package/dist/stops/jurisdiction.d.ts +4 -0
  101. package/dist/stops/jurisdiction.js +10 -0
  102. package/dist/stops/name-abbreviations.d.ts +11 -0
  103. package/dist/stops/name-abbreviations.js +117 -0
  104. package/dist/stops/parent-station.d.ts +76 -0
  105. package/dist/stops/parent-station.js +11 -0
  106. package/dist/stops/road-type.d.ts +3 -0
  107. package/dist/stops/road-type.js +13 -0
  108. package/dist/stops/stop-area.d.ts +67 -0
  109. package/dist/stops/stop-area.js +10 -0
  110. package/dist/{stop.d.ts → stops/stop.d.ts} +271 -345
  111. package/dist/stops/stop.js +78 -0
  112. package/dist/vehicle-events/gtfs-rt-vehicle-event-extended.d.ts +1 -21
  113. package/dist/vehicle-events/gtfs-rt-vehicle-event-extended.js +4 -5
  114. package/dist/vehicle-events/simplified-vehicle-event.d.ts +4 -3
  115. package/dist/vehicle-events/simplified-vehicle-event.js +6 -4
  116. package/dist/zone.d.ts +10 -10
  117. package/dist/zone.js +1 -1
  118. package/package.json +2 -2
  119. package/dist/stop.js +0 -102
package/dist/alert.d.ts CHANGED
@@ -6,26 +6,26 @@ export type ReferenceType = z.infer<typeof ReferenceTypeSchema>;
6
6
  export declare const AlertSchema: z.ZodObject<{
7
7
  _id: z.ZodString;
8
8
  created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
9
+ is_locked: z.ZodDefault<z.ZodBoolean>;
9
10
  updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
10
11
  updated_by: z.ZodOptional<z.ZodString>;
11
12
  } & {
12
- active_period_end_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>;
13
+ active_period_end_date: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>;
13
14
  active_period_start_date: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
14
15
  cause: 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"]>;
15
- coordinates: z.ZodOptional<z.ZodNullable<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
16
- created_by: z.ZodString;
16
+ coordinates: z.ZodDefault<z.ZodNullable<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
17
+ created_by: z.ZodNullable<z.ZodString>;
17
18
  description: z.ZodString;
18
19
  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>>;
20
- file_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
- info_url: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
22
- modified_by: z.ZodString;
23
- municipality_ids: z.ZodArray<z.ZodString, "many">;
24
- publish_end_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>;
25
- publish_start_date: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
26
- publish_status: z.ZodEnum<["PUBLISHED", "ARCHIVED", "DRAFT"]>;
27
- reference_type: z.ZodEnum<["LINE", "STOP", "AGENCY", "TRIP"]>;
28
- references: z.ZodArray<z.ZodObject<{
20
+ external_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
21
+ file_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
22
+ info_url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
23
+ municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
24
+ publish_end_date: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>;
25
+ publish_start_date: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>;
26
+ publish_status: z.ZodDefault<z.ZodEnum<["PUBLISHED", "ARCHIVED", "DRAFT"]>>;
27
+ reference_type: z.ZodDefault<z.ZodNullable<z.ZodEnum<["LINE", "STOP", "AGENCY", "TRIP"]>>>;
28
+ references: z.ZodDefault<z.ZodArray<z.ZodObject<{
29
29
  child_ids: z.ZodArray<z.ZodString, "many">;
30
30
  parent_id: z.ZodString;
31
31
  }, "strip", z.ZodTypeAny, {
@@ -34,95 +34,93 @@ export declare const AlertSchema: z.ZodObject<{
34
34
  }, {
35
35
  child_ids: string[];
36
36
  parent_id: string;
37
- }>, "many">;
37
+ }>, "many">>;
38
38
  title: z.ZodString;
39
- type: z.ZodEnum<["PLANNED", "REALTIME"]>;
40
- }, "strict", z.ZodTypeAny, {
39
+ type: z.ZodDefault<z.ZodNullable<z.ZodEnum<["PLANNED", "REALTIME"]>>>;
40
+ }, "strip", z.ZodTypeAny, {
41
41
  _id: string;
42
42
  created_at: number & {
43
43
  __brand: "UnixTimestamp";
44
44
  };
45
- created_by: string;
45
+ created_by: string | null;
46
+ is_locked: boolean;
46
47
  updated_at: number & {
47
48
  __brand: "UnixTimestamp";
48
49
  };
49
- type: "PLANNED" | "REALTIME";
50
+ type: "PLANNED" | "REALTIME" | null;
51
+ active_period_end_date: import("./_common/unix-timestamp.js").UnixTimestamp | null;
50
52
  active_period_start_date: number & {
51
53
  __brand: "UnixTimestamp";
52
54
  };
53
55
  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";
56
+ coordinates: [number, number] | null;
54
57
  description: string;
55
58
  effect: "ACCESSIBILITY_ISSUE" | "ADDITIONAL_SERVICE" | "DETOUR" | "MODIFIED_SERVICE" | "NO_EFFECT" | "NO_SERVICE" | "OTHER_EFFECT" | "REDUCED_SERVICE" | "SIGNIFICANT_DELAYS" | "STOP_MOVED" | "UNKNOWN_EFFECT";
56
- modified_by: string;
59
+ external_id: string | null;
60
+ file_id: string | null;
61
+ info_url: string | null;
57
62
  municipality_ids: string[];
58
- publish_start_date: number & {
59
- __brand: "UnixTimestamp";
60
- };
63
+ publish_end_date: import("./_common/unix-timestamp.js").UnixTimestamp | null;
64
+ publish_start_date: import("./_common/unix-timestamp.js").UnixTimestamp | null;
61
65
  publish_status: "PUBLISHED" | "ARCHIVED" | "DRAFT";
62
- reference_type: "LINE" | "STOP" | "AGENCY" | "TRIP";
66
+ reference_type: "LINE" | "STOP" | "AGENCY" | "TRIP" | null;
63
67
  references: {
64
68
  child_ids: string[];
65
69
  parent_id: string;
66
70
  }[];
67
71
  title: string;
68
72
  updated_by?: string | undefined;
69
- active_period_end_date?: import("./_common/unix-timestamp.js").UnixTimestamp | null | undefined;
70
- coordinates?: [number, number] | null | undefined;
71
- external_id?: string | null | undefined;
72
- file_id?: string | null | undefined;
73
- info_url?: string | undefined;
74
- publish_end_date?: import("./_common/unix-timestamp.js").UnixTimestamp | null | undefined;
75
73
  }, {
76
74
  _id: string;
77
75
  created_at: number;
78
- created_by: string;
76
+ created_by: string | null;
79
77
  updated_at: number;
80
- type: "PLANNED" | "REALTIME";
81
78
  active_period_start_date: number;
82
79
  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";
83
80
  description: string;
84
81
  effect: "ACCESSIBILITY_ISSUE" | "ADDITIONAL_SERVICE" | "DETOUR" | "MODIFIED_SERVICE" | "NO_EFFECT" | "NO_SERVICE" | "OTHER_EFFECT" | "REDUCED_SERVICE" | "SIGNIFICANT_DELAYS" | "STOP_MOVED" | "UNKNOWN_EFFECT";
85
- modified_by: string;
86
- municipality_ids: string[];
87
- publish_start_date: number;
88
- publish_status: "PUBLISHED" | "ARCHIVED" | "DRAFT";
89
- reference_type: "LINE" | "STOP" | "AGENCY" | "TRIP";
90
- references: {
91
- child_ids: string[];
92
- parent_id: string;
93
- }[];
94
82
  title: string;
83
+ is_locked?: boolean | undefined;
95
84
  updated_by?: string | undefined;
85
+ type?: "PLANNED" | "REALTIME" | null | undefined;
96
86
  active_period_end_date?: number | null | undefined;
97
87
  coordinates?: [number, number] | null | undefined;
98
88
  external_id?: string | null | undefined;
99
89
  file_id?: string | null | undefined;
100
- info_url?: string | undefined;
90
+ info_url?: string | null | undefined;
91
+ municipality_ids?: string[] | undefined;
101
92
  publish_end_date?: number | null | undefined;
93
+ publish_start_date?: number | null | undefined;
94
+ publish_status?: "PUBLISHED" | "ARCHIVED" | "DRAFT" | undefined;
95
+ reference_type?: "LINE" | "STOP" | "AGENCY" | "TRIP" | null | undefined;
96
+ references?: {
97
+ child_ids: string[];
98
+ parent_id: string;
99
+ }[] | undefined;
102
100
  }>;
103
101
  export declare const CreateAlertSchema: z.ZodObject<Omit<{
104
102
  _id: z.ZodString;
105
103
  created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
104
+ is_locked: z.ZodDefault<z.ZodBoolean>;
106
105
  updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
107
106
  updated_by: z.ZodOptional<z.ZodString>;
108
107
  } & {
109
- active_period_end_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>;
108
+ active_period_end_date: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>;
110
109
  active_period_start_date: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
111
110
  cause: 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"]>;
112
- coordinates: z.ZodOptional<z.ZodNullable<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
113
- created_by: z.ZodString;
111
+ coordinates: z.ZodDefault<z.ZodNullable<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
112
+ created_by: z.ZodNullable<z.ZodString>;
114
113
  description: z.ZodString;
115
114
  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>>;
117
- file_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
118
- info_url: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
119
- modified_by: z.ZodString;
120
- municipality_ids: z.ZodArray<z.ZodString, "many">;
121
- publish_end_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>;
122
- publish_start_date: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
123
- publish_status: z.ZodEnum<["PUBLISHED", "ARCHIVED", "DRAFT"]>;
124
- reference_type: z.ZodEnum<["LINE", "STOP", "AGENCY", "TRIP"]>;
125
- references: z.ZodArray<z.ZodObject<{
115
+ external_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
116
+ file_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
117
+ info_url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
118
+ municipality_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
119
+ publish_end_date: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>;
120
+ publish_start_date: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>;
121
+ publish_status: z.ZodDefault<z.ZodEnum<["PUBLISHED", "ARCHIVED", "DRAFT"]>>;
122
+ reference_type: z.ZodDefault<z.ZodNullable<z.ZodEnum<["LINE", "STOP", "AGENCY", "TRIP"]>>>;
123
+ references: z.ZodDefault<z.ZodArray<z.ZodObject<{
126
124
  child_ids: z.ZodArray<z.ZodString, "many">;
127
125
  parent_id: z.ZodString;
128
126
  }, "strip", z.ZodTypeAny, {
@@ -131,81 +129,74 @@ export declare const CreateAlertSchema: z.ZodObject<Omit<{
131
129
  }, {
132
130
  child_ids: string[];
133
131
  parent_id: string;
134
- }>, "many">;
132
+ }>, "many">>;
135
133
  title: z.ZodString;
136
- type: z.ZodEnum<["PLANNED", "REALTIME"]>;
137
- }, "_id" | "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
138
- created_by: string;
139
- type: "PLANNED" | "REALTIME";
134
+ type: z.ZodDefault<z.ZodNullable<z.ZodEnum<["PLANNED", "REALTIME"]>>>;
135
+ }, "_id" | "created_at" | "created_by" | "updated_at" | "updated_by">, "strip", z.ZodTypeAny, {
136
+ is_locked: boolean;
137
+ type: "PLANNED" | "REALTIME" | null;
138
+ active_period_end_date: import("./_common/unix-timestamp.js").UnixTimestamp | null;
140
139
  active_period_start_date: number & {
141
140
  __brand: "UnixTimestamp";
142
141
  };
143
142
  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";
143
+ coordinates: [number, number] | null;
144
144
  description: string;
145
145
  effect: "ACCESSIBILITY_ISSUE" | "ADDITIONAL_SERVICE" | "DETOUR" | "MODIFIED_SERVICE" | "NO_EFFECT" | "NO_SERVICE" | "OTHER_EFFECT" | "REDUCED_SERVICE" | "SIGNIFICANT_DELAYS" | "STOP_MOVED" | "UNKNOWN_EFFECT";
146
- modified_by: string;
146
+ external_id: string | null;
147
+ file_id: string | null;
148
+ info_url: string | null;
147
149
  municipality_ids: string[];
148
- publish_start_date: number & {
149
- __brand: "UnixTimestamp";
150
- };
150
+ publish_end_date: import("./_common/unix-timestamp.js").UnixTimestamp | null;
151
+ publish_start_date: import("./_common/unix-timestamp.js").UnixTimestamp | null;
151
152
  publish_status: "PUBLISHED" | "ARCHIVED" | "DRAFT";
152
- reference_type: "LINE" | "STOP" | "AGENCY" | "TRIP";
153
+ reference_type: "LINE" | "STOP" | "AGENCY" | "TRIP" | null;
153
154
  references: {
154
155
  child_ids: string[];
155
156
  parent_id: string;
156
157
  }[];
157
158
  title: string;
158
- updated_by?: string | undefined;
159
- active_period_end_date?: import("./_common/unix-timestamp.js").UnixTimestamp | null | undefined;
160
- coordinates?: [number, number] | null | undefined;
161
- external_id?: string | null | undefined;
162
- file_id?: string | null | undefined;
163
- info_url?: string | undefined;
164
- publish_end_date?: import("./_common/unix-timestamp.js").UnixTimestamp | null | undefined;
165
159
  }, {
166
- created_by: string;
167
- type: "PLANNED" | "REALTIME";
168
160
  active_period_start_date: number;
169
161
  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";
170
162
  description: string;
171
163
  effect: "ACCESSIBILITY_ISSUE" | "ADDITIONAL_SERVICE" | "DETOUR" | "MODIFIED_SERVICE" | "NO_EFFECT" | "NO_SERVICE" | "OTHER_EFFECT" | "REDUCED_SERVICE" | "SIGNIFICANT_DELAYS" | "STOP_MOVED" | "UNKNOWN_EFFECT";
172
- modified_by: string;
173
- municipality_ids: string[];
174
- publish_start_date: number;
175
- publish_status: "PUBLISHED" | "ARCHIVED" | "DRAFT";
176
- reference_type: "LINE" | "STOP" | "AGENCY" | "TRIP";
177
- references: {
178
- child_ids: string[];
179
- parent_id: string;
180
- }[];
181
164
  title: string;
182
- updated_by?: string | undefined;
165
+ is_locked?: boolean | undefined;
166
+ type?: "PLANNED" | "REALTIME" | null | undefined;
183
167
  active_period_end_date?: number | null | undefined;
184
168
  coordinates?: [number, number] | null | undefined;
185
169
  external_id?: string | null | undefined;
186
170
  file_id?: string | null | undefined;
187
- info_url?: string | undefined;
171
+ info_url?: string | null | undefined;
172
+ municipality_ids?: string[] | undefined;
188
173
  publish_end_date?: number | null | undefined;
174
+ publish_start_date?: number | null | undefined;
175
+ publish_status?: "PUBLISHED" | "ARCHIVED" | "DRAFT" | undefined;
176
+ reference_type?: "LINE" | "STOP" | "AGENCY" | "TRIP" | null | undefined;
177
+ references?: {
178
+ child_ids: string[];
179
+ parent_id: string;
180
+ }[] | undefined;
189
181
  }>;
190
182
  export declare const UpdateAlertSchema: z.ZodObject<{
191
- updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>;
192
- type: z.ZodOptional<z.ZodEnum<["PLANNED", "REALTIME"]>>;
193
- active_period_end_date: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>>;
183
+ is_locked: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
184
+ type: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEnum<["PLANNED", "REALTIME"]>>>>;
185
+ active_period_end_date: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>>;
194
186
  active_period_start_date: z.ZodOptional<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>;
195
187
  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"]>>;
196
- coordinates: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>>;
188
+ coordinates: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>>;
197
189
  description: z.ZodOptional<z.ZodString>;
198
190
  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>>>;
200
- file_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
201
- info_url: z.ZodOptional<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>;
202
- modified_by: z.ZodOptional<z.ZodString>;
203
- municipality_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
204
- publish_end_date: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>>;
205
- publish_start_date: z.ZodOptional<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>;
206
- publish_status: z.ZodOptional<z.ZodEnum<["PUBLISHED", "ARCHIVED", "DRAFT"]>>;
207
- reference_type: z.ZodOptional<z.ZodEnum<["LINE", "STOP", "AGENCY", "TRIP"]>>;
208
- references: z.ZodOptional<z.ZodArray<z.ZodObject<{
191
+ external_id: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
192
+ file_id: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
193
+ info_url: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
194
+ municipality_ids: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
195
+ publish_end_date: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>>;
196
+ publish_start_date: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>>;
197
+ publish_status: z.ZodOptional<z.ZodDefault<z.ZodEnum<["PUBLISHED", "ARCHIVED", "DRAFT"]>>>;
198
+ reference_type: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEnum<["LINE", "STOP", "AGENCY", "TRIP"]>>>>;
199
+ references: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
209
200
  child_ids: z.ZodArray<z.ZodString, "many">;
210
201
  parent_id: z.ZodString;
211
202
  }, "strip", z.ZodTypeAny, {
@@ -214,11 +205,11 @@ export declare const UpdateAlertSchema: z.ZodObject<{
214
205
  }, {
215
206
  child_ids: string[];
216
207
  parent_id: string;
217
- }>, "many">>;
208
+ }>, "many">>>;
218
209
  title: z.ZodOptional<z.ZodString>;
219
- }, "strict", z.ZodTypeAny, {
220
- updated_by?: string | undefined;
221
- type?: "PLANNED" | "REALTIME" | undefined;
210
+ }, "strip", z.ZodTypeAny, {
211
+ is_locked?: boolean | undefined;
212
+ type?: "PLANNED" | "REALTIME" | null | undefined;
222
213
  active_period_end_date?: import("./_common/unix-timestamp.js").UnixTimestamp | null | undefined;
223
214
  active_period_start_date?: import("./_common/unix-timestamp.js").UnixTimestamp | undefined;
224
215
  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;
@@ -227,21 +218,20 @@ export declare const UpdateAlertSchema: z.ZodObject<{
227
218
  effect?: "ACCESSIBILITY_ISSUE" | "ADDITIONAL_SERVICE" | "DETOUR" | "MODIFIED_SERVICE" | "NO_EFFECT" | "NO_SERVICE" | "OTHER_EFFECT" | "REDUCED_SERVICE" | "SIGNIFICANT_DELAYS" | "STOP_MOVED" | "UNKNOWN_EFFECT" | undefined;
228
219
  external_id?: string | null | undefined;
229
220
  file_id?: string | null | undefined;
230
- info_url?: string | undefined;
231
- modified_by?: string | undefined;
221
+ info_url?: string | null | undefined;
232
222
  municipality_ids?: string[] | undefined;
233
223
  publish_end_date?: import("./_common/unix-timestamp.js").UnixTimestamp | null | undefined;
234
- publish_start_date?: import("./_common/unix-timestamp.js").UnixTimestamp | undefined;
224
+ publish_start_date?: import("./_common/unix-timestamp.js").UnixTimestamp | null | undefined;
235
225
  publish_status?: "PUBLISHED" | "ARCHIVED" | "DRAFT" | undefined;
236
- reference_type?: "LINE" | "STOP" | "AGENCY" | "TRIP" | undefined;
226
+ reference_type?: "LINE" | "STOP" | "AGENCY" | "TRIP" | null | undefined;
237
227
  references?: {
238
228
  child_ids: string[];
239
229
  parent_id: string;
240
230
  }[] | undefined;
241
231
  title?: string | undefined;
242
232
  }, {
243
- updated_by?: string | undefined;
244
- type?: "PLANNED" | "REALTIME" | undefined;
233
+ is_locked?: boolean | undefined;
234
+ type?: "PLANNED" | "REALTIME" | null | undefined;
245
235
  active_period_end_date?: number | null | undefined;
246
236
  active_period_start_date?: number | undefined;
247
237
  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;
@@ -250,13 +240,12 @@ export declare const UpdateAlertSchema: z.ZodObject<{
250
240
  effect?: "ACCESSIBILITY_ISSUE" | "ADDITIONAL_SERVICE" | "DETOUR" | "MODIFIED_SERVICE" | "NO_EFFECT" | "NO_SERVICE" | "OTHER_EFFECT" | "REDUCED_SERVICE" | "SIGNIFICANT_DELAYS" | "STOP_MOVED" | "UNKNOWN_EFFECT" | undefined;
251
241
  external_id?: string | null | undefined;
252
242
  file_id?: string | null | undefined;
253
- info_url?: string | undefined;
254
- modified_by?: string | undefined;
243
+ info_url?: string | null | undefined;
255
244
  municipality_ids?: string[] | undefined;
256
245
  publish_end_date?: number | null | undefined;
257
- publish_start_date?: number | undefined;
246
+ publish_start_date?: number | null | undefined;
258
247
  publish_status?: "PUBLISHED" | "ARCHIVED" | "DRAFT" | undefined;
259
- reference_type?: "LINE" | "STOP" | "AGENCY" | "TRIP" | undefined;
248
+ reference_type?: "LINE" | "STOP" | "AGENCY" | "TRIP" | null | undefined;
260
249
  references?: {
261
250
  child_ids: string[];
262
251
  parent_id: string;
package/dist/alert.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /* * */
2
2
  import { DocumentSchema } from './_common/document.js';
3
3
  import { PublishStatusSchema } from './_common/status.js';
4
- import { unixTimeStampSchema } from './_common/unix-timestamp.js';
4
+ import { UnixTimeStampSchema } from './_common/unix-timestamp.js';
5
5
  import { gtfsCauseSchema, gtfsEffectSchema } from './gtfs/cause-effetcs.js';
6
6
  import { z } from 'zod';
7
7
  /* * */
@@ -11,31 +11,30 @@ export const ReferenceTypeSchema = z.enum(['LINE', 'STOP', 'AGENCY', 'TRIP']);
11
11
  /* * */
12
12
  // Base schema for alerts with common validation rules
13
13
  export const AlertSchema = DocumentSchema.extend({
14
- active_period_end_date: unixTimeStampSchema.nullish(),
15
- active_period_start_date: unixTimeStampSchema,
14
+ active_period_end_date: UnixTimeStampSchema.nullable().default(null),
15
+ active_period_start_date: UnixTimeStampSchema,
16
16
  cause: gtfsCauseSchema,
17
- coordinates: z.tuple([z.number(), z.number()]).nullish(),
18
- created_by: z.string().min(1),
17
+ coordinates: z.tuple([z.number(), z.number()]).nullable().default(null),
18
+ created_by: z.string().nullable(),
19
19
  description: z.string(),
20
20
  effect: gtfsEffectSchema,
21
- external_id: z.string().nullish(),
22
- file_id: z.string().nullish(),
23
- info_url: z.string().url().optional().or(z.literal('')),
24
- modified_by: z.string().min(1),
25
- municipality_ids: z.array(z.string().min(1)),
26
- publish_end_date: unixTimeStampSchema.nullish(),
27
- publish_start_date: unixTimeStampSchema,
28
- publish_status: PublishStatusSchema,
29
- reference_type: ReferenceTypeSchema,
21
+ external_id: z.string().nullable().default(null),
22
+ file_id: z.string().nullable().default(null),
23
+ info_url: z.string().url().nullable().default(null),
24
+ municipality_ids: z.array(z.string().min(1)).default([]),
25
+ publish_end_date: UnixTimeStampSchema.nullable().default(Date.now()),
26
+ publish_start_date: UnixTimeStampSchema.nullable().default(Date.now()),
27
+ publish_status: PublishStatusSchema.default('DRAFT'),
28
+ reference_type: ReferenceTypeSchema.nullable().default(ReferenceTypeSchema.options[0]),
30
29
  references: z.array(z.object({
31
30
  child_ids: z.array(z.string().min(1)),
32
31
  parent_id: z.string().min(1),
33
- })),
32
+ })).default([]),
34
33
  title: z.string().min(1),
35
- type: AlertTypeSchema,
36
- }).strict();
37
- export const CreateAlertSchema = AlertSchema.omit({ _id: true, created_at: true, updated_at: true });
38
- export const UpdateAlertSchema = CreateAlertSchema.omit({ created_by: true }).partial();
34
+ type: AlertTypeSchema.nullable().default(AlertTypeSchema.options[0]),
35
+ });
36
+ export const CreateAlertSchema = AlertSchema.omit({ _id: true, created_at: true, created_by: true, updated_at: true, updated_by: true });
37
+ export const UpdateAlertSchema = CreateAlertSchema.partial();
39
38
  /* * */
40
39
  export const GetAllAlertsQuerySchema = z.object({
41
40
  realtime: z.preprocess((val) => val === 'true' || val === '1', z.boolean()),
@@ -1,11 +1,12 @@
1
1
  import { z } from 'zod';
2
- export declare const SimplifiedApexLocationSchema: z.ZodObject<{
2
+ export declare const SimplifiedApexLocationSchema: z.ZodObject<Omit<{
3
3
  _id: z.ZodString;
4
4
  created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
5
5
  created_by: z.ZodOptional<z.ZodString>;
6
+ is_locked: z.ZodDefault<z.ZodBoolean>;
6
7
  updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
7
8
  updated_by: z.ZodOptional<z.ZodString>;
8
- } & {
9
+ }, "is_locked"> & {
9
10
  agency_id: z.ZodString;
10
11
  apex_version: z.ZodString;
11
12
  device_id: z.ZodString;
@@ -17,7 +18,7 @@ export declare const SimplifiedApexLocationSchema: z.ZodObject<{
17
18
  stop_id: z.ZodString;
18
19
  trip_id: z.ZodString;
19
20
  vehicle_id: z.ZodNumber;
20
- }, "strict", z.ZodTypeAny, {
21
+ }, "strip", z.ZodTypeAny, {
21
22
  _id: string;
22
23
  created_at: number & {
23
24
  __brand: "UnixTimestamp";
@@ -75,7 +76,7 @@ export declare const UpdateSimplifiedApexLocationSchema: z.ZodObject<{
75
76
  stop_id: z.ZodOptional<z.ZodString>;
76
77
  trip_id: z.ZodOptional<z.ZodString>;
77
78
  vehicle_id: z.ZodOptional<z.ZodNumber>;
78
- }, "strict", z.ZodTypeAny, {
79
+ }, "strip", z.ZodTypeAny, {
79
80
  _id?: string | undefined;
80
81
  created_at?: import("../_common/unix-timestamp.js").UnixTimestamp | undefined;
81
82
  created_by?: string | undefined;
@@ -1,9 +1,11 @@
1
1
  /* * */
2
2
  import { DocumentSchema } from '../_common/document.js';
3
- import { unixTimeStampSchema } from '../_common/unix-timestamp.js';
3
+ import { UnixTimeStampSchema } from '../_common/unix-timestamp.js';
4
4
  import { z } from 'zod';
5
5
  /* * */
6
- export const SimplifiedApexLocationSchema = DocumentSchema.extend({
6
+ export const SimplifiedApexLocationSchema = DocumentSchema
7
+ .omit({ is_locked: true })
8
+ .extend({
7
9
  agency_id: z.string(),
8
10
  apex_version: z.string(),
9
11
  device_id: z.string(),
@@ -11,9 +13,9 @@ export const SimplifiedApexLocationSchema = DocumentSchema.extend({
11
13
  mac_ase_counter_value: z.number(),
12
14
  mac_sam_serial_number: z.number(),
13
15
  pattern_id: z.string(),
14
- received_at: unixTimeStampSchema,
16
+ received_at: UnixTimeStampSchema,
15
17
  stop_id: z.string(),
16
18
  trip_id: z.string(),
17
19
  vehicle_id: z.number(),
18
- }).strict();
20
+ });
19
21
  export const UpdateSimplifiedApexLocationSchema = SimplifiedApexLocationSchema.partial();
@@ -1,11 +1,12 @@
1
1
  import { z } from 'zod';
2
- export declare const SimplifiedApexOnBoardRefundSchema: z.ZodObject<{
2
+ export declare const SimplifiedApexOnBoardRefundSchema: z.ZodObject<Omit<{
3
3
  _id: z.ZodString;
4
4
  created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
5
5
  created_by: z.ZodOptional<z.ZodString>;
6
+ is_locked: z.ZodDefault<z.ZodBoolean>;
6
7
  updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
7
8
  updated_by: z.ZodOptional<z.ZodString>;
8
- } & {
9
+ }, "is_locked"> & {
9
10
  agency_id: z.ZodString;
10
11
  apex_version: z.ZodString;
11
12
  block_id: z.ZodNullable<z.ZodString>;
@@ -27,7 +28,7 @@ export declare const SimplifiedApexOnBoardRefundSchema: z.ZodObject<{
27
28
  trip_id: z.ZodNullable<z.ZodString>;
28
29
  validation_id: z.ZodNullable<z.ZodString>;
29
30
  vehicle_id: z.ZodNullable<z.ZodNumber>;
30
- }, "strict", z.ZodTypeAny, {
31
+ }, "strip", z.ZodTypeAny, {
31
32
  _id: string;
32
33
  created_at: number & {
33
34
  __brand: "UnixTimestamp";
@@ -115,7 +116,7 @@ export declare const UpdateSimplifiedApexOnBoardRefundSchema: z.ZodObject<{
115
116
  trip_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
116
117
  validation_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
117
118
  vehicle_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
118
- }, "strict", z.ZodTypeAny, {
119
+ }, "strip", z.ZodTypeAny, {
119
120
  _id?: string | undefined;
120
121
  created_at?: import("../_common/unix-timestamp.js").UnixTimestamp | undefined;
121
122
  created_by?: string | undefined;
@@ -1,9 +1,11 @@
1
1
  /* * */
2
2
  import { DocumentSchema } from '../_common/document.js';
3
- import { unixTimeStampSchema } from '../_common/unix-timestamp.js';
3
+ import { UnixTimeStampSchema } from '../_common/unix-timestamp.js';
4
4
  import { z } from 'zod';
5
5
  /* * */
6
- export const SimplifiedApexOnBoardRefundSchema = DocumentSchema.extend({
6
+ export const SimplifiedApexOnBoardRefundSchema = DocumentSchema
7
+ .omit({ is_locked: true })
8
+ .extend({
7
9
  agency_id: z.string(),
8
10
  apex_version: z.string(),
9
11
  block_id: z.string().nullable(),
@@ -20,10 +22,10 @@ export const SimplifiedApexOnBoardRefundSchema = DocumentSchema.extend({
20
22
  price: z.number(),
21
23
  product_long_id: z.string(),
22
24
  product_quantity: z.number(),
23
- received_at: unixTimeStampSchema,
25
+ received_at: UnixTimeStampSchema,
24
26
  stop_id: z.string().nullable(),
25
27
  trip_id: z.string().nullable(),
26
28
  validation_id: z.string().nullable(),
27
29
  vehicle_id: z.number().nullable(),
28
- }).strict();
30
+ });
29
31
  export const UpdateSimplifiedApexOnBoardRefundSchema = SimplifiedApexOnBoardRefundSchema.partial();
@@ -1,11 +1,12 @@
1
1
  import { z } from 'zod';
2
- export declare const SimplifiedApexOnBoardSaleSchema: z.ZodObject<{
2
+ export declare const SimplifiedApexOnBoardSaleSchema: z.ZodObject<Omit<{
3
3
  _id: z.ZodString;
4
4
  created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
5
5
  created_by: z.ZodOptional<z.ZodString>;
6
+ is_locked: z.ZodDefault<z.ZodBoolean>;
6
7
  updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
7
8
  updated_by: z.ZodOptional<z.ZodString>;
8
- } & {
9
+ }, "is_locked"> & {
9
10
  agency_id: z.ZodString;
10
11
  apex_version: z.ZodString;
11
12
  block_id: z.ZodNullable<z.ZodString>;
@@ -28,7 +29,7 @@ export declare const SimplifiedApexOnBoardSaleSchema: z.ZodObject<{
28
29
  trip_id: z.ZodNullable<z.ZodString>;
29
30
  validation_id: z.ZodNullable<z.ZodString>;
30
31
  vehicle_id: z.ZodNullable<z.ZodNumber>;
31
- }, "strict", z.ZodTypeAny, {
32
+ }, "strip", z.ZodTypeAny, {
32
33
  _id: string;
33
34
  created_at: number & {
34
35
  __brand: "UnixTimestamp";
@@ -118,7 +119,7 @@ export declare const UpdateSimplifiedApexOnBoardSaleSchema: z.ZodObject<{
118
119
  validation_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
119
120
  is_passenger: z.ZodOptional<z.ZodBoolean>;
120
121
  on_board_refund_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
121
- }, "strict", z.ZodTypeAny, {
122
+ }, "strip", z.ZodTypeAny, {
122
123
  _id?: string | undefined;
123
124
  created_at?: import("../_common/unix-timestamp.js").UnixTimestamp | undefined;
124
125
  updated_at?: import("../_common/unix-timestamp.js").UnixTimestamp | undefined;
@@ -1,9 +1,11 @@
1
1
  /* * */
2
2
  import { DocumentSchema } from '../_common/document.js';
3
- import { unixTimeStampSchema } from '../_common/unix-timestamp.js';
3
+ import { UnixTimeStampSchema } from '../_common/unix-timestamp.js';
4
4
  import { z } from 'zod';
5
5
  /* * */
6
- export const SimplifiedApexOnBoardSaleSchema = DocumentSchema.extend({
6
+ export const SimplifiedApexOnBoardSaleSchema = DocumentSchema
7
+ .omit({ is_locked: true })
8
+ .extend({
7
9
  agency_id: z.string(),
8
10
  apex_version: z.string(),
9
11
  block_id: z.string().nullable(),
@@ -21,10 +23,10 @@ export const SimplifiedApexOnBoardSaleSchema = DocumentSchema.extend({
21
23
  price: z.number(),
22
24
  product_long_id: z.string(),
23
25
  product_quantity: z.number(),
24
- received_at: unixTimeStampSchema,
26
+ received_at: UnixTimeStampSchema,
25
27
  stop_id: z.string().nullable(),
26
28
  trip_id: z.string().nullable(),
27
29
  validation_id: z.string().nullable(),
28
30
  vehicle_id: z.number().nullable(),
29
- }).strict();
31
+ });
30
32
  export const UpdateSimplifiedApexOnBoardSaleSchema = SimplifiedApexOnBoardSaleSchema.omit({ created_by: true }).partial();