@tmlmobilidade/go-types-apex 20260611.1527.25

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 (57) hide show
  1. package/dist/index.d.ts +2 -0
  2. package/dist/index.js +2 -0
  3. package/dist/raw/banking-taps/banking-tap-v4-0.d.ts +669 -0
  4. package/dist/raw/banking-taps/banking-tap-v4-0.js +65 -0
  5. package/dist/raw/banking-taps/index.d.ts +1 -0
  6. package/dist/raw/banking-taps/index.js +1 -0
  7. package/dist/raw/index.d.ts +7 -0
  8. package/dist/raw/index.js +7 -0
  9. package/dist/raw/inspections/index.d.ts +2 -0
  10. package/dist/raw/inspections/index.js +2 -0
  11. package/dist/raw/inspections/inspection-decision-v2-0.d.ts +481 -0
  12. package/dist/raw/inspections/inspection-decision-v2-0.js +49 -0
  13. package/dist/raw/inspections/inspection-v2-0.d.ts +961 -0
  14. package/dist/raw/inspections/inspection-v2-0.js +89 -0
  15. package/dist/raw/locations/index.d.ts +1 -0
  16. package/dist/raw/locations/index.js +1 -0
  17. package/dist/raw/locations/location-v3-0.d.ts +645 -0
  18. package/dist/raw/locations/location-v3-0.js +63 -0
  19. package/dist/raw/raw-apex-transaction-base.d.ts +30 -0
  20. package/dist/raw/raw-apex-transaction-base.js +13 -0
  21. package/dist/raw/raw-apex-transaction.d.ts +3662 -0
  22. package/dist/raw/raw-apex-transaction.js +21 -0
  23. package/dist/raw/sales/index.d.ts +2 -0
  24. package/dist/raw/sales/index.js +2 -0
  25. package/dist/raw/sales/refund-v3-0.d.ts +769 -0
  26. package/dist/raw/sales/refund-v3-0.js +74 -0
  27. package/dist/raw/sales/sale-v3-0.d.ts +757 -0
  28. package/dist/raw/sales/sale-v3-0.js +73 -0
  29. package/dist/raw/validations/index.d.ts +2 -0
  30. package/dist/raw/validations/index.js +2 -0
  31. package/dist/raw/validations/validation-v2-0.d.ts +901 -0
  32. package/dist/raw/validations/validation-v2-0.js +85 -0
  33. package/dist/raw/validations/validation-v3-0.d.ts +901 -0
  34. package/dist/raw/validations/validation-v3-0.js +85 -0
  35. package/dist/simplified/any-simplified-apex.d.ts +8 -0
  36. package/dist/simplified/any-simplified-apex.js +2 -0
  37. package/dist/simplified/apex-validation-status.d.ts +145 -0
  38. package/dist/simplified/apex-validation-status.js +76 -0
  39. package/dist/simplified/index.d.ts +10 -0
  40. package/dist/simplified/index.js +10 -0
  41. package/dist/simplified/simplified-apex-banking-taps.d.ts +81 -0
  42. package/dist/simplified/simplified-apex-banking-taps.js +27 -0
  43. package/dist/simplified/simplified-apex-inspection-decision.d.ts +55 -0
  44. package/dist/simplified/simplified-apex-inspection-decision.js +18 -0
  45. package/dist/simplified/simplified-apex-inspection.d.ts +82 -0
  46. package/dist/simplified/simplified-apex-inspection.js +27 -0
  47. package/dist/simplified/simplified-apex-location.d.ts +112 -0
  48. package/dist/simplified/simplified-apex-location.js +20 -0
  49. package/dist/simplified/simplified-apex-on-board-refund.d.ts +172 -0
  50. package/dist/simplified/simplified-apex-on-board-refund.js +30 -0
  51. package/dist/simplified/simplified-apex-on-board-sale.d.ts +178 -0
  52. package/dist/simplified/simplified-apex-on-board-sale.js +31 -0
  53. package/dist/simplified/simplified-apex-type.d.ts +9 -0
  54. package/dist/simplified/simplified-apex-type.js +5 -0
  55. package/dist/simplified/simplified-apex-validation.d.ts +200 -0
  56. package/dist/simplified/simplified-apex-validation.js +41 -0
  57. package/package.json +49 -0
@@ -0,0 +1,112 @@
1
+ import { z } from 'zod';
2
+ export declare const SimplifiedApexLocationSchema: z.ZodObject<Omit<{
3
+ _id: z.ZodString;
4
+ created_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
5
+ created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
6
+ is_locked: z.ZodDefault<z.ZodBoolean>;
7
+ updated_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
8
+ updated_by: z.ZodOptional<z.ZodString>;
9
+ }, "created_by" | "is_locked" | "updated_by"> & {
10
+ agency_id: z.ZodString;
11
+ apex_version: z.ZodString;
12
+ device_id: z.ZodString;
13
+ line_id: z.ZodString;
14
+ mac_ase_counter_value: z.ZodNumber;
15
+ mac_sam_serial_number: z.ZodNumber;
16
+ pattern_id: z.ZodString;
17
+ received_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
18
+ stop_id: z.ZodString;
19
+ trip_id: z.ZodString;
20
+ vehicle_id: z.ZodNumber;
21
+ }, "strip", z.ZodTypeAny, {
22
+ _id: string;
23
+ agency_id: string;
24
+ created_at: number & {
25
+ __brand: "UnixTimestamp";
26
+ };
27
+ received_at: number & {
28
+ __brand: "UnixTimestamp";
29
+ };
30
+ apex_version: string;
31
+ device_id: string;
32
+ line_id: string;
33
+ mac_ase_counter_value: number;
34
+ mac_sam_serial_number: number;
35
+ pattern_id: string;
36
+ stop_id: string;
37
+ trip_id: string;
38
+ vehicle_id: number;
39
+ updated_at: number & {
40
+ __brand: "UnixTimestamp";
41
+ };
42
+ }, {
43
+ _id: string;
44
+ agency_id: string;
45
+ created_at: number;
46
+ received_at: number;
47
+ apex_version: string;
48
+ device_id: string;
49
+ line_id: string;
50
+ mac_ase_counter_value: number;
51
+ mac_sam_serial_number: number;
52
+ pattern_id: string;
53
+ stop_id: string;
54
+ trip_id: string;
55
+ vehicle_id: number;
56
+ updated_at: number;
57
+ }>;
58
+ export declare const UpdateSimplifiedApexLocationSchema: z.ZodObject<{
59
+ _id: z.ZodOptional<z.ZodString>;
60
+ created_at: z.ZodOptional<z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>>;
61
+ updated_at: z.ZodOptional<z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>>;
62
+ agency_id: z.ZodOptional<z.ZodString>;
63
+ apex_version: z.ZodOptional<z.ZodString>;
64
+ device_id: z.ZodOptional<z.ZodString>;
65
+ line_id: z.ZodOptional<z.ZodString>;
66
+ mac_ase_counter_value: z.ZodOptional<z.ZodNumber>;
67
+ mac_sam_serial_number: z.ZodOptional<z.ZodNumber>;
68
+ pattern_id: z.ZodOptional<z.ZodString>;
69
+ received_at: z.ZodOptional<z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>>;
70
+ stop_id: z.ZodOptional<z.ZodString>;
71
+ trip_id: z.ZodOptional<z.ZodString>;
72
+ vehicle_id: z.ZodOptional<z.ZodNumber>;
73
+ }, "strip", z.ZodTypeAny, {
74
+ _id?: string | undefined;
75
+ agency_id?: string | undefined;
76
+ created_at?: import("@tmlmobilidade/go-types-shared").UnixTimestamp | undefined;
77
+ received_at?: import("@tmlmobilidade/go-types-shared").UnixTimestamp | undefined;
78
+ apex_version?: string | undefined;
79
+ device_id?: string | undefined;
80
+ line_id?: string | undefined;
81
+ mac_ase_counter_value?: number | undefined;
82
+ mac_sam_serial_number?: number | undefined;
83
+ pattern_id?: string | undefined;
84
+ stop_id?: string | undefined;
85
+ trip_id?: string | undefined;
86
+ vehicle_id?: number | undefined;
87
+ updated_at?: import("@tmlmobilidade/go-types-shared").UnixTimestamp | undefined;
88
+ }, {
89
+ _id?: string | undefined;
90
+ agency_id?: string | undefined;
91
+ created_at?: number | undefined;
92
+ received_at?: number | undefined;
93
+ apex_version?: string | undefined;
94
+ device_id?: string | undefined;
95
+ line_id?: string | undefined;
96
+ mac_ase_counter_value?: number | undefined;
97
+ mac_sam_serial_number?: number | undefined;
98
+ pattern_id?: string | undefined;
99
+ stop_id?: string | undefined;
100
+ trip_id?: string | undefined;
101
+ vehicle_id?: number | undefined;
102
+ updated_at?: number | undefined;
103
+ }>;
104
+ /**
105
+ * APEX Locations are APEX transactions of type 19 that are generated every time the
106
+ * setContext or setLocation functions are called. These functions are used to set
107
+ * the service context of the validator machine, allowing for the correct sale and validation
108
+ * of products. In summary, these transactions are generated every time the vehicle has a change
109
+ * in the current stop ID, trip ID, route ID, pattern ID, etc.
110
+ */
111
+ export type SimplifiedApexLocation = z.infer<typeof SimplifiedApexLocationSchema>;
112
+ export type UpdateSimplifiedApexLocationDto = z.infer<typeof UpdateSimplifiedApexLocationSchema>;
@@ -0,0 +1,20 @@
1
+ /* * */
2
+ import { DocumentSchema, UnixTimestampSchema } from '@tmlmobilidade/go-types-shared';
3
+ import { z } from 'zod';
4
+ /* * */
5
+ export const SimplifiedApexLocationSchema = DocumentSchema
6
+ .omit({ created_by: true, is_locked: true, updated_by: true })
7
+ .extend({
8
+ agency_id: z.string(),
9
+ apex_version: z.string(),
10
+ device_id: z.string(),
11
+ line_id: z.string(),
12
+ mac_ase_counter_value: z.number(),
13
+ mac_sam_serial_number: z.number(),
14
+ pattern_id: z.string(),
15
+ received_at: UnixTimestampSchema,
16
+ stop_id: z.string(),
17
+ trip_id: z.string(),
18
+ vehicle_id: z.number(),
19
+ });
20
+ export const UpdateSimplifiedApexLocationSchema = SimplifiedApexLocationSchema.partial();
@@ -0,0 +1,172 @@
1
+ import { z } from 'zod';
2
+ export declare const SimplifiedApexOnBoardRefundSchema: z.ZodObject<Omit<{
3
+ _id: z.ZodString;
4
+ created_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
5
+ created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
6
+ is_locked: z.ZodDefault<z.ZodBoolean>;
7
+ updated_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
8
+ updated_by: z.ZodOptional<z.ZodString>;
9
+ }, "created_by" | "is_locked" | "updated_by"> & {
10
+ agency_id: z.ZodString;
11
+ apex_version: z.ZodString;
12
+ block_id: z.ZodNullable<z.ZodString>;
13
+ card_physical_type: z.ZodNumber;
14
+ card_serial_number: z.ZodString;
15
+ device_id: z.ZodString;
16
+ duty_id: z.ZodNullable<z.ZodString>;
17
+ line_id: z.ZodNullable<z.ZodString>;
18
+ mac_ase_counter_value: z.ZodNumber;
19
+ mac_sam_serial_number: z.ZodNumber;
20
+ on_board_sale_id: z.ZodNullable<z.ZodString>;
21
+ pattern_id: z.ZodNullable<z.ZodString>;
22
+ payment_method: z.ZodNumber;
23
+ price: z.ZodNumber;
24
+ product_long_id: z.ZodString;
25
+ product_quantity: z.ZodNumber;
26
+ received_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
27
+ stop_id: z.ZodNullable<z.ZodString>;
28
+ trip_id: z.ZodNullable<z.ZodString>;
29
+ validation_id: z.ZodNullable<z.ZodString>;
30
+ vehicle_id: z.ZodNullable<z.ZodNumber>;
31
+ }, "strip", z.ZodTypeAny, {
32
+ _id: string;
33
+ agency_id: string;
34
+ created_at: number & {
35
+ __brand: "UnixTimestamp";
36
+ };
37
+ received_at: number & {
38
+ __brand: "UnixTimestamp";
39
+ };
40
+ price: number;
41
+ apex_version: string;
42
+ device_id: string;
43
+ line_id: string | null;
44
+ mac_ase_counter_value: number;
45
+ mac_sam_serial_number: number;
46
+ pattern_id: string | null;
47
+ stop_id: string | null;
48
+ trip_id: string | null;
49
+ vehicle_id: number | null;
50
+ card_serial_number: string;
51
+ updated_at: number & {
52
+ __brand: "UnixTimestamp";
53
+ };
54
+ block_id: string | null;
55
+ card_physical_type: number;
56
+ duty_id: string | null;
57
+ on_board_sale_id: string | null;
58
+ payment_method: number;
59
+ product_long_id: string;
60
+ product_quantity: number;
61
+ validation_id: string | null;
62
+ }, {
63
+ _id: string;
64
+ agency_id: string;
65
+ created_at: number;
66
+ received_at: number;
67
+ price: number;
68
+ apex_version: string;
69
+ device_id: string;
70
+ line_id: string | null;
71
+ mac_ase_counter_value: number;
72
+ mac_sam_serial_number: number;
73
+ pattern_id: string | null;
74
+ stop_id: string | null;
75
+ trip_id: string | null;
76
+ vehicle_id: number | null;
77
+ card_serial_number: string;
78
+ updated_at: number;
79
+ block_id: string | null;
80
+ card_physical_type: number;
81
+ duty_id: string | null;
82
+ on_board_sale_id: string | null;
83
+ payment_method: number;
84
+ product_long_id: string;
85
+ product_quantity: number;
86
+ validation_id: string | null;
87
+ }>;
88
+ export declare const UpdateSimplifiedApexOnBoardRefundSchema: z.ZodObject<{
89
+ _id: z.ZodOptional<z.ZodString>;
90
+ created_at: z.ZodOptional<z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>>;
91
+ updated_at: z.ZodOptional<z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>>;
92
+ agency_id: z.ZodOptional<z.ZodString>;
93
+ apex_version: z.ZodOptional<z.ZodString>;
94
+ block_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
95
+ card_physical_type: z.ZodOptional<z.ZodNumber>;
96
+ card_serial_number: z.ZodOptional<z.ZodString>;
97
+ device_id: z.ZodOptional<z.ZodString>;
98
+ duty_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
99
+ line_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
100
+ mac_ase_counter_value: z.ZodOptional<z.ZodNumber>;
101
+ mac_sam_serial_number: z.ZodOptional<z.ZodNumber>;
102
+ on_board_sale_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
103
+ pattern_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
104
+ payment_method: z.ZodOptional<z.ZodNumber>;
105
+ price: z.ZodOptional<z.ZodNumber>;
106
+ product_long_id: z.ZodOptional<z.ZodString>;
107
+ product_quantity: z.ZodOptional<z.ZodNumber>;
108
+ received_at: z.ZodOptional<z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>>;
109
+ stop_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
110
+ trip_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
111
+ validation_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
112
+ vehicle_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
113
+ }, "strip", z.ZodTypeAny, {
114
+ _id?: string | undefined;
115
+ agency_id?: string | undefined;
116
+ created_at?: import("@tmlmobilidade/go-types-shared").UnixTimestamp | undefined;
117
+ received_at?: import("@tmlmobilidade/go-types-shared").UnixTimestamp | undefined;
118
+ price?: number | undefined;
119
+ apex_version?: string | undefined;
120
+ device_id?: string | undefined;
121
+ line_id?: string | null | undefined;
122
+ mac_ase_counter_value?: number | undefined;
123
+ mac_sam_serial_number?: number | undefined;
124
+ pattern_id?: string | null | undefined;
125
+ stop_id?: string | null | undefined;
126
+ trip_id?: string | null | undefined;
127
+ vehicle_id?: number | null | undefined;
128
+ card_serial_number?: string | undefined;
129
+ updated_at?: import("@tmlmobilidade/go-types-shared").UnixTimestamp | undefined;
130
+ block_id?: string | null | undefined;
131
+ card_physical_type?: number | undefined;
132
+ duty_id?: string | null | undefined;
133
+ on_board_sale_id?: string | null | undefined;
134
+ payment_method?: number | undefined;
135
+ product_long_id?: string | undefined;
136
+ product_quantity?: number | undefined;
137
+ validation_id?: string | null | undefined;
138
+ }, {
139
+ _id?: string | undefined;
140
+ agency_id?: string | undefined;
141
+ created_at?: number | undefined;
142
+ received_at?: number | undefined;
143
+ price?: number | undefined;
144
+ apex_version?: string | undefined;
145
+ device_id?: string | undefined;
146
+ line_id?: string | null | undefined;
147
+ mac_ase_counter_value?: number | undefined;
148
+ mac_sam_serial_number?: number | undefined;
149
+ pattern_id?: string | null | undefined;
150
+ stop_id?: string | null | undefined;
151
+ trip_id?: string | null | undefined;
152
+ vehicle_id?: number | null | undefined;
153
+ card_serial_number?: string | undefined;
154
+ updated_at?: number | undefined;
155
+ block_id?: string | null | undefined;
156
+ card_physical_type?: number | undefined;
157
+ duty_id?: string | null | undefined;
158
+ on_board_sale_id?: string | null | undefined;
159
+ payment_method?: number | undefined;
160
+ product_long_id?: string | undefined;
161
+ product_quantity?: number | undefined;
162
+ validation_id?: string | null | undefined;
163
+ }>;
164
+ /**
165
+ * APEX OnBoard Refunds are APEX transactions of type 3 that are generated whenever a sale
166
+ * of an on-board ticket occurs. Even though sales can be of anything (tickets, cards, contracts, merchandising items)
167
+ * and anywhere (inside vehicles, at vending machines, at ticket offices or online), here they are already filtered
168
+ * for on-board ticket sales inside vehicles only. Refunds of tickets when inside vehicles also generate a validation transaction.
169
+ * Refunds can be refunded, and refunds are also APEX transactions of type 3.
170
+ */
171
+ export type SimplifiedApexOnBoardRefund = z.infer<typeof SimplifiedApexOnBoardRefundSchema>;
172
+ export type UpdateSimplifiedApexOnBoardRefundDto = z.infer<typeof UpdateSimplifiedApexOnBoardRefundSchema>;
@@ -0,0 +1,30 @@
1
+ /* * */
2
+ import { DocumentSchema, UnixTimestampSchema } from '@tmlmobilidade/go-types-shared';
3
+ import { z } from 'zod';
4
+ /* * */
5
+ export const SimplifiedApexOnBoardRefundSchema = DocumentSchema
6
+ .omit({ created_by: true, is_locked: true, updated_by: true })
7
+ .extend({
8
+ agency_id: z.string(),
9
+ apex_version: z.string(),
10
+ block_id: z.string().nullable(),
11
+ card_physical_type: z.number(),
12
+ card_serial_number: z.string(),
13
+ device_id: z.string(),
14
+ duty_id: z.string().nullable(),
15
+ line_id: z.string().nullable(),
16
+ mac_ase_counter_value: z.number(),
17
+ mac_sam_serial_number: z.number(),
18
+ on_board_sale_id: z.string().nullable(),
19
+ pattern_id: z.string().nullable(),
20
+ payment_method: z.number(),
21
+ price: z.number(),
22
+ product_long_id: z.string(),
23
+ product_quantity: z.number(),
24
+ received_at: UnixTimestampSchema,
25
+ stop_id: z.string().nullable(),
26
+ trip_id: z.string().nullable(),
27
+ validation_id: z.string().nullable(),
28
+ vehicle_id: z.number().nullable(),
29
+ });
30
+ export const UpdateSimplifiedApexOnBoardRefundSchema = SimplifiedApexOnBoardRefundSchema.partial();
@@ -0,0 +1,178 @@
1
+ import { z } from 'zod';
2
+ export declare const SimplifiedApexOnBoardSaleSchema: z.ZodObject<Omit<{
3
+ _id: z.ZodString;
4
+ created_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
5
+ created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
6
+ is_locked: z.ZodDefault<z.ZodBoolean>;
7
+ updated_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
8
+ updated_by: z.ZodOptional<z.ZodString>;
9
+ }, "created_by" | "is_locked" | "updated_by"> & {
10
+ agency_id: z.ZodString;
11
+ apex_version: z.ZodString;
12
+ block_id: z.ZodNullable<z.ZodString>;
13
+ card_physical_type: z.ZodNumber;
14
+ card_serial_number: z.ZodString;
15
+ device_id: z.ZodString;
16
+ duty_id: z.ZodNullable<z.ZodString>;
17
+ is_passenger: z.ZodBoolean;
18
+ line_id: z.ZodNullable<z.ZodString>;
19
+ mac_ase_counter_value: z.ZodNumber;
20
+ mac_sam_serial_number: z.ZodNumber;
21
+ on_board_refund_id: z.ZodNullable<z.ZodString>;
22
+ pattern_id: z.ZodNullable<z.ZodString>;
23
+ payment_method: z.ZodNumber;
24
+ price: z.ZodNumber;
25
+ product_long_id: z.ZodString;
26
+ product_quantity: z.ZodNumber;
27
+ received_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
28
+ stop_id: z.ZodNullable<z.ZodString>;
29
+ trip_id: z.ZodNullable<z.ZodString>;
30
+ validation_id: z.ZodNullable<z.ZodString>;
31
+ vehicle_id: z.ZodNullable<z.ZodNumber>;
32
+ }, "strip", z.ZodTypeAny, {
33
+ _id: string;
34
+ agency_id: string;
35
+ created_at: number & {
36
+ __brand: "UnixTimestamp";
37
+ };
38
+ received_at: number & {
39
+ __brand: "UnixTimestamp";
40
+ };
41
+ price: number;
42
+ apex_version: string;
43
+ device_id: string;
44
+ line_id: string | null;
45
+ mac_ase_counter_value: number;
46
+ mac_sam_serial_number: number;
47
+ pattern_id: string | null;
48
+ stop_id: string | null;
49
+ trip_id: string | null;
50
+ vehicle_id: number | null;
51
+ card_serial_number: string;
52
+ updated_at: number & {
53
+ __brand: "UnixTimestamp";
54
+ };
55
+ block_id: string | null;
56
+ card_physical_type: number;
57
+ duty_id: string | null;
58
+ payment_method: number;
59
+ product_long_id: string;
60
+ product_quantity: number;
61
+ validation_id: string | null;
62
+ is_passenger: boolean;
63
+ on_board_refund_id: string | null;
64
+ }, {
65
+ _id: string;
66
+ agency_id: string;
67
+ created_at: number;
68
+ received_at: number;
69
+ price: number;
70
+ apex_version: string;
71
+ device_id: string;
72
+ line_id: string | null;
73
+ mac_ase_counter_value: number;
74
+ mac_sam_serial_number: number;
75
+ pattern_id: string | null;
76
+ stop_id: string | null;
77
+ trip_id: string | null;
78
+ vehicle_id: number | null;
79
+ card_serial_number: string;
80
+ updated_at: number;
81
+ block_id: string | null;
82
+ card_physical_type: number;
83
+ duty_id: string | null;
84
+ payment_method: number;
85
+ product_long_id: string;
86
+ product_quantity: number;
87
+ validation_id: string | null;
88
+ is_passenger: boolean;
89
+ on_board_refund_id: string | null;
90
+ }>;
91
+ export declare const UpdateSimplifiedApexOnBoardSaleSchema: z.ZodObject<{
92
+ _id: z.ZodOptional<z.ZodString>;
93
+ created_at: z.ZodOptional<z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>>;
94
+ updated_at: z.ZodOptional<z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>>;
95
+ agency_id: z.ZodOptional<z.ZodString>;
96
+ apex_version: z.ZodOptional<z.ZodString>;
97
+ block_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
98
+ card_physical_type: z.ZodOptional<z.ZodNumber>;
99
+ card_serial_number: z.ZodOptional<z.ZodString>;
100
+ device_id: z.ZodOptional<z.ZodString>;
101
+ duty_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
102
+ is_passenger: z.ZodOptional<z.ZodBoolean>;
103
+ line_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
104
+ mac_ase_counter_value: z.ZodOptional<z.ZodNumber>;
105
+ mac_sam_serial_number: z.ZodOptional<z.ZodNumber>;
106
+ on_board_refund_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
107
+ pattern_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
108
+ payment_method: z.ZodOptional<z.ZodNumber>;
109
+ price: z.ZodOptional<z.ZodNumber>;
110
+ product_long_id: z.ZodOptional<z.ZodString>;
111
+ product_quantity: z.ZodOptional<z.ZodNumber>;
112
+ received_at: z.ZodOptional<z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>>;
113
+ stop_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
114
+ trip_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
115
+ validation_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
116
+ vehicle_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
117
+ }, "strip", z.ZodTypeAny, {
118
+ _id?: string | undefined;
119
+ agency_id?: string | undefined;
120
+ created_at?: import("@tmlmobilidade/go-types-shared").UnixTimestamp | undefined;
121
+ received_at?: import("@tmlmobilidade/go-types-shared").UnixTimestamp | undefined;
122
+ price?: number | undefined;
123
+ apex_version?: string | undefined;
124
+ device_id?: string | undefined;
125
+ line_id?: string | null | undefined;
126
+ mac_ase_counter_value?: number | undefined;
127
+ mac_sam_serial_number?: number | undefined;
128
+ pattern_id?: string | null | undefined;
129
+ stop_id?: string | null | undefined;
130
+ trip_id?: string | null | undefined;
131
+ vehicle_id?: number | null | undefined;
132
+ card_serial_number?: string | undefined;
133
+ updated_at?: import("@tmlmobilidade/go-types-shared").UnixTimestamp | undefined;
134
+ block_id?: string | null | undefined;
135
+ card_physical_type?: number | undefined;
136
+ duty_id?: string | null | undefined;
137
+ payment_method?: number | undefined;
138
+ product_long_id?: string | undefined;
139
+ product_quantity?: number | undefined;
140
+ validation_id?: string | null | undefined;
141
+ is_passenger?: boolean | undefined;
142
+ on_board_refund_id?: string | null | undefined;
143
+ }, {
144
+ _id?: string | undefined;
145
+ agency_id?: string | undefined;
146
+ created_at?: number | undefined;
147
+ received_at?: number | undefined;
148
+ price?: number | undefined;
149
+ apex_version?: string | undefined;
150
+ device_id?: string | undefined;
151
+ line_id?: string | null | undefined;
152
+ mac_ase_counter_value?: number | undefined;
153
+ mac_sam_serial_number?: number | undefined;
154
+ pattern_id?: string | null | undefined;
155
+ stop_id?: string | null | undefined;
156
+ trip_id?: string | null | undefined;
157
+ vehicle_id?: number | null | undefined;
158
+ card_serial_number?: string | undefined;
159
+ updated_at?: number | undefined;
160
+ block_id?: string | null | undefined;
161
+ card_physical_type?: number | undefined;
162
+ duty_id?: string | null | undefined;
163
+ payment_method?: number | undefined;
164
+ product_long_id?: string | undefined;
165
+ product_quantity?: number | undefined;
166
+ validation_id?: string | null | undefined;
167
+ is_passenger?: boolean | undefined;
168
+ on_board_refund_id?: string | null | undefined;
169
+ }>;
170
+ /**
171
+ * APEX OnBoard Sales are APEX transactions of type 3 that are generated whenever a sale
172
+ * of an on-board ticket occurs. Even though sales can be of anything (tickets, cards, contracts, merchandising items)
173
+ * and anywhere (inside vehicles, at vending machines, at ticket offices or online), here they are already filtered
174
+ * for on-board ticket sales inside vehicles only. Sales of tickets when inside vehicles also generate a validation transaction.
175
+ * Sales can be refunded, and refunds are also APEX transactions of type 3.
176
+ */
177
+ export type SimplifiedApexOnBoardSale = z.infer<typeof SimplifiedApexOnBoardSaleSchema>;
178
+ export type UpdateSimplifiedApexOnBoardSaleDto = z.infer<typeof UpdateSimplifiedApexOnBoardSaleSchema>;
@@ -0,0 +1,31 @@
1
+ /* * */
2
+ import { DocumentSchema, UnixTimestampSchema } from '@tmlmobilidade/go-types-shared';
3
+ import { z } from 'zod';
4
+ /* * */
5
+ export const SimplifiedApexOnBoardSaleSchema = DocumentSchema
6
+ .omit({ created_by: true, is_locked: true, updated_by: true })
7
+ .extend({
8
+ agency_id: z.string(),
9
+ apex_version: z.string(),
10
+ block_id: z.string().nullable(),
11
+ card_physical_type: z.number(),
12
+ card_serial_number: z.string(),
13
+ device_id: z.string(),
14
+ duty_id: z.string().nullable(),
15
+ is_passenger: z.boolean(),
16
+ line_id: z.string().nullable(),
17
+ mac_ase_counter_value: z.number(),
18
+ mac_sam_serial_number: z.number(),
19
+ on_board_refund_id: z.string().nullable(),
20
+ pattern_id: z.string().nullable(),
21
+ payment_method: z.number(),
22
+ price: z.number(),
23
+ product_long_id: z.string(),
24
+ product_quantity: z.number(),
25
+ received_at: UnixTimestampSchema,
26
+ stop_id: z.string().nullable(),
27
+ trip_id: z.string().nullable(),
28
+ validation_id: z.string().nullable(),
29
+ vehicle_id: z.number().nullable(),
30
+ });
31
+ export const UpdateSimplifiedApexOnBoardSaleSchema = SimplifiedApexOnBoardSaleSchema.partial();
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ export declare const SIMPLIFIED_APEX_TYPE_OPTIONS: readonly ["location", "on_board_refund", "on_board_sale", "validation"];
3
+ export declare const SimplifiedApexTypeSchema: z.ZodEnum<["location", "on_board_refund", "on_board_sale", "validation"]>;
4
+ /**
5
+ * This type should be used to represent the processing status
6
+ * of various operations. It can be used in APIs, database operations,
7
+ * or any other context where a processing status needs to be communicated.
8
+ */
9
+ export type SimplifiedApexType = z.infer<typeof SimplifiedApexTypeSchema>;
@@ -0,0 +1,5 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ export const SIMPLIFIED_APEX_TYPE_OPTIONS = ['location', 'on_board_refund', 'on_board_sale', 'validation'];
5
+ export const SimplifiedApexTypeSchema = z.enum(SIMPLIFIED_APEX_TYPE_OPTIONS);