@tmlmobilidade/go-types-shared 20261009.1553.57 → 20261013.1121.17

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.
@@ -26,19 +26,19 @@ export type ApiResponseSuccess<T> = Omit<z.infer<typeof ApiResponseSuccessSchema
26
26
  export declare const ApiResponseErrorSchema: z.ZodObject<{
27
27
  data: z.ZodNull;
28
28
  error: z.ZodString;
29
- status_code: z.ZodEnum<["400", "401", "403", "404", "500"]>;
29
+ status_code: z.ZodEnum<["400", "401", "403", "404", "415", "429", "500", "502", "503", "504"]>;
30
30
  timestamp: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("../datetime/unix-millis.js").UnixMilliseconds, string | number>;
31
31
  }, "strip", z.ZodTypeAny, {
32
32
  data: null;
33
33
  error: string;
34
- status_code: "400" | "401" | "403" | "404" | "500";
34
+ status_code: "400" | "401" | "403" | "404" | "415" | "429" | "500" | "502" | "503" | "504";
35
35
  timestamp: number & {
36
36
  __brand: "UnixMilliseconds";
37
37
  };
38
38
  }, {
39
39
  data: null;
40
40
  error: string;
41
- status_code: "400" | "401" | "403" | "404" | "500";
41
+ status_code: "400" | "401" | "403" | "404" | "415" | "429" | "500" | "502" | "503" | "504";
42
42
  timestamp: string | number;
43
43
  }>;
44
44
  export type ApiResponseError = z.infer<typeof ApiResponseErrorSchema>;
@@ -65,19 +65,19 @@ export declare const ApiResponseSchema: z.ZodDiscriminatedUnion<"status_code", [
65
65
  }>, z.ZodObject<{
66
66
  data: z.ZodNull;
67
67
  error: z.ZodString;
68
- status_code: z.ZodEnum<["400", "401", "403", "404", "500"]>;
68
+ status_code: z.ZodEnum<["400", "401", "403", "404", "415", "429", "500", "502", "503", "504"]>;
69
69
  timestamp: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("../datetime/unix-millis.js").UnixMilliseconds, string | number>;
70
70
  }, "strip", z.ZodTypeAny, {
71
71
  data: null;
72
72
  error: string;
73
- status_code: "400" | "401" | "403" | "404" | "500";
73
+ status_code: "400" | "401" | "403" | "404" | "415" | "429" | "500" | "502" | "503" | "504";
74
74
  timestamp: number & {
75
75
  __brand: "UnixMilliseconds";
76
76
  };
77
77
  }, {
78
78
  data: null;
79
79
  error: string;
80
- status_code: "400" | "401" | "403" | "404" | "500";
80
+ status_code: "400" | "401" | "403" | "404" | "415" | "429" | "500" | "502" | "503" | "504";
81
81
  timestamp: string | number;
82
82
  }>]>;
83
83
  export type ApiResponse<T> = ApiResponseError | ApiResponseSuccess<T>;
@@ -23,7 +23,12 @@ export const ApiResponseErrorSchema = z.object({
23
23
  '401', // Unauthorized
24
24
  '403', // Forbidden
25
25
  '404', // Not Found
26
+ '415', // Unsupported Media Type
27
+ '429', // Too Many Requests
26
28
  '500', // Internal Server Error
29
+ '502', // Bad Gateway
30
+ '503', // Service Unavailable
31
+ '504', // Gateway Timeout
27
32
  ]),
28
33
  timestamp: UnixMillisecondsSchema,
29
34
  });
@@ -1,4 +1,4 @@
1
1
  import { z } from 'zod';
2
- export declare const HttpStatusValues: readonly ["200", "201", "204", "400", "401", "403", "404", "500"];
3
- export declare const HttpStatusSchema: z.ZodEnum<["200", "201", "204", "400", "401", "403", "404", "500"]>;
2
+ export declare const HttpStatusValues: readonly ["200", "201", "204", "400", "401", "403", "404", "415", "429", "500", "502", "503", "504"];
3
+ export declare const HttpStatusSchema: z.ZodEnum<["200", "201", "204", "400", "401", "403", "404", "415", "429", "500", "502", "503", "504"]>;
4
4
  export type HttpStatus = z.infer<typeof HttpStatusSchema>;
@@ -9,6 +9,11 @@ export const HttpStatusValues = [
9
9
  '401', // Unauthorized
10
10
  '403', // Forbidden
11
11
  '404', // Not Found
12
+ '415', // Unsupported Media Type
13
+ '429', // Too Many Requests
12
14
  '500', // Internal Server Error
15
+ '502', // Bad Gateway
16
+ '503', // Service Unavailable
17
+ '504', // Gateway Timeout
13
18
  ];
14
19
  export const HttpStatusSchema = z.enum(HttpStatusValues);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmlmobilidade/go-types-shared",
3
- "version": "20261009.1553.57",
3
+ "version": "20261013.1121.17",
4
4
  "author": {
5
5
  "email": "iso@tmlmobilidade.pt",
6
6
  "name": "TML-ISO"