@tmlmobilidade/consts 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.
@@ -107,6 +107,25 @@ const APP_CONFIGS = {
107
107
  ...DEFAULT_STAGING_CONFIG,
108
108
  },
109
109
  },
110
+ fleet: {
111
+ development: {
112
+ api_port: 52009,
113
+ api_url: 'http://localhost:52009',
114
+ cors_origin: true,
115
+ frontend_port: 51009,
116
+ frontend_url: 'http://localhost:51009/fleet',
117
+ },
118
+ production: {
119
+ api_url: 'https://go.tmlmobilidade.pt/fleet/api',
120
+ frontend_url: 'https://go.tmlmobilidade.pt/fleet',
121
+ ...DEFAULT_PRODUCTION_CONFIG,
122
+ },
123
+ staging: {
124
+ api_url: 'https://staging.go.tmlmobilidade.pt/fleet/api',
125
+ frontend_url: 'https://staging.go.tmlmobilidade.pt/fleet',
126
+ ...DEFAULT_STAGING_CONFIG,
127
+ },
128
+ },
110
129
  locations: {
111
130
  development: {
112
131
  api_port: 52005,
@@ -126,6 +145,25 @@ const APP_CONFIGS = {
126
145
  ...DEFAULT_STAGING_CONFIG,
127
146
  },
128
147
  },
148
+ offer: {
149
+ development: {
150
+ api_port: 52010,
151
+ api_url: 'http://localhost:52010',
152
+ cors_origin: true,
153
+ frontend_port: 51010,
154
+ frontend_url: 'http://localhost:51010/offer',
155
+ },
156
+ production: {
157
+ api_url: 'https://go.tmlmobilidade.pt/offer/api',
158
+ frontend_url: 'https://go.tmlmobilidade.pt/offer',
159
+ ...DEFAULT_PRODUCTION_CONFIG,
160
+ },
161
+ staging: {
162
+ api_url: 'https://staging.go.tmlmobilidade.pt/offer/api',
163
+ frontend_url: 'https://staging.go.tmlmobilidade.pt/offer',
164
+ ...DEFAULT_STAGING_CONFIG,
165
+ },
166
+ },
129
167
  performance: {
130
168
  development: {
131
169
  api_port: 52006,
@@ -183,6 +221,25 @@ const APP_CONFIGS = {
183
221
  ...DEFAULT_STAGING_CONFIG,
184
222
  },
185
223
  },
224
+ ticketing: {
225
+ development: {
226
+ api_port: 52009,
227
+ api_url: 'http://localhost:52009',
228
+ cors_origin: true,
229
+ frontend_port: 51009,
230
+ frontend_url: 'http://localhost:51009/ticketing',
231
+ },
232
+ production: {
233
+ api_url: 'https://go.tmlmobilidade.pt/ticketing/api',
234
+ frontend_url: 'https://go.tmlmobilidade.pt/ticketing',
235
+ ...DEFAULT_PRODUCTION_CONFIG,
236
+ },
237
+ staging: {
238
+ api_url: 'https://staging.go.tmlmobilidade.pt/ticketing/api',
239
+ frontend_url: 'https://staging.go.tmlmobilidade.pt/ticketing',
240
+ ...DEFAULT_STAGING_CONFIG,
241
+ },
242
+ },
186
243
  };
187
244
  /* * */
188
245
  /**
@@ -5,10 +5,8 @@
5
5
  export declare const PAGE_ROUTES: Readonly<{
6
6
  readonly alerts: {
7
7
  readonly BASE: string;
8
- readonly REALTIME_DETAIL: (id: string) => string;
9
- readonly REALTIME_LIST: `${string}/realtime`;
10
- readonly SCHEDULED_DETAIL: (id: string) => string;
11
- readonly SCHEDULED_LIST: `${string}/scheduled`;
8
+ readonly ALERTS_DETAIL: (id: string) => string;
9
+ readonly ALERTS_LIST: string;
12
10
  };
13
11
  readonly auth: {
14
12
  readonly BASE: string;
@@ -35,6 +33,23 @@ export declare const PAGE_ROUTES: Readonly<{
35
33
  readonly BASE: string;
36
34
  readonly ANNOTATIONS_DETAIL: (id: string) => string;
37
35
  readonly ANNOTATIONS_LIST: `${string}/annotations`;
36
+ readonly CALENDAR_LIST: `${string}/calendar`;
37
+ readonly PERIODS_DETAIL: (id: string) => string;
38
+ readonly PERIODS_LIST: `${string}/periods`;
39
+ };
40
+ readonly fleet: {
41
+ readonly BASE: string;
42
+ readonly VEHICLES_DETAIL: (id: string) => string;
43
+ readonly VEHICLES_LIST: `${string}/vehicles`;
44
+ };
45
+ readonly offer: {
46
+ readonly BASE: string;
47
+ readonly LINES_DETAIL: (id: string) => string;
48
+ readonly LINES_LIST: `${string}/lines`;
49
+ readonly PATTERN_DETAIL: (id: string, patternId: string, routeId: string) => string;
50
+ readonly ROUTE_DETAIL: (id: string, routeId: string) => string;
51
+ readonly TYPOLOGIES_DETAIL: (id: string) => string;
52
+ readonly TYPOLOGIES_LIST: `${string}/typologies`;
38
53
  };
39
54
  readonly performance: {
40
55
  readonly BASE: string;
@@ -56,16 +71,24 @@ export declare const PAGE_ROUTES: Readonly<{
56
71
  readonly STOPS_DETAIL: (id: string) => string;
57
72
  readonly STOPS_LIST: string;
58
73
  };
74
+ readonly ticketing: {
75
+ readonly BASE: string;
76
+ readonly FARES_DETAIL: (id: string) => string;
77
+ readonly FARES_LIST: `${string}/fares`;
78
+ readonly ZONES_DETAIL: (id: string) => string;
79
+ readonly ZONES_LIST: `${string}/zones`;
80
+ };
59
81
  }>;
60
82
  export declare const API_ROUTES: Readonly<{
61
83
  readonly alerts: {
62
84
  readonly BASE: string;
63
85
  readonly ALERTS_DETAIL: (id: string) => string;
64
86
  readonly ALERTS_DETAIL_IMAGE: (id: string) => string;
65
- readonly ALERTS_GTFS: `${string}/alerts/gtfs`;
87
+ readonly ALERTS_DETAIL_LOCK: (id: string) => string;
66
88
  readonly ALERTS_LIST: `${string}/alerts`;
89
+ readonly GTFS_CARRIS_METROPOLITANA: `${string}/gtfs/carris-metropolitana`;
90
+ readonly RIDES_DETAIL_RIDE: (id: string) => string;
67
91
  readonly RIDES_LIST: `${string}/rides`;
68
- readonly RIDES_SELECTED: `${string}/rides/selected`;
69
92
  };
70
93
  readonly auth: {
71
94
  readonly BASE: string;
@@ -119,8 +142,12 @@ export declare const API_ROUTES: Readonly<{
119
142
  readonly dates: {
120
143
  readonly BASE: string;
121
144
  readonly ANNOTATIONS_DETAIL: (id: string) => string;
122
- readonly ANNOTATIONS_DETAIL_TOGGLE_LOCK: (id: string) => string;
145
+ readonly ANNOTATIONS_DETAIL_LOCK: (id: string) => string;
123
146
  readonly ANNOTATIONS_LIST: `${string}/annotations`;
147
+ readonly PERIODS_CHECK_CONFLICTS: `${string}/periods/check-conflicts`;
148
+ readonly PERIODS_DETAIL: (id: string) => string;
149
+ readonly PERIODS_DETAIL_LOCK: (id: string) => string;
150
+ readonly PERIODS_LIST: `${string}/periods`;
124
151
  };
125
152
  readonly exporter: {
126
153
  readonly BASE: string;
@@ -128,6 +155,12 @@ export declare const API_ROUTES: Readonly<{
128
155
  readonly EXPORTER_LIST: `${string}/exporter`;
129
156
  readonly GTFS_MERGED_DOWNLOAD: `${string}/gtfs-merged/download`;
130
157
  };
158
+ readonly fleet: {
159
+ readonly BASE: string;
160
+ readonly VEHICLES_DETAIL: (id: string) => string;
161
+ readonly VEHICLES_DETAIL_LOCK: (id: string) => string;
162
+ readonly VEHICLES_LIST: `${string}/vehicles`;
163
+ };
131
164
  readonly locations: {
132
165
  readonly BASE: string;
133
166
  readonly LOCATIONS_COORDINATES: `${string}/locations/coordinates`;
@@ -136,6 +169,23 @@ export declare const API_ROUTES: Readonly<{
136
169
  readonly LOCATIONS_MUNICIPALITIES: `${string}/locations/municipalities`;
137
170
  readonly LOCATIONS_PARISHES: `${string}/locations/parishes`;
138
171
  };
172
+ readonly offer: {
173
+ readonly BASE: string;
174
+ readonly GTFS_PARSE: `${string}/gtfs/parse`;
175
+ readonly LINES_DETAIL: (id: string) => string;
176
+ readonly LINES_DETAIL_LOCK: (id: string) => string;
177
+ readonly LINES_LIST: `${string}/lines`;
178
+ readonly PATTERNS_DETAIL: (id: string) => string;
179
+ readonly PATTERNS_DETAIL_IMPORT_GTFS: (id: string) => string;
180
+ readonly PATTERNS_DETAIL_LOCK: (id: string) => string;
181
+ readonly PATTERNS_LIST: `${string}/patterns`;
182
+ readonly ROUTES_DETAIL: (id: string) => string;
183
+ readonly ROUTES_DETAIL_LOCK: (id: string) => string;
184
+ readonly ROUTES_LIST: `${string}/routes`;
185
+ readonly TYPOLOGIES_DETAIL: (id: string) => string;
186
+ readonly TYPOLOGIES_DETAIL_LOCK: (id: string) => string;
187
+ readonly TYPOLOGIES_LIST: `${string}/typologies`;
188
+ };
139
189
  readonly performance: {
140
190
  readonly BASE: string;
141
191
  readonly DATES_LIST: `${string}/dates`;
@@ -165,4 +215,13 @@ export declare const API_ROUTES: Readonly<{
165
215
  readonly STOPS_DETAIL_LOCK: (id: string) => string;
166
216
  readonly STOPS_LIST: `${string}/stops`;
167
217
  };
218
+ readonly ticketing: {
219
+ readonly BASE: string;
220
+ readonly FARES_DETAIL: (id: string) => string;
221
+ readonly FARES_DETAIL_LOCK: (id: string) => string;
222
+ readonly FARES_LIST: `${string}/fares`;
223
+ readonly ZONES_DETAIL: (id: string) => string;
224
+ readonly ZONES_DETAIL_LOCK: (id: string) => string;
225
+ readonly ZONES_LIST: `${string}/zones`;
226
+ };
168
227
  }>;
@@ -10,12 +10,9 @@ export const PAGE_ROUTES = Object.freeze({
10
10
  alerts: {
11
11
  // BASE
12
12
  BASE: `${getAppConfig('alerts', 'frontend_url')}`,
13
- // REALTIME
14
- REALTIME_DETAIL: (id) => `${getAppConfig('alerts', 'frontend_url')}/realtime/${id}`,
15
- REALTIME_LIST: `${getAppConfig('alerts', 'frontend_url')}/realtime`,
16
- // SCHEDULED
17
- SCHEDULED_DETAIL: (id) => `${getAppConfig('alerts', 'frontend_url')}/scheduled/${id}`,
18
- SCHEDULED_LIST: `${getAppConfig('alerts', 'frontend_url')}/scheduled`,
13
+ // ALERTS
14
+ ALERTS_DETAIL: (id) => `${getAppConfig('alerts', 'frontend_url')}/${id}`,
15
+ ALERTS_LIST: `${getAppConfig('alerts', 'frontend_url')}`,
19
16
  },
20
17
  /* * */
21
18
  /* AUTH */
@@ -61,6 +58,36 @@ export const PAGE_ROUTES = Object.freeze({
61
58
  // ANNOTATIONS
62
59
  ANNOTATIONS_DETAIL: (id) => `${getAppConfig('dates', 'frontend_url')}/annotations/${id}`,
63
60
  ANNOTATIONS_LIST: `${getAppConfig('dates', 'frontend_url')}/annotations`,
61
+ // CALENDAR
62
+ CALENDAR_LIST: `${getAppConfig('dates', 'frontend_url')}/calendar`,
63
+ // PERIODS
64
+ PERIODS_DETAIL: (id) => `${getAppConfig('dates', 'frontend_url')}/periods/${id}`,
65
+ PERIODS_LIST: `${getAppConfig('dates', 'frontend_url')}/periods`,
66
+ },
67
+ /* * */
68
+ /* FLEET */
69
+ fleet: {
70
+ // BASE
71
+ BASE: `${getAppConfig('fleet', 'frontend_url')}`,
72
+ // VEHICLES
73
+ VEHICLES_DETAIL: (id) => `${getAppConfig('fleet', 'frontend_url')}/vehicles/${id}`,
74
+ VEHICLES_LIST: `${getAppConfig('fleet', 'frontend_url')}/vehicles`,
75
+ },
76
+ /* * */
77
+ /* OFFER */
78
+ offer: {
79
+ // BASE
80
+ BASE: `${getAppConfig('offer', 'frontend_url')}`,
81
+ // LINES
82
+ LINES_DETAIL: (id) => `${getAppConfig('offer', 'frontend_url')}/lines/${id}`,
83
+ LINES_LIST: `${getAppConfig('offer', 'frontend_url')}/lines`,
84
+ // PATTERN
85
+ PATTERN_DETAIL: (id, patternId, routeId) => `${getAppConfig('offer', 'frontend_url')}/lines/${id}/${routeId}/${patternId}`,
86
+ // ROUTE
87
+ ROUTE_DETAIL: (id, routeId) => `${getAppConfig('offer', 'frontend_url')}/lines/${id}/${routeId}`,
88
+ // TYPOLOGIES
89
+ TYPOLOGIES_DETAIL: (id) => `${getAppConfig('offer', 'frontend_url')}/typologies/${id}`,
90
+ TYPOLOGIES_LIST: `${getAppConfig('offer', 'frontend_url')}/typologies`,
64
91
  },
65
92
  /* * */
66
93
  /* PERFORMANCE */
@@ -99,6 +126,18 @@ export const PAGE_ROUTES = Object.freeze({
99
126
  STOPS_DETAIL: (id) => `${getAppConfig('stops', 'frontend_url')}/${id}`,
100
127
  STOPS_LIST: `${getAppConfig('stops', 'frontend_url')}`,
101
128
  },
129
+ /* * */
130
+ /* TICKETING */
131
+ ticketing: {
132
+ // BASE
133
+ BASE: `${getAppConfig('ticketing', 'frontend_url')}`,
134
+ // FARES
135
+ FARES_DETAIL: (id) => `${getAppConfig('ticketing', 'frontend_url')}/fares/${id}`,
136
+ FARES_LIST: `${getAppConfig('ticketing', 'frontend_url')}/fares`,
137
+ // ZONES
138
+ ZONES_DETAIL: (id) => `${getAppConfig('ticketing', 'frontend_url')}/zones/${id}`,
139
+ ZONES_LIST: `${getAppConfig('ticketing', 'frontend_url')}/zones`,
140
+ },
102
141
  });
103
142
  export const API_ROUTES = Object.freeze({
104
143
  /* * */
@@ -109,11 +148,13 @@ export const API_ROUTES = Object.freeze({
109
148
  // ALERTS
110
149
  ALERTS_DETAIL: (id) => `${getAppConfig('alerts', 'api_url')}/alerts/${id}`,
111
150
  ALERTS_DETAIL_IMAGE: (id) => `${getAppConfig('alerts', 'api_url')}/alerts/${id}/image`,
112
- ALERTS_GTFS: `${getAppConfig('alerts', 'api_url')}/alerts/gtfs`,
151
+ ALERTS_DETAIL_LOCK: (id) => `${getAppConfig('alerts', 'api_url')}/alerts/${id}/lock`,
113
152
  ALERTS_LIST: `${getAppConfig('alerts', 'api_url')}/alerts`,
153
+ // GTFS
154
+ GTFS_CARRIS_METROPOLITANA: `${getAppConfig('alerts', 'api_url')}/gtfs/carris-metropolitana`,
114
155
  // RIDES
156
+ RIDES_DETAIL_RIDE: (id) => `${getAppConfig('alerts', 'api_url')}/rides/${id}/ride`,
115
157
  RIDES_LIST: `${getAppConfig('alerts', 'api_url')}/rides`,
116
- RIDES_SELECTED: `${getAppConfig('alerts', 'api_url')}/rides/selected`,
117
158
  },
118
159
  /* * */
119
160
  /* AUTH */
@@ -187,8 +228,13 @@ export const API_ROUTES = Object.freeze({
187
228
  BASE: `${getAppConfig('dates', 'api_url')}`,
188
229
  // ANNOTATIONS
189
230
  ANNOTATIONS_DETAIL: (id) => `${getAppConfig('dates', 'api_url')}/annotations/${id}`,
190
- ANNOTATIONS_DETAIL_TOGGLE_LOCK: (id) => `${getAppConfig('dates', 'api_url')}/annotations/${id}/toggle-lock`,
231
+ ANNOTATIONS_DETAIL_LOCK: (id) => `${getAppConfig('dates', 'api_url')}/annotations/${id}/lock`,
191
232
  ANNOTATIONS_LIST: `${getAppConfig('dates', 'api_url')}/annotations`,
233
+ // PERIODS
234
+ PERIODS_CHECK_CONFLICTS: `${getAppConfig('dates', 'api_url')}/periods/check-conflicts`,
235
+ PERIODS_DETAIL: (id) => `${getAppConfig('dates', 'api_url')}/periods/${id}`,
236
+ PERIODS_DETAIL_LOCK: (id) => `${getAppConfig('dates', 'api_url')}/periods/${id}/lock`,
237
+ PERIODS_LIST: `${getAppConfig('dates', 'api_url')}/periods`,
192
238
  },
193
239
  /* * */
194
240
  /* EXPORTER */
@@ -202,6 +248,16 @@ export const API_ROUTES = Object.freeze({
202
248
  GTFS_MERGED_DOWNLOAD: `${getAppConfig('exporter', 'api_url')}/gtfs-merged/download`,
203
249
  },
204
250
  /* * */
251
+ /* FLEET */
252
+ fleet: {
253
+ // BASE
254
+ BASE: `${getAppConfig('fleet', 'api_url')}`,
255
+ // VEHICLES
256
+ VEHICLES_DETAIL: (id) => `${getAppConfig('fleet', 'api_url')}/vehicles/${id}`,
257
+ VEHICLES_DETAIL_LOCK: (id) => `${getAppConfig('fleet', 'api_url')}/vehicles/${id}/lock`,
258
+ VEHICLES_LIST: `${getAppConfig('fleet', 'api_url')}/vehicles`,
259
+ },
260
+ /* * */
205
261
  /* LOCATIONS */
206
262
  locations: {
207
263
  // BASE
@@ -214,6 +270,31 @@ export const API_ROUTES = Object.freeze({
214
270
  LOCATIONS_PARISHES: `${getAppConfig('locations', 'api_url')}/locations/parishes`,
215
271
  },
216
272
  /* * */
273
+ /* OFFER */
274
+ offer: {
275
+ // BASE
276
+ BASE: `${getAppConfig('offer', 'api_url')}`,
277
+ // GTFS
278
+ GTFS_PARSE: `${getAppConfig('offer', 'api_url')}/gtfs/parse`,
279
+ // LINES
280
+ LINES_DETAIL: (id) => `${getAppConfig('offer', 'api_url')}/lines/${id}`,
281
+ LINES_DETAIL_LOCK: (id) => `${getAppConfig('offer', 'api_url')}/lines/${id}/lock`,
282
+ LINES_LIST: `${getAppConfig('offer', 'api_url')}/lines`,
283
+ // PATTERNS
284
+ PATTERNS_DETAIL: (id) => `${getAppConfig('offer', 'api_url')}/patterns/${id}`,
285
+ PATTERNS_DETAIL_IMPORT_GTFS: (id) => `${getAppConfig('offer', 'api_url')}/patterns/${id}/import-gtfs`,
286
+ PATTERNS_DETAIL_LOCK: (id) => `${getAppConfig('offer', 'api_url')}/patterns/${id}/lock`,
287
+ PATTERNS_LIST: `${getAppConfig('offer', 'api_url')}/patterns`,
288
+ // ROUTES
289
+ ROUTES_DETAIL: (id) => `${getAppConfig('offer', 'api_url')}/routes/${id}`,
290
+ ROUTES_DETAIL_LOCK: (id) => `${getAppConfig('offer', 'api_url')}/routes/${id}/lock`,
291
+ ROUTES_LIST: `${getAppConfig('offer', 'api_url')}/routes`,
292
+ // TYPOLOGIES
293
+ TYPOLOGIES_DETAIL: (id) => `${getAppConfig('offer', 'api_url')}/typologies/${id}`,
294
+ TYPOLOGIES_DETAIL_LOCK: (id) => `${getAppConfig('offer', 'api_url')}/typologies/${id}/lock`,
295
+ TYPOLOGIES_LIST: `${getAppConfig('offer', 'api_url')}/typologies`,
296
+ },
297
+ /* * */
217
298
  /* PERFORMANCE */
218
299
  performance: {
219
300
  // BASE
@@ -257,4 +338,18 @@ export const API_ROUTES = Object.freeze({
257
338
  STOPS_DETAIL_LOCK: (id) => `${getAppConfig('stops', 'api_url')}/stops/${id}/lock`,
258
339
  STOPS_LIST: `${getAppConfig('stops', 'api_url')}/stops`,
259
340
  },
341
+ /* * */
342
+ /* TICKETING */
343
+ ticketing: {
344
+ // BASE
345
+ BASE: `${getAppConfig('ticketing', 'api_url')}`,
346
+ // FARES
347
+ FARES_DETAIL: (id) => `${getAppConfig('ticketing', 'api_url')}/fares/${id}`,
348
+ FARES_DETAIL_LOCK: (id) => `${getAppConfig('ticketing', 'api_url')}/fares/${id}/lock`,
349
+ FARES_LIST: `${getAppConfig('ticketing', 'api_url')}/fares`,
350
+ // ZONES
351
+ ZONES_DETAIL: (id) => `${getAppConfig('ticketing', 'api_url')}/zones/${id}`,
352
+ ZONES_DETAIL_LOCK: (id) => `${getAppConfig('ticketing', 'api_url')}/zones/${id}/lock`,
353
+ ZONES_LIST: `${getAppConfig('ticketing', 'api_url')}/zones`,
354
+ },
260
355
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmlmobilidade/consts",
3
- "version": "20260121.2332.6",
3
+ "version": "20260128.2248.28",
4
4
  "author": {
5
5
  "email": "iso@tmlmobilidade.pt",
6
6
  "name": "TML-ISO"
@@ -38,7 +38,7 @@
38
38
  "devDependencies": {
39
39
  "@tmlmobilidade/tsconfig": "*",
40
40
  "@tmlmobilidade/types": "*",
41
- "@types/node": "25.0.3",
41
+ "@types/node": "25.1.0",
42
42
  "resolve-tspaths": "0.8.23",
43
43
  "tsc-watch": "7.2.0",
44
44
  "typescript": "5.9.3"