@tmlmobilidade/consts 20260829.1307.28 → 20260829.1533.26

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
- alerts: {
16
- dev: {
17
- api_port: 52001,
18
- api_url: 'http://localhost:52001',
19
- cors_origin: true,
20
- frontend_port: 51001,
21
- frontend_url: 'http://localhost:51001/alerts',
22
- },
23
- prd: {
24
- api_url: 'https://go.tmlmobilidade.pt/alerts/api',
25
- frontend_url: 'https://go.tmlmobilidade.pt/alerts',
26
- ...DEFAULT_PRD_CONFIG,
27
- },
28
- stg: {
29
- api_url: `https://${process.env.ENVIRONMENT || process.env.NEXT_PUBLIC_ENVIRONMENT}.go-stg.tmlmobilidade.pt/alerts/api`,
30
- frontend_url: `https://${process.env.ENVIRONMENT || process.env.NEXT_PUBLIC_ENVIRONMENT}.go-stg.tmlmobilidade.pt/alerts`,
31
- ...DEFAULT_STG_CONFIG,
32
- },
33
- },
34
15
  controller: {
35
16
  dev: {
36
17
  api_port: 52002,
@@ -3,11 +3,6 @@
3
3
  * Do not edit this file manually.
4
4
  */
5
5
  export declare const PAGE_ROUTES: Readonly<{
6
- readonly alerts: {
7
- readonly BASE: string;
8
- readonly ALERTS_DETAIL: (alertId: string) => string;
9
- readonly ALERTS_LIST: string;
10
- };
11
6
  readonly controller: {
12
7
  readonly BASE: string;
13
8
  readonly RIDES_DETAIL: (rideId: string) => string;
@@ -62,6 +57,8 @@ export declare const PAGE_ROUTES: Readonly<{
62
57
  };
63
58
  readonly operation: {
64
59
  readonly BASE: string;
60
+ readonly ALERTS_DETAIL: (alertId: string) => string;
61
+ readonly ALERTS_LIST: `${string}/alerts`;
65
62
  readonly GTFS_VALIDATIONS_DETAIL: (id: string) => string;
66
63
  readonly GTFS_VALIDATIONS_LIST: `${string}/gtfs-validations`;
67
64
  readonly PLANS_DETAIL: (id: string) => string;
@@ -83,20 +80,6 @@ export declare const PAGE_ROUTES: Readonly<{
83
80
  };
84
81
  }>;
85
82
  export declare const API_ROUTES: Readonly<{
86
- readonly alerts: {
87
- readonly BASE: string;
88
- readonly ALERTS_COMPOSE: `${string}/alerts/compose`;
89
- readonly ALERTS_CREATE: `${string}/alerts/create`;
90
- readonly ALERTS_DETAIL: (id: string) => string;
91
- readonly ALERTS_DETAIL_DUPLICATE: (id: string) => string;
92
- readonly ALERTS_DETAIL_IMAGE: (id: string) => string;
93
- readonly ALERTS_DETAIL_LOCK: (id: string) => string;
94
- readonly ALERTS_LIST: `${string}/alerts/list`;
95
- readonly ALERTS_LIST_AGENCIES: `${string}/alerts/list-agencies`;
96
- readonly OPERATION_LINES: `${string}/operation/lines`;
97
- readonly OPERATION_RIDES: `${string}/operation/rides`;
98
- readonly OPERATION_STOPS: `${string}/operation/stops`;
99
- };
100
83
  readonly controller: {
101
84
  readonly BASE: string;
102
85
  readonly ACCEPTANCE_CHANGE_STATUS: (id: string) => string;
@@ -272,6 +255,17 @@ export declare const API_ROUTES: Readonly<{
272
255
  };
273
256
  readonly operation: {
274
257
  readonly BASE: string;
258
+ readonly ALERTS_COMPOSE: `${string}/alerts/compose`;
259
+ readonly ALERTS_CREATE: `${string}/alerts/create`;
260
+ readonly ALERTS_DETAIL: (id: string) => string;
261
+ readonly ALERTS_DETAIL_DUPLICATE: (id: string) => string;
262
+ readonly ALERTS_DETAIL_IMAGE: (id: string) => string;
263
+ readonly ALERTS_DETAIL_LOCK: (id: string) => string;
264
+ readonly ALERTS_LIST: `${string}/alerts/list`;
265
+ readonly ALERTS_LIST_AGENCIES: `${string}/alerts/list-agencies`;
266
+ readonly ALERTS_LIST_LINES: `${string}/alerts/list-lines`;
267
+ readonly ALERTS_LIST_RIDES: `${string}/alerts/list-rides`;
268
+ readonly ALERTS_LIST_STOPS: `${string}/alerts/list-stops`;
275
269
  readonly GTFS_VALIDATIONS_CREATE: `${string}/gtfs-validations/create`;
276
270
  readonly GTFS_VALIDATIONS_DETAIL: (id: string) => string;
277
271
  readonly GTFS_VALIDATIONS_DETAIL_FILE: (id: string) => string;
@@ -5,13 +5,6 @@
5
5
  import { getModuleConfig } from './app-configs.js';
6
6
  /* * */
7
7
  export const PAGE_ROUTES = Object.freeze({
8
- alerts: {
9
- // BASE
10
- BASE: `${getModuleConfig('alerts', 'frontend_url')}`,
11
- // ALERTS
12
- ALERTS_DETAIL: (alertId) => `${getModuleConfig('alerts', 'frontend_url')}/${encodeURIComponent(alertId)}`,
13
- ALERTS_LIST: `${getModuleConfig('alerts', 'frontend_url')}`,
14
- },
15
8
  controller: {
16
9
  // BASE
17
10
  BASE: `${getModuleConfig('controller', 'frontend_url')}`,
@@ -94,6 +87,9 @@ export const PAGE_ROUTES = Object.freeze({
94
87
  operation: {
95
88
  // BASE
96
89
  BASE: `${getModuleConfig('operation', 'frontend_url')}`,
90
+ // ALERTS
91
+ ALERTS_DETAIL: (alertId) => `${getModuleConfig('operation', 'frontend_url')}/alerts/${encodeURIComponent(alertId)}`,
92
+ ALERTS_LIST: `${getModuleConfig('operation', 'frontend_url')}/alerts`,
97
93
  // GTFS_VALIDATIONS
98
94
  GTFS_VALIDATIONS_DETAIL: (id) => `${getModuleConfig('operation', 'frontend_url')}/gtfs-validations/${encodeURIComponent(id)}`,
99
95
  GTFS_VALIDATIONS_LIST: `${getModuleConfig('operation', 'frontend_url')}/gtfs-validations`,
@@ -126,23 +122,6 @@ export const PAGE_ROUTES = Object.freeze({
126
122
  },
127
123
  });
128
124
  export const API_ROUTES = Object.freeze({
129
- alerts: {
130
- // BASE
131
- BASE: `${getModuleConfig('alerts', 'api_url')}`,
132
- // ALERTS
133
- ALERTS_COMPOSE: `${getModuleConfig('alerts', 'api_url')}/alerts/compose`,
134
- ALERTS_CREATE: `${getModuleConfig('alerts', 'api_url')}/alerts/create`,
135
- ALERTS_DETAIL: (id) => `${getModuleConfig('alerts', 'api_url')}/alerts/${encodeURIComponent(id)}`,
136
- ALERTS_DETAIL_DUPLICATE: (id) => `${getModuleConfig('alerts', 'api_url')}/alerts/${encodeURIComponent(id)}/duplicate`,
137
- ALERTS_DETAIL_IMAGE: (id) => `${getModuleConfig('alerts', 'api_url')}/alerts/${encodeURIComponent(id)}/image`,
138
- ALERTS_DETAIL_LOCK: (id) => `${getModuleConfig('alerts', 'api_url')}/alerts/${encodeURIComponent(id)}/lock`,
139
- ALERTS_LIST: `${getModuleConfig('alerts', 'api_url')}/alerts/list`,
140
- ALERTS_LIST_AGENCIES: `${getModuleConfig('alerts', 'api_url')}/alerts/list-agencies`,
141
- // OPERATION
142
- OPERATION_LINES: `${getModuleConfig('alerts', 'api_url')}/operation/lines`,
143
- OPERATION_RIDES: `${getModuleConfig('alerts', 'api_url')}/operation/rides`,
144
- OPERATION_STOPS: `${getModuleConfig('alerts', 'api_url')}/operation/stops`,
145
- },
146
125
  controller: {
147
126
  // BASE
148
127
  BASE: `${getModuleConfig('controller', 'api_url')}`,
@@ -361,6 +340,18 @@ export const API_ROUTES = Object.freeze({
361
340
  operation: {
362
341
  // BASE
363
342
  BASE: `${getModuleConfig('operation', 'api_url')}`,
343
+ // ALERTS
344
+ ALERTS_COMPOSE: `${getModuleConfig('operation', 'api_url')}/alerts/compose`,
345
+ ALERTS_CREATE: `${getModuleConfig('operation', 'api_url')}/alerts/create`,
346
+ ALERTS_DETAIL: (id) => `${getModuleConfig('operation', 'api_url')}/alerts/${encodeURIComponent(id)}`,
347
+ ALERTS_DETAIL_DUPLICATE: (id) => `${getModuleConfig('operation', 'api_url')}/alerts/${encodeURIComponent(id)}/duplicate`,
348
+ ALERTS_DETAIL_IMAGE: (id) => `${getModuleConfig('operation', 'api_url')}/alerts/${encodeURIComponent(id)}/image`,
349
+ ALERTS_DETAIL_LOCK: (id) => `${getModuleConfig('operation', 'api_url')}/alerts/${encodeURIComponent(id)}/lock`,
350
+ ALERTS_LIST: `${getModuleConfig('operation', 'api_url')}/alerts/list`,
351
+ ALERTS_LIST_AGENCIES: `${getModuleConfig('operation', 'api_url')}/alerts/list-agencies`,
352
+ ALERTS_LIST_LINES: `${getModuleConfig('operation', 'api_url')}/alerts/list-lines`,
353
+ ALERTS_LIST_RIDES: `${getModuleConfig('operation', 'api_url')}/alerts/list-rides`,
354
+ ALERTS_LIST_STOPS: `${getModuleConfig('operation', 'api_url')}/alerts/list-stops`,
364
355
  // GTFS-VALIDATIONS
365
356
  GTFS_VALIDATIONS_CREATE: `${getModuleConfig('operation', 'api_url')}/gtfs-validations/create`,
366
357
  GTFS_VALIDATIONS_DETAIL: (id) => `${getModuleConfig('operation', 'api_url')}/gtfs-validations/${encodeURIComponent(id)}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmlmobilidade/consts",
3
- "version": "20260829.1307.28",
3
+ "version": "20260829.1533.26",
4
4
  "author": {
5
5
  "email": "iso@tmlmobilidade.pt",
6
6
  "name": "TML-ISO"