@leaflow/sdk 0.0.0-dev.365.gf6f57d1 → 0.0.0-dev.369.g4b81cd7

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 (362) hide show
  1. package/dist/account/v1/generated/functions.d.ts +76 -2
  2. package/dist/account/v1/generated/functions.js +77 -1
  3. package/dist/account/v1/generated/models.d.ts +88 -43
  4. package/dist/account/v1/generated/models.js +19 -9
  5. package/dist/account/v1/generated/schemas.zod.d.ts +15 -1
  6. package/dist/account/v1/generated/schemas.zod.js +14 -1
  7. package/dist/account/v1/generated/validators/accountDeletionObjectionResource.zod.d.ts +32 -0
  8. package/dist/account/v1/generated/validators/accountDeletionObjectionResource.zod.js +32 -0
  9. package/dist/account/v1/generated/validators/accountDeletionResource.zod.d.ts +69 -0
  10. package/dist/account/v1/generated/validators/accountDeletionResource.zod.js +53 -0
  11. package/dist/account/v1/generated/validators/accountDeletionState.zod.d.ts +34 -0
  12. package/dist/account/v1/generated/validators/accountDeletionState.zod.js +29 -0
  13. package/dist/account/v1/generated/validators/requestAccountDeletionRequestBody.zod.d.ts +31 -0
  14. package/dist/account/v1/generated/validators/requestAccountDeletionRequestBody.zod.js +31 -0
  15. package/dist/assistant/v1/generated/functions.d.ts +31 -53
  16. package/dist/assistant/v1/generated/functions.js +32 -57
  17. package/dist/assistant/v1/generated/models.d.ts +102 -59
  18. package/dist/assistant/v1/generated/models.js +10 -0
  19. package/dist/assistant/v1/generated/schemas.zod.d.ts +26 -20
  20. package/dist/assistant/v1/generated/schemas.zod.js +39 -21
  21. package/dist/assistant/v1/generated/validators/answerQuestionRequestBody.zod.d.ts +2 -2
  22. package/dist/assistant/v1/generated/validators/answerQuestionRequestBody.zod.js +2 -2
  23. package/dist/assistant/v1/generated/validators/approvalMode.zod.d.ts +2 -2
  24. package/dist/assistant/v1/generated/validators/approvalMode.zod.js +2 -2
  25. package/dist/assistant/v1/generated/validators/attachmentResource.zod.d.ts +2 -2
  26. package/dist/assistant/v1/generated/validators/attachmentResource.zod.js +2 -2
  27. package/dist/assistant/v1/generated/validators/bindingCodeResponseBody.zod.d.ts +2 -2
  28. package/dist/assistant/v1/generated/validators/bindingCodeResponseBody.zod.js +2 -2
  29. package/dist/assistant/v1/generated/validators/bindingResource.zod.d.ts +2 -2
  30. package/dist/assistant/v1/generated/validators/bindingResource.zod.js +2 -2
  31. package/dist/assistant/v1/generated/validators/channelResource.zod.d.ts +2 -2
  32. package/dist/assistant/v1/generated/validators/channelResource.zod.js +2 -2
  33. package/dist/assistant/v1/generated/validators/channelWithSecretResponseBody.zod.d.ts +2 -2
  34. package/dist/assistant/v1/generated/validators/channelWithSecretResponseBody.zod.js +2 -2
  35. package/dist/assistant/v1/generated/validators/checkSenderParams.zod.d.ts +2 -2
  36. package/dist/assistant/v1/generated/validators/checkSenderParams.zod.js +2 -2
  37. package/dist/assistant/v1/generated/validators/choiceResource.zod.d.ts +2 -2
  38. package/dist/assistant/v1/generated/validators/choiceResource.zod.js +2 -2
  39. package/dist/assistant/v1/generated/validators/clientActionRequest.zod.d.ts +2 -2
  40. package/dist/assistant/v1/generated/validators/clientActionRequest.zod.js +2 -2
  41. package/dist/assistant/v1/generated/validators/clientContextPart.zod.d.ts +2 -2
  42. package/dist/assistant/v1/generated/validators/clientContextPart.zod.js +2 -2
  43. package/dist/assistant/v1/generated/validators/clientContextRequest.zod.d.ts +2 -2
  44. package/dist/assistant/v1/generated/validators/clientContextRequest.zod.js +2 -2
  45. package/dist/assistant/v1/generated/validators/clientFunctionRequest.zod.d.ts +2 -2
  46. package/dist/assistant/v1/generated/validators/clientFunctionRequest.zod.js +2 -2
  47. package/dist/assistant/v1/generated/validators/completeUploadRequestBody.zod.d.ts +2 -2
  48. package/dist/assistant/v1/generated/validators/completeUploadRequestBody.zod.js +2 -2
  49. package/dist/assistant/v1/generated/validators/contextUsageResource.zod.d.ts +2 -2
  50. package/dist/assistant/v1/generated/validators/contextUsageResource.zod.js +2 -2
  51. package/dist/assistant/v1/generated/validators/createChannelRequestBody.zod.d.ts +2 -2
  52. package/dist/assistant/v1/generated/validators/createChannelRequestBody.zod.js +2 -2
  53. package/dist/assistant/v1/generated/validators/createFolderRequestBody.zod.d.ts +2 -2
  54. package/dist/assistant/v1/generated/validators/createFolderRequestBody.zod.js +2 -2
  55. package/dist/assistant/v1/generated/validators/createTaskRequestBody.zod.d.ts +2 -2
  56. package/dist/assistant/v1/generated/validators/createTaskRequestBody.zod.js +2 -2
  57. package/dist/assistant/v1/generated/validators/createThreadRequestBody.zod.d.ts +2 -2
  58. package/dist/assistant/v1/generated/validators/createThreadRequestBody.zod.js +2 -2
  59. package/dist/assistant/v1/generated/validators/createThreadResponseBody.zod.d.ts +3 -2
  60. package/dist/assistant/v1/generated/validators/createThreadResponseBody.zod.js +2 -2
  61. package/dist/assistant/v1/generated/validators/createUploadRequestBody.zod.d.ts +2 -2
  62. package/dist/assistant/v1/generated/validators/createUploadRequestBody.zod.js +2 -2
  63. package/dist/assistant/v1/generated/validators/credentialFieldResource.zod.d.ts +2 -2
  64. package/dist/assistant/v1/generated/validators/credentialFieldResource.zod.js +2 -2
  65. package/dist/assistant/v1/generated/validators/cursorPagination.zod.d.ts +2 -2
  66. package/dist/assistant/v1/generated/validators/cursorPagination.zod.js +2 -2
  67. package/dist/assistant/v1/generated/validators/decideToolCallsRequestBody.zod.d.ts +2 -2
  68. package/dist/assistant/v1/generated/validators/decideToolCallsRequestBody.zod.js +2 -2
  69. package/dist/assistant/v1/generated/validators/defaultModelResource.zod.d.ts +2 -2
  70. package/dist/assistant/v1/generated/validators/defaultModelResource.zod.js +2 -2
  71. package/dist/assistant/v1/generated/validators/error.zod.d.ts +2 -2
  72. package/dist/assistant/v1/generated/validators/error.zod.js +2 -2
  73. package/dist/assistant/v1/generated/validators/fileDiffResource.zod.d.ts +2 -2
  74. package/dist/assistant/v1/generated/validators/fileDiffResource.zod.js +2 -2
  75. package/dist/assistant/v1/generated/validators/folderCountsResource.zod.d.ts +2 -2
  76. package/dist/assistant/v1/generated/validators/folderCountsResource.zod.js +2 -2
  77. package/dist/assistant/v1/generated/validators/folderListResponseBody.zod.d.ts +2 -2
  78. package/dist/assistant/v1/generated/validators/folderListResponseBody.zod.js +2 -2
  79. package/dist/assistant/v1/generated/validators/folderResource.zod.d.ts +2 -2
  80. package/dist/assistant/v1/generated/validators/folderResource.zod.js +2 -2
  81. package/dist/assistant/v1/generated/validators/itemFrame.zod.d.ts +2 -2
  82. package/dist/assistant/v1/generated/validators/itemFrame.zod.js +2 -2
  83. package/dist/assistant/v1/generated/validators/itemSourceResource.zod.d.ts +2 -2
  84. package/dist/assistant/v1/generated/validators/itemSourceResource.zod.js +2 -2
  85. package/dist/assistant/v1/generated/validators/lastTurnResource.zod.d.ts +2 -2
  86. package/dist/assistant/v1/generated/validators/lastTurnResource.zod.js +2 -2
  87. package/dist/assistant/v1/generated/validators/lengthAwarePageBindingResource.zod.d.ts +2 -2
  88. package/dist/assistant/v1/generated/validators/lengthAwarePageBindingResource.zod.js +2 -2
  89. package/dist/assistant/v1/generated/validators/lengthAwarePageChannelResource.zod.d.ts +2 -2
  90. package/dist/assistant/v1/generated/validators/lengthAwarePageChannelResource.zod.js +2 -2
  91. package/dist/assistant/v1/generated/validators/listBindingsParams.zod.d.ts +2 -2
  92. package/dist/assistant/v1/generated/validators/listBindingsParams.zod.js +2 -2
  93. package/dist/assistant/v1/generated/validators/listChannelRejectionsParams.zod.d.ts +2 -2
  94. package/dist/assistant/v1/generated/validators/listChannelRejectionsParams.zod.js +2 -2
  95. package/dist/assistant/v1/generated/validators/listChannelsParams.zod.d.ts +2 -2
  96. package/dist/assistant/v1/generated/validators/listChannelsParams.zod.js +2 -2
  97. package/dist/assistant/v1/generated/validators/listTaskRunsParams.zod.d.ts +2 -2
  98. package/dist/assistant/v1/generated/validators/listTaskRunsParams.zod.js +2 -2
  99. package/dist/assistant/v1/generated/validators/listThreadItemsParams.zod.d.ts +2 -2
  100. package/dist/assistant/v1/generated/validators/listThreadItemsParams.zod.js +2 -2
  101. package/dist/assistant/v1/generated/validators/{commandResource.zod.d.ts → listThreadMessagesParams.zod.d.ts} +12 -9
  102. package/dist/assistant/v1/generated/validators/{runCommandRequestBody.zod.js → listThreadMessagesParams.zod.js} +17 -14
  103. package/dist/assistant/v1/generated/validators/listThreadTurnsParams.zod.d.ts +2 -2
  104. package/dist/assistant/v1/generated/validators/listThreadTurnsParams.zod.js +2 -2
  105. package/dist/assistant/v1/generated/validators/loginResource.zod.d.ts +2 -2
  106. package/dist/assistant/v1/generated/validators/loginResource.zod.js +2 -2
  107. package/dist/assistant/v1/generated/validators/memoryListResponseBody.zod.d.ts +2 -2
  108. package/dist/assistant/v1/generated/validators/memoryListResponseBody.zod.js +2 -2
  109. package/dist/assistant/v1/generated/validators/memoryResource.zod.d.ts +2 -2
  110. package/dist/assistant/v1/generated/validators/memoryResource.zod.js +2 -2
  111. package/dist/assistant/v1/generated/validators/messagePart.zod.d.ts +2 -2
  112. package/dist/assistant/v1/generated/validators/messagePart.zod.js +2 -2
  113. package/dist/assistant/v1/generated/validators/moveFolderRequestBody.zod.d.ts +2 -2
  114. package/dist/assistant/v1/generated/validators/moveFolderRequestBody.zod.js +2 -2
  115. package/dist/assistant/v1/generated/validators/offsetPagination.zod.d.ts +2 -2
  116. package/dist/assistant/v1/generated/validators/offsetPagination.zod.js +2 -2
  117. package/dist/assistant/v1/generated/validators/openRealtimeParams.zod.d.ts +2 -2
  118. package/dist/assistant/v1/generated/validators/openRealtimeParams.zod.js +2 -2
  119. package/dist/assistant/v1/generated/validators/partResource.zod.d.ts +2 -2
  120. package/dist/assistant/v1/generated/validators/partResource.zod.js +2 -2
  121. package/dist/assistant/v1/generated/validators/pendingActionResource.zod.d.ts +2 -2
  122. package/dist/assistant/v1/generated/validators/pendingActionResource.zod.js +2 -2
  123. package/dist/assistant/v1/generated/validators/placeThreadRequestBody.zod.d.ts +2 -2
  124. package/dist/assistant/v1/generated/validators/placeThreadRequestBody.zod.js +2 -2
  125. package/dist/assistant/v1/generated/validators/platformListResponseBody.zod.d.ts +3 -3
  126. package/dist/assistant/v1/generated/validators/platformListResponseBody.zod.js +2 -2
  127. package/dist/assistant/v1/generated/validators/platformResource.zod.d.ts +3 -3
  128. package/dist/assistant/v1/generated/validators/platformResource.zod.js +2 -2
  129. package/dist/assistant/v1/generated/validators/presentationResource.zod.d.ts +2 -2
  130. package/dist/assistant/v1/generated/validators/presentationResource.zod.js +2 -2
  131. package/dist/assistant/v1/generated/validators/putUploadPartHeaders.zod.d.ts +2 -2
  132. package/dist/assistant/v1/generated/validators/putUploadPartHeaders.zod.js +2 -2
  133. package/dist/assistant/v1/generated/validators/putUploadPartParams.zod.d.ts +2 -2
  134. package/dist/assistant/v1/generated/validators/putUploadPartParams.zod.js +2 -2
  135. package/dist/assistant/v1/generated/validators/questionResource.zod.d.ts +2 -2
  136. package/dist/assistant/v1/generated/validators/questionResource.zod.js +2 -2
  137. package/dist/assistant/v1/generated/validators/realtimeClientMessage.zod.d.ts +2 -2
  138. package/dist/assistant/v1/generated/validators/realtimeClientMessage.zod.js +2 -2
  139. package/dist/assistant/v1/generated/validators/realtimeExchange.zod.d.ts +9 -2
  140. package/dist/assistant/v1/generated/validators/realtimeExchange.zod.js +2 -2
  141. package/dist/assistant/v1/generated/validators/realtimeServerMessage.zod.d.ts +9 -2
  142. package/dist/assistant/v1/generated/validators/realtimeServerMessage.zod.js +2 -2
  143. package/dist/assistant/v1/generated/validators/realtimeTicketResource.zod.d.ts +2 -2
  144. package/dist/assistant/v1/generated/validators/realtimeTicketResource.zod.js +2 -2
  145. package/dist/assistant/v1/generated/validators/reasoningEffort.zod.d.ts +2 -2
  146. package/dist/assistant/v1/generated/validators/reasoningEffort.zod.js +2 -2
  147. package/dist/assistant/v1/generated/validators/rejectionListResponseBody.zod.d.ts +2 -2
  148. package/dist/assistant/v1/generated/validators/rejectionListResponseBody.zod.js +2 -2
  149. package/dist/assistant/v1/generated/validators/rejectionResource.zod.d.ts +2 -2
  150. package/dist/assistant/v1/generated/validators/rejectionResource.zod.js +2 -2
  151. package/dist/assistant/v1/generated/validators/resumeThreadRequestBody.zod.d.ts +2 -2
  152. package/dist/assistant/v1/generated/validators/resumeThreadRequestBody.zod.js +2 -2
  153. package/dist/assistant/v1/generated/validators/revertRequestBody.zod.d.ts +2 -2
  154. package/dist/assistant/v1/generated/validators/revertRequestBody.zod.js +2 -2
  155. package/dist/assistant/v1/generated/validators/revertedCountResponseBody.zod.d.ts +2 -2
  156. package/dist/assistant/v1/generated/validators/revertedCountResponseBody.zod.js +2 -2
  157. package/dist/assistant/v1/generated/validators/rotateSecretRequestBody.zod.d.ts +2 -2
  158. package/dist/assistant/v1/generated/validators/rotateSecretRequestBody.zod.js +2 -2
  159. package/dist/assistant/v1/generated/validators/searchTasksRequestBody.zod.d.ts +2 -2
  160. package/dist/assistant/v1/generated/validators/searchTasksRequestBody.zod.js +2 -2
  161. package/dist/assistant/v1/generated/validators/searchThreadsRequestBody.zod.d.ts +2 -2
  162. package/dist/assistant/v1/generated/validators/searchThreadsRequestBody.zod.js +2 -2
  163. package/dist/assistant/v1/generated/validators/sendMessageRequestBody.zod.d.ts +2 -2
  164. package/dist/assistant/v1/generated/validators/sendMessageRequestBody.zod.js +2 -2
  165. package/dist/assistant/v1/generated/validators/sendMessageResponseBody.zod.d.ts +2 -2
  166. package/dist/assistant/v1/generated/validators/sendMessageResponseBody.zod.js +2 -2
  167. package/dist/assistant/v1/generated/validators/senderCheckResource.zod.d.ts +2 -2
  168. package/dist/assistant/v1/generated/validators/senderCheckResource.zod.js +2 -2
  169. package/dist/assistant/v1/generated/validators/settingsResource.zod.d.ts +2 -2
  170. package/dist/assistant/v1/generated/validators/settingsResource.zod.js +2 -2
  171. package/dist/assistant/v1/generated/validators/skillEnabledRequestBody.zod.d.ts +2 -2
  172. package/dist/assistant/v1/generated/validators/skillEnabledRequestBody.zod.js +2 -2
  173. package/dist/assistant/v1/generated/validators/skillListResponseBody.zod.d.ts +2 -2
  174. package/dist/assistant/v1/generated/validators/skillListResponseBody.zod.js +2 -2
  175. package/dist/assistant/v1/generated/validators/skillRequestBody.zod.d.ts +2 -2
  176. package/dist/assistant/v1/generated/validators/skillRequestBody.zod.js +2 -2
  177. package/dist/assistant/v1/generated/validators/skillResource.zod.d.ts +2 -2
  178. package/dist/assistant/v1/generated/validators/skillResource.zod.js +2 -2
  179. package/dist/assistant/v1/generated/validators/subagentCountResource.zod.d.ts +2 -2
  180. package/dist/assistant/v1/generated/validators/subagentCountResource.zod.js +2 -2
  181. package/dist/assistant/v1/generated/validators/taskAction.zod.d.ts +2 -2
  182. package/dist/assistant/v1/generated/validators/taskAction.zod.js +2 -2
  183. package/dist/assistant/v1/generated/validators/taskListResponseBody.zod.d.ts +7 -2
  184. package/dist/assistant/v1/generated/validators/taskListResponseBody.zod.js +2 -2
  185. package/dist/assistant/v1/generated/validators/taskResource.zod.d.ts +7 -2
  186. package/dist/assistant/v1/generated/validators/taskResource.zod.js +2 -2
  187. package/dist/assistant/v1/generated/validators/taskRunListResponseBody.zod.d.ts +7 -2
  188. package/dist/assistant/v1/generated/validators/taskRunListResponseBody.zod.js +2 -2
  189. package/dist/assistant/v1/generated/validators/taskRunResource.zod.d.ts +7 -2
  190. package/dist/assistant/v1/generated/validators/taskRunResource.zod.js +5 -2
  191. package/dist/assistant/v1/generated/validators/taskTrigger.zod.d.ts +2 -2
  192. package/dist/assistant/v1/generated/validators/taskTrigger.zod.js +2 -2
  193. package/dist/assistant/v1/generated/validators/threadCountsResource.zod.d.ts +2 -2
  194. package/dist/assistant/v1/generated/validators/threadCountsResource.zod.js +2 -2
  195. package/dist/assistant/v1/generated/validators/threadItemListResponseBody.zod.d.ts +6 -2
  196. package/dist/assistant/v1/generated/validators/threadItemListResponseBody.zod.js +2 -2
  197. package/dist/assistant/v1/generated/validators/threadItemResource.zod.d.ts +4 -2
  198. package/dist/assistant/v1/generated/validators/threadItemResource.zod.js +7 -2
  199. package/dist/assistant/v1/generated/validators/threadListResponseBody.zod.d.ts +3 -2
  200. package/dist/assistant/v1/generated/validators/threadListResponseBody.zod.js +2 -2
  201. package/dist/assistant/v1/generated/validators/{commandListResponseBody.zod.d.ts → threadMessageListResponseBody.zod.d.ts} +15 -10
  202. package/dist/assistant/v1/generated/validators/{commandListResponseBody.zod.js → threadMessageListResponseBody.zod.js} +10 -5
  203. package/dist/assistant/v1/generated/validators/{runCommandRequestBody.zod.d.ts → threadMessageResource.zod.d.ts} +13 -9
  204. package/dist/assistant/v1/generated/validators/{commandResultResource.zod.js → threadMessageResource.zod.js} +20 -13
  205. package/dist/assistant/v1/generated/validators/threadResource.zod.d.ts +4 -2
  206. package/dist/assistant/v1/generated/validators/threadResource.zod.js +7 -2
  207. package/dist/assistant/v1/generated/validators/threadStatus.zod.d.ts +2 -2
  208. package/dist/assistant/v1/generated/validators/threadStatus.zod.js +2 -2
  209. package/dist/assistant/v1/generated/validators/threadTurnListResponseBody.zod.d.ts +3 -2
  210. package/dist/assistant/v1/generated/validators/threadTurnListResponseBody.zod.js +2 -2
  211. package/dist/assistant/v1/generated/validators/threadTurnResource.zod.d.ts +4 -2
  212. package/dist/assistant/v1/generated/validators/threadTurnResource.zod.js +7 -2
  213. package/dist/assistant/v1/generated/validators/todoResource.zod.d.ts +2 -2
  214. package/dist/assistant/v1/generated/validators/todoResource.zod.js +2 -2
  215. package/dist/assistant/v1/generated/validators/toolCallResource.zod.d.ts +3 -2
  216. package/dist/assistant/v1/generated/validators/toolCallResource.zod.js +11 -2
  217. package/dist/assistant/v1/generated/validators/toolResultRequestBody.zod.d.ts +2 -2
  218. package/dist/assistant/v1/generated/validators/toolResultRequestBody.zod.js +2 -2
  219. package/dist/assistant/v1/generated/validators/turnStartedResponseBody.zod.d.ts +2 -2
  220. package/dist/assistant/v1/generated/validators/turnStartedResponseBody.zod.js +2 -2
  221. package/dist/assistant/v1/generated/validators/turnStatus.zod.d.ts +2 -2
  222. package/dist/assistant/v1/generated/validators/turnStatus.zod.js +2 -2
  223. package/dist/assistant/v1/generated/validators/turnType.zod.d.ts +2 -2
  224. package/dist/assistant/v1/generated/validators/turnType.zod.js +2 -2
  225. package/dist/assistant/v1/generated/validators/updateChannelRequestBody.zod.d.ts +2 -2
  226. package/dist/assistant/v1/generated/validators/updateChannelRequestBody.zod.js +2 -2
  227. package/dist/assistant/v1/generated/validators/updateFolderRequestBody.zod.d.ts +2 -2
  228. package/dist/assistant/v1/generated/validators/updateFolderRequestBody.zod.js +2 -2
  229. package/dist/assistant/v1/generated/validators/updateSettingsRequestBody.zod.d.ts +2 -2
  230. package/dist/assistant/v1/generated/validators/updateSettingsRequestBody.zod.js +2 -2
  231. package/dist/assistant/v1/generated/validators/updateTaskRequestBody.zod.d.ts +2 -2
  232. package/dist/assistant/v1/generated/validators/updateTaskRequestBody.zod.js +2 -2
  233. package/dist/assistant/v1/generated/validators/updateThreadRequestBody.zod.d.ts +2 -2
  234. package/dist/assistant/v1/generated/validators/updateThreadRequestBody.zod.js +2 -2
  235. package/dist/assistant/v1/generated/validators/updateUploadRequestBody.zod.d.ts +2 -2
  236. package/dist/assistant/v1/generated/validators/updateUploadRequestBody.zod.js +2 -2
  237. package/dist/assistant/v1/generated/validators/uploadAttachmentParams.zod.d.ts +2 -2
  238. package/dist/assistant/v1/generated/validators/uploadAttachmentParams.zod.js +2 -2
  239. package/dist/assistant/v1/generated/validators/uploadConfigurationResource.zod.d.ts +2 -2
  240. package/dist/assistant/v1/generated/validators/uploadConfigurationResource.zod.js +2 -2
  241. package/dist/assistant/v1/generated/validators/uploadListResponseBody.zod.d.ts +2 -2
  242. package/dist/assistant/v1/generated/validators/uploadListResponseBody.zod.js +2 -2
  243. package/dist/assistant/v1/generated/validators/uploadPartResource.zod.d.ts +2 -2
  244. package/dist/assistant/v1/generated/validators/uploadPartResource.zod.js +2 -2
  245. package/dist/assistant/v1/generated/validators/uploadResource.zod.d.ts +2 -2
  246. package/dist/assistant/v1/generated/validators/uploadResource.zod.js +2 -2
  247. package/dist/assistant/v1/generated/validators/uploadedResource.zod.d.ts +2 -2
  248. package/dist/assistant/v1/generated/validators/uploadedResource.zod.js +2 -2
  249. package/dist/assistant/v1/generated/validators/usage.zod.d.ts +2 -2
  250. package/dist/assistant/v1/generated/validators/usage.zod.js +2 -2
  251. package/dist/assistant/v1/generated/validators/verifyCodeRequestBody.zod.d.ts +2 -2
  252. package/dist/assistant/v1/generated/validators/verifyCodeRequestBody.zod.js +2 -2
  253. package/dist/assistant/v1/generated/validators/webhookSecretResponseBody.zod.d.ts +2 -2
  254. package/dist/assistant/v1/generated/validators/webhookSecretResponseBody.zod.js +2 -2
  255. package/dist/billing/type/order/v1/generated/models.d.ts +29 -0
  256. package/dist/billing/type/order/v1/generated/models.js +9 -0
  257. package/dist/billing/type/order/v1/generated/validators/accountDeletionObjection.zod.d.ts +19 -0
  258. package/dist/billing/type/order/v1/generated/validators/accountDeletionObjection.zod.js +19 -0
  259. package/dist/billing/type/order/v1/generated/validators/accountDeletionReadiness.zod.d.ts +45 -0
  260. package/dist/billing/type/order/v1/generated/validators/accountDeletionReadiness.zod.js +14 -0
  261. package/dist/billing/type/order/v1/generated/validators/accountDeletionReadinessItem.zod.d.ts +43 -0
  262. package/dist/billing/type/order/v1/generated/validators/accountDeletionReadinessItem.zod.js +19 -0
  263. package/dist/billing/type/order/v1/generated/validators/cancellation.zod.d.ts +2 -2
  264. package/dist/billing/type/order/v1/generated/validators/cancellationItem.zod.d.ts +1 -1
  265. package/dist/billing/type/order/v1/generated/validators/cancellationList.zod.d.ts +2 -2
  266. package/dist/billing/type/order/v1/generated/validators/contact.zod.d.ts +1 -1
  267. package/dist/billing/type/order/v1/generated/validators/contactList.zod.d.ts +1 -1
  268. package/dist/billing/type/order/v1/generated/validators/discount.zod.d.ts +1 -1
  269. package/dist/billing/type/order/v1/generated/validators/discountList.zod.d.ts +1 -1
  270. package/dist/billing/type/order/v1/generated/validators/featureGrant.zod.d.ts +1 -1
  271. package/dist/billing/type/order/v1/generated/validators/featureGrantList.zod.d.ts +1 -1
  272. package/dist/billing/type/order/v1/generated/validators/featureGrantStatus.zod.d.ts +1 -1
  273. package/dist/billing/type/order/v1/generated/validators/invoice.zod.d.ts +1 -1
  274. package/dist/billing/type/order/v1/generated/validators/invoiceList.zod.d.ts +1 -1
  275. package/dist/billing/type/order/v1/generated/validators/subscription.zod.d.ts +1 -1
  276. package/dist/billing/type/order/v1/generated/validators/subscriptionCancellation.zod.d.ts +1 -1
  277. package/dist/billing/type/order/v1/generated/validators/subscriptionList.zod.d.ts +1 -1
  278. package/dist/billing/v1/generated/functions.d.ts +27 -1
  279. package/dist/billing/v1/generated/functions.js +21 -0
  280. package/dist/billing/v1/generated/models.d.ts +29 -0
  281. package/dist/billing/v1/generated/models.js +9 -0
  282. package/dist/billing/v1/generated/schemas.zod.d.ts +2 -2
  283. package/dist/billing/v1/generated/validators/accountDeletionObjection.zod.d.ts +19 -0
  284. package/dist/billing/v1/generated/validators/accountDeletionObjection.zod.js +19 -0
  285. package/dist/billing/v1/generated/validators/accountDeletionReadiness.zod.d.ts +45 -0
  286. package/dist/billing/v1/generated/validators/accountDeletionReadiness.zod.js +14 -0
  287. package/dist/billing/v1/generated/validators/accountDeletionReadinessItem.zod.d.ts +43 -0
  288. package/dist/billing/v1/generated/validators/accountDeletionReadinessItem.zod.js +19 -0
  289. package/dist/billing/v1/generated/validators/cancellation.zod.d.ts +2 -2
  290. package/dist/billing/v1/generated/validators/cancellationItem.zod.d.ts +1 -1
  291. package/dist/billing/v1/generated/validators/cancellationList.zod.d.ts +2 -2
  292. package/dist/billing/v1/generated/validators/contact.zod.d.ts +1 -1
  293. package/dist/billing/v1/generated/validators/contactList.zod.d.ts +1 -1
  294. package/dist/billing/v1/generated/validators/discount.zod.d.ts +1 -1
  295. package/dist/billing/v1/generated/validators/discountList.zod.d.ts +1 -1
  296. package/dist/billing/v1/generated/validators/featureGrant.zod.d.ts +1 -1
  297. package/dist/billing/v1/generated/validators/featureGrantList.zod.d.ts +1 -1
  298. package/dist/billing/v1/generated/validators/featureGrantStatus.zod.d.ts +1 -1
  299. package/dist/billing/v1/generated/validators/invoice.zod.d.ts +1 -1
  300. package/dist/billing/v1/generated/validators/invoiceList.zod.d.ts +1 -1
  301. package/dist/billing/v1/generated/validators/listCancellationsParams.zod.d.ts +1 -1
  302. package/dist/billing/v1/generated/validators/listFeatureGrantsParams.zod.d.ts +1 -1
  303. package/dist/billing/v1/generated/validators/subscription.zod.d.ts +1 -1
  304. package/dist/billing/v1/generated/validators/subscriptionCancellation.zod.d.ts +1 -1
  305. package/dist/billing/v1/generated/validators/subscriptionList.zod.d.ts +1 -1
  306. package/dist/canopy/v1/generated/models.d.ts +29 -0
  307. package/dist/canopy/v1/generated/models.js +9 -0
  308. package/dist/canopy/v1/generated/validators/accountDeletionObjection.zod.d.ts +52 -0
  309. package/dist/canopy/v1/generated/validators/accountDeletionObjection.zod.js +52 -0
  310. package/dist/canopy/v1/generated/validators/accountDeletionReadiness.zod.d.ts +78 -0
  311. package/dist/canopy/v1/generated/validators/accountDeletionReadiness.zod.js +47 -0
  312. package/dist/canopy/v1/generated/validators/accountDeletionReadinessItem.zod.d.ts +76 -0
  313. package/dist/canopy/v1/generated/validators/accountDeletionReadinessItem.zod.js +52 -0
  314. package/dist/canopy/v1/generated/validators/cancellation.zod.d.ts +2 -2
  315. package/dist/canopy/v1/generated/validators/cancellationItem.zod.d.ts +1 -1
  316. package/dist/canopy/v1/generated/validators/cancellationList.zod.d.ts +2 -2
  317. package/dist/canopy/v1/generated/validators/contact.zod.d.ts +1 -1
  318. package/dist/canopy/v1/generated/validators/contactList.zod.d.ts +1 -1
  319. package/dist/canopy/v1/generated/validators/discount.zod.d.ts +1 -1
  320. package/dist/canopy/v1/generated/validators/discountList.zod.d.ts +1 -1
  321. package/dist/canopy/v1/generated/validators/featureGrant.zod.d.ts +1 -1
  322. package/dist/canopy/v1/generated/validators/featureGrantList.zod.d.ts +1 -1
  323. package/dist/canopy/v1/generated/validators/featureGrantStatus.zod.d.ts +1 -1
  324. package/dist/canopy/v1/generated/validators/invoice.zod.d.ts +1 -1
  325. package/dist/canopy/v1/generated/validators/invoiceList.zod.d.ts +1 -1
  326. package/dist/canopy/v1/generated/validators/subscription.zod.d.ts +1 -1
  327. package/dist/canopy/v1/generated/validators/subscriptionCancellation.zod.d.ts +1 -1
  328. package/dist/canopy/v1/generated/validators/subscriptionList.zod.d.ts +1 -1
  329. package/dist/membership/v1/generated/functions.d.ts +3 -3
  330. package/dist/membership/v1/generated/functions.js +3 -3
  331. package/dist/membership/v1/generated/models.d.ts +29 -0
  332. package/dist/membership/v1/generated/models.js +9 -0
  333. package/dist/membership/v1/generated/schemas.zod.d.ts +3 -3
  334. package/dist/membership/v1/generated/schemas.zod.js +3 -3
  335. package/dist/membership/v1/generated/validators/accountDeletionObjection.zod.d.ts +19 -0
  336. package/dist/membership/v1/generated/validators/accountDeletionObjection.zod.js +19 -0
  337. package/dist/membership/v1/generated/validators/accountDeletionReadiness.zod.d.ts +45 -0
  338. package/dist/membership/v1/generated/validators/accountDeletionReadiness.zod.js +14 -0
  339. package/dist/membership/v1/generated/validators/accountDeletionReadinessItem.zod.d.ts +43 -0
  340. package/dist/membership/v1/generated/validators/accountDeletionReadinessItem.zod.js +19 -0
  341. package/dist/membership/v1/generated/validators/cancellation.zod.d.ts +2 -2
  342. package/dist/membership/v1/generated/validators/cancellationItem.zod.d.ts +1 -1
  343. package/dist/membership/v1/generated/validators/cancellationList.zod.d.ts +2 -2
  344. package/dist/membership/v1/generated/validators/contact.zod.d.ts +1 -1
  345. package/dist/membership/v1/generated/validators/contactList.zod.d.ts +1 -1
  346. package/dist/membership/v1/generated/validators/discount.zod.d.ts +1 -1
  347. package/dist/membership/v1/generated/validators/discountList.zod.d.ts +1 -1
  348. package/dist/membership/v1/generated/validators/featureGrant.zod.d.ts +1 -1
  349. package/dist/membership/v1/generated/validators/featureGrantList.zod.d.ts +1 -1
  350. package/dist/membership/v1/generated/validators/featureGrantStatus.zod.d.ts +1 -1
  351. package/dist/membership/v1/generated/validators/invoice.zod.d.ts +1 -1
  352. package/dist/membership/v1/generated/validators/invoiceList.zod.d.ts +1 -1
  353. package/dist/membership/v1/generated/validators/subscription.zod.d.ts +1 -1
  354. package/dist/membership/v1/generated/validators/subscriptionCancellation.zod.d.ts +1 -1
  355. package/dist/membership/v1/generated/validators/subscriptionList.zod.d.ts +1 -1
  356. package/dist/routes.d.ts +40 -16
  357. package/dist/routes.js +45 -18
  358. package/package.json +1 -1
  359. package/dist/assistant/v1/generated/validators/commandResource.zod.js +0 -33
  360. package/dist/assistant/v1/generated/validators/commandResultResource.zod.d.ts +0 -201
  361. package/dist/assistant/v1/generated/validators/statusReportResource.zod.d.ts +0 -108
  362. package/dist/assistant/v1/generated/validators/statusReportResource.zod.js +0 -48
@@ -23,7 +23,7 @@
23
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
24
  * OpenAPI spec version: 1.0.0
25
25
  */
26
- import type { AcceptConsentsRequestBody, AcceptInvitationByTokenRequestBody, AcceptedInvitationResponseBody, AccountResource, AgreementListResponseBody, ConsentListResponseBody, CreateProjectRequestBody, Error, IdentityVerificationResource, InvitationPreviewResource, LengthAwarePageInvitationResource, LengthAwarePageProjectAccessResource, ListMyInvitationsParams, ListProjectsParams, LocaleOptionsResource, PreviewInvitationByTokenParams, ProjectAccessList, ProjectAccessResource, ProjectSlugAvailabilityResource, RegisterRequestBody, ScopedTokenResponseBody, SearchProjectsRequestBody, SettingsResource, SubmitIdentityVerificationRequestBody, UpdateAccountRequestBody } from "./models.js";
26
+ import type { AcceptConsentsRequestBody, AcceptInvitationByTokenRequestBody, AcceptedInvitationResponseBody, AccountDeletionResource, AccountResource, AgreementListResponseBody, ConsentListResponseBody, CreateProjectRequestBody, Error, IdentityVerificationResource, InvitationPreviewResource, LengthAwarePageInvitationResource, LengthAwarePageProjectAccessResource, ListMyInvitationsParams, ListProjectsParams, LocaleOptionsResource, PreviewInvitationByTokenParams, ProjectAccessList, ProjectAccessResource, ProjectSlugAvailabilityResource, RegisterRequestBody, RequestAccountDeletionRequestBody, ScopedTokenResponseBody, SearchProjectsRequestBody, SettingsResource, SubmitIdentityVerificationRequestBody, UpdateAccountRequestBody } from "./models.js";
27
27
  export type HTTPStatusCode1xx = 100 | 101 | 102 | 103;
28
28
  export type HTTPStatusCode2xx = 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207;
29
29
  export type HTTPStatusCode3xx = 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308;
@@ -166,7 +166,7 @@ export declare const getRegisterUrl: () => string;
166
166
  /**
167
167
  * Call this after signing in at auth.leaflow.net, carrying the access token. The name and email address are taken from the sign-in claims and are not read from the request body.
168
168
  *
169
- * `consents` must cover every agreement returned by `GET /account/v1/agreements`, at the same versions. A missing agreement answers 400 and a stale version answers 409, in which case fetch the list again. An account that already exists answers 409.
169
+ * `consents` must cover every agreement returned by `GET /account/v1/agreements`, at the same versions. A missing agreement answers 400 and a stale version answers 409, in which case fetch the list again. An account that already exists answers 409, and one that has been deleted answers 410 `USER_DELETED`: the same sign-in cannot register again.
170
170
  * @summary Register an account
171
171
  */
172
172
  export declare const register: (registerRequestBody: RegisterRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<registerResponse>;
@@ -188,6 +188,8 @@ export type getAccountResponse = getAccountResponseSuccess | getAccountResponseE
188
188
  export declare const getGetAccountUrl: () => string;
189
189
  /**
190
190
  * `pending_agreements` holds the agreements not yet consented to. While it is not empty, obtain consent and call `POST /account/v1/me/consents`.
191
+ *
192
+ * `status` is `DELETING` while a deletion is open; see `GET /account/v1/me/deletion`. A deleted account answers 410 `USER_DELETED`.
191
193
  * @summary Get the current account
192
194
  */
193
195
  export declare const getAccount: (options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<getAccountResponse>;
@@ -212,6 +214,78 @@ export declare const getUpdateAccountUrl: () => string;
212
214
  * @summary Update the country and language of the current account
213
215
  */
214
216
  export declare const updateAccount: (updateAccountRequestBody: UpdateAccountRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<updateAccountResponse>;
217
+ export type getAccountDeletionResponse200 = {
218
+ data: AccountDeletionResource;
219
+ status: 200;
220
+ };
221
+ export type getAccountDeletionResponseDefault = {
222
+ data: Error;
223
+ status: Exclude<HTTPStatusCodes, 200>;
224
+ };
225
+ export type getAccountDeletionResponseSuccess = getAccountDeletionResponse200 & {
226
+ headers: Headers;
227
+ };
228
+ export type getAccountDeletionResponseError = getAccountDeletionResponseDefault & {
229
+ headers: Headers;
230
+ };
231
+ export type getAccountDeletionResponse = getAccountDeletionResponseSuccess | getAccountDeletionResponseError;
232
+ export declare const getGetAccountDeletionUrl: () => string;
233
+ /**
234
+ * `state` is `none` while no deletion is open. `blocking_projects` lists the projects the caller still owns; a deletion cannot be requested while it is not empty, so each of them must be transferred or deleted first.
235
+ *
236
+ * Conditions held by other services, such as an unpaid balance or a billing account still paying for a project, are not listed here. Read them from those services before requesting; they are checked again after the request, and a refusal shows up in `rejected_at` and `objections`.
237
+ * @summary Get the deletion of the current account
238
+ */
239
+ export declare const getAccountDeletion: (options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<getAccountDeletionResponse>;
240
+ export type requestAccountDeletionResponse202 = {
241
+ data: AccountDeletionResource;
242
+ status: 202;
243
+ };
244
+ export type requestAccountDeletionResponseDefault = {
245
+ data: Error;
246
+ status: Exclude<HTTPStatusCodes, 202>;
247
+ };
248
+ export type requestAccountDeletionResponseSuccess = requestAccountDeletionResponse202 & {
249
+ headers: Headers;
250
+ };
251
+ export type requestAccountDeletionResponseError = requestAccountDeletionResponseDefault & {
252
+ headers: Headers;
253
+ };
254
+ export type requestAccountDeletionResponse = requestAccountDeletionResponseSuccess | requestAccountDeletionResponseError;
255
+ export declare const getRequestAccountDeletionUrl: () => string;
256
+ /**
257
+ * The account is frozen at once: it can no longer enter a project or change anything in one. The answer is 202 with `state` `checking` while the services holding data for the account are asked whether it can be closed. Poll `GET /account/v1/me/deletion` until `state` leaves `checking`, which normally takes a few seconds.
258
+ *
259
+ * - If any service refuses, the account returns to use, `state` becomes `none`, and `rejected_at` and `objections` say why.
260
+ * - Otherwise `state` becomes `scheduled`, and the account is deleted at `scheduled_at`, fifteen days after the request. The conditions are checked once more at that time.
261
+ *
262
+ * The deletion can be cancelled with `DELETE /account/v1/me/deletion` until `scheduled_at`, and not after. Once carried out it cannot be undone, and the same sign-in cannot register again. Any remaining balance and prepaid benefits are forfeited, which `acknowledge_forfeiture` confirms.
263
+ *
264
+ * Requesting again while a deletion is open returns it unchanged. Fails with 412 `USER_OWNS_PROJECTS` while `blocking_projects` is not empty, and with 401 `INSUFFICIENT_USER_AUTHENTICATION` unless the caller signed in within the last `meta.max_age` seconds; sign in again with that `max_age` and retry.
265
+ * @summary Request deletion of the current account
266
+ */
267
+ export declare const requestAccountDeletion: (requestAccountDeletionRequestBody: RequestAccountDeletionRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<requestAccountDeletionResponse>;
268
+ export type cancelAccountDeletionResponse200 = {
269
+ data: AccountDeletionResource;
270
+ status: 200;
271
+ };
272
+ export type cancelAccountDeletionResponseDefault = {
273
+ data: Error;
274
+ status: Exclude<HTTPStatusCodes, 200>;
275
+ };
276
+ export type cancelAccountDeletionResponseSuccess = cancelAccountDeletionResponse200 & {
277
+ headers: Headers;
278
+ };
279
+ export type cancelAccountDeletionResponseError = cancelAccountDeletionResponseDefault & {
280
+ headers: Headers;
281
+ };
282
+ export type cancelAccountDeletionResponse = cancelAccountDeletionResponseSuccess | cancelAccountDeletionResponseError;
283
+ export declare const getCancelAccountDeletionUrl: () => string;
284
+ /**
285
+ * Returns the account to use. Cancelling when no deletion is open returns `state` `none`. Fails with 409 `ACCOUNT_DELETION_NOT_CANCELLABLE` once `scheduled_at` has passed.
286
+ * @summary Cancel the deletion of the current account
287
+ */
288
+ export declare const cancelAccountDeletion: (options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<cancelAccountDeletionResponse>;
215
289
  export type getIdentityVerificationResponse200 = {
216
290
  data: IdentityVerificationResource;
217
291
  status: 200;
@@ -113,7 +113,7 @@ export const getRegisterUrl = () => {
113
113
  /**
114
114
  * Call this after signing in at auth.leaflow.net, carrying the access token. The name and email address are taken from the sign-in claims and are not read from the request body.
115
115
  *
116
- * `consents` must cover every agreement returned by `GET /account/v1/agreements`, at the same versions. A missing agreement answers 400 and a stale version answers 409, in which case fetch the list again. An account that already exists answers 409.
116
+ * `consents` must cover every agreement returned by `GET /account/v1/agreements`, at the same versions. A missing agreement answers 400 and a stale version answers 409, in which case fetch the list again. An account that already exists answers 409, and one that has been deleted answers 410 `USER_DELETED`: the same sign-in cannot register again.
117
117
  * @summary Register an account
118
118
  */
119
119
  export const register = async (registerRequestBody, options, fetchFn) => {
@@ -147,6 +147,8 @@ export const getGetAccountUrl = () => {
147
147
  };
148
148
  /**
149
149
  * `pending_agreements` holds the agreements not yet consented to. While it is not empty, obtain consent and call `POST /account/v1/me/consents`.
150
+ *
151
+ * `status` is `DELETING` while a deletion is open; see `GET /account/v1/me/deletion`. A deleted account answers 410 `USER_DELETED`.
150
152
  * @summary Get the current account
151
153
  */
152
154
  export const getAccount = async (options, fetchFn) => {
@@ -191,6 +193,80 @@ export const updateAccount = async (updateAccountRequestBody, options, fetchFn)
191
193
  const data = body ? JSON.parse(body) : {};
192
194
  return { data, status: res.status, headers: res.headers };
193
195
  };
196
+ export const getGetAccountDeletionUrl = () => {
197
+ return `https://account.leaflow.cloud/account/v1/me/deletion`;
198
+ };
199
+ /**
200
+ * `state` is `none` while no deletion is open. `blocking_projects` lists the projects the caller still owns; a deletion cannot be requested while it is not empty, so each of them must be transferred or deleted first.
201
+ *
202
+ * Conditions held by other services, such as an unpaid balance or a billing account still paying for a project, are not listed here. Read them from those services before requesting; they are checked again after the request, and a refusal shows up in `rejected_at` and `objections`.
203
+ * @summary Get the deletion of the current account
204
+ */
205
+ export const getAccountDeletion = async (options, fetchFn) => {
206
+ const res = await (fetchFn ?? fetch)(getGetAccountDeletionUrl(), {
207
+ ...options,
208
+ method: "GET",
209
+ });
210
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
211
+ const data = body ? JSON.parse(body) : {};
212
+ return { data, status: res.status, headers: res.headers };
213
+ };
214
+ export const getRequestAccountDeletionUrl = () => {
215
+ return `https://account.leaflow.cloud/account/v1/me/deletion`;
216
+ };
217
+ /**
218
+ * The account is frozen at once: it can no longer enter a project or change anything in one. The answer is 202 with `state` `checking` while the services holding data for the account are asked whether it can be closed. Poll `GET /account/v1/me/deletion` until `state` leaves `checking`, which normally takes a few seconds.
219
+ *
220
+ * - If any service refuses, the account returns to use, `state` becomes `none`, and `rejected_at` and `objections` say why.
221
+ * - Otherwise `state` becomes `scheduled`, and the account is deleted at `scheduled_at`, fifteen days after the request. The conditions are checked once more at that time.
222
+ *
223
+ * The deletion can be cancelled with `DELETE /account/v1/me/deletion` until `scheduled_at`, and not after. Once carried out it cannot be undone, and the same sign-in cannot register again. Any remaining balance and prepaid benefits are forfeited, which `acknowledge_forfeiture` confirms.
224
+ *
225
+ * Requesting again while a deletion is open returns it unchanged. Fails with 412 `USER_OWNS_PROJECTS` while `blocking_projects` is not empty, and with 401 `INSUFFICIENT_USER_AUTHENTICATION` unless the caller signed in within the last `meta.max_age` seconds; sign in again with that `max_age` and retry.
226
+ * @summary Request deletion of the current account
227
+ */
228
+ export const requestAccountDeletion = async (requestAccountDeletionRequestBody, options, fetchFn) => {
229
+ const getHeaders = (h) => {
230
+ if (!h)
231
+ return {};
232
+ if (h instanceof Headers)
233
+ return Object.fromEntries(h.entries());
234
+ if (Symbol.iterator in h) {
235
+ return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
236
+ }
237
+ const headers = {};
238
+ for (const [name, value] of Object.entries(h)) {
239
+ if (value !== undefined)
240
+ headers[name] = value;
241
+ }
242
+ return headers;
243
+ };
244
+ const res = await (fetchFn ?? fetch)(getRequestAccountDeletionUrl(), {
245
+ ...options,
246
+ method: "POST",
247
+ headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
248
+ body: JSON.stringify(requestAccountDeletionRequestBody),
249
+ });
250
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
251
+ const data = body ? JSON.parse(body) : {};
252
+ return { data, status: res.status, headers: res.headers };
253
+ };
254
+ export const getCancelAccountDeletionUrl = () => {
255
+ return `https://account.leaflow.cloud/account/v1/me/deletion`;
256
+ };
257
+ /**
258
+ * Returns the account to use. Cancelling when no deletion is open returns `state` `none`. Fails with 409 `ACCOUNT_DELETION_NOT_CANCELLABLE` once `scheduled_at` has passed.
259
+ * @summary Cancel the deletion of the current account
260
+ */
261
+ export const cancelAccountDeletion = async (options, fetchFn) => {
262
+ const res = await (fetchFn ?? fetch)(getCancelAccountDeletionUrl(), {
263
+ ...options,
264
+ method: "DELETE",
265
+ });
266
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
267
+ const data = body ? JSON.parse(body) : {};
268
+ return { data, status: res.status, headers: res.headers };
269
+ };
194
270
  export const getGetIdentityVerificationUrl = () => {
195
271
  return `https://account.leaflow.cloud/account/v1/me/identity-verification`;
196
272
  };
@@ -156,6 +156,94 @@ export interface AccountResource {
156
156
  pending_agreements: AgreementResource[] | null;
157
157
  status: AccountResourceStatus;
158
158
  }
159
+ /**
160
+ * `none` while no deletion is open. `checking` while the services holding data for the account are asked whether it can be closed. `scheduled` once they agree; it is carried out at `scheduled_at` and can be cancelled until then. `executing` once `scheduled_at` has passed; it can no longer be cancelled
161
+ */
162
+ export type AccountDeletionState = (typeof AccountDeletionState)[keyof typeof AccountDeletionState];
163
+ export declare const AccountDeletionState: {
164
+ readonly none: "none";
165
+ readonly checking: "checking";
166
+ readonly scheduled: "scheduled";
167
+ readonly executing: "executing";
168
+ };
169
+ export type ProjectTraitResourceEffect = (typeof ProjectTraitResourceEffect)[keyof typeof ProjectTraitResourceEffect];
170
+ export declare const ProjectTraitResourceEffect: {
171
+ readonly NoWrite: "NoWrite";
172
+ readonly NoAccess: "NoAccess";
173
+ };
174
+ export interface ProjectTraitResource {
175
+ key: string;
176
+ value: string;
177
+ effect: ProjectTraitResourceEffect;
178
+ reason: string;
179
+ }
180
+ /**
181
+ * `active` until deletion is requested; `deleting` while the resources under the project are being removed, when `deletion_requested_at` is set; `deleted` once removal has finished, when `deleted_at` is set
182
+ */
183
+ export type ProjectStatus = (typeof ProjectStatus)[keyof typeof ProjectStatus];
184
+ export declare const ProjectStatus: {
185
+ readonly active: "active";
186
+ readonly deleting: "deleting";
187
+ readonly deleted: "deleted";
188
+ };
189
+ export interface ProjectResource {
190
+ traits: ProjectTraitResource[];
191
+ /** @nullable */
192
+ deletion_requested_at: string | null;
193
+ created_at: string;
194
+ created_by: string;
195
+ /**
196
+ * When the project was deleted
197
+ * @nullable
198
+ */
199
+ deleted_at: string | null;
200
+ description: string;
201
+ id: string;
202
+ /**
203
+ * The label naming the project in its address. It equals `id` until a custom slug is chosen. A custom slug does not change once set, and stays with the project after deletion
204
+ * @minLength 1
205
+ * @maxLength 36
206
+ */
207
+ slug: string;
208
+ status: ProjectStatus;
209
+ name: string;
210
+ updated_at: string;
211
+ }
212
+ export interface AccountDeletionObjectionResource {
213
+ /** The service that refused, such as `billing` */
214
+ service: string;
215
+ /** A stable code defined by that service, such as `ARREARS`. The service documents what each code means and how to resolve it */
216
+ code: string;
217
+ }
218
+ export interface AccountDeletionResource {
219
+ state: AccountDeletionState;
220
+ /**
221
+ * Null while `state` is `none`
222
+ * @nullable
223
+ */
224
+ requested_at: string | null;
225
+ /**
226
+ * When the deletion is carried out. Null while `state` is `none`
227
+ * @nullable
228
+ */
229
+ scheduled_at: string | null;
230
+ /** True when an operator requested the deletion rather than the account holder. False while `state` is `none` */
231
+ requested_by_operator: boolean;
232
+ /** Projects the caller owns that are not being deleted. A deletion cannot be requested while this is not empty */
233
+ blocking_projects: ProjectResource[];
234
+ /**
235
+ * When the most recent request was turned down. Null unless the most recent request was turned down
236
+ * @nullable
237
+ */
238
+ rejected_at: string | null;
239
+ /** Why the most recent request was turned down. Empty unless `rejected_at` is set */
240
+ objections: AccountDeletionObjectionResource[];
241
+ }
242
+ export declare const RequestAccountDeletionRequestBodyValue: {
243
+ /** Must be true. Confirms that any remaining balance and prepaid benefits are forfeited when the deletion is carried out */
244
+ readonly acknowledge_forfeiture: true;
245
+ };
246
+ export type RequestAccountDeletionRequestBody = typeof RequestAccountDeletionRequestBodyValue;
159
247
  /**
160
248
  * The language used for the interface and for email. It is independent of `country`, and neither can be inferred from the other
161
249
  */
@@ -297,49 +385,6 @@ export interface AcceptInvitationByTokenRequestBody {
297
385
  */
298
386
  token: string;
299
387
  }
300
- export type ProjectTraitResourceEffect = (typeof ProjectTraitResourceEffect)[keyof typeof ProjectTraitResourceEffect];
301
- export declare const ProjectTraitResourceEffect: {
302
- readonly NoWrite: "NoWrite";
303
- readonly NoAccess: "NoAccess";
304
- };
305
- export interface ProjectTraitResource {
306
- key: string;
307
- value: string;
308
- effect: ProjectTraitResourceEffect;
309
- reason: string;
310
- }
311
- /**
312
- * `active` until deletion is requested; `deleting` while the resources under the project are being removed, when `deletion_requested_at` is set; `deleted` once removal has finished, when `deleted_at` is set
313
- */
314
- export type ProjectStatus = (typeof ProjectStatus)[keyof typeof ProjectStatus];
315
- export declare const ProjectStatus: {
316
- readonly active: "active";
317
- readonly deleting: "deleting";
318
- readonly deleted: "deleted";
319
- };
320
- export interface ProjectResource {
321
- traits: ProjectTraitResource[];
322
- /** @nullable */
323
- deletion_requested_at: string | null;
324
- created_at: string;
325
- created_by: string;
326
- /**
327
- * When the project was deleted
328
- * @nullable
329
- */
330
- deleted_at: string | null;
331
- description: string;
332
- id: string;
333
- /**
334
- * The label naming the project in its address. It equals `id` until a custom slug is chosen. A custom slug does not change once set, and stays with the project after deletion
335
- * @minLength 1
336
- * @maxLength 36
337
- */
338
- slug: string;
339
- status: ProjectStatus;
340
- name: string;
341
- updated_at: string;
342
- }
343
388
  export interface AcceptedInvitationResponseBody {
344
389
  project: ProjectResource;
345
390
  }
@@ -33,6 +33,25 @@ export const AccountResourceStatus = {
33
33
  BANNED: "BANNED",
34
34
  DELETING: "DELETING",
35
35
  };
36
+ export const AccountDeletionState = {
37
+ none: "none",
38
+ checking: "checking",
39
+ scheduled: "scheduled",
40
+ executing: "executing",
41
+ };
42
+ export const ProjectTraitResourceEffect = {
43
+ NoWrite: "NoWrite",
44
+ NoAccess: "NoAccess",
45
+ };
46
+ export const ProjectStatus = {
47
+ active: "active",
48
+ deleting: "deleting",
49
+ deleted: "deleted",
50
+ };
51
+ export const RequestAccountDeletionRequestBodyValue = {
52
+ /** Must be true. Confirms that any remaining balance and prepaid benefits are forfeited when the deletion is carried out */
53
+ acknowledge_forfeiture: true,
54
+ };
36
55
  export const Locale = {
37
56
  "zh-Hans": "zh-Hans",
38
57
  "zh-Hant-HK": "zh-Hant-HK",
@@ -45,15 +64,6 @@ export const IdentityVerificationResourceStatus = {
45
64
  ENTERPRISE: "ENTERPRISE",
46
65
  REJECTED: "REJECTED",
47
66
  };
48
- export const ProjectTraitResourceEffect = {
49
- NoWrite: "NoWrite",
50
- NoAccess: "NoAccess",
51
- };
52
- export const ProjectStatus = {
53
- active: "active",
54
- deleting: "deleting",
55
- deleted: "deleted",
56
- };
57
67
  export const RuleResourceEffect = {
58
68
  allow: "allow",
59
69
  deny: "deny",
@@ -43,7 +43,7 @@ export declare const AcceptAgreementsBody: zod.ZodObject<{
43
43
  /**
44
44
  * Call this after signing in at auth.leaflow.net, carrying the access token. The name and email address are taken from the sign-in claims and are not read from the request body.
45
45
  *
46
- * `consents` must cover every agreement returned by `GET /account/v1/agreements`, at the same versions. A missing agreement answers 400 and a stale version answers 409, in which case fetch the list again. An account that already exists answers 409.
46
+ * `consents` must cover every agreement returned by `GET /account/v1/agreements`, at the same versions. A missing agreement answers 400 and a stale version answers 409, in which case fetch the list again. An account that already exists answers 409, and one that has been deleted answers 410 `USER_DELETED`: the same sign-in cannot register again.
47
47
  * @summary Register an account
48
48
  */
49
49
  export declare const RegisterBody: zod.ZodObject<{
@@ -74,6 +74,20 @@ export declare const UpdateAccountBody: zod.ZodObject<{
74
74
  en: "en";
75
75
  }>>;
76
76
  }, zod.z.core.$strict>;
77
+ /**
78
+ * The account is frozen at once: it can no longer enter a project or change anything in one. The answer is 202 with `state` `checking` while the services holding data for the account are asked whether it can be closed. Poll `GET /account/v1/me/deletion` until `state` leaves `checking`, which normally takes a few seconds.
79
+ *
80
+ * - If any service refuses, the account returns to use, `state` becomes `none`, and `rejected_at` and `objections` say why.
81
+ * - Otherwise `state` becomes `scheduled`, and the account is deleted at `scheduled_at`, fifteen days after the request. The conditions are checked once more at that time.
82
+ *
83
+ * The deletion can be cancelled with `DELETE /account/v1/me/deletion` until `scheduled_at`, and not after. Once carried out it cannot be undone, and the same sign-in cannot register again. Any remaining balance and prepaid benefits are forfeited, which `acknowledge_forfeiture` confirms.
84
+ *
85
+ * Requesting again while a deletion is open returns it unchanged. Fails with 412 `USER_OWNS_PROJECTS` while `blocking_projects` is not empty, and with 401 `INSUFFICIENT_USER_AUTHENTICATION` unless the caller signed in within the last `meta.max_age` seconds; sign in again with that `max_age` and retry.
86
+ * @summary Request deletion of the current account
87
+ */
88
+ export declare const RequestAccountDeletionBody: zod.ZodObject<{
89
+ acknowledge_forfeiture: zod.ZodLiteral<true>;
90
+ }, zod.z.core.$strict>;
77
91
  /**
78
92
  * A submission awaiting review, and an account already verified, are both refused. A rejected submission may be corrected and sent again.
79
93
  * @summary Submit identity verification
@@ -28,6 +28,7 @@ import { AcceptConsentsRequestBody } from "./validators/acceptConsentsRequestBod
28
28
  import { AcceptInvitationByTokenRequestBody } from "./validators/acceptInvitationByTokenRequestBody.zod.js";
29
29
  import { CreateProjectRequestBody } from "./validators/createProjectRequestBody.zod.js";
30
30
  import { RegisterRequestBody } from "./validators/registerRequestBody.zod.js";
31
+ import { RequestAccountDeletionRequestBody } from "./validators/requestAccountDeletionRequestBody.zod.js";
31
32
  import { SubmitIdentityVerificationRequestBody } from "./validators/submitIdentityVerificationRequestBody.zod.js";
32
33
  import { UpdateAccountRequestBody } from "./validators/updateAccountRequestBody.zod.js";
33
34
  /**
@@ -40,7 +41,7 @@ export const AcceptAgreementsBody = AcceptConsentsRequestBody;
40
41
  /**
41
42
  * Call this after signing in at auth.leaflow.net, carrying the access token. The name and email address are taken from the sign-in claims and are not read from the request body.
42
43
  *
43
- * `consents` must cover every agreement returned by `GET /account/v1/agreements`, at the same versions. A missing agreement answers 400 and a stale version answers 409, in which case fetch the list again. An account that already exists answers 409.
44
+ * `consents` must cover every agreement returned by `GET /account/v1/agreements`, at the same versions. A missing agreement answers 400 and a stale version answers 409, in which case fetch the list again. An account that already exists answers 409, and one that has been deleted answers 410 `USER_DELETED`: the same sign-in cannot register again.
44
45
  * @summary Register an account
45
46
  */
46
47
  export const RegisterBody = RegisterRequestBody;
@@ -49,6 +50,18 @@ export const RegisterBody = RegisterRequestBody;
49
50
  * @summary Update the country and language of the current account
50
51
  */
51
52
  export const UpdateAccountBody = UpdateAccountRequestBody;
53
+ /**
54
+ * The account is frozen at once: it can no longer enter a project or change anything in one. The answer is 202 with `state` `checking` while the services holding data for the account are asked whether it can be closed. Poll `GET /account/v1/me/deletion` until `state` leaves `checking`, which normally takes a few seconds.
55
+ *
56
+ * - If any service refuses, the account returns to use, `state` becomes `none`, and `rejected_at` and `objections` say why.
57
+ * - Otherwise `state` becomes `scheduled`, and the account is deleted at `scheduled_at`, fifteen days after the request. The conditions are checked once more at that time.
58
+ *
59
+ * The deletion can be cancelled with `DELETE /account/v1/me/deletion` until `scheduled_at`, and not after. Once carried out it cannot be undone, and the same sign-in cannot register again. Any remaining balance and prepaid benefits are forfeited, which `acknowledge_forfeiture` confirms.
60
+ *
61
+ * Requesting again while a deletion is open returns it unchanged. Fails with 412 `USER_OWNS_PROJECTS` while `blocking_projects` is not empty, and with 401 `INSUFFICIENT_USER_AUTHENTICATION` unless the caller signed in within the last `meta.max_age` seconds; sign in again with that `max_age` and retry.
62
+ * @summary Request deletion of the current account
63
+ */
64
+ export const RequestAccountDeletionBody = RequestAccountDeletionRequestBody;
52
65
  /**
53
66
  * A submission awaiting review, and an account already verified, are both refused. A rejected submission may be corrected and sent again.
54
67
  * @summary Submit identity verification
@@ -0,0 +1,32 @@
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 AccountDeletionObjectionResource: zod.ZodObject<{
28
+ service: zod.ZodString;
29
+ code: zod.ZodString;
30
+ }, zod.z.core.$strict>;
31
+ export type AccountDeletionObjectionResource = zod.input<typeof AccountDeletionObjectionResource>;
32
+ export type AccountDeletionObjectionResourceOutput = zod.output<typeof AccountDeletionObjectionResource>;
@@ -0,0 +1,32 @@
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 const AccountDeletionObjectionResource = zod.strictObject({
28
+ service: zod.string().describe("The service that refused, such as `billing`"),
29
+ code: zod
30
+ .string()
31
+ .describe("A stable code defined by that service, such as `ARREARS`. The service documents what each code means and how to resolve it"),
32
+ });
@@ -0,0 +1,69 @@
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 AccountDeletionResource: zod.ZodObject<{
28
+ state: zod.ZodEnum<{
29
+ none: "none";
30
+ checking: "checking";
31
+ scheduled: "scheduled";
32
+ executing: "executing";
33
+ }>;
34
+ requested_at: zod.ZodNullable<zod.z.ZodISODateTime>;
35
+ scheduled_at: zod.ZodNullable<zod.z.ZodISODateTime>;
36
+ requested_by_operator: zod.ZodBoolean;
37
+ blocking_projects: zod.ZodArray<zod.ZodObject<{
38
+ traits: zod.ZodArray<zod.ZodObject<{
39
+ key: zod.ZodString;
40
+ value: zod.ZodString;
41
+ effect: zod.ZodEnum<{
42
+ NoWrite: "NoWrite";
43
+ NoAccess: "NoAccess";
44
+ }>;
45
+ reason: zod.ZodString;
46
+ }, zod.z.core.$strict>>;
47
+ deletion_requested_at: zod.ZodNullable<zod.z.ZodISODateTime>;
48
+ created_at: zod.z.ZodISODateTime;
49
+ created_by: zod.ZodString;
50
+ deleted_at: zod.ZodNullable<zod.z.ZodISODateTime>;
51
+ description: zod.ZodString;
52
+ id: zod.ZodUUID;
53
+ slug: zod.ZodString;
54
+ status: zod.ZodEnum<{
55
+ active: "active";
56
+ deleting: "deleting";
57
+ deleted: "deleted";
58
+ }>;
59
+ name: zod.ZodString;
60
+ updated_at: zod.z.ZodISODateTime;
61
+ }, zod.z.core.$strict>>;
62
+ rejected_at: zod.ZodNullable<zod.z.ZodISODateTime>;
63
+ objections: zod.ZodArray<zod.ZodObject<{
64
+ service: zod.ZodString;
65
+ code: zod.ZodString;
66
+ }, zod.z.core.$strict>>;
67
+ }, zod.z.core.$strict>;
68
+ export type AccountDeletionResource = zod.input<typeof AccountDeletionResource>;
69
+ export type AccountDeletionResourceOutput = zod.output<typeof AccountDeletionResource>;
@@ -0,0 +1,53 @@
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 { AccountDeletionObjectionResource } from "./accountDeletionObjectionResource.zod.js";
28
+ import { AccountDeletionState } from "./accountDeletionState.zod.js";
29
+ import { ProjectResource } from "./projectResource.zod.js";
30
+ export const AccountDeletionResource = zod.strictObject({
31
+ state: AccountDeletionState,
32
+ requested_at: zod.iso
33
+ .datetime({ offset: true })
34
+ .nullable()
35
+ .describe("Null while `state` is `none`"),
36
+ scheduled_at: zod.iso
37
+ .datetime({ offset: true })
38
+ .nullable()
39
+ .describe("When the deletion is carried out. Null while `state` is `none`"),
40
+ requested_by_operator: zod
41
+ .boolean()
42
+ .describe("True when an operator requested the deletion rather than the account holder. False while `state` is `none`"),
43
+ blocking_projects: zod
44
+ .array(ProjectResource)
45
+ .describe("Projects the caller owns that are not being deleted. A deletion cannot be requested while this is not empty"),
46
+ rejected_at: zod.iso
47
+ .datetime({ offset: true })
48
+ .nullable()
49
+ .describe("When the most recent request was turned down. Null unless the most recent request was turned down"),
50
+ objections: zod
51
+ .array(AccountDeletionObjectionResource)
52
+ .describe("Why the most recent request was turned down. Empty unless `rejected_at` is set"),
53
+ });