@tmlmobilidade/types 20250909.1559.44 → 20250910.1526.7

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 (37) hide show
  1. package/dist/src/_common/comment.d.ts +247 -16
  2. package/dist/src/_common/comment.js +36 -5
  3. package/dist/src/_common/document.d.ts +14 -8
  4. package/dist/src/_common/document.js +5 -3
  5. package/dist/src/_common/proposed-change.d.ts +37 -19
  6. package/dist/src/_common/unix-timestamp.d.ts +1 -1
  7. package/dist/src/_common/unix-timestamp.js +1 -2
  8. package/dist/src/agency.d.ts +30 -12
  9. package/dist/src/alert.d.ts +52 -59
  10. package/dist/src/auth/role.d.ts +30 -12
  11. package/dist/src/auth/session.d.ts +30 -12
  12. package/dist/src/auth/user.d.ts +30 -12
  13. package/dist/src/auth/verification-token.d.ts +30 -12
  14. package/dist/src/file.d.ts +23 -23
  15. package/dist/src/organization.d.ts +30 -12
  16. package/dist/src/plans/gtfs-validation.d.ts +30 -12
  17. package/dist/src/plans/plan.d.ts +30 -12
  18. package/dist/src/rides/index.d.ts +2 -1
  19. package/dist/src/rides/index.js +2 -1
  20. package/dist/src/rides/ride-audit.d.ts +729 -0
  21. package/dist/src/rides/ride-audit.js +12 -0
  22. package/dist/src/rides/ride-justification.d.ts +959 -0
  23. package/dist/src/rides/ride-justification.js +64 -0
  24. package/dist/src/rides/ride-overrides.d.ts +9 -0
  25. package/dist/src/rides/ride-overrides.js +6 -0
  26. package/dist/src/rides/ride.d.ts +38 -20
  27. package/dist/src/sams/sam.d.ts +30 -12
  28. package/dist/src/simplified-apex/simplified-apex-location.d.ts +32 -24
  29. package/dist/src/simplified-apex/simplified-apex-on-board-refund.d.ts +32 -24
  30. package/dist/src/simplified-apex/simplified-apex-on-board-sale.d.ts +32 -24
  31. package/dist/src/simplified-apex/simplified-apex-validation.d.ts +36 -28
  32. package/dist/src/stop.d.ts +713 -188
  33. package/dist/src/vehicle-event.d.ts +18 -12
  34. package/dist/src/zone.d.ts +24 -6
  35. package/package.json +1 -1
  36. package/dist/src/rides/ride-annotation.d.ts +0 -579
  37. package/dist/src/rides/ride-annotation.js +0 -34
@@ -2,8 +2,10 @@ import { type UnixTimestamp } from './_common/unix-timestamp.js';
2
2
  import { z } from 'zod';
3
3
  export declare const VehicleEventSchema: z.ZodObject<{
4
4
  _id: z.ZodString;
5
- created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
6
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
5
+ created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
6
+ created_by: z.ZodDefault<z.ZodString>;
7
+ updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
8
+ updated_by: z.ZodDefault<z.ZodString>;
7
9
  } & {
8
10
  agency_id: z.ZodString;
9
11
  driver_id: z.ZodString;
@@ -21,9 +23,17 @@ export declare const VehicleEventSchema: z.ZodObject<{
21
23
  vehicle_id: z.ZodString;
22
24
  }, "strict", z.ZodTypeAny, {
23
25
  _id: string;
26
+ created_at: number & {
27
+ __brand: "UnixTimestamp";
28
+ };
29
+ created_by: string;
30
+ updated_at: number & {
31
+ __brand: "UnixTimestamp";
32
+ };
33
+ updated_by: string;
24
34
  agency_id: string;
25
- trip_id: string;
26
35
  pattern_id: string;
36
+ trip_id: string;
27
37
  vehicle_id: string;
28
38
  received_at: number & {
29
39
  __brand: "UnixTimestamp";
@@ -36,18 +46,14 @@ export declare const VehicleEventSchema: z.ZodObject<{
36
46
  odometer: number;
37
47
  trigger_activity: string;
38
48
  trigger_door: string;
39
- created_at?: (number & {
40
- __brand: "UnixTimestamp";
41
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
42
- updated_at?: (number & {
43
- __brand: "UnixTimestamp";
44
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
45
49
  extra_trip_id?: string | null | undefined;
46
50
  }, {
47
51
  _id: string;
52
+ created_at: number;
53
+ updated_at: number;
48
54
  agency_id: string;
49
- trip_id: string;
50
55
  pattern_id: string;
56
+ trip_id: string;
51
57
  vehicle_id: string;
52
58
  received_at: number;
53
59
  stop_id: string;
@@ -58,8 +64,8 @@ export declare const VehicleEventSchema: z.ZodObject<{
58
64
  odometer: number;
59
65
  trigger_activity: string;
60
66
  trigger_door: string;
61
- created_at?: number | null | undefined;
62
- updated_at?: number | null | undefined;
67
+ created_by?: string | undefined;
68
+ updated_by?: string | undefined;
63
69
  extra_trip_id?: string | null | undefined;
64
70
  }>;
65
71
  /**
@@ -2,7 +2,9 @@ import { type GeoJSON } from 'geojson';
2
2
  import { z } from 'zod';
3
3
  export declare const ZoneSchema: z.ZodObject<{
4
4
  _id: z.ZodString;
5
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>;
5
+ created_by: z.ZodDefault<z.ZodString>;
6
+ updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
7
+ updated_by: z.ZodDefault<z.ZodString>;
6
8
  } & {
7
9
  border_color: z.ZodString;
8
10
  border_opacity: z.ZodNumber;
@@ -17,6 +19,11 @@ export declare const ZoneSchema: z.ZodObject<{
17
19
  }, "strict", z.ZodTypeAny, {
18
20
  _id: string;
19
21
  created_at: Date;
22
+ created_by: string;
23
+ updated_at: number & {
24
+ __brand: "UnixTimestamp";
25
+ };
26
+ updated_by: string;
20
27
  code: string;
21
28
  name: string;
22
29
  geojson: Record<string, any>;
@@ -26,12 +33,10 @@ export declare const ZoneSchema: z.ZodObject<{
26
33
  border_width: number;
27
34
  fill_color: string;
28
35
  fill_opacity: number;
29
- updated_at?: (number & {
30
- __brand: "UnixTimestamp";
31
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
32
36
  }, {
33
37
  _id: string;
34
38
  created_at: Date;
39
+ updated_at: number;
35
40
  code: string;
36
41
  name: string;
37
42
  geojson: Record<string, any>;
@@ -41,11 +46,14 @@ export declare const ZoneSchema: z.ZodObject<{
41
46
  border_width: number;
42
47
  fill_color: string;
43
48
  fill_opacity: number;
44
- updated_at?: number | null | undefined;
49
+ created_by?: string | undefined;
50
+ updated_by?: string | undefined;
45
51
  }>;
46
52
  export declare const CreateZoneSchema: z.ZodObject<Omit<{
47
53
  _id: z.ZodString;
48
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>;
54
+ created_by: z.ZodDefault<z.ZodString>;
55
+ updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
56
+ updated_by: z.ZodDefault<z.ZodString>;
49
57
  } & {
50
58
  border_color: z.ZodString;
51
59
  border_opacity: z.ZodNumber;
@@ -58,6 +66,8 @@ export declare const CreateZoneSchema: z.ZodObject<Omit<{
58
66
  is_locked: z.ZodBoolean;
59
67
  name: z.ZodString;
60
68
  }, "_id" | "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
69
+ created_by: string;
70
+ updated_by: string;
61
71
  code: string;
62
72
  name: string;
63
73
  geojson: Record<string, any>;
@@ -77,8 +87,12 @@ export declare const CreateZoneSchema: z.ZodObject<Omit<{
77
87
  border_width: number;
78
88
  fill_color: string;
79
89
  fill_opacity: number;
90
+ created_by?: string | undefined;
91
+ updated_by?: string | undefined;
80
92
  }>;
81
93
  export declare const UpdateZoneSchema: z.ZodObject<{
94
+ created_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
95
+ updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
82
96
  code: z.ZodOptional<z.ZodString>;
83
97
  name: z.ZodOptional<z.ZodString>;
84
98
  geojson: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
@@ -89,6 +103,8 @@ export declare const UpdateZoneSchema: z.ZodObject<{
89
103
  fill_color: z.ZodOptional<z.ZodString>;
90
104
  fill_opacity: z.ZodOptional<z.ZodNumber>;
91
105
  }, "strict", z.ZodTypeAny, {
106
+ created_by?: string | undefined;
107
+ updated_by?: string | undefined;
92
108
  code?: string | undefined;
93
109
  name?: string | undefined;
94
110
  geojson?: Record<string, any> | undefined;
@@ -99,6 +115,8 @@ export declare const UpdateZoneSchema: z.ZodObject<{
99
115
  fill_color?: string | undefined;
100
116
  fill_opacity?: number | undefined;
101
117
  }, {
118
+ created_by?: string | undefined;
119
+ updated_by?: string | undefined;
102
120
  code?: string | undefined;
103
121
  name?: string | undefined;
104
122
  geojson?: Record<string, any> | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmlmobilidade/types",
3
- "version": "20250909.1559.44",
3
+ "version": "20250910.1526.7",
4
4
  "author": "João de Vasconcelos & Jusi Monteiro",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "homepage": "https://github.com/tmlmobilidade/services#readme",