@tmlmobilidade/go-types-shared 20261106.1422.59 → 20261107.2347.22

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 (51) hide show
  1. package/dist/api/api-response.d.ts +47 -67
  2. package/dist/api/http-status.d.ts +16 -1
  3. package/dist/api/pagination.d.ts +3 -9
  4. package/dist/datetime/calendar-date.d.ts +1 -1
  5. package/dist/datetime/date-format.d.ts +8 -1
  6. package/dist/datetime/interval.d.ts +3 -13
  7. package/dist/datetime/operational-date-int.d.ts +1 -1
  8. package/dist/datetime/operational-date.d.ts +1 -1
  9. package/dist/datetime/operational-time.d.ts +1 -1
  10. package/dist/datetime/time-slot.d.ts +17 -1
  11. package/dist/datetime/timezone-identified.d.ts +336 -1
  12. package/dist/datetime/unix-millis.d.ts +1 -1
  13. package/dist/datetime/unix-seconds.d.ts +1 -1
  14. package/dist/documents/comment.d.ts +68 -328
  15. package/dist/documents/comment.js +7 -7
  16. package/dist/documents/document.d.ts +3 -21
  17. package/dist/documents/proposed-change.d.ts +47 -87
  18. package/dist/documents/proposed-change.js +3 -2
  19. package/dist/modules/module-id.d.ts +12 -1
  20. package/dist/modules/module-scope.d.ts +15 -14
  21. package/dist/numbers/degrees.d.ts +1 -1
  22. package/dist/numbers/float.d.ts +1 -1
  23. package/dist/numbers/integer.d.ts +1 -1
  24. package/dist/numbers/non-negative-float.d.ts +1 -1
  25. package/dist/numbers/non-negative-integer.d.ts +1 -1
  26. package/dist/numbers/percent.d.ts +1 -1
  27. package/dist/status/approval.d.ts +6 -1
  28. package/dist/status/availability.d.ts +5 -1
  29. package/dist/status/condition.d.ts +7 -1
  30. package/dist/status/delay.d.ts +11 -2
  31. package/dist/status/grade.d.ts +13 -2
  32. package/dist/status/lifecycle.d.ts +8 -1
  33. package/dist/status/operational.d.ts +6 -1
  34. package/dist/status/processing.d.ts +7 -1
  35. package/dist/status/publish.d.ts +5 -1
  36. package/dist/status/seen.d.ts +5 -1
  37. package/dist/status/severity.d.ts +7 -1
  38. package/dist/status/system.d.ts +6 -1
  39. package/dist/status/temporal.d.ts +11 -2
  40. package/dist/status/ticketing.d.ts +4 -1
  41. package/dist/status/validity.d.ts +5 -1
  42. package/dist/theme/mode.d.ts +9 -2
  43. package/dist/theme/scheme.d.ts +4 -1
  44. package/dist/utils/hex-color.d.ts +1 -1
  45. package/dist/utils/index.d.ts +1 -0
  46. package/dist/utils/index.js +1 -0
  47. package/dist/utils/language-tag.d.ts +5 -1
  48. package/dist/utils/null-as-undefined.d.ts +1 -1
  49. package/dist/utils/partial-without-defaults.d.ts +7 -0
  50. package/dist/utils/partial-without-defaults.js +10 -0
  51. package/package.json +2 -2
@@ -2,82 +2,62 @@ import { z } from 'zod';
2
2
  export declare const ApiResponseSuccessSchema: z.ZodObject<{
3
3
  data: z.ZodUnknown;
4
4
  error: z.ZodNull;
5
- generated_at: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("../datetime/unix-millis.js").UnixMilliseconds, string | number>>>;
6
- status_code: z.ZodEnum<["200", "201", "204"]>;
7
- timestamp: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("../datetime/unix-millis.js").UnixMilliseconds, string | number>;
8
- }, "strip", z.ZodTypeAny, {
9
- error: null;
10
- generated_at: import("../datetime/unix-millis.js").UnixMilliseconds | null;
11
- status_code: "200" | "201" | "204";
12
- timestamp: number & {
13
- __brand: "UnixMilliseconds";
14
- };
15
- data?: unknown;
16
- }, {
17
- error: null;
18
- status_code: "200" | "201" | "204";
19
- timestamp: string | number;
20
- data?: unknown;
21
- generated_at?: string | number | null | undefined;
22
- }>;
5
+ generated_at: z.ZodDefault<z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<import("../datetime/unix-millis.js").UnixMilliseconds, string | number>>>>;
6
+ status_code: z.ZodEnum<{
7
+ 200: "200";
8
+ 201: "201";
9
+ 204: "204";
10
+ }>;
11
+ timestamp: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<import("../datetime/unix-millis.js").UnixMilliseconds, string | number>>;
12
+ }, z.core.$strip>;
23
13
  export type ApiResponseSuccess<T> = Omit<z.infer<typeof ApiResponseSuccessSchema>, 'data'> & {
24
14
  data: T;
25
15
  };
26
16
  export declare const ApiResponseErrorSchema: z.ZodObject<{
27
17
  data: z.ZodNull;
28
18
  error: z.ZodString;
29
- status_code: z.ZodEnum<["400", "401", "403", "404", "409", "415", "429", "500", "502", "503", "504"]>;
30
- timestamp: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("../datetime/unix-millis.js").UnixMilliseconds, string | number>;
31
- }, "strip", z.ZodTypeAny, {
32
- data: null;
33
- error: string;
34
- status_code: "400" | "401" | "403" | "404" | "409" | "415" | "429" | "500" | "502" | "503" | "504";
35
- timestamp: number & {
36
- __brand: "UnixMilliseconds";
37
- };
38
- }, {
39
- data: null;
40
- error: string;
41
- status_code: "400" | "401" | "403" | "404" | "409" | "415" | "429" | "500" | "502" | "503" | "504";
42
- timestamp: string | number;
43
- }>;
19
+ status_code: z.ZodEnum<{
20
+ 400: "400";
21
+ 401: "401";
22
+ 403: "403";
23
+ 404: "404";
24
+ 409: "409";
25
+ 415: "415";
26
+ 429: "429";
27
+ 500: "500";
28
+ 502: "502";
29
+ 503: "503";
30
+ 504: "504";
31
+ }>;
32
+ timestamp: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<import("../datetime/unix-millis.js").UnixMilliseconds, string | number>>;
33
+ }, z.core.$strip>;
44
34
  export type ApiResponseError = z.infer<typeof ApiResponseErrorSchema>;
45
- export declare const ApiResponseSchema: z.ZodDiscriminatedUnion<"status_code", [z.ZodObject<{
35
+ export declare const ApiResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
46
36
  data: z.ZodUnknown;
47
37
  error: z.ZodNull;
48
- generated_at: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("../datetime/unix-millis.js").UnixMilliseconds, string | number>>>;
49
- status_code: z.ZodEnum<["200", "201", "204"]>;
50
- timestamp: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("../datetime/unix-millis.js").UnixMilliseconds, string | number>;
51
- }, "strip", z.ZodTypeAny, {
52
- error: null;
53
- generated_at: import("../datetime/unix-millis.js").UnixMilliseconds | null;
54
- status_code: "200" | "201" | "204";
55
- timestamp: number & {
56
- __brand: "UnixMilliseconds";
57
- };
58
- data?: unknown;
59
- }, {
60
- error: null;
61
- status_code: "200" | "201" | "204";
62
- timestamp: string | number;
63
- data?: unknown;
64
- generated_at?: string | number | null | undefined;
65
- }>, z.ZodObject<{
38
+ generated_at: z.ZodDefault<z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<import("../datetime/unix-millis.js").UnixMilliseconds, string | number>>>>;
39
+ status_code: z.ZodEnum<{
40
+ 200: "200";
41
+ 201: "201";
42
+ 204: "204";
43
+ }>;
44
+ timestamp: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<import("../datetime/unix-millis.js").UnixMilliseconds, string | number>>;
45
+ }, z.core.$strip>, z.ZodObject<{
66
46
  data: z.ZodNull;
67
47
  error: z.ZodString;
68
- status_code: z.ZodEnum<["400", "401", "403", "404", "409", "415", "429", "500", "502", "503", "504"]>;
69
- timestamp: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("../datetime/unix-millis.js").UnixMilliseconds, string | number>;
70
- }, "strip", z.ZodTypeAny, {
71
- data: null;
72
- error: string;
73
- status_code: "400" | "401" | "403" | "404" | "409" | "415" | "429" | "500" | "502" | "503" | "504";
74
- timestamp: number & {
75
- __brand: "UnixMilliseconds";
76
- };
77
- }, {
78
- data: null;
79
- error: string;
80
- status_code: "400" | "401" | "403" | "404" | "409" | "415" | "429" | "500" | "502" | "503" | "504";
81
- timestamp: string | number;
82
- }>]>;
48
+ status_code: z.ZodEnum<{
49
+ 400: "400";
50
+ 401: "401";
51
+ 403: "403";
52
+ 404: "404";
53
+ 409: "409";
54
+ 415: "415";
55
+ 429: "429";
56
+ 500: "500";
57
+ 502: "502";
58
+ 503: "503";
59
+ 504: "504";
60
+ }>;
61
+ timestamp: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<import("../datetime/unix-millis.js").UnixMilliseconds, string | number>>;
62
+ }, z.core.$strip>], "status_code">;
83
63
  export type ApiResponse<T> = ApiResponseError | ApiResponseSuccess<T>;
@@ -1,4 +1,19 @@
1
1
  import { z } from 'zod';
2
2
  export declare const HttpStatusValues: readonly ["200", "201", "204", "400", "401", "403", "404", "409", "415", "429", "500", "502", "503", "504"];
3
- export declare const HttpStatusSchema: z.ZodEnum<["200", "201", "204", "400", "401", "403", "404", "409", "415", "429", "500", "502", "503", "504"]>;
3
+ export declare const HttpStatusSchema: z.ZodEnum<{
4
+ 200: "200";
5
+ 201: "201";
6
+ 204: "204";
7
+ 400: "400";
8
+ 401: "401";
9
+ 403: "403";
10
+ 404: "404";
11
+ 409: "409";
12
+ 415: "415";
13
+ 429: "429";
14
+ 500: "500";
15
+ 502: "502";
16
+ 503: "503";
17
+ 504: "504";
18
+ }>;
4
19
  export type HttpStatus = z.infer<typeof HttpStatusSchema>;
@@ -1,11 +1,5 @@
1
1
  import { z } from 'zod';
2
2
  export declare const PaginationSchema: z.ZodObject<{
3
- limit: z.ZodDefault<z.ZodNumber>;
4
- page: z.ZodDefault<z.ZodNumber>;
5
- }, "strip", z.ZodTypeAny, {
6
- limit: number;
7
- page: number;
8
- }, {
9
- limit?: number | undefined;
10
- page?: number | undefined;
11
- }>;
3
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
4
+ page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
5
+ }, z.core.$strip>;
@@ -3,7 +3,7 @@ export declare const CALENDAR_DATE_FORMAT = "yyyy-MM-dd";
3
3
  export type CalendarDate = string & {
4
4
  __brand: 'CalendarDate';
5
5
  };
6
- export declare const CalendarDateSchema: z.ZodEffects<z.ZodString, CalendarDate, string>;
6
+ export declare const CalendarDateSchema: z.ZodPipe<z.ZodString, z.ZodTransform<CalendarDate, string>>;
7
7
  /**
8
8
  * This function validates if a string is a valid calendar date
9
9
  * in the format `yyyy-MM-dd`.
@@ -1,6 +1,13 @@
1
1
  import { z } from 'zod';
2
2
  export declare const DateFormatValues: readonly ["full", "short", "only_time", "only_time_with_seconds", "only_date", "iso"];
3
- export declare const DateFormatSchema: z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["full", "short", "only_time", "only_time_with_seconds", "only_date", "iso"]>>;
3
+ export declare const DateFormatSchema: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodEnum<{
4
+ full: "full";
5
+ short: "short";
6
+ only_time: "only_time";
7
+ only_time_with_seconds: "only_time_with_seconds";
8
+ only_date: "only_date";
9
+ iso: "iso";
10
+ }>>;
4
11
  /**
5
12
  * A date format.
6
13
  */
@@ -1,18 +1,8 @@
1
1
  import { z } from 'zod';
2
2
  export declare const TimeIntervalSchema: z.ZodObject<{
3
- end: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("./unix-millis.js").UnixMilliseconds, string | number>;
4
- start: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("./unix-millis.js").UnixMilliseconds, string | number>;
5
- }, "strip", z.ZodTypeAny, {
6
- end: number & {
7
- __brand: "UnixMilliseconds";
8
- };
9
- start: number & {
10
- __brand: "UnixMilliseconds";
11
- };
12
- }, {
13
- end: string | number;
14
- start: string | number;
15
- }>;
3
+ end: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<import("./unix-millis.js").UnixMilliseconds, string | number>>;
4
+ start: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<import("./unix-millis.js").UnixMilliseconds, string | number>>;
5
+ }, z.core.$strip>;
16
6
  /**
17
7
  * A time interval.
18
8
  */
@@ -21,4 +21,4 @@ export type OperationalDateInt = number & {
21
21
  * // => 20260620 as OperationalDateInt
22
22
  * ```
23
23
  */
24
- export declare const OperationalDateIntSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, string, string | number>, string, string | number>, OperationalDateInt, string | number>;
24
+ export declare const OperationalDateIntSchema: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>, z.ZodTransform<OperationalDateInt, string>>;
@@ -10,7 +10,7 @@ export type OperationalDate = string & {
10
10
  * Represents an operational date as a string in the format 'yyyyMMdd'.
11
11
  * @deprecated Use the OperationalDateIntSchema and validateOperationalDateInt function instead, for better performance.
12
12
  */
13
- export declare const OperationalDateSchema: z.ZodEffects<z.ZodString, OperationalDate, string>;
13
+ export declare const OperationalDateSchema: z.ZodPipe<z.ZodString, z.ZodTransform<OperationalDate, string>>;
14
14
  /**
15
15
  * This function validates if a string is a valid
16
16
  * operational date in the format 'yyyyMMdd'.
@@ -13,7 +13,7 @@ export type OperationalTime = string & {
13
13
  /**
14
14
  * Represents a Operational time as a string in the format 'HH:mm:ss'.
15
15
  */
16
- export declare const OperationalTimeSchema: z.ZodEffects<z.ZodString, OperationalTime, string>;
16
+ export declare const OperationalTimeSchema: z.ZodPipe<z.ZodString, z.ZodTransform<OperationalTime, string>>;
17
17
  /**
18
18
  * This function validates if a string is a valid
19
19
  * Operational time in the format 'HH:mm:ss'.
@@ -1,6 +1,22 @@
1
1
  import { z } from 'zod';
2
2
  export declare const TimeSlotValues: readonly ["1s", "5s", "10s", "30s", "1m", "5m", "10m", "15m", "30m", "1h", "2h", "3h", "6h", "12h", "24h"];
3
- export declare const TimeSlotSchema: z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["1s", "5s", "10s", "30s", "1m", "5m", "10m", "15m", "30m", "1h", "2h", "3h", "6h", "12h", "24h"]>>;
3
+ export declare const TimeSlotSchema: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodEnum<{
4
+ "1s": "1s";
5
+ "5s": "5s";
6
+ "10s": "10s";
7
+ "30s": "30s";
8
+ "1m": "1m";
9
+ "5m": "5m";
10
+ "10m": "10m";
11
+ "15m": "15m";
12
+ "30m": "30m";
13
+ "1h": "1h";
14
+ "2h": "2h";
15
+ "3h": "3h";
16
+ "6h": "6h";
17
+ "12h": "12h";
18
+ "24h": "24h";
19
+ }>>;
4
20
  /**
5
21
  * A time slot in human readable format.
6
22
  */