@tmlmobilidade/types 20251217.1540.37 → 20251218.110.37
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.
- package/dist/_common/comment.js +15 -6
- package/dist/_common/document.d.ts +3 -0
- package/dist/_common/document.js +4 -3
- package/dist/_common/status.d.ts +15 -1
- package/dist/_common/status.js +24 -6
- package/dist/_common/unix-timestamp.d.ts +1 -1
- package/dist/_common/unix-timestamp.js +1 -1
- package/dist/agency.d.ts +18 -13
- package/dist/agency.js +1 -1
- package/dist/alert.d.ts +101 -112
- package/dist/alert.js +18 -19
- package/dist/apex/simplified-apex-location.d.ts +5 -4
- package/dist/apex/simplified-apex-location.js +6 -4
- package/dist/apex/simplified-apex-on-board-refund.d.ts +5 -4
- package/dist/apex/simplified-apex-on-board-refund.js +6 -4
- package/dist/apex/simplified-apex-on-board-sale.d.ts +5 -4
- package/dist/apex/simplified-apex-on-board-sale.js +6 -4
- package/dist/apex/simplified-apex-validation.d.ts +9 -8
- package/dist/apex/simplified-apex-validation.js +6 -4
- package/dist/auth/login.d.ts +1 -1
- package/dist/auth/login.js +1 -1
- package/dist/auth/role.d.ts +260 -149
- package/dist/auth/role.js +1 -1
- package/dist/auth/session.d.ts +9 -7
- package/dist/auth/session.js +6 -4
- package/dist/auth/user.d.ts +737 -207
- package/dist/auth/user.js +12 -9
- package/dist/auth/verification-token.d.ts +9 -7
- package/dist/auth/verification-token.js +6 -4
- package/dist/dates/annotation.d.ts +94 -0
- package/dist/dates/annotation.js +14 -0
- package/dist/dates/index.d.ts +1 -0
- package/dist/dates/index.js +1 -0
- package/dist/file-exports/{common.d.ts → base.d.ts} +6 -5
- package/dist/file-exports/{common.js → base.js} +7 -4
- package/dist/file-exports/file-exports.d.ts +124 -0
- package/dist/file-exports/file-exports.js +7 -0
- package/dist/file-exports/index.d.ts +3 -126
- package/dist/file-exports/index.js +3 -9
- package/dist/file-exports/ride-export.d.ts +13 -13
- package/dist/file-exports/ride-export.js +5 -5
- package/dist/file.d.ts +3 -3
- package/dist/file.js +4 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/notification.d.ts +9 -7
- package/dist/notification.js +4 -2
- package/dist/organization.d.ts +24 -15
- package/dist/organization.js +3 -3
- package/dist/permissions/agencies.d.ts +3 -3
- package/dist/permissions/agencies.js +1 -1
- package/dist/permissions/alerts.d.ts +6 -6
- package/dist/permissions/alerts.js +2 -2
- package/dist/permissions/dates.d.ts +25 -0
- package/dist/permissions/dates.js +16 -0
- package/dist/permissions/gtfs-validations.d.ts +3 -3
- package/dist/permissions/gtfs-validations.js +1 -0
- package/dist/permissions/index.d.ts +49 -27
- package/dist/permissions/index.js +2 -0
- package/dist/permissions/organizations.d.ts +3 -3
- package/dist/permissions/organizations.js +1 -0
- package/dist/permissions/plans.d.ts +3 -3
- package/dist/permissions/plans.js +1 -1
- package/dist/permissions/roles.d.ts +3 -3
- package/dist/permissions/roles.js +1 -0
- package/dist/permissions/stops.d.ts +3 -3
- package/dist/permissions/stops.js +1 -1
- package/dist/permissions/users.d.ts +3 -3
- package/dist/permissions/users.js +1 -0
- package/dist/plans/gtfs-validation.d.ts +12 -3
- package/dist/plans/gtfs-validation.js +1 -1
- package/dist/plans/plan-app-status.js +2 -2
- package/dist/plans/plan-pcgi-legacy.d.ts +1 -1
- package/dist/plans/plan-pcgi-legacy.js +1 -1
- package/dist/plans/plan.d.ts +9 -9
- package/dist/proposed-change.d.ts +12 -3
- package/dist/proposed-change.js +1 -1
- package/dist/rides/ride-acceptance.d.ts +23 -19
- package/dist/rides/ride-acceptance.js +5 -3
- package/dist/rides/ride-analysis.d.ts +16 -16
- package/dist/rides/ride-analysis.js +16 -16
- package/dist/rides/ride-audit.d.ts +11 -11
- package/dist/rides/ride-audit.js +1 -1
- package/dist/rides/ride-overrides.d.ts +1 -1
- package/dist/rides/ride-overrides.js +1 -1
- package/dist/rides/ride.d.ts +56 -55
- package/dist/rides/ride.js +10 -8
- package/dist/sams/sam-analysis.d.ts +1 -1
- package/dist/sams/sam-analysis.js +4 -4
- package/dist/sams/sam.d.ts +13 -13
- package/dist/sams/sam.js +7 -5
- package/dist/stops/connections.d.ts +3 -0
- package/dist/stops/connections.js +15 -0
- package/dist/stops/equipment.d.ts +3 -0
- package/dist/stops/equipment.js +9 -0
- package/dist/stops/facilities.d.ts +4 -0
- package/dist/stops/facilities.js +16 -0
- package/dist/stops/index.d.ts +9 -0
- package/dist/stops/index.js +9 -0
- package/dist/stops/jurisdiction.d.ts +4 -0
- package/dist/stops/jurisdiction.js +10 -0
- package/dist/stops/name-abbreviations.d.ts +11 -0
- package/dist/stops/name-abbreviations.js +117 -0
- package/dist/stops/parent-station.d.ts +76 -0
- package/dist/stops/parent-station.js +11 -0
- package/dist/stops/road-type.d.ts +3 -0
- package/dist/stops/road-type.js +13 -0
- package/dist/stops/stop-area.d.ts +67 -0
- package/dist/stops/stop-area.js +10 -0
- package/dist/{stop.d.ts → stops/stop.d.ts} +271 -345
- package/dist/stops/stop.js +78 -0
- package/dist/vehicle-events/gtfs-rt-vehicle-event-extended.d.ts +1 -21
- package/dist/vehicle-events/gtfs-rt-vehicle-event-extended.js +4 -5
- package/dist/vehicle-events/simplified-vehicle-event.d.ts +4 -3
- package/dist/vehicle-events/simplified-vehicle-event.js +6 -4
- package/dist/zone.d.ts +10 -10
- package/dist/zone.js +1 -1
- package/package.json +2 -2
- package/dist/stop.js +0 -102
package/dist/sams/sam.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export declare const SamSchema: z.ZodObject<{
|
|
|
22
22
|
transactions_found: z.ZodNumber;
|
|
23
23
|
transactions_missing: z.ZodNumber;
|
|
24
24
|
vehicle_id: z.ZodNullable<z.ZodNumber>;
|
|
25
|
-
}, "
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
26
|
apex_version: string | null;
|
|
27
27
|
device_id: string | null;
|
|
28
28
|
vehicle_id: number | null;
|
|
@@ -61,7 +61,7 @@ export declare const SamSchema: z.ZodObject<{
|
|
|
61
61
|
transactions_expected: z.ZodNullable<z.ZodNumber>;
|
|
62
62
|
transactions_found: z.ZodNullable<z.ZodNumber>;
|
|
63
63
|
transactions_missing: z.ZodNullable<z.ZodNumber>;
|
|
64
|
-
}, "
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
65
|
_id: number;
|
|
66
66
|
created_at: number & {
|
|
67
67
|
__brand: "UnixTimestamp";
|
|
@@ -70,8 +70,8 @@ export declare const SamSchema: z.ZodObject<{
|
|
|
70
70
|
__brand: "UnixTimestamp";
|
|
71
71
|
};
|
|
72
72
|
agency_id: string;
|
|
73
|
-
seen_first_at: import("../_common/unix-timestamp.js").UnixTimestamp | null;
|
|
74
73
|
seen_last_at: import("../_common/unix-timestamp.js").UnixTimestamp | null;
|
|
74
|
+
seen_first_at: import("../_common/unix-timestamp.js").UnixTimestamp | null;
|
|
75
75
|
analysis: {
|
|
76
76
|
apex_version: string | null;
|
|
77
77
|
device_id: string | null;
|
|
@@ -101,8 +101,8 @@ export declare const SamSchema: z.ZodObject<{
|
|
|
101
101
|
created_at: number;
|
|
102
102
|
updated_at: number;
|
|
103
103
|
agency_id: string;
|
|
104
|
-
seen_first_at: number | null;
|
|
105
104
|
seen_last_at: number | null;
|
|
105
|
+
seen_first_at: number | null;
|
|
106
106
|
transactions_expected: number | null;
|
|
107
107
|
transactions_found: number | null;
|
|
108
108
|
transactions_missing: number | null;
|
|
@@ -151,7 +151,7 @@ export declare const CreateSamSchema: z.ZodObject<Omit<{
|
|
|
151
151
|
transactions_found: z.ZodNumber;
|
|
152
152
|
transactions_missing: z.ZodNumber;
|
|
153
153
|
vehicle_id: z.ZodNullable<z.ZodNumber>;
|
|
154
|
-
}, "
|
|
154
|
+
}, "strip", z.ZodTypeAny, {
|
|
155
155
|
apex_version: string | null;
|
|
156
156
|
device_id: string | null;
|
|
157
157
|
vehicle_id: number | null;
|
|
@@ -190,11 +190,11 @@ export declare const CreateSamSchema: z.ZodObject<Omit<{
|
|
|
190
190
|
transactions_expected: z.ZodNullable<z.ZodNumber>;
|
|
191
191
|
transactions_found: z.ZodNullable<z.ZodNumber>;
|
|
192
192
|
transactions_missing: z.ZodNullable<z.ZodNumber>;
|
|
193
|
-
}, "created_at" | "updated_at">, "
|
|
193
|
+
}, "created_at" | "updated_at">, "strip", z.ZodTypeAny, {
|
|
194
194
|
_id: number;
|
|
195
195
|
agency_id: string;
|
|
196
|
-
seen_first_at: import("../_common/unix-timestamp.js").UnixTimestamp | null;
|
|
197
196
|
seen_last_at: import("../_common/unix-timestamp.js").UnixTimestamp | null;
|
|
197
|
+
seen_first_at: import("../_common/unix-timestamp.js").UnixTimestamp | null;
|
|
198
198
|
analysis: {
|
|
199
199
|
apex_version: string | null;
|
|
200
200
|
device_id: string | null;
|
|
@@ -222,8 +222,8 @@ export declare const CreateSamSchema: z.ZodObject<Omit<{
|
|
|
222
222
|
}, {
|
|
223
223
|
_id: number;
|
|
224
224
|
agency_id: string;
|
|
225
|
-
seen_first_at: number | null;
|
|
226
225
|
seen_last_at: number | null;
|
|
226
|
+
seen_first_at: number | null;
|
|
227
227
|
transactions_expected: number | null;
|
|
228
228
|
transactions_found: number | null;
|
|
229
229
|
transactions_missing: number | null;
|
|
@@ -253,8 +253,8 @@ export declare const UpdateSamSchema: z.ZodObject<{
|
|
|
253
253
|
_id: z.ZodOptional<z.ZodNumber>;
|
|
254
254
|
updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
255
255
|
agency_id: z.ZodOptional<z.ZodString>;
|
|
256
|
-
seen_first_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
257
256
|
seen_last_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
257
|
+
seen_first_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
258
258
|
analysis: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
259
259
|
apex_version: z.ZodNullable<z.ZodString>;
|
|
260
260
|
device_id: z.ZodNullable<z.ZodString>;
|
|
@@ -270,7 +270,7 @@ export declare const UpdateSamSchema: z.ZodObject<{
|
|
|
270
270
|
transactions_found: z.ZodNumber;
|
|
271
271
|
transactions_missing: z.ZodNumber;
|
|
272
272
|
vehicle_id: z.ZodNullable<z.ZodNumber>;
|
|
273
|
-
}, "
|
|
273
|
+
}, "strip", z.ZodTypeAny, {
|
|
274
274
|
apex_version: string | null;
|
|
275
275
|
device_id: string | null;
|
|
276
276
|
vehicle_id: number | null;
|
|
@@ -307,12 +307,12 @@ export declare const UpdateSamSchema: z.ZodObject<{
|
|
|
307
307
|
transactions_missing: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
308
308
|
latest_apex_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
309
309
|
remarks: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
|
|
310
|
-
}, "
|
|
310
|
+
}, "strip", z.ZodTypeAny, {
|
|
311
311
|
_id?: number | undefined;
|
|
312
312
|
updated_by?: string | undefined;
|
|
313
313
|
agency_id?: string | undefined;
|
|
314
|
-
seen_first_at?: import("../_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
315
314
|
seen_last_at?: import("../_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
315
|
+
seen_first_at?: import("../_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
316
316
|
analysis?: {
|
|
317
317
|
apex_version: string | null;
|
|
318
318
|
device_id: string | null;
|
|
@@ -339,8 +339,8 @@ export declare const UpdateSamSchema: z.ZodObject<{
|
|
|
339
339
|
_id?: number | undefined;
|
|
340
340
|
updated_by?: string | undefined;
|
|
341
341
|
agency_id?: string | undefined;
|
|
342
|
-
seen_first_at?: number | null | undefined;
|
|
343
342
|
seen_last_at?: number | null | undefined;
|
|
343
|
+
seen_first_at?: number | null | undefined;
|
|
344
344
|
analysis?: {
|
|
345
345
|
apex_version: string | null;
|
|
346
346
|
device_id: string | null;
|
package/dist/sams/sam.js
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
/* * */
|
|
2
2
|
import { DocumentSchema } from '../_common/document.js';
|
|
3
3
|
import { ProcessingStatusSchema } from '../_common/status.js';
|
|
4
|
-
import {
|
|
4
|
+
import { UnixTimeStampSchema } from '../_common/unix-timestamp.js';
|
|
5
5
|
import { SamAnalysisSchema } from './sam-analysis.js';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
/* * */
|
|
8
|
-
export const SamSchema = DocumentSchema
|
|
8
|
+
export const SamSchema = DocumentSchema
|
|
9
|
+
.omit({ is_locked: true })
|
|
10
|
+
.extend({
|
|
9
11
|
_id: z.number(),
|
|
10
12
|
agency_id: z.string(),
|
|
11
13
|
analysis: z.array(SamAnalysisSchema).default([]),
|
|
12
14
|
latest_apex_version: z.string().nullable(),
|
|
13
15
|
remarks: z.string().nullable().default(null),
|
|
14
|
-
seen_first_at:
|
|
15
|
-
seen_last_at:
|
|
16
|
+
seen_first_at: UnixTimeStampSchema.nullable(),
|
|
17
|
+
seen_last_at: UnixTimeStampSchema.nullable(),
|
|
16
18
|
system_status: ProcessingStatusSchema.default('waiting'),
|
|
17
19
|
transactions_expected: z.number().nullable(),
|
|
18
20
|
transactions_found: z.number().nullable(),
|
|
19
21
|
transactions_missing: z.number().nullable(),
|
|
20
|
-
})
|
|
22
|
+
});
|
|
21
23
|
export const CreateSamSchema = SamSchema.omit({ created_at: true, updated_at: true });
|
|
22
24
|
export const UpdateSamSchema = CreateSamSchema.omit({ created_by: true }).partial();
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
/* * */
|
|
4
|
+
const StopConnectionValues = [
|
|
5
|
+
'ferry',
|
|
6
|
+
'light_rail',
|
|
7
|
+
'subway',
|
|
8
|
+
'train',
|
|
9
|
+
'boat',
|
|
10
|
+
'airport',
|
|
11
|
+
'bike_sharing',
|
|
12
|
+
'bike_parking',
|
|
13
|
+
'car_parking',
|
|
14
|
+
];
|
|
15
|
+
export const StopConnectionSchema = z.enum(StopConnectionValues);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const StopFacilityValues: readonly ["fire_station", "health_clinic", "historic_building", "hospital", "police_station", "school", "shopping", "transit_office", "university", "beach"];
|
|
3
|
+
export declare const StopFacilitySchema: z.ZodEnum<["fire_station", "health_clinic", "historic_building", "hospital", "police_station", "school", "shopping", "transit_office", "university", "beach"]>;
|
|
4
|
+
export type StopFacility = z.infer<typeof StopFacilitySchema>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
/* * */
|
|
4
|
+
export const StopFacilityValues = [
|
|
5
|
+
'fire_station',
|
|
6
|
+
'health_clinic',
|
|
7
|
+
'historic_building',
|
|
8
|
+
'hospital',
|
|
9
|
+
'police_station',
|
|
10
|
+
'school',
|
|
11
|
+
'shopping',
|
|
12
|
+
'transit_office',
|
|
13
|
+
'university',
|
|
14
|
+
'beach',
|
|
15
|
+
];
|
|
16
|
+
export const StopFacilitySchema = z.enum(StopFacilityValues);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './connections.js';
|
|
2
|
+
export * from './equipment.js';
|
|
3
|
+
export * from './facilities.js';
|
|
4
|
+
export * from './jurisdiction.js';
|
|
5
|
+
export * from './name-abbreviations.js';
|
|
6
|
+
export * from './parent-station.js';
|
|
7
|
+
export * from './road-type.js';
|
|
8
|
+
export * from './stop-area.js';
|
|
9
|
+
export * from './stop.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './connections.js';
|
|
2
|
+
export * from './equipment.js';
|
|
3
|
+
export * from './facilities.js';
|
|
4
|
+
export * from './jurisdiction.js';
|
|
5
|
+
export * from './name-abbreviations.js';
|
|
6
|
+
export * from './parent-station.js';
|
|
7
|
+
export * from './road-type.js';
|
|
8
|
+
export * from './stop-area.js';
|
|
9
|
+
export * from './stop.js';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const StopJurisdictionValues: readonly ["ip", "municipality", "other", "unknown"];
|
|
3
|
+
export declare const StopJurisdictionSchema: z.ZodEnum<["ip", "municipality", "other", "unknown"]>;
|
|
4
|
+
export type StopJurisdiction = z.infer<typeof StopJurisdictionSchema>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface AbbreviationRule {
|
|
2
|
+
enabled: boolean;
|
|
3
|
+
phrase: string;
|
|
4
|
+
replacement: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* These are the rules for abbreviating stop names.
|
|
8
|
+
* They follow the CTT National Postal Service guidelines,
|
|
9
|
+
* with some additional customizations for TML.
|
|
10
|
+
*/
|
|
11
|
+
export declare const StopNameAbbreviationRules: AbbreviationRule[];
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
/**
|
|
3
|
+
* These are the rules for abbreviating stop names.
|
|
4
|
+
* They follow the CTT National Postal Service guidelines,
|
|
5
|
+
* with some additional customizations for TML.
|
|
6
|
+
*/
|
|
7
|
+
export const StopNameAbbreviationRules = [
|
|
8
|
+
//
|
|
9
|
+
// TML: Street & Place names
|
|
10
|
+
{ enabled: true, phrase: 'Quinta', replacement: 'Qta.' },
|
|
11
|
+
{ enabled: true, phrase: 'Largo', replacement: 'Lgo.' },
|
|
12
|
+
{ enabled: true, phrase: 'Estrada Municipal', replacement: 'EM' },
|
|
13
|
+
{ enabled: true, phrase: 'Estrada Nacional', replacement: 'EN' },
|
|
14
|
+
//
|
|
15
|
+
// TML: People
|
|
16
|
+
{ enabled: true, phrase: 'Santo', replacement: 'Sto.' },
|
|
17
|
+
{ enabled: true, phrase: 'Santa', replacement: 'Sta.' },
|
|
18
|
+
//
|
|
19
|
+
// TML: Facilities
|
|
20
|
+
{ enabled: true, phrase: 'Cooperativa', replacement: 'Coop.' },
|
|
21
|
+
{ enabled: true, phrase: 'Câmara Municipal', replacement: 'CM' },
|
|
22
|
+
{ enabled: false, phrase: 'Hospital', replacement: 'Hosp.' },
|
|
23
|
+
{ enabled: false, phrase: 'Escola', replacement: 'Esc.' },
|
|
24
|
+
//
|
|
25
|
+
// CTT: Tipo de artéria
|
|
26
|
+
{ enabled: true, phrase: 'Alameda', replacement: 'Al.' },
|
|
27
|
+
{ enabled: true, phrase: 'Avenida', replacement: 'Av.' },
|
|
28
|
+
{ enabled: true, phrase: 'Azinhaga', replacement: 'Az.' },
|
|
29
|
+
{ enabled: true, phrase: 'Bairro', replacement: 'Br.' },
|
|
30
|
+
{ enabled: true, phrase: 'Beco', replacement: 'Bc.' },
|
|
31
|
+
{ enabled: true, phrase: 'Calçada', replacement: 'Cc.' },
|
|
32
|
+
{ enabled: true, phrase: 'Calçadinha', replacement: 'Ccnh.' },
|
|
33
|
+
{ enabled: true, phrase: 'Caminho', replacement: 'Cam.' },
|
|
34
|
+
{ enabled: true, phrase: 'Casa', replacement: 'Cs.' },
|
|
35
|
+
{ enabled: true, phrase: 'Conjunto', replacement: 'Cj.' },
|
|
36
|
+
{ enabled: true, phrase: 'Escadas', replacement: 'Esc.' },
|
|
37
|
+
{ enabled: true, phrase: 'Escadinhas', replacement: 'Escnh.' },
|
|
38
|
+
{ enabled: true, phrase: 'Estrada', replacement: 'Estr.' },
|
|
39
|
+
{ enabled: true, phrase: 'Jardim', replacement: 'Jd.' },
|
|
40
|
+
{ enabled: true, phrase: 'Loteamento', replacement: 'Lot.' },
|
|
41
|
+
{ enabled: true, phrase: 'Parque', replacement: 'Pq.' },
|
|
42
|
+
{ enabled: true, phrase: 'Pátio', replacement: 'Pat.' },
|
|
43
|
+
{ enabled: true, phrase: 'Praça', replacement: 'Pc.' },
|
|
44
|
+
{ enabled: true, phrase: 'Praceta', replacement: 'Pct.' },
|
|
45
|
+
{ enabled: true, phrase: 'Prolongamento', replacement: 'Prl.' },
|
|
46
|
+
{ enabled: true, phrase: 'Quadra', replacement: 'Qd.' },
|
|
47
|
+
{ enabled: true, phrase: 'Rotunda', replacement: 'Rot.' },
|
|
48
|
+
{ enabled: true, phrase: 'Rua', replacement: 'R.' },
|
|
49
|
+
{ enabled: true, phrase: 'Transversal', replacement: 'Transv.' },
|
|
50
|
+
{ enabled: true, phrase: 'Travessa', replacement: 'Tv.' },
|
|
51
|
+
{ enabled: true, phrase: 'Urbanização', replacement: 'Urb.' },
|
|
52
|
+
{ enabled: true, phrase: 'Vila', replacement: 'Vl.' },
|
|
53
|
+
{ enabled: true, phrase: 'Zona', replacement: 'Zn.' },
|
|
54
|
+
//
|
|
55
|
+
// CTT: Tipo de alojamento
|
|
56
|
+
{ enabled: true, phrase: 'Cave', replacement: 'Cv.' },
|
|
57
|
+
{ enabled: true, phrase: 'Direito', replacement: 'Dto.' },
|
|
58
|
+
{ enabled: true, phrase: 'Esquerdo', replacement: 'Esq.' },
|
|
59
|
+
{ enabled: true, phrase: 'Frente', replacement: 'Ft.' },
|
|
60
|
+
{ enabled: true, phrase: 'Fundos', replacement: 'Fds.' },
|
|
61
|
+
{ enabled: true, phrase: 'Habitação', replacement: 'Hab.' },
|
|
62
|
+
{ enabled: true, phrase: 'Loja', replacement: 'Lj.' },
|
|
63
|
+
{ enabled: true, phrase: 'Rés-do-chão', replacement: 'R/C' },
|
|
64
|
+
{ enabled: true, phrase: 'Sobreloja', replacement: 'Slj.' },
|
|
65
|
+
{ enabled: true, phrase: 'Subcave', replacement: 'Scv.' },
|
|
66
|
+
//
|
|
67
|
+
// CTT: Tipo de porta
|
|
68
|
+
{ enabled: true, phrase: 'Apartamento', replacement: 'Apto.' },
|
|
69
|
+
{ enabled: true, phrase: 'Bloco', replacement: 'Bl.' },
|
|
70
|
+
{ enabled: true, phrase: 'Edifício', replacement: 'Edf.' },
|
|
71
|
+
{ enabled: true, phrase: 'Lote', replacement: 'Lt.' },
|
|
72
|
+
{ enabled: true, phrase: 'Torre', replacement: 'Tr.' },
|
|
73
|
+
{ enabled: true, phrase: 'Vivenda', replacement: 'Vv.' },
|
|
74
|
+
//
|
|
75
|
+
// CTT: Abreviatura de título
|
|
76
|
+
{ enabled: true, phrase: 'Alferes', replacement: 'Alf.' },
|
|
77
|
+
{ enabled: true, phrase: 'Almirante', replacement: 'Alm.' },
|
|
78
|
+
{ enabled: true, phrase: 'Arquiteto', replacement: 'Arq.' },
|
|
79
|
+
{ enabled: true, phrase: 'Brigadeiro', replacement: 'Brig.' },
|
|
80
|
+
{ enabled: true, phrase: 'Capitão', replacement: 'Cap.' },
|
|
81
|
+
{ enabled: true, phrase: 'Comandante', replacement: 'Cmdt.' },
|
|
82
|
+
{ enabled: true, phrase: 'Comendador', replacement: 'Comend.' },
|
|
83
|
+
{ enabled: true, phrase: 'Conselheiro', replacement: 'Cons.' },
|
|
84
|
+
{ enabled: true, phrase: 'Coronel', replacement: 'Cel.' },
|
|
85
|
+
{ enabled: true, phrase: 'Dom', replacement: 'D.' },
|
|
86
|
+
{ enabled: true, phrase: 'Dona', replacement: 'Da.' },
|
|
87
|
+
{ enabled: true, phrase: 'Doutor', replacement: 'Dr.' },
|
|
88
|
+
{ enabled: true, phrase: 'Doutora', replacement: 'Dr.' },
|
|
89
|
+
{ enabled: true, phrase: 'Duque', replacement: 'Dq.' },
|
|
90
|
+
{ enabled: true, phrase: 'Embaixador', replacement: 'Emb.' },
|
|
91
|
+
{ enabled: true, phrase: 'Engenheira', replacement: 'Eng.' },
|
|
92
|
+
{ enabled: true, phrase: 'Engenheiro', replacement: 'Eng.' },
|
|
93
|
+
{ enabled: true, phrase: 'Frei', replacement: 'Fr.' },
|
|
94
|
+
{ enabled: true, phrase: 'General', replacement: 'Gen.' },
|
|
95
|
+
{ enabled: true, phrase: 'Infante', replacement: 'Inf.' },
|
|
96
|
+
{ enabled: true, phrase: 'Marquês', replacement: 'Mq.' },
|
|
97
|
+
{ enabled: true, phrase: 'Presidente', replacement: 'Pres.' },
|
|
98
|
+
{ enabled: true, phrase: 'Professor', replacement: 'Prof.' },
|
|
99
|
+
{ enabled: true, phrase: 'Professora', replacement: 'Prof.' },
|
|
100
|
+
{ enabled: true, phrase: 'São', replacement: 'S.' },
|
|
101
|
+
{ enabled: true, phrase: 'Sargento', replacement: 'Sarg.' },
|
|
102
|
+
{ enabled: true, phrase: 'Tenente', replacement: 'Ten.' },
|
|
103
|
+
{ enabled: true, phrase: 'Visconde', replacement: 'Visc.' },
|
|
104
|
+
//
|
|
105
|
+
// CTT: Diversos
|
|
106
|
+
{ enabled: true, phrase: 'Associação', replacement: 'Ass.' },
|
|
107
|
+
{ enabled: true, phrase: 'Instituto', replacement: 'Inst.' },
|
|
108
|
+
{ enabled: true, phrase: 'Lugar', replacement: 'Lug.' },
|
|
109
|
+
{ enabled: true, phrase: 'Ministério', replacement: 'Min.' },
|
|
110
|
+
{ enabled: true, phrase: 'Ministério', replacement: 'Min.' },
|
|
111
|
+
{ enabled: true, phrase: 'Projetada', replacement: 'Proj.' },
|
|
112
|
+
{ enabled: true, phrase: 'Sala', replacement: 'Sl.' },
|
|
113
|
+
{ enabled: true, phrase: 'Sem Número', replacement: 'S/N' },
|
|
114
|
+
{ enabled: true, phrase: 'Sociedade', replacement: 'Soc.' },
|
|
115
|
+
{ enabled: false, phrase: 'Universidade', replacement: 'Univ.' },
|
|
116
|
+
//
|
|
117
|
+
];
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ParentStationSchema: z.ZodObject<{
|
|
3
|
+
created_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
|
|
4
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
5
|
+
is_locked: z.ZodDefault<z.ZodBoolean>;
|
|
6
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
|
|
7
|
+
updated_by: z.ZodOptional<z.ZodString>;
|
|
8
|
+
} & {
|
|
9
|
+
_id: z.ZodString;
|
|
10
|
+
stop_ids: z.ZodArray<z.ZodString, "many">;
|
|
11
|
+
title: z.ZodString;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
_id: string;
|
|
14
|
+
created_at: number & {
|
|
15
|
+
__brand: "UnixTimestamp";
|
|
16
|
+
};
|
|
17
|
+
is_locked: boolean;
|
|
18
|
+
updated_at: number & {
|
|
19
|
+
__brand: "UnixTimestamp";
|
|
20
|
+
};
|
|
21
|
+
title: string;
|
|
22
|
+
stop_ids: string[];
|
|
23
|
+
created_by?: string | undefined;
|
|
24
|
+
updated_by?: string | undefined;
|
|
25
|
+
}, {
|
|
26
|
+
_id: string;
|
|
27
|
+
created_at: number;
|
|
28
|
+
updated_at: number;
|
|
29
|
+
title: string;
|
|
30
|
+
stop_ids: string[];
|
|
31
|
+
created_by?: string | undefined;
|
|
32
|
+
is_locked?: boolean | undefined;
|
|
33
|
+
updated_by?: string | undefined;
|
|
34
|
+
}>;
|
|
35
|
+
export declare const CreateParentStationSchema: z.ZodObject<Omit<{
|
|
36
|
+
created_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
|
|
37
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
38
|
+
is_locked: z.ZodDefault<z.ZodBoolean>;
|
|
39
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
|
|
40
|
+
updated_by: z.ZodOptional<z.ZodString>;
|
|
41
|
+
} & {
|
|
42
|
+
_id: z.ZodString;
|
|
43
|
+
stop_ids: z.ZodArray<z.ZodString, "many">;
|
|
44
|
+
title: z.ZodString;
|
|
45
|
+
}, "_id" | "created_at" | "updated_at">, "strip", z.ZodTypeAny, {
|
|
46
|
+
is_locked: boolean;
|
|
47
|
+
title: string;
|
|
48
|
+
stop_ids: string[];
|
|
49
|
+
created_by?: string | undefined;
|
|
50
|
+
updated_by?: string | undefined;
|
|
51
|
+
}, {
|
|
52
|
+
title: string;
|
|
53
|
+
stop_ids: string[];
|
|
54
|
+
created_by?: string | undefined;
|
|
55
|
+
is_locked?: boolean | undefined;
|
|
56
|
+
updated_by?: string | undefined;
|
|
57
|
+
}>;
|
|
58
|
+
export declare const UpdateParentStationSchema: z.ZodObject<{
|
|
59
|
+
is_locked: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
60
|
+
updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
61
|
+
title: z.ZodOptional<z.ZodString>;
|
|
62
|
+
stop_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
63
|
+
}, "strip", z.ZodTypeAny, {
|
|
64
|
+
is_locked?: boolean | undefined;
|
|
65
|
+
updated_by?: string | undefined;
|
|
66
|
+
title?: string | undefined;
|
|
67
|
+
stop_ids?: string[] | undefined;
|
|
68
|
+
}, {
|
|
69
|
+
is_locked?: boolean | undefined;
|
|
70
|
+
updated_by?: string | undefined;
|
|
71
|
+
title?: string | undefined;
|
|
72
|
+
stop_ids?: string[] | undefined;
|
|
73
|
+
}>;
|
|
74
|
+
export type ParentStation = z.infer<typeof ParentStationSchema>;
|
|
75
|
+
export type CreateParentStationDto = z.infer<typeof CreateParentStationSchema>;
|
|
76
|
+
export type UpdateParentStationDto = z.infer<typeof UpdateParentStationSchema>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { DocumentSchema } from '../_common/document.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
/* * */
|
|
5
|
+
export const ParentStationSchema = DocumentSchema.extend({
|
|
6
|
+
_id: z.string(),
|
|
7
|
+
stop_ids: z.array(z.string()),
|
|
8
|
+
title: z.string(),
|
|
9
|
+
});
|
|
10
|
+
export const CreateParentStationSchema = ParentStationSchema.omit({ _id: true, created_at: true, updated_at: true });
|
|
11
|
+
export const UpdateParentStationSchema = CreateParentStationSchema.omit({ created_by: true }).partial();
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
/* * */
|
|
4
|
+
const StopRoadTypeValues = [
|
|
5
|
+
'complementary_itinerary',
|
|
6
|
+
'highway',
|
|
7
|
+
'main_itinerary',
|
|
8
|
+
'national_road',
|
|
9
|
+
'regional_road',
|
|
10
|
+
'secondary_road',
|
|
11
|
+
'unknown',
|
|
12
|
+
];
|
|
13
|
+
export const StopRoadTypeSchema = z.enum(StopRoadTypeValues);
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const StopAreaSchema: z.ZodObject<{
|
|
3
|
+
created_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
|
|
4
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
5
|
+
is_locked: z.ZodDefault<z.ZodBoolean>;
|
|
6
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
|
|
7
|
+
updated_by: z.ZodOptional<z.ZodString>;
|
|
8
|
+
} & {
|
|
9
|
+
_id: z.ZodString;
|
|
10
|
+
parent_station_ids: z.ZodArray<z.ZodString, "many">;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
_id: string;
|
|
13
|
+
created_at: number & {
|
|
14
|
+
__brand: "UnixTimestamp";
|
|
15
|
+
};
|
|
16
|
+
is_locked: boolean;
|
|
17
|
+
updated_at: number & {
|
|
18
|
+
__brand: "UnixTimestamp";
|
|
19
|
+
};
|
|
20
|
+
parent_station_ids: string[];
|
|
21
|
+
created_by?: string | undefined;
|
|
22
|
+
updated_by?: string | undefined;
|
|
23
|
+
}, {
|
|
24
|
+
_id: string;
|
|
25
|
+
created_at: number;
|
|
26
|
+
updated_at: number;
|
|
27
|
+
parent_station_ids: string[];
|
|
28
|
+
created_by?: string | undefined;
|
|
29
|
+
is_locked?: boolean | undefined;
|
|
30
|
+
updated_by?: string | undefined;
|
|
31
|
+
}>;
|
|
32
|
+
export declare const CreateStopAreaSchema: z.ZodObject<Omit<{
|
|
33
|
+
created_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
|
|
34
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
35
|
+
is_locked: z.ZodDefault<z.ZodBoolean>;
|
|
36
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
|
|
37
|
+
updated_by: z.ZodOptional<z.ZodString>;
|
|
38
|
+
} & {
|
|
39
|
+
_id: z.ZodString;
|
|
40
|
+
parent_station_ids: z.ZodArray<z.ZodString, "many">;
|
|
41
|
+
}, "_id" | "created_at" | "updated_at">, "strip", z.ZodTypeAny, {
|
|
42
|
+
is_locked: boolean;
|
|
43
|
+
parent_station_ids: string[];
|
|
44
|
+
created_by?: string | undefined;
|
|
45
|
+
updated_by?: string | undefined;
|
|
46
|
+
}, {
|
|
47
|
+
parent_station_ids: string[];
|
|
48
|
+
created_by?: string | undefined;
|
|
49
|
+
is_locked?: boolean | undefined;
|
|
50
|
+
updated_by?: string | undefined;
|
|
51
|
+
}>;
|
|
52
|
+
export declare const UpdateStopAreaSchema: z.ZodObject<{
|
|
53
|
+
is_locked: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
54
|
+
updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
55
|
+
parent_station_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
56
|
+
}, "strip", z.ZodTypeAny, {
|
|
57
|
+
is_locked?: boolean | undefined;
|
|
58
|
+
updated_by?: string | undefined;
|
|
59
|
+
parent_station_ids?: string[] | undefined;
|
|
60
|
+
}, {
|
|
61
|
+
is_locked?: boolean | undefined;
|
|
62
|
+
updated_by?: string | undefined;
|
|
63
|
+
parent_station_ids?: string[] | undefined;
|
|
64
|
+
}>;
|
|
65
|
+
export type StopArea = z.infer<typeof StopAreaSchema>;
|
|
66
|
+
export type CreateStopAreaDto = z.infer<typeof CreateStopAreaSchema>;
|
|
67
|
+
export type UpdateStopAreaDto = z.infer<typeof UpdateStopAreaSchema>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { DocumentSchema } from '../_common/document.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
/* * */
|
|
5
|
+
export const StopAreaSchema = DocumentSchema.extend({
|
|
6
|
+
_id: z.string(),
|
|
7
|
+
parent_station_ids: z.array(z.string()),
|
|
8
|
+
});
|
|
9
|
+
export const CreateStopAreaSchema = StopAreaSchema.omit({ _id: true, created_at: true, updated_at: true });
|
|
10
|
+
export const UpdateStopAreaSchema = CreateStopAreaSchema.omit({ created_by: true }).partial();
|