@leaflow/sdk 0.171.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 (163) 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/index.d.ts +1 -0
  51. package/dist/index.js +1 -0
  52. package/dist/membership/v1/generated/models.d.ts +52 -10
  53. package/dist/membership/v1/generated/validators/error.zod.d.ts +13 -4
  54. package/dist/membership/v1/generated/validators/error.zod.js +6 -9
  55. package/dist/membership/v1/generated/validators/errorStatus.zod.d.ts +23 -0
  56. package/dist/membership/v1/generated/validators/errorStatus.zod.js +38 -0
  57. package/dist/membership/v1/generated/validators/fieldViolation.zod.d.ts +14 -0
  58. package/dist/membership/v1/generated/validators/fieldViolation.zod.js +17 -0
  59. package/dist/monitoring/v1/generated/models.d.ts +52 -10
  60. package/dist/monitoring/v1/generated/validators/error.zod.d.ts +13 -4
  61. package/dist/monitoring/v1/generated/validators/error.zod.js +6 -9
  62. package/dist/monitoring/v1/generated/validators/errorStatus.zod.d.ts +36 -0
  63. package/dist/monitoring/v1/generated/validators/errorStatus.zod.js +51 -0
  64. package/dist/monitoring/v1/generated/validators/fieldViolation.zod.d.ts +27 -0
  65. package/dist/monitoring/v1/generated/validators/fieldViolation.zod.js +30 -0
  66. package/dist/notification/v1/generated/models.d.ts +52 -10
  67. package/dist/notification/v1/generated/validators/error.zod.d.ts +13 -4
  68. package/dist/notification/v1/generated/validators/error.zod.js +6 -9
  69. package/dist/notification/v1/generated/validators/errorStatus.zod.d.ts +77 -0
  70. package/dist/notification/v1/generated/validators/errorStatus.zod.js +92 -0
  71. package/dist/notification/v1/generated/validators/fieldViolation.zod.d.ts +68 -0
  72. package/dist/notification/v1/generated/validators/fieldViolation.zod.js +71 -0
  73. package/dist/routes.d.ts +80 -0
  74. package/dist/routes.js +90 -0
  75. package/dist/support/v1/generated/models.d.ts +52 -10
  76. package/dist/support/v1/generated/validators/error.zod.d.ts +13 -4
  77. package/dist/support/v1/generated/validators/error.zod.js +6 -9
  78. package/dist/support/v1/generated/validators/errorStatus.zod.d.ts +66 -0
  79. package/dist/support/v1/generated/validators/errorStatus.zod.js +81 -0
  80. package/dist/support/v1/generated/validators/fieldViolation.zod.d.ts +57 -0
  81. package/dist/support/v1/generated/validators/fieldViolation.zod.js +60 -0
  82. package/dist/swas/v1/generated/functions.d.ts +418 -0
  83. package/dist/swas/v1/generated/functions.js +250 -0
  84. package/dist/swas/v1/generated/models.d.ts +426 -0
  85. package/dist/swas/v1/generated/models.js +87 -0
  86. package/dist/swas/v1/generated/schemas.zod.d.ts +117 -0
  87. package/dist/swas/v1/generated/schemas.zod.js +120 -0
  88. package/dist/swas/v1/generated/validators/catalog.zod.d.ts +32 -0
  89. package/dist/swas/v1/generated/validators/catalog.zod.js +16 -0
  90. package/dist/swas/v1/generated/validators/createPurchaseHeaders.zod.d.ts +14 -0
  91. package/dist/swas/v1/generated/validators/createPurchaseHeaders.zod.js +12 -0
  92. package/dist/swas/v1/generated/validators/cursorPagination.zod.d.ts +14 -0
  93. package/dist/swas/v1/generated/validators/cursorPagination.zod.js +14 -0
  94. package/dist/swas/v1/generated/validators/customerRefundProgress.zod.d.ts +16 -0
  95. package/dist/swas/v1/generated/validators/customerRefundProgress.zod.js +14 -0
  96. package/dist/swas/v1/generated/validators/decimalAmount.zod.d.ts +12 -0
  97. package/dist/swas/v1/generated/validators/decimalAmount.zod.js +11 -0
  98. package/dist/swas/v1/generated/validators/error.zod.d.ts +25 -0
  99. package/dist/swas/v1/generated/validators/error.zod.js +14 -0
  100. package/dist/swas/v1/generated/validators/errorStatus.zod.d.ts +23 -0
  101. package/dist/swas/v1/generated/validators/errorStatus.zod.js +38 -0
  102. package/dist/swas/v1/generated/validators/expectedQuote.zod.d.ts +14 -0
  103. package/dist/swas/v1/generated/validators/expectedQuote.zod.js +13 -0
  104. package/dist/swas/v1/generated/validators/fieldViolation.zod.d.ts +14 -0
  105. package/dist/swas/v1/generated/validators/fieldViolation.zod.js +17 -0
  106. package/dist/swas/v1/generated/validators/instance.zod.d.ts +58 -0
  107. package/dist/swas/v1/generated/validators/instance.zod.js +47 -0
  108. package/dist/swas/v1/generated/validators/instanceCapabilities.zod.d.ts +16 -0
  109. package/dist/swas/v1/generated/validators/instanceCapabilities.zod.js +14 -0
  110. package/dist/swas/v1/generated/validators/instanceList.zod.d.ts +62 -0
  111. package/dist/swas/v1/generated/validators/instanceList.zod.js +15 -0
  112. package/dist/swas/v1/generated/validators/instancePagination.zod.d.ts +15 -0
  113. package/dist/swas/v1/generated/validators/instancePagination.zod.js +10 -0
  114. package/dist/swas/v1/generated/validators/instancePrice.zod.d.ts +15 -0
  115. package/dist/swas/v1/generated/validators/instancePrice.zod.js +21 -0
  116. package/dist/swas/v1/generated/validators/listInstancesParams.zod.d.ts +20 -0
  117. package/dist/swas/v1/generated/validators/listInstancesParams.zod.js +22 -0
  118. package/dist/swas/v1/generated/validators/listPlansParams.zod.d.ts +14 -0
  119. package/dist/swas/v1/generated/validators/listPlansParams.zod.js +12 -0
  120. package/dist/swas/v1/generated/validators/managementOperation.zod.d.ts +36 -0
  121. package/dist/swas/v1/generated/validators/managementOperation.zod.js +21 -0
  122. package/dist/swas/v1/generated/validators/money.zod.d.ts +11 -0
  123. package/dist/swas/v1/generated/validators/money.zod.js +11 -0
  124. package/dist/swas/v1/generated/validators/offsetPagination.zod.d.ts +16 -0
  125. package/dist/swas/v1/generated/validators/offsetPagination.zod.js +16 -0
  126. package/dist/swas/v1/generated/validators/plan.zod.d.ts +29 -0
  127. package/dist/swas/v1/generated/validators/plan.zod.js +22 -0
  128. package/dist/swas/v1/generated/validators/price.zod.d.ts +19 -0
  129. package/dist/swas/v1/generated/validators/price.zod.js +28 -0
  130. package/dist/swas/v1/generated/validators/purchase.zod.d.ts +34 -0
  131. package/dist/swas/v1/generated/validators/purchase.zod.js +34 -0
  132. package/dist/swas/v1/generated/validators/purchaseCreate.zod.d.ts +27 -0
  133. package/dist/swas/v1/generated/validators/purchaseCreate.zod.js +23 -0
  134. package/dist/swas/v1/generated/validators/rebootCycle.zod.d.ts +14 -0
  135. package/dist/swas/v1/generated/validators/rebootCycle.zod.js +17 -0
  136. package/dist/swas/v1/generated/validators/rebootInstance.zod.d.ts +11 -0
  137. package/dist/swas/v1/generated/validators/rebootInstance.zod.js +9 -0
  138. package/dist/swas/v1/generated/validators/rebootInstanceHeaders.zod.d.ts +14 -0
  139. package/dist/swas/v1/generated/validators/rebootInstanceHeaders.zod.js +12 -0
  140. package/dist/swas/v1/generated/validators/refundProgress.zod.d.ts +33 -0
  141. package/dist/swas/v1/generated/validators/refundProgress.zod.js +27 -0
  142. package/dist/swas/v1/generated/validators/startInstance.zod.d.ts +11 -0
  143. package/dist/swas/v1/generated/validators/startInstance.zod.js +9 -0
  144. package/dist/swas/v1/generated/validators/startInstanceHeaders.zod.d.ts +14 -0
  145. package/dist/swas/v1/generated/validators/startInstanceHeaders.zod.js +12 -0
  146. package/dist/swas/v1/generated/validators/stopInstance.zod.d.ts +11 -0
  147. package/dist/swas/v1/generated/validators/stopInstance.zod.js +9 -0
  148. package/dist/swas/v1/generated/validators/stopInstanceHeaders.zod.d.ts +14 -0
  149. package/dist/swas/v1/generated/validators/stopInstanceHeaders.zod.js +12 -0
  150. package/dist/swas/v1/generated/validators/supplierRefundProgress.zod.d.ts +14 -0
  151. package/dist/swas/v1/generated/validators/supplierRefundProgress.zod.js +12 -0
  152. package/dist/swas/v1/index.d.ts +4 -0
  153. package/dist/swas/v1/index.js +4 -0
  154. package/dist/swas/v1/response-schemas.d.ts +18 -0
  155. package/dist/swas/v1/response-schemas.js +19 -0
  156. package/dist/type/error/v1/generated/models.d.ts +52 -10
  157. package/dist/type/error/v1/generated/validators/error.zod.d.ts +13 -4
  158. package/dist/type/error/v1/generated/validators/error.zod.js +6 -9
  159. package/dist/type/error/v1/generated/validators/errorStatus.zod.d.ts +24 -0
  160. package/dist/type/error/v1/generated/validators/errorStatus.zod.js +39 -0
  161. package/dist/type/error/v1/generated/validators/fieldViolation.zod.d.ts +15 -0
  162. package/dist/type/error/v1/generated/validators/fieldViolation.zod.js +18 -0
  163. package/package.json +1 -1
package/dist/routes.js CHANGED
@@ -4605,4 +4605,94 @@ export const routes = [
4605
4605
  securityScheme: "ScopedToken",
4606
4606
  upstreamUrl: null,
4607
4607
  },
4608
+ {
4609
+ service: "swas",
4610
+ contract: "swas",
4611
+ method: "GET",
4612
+ path: "/api/v1/catalog/plans",
4613
+ operationId: "list-plans",
4614
+ securityScheme: "ScopedToken",
4615
+ upstreamUrl: "https://swas.leaflow.cloud",
4616
+ },
4617
+ {
4618
+ service: "swas",
4619
+ contract: "swas",
4620
+ method: "POST",
4621
+ path: "/api/v1/purchases",
4622
+ operationId: "create-purchase",
4623
+ securityScheme: "ScopedToken",
4624
+ upstreamUrl: "https://swas.leaflow.cloud",
4625
+ },
4626
+ {
4627
+ service: "swas",
4628
+ contract: "swas",
4629
+ method: "GET",
4630
+ path: "/api/v1/purchases/{purchaseId}",
4631
+ operationId: "get-purchase",
4632
+ securityScheme: "ScopedToken",
4633
+ upstreamUrl: "https://swas.leaflow.cloud",
4634
+ },
4635
+ {
4636
+ service: "swas",
4637
+ contract: "swas",
4638
+ method: "GET",
4639
+ path: "/api/v1/instances",
4640
+ operationId: "list-instances",
4641
+ securityScheme: "ScopedToken",
4642
+ upstreamUrl: "https://swas.leaflow.cloud",
4643
+ },
4644
+ {
4645
+ service: "swas",
4646
+ contract: "swas",
4647
+ method: "GET",
4648
+ path: "/api/v1/instances/{instanceId}",
4649
+ operationId: "get-instance",
4650
+ securityScheme: "ScopedToken",
4651
+ upstreamUrl: "https://swas.leaflow.cloud",
4652
+ },
4653
+ {
4654
+ service: "swas",
4655
+ contract: "swas",
4656
+ method: "POST",
4657
+ path: "/api/v1/instances/{instanceId}:start",
4658
+ operationId: "start-instance",
4659
+ securityScheme: "ScopedToken",
4660
+ upstreamUrl: "https://swas.leaflow.cloud",
4661
+ },
4662
+ {
4663
+ service: "swas",
4664
+ contract: "swas",
4665
+ method: "GET",
4666
+ path: "/api/v1/instances/{instanceId}/operations/{operationId}",
4667
+ operationId: "get-instance-operation",
4668
+ securityScheme: "ScopedToken",
4669
+ upstreamUrl: "https://swas.leaflow.cloud",
4670
+ },
4671
+ {
4672
+ service: "swas",
4673
+ contract: "swas",
4674
+ method: "POST",
4675
+ path: "/api/v1/instances/{instanceId}:stop",
4676
+ operationId: "stop-instance",
4677
+ securityScheme: "ScopedToken",
4678
+ upstreamUrl: "https://swas.leaflow.cloud",
4679
+ },
4680
+ {
4681
+ service: "swas",
4682
+ contract: "swas",
4683
+ method: "GET",
4684
+ path: "/api/v1/instances/{instanceId}/cancellations/{cancellationId}/refund-progress",
4685
+ operationId: "get-cancellation-refund-progress",
4686
+ securityScheme: "ScopedToken",
4687
+ upstreamUrl: "https://swas.leaflow.cloud",
4688
+ },
4689
+ {
4690
+ service: "swas",
4691
+ contract: "swas",
4692
+ method: "POST",
4693
+ path: "/api/v1/instances/{instanceId}:reboot",
4694
+ operationId: "reboot-instance",
4695
+ securityScheme: "ScopedToken",
4696
+ upstreamUrl: "https://swas.leaflow.cloud",
4697
+ },
4608
4698
  ];
@@ -48,22 +48,64 @@
48
48
  * announcements are not part of this API; they are owned by the notification service.
49
49
  * OpenAPI spec version: 1.0.0
50
50
  */
51
+ export interface FieldViolation {
52
+ /** The path to the rejected field in the request body, such as `items[2].price_id`. */
53
+ field: string;
54
+ /** Why the field was rejected, such as `REQUIRED` or `OUT_OF_RANGE`. */
55
+ reason?: string;
56
+ }
51
57
  /**
52
- * What a given `code` carries alongside the message. The keys depend on the code,
53
- * and a client that does not recognise one ignores it.
58
+ * Values that belong to `reason`, one set per reason. Clients use them to fill in
59
+ * localized text and never parse `message` to obtain them. Keys are documented per
60
+ * reason; a key that has appeared once keeps appearing.
54
61
  */
55
- export type ErrorMeta = {
56
- [key: string]: unknown;
62
+ export type ErrorStatusMetadata = {
63
+ [key: string]: string;
57
64
  };
58
- export interface Error {
59
- code?: string;
65
+ export interface ErrorStatus {
66
+ /** The HTTP status code of the response. */
67
+ code: number;
68
+ /** The canonical name of the status, such as `INVALID_ARGUMENT` or `UNAVAILABLE`. */
69
+ status: string;
70
+ /**
71
+ * A description of the failure for developers. It is always English and is not meant
72
+ * to be shown to end users as is.
73
+ */
60
74
  message: string;
61
75
  /**
62
- * What a given `code` carries alongside the message. The keys depend on the code,
63
- * and a client that does not recognise one ignores it.
76
+ * A stable machine-readable code identifying the failure. Clients branch on this value
77
+ * and render their own text; it does not change once published.
78
+ */
79
+ reason?: string;
80
+ /**
81
+ * Values that belong to `reason`, one set per reason. Clients use them to fill in
82
+ * localized text and never parse `message` to obtain them. Keys are documented per
83
+ * reason; a key that has appeared once keeps appearing.
84
+ */
85
+ metadata?: ErrorStatusMetadata;
86
+ /**
87
+ * Request fields rejected by the request's constraints. Present on validation
88
+ * failures; one request may violate several fields.
64
89
  */
65
- meta?: ErrorMeta;
66
- status: number;
90
+ field_violations?: FieldViolation[];
91
+ /**
92
+ * How long the client should wait before retrying, as a duration string such as
93
+ * `30s`. Present only when waiting can succeed.
94
+ */
95
+ retry_delay?: string;
96
+ /**
97
+ * The identifier of the request in the service's logs. Quote it when reporting a
98
+ * failure.
99
+ */
100
+ request_id?: string;
101
+ }
102
+ /**
103
+ * A failed request. The envelope follows the Google REST error format: `code` is the HTTP
104
+ * status, `status` is its canonical name, and `reason` is the stable machine-readable code
105
+ * that identifies the failure.
106
+ */
107
+ export interface Error {
108
+ error: ErrorStatus;
67
109
  }
68
110
  /**
69
111
  * `OPEN` is waiting on us. `AWAITING_USER` is waiting on you. `CLOSED` is finished.
@@ -50,10 +50,19 @@
50
50
  */
51
51
  import * as zod from "zod";
52
52
  export declare const Error: zod.ZodObject<{
53
- code: zod.ZodOptional<zod.ZodString>;
54
- message: zod.ZodString;
55
- meta: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
56
- status: zod.ZodInt;
53
+ error: zod.ZodObject<{
54
+ code: zod.ZodInt;
55
+ status: zod.ZodString;
56
+ message: zod.ZodString;
57
+ reason: zod.ZodOptional<zod.ZodString>;
58
+ metadata: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
59
+ field_violations: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
60
+ field: zod.ZodString;
61
+ reason: zod.ZodOptional<zod.ZodString>;
62
+ }, zod.z.core.$strict>>>;
63
+ retry_delay: zod.ZodOptional<zod.ZodString>;
64
+ request_id: zod.ZodOptional<zod.ZodString>;
65
+ }, zod.z.core.$strict>;
57
66
  }, zod.z.core.$strict>;
58
67
  export type Error = zod.input<typeof Error>;
59
68
  export type ErrorOutput = zod.output<typeof Error>;
@@ -49,12 +49,9 @@
49
49
  * OpenAPI spec version: 1.0.0
50
50
  */
51
51
  import * as zod from "zod";
52
- export const Error = zod.strictObject({
53
- code: zod.string().optional(),
54
- message: zod.string(),
55
- meta: zod
56
- .record(zod.string(), zod.unknown())
57
- .optional()
58
- .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."),
59
- status: zod.int(),
60
- });
52
+ import { ErrorStatus } from "./errorStatus.zod.js";
53
+ export const Error = zod
54
+ .strictObject({
55
+ error: ErrorStatus,
56
+ })
57
+ .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,66 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Support API
5
+ * Support tickets and scheduled maintenance notices.
6
+ *
7
+ * ## Authentication
8
+ *
9
+ * Every request carries a scoped token; see the `bearerAuth` security scheme. The single
10
+ * exception is `GET /api/v1/notices`, which requires no credentials at all.
11
+ *
12
+ * **Neither the path nor the headers carry a `project_id`**: the current project is determined by
13
+ * the token.
14
+ *
15
+ * ## Tickets belong to the project
16
+ *
17
+ * A ticket is owned by the project it was opened in, not by the person who opened it. Every member
18
+ * of that project can read it, reply to it and close it. `created_by` records who opened it and is
19
+ * informational.
20
+ *
21
+ * A ticket is in one of three states:
22
+ *
23
+ * | State | Meaning |
24
+ * | --- | --- |
25
+ * | `OPEN` | Waiting on us |
26
+ * | `AWAITING_USER` | Waiting on you |
27
+ * | `CLOSED` | Finished |
28
+ *
29
+ * **The state follows whoever spoke last** and cannot be set directly. Posting a message moves the
30
+ * ticket to `OPEN`; a reply from support moves it to `AWAITING_USER`. Posting a message on a closed
31
+ * ticket reopens it as `OPEN`, so a follow-up question never lands on a ticket nobody reads.
32
+ *
33
+ * Tickets left in `AWAITING_USER` without activity are closed automatically after a period of
34
+ * inactivity. Tickets in `OPEN` are never closed automatically.
35
+ *
36
+ * ## Attachments are uploaded before they are referenced
37
+ *
38
+ * Upload a file to `POST /api/v1/attachments`, then pass the returned id in `attachment_ids` when
39
+ * opening a ticket or posting a message. An attachment that is never referenced is removed after a
40
+ * time, so upload and reference in the same session.
41
+ *
42
+ * The content type is determined from the content itself, not from the `Content-Type` header.
43
+ * Files whose determined type is not accepted are rejected with `TICKET_ATTACHMENT_TYPE_REJECTED`.
44
+ *
45
+ * ## Maintenance is read-only here
46
+ *
47
+ * Scheduled maintenance is published by platform operators and is read-only here. Platform
48
+ * announcements are not part of this API; they are owned by the notification service.
49
+ * OpenAPI spec version: 1.0.0
50
+ */
51
+ import * as zod from "zod";
52
+ export declare const ErrorStatus: zod.ZodObject<{
53
+ code: zod.ZodInt;
54
+ status: zod.ZodString;
55
+ message: zod.ZodString;
56
+ reason: zod.ZodOptional<zod.ZodString>;
57
+ metadata: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
58
+ field_violations: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
59
+ field: zod.ZodString;
60
+ reason: zod.ZodOptional<zod.ZodString>;
61
+ }, zod.z.core.$strict>>>;
62
+ retry_delay: zod.ZodOptional<zod.ZodString>;
63
+ request_id: zod.ZodOptional<zod.ZodString>;
64
+ }, zod.z.core.$strict>;
65
+ export type ErrorStatus = zod.input<typeof ErrorStatus>;
66
+ export type ErrorStatusOutput = zod.output<typeof ErrorStatus>;
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Support API
5
+ * Support tickets and scheduled maintenance notices.
6
+ *
7
+ * ## Authentication
8
+ *
9
+ * Every request carries a scoped token; see the `bearerAuth` security scheme. The single
10
+ * exception is `GET /api/v1/notices`, which requires no credentials at all.
11
+ *
12
+ * **Neither the path nor the headers carry a `project_id`**: the current project is determined by
13
+ * the token.
14
+ *
15
+ * ## Tickets belong to the project
16
+ *
17
+ * A ticket is owned by the project it was opened in, not by the person who opened it. Every member
18
+ * of that project can read it, reply to it and close it. `created_by` records who opened it and is
19
+ * informational.
20
+ *
21
+ * A ticket is in one of three states:
22
+ *
23
+ * | State | Meaning |
24
+ * | --- | --- |
25
+ * | `OPEN` | Waiting on us |
26
+ * | `AWAITING_USER` | Waiting on you |
27
+ * | `CLOSED` | Finished |
28
+ *
29
+ * **The state follows whoever spoke last** and cannot be set directly. Posting a message moves the
30
+ * ticket to `OPEN`; a reply from support moves it to `AWAITING_USER`. Posting a message on a closed
31
+ * ticket reopens it as `OPEN`, so a follow-up question never lands on a ticket nobody reads.
32
+ *
33
+ * Tickets left in `AWAITING_USER` without activity are closed automatically after a period of
34
+ * inactivity. Tickets in `OPEN` are never closed automatically.
35
+ *
36
+ * ## Attachments are uploaded before they are referenced
37
+ *
38
+ * Upload a file to `POST /api/v1/attachments`, then pass the returned id in `attachment_ids` when
39
+ * opening a ticket or posting a message. An attachment that is never referenced is removed after a
40
+ * time, so upload and reference in the same session.
41
+ *
42
+ * The content type is determined from the content itself, not from the `Content-Type` header.
43
+ * Files whose determined type is not accepted are rejected with `TICKET_ATTACHMENT_TYPE_REJECTED`.
44
+ *
45
+ * ## Maintenance is read-only here
46
+ *
47
+ * Scheduled maintenance is published by platform operators and is read-only here. Platform
48
+ * announcements are not part of this API; they are owned by the notification service.
49
+ * OpenAPI spec version: 1.0.0
50
+ */
51
+ import * as zod from "zod";
52
+ import { FieldViolation } from "./fieldViolation.zod.js";
53
+ export const ErrorStatus = zod.strictObject({
54
+ code: zod.int().describe("The HTTP status code of the response."),
55
+ status: zod
56
+ .string()
57
+ .describe("The canonical name of the status, such as `INVALID_ARGUMENT` or `UNAVAILABLE`."),
58
+ message: zod
59
+ .string()
60
+ .describe("A description of the failure for developers. It is always English and is not meant\nto be shown to end users as is."),
61
+ reason: zod
62
+ .string()
63
+ .optional()
64
+ .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."),
65
+ metadata: zod
66
+ .record(zod.string(), zod.string())
67
+ .optional()
68
+ .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."),
69
+ field_violations: zod
70
+ .array(FieldViolation)
71
+ .optional()
72
+ .describe("Request fields rejected by the request's constraints. Present on validation\nfailures; one request may violate several fields."),
73
+ retry_delay: zod
74
+ .string()
75
+ .optional()
76
+ .describe("How long the client should wait before retrying, as a duration string such as\n`30s`. Present only when waiting can succeed."),
77
+ request_id: zod
78
+ .string()
79
+ .optional()
80
+ .describe("The identifier of the request in the service's logs. Quote it when reporting a\nfailure."),
81
+ });
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Support API
5
+ * Support tickets and scheduled maintenance notices.
6
+ *
7
+ * ## Authentication
8
+ *
9
+ * Every request carries a scoped token; see the `bearerAuth` security scheme. The single
10
+ * exception is `GET /api/v1/notices`, which requires no credentials at all.
11
+ *
12
+ * **Neither the path nor the headers carry a `project_id`**: the current project is determined by
13
+ * the token.
14
+ *
15
+ * ## Tickets belong to the project
16
+ *
17
+ * A ticket is owned by the project it was opened in, not by the person who opened it. Every member
18
+ * of that project can read it, reply to it and close it. `created_by` records who opened it and is
19
+ * informational.
20
+ *
21
+ * A ticket is in one of three states:
22
+ *
23
+ * | State | Meaning |
24
+ * | --- | --- |
25
+ * | `OPEN` | Waiting on us |
26
+ * | `AWAITING_USER` | Waiting on you |
27
+ * | `CLOSED` | Finished |
28
+ *
29
+ * **The state follows whoever spoke last** and cannot be set directly. Posting a message moves the
30
+ * ticket to `OPEN`; a reply from support moves it to `AWAITING_USER`. Posting a message on a closed
31
+ * ticket reopens it as `OPEN`, so a follow-up question never lands on a ticket nobody reads.
32
+ *
33
+ * Tickets left in `AWAITING_USER` without activity are closed automatically after a period of
34
+ * inactivity. Tickets in `OPEN` are never closed automatically.
35
+ *
36
+ * ## Attachments are uploaded before they are referenced
37
+ *
38
+ * Upload a file to `POST /api/v1/attachments`, then pass the returned id in `attachment_ids` when
39
+ * opening a ticket or posting a message. An attachment that is never referenced is removed after a
40
+ * time, so upload and reference in the same session.
41
+ *
42
+ * The content type is determined from the content itself, not from the `Content-Type` header.
43
+ * Files whose determined type is not accepted are rejected with `TICKET_ATTACHMENT_TYPE_REJECTED`.
44
+ *
45
+ * ## Maintenance is read-only here
46
+ *
47
+ * Scheduled maintenance is published by platform operators and is read-only here. Platform
48
+ * announcements are not part of this API; they are owned by the notification service.
49
+ * OpenAPI spec version: 1.0.0
50
+ */
51
+ import * as zod from "zod";
52
+ export declare const FieldViolation: zod.ZodObject<{
53
+ field: zod.ZodString;
54
+ reason: zod.ZodOptional<zod.ZodString>;
55
+ }, zod.z.core.$strict>;
56
+ export type FieldViolation = zod.input<typeof FieldViolation>;
57
+ export type FieldViolationOutput = zod.output<typeof FieldViolation>;
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Support API
5
+ * Support tickets and scheduled maintenance notices.
6
+ *
7
+ * ## Authentication
8
+ *
9
+ * Every request carries a scoped token; see the `bearerAuth` security scheme. The single
10
+ * exception is `GET /api/v1/notices`, which requires no credentials at all.
11
+ *
12
+ * **Neither the path nor the headers carry a `project_id`**: the current project is determined by
13
+ * the token.
14
+ *
15
+ * ## Tickets belong to the project
16
+ *
17
+ * A ticket is owned by the project it was opened in, not by the person who opened it. Every member
18
+ * of that project can read it, reply to it and close it. `created_by` records who opened it and is
19
+ * informational.
20
+ *
21
+ * A ticket is in one of three states:
22
+ *
23
+ * | State | Meaning |
24
+ * | --- | --- |
25
+ * | `OPEN` | Waiting on us |
26
+ * | `AWAITING_USER` | Waiting on you |
27
+ * | `CLOSED` | Finished |
28
+ *
29
+ * **The state follows whoever spoke last** and cannot be set directly. Posting a message moves the
30
+ * ticket to `OPEN`; a reply from support moves it to `AWAITING_USER`. Posting a message on a closed
31
+ * ticket reopens it as `OPEN`, so a follow-up question never lands on a ticket nobody reads.
32
+ *
33
+ * Tickets left in `AWAITING_USER` without activity are closed automatically after a period of
34
+ * inactivity. Tickets in `OPEN` are never closed automatically.
35
+ *
36
+ * ## Attachments are uploaded before they are referenced
37
+ *
38
+ * Upload a file to `POST /api/v1/attachments`, then pass the returned id in `attachment_ids` when
39
+ * opening a ticket or posting a message. An attachment that is never referenced is removed after a
40
+ * time, so upload and reference in the same session.
41
+ *
42
+ * The content type is determined from the content itself, not from the `Content-Type` header.
43
+ * Files whose determined type is not accepted are rejected with `TICKET_ATTACHMENT_TYPE_REJECTED`.
44
+ *
45
+ * ## Maintenance is read-only here
46
+ *
47
+ * Scheduled maintenance is published by platform operators and is read-only here. Platform
48
+ * announcements are not part of this API; they are owned by the notification service.
49
+ * OpenAPI spec version: 1.0.0
50
+ */
51
+ import * as zod from "zod";
52
+ export const FieldViolation = zod.strictObject({
53
+ field: zod
54
+ .string()
55
+ .describe("The path to the rejected field in the request body, such as `items[2].price_id`."),
56
+ reason: zod
57
+ .string()
58
+ .optional()
59
+ .describe("Why the field was rejected, such as `REQUIRED` or `OUT_OF_RANGE`."),
60
+ });