@tmlmobilidade/types 20250904.1.6 → 20250904.1633.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.
@@ -4,6 +4,10 @@ export declare const SamAnalysisSchema: z.ZodObject<{
4
4
  apex_version: z.ZodNullable<z.ZodString>;
5
5
  device_id: z.ZodNullable<z.ZodString>;
6
6
  end_time: z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
7
+ first_transaction_id: z.ZodNullable<z.ZodString>;
8
+ first_transaction_type: z.ZodNullable<z.ZodEnum<["location", "on_board_refund", "on_board_sale", "validation"]>>;
9
+ last_transaction_id: z.ZodNullable<z.ZodString>;
10
+ last_transaction_type: z.ZodNullable<z.ZodEnum<["location", "on_board_refund", "on_board_sale", "validation"]>>;
7
11
  start_time: z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
8
12
  transactions_expected: z.ZodNullable<z.ZodNumber>;
9
13
  transactions_found: z.ZodNullable<z.ZodNumber>;
@@ -15,6 +19,10 @@ export declare const SamAnalysisSchema: z.ZodObject<{
15
19
  end_time: (number & {
16
20
  __brand: "UnixTimestamp";
17
21
  } & z.BRAND<"UnixTimestamp">) | null;
22
+ first_transaction_id: string | null;
23
+ first_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
24
+ last_transaction_id: string | null;
25
+ last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
18
26
  start_time: (number & {
19
27
  __brand: "UnixTimestamp";
20
28
  } & z.BRAND<"UnixTimestamp">) | null;
@@ -26,6 +34,10 @@ export declare const SamAnalysisSchema: z.ZodObject<{
26
34
  apex_version: string | null;
27
35
  device_id: string | null;
28
36
  end_time: number | null;
37
+ first_transaction_id: string | null;
38
+ first_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
39
+ last_transaction_id: string | null;
40
+ last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
29
41
  start_time: number | null;
30
42
  transactions_expected: number | null;
31
43
  transactions_found: number | null;
@@ -1,11 +1,16 @@
1
1
  /* * */
2
2
  import { validateUnixTimestamp } from '../_common/unix-timestamp.js';
3
+ import { SimplifiedApexTypeSchema } from '../simplified-apex/simplified-apex-type.js';
3
4
  import { z } from 'zod';
4
5
  /* * */
5
6
  export const SamAnalysisSchema = z.object({
6
7
  apex_version: z.string().nullable(),
7
8
  device_id: z.string().nullable(),
8
9
  end_time: z.number().transform(validateUnixTimestamp).brand('UnixTimestamp').nullable(),
10
+ first_transaction_id: z.string().nullable(),
11
+ first_transaction_type: SimplifiedApexTypeSchema.nullable(),
12
+ last_transaction_id: z.string().nullable(),
13
+ last_transaction_type: SimplifiedApexTypeSchema.nullable(),
9
14
  start_time: z.number().transform(validateUnixTimestamp).brand('UnixTimestamp').nullable(),
10
15
  transactions_expected: z.number().nullable(),
11
16
  transactions_found: z.number().nullable(),
@@ -11,6 +11,10 @@ export declare const SamSchema: z.ZodObject<{
11
11
  apex_version: z.ZodNullable<z.ZodString>;
12
12
  device_id: z.ZodNullable<z.ZodString>;
13
13
  end_time: z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
14
+ first_transaction_id: z.ZodNullable<z.ZodString>;
15
+ first_transaction_type: z.ZodNullable<z.ZodEnum<["location", "on_board_refund", "on_board_sale", "validation"]>>;
16
+ last_transaction_id: z.ZodNullable<z.ZodString>;
17
+ last_transaction_type: z.ZodNullable<z.ZodEnum<["location", "on_board_refund", "on_board_sale", "validation"]>>;
14
18
  start_time: z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
15
19
  transactions_expected: z.ZodNullable<z.ZodNumber>;
16
20
  transactions_found: z.ZodNullable<z.ZodNumber>;
@@ -22,6 +26,10 @@ export declare const SamSchema: z.ZodObject<{
22
26
  end_time: (number & {
23
27
  __brand: "UnixTimestamp";
24
28
  } & z.BRAND<"UnixTimestamp">) | null;
29
+ first_transaction_id: string | null;
30
+ first_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
31
+ last_transaction_id: string | null;
32
+ last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
25
33
  start_time: (number & {
26
34
  __brand: "UnixTimestamp";
27
35
  } & z.BRAND<"UnixTimestamp">) | null;
@@ -33,6 +41,10 @@ export declare const SamSchema: z.ZodObject<{
33
41
  apex_version: string | null;
34
42
  device_id: string | null;
35
43
  end_time: number | null;
44
+ first_transaction_id: string | null;
45
+ first_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
46
+ last_transaction_id: string | null;
47
+ last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
36
48
  start_time: number | null;
37
49
  transactions_expected: number | null;
38
50
  transactions_found: number | null;
@@ -56,6 +68,10 @@ export declare const SamSchema: z.ZodObject<{
56
68
  end_time: (number & {
57
69
  __brand: "UnixTimestamp";
58
70
  } & z.BRAND<"UnixTimestamp">) | null;
71
+ first_transaction_id: string | null;
72
+ first_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
73
+ last_transaction_id: string | null;
74
+ last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
59
75
  start_time: (number & {
60
76
  __brand: "UnixTimestamp";
61
77
  } & z.BRAND<"UnixTimestamp">) | null;
@@ -97,6 +113,10 @@ export declare const SamSchema: z.ZodObject<{
97
113
  apex_version: string | null;
98
114
  device_id: string | null;
99
115
  end_time: number | null;
116
+ first_transaction_id: string | null;
117
+ first_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
118
+ last_transaction_id: string | null;
119
+ last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
100
120
  start_time: number | null;
101
121
  transactions_expected: number | null;
102
122
  transactions_found: number | null;
@@ -116,6 +136,10 @@ export declare const CreateSamSchema: z.ZodObject<Omit<{
116
136
  apex_version: z.ZodNullable<z.ZodString>;
117
137
  device_id: z.ZodNullable<z.ZodString>;
118
138
  end_time: z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
139
+ first_transaction_id: z.ZodNullable<z.ZodString>;
140
+ first_transaction_type: z.ZodNullable<z.ZodEnum<["location", "on_board_refund", "on_board_sale", "validation"]>>;
141
+ last_transaction_id: z.ZodNullable<z.ZodString>;
142
+ last_transaction_type: z.ZodNullable<z.ZodEnum<["location", "on_board_refund", "on_board_sale", "validation"]>>;
119
143
  start_time: z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
120
144
  transactions_expected: z.ZodNullable<z.ZodNumber>;
121
145
  transactions_found: z.ZodNullable<z.ZodNumber>;
@@ -127,6 +151,10 @@ export declare const CreateSamSchema: z.ZodObject<Omit<{
127
151
  end_time: (number & {
128
152
  __brand: "UnixTimestamp";
129
153
  } & z.BRAND<"UnixTimestamp">) | null;
154
+ first_transaction_id: string | null;
155
+ first_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
156
+ last_transaction_id: string | null;
157
+ last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
130
158
  start_time: (number & {
131
159
  __brand: "UnixTimestamp";
132
160
  } & z.BRAND<"UnixTimestamp">) | null;
@@ -138,6 +166,10 @@ export declare const CreateSamSchema: z.ZodObject<Omit<{
138
166
  apex_version: string | null;
139
167
  device_id: string | null;
140
168
  end_time: number | null;
169
+ first_transaction_id: string | null;
170
+ first_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
171
+ last_transaction_id: string | null;
172
+ last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
141
173
  start_time: number | null;
142
174
  transactions_expected: number | null;
143
175
  transactions_found: number | null;
@@ -161,6 +193,10 @@ export declare const CreateSamSchema: z.ZodObject<Omit<{
161
193
  end_time: (number & {
162
194
  __brand: "UnixTimestamp";
163
195
  } & z.BRAND<"UnixTimestamp">) | null;
196
+ first_transaction_id: string | null;
197
+ first_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
198
+ last_transaction_id: string | null;
199
+ last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
164
200
  start_time: (number & {
165
201
  __brand: "UnixTimestamp";
166
202
  } & z.BRAND<"UnixTimestamp">) | null;
@@ -194,6 +230,10 @@ export declare const CreateSamSchema: z.ZodObject<Omit<{
194
230
  apex_version: string | null;
195
231
  device_id: string | null;
196
232
  end_time: number | null;
233
+ first_transaction_id: string | null;
234
+ first_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
235
+ last_transaction_id: string | null;
236
+ last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
197
237
  start_time: number | null;
198
238
  transactions_expected: number | null;
199
239
  transactions_found: number | null;
@@ -210,6 +250,10 @@ export declare const UpdateSamSchema: z.ZodObject<{
210
250
  apex_version: z.ZodNullable<z.ZodString>;
211
251
  device_id: z.ZodNullable<z.ZodString>;
212
252
  end_time: z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
253
+ first_transaction_id: z.ZodNullable<z.ZodString>;
254
+ first_transaction_type: z.ZodNullable<z.ZodEnum<["location", "on_board_refund", "on_board_sale", "validation"]>>;
255
+ last_transaction_id: z.ZodNullable<z.ZodString>;
256
+ last_transaction_type: z.ZodNullable<z.ZodEnum<["location", "on_board_refund", "on_board_sale", "validation"]>>;
213
257
  start_time: z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
214
258
  transactions_expected: z.ZodNullable<z.ZodNumber>;
215
259
  transactions_found: z.ZodNullable<z.ZodNumber>;
@@ -221,6 +265,10 @@ export declare const UpdateSamSchema: z.ZodObject<{
221
265
  end_time: (number & {
222
266
  __brand: "UnixTimestamp";
223
267
  } & z.BRAND<"UnixTimestamp">) | null;
268
+ first_transaction_id: string | null;
269
+ first_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
270
+ last_transaction_id: string | null;
271
+ last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
224
272
  start_time: (number & {
225
273
  __brand: "UnixTimestamp";
226
274
  } & z.BRAND<"UnixTimestamp">) | null;
@@ -232,6 +280,10 @@ export declare const UpdateSamSchema: z.ZodObject<{
232
280
  apex_version: string | null;
233
281
  device_id: string | null;
234
282
  end_time: number | null;
283
+ first_transaction_id: string | null;
284
+ first_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
285
+ last_transaction_id: string | null;
286
+ last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
235
287
  start_time: number | null;
236
288
  transactions_expected: number | null;
237
289
  transactions_found: number | null;
@@ -255,6 +307,10 @@ export declare const UpdateSamSchema: z.ZodObject<{
255
307
  end_time: (number & {
256
308
  __brand: "UnixTimestamp";
257
309
  } & z.BRAND<"UnixTimestamp">) | null;
310
+ first_transaction_id: string | null;
311
+ first_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
312
+ last_transaction_id: string | null;
313
+ last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
258
314
  start_time: (number & {
259
315
  __brand: "UnixTimestamp";
260
316
  } & z.BRAND<"UnixTimestamp">) | null;
@@ -282,6 +338,10 @@ export declare const UpdateSamSchema: z.ZodObject<{
282
338
  apex_version: string | null;
283
339
  device_id: string | null;
284
340
  end_time: number | null;
341
+ first_transaction_id: string | null;
342
+ first_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
343
+ last_transaction_id: string | null;
344
+ last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
285
345
  start_time: number | null;
286
346
  transactions_expected: number | null;
287
347
  transactions_found: number | null;
@@ -3,4 +3,5 @@ export * from './simplified-apex-inspection.js';
3
3
  export * from './simplified-apex-location.js';
4
4
  export * from './simplified-apex-on-board-refund.js';
5
5
  export * from './simplified-apex-on-board-sale.js';
6
+ export * from './simplified-apex-type.js';
6
7
  export * from './simplified-apex-validation.js';
@@ -3,4 +3,5 @@ export * from './simplified-apex-inspection.js';
3
3
  export * from './simplified-apex-location.js';
4
4
  export * from './simplified-apex-on-board-refund.js';
5
5
  export * from './simplified-apex-on-board-sale.js';
6
+ export * from './simplified-apex-type.js';
6
7
  export * from './simplified-apex-validation.js';
@@ -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);
@@ -259,7 +259,7 @@ export declare const SimplifiedApexValidationSchema: z.ZodObject<{
259
259
  on_board_sale_id: string | null;
260
260
  is_passenger: boolean;
261
261
  on_board_refund_id: string | null;
262
- category: "prepaid" | "subscription" | "on_board_sale";
262
+ category: "on_board_sale" | "prepaid" | "subscription";
263
263
  event_type: number;
264
264
  product_id: string;
265
265
  units_qty: number | null;
@@ -287,7 +287,7 @@ export declare const SimplifiedApexValidationSchema: z.ZodObject<{
287
287
  on_board_sale_id: string | null;
288
288
  is_passenger: boolean;
289
289
  on_board_refund_id: string | null;
290
- category: "prepaid" | "subscription" | "on_board_sale";
290
+ category: "on_board_sale" | "prepaid" | "subscription";
291
291
  event_type: number;
292
292
  product_id: string;
293
293
  units_qty: number | null;
@@ -415,7 +415,7 @@ export declare const UpdateSimplifiedApexValidationSchema: z.ZodObject<{
415
415
  on_board_sale_id?: string | null | undefined;
416
416
  is_passenger?: boolean | undefined;
417
417
  on_board_refund_id?: string | null | undefined;
418
- category?: "prepaid" | "subscription" | "on_board_sale" | undefined;
418
+ category?: "on_board_sale" | "prepaid" | "subscription" | undefined;
419
419
  event_type?: number | undefined;
420
420
  product_id?: string | undefined;
421
421
  units_qty?: number | null | undefined;
@@ -439,7 +439,7 @@ export declare const UpdateSimplifiedApexValidationSchema: z.ZodObject<{
439
439
  on_board_sale_id?: string | null | undefined;
440
440
  is_passenger?: boolean | undefined;
441
441
  on_board_refund_id?: string | null | undefined;
442
- category?: "prepaid" | "subscription" | "on_board_sale" | undefined;
442
+ category?: "on_board_sale" | "prepaid" | "subscription" | undefined;
443
443
  event_type?: number | undefined;
444
444
  product_id?: string | undefined;
445
445
  units_qty?: number | null | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmlmobilidade/types",
3
- "version": "20250904.1.6",
3
+ "version": "20250904.1633.25",
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",