@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,85 @@
1
+ /* * */
2
+ import { RawApexTransactionBaseSchema } from '../raw-apex-transaction-base.js';
3
+ import { z } from 'zod';
4
+ /* * */
5
+ export const RawApexTransactionValidationV30PayloadSchema = z.object({
6
+ cardInfo: z.object({
7
+ cardIssuer: z.number(),
8
+ cardNetworkID: z.string(),
9
+ cardNumber: z.number(),
10
+ cardPhysicalType: z.number(),
11
+ cardSerialNumber: z.string(),
12
+ cardTypeID: z.string(),
13
+ }),
14
+ mac: z.object({
15
+ aseCounterValue: z.number(),
16
+ binaryDataMask: z.number(),
17
+ fullMacFlag: z.number(),
18
+ interruptedStatus: z.number(),
19
+ macVersion: z.number(),
20
+ raw: z.string(),
21
+ samModel: z.number(),
22
+ samSerialNumber: z.number(),
23
+ samTypeVersion: z.number(),
24
+ samWorkingMode: z.number(),
25
+ transactionCounter: z.number(),
26
+ }),
27
+ operatorInfo: z.object({
28
+ channelID: z.string(),
29
+ deviceID: z.string(),
30
+ networkID: z.string(),
31
+ operatorLongID: z.string(),
32
+ }),
33
+ serviceInfo: z.object({
34
+ journeyID: z.string(),
35
+ lineLongID: z.string(),
36
+ outOfBoundsType: z.number(),
37
+ patternLongID: z.string(),
38
+ stopLongID: z.string(),
39
+ validatorID: z.number(),
40
+ vehicleID: z.number(),
41
+ zoneLongID: z.string(),
42
+ }),
43
+ signedData: z.object({
44
+ contractBinaryRead: z.string(),
45
+ eventBinaryRead: z.string(),
46
+ eventBinaryWritten: z.string(),
47
+ raw: z.string(),
48
+ }),
49
+ transactionInfo: z.object({
50
+ apexTransactionType: z.number(),
51
+ apexTransactionVersion: z.literal('3.0'),
52
+ transactionDate: z.string(),
53
+ transactionGroupId: z.string(),
54
+ transactionId: z.string(),
55
+ }),
56
+ validationInfo: z.object({
57
+ calendarID: z.string(),
58
+ contractNumber: z.number(),
59
+ eventType: z.number(),
60
+ greylistItemsData: z.array(z.any()),
61
+ productLongID: z.string(),
62
+ profilesUsedData: z.array(z.any()),
63
+ spatialValidityLongID: z.string(),
64
+ tickLoadDate: z.string(),
65
+ tickLoadMachCode: z.number(),
66
+ tickLoadNumbDaily: z.number(),
67
+ unitsRemaining: z.number(),
68
+ validationStatus: z.number(),
69
+ validationType: z.number(),
70
+ validityPeriodID: z.string(),
71
+ }),
72
+ versionInfo: z.object({
73
+ actionListsVersion: z.string(),
74
+ apexVersion: z.string(),
75
+ commercialOfferVersion: z.string(),
76
+ networkVersion: z.string(),
77
+ technicalParametersVersion: z.string(),
78
+ vivaVersion: z.string(),
79
+ }),
80
+ });
81
+ /* * */
82
+ export const RawApexTransactionValidationV30Schema = RawApexTransactionBaseSchema.extend({
83
+ payload: RawApexTransactionValidationV30PayloadSchema,
84
+ version: z.literal('apex-validation-3.0'),
85
+ });
@@ -0,0 +1,8 @@
1
+ import { type SimplifiedApexBankingTap } from './simplified-apex-banking-taps.js';
2
+ import { type SimplifiedApexInspectionDecision } from './simplified-apex-inspection-decision.js';
3
+ import { type SimplifiedApexInspection } from './simplified-apex-inspection.js';
4
+ import { type SimplifiedApexLocation } from './simplified-apex-location.js';
5
+ import { type SimplifiedApexOnBoardRefund } from './simplified-apex-on-board-refund.js';
6
+ import { type SimplifiedApexOnBoardSale } from './simplified-apex-on-board-sale.js';
7
+ import { type SimplifiedApexValidation } from './simplified-apex-validation.js';
8
+ export type AnySimplifiedApex = SimplifiedApexBankingTap | SimplifiedApexInspection | SimplifiedApexInspectionDecision | SimplifiedApexLocation | SimplifiedApexOnBoardRefund | SimplifiedApexOnBoardSale | SimplifiedApexValidation;
@@ -0,0 +1,2 @@
1
+ /* * */
2
+ export {};
@@ -0,0 +1,145 @@
1
+ import { z } from 'zod';
2
+ export declare const ApexValidationStatus: {
3
+ /**
4
+ * VALID:
5
+ * The card holder had a valid contract for the given context.
6
+ */
7
+ readonly _0_ContractValid: 0;
8
+ /**
9
+ * INVALID:
10
+ * The card holder already has a valid validation for the given context.
11
+ */
12
+ readonly _1_Antipassback: 1;
13
+ /**
14
+ * INVALID:
15
+ * The card holder's card is in the black list.
16
+ */
17
+ readonly _2_CardInBlackList: 2;
18
+ /**
19
+ * INVALID:
20
+ * The validator SAM is in the black list.
21
+ */
22
+ readonly _3_SamInBlackList: 3;
23
+ /**
24
+ * VALID:
25
+ * The card holder's card is in the white list.
26
+ */
27
+ readonly _4_CardInWhiteList: 4;
28
+ /**
29
+ * VALID:
30
+ * The card holder's profile is in the white list.
31
+ */
32
+ readonly _5_ProfileInWhiteList: 5;
33
+ /**
34
+ * VALID:
35
+ * The context allows for validation re-use.
36
+ */
37
+ readonly _6_Interchange: 6;
38
+ /**
39
+ * INVALID:
40
+ * The validation could not be written to the card.
41
+ */
42
+ readonly _7_Interrupted: 7;
43
+ /**
44
+ * INVALID:
45
+ * The card holder does not have a valid contract for the given context.
46
+ */
47
+ readonly _8_NoValidContract: 8;
48
+ /**
49
+ * INVALID:
50
+ * The card holder's card is invalidated.
51
+ */
52
+ readonly _9_CardInvalidated: 9;
53
+ /**
54
+ * INVALID:
55
+ * The card holder's card or the validator's SAM has no more space for events.
56
+ */
57
+ readonly _10_EventsFull: 10;
58
+ /**
59
+ * INVALID:
60
+ * The card holder's card does not have enough units for the given context.
61
+ */
62
+ readonly _11_NotEnoughUnits: 11;
63
+ /**
64
+ * INVALID:
65
+ * The card holder's contract has expired.
66
+ */
67
+ readonly _12_ContractExpired: 12;
68
+ /**
69
+ * INVALID:
70
+ * The maximum value for the validation status. This is used to validate the status.
71
+ */
72
+ readonly _13_MaxValue: 13;
73
+ };
74
+ export declare const ApexValidationStatusSchema: z.ZodNativeEnum<{
75
+ /**
76
+ * VALID:
77
+ * The card holder had a valid contract for the given context.
78
+ */
79
+ readonly _0_ContractValid: 0;
80
+ /**
81
+ * INVALID:
82
+ * The card holder already has a valid validation for the given context.
83
+ */
84
+ readonly _1_Antipassback: 1;
85
+ /**
86
+ * INVALID:
87
+ * The card holder's card is in the black list.
88
+ */
89
+ readonly _2_CardInBlackList: 2;
90
+ /**
91
+ * INVALID:
92
+ * The validator SAM is in the black list.
93
+ */
94
+ readonly _3_SamInBlackList: 3;
95
+ /**
96
+ * VALID:
97
+ * The card holder's card is in the white list.
98
+ */
99
+ readonly _4_CardInWhiteList: 4;
100
+ /**
101
+ * VALID:
102
+ * The card holder's profile is in the white list.
103
+ */
104
+ readonly _5_ProfileInWhiteList: 5;
105
+ /**
106
+ * VALID:
107
+ * The context allows for validation re-use.
108
+ */
109
+ readonly _6_Interchange: 6;
110
+ /**
111
+ * INVALID:
112
+ * The validation could not be written to the card.
113
+ */
114
+ readonly _7_Interrupted: 7;
115
+ /**
116
+ * INVALID:
117
+ * The card holder does not have a valid contract for the given context.
118
+ */
119
+ readonly _8_NoValidContract: 8;
120
+ /**
121
+ * INVALID:
122
+ * The card holder's card is invalidated.
123
+ */
124
+ readonly _9_CardInvalidated: 9;
125
+ /**
126
+ * INVALID:
127
+ * The card holder's card or the validator's SAM has no more space for events.
128
+ */
129
+ readonly _10_EventsFull: 10;
130
+ /**
131
+ * INVALID:
132
+ * The card holder's card does not have enough units for the given context.
133
+ */
134
+ readonly _11_NotEnoughUnits: 11;
135
+ /**
136
+ * INVALID:
137
+ * The card holder's contract has expired.
138
+ */
139
+ readonly _12_ContractExpired: 12;
140
+ /**
141
+ * INVALID:
142
+ * The maximum value for the validation status. This is used to validate the status.
143
+ */
144
+ readonly _13_MaxValue: 13;
145
+ }>;
@@ -0,0 +1,76 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ export const ApexValidationStatus = {
5
+ /**
6
+ * VALID:
7
+ * The card holder had a valid contract for the given context.
8
+ */
9
+ _0_ContractValid: 0,
10
+ /**
11
+ * INVALID:
12
+ * The card holder already has a valid validation for the given context.
13
+ */
14
+ _1_Antipassback: 1,
15
+ /**
16
+ * INVALID:
17
+ * The card holder's card is in the black list.
18
+ */
19
+ _2_CardInBlackList: 2,
20
+ /**
21
+ * INVALID:
22
+ * The validator SAM is in the black list.
23
+ */
24
+ _3_SamInBlackList: 3,
25
+ /**
26
+ * VALID:
27
+ * The card holder's card is in the white list.
28
+ */
29
+ _4_CardInWhiteList: 4,
30
+ /**
31
+ * VALID:
32
+ * The card holder's profile is in the white list.
33
+ */
34
+ _5_ProfileInWhiteList: 5,
35
+ /**
36
+ * VALID:
37
+ * The context allows for validation re-use.
38
+ */
39
+ _6_Interchange: 6,
40
+ /**
41
+ * INVALID:
42
+ * The validation could not be written to the card.
43
+ */
44
+ _7_Interrupted: 7,
45
+ /**
46
+ * INVALID:
47
+ * The card holder does not have a valid contract for the given context.
48
+ */
49
+ _8_NoValidContract: 8,
50
+ /**
51
+ * INVALID:
52
+ * The card holder's card is invalidated.
53
+ */
54
+ _9_CardInvalidated: 9,
55
+ /**
56
+ * INVALID:
57
+ * The card holder's card or the validator's SAM has no more space for events.
58
+ */
59
+ _10_EventsFull: 10,
60
+ /**
61
+ * INVALID:
62
+ * The card holder's card does not have enough units for the given context.
63
+ */
64
+ _11_NotEnoughUnits: 11,
65
+ /**
66
+ * INVALID:
67
+ * The card holder's contract has expired.
68
+ */
69
+ _12_ContractExpired: 12,
70
+ /**
71
+ * INVALID:
72
+ * The maximum value for the validation status. This is used to validate the status.
73
+ */
74
+ _13_MaxValue: 13,
75
+ };
76
+ export const ApexValidationStatusSchema = z.nativeEnum(ApexValidationStatus);
@@ -0,0 +1,10 @@
1
+ export * from './any-simplified-apex.js';
2
+ export * from './apex-validation-status.js';
3
+ export * from './simplified-apex-banking-taps.js';
4
+ export * from './simplified-apex-inspection-decision.js';
5
+ export * from './simplified-apex-inspection.js';
6
+ export * from './simplified-apex-location.js';
7
+ export * from './simplified-apex-on-board-refund.js';
8
+ export * from './simplified-apex-on-board-sale.js';
9
+ export * from './simplified-apex-type.js';
10
+ export * from './simplified-apex-validation.js';
@@ -0,0 +1,10 @@
1
+ export * from './any-simplified-apex.js';
2
+ export * from './apex-validation-status.js';
3
+ export * from './simplified-apex-banking-taps.js';
4
+ export * from './simplified-apex-inspection-decision.js';
5
+ export * from './simplified-apex-inspection.js';
6
+ export * from './simplified-apex-location.js';
7
+ export * from './simplified-apex-on-board-refund.js';
8
+ export * from './simplified-apex-on-board-sale.js';
9
+ export * from './simplified-apex-type.js';
10
+ export * from './simplified-apex-validation.js';
@@ -0,0 +1,81 @@
1
+ import { z } from 'zod';
2
+ export declare const SimplifiedApexBankingTapSchema: z.ZodObject<{
3
+ _id: z.ZodString;
4
+ agency_id: z.ZodString;
5
+ apex_version: z.ZodString;
6
+ banking_token: z.ZodString;
7
+ card_brand: z.ZodNumber;
8
+ card_pan: z.ZodString;
9
+ created_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
10
+ device_id: z.ZodString;
11
+ event_type: z.ZodNullable<z.ZodNumber>;
12
+ is_ok: z.ZodBoolean;
13
+ is_ok_pcgi: z.ZodBoolean;
14
+ line_id: z.ZodString;
15
+ mac_ase_counter_value: z.ZodNumber;
16
+ mac_sam_serial_number: z.ZodNumber;
17
+ pattern_id: z.ZodString;
18
+ product_id: z.ZodString;
19
+ received_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
20
+ stop_id: z.ZodString;
21
+ trip_id: z.ZodString;
22
+ units_qty: z.ZodNumber;
23
+ vehicle_id: z.ZodNumber;
24
+ }, "strip", z.ZodTypeAny, {
25
+ _id: string;
26
+ agency_id: string;
27
+ created_at: number & {
28
+ __brand: "UnixTimestamp";
29
+ };
30
+ is_ok: boolean;
31
+ received_at: number & {
32
+ __brand: "UnixTimestamp";
33
+ };
34
+ apex_version: string;
35
+ banking_token: string;
36
+ card_brand: number;
37
+ card_pan: string;
38
+ device_id: string;
39
+ event_type: number | null;
40
+ is_ok_pcgi: boolean;
41
+ line_id: string;
42
+ mac_ase_counter_value: number;
43
+ mac_sam_serial_number: number;
44
+ pattern_id: string;
45
+ product_id: string;
46
+ stop_id: string;
47
+ trip_id: string;
48
+ units_qty: number;
49
+ vehicle_id: number;
50
+ }, {
51
+ _id: string;
52
+ agency_id: string;
53
+ created_at: number;
54
+ is_ok: boolean;
55
+ received_at: number;
56
+ apex_version: string;
57
+ banking_token: string;
58
+ card_brand: number;
59
+ card_pan: string;
60
+ device_id: string;
61
+ event_type: number | null;
62
+ is_ok_pcgi: boolean;
63
+ line_id: string;
64
+ mac_ase_counter_value: number;
65
+ mac_sam_serial_number: number;
66
+ pattern_id: string;
67
+ product_id: string;
68
+ stop_id: string;
69
+ trip_id: string;
70
+ units_qty: number;
71
+ vehicle_id: number;
72
+ }>;
73
+ /**
74
+ * APEX Banking Taps are APEX transactions of type 20 that are generated
75
+ * when a card holder with a banking card touches a validator reader.
76
+ * These transactions represent the card holder's right to travel on a given route,
77
+ * line, or vehicle, and are generated in a similar way to APEX Validations (T11s).
78
+ * However, banking taps have some differences compared to regular validations,
79
+ * such as the presence of banking-specific fields (ex: banking token, card brand, card pan).
80
+ */
81
+ export type SimplifiedApexBankingTap = z.infer<typeof SimplifiedApexBankingTapSchema>;
@@ -0,0 +1,27 @@
1
+ /* * */
2
+ import { UnixTimestampSchema } from '@tmlmobilidade/go-types-shared';
3
+ import { z } from 'zod';
4
+ /* * */
5
+ export const SimplifiedApexBankingTapSchema = z.object({
6
+ _id: z.string(),
7
+ agency_id: z.string(),
8
+ apex_version: z.string(),
9
+ banking_token: z.string(),
10
+ card_brand: z.number(),
11
+ card_pan: z.string(),
12
+ created_at: UnixTimestampSchema,
13
+ device_id: z.string(),
14
+ event_type: z.number().nullable(),
15
+ is_ok: z.boolean(),
16
+ is_ok_pcgi: z.boolean(),
17
+ line_id: z.string(),
18
+ mac_ase_counter_value: z.number(),
19
+ mac_sam_serial_number: z.number(),
20
+ pattern_id: z.string(),
21
+ product_id: z.string(),
22
+ received_at: UnixTimestampSchema,
23
+ stop_id: z.string(),
24
+ trip_id: z.string(),
25
+ units_qty: z.number(),
26
+ vehicle_id: z.number(),
27
+ });
@@ -0,0 +1,55 @@
1
+ import { z } from 'zod';
2
+ export declare const SimplifiedApexInspectionDecisionSchema: z.ZodObject<{
3
+ _id: z.ZodString;
4
+ agency_id: z.ZodString;
5
+ apex_version: z.ZodString;
6
+ created_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
7
+ device_id: z.ZodString;
8
+ final_control_status: z.ZodNumber;
9
+ inspection_decision_id: z.ZodNullable<z.ZodString>;
10
+ is_ok: z.ZodBoolean;
11
+ is_ok_pcgi: z.ZodBoolean;
12
+ mac_ase_counter_value: z.ZodNumber;
13
+ mac_sam_serial_number: z.ZodNumber;
14
+ received_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
15
+ }, "strip", z.ZodTypeAny, {
16
+ _id: string;
17
+ agency_id: string;
18
+ created_at: number & {
19
+ __brand: "UnixTimestamp";
20
+ };
21
+ is_ok: boolean;
22
+ received_at: number & {
23
+ __brand: "UnixTimestamp";
24
+ };
25
+ apex_version: string;
26
+ device_id: string;
27
+ is_ok_pcgi: boolean;
28
+ mac_ase_counter_value: number;
29
+ mac_sam_serial_number: number;
30
+ final_control_status: number;
31
+ inspection_decision_id: string | null;
32
+ }, {
33
+ _id: string;
34
+ agency_id: string;
35
+ created_at: number;
36
+ is_ok: boolean;
37
+ received_at: number;
38
+ apex_version: string;
39
+ device_id: string;
40
+ is_ok_pcgi: boolean;
41
+ mac_ase_counter_value: number;
42
+ mac_sam_serial_number: number;
43
+ final_control_status: number;
44
+ inspection_decision_id: string | null;
45
+ }>;
46
+ /**
47
+ * APEX Inspections are APEX transactions of type 15 that are generated
48
+ * when a card holder is inspected by a controller on board a vehicle.
49
+ * These transactions represent the card holder's inspection event,
50
+ * and contain information about the card holder's card, the vehicle,
51
+ * the controller, the route, and the time and location of the inspection.
52
+ * Inspections have statuses that indicate if the card holder was found
53
+ * to be in compliance with the fare rules or not, and with which conditions.
54
+ */
55
+ export type SimplifiedApexInspectionDecision = z.infer<typeof SimplifiedApexInspectionDecisionSchema>;
@@ -0,0 +1,18 @@
1
+ /* * */
2
+ import { UnixTimestampSchema } from '@tmlmobilidade/go-types-shared';
3
+ import { z } from 'zod';
4
+ /* * */
5
+ export const SimplifiedApexInspectionDecisionSchema = z.object({
6
+ _id: z.string(),
7
+ agency_id: z.string(),
8
+ apex_version: z.string(),
9
+ created_at: UnixTimestampSchema,
10
+ device_id: z.string(),
11
+ final_control_status: z.number(),
12
+ inspection_decision_id: z.string().nullable(),
13
+ is_ok: z.boolean(),
14
+ is_ok_pcgi: z.boolean(),
15
+ mac_ase_counter_value: z.number(),
16
+ mac_sam_serial_number: z.number(),
17
+ received_at: UnixTimestampSchema,
18
+ });
@@ -0,0 +1,82 @@
1
+ import { z } from 'zod';
2
+ export declare const SimplifiedApexInspectionSchema: z.ZodObject<{
3
+ _id: z.ZodString;
4
+ agency_id: z.ZodString;
5
+ apex_version: z.ZodString;
6
+ card_serial_number: z.ZodString;
7
+ control_destination_stop_id: z.ZodString;
8
+ control_origin_stop_id: z.ZodString;
9
+ control_status: z.ZodNumber;
10
+ created_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
11
+ device_id: z.ZodString;
12
+ environment_status: z.ZodNumber;
13
+ inspection_id: z.ZodNullable<z.ZodString>;
14
+ is_ok: z.ZodBoolean;
15
+ is_ok_pcgi: z.ZodBoolean;
16
+ line_id: z.ZodString;
17
+ mac_ase_counter_value: z.ZodNumber;
18
+ mac_sam_serial_number: z.ZodNumber;
19
+ pattern_id: z.ZodString;
20
+ product_id: z.ZodString;
21
+ received_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
22
+ trip_id: z.ZodString;
23
+ vehicle_id: z.ZodNumber;
24
+ }, "strip", z.ZodTypeAny, {
25
+ _id: string;
26
+ agency_id: string;
27
+ created_at: number & {
28
+ __brand: "UnixTimestamp";
29
+ };
30
+ is_ok: boolean;
31
+ received_at: number & {
32
+ __brand: "UnixTimestamp";
33
+ };
34
+ apex_version: string;
35
+ device_id: string;
36
+ is_ok_pcgi: boolean;
37
+ line_id: string;
38
+ mac_ase_counter_value: number;
39
+ mac_sam_serial_number: number;
40
+ pattern_id: string;
41
+ product_id: string;
42
+ trip_id: string;
43
+ vehicle_id: number;
44
+ card_serial_number: string;
45
+ control_destination_stop_id: string;
46
+ control_origin_stop_id: string;
47
+ control_status: number;
48
+ environment_status: number;
49
+ inspection_id: string | null;
50
+ }, {
51
+ _id: string;
52
+ agency_id: string;
53
+ created_at: number;
54
+ is_ok: boolean;
55
+ received_at: number;
56
+ apex_version: string;
57
+ device_id: string;
58
+ is_ok_pcgi: boolean;
59
+ line_id: string;
60
+ mac_ase_counter_value: number;
61
+ mac_sam_serial_number: number;
62
+ pattern_id: string;
63
+ product_id: string;
64
+ trip_id: string;
65
+ vehicle_id: number;
66
+ card_serial_number: string;
67
+ control_destination_stop_id: string;
68
+ control_origin_stop_id: string;
69
+ control_status: number;
70
+ environment_status: number;
71
+ inspection_id: string | null;
72
+ }>;
73
+ /**
74
+ * APEX Inspection are APEX transactions of type 16 that are generated
75
+ * when a card holder's inspection decision is recorded by a controller on board a vehicle.
76
+ * These transactions represent the decision made regarding the card holder's inspection,
77
+ * and contain information about the card holder's card, the vehicle,
78
+ * the controller, the route, and the time and location of the decision.
79
+ * s have statuses that indicate if the card holder was found
80
+ * to be in compliance with the fare rules or not, and with which conditions.
81
+ */
82
+ export type SimplifiedApexInspection = z.infer<typeof SimplifiedApexInspectionSchema>;
@@ -0,0 +1,27 @@
1
+ /* * */
2
+ import { UnixTimestampSchema } from '@tmlmobilidade/go-types-shared';
3
+ import { z } from 'zod';
4
+ /* * */
5
+ export const SimplifiedApexInspectionSchema = z.object({
6
+ _id: z.string(),
7
+ agency_id: z.string(),
8
+ apex_version: z.string(),
9
+ card_serial_number: z.string(),
10
+ control_destination_stop_id: z.string(),
11
+ control_origin_stop_id: z.string(),
12
+ control_status: z.number(),
13
+ created_at: UnixTimestampSchema,
14
+ device_id: z.string(),
15
+ environment_status: z.number(),
16
+ inspection_id: z.string().nullable(),
17
+ is_ok: z.boolean(),
18
+ is_ok_pcgi: z.boolean(),
19
+ line_id: z.string(),
20
+ mac_ase_counter_value: z.number(),
21
+ mac_sam_serial_number: z.number(),
22
+ pattern_id: z.string(),
23
+ product_id: z.string(),
24
+ received_at: UnixTimestampSchema,
25
+ trip_id: z.string(),
26
+ vehicle_id: z.number(),
27
+ });