@tmlmobilidade/go-types-gtfs-strict 20260828.1636.54

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 (125) hide show
  1. package/dist/index.d.ts +3 -0
  2. package/dist/index.js +3 -0
  3. package/dist/v29/agency/agency.d.ts +36 -0
  4. package/dist/v29/agency/agency.js +13 -0
  5. package/dist/v29/agency/index.d.ts +1 -0
  6. package/dist/v29/agency/index.js +1 -0
  7. package/dist/v29/calendar-dates/calendar-dates.d.ts +33 -0
  8. package/dist/v29/calendar-dates/calendar-dates.js +14 -0
  9. package/dist/v29/calendar-dates/day-type.d.ts +8 -0
  10. package/dist/v29/calendar-dates/day-type.js +9 -0
  11. package/dist/v29/calendar-dates/index.d.ts +3 -0
  12. package/dist/v29/calendar-dates/index.js +3 -0
  13. package/dist/v29/calendar-dates/period.d.ts +8 -0
  14. package/dist/v29/calendar-dates/period.js +9 -0
  15. package/dist/v29/feed-info/feed-info.d.ts +41 -0
  16. package/dist/v29/feed-info/feed-info.js +15 -0
  17. package/dist/v29/feed-info/index.d.ts +1 -0
  18. package/dist/v29/feed-info/index.js +1 -0
  19. package/dist/v29/index.d.ts +8 -0
  20. package/dist/v29/index.js +8 -0
  21. package/dist/v29/routes/index.d.ts +2 -0
  22. package/dist/v29/routes/index.js +2 -0
  23. package/dist/v29/routes/path-type.d.ts +10 -0
  24. package/dist/v29/routes/path-type.js +9 -0
  25. package/dist/v29/routes/routes.d.ts +69 -0
  26. package/dist/v29/routes/routes.js +26 -0
  27. package/dist/v29/shapes/index.d.ts +1 -0
  28. package/dist/v29/shapes/index.js +1 -0
  29. package/dist/v29/shapes/shapes.d.ts +31 -0
  30. package/dist/v29/shapes/shapes.js +12 -0
  31. package/dist/v29/stop-times/index.d.ts +1 -0
  32. package/dist/v29/stop-times/index.js +1 -0
  33. package/dist/v29/stop-times/stop-times.d.ts +45 -0
  34. package/dist/v29/stop-times/stop-times.js +16 -0
  35. package/dist/v29/stops/index.d.ts +1 -0
  36. package/dist/v29/stops/index.js +1 -0
  37. package/dist/v29/stops/stops.d.ts +53 -0
  38. package/dist/v29/stops/stops.js +20 -0
  39. package/dist/v29/trips/index.d.ts +1 -0
  40. package/dist/v29/trips/index.js +1 -0
  41. package/dist/v29/trips/trips.d.ts +48 -0
  42. package/dist/v29/trips/trips.js +18 -0
  43. package/dist/v29-ext/agency/agency.d.ts +36 -0
  44. package/dist/v29-ext/agency/agency.js +13 -0
  45. package/dist/v29-ext/agency/index.d.ts +1 -0
  46. package/dist/v29-ext/agency/index.js +1 -0
  47. package/dist/v29-ext/calendar/calendar.d.ts +45 -0
  48. package/dist/v29-ext/calendar/calendar.js +16 -0
  49. package/dist/v29-ext/calendar/index.d.ts +1 -0
  50. package/dist/v29-ext/calendar/index.js +1 -0
  51. package/dist/v29-ext/calendar-dates/calendar-dates.d.ts +33 -0
  52. package/dist/v29-ext/calendar-dates/calendar-dates.js +14 -0
  53. package/dist/v29-ext/calendar-dates/day-type.d.ts +8 -0
  54. package/dist/v29-ext/calendar-dates/day-type.js +9 -0
  55. package/dist/v29-ext/calendar-dates/index.d.ts +3 -0
  56. package/dist/v29-ext/calendar-dates/index.js +3 -0
  57. package/dist/v29-ext/calendar-dates/period.d.ts +8 -0
  58. package/dist/v29-ext/calendar-dates/period.js +9 -0
  59. package/dist/v29-ext/feed-info/feed-info.d.ts +41 -0
  60. package/dist/v29-ext/feed-info/feed-info.js +15 -0
  61. package/dist/v29-ext/feed-info/index.d.ts +1 -0
  62. package/dist/v29-ext/feed-info/index.js +1 -0
  63. package/dist/v29-ext/index.d.ts +9 -0
  64. package/dist/v29-ext/index.js +9 -0
  65. package/dist/v29-ext/routes/index.d.ts +2 -0
  66. package/dist/v29-ext/routes/index.js +2 -0
  67. package/dist/v29-ext/routes/path-type.d.ts +10 -0
  68. package/dist/v29-ext/routes/path-type.js +9 -0
  69. package/dist/v29-ext/routes/routes.d.ts +69 -0
  70. package/dist/v29-ext/routes/routes.js +26 -0
  71. package/dist/v29-ext/shapes/index.d.ts +1 -0
  72. package/dist/v29-ext/shapes/index.js +1 -0
  73. package/dist/v29-ext/shapes/shapes.d.ts +31 -0
  74. package/dist/v29-ext/shapes/shapes.js +12 -0
  75. package/dist/v29-ext/stop-times/index.d.ts +1 -0
  76. package/dist/v29-ext/stop-times/index.js +1 -0
  77. package/dist/v29-ext/stop-times/stop-times.d.ts +45 -0
  78. package/dist/v29-ext/stop-times/stop-times.js +16 -0
  79. package/dist/v29-ext/stops/index.d.ts +1 -0
  80. package/dist/v29-ext/stops/index.js +1 -0
  81. package/dist/v29-ext/stops/stops.d.ts +53 -0
  82. package/dist/v29-ext/stops/stops.js +20 -0
  83. package/dist/v29-ext/trips/index.d.ts +1 -0
  84. package/dist/v29-ext/trips/index.js +1 -0
  85. package/dist/v29-ext/trips/trips.d.ts +48 -0
  86. package/dist/v29-ext/trips/trips.js +18 -0
  87. package/dist/v30/agency/agency.d.ts +39 -0
  88. package/dist/v30/agency/agency.js +14 -0
  89. package/dist/v30/agency/index.d.ts +1 -0
  90. package/dist/v30/agency/index.js +1 -0
  91. package/dist/v30/calendar/calendar.d.ts +45 -0
  92. package/dist/v30/calendar/calendar.js +16 -0
  93. package/dist/v30/calendar/index.d.ts +1 -0
  94. package/dist/v30/calendar/index.js +1 -0
  95. package/dist/v30/calendar-dates/calendar-dates.d.ts +24 -0
  96. package/dist/v30/calendar-dates/calendar-dates.js +9 -0
  97. package/dist/v30/calendar-dates/index.d.ts +1 -0
  98. package/dist/v30/calendar-dates/index.js +1 -0
  99. package/dist/v30/feed-info/feed-info.d.ts +41 -0
  100. package/dist/v30/feed-info/feed-info.js +15 -0
  101. package/dist/v30/feed-info/index.d.ts +1 -0
  102. package/dist/v30/feed-info/index.js +1 -0
  103. package/dist/v30/index.d.ts +9 -0
  104. package/dist/v30/index.js +9 -0
  105. package/dist/v30/routes/index.d.ts +1 -0
  106. package/dist/v30/routes/index.js +1 -0
  107. package/dist/v30/routes/routes.d.ts +49 -0
  108. package/dist/v30/routes/routes.js +18 -0
  109. package/dist/v30/shapes/index.d.ts +1 -0
  110. package/dist/v30/shapes/index.js +1 -0
  111. package/dist/v30/shapes/shapes.d.ts +31 -0
  112. package/dist/v30/shapes/shapes.js +12 -0
  113. package/dist/v30/stop-times/index.d.ts +1 -0
  114. package/dist/v30/stop-times/index.js +1 -0
  115. package/dist/v30/stop-times/stop-times.d.ts +45 -0
  116. package/dist/v30/stop-times/stop-times.js +16 -0
  117. package/dist/v30/stops/index.d.ts +1 -0
  118. package/dist/v30/stops/index.js +1 -0
  119. package/dist/v30/stops/stops.d.ts +45 -0
  120. package/dist/v30/stops/stops.js +17 -0
  121. package/dist/v30/trips/index.d.ts +1 -0
  122. package/dist/v30/trips/index.js +1 -0
  123. package/dist/v30/trips/trips.d.ts +39 -0
  124. package/dist/v30/trips/trips.js +15 -0
  125. package/package.json +51 -0
@@ -0,0 +1,3 @@
1
+ export * from './v29-ext/index.js';
2
+ export * from './v29/index.js';
3
+ export * from './v30/index.js';
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export * from './v29-ext/index.js';
2
+ export * from './v29/index.js';
3
+ export * from './v30/index.js';
@@ -0,0 +1,36 @@
1
+ import { z } from 'zod';
2
+ export declare const GtfsStrictV29AgencySchema: z.ZodObject<{
3
+ agency_email: z.ZodString;
4
+ agency_fare_url: z.ZodString;
5
+ agency_id: z.ZodString;
6
+ agency_lang: z.ZodString;
7
+ agency_name: z.ZodString;
8
+ agency_phone: z.ZodString;
9
+ agency_timezone: z.ZodString;
10
+ agency_url: z.ZodString;
11
+ }, "strip", z.ZodTypeAny, {
12
+ agency_email: string;
13
+ agency_fare_url: string;
14
+ agency_id: string;
15
+ agency_lang: string;
16
+ agency_name: string;
17
+ agency_phone: string;
18
+ agency_timezone: string;
19
+ agency_url: string;
20
+ }, {
21
+ agency_email: string;
22
+ agency_fare_url: string;
23
+ agency_id: string;
24
+ agency_lang: string;
25
+ agency_name: string;
26
+ agency_phone: string;
27
+ agency_timezone: string;
28
+ agency_url: string;
29
+ }>;
30
+ /**
31
+ * Represents an agency in the custom GTFS strict v1 format.
32
+ * It enforces certain fields that are optional in the standard GTFS format,
33
+ * and add the `agency_code` field to be able to accomodate multiple agencies
34
+ * with the same code, that necessarily must have different `agency_id` values.
35
+ */
36
+ export type GtfsStrictV29Agency = z.infer<typeof GtfsStrictV29AgencySchema>;
@@ -0,0 +1,13 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ export const GtfsStrictV29AgencySchema = z.object({
5
+ agency_email: z.string(),
6
+ agency_fare_url: z.string(),
7
+ agency_id: z.string(),
8
+ agency_lang: z.string(),
9
+ agency_name: z.string(),
10
+ agency_phone: z.string(),
11
+ agency_timezone: z.string(),
12
+ agency_url: z.string(),
13
+ });
@@ -0,0 +1 @@
1
+ export * from './agency.js';
@@ -0,0 +1 @@
1
+ export * from './agency.js';
@@ -0,0 +1,33 @@
1
+ import { z } from 'zod';
2
+ export declare const GtfsStrictV29CalendarDatesSchema: z.ZodObject<{
3
+ date: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("@tmlmobilidade/go-types-gtfs").GtfsDate, string | number>;
4
+ day_type: z.ZodEnum<["1", "2", "3"]>;
5
+ exception_type: z.ZodLiteral<"1">;
6
+ holiday: z.ZodEnum<["0", "1"]>;
7
+ period: z.ZodEnum<["1", "2", "3"]>;
8
+ service_id: z.ZodString;
9
+ }, "strip", z.ZodTypeAny, {
10
+ date: string & {
11
+ __brand: "GtfsDate";
12
+ };
13
+ day_type: "1" | "2" | "3";
14
+ exception_type: "1";
15
+ holiday: "0" | "1";
16
+ period: "1" | "2" | "3";
17
+ service_id: string;
18
+ }, {
19
+ date: string | number;
20
+ day_type: "1" | "2" | "3";
21
+ exception_type: "1";
22
+ holiday: "0" | "1";
23
+ period: "1" | "2" | "3";
24
+ service_id: string;
25
+ }>;
26
+ /**
27
+ * Represents a calendar date exception in the GTFS strict v1 format.
28
+ * A calendar date exception indicates a specific date when a service
29
+ * is either added or removed from the schedule.
30
+ * This is used to override the regular calendar for a specific date.
31
+ * GTFS strict v1 also supports using only this method for defining dates for services.
32
+ */
33
+ export type GtfsStrictV29CalendarDates = z.infer<typeof GtfsStrictV29CalendarDatesSchema>;
@@ -0,0 +1,14 @@
1
+ /* * */
2
+ import { GtfsStrictV29DayTypeSchema } from './day-type.js';
3
+ import { GtfsStrictV29PeriodSchema } from './period.js';
4
+ import { GtfsBinarySchema, GtfsDateSchema } from '@tmlmobilidade/go-types-gtfs';
5
+ import { z } from 'zod';
6
+ /* * */
7
+ export const GtfsStrictV29CalendarDatesSchema = z.object({
8
+ date: GtfsDateSchema,
9
+ day_type: GtfsStrictV29DayTypeSchema,
10
+ exception_type: z.literal('1'),
11
+ holiday: GtfsBinarySchema,
12
+ period: GtfsStrictV29PeriodSchema,
13
+ service_id: z.string(),
14
+ });
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ export declare const GtfsStrictV29DayTypeValues: readonly ["1", "2", "3"];
3
+ export declare const GtfsStrictV29DayTypeSchema: z.ZodEnum<["1", "2", "3"]>;
4
+ /**
5
+ * Represents the type of day for a service in the GTFS strict v1 format.
6
+ * The day type indicates whether a service is a weekday, Saturday, or Sunday or Holiday.
7
+ */
8
+ export type GtfsStrictV29DayType = z.infer<typeof GtfsStrictV29DayTypeSchema>;
@@ -0,0 +1,9 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ export const GtfsStrictV29DayTypeValues = [
5
+ '1', // Weekday
6
+ '2', // Saturday
7
+ '3', // Sunday or Holiday
8
+ ];
9
+ export const GtfsStrictV29DayTypeSchema = z.enum(GtfsStrictV29DayTypeValues);
@@ -0,0 +1,3 @@
1
+ export * from './calendar-dates.js';
2
+ export * from './day-type.js';
3
+ export * from './period.js';
@@ -0,0 +1,3 @@
1
+ export * from './calendar-dates.js';
2
+ export * from './day-type.js';
3
+ export * from './period.js';
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ export declare const GtfsStrictV29PeriodValues: readonly ["1", "2", "3"];
3
+ export declare const GtfsStrictV29PeriodSchema: z.ZodEnum<["1", "2", "3"]>;
4
+ /**
5
+ * Represents the period of a service in the GTFS strict v1 format.
6
+ * The period indicates similar days in the year, like Summer Time or Winter Time.
7
+ */
8
+ export type GtfsStrictV29Period = z.infer<typeof GtfsStrictV29PeriodSchema>;
@@ -0,0 +1,9 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ export const GtfsStrictV29PeriodValues = [
5
+ '1', // School Period
6
+ '2', // School Holidays
7
+ '3', // Summer Period
8
+ ];
9
+ export const GtfsStrictV29PeriodSchema = z.enum(GtfsStrictV29PeriodValues);
@@ -0,0 +1,41 @@
1
+ import { z } from 'zod';
2
+ export declare const GtfsStrictV29FeedInfoSchema: z.ZodObject<{
3
+ default_lang: z.ZodString;
4
+ feed_contact_email: z.ZodString;
5
+ feed_contact_url: z.ZodString;
6
+ feed_end_date: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("@tmlmobilidade/go-types-gtfs").GtfsDate, string | number>;
7
+ feed_lang: z.ZodString;
8
+ feed_publisher_name: z.ZodString;
9
+ feed_publisher_url: z.ZodString;
10
+ feed_start_date: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("@tmlmobilidade/go-types-gtfs").GtfsDate, string | number>;
11
+ feed_version: z.ZodString;
12
+ }, "strip", z.ZodTypeAny, {
13
+ default_lang: string;
14
+ feed_contact_email: string;
15
+ feed_contact_url: string;
16
+ feed_end_date: string & {
17
+ __brand: "GtfsDate";
18
+ };
19
+ feed_lang: string;
20
+ feed_publisher_name: string;
21
+ feed_publisher_url: string;
22
+ feed_start_date: string & {
23
+ __brand: "GtfsDate";
24
+ };
25
+ feed_version: string;
26
+ }, {
27
+ default_lang: string;
28
+ feed_contact_email: string;
29
+ feed_contact_url: string;
30
+ feed_end_date: string | number;
31
+ feed_lang: string;
32
+ feed_publisher_name: string;
33
+ feed_publisher_url: string;
34
+ feed_start_date: string | number;
35
+ feed_version: string;
36
+ }>;
37
+ /**
38
+ * Represents a feed info in the custom GTFS strict v1 format.
39
+ * It enforces certain fields that are optional in the standard GTFS format.
40
+ */
41
+ export type GtfsStrictV29FeedInfo = z.infer<typeof GtfsStrictV29FeedInfoSchema>;
@@ -0,0 +1,15 @@
1
+ /* * */
2
+ import { GtfsDateSchema } from '@tmlmobilidade/go-types-gtfs';
3
+ import { z } from 'zod';
4
+ /* * */
5
+ export const GtfsStrictV29FeedInfoSchema = z.object({
6
+ default_lang: z.string(),
7
+ feed_contact_email: z.string(),
8
+ feed_contact_url: z.string(),
9
+ feed_end_date: GtfsDateSchema,
10
+ feed_lang: z.string(),
11
+ feed_publisher_name: z.string(),
12
+ feed_publisher_url: z.string(),
13
+ feed_start_date: GtfsDateSchema,
14
+ feed_version: z.string(),
15
+ });
@@ -0,0 +1 @@
1
+ export * from './feed-info.js';
@@ -0,0 +1 @@
1
+ export * from './feed-info.js';
@@ -0,0 +1,8 @@
1
+ export * from './agency/index.js';
2
+ export * from './calendar-dates/index.js';
3
+ export * from './feed-info/index.js';
4
+ export * from './routes/index.js';
5
+ export * from './shapes/index.js';
6
+ export * from './stop-times/index.js';
7
+ export * from './stops/index.js';
8
+ export * from './trips/index.js';
@@ -0,0 +1,8 @@
1
+ export * from './agency/index.js';
2
+ export * from './calendar-dates/index.js';
3
+ export * from './feed-info/index.js';
4
+ export * from './routes/index.js';
5
+ export * from './shapes/index.js';
6
+ export * from './stop-times/index.js';
7
+ export * from './stops/index.js';
8
+ export * from './trips/index.js';
@@ -0,0 +1,2 @@
1
+ export * from './path-type.js';
2
+ export * from './routes.js';
@@ -0,0 +1,2 @@
1
+ export * from './path-type.js';
2
+ export * from './routes.js';
@@ -0,0 +1,10 @@
1
+ import { z } from 'zod';
2
+ export declare const GtfsStrictV29PathTypeValues: readonly ["1", "2", "3"];
3
+ export declare const GtfsStrictV29PathTypeSchema: z.ZodEnum<["1", "2", "3"]>;
4
+ /**
5
+ * Represents the type of path for a GTFS strict v1 route.
6
+ * This type is used to indicate whether the path is a base path, a partial path,
7
+ * or a variant path. It is used in the custom GTFS strict v1 format to differentiate
8
+ * between different types of paths for a route.
9
+ */
10
+ export type GtfsStrictV29PathType = z.infer<typeof GtfsStrictV29PathTypeSchema>;
@@ -0,0 +1,9 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ export const GtfsStrictV29PathTypeValues = [
5
+ '1', // Base path. The main path for a route.
6
+ '2', // Partial path. A segment of the base path.
7
+ '3', // Variant path. An alternative path for a route.
8
+ ];
9
+ export const GtfsStrictV29PathTypeSchema = z.enum(GtfsStrictV29PathTypeValues);
@@ -0,0 +1,69 @@
1
+ import { z } from 'zod';
2
+ export declare const GtfsStrictV29RoutesSchema: z.ZodObject<{
3
+ agency_id: z.ZodString;
4
+ circular: z.ZodDefault<z.ZodOptional<z.ZodEnum<["0", "1"]>>>;
5
+ continuous_drop_off: z.ZodDefault<z.ZodOptional<z.ZodDefault<z.ZodEnum<["0", "1", "2", "3"]>>>>;
6
+ continuous_pickup: z.ZodDefault<z.ZodOptional<z.ZodDefault<z.ZodEnum<["0", "1", "2", "3"]>>>>;
7
+ line_id: z.ZodString;
8
+ line_long_name: z.ZodString;
9
+ line_short_name: z.ZodString;
10
+ path_type: z.ZodOptional<z.ZodEnum<["1", "2", "3"]>>;
11
+ route_color: z.ZodString;
12
+ route_desc: z.ZodOptional<z.ZodString>;
13
+ route_destination: z.ZodOptional<z.ZodString>;
14
+ route_id: z.ZodString;
15
+ route_long_name: z.ZodString;
16
+ route_origin: z.ZodOptional<z.ZodString>;
17
+ route_remarks: z.ZodOptional<z.ZodString>;
18
+ route_short_name: z.ZodString;
19
+ route_text_color: z.ZodString;
20
+ route_type: z.ZodEnum<["0", "1", "2", "3", "4", "5", "6", "7", "11", "12"]>;
21
+ school: z.ZodOptional<z.ZodEnum<["0", "1"]>>;
22
+ }, "strip", z.ZodTypeAny, {
23
+ agency_id: string;
24
+ circular: "0" | "1";
25
+ continuous_drop_off: "0" | "1" | "2" | "3";
26
+ continuous_pickup: "0" | "1" | "2" | "3";
27
+ line_id: string;
28
+ line_long_name: string;
29
+ line_short_name: string;
30
+ route_color: string;
31
+ route_id: string;
32
+ route_long_name: string;
33
+ route_short_name: string;
34
+ route_text_color: string;
35
+ route_type: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "11" | "12";
36
+ path_type?: "1" | "2" | "3" | undefined;
37
+ route_desc?: string | undefined;
38
+ route_destination?: string | undefined;
39
+ route_origin?: string | undefined;
40
+ route_remarks?: string | undefined;
41
+ school?: "0" | "1" | undefined;
42
+ }, {
43
+ agency_id: string;
44
+ line_id: string;
45
+ line_long_name: string;
46
+ line_short_name: string;
47
+ route_color: string;
48
+ route_id: string;
49
+ route_long_name: string;
50
+ route_short_name: string;
51
+ route_text_color: string;
52
+ route_type: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "11" | "12";
53
+ circular?: "0" | "1" | undefined;
54
+ continuous_drop_off?: "0" | "1" | "2" | "3" | undefined;
55
+ continuous_pickup?: "0" | "1" | "2" | "3" | undefined;
56
+ path_type?: "1" | "2" | "3" | undefined;
57
+ route_desc?: string | undefined;
58
+ route_destination?: string | undefined;
59
+ route_origin?: string | undefined;
60
+ route_remarks?: string | undefined;
61
+ school?: "0" | "1" | undefined;
62
+ }>;
63
+ /**
64
+ * Represents a route in the custom GTFS strict v1 format.
65
+ * It enforces certain fields that are optional in the standard GTFS format,
66
+ * and adds the `continuous_drop_off` and `continuous_pickup` fields to be able to
67
+ * accomodate multiple pickup and drop-off types for the same route.
68
+ */
69
+ export type GtfsStrictV29Routes = z.infer<typeof GtfsStrictV29RoutesSchema>;
@@ -0,0 +1,26 @@
1
+ /* * */
2
+ import { GtfsStrictV29PathTypeSchema } from './path-type.js';
3
+ import { GtfsBinarySchema, GtfsPickupDropoffTypeSchema, GtfsRouteTypeSchema } from '@tmlmobilidade/go-types-gtfs';
4
+ import { z } from 'zod';
5
+ /* * */
6
+ export const GtfsStrictV29RoutesSchema = z.object({
7
+ agency_id: z.string(),
8
+ circular: GtfsBinarySchema.optional().default('0'),
9
+ continuous_drop_off: GtfsPickupDropoffTypeSchema.optional().default('1'),
10
+ continuous_pickup: GtfsPickupDropoffTypeSchema.optional().default('1'),
11
+ line_id: z.string(),
12
+ line_long_name: z.string(),
13
+ line_short_name: z.string(),
14
+ path_type: GtfsStrictV29PathTypeSchema.optional(),
15
+ route_color: z.string(),
16
+ route_desc: z.string().optional(),
17
+ route_destination: z.string().optional(),
18
+ route_id: z.string(),
19
+ route_long_name: z.string(),
20
+ route_origin: z.string().optional(),
21
+ route_remarks: z.string().optional(),
22
+ route_short_name: z.string(),
23
+ route_text_color: z.string(),
24
+ route_type: GtfsRouteTypeSchema,
25
+ school: GtfsBinarySchema.optional(),
26
+ });
@@ -0,0 +1 @@
1
+ export * from './shapes.js';
@@ -0,0 +1 @@
1
+ export * from './shapes.js';
@@ -0,0 +1,31 @@
1
+ import { z } from 'zod';
2
+ export declare const GtfsStrictV29ShapesSchema: z.ZodObject<{
3
+ shape_dist_traveled: z.ZodNumber;
4
+ shape_id: z.ZodString;
5
+ shape_pt_lat: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-geo").Latitude, number>;
6
+ shape_pt_lon: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-geo").Longitude, number>;
7
+ shape_pt_sequence: z.ZodNumber;
8
+ }, "strip", z.ZodTypeAny, {
9
+ shape_dist_traveled: number;
10
+ shape_id: string;
11
+ shape_pt_lat: number & {
12
+ __brand: "Latitude";
13
+ };
14
+ shape_pt_lon: number & {
15
+ __brand: "Longitude";
16
+ };
17
+ shape_pt_sequence: number;
18
+ }, {
19
+ shape_dist_traveled: number;
20
+ shape_id: string;
21
+ shape_pt_lat: number;
22
+ shape_pt_lon: number;
23
+ shape_pt_sequence: number;
24
+ }>;
25
+ /**
26
+ * Represents a shape in the GTFS format.
27
+ * A shape is a series of points that define the path of a route.
28
+ * It includes information such as the shape ID, the distance traveled,
29
+ * and the latitude and longitude of the points.
30
+ */
31
+ export type GtfsStrictV29Shapes = z.infer<typeof GtfsStrictV29ShapesSchema>;
@@ -0,0 +1,12 @@
1
+ /* * */
2
+ import { LatitudeSchema, LongitudeSchema } from '@tmlmobilidade/go-types-geo';
3
+ import { NonNegativeFloatSchema, NonNegativeIntegerSchema } from '@tmlmobilidade/go-types-shared';
4
+ import { z } from 'zod';
5
+ /* * */
6
+ export const GtfsStrictV29ShapesSchema = z.object({
7
+ shape_dist_traveled: NonNegativeFloatSchema,
8
+ shape_id: z.string(),
9
+ shape_pt_lat: LatitudeSchema,
10
+ shape_pt_lon: LongitudeSchema,
11
+ shape_pt_sequence: NonNegativeIntegerSchema,
12
+ });
@@ -0,0 +1 @@
1
+ export * from './stop-times.js';
@@ -0,0 +1 @@
1
+ export * from './stop-times.js';
@@ -0,0 +1,45 @@
1
+ import { z } from 'zod';
2
+ export declare const GtfsStrictV29StopTimesSchema: z.ZodObject<{
3
+ arrival_time: z.ZodEffects<z.ZodString, import("@tmlmobilidade/go-types-gtfs").GtfsTime, string>;
4
+ departure_time: z.ZodEffects<z.ZodString, import("@tmlmobilidade/go-types-gtfs").GtfsTime, string>;
5
+ drop_off_type: z.ZodDefault<z.ZodEnum<["0", "1", "2", "3"]>>;
6
+ pickup_type: z.ZodDefault<z.ZodEnum<["0", "1", "2", "3"]>>;
7
+ shape_dist_traveled: z.ZodNumber;
8
+ stop_id: z.ZodString;
9
+ stop_sequence: z.ZodNumber;
10
+ timepoint: z.ZodEnum<["0", "1"]>;
11
+ trip_id: z.ZodString;
12
+ }, "strip", z.ZodTypeAny, {
13
+ shape_dist_traveled: number;
14
+ arrival_time: string & {
15
+ __brand: "GtfsTime";
16
+ };
17
+ departure_time: string & {
18
+ __brand: "GtfsTime";
19
+ };
20
+ drop_off_type: "0" | "1" | "2" | "3";
21
+ pickup_type: "0" | "1" | "2" | "3";
22
+ stop_id: string;
23
+ stop_sequence: number;
24
+ timepoint: "0" | "1";
25
+ trip_id: string;
26
+ }, {
27
+ shape_dist_traveled: number;
28
+ arrival_time: string;
29
+ departure_time: string;
30
+ stop_id: string;
31
+ stop_sequence: number;
32
+ timepoint: "0" | "1";
33
+ trip_id: string;
34
+ drop_off_type?: "0" | "1" | "2" | "3" | undefined;
35
+ pickup_type?: "0" | "1" | "2" | "3" | undefined;
36
+ }>;
37
+ /**
38
+ * Represents a stop time in the custom GTFS strict v29 format.
39
+ * A stop time is a record of when a transit vehicle arrives at and departs from a specific stop.
40
+ * It includes information such as the arrival and departure times, the stop ID, the trip ID,
41
+ * and various pickup and drop-off types. This information is crucial for scheduling and
42
+ * coordinating transit services, allowing passengers to know when a vehicle will be at a particular stop
43
+ * and what type of service is available at that stop.
44
+ */
45
+ export type GtfsStrictV29StopTimes = z.infer<typeof GtfsStrictV29StopTimesSchema>;
@@ -0,0 +1,16 @@
1
+ /* * */
2
+ import { GtfsBinarySchema, GtfsPickupDropoffTypeSchema, GtfsTimeSchema } from '@tmlmobilidade/go-types-gtfs';
3
+ import { NonNegativeFloatSchema, NonNegativeIntegerSchema } from '@tmlmobilidade/go-types-shared';
4
+ import { z } from 'zod';
5
+ /* * */
6
+ export const GtfsStrictV29StopTimesSchema = z.object({
7
+ arrival_time: GtfsTimeSchema,
8
+ departure_time: GtfsTimeSchema,
9
+ drop_off_type: GtfsPickupDropoffTypeSchema,
10
+ pickup_type: GtfsPickupDropoffTypeSchema,
11
+ shape_dist_traveled: NonNegativeFloatSchema,
12
+ stop_id: z.string(),
13
+ stop_sequence: NonNegativeIntegerSchema,
14
+ timepoint: GtfsBinarySchema,
15
+ trip_id: z.string(),
16
+ });
@@ -0,0 +1 @@
1
+ export * from './stops.js';
@@ -0,0 +1 @@
1
+ export * from './stops.js';
@@ -0,0 +1,53 @@
1
+ import { z } from 'zod';
2
+ export declare const GtfsStrictV29StopsSchema: z.ZodObject<{
3
+ level_id: z.ZodOptional<z.ZodString>;
4
+ location_type: z.ZodEnum<["0", "1", "2", "3", "4"]>;
5
+ parent_station: z.ZodOptional<z.ZodString>;
6
+ platform_code: z.ZodOptional<z.ZodString>;
7
+ stop_code: z.ZodString;
8
+ stop_desc: z.ZodOptional<z.ZodString>;
9
+ stop_id: z.ZodString;
10
+ stop_lat: z.ZodNumber;
11
+ stop_lon: z.ZodNumber;
12
+ stop_name: z.ZodString;
13
+ stop_timezone: z.ZodOptional<z.ZodString>;
14
+ stop_url: z.ZodOptional<z.ZodString>;
15
+ wheelchair_boarding: z.ZodOptional<z.ZodEnum<["0", "1", "2"]>>;
16
+ zone_id: z.ZodOptional<z.ZodString>;
17
+ }, "strip", z.ZodTypeAny, {
18
+ stop_id: string;
19
+ location_type: "0" | "1" | "2" | "3" | "4";
20
+ stop_code: string;
21
+ stop_lat: number;
22
+ stop_lon: number;
23
+ stop_name: string;
24
+ level_id?: string | undefined;
25
+ parent_station?: string | undefined;
26
+ platform_code?: string | undefined;
27
+ stop_desc?: string | undefined;
28
+ stop_timezone?: string | undefined;
29
+ stop_url?: string | undefined;
30
+ wheelchair_boarding?: "0" | "1" | "2" | undefined;
31
+ zone_id?: string | undefined;
32
+ }, {
33
+ stop_id: string;
34
+ location_type: "0" | "1" | "2" | "3" | "4";
35
+ stop_code: string;
36
+ stop_lat: number;
37
+ stop_lon: number;
38
+ stop_name: string;
39
+ level_id?: string | undefined;
40
+ parent_station?: string | undefined;
41
+ platform_code?: string | undefined;
42
+ stop_desc?: string | undefined;
43
+ stop_timezone?: string | undefined;
44
+ stop_url?: string | undefined;
45
+ wheelchair_boarding?: "0" | "1" | "2" | undefined;
46
+ zone_id?: string | undefined;
47
+ }>;
48
+ /**
49
+ * Represents a stop in the GTFS format.
50
+ * A stop is a physical location where passengers can board or alight from a transit vehicle.
51
+ * It includes information such as the stop ID, name, location, and type of service.
52
+ */
53
+ export type GtfsStrictV29Stops = z.infer<typeof GtfsStrictV29StopsSchema>;
@@ -0,0 +1,20 @@
1
+ /* * */
2
+ import { GtfsLocationTypeSchema, GtfsTernarySchema } from '@tmlmobilidade/go-types-gtfs';
3
+ import { z } from 'zod';
4
+ /* * */
5
+ export const GtfsStrictV29StopsSchema = z.object({
6
+ level_id: z.string().optional(),
7
+ location_type: GtfsLocationTypeSchema,
8
+ parent_station: z.string().optional(),
9
+ platform_code: z.string().optional(),
10
+ stop_code: z.string(),
11
+ stop_desc: z.string().optional(),
12
+ stop_id: z.string(),
13
+ stop_lat: z.number(),
14
+ stop_lon: z.number(),
15
+ stop_name: z.string(),
16
+ stop_timezone: z.string().optional(),
17
+ stop_url: z.string().optional(),
18
+ wheelchair_boarding: GtfsTernarySchema.optional(),
19
+ zone_id: z.string().optional(),
20
+ });
@@ -0,0 +1 @@
1
+ export * from './trips.js';
@@ -0,0 +1 @@
1
+ export * from './trips.js';
@@ -0,0 +1,48 @@
1
+ import { z } from 'zod';
2
+ export declare const GtfsStrictV29TripsSchema: z.ZodObject<{
3
+ bikes_allowed: z.ZodOptional<z.ZodEnum<["0", "1", "2"]>>;
4
+ block_id: z.ZodOptional<z.ZodString>;
5
+ calendar_desc: z.ZodString;
6
+ direction_id: z.ZodEnum<["0", "1"]>;
7
+ pattern_id: z.ZodString;
8
+ pattern_short_name: z.ZodString;
9
+ route_id: z.ZodString;
10
+ service_id: z.ZodString;
11
+ shape_id: z.ZodString;
12
+ trip_headsign: z.ZodString;
13
+ trip_id: z.ZodString;
14
+ wheelchair_accessible: z.ZodOptional<z.ZodEnum<["0", "1", "2"]>>;
15
+ }, "strip", z.ZodTypeAny, {
16
+ service_id: string;
17
+ route_id: string;
18
+ shape_id: string;
19
+ trip_id: string;
20
+ calendar_desc: string;
21
+ direction_id: "0" | "1";
22
+ pattern_id: string;
23
+ pattern_short_name: string;
24
+ trip_headsign: string;
25
+ bikes_allowed?: "0" | "1" | "2" | undefined;
26
+ block_id?: string | undefined;
27
+ wheelchair_accessible?: "0" | "1" | "2" | undefined;
28
+ }, {
29
+ service_id: string;
30
+ route_id: string;
31
+ shape_id: string;
32
+ trip_id: string;
33
+ calendar_desc: string;
34
+ direction_id: "0" | "1";
35
+ pattern_id: string;
36
+ pattern_short_name: string;
37
+ trip_headsign: string;
38
+ bikes_allowed?: "0" | "1" | "2" | undefined;
39
+ block_id?: string | undefined;
40
+ wheelchair_accessible?: "0" | "1" | "2" | undefined;
41
+ }>;
42
+ /**
43
+ * Represents a trip in the custom GTFS strict v1 format.
44
+ * A trip is the definition of a service of a given route,
45
+ * scheduled to run on specific dates (`service_id`) and times (`stop_times`).
46
+ * It also includes the `calendar_desc`, `pattern_id`, and `pattern_short_name` fields.
47
+ */
48
+ export type GtfsStrictV29Trips = z.infer<typeof GtfsStrictV29TripsSchema>;