@leaflow/sdk 0.172.0 → 0.173.1

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 (92) hide show
  1. package/dist/account/v1/generated/models.d.ts +52 -10
  2. package/dist/account/v1/generated/validators/error.zod.d.ts +13 -4
  3. package/dist/account/v1/generated/validators/error.zod.js +6 -9
  4. package/dist/account/v1/generated/validators/errorStatus.zod.d.ts +41 -0
  5. package/dist/account/v1/generated/validators/errorStatus.zod.js +56 -0
  6. package/dist/account/v1/generated/validators/fieldViolation.zod.d.ts +32 -0
  7. package/dist/account/v1/generated/validators/fieldViolation.zod.js +35 -0
  8. package/dist/assistant/v1/generated/models.d.ts +52 -10
  9. package/dist/assistant/v1/generated/validators/error.zod.d.ts +13 -4
  10. package/dist/assistant/v1/generated/validators/error.zod.js +6 -9
  11. package/dist/assistant/v1/generated/validators/errorStatus.zod.d.ts +40 -0
  12. package/dist/assistant/v1/generated/validators/errorStatus.zod.js +55 -0
  13. package/dist/assistant/v1/generated/validators/fieldViolation.zod.d.ts +31 -0
  14. package/dist/assistant/v1/generated/validators/fieldViolation.zod.js +34 -0
  15. package/dist/billing/v1/generated/models.d.ts +52 -10
  16. package/dist/billing/v1/generated/validators/error.zod.d.ts +13 -4
  17. package/dist/billing/v1/generated/validators/error.zod.js +6 -9
  18. package/dist/billing/v1/generated/validators/errorStatus.zod.d.ts +23 -0
  19. package/dist/billing/v1/generated/validators/errorStatus.zod.js +38 -0
  20. package/dist/billing/v1/generated/validators/fieldViolation.zod.d.ts +14 -0
  21. package/dist/billing/v1/generated/validators/fieldViolation.zod.js +17 -0
  22. package/dist/canopy/v1/generated/models.d.ts +52 -10
  23. package/dist/canopy/v1/generated/validators/error.zod.d.ts +13 -4
  24. package/dist/canopy/v1/generated/validators/error.zod.js +6 -9
  25. package/dist/canopy/v1/generated/validators/errorStatus.zod.d.ts +56 -0
  26. package/dist/canopy/v1/generated/validators/errorStatus.zod.js +71 -0
  27. package/dist/canopy/v1/generated/validators/fieldViolation.zod.d.ts +47 -0
  28. package/dist/canopy/v1/generated/validators/fieldViolation.zod.js +50 -0
  29. package/dist/compute/v2/generated/models.d.ts +52 -10
  30. package/dist/compute/v2/generated/validators/error.zod.d.ts +13 -4
  31. package/dist/compute/v2/generated/validators/error.zod.js +6 -9
  32. package/dist/compute/v2/generated/validators/errorStatus.zod.d.ts +50 -0
  33. package/dist/compute/v2/generated/validators/errorStatus.zod.js +65 -0
  34. package/dist/compute/v2/generated/validators/fieldViolation.zod.d.ts +41 -0
  35. package/dist/compute/v2/generated/validators/fieldViolation.zod.js +44 -0
  36. package/dist/dns/v1/generated/models.d.ts +52 -10
  37. package/dist/dns/v1/generated/validators/error.zod.d.ts +13 -4
  38. package/dist/dns/v1/generated/validators/error.zod.js +6 -9
  39. package/dist/dns/v1/generated/validators/errorStatus.zod.d.ts +66 -0
  40. package/dist/dns/v1/generated/validators/errorStatus.zod.js +81 -0
  41. package/dist/dns/v1/generated/validators/fieldViolation.zod.d.ts +57 -0
  42. package/dist/dns/v1/generated/validators/fieldViolation.zod.js +60 -0
  43. package/dist/iam/v1/generated/models.d.ts +52 -10
  44. package/dist/iam/v1/generated/validators/error.zod.d.ts +13 -4
  45. package/dist/iam/v1/generated/validators/error.zod.js +6 -9
  46. package/dist/iam/v1/generated/validators/errorStatus.zod.d.ts +30 -0
  47. package/dist/iam/v1/generated/validators/errorStatus.zod.js +45 -0
  48. package/dist/iam/v1/generated/validators/fieldViolation.zod.d.ts +21 -0
  49. package/dist/iam/v1/generated/validators/fieldViolation.zod.js +24 -0
  50. package/dist/membership/v1/generated/models.d.ts +52 -10
  51. package/dist/membership/v1/generated/validators/error.zod.d.ts +13 -4
  52. package/dist/membership/v1/generated/validators/error.zod.js +6 -9
  53. package/dist/membership/v1/generated/validators/errorStatus.zod.d.ts +23 -0
  54. package/dist/membership/v1/generated/validators/errorStatus.zod.js +38 -0
  55. package/dist/membership/v1/generated/validators/fieldViolation.zod.d.ts +14 -0
  56. package/dist/membership/v1/generated/validators/fieldViolation.zod.js +17 -0
  57. package/dist/monitoring/v1/generated/models.d.ts +52 -10
  58. package/dist/monitoring/v1/generated/validators/error.zod.d.ts +13 -4
  59. package/dist/monitoring/v1/generated/validators/error.zod.js +6 -9
  60. package/dist/monitoring/v1/generated/validators/errorStatus.zod.d.ts +36 -0
  61. package/dist/monitoring/v1/generated/validators/errorStatus.zod.js +51 -0
  62. package/dist/monitoring/v1/generated/validators/fieldViolation.zod.d.ts +27 -0
  63. package/dist/monitoring/v1/generated/validators/fieldViolation.zod.js +30 -0
  64. package/dist/notification/v1/generated/models.d.ts +52 -10
  65. package/dist/notification/v1/generated/validators/error.zod.d.ts +13 -4
  66. package/dist/notification/v1/generated/validators/error.zod.js +6 -9
  67. package/dist/notification/v1/generated/validators/errorStatus.zod.d.ts +77 -0
  68. package/dist/notification/v1/generated/validators/errorStatus.zod.js +92 -0
  69. package/dist/notification/v1/generated/validators/fieldViolation.zod.d.ts +68 -0
  70. package/dist/notification/v1/generated/validators/fieldViolation.zod.js +71 -0
  71. package/dist/support/v1/generated/models.d.ts +52 -10
  72. package/dist/support/v1/generated/validators/error.zod.d.ts +13 -4
  73. package/dist/support/v1/generated/validators/error.zod.js +6 -9
  74. package/dist/support/v1/generated/validators/errorStatus.zod.d.ts +66 -0
  75. package/dist/support/v1/generated/validators/errorStatus.zod.js +81 -0
  76. package/dist/support/v1/generated/validators/fieldViolation.zod.d.ts +57 -0
  77. package/dist/support/v1/generated/validators/fieldViolation.zod.js +60 -0
  78. package/dist/swas/v1/generated/models.d.ts +52 -10
  79. package/dist/swas/v1/generated/validators/error.zod.d.ts +13 -4
  80. package/dist/swas/v1/generated/validators/error.zod.js +6 -9
  81. package/dist/swas/v1/generated/validators/errorStatus.zod.d.ts +23 -0
  82. package/dist/swas/v1/generated/validators/errorStatus.zod.js +38 -0
  83. package/dist/swas/v1/generated/validators/fieldViolation.zod.d.ts +14 -0
  84. package/dist/swas/v1/generated/validators/fieldViolation.zod.js +17 -0
  85. package/dist/type/error/v1/generated/models.d.ts +52 -10
  86. package/dist/type/error/v1/generated/validators/error.zod.d.ts +13 -4
  87. package/dist/type/error/v1/generated/validators/error.zod.js +6 -9
  88. package/dist/type/error/v1/generated/validators/errorStatus.zod.d.ts +24 -0
  89. package/dist/type/error/v1/generated/validators/errorStatus.zod.js +39 -0
  90. package/dist/type/error/v1/generated/validators/fieldViolation.zod.d.ts +15 -0
  91. package/dist/type/error/v1/generated/validators/fieldViolation.zod.js +18 -0
  92. package/package.json +1 -1
@@ -12,22 +12,64 @@
12
12
  * project. It does not state whether a given operation is allowed; each service declares which permission its own operations require.
13
13
  * OpenAPI spec version: 1.0.0
14
14
  */
15
+ export interface FieldViolation {
16
+ /** The path to the rejected field in the request body, such as `items[2].price_id`. */
17
+ field: string;
18
+ /** Why the field was rejected, such as `REQUIRED` or `OUT_OF_RANGE`. */
19
+ reason?: string;
20
+ }
15
21
  /**
16
- * What a given `code` carries alongside the message. The keys depend on the code,
17
- * and a client that does not recognise one ignores it.
22
+ * Values that belong to `reason`, one set per reason. Clients use them to fill in
23
+ * localized text and never parse `message` to obtain them. Keys are documented per
24
+ * reason; a key that has appeared once keeps appearing.
18
25
  */
19
- export type ErrorMeta = {
20
- [key: string]: unknown;
26
+ export type ErrorStatusMetadata = {
27
+ [key: string]: string;
21
28
  };
22
- export interface Error {
23
- code?: string;
29
+ export interface ErrorStatus {
30
+ /** The HTTP status code of the response. */
31
+ code: number;
32
+ /** The canonical name of the status, such as `INVALID_ARGUMENT` or `UNAVAILABLE`. */
33
+ status: string;
34
+ /**
35
+ * A description of the failure for developers. It is always English and is not meant
36
+ * to be shown to end users as is.
37
+ */
24
38
  message: string;
25
39
  /**
26
- * What a given `code` carries alongside the message. The keys depend on the code,
27
- * and a client that does not recognise one ignores it.
40
+ * A stable machine-readable code identifying the failure. Clients branch on this value
41
+ * and render their own text; it does not change once published.
42
+ */
43
+ reason?: string;
44
+ /**
45
+ * Values that belong to `reason`, one set per reason. Clients use them to fill in
46
+ * localized text and never parse `message` to obtain them. Keys are documented per
47
+ * reason; a key that has appeared once keeps appearing.
48
+ */
49
+ metadata?: ErrorStatusMetadata;
50
+ /**
51
+ * Request fields rejected by the request's constraints. Present on validation
52
+ * failures; one request may violate several fields.
28
53
  */
29
- meta?: ErrorMeta;
30
- status: number;
54
+ field_violations?: FieldViolation[];
55
+ /**
56
+ * How long the client should wait before retrying, as a duration string such as
57
+ * `30s`. Present only when waiting can succeed.
58
+ */
59
+ retry_delay?: string;
60
+ /**
61
+ * The identifier of the request in the service's logs. Quote it when reporting a
62
+ * failure.
63
+ */
64
+ request_id?: string;
65
+ }
66
+ /**
67
+ * A failed request. The envelope follows the Google REST error format: `code` is the HTTP
68
+ * status, `status` is its canonical name, and `reason` is the stable machine-readable code
69
+ * that identifies the failure.
70
+ */
71
+ export interface Error {
72
+ error: ErrorStatus;
31
73
  }
32
74
  export interface PermissionResource {
33
75
  /** The code of the permission, such as compute:instance.delete. **There is no display name here** — what a permission reads as is localised, and translation belongs to the layer rendering it. Until a translation catches up, the code itself is what is shown */
@@ -14,10 +14,19 @@
14
14
  */
15
15
  import * as zod from "zod";
16
16
  export declare const Error: zod.ZodObject<{
17
- code: zod.ZodOptional<zod.ZodString>;
18
- message: zod.ZodString;
19
- meta: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
20
- status: zod.ZodInt;
17
+ error: zod.ZodObject<{
18
+ code: zod.ZodInt;
19
+ status: zod.ZodString;
20
+ message: zod.ZodString;
21
+ reason: zod.ZodOptional<zod.ZodString>;
22
+ metadata: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
23
+ field_violations: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
24
+ field: zod.ZodString;
25
+ reason: zod.ZodOptional<zod.ZodString>;
26
+ }, zod.z.core.$strict>>>;
27
+ retry_delay: zod.ZodOptional<zod.ZodString>;
28
+ request_id: zod.ZodOptional<zod.ZodString>;
29
+ }, zod.z.core.$strict>;
21
30
  }, zod.z.core.$strict>;
22
31
  export type Error = zod.input<typeof Error>;
23
32
  export type ErrorOutput = zod.output<typeof Error>;
@@ -13,12 +13,9 @@
13
13
  * OpenAPI spec version: 1.0.0
14
14
  */
15
15
  import * as zod from "zod";
16
- export const Error = zod.strictObject({
17
- code: zod.string().optional(),
18
- message: zod.string(),
19
- meta: zod
20
- .record(zod.string(), zod.unknown())
21
- .optional()
22
- .describe("What a given `code` carries alongside the message. The keys depend on the code,\nand a client that does not recognise one ignores it."),
23
- status: zod.int(),
24
- });
16
+ import { ErrorStatus } from "./errorStatus.zod.js";
17
+ export const Error = zod
18
+ .strictObject({
19
+ error: ErrorStatus,
20
+ })
21
+ .describe("A failed request. The envelope follows the Google REST error format: `code` is the HTTP\nstatus, `status` is its canonical name, and `reason` is the stable machine-readable code\nthat identifies the failure.");
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow IAM API
5
+ * What happens inside a project: members, roles, invitations and SSH keys.
6
+ *
7
+ * Every request carries a scoped token; see the `bearerAuth` security scheme. No path carries a
8
+ * `projectId`, and the current project is the one the token states. Tokens are obtained from the
9
+ * account API.
10
+ *
11
+ * `GET /api/v1/membership` returns the roles and permissions the caller holds in the current
12
+ * project. It does not state whether a given operation is allowed; each service declares which permission its own operations require.
13
+ * OpenAPI spec version: 1.0.0
14
+ */
15
+ import * as zod from "zod";
16
+ export declare const ErrorStatus: zod.ZodObject<{
17
+ code: zod.ZodInt;
18
+ status: zod.ZodString;
19
+ message: zod.ZodString;
20
+ reason: zod.ZodOptional<zod.ZodString>;
21
+ metadata: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
22
+ field_violations: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
23
+ field: zod.ZodString;
24
+ reason: zod.ZodOptional<zod.ZodString>;
25
+ }, zod.z.core.$strict>>>;
26
+ retry_delay: zod.ZodOptional<zod.ZodString>;
27
+ request_id: zod.ZodOptional<zod.ZodString>;
28
+ }, zod.z.core.$strict>;
29
+ export type ErrorStatus = zod.input<typeof ErrorStatus>;
30
+ export type ErrorStatusOutput = zod.output<typeof ErrorStatus>;
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow IAM API
5
+ * What happens inside a project: members, roles, invitations and SSH keys.
6
+ *
7
+ * Every request carries a scoped token; see the `bearerAuth` security scheme. No path carries a
8
+ * `projectId`, and the current project is the one the token states. Tokens are obtained from the
9
+ * account API.
10
+ *
11
+ * `GET /api/v1/membership` returns the roles and permissions the caller holds in the current
12
+ * project. It does not state whether a given operation is allowed; each service declares which permission its own operations require.
13
+ * OpenAPI spec version: 1.0.0
14
+ */
15
+ import * as zod from "zod";
16
+ import { FieldViolation } from "./fieldViolation.zod.js";
17
+ export const ErrorStatus = zod.strictObject({
18
+ code: zod.int().describe("The HTTP status code of the response."),
19
+ status: zod
20
+ .string()
21
+ .describe("The canonical name of the status, such as `INVALID_ARGUMENT` or `UNAVAILABLE`."),
22
+ message: zod
23
+ .string()
24
+ .describe("A description of the failure for developers. It is always English and is not meant\nto be shown to end users as is."),
25
+ reason: zod
26
+ .string()
27
+ .optional()
28
+ .describe("A stable machine-readable code identifying the failure. Clients branch on this value\nand render their own text; it does not change once published."),
29
+ metadata: zod
30
+ .record(zod.string(), zod.string())
31
+ .optional()
32
+ .describe("Values that belong to `reason`, one set per reason. Clients use them to fill in\nlocalized text and never parse `message` to obtain them. Keys are documented per\nreason; a key that has appeared once keeps appearing."),
33
+ field_violations: zod
34
+ .array(FieldViolation)
35
+ .optional()
36
+ .describe("Request fields rejected by the request's constraints. Present on validation\nfailures; one request may violate several fields."),
37
+ retry_delay: zod
38
+ .string()
39
+ .optional()
40
+ .describe("How long the client should wait before retrying, as a duration string such as\n`30s`. Present only when waiting can succeed."),
41
+ request_id: zod
42
+ .string()
43
+ .optional()
44
+ .describe("The identifier of the request in the service's logs. Quote it when reporting a\nfailure."),
45
+ });
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow IAM API
5
+ * What happens inside a project: members, roles, invitations and SSH keys.
6
+ *
7
+ * Every request carries a scoped token; see the `bearerAuth` security scheme. No path carries a
8
+ * `projectId`, and the current project is the one the token states. Tokens are obtained from the
9
+ * account API.
10
+ *
11
+ * `GET /api/v1/membership` returns the roles and permissions the caller holds in the current
12
+ * project. It does not state whether a given operation is allowed; each service declares which permission its own operations require.
13
+ * OpenAPI spec version: 1.0.0
14
+ */
15
+ import * as zod from "zod";
16
+ export declare const FieldViolation: zod.ZodObject<{
17
+ field: zod.ZodString;
18
+ reason: zod.ZodOptional<zod.ZodString>;
19
+ }, zod.z.core.$strict>;
20
+ export type FieldViolation = zod.input<typeof FieldViolation>;
21
+ export type FieldViolationOutput = zod.output<typeof FieldViolation>;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow IAM API
5
+ * What happens inside a project: members, roles, invitations and SSH keys.
6
+ *
7
+ * Every request carries a scoped token; see the `bearerAuth` security scheme. No path carries a
8
+ * `projectId`, and the current project is the one the token states. Tokens are obtained from the
9
+ * account API.
10
+ *
11
+ * `GET /api/v1/membership` returns the roles and permissions the caller holds in the current
12
+ * project. It does not state whether a given operation is allowed; each service declares which permission its own operations require.
13
+ * OpenAPI spec version: 1.0.0
14
+ */
15
+ import * as zod from "zod";
16
+ export const FieldViolation = zod.strictObject({
17
+ field: zod
18
+ .string()
19
+ .describe("The path to the rejected field in the request body, such as `items[2].price_id`."),
20
+ reason: zod
21
+ .string()
22
+ .optional()
23
+ .describe("Why the field was rejected, such as `REQUIRED` or `OUT_OF_RANGE`."),
24
+ });
@@ -5,22 +5,64 @@
5
5
  * Membership tiers and account memberships. Catalog queries support any configured currency; purchases use the billing account currency.
6
6
  * OpenAPI spec version: 1.0.0
7
7
  */
8
+ export interface FieldViolation {
9
+ /** The path to the rejected field in the request body, such as `items[2].price_id`. */
10
+ field: string;
11
+ /** Why the field was rejected, such as `REQUIRED` or `OUT_OF_RANGE`. */
12
+ reason?: string;
13
+ }
8
14
  /**
9
- * What a given `code` carries alongside the message. The keys depend on the code,
10
- * and a client that does not recognise one ignores it.
15
+ * Values that belong to `reason`, one set per reason. Clients use them to fill in
16
+ * localized text and never parse `message` to obtain them. Keys are documented per
17
+ * reason; a key that has appeared once keeps appearing.
11
18
  */
12
- export type ErrorMeta = {
13
- [key: string]: unknown;
19
+ export type ErrorStatusMetadata = {
20
+ [key: string]: string;
14
21
  };
15
- export interface Error {
16
- code?: string;
22
+ export interface ErrorStatus {
23
+ /** The HTTP status code of the response. */
24
+ code: number;
25
+ /** The canonical name of the status, such as `INVALID_ARGUMENT` or `UNAVAILABLE`. */
26
+ status: string;
27
+ /**
28
+ * A description of the failure for developers. It is always English and is not meant
29
+ * to be shown to end users as is.
30
+ */
17
31
  message: string;
18
32
  /**
19
- * What a given `code` carries alongside the message. The keys depend on the code,
20
- * and a client that does not recognise one ignores it.
33
+ * A stable machine-readable code identifying the failure. Clients branch on this value
34
+ * and render their own text; it does not change once published.
35
+ */
36
+ reason?: string;
37
+ /**
38
+ * Values that belong to `reason`, one set per reason. Clients use them to fill in
39
+ * localized text and never parse `message` to obtain them. Keys are documented per
40
+ * reason; a key that has appeared once keeps appearing.
41
+ */
42
+ metadata?: ErrorStatusMetadata;
43
+ /**
44
+ * Request fields rejected by the request's constraints. Present on validation
45
+ * failures; one request may violate several fields.
21
46
  */
22
- meta?: ErrorMeta;
23
- status: number;
47
+ field_violations?: FieldViolation[];
48
+ /**
49
+ * How long the client should wait before retrying, as a duration string such as
50
+ * `30s`. Present only when waiting can succeed.
51
+ */
52
+ retry_delay?: string;
53
+ /**
54
+ * The identifier of the request in the service's logs. Quote it when reporting a
55
+ * failure.
56
+ */
57
+ request_id?: string;
58
+ }
59
+ /**
60
+ * A failed request. The envelope follows the Google REST error format: `code` is the HTTP
61
+ * status, `status` is its canonical name, and `reason` is the stable machine-readable code
62
+ * that identifies the failure.
63
+ */
64
+ export interface Error {
65
+ error: ErrorStatus;
24
66
  }
25
67
  /**
26
68
  * A decimal string, in the currency stated alongside it.
@@ -7,10 +7,19 @@
7
7
  */
8
8
  import * as zod from "zod";
9
9
  export declare const Error: zod.ZodObject<{
10
- code: zod.ZodOptional<zod.ZodString>;
11
- message: zod.ZodString;
12
- meta: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
13
- status: zod.ZodInt;
10
+ error: zod.ZodObject<{
11
+ code: zod.ZodInt;
12
+ status: zod.ZodString;
13
+ message: zod.ZodString;
14
+ reason: zod.ZodOptional<zod.ZodString>;
15
+ metadata: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
16
+ field_violations: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
17
+ field: zod.ZodString;
18
+ reason: zod.ZodOptional<zod.ZodString>;
19
+ }, zod.z.core.$strict>>>;
20
+ retry_delay: zod.ZodOptional<zod.ZodString>;
21
+ request_id: zod.ZodOptional<zod.ZodString>;
22
+ }, zod.z.core.$strict>;
14
23
  }, zod.z.core.$strict>;
15
24
  export type Error = zod.input<typeof Error>;
16
25
  export type ErrorOutput = zod.output<typeof Error>;
@@ -6,12 +6,9 @@
6
6
  * OpenAPI spec version: 1.0.0
7
7
  */
8
8
  import * as zod from "zod";
9
- export const Error = zod.strictObject({
10
- code: zod.string().optional(),
11
- message: zod.string(),
12
- meta: zod
13
- .record(zod.string(), zod.unknown())
14
- .optional()
15
- .describe("What a given `code` carries alongside the message. The keys depend on the code,\nand a client that does not recognise one ignores it."),
16
- status: zod.int(),
17
- });
9
+ import { ErrorStatus } from "./errorStatus.zod.js";
10
+ export const Error = zod
11
+ .strictObject({
12
+ error: ErrorStatus,
13
+ })
14
+ .describe("A failed request. The envelope follows the Google REST error format: `code` is the HTTP\nstatus, `status` is its canonical name, and `reason` is the stable machine-readable code\nthat identifies the failure.");
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Membership API
5
+ * Membership tiers and account memberships. Catalog queries support any configured currency; purchases use the billing account currency.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ import * as zod from "zod";
9
+ export declare const ErrorStatus: zod.ZodObject<{
10
+ code: zod.ZodInt;
11
+ status: zod.ZodString;
12
+ message: zod.ZodString;
13
+ reason: zod.ZodOptional<zod.ZodString>;
14
+ metadata: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
15
+ field_violations: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
16
+ field: zod.ZodString;
17
+ reason: zod.ZodOptional<zod.ZodString>;
18
+ }, zod.z.core.$strict>>>;
19
+ retry_delay: zod.ZodOptional<zod.ZodString>;
20
+ request_id: zod.ZodOptional<zod.ZodString>;
21
+ }, zod.z.core.$strict>;
22
+ export type ErrorStatus = zod.input<typeof ErrorStatus>;
23
+ export type ErrorStatusOutput = zod.output<typeof ErrorStatus>;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Membership API
5
+ * Membership tiers and account memberships. Catalog queries support any configured currency; purchases use the billing account currency.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ import * as zod from "zod";
9
+ import { FieldViolation } from "./fieldViolation.zod.js";
10
+ export const ErrorStatus = zod.strictObject({
11
+ code: zod.int().describe("The HTTP status code of the response."),
12
+ status: zod
13
+ .string()
14
+ .describe("The canonical name of the status, such as `INVALID_ARGUMENT` or `UNAVAILABLE`."),
15
+ message: zod
16
+ .string()
17
+ .describe("A description of the failure for developers. It is always English and is not meant\nto be shown to end users as is."),
18
+ reason: zod
19
+ .string()
20
+ .optional()
21
+ .describe("A stable machine-readable code identifying the failure. Clients branch on this value\nand render their own text; it does not change once published."),
22
+ metadata: zod
23
+ .record(zod.string(), zod.string())
24
+ .optional()
25
+ .describe("Values that belong to `reason`, one set per reason. Clients use them to fill in\nlocalized text and never parse `message` to obtain them. Keys are documented per\nreason; a key that has appeared once keeps appearing."),
26
+ field_violations: zod
27
+ .array(FieldViolation)
28
+ .optional()
29
+ .describe("Request fields rejected by the request's constraints. Present on validation\nfailures; one request may violate several fields."),
30
+ retry_delay: zod
31
+ .string()
32
+ .optional()
33
+ .describe("How long the client should wait before retrying, as a duration string such as\n`30s`. Present only when waiting can succeed."),
34
+ request_id: zod
35
+ .string()
36
+ .optional()
37
+ .describe("The identifier of the request in the service's logs. Quote it when reporting a\nfailure."),
38
+ });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Membership API
5
+ * Membership tiers and account memberships. Catalog queries support any configured currency; purchases use the billing account currency.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ import * as zod from "zod";
9
+ export declare const FieldViolation: zod.ZodObject<{
10
+ field: zod.ZodString;
11
+ reason: zod.ZodOptional<zod.ZodString>;
12
+ }, zod.z.core.$strict>;
13
+ export type FieldViolation = zod.input<typeof FieldViolation>;
14
+ export type FieldViolationOutput = zod.output<typeof FieldViolation>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Membership API
5
+ * Membership tiers and account memberships. Catalog queries support any configured currency; purchases use the billing account currency.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ import * as zod from "zod";
9
+ export const FieldViolation = zod.strictObject({
10
+ field: zod
11
+ .string()
12
+ .describe("The path to the rejected field in the request body, such as `items[2].price_id`."),
13
+ reason: zod
14
+ .string()
15
+ .optional()
16
+ .describe("Why the field was rejected, such as `REQUIRED` or `OUT_OF_RANGE`."),
17
+ });
@@ -18,22 +18,64 @@
18
18
  * Enrollment and rotation responses include `tls_psk`. No other endpoint will return it again, so store it immediately. If it is lost, rotate once more — at the cost of updating the agent configuration on the monitored machine.
19
19
  * OpenAPI spec version: 1.0.0
20
20
  */
21
+ export interface FieldViolation {
22
+ /** The path to the rejected field in the request body, such as `items[2].price_id`. */
23
+ field: string;
24
+ /** Why the field was rejected, such as `REQUIRED` or `OUT_OF_RANGE`. */
25
+ reason?: string;
26
+ }
21
27
  /**
22
- * What a given `code` carries alongside the message. The keys depend on the code,
23
- * and a client that does not recognise one ignores it.
28
+ * Values that belong to `reason`, one set per reason. Clients use them to fill in
29
+ * localized text and never parse `message` to obtain them. Keys are documented per
30
+ * reason; a key that has appeared once keeps appearing.
24
31
  */
25
- export type ErrorMeta = {
26
- [key: string]: unknown;
32
+ export type ErrorStatusMetadata = {
33
+ [key: string]: string;
27
34
  };
28
- export interface Error {
29
- code?: string;
35
+ export interface ErrorStatus {
36
+ /** The HTTP status code of the response. */
37
+ code: number;
38
+ /** The canonical name of the status, such as `INVALID_ARGUMENT` or `UNAVAILABLE`. */
39
+ status: string;
40
+ /**
41
+ * A description of the failure for developers. It is always English and is not meant
42
+ * to be shown to end users as is.
43
+ */
30
44
  message: string;
31
45
  /**
32
- * What a given `code` carries alongside the message. The keys depend on the code,
33
- * and a client that does not recognise one ignores it.
46
+ * A stable machine-readable code identifying the failure. Clients branch on this value
47
+ * and render their own text; it does not change once published.
48
+ */
49
+ reason?: string;
50
+ /**
51
+ * Values that belong to `reason`, one set per reason. Clients use them to fill in
52
+ * localized text and never parse `message` to obtain them. Keys are documented per
53
+ * reason; a key that has appeared once keeps appearing.
54
+ */
55
+ metadata?: ErrorStatusMetadata;
56
+ /**
57
+ * Request fields rejected by the request's constraints. Present on validation
58
+ * failures; one request may violate several fields.
34
59
  */
35
- meta?: ErrorMeta;
36
- status: number;
60
+ field_violations?: FieldViolation[];
61
+ /**
62
+ * How long the client should wait before retrying, as a duration string such as
63
+ * `30s`. Present only when waiting can succeed.
64
+ */
65
+ retry_delay?: string;
66
+ /**
67
+ * The identifier of the request in the service's logs. Quote it when reporting a
68
+ * failure.
69
+ */
70
+ request_id?: string;
71
+ }
72
+ /**
73
+ * A failed request. The envelope follows the Google REST error format: `code` is the HTTP
74
+ * status, `status` is its canonical name, and `reason` is the stable machine-readable code
75
+ * that identifies the failure.
76
+ */
77
+ export interface Error {
78
+ error: ErrorStatus;
37
79
  }
38
80
  export interface IncidentFollowerResource {
39
81
  display_name: string;
@@ -20,10 +20,19 @@
20
20
  */
21
21
  import * as zod from "zod";
22
22
  export declare const Error: zod.ZodObject<{
23
- code: zod.ZodOptional<zod.ZodString>;
24
- message: zod.ZodString;
25
- meta: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
26
- status: zod.ZodInt;
23
+ error: zod.ZodObject<{
24
+ code: zod.ZodInt;
25
+ status: zod.ZodString;
26
+ message: zod.ZodString;
27
+ reason: zod.ZodOptional<zod.ZodString>;
28
+ metadata: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
29
+ field_violations: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
30
+ field: zod.ZodString;
31
+ reason: zod.ZodOptional<zod.ZodString>;
32
+ }, zod.z.core.$strict>>>;
33
+ retry_delay: zod.ZodOptional<zod.ZodString>;
34
+ request_id: zod.ZodOptional<zod.ZodString>;
35
+ }, zod.z.core.$strict>;
27
36
  }, zod.z.core.$strict>;
28
37
  export type Error = zod.input<typeof Error>;
29
38
  export type ErrorOutput = zod.output<typeof Error>;
@@ -19,12 +19,9 @@
19
19
  * OpenAPI spec version: 1.0.0
20
20
  */
21
21
  import * as zod from "zod";
22
- export const Error = zod.strictObject({
23
- code: zod.string().optional(),
24
- message: zod.string(),
25
- meta: zod
26
- .record(zod.string(), zod.unknown())
27
- .optional()
28
- .describe("What a given `code` carries alongside the message. The keys depend on the code,\nand a client that does not recognise one ignores it."),
29
- status: zod.int(),
30
- });
22
+ import { ErrorStatus } from "./errorStatus.zod.js";
23
+ export const Error = zod
24
+ .strictObject({
25
+ error: ErrorStatus,
26
+ })
27
+ .describe("A failed request. The envelope follows the Google REST error format: `code` is the HTTP\nstatus, `status` is its canonical name, and `reason` is the stable machine-readable code\nthat identifies the failure.");
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Monitoring API
5
+ * Monitoring for your own project: enroll machines, read metrics, work through incidents, schedule maintenance windows, and set availability targets.
6
+ *
7
+ * ## Authentication
8
+ *
9
+ * Every request carries a scoped token; see the `bearerAuth` security scheme.
10
+ *
11
+ * ## Two distinctions worth keeping straight
12
+ *
13
+ * - **Disabling is not deleting.** `POST /servers/{id}/disable` is reversible and preserves all history. `DELETE /servers/{id}` also removes the monitored host, its history and every incident recorded against it, and cannot be undone.
14
+ * - **Recovery is not closure.** `incident_status` reports whether monitoring considers the problem recovered; `closed_at` reports whether someone has finished handling it. An incident that has not recovered may still be closed as an accepted risk.
15
+ *
16
+ * ## The PSK is returned once
17
+ *
18
+ * Enrollment and rotation responses include `tls_psk`. No other endpoint will return it again, so store it immediately. If it is lost, rotate once more — at the cost of updating the agent configuration on the monitored machine.
19
+ * OpenAPI spec version: 1.0.0
20
+ */
21
+ import * as zod from "zod";
22
+ export declare const ErrorStatus: zod.ZodObject<{
23
+ code: zod.ZodInt;
24
+ status: zod.ZodString;
25
+ message: zod.ZodString;
26
+ reason: zod.ZodOptional<zod.ZodString>;
27
+ metadata: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
28
+ field_violations: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
29
+ field: zod.ZodString;
30
+ reason: zod.ZodOptional<zod.ZodString>;
31
+ }, zod.z.core.$strict>>>;
32
+ retry_delay: zod.ZodOptional<zod.ZodString>;
33
+ request_id: zod.ZodOptional<zod.ZodString>;
34
+ }, zod.z.core.$strict>;
35
+ export type ErrorStatus = zod.input<typeof ErrorStatus>;
36
+ export type ErrorStatusOutput = zod.output<typeof ErrorStatus>;