@tmlmobilidade/types 20260121.2332.6 → 20260128.2248.28

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 (150) hide show
  1. package/dist/_common/comment.d.ts +24 -24
  2. package/dist/_common/document.d.ts +3 -3
  3. package/dist/_common/document.js +1 -1
  4. package/dist/_common/status.d.ts +2 -2
  5. package/dist/_common/status.js +1 -1
  6. package/dist/_common/unix-timestamp.js +1 -0
  7. package/dist/agency.d.ts +6 -6
  8. package/dist/alerts/alert.d.ts +262 -0
  9. package/dist/alerts/alert.js +34 -0
  10. package/dist/alerts/cause-effect-map.d.ts +106 -0
  11. package/dist/alerts/cause-effect-map.js +94 -0
  12. package/dist/alerts/cause.d.ts +17 -0
  13. package/dist/alerts/cause.js +45 -0
  14. package/dist/alerts/effect.d.ts +17 -0
  15. package/dist/alerts/effect.js +35 -0
  16. package/dist/alerts/index.d.ts +6 -0
  17. package/dist/alerts/index.js +6 -0
  18. package/dist/alerts/query.d.ts +9 -0
  19. package/dist/alerts/query.js +6 -0
  20. package/dist/alerts/reference-type.d.ts +4 -0
  21. package/dist/alerts/reference-type.js +10 -0
  22. package/dist/apex/simplified-apex-location.d.ts +2 -12
  23. package/dist/apex/simplified-apex-location.js +1 -1
  24. package/dist/apex/simplified-apex-on-board-refund.d.ts +2 -12
  25. package/dist/apex/simplified-apex-on-board-refund.js +1 -1
  26. package/dist/apex/simplified-apex-on-board-sale.d.ts +12 -19
  27. package/dist/apex/simplified-apex-on-board-sale.js +2 -2
  28. package/dist/apex/simplified-apex-validation.d.ts +6 -16
  29. package/dist/apex/simplified-apex-validation.js +1 -1
  30. package/dist/auth/role.d.ts +718 -130
  31. package/dist/auth/session.d.ts +6 -6
  32. package/dist/auth/user.d.ts +1182 -270
  33. package/dist/auth/verification-token.d.ts +4 -4
  34. package/dist/calendar/event.d.ts +43 -0
  35. package/dist/calendar/event.js +16 -0
  36. package/dist/calendar/index.d.ts +1 -0
  37. package/dist/calendar/index.js +2 -0
  38. package/dist/dates/annotation.d.ts +6 -6
  39. package/dist/dates/date.d.ts +32 -0
  40. package/dist/dates/date.js +18 -0
  41. package/dist/dates/index.d.ts +2 -0
  42. package/dist/dates/index.js +2 -0
  43. package/dist/dates/period.d.ts +94 -0
  44. package/dist/dates/period.js +14 -0
  45. package/dist/file-exports/base.d.ts +9 -9
  46. package/dist/file-exports/file-exports.d.ts +7 -7
  47. package/dist/file-exports/ride-export.d.ts +14 -14
  48. package/dist/file-exports/ride-export.js +2 -2
  49. package/dist/gtfs/cause.d.ts +10 -0
  50. package/dist/gtfs/cause.js +18 -0
  51. package/dist/gtfs/effect.d.ts +10 -0
  52. package/dist/gtfs/effect.js +17 -0
  53. package/dist/gtfs/index.d.ts +2 -1
  54. package/dist/gtfs/index.js +2 -1
  55. package/dist/index.d.ts +5 -2
  56. package/dist/index.js +5 -2
  57. package/dist/locations/queries.d.ts +2 -2
  58. package/dist/metrics/demand/demand_by_agency.d.ts +8 -8
  59. package/dist/metrics/demand/demand_by_category.d.ts +12 -12
  60. package/dist/metrics/demand/demand_by_line.d.ts +4 -4
  61. package/dist/metrics/demand/demand_by_pattern.d.ts +8 -8
  62. package/dist/metrics/demand/demand_by_product.d.ts +12 -12
  63. package/dist/metrics/index.d.ts +93 -48
  64. package/dist/metrics/index.js +4 -1
  65. package/dist/metrics/passenger-impact/index.d.ts +1 -0
  66. package/dist/metrics/passenger-impact/index.js +1 -0
  67. package/dist/metrics/passenger-impact/passenger-impact.d.ts +97 -0
  68. package/dist/metrics/passenger-impact/passenger-impact.js +22 -0
  69. package/dist/metrics/supply/supply_by_agency.d.ts +4 -4
  70. package/dist/notification.d.ts +18 -18
  71. package/dist/offer/index.d.ts +5 -0
  72. package/dist/offer/index.js +5 -0
  73. package/dist/offer/line.d.ts +296 -0
  74. package/dist/offer/line.js +60 -0
  75. package/dist/offer/pattern.d.ts +3608 -0
  76. package/dist/offer/pattern.js +75 -0
  77. package/dist/offer/route.d.ts +187 -0
  78. package/dist/offer/route.js +33 -0
  79. package/dist/offer/scheduleRule.d.ts +80 -0
  80. package/dist/offer/scheduleRule.js +50 -0
  81. package/dist/offer/typology.d.ts +124 -0
  82. package/dist/offer/typology.js +30 -0
  83. package/dist/organization.d.ts +20 -20
  84. package/dist/permissions/alerts.d.ts +13 -19
  85. package/dist/permissions/alerts.js +8 -13
  86. package/dist/permissions/annotations.d.ts +25 -0
  87. package/dist/permissions/annotations.js +16 -0
  88. package/dist/permissions/fares.d.ts +25 -0
  89. package/dist/permissions/fares.js +16 -0
  90. package/dist/permissions/index.d.ts +196 -21
  91. package/dist/permissions/index.js +142 -6
  92. package/dist/permissions/lines.d.ts +25 -0
  93. package/dist/permissions/lines.js +16 -0
  94. package/dist/permissions/periods.d.ts +25 -0
  95. package/dist/permissions/periods.js +16 -0
  96. package/dist/permissions/typologies.d.ts +25 -0
  97. package/dist/permissions/typologies.js +16 -0
  98. package/dist/permissions/vehicles.d.ts +25 -0
  99. package/dist/permissions/vehicles.js +16 -0
  100. package/dist/permissions/zones.d.ts +25 -0
  101. package/dist/permissions/zones.js +16 -0
  102. package/dist/plans/gtfs-validation.d.ts +30 -30
  103. package/dist/plans/plan.d.ts +6 -6
  104. package/dist/proposed-change.d.ts +12 -12
  105. package/dist/rides/batch-query.d.ts +52 -0
  106. package/dist/rides/batch-query.js +54 -0
  107. package/dist/rides/index.d.ts +1 -0
  108. package/dist/rides/index.js +1 -0
  109. package/dist/rides/ride-acceptance.d.ts +105 -105
  110. package/dist/rides/ride-acceptance.js +2 -2
  111. package/dist/rides/ride-audit.d.ts +21 -21
  112. package/dist/rides/ride-normalized.d.ts +808 -21
  113. package/dist/rides/ride-normalized.js +31 -1
  114. package/dist/rides/ride.d.ts +6 -6
  115. package/dist/sams/sam.d.ts +0 -15
  116. package/dist/sams/sam.js +2 -2
  117. package/dist/stops/connections.d.ts +1 -0
  118. package/dist/stops/connections.js +1 -1
  119. package/dist/stops/equipment.d.ts +1 -0
  120. package/dist/stops/equipment.js +1 -1
  121. package/dist/stops/parent-station.d.ts +6 -6
  122. package/dist/stops/stop-area.d.ts +6 -6
  123. package/dist/stops/stop.d.ts +69 -69
  124. package/dist/ticketing/fare.d.ts +137 -0
  125. package/dist/ticketing/fare.js +44 -0
  126. package/dist/ticketing/index.d.ts +2 -0
  127. package/dist/ticketing/index.js +2 -0
  128. package/dist/ticketing/zone.d.ts +220 -0
  129. package/dist/ticketing/zone.js +34 -0
  130. package/dist/vehicle/emission.d.ts +3 -0
  131. package/dist/vehicle/emission.js +12 -0
  132. package/dist/vehicle/index.d.ts +4 -0
  133. package/dist/vehicle/index.js +4 -0
  134. package/dist/vehicle/propulsion.d.ts +3 -0
  135. package/dist/vehicle/propulsion.js +14 -0
  136. package/dist/vehicle/vehicle.d.ts +189 -0
  137. package/dist/vehicle/vehicle.js +27 -0
  138. package/dist/vehicle/wheelchair.d.ts +3 -0
  139. package/dist/vehicle/wheelchair.js +10 -0
  140. package/dist/vehicle-events/clickhouse-vehicle-event.d.ts +2 -6
  141. package/dist/vehicle-events/simplified-vehicle-event.d.ts +2 -6
  142. package/dist/vehicle-events/simplified-vehicle-event.js +1 -1
  143. package/dist/zone.d.ts +6 -6
  144. package/package.json +2 -2
  145. package/dist/alert.d.ts +0 -265
  146. package/dist/alert.js +0 -42
  147. package/dist/gtfs/cause-effetcs.d.ts +0 -86
  148. package/dist/gtfs/cause-effetcs.js +0 -31
  149. package/dist/permissions/dates.d.ts +0 -25
  150. package/dist/permissions/dates.js +0 -16
@@ -0,0 +1,137 @@
1
+ import { z } from 'zod';
2
+ export declare const FARE_PAYMENT_METHOD: {
3
+ readonly ONBOARD: "0";
4
+ readonly PREPAID: "1";
5
+ };
6
+ export declare const FARE_TRANSFERS: {
7
+ readonly NONE: "0";
8
+ readonly ONE: "1";
9
+ readonly TWO: "2";
10
+ readonly UNLIMITED: "unlimited";
11
+ };
12
+ export declare const FARE_CURRENCY: {
13
+ readonly EUR: "EUR";
14
+ };
15
+ export declare const FareSchema: z.ZodObject<{
16
+ _id: z.ZodString;
17
+ created_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
18
+ created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
19
+ updated_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
20
+ updated_by: z.ZodOptional<z.ZodString>;
21
+ } & {
22
+ agency_ids: z.ZodArray<z.ZodString, "many">;
23
+ code: z.ZodString;
24
+ currency_type: z.ZodDefault<z.ZodEnum<["EUR"]>>;
25
+ is_locked: z.ZodDefault<z.ZodBoolean>;
26
+ name: z.ZodString;
27
+ payment_method: z.ZodDefault<z.ZodEnum<["0", "1"]>>;
28
+ price: z.ZodDefault<z.ZodNumber>;
29
+ transfers: z.ZodDefault<z.ZodEnum<["0", "1", "2", "unlimited"]>>;
30
+ }, "strip", z.ZodTypeAny, {
31
+ _id: string;
32
+ created_at: number & {
33
+ __brand: "UnixTimestamp";
34
+ };
35
+ created_by: string | null;
36
+ is_locked: boolean;
37
+ updated_at: number & {
38
+ __brand: "UnixTimestamp";
39
+ };
40
+ code: string;
41
+ name: string;
42
+ payment_method: "0" | "1";
43
+ price: number;
44
+ agency_ids: string[];
45
+ currency_type: "EUR";
46
+ transfers: "0" | "1" | "2" | "unlimited";
47
+ updated_by?: string | undefined;
48
+ }, {
49
+ _id: string;
50
+ created_at: number;
51
+ updated_at: number;
52
+ code: string;
53
+ name: string;
54
+ agency_ids: string[];
55
+ created_by?: string | null | undefined;
56
+ is_locked?: boolean | undefined;
57
+ updated_by?: string | undefined;
58
+ payment_method?: "0" | "1" | undefined;
59
+ price?: number | undefined;
60
+ currency_type?: "EUR" | undefined;
61
+ transfers?: "0" | "1" | "2" | "unlimited" | undefined;
62
+ }>;
63
+ export declare const CreateFareSchema: z.ZodObject<{
64
+ agency_ids: z.ZodArray<z.ZodString, "many">;
65
+ code: z.ZodString;
66
+ name: z.ZodString;
67
+ } & {
68
+ _id: z.ZodOptional<z.ZodString>;
69
+ created_by: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
70
+ is_locked: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
71
+ updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>;
72
+ payment_method: z.ZodOptional<z.ZodDefault<z.ZodEnum<["0", "1"]>>>;
73
+ price: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
74
+ currency_type: z.ZodOptional<z.ZodDefault<z.ZodEnum<["EUR"]>>>;
75
+ transfers: z.ZodOptional<z.ZodDefault<z.ZodEnum<["0", "1", "2", "unlimited"]>>>;
76
+ }, "strip", z.ZodTypeAny, {
77
+ code: string;
78
+ name: string;
79
+ agency_ids: string[];
80
+ _id?: string | undefined;
81
+ created_by?: string | null | undefined;
82
+ is_locked?: boolean | undefined;
83
+ updated_by?: string | undefined;
84
+ payment_method?: "0" | "1" | undefined;
85
+ price?: number | undefined;
86
+ currency_type?: "EUR" | undefined;
87
+ transfers?: "0" | "1" | "2" | "unlimited" | undefined;
88
+ }, {
89
+ code: string;
90
+ name: string;
91
+ agency_ids: string[];
92
+ _id?: string | undefined;
93
+ created_by?: string | null | undefined;
94
+ is_locked?: boolean | undefined;
95
+ updated_by?: string | undefined;
96
+ payment_method?: "0" | "1" | undefined;
97
+ price?: number | undefined;
98
+ currency_type?: "EUR" | undefined;
99
+ transfers?: "0" | "1" | "2" | "unlimited" | undefined;
100
+ }>;
101
+ export declare const UpdateFareSchema: z.ZodObject<{
102
+ _id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
103
+ is_locked: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodBoolean>>>;
104
+ updated_by: z.ZodOptional<z.ZodOptional<z.ZodOptional<z.ZodString>>>;
105
+ code: z.ZodOptional<z.ZodString>;
106
+ name: z.ZodOptional<z.ZodString>;
107
+ payment_method: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodEnum<["0", "1"]>>>>;
108
+ price: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodNumber>>>;
109
+ agency_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
110
+ currency_type: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodEnum<["EUR"]>>>>;
111
+ transfers: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodEnum<["0", "1", "2", "unlimited"]>>>>;
112
+ }, "strip", z.ZodTypeAny, {
113
+ _id?: string | undefined;
114
+ is_locked?: boolean | undefined;
115
+ updated_by?: string | undefined;
116
+ code?: string | undefined;
117
+ name?: string | undefined;
118
+ payment_method?: "0" | "1" | undefined;
119
+ price?: number | undefined;
120
+ agency_ids?: string[] | undefined;
121
+ currency_type?: "EUR" | undefined;
122
+ transfers?: "0" | "1" | "2" | "unlimited" | undefined;
123
+ }, {
124
+ _id?: string | undefined;
125
+ is_locked?: boolean | undefined;
126
+ updated_by?: string | undefined;
127
+ code?: string | undefined;
128
+ name?: string | undefined;
129
+ payment_method?: "0" | "1" | undefined;
130
+ price?: number | undefined;
131
+ agency_ids?: string[] | undefined;
132
+ currency_type?: "EUR" | undefined;
133
+ transfers?: "0" | "1" | "2" | "unlimited" | undefined;
134
+ }>;
135
+ export type Fare = z.infer<typeof FareSchema>;
136
+ export type CreateFareDto = z.infer<typeof CreateFareSchema>;
137
+ export type UpdateFareDto = z.infer<typeof UpdateFareSchema>;
@@ -0,0 +1,44 @@
1
+ /* * */
2
+ import { DocumentSchema } from '../_common/document.js';
3
+ import { z } from 'zod';
4
+ /* * */
5
+ export const FARE_PAYMENT_METHOD = {
6
+ ONBOARD: '0',
7
+ PREPAID: '1',
8
+ };
9
+ export const FARE_TRANSFERS = {
10
+ NONE: '0',
11
+ ONE: '1',
12
+ TWO: '2',
13
+ UNLIMITED: 'unlimited',
14
+ };
15
+ export const FARE_CURRENCY = {
16
+ EUR: 'EUR',
17
+ };
18
+ /* * */
19
+ export const FareSchema = DocumentSchema.extend({
20
+ agency_ids: z.array(z.string()).min(1, 'At least one agency ID is required'),
21
+ code: z.string().trim().min(1).max(10),
22
+ currency_type: z.enum([FARE_CURRENCY.EUR]).default(FARE_CURRENCY.EUR),
23
+ is_locked: z.boolean().default(false),
24
+ name: z.string().trim().min(1).max(50),
25
+ payment_method: z.enum([FARE_PAYMENT_METHOD.ONBOARD, FARE_PAYMENT_METHOD.PREPAID]).default(FARE_PAYMENT_METHOD.ONBOARD),
26
+ price: z.coerce.number().min(0).default(0),
27
+ transfers: z.enum([FARE_TRANSFERS.NONE, FARE_TRANSFERS.ONE, FARE_TRANSFERS.TWO, FARE_TRANSFERS.UNLIMITED]).default(FARE_TRANSFERS.NONE),
28
+ });
29
+ /* * */
30
+ // Only name, code, and agency_ids are required for creation
31
+ export const CreateFareSchema = z.object({
32
+ agency_ids: FareSchema.shape.agency_ids,
33
+ code: FareSchema.shape.code,
34
+ name: FareSchema.shape.name,
35
+ }).merge(FareSchema.omit({
36
+ agency_ids: true,
37
+ code: true,
38
+ created_at: true,
39
+ name: true,
40
+ updated_at: true,
41
+ }).partial());
42
+ export const UpdateFareSchema = CreateFareSchema
43
+ .omit({ created_by: true })
44
+ .partial();
@@ -0,0 +1,2 @@
1
+ export * from './fare.js';
2
+ export * from './zone.js';
@@ -0,0 +1,2 @@
1
+ export * from './fare.js';
2
+ export * from './zone.js';
@@ -0,0 +1,220 @@
1
+ import { z } from 'zod';
2
+ export declare const ZoneSchema: z.ZodObject<{
3
+ _id: z.ZodString;
4
+ created_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
5
+ created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
6
+ updated_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
7
+ updated_by: z.ZodOptional<z.ZodString>;
8
+ } & {
9
+ agency_ids: z.ZodArray<z.ZodString, "many">;
10
+ code: z.ZodString;
11
+ geojson: z.ZodObject<{
12
+ geometry: z.ZodObject<{
13
+ coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">;
14
+ type: z.ZodLiteral<"Polygon">;
15
+ }, "strip", z.ZodTypeAny, {
16
+ type: "Polygon";
17
+ coordinates: number[][][];
18
+ }, {
19
+ type: "Polygon";
20
+ coordinates: number[][][];
21
+ }>;
22
+ properties: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
23
+ type: z.ZodLiteral<"Feature">;
24
+ }, "strip", z.ZodTypeAny, {
25
+ type: "Feature";
26
+ geometry: {
27
+ type: "Polygon";
28
+ coordinates: number[][][];
29
+ };
30
+ properties?: {} | undefined;
31
+ }, {
32
+ type: "Feature";
33
+ geometry: {
34
+ type: "Polygon";
35
+ coordinates: number[][][];
36
+ };
37
+ properties?: {} | undefined;
38
+ }>;
39
+ is_locked: z.ZodDefault<z.ZodBoolean>;
40
+ name: z.ZodString;
41
+ }, "strip", z.ZodTypeAny, {
42
+ _id: string;
43
+ created_at: number & {
44
+ __brand: "UnixTimestamp";
45
+ };
46
+ created_by: string | null;
47
+ is_locked: boolean;
48
+ updated_at: number & {
49
+ __brand: "UnixTimestamp";
50
+ };
51
+ code: string;
52
+ name: string;
53
+ agency_ids: string[];
54
+ geojson: {
55
+ type: "Feature";
56
+ geometry: {
57
+ type: "Polygon";
58
+ coordinates: number[][][];
59
+ };
60
+ properties?: {} | undefined;
61
+ };
62
+ updated_by?: string | undefined;
63
+ }, {
64
+ _id: string;
65
+ created_at: number;
66
+ updated_at: number;
67
+ code: string;
68
+ name: string;
69
+ agency_ids: string[];
70
+ geojson: {
71
+ type: "Feature";
72
+ geometry: {
73
+ type: "Polygon";
74
+ coordinates: number[][][];
75
+ };
76
+ properties?: {} | undefined;
77
+ };
78
+ created_by?: string | null | undefined;
79
+ is_locked?: boolean | undefined;
80
+ updated_by?: string | undefined;
81
+ }>;
82
+ export declare const CreateZoneSchema: z.ZodObject<{
83
+ agency_ids: z.ZodArray<z.ZodString, "many">;
84
+ code: z.ZodString;
85
+ name: z.ZodString;
86
+ } & {
87
+ _id: z.ZodOptional<z.ZodString>;
88
+ created_by: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
89
+ is_locked: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
90
+ updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>;
91
+ geojson: z.ZodOptional<z.ZodObject<{
92
+ geometry: z.ZodObject<{
93
+ coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">;
94
+ type: z.ZodLiteral<"Polygon">;
95
+ }, "strip", z.ZodTypeAny, {
96
+ type: "Polygon";
97
+ coordinates: number[][][];
98
+ }, {
99
+ type: "Polygon";
100
+ coordinates: number[][][];
101
+ }>;
102
+ properties: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
103
+ type: z.ZodLiteral<"Feature">;
104
+ }, "strip", z.ZodTypeAny, {
105
+ type: "Feature";
106
+ geometry: {
107
+ type: "Polygon";
108
+ coordinates: number[][][];
109
+ };
110
+ properties?: {} | undefined;
111
+ }, {
112
+ type: "Feature";
113
+ geometry: {
114
+ type: "Polygon";
115
+ coordinates: number[][][];
116
+ };
117
+ properties?: {} | undefined;
118
+ }>>;
119
+ }, "strip", z.ZodTypeAny, {
120
+ code: string;
121
+ name: string;
122
+ agency_ids: string[];
123
+ _id?: string | undefined;
124
+ created_by?: string | null | undefined;
125
+ is_locked?: boolean | undefined;
126
+ updated_by?: string | undefined;
127
+ geojson?: {
128
+ type: "Feature";
129
+ geometry: {
130
+ type: "Polygon";
131
+ coordinates: number[][][];
132
+ };
133
+ properties?: {} | undefined;
134
+ } | undefined;
135
+ }, {
136
+ code: string;
137
+ name: string;
138
+ agency_ids: string[];
139
+ _id?: string | undefined;
140
+ created_by?: string | null | undefined;
141
+ is_locked?: boolean | undefined;
142
+ updated_by?: string | undefined;
143
+ geojson?: {
144
+ type: "Feature";
145
+ geometry: {
146
+ type: "Polygon";
147
+ coordinates: number[][][];
148
+ };
149
+ properties?: {} | undefined;
150
+ } | undefined;
151
+ }>;
152
+ export declare const UpdateZoneSchema: z.ZodObject<{
153
+ _id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
154
+ is_locked: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodBoolean>>>;
155
+ updated_by: z.ZodOptional<z.ZodOptional<z.ZodOptional<z.ZodString>>>;
156
+ code: z.ZodOptional<z.ZodString>;
157
+ name: z.ZodOptional<z.ZodString>;
158
+ agency_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
159
+ geojson: z.ZodOptional<z.ZodOptional<z.ZodObject<{
160
+ geometry: z.ZodObject<{
161
+ coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">, "many">;
162
+ type: z.ZodLiteral<"Polygon">;
163
+ }, "strip", z.ZodTypeAny, {
164
+ type: "Polygon";
165
+ coordinates: number[][][];
166
+ }, {
167
+ type: "Polygon";
168
+ coordinates: number[][][];
169
+ }>;
170
+ properties: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
171
+ type: z.ZodLiteral<"Feature">;
172
+ }, "strip", z.ZodTypeAny, {
173
+ type: "Feature";
174
+ geometry: {
175
+ type: "Polygon";
176
+ coordinates: number[][][];
177
+ };
178
+ properties?: {} | undefined;
179
+ }, {
180
+ type: "Feature";
181
+ geometry: {
182
+ type: "Polygon";
183
+ coordinates: number[][][];
184
+ };
185
+ properties?: {} | undefined;
186
+ }>>>;
187
+ }, "strip", z.ZodTypeAny, {
188
+ _id?: string | undefined;
189
+ is_locked?: boolean | undefined;
190
+ updated_by?: string | undefined;
191
+ code?: string | undefined;
192
+ name?: string | undefined;
193
+ agency_ids?: string[] | undefined;
194
+ geojson?: {
195
+ type: "Feature";
196
+ geometry: {
197
+ type: "Polygon";
198
+ coordinates: number[][][];
199
+ };
200
+ properties?: {} | undefined;
201
+ } | undefined;
202
+ }, {
203
+ _id?: string | undefined;
204
+ is_locked?: boolean | undefined;
205
+ updated_by?: string | undefined;
206
+ code?: string | undefined;
207
+ name?: string | undefined;
208
+ agency_ids?: string[] | undefined;
209
+ geojson?: {
210
+ type: "Feature";
211
+ geometry: {
212
+ type: "Polygon";
213
+ coordinates: number[][][];
214
+ };
215
+ properties?: {} | undefined;
216
+ } | undefined;
217
+ }>;
218
+ export type Zone = z.infer<typeof ZoneSchema>;
219
+ export type CreateZoneDto = z.infer<typeof CreateZoneSchema>;
220
+ export type UpdateZoneDto = z.infer<typeof UpdateZoneSchema>;
@@ -0,0 +1,34 @@
1
+ /* * */
2
+ import { DocumentSchema } from '../_common/document.js';
3
+ import { z } from 'zod';
4
+ /* * */
5
+ export const ZoneSchema = DocumentSchema.extend({
6
+ agency_ids: z.array(z.string()).min(1, 'At least one agency ID is required'),
7
+ code: z.string().trim().min(1).max(10),
8
+ geojson: z.object({
9
+ geometry: z.object({
10
+ coordinates: z.array(z.array(z.array(z.number()))).min(1),
11
+ type: z.literal('Polygon'),
12
+ }),
13
+ properties: z.object({}).optional(),
14
+ type: z.literal('Feature'),
15
+ }),
16
+ is_locked: z.boolean().default(false),
17
+ name: z.string().trim().min(1).max(50),
18
+ });
19
+ /* * */
20
+ // Only name, code, and agency_ids are required for creation
21
+ export const CreateZoneSchema = z.object({
22
+ agency_ids: ZoneSchema.shape.agency_ids,
23
+ code: ZoneSchema.shape.code,
24
+ name: ZoneSchema.shape.name,
25
+ }).merge(ZoneSchema.omit({
26
+ agency_ids: true,
27
+ code: true,
28
+ created_at: true,
29
+ name: true,
30
+ updated_at: true,
31
+ }).partial());
32
+ export const UpdateZoneSchema = CreateZoneSchema
33
+ .omit({ created_by: true })
34
+ .partial();
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const VehicleEmissionSchema: z.ZodEnum<["EURO_I", "EURO_II", "EURO_III", "EURO_IV", "EURO_V", "EURO_VI"]>;
3
+ export type VehicleEmission = z.infer<typeof VehicleEmissionSchema>;
@@ -0,0 +1,12 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ const VehicleEmissionValues = [
5
+ 'EURO_I',
6
+ 'EURO_II',
7
+ 'EURO_III',
8
+ 'EURO_IV',
9
+ 'EURO_V',
10
+ 'EURO_VI',
11
+ ];
12
+ export const VehicleEmissionSchema = z.enum(VehicleEmissionValues);
@@ -0,0 +1,4 @@
1
+ export * from './emission.js';
2
+ export * from './propulsion.js';
3
+ export * from './vehicle.js';
4
+ export * from './wheelchair.js';
@@ -0,0 +1,4 @@
1
+ export * from './emission.js';
2
+ export * from './propulsion.js';
3
+ export * from './vehicle.js';
4
+ export * from './wheelchair.js';
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const VehiclePropulsionSchema: z.ZodEnum<["gasoline", "diesel", "lpg_auto", "mixture", "biodiesel", "electricity", "hybrid", "natural_gas"]>;
3
+ export type VehiclePropulsion = z.infer<typeof VehiclePropulsionSchema>;
@@ -0,0 +1,14 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ const VehiclePropulsionValues = [
5
+ 'gasoline',
6
+ 'diesel',
7
+ 'lpg_auto',
8
+ 'mixture',
9
+ 'biodiesel',
10
+ 'electricity',
11
+ 'hybrid',
12
+ 'natural_gas',
13
+ ];
14
+ export const VehiclePropulsionSchema = z.enum(VehiclePropulsionValues);
@@ -0,0 +1,189 @@
1
+ import { z } from 'zod';
2
+ export declare const vehicleSchema: z.ZodObject<{
3
+ _id: z.ZodString;
4
+ created_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
5
+ created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
6
+ is_locked: z.ZodDefault<z.ZodBoolean>;
7
+ updated_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
8
+ updated_by: z.ZodOptional<z.ZodString>;
9
+ } & {
10
+ agency_id: z.ZodString;
11
+ bikes_allowed: z.ZodDefault<z.ZodBoolean>;
12
+ capacity_seated: z.ZodNumber;
13
+ capacity_standing: z.ZodNumber;
14
+ contactless: z.ZodDefault<z.ZodBoolean>;
15
+ emission_class: z.ZodString;
16
+ license_plate: z.ZodString;
17
+ make: z.ZodString;
18
+ model: z.ZodString;
19
+ owner: z.ZodString;
20
+ passenger_counting: z.ZodDefault<z.ZodBoolean>;
21
+ propulsion: z.ZodString;
22
+ registration_date: z.ZodString;
23
+ wheelchair_acessible: z.ZodString;
24
+ }, "strip", z.ZodTypeAny, {
25
+ _id: string;
26
+ created_at: number & {
27
+ __brand: "UnixTimestamp";
28
+ };
29
+ created_by: string | null;
30
+ is_locked: boolean;
31
+ updated_at: number & {
32
+ __brand: "UnixTimestamp";
33
+ };
34
+ agency_id: string;
35
+ bikes_allowed: boolean;
36
+ capacity_seated: number;
37
+ capacity_standing: number;
38
+ contactless: boolean;
39
+ emission_class: string;
40
+ license_plate: string;
41
+ make: string;
42
+ model: string;
43
+ owner: string;
44
+ passenger_counting: boolean;
45
+ propulsion: string;
46
+ registration_date: string;
47
+ wheelchair_acessible: string;
48
+ updated_by?: string | undefined;
49
+ }, {
50
+ _id: string;
51
+ created_at: number;
52
+ updated_at: number;
53
+ agency_id: string;
54
+ capacity_seated: number;
55
+ capacity_standing: number;
56
+ emission_class: string;
57
+ license_plate: string;
58
+ make: string;
59
+ model: string;
60
+ owner: string;
61
+ propulsion: string;
62
+ registration_date: string;
63
+ wheelchair_acessible: string;
64
+ created_by?: string | null | undefined;
65
+ is_locked?: boolean | undefined;
66
+ updated_by?: string | undefined;
67
+ bikes_allowed?: boolean | undefined;
68
+ contactless?: boolean | undefined;
69
+ passenger_counting?: boolean | undefined;
70
+ }>;
71
+ export declare const CreateVehicleSchema: z.ZodObject<Omit<{
72
+ _id: z.ZodString;
73
+ created_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
74
+ created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
75
+ is_locked: z.ZodDefault<z.ZodBoolean>;
76
+ updated_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
77
+ updated_by: z.ZodOptional<z.ZodString>;
78
+ } & {
79
+ agency_id: z.ZodString;
80
+ bikes_allowed: z.ZodDefault<z.ZodBoolean>;
81
+ capacity_seated: z.ZodNumber;
82
+ capacity_standing: z.ZodNumber;
83
+ contactless: z.ZodDefault<z.ZodBoolean>;
84
+ emission_class: z.ZodString;
85
+ license_plate: z.ZodString;
86
+ make: z.ZodString;
87
+ model: z.ZodString;
88
+ owner: z.ZodString;
89
+ passenger_counting: z.ZodDefault<z.ZodBoolean>;
90
+ propulsion: z.ZodString;
91
+ registration_date: z.ZodString;
92
+ wheelchair_acessible: z.ZodString;
93
+ }, "created_at" | "updated_at">, "strip", z.ZodTypeAny, {
94
+ _id: string;
95
+ created_by: string | null;
96
+ is_locked: boolean;
97
+ agency_id: string;
98
+ bikes_allowed: boolean;
99
+ capacity_seated: number;
100
+ capacity_standing: number;
101
+ contactless: boolean;
102
+ emission_class: string;
103
+ license_plate: string;
104
+ make: string;
105
+ model: string;
106
+ owner: string;
107
+ passenger_counting: boolean;
108
+ propulsion: string;
109
+ registration_date: string;
110
+ wheelchair_acessible: string;
111
+ updated_by?: string | undefined;
112
+ }, {
113
+ _id: string;
114
+ agency_id: string;
115
+ capacity_seated: number;
116
+ capacity_standing: number;
117
+ emission_class: string;
118
+ license_plate: string;
119
+ make: string;
120
+ model: string;
121
+ owner: string;
122
+ propulsion: string;
123
+ registration_date: string;
124
+ wheelchair_acessible: string;
125
+ created_by?: string | null | undefined;
126
+ is_locked?: boolean | undefined;
127
+ updated_by?: string | undefined;
128
+ bikes_allowed?: boolean | undefined;
129
+ contactless?: boolean | undefined;
130
+ passenger_counting?: boolean | undefined;
131
+ }>;
132
+ export declare const UpdateVehicleSchema: z.ZodObject<{
133
+ _id: z.ZodOptional<z.ZodString>;
134
+ is_locked: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
135
+ updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>;
136
+ agency_id: z.ZodOptional<z.ZodString>;
137
+ bikes_allowed: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
138
+ capacity_seated: z.ZodOptional<z.ZodNumber>;
139
+ capacity_standing: z.ZodOptional<z.ZodNumber>;
140
+ contactless: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
141
+ emission_class: z.ZodOptional<z.ZodString>;
142
+ license_plate: z.ZodOptional<z.ZodString>;
143
+ make: z.ZodOptional<z.ZodString>;
144
+ model: z.ZodOptional<z.ZodString>;
145
+ owner: z.ZodOptional<z.ZodString>;
146
+ passenger_counting: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
147
+ propulsion: z.ZodOptional<z.ZodString>;
148
+ registration_date: z.ZodOptional<z.ZodString>;
149
+ wheelchair_acessible: z.ZodOptional<z.ZodString>;
150
+ }, "strip", z.ZodTypeAny, {
151
+ _id?: string | undefined;
152
+ is_locked?: boolean | undefined;
153
+ updated_by?: string | undefined;
154
+ agency_id?: string | undefined;
155
+ bikes_allowed?: boolean | undefined;
156
+ capacity_seated?: number | undefined;
157
+ capacity_standing?: number | undefined;
158
+ contactless?: boolean | undefined;
159
+ emission_class?: string | undefined;
160
+ license_plate?: string | undefined;
161
+ make?: string | undefined;
162
+ model?: string | undefined;
163
+ owner?: string | undefined;
164
+ passenger_counting?: boolean | undefined;
165
+ propulsion?: string | undefined;
166
+ registration_date?: string | undefined;
167
+ wheelchair_acessible?: string | undefined;
168
+ }, {
169
+ _id?: string | undefined;
170
+ is_locked?: boolean | undefined;
171
+ updated_by?: string | undefined;
172
+ agency_id?: string | undefined;
173
+ bikes_allowed?: boolean | undefined;
174
+ capacity_seated?: number | undefined;
175
+ capacity_standing?: number | undefined;
176
+ contactless?: boolean | undefined;
177
+ emission_class?: string | undefined;
178
+ license_plate?: string | undefined;
179
+ make?: string | undefined;
180
+ model?: string | undefined;
181
+ owner?: string | undefined;
182
+ passenger_counting?: boolean | undefined;
183
+ propulsion?: string | undefined;
184
+ registration_date?: string | undefined;
185
+ wheelchair_acessible?: string | undefined;
186
+ }>;
187
+ export type Vehicle = z.infer<typeof vehicleSchema>;
188
+ export type CreateVehicleDto = z.infer<typeof CreateVehicleSchema>;
189
+ export type UpdateVehicleDto = z.infer<typeof UpdateVehicleSchema>;