@tmlmobilidade/consts 20260829.1533.26 → 20260829.1628.14

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.
@@ -12,25 +12,6 @@ const DEFAULT_STG_CONFIG = {
12
12
  frontend_port: 3000,
13
13
  };
14
14
  const MODULE_CONFIGS = {
15
- controller: {
16
- dev: {
17
- api_port: 52002,
18
- api_url: 'http://localhost:52002',
19
- cors_origin: true,
20
- frontend_port: 51002,
21
- frontend_url: 'http://localhost:51002/controller',
22
- },
23
- prd: {
24
- api_url: 'https://go.tmlmobilidade.pt/controller/api',
25
- frontend_url: 'https://go.tmlmobilidade.pt/controller',
26
- ...DEFAULT_PRD_CONFIG,
27
- },
28
- stg: {
29
- api_url: `https://${process.env.ENVIRONMENT || process.env.NEXT_PUBLIC_ENVIRONMENT}.go-stg.tmlmobilidade.pt/controller/api`,
30
- frontend_url: `https://${process.env.ENVIRONMENT || process.env.NEXT_PUBLIC_ENVIRONMENT}.go-stg.tmlmobilidade.pt/controller`,
31
- ...DEFAULT_STG_CONFIG,
32
- },
33
- },
34
15
  core: {
35
16
  dev: {
36
17
  api_port: 52000,
@@ -3,13 +3,6 @@
3
3
  * Do not edit this file manually.
4
4
  */
5
5
  export declare const PAGE_ROUTES: Readonly<{
6
- readonly controller: {
7
- readonly BASE: string;
8
- readonly RIDES_DETAIL: (rideId: string) => string;
9
- readonly RIDES_LIST: `${string}/rides`;
10
- readonly SAMS_DETAIL: (id: string) => string;
11
- readonly SAMS_LIST: `${string}/sams`;
12
- };
13
6
  readonly core: {
14
7
  readonly BASE: string;
15
8
  readonly AGENCIES_DETAIL: (agencyId: string) => string;
@@ -63,6 +56,10 @@ export declare const PAGE_ROUTES: Readonly<{
63
56
  readonly GTFS_VALIDATIONS_LIST: `${string}/gtfs-validations`;
64
57
  readonly PLANS_DETAIL: (id: string) => string;
65
58
  readonly PLANS_LIST: `${string}/plans`;
59
+ readonly RIDES_DETAIL: (rideId: string) => string;
60
+ readonly RIDES_LIST: `${string}/rides`;
61
+ readonly SAMS_DETAIL: (id: string) => string;
62
+ readonly SAMS_LIST: `${string}/sams`;
66
63
  readonly VEHICLES_DETAIL: (id: string) => string;
67
64
  readonly VEHICLES_LIST: `${string}/vehicles`;
68
65
  };
@@ -80,35 +77,6 @@ export declare const PAGE_ROUTES: Readonly<{
80
77
  };
81
78
  }>;
82
79
  export declare const API_ROUTES: Readonly<{
83
- readonly controller: {
84
- readonly BASE: string;
85
- readonly ACCEPTANCE_CHANGE_STATUS: (id: string) => string;
86
- readonly ACCEPTANCE_COMMENT: (id: string) => string;
87
- readonly ACCEPTANCE_DETAIL: (id: string) => string;
88
- readonly ACCEPTANCE_JUSTIFY: (id: string) => string;
89
- readonly ACCEPTANCE_LOCK: (id: string) => string;
90
- readonly RIDES_DETAIL_ANALYSES: (id: string) => string;
91
- readonly RIDES_DETAIL_APEX_BANKING_TAPS: (id: string) => string;
92
- readonly RIDES_DETAIL_APEX_LOCATIONS: (id: string) => string;
93
- readonly RIDES_DETAIL_APEX_REFUNDS: (id: string) => string;
94
- readonly RIDES_DETAIL_APEX_SALES: (id: string) => string;
95
- readonly RIDES_DETAIL_APEX_VALIDATIONS: (id: string) => string;
96
- readonly RIDES_DETAIL_HASHED_SHAPE: (id: string) => string;
97
- readonly RIDES_DETAIL_HASHED_TRIP: (id: string) => string;
98
- readonly RIDES_DETAIL_REPROCESS: (id: string) => string;
99
- readonly RIDES_DETAIL_RIDE: (id: string) => string;
100
- readonly RIDES_DETAIL_VEHICLE_EVENTS: (id: string) => string;
101
- readonly RIDES_FAVORITES: `${string}/rides/favorites`;
102
- readonly RIDES_LIST: `${string}/rides/list`;
103
- readonly RIDES_LIST_AGENCIES: `${string}/rides/list-agencies`;
104
- readonly SAMS_APEX_VERSIONS: `${string}/sams/apex-versions`;
105
- readonly SAMS_BASE: `${string}/sams/base`;
106
- readonly SAMS_DETAIL: (id: string) => string;
107
- readonly SAMS_EXPORT_ANALYSIS: `${string}/sams/export/analysis`;
108
- readonly SAMS_FAVORITES: `${string}/sams/favorites`;
109
- readonly SAMS_LIST: `${string}/sams`;
110
- readonly SAMS_TIMELINE_SUMMARY: `${string}/sams/timeline-summary`;
111
- };
112
80
  readonly core: {
113
81
  readonly BASE: string;
114
82
  readonly AGENCIES_DETAIL: (id: string) => string;
@@ -288,6 +256,32 @@ export declare const API_ROUTES: Readonly<{
288
256
  readonly PLANS_DRT_MODEL: (id: string) => string;
289
257
  readonly PLANS_LIST: `${string}/plans/list`;
290
258
  readonly PLANS_LIST_AGENCIES: `${string}/plans/list-agencies`;
259
+ readonly RIDE_ACCEPTANCES_CHANGE_STATUS: (id: string) => string;
260
+ readonly RIDE_ACCEPTANCES_COMMENT: (id: string) => string;
261
+ readonly RIDE_ACCEPTANCES_DETAIL: (id: string) => string;
262
+ readonly RIDE_ACCEPTANCES_JUSTIFY: (id: string) => string;
263
+ readonly RIDE_ACCEPTANCES_LOCK: (id: string) => string;
264
+ readonly RIDES_DETAIL_ANALYSES: (id: string) => string;
265
+ readonly RIDES_DETAIL_APEX_BANKING_TAPS: (id: string) => string;
266
+ readonly RIDES_DETAIL_APEX_LOCATIONS: (id: string) => string;
267
+ readonly RIDES_DETAIL_APEX_REFUNDS: (id: string) => string;
268
+ readonly RIDES_DETAIL_APEX_SALES: (id: string) => string;
269
+ readonly RIDES_DETAIL_APEX_VALIDATIONS: (id: string) => string;
270
+ readonly RIDES_DETAIL_HASHED_SHAPE: (id: string) => string;
271
+ readonly RIDES_DETAIL_HASHED_TRIP: (id: string) => string;
272
+ readonly RIDES_DETAIL_REPROCESS: (id: string) => string;
273
+ readonly RIDES_DETAIL_RIDE: (id: string) => string;
274
+ readonly RIDES_DETAIL_VEHICLE_EVENTS: (id: string) => string;
275
+ readonly RIDES_FAVORITES: `${string}/rides/favorites`;
276
+ readonly RIDES_LIST: `${string}/rides/list`;
277
+ readonly RIDES_LIST_AGENCIES: `${string}/rides/list-agencies`;
278
+ readonly SAMS_APEX_VERSIONS: `${string}/sams/apex-versions`;
279
+ readonly SAMS_BASE: `${string}/sams/base`;
280
+ readonly SAMS_DETAIL: (id: string) => string;
281
+ readonly SAMS_EXPORT_ANALYSIS: `${string}/sams/export/analysis`;
282
+ readonly SAMS_FAVORITES: `${string}/sams/favorites`;
283
+ readonly SAMS_LIST: `${string}/sams`;
284
+ readonly SAMS_TIMELINE_SUMMARY: `${string}/sams/timeline-summary`;
291
285
  readonly VEHICLES_DETAIL: (id: string) => string;
292
286
  readonly VEHICLES_DETAIL_LAST_EVENT: (id: string) => string;
293
287
  readonly VEHICLES_DETAIL_LOCK: (id: string) => string;
@@ -5,16 +5,6 @@
5
5
  import { getModuleConfig } from './app-configs.js';
6
6
  /* * */
7
7
  export const PAGE_ROUTES = Object.freeze({
8
- controller: {
9
- // BASE
10
- BASE: `${getModuleConfig('controller', 'frontend_url')}`,
11
- // RIDES
12
- RIDES_DETAIL: (rideId) => `${getModuleConfig('controller', 'frontend_url')}/rides/${encodeURIComponent(rideId)}`,
13
- RIDES_LIST: `${getModuleConfig('controller', 'frontend_url')}/rides`,
14
- // SAMS
15
- SAMS_DETAIL: (id) => `${getModuleConfig('controller', 'frontend_url')}/sams/${encodeURIComponent(id)}`,
16
- SAMS_LIST: `${getModuleConfig('controller', 'frontend_url')}/sams`,
17
- },
18
8
  core: {
19
9
  // BASE
20
10
  BASE: `${getModuleConfig('core', 'frontend_url')}`,
@@ -96,6 +86,12 @@ export const PAGE_ROUTES = Object.freeze({
96
86
  // PLANS
97
87
  PLANS_DETAIL: (id) => `${getModuleConfig('operation', 'frontend_url')}/plans/${encodeURIComponent(id)}`,
98
88
  PLANS_LIST: `${getModuleConfig('operation', 'frontend_url')}/plans`,
89
+ // RIDES
90
+ RIDES_DETAIL: (rideId) => `${getModuleConfig('operation', 'frontend_url')}/rides/${encodeURIComponent(rideId)}`,
91
+ RIDES_LIST: `${getModuleConfig('operation', 'frontend_url')}/rides`,
92
+ // SAMS
93
+ SAMS_DETAIL: (id) => `${getModuleConfig('operation', 'frontend_url')}/sams/${encodeURIComponent(id)}`,
94
+ SAMS_LIST: `${getModuleConfig('operation', 'frontend_url')}/sams`,
99
95
  // VEHICLES
100
96
  VEHICLES_DETAIL: (id) => `${getModuleConfig('operation', 'frontend_url')}/vehicles/${encodeURIComponent(id)}`,
101
97
  VEHICLES_LIST: `${getModuleConfig('operation', 'frontend_url')}/vehicles`,
@@ -122,39 +118,6 @@ export const PAGE_ROUTES = Object.freeze({
122
118
  },
123
119
  });
124
120
  export const API_ROUTES = Object.freeze({
125
- controller: {
126
- // BASE
127
- BASE: `${getModuleConfig('controller', 'api_url')}`,
128
- // RIDE-ACCEPTANCE
129
- ACCEPTANCE_CHANGE_STATUS: (id) => `${getModuleConfig('controller', 'api_url')}/rides/${encodeURIComponent(id)}/acceptance/change-status`,
130
- ACCEPTANCE_COMMENT: (id) => `${getModuleConfig('controller', 'api_url')}/rides/${encodeURIComponent(id)}/acceptance/comment`,
131
- ACCEPTANCE_DETAIL: (id) => `${getModuleConfig('controller', 'api_url')}/rides/${encodeURIComponent(id)}/acceptance`,
132
- ACCEPTANCE_JUSTIFY: (id) => `${getModuleConfig('controller', 'api_url')}/rides/${encodeURIComponent(id)}/acceptance/justify`,
133
- ACCEPTANCE_LOCK: (id) => `${getModuleConfig('controller', 'api_url')}/rides/${encodeURIComponent(id)}/acceptance/lock`,
134
- // RIDES
135
- RIDES_DETAIL_ANALYSES: (id) => `${getModuleConfig('controller', 'api_url')}/rides/${encodeURIComponent(id)}/analyses`,
136
- RIDES_DETAIL_APEX_BANKING_TAPS: (id) => `${getModuleConfig('controller', 'api_url')}/rides/${encodeURIComponent(id)}/apex-banking-taps`,
137
- RIDES_DETAIL_APEX_LOCATIONS: (id) => `${getModuleConfig('controller', 'api_url')}/rides/${encodeURIComponent(id)}/apex-locations`,
138
- RIDES_DETAIL_APEX_REFUNDS: (id) => `${getModuleConfig('controller', 'api_url')}/rides/${encodeURIComponent(id)}/apex-refunds`,
139
- RIDES_DETAIL_APEX_SALES: (id) => `${getModuleConfig('controller', 'api_url')}/rides/${encodeURIComponent(id)}/apex-sales`,
140
- RIDES_DETAIL_APEX_VALIDATIONS: (id) => `${getModuleConfig('controller', 'api_url')}/rides/${encodeURIComponent(id)}/apex-validations`,
141
- RIDES_DETAIL_HASHED_SHAPE: (id) => `${getModuleConfig('controller', 'api_url')}/rides/${encodeURIComponent(id)}/hashed-shape`,
142
- RIDES_DETAIL_HASHED_TRIP: (id) => `${getModuleConfig('controller', 'api_url')}/rides/${encodeURIComponent(id)}/hashed-trip`,
143
- RIDES_DETAIL_REPROCESS: (id) => `${getModuleConfig('controller', 'api_url')}/rides/${encodeURIComponent(id)}/reprocess`,
144
- RIDES_DETAIL_RIDE: (id) => `${getModuleConfig('controller', 'api_url')}/rides/${encodeURIComponent(id)}/ride`,
145
- RIDES_DETAIL_VEHICLE_EVENTS: (id) => `${getModuleConfig('controller', 'api_url')}/rides/${encodeURIComponent(id)}/vehicle-events`,
146
- RIDES_FAVORITES: `${getModuleConfig('controller', 'api_url')}/rides/favorites`,
147
- RIDES_LIST: `${getModuleConfig('controller', 'api_url')}/rides/list`,
148
- RIDES_LIST_AGENCIES: `${getModuleConfig('controller', 'api_url')}/rides/list-agencies`,
149
- // SAMS
150
- SAMS_APEX_VERSIONS: `${getModuleConfig('controller', 'api_url')}/sams/apex-versions`,
151
- SAMS_BASE: `${getModuleConfig('controller', 'api_url')}/sams/base`,
152
- SAMS_DETAIL: (id) => `${getModuleConfig('controller', 'api_url')}/sams/${encodeURIComponent(id)}`,
153
- SAMS_EXPORT_ANALYSIS: `${getModuleConfig('controller', 'api_url')}/sams/export/analysis`,
154
- SAMS_FAVORITES: `${getModuleConfig('controller', 'api_url')}/sams/favorites`,
155
- SAMS_LIST: `${getModuleConfig('controller', 'api_url')}/sams`,
156
- SAMS_TIMELINE_SUMMARY: `${getModuleConfig('controller', 'api_url')}/sams/timeline-summary`,
157
- },
158
121
  core: {
159
122
  // BASE
160
123
  BASE: `${getModuleConfig('core', 'api_url')}`,
@@ -376,6 +339,35 @@ export const API_ROUTES = Object.freeze({
376
339
  PLANS_DRT_MODEL: (id) => `${getModuleConfig('operation', 'api_url')}/plans/drt-model/${encodeURIComponent(id)}`,
377
340
  PLANS_LIST: `${getModuleConfig('operation', 'api_url')}/plans/list`,
378
341
  PLANS_LIST_AGENCIES: `${getModuleConfig('operation', 'api_url')}/plans/list-agencies`,
342
+ // RIDE-ACCEPTANCES
343
+ RIDE_ACCEPTANCES_CHANGE_STATUS: (id) => `${getModuleConfig('operation', 'api_url')}/ride-acceptances/${encodeURIComponent(id)}/change-status`,
344
+ RIDE_ACCEPTANCES_COMMENT: (id) => `${getModuleConfig('operation', 'api_url')}/ride-acceptances/${encodeURIComponent(id)}/comment`,
345
+ RIDE_ACCEPTANCES_DETAIL: (id) => `${getModuleConfig('operation', 'api_url')}/ride-acceptances/${encodeURIComponent(id)}`,
346
+ RIDE_ACCEPTANCES_JUSTIFY: (id) => `${getModuleConfig('operation', 'api_url')}/ride-acceptances/${encodeURIComponent(id)}/justify`,
347
+ RIDE_ACCEPTANCES_LOCK: (id) => `${getModuleConfig('operation', 'api_url')}/ride-acceptances/${encodeURIComponent(id)}/lock`,
348
+ // RIDES
349
+ RIDES_DETAIL_ANALYSES: (id) => `${getModuleConfig('operation', 'api_url')}/rides/${encodeURIComponent(id)}/analyses`,
350
+ RIDES_DETAIL_APEX_BANKING_TAPS: (id) => `${getModuleConfig('operation', 'api_url')}/rides/${encodeURIComponent(id)}/apex-banking-taps`,
351
+ RIDES_DETAIL_APEX_LOCATIONS: (id) => `${getModuleConfig('operation', 'api_url')}/rides/${encodeURIComponent(id)}/apex-locations`,
352
+ RIDES_DETAIL_APEX_REFUNDS: (id) => `${getModuleConfig('operation', 'api_url')}/rides/${encodeURIComponent(id)}/apex-refunds`,
353
+ RIDES_DETAIL_APEX_SALES: (id) => `${getModuleConfig('operation', 'api_url')}/rides/${encodeURIComponent(id)}/apex-sales`,
354
+ RIDES_DETAIL_APEX_VALIDATIONS: (id) => `${getModuleConfig('operation', 'api_url')}/rides/${encodeURIComponent(id)}/apex-validations`,
355
+ RIDES_DETAIL_HASHED_SHAPE: (id) => `${getModuleConfig('operation', 'api_url')}/rides/${encodeURIComponent(id)}/hashed-shape`,
356
+ RIDES_DETAIL_HASHED_TRIP: (id) => `${getModuleConfig('operation', 'api_url')}/rides/${encodeURIComponent(id)}/hashed-trip`,
357
+ RIDES_DETAIL_REPROCESS: (id) => `${getModuleConfig('operation', 'api_url')}/rides/${encodeURIComponent(id)}/reprocess`,
358
+ RIDES_DETAIL_RIDE: (id) => `${getModuleConfig('operation', 'api_url')}/rides/${encodeURIComponent(id)}/ride`,
359
+ RIDES_DETAIL_VEHICLE_EVENTS: (id) => `${getModuleConfig('operation', 'api_url')}/rides/${encodeURIComponent(id)}/vehicle-events`,
360
+ RIDES_FAVORITES: `${getModuleConfig('operation', 'api_url')}/rides/favorites`,
361
+ RIDES_LIST: `${getModuleConfig('operation', 'api_url')}/rides/list`,
362
+ RIDES_LIST_AGENCIES: `${getModuleConfig('operation', 'api_url')}/rides/list-agencies`,
363
+ // SAMS
364
+ SAMS_APEX_VERSIONS: `${getModuleConfig('operation', 'api_url')}/sams/apex-versions`,
365
+ SAMS_BASE: `${getModuleConfig('operation', 'api_url')}/sams/base`,
366
+ SAMS_DETAIL: (id) => `${getModuleConfig('operation', 'api_url')}/sams/${encodeURIComponent(id)}`,
367
+ SAMS_EXPORT_ANALYSIS: `${getModuleConfig('operation', 'api_url')}/sams/export/analysis`,
368
+ SAMS_FAVORITES: `${getModuleConfig('operation', 'api_url')}/sams/favorites`,
369
+ SAMS_LIST: `${getModuleConfig('operation', 'api_url')}/sams`,
370
+ SAMS_TIMELINE_SUMMARY: `${getModuleConfig('operation', 'api_url')}/sams/timeline-summary`,
379
371
  // VEHICLES
380
372
  VEHICLES_DETAIL: (id) => `${getModuleConfig('operation', 'api_url')}/vehicles/${encodeURIComponent(id)}`,
381
373
  VEHICLES_DETAIL_LAST_EVENT: (id) => `${getModuleConfig('operation', 'api_url')}/vehicles/${encodeURIComponent(id)}/last-event`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmlmobilidade/consts",
3
- "version": "20260829.1533.26",
3
+ "version": "20260829.1628.14",
4
4
  "author": {
5
5
  "email": "iso@tmlmobilidade.pt",
6
6
  "name": "TML-ISO"