@leaflow/sdk 0.0.0-dev.361.gefdc428 → 0.0.0-dev.365.gf6f57d1

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 (176) hide show
  1. package/dist/account/v1/generated/functions.d.ts +25 -3
  2. package/dist/account/v1/generated/functions.js +35 -1
  3. package/dist/account/v1/generated/models.d.ts +50 -12
  4. package/dist/account/v1/generated/models.js +5 -0
  5. package/dist/account/v1/generated/schemas.zod.d.ts +3 -2
  6. package/dist/account/v1/generated/schemas.zod.js +3 -2
  7. package/dist/account/v1/generated/validators/acceptConsentsRequestBody.zod.d.ts +1 -1
  8. package/dist/account/v1/generated/validators/acceptConsentsRequestBody.zod.js +1 -1
  9. package/dist/account/v1/generated/validators/acceptInvitationByTokenRequestBody.zod.d.ts +1 -1
  10. package/dist/account/v1/generated/validators/acceptInvitationByTokenRequestBody.zod.js +1 -1
  11. package/dist/account/v1/generated/validators/acceptedInvitationResponseBody.zod.d.ts +6 -1
  12. package/dist/account/v1/generated/validators/acceptedInvitationResponseBody.zod.js +1 -1
  13. package/dist/account/v1/generated/validators/accountResource.zod.d.ts +1 -1
  14. package/dist/account/v1/generated/validators/accountResource.zod.js +1 -1
  15. package/dist/account/v1/generated/validators/agreementListResponseBody.zod.d.ts +1 -1
  16. package/dist/account/v1/generated/validators/agreementListResponseBody.zod.js +1 -1
  17. package/dist/account/v1/generated/validators/agreementResource.zod.d.ts +1 -1
  18. package/dist/account/v1/generated/validators/agreementResource.zod.js +1 -1
  19. package/dist/account/v1/generated/validators/consentBody.zod.d.ts +1 -1
  20. package/dist/account/v1/generated/validators/consentBody.zod.js +1 -1
  21. package/dist/account/v1/generated/validators/consentListResponseBody.zod.d.ts +1 -1
  22. package/dist/account/v1/generated/validators/consentListResponseBody.zod.js +1 -1
  23. package/dist/account/v1/generated/validators/consentResource.zod.d.ts +1 -1
  24. package/dist/account/v1/generated/validators/consentResource.zod.js +1 -1
  25. package/dist/account/v1/generated/validators/countryOption.zod.d.ts +1 -1
  26. package/dist/account/v1/generated/validators/countryOption.zod.js +1 -1
  27. package/dist/account/v1/generated/validators/createProjectRequestBody.zod.d.ts +1 -1
  28. package/dist/account/v1/generated/validators/createProjectRequestBody.zod.js +1 -1
  29. package/dist/account/v1/generated/validators/cursorPagination.zod.d.ts +1 -1
  30. package/dist/account/v1/generated/validators/cursorPagination.zod.js +1 -1
  31. package/dist/account/v1/generated/validators/error.zod.d.ts +1 -1
  32. package/dist/account/v1/generated/validators/error.zod.js +1 -1
  33. package/dist/account/v1/generated/validators/grantResource.zod.d.ts +1 -1
  34. package/dist/account/v1/generated/validators/grantResource.zod.js +1 -1
  35. package/dist/account/v1/generated/validators/identityVerificationResource.zod.d.ts +1 -1
  36. package/dist/account/v1/generated/validators/identityVerificationResource.zod.js +1 -1
  37. package/dist/account/v1/generated/validators/invitationPreviewResource.zod.d.ts +1 -1
  38. package/dist/account/v1/generated/validators/invitationPreviewResource.zod.js +1 -1
  39. package/dist/account/v1/generated/validators/invitationResource.zod.d.ts +1 -1
  40. package/dist/account/v1/generated/validators/invitationResource.zod.js +1 -1
  41. package/dist/account/v1/generated/validators/languageOption.zod.d.ts +1 -1
  42. package/dist/account/v1/generated/validators/languageOption.zod.js +1 -1
  43. package/dist/account/v1/generated/validators/lengthAwarePageInvitationResource.zod.d.ts +1 -1
  44. package/dist/account/v1/generated/validators/lengthAwarePageInvitationResource.zod.js +1 -1
  45. package/dist/account/v1/generated/validators/lengthAwarePageProjectAccessResource.zod.d.ts +6 -1
  46. package/dist/account/v1/generated/validators/lengthAwarePageProjectAccessResource.zod.js +1 -1
  47. package/dist/account/v1/generated/validators/listMyInvitationsParams.zod.d.ts +1 -1
  48. package/dist/account/v1/generated/validators/listMyInvitationsParams.zod.js +1 -1
  49. package/dist/account/v1/generated/validators/listProjectsParams.zod.d.ts +1 -1
  50. package/dist/account/v1/generated/validators/listProjectsParams.zod.js +1 -1
  51. package/dist/account/v1/generated/validators/locale.zod.d.ts +1 -1
  52. package/dist/account/v1/generated/validators/locale.zod.js +1 -1
  53. package/dist/account/v1/generated/validators/localeOptionsResource.zod.d.ts +1 -1
  54. package/dist/account/v1/generated/validators/localeOptionsResource.zod.js +1 -1
  55. package/dist/account/v1/generated/validators/offsetPagination.zod.d.ts +1 -1
  56. package/dist/account/v1/generated/validators/offsetPagination.zod.js +1 -1
  57. package/dist/account/v1/generated/validators/previewInvitationByTokenParams.zod.d.ts +1 -1
  58. package/dist/account/v1/generated/validators/previewInvitationByTokenParams.zod.js +1 -1
  59. package/dist/account/v1/generated/validators/projectAccessList.zod.d.ts +78 -0
  60. package/dist/account/v1/generated/validators/projectAccessList.zod.js +32 -0
  61. package/dist/account/v1/generated/validators/projectAccessResource.zod.d.ts +6 -1
  62. package/dist/account/v1/generated/validators/projectAccessResource.zod.js +1 -1
  63. package/dist/account/v1/generated/validators/projectResource.zod.d.ts +6 -1
  64. package/dist/account/v1/generated/validators/projectResource.zod.js +3 -1
  65. package/dist/account/v1/generated/validators/projectSlugAvailabilityResource.zod.d.ts +1 -1
  66. package/dist/account/v1/generated/validators/projectSlugAvailabilityResource.zod.js +1 -1
  67. package/dist/account/v1/generated/validators/projectStatus.zod.d.ts +33 -0
  68. package/dist/account/v1/generated/validators/projectStatus.zod.js +29 -0
  69. package/dist/account/v1/generated/validators/projectTraitResource.zod.d.ts +1 -1
  70. package/dist/account/v1/generated/validators/projectTraitResource.zod.js +1 -1
  71. package/dist/account/v1/generated/validators/registerRequestBody.zod.d.ts +1 -1
  72. package/dist/account/v1/generated/validators/registerRequestBody.zod.js +1 -1
  73. package/dist/account/v1/generated/validators/resourceRefResource.zod.d.ts +1 -1
  74. package/dist/account/v1/generated/validators/resourceRefResource.zod.js +1 -1
  75. package/dist/account/v1/generated/validators/ruleResource.zod.d.ts +1 -1
  76. package/dist/account/v1/generated/validators/ruleResource.zod.js +1 -1
  77. package/dist/account/v1/generated/validators/scopedTokenResponseBody.zod.d.ts +6 -1
  78. package/dist/account/v1/generated/validators/scopedTokenResponseBody.zod.js +1 -1
  79. package/dist/account/v1/generated/validators/searchProjectsRequestBody.zod.d.ts +41 -0
  80. package/dist/account/v1/generated/validators/searchProjectsRequestBody.zod.js +54 -0
  81. package/dist/account/v1/generated/validators/settingsResource.zod.d.ts +1 -1
  82. package/dist/account/v1/generated/validators/settingsResource.zod.js +1 -1
  83. package/dist/account/v1/generated/validators/submitIdentityVerificationRequestBody.zod.d.ts +1 -1
  84. package/dist/account/v1/generated/validators/submitIdentityVerificationRequestBody.zod.js +1 -1
  85. package/dist/account/v1/generated/validators/updateAccountRequestBody.zod.d.ts +1 -1
  86. package/dist/account/v1/generated/validators/updateAccountRequestBody.zod.js +1 -1
  87. package/dist/assistant/v1/generated/validators/bindingResource.zod.d.ts +1 -1
  88. package/dist/assistant/v1/generated/validators/fileDiffResource.zod.d.ts +1 -1
  89. package/dist/assistant/v1/generated/validators/lengthAwarePageBindingResource.zod.d.ts +1 -1
  90. package/dist/assistant/v1/generated/validators/presentationResource.zod.d.ts +1 -1
  91. package/dist/assistant/v1/generated/validators/realtimeExchange.zod.d.ts +1 -1
  92. package/dist/assistant/v1/generated/validators/realtimeServerMessage.zod.d.ts +1 -1
  93. package/dist/assistant/v1/generated/validators/searchTasksRequestBody.zod.d.ts +1 -1
  94. package/dist/assistant/v1/generated/validators/taskListResponseBody.zod.d.ts +1 -1
  95. package/dist/assistant/v1/generated/validators/taskResource.zod.d.ts +1 -1
  96. package/dist/assistant/v1/generated/validators/threadItemListResponseBody.zod.d.ts +2 -2
  97. package/dist/assistant/v1/generated/validators/threadItemResource.zod.d.ts +1 -1
  98. package/dist/assistant/v1/generated/validators/toolCallResource.zod.d.ts +1 -1
  99. package/dist/billing/type/order/v1/generated/models.d.ts +11 -0
  100. package/dist/billing/type/order/v1/generated/models.js +5 -0
  101. package/dist/billing/type/order/v1/generated/validators/billingAccount.zod.d.ts +5 -0
  102. package/dist/billing/type/order/v1/generated/validators/billingAccount.zod.js +3 -0
  103. package/dist/billing/type/order/v1/generated/validators/billingAccountList.zod.d.ts +5 -0
  104. package/dist/billing/type/order/v1/generated/validators/subscription.zod.d.ts +1 -1
  105. package/dist/billing/type/order/v1/generated/validators/subscriptionList.zod.d.ts +1 -1
  106. package/dist/billing/v1/generated/functions.d.ts +47 -0
  107. package/dist/billing/v1/generated/functions.js +37 -0
  108. package/dist/billing/v1/generated/models.d.ts +11 -0
  109. package/dist/billing/v1/generated/models.js +5 -0
  110. package/dist/billing/v1/generated/schemas.zod.d.ts +19 -0
  111. package/dist/billing/v1/generated/schemas.zod.js +19 -0
  112. package/dist/billing/v1/generated/validators/billingAccount.zod.d.ts +5 -0
  113. package/dist/billing/v1/generated/validators/billingAccount.zod.js +3 -0
  114. package/dist/billing/v1/generated/validators/billingAccountList.zod.d.ts +5 -0
  115. package/dist/billing/v1/generated/validators/subscription.zod.d.ts +1 -1
  116. package/dist/billing/v1/generated/validators/subscriptionList.zod.d.ts +1 -1
  117. package/dist/canopy/v1/generated/models.d.ts +11 -0
  118. package/dist/canopy/v1/generated/models.js +5 -0
  119. package/dist/canopy/v1/generated/validators/billingAccount.zod.d.ts +5 -0
  120. package/dist/canopy/v1/generated/validators/billingAccount.zod.js +3 -0
  121. package/dist/canopy/v1/generated/validators/billingAccountList.zod.d.ts +5 -0
  122. package/dist/canopy/v1/generated/validators/createServiceResponseBody.zod.d.ts +1 -1
  123. package/dist/canopy/v1/generated/validators/serviceResource.zod.d.ts +1 -1
  124. package/dist/canopy/v1/generated/validators/subscription.zod.d.ts +1 -1
  125. package/dist/canopy/v1/generated/validators/subscriptionList.zod.d.ts +1 -1
  126. package/dist/compute/v1/generated/validators/allocateFloatingIPResponseBody.zod.d.ts +1 -1
  127. package/dist/compute/v1/generated/validators/backupCapacityPack.zod.d.ts +1 -1
  128. package/dist/compute/v1/generated/validators/backupCapacityPackListResponseBody.zod.d.ts +1 -1
  129. package/dist/compute/v1/generated/validators/backupListResponseBody.zod.d.ts +1 -1
  130. package/dist/compute/v1/generated/validators/backupResource.zod.d.ts +1 -1
  131. package/dist/compute/v1/generated/validators/backupService.zod.d.ts +1 -1
  132. package/dist/compute/v1/generated/validators/createBackupCapacityPackResponseBody.zod.d.ts +1 -1
  133. package/dist/compute/v1/generated/validators/createBackupServiceResponseBody.zod.d.ts +1 -1
  134. package/dist/compute/v1/generated/validators/createDiskResponseBody.zod.d.ts +1 -1
  135. package/dist/compute/v1/generated/validators/createImageResponseBody.zod.d.ts +1 -1
  136. package/dist/compute/v1/generated/validators/diskListResponseBody.zod.d.ts +1 -1
  137. package/dist/compute/v1/generated/validators/diskResource.zod.d.ts +1 -1
  138. package/dist/compute/v1/generated/validators/floatingIPListResponseBody.zod.d.ts +1 -1
  139. package/dist/compute/v1/generated/validators/floatingIPResource.zod.d.ts +1 -1
  140. package/dist/compute/v1/generated/validators/iPv6ResponseBody.zod.d.ts +1 -1
  141. package/dist/compute/v1/generated/validators/imageListResponseBody.zod.d.ts +1 -1
  142. package/dist/compute/v1/generated/validators/imageResource.zod.d.ts +1 -1
  143. package/dist/compute/v1/generated/validators/instanceListResponseBody.zod.d.ts +2 -2
  144. package/dist/compute/v1/generated/validators/instanceResource.zod.d.ts +2 -2
  145. package/dist/compute/v1/generated/validators/launchInstanceResponseBody.zod.d.ts +2 -2
  146. package/dist/compute/v1/generated/validators/peeringListResponseBody.zod.d.ts +2 -2
  147. package/dist/compute/v1/generated/validators/peeringResource.zod.d.ts +2 -2
  148. package/dist/compute/v1/generated/validators/rebuildInstanceResponseBody.zod.d.ts +2 -2
  149. package/dist/compute/v1/generated/validators/resizeDiskResponseBody.zod.d.ts +1 -1
  150. package/dist/compute/v1/generated/validators/resizeInstanceResponseBody.zod.d.ts +2 -2
  151. package/dist/compute/v1/generated/validators/setFloatingIPBandwidthResponseBody.zod.d.ts +1 -1
  152. package/dist/compute/v1/generated/validators/setSnapshotQuotaResponseBody.zod.d.ts +1 -1
  153. package/dist/compute/v1/generated/validators/snapshotListResponseBody.zod.d.ts +1 -1
  154. package/dist/compute/v1/generated/validators/snapshotQuota.zod.d.ts +1 -1
  155. package/dist/compute/v1/generated/validators/snapshotResource.zod.d.ts +1 -1
  156. package/dist/iam/v1/generated/models.d.ts +11 -0
  157. package/dist/iam/v1/generated/models.js +5 -0
  158. package/dist/iam/v1/generated/validators/projectAccessResource.zod.d.ts +5 -0
  159. package/dist/iam/v1/generated/validators/projectResource.zod.d.ts +5 -0
  160. package/dist/iam/v1/generated/validators/projectResource.zod.js +3 -0
  161. package/dist/membership/v1/generated/models.d.ts +11 -0
  162. package/dist/membership/v1/generated/models.js +5 -0
  163. package/dist/membership/v1/generated/validators/billingAccount.zod.d.ts +5 -0
  164. package/dist/membership/v1/generated/validators/billingAccount.zod.js +3 -0
  165. package/dist/membership/v1/generated/validators/billingAccountList.zod.d.ts +5 -0
  166. package/dist/membership/v1/generated/validators/membership.zod.d.ts +1 -1
  167. package/dist/membership/v1/generated/validators/membershipList.zod.d.ts +1 -1
  168. package/dist/membership/v1/generated/validators/membershipPurchase.zod.d.ts +1 -1
  169. package/dist/membership/v1/generated/validators/subscription.zod.d.ts +1 -1
  170. package/dist/membership/v1/generated/validators/subscriptionList.zod.d.ts +1 -1
  171. package/dist/routes.d.ts +24 -0
  172. package/dist/routes.js +27 -0
  173. package/dist/type/resource/v1/generated/validators/reclamationState.zod.d.ts +1 -1
  174. package/dist/type/resource/v1/generated/validators/resourceUsage.zod.d.ts +1 -1
  175. package/dist/type/resource/v1/generated/validators/resourceUsageList.zod.d.ts +1 -1
  176. package/package.json +1 -1
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Account API
5
+ * Everything that comes before a project is chosen: registration, the account itself, the projects the caller belongs to, and entry into one of them.
6
+ *
7
+ * ## Authentication
8
+ *
9
+ * Every request carries `Authorization: Bearer <access token>`, obtained by signing in at auth.leaflow.net. The endpoints that need no token say so.
10
+ *
11
+ * ## Entering a project
12
+ *
13
+ * 1. `QUERY /account/v1/projects` searches the projects the caller belongs to. The first call registers the account, taking the name and email address from the sign-in claims.
14
+ * 2. `POST /account/v1/projects/{projectId}/scoped-tokens` returns a scoped token for the project chosen.
15
+ * 3. Every other service is called with that scoped token.
16
+ *
17
+ * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
+ *
19
+ * ## Project slugs
20
+ *
21
+ * Every project carries a `slug`, the label naming it in its address. Until a custom slug is chosen the slug is the project's `id`, and the address under the `id` keeps working after a custom slug is chosen. `GET /account/v1/projects/by-slug/{slug}` finds the project named by either label.
22
+ *
23
+ * Looking up slugs and claiming custom slugs are rate limited per account. A request over the limit fails with 429, and `meta.retry_after_seconds` on the error states how many seconds to wait before retrying.
24
+ * OpenAPI spec version: 1.0.0
25
+ */
26
+ import * as zod from "zod";
27
+ export declare const searchProjectsRequestBodyKeywordMax = 128;
28
+ export declare const searchProjectsRequestBodyPageMax = 2147483647;
29
+ export declare const searchProjectsRequestBodyPageSizeMax = 200;
30
+ export declare const SearchProjectsRequestBody: zod.ZodObject<{
31
+ keyword: zod.ZodOptional<zod.ZodString>;
32
+ statuses: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
33
+ active: "active";
34
+ deleting: "deleting";
35
+ deleted: "deleted";
36
+ }>>>;
37
+ page: zod.ZodOptional<zod.ZodInt>;
38
+ page_size: zod.ZodOptional<zod.ZodInt>;
39
+ }, zod.z.core.$strict>;
40
+ export type SearchProjectsRequestBody = zod.input<typeof SearchProjectsRequestBody>;
41
+ export type SearchProjectsRequestBodyOutput = zod.output<typeof SearchProjectsRequestBody>;
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Account API
5
+ * Everything that comes before a project is chosen: registration, the account itself, the projects the caller belongs to, and entry into one of them.
6
+ *
7
+ * ## Authentication
8
+ *
9
+ * Every request carries `Authorization: Bearer <access token>`, obtained by signing in at auth.leaflow.net. The endpoints that need no token say so.
10
+ *
11
+ * ## Entering a project
12
+ *
13
+ * 1. `QUERY /account/v1/projects` searches the projects the caller belongs to. The first call registers the account, taking the name and email address from the sign-in claims.
14
+ * 2. `POST /account/v1/projects/{projectId}/scoped-tokens` returns a scoped token for the project chosen.
15
+ * 3. Every other service is called with that scoped token.
16
+ *
17
+ * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
+ *
19
+ * ## Project slugs
20
+ *
21
+ * Every project carries a `slug`, the label naming it in its address. Until a custom slug is chosen the slug is the project's `id`, and the address under the `id` keeps working after a custom slug is chosen. `GET /account/v1/projects/by-slug/{slug}` finds the project named by either label.
22
+ *
23
+ * Looking up slugs and claiming custom slugs are rate limited per account. A request over the limit fails with 429, and `meta.retry_after_seconds` on the error states how many seconds to wait before retrying.
24
+ * OpenAPI spec version: 1.0.0
25
+ */
26
+ import * as zod from "zod";
27
+ import { ProjectStatus } from "./projectStatus.zod.js";
28
+ export const searchProjectsRequestBodyKeywordMax = 128;
29
+ export const searchProjectsRequestBodyPageMax = 2147483647;
30
+ export const searchProjectsRequestBodyPageSizeMax = 200;
31
+ export const SearchProjectsRequestBody = zod.strictObject({
32
+ keyword: zod
33
+ .string()
34
+ .max(searchProjectsRequestBodyKeywordMax)
35
+ .optional()
36
+ .describe("Matches against name, slug or description, and against the id when it is a complete project id"),
37
+ statuses: zod
38
+ .array(ProjectStatus)
39
+ .min(1)
40
+ .optional()
41
+ .describe("The statuses to include. Omitted, only `active` projects are returned"),
42
+ page: zod
43
+ .int()
44
+ .min(1)
45
+ .max(searchProjectsRequestBodyPageMax)
46
+ .optional()
47
+ .describe("1-based page number. Defaults to 1"),
48
+ page_size: zod
49
+ .int()
50
+ .min(1)
51
+ .max(searchProjectsRequestBodyPageSizeMax)
52
+ .optional()
53
+ .describe("Items per page. Defaults to 50; at most 200"),
54
+ });
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * ## Entering a project
12
12
  *
13
- * 1. `GET /account/v1/projects` lists the projects the caller belongs to. The first call registers the account, taking the name and email address from the sign-in claims.
13
+ * 1. `QUERY /account/v1/projects` searches the projects the caller belongs to. The first call registers the account, taking the name and email address from the sign-in claims.
14
14
  * 2. `POST /account/v1/projects/{projectId}/scoped-tokens` returns a scoped token for the project chosen.
15
15
  * 3. Every other service is called with that scoped token.
16
16
  *
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * ## Entering a project
12
12
  *
13
- * 1. `GET /account/v1/projects` lists the projects the caller belongs to. The first call registers the account, taking the name and email address from the sign-in claims.
13
+ * 1. `QUERY /account/v1/projects` searches the projects the caller belongs to. The first call registers the account, taking the name and email address from the sign-in claims.
14
14
  * 2. `POST /account/v1/projects/{projectId}/scoped-tokens` returns a scoped token for the project chosen.
15
15
  * 3. Every other service is called with that scoped token.
16
16
  *
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * ## Entering a project
12
12
  *
13
- * 1. `GET /account/v1/projects` lists the projects the caller belongs to. The first call registers the account, taking the name and email address from the sign-in claims.
13
+ * 1. `QUERY /account/v1/projects` searches the projects the caller belongs to. The first call registers the account, taking the name and email address from the sign-in claims.
14
14
  * 2. `POST /account/v1/projects/{projectId}/scoped-tokens` returns a scoped token for the project chosen.
15
15
  * 3. Every other service is called with that scoped token.
16
16
  *
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * ## Entering a project
12
12
  *
13
- * 1. `GET /account/v1/projects` lists the projects the caller belongs to. The first call registers the account, taking the name and email address from the sign-in claims.
13
+ * 1. `QUERY /account/v1/projects` searches the projects the caller belongs to. The first call registers the account, taking the name and email address from the sign-in claims.
14
14
  * 2. `POST /account/v1/projects/{projectId}/scoped-tokens` returns a scoped token for the project chosen.
15
15
  * 3. Every other service is called with that scoped token.
16
16
  *
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * ## Entering a project
12
12
  *
13
- * 1. `GET /account/v1/projects` lists the projects the caller belongs to. The first call registers the account, taking the name and email address from the sign-in claims.
13
+ * 1. `QUERY /account/v1/projects` searches the projects the caller belongs to. The first call registers the account, taking the name and email address from the sign-in claims.
14
14
  * 2. `POST /account/v1/projects/{projectId}/scoped-tokens` returns a scoped token for the project chosen.
15
15
  * 3. Every other service is called with that scoped token.
16
16
  *
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * ## Entering a project
12
12
  *
13
- * 1. `GET /account/v1/projects` lists the projects the caller belongs to. The first call registers the account, taking the name and email address from the sign-in claims.
13
+ * 1. `QUERY /account/v1/projects` searches the projects the caller belongs to. The first call registers the account, taking the name and email address from the sign-in claims.
14
14
  * 2. `POST /account/v1/projects/{projectId}/scoped-tokens` returns a scoped token for the project chosen.
15
15
  * 3. Every other service is called with that scoped token.
16
16
  *
@@ -36,8 +36,8 @@ export declare const BindingResource: zod.ZodObject<{
36
36
  peerName: zod.ZodString;
37
37
  platform: zod.ZodString;
38
38
  status: zod.ZodEnum<{
39
- pending: "pending";
40
39
  active: "active";
40
+ pending: "pending";
41
41
  revoked: "revoked";
42
42
  }>;
43
43
  verifiedAt: zod.ZodNullable<zod.z.ZodISODateTime>;
@@ -26,9 +26,9 @@ import * as zod from "zod";
26
26
  export declare const FileDiffResource: zod.ZodObject<{
27
27
  path: zod.ZodString;
28
28
  status: zod.ZodEnum<{
29
+ deleted: "deleted";
29
30
  added: "added";
30
31
  modified: "modified";
31
- deleted: "deleted";
32
32
  }>;
33
33
  added: zod.ZodInt;
34
34
  removed: zod.ZodInt;
@@ -37,8 +37,8 @@ export declare const LengthAwarePageBindingResource: zod.ZodObject<{
37
37
  peerName: zod.ZodString;
38
38
  platform: zod.ZodString;
39
39
  status: zod.ZodEnum<{
40
- pending: "pending";
41
40
  active: "active";
41
+ pending: "pending";
42
42
  revoked: "revoked";
43
43
  }>;
44
44
  verifiedAt: zod.ZodNullable<zod.z.ZodISODateTime>;
@@ -30,9 +30,9 @@ export declare const PresentationResource: zod.ZodObject<{
30
30
  fileDiff: zod.ZodUnion<readonly [zod.ZodObject<{
31
31
  path: zod.ZodString;
32
32
  status: zod.ZodEnum<{
33
+ deleted: "deleted";
33
34
  added: "added";
34
35
  modified: "modified";
35
- deleted: "deleted";
36
36
  }>;
37
37
  added: zod.ZodInt;
38
38
  removed: zod.ZodInt;
@@ -205,9 +205,9 @@ export declare const RealtimeExchange: zod.ZodObject<{
205
205
  threadId: zod.ZodString;
206
206
  name: zod.ZodString;
207
207
  status: zod.ZodEnum<{
208
+ active: "active";
208
209
  completed: "completed";
209
210
  cancelled: "cancelled";
210
- active: "active";
211
211
  paused: "paused";
212
212
  }>;
213
213
  trigger: zod.ZodObject<{
@@ -195,9 +195,9 @@ export declare const RealtimeServerMessage: zod.ZodObject<{
195
195
  threadId: zod.ZodString;
196
196
  name: zod.ZodString;
197
197
  status: zod.ZodEnum<{
198
+ active: "active";
198
199
  completed: "completed";
199
200
  cancelled: "cancelled";
200
- active: "active";
201
201
  paused: "paused";
202
202
  }>;
203
203
  trigger: zod.ZodObject<{
@@ -30,9 +30,9 @@ export declare const searchTasksRequestBodyLimitMax = 200;
30
30
  export declare const SearchTasksRequestBody: zod.ZodObject<{
31
31
  threadId: zod.ZodOptional<zod.ZodString>;
32
32
  status: zod.ZodOptional<zod.ZodEnum<{
33
+ active: "active";
33
34
  completed: "completed";
34
35
  cancelled: "cancelled";
35
- active: "active";
36
36
  paused: "paused";
37
37
  }>>;
38
38
  triggerType: zod.ZodOptional<zod.ZodEnum<{
@@ -29,9 +29,9 @@ export declare const TaskListResponseBody: zod.ZodObject<{
29
29
  threadId: zod.ZodString;
30
30
  name: zod.ZodString;
31
31
  status: zod.ZodEnum<{
32
+ active: "active";
32
33
  completed: "completed";
33
34
  cancelled: "cancelled";
34
- active: "active";
35
35
  paused: "paused";
36
36
  }>;
37
37
  trigger: zod.ZodObject<{
@@ -28,9 +28,9 @@ export declare const TaskResource: zod.ZodObject<{
28
28
  threadId: zod.ZodString;
29
29
  name: zod.ZodString;
30
30
  status: zod.ZodEnum<{
31
+ active: "active";
31
32
  completed: "completed";
32
33
  cancelled: "cancelled";
33
- active: "active";
34
34
  paused: "paused";
35
35
  }>;
36
36
  trigger: zod.ZodObject<{
@@ -98,9 +98,9 @@ export declare const ThreadItemListResponseBody: zod.ZodObject<{
98
98
  fileDiff: zod.ZodUnion<readonly [zod.ZodObject<{
99
99
  path: zod.ZodString;
100
100
  status: zod.ZodEnum<{
101
+ deleted: "deleted";
101
102
  added: "added";
102
103
  modified: "modified";
103
- deleted: "deleted";
104
104
  }>;
105
105
  added: zod.ZodInt;
106
106
  removed: zod.ZodInt;
@@ -202,9 +202,9 @@ export declare const ThreadItemListResponseBody: zod.ZodObject<{
202
202
  fileDiff: zod.ZodUnion<readonly [zod.ZodObject<{
203
203
  path: zod.ZodString;
204
204
  status: zod.ZodEnum<{
205
+ deleted: "deleted";
205
206
  added: "added";
206
207
  modified: "modified";
207
- deleted: "deleted";
208
208
  }>;
209
209
  added: zod.ZodInt;
210
210
  removed: zod.ZodInt;
@@ -97,9 +97,9 @@ export declare const ThreadItemResource: zod.ZodObject<{
97
97
  fileDiff: zod.ZodUnion<readonly [zod.ZodObject<{
98
98
  path: zod.ZodString;
99
99
  status: zod.ZodEnum<{
100
+ deleted: "deleted";
100
101
  added: "added";
101
102
  modified: "modified";
102
- deleted: "deleted";
103
103
  }>;
104
104
  added: zod.ZodInt;
105
105
  removed: zod.ZodInt;
@@ -36,9 +36,9 @@ export declare const ToolCallResource: zod.ZodObject<{
36
36
  fileDiff: zod.ZodUnion<readonly [zod.ZodObject<{
37
37
  path: zod.ZodString;
38
38
  status: zod.ZodEnum<{
39
+ deleted: "deleted";
39
40
  added: "added";
40
41
  modified: "modified";
41
- deleted: "deleted";
42
42
  }>;
43
43
  added: zod.ZodInt;
44
44
  removed: zod.ZodInt;
@@ -718,6 +718,15 @@ export declare const BillingAccountStatus: {
718
718
  readonly suspended: "suspended";
719
719
  readonly closed: "closed";
720
720
  };
721
+ /**
722
+ * Who suspended the account: `owner` (you), `operator` (Leaflow), or `none` while it is not suspended. Only a suspension by `owner` can be resumed by you.
723
+ */
724
+ export type BillingAccountSuspendedBy = (typeof BillingAccountSuspendedBy)[keyof typeof BillingAccountSuspendedBy];
725
+ export declare const BillingAccountSuspendedBy: {
726
+ readonly none: "none";
727
+ readonly owner: "owner";
728
+ readonly operator: "operator";
729
+ };
721
730
  export interface BillingAccount {
722
731
  /**
723
732
  * The active contact used for invoices, of this account; null clears it.
@@ -730,6 +739,8 @@ export interface BillingAccount {
730
739
  /** Fixed when the account was opened. */
731
740
  currency: string;
732
741
  status: BillingAccountStatus;
742
+ /** Who suspended the account: `owner` (you), `operator` (Leaflow), or `none` while it is not suspended. Only a suspension by `owner` can be resumed by you. */
743
+ suspended_by: BillingAccountSuspendedBy;
733
744
  /** How far past the suspension threshold the account may go before its resources are suspended; `0` means none. */
734
745
  grace_amount?: string;
735
746
  /** How long the account has to top up after crossing the suspension threshold, in seconds; `0` means none. Grace ends when this or grace_amount runs out. */
@@ -87,6 +87,11 @@ export const BillingAccountStatus = {
87
87
  suspended: "suspended",
88
88
  closed: "closed",
89
89
  };
90
+ export const BillingAccountSuspendedBy = {
91
+ none: "none",
92
+ owner: "owner",
93
+ operator: "operator",
94
+ };
90
95
  export const BillingScheme = {
91
96
  per_unit: "per_unit",
92
97
  tiered: "tiered",
@@ -16,6 +16,11 @@ export declare const BillingAccount: zod.ZodObject<{
16
16
  suspended: "suspended";
17
17
  closed: "closed";
18
18
  }>;
19
+ suspended_by: zod.ZodEnum<{
20
+ none: "none";
21
+ operator: "operator";
22
+ owner: "owner";
23
+ }>;
19
24
  grace_amount: zod.ZodOptional<zod.ZodString>;
20
25
  grace_period_seconds: zod.ZodOptional<zod.ZodInt>;
21
26
  closed_at: zod.ZodOptional<zod.ZodNullable<zod.z.ZodISODateTime>>;
@@ -15,6 +15,9 @@ export const BillingAccount = zod.strictObject({
15
15
  name: zod.string().optional().describe("Your name for the account."),
16
16
  currency: zod.string().describe("Fixed when the account was opened."),
17
17
  status: zod.enum(["active", "suspended", "closed"]),
18
+ suspended_by: zod
19
+ .enum(["none", "owner", "operator"])
20
+ .describe("Who suspended the account: `owner` (you), `operator` (Leaflow), or `none` while it is not suspended. Only a suspension by `owner` can be resumed by you."),
18
21
  grace_amount: zod
19
22
  .string()
20
23
  .optional()
@@ -17,6 +17,11 @@ export declare const BillingAccountList: zod.ZodObject<{
17
17
  suspended: "suspended";
18
18
  closed: "closed";
19
19
  }>;
20
+ suspended_by: zod.ZodEnum<{
21
+ none: "none";
22
+ operator: "operator";
23
+ owner: "owner";
24
+ }>;
20
25
  grace_amount: zod.ZodOptional<zod.ZodString>;
21
26
  grace_period_seconds: zod.ZodOptional<zod.ZodInt>;
22
27
  closed_at: zod.ZodOptional<zod.ZodNullable<zod.z.ZodISODateTime>>;
@@ -135,8 +135,8 @@ export declare const Subscription: zod.ZodObject<{
135
135
  current_period_end: zod.ZodOptional<zod.ZodNullable<zod.z.ZodISODateTime>>;
136
136
  auto_renew: zod.ZodBoolean;
137
137
  status: zod.ZodEnum<{
138
- pending: "pending";
139
138
  active: "active";
139
+ pending: "pending";
140
140
  suspended: "suspended";
141
141
  canceled: "canceled";
142
142
  provisioning: "provisioning";
@@ -135,8 +135,8 @@ export declare const SubscriptionList: zod.ZodObject<{
135
135
  current_period_end: zod.ZodOptional<zod.ZodNullable<zod.z.ZodISODateTime>>;
136
136
  auto_renew: zod.ZodBoolean;
137
137
  status: zod.ZodEnum<{
138
- pending: "pending";
139
138
  active: "active";
139
+ pending: "pending";
140
140
  suspended: "suspended";
141
141
  canceled: "canceled";
142
142
  provisioning: "provisioning";
@@ -327,6 +327,53 @@ export declare const getUpdateBillingAccountUrl: (accountId: number) => string;
327
327
  * @summary Update billing account
328
328
  */
329
329
  export declare const updateBillingAccount: (accountId: number, billingAccountUpdate: BillingAccountUpdate, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<updateBillingAccountResponse>;
330
+ export type suspendBillingAccountResponse200 = {
331
+ data: BillingAccount;
332
+ status: 200;
333
+ };
334
+ export type suspendBillingAccountResponseDefault = {
335
+ data: ErrorResponse;
336
+ status: Exclude<HTTPStatusCodes, 200>;
337
+ };
338
+ export type suspendBillingAccountResponseSuccess = suspendBillingAccountResponse200 & {
339
+ headers: Headers;
340
+ };
341
+ export type suspendBillingAccountResponseError = suspendBillingAccountResponseDefault & {
342
+ headers: Headers;
343
+ };
344
+ export type suspendBillingAccountResponse = suspendBillingAccountResponseSuccess | suspendBillingAccountResponseError;
345
+ export declare const getSuspendBillingAccountUrl: (accountId: number) => string;
346
+ /**
347
+ * Suspends your active billing account without closing it, also while it is in arrears. While suspended, it
348
+ * accepts no new purchases, renewals or project links, and the services it pays for start no new resources;
349
+ * running services, their charges and the handling of arrears continue, and you can still top up and pay
350
+ * invoices. Resume it yourself; one suspended by Leaflow can only be resumed by Leaflow. Does not create a
351
+ * resource.
352
+ * @summary Suspend billing account
353
+ */
354
+ export declare const suspendBillingAccount: (accountId: number, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<suspendBillingAccountResponse>;
355
+ export type resumeBillingAccountResponse200 = {
356
+ data: BillingAccount;
357
+ status: 200;
358
+ };
359
+ export type resumeBillingAccountResponseDefault = {
360
+ data: ErrorResponse;
361
+ status: Exclude<HTTPStatusCodes, 200>;
362
+ };
363
+ export type resumeBillingAccountResponseSuccess = resumeBillingAccountResponse200 & {
364
+ headers: Headers;
365
+ };
366
+ export type resumeBillingAccountResponseError = resumeBillingAccountResponseDefault & {
367
+ headers: Headers;
368
+ };
369
+ export type resumeBillingAccountResponse = resumeBillingAccountResponseSuccess | resumeBillingAccountResponseError;
370
+ export declare const getResumeBillingAccountUrl: (accountId: number) => string;
371
+ /**
372
+ * Resumes a billing account you suspended. Refused with `BILLING_ACCOUNT_SUSPENDED_BY_OPERATOR` when Leaflow
373
+ * suspended it. Does not create a resource.
374
+ * @summary Resume billing account
375
+ */
376
+ export declare const resumeBillingAccount: (accountId: number, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<resumeBillingAccountResponse>;
330
377
  export type getAccountBalanceResponse200 = {
331
378
  data: AccountBalance;
332
379
  status: 200;
@@ -385,6 +385,43 @@ export const updateBillingAccount = async (accountId, billingAccountUpdate, opti
385
385
  const data = body ? JSON.parse(body) : {};
386
386
  return { data, status: res.status, headers: res.headers };
387
387
  };
388
+ export const getSuspendBillingAccountUrl = (accountId) => {
389
+ return `https://billing.leaflow.cloud/api/v1/billing-accounts/${encodeURIComponent(String(accountId))}/suspend`;
390
+ };
391
+ /**
392
+ * Suspends your active billing account without closing it, also while it is in arrears. While suspended, it
393
+ * accepts no new purchases, renewals or project links, and the services it pays for start no new resources;
394
+ * running services, their charges and the handling of arrears continue, and you can still top up and pay
395
+ * invoices. Resume it yourself; one suspended by Leaflow can only be resumed by Leaflow. Does not create a
396
+ * resource.
397
+ * @summary Suspend billing account
398
+ */
399
+ export const suspendBillingAccount = async (accountId, options, fetchFn) => {
400
+ const res = await (fetchFn ?? fetch)(getSuspendBillingAccountUrl(accountId), {
401
+ ...options,
402
+ method: "POST",
403
+ });
404
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
405
+ const data = body ? JSON.parse(body) : {};
406
+ return { data, status: res.status, headers: res.headers };
407
+ };
408
+ export const getResumeBillingAccountUrl = (accountId) => {
409
+ return `https://billing.leaflow.cloud/api/v1/billing-accounts/${encodeURIComponent(String(accountId))}/resume`;
410
+ };
411
+ /**
412
+ * Resumes a billing account you suspended. Refused with `BILLING_ACCOUNT_SUSPENDED_BY_OPERATOR` when Leaflow
413
+ * suspended it. Does not create a resource.
414
+ * @summary Resume billing account
415
+ */
416
+ export const resumeBillingAccount = async (accountId, options, fetchFn) => {
417
+ const res = await (fetchFn ?? fetch)(getResumeBillingAccountUrl(accountId), {
418
+ ...options,
419
+ method: "POST",
420
+ });
421
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
422
+ const data = body ? JSON.parse(body) : {};
423
+ return { data, status: res.status, headers: res.headers };
424
+ };
388
425
  export const getGetAccountBalanceUrl = (accountId) => {
389
426
  return `https://billing.leaflow.cloud/api/v1/billing-accounts/${encodeURIComponent(String(accountId))}/balance`;
390
427
  };
@@ -497,6 +497,15 @@ export declare const BillingAccountStatus: {
497
497
  readonly suspended: "suspended";
498
498
  readonly closed: "closed";
499
499
  };
500
+ /**
501
+ * Who suspended the account: `owner` (you), `operator` (Leaflow), or `none` while it is not suspended. Only a suspension by `owner` can be resumed by you.
502
+ */
503
+ export type BillingAccountSuspendedBy = (typeof BillingAccountSuspendedBy)[keyof typeof BillingAccountSuspendedBy];
504
+ export declare const BillingAccountSuspendedBy: {
505
+ readonly none: "none";
506
+ readonly owner: "owner";
507
+ readonly operator: "operator";
508
+ };
500
509
  export interface BillingAccount {
501
510
  /**
502
511
  * The active contact used for invoices, of this account; null clears it.
@@ -509,6 +518,8 @@ export interface BillingAccount {
509
518
  /** Fixed when the account was opened. */
510
519
  currency: string;
511
520
  status: BillingAccountStatus;
521
+ /** Who suspended the account: `owner` (you), `operator` (Leaflow), or `none` while it is not suspended. Only a suspension by `owner` can be resumed by you. */
522
+ suspended_by: BillingAccountSuspendedBy;
512
523
  /** How far past the suspension threshold the account may go before its resources are suspended; `0` means none. */
513
524
  grace_amount?: string;
514
525
  /** How long the account has to top up after crossing the suspension threshold, in seconds; `0` means none. Grace ends when this or grace_amount runs out. */
@@ -67,6 +67,11 @@ export const BillingAccountStatus = {
67
67
  suspended: "suspended",
68
68
  closed: "closed",
69
69
  };
70
+ export const BillingAccountSuspendedBy = {
71
+ none: "none",
72
+ owner: "owner",
73
+ operator: "operator",
74
+ };
70
75
  export const BillingScheme = {
71
76
  per_unit: "per_unit",
72
77
  tiered: "tiered",
@@ -178,6 +178,25 @@ export declare const UpdateBillingAccountBody: zod.ZodObject<{
178
178
  invoice_contact_id: zod.ZodOptional<zod.ZodNullable<zod.ZodUUID>>;
179
179
  name: zod.ZodOptional<zod.ZodString>;
180
180
  }, zod.z.core.$strict>;
181
+ /**
182
+ * Suspends your active billing account without closing it, also while it is in arrears. While suspended, it
183
+ * accepts no new purchases, renewals or project links, and the services it pays for start no new resources;
184
+ * running services, their charges and the handling of arrears continue, and you can still top up and pay
185
+ * invoices. Resume it yourself; one suspended by Leaflow can only be resumed by Leaflow. Does not create a
186
+ * resource.
187
+ * @summary Suspend billing account
188
+ */
189
+ export declare const SuspendBillingAccountParams: zod.ZodObject<{
190
+ accountId: zod.ZodInt;
191
+ }, zod.z.core.$strict>;
192
+ /**
193
+ * Resumes a billing account you suspended. Refused with `BILLING_ACCOUNT_SUSPENDED_BY_OPERATOR` when Leaflow
194
+ * suspended it. Does not create a resource.
195
+ * @summary Resume billing account
196
+ */
197
+ export declare const ResumeBillingAccountParams: zod.ZodObject<{
198
+ accountId: zod.ZodInt;
199
+ }, zod.z.core.$strict>;
181
200
  /**
182
201
  * The balance of your account, with credit groups, unpaid invoice amounts, unbilled estimates and pending returns. Returns 404 for a missing account and 403 for another user's account.
183
202
  * @summary Get account balance
@@ -204,6 +204,25 @@ export const UpdateBillingAccountParams = zod.strictObject({
204
204
  accountId: zod.int(),
205
205
  });
206
206
  export const UpdateBillingAccountBody = BillingAccountUpdate;
207
+ /**
208
+ * Suspends your active billing account without closing it, also while it is in arrears. While suspended, it
209
+ * accepts no new purchases, renewals or project links, and the services it pays for start no new resources;
210
+ * running services, their charges and the handling of arrears continue, and you can still top up and pay
211
+ * invoices. Resume it yourself; one suspended by Leaflow can only be resumed by Leaflow. Does not create a
212
+ * resource.
213
+ * @summary Suspend billing account
214
+ */
215
+ export const SuspendBillingAccountParams = zod.strictObject({
216
+ accountId: zod.int(),
217
+ });
218
+ /**
219
+ * Resumes a billing account you suspended. Refused with `BILLING_ACCOUNT_SUSPENDED_BY_OPERATOR` when Leaflow
220
+ * suspended it. Does not create a resource.
221
+ * @summary Resume billing account
222
+ */
223
+ export const ResumeBillingAccountParams = zod.strictObject({
224
+ accountId: zod.int(),
225
+ });
207
226
  /**
208
227
  * The balance of your account, with credit groups, unpaid invoice amounts, unbilled estimates and pending returns. Returns 404 for a missing account and 403 for another user's account.
209
228
  * @summary Get account balance
@@ -16,6 +16,11 @@ export declare const BillingAccount: zod.ZodObject<{
16
16
  suspended: "suspended";
17
17
  closed: "closed";
18
18
  }>;
19
+ suspended_by: zod.ZodEnum<{
20
+ none: "none";
21
+ operator: "operator";
22
+ owner: "owner";
23
+ }>;
19
24
  grace_amount: zod.ZodOptional<zod.ZodString>;
20
25
  grace_period_seconds: zod.ZodOptional<zod.ZodInt>;
21
26
  closed_at: zod.ZodOptional<zod.ZodNullable<zod.z.ZodISODateTime>>;
@@ -15,6 +15,9 @@ export const BillingAccount = zod.strictObject({
15
15
  name: zod.string().optional().describe("Your name for the account."),
16
16
  currency: zod.string().describe("Fixed when the account was opened."),
17
17
  status: zod.enum(["active", "suspended", "closed"]),
18
+ suspended_by: zod
19
+ .enum(["none", "owner", "operator"])
20
+ .describe("Who suspended the account: `owner` (you), `operator` (Leaflow), or `none` while it is not suspended. Only a suspension by `owner` can be resumed by you."),
18
21
  grace_amount: zod
19
22
  .string()
20
23
  .optional()
@@ -17,6 +17,11 @@ export declare const BillingAccountList: zod.ZodObject<{
17
17
  suspended: "suspended";
18
18
  closed: "closed";
19
19
  }>;
20
+ suspended_by: zod.ZodEnum<{
21
+ none: "none";
22
+ operator: "operator";
23
+ owner: "owner";
24
+ }>;
20
25
  grace_amount: zod.ZodOptional<zod.ZodString>;
21
26
  grace_period_seconds: zod.ZodOptional<zod.ZodInt>;
22
27
  closed_at: zod.ZodOptional<zod.ZodNullable<zod.z.ZodISODateTime>>;