alchemy 0.67.0 → 0.69.0

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 (803) hide show
  1. package/bin/alchemy.js +25580 -26264
  2. package/bin/alchemy.ts +6 -2
  3. package/bin/commands/configure.ts +194 -0
  4. package/bin/commands/login.ts +99 -55
  5. package/bin/commands/logout.ts +66 -0
  6. package/bin/trpc.ts +27 -2
  7. package/lib/apply.d.ts +2 -2
  8. package/lib/apply.d.ts.map +1 -1
  9. package/lib/apply.js +18 -15
  10. package/lib/apply.js.map +1 -1
  11. package/lib/auth.d.ts +72 -0
  12. package/lib/auth.d.ts.map +1 -0
  13. package/lib/auth.js +163 -0
  14. package/lib/auth.js.map +1 -0
  15. package/lib/aws/bucket.d.ts +12 -3
  16. package/lib/aws/bucket.d.ts.map +1 -1
  17. package/lib/aws/bucket.js +2 -2
  18. package/lib/aws/bucket.js.map +1 -1
  19. package/lib/aws/control/properties.d.ts +64 -0
  20. package/lib/aws/control/properties.d.ts.map +1 -1
  21. package/lib/aws/control/properties.js +554 -39
  22. package/lib/aws/control/properties.js.map +1 -1
  23. package/lib/aws/control/resource.d.ts +34 -3
  24. package/lib/aws/control/resource.d.ts.map +1 -1
  25. package/lib/aws/control/resource.js +36 -3
  26. package/lib/aws/control/resource.js.map +1 -1
  27. package/lib/aws/control/types.d.ts +5451 -1587
  28. package/lib/aws/control/types.d.ts.map +1 -1
  29. package/lib/aws/control/types.js.map +1 -1
  30. package/lib/aws/control/update-types.d.ts +12913 -0
  31. package/lib/aws/control/update-types.d.ts.map +1 -0
  32. package/lib/aws/control/update-types.js +12916 -0
  33. package/lib/aws/control/update-types.js.map +1 -0
  34. package/lib/aws/ec2/internet-gateway-attachment.d.ts +1 -2
  35. package/lib/aws/ec2/internet-gateway-attachment.d.ts.map +1 -1
  36. package/lib/aws/ec2/internet-gateway-attachment.js +4 -4
  37. package/lib/aws/ec2/internet-gateway-attachment.js.map +1 -1
  38. package/lib/aws/ec2/internet-gateway.d.ts +1 -2
  39. package/lib/aws/ec2/internet-gateway.d.ts.map +1 -1
  40. package/lib/aws/ec2/internet-gateway.js +2 -2
  41. package/lib/aws/ec2/internet-gateway.js.map +1 -1
  42. package/lib/aws/ec2/nat-gateway.d.ts +1 -2
  43. package/lib/aws/ec2/nat-gateway.d.ts.map +1 -1
  44. package/lib/aws/ec2/nat-gateway.js +2 -2
  45. package/lib/aws/ec2/nat-gateway.js.map +1 -1
  46. package/lib/aws/ec2/route-table-association.d.ts +1 -2
  47. package/lib/aws/ec2/route-table-association.d.ts.map +1 -1
  48. package/lib/aws/ec2/route-table-association.js +2 -2
  49. package/lib/aws/ec2/route-table-association.js.map +1 -1
  50. package/lib/aws/ec2/route-table.d.ts +1 -2
  51. package/lib/aws/ec2/route-table.d.ts.map +1 -1
  52. package/lib/aws/ec2/route-table.js +2 -2
  53. package/lib/aws/ec2/route-table.js.map +1 -1
  54. package/lib/aws/ec2/route.d.ts +1 -2
  55. package/lib/aws/ec2/route.d.ts.map +1 -1
  56. package/lib/aws/ec2/route.js +2 -2
  57. package/lib/aws/ec2/route.js.map +1 -1
  58. package/lib/aws/ec2/security-group-rule.d.ts +1 -2
  59. package/lib/aws/ec2/security-group-rule.d.ts.map +1 -1
  60. package/lib/aws/ec2/security-group-rule.js +2 -2
  61. package/lib/aws/ec2/security-group-rule.js.map +1 -1
  62. package/lib/aws/ec2/security-group.d.ts +1 -2
  63. package/lib/aws/ec2/security-group.d.ts.map +1 -1
  64. package/lib/aws/ec2/security-group.js +2 -2
  65. package/lib/aws/ec2/security-group.js.map +1 -1
  66. package/lib/aws/ec2/subnet.d.ts +1 -2
  67. package/lib/aws/ec2/subnet.d.ts.map +1 -1
  68. package/lib/aws/ec2/subnet.js +2 -2
  69. package/lib/aws/ec2/subnet.js.map +1 -1
  70. package/lib/aws/ec2/vpc.d.ts +1 -2
  71. package/lib/aws/ec2/vpc.d.ts.map +1 -1
  72. package/lib/aws/ec2/vpc.js +2 -2
  73. package/lib/aws/ec2/vpc.js.map +1 -1
  74. package/lib/aws/function.d.ts +116 -3
  75. package/lib/aws/function.d.ts.map +1 -1
  76. package/lib/aws/function.js +2 -2
  77. package/lib/aws/function.js.map +1 -1
  78. package/lib/aws/oidc/github-oidc-provider.d.ts +13 -2
  79. package/lib/aws/oidc/github-oidc-provider.d.ts.map +1 -1
  80. package/lib/aws/oidc/oidc-provider.d.ts +48 -3
  81. package/lib/aws/oidc/oidc-provider.d.ts.map +1 -1
  82. package/lib/aws/oidc/oidc-provider.js +2 -2
  83. package/lib/aws/oidc/oidc-provider.js.map +1 -1
  84. package/lib/aws/policy-attachment.d.ts +2 -3
  85. package/lib/aws/policy-attachment.d.ts.map +1 -1
  86. package/lib/aws/policy-attachment.js +1 -1
  87. package/lib/aws/policy-attachment.js.map +1 -1
  88. package/lib/aws/policy.d.ts +1 -2
  89. package/lib/aws/policy.d.ts.map +1 -1
  90. package/lib/aws/policy.js +4 -4
  91. package/lib/aws/policy.js.map +1 -1
  92. package/lib/aws/queue.d.ts +1 -2
  93. package/lib/aws/queue.d.ts.map +1 -1
  94. package/lib/aws/queue.js +4 -4
  95. package/lib/aws/queue.js.map +1 -1
  96. package/lib/aws/role.d.ts +1 -2
  97. package/lib/aws/role.d.ts.map +1 -1
  98. package/lib/aws/role.js +2 -2
  99. package/lib/aws/role.js.map +1 -1
  100. package/lib/aws/ses.d.ts +1 -2
  101. package/lib/aws/ses.d.ts.map +1 -1
  102. package/lib/aws/ses.js +2 -2
  103. package/lib/aws/ses.js.map +1 -1
  104. package/lib/aws/ssm-parameter.d.ts +1 -2
  105. package/lib/aws/ssm-parameter.d.ts.map +1 -1
  106. package/lib/aws/ssm-parameter.js +2 -2
  107. package/lib/aws/ssm-parameter.js.map +1 -1
  108. package/lib/aws/table.d.ts +1 -2
  109. package/lib/aws/table.d.ts.map +1 -1
  110. package/lib/aws/table.js +2 -2
  111. package/lib/aws/table.js.map +1 -1
  112. package/lib/cloudflare/account-api-token.d.ts +1 -2
  113. package/lib/cloudflare/account-api-token.d.ts.map +1 -1
  114. package/lib/cloudflare/account-api-token.js +2 -2
  115. package/lib/cloudflare/account-api-token.js.map +1 -1
  116. package/lib/cloudflare/ai-gateway.d.ts +1 -2
  117. package/lib/cloudflare/ai-gateway.d.ts.map +1 -1
  118. package/lib/cloudflare/ai-gateway.js +2 -2
  119. package/lib/cloudflare/ai-gateway.js.map +1 -1
  120. package/lib/cloudflare/api-gateway-operation.d.ts +1 -2
  121. package/lib/cloudflare/api-gateway-operation.d.ts.map +1 -1
  122. package/lib/cloudflare/api-gateway-operation.js +2 -2
  123. package/lib/cloudflare/api-gateway-operation.js.map +1 -1
  124. package/lib/cloudflare/api-schema.d.ts +1 -2
  125. package/lib/cloudflare/api-schema.d.ts.map +1 -1
  126. package/lib/cloudflare/api-schema.js +2 -2
  127. package/lib/cloudflare/api-schema.js.map +1 -1
  128. package/lib/cloudflare/api-shield.d.ts +1 -2
  129. package/lib/cloudflare/api-shield.d.ts.map +1 -1
  130. package/lib/cloudflare/api-shield.js +2 -2
  131. package/lib/cloudflare/api-shield.js.map +1 -1
  132. package/lib/cloudflare/api.d.ts +18 -10
  133. package/lib/cloudflare/api.d.ts.map +1 -1
  134. package/lib/cloudflare/api.js +92 -38
  135. package/lib/cloudflare/api.js.map +1 -1
  136. package/lib/cloudflare/assets.d.ts +21 -43
  137. package/lib/cloudflare/assets.d.ts.map +1 -1
  138. package/lib/cloudflare/assets.js +78 -70
  139. package/lib/cloudflare/assets.js.map +1 -1
  140. package/lib/cloudflare/astro/astro.d.ts.map +1 -1
  141. package/lib/cloudflare/astro/astro.js +3 -3
  142. package/lib/cloudflare/astro/astro.js.map +1 -1
  143. package/lib/cloudflare/auth.d.ts +91 -17
  144. package/lib/cloudflare/auth.d.ts.map +1 -1
  145. package/lib/cloudflare/auth.js +141 -62
  146. package/lib/cloudflare/auth.js.map +1 -1
  147. package/lib/cloudflare/bound.d.ts +1 -1
  148. package/lib/cloudflare/bound.d.ts.map +1 -1
  149. package/lib/cloudflare/bucket-object.d.ts +81 -0
  150. package/lib/cloudflare/bucket-object.d.ts.map +1 -0
  151. package/lib/cloudflare/bucket-object.js +67 -0
  152. package/lib/cloudflare/bucket-object.js.map +1 -0
  153. package/lib/cloudflare/bucket.d.ts +87 -8
  154. package/lib/cloudflare/bucket.d.ts.map +1 -1
  155. package/lib/cloudflare/bucket.js +246 -19
  156. package/lib/cloudflare/bucket.js.map +1 -1
  157. package/lib/cloudflare/bundle/plugin-wasm.js +4 -2
  158. package/lib/cloudflare/bundle/plugin-wasm.js.map +1 -1
  159. package/lib/cloudflare/certificate-pack.d.ts +1 -2
  160. package/lib/cloudflare/certificate-pack.d.ts.map +1 -1
  161. package/lib/cloudflare/certificate-pack.js +4 -4
  162. package/lib/cloudflare/certificate-pack.js.map +1 -1
  163. package/lib/cloudflare/compatibility-date.gen.d.ts +1 -1
  164. package/lib/cloudflare/compatibility-date.gen.js +1 -1
  165. package/lib/cloudflare/container.d.ts +1 -2
  166. package/lib/cloudflare/container.d.ts.map +1 -1
  167. package/lib/cloudflare/container.js +7 -7
  168. package/lib/cloudflare/container.js.map +1 -1
  169. package/lib/cloudflare/custom-domain.d.ts +1 -2
  170. package/lib/cloudflare/custom-domain.d.ts.map +1 -1
  171. package/lib/cloudflare/custom-domain.js +2 -2
  172. package/lib/cloudflare/custom-domain.js.map +1 -1
  173. package/lib/cloudflare/d1-database.d.ts +2 -3
  174. package/lib/cloudflare/d1-database.d.ts.map +1 -1
  175. package/lib/cloudflare/d1-database.js +5 -5
  176. package/lib/cloudflare/d1-database.js.map +1 -1
  177. package/lib/cloudflare/dispatch-namespace.d.ts +2 -3
  178. package/lib/cloudflare/dispatch-namespace.d.ts.map +1 -1
  179. package/lib/cloudflare/dispatch-namespace.js +3 -3
  180. package/lib/cloudflare/dispatch-namespace.js.map +1 -1
  181. package/lib/cloudflare/dns-records.d.ts +1 -2
  182. package/lib/cloudflare/dns-records.d.ts.map +1 -1
  183. package/lib/cloudflare/dns-records.js +4 -4
  184. package/lib/cloudflare/dns-records.js.map +1 -1
  185. package/lib/cloudflare/email-address.d.ts +1 -2
  186. package/lib/cloudflare/email-address.d.ts.map +1 -1
  187. package/lib/cloudflare/email-address.js +6 -6
  188. package/lib/cloudflare/email-address.js.map +1 -1
  189. package/lib/cloudflare/email-catch-all.d.ts +1 -2
  190. package/lib/cloudflare/email-catch-all.d.ts.map +1 -1
  191. package/lib/cloudflare/email-catch-all.js +4 -4
  192. package/lib/cloudflare/email-catch-all.js.map +1 -1
  193. package/lib/cloudflare/email-routing.d.ts +1 -2
  194. package/lib/cloudflare/email-routing.d.ts.map +1 -1
  195. package/lib/cloudflare/email-routing.js +4 -4
  196. package/lib/cloudflare/email-routing.js.map +1 -1
  197. package/lib/cloudflare/email-rule.d.ts +1 -2
  198. package/lib/cloudflare/email-rule.d.ts.map +1 -1
  199. package/lib/cloudflare/email-rule.js +4 -4
  200. package/lib/cloudflare/email-rule.js.map +1 -1
  201. package/lib/cloudflare/hyperdrive.d.ts +1 -2
  202. package/lib/cloudflare/hyperdrive.d.ts.map +1 -1
  203. package/lib/cloudflare/hyperdrive.js +4 -4
  204. package/lib/cloudflare/hyperdrive.js.map +1 -1
  205. package/lib/cloudflare/index.d.ts +1 -0
  206. package/lib/cloudflare/index.d.ts.map +1 -1
  207. package/lib/cloudflare/index.js +1 -0
  208. package/lib/cloudflare/index.js.map +1 -1
  209. package/lib/cloudflare/kv-namespace.d.ts +2 -3
  210. package/lib/cloudflare/kv-namespace.d.ts.map +1 -1
  211. package/lib/cloudflare/kv-namespace.js +5 -5
  212. package/lib/cloudflare/kv-namespace.js.map +1 -1
  213. package/lib/cloudflare/miniflare/delete.js +1 -1
  214. package/lib/cloudflare/miniflare/delete.js.map +1 -1
  215. package/lib/cloudflare/miniflare/miniflare-worker-proxy.d.ts.map +1 -1
  216. package/lib/cloudflare/miniflare/miniflare-worker-proxy.js +2 -7
  217. package/lib/cloudflare/miniflare/miniflare-worker-proxy.js.map +1 -1
  218. package/lib/cloudflare/miniflare/remote-binding-proxy.d.ts.map +1 -1
  219. package/lib/cloudflare/miniflare/remote-binding-proxy.js +15 -4
  220. package/lib/cloudflare/miniflare/remote-binding-proxy.js.map +1 -1
  221. package/lib/cloudflare/next.js.map +1 -1
  222. package/lib/cloudflare/nuxt/nuxt.d.ts.map +1 -1
  223. package/lib/cloudflare/nuxt/nuxt.js +3 -3
  224. package/lib/cloudflare/nuxt/nuxt.js.map +1 -1
  225. package/lib/cloudflare/permission-groups.d.ts +1 -2
  226. package/lib/cloudflare/permission-groups.d.ts.map +1 -1
  227. package/lib/cloudflare/permission-groups.js +1 -1
  228. package/lib/cloudflare/permission-groups.js.map +1 -1
  229. package/lib/cloudflare/pipeline.d.ts +2 -3
  230. package/lib/cloudflare/pipeline.d.ts.map +1 -1
  231. package/lib/cloudflare/pipeline.js +5 -5
  232. package/lib/cloudflare/pipeline.js.map +1 -1
  233. package/lib/cloudflare/queue-consumer.d.ts +1 -2
  234. package/lib/cloudflare/queue-consumer.d.ts.map +1 -1
  235. package/lib/cloudflare/queue-consumer.js +4 -4
  236. package/lib/cloudflare/queue-consumer.js.map +1 -1
  237. package/lib/cloudflare/queue.d.ts +1 -2
  238. package/lib/cloudflare/queue.d.ts.map +1 -1
  239. package/lib/cloudflare/queue.js +4 -4
  240. package/lib/cloudflare/queue.js.map +1 -1
  241. package/lib/cloudflare/react-router/plugin.d.ts.map +1 -1
  242. package/lib/cloudflare/react-router/plugin.js +13 -0
  243. package/lib/cloudflare/react-router/plugin.js.map +1 -1
  244. package/lib/cloudflare/redirect-rule.d.ts +1 -2
  245. package/lib/cloudflare/redirect-rule.d.ts.map +1 -1
  246. package/lib/cloudflare/redirect-rule.js +4 -4
  247. package/lib/cloudflare/redirect-rule.js.map +1 -1
  248. package/lib/cloudflare/route.d.ts +1 -2
  249. package/lib/cloudflare/route.d.ts.map +1 -1
  250. package/lib/cloudflare/route.js +4 -4
  251. package/lib/cloudflare/route.js.map +1 -1
  252. package/lib/cloudflare/ruleset.d.ts +1 -2
  253. package/lib/cloudflare/ruleset.d.ts.map +1 -1
  254. package/lib/cloudflare/ruleset.js +2 -2
  255. package/lib/cloudflare/ruleset.js.map +1 -1
  256. package/lib/cloudflare/secret.d.ts +2 -3
  257. package/lib/cloudflare/secret.d.ts.map +1 -1
  258. package/lib/cloudflare/secret.js +3 -3
  259. package/lib/cloudflare/secret.js.map +1 -1
  260. package/lib/cloudflare/secrets-store.d.ts +2 -3
  261. package/lib/cloudflare/secrets-store.d.ts.map +1 -1
  262. package/lib/cloudflare/secrets-store.js +3 -3
  263. package/lib/cloudflare/secrets-store.js.map +1 -1
  264. package/lib/cloudflare/tunnel.d.ts +2 -3
  265. package/lib/cloudflare/tunnel.d.ts.map +1 -1
  266. package/lib/cloudflare/tunnel.js +3 -3
  267. package/lib/cloudflare/tunnel.js.map +1 -1
  268. package/lib/cloudflare/user.d.ts +3 -2
  269. package/lib/cloudflare/user.d.ts.map +1 -1
  270. package/lib/cloudflare/user.js +7 -5
  271. package/lib/cloudflare/user.js.map +1 -1
  272. package/lib/cloudflare/vectorize-index.d.ts +2 -3
  273. package/lib/cloudflare/vectorize-index.d.ts.map +1 -1
  274. package/lib/cloudflare/vectorize-index.js +6 -6
  275. package/lib/cloudflare/vectorize-index.js.map +1 -1
  276. package/lib/cloudflare/vectorize-metadata-index.d.ts +2 -3
  277. package/lib/cloudflare/vectorize-metadata-index.d.ts.map +1 -1
  278. package/lib/cloudflare/vectorize-metadata-index.js +4 -4
  279. package/lib/cloudflare/vectorize-metadata-index.js.map +1 -1
  280. package/lib/cloudflare/vite/vite.d.ts.map +1 -1
  281. package/lib/cloudflare/vite/vite.js +3 -3
  282. package/lib/cloudflare/vite/vite.js.map +1 -1
  283. package/lib/cloudflare/website.d.ts +7 -1
  284. package/lib/cloudflare/website.d.ts.map +1 -1
  285. package/lib/cloudflare/website.js +20 -2
  286. package/lib/cloudflare/website.js.map +1 -1
  287. package/lib/cloudflare/worker-assets.d.ts +1 -29
  288. package/lib/cloudflare/worker-assets.d.ts.map +1 -1
  289. package/lib/cloudflare/worker-assets.js +9 -42
  290. package/lib/cloudflare/worker-assets.js.map +1 -1
  291. package/lib/cloudflare/worker-stub.d.ts +2 -3
  292. package/lib/cloudflare/worker-stub.d.ts.map +1 -1
  293. package/lib/cloudflare/worker-stub.js +3 -3
  294. package/lib/cloudflare/worker-stub.js.map +1 -1
  295. package/lib/cloudflare/worker-subdomain.d.ts +4 -3
  296. package/lib/cloudflare/worker-subdomain.d.ts.map +1 -1
  297. package/lib/cloudflare/worker-subdomain.js +5 -5
  298. package/lib/cloudflare/worker-subdomain.js.map +1 -1
  299. package/lib/cloudflare/worker.d.ts +3 -4
  300. package/lib/cloudflare/worker.d.ts.map +1 -1
  301. package/lib/cloudflare/worker.js +6 -5
  302. package/lib/cloudflare/worker.js.map +1 -1
  303. package/lib/cloudflare/wrangler.json.d.ts +27 -8
  304. package/lib/cloudflare/wrangler.json.d.ts.map +1 -1
  305. package/lib/cloudflare/wrangler.json.js +3 -1
  306. package/lib/cloudflare/wrangler.json.js.map +1 -1
  307. package/lib/cloudflare/zone.d.ts +1 -2
  308. package/lib/cloudflare/zone.d.ts.map +1 -1
  309. package/lib/cloudflare/zone.js +2 -2
  310. package/lib/cloudflare/zone.js.map +1 -1
  311. package/lib/context.d.ts +8 -8
  312. package/lib/context.d.ts.map +1 -1
  313. package/lib/context.js.map +1 -1
  314. package/lib/destroy.d.ts +1 -1
  315. package/lib/destroy.d.ts.map +1 -1
  316. package/lib/destroy.js.map +1 -1
  317. package/lib/dns/import-dns.d.ts +1 -2
  318. package/lib/dns/import-dns.d.ts.map +1 -1
  319. package/lib/dns/import-dns.js +2 -2
  320. package/lib/dns/import-dns.js.map +1 -1
  321. package/lib/docker/container.d.ts +1 -2
  322. package/lib/docker/container.d.ts.map +1 -1
  323. package/lib/docker/container.js +2 -3
  324. package/lib/docker/container.js.map +1 -1
  325. package/lib/docker/image.d.ts +1 -2
  326. package/lib/docker/image.d.ts.map +1 -1
  327. package/lib/docker/image.js +9 -9
  328. package/lib/docker/image.js.map +1 -1
  329. package/lib/docker/network.d.ts +1 -2
  330. package/lib/docker/network.d.ts.map +1 -1
  331. package/lib/docker/network.js +2 -3
  332. package/lib/docker/network.js.map +1 -1
  333. package/lib/docker/remote-image.d.ts +1 -2
  334. package/lib/docker/remote-image.d.ts.map +1 -1
  335. package/lib/docker/remote-image.js +2 -3
  336. package/lib/docker/remote-image.js.map +1 -1
  337. package/lib/docker/volume.d.ts +1 -2
  338. package/lib/docker/volume.d.ts.map +1 -1
  339. package/lib/docker/volume.js +2 -3
  340. package/lib/docker/volume.js.map +1 -1
  341. package/lib/esbuild/bundle.d.ts +1 -2
  342. package/lib/esbuild/bundle.d.ts.map +1 -1
  343. package/lib/esbuild/bundle.js +4 -4
  344. package/lib/esbuild/bundle.js.map +1 -1
  345. package/lib/fs/copy-file.d.ts +1 -2
  346. package/lib/fs/copy-file.d.ts.map +1 -1
  347. package/lib/fs/copy-file.js +2 -2
  348. package/lib/fs/copy-file.js.map +1 -1
  349. package/lib/fs/file.d.ts +1 -2
  350. package/lib/fs/file.d.ts.map +1 -1
  351. package/lib/fs/file.js +2 -2
  352. package/lib/fs/file.js.map +1 -1
  353. package/lib/fs/folder.d.ts +1 -2
  354. package/lib/fs/folder.d.ts.map +1 -1
  355. package/lib/fs/folder.js +2 -2
  356. package/lib/fs/folder.js.map +1 -1
  357. package/lib/github/comment.d.ts +1 -2
  358. package/lib/github/comment.d.ts.map +1 -1
  359. package/lib/github/comment.js +4 -4
  360. package/lib/github/comment.js.map +1 -1
  361. package/lib/github/repository-environment.d.ts +1 -2
  362. package/lib/github/repository-environment.d.ts.map +1 -1
  363. package/lib/github/repository-environment.js +2 -2
  364. package/lib/github/repository-environment.js.map +1 -1
  365. package/lib/github/repository-webhook.d.ts +1 -2
  366. package/lib/github/repository-webhook.d.ts.map +1 -1
  367. package/lib/github/repository-webhook.js +2 -2
  368. package/lib/github/repository-webhook.js.map +1 -1
  369. package/lib/github/secret.d.ts +1 -2
  370. package/lib/github/secret.d.ts.map +1 -1
  371. package/lib/github/secret.js +2 -2
  372. package/lib/github/secret.js.map +1 -1
  373. package/lib/llms.cloudflare.txt +2 -2
  374. package/lib/neon/api/client.gen.d.ts +13 -0
  375. package/lib/neon/api/client.gen.d.ts.map +1 -0
  376. package/lib/neon/api/client.gen.js +7 -0
  377. package/lib/neon/api/client.gen.js.map +1 -0
  378. package/lib/neon/api/sdk.gen.d.ts +880 -0
  379. package/lib/neon/api/sdk.gen.d.ts.map +1 -0
  380. package/lib/neon/api/sdk.gen.js +1527 -0
  381. package/lib/neon/api/sdk.gen.js.map +1 -0
  382. package/lib/neon/api/types.gen.d.ts +7250 -0
  383. package/lib/neon/api/types.gen.d.ts.map +1 -0
  384. package/lib/neon/api/types.gen.js +2 -0
  385. package/lib/neon/api/types.gen.js.map +1 -0
  386. package/lib/neon/api.d.ts +14 -49
  387. package/lib/neon/api.d.ts.map +1 -1
  388. package/lib/neon/api.js +36 -114
  389. package/lib/neon/api.js.map +1 -1
  390. package/lib/neon/branch.d.ts +157 -0
  391. package/lib/neon/branch.d.ts.map +1 -0
  392. package/lib/neon/branch.js +112 -0
  393. package/lib/neon/branch.js.map +1 -0
  394. package/lib/neon/index.d.ts +1 -1
  395. package/lib/neon/index.d.ts.map +1 -1
  396. package/lib/neon/index.js +1 -1
  397. package/lib/neon/index.js.map +1 -1
  398. package/lib/neon/project.d.ts +49 -243
  399. package/lib/neon/project.d.ts.map +1 -1
  400. package/lib/neon/project.js +90 -269
  401. package/lib/neon/project.js.map +1 -1
  402. package/lib/neon/utils.d.ts +49 -0
  403. package/lib/neon/utils.d.ts.map +1 -0
  404. package/lib/neon/utils.js +44 -0
  405. package/lib/neon/utils.js.map +1 -0
  406. package/lib/os/exec.d.ts +1 -2
  407. package/lib/os/exec.d.ts.map +1 -1
  408. package/lib/os/exec.js +2 -2
  409. package/lib/os/exec.js.map +1 -1
  410. package/lib/planetscale/api/client.gen.d.ts +12 -1749
  411. package/lib/planetscale/api/client.gen.d.ts.map +1 -1
  412. package/lib/planetscale/api/client.gen.js +6 -2400
  413. package/lib/planetscale/api/client.gen.js.map +1 -1
  414. package/lib/planetscale/api/sdk.gen.d.ts +1582 -0
  415. package/lib/planetscale/api/sdk.gen.d.ts.map +1 -0
  416. package/lib/planetscale/api/sdk.gen.js +2219 -0
  417. package/lib/planetscale/api/sdk.gen.js.map +1 -0
  418. package/lib/planetscale/api/types.gen.d.ts +594 -449
  419. package/lib/planetscale/api/types.gen.d.ts.map +1 -1
  420. package/lib/planetscale/api.d.ts +43 -0
  421. package/lib/planetscale/api.d.ts.map +1 -0
  422. package/lib/planetscale/api.js +53 -0
  423. package/lib/planetscale/api.js.map +1 -0
  424. package/lib/planetscale/branch.d.ts +2 -3
  425. package/lib/planetscale/branch.d.ts.map +1 -1
  426. package/lib/planetscale/branch.js +17 -15
  427. package/lib/planetscale/branch.js.map +1 -1
  428. package/lib/planetscale/database.d.ts +2 -3
  429. package/lib/planetscale/database.d.ts.map +1 -1
  430. package/lib/planetscale/database.js +34 -34
  431. package/lib/planetscale/database.js.map +1 -1
  432. package/lib/planetscale/index.d.ts +1 -1
  433. package/lib/planetscale/index.d.ts.map +1 -1
  434. package/lib/planetscale/index.js +1 -1
  435. package/lib/planetscale/index.js.map +1 -1
  436. package/lib/planetscale/password.d.ts +2 -3
  437. package/lib/planetscale/password.d.ts.map +1 -1
  438. package/lib/planetscale/password.js +11 -11
  439. package/lib/planetscale/password.js.map +1 -1
  440. package/lib/planetscale/role.d.ts +2 -3
  441. package/lib/planetscale/role.d.ts.map +1 -1
  442. package/lib/planetscale/role.js +18 -18
  443. package/lib/planetscale/role.js.map +1 -1
  444. package/lib/planetscale/utils.d.ts +1 -1
  445. package/lib/planetscale/utils.d.ts.map +1 -1
  446. package/lib/planetscale/utils.js +17 -33
  447. package/lib/planetscale/utils.js.map +1 -1
  448. package/lib/random/random-string.d.ts +1 -2
  449. package/lib/random/random-string.d.ts.map +1 -1
  450. package/lib/random/random-string.js +3 -3
  451. package/lib/random/random-string.js.map +1 -1
  452. package/lib/resource.d.ts +4 -1
  453. package/lib/resource.d.ts.map +1 -1
  454. package/lib/resource.js.map +1 -1
  455. package/lib/sentry/client-key.d.ts +1 -2
  456. package/lib/sentry/client-key.d.ts.map +1 -1
  457. package/lib/sentry/client-key.js +2 -2
  458. package/lib/sentry/client-key.js.map +1 -1
  459. package/lib/sentry/project.d.ts +1 -2
  460. package/lib/sentry/project.d.ts.map +1 -1
  461. package/lib/sentry/project.js +2 -2
  462. package/lib/sentry/project.js.map +1 -1
  463. package/lib/sentry/team.d.ts +1 -2
  464. package/lib/sentry/team.d.ts.map +1 -1
  465. package/lib/sentry/team.js +2 -2
  466. package/lib/sentry/team.js.map +1 -1
  467. package/lib/serde.d.ts +3 -0
  468. package/lib/serde.d.ts.map +1 -1
  469. package/lib/serde.js +40 -0
  470. package/lib/serde.js.map +1 -1
  471. package/lib/state/r2-rest-state-store.d.ts +1 -0
  472. package/lib/state/r2-rest-state-store.d.ts.map +1 -1
  473. package/lib/state/r2-rest-state-store.js +15 -34
  474. package/lib/state/r2-rest-state-store.js.map +1 -1
  475. package/lib/stripe/card.d.ts +1 -2
  476. package/lib/stripe/card.d.ts.map +1 -1
  477. package/lib/stripe/card.js +2 -2
  478. package/lib/stripe/card.js.map +1 -1
  479. package/lib/stripe/coupon.d.ts +1 -2
  480. package/lib/stripe/coupon.d.ts.map +1 -1
  481. package/lib/stripe/coupon.js +2 -2
  482. package/lib/stripe/coupon.js.map +1 -1
  483. package/lib/stripe/customer.d.ts +1 -2
  484. package/lib/stripe/customer.d.ts.map +1 -1
  485. package/lib/stripe/customer.js +2 -2
  486. package/lib/stripe/customer.js.map +1 -1
  487. package/lib/stripe/entitlements-feature.d.ts +1 -2
  488. package/lib/stripe/entitlements-feature.d.ts.map +1 -1
  489. package/lib/stripe/entitlements-feature.js +2 -2
  490. package/lib/stripe/entitlements-feature.js.map +1 -1
  491. package/lib/stripe/file.d.ts +1 -2
  492. package/lib/stripe/file.d.ts.map +1 -1
  493. package/lib/stripe/file.js +2 -2
  494. package/lib/stripe/file.js.map +1 -1
  495. package/lib/stripe/meter.d.ts +1 -2
  496. package/lib/stripe/meter.d.ts.map +1 -1
  497. package/lib/stripe/meter.js +1 -1
  498. package/lib/stripe/meter.js.map +1 -1
  499. package/lib/stripe/portal-configuration.d.ts +1 -2
  500. package/lib/stripe/portal-configuration.d.ts.map +1 -1
  501. package/lib/stripe/portal-configuration.js +2 -2
  502. package/lib/stripe/portal-configuration.js.map +1 -1
  503. package/lib/stripe/price.d.ts +1 -2
  504. package/lib/stripe/price.d.ts.map +1 -1
  505. package/lib/stripe/price.js +2 -2
  506. package/lib/stripe/price.js.map +1 -1
  507. package/lib/stripe/product-feature.d.ts +1 -2
  508. package/lib/stripe/product-feature.d.ts.map +1 -1
  509. package/lib/stripe/product-feature.js +2 -2
  510. package/lib/stripe/product-feature.js.map +1 -1
  511. package/lib/stripe/product.d.ts +1 -2
  512. package/lib/stripe/product.d.ts.map +1 -1
  513. package/lib/stripe/product.js +2 -2
  514. package/lib/stripe/product.js.map +1 -1
  515. package/lib/stripe/promotion-code.d.ts +1 -2
  516. package/lib/stripe/promotion-code.d.ts.map +1 -1
  517. package/lib/stripe/promotion-code.js +2 -2
  518. package/lib/stripe/promotion-code.js.map +1 -1
  519. package/lib/stripe/shipping-rate.d.ts +1 -2
  520. package/lib/stripe/shipping-rate.d.ts.map +1 -1
  521. package/lib/stripe/shipping-rate.js +2 -2
  522. package/lib/stripe/shipping-rate.js.map +1 -1
  523. package/lib/stripe/tax-rate.d.ts +1 -2
  524. package/lib/stripe/tax-rate.d.ts.map +1 -1
  525. package/lib/stripe/tax-rate.js +2 -2
  526. package/lib/stripe/tax-rate.js.map +1 -1
  527. package/lib/stripe/webhook.d.ts +16 -3
  528. package/lib/stripe/webhook.d.ts.map +1 -1
  529. package/lib/stripe/webhook.js +2 -2
  530. package/lib/stripe/webhook.js.map +1 -1
  531. package/lib/test/bun.d.ts.map +1 -1
  532. package/lib/test/bun.js +1 -0
  533. package/lib/test/bun.js.map +1 -1
  534. package/lib/test/options.d.ts +5 -0
  535. package/lib/test/options.d.ts.map +1 -1
  536. package/lib/test/vitest.d.ts.map +1 -1
  537. package/lib/test/vitest.js +1 -0
  538. package/lib/test/vitest.js.map +1 -1
  539. package/lib/upstash/redis.d.ts +1 -2
  540. package/lib/upstash/redis.d.ts.map +1 -1
  541. package/lib/upstash/redis.js.map +1 -1
  542. package/lib/util/api/client/client.gen.d.ts +3 -0
  543. package/lib/util/api/client/client.gen.d.ts.map +1 -0
  544. package/lib/util/api/client/client.gen.js +205 -0
  545. package/lib/util/api/client/client.gen.js.map +1 -0
  546. package/lib/util/api/client/index.d.ts +8 -0
  547. package/lib/util/api/client/index.d.ts.map +1 -0
  548. package/lib/util/api/client/index.js +6 -0
  549. package/lib/util/api/client/index.js.map +1 -0
  550. package/lib/util/api/client/types.gen.d.ts +125 -0
  551. package/lib/util/api/client/types.gen.d.ts.map +1 -0
  552. package/lib/util/api/client/types.gen.js +2 -0
  553. package/lib/util/api/client/types.gen.js.map +1 -0
  554. package/lib/util/api/client/utils.gen.d.ts +34 -0
  555. package/lib/util/api/client/utils.gen.d.ts.map +1 -0
  556. package/lib/util/api/client/utils.gen.js +231 -0
  557. package/lib/util/api/client/utils.gen.js.map +1 -0
  558. package/lib/util/api/core/auth.gen.d.ts +19 -0
  559. package/lib/util/api/core/auth.gen.d.ts.map +1 -0
  560. package/lib/util/api/core/auth.gen.js +15 -0
  561. package/lib/util/api/core/auth.gen.js.map +1 -0
  562. package/lib/util/api/core/bodySerializer.gen.d.ts +18 -0
  563. package/lib/util/api/core/bodySerializer.gen.d.ts.map +1 -0
  564. package/lib/util/api/core/bodySerializer.gen.js +58 -0
  565. package/lib/util/api/core/bodySerializer.gen.js.map +1 -0
  566. package/lib/util/api/core/params.gen.d.ts +34 -0
  567. package/lib/util/api/core/params.gen.d.ts.map +1 -0
  568. package/lib/util/api/core/params.gen.js +89 -0
  569. package/lib/util/api/core/params.gen.js.map +1 -0
  570. package/lib/util/api/core/pathSerializer.gen.d.ts +34 -0
  571. package/lib/util/api/core/pathSerializer.gen.d.ts.map +1 -0
  572. package/lib/util/api/core/pathSerializer.gen.js +115 -0
  573. package/lib/util/api/core/pathSerializer.gen.js.map +1 -0
  574. package/lib/util/api/core/serverSentEvents.gen.d.ts +72 -0
  575. package/lib/util/api/core/serverSentEvents.gen.d.ts.map +1 -0
  576. package/lib/util/api/core/serverSentEvents.gen.js +136 -0
  577. package/lib/util/api/core/serverSentEvents.gen.js.map +1 -0
  578. package/lib/util/api/core/types.gen.d.ts +79 -0
  579. package/lib/util/api/core/types.gen.d.ts.map +1 -0
  580. package/lib/util/api/core/types.gen.js +2 -0
  581. package/lib/util/api/core/types.gen.js.map +1 -0
  582. package/lib/util/api/core/utils.gen.d.ts +20 -0
  583. package/lib/util/api/core/utils.gen.d.ts.map +1 -0
  584. package/lib/util/api/core/utils.gen.js +88 -0
  585. package/lib/util/api/core/utils.gen.js.map +1 -0
  586. package/lib/util/http.d.ts +7 -2
  587. package/lib/util/http.d.ts.map +1 -1
  588. package/lib/util/http.js +29 -11
  589. package/lib/util/http.js.map +1 -1
  590. package/lib/util/lock.d.ts +20 -0
  591. package/lib/util/lock.d.ts.map +1 -0
  592. package/lib/util/lock.js +45 -0
  593. package/lib/util/lock.js.map +1 -0
  594. package/lib/util/memoize.d.ts +6 -0
  595. package/lib/util/memoize.d.ts.map +1 -1
  596. package/lib/util/memoize.js +23 -0
  597. package/lib/util/memoize.js.map +1 -1
  598. package/lib/util/oauth-client.d.ts +71 -0
  599. package/lib/util/oauth-client.d.ts.map +1 -0
  600. package/lib/util/oauth-client.js +188 -0
  601. package/lib/util/oauth-client.js.map +1 -0
  602. package/lib/util/poll.d.ts +33 -0
  603. package/lib/util/poll.d.ts.map +1 -0
  604. package/lib/util/poll.js +19 -0
  605. package/lib/util/poll.js.map +1 -0
  606. package/lib/vercel/project-domain.d.ts +1 -2
  607. package/lib/vercel/project-domain.d.ts.map +1 -1
  608. package/lib/vercel/project-domain.js.map +1 -1
  609. package/lib/vercel/project.d.ts +1 -2
  610. package/lib/vercel/project.d.ts.map +1 -1
  611. package/lib/vercel/project.js +2 -2
  612. package/lib/vercel/project.js.map +1 -1
  613. package/package.json +5 -1
  614. package/src/apply.ts +32 -29
  615. package/src/auth.ts +253 -0
  616. package/src/aws/bucket.ts +3 -3
  617. package/src/aws/control/properties.ts +554 -39
  618. package/src/aws/control/resource.ts +62 -6
  619. package/src/aws/control/types.ts +85281 -84914
  620. package/src/aws/control/update-types.ts +12917 -0
  621. package/src/aws/ec2/internet-gateway-attachment.ts +5 -6
  622. package/src/aws/ec2/internet-gateway.ts +3 -5
  623. package/src/aws/ec2/nat-gateway.ts +3 -5
  624. package/src/aws/ec2/route-table-association.ts +3 -5
  625. package/src/aws/ec2/route-table.ts +3 -5
  626. package/src/aws/ec2/route.ts +3 -3
  627. package/src/aws/ec2/security-group-rule.ts +3 -5
  628. package/src/aws/ec2/security-group.ts +3 -5
  629. package/src/aws/ec2/subnet.ts +3 -3
  630. package/src/aws/ec2/vpc.ts +3 -3
  631. package/src/aws/function.ts +3 -3
  632. package/src/aws/oidc/oidc-provider.ts +3 -5
  633. package/src/aws/policy-attachment.ts +2 -4
  634. package/src/aws/policy.ts +5 -5
  635. package/src/aws/queue.ts +5 -5
  636. package/src/aws/role.ts +3 -3
  637. package/src/aws/ses.ts +3 -3
  638. package/src/aws/ssm-parameter.ts +3 -3
  639. package/src/aws/table.ts +3 -3
  640. package/src/cloudflare/account-api-token.ts +3 -4
  641. package/src/cloudflare/ai-gateway.ts +3 -5
  642. package/src/cloudflare/api-gateway-operation.ts +3 -4
  643. package/src/cloudflare/api-schema.ts +25 -26
  644. package/src/cloudflare/api-shield.ts +3 -4
  645. package/src/cloudflare/api.ts +121 -57
  646. package/src/cloudflare/assets.ts +95 -136
  647. package/src/cloudflare/astro/astro.ts +8 -3
  648. package/src/cloudflare/auth.ts +160 -95
  649. package/src/cloudflare/bound.ts +1 -1
  650. package/src/cloudflare/bucket-object.ts +117 -0
  651. package/src/cloudflare/bucket.ts +452 -55
  652. package/src/cloudflare/bundle/plugin-wasm.ts +5 -5
  653. package/src/cloudflare/certificate-pack.ts +5 -6
  654. package/src/cloudflare/compatibility-date.gen.ts +1 -1
  655. package/src/cloudflare/container.ts +9 -11
  656. package/src/cloudflare/custom-domain.ts +3 -5
  657. package/src/cloudflare/d1-database.ts +33 -34
  658. package/src/cloudflare/dispatch-namespace.ts +5 -6
  659. package/src/cloudflare/dns-records.ts +5 -5
  660. package/src/cloudflare/email-address.ts +7 -7
  661. package/src/cloudflare/email-catch-all.ts +6 -6
  662. package/src/cloudflare/email-routing.ts +5 -5
  663. package/src/cloudflare/email-rule.ts +5 -5
  664. package/src/cloudflare/hyperdrive.ts +35 -36
  665. package/src/cloudflare/index.ts +1 -0
  666. package/src/cloudflare/kv-namespace.ts +31 -32
  667. package/src/cloudflare/miniflare/delete.ts +1 -1
  668. package/src/cloudflare/miniflare/miniflare-worker-proxy.ts +2 -7
  669. package/src/cloudflare/miniflare/remote-binding-proxy.ts +16 -4
  670. package/src/cloudflare/next.ts +2 -2
  671. package/src/cloudflare/nuxt/nuxt.ts +8 -3
  672. package/src/cloudflare/permission-groups.ts +4 -6
  673. package/src/cloudflare/pipeline.ts +29 -30
  674. package/src/cloudflare/queue-consumer.ts +5 -7
  675. package/src/cloudflare/queue.ts +42 -43
  676. package/src/cloudflare/react-router/plugin.ts +20 -0
  677. package/src/cloudflare/redirect-rule.ts +5 -5
  678. package/src/cloudflare/route.ts +5 -5
  679. package/src/cloudflare/ruleset.ts +3 -4
  680. package/src/cloudflare/secret.ts +35 -36
  681. package/src/cloudflare/secrets-store.ts +5 -8
  682. package/src/cloudflare/tunnel.ts +5 -7
  683. package/src/cloudflare/user.ts +12 -9
  684. package/src/cloudflare/vectorize-index.ts +8 -12
  685. package/src/cloudflare/vectorize-metadata-index.ts +6 -8
  686. package/src/cloudflare/vite/vite.ts +8 -3
  687. package/src/cloudflare/website.ts +29 -3
  688. package/src/cloudflare/worker-assets.ts +10 -56
  689. package/src/cloudflare/worker-stub.ts +5 -5
  690. package/src/cloudflare/worker-subdomain.ts +6 -7
  691. package/src/cloudflare/worker.ts +91 -91
  692. package/src/cloudflare/wrangler.json.ts +32 -17
  693. package/src/cloudflare/zone.ts +3 -3
  694. package/src/context.ts +9 -7
  695. package/src/destroy.ts +2 -2
  696. package/src/dns/import-dns.ts +3 -5
  697. package/src/docker/container.ts +3 -6
  698. package/src/docker/image.ts +13 -13
  699. package/src/docker/network.ts +3 -4
  700. package/src/docker/remote-image.ts +3 -6
  701. package/src/docker/volume.ts +3 -4
  702. package/src/esbuild/bundle.ts +10 -8
  703. package/src/fs/copy-file.ts +3 -3
  704. package/src/fs/file.ts +3 -3
  705. package/src/fs/folder.ts +3 -3
  706. package/src/github/comment.ts +5 -7
  707. package/src/github/repository-environment.ts +3 -5
  708. package/src/github/repository-webhook.ts +3 -5
  709. package/src/github/secret.ts +3 -5
  710. package/src/llms.cloudflare.txt +2 -2
  711. package/src/neon/api/client.gen.ts +28 -0
  712. package/src/neon/api/sdk.gen.ts +2596 -0
  713. package/src/neon/api/types.gen.ts +8287 -0
  714. package/src/neon/api.ts +51 -147
  715. package/src/neon/branch.ts +279 -0
  716. package/src/neon/index.ts +1 -1
  717. package/src/neon/project.ts +136 -721
  718. package/src/neon/utils.ts +105 -0
  719. package/src/os/exec.ts +3 -3
  720. package/src/planetscale/api/client.gen.ts +28 -2882
  721. package/src/planetscale/api/sdk.gen.ts +3336 -0
  722. package/src/planetscale/api/types.gen.ts +778 -450
  723. package/src/planetscale/api.ts +101 -0
  724. package/src/planetscale/branch.ts +20 -19
  725. package/src/planetscale/database.ts +69 -70
  726. package/src/planetscale/index.ts +1 -1
  727. package/src/planetscale/password.ts +18 -22
  728. package/src/planetscale/role.ts +21 -21
  729. package/src/planetscale/utils.ts +20 -74
  730. package/src/random/random-string.ts +4 -4
  731. package/src/resource.ts +6 -2
  732. package/src/sentry/client-key.ts +3 -5
  733. package/src/sentry/project.ts +3 -5
  734. package/src/sentry/team.ts +3 -3
  735. package/src/serde.ts +50 -0
  736. package/src/state/r2-rest-state-store.ts +15 -57
  737. package/src/stripe/card.ts +3 -3
  738. package/src/stripe/coupon.ts +3 -3
  739. package/src/stripe/customer.ts +3 -3
  740. package/src/stripe/entitlements-feature.ts +3 -5
  741. package/src/stripe/file.ts +3 -3
  742. package/src/stripe/meter.ts +3 -3
  743. package/src/stripe/portal-configuration.ts +3 -5
  744. package/src/stripe/price.ts +3 -3
  745. package/src/stripe/product-feature.ts +3 -5
  746. package/src/stripe/product.ts +3 -3
  747. package/src/stripe/promotion-code.ts +3 -5
  748. package/src/stripe/shipping-rate.ts +3 -5
  749. package/src/stripe/tax-rate.ts +3 -3
  750. package/src/stripe/webhook.ts +3 -5
  751. package/src/test/bun.ts +2 -1
  752. package/src/test/options.ts +6 -0
  753. package/src/test/vitest.ts +1 -0
  754. package/src/upstash/redis.ts +1 -3
  755. package/src/util/api/client/client.gen.ts +268 -0
  756. package/src/util/api/client/index.ts +25 -0
  757. package/src/util/api/client/types.gen.ts +268 -0
  758. package/src/util/api/client/utils.gen.ts +331 -0
  759. package/src/util/api/core/auth.gen.ts +42 -0
  760. package/src/util/api/core/bodySerializer.gen.ts +92 -0
  761. package/src/util/api/core/params.gen.ts +153 -0
  762. package/src/util/api/core/pathSerializer.gen.ts +181 -0
  763. package/src/util/api/core/serverSentEvents.gen.ts +264 -0
  764. package/src/util/api/core/types.gen.ts +118 -0
  765. package/src/util/api/core/utils.gen.ts +143 -0
  766. package/src/util/http.ts +38 -11
  767. package/src/util/lock.ts +48 -0
  768. package/src/util/memoize.ts +26 -0
  769. package/src/util/oauth-client.ts +238 -0
  770. package/src/util/poll.ts +55 -0
  771. package/src/vercel/project-domain.ts +1 -3
  772. package/src/vercel/project.ts +3 -3
  773. package/templates/rwsdk/.cursor/rules/alchemy_cloudflare.mdc +2 -2
  774. package/workers/cloudflare-state-store.js +8 -5619
  775. package/workers/dofs-state-store.js +2 -802
  776. package/workers/remote-binding-proxy.js +3 -39
  777. package/workers/remote-binding-proxy.ts +126 -35
  778. package/workers/tunnel-proxy.js +6 -73
  779. package/lib/cloudflare/asset-manifest.d.ts +0 -15
  780. package/lib/cloudflare/asset-manifest.d.ts.map +0 -1
  781. package/lib/cloudflare/asset-manifest.js +0 -1
  782. package/lib/cloudflare/asset-manifest.js.map +0 -1
  783. package/lib/cloudflare/oauth.d.ts +0 -22
  784. package/lib/cloudflare/oauth.d.ts.map +0 -1
  785. package/lib/cloudflare/oauth.js +0 -214
  786. package/lib/cloudflare/oauth.js.map +0 -1
  787. package/lib/neon/api-error.d.ts +0 -31
  788. package/lib/neon/api-error.d.ts.map +0 -1
  789. package/lib/neon/api-error.js +0 -73
  790. package/lib/neon/api-error.js.map +0 -1
  791. package/lib/planetscale/api/index.d.ts +0 -3
  792. package/lib/planetscale/api/index.d.ts.map +0 -1
  793. package/lib/planetscale/api/index.js +0 -4
  794. package/lib/planetscale/api/index.js.map +0 -1
  795. package/lib/util/neverthrow.d.ts +0 -16
  796. package/lib/util/neverthrow.d.ts.map +0 -1
  797. package/lib/util/neverthrow.js +0 -46
  798. package/lib/util/neverthrow.js.map +0 -1
  799. package/src/cloudflare/asset-manifest.ts +0 -16
  800. package/src/cloudflare/oauth.ts +0 -301
  801. package/src/neon/api-error.ts +0 -81
  802. package/src/planetscale/api/index.ts +0 -4
  803. package/src/util/neverthrow.ts +0 -64
@@ -0,0 +1,3336 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ import type {
4
+ Client,
5
+ Options as Options2,
6
+ TDataShape,
7
+ } from "../../util/api/client/index.ts";
8
+ import { client } from "./client.gen.ts";
9
+ import type {
10
+ CancelBranchChangeRequestData,
11
+ CancelBranchChangeRequestErrors,
12
+ CancelBranchChangeRequestResponses,
13
+ CancelDeployRequestData,
14
+ CancelDeployRequestErrors,
15
+ CancelDeployRequestResponses,
16
+ CloseDeployRequestData,
17
+ CloseDeployRequestErrors,
18
+ CloseDeployRequestResponses,
19
+ CompleteErroredDeployData,
20
+ CompleteErroredDeployErrors,
21
+ CompleteErroredDeployResponses,
22
+ CompleteGatedDeployRequestData,
23
+ CompleteGatedDeployRequestErrors,
24
+ CompleteGatedDeployRequestResponses,
25
+ CompleteRevertData,
26
+ CompleteRevertErrors,
27
+ CompleteRevertResponses,
28
+ CreateBackupData,
29
+ CreateBackupErrors,
30
+ CreateBackupResponses,
31
+ CreateBranchData,
32
+ CreateBranchErrors,
33
+ CreateBranchResponses,
34
+ CreateDatabaseData,
35
+ CreateDatabaseErrors,
36
+ CreateDatabaseResponses,
37
+ CreateDeployRequestData,
38
+ CreateDeployRequestErrors,
39
+ CreateDeployRequestResponses,
40
+ CreateKeyspaceData,
41
+ CreateKeyspaceErrors,
42
+ CreateKeyspaceResponses,
43
+ CreateOauthTokenData,
44
+ CreateOauthTokenErrors,
45
+ CreateOauthTokenResponses,
46
+ CreatePasswordData,
47
+ CreatePasswordErrors,
48
+ CreatePasswordResponses,
49
+ CreateQueryPatternsReportData,
50
+ CreateQueryPatternsReportErrors,
51
+ CreateQueryPatternsReportResponses,
52
+ CreateRoleData,
53
+ CreateRoleErrors,
54
+ CreateRoleResponses,
55
+ CreateWebhookData,
56
+ CreateWebhookErrors,
57
+ CreateWebhookResponses,
58
+ CreateWorkflowData,
59
+ CreateWorkflowErrors,
60
+ CreateWorkflowResponses,
61
+ DeleteBackupData,
62
+ DeleteBackupErrors,
63
+ DeleteBackupResponses,
64
+ DeleteBranchData,
65
+ DeleteBranchErrors,
66
+ DeleteBranchResponses,
67
+ DeleteDatabaseData,
68
+ DeleteDatabaseErrors,
69
+ DeleteDatabaseResponses,
70
+ DeleteKeyspaceData,
71
+ DeleteKeyspaceErrors,
72
+ DeleteKeyspaceResponses,
73
+ DeleteOauthTokenData,
74
+ DeleteOauthTokenErrors,
75
+ DeleteOauthTokenResponses,
76
+ DeletePasswordData,
77
+ DeletePasswordErrors,
78
+ DeletePasswordResponses,
79
+ DeleteQueryPatternsReportData,
80
+ DeleteQueryPatternsReportErrors,
81
+ DeleteQueryPatternsReportResponses,
82
+ DeleteRoleData,
83
+ DeleteRoleErrors,
84
+ DeleteRoleResponses,
85
+ DeleteWebhookData,
86
+ DeleteWebhookErrors,
87
+ DeleteWebhookResponses,
88
+ DemoteBranchData,
89
+ DemoteBranchErrors,
90
+ DemoteBranchResponses,
91
+ DisableSafeMigrationsData,
92
+ DisableSafeMigrationsErrors,
93
+ DisableSafeMigrationsResponses,
94
+ EnableSafeMigrationsData,
95
+ EnableSafeMigrationsErrors,
96
+ EnableSafeMigrationsResponses,
97
+ GetBackupData,
98
+ GetBackupErrors,
99
+ GetBackupResponses,
100
+ GetBranchData,
101
+ GetBranchErrors,
102
+ GetBranchResponses,
103
+ GetBranchSchemaData,
104
+ GetBranchSchemaErrors,
105
+ GetBranchSchemaResponses,
106
+ GetCurrentUserData,
107
+ GetCurrentUserErrors,
108
+ GetCurrentUserResponses,
109
+ GetDatabaseData,
110
+ GetDatabaseErrors,
111
+ GetDatabaseResponses,
112
+ GetDatabaseThrottlerData,
113
+ GetDatabaseThrottlerErrors,
114
+ GetDatabaseThrottlerResponses,
115
+ GetDeploymentData,
116
+ GetDeploymentErrors,
117
+ GetDeploymentResponses,
118
+ GetDeployQueueData,
119
+ GetDeployQueueErrors,
120
+ GetDeployQueueResponses,
121
+ GetDeployRequestData,
122
+ GetDeployRequestErrors,
123
+ GetDeployRequestResponses,
124
+ GetDeployRequestThrottlerData,
125
+ GetDeployRequestThrottlerErrors,
126
+ GetDeployRequestThrottlerResponses,
127
+ GetInvoiceData,
128
+ GetInvoiceErrors,
129
+ GetInvoiceLineItemsData,
130
+ GetInvoiceLineItemsErrors,
131
+ GetInvoiceLineItemsResponses,
132
+ GetInvoiceResponses,
133
+ GetKeyspaceData,
134
+ GetKeyspaceErrors,
135
+ GetKeyspaceResponses,
136
+ GetKeyspaceRolloutStatusData,
137
+ GetKeyspaceRolloutStatusErrors,
138
+ GetKeyspaceRolloutStatusResponses,
139
+ GetKeyspaceVschemaData,
140
+ GetKeyspaceVschemaErrors,
141
+ GetKeyspaceVschemaResponses,
142
+ GetOauthApplicationData,
143
+ GetOauthApplicationErrors,
144
+ GetOauthApplicationResponses,
145
+ GetOauthTokenData,
146
+ GetOauthTokenErrors,
147
+ GetOauthTokenResponses,
148
+ GetOrganizationData,
149
+ GetOrganizationErrors,
150
+ GetOrganizationResponses,
151
+ GetPasswordData,
152
+ GetPasswordErrors,
153
+ GetPasswordResponses,
154
+ GetQueryPatternsReportData,
155
+ GetQueryPatternsReportErrors,
156
+ GetQueryPatternsReportStatusData,
157
+ GetQueryPatternsReportStatusErrors,
158
+ GetQueryPatternsReportStatusResponses,
159
+ GetRoleData,
160
+ GetRoleErrors,
161
+ GetRoleResponses,
162
+ GetWebhookData,
163
+ GetWebhookErrors,
164
+ GetWebhookResponses,
165
+ GetWorkflowData,
166
+ GetWorkflowErrors,
167
+ GetWorkflowResponses,
168
+ LintBranchSchemaData,
169
+ LintBranchSchemaErrors,
170
+ LintBranchSchemaResponses,
171
+ ListAuditLogsData,
172
+ ListAuditLogsErrors,
173
+ ListAuditLogsResponses,
174
+ ListBackupsData,
175
+ ListBackupsErrors,
176
+ ListBackupsResponses,
177
+ ListBranchChangeRequestsData,
178
+ ListBranchChangeRequestsErrors,
179
+ ListBranchChangeRequestsResponses,
180
+ ListBranchesData,
181
+ ListBranchesErrors,
182
+ ListBranchesResponses,
183
+ ListDatabaseRegionsData,
184
+ ListDatabaseRegionsErrors,
185
+ ListDatabaseRegionsResponses,
186
+ ListDatabasesData,
187
+ ListDatabasesErrors,
188
+ ListDatabasesResponses,
189
+ ListDeployOperationsData,
190
+ ListDeployOperationsErrors,
191
+ ListDeployOperationsResponses,
192
+ ListDeployRequestReviewsData,
193
+ ListDeployRequestReviewsErrors,
194
+ ListDeployRequestReviewsResponses,
195
+ ListDeployRequestsData,
196
+ ListDeployRequestsErrors,
197
+ ListDeployRequestsResponses,
198
+ ListExtensionsData,
199
+ ListExtensionsErrors,
200
+ ListExtensionsResponses,
201
+ ListGeneratedQueryPatternsReportsData,
202
+ ListGeneratedQueryPatternsReportsErrors,
203
+ ListGeneratedQueryPatternsReportsResponses,
204
+ ListInvoicesData,
205
+ ListInvoicesErrors,
206
+ ListInvoicesResponses,
207
+ ListKeyspaceResizesData,
208
+ ListKeyspaceResizesErrors,
209
+ ListKeyspaceResizesResponses,
210
+ ListKeyspacesData,
211
+ ListKeyspacesErrors,
212
+ ListKeyspacesResponses,
213
+ ListOauthApplicationsData,
214
+ ListOauthApplicationsErrors,
215
+ ListOauthApplicationsResponses,
216
+ ListOauthTokensData,
217
+ ListOauthTokensErrors,
218
+ ListOauthTokensResponses,
219
+ ListOrganizationMembersData,
220
+ ListOrganizationMembersErrors,
221
+ ListOrganizationMembersResponses,
222
+ ListOrganizationsData,
223
+ ListOrganizationsErrors,
224
+ ListOrganizationsResponses,
225
+ ListParametersData,
226
+ ListParametersErrors,
227
+ ListParametersResponses,
228
+ ListPasswordsData,
229
+ ListPasswordsErrors,
230
+ ListPasswordsResponses,
231
+ ListPublicRegionsData,
232
+ ListPublicRegionsErrors,
233
+ ListPublicRegionsResponses,
234
+ ListReadOnlyRegionsData,
235
+ ListReadOnlyRegionsErrors,
236
+ ListReadOnlyRegionsResponses,
237
+ ListRegionsForOrganizationData,
238
+ ListRegionsForOrganizationErrors,
239
+ ListRegionsForOrganizationResponses,
240
+ ListRolesData,
241
+ ListRolesErrors,
242
+ ListRolesResponses,
243
+ ListWebhooksData,
244
+ ListWebhooksErrors,
245
+ ListWebhooksResponses,
246
+ ListWorkflowsData,
247
+ ListWorkflowsErrors,
248
+ ListWorkflowsResponses,
249
+ PromoteBranchData,
250
+ PromoteBranchErrors,
251
+ PromoteBranchResponses,
252
+ QueueDeployRequestData,
253
+ QueueDeployRequestErrors,
254
+ QueueDeployRequestResponses,
255
+ RenewPasswordData,
256
+ RenewPasswordErrors,
257
+ RenewPasswordResponses,
258
+ RenewRoleData,
259
+ RenewRoleErrors,
260
+ RenewRoleResponses,
261
+ ReviewDeployRequestData,
262
+ ReviewDeployRequestErrors,
263
+ ReviewDeployRequestResponses,
264
+ SkipRevertPeriodData,
265
+ SkipRevertPeriodErrors,
266
+ SkipRevertPeriodResponses,
267
+ TestWebhookData,
268
+ TestWebhookErrors,
269
+ TestWebhookResponses,
270
+ UpdateAutoApplyData,
271
+ UpdateAutoApplyErrors,
272
+ UpdateAutoApplyResponses,
273
+ UpdateBackupData,
274
+ UpdateBackupErrors,
275
+ UpdateBackupResponses,
276
+ UpdateBranchChangeRequestData,
277
+ UpdateBranchChangeRequestErrors,
278
+ UpdateBranchChangeRequestResponses,
279
+ UpdateBranchClusterConfigData,
280
+ UpdateBranchClusterConfigErrors,
281
+ UpdateBranchClusterConfigResponses,
282
+ UpdateDatabaseSettingsData,
283
+ UpdateDatabaseSettingsErrors,
284
+ UpdateDatabaseSettingsResponses,
285
+ UpdateDatabaseThrottlerData,
286
+ UpdateDatabaseThrottlerErrors,
287
+ UpdateDatabaseThrottlerResponses,
288
+ UpdateDeployRequestThrottlerData,
289
+ UpdateDeployRequestThrottlerErrors,
290
+ UpdateDeployRequestThrottlerResponses,
291
+ UpdateKeyspaceData,
292
+ UpdateKeyspaceErrors,
293
+ UpdateKeyspaceResponses,
294
+ UpdateKeyspaceVschemaData,
295
+ UpdateKeyspaceVschemaErrors,
296
+ UpdateKeyspaceVschemaResponses,
297
+ UpdateOrganizationData,
298
+ UpdateOrganizationErrors,
299
+ UpdateOrganizationResponses,
300
+ UpdatePasswordData,
301
+ UpdatePasswordErrors,
302
+ UpdatePasswordResponses,
303
+ UpdateRoleData,
304
+ UpdateRoleErrors,
305
+ UpdateRoleResponses,
306
+ UpdateWebhookData,
307
+ UpdateWebhookErrors,
308
+ UpdateWebhookResponses,
309
+ VerifyWorkflowData,
310
+ VerifyWorkflowErrors,
311
+ VerifyWorkflowResponses,
312
+ WorkflowCancelData,
313
+ WorkflowCancelErrors,
314
+ WorkflowCancelResponses,
315
+ WorkflowCompleteData,
316
+ WorkflowCompleteErrors,
317
+ WorkflowCompleteResponses,
318
+ WorkflowCutoverData,
319
+ WorkflowCutoverErrors,
320
+ WorkflowCutoverResponses,
321
+ WorkflowRetryData,
322
+ WorkflowRetryErrors,
323
+ WorkflowRetryResponses,
324
+ WorkflowReverseCutoverData,
325
+ WorkflowReverseCutoverErrors,
326
+ WorkflowReverseCutoverResponses,
327
+ WorkflowReverseTrafficData,
328
+ WorkflowReverseTrafficErrors,
329
+ WorkflowReverseTrafficResponses,
330
+ WorkflowSwitchPrimariesData,
331
+ WorkflowSwitchPrimariesErrors,
332
+ WorkflowSwitchPrimariesResponses,
333
+ WorkflowSwitchReplicasData,
334
+ WorkflowSwitchReplicasErrors,
335
+ WorkflowSwitchReplicasResponses,
336
+ } from "./types.gen.ts";
337
+
338
+ export type Options<
339
+ TData extends TDataShape = TDataShape,
340
+ ThrowOnError extends boolean = boolean,
341
+ > = Options2<TData, ThrowOnError> & {
342
+ /**
343
+ * You can provide a client instance returned by `createClient()` instead of
344
+ * individual options. This might be also useful if you want to implement a
345
+ * custom client.
346
+ */
347
+ client?: Client;
348
+ /**
349
+ * You can pass arbitrary values through the `meta` object. This can be
350
+ * used to access values that aren't defined as part of the SDK function.
351
+ */
352
+ meta?: Record<string, unknown>;
353
+ };
354
+
355
+ class _HeyApiClient {
356
+ protected _client: Client = client;
357
+
358
+ constructor(args?: {
359
+ client?: Client;
360
+ }) {
361
+ if (args?.client) {
362
+ this._client = args.client;
363
+ }
364
+ }
365
+ }
366
+
367
+ export class PlanetScaleClient extends _HeyApiClient {
368
+ /**
369
+ * List organizations
370
+ * When using a service token, returns the list of organizations the service token has access to. When using an OAuth token, returns the list of organizations the user has access to.
371
+ * ### Authorization
372
+ * A OAuth token must have at least one of the following scopes in order to use this API endpoint:
373
+ *
374
+ * **OAuth Scopes**
375
+ *
376
+ * | Resource | Scopes |
377
+ * | :------- | :---------- |
378
+ * | User | `read_organizations` |
379
+ */
380
+ public listOrganizations<ThrowOnError extends boolean = true>(
381
+ options?: Options<ListOrganizationsData, ThrowOnError>,
382
+ ) {
383
+ return (options?.client ?? this._client).get<
384
+ ListOrganizationsResponses,
385
+ ListOrganizationsErrors,
386
+ ThrowOnError
387
+ >({
388
+ url: "/organizations",
389
+ ...options,
390
+ });
391
+ }
392
+
393
+ /**
394
+ * Get an organization
395
+ *
396
+ * ### Authorization
397
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
398
+ *
399
+ * **Service Token Accesses**
400
+ * `read_organization`
401
+ *
402
+ * **OAuth Scopes**
403
+ *
404
+ * | Resource | Scopes |
405
+ * | :------- | :---------- |
406
+ * | User | `read_organizations` |
407
+ * | Organization | `read_organization` |
408
+ */
409
+ public getOrganization<ThrowOnError extends boolean = true>(
410
+ options: Options<GetOrganizationData, ThrowOnError>,
411
+ ) {
412
+ return (options.client ?? this._client).get<
413
+ GetOrganizationResponses,
414
+ GetOrganizationErrors,
415
+ ThrowOnError
416
+ >({
417
+ url: "/organizations/{name}",
418
+ ...options,
419
+ });
420
+ }
421
+
422
+ /**
423
+ * Update an organization
424
+ *
425
+ * ### Authorization
426
+ * A OAuth token must have at least one of the following scopes in order to use this API endpoint:
427
+ *
428
+ * **OAuth Scopes**
429
+ *
430
+ * | Resource | Scopes |
431
+ * | :------- | :---------- |
432
+ * | Organization | `write_organization` |
433
+ */
434
+ public updateOrganization<ThrowOnError extends boolean = true>(
435
+ options: Options<UpdateOrganizationData, ThrowOnError>,
436
+ ) {
437
+ return (options.client ?? this._client).patch<
438
+ UpdateOrganizationResponses,
439
+ UpdateOrganizationErrors,
440
+ ThrowOnError
441
+ >({
442
+ url: "/organizations/{name}",
443
+ ...options,
444
+ headers: {
445
+ "Content-Type": "application/json",
446
+ ...options.headers,
447
+ },
448
+ });
449
+ }
450
+
451
+ /**
452
+ * List audit logs
453
+ *
454
+ * ### Authorization
455
+ * A service token must have at least one of the following access in order to use this API endpoint:
456
+ *
457
+ * **Service Token Accesses**
458
+ * `read_audit_logs`
459
+ *
460
+ *
461
+ */
462
+ public listAuditLogs<ThrowOnError extends boolean = true>(
463
+ options: Options<ListAuditLogsData, ThrowOnError>,
464
+ ) {
465
+ return (options.client ?? this._client).get<
466
+ ListAuditLogsResponses,
467
+ ListAuditLogsErrors,
468
+ ThrowOnError
469
+ >({
470
+ url: "/organizations/{name}/audit-log",
471
+ ...options,
472
+ });
473
+ }
474
+
475
+ /**
476
+ * List regions for an organization
477
+ *
478
+ * ### Authorization
479
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
480
+ *
481
+ * **Service Token Accesses**
482
+ * `read_organization`
483
+ *
484
+ * **OAuth Scopes**
485
+ *
486
+ * | Resource | Scopes |
487
+ * | :------- | :---------- |
488
+ * | User | `read_organizations` |
489
+ * | Organization | `read_organization` |
490
+ */
491
+ public listRegionsForOrganization<ThrowOnError extends boolean = true>(
492
+ options: Options<ListRegionsForOrganizationData, ThrowOnError>,
493
+ ) {
494
+ return (options.client ?? this._client).get<
495
+ ListRegionsForOrganizationResponses,
496
+ ListRegionsForOrganizationErrors,
497
+ ThrowOnError
498
+ >({
499
+ url: "/organizations/{name}/regions",
500
+ ...options,
501
+ });
502
+ }
503
+
504
+ /**
505
+ * List databases
506
+ *
507
+ * ### Authorization
508
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
509
+ *
510
+ * **Service Token Accesses**
511
+ * `read_database`, `delete_database`, `write_database`, `read_branch`, `delete_branch`, `create_branch`, `delete_production_branch`, `connect_branch`, `connect_production_branch`, `delete_branch_password`, `delete_production_branch_password`, `read_deploy_request`, `create_deploy_request`, `approve_deploy_request`, `read_schema_recommendations`, `close_schema_recommendations`, `read_comment`, `create_comment`, `restore_backup`, `restore_production_branch_backup`, `read_backups`, `write_backups`, `delete_backups`, `delete_production_branch_backups`, `write_branch_vschema`, `write_production_branch_vschema`
512
+ *
513
+ * **OAuth Scopes**
514
+ *
515
+ * | Resource | Scopes |
516
+ * | :------- | :---------- |
517
+ * | Organization | `read_databases` |
518
+ */
519
+ public listDatabases<ThrowOnError extends boolean = true>(
520
+ options: Options<ListDatabasesData, ThrowOnError>,
521
+ ) {
522
+ return (options.client ?? this._client).get<
523
+ ListDatabasesResponses,
524
+ ListDatabasesErrors,
525
+ ThrowOnError
526
+ >({
527
+ url: "/organizations/{organization}/databases",
528
+ ...options,
529
+ });
530
+ }
531
+
532
+ /**
533
+ * Create a database
534
+ *
535
+ * ### Authorization
536
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
537
+ *
538
+ * **Service Token Accesses**
539
+ * `create_databases`
540
+ *
541
+ * **OAuth Scopes**
542
+ *
543
+ * | Resource | Scopes |
544
+ * | :------- | :---------- |
545
+ * | Organization | `create_databases` |
546
+ */
547
+ public createDatabase<ThrowOnError extends boolean = true>(
548
+ options: Options<CreateDatabaseData, ThrowOnError>,
549
+ ) {
550
+ return (options.client ?? this._client).post<
551
+ CreateDatabaseResponses,
552
+ CreateDatabaseErrors,
553
+ ThrowOnError
554
+ >({
555
+ url: "/organizations/{organization}/databases",
556
+ ...options,
557
+ headers: {
558
+ "Content-Type": "application/json",
559
+ ...options.headers,
560
+ },
561
+ });
562
+ }
563
+
564
+ /**
565
+ * List branches
566
+ *
567
+ * ### Authorization
568
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
569
+ *
570
+ * **Service Token Accesses**
571
+ * `read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`
572
+ *
573
+ * **OAuth Scopes**
574
+ *
575
+ * | Resource | Scopes |
576
+ * | :------- | :---------- |
577
+ * | Organization | `read_branches` |
578
+ * | Database | `read_branches` |
579
+ * | Branch | `read_branch` |
580
+ */
581
+ public listBranches<ThrowOnError extends boolean = true>(
582
+ options: Options<ListBranchesData, ThrowOnError>,
583
+ ) {
584
+ return (options.client ?? this._client).get<
585
+ ListBranchesResponses,
586
+ ListBranchesErrors,
587
+ ThrowOnError
588
+ >({
589
+ url: "/organizations/{organization}/databases/{database}/branches",
590
+ ...options,
591
+ });
592
+ }
593
+
594
+ /**
595
+ * Create a branch
596
+ *
597
+ * ### Authorization
598
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
599
+ *
600
+ * **Service Token Accesses**
601
+ * `create_branch`, `restore_production_branch_backup`, `restore_backup`
602
+ *
603
+ * **OAuth Scopes**
604
+ *
605
+ * | Resource | Scopes |
606
+ * | :------- | :---------- |
607
+ * | Organization | `write_branches`, `restore_production_branch_backups`, `restore_backups` |
608
+ * | Database | `write_branches`, `restore_production_branch_backups`, `restore_backups` |
609
+ * | Branch | `restore_backups` |
610
+ */
611
+ public createBranch<ThrowOnError extends boolean = true>(
612
+ options: Options<CreateBranchData, ThrowOnError>,
613
+ ) {
614
+ return (options.client ?? this._client).post<
615
+ CreateBranchResponses,
616
+ CreateBranchErrors,
617
+ ThrowOnError
618
+ >({
619
+ url: "/organizations/{organization}/databases/{database}/branches",
620
+ ...options,
621
+ headers: {
622
+ "Content-Type": "application/json",
623
+ ...options.headers,
624
+ },
625
+ });
626
+ }
627
+
628
+ /**
629
+ * List backups
630
+ *
631
+ * ### Authorization
632
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
633
+ *
634
+ * **Service Token Accesses**
635
+ * `read_backups`
636
+ *
637
+ * **OAuth Scopes**
638
+ *
639
+ * | Resource | Scopes |
640
+ * | :------- | :---------- |
641
+ * | Organization | `read_backups` |
642
+ * | Database | `read_backups` |
643
+ * | Branch | `read_backups` |
644
+ */
645
+ public listBackups<ThrowOnError extends boolean = true>(
646
+ options: Options<ListBackupsData, ThrowOnError>,
647
+ ) {
648
+ return (options.client ?? this._client).get<
649
+ ListBackupsResponses,
650
+ ListBackupsErrors,
651
+ ThrowOnError
652
+ >({
653
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/backups",
654
+ ...options,
655
+ });
656
+ }
657
+
658
+ /**
659
+ * Create a backup
660
+ *
661
+ * ### Authorization
662
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
663
+ *
664
+ * **Service Token Accesses**
665
+ * `write_backups`
666
+ *
667
+ * **OAuth Scopes**
668
+ *
669
+ * | Resource | Scopes |
670
+ * | :------- | :---------- |
671
+ * | Organization | `write_backups` |
672
+ * | Database | `write_backups` |
673
+ * | Branch | `write_backups` |
674
+ */
675
+ public createBackup<ThrowOnError extends boolean = true>(
676
+ options: Options<CreateBackupData, ThrowOnError>,
677
+ ) {
678
+ return (options.client ?? this._client).post<
679
+ CreateBackupResponses,
680
+ CreateBackupErrors,
681
+ ThrowOnError
682
+ >({
683
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/backups",
684
+ ...options,
685
+ headers: {
686
+ "Content-Type": "application/json",
687
+ ...options.headers,
688
+ },
689
+ });
690
+ }
691
+
692
+ /**
693
+ * Delete a backup
694
+ *
695
+ * ### Authorization
696
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
697
+ *
698
+ * **Service Token Accesses**
699
+ * `delete_backups`, `delete_production_branch_backups`
700
+ *
701
+ * **OAuth Scopes**
702
+ *
703
+ * | Resource | Scopes |
704
+ * | :------- | :---------- |
705
+ * | Organization | `delete_backups`, `delete_production_branch_backups` |
706
+ * | Database | `delete_backups`, `delete_production_branch_backups` |
707
+ * | Branch | `delete_backups` |
708
+ */
709
+ public deleteBackup<ThrowOnError extends boolean = true>(
710
+ options: Options<DeleteBackupData, ThrowOnError>,
711
+ ) {
712
+ return (options.client ?? this._client).delete<
713
+ DeleteBackupResponses,
714
+ DeleteBackupErrors,
715
+ ThrowOnError
716
+ >({
717
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/backups/{id}",
718
+ ...options,
719
+ });
720
+ }
721
+
722
+ /**
723
+ * Get a backup
724
+ *
725
+ * ### Authorization
726
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
727
+ *
728
+ * **Service Token Accesses**
729
+ * `read_backups`
730
+ *
731
+ * **OAuth Scopes**
732
+ *
733
+ * | Resource | Scopes |
734
+ * | :------- | :---------- |
735
+ * | Organization | `read_backups` |
736
+ * | Database | `read_backups` |
737
+ * | Branch | `read_backups` |
738
+ */
739
+ public getBackup<ThrowOnError extends boolean = true>(
740
+ options: Options<GetBackupData, ThrowOnError>,
741
+ ) {
742
+ return (options.client ?? this._client).get<
743
+ GetBackupResponses,
744
+ GetBackupErrors,
745
+ ThrowOnError
746
+ >({
747
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/backups/{id}",
748
+ ...options,
749
+ });
750
+ }
751
+
752
+ /**
753
+ * Update a backup
754
+ *
755
+ * ### Authorization
756
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
757
+ *
758
+ * **Service Token Accesses**
759
+ * `write_backups`
760
+ *
761
+ * **OAuth Scopes**
762
+ *
763
+ * | Resource | Scopes |
764
+ * | :------- | :---------- |
765
+ * | Organization | `write_backups` |
766
+ * | Database | `write_backups` |
767
+ * | Branch | `write_backups` |
768
+ */
769
+ public updateBackup<ThrowOnError extends boolean = true>(
770
+ options: Options<UpdateBackupData, ThrowOnError>,
771
+ ) {
772
+ return (options.client ?? this._client).patch<
773
+ UpdateBackupResponses,
774
+ UpdateBackupErrors,
775
+ ThrowOnError
776
+ >({
777
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/backups/{id}",
778
+ ...options,
779
+ headers: {
780
+ "Content-Type": "application/json",
781
+ ...options.headers,
782
+ },
783
+ });
784
+ }
785
+
786
+ /**
787
+ * Get branch change requests
788
+ *
789
+ * ### Authorization
790
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
791
+ *
792
+ * **Service Token Accesses**
793
+ * `read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`
794
+ *
795
+ * **OAuth Scopes**
796
+ *
797
+ * | Resource | Scopes |
798
+ * | :------- | :---------- |
799
+ * | Organization | `read_branches` |
800
+ * | Database | `read_branches` |
801
+ * | Branch | `read_branch` |
802
+ */
803
+ public listBranchChangeRequests<ThrowOnError extends boolean = true>(
804
+ options: Options<ListBranchChangeRequestsData, ThrowOnError>,
805
+ ) {
806
+ return (options.client ?? this._client).get<
807
+ ListBranchChangeRequestsResponses,
808
+ ListBranchChangeRequestsErrors,
809
+ ThrowOnError
810
+ >({
811
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/changes",
812
+ ...options,
813
+ });
814
+ }
815
+
816
+ /**
817
+ * Upsert a change request
818
+ *
819
+ * ### Authorization
820
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
821
+ *
822
+ * **Service Token Accesses**
823
+ * `write_database`
824
+ *
825
+ * **OAuth Scopes**
826
+ *
827
+ * | Resource | Scopes |
828
+ * | :------- | :---------- |
829
+ * | Organization | `write_databases` |
830
+ * | Database | `write_database` |
831
+ */
832
+ public updateBranchChangeRequest<ThrowOnError extends boolean = true>(
833
+ options: Options<UpdateBranchChangeRequestData, ThrowOnError>,
834
+ ) {
835
+ return (options.client ?? this._client).patch<
836
+ UpdateBranchChangeRequestResponses,
837
+ UpdateBranchChangeRequestErrors,
838
+ ThrowOnError
839
+ >({
840
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/changes",
841
+ ...options,
842
+ headers: {
843
+ "Content-Type": "application/json",
844
+ ...options.headers,
845
+ },
846
+ });
847
+ }
848
+
849
+ /**
850
+ * List cluster extensions
851
+ *
852
+ * ### Authorization
853
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
854
+ *
855
+ * **Service Token Accesses**
856
+ * `read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`
857
+ *
858
+ * **OAuth Scopes**
859
+ *
860
+ * | Resource | Scopes |
861
+ * | :------- | :---------- |
862
+ * | Organization | `read_branches` |
863
+ * | Database | `read_branches` |
864
+ * | Branch | `read_branch` |
865
+ */
866
+ public listExtensions<ThrowOnError extends boolean = true>(
867
+ options: Options<ListExtensionsData, ThrowOnError>,
868
+ ) {
869
+ return (options.client ?? this._client).get<
870
+ ListExtensionsResponses,
871
+ ListExtensionsErrors,
872
+ ThrowOnError
873
+ >({
874
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/extensions",
875
+ ...options,
876
+ });
877
+ }
878
+
879
+ /**
880
+ * Get keyspaces
881
+ *
882
+ *
883
+ */
884
+ public listKeyspaces<ThrowOnError extends boolean = true>(
885
+ options: Options<ListKeyspacesData, ThrowOnError>,
886
+ ) {
887
+ return (options.client ?? this._client).get<
888
+ ListKeyspacesResponses,
889
+ ListKeyspacesErrors,
890
+ ThrowOnError
891
+ >({
892
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/keyspaces",
893
+ ...options,
894
+ });
895
+ }
896
+
897
+ /**
898
+ * Create a keyspace
899
+ *
900
+ *
901
+ */
902
+ public createKeyspace<ThrowOnError extends boolean = true>(
903
+ options: Options<CreateKeyspaceData, ThrowOnError>,
904
+ ) {
905
+ return (options.client ?? this._client).post<
906
+ CreateKeyspaceResponses,
907
+ CreateKeyspaceErrors,
908
+ ThrowOnError
909
+ >({
910
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/keyspaces",
911
+ ...options,
912
+ headers: {
913
+ "Content-Type": "application/json",
914
+ ...options.headers,
915
+ },
916
+ });
917
+ }
918
+
919
+ /**
920
+ * Get the VSchema for the keyspace
921
+ *
922
+ * ### Authorization
923
+ * A service token must have at least one of the following access in order to use this API endpoint:
924
+ *
925
+ * **Service Token Accesses**
926
+ * `read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`
927
+ *
928
+ *
929
+ */
930
+ public getKeyspaceVschema<ThrowOnError extends boolean = true>(
931
+ options: Options<GetKeyspaceVschemaData, ThrowOnError>,
932
+ ) {
933
+ return (options.client ?? this._client).get<
934
+ GetKeyspaceVschemaResponses,
935
+ GetKeyspaceVschemaErrors,
936
+ ThrowOnError
937
+ >({
938
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/keyspaces/{keyspace}/vschema",
939
+ ...options,
940
+ });
941
+ }
942
+
943
+ /**
944
+ * Update the VSchema for the keyspace
945
+ *
946
+ * ### Authorization
947
+ * A service token must have at least one of the following access in order to use this API endpoint:
948
+ *
949
+ * **Service Token Accesses**
950
+ * `write_production_branch_vschema`, `write_branch_vschema`
951
+ *
952
+ *
953
+ */
954
+ public updateKeyspaceVschema<ThrowOnError extends boolean = true>(
955
+ options: Options<UpdateKeyspaceVschemaData, ThrowOnError>,
956
+ ) {
957
+ return (options.client ?? this._client).patch<
958
+ UpdateKeyspaceVschemaResponses,
959
+ UpdateKeyspaceVschemaErrors,
960
+ ThrowOnError
961
+ >({
962
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/keyspaces/{keyspace}/vschema",
963
+ ...options,
964
+ headers: {
965
+ "Content-Type": "application/json",
966
+ ...options.headers,
967
+ },
968
+ });
969
+ }
970
+
971
+ /**
972
+ * Delete a keyspace
973
+ *
974
+ *
975
+ */
976
+ public deleteKeyspace<ThrowOnError extends boolean = true>(
977
+ options: Options<DeleteKeyspaceData, ThrowOnError>,
978
+ ) {
979
+ return (options.client ?? this._client).delete<
980
+ DeleteKeyspaceResponses,
981
+ DeleteKeyspaceErrors,
982
+ ThrowOnError
983
+ >({
984
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/keyspaces/{name}",
985
+ ...options,
986
+ });
987
+ }
988
+
989
+ /**
990
+ * Get a keyspace
991
+ *
992
+ *
993
+ */
994
+ public getKeyspace<ThrowOnError extends boolean = true>(
995
+ options: Options<GetKeyspaceData, ThrowOnError>,
996
+ ) {
997
+ return (options.client ?? this._client).get<
998
+ GetKeyspaceResponses,
999
+ GetKeyspaceErrors,
1000
+ ThrowOnError
1001
+ >({
1002
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/keyspaces/{name}",
1003
+ ...options,
1004
+ });
1005
+ }
1006
+
1007
+ /**
1008
+ * Configure keyspace settings
1009
+ *
1010
+ *
1011
+ */
1012
+ public updateKeyspace<ThrowOnError extends boolean = true>(
1013
+ options: Options<UpdateKeyspaceData, ThrowOnError>,
1014
+ ) {
1015
+ return (options.client ?? this._client).patch<
1016
+ UpdateKeyspaceResponses,
1017
+ UpdateKeyspaceErrors,
1018
+ ThrowOnError
1019
+ >({
1020
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/keyspaces/{name}",
1021
+ ...options,
1022
+ });
1023
+ }
1024
+
1025
+ /**
1026
+ * Get keyspace rollout status
1027
+ *
1028
+ *
1029
+ */
1030
+ public getKeyspaceRolloutStatus<ThrowOnError extends boolean = true>(
1031
+ options: Options<GetKeyspaceRolloutStatusData, ThrowOnError>,
1032
+ ) {
1033
+ return (options.client ?? this._client).get<
1034
+ GetKeyspaceRolloutStatusResponses,
1035
+ GetKeyspaceRolloutStatusErrors,
1036
+ ThrowOnError
1037
+ >({
1038
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/keyspaces/{name}/rollout-status",
1039
+ ...options,
1040
+ });
1041
+ }
1042
+
1043
+ /**
1044
+ * List cluster parameters
1045
+ *
1046
+ * ### Authorization
1047
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1048
+ *
1049
+ * **Service Token Accesses**
1050
+ * `read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`
1051
+ *
1052
+ * **OAuth Scopes**
1053
+ *
1054
+ * | Resource | Scopes |
1055
+ * | :------- | :---------- |
1056
+ * | Organization | `read_branches` |
1057
+ * | Database | `read_branches` |
1058
+ * | Branch | `read_branch` |
1059
+ */
1060
+ public listParameters<ThrowOnError extends boolean = true>(
1061
+ options: Options<ListParametersData, ThrowOnError>,
1062
+ ) {
1063
+ return (options.client ?? this._client).get<
1064
+ ListParametersResponses,
1065
+ ListParametersErrors,
1066
+ ThrowOnError
1067
+ >({
1068
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/parameters",
1069
+ ...options,
1070
+ });
1071
+ }
1072
+
1073
+ /**
1074
+ * List passwords
1075
+ *
1076
+ * ### Authorization
1077
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1078
+ *
1079
+ * **Service Token Accesses**
1080
+ * `read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`
1081
+ *
1082
+ * **OAuth Scopes**
1083
+ *
1084
+ * | Resource | Scopes |
1085
+ * | :------- | :---------- |
1086
+ * | Organization | `manage_passwords`, `manage_production_branch_passwords` |
1087
+ * | Database | `manage_passwords`, `manage_production_branch_passwords` |
1088
+ * | Branch | `manage_passwords` |
1089
+ */
1090
+ public listPasswords<ThrowOnError extends boolean = true>(
1091
+ options: Options<ListPasswordsData, ThrowOnError>,
1092
+ ) {
1093
+ return (options.client ?? this._client).get<
1094
+ ListPasswordsResponses,
1095
+ ListPasswordsErrors,
1096
+ ThrowOnError
1097
+ >({
1098
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/passwords",
1099
+ ...options,
1100
+ });
1101
+ }
1102
+
1103
+ /**
1104
+ * Create a password
1105
+ *
1106
+ * ### Authorization
1107
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1108
+ *
1109
+ * **Service Token Accesses**
1110
+ * `connect_production_branch`, `connect_branch`
1111
+ *
1112
+ * **OAuth Scopes**
1113
+ *
1114
+ * | Resource | Scopes |
1115
+ * | :------- | :---------- |
1116
+ * | Organization | `manage_passwords`, `manage_production_branch_passwords` |
1117
+ * | Database | `manage_passwords`, `manage_production_branch_passwords` |
1118
+ * | Branch | `manage_passwords` |
1119
+ */
1120
+ public createPassword<ThrowOnError extends boolean = true>(
1121
+ options: Options<CreatePasswordData, ThrowOnError>,
1122
+ ) {
1123
+ return (options.client ?? this._client).post<
1124
+ CreatePasswordResponses,
1125
+ CreatePasswordErrors,
1126
+ ThrowOnError
1127
+ >({
1128
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/passwords",
1129
+ ...options,
1130
+ headers: {
1131
+ "Content-Type": "application/json",
1132
+ ...options.headers,
1133
+ },
1134
+ });
1135
+ }
1136
+
1137
+ /**
1138
+ * Delete a password
1139
+ *
1140
+ * ### Authorization
1141
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1142
+ *
1143
+ * **Service Token Accesses**
1144
+ * `delete_production_branch_password`, `delete_branch_password`
1145
+ *
1146
+ * **OAuth Scopes**
1147
+ *
1148
+ * | Resource | Scopes |
1149
+ * | :------- | :---------- |
1150
+ * | Organization | `manage_passwords`, `manage_production_branch_passwords` |
1151
+ * | Database | `manage_passwords`, `manage_production_branch_passwords` |
1152
+ * | Branch | `manage_passwords` |
1153
+ */
1154
+ public deletePassword<ThrowOnError extends boolean = true>(
1155
+ options: Options<DeletePasswordData, ThrowOnError>,
1156
+ ) {
1157
+ return (options.client ?? this._client).delete<
1158
+ DeletePasswordResponses,
1159
+ DeletePasswordErrors,
1160
+ ThrowOnError
1161
+ >({
1162
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/passwords/{id}",
1163
+ ...options,
1164
+ });
1165
+ }
1166
+
1167
+ /**
1168
+ * Get a password
1169
+ *
1170
+ * ### Authorization
1171
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1172
+ *
1173
+ * **Service Token Accesses**
1174
+ * `read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`
1175
+ *
1176
+ * **OAuth Scopes**
1177
+ *
1178
+ * | Resource | Scopes |
1179
+ * | :------- | :---------- |
1180
+ * | Organization | `manage_passwords`, `manage_production_branch_passwords` |
1181
+ * | Database | `manage_passwords`, `manage_production_branch_passwords` |
1182
+ * | Branch | `manage_passwords` |
1183
+ */
1184
+ public getPassword<ThrowOnError extends boolean = true>(
1185
+ options: Options<GetPasswordData, ThrowOnError>,
1186
+ ) {
1187
+ return (options.client ?? this._client).get<
1188
+ GetPasswordResponses,
1189
+ GetPasswordErrors,
1190
+ ThrowOnError
1191
+ >({
1192
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/passwords/{id}",
1193
+ ...options,
1194
+ });
1195
+ }
1196
+
1197
+ /**
1198
+ * Update a password
1199
+ *
1200
+ * ### Authorization
1201
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1202
+ *
1203
+ * **Service Token Accesses**
1204
+ * `connect_production_branch`, `connect_branch`
1205
+ *
1206
+ * **OAuth Scopes**
1207
+ *
1208
+ * | Resource | Scopes |
1209
+ * | :------- | :---------- |
1210
+ * | Organization | `manage_passwords`, `manage_production_branch_passwords` |
1211
+ * | Database | `manage_passwords`, `manage_production_branch_passwords` |
1212
+ * | Branch | `manage_passwords` |
1213
+ */
1214
+ public updatePassword<ThrowOnError extends boolean = true>(
1215
+ options: Options<UpdatePasswordData, ThrowOnError>,
1216
+ ) {
1217
+ return (options.client ?? this._client).patch<
1218
+ UpdatePasswordResponses,
1219
+ UpdatePasswordErrors,
1220
+ ThrowOnError
1221
+ >({
1222
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/passwords/{id}",
1223
+ ...options,
1224
+ headers: {
1225
+ "Content-Type": "application/json",
1226
+ ...options.headers,
1227
+ },
1228
+ });
1229
+ }
1230
+
1231
+ /**
1232
+ * Renew a password
1233
+ *
1234
+ * ### Authorization
1235
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1236
+ *
1237
+ * **Service Token Accesses**
1238
+ * `connect_production_branch`, `connect_branch`
1239
+ *
1240
+ * **OAuth Scopes**
1241
+ *
1242
+ * | Resource | Scopes |
1243
+ * | :------- | :---------- |
1244
+ * | Organization | `manage_passwords`, `manage_production_branch_passwords` |
1245
+ * | Database | `manage_passwords`, `manage_production_branch_passwords` |
1246
+ * | Branch | `manage_passwords` |
1247
+ */
1248
+ public renewPassword<ThrowOnError extends boolean = true>(
1249
+ options: Options<RenewPasswordData, ThrowOnError>,
1250
+ ) {
1251
+ return (options.client ?? this._client).post<
1252
+ RenewPasswordResponses,
1253
+ RenewPasswordErrors,
1254
+ ThrowOnError
1255
+ >({
1256
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/passwords/{id}/renew",
1257
+ ...options,
1258
+ });
1259
+ }
1260
+
1261
+ /**
1262
+ * List generated query patterns reports
1263
+ *
1264
+ * ### Authorization
1265
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1266
+ *
1267
+ * **Service Token Accesses**
1268
+ * `read_branch`
1269
+ *
1270
+ * **OAuth Scopes**
1271
+ *
1272
+ * | Resource | Scopes |
1273
+ * | :------- | :---------- |
1274
+ * | Organization | `read_branches` |
1275
+ * | Database | `read_branches` |
1276
+ * | Branch | `read_branch` |
1277
+ */
1278
+ public listGeneratedQueryPatternsReports<ThrowOnError extends boolean = true>(
1279
+ options: Options<ListGeneratedQueryPatternsReportsData, ThrowOnError>,
1280
+ ) {
1281
+ return (options.client ?? this._client).get<
1282
+ ListGeneratedQueryPatternsReportsResponses,
1283
+ ListGeneratedQueryPatternsReportsErrors,
1284
+ ThrowOnError
1285
+ >({
1286
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/query-patterns",
1287
+ ...options,
1288
+ });
1289
+ }
1290
+
1291
+ /**
1292
+ * Create a new query patterns report
1293
+ *
1294
+ * ### Authorization
1295
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1296
+ *
1297
+ * **Service Token Accesses**
1298
+ * `read_branch`
1299
+ *
1300
+ * **OAuth Scopes**
1301
+ *
1302
+ * | Resource | Scopes |
1303
+ * | :------- | :---------- |
1304
+ * | Organization | `read_branches` |
1305
+ * | Database | `read_branches` |
1306
+ * | Branch | `read_branch` |
1307
+ */
1308
+ public createQueryPatternsReport<ThrowOnError extends boolean = true>(
1309
+ options: Options<CreateQueryPatternsReportData, ThrowOnError>,
1310
+ ) {
1311
+ return (options.client ?? this._client).post<
1312
+ CreateQueryPatternsReportResponses,
1313
+ CreateQueryPatternsReportErrors,
1314
+ ThrowOnError
1315
+ >({
1316
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/query-patterns",
1317
+ ...options,
1318
+ });
1319
+ }
1320
+
1321
+ /**
1322
+ * Delete a query patterns report
1323
+ *
1324
+ * ### Authorization
1325
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1326
+ *
1327
+ * **Service Token Accesses**
1328
+ * `read_branch`
1329
+ *
1330
+ * **OAuth Scopes**
1331
+ *
1332
+ * | Resource | Scopes |
1333
+ * | :------- | :---------- |
1334
+ * | Organization | `read_branches` |
1335
+ * | Database | `read_branches` |
1336
+ * | Branch | `read_branch` |
1337
+ */
1338
+ public deleteQueryPatternsReport<ThrowOnError extends boolean = true>(
1339
+ options: Options<DeleteQueryPatternsReportData, ThrowOnError>,
1340
+ ) {
1341
+ return (options.client ?? this._client).delete<
1342
+ DeleteQueryPatternsReportResponses,
1343
+ DeleteQueryPatternsReportErrors,
1344
+ ThrowOnError
1345
+ >({
1346
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/query-patterns/{id}",
1347
+ ...options,
1348
+ });
1349
+ }
1350
+
1351
+ /**
1352
+ * Show the status of a query patterns report
1353
+ *
1354
+ * ### Authorization
1355
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1356
+ *
1357
+ * **Service Token Accesses**
1358
+ * `read_branch`
1359
+ *
1360
+ * **OAuth Scopes**
1361
+ *
1362
+ * | Resource | Scopes |
1363
+ * | :------- | :---------- |
1364
+ * | Organization | `read_branches` |
1365
+ * | Database | `read_branches` |
1366
+ * | Branch | `read_branch` |
1367
+ */
1368
+ public getQueryPatternsReportStatus<ThrowOnError extends boolean = true>(
1369
+ options: Options<GetQueryPatternsReportStatusData, ThrowOnError>,
1370
+ ) {
1371
+ return (options.client ?? this._client).get<
1372
+ GetQueryPatternsReportStatusResponses,
1373
+ GetQueryPatternsReportStatusErrors,
1374
+ ThrowOnError
1375
+ >({
1376
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/query-patterns/{id}",
1377
+ ...options,
1378
+ });
1379
+ }
1380
+
1381
+ /**
1382
+ * Download a finished query patterns report
1383
+ *
1384
+ * ### Authorization
1385
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1386
+ *
1387
+ * **Service Token Accesses**
1388
+ * `read_branch`
1389
+ *
1390
+ * **OAuth Scopes**
1391
+ *
1392
+ * | Resource | Scopes |
1393
+ * | :------- | :---------- |
1394
+ * | Organization | `read_branches` |
1395
+ * | Database | `read_branches` |
1396
+ * | Branch | `read_branch` |
1397
+ */
1398
+ public getQueryPatternsReport<ThrowOnError extends boolean = true>(
1399
+ options: Options<GetQueryPatternsReportData, ThrowOnError>,
1400
+ ) {
1401
+ return (options.client ?? this._client).get<
1402
+ unknown,
1403
+ GetQueryPatternsReportErrors,
1404
+ ThrowOnError
1405
+ >({
1406
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/query-patterns/{id}/download",
1407
+ ...options,
1408
+ });
1409
+ }
1410
+
1411
+ /**
1412
+ * Cancel a change request
1413
+ *
1414
+ * ### Authorization
1415
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1416
+ *
1417
+ * **Service Token Accesses**
1418
+ * `write_database`
1419
+ *
1420
+ * **OAuth Scopes**
1421
+ *
1422
+ * | Resource | Scopes |
1423
+ * | :------- | :---------- |
1424
+ * | Organization | `write_databases` |
1425
+ * | Database | `write_database` |
1426
+ */
1427
+ public cancelBranchChangeRequest<ThrowOnError extends boolean = true>(
1428
+ options: Options<CancelBranchChangeRequestData, ThrowOnError>,
1429
+ ) {
1430
+ return (options.client ?? this._client).delete<
1431
+ CancelBranchChangeRequestResponses,
1432
+ CancelBranchChangeRequestErrors,
1433
+ ThrowOnError
1434
+ >({
1435
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/resizes",
1436
+ ...options,
1437
+ });
1438
+ }
1439
+
1440
+ /**
1441
+ * List roles
1442
+ *
1443
+ * ### Authorization
1444
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1445
+ *
1446
+ * **Service Token Accesses**
1447
+ * `read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`
1448
+ *
1449
+ * **OAuth Scopes**
1450
+ *
1451
+ * | Resource | Scopes |
1452
+ * | :------- | :---------- |
1453
+ * | Organization | `manage_passwords`, `manage_production_branch_passwords` |
1454
+ * | Database | `manage_passwords`, `manage_production_branch_passwords` |
1455
+ * | Branch | `manage_passwords` |
1456
+ */
1457
+ public listRoles<ThrowOnError extends boolean = true>(
1458
+ options: Options<ListRolesData, ThrowOnError>,
1459
+ ) {
1460
+ return (options.client ?? this._client).get<
1461
+ ListRolesResponses,
1462
+ ListRolesErrors,
1463
+ ThrowOnError
1464
+ >({
1465
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/roles",
1466
+ ...options,
1467
+ });
1468
+ }
1469
+
1470
+ /**
1471
+ * Create role credentials
1472
+ *
1473
+ * ### Authorization
1474
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1475
+ *
1476
+ * **Service Token Accesses**
1477
+ * `create_production_branch_password`, `create_branch_password`
1478
+ *
1479
+ * **OAuth Scopes**
1480
+ *
1481
+ * | Resource | Scopes |
1482
+ * | :------- | :---------- |
1483
+ * | Organization | `manage_passwords`, `manage_production_branch_passwords` |
1484
+ * | Database | `manage_passwords`, `manage_production_branch_passwords` |
1485
+ * | Branch | `manage_passwords` |
1486
+ */
1487
+ public createRole<ThrowOnError extends boolean = true>(
1488
+ options: Options<CreateRoleData, ThrowOnError>,
1489
+ ) {
1490
+ return (options.client ?? this._client).post<
1491
+ CreateRoleResponses,
1492
+ CreateRoleErrors,
1493
+ ThrowOnError
1494
+ >({
1495
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/roles",
1496
+ ...options,
1497
+ headers: {
1498
+ "Content-Type": "application/json",
1499
+ ...options.headers,
1500
+ },
1501
+ });
1502
+ }
1503
+
1504
+ /**
1505
+ * Delete role credentials
1506
+ *
1507
+ * ### Authorization
1508
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1509
+ *
1510
+ * **Service Token Accesses**
1511
+ * `delete_production_branch_password`, `delete_branch_password`
1512
+ *
1513
+ * **OAuth Scopes**
1514
+ *
1515
+ * | Resource | Scopes |
1516
+ * | :------- | :---------- |
1517
+ * | Organization | `manage_passwords`, `manage_production_branch_passwords` |
1518
+ * | Database | `manage_passwords`, `manage_production_branch_passwords` |
1519
+ * | Branch | `manage_passwords` |
1520
+ */
1521
+ public deleteRole<ThrowOnError extends boolean = true>(
1522
+ options: Options<DeleteRoleData, ThrowOnError>,
1523
+ ) {
1524
+ return (options.client ?? this._client).delete<
1525
+ DeleteRoleResponses,
1526
+ DeleteRoleErrors,
1527
+ ThrowOnError
1528
+ >({
1529
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/roles/{id}",
1530
+ ...options,
1531
+ headers: {
1532
+ "Content-Type": "application/json",
1533
+ ...options.headers,
1534
+ },
1535
+ });
1536
+ }
1537
+
1538
+ /**
1539
+ * Get a role
1540
+ *
1541
+ * ### Authorization
1542
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1543
+ *
1544
+ * **Service Token Accesses**
1545
+ * `read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`
1546
+ *
1547
+ * **OAuth Scopes**
1548
+ *
1549
+ * | Resource | Scopes |
1550
+ * | :------- | :---------- |
1551
+ * | Organization | `manage_passwords`, `manage_production_branch_passwords` |
1552
+ * | Database | `manage_passwords`, `manage_production_branch_passwords` |
1553
+ * | Branch | `manage_passwords` |
1554
+ */
1555
+ public getRole<ThrowOnError extends boolean = true>(
1556
+ options: Options<GetRoleData, ThrowOnError>,
1557
+ ) {
1558
+ return (options.client ?? this._client).get<
1559
+ GetRoleResponses,
1560
+ GetRoleErrors,
1561
+ ThrowOnError
1562
+ >({
1563
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/roles/{id}",
1564
+ ...options,
1565
+ });
1566
+ }
1567
+
1568
+ /**
1569
+ * Update role name
1570
+ *
1571
+ * ### Authorization
1572
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1573
+ *
1574
+ * **Service Token Accesses**
1575
+ * `create_production_branch_password`, `create_branch_password`
1576
+ *
1577
+ * **OAuth Scopes**
1578
+ *
1579
+ * | Resource | Scopes |
1580
+ * | :------- | :---------- |
1581
+ * | Organization | `manage_passwords`, `manage_production_branch_passwords` |
1582
+ * | Database | `manage_passwords`, `manage_production_branch_passwords` |
1583
+ * | Branch | `manage_passwords` |
1584
+ */
1585
+ public updateRole<ThrowOnError extends boolean = true>(
1586
+ options: Options<UpdateRoleData, ThrowOnError>,
1587
+ ) {
1588
+ return (options.client ?? this._client).patch<
1589
+ UpdateRoleResponses,
1590
+ UpdateRoleErrors,
1591
+ ThrowOnError
1592
+ >({
1593
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/roles/{id}",
1594
+ ...options,
1595
+ headers: {
1596
+ "Content-Type": "application/json",
1597
+ ...options.headers,
1598
+ },
1599
+ });
1600
+ }
1601
+
1602
+ /**
1603
+ * Renew role expiration
1604
+ *
1605
+ * ### Authorization
1606
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1607
+ *
1608
+ * **Service Token Accesses**
1609
+ * `create_production_branch_password`, `create_branch_password`
1610
+ *
1611
+ * **OAuth Scopes**
1612
+ *
1613
+ * | Resource | Scopes |
1614
+ * | :------- | :---------- |
1615
+ * | Organization | `manage_passwords`, `manage_production_branch_passwords` |
1616
+ * | Database | `manage_passwords`, `manage_production_branch_passwords` |
1617
+ * | Branch | `manage_passwords` |
1618
+ */
1619
+ public renewRole<ThrowOnError extends boolean = true>(
1620
+ options: Options<RenewRoleData, ThrowOnError>,
1621
+ ) {
1622
+ return (options.client ?? this._client).post<
1623
+ RenewRoleResponses,
1624
+ RenewRoleErrors,
1625
+ ThrowOnError
1626
+ >({
1627
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/roles/{id}/renew",
1628
+ ...options,
1629
+ });
1630
+ }
1631
+
1632
+ /**
1633
+ * Delete a branch
1634
+ *
1635
+ * ### Authorization
1636
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1637
+ *
1638
+ * **Service Token Accesses**
1639
+ * `delete_branch`
1640
+ *
1641
+ * **OAuth Scopes**
1642
+ *
1643
+ * | Resource | Scopes |
1644
+ * | :------- | :---------- |
1645
+ * | Organization | `delete_branches`, `delete_production_branches` |
1646
+ * | Database | `delete_branches`, `delete_production_branches` |
1647
+ * | Branch | `delete_branch` |
1648
+ */
1649
+ public deleteBranch<ThrowOnError extends boolean = true>(
1650
+ options: Options<DeleteBranchData, ThrowOnError>,
1651
+ ) {
1652
+ return (options.client ?? this._client).delete<
1653
+ DeleteBranchResponses,
1654
+ DeleteBranchErrors,
1655
+ ThrowOnError
1656
+ >({
1657
+ url: "/organizations/{organization}/databases/{database}/branches/{name}",
1658
+ ...options,
1659
+ });
1660
+ }
1661
+
1662
+ /**
1663
+ * Get a branch
1664
+ *
1665
+ * ### Authorization
1666
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1667
+ *
1668
+ * **Service Token Accesses**
1669
+ * `read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`
1670
+ *
1671
+ * **OAuth Scopes**
1672
+ *
1673
+ * | Resource | Scopes |
1674
+ * | :------- | :---------- |
1675
+ * | Organization | `read_branches` |
1676
+ * | Database | `read_branches` |
1677
+ * | Branch | `read_branch` |
1678
+ */
1679
+ public getBranch<ThrowOnError extends boolean = true>(
1680
+ options: Options<GetBranchData, ThrowOnError>,
1681
+ ) {
1682
+ return (options.client ?? this._client).get<
1683
+ GetBranchResponses,
1684
+ GetBranchErrors,
1685
+ ThrowOnError
1686
+ >({
1687
+ url: "/organizations/{organization}/databases/{database}/branches/{name}",
1688
+ ...options,
1689
+ });
1690
+ }
1691
+
1692
+ /**
1693
+ * Change a branch cluster configuration
1694
+ *
1695
+ * ### Authorization
1696
+ * A service token must have at least one of the following access in order to use this API endpoint:
1697
+ *
1698
+ * **Service Token Accesses**
1699
+ * `write_database`
1700
+ *
1701
+ *
1702
+ */
1703
+ public updateBranchClusterConfig<ThrowOnError extends boolean = true>(
1704
+ options: Options<UpdateBranchClusterConfigData, ThrowOnError>,
1705
+ ) {
1706
+ return (options.client ?? this._client).patch<
1707
+ UpdateBranchClusterConfigResponses,
1708
+ UpdateBranchClusterConfigErrors,
1709
+ ThrowOnError
1710
+ >({
1711
+ url: "/organizations/{organization}/databases/{database}/branches/{name}/cluster",
1712
+ ...options,
1713
+ headers: {
1714
+ "Content-Type": "application/json",
1715
+ ...options.headers,
1716
+ },
1717
+ });
1718
+ }
1719
+
1720
+ /**
1721
+ * Demote a branch
1722
+ * Demotes a branch from production to development
1723
+ * ### Authorization
1724
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1725
+ *
1726
+ * **Service Token Accesses**
1727
+ * `connect_production_branch`, `demote_branches`
1728
+ *
1729
+ * **OAuth Scopes**
1730
+ *
1731
+ * | Resource | Scopes |
1732
+ * | :------- | :---------- |
1733
+ * | Organization | `demote_branches` |
1734
+ * | Database | `demote_branches` |
1735
+ */
1736
+ public demoteBranch<ThrowOnError extends boolean = true>(
1737
+ options: Options<DemoteBranchData, ThrowOnError>,
1738
+ ) {
1739
+ return (options.client ?? this._client).post<
1740
+ DemoteBranchResponses,
1741
+ DemoteBranchErrors,
1742
+ ThrowOnError
1743
+ >({
1744
+ url: "/organizations/{organization}/databases/{database}/branches/{name}/demote",
1745
+ ...options,
1746
+ });
1747
+ }
1748
+
1749
+ /**
1750
+ * Promote a branch
1751
+ * Promotes a branch from development to production
1752
+ * ### Authorization
1753
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1754
+ *
1755
+ * **Service Token Accesses**
1756
+ * `connect_production_branch`, `promote_branches`
1757
+ *
1758
+ * **OAuth Scopes**
1759
+ *
1760
+ * | Resource | Scopes |
1761
+ * | :------- | :---------- |
1762
+ * | Organization | `promote_branches` |
1763
+ * | Database | `promote_branches` |
1764
+ */
1765
+ public promoteBranch<ThrowOnError extends boolean = true>(
1766
+ options: Options<PromoteBranchData, ThrowOnError>,
1767
+ ) {
1768
+ return (options.client ?? this._client).post<
1769
+ PromoteBranchResponses,
1770
+ PromoteBranchErrors,
1771
+ ThrowOnError
1772
+ >({
1773
+ url: "/organizations/{organization}/databases/{database}/branches/{name}/promote",
1774
+ ...options,
1775
+ });
1776
+ }
1777
+
1778
+ /**
1779
+ * Disable safe migrations for a branch
1780
+ *
1781
+ *
1782
+ */
1783
+ public disableSafeMigrations<ThrowOnError extends boolean = true>(
1784
+ options: Options<DisableSafeMigrationsData, ThrowOnError>,
1785
+ ) {
1786
+ return (options.client ?? this._client).delete<
1787
+ DisableSafeMigrationsResponses,
1788
+ DisableSafeMigrationsErrors,
1789
+ ThrowOnError
1790
+ >({
1791
+ url: "/organizations/{organization}/databases/{database}/branches/{name}/safe-migrations",
1792
+ ...options,
1793
+ });
1794
+ }
1795
+
1796
+ /**
1797
+ * Enable safe migrations for a branch
1798
+ *
1799
+ *
1800
+ */
1801
+ public enableSafeMigrations<ThrowOnError extends boolean = true>(
1802
+ options: Options<EnableSafeMigrationsData, ThrowOnError>,
1803
+ ) {
1804
+ return (options.client ?? this._client).post<
1805
+ EnableSafeMigrationsResponses,
1806
+ EnableSafeMigrationsErrors,
1807
+ ThrowOnError
1808
+ >({
1809
+ url: "/organizations/{organization}/databases/{database}/branches/{name}/safe-migrations",
1810
+ ...options,
1811
+ });
1812
+ }
1813
+
1814
+ /**
1815
+ * Get a branch schema
1816
+ *
1817
+ * ### Authorization
1818
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1819
+ *
1820
+ * **Service Token Accesses**
1821
+ * `read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`
1822
+ *
1823
+ * **OAuth Scopes**
1824
+ *
1825
+ * | Resource | Scopes |
1826
+ * | :------- | :---------- |
1827
+ * | Organization | `read_branches` |
1828
+ * | Database | `read_branches` |
1829
+ * | Branch | `read_branch` |
1830
+ */
1831
+ public getBranchSchema<ThrowOnError extends boolean = true>(
1832
+ options: Options<GetBranchSchemaData, ThrowOnError>,
1833
+ ) {
1834
+ return (options.client ?? this._client).get<
1835
+ GetBranchSchemaResponses,
1836
+ GetBranchSchemaErrors,
1837
+ ThrowOnError
1838
+ >({
1839
+ url: "/organizations/{organization}/databases/{database}/branches/{name}/schema",
1840
+ ...options,
1841
+ });
1842
+ }
1843
+
1844
+ /**
1845
+ * Lint a branch schema
1846
+ *
1847
+ * ### Authorization
1848
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1849
+ *
1850
+ * **Service Token Accesses**
1851
+ * `read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`
1852
+ *
1853
+ * **OAuth Scopes**
1854
+ *
1855
+ * | Resource | Scopes |
1856
+ * | :------- | :---------- |
1857
+ * | Organization | `read_branches` |
1858
+ * | Database | `read_branches` |
1859
+ * | Branch | `read_branch` |
1860
+ */
1861
+ public lintBranchSchema<ThrowOnError extends boolean = true>(
1862
+ options: Options<LintBranchSchemaData, ThrowOnError>,
1863
+ ) {
1864
+ return (options.client ?? this._client).get<
1865
+ LintBranchSchemaResponses,
1866
+ LintBranchSchemaErrors,
1867
+ ThrowOnError
1868
+ >({
1869
+ url: "/organizations/{organization}/databases/{database}/branches/{name}/schema/lint",
1870
+ ...options,
1871
+ });
1872
+ }
1873
+
1874
+ /**
1875
+ * Get the deploy queue
1876
+ * The deploy queue returns the current list of deploy requests in the order they will be deployed.
1877
+ *
1878
+ */
1879
+ public getDeployQueue<ThrowOnError extends boolean = true>(
1880
+ options: Options<GetDeployQueueData, ThrowOnError>,
1881
+ ) {
1882
+ return (options.client ?? this._client).get<
1883
+ GetDeployQueueResponses,
1884
+ GetDeployQueueErrors,
1885
+ ThrowOnError
1886
+ >({
1887
+ url: "/organizations/{organization}/databases/{database}/deploy-queue",
1888
+ ...options,
1889
+ });
1890
+ }
1891
+
1892
+ /**
1893
+ * List deploy requests
1894
+ * List deploy requests for a database
1895
+ * ### Authorization
1896
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1897
+ *
1898
+ * **Service Token Accesses**
1899
+ * `read_deploy_request`
1900
+ *
1901
+ * **OAuth Scopes**
1902
+ *
1903
+ * | Resource | Scopes |
1904
+ * | :------- | :---------- |
1905
+ * | Organization | `read_deploy_requests` |
1906
+ * | Database | `read_deploy_requests` |
1907
+ */
1908
+ public listDeployRequests<ThrowOnError extends boolean = true>(
1909
+ options: Options<ListDeployRequestsData, ThrowOnError>,
1910
+ ) {
1911
+ return (options.client ?? this._client).get<
1912
+ ListDeployRequestsResponses,
1913
+ ListDeployRequestsErrors,
1914
+ ThrowOnError
1915
+ >({
1916
+ url: "/organizations/{organization}/databases/{database}/deploy-requests",
1917
+ ...options,
1918
+ });
1919
+ }
1920
+
1921
+ /**
1922
+ * Create a deploy request
1923
+ *
1924
+ * ### Authorization
1925
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1926
+ *
1927
+ * **Service Token Accesses**
1928
+ * `read_deploy_request`, `create_deploy_requests`
1929
+ *
1930
+ * **OAuth Scopes**
1931
+ *
1932
+ * | Resource | Scopes |
1933
+ * | :------- | :---------- |
1934
+ * | Organization | `write_deploy_requests` |
1935
+ * | Database | `write_deploy_requests` |
1936
+ */
1937
+ public createDeployRequest<ThrowOnError extends boolean = true>(
1938
+ options: Options<CreateDeployRequestData, ThrowOnError>,
1939
+ ) {
1940
+ return (options.client ?? this._client).post<
1941
+ CreateDeployRequestResponses,
1942
+ CreateDeployRequestErrors,
1943
+ ThrowOnError
1944
+ >({
1945
+ url: "/organizations/{organization}/databases/{database}/deploy-requests",
1946
+ ...options,
1947
+ headers: {
1948
+ "Content-Type": "application/json",
1949
+ ...options.headers,
1950
+ },
1951
+ });
1952
+ }
1953
+
1954
+ /**
1955
+ * Get a deploy request
1956
+ *
1957
+ * ### Authorization
1958
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1959
+ *
1960
+ * **Service Token Accesses**
1961
+ * `read_deploy_request`
1962
+ *
1963
+ * **OAuth Scopes**
1964
+ *
1965
+ * | Resource | Scopes |
1966
+ * | :------- | :---------- |
1967
+ * | Organization | `read_deploy_requests` |
1968
+ * | Database | `read_deploy_requests` |
1969
+ */
1970
+ public getDeployRequest<ThrowOnError extends boolean = true>(
1971
+ options: Options<GetDeployRequestData, ThrowOnError>,
1972
+ ) {
1973
+ return (options.client ?? this._client).get<
1974
+ GetDeployRequestResponses,
1975
+ GetDeployRequestErrors,
1976
+ ThrowOnError
1977
+ >({
1978
+ url: "/organizations/{organization}/databases/{database}/deploy-requests/{number}",
1979
+ ...options,
1980
+ });
1981
+ }
1982
+
1983
+ /**
1984
+ * Close a deploy request
1985
+ *
1986
+ * ### Authorization
1987
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
1988
+ *
1989
+ * **Service Token Accesses**
1990
+ * `read_deploy_request`
1991
+ *
1992
+ * **OAuth Scopes**
1993
+ *
1994
+ * | Resource | Scopes |
1995
+ * | :------- | :---------- |
1996
+ * | Organization | `write_deploy_requests` |
1997
+ * | Database | `write_deploy_requests` |
1998
+ */
1999
+ public closeDeployRequest<ThrowOnError extends boolean = true>(
2000
+ options: Options<CloseDeployRequestData, ThrowOnError>,
2001
+ ) {
2002
+ return (options.client ?? this._client).patch<
2003
+ CloseDeployRequestResponses,
2004
+ CloseDeployRequestErrors,
2005
+ ThrowOnError
2006
+ >({
2007
+ url: "/organizations/{organization}/databases/{database}/deploy-requests/{number}",
2008
+ ...options,
2009
+ headers: {
2010
+ "Content-Type": "application/json",
2011
+ ...options.headers,
2012
+ },
2013
+ });
2014
+ }
2015
+
2016
+ /**
2017
+ * Complete a gated deploy request
2018
+ *
2019
+ * ### Authorization
2020
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
2021
+ *
2022
+ * **Service Token Accesses**
2023
+ * `read_deploy_request`, `create_deploy_request`
2024
+ *
2025
+ * **OAuth Scopes**
2026
+ *
2027
+ * | Resource | Scopes |
2028
+ * | :------- | :---------- |
2029
+ * | Organization | `deploy_deploy_requests` |
2030
+ * | Database | `deploy_deploy_requests` |
2031
+ */
2032
+ public completeGatedDeployRequest<ThrowOnError extends boolean = true>(
2033
+ options: Options<CompleteGatedDeployRequestData, ThrowOnError>,
2034
+ ) {
2035
+ return (options.client ?? this._client).post<
2036
+ CompleteGatedDeployRequestResponses,
2037
+ CompleteGatedDeployRequestErrors,
2038
+ ThrowOnError
2039
+ >({
2040
+ url: "/organizations/{organization}/databases/{database}/deploy-requests/{number}/apply-deploy",
2041
+ ...options,
2042
+ });
2043
+ }
2044
+
2045
+ /**
2046
+ * Update auto-apply for deploy request
2047
+ * Enables or disabled the auto-apply setting for a deploy request
2048
+ * ### Authorization
2049
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
2050
+ *
2051
+ * **Service Token Accesses**
2052
+ * `read_deploy_request`, `create_deploy_request`
2053
+ *
2054
+ * **OAuth Scopes**
2055
+ *
2056
+ * | Resource | Scopes |
2057
+ * | :------- | :---------- |
2058
+ * | Organization | `deploy_deploy_requests` |
2059
+ * | Database | `deploy_deploy_requests` |
2060
+ */
2061
+ public updateAutoApply<ThrowOnError extends boolean = true>(
2062
+ options: Options<UpdateAutoApplyData, ThrowOnError>,
2063
+ ) {
2064
+ return (options.client ?? this._client).put<
2065
+ UpdateAutoApplyResponses,
2066
+ UpdateAutoApplyErrors,
2067
+ ThrowOnError
2068
+ >({
2069
+ url: "/organizations/{organization}/databases/{database}/deploy-requests/{number}/auto-apply",
2070
+ ...options,
2071
+ headers: {
2072
+ "Content-Type": "application/json",
2073
+ ...options.headers,
2074
+ },
2075
+ });
2076
+ }
2077
+
2078
+ /**
2079
+ * Cancel a queued deploy request
2080
+ *
2081
+ * ### Authorization
2082
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
2083
+ *
2084
+ * **Service Token Accesses**
2085
+ * `read_deploy_request`, `create_deploy_request`
2086
+ *
2087
+ * **OAuth Scopes**
2088
+ *
2089
+ * | Resource | Scopes |
2090
+ * | :------- | :---------- |
2091
+ * | Organization | `deploy_deploy_requests` |
2092
+ * | Database | `deploy_deploy_requests` |
2093
+ */
2094
+ public cancelDeployRequest<ThrowOnError extends boolean = true>(
2095
+ options: Options<CancelDeployRequestData, ThrowOnError>,
2096
+ ) {
2097
+ return (options.client ?? this._client).post<
2098
+ CancelDeployRequestResponses,
2099
+ CancelDeployRequestErrors,
2100
+ ThrowOnError
2101
+ >({
2102
+ url: "/organizations/{organization}/databases/{database}/deploy-requests/{number}/cancel",
2103
+ ...options,
2104
+ });
2105
+ }
2106
+
2107
+ /**
2108
+ * Complete an errored deploy
2109
+ *
2110
+ * ### Authorization
2111
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
2112
+ *
2113
+ * **Service Token Accesses**
2114
+ * `read_deploy_request`, `create_deploy_request`
2115
+ *
2116
+ * **OAuth Scopes**
2117
+ *
2118
+ * | Resource | Scopes |
2119
+ * | :------- | :---------- |
2120
+ * | Organization | `deploy_deploy_requests` |
2121
+ * | Database | `deploy_deploy_requests` |
2122
+ */
2123
+ public completeErroredDeploy<ThrowOnError extends boolean = true>(
2124
+ options: Options<CompleteErroredDeployData, ThrowOnError>,
2125
+ ) {
2126
+ return (options.client ?? this._client).post<
2127
+ CompleteErroredDeployResponses,
2128
+ CompleteErroredDeployErrors,
2129
+ ThrowOnError
2130
+ >({
2131
+ url: "/organizations/{organization}/databases/{database}/deploy-requests/{number}/complete-deploy",
2132
+ ...options,
2133
+ });
2134
+ }
2135
+
2136
+ /**
2137
+ * Queue a deploy request
2138
+ *
2139
+ * ### Authorization
2140
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
2141
+ *
2142
+ * **Service Token Accesses**
2143
+ * `read_deploy_request`, `create_deploy_request`
2144
+ *
2145
+ * **OAuth Scopes**
2146
+ *
2147
+ * | Resource | Scopes |
2148
+ * | :------- | :---------- |
2149
+ * | Organization | `deploy_deploy_requests` |
2150
+ * | Database | `deploy_deploy_requests` |
2151
+ */
2152
+ public queueDeployRequest<ThrowOnError extends boolean = true>(
2153
+ options: Options<QueueDeployRequestData, ThrowOnError>,
2154
+ ) {
2155
+ return (options.client ?? this._client).post<
2156
+ QueueDeployRequestResponses,
2157
+ QueueDeployRequestErrors,
2158
+ ThrowOnError
2159
+ >({
2160
+ url: "/organizations/{organization}/databases/{database}/deploy-requests/{number}/deploy",
2161
+ ...options,
2162
+ headers: {
2163
+ "Content-Type": "application/json",
2164
+ ...options.headers,
2165
+ },
2166
+ });
2167
+ }
2168
+
2169
+ /**
2170
+ * Get a deployment
2171
+ * Get the deployment for a deploy request
2172
+ * ### Authorization
2173
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
2174
+ *
2175
+ * **Service Token Accesses**
2176
+ * `read_deploy_request`
2177
+ *
2178
+ * **OAuth Scopes**
2179
+ *
2180
+ * | Resource | Scopes |
2181
+ * | :------- | :---------- |
2182
+ * | Organization | `read_deploy_requests` |
2183
+ * | Database | `read_deploy_requests` |
2184
+ */
2185
+ public getDeployment<ThrowOnError extends boolean = true>(
2186
+ options: Options<GetDeploymentData, ThrowOnError>,
2187
+ ) {
2188
+ return (options.client ?? this._client).get<
2189
+ GetDeploymentResponses,
2190
+ GetDeploymentErrors,
2191
+ ThrowOnError
2192
+ >({
2193
+ url: "/organizations/{organization}/databases/{database}/deploy-requests/{number}/deployment",
2194
+ ...options,
2195
+ });
2196
+ }
2197
+
2198
+ /**
2199
+ * List deploy operations
2200
+ * List deploy operations for a deploy request
2201
+ * ### Authorization
2202
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
2203
+ *
2204
+ * **Service Token Accesses**
2205
+ * `read_deploy_request`
2206
+ *
2207
+ * **OAuth Scopes**
2208
+ *
2209
+ * | Resource | Scopes |
2210
+ * | :------- | :---------- |
2211
+ * | Organization | `read_deploy_requests` |
2212
+ * | Database | `read_deploy_requests` |
2213
+ */
2214
+ public listDeployOperations<ThrowOnError extends boolean = true>(
2215
+ options: Options<ListDeployOperationsData, ThrowOnError>,
2216
+ ) {
2217
+ return (options.client ?? this._client).get<
2218
+ ListDeployOperationsResponses,
2219
+ ListDeployOperationsErrors,
2220
+ ThrowOnError
2221
+ >({
2222
+ url: "/organizations/{organization}/databases/{database}/deploy-requests/{number}/operations",
2223
+ ...options,
2224
+ });
2225
+ }
2226
+
2227
+ /**
2228
+ * Complete a revert
2229
+ *
2230
+ * ### Authorization
2231
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
2232
+ *
2233
+ * **Service Token Accesses**
2234
+ * `read_deploy_request`, `create_deploy_request`
2235
+ *
2236
+ * **OAuth Scopes**
2237
+ *
2238
+ * | Resource | Scopes |
2239
+ * | :------- | :---------- |
2240
+ * | Organization | `deploy_deploy_requests` |
2241
+ * | Database | `deploy_deploy_requests` |
2242
+ */
2243
+ public completeRevert<ThrowOnError extends boolean = true>(
2244
+ options: Options<CompleteRevertData, ThrowOnError>,
2245
+ ) {
2246
+ return (options.client ?? this._client).post<
2247
+ CompleteRevertResponses,
2248
+ CompleteRevertErrors,
2249
+ ThrowOnError
2250
+ >({
2251
+ url: "/organizations/{organization}/databases/{database}/deploy-requests/{number}/revert",
2252
+ ...options,
2253
+ });
2254
+ }
2255
+
2256
+ /**
2257
+ * List deploy request reviews
2258
+ *
2259
+ * ### Authorization
2260
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
2261
+ *
2262
+ * **Service Token Accesses**
2263
+ * `read_deploy_request`
2264
+ *
2265
+ * **OAuth Scopes**
2266
+ *
2267
+ * | Resource | Scopes |
2268
+ * | :------- | :---------- |
2269
+ * | Organization | `read_deploy_requests` |
2270
+ * | Database | `read_deploy_requests` |
2271
+ */
2272
+ public listDeployRequestReviews<ThrowOnError extends boolean = true>(
2273
+ options: Options<ListDeployRequestReviewsData, ThrowOnError>,
2274
+ ) {
2275
+ return (options.client ?? this._client).get<
2276
+ ListDeployRequestReviewsResponses,
2277
+ ListDeployRequestReviewsErrors,
2278
+ ThrowOnError
2279
+ >({
2280
+ url: "/organizations/{organization}/databases/{database}/deploy-requests/{number}/reviews",
2281
+ ...options,
2282
+ });
2283
+ }
2284
+
2285
+ /**
2286
+ * Review a deploy request
2287
+ * Review a deploy request by either approving or commenting on the deploy request
2288
+ * ### Authorization
2289
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
2290
+ *
2291
+ * **Service Token Accesses**
2292
+ * `approve_deploy_request`, `review_deploy_request`
2293
+ *
2294
+ * **OAuth Scopes**
2295
+ *
2296
+ * | Resource | Scopes |
2297
+ * | :------- | :---------- |
2298
+ * | Organization | `approve_deploy_requests` |
2299
+ * | Database | `approve_deploy_requests` |
2300
+ */
2301
+ public reviewDeployRequest<ThrowOnError extends boolean = true>(
2302
+ options: Options<ReviewDeployRequestData, ThrowOnError>,
2303
+ ) {
2304
+ return (options.client ?? this._client).post<
2305
+ ReviewDeployRequestResponses,
2306
+ ReviewDeployRequestErrors,
2307
+ ThrowOnError
2308
+ >({
2309
+ url: "/organizations/{organization}/databases/{database}/deploy-requests/{number}/reviews",
2310
+ ...options,
2311
+ headers: {
2312
+ "Content-Type": "application/json",
2313
+ ...options.headers,
2314
+ },
2315
+ });
2316
+ }
2317
+
2318
+ /**
2319
+ * Skip revert period
2320
+ * Skips the revert period for a deploy request
2321
+ * ### Authorization
2322
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
2323
+ *
2324
+ * **Service Token Accesses**
2325
+ * `read_deploy_request`, `create_deploy_request`
2326
+ *
2327
+ * **OAuth Scopes**
2328
+ *
2329
+ * | Resource | Scopes |
2330
+ * | :------- | :---------- |
2331
+ * | Organization | `deploy_deploy_requests` |
2332
+ * | Database | `deploy_deploy_requests` |
2333
+ */
2334
+ public skipRevertPeriod<ThrowOnError extends boolean = true>(
2335
+ options: Options<SkipRevertPeriodData, ThrowOnError>,
2336
+ ) {
2337
+ return (options.client ?? this._client).post<
2338
+ SkipRevertPeriodResponses,
2339
+ SkipRevertPeriodErrors,
2340
+ ThrowOnError
2341
+ >({
2342
+ url: "/organizations/{organization}/databases/{database}/deploy-requests/{number}/skip-revert",
2343
+ ...options,
2344
+ });
2345
+ }
2346
+
2347
+ /**
2348
+ * Get deploy request throttler configurations
2349
+ *
2350
+ * ### Authorization
2351
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
2352
+ *
2353
+ * **Service Token Accesses**
2354
+ * `read_deploy_request`
2355
+ *
2356
+ * **OAuth Scopes**
2357
+ *
2358
+ * | Resource | Scopes |
2359
+ * | :------- | :---------- |
2360
+ * | Organization | `read_deploy_requests` |
2361
+ * | Database | `read_deploy_requests` |
2362
+ */
2363
+ public getDeployRequestThrottler<ThrowOnError extends boolean = true>(
2364
+ options: Options<GetDeployRequestThrottlerData, ThrowOnError>,
2365
+ ) {
2366
+ return (options.client ?? this._client).get<
2367
+ GetDeployRequestThrottlerResponses,
2368
+ GetDeployRequestThrottlerErrors,
2369
+ ThrowOnError
2370
+ >({
2371
+ url: "/organizations/{organization}/databases/{database}/deploy-requests/{number}/throttler",
2372
+ ...options,
2373
+ });
2374
+ }
2375
+
2376
+ /**
2377
+ * Update deploy request throttler configurations
2378
+ *
2379
+ * ### Authorization
2380
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
2381
+ *
2382
+ * **Service Token Accesses**
2383
+ * `read_deploy_request`, `create_deploy_request`
2384
+ *
2385
+ * **OAuth Scopes**
2386
+ *
2387
+ * | Resource | Scopes |
2388
+ * | :------- | :---------- |
2389
+ * | Organization | `deploy_deploy_requests` |
2390
+ * | Database | `deploy_deploy_requests` |
2391
+ */
2392
+ public updateDeployRequestThrottler<ThrowOnError extends boolean = true>(
2393
+ options: Options<UpdateDeployRequestThrottlerData, ThrowOnError>,
2394
+ ) {
2395
+ return (options.client ?? this._client).patch<
2396
+ UpdateDeployRequestThrottlerResponses,
2397
+ UpdateDeployRequestThrottlerErrors,
2398
+ ThrowOnError
2399
+ >({
2400
+ url: "/organizations/{organization}/databases/{database}/deploy-requests/{number}/throttler",
2401
+ ...options,
2402
+ headers: {
2403
+ "Content-Type": "application/json",
2404
+ ...options.headers,
2405
+ },
2406
+ });
2407
+ }
2408
+
2409
+ /**
2410
+ * Get database throttler configurations
2411
+ *
2412
+ * ### Authorization
2413
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
2414
+ *
2415
+ * **Service Token Accesses**
2416
+ * `read_deploy_request`, `create_deploy_request`
2417
+ *
2418
+ * **OAuth Scopes**
2419
+ *
2420
+ * | Resource | Scopes |
2421
+ * | :------- | :---------- |
2422
+ * | Organization | `read_databases` |
2423
+ * | Database | `read_database` |
2424
+ */
2425
+ public getDatabaseThrottler<ThrowOnError extends boolean = true>(
2426
+ options: Options<GetDatabaseThrottlerData, ThrowOnError>,
2427
+ ) {
2428
+ return (options.client ?? this._client).get<
2429
+ GetDatabaseThrottlerResponses,
2430
+ GetDatabaseThrottlerErrors,
2431
+ ThrowOnError
2432
+ >({
2433
+ url: "/organizations/{organization}/databases/{database}/throttler",
2434
+ ...options,
2435
+ });
2436
+ }
2437
+
2438
+ /**
2439
+ * Update database throttler configurations
2440
+ *
2441
+ * ### Authorization
2442
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
2443
+ *
2444
+ * **Service Token Accesses**
2445
+ * `read_deploy_request`, `create_deploy_request`
2446
+ *
2447
+ * **OAuth Scopes**
2448
+ *
2449
+ * | Resource | Scopes |
2450
+ * | :------- | :---------- |
2451
+ * | Organization | `deploy_deploy_requests` |
2452
+ * | Database | `deploy_deploy_requests` |
2453
+ */
2454
+ public updateDatabaseThrottler<ThrowOnError extends boolean = true>(
2455
+ options: Options<UpdateDatabaseThrottlerData, ThrowOnError>,
2456
+ ) {
2457
+ return (options.client ?? this._client).patch<
2458
+ UpdateDatabaseThrottlerResponses,
2459
+ UpdateDatabaseThrottlerErrors,
2460
+ ThrowOnError
2461
+ >({
2462
+ url: "/organizations/{organization}/databases/{database}/throttler",
2463
+ ...options,
2464
+ headers: {
2465
+ "Content-Type": "application/json",
2466
+ ...options.headers,
2467
+ },
2468
+ });
2469
+ }
2470
+
2471
+ /**
2472
+ * List webhooks
2473
+ * List webhooks for a database
2474
+ * ### Authorization
2475
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
2476
+ *
2477
+ * **Service Token Accesses**
2478
+ * `read_database`
2479
+ *
2480
+ * **OAuth Scopes**
2481
+ *
2482
+ * | Resource | Scopes |
2483
+ * | :------- | :---------- |
2484
+ * | Organization | `read_databases` |
2485
+ * | Database | `read_database` |
2486
+ */
2487
+ public listWebhooks<ThrowOnError extends boolean = true>(
2488
+ options: Options<ListWebhooksData, ThrowOnError>,
2489
+ ) {
2490
+ return (options.client ?? this._client).get<
2491
+ ListWebhooksResponses,
2492
+ ListWebhooksErrors,
2493
+ ThrowOnError
2494
+ >({
2495
+ url: "/organizations/{organization}/databases/{database}/webhooks",
2496
+ ...options,
2497
+ });
2498
+ }
2499
+
2500
+ /**
2501
+ * Create a webhook
2502
+ *
2503
+ * ### Authorization
2504
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
2505
+ *
2506
+ * **Service Token Accesses**
2507
+ * `write_database`
2508
+ *
2509
+ * **OAuth Scopes**
2510
+ *
2511
+ * | Resource | Scopes |
2512
+ * | :------- | :---------- |
2513
+ * | Organization | `write_databases` |
2514
+ * | Database | `write_database` |
2515
+ */
2516
+ public createWebhook<ThrowOnError extends boolean = true>(
2517
+ options: Options<CreateWebhookData, ThrowOnError>,
2518
+ ) {
2519
+ return (options.client ?? this._client).post<
2520
+ CreateWebhookResponses,
2521
+ CreateWebhookErrors,
2522
+ ThrowOnError
2523
+ >({
2524
+ url: "/organizations/{organization}/databases/{database}/webhooks",
2525
+ ...options,
2526
+ headers: {
2527
+ "Content-Type": "application/json",
2528
+ ...options.headers,
2529
+ },
2530
+ });
2531
+ }
2532
+
2533
+ /**
2534
+ * Delete a webhook
2535
+ *
2536
+ * ### Authorization
2537
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
2538
+ *
2539
+ * **Service Token Accesses**
2540
+ * `write_database`
2541
+ *
2542
+ * **OAuth Scopes**
2543
+ *
2544
+ * | Resource | Scopes |
2545
+ * | :------- | :---------- |
2546
+ * | Organization | `write_databases` |
2547
+ * | Database | `write_database` |
2548
+ */
2549
+ public deleteWebhook<ThrowOnError extends boolean = true>(
2550
+ options: Options<DeleteWebhookData, ThrowOnError>,
2551
+ ) {
2552
+ return (options.client ?? this._client).delete<
2553
+ DeleteWebhookResponses,
2554
+ DeleteWebhookErrors,
2555
+ ThrowOnError
2556
+ >({
2557
+ url: "/organizations/{organization}/databases/{database}/webhooks/{id}",
2558
+ ...options,
2559
+ });
2560
+ }
2561
+
2562
+ /**
2563
+ * Get a webhook
2564
+ *
2565
+ * ### Authorization
2566
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
2567
+ *
2568
+ * **Service Token Accesses**
2569
+ * `read_database`
2570
+ *
2571
+ * **OAuth Scopes**
2572
+ *
2573
+ * | Resource | Scopes |
2574
+ * | :------- | :---------- |
2575
+ * | Organization | `read_databases` |
2576
+ * | Database | `read_database` |
2577
+ */
2578
+ public getWebhook<ThrowOnError extends boolean = true>(
2579
+ options: Options<GetWebhookData, ThrowOnError>,
2580
+ ) {
2581
+ return (options.client ?? this._client).get<
2582
+ GetWebhookResponses,
2583
+ GetWebhookErrors,
2584
+ ThrowOnError
2585
+ >({
2586
+ url: "/organizations/{organization}/databases/{database}/webhooks/{id}",
2587
+ ...options,
2588
+ });
2589
+ }
2590
+
2591
+ /**
2592
+ * Update a webhook
2593
+ *
2594
+ * ### Authorization
2595
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
2596
+ *
2597
+ * **Service Token Accesses**
2598
+ * `write_database`
2599
+ *
2600
+ * **OAuth Scopes**
2601
+ *
2602
+ * | Resource | Scopes |
2603
+ * | :------- | :---------- |
2604
+ * | Organization | `write_databases` |
2605
+ * | Database | `write_database` |
2606
+ */
2607
+ public updateWebhook<ThrowOnError extends boolean = true>(
2608
+ options: Options<UpdateWebhookData, ThrowOnError>,
2609
+ ) {
2610
+ return (options.client ?? this._client).patch<
2611
+ UpdateWebhookResponses,
2612
+ UpdateWebhookErrors,
2613
+ ThrowOnError
2614
+ >({
2615
+ url: "/organizations/{organization}/databases/{database}/webhooks/{id}",
2616
+ ...options,
2617
+ headers: {
2618
+ "Content-Type": "application/json",
2619
+ ...options.headers,
2620
+ },
2621
+ });
2622
+ }
2623
+
2624
+ /**
2625
+ * Test a webhook
2626
+ * Sends a test event to the webhook
2627
+ * ### Authorization
2628
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
2629
+ *
2630
+ * **Service Token Accesses**
2631
+ * `write_database`
2632
+ *
2633
+ * **OAuth Scopes**
2634
+ *
2635
+ * | Resource | Scopes |
2636
+ * | :------- | :---------- |
2637
+ * | Organization | `write_databases` |
2638
+ * | Database | `write_database` |
2639
+ */
2640
+ public testWebhook<ThrowOnError extends boolean = true>(
2641
+ options: Options<TestWebhookData, ThrowOnError>,
2642
+ ) {
2643
+ return (options.client ?? this._client).post<
2644
+ TestWebhookResponses,
2645
+ TestWebhookErrors,
2646
+ ThrowOnError
2647
+ >({
2648
+ url: "/organizations/{organization}/databases/{database}/webhooks/{id}/test",
2649
+ ...options,
2650
+ });
2651
+ }
2652
+
2653
+ /**
2654
+ * List workflows
2655
+ *
2656
+ *
2657
+ */
2658
+ public listWorkflows<ThrowOnError extends boolean = true>(
2659
+ options: Options<ListWorkflowsData, ThrowOnError>,
2660
+ ) {
2661
+ return (options.client ?? this._client).get<
2662
+ ListWorkflowsResponses,
2663
+ ListWorkflowsErrors,
2664
+ ThrowOnError
2665
+ >({
2666
+ url: "/organizations/{organization}/databases/{database}/workflows",
2667
+ ...options,
2668
+ });
2669
+ }
2670
+
2671
+ /**
2672
+ * Create a workflow
2673
+ *
2674
+ *
2675
+ */
2676
+ public createWorkflow<ThrowOnError extends boolean = true>(
2677
+ options: Options<CreateWorkflowData, ThrowOnError>,
2678
+ ) {
2679
+ return (options.client ?? this._client).post<
2680
+ CreateWorkflowResponses,
2681
+ CreateWorkflowErrors,
2682
+ ThrowOnError
2683
+ >({
2684
+ url: "/organizations/{organization}/databases/{database}/workflows",
2685
+ ...options,
2686
+ headers: {
2687
+ "Content-Type": "application/json",
2688
+ ...options.headers,
2689
+ },
2690
+ });
2691
+ }
2692
+
2693
+ /**
2694
+ * Cancel a workflow
2695
+ *
2696
+ *
2697
+ */
2698
+ public workflowCancel<ThrowOnError extends boolean = true>(
2699
+ options: Options<WorkflowCancelData, ThrowOnError>,
2700
+ ) {
2701
+ return (options.client ?? this._client).delete<
2702
+ WorkflowCancelResponses,
2703
+ WorkflowCancelErrors,
2704
+ ThrowOnError
2705
+ >({
2706
+ url: "/organizations/{organization}/databases/{database}/workflows/{number}",
2707
+ ...options,
2708
+ });
2709
+ }
2710
+
2711
+ /**
2712
+ * Get a workflow
2713
+ *
2714
+ *
2715
+ */
2716
+ public getWorkflow<ThrowOnError extends boolean = true>(
2717
+ options: Options<GetWorkflowData, ThrowOnError>,
2718
+ ) {
2719
+ return (options.client ?? this._client).get<
2720
+ GetWorkflowResponses,
2721
+ GetWorkflowErrors,
2722
+ ThrowOnError
2723
+ >({
2724
+ url: "/organizations/{organization}/databases/{database}/workflows/{number}",
2725
+ ...options,
2726
+ });
2727
+ }
2728
+
2729
+ /**
2730
+ * Complete a workflow
2731
+ *
2732
+ *
2733
+ */
2734
+ public workflowComplete<ThrowOnError extends boolean = true>(
2735
+ options: Options<WorkflowCompleteData, ThrowOnError>,
2736
+ ) {
2737
+ return (options.client ?? this._client).patch<
2738
+ WorkflowCompleteResponses,
2739
+ WorkflowCompleteErrors,
2740
+ ThrowOnError
2741
+ >({
2742
+ url: "/organizations/{organization}/databases/{database}/workflows/{number}/complete",
2743
+ ...options,
2744
+ });
2745
+ }
2746
+
2747
+ /**
2748
+ * Cutover traffic
2749
+ *
2750
+ *
2751
+ */
2752
+ public workflowCutover<ThrowOnError extends boolean = true>(
2753
+ options: Options<WorkflowCutoverData, ThrowOnError>,
2754
+ ) {
2755
+ return (options.client ?? this._client).patch<
2756
+ WorkflowCutoverResponses,
2757
+ WorkflowCutoverErrors,
2758
+ ThrowOnError
2759
+ >({
2760
+ url: "/organizations/{organization}/databases/{database}/workflows/{number}/cutover",
2761
+ ...options,
2762
+ });
2763
+ }
2764
+
2765
+ /**
2766
+ * Retry a failed workflow
2767
+ *
2768
+ *
2769
+ */
2770
+ public workflowRetry<ThrowOnError extends boolean = true>(
2771
+ options: Options<WorkflowRetryData, ThrowOnError>,
2772
+ ) {
2773
+ return (options.client ?? this._client).patch<
2774
+ WorkflowRetryResponses,
2775
+ WorkflowRetryErrors,
2776
+ ThrowOnError
2777
+ >({
2778
+ url: "/organizations/{organization}/databases/{database}/workflows/{number}/retry",
2779
+ ...options,
2780
+ });
2781
+ }
2782
+
2783
+ /**
2784
+ * Reverse traffic cutover
2785
+ *
2786
+ *
2787
+ */
2788
+ public workflowReverseCutover<ThrowOnError extends boolean = true>(
2789
+ options: Options<WorkflowReverseCutoverData, ThrowOnError>,
2790
+ ) {
2791
+ return (options.client ?? this._client).patch<
2792
+ WorkflowReverseCutoverResponses,
2793
+ WorkflowReverseCutoverErrors,
2794
+ ThrowOnError
2795
+ >({
2796
+ url: "/organizations/{organization}/databases/{database}/workflows/{number}/reverse-cutover",
2797
+ ...options,
2798
+ });
2799
+ }
2800
+
2801
+ /**
2802
+ * Reverse traffic
2803
+ *
2804
+ *
2805
+ */
2806
+ public workflowReverseTraffic<ThrowOnError extends boolean = true>(
2807
+ options: Options<WorkflowReverseTrafficData, ThrowOnError>,
2808
+ ) {
2809
+ return (options.client ?? this._client).patch<
2810
+ WorkflowReverseTrafficResponses,
2811
+ WorkflowReverseTrafficErrors,
2812
+ ThrowOnError
2813
+ >({
2814
+ url: "/organizations/{organization}/databases/{database}/workflows/{number}/reverse-traffic",
2815
+ ...options,
2816
+ });
2817
+ }
2818
+
2819
+ /**
2820
+ * Switch primary traffic
2821
+ *
2822
+ *
2823
+ */
2824
+ public workflowSwitchPrimaries<ThrowOnError extends boolean = true>(
2825
+ options: Options<WorkflowSwitchPrimariesData, ThrowOnError>,
2826
+ ) {
2827
+ return (options.client ?? this._client).patch<
2828
+ WorkflowSwitchPrimariesResponses,
2829
+ WorkflowSwitchPrimariesErrors,
2830
+ ThrowOnError
2831
+ >({
2832
+ url: "/organizations/{organization}/databases/{database}/workflows/{number}/switch-primaries",
2833
+ ...options,
2834
+ });
2835
+ }
2836
+
2837
+ /**
2838
+ * Switch replica traffic
2839
+ *
2840
+ *
2841
+ */
2842
+ public workflowSwitchReplicas<ThrowOnError extends boolean = true>(
2843
+ options: Options<WorkflowSwitchReplicasData, ThrowOnError>,
2844
+ ) {
2845
+ return (options.client ?? this._client).patch<
2846
+ WorkflowSwitchReplicasResponses,
2847
+ WorkflowSwitchReplicasErrors,
2848
+ ThrowOnError
2849
+ >({
2850
+ url: "/organizations/{organization}/databases/{database}/workflows/{number}/switch-replicas",
2851
+ ...options,
2852
+ });
2853
+ }
2854
+
2855
+ /**
2856
+ * Verify workflow data
2857
+ *
2858
+ *
2859
+ */
2860
+ public verifyWorkflow<ThrowOnError extends boolean = true>(
2861
+ options: Options<VerifyWorkflowData, ThrowOnError>,
2862
+ ) {
2863
+ return (options.client ?? this._client).patch<
2864
+ VerifyWorkflowResponses,
2865
+ VerifyWorkflowErrors,
2866
+ ThrowOnError
2867
+ >({
2868
+ url: "/organizations/{organization}/databases/{database}/workflows/{number}/verify-data",
2869
+ ...options,
2870
+ });
2871
+ }
2872
+
2873
+ /**
2874
+ * Delete a database
2875
+ *
2876
+ * ### Authorization
2877
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
2878
+ *
2879
+ * **Service Token Accesses**
2880
+ * `delete_database`
2881
+ *
2882
+ * **OAuth Scopes**
2883
+ *
2884
+ * | Resource | Scopes |
2885
+ * | :------- | :---------- |
2886
+ * | Organization | `delete_databases` |
2887
+ * | Database | `delete_database` |
2888
+ */
2889
+ public deleteDatabase<ThrowOnError extends boolean = true>(
2890
+ options: Options<DeleteDatabaseData, ThrowOnError>,
2891
+ ) {
2892
+ return (options.client ?? this._client).delete<
2893
+ DeleteDatabaseResponses,
2894
+ DeleteDatabaseErrors,
2895
+ ThrowOnError
2896
+ >({
2897
+ url: "/organizations/{organization}/databases/{name}",
2898
+ ...options,
2899
+ });
2900
+ }
2901
+
2902
+ /**
2903
+ * Get a database
2904
+ *
2905
+ * ### Authorization
2906
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
2907
+ *
2908
+ * **Service Token Accesses**
2909
+ * `read_database`, `delete_database`, `write_database`, `read_branch`, `delete_branch`, `create_branch`, `delete_production_branch`, `connect_branch`, `connect_production_branch`, `delete_branch_password`, `delete_production_branch_password`, `read_deploy_request`, `create_deploy_request`, `approve_deploy_request`, `read_schema_recommendations`, `close_schema_recommendations`, `read_comment`, `create_comment`, `restore_backup`, `restore_production_branch_backup`, `read_backups`, `write_backups`, `delete_backups`, `delete_production_branch_backups`, `write_branch_vschema`, `write_production_branch_vschema`
2910
+ *
2911
+ * **OAuth Scopes**
2912
+ *
2913
+ * | Resource | Scopes |
2914
+ * | :------- | :---------- |
2915
+ * | Organization | `read_databases` |
2916
+ * | Database | `read_database` |
2917
+ */
2918
+ public getDatabase<ThrowOnError extends boolean = true>(
2919
+ options: Options<GetDatabaseData, ThrowOnError>,
2920
+ ) {
2921
+ return (options.client ?? this._client).get<
2922
+ GetDatabaseResponses,
2923
+ GetDatabaseErrors,
2924
+ ThrowOnError
2925
+ >({
2926
+ url: "/organizations/{organization}/databases/{name}",
2927
+ ...options,
2928
+ });
2929
+ }
2930
+
2931
+ /**
2932
+ * Update database settings
2933
+ *
2934
+ * ### Authorization
2935
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
2936
+ *
2937
+ * **Service Token Accesses**
2938
+ * `write_database`
2939
+ *
2940
+ * **OAuth Scopes**
2941
+ *
2942
+ * | Resource | Scopes |
2943
+ * | :------- | :---------- |
2944
+ * | Organization | `write_databases` |
2945
+ * | Database | `write_database` |
2946
+ */
2947
+ public updateDatabaseSettings<ThrowOnError extends boolean = true>(
2948
+ options: Options<UpdateDatabaseSettingsData, ThrowOnError>,
2949
+ ) {
2950
+ return (options.client ?? this._client).patch<
2951
+ UpdateDatabaseSettingsResponses,
2952
+ UpdateDatabaseSettingsErrors,
2953
+ ThrowOnError
2954
+ >({
2955
+ url: "/organizations/{organization}/databases/{name}",
2956
+ ...options,
2957
+ headers: {
2958
+ "Content-Type": "application/json",
2959
+ ...options.headers,
2960
+ },
2961
+ });
2962
+ }
2963
+
2964
+ /**
2965
+ * List read-only regions
2966
+ * List read-only regions for the database's default branch
2967
+ * ### Authorization
2968
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
2969
+ *
2970
+ * **Service Token Accesses**
2971
+ * `read_database`, `delete_database`, `write_database`, `read_branch`, `delete_branch`, `create_branch`, `delete_production_branch`, `connect_branch`, `connect_production_branch`, `delete_branch_password`, `delete_production_branch_password`, `read_deploy_request`, `create_deploy_request`, `approve_deploy_request`, `read_schema_recommendations`, `close_schema_recommendations`, `read_comment`, `create_comment`, `restore_backup`, `restore_production_branch_backup`, `read_backups`, `write_backups`, `delete_backups`, `delete_production_branch_backups`, `write_branch_vschema`, `write_production_branch_vschema`
2972
+ *
2973
+ * **OAuth Scopes**
2974
+ *
2975
+ * | Resource | Scopes |
2976
+ * | :------- | :---------- |
2977
+ * | Organization | `read_branches` |
2978
+ * | Database | `read_branches` |
2979
+ */
2980
+ public listReadOnlyRegions<ThrowOnError extends boolean = true>(
2981
+ options: Options<ListReadOnlyRegionsData, ThrowOnError>,
2982
+ ) {
2983
+ return (options.client ?? this._client).get<
2984
+ ListReadOnlyRegionsResponses,
2985
+ ListReadOnlyRegionsErrors,
2986
+ ThrowOnError
2987
+ >({
2988
+ url: "/organizations/{organization}/databases/{name}/read-only-regions",
2989
+ ...options,
2990
+ });
2991
+ }
2992
+
2993
+ /**
2994
+ * List database regions
2995
+ *
2996
+ * ### Authorization
2997
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
2998
+ *
2999
+ * **Service Token Accesses**
3000
+ * `read_database`, `delete_database`, `write_database`, `read_branch`, `delete_branch`, `create_branch`, `delete_production_branch`, `connect_branch`, `connect_production_branch`, `delete_branch_password`, `delete_production_branch_password`, `read_deploy_request`, `create_deploy_request`, `approve_deploy_request`, `read_schema_recommendations`, `close_schema_recommendations`, `read_comment`, `create_comment`, `restore_backup`, `restore_production_branch_backup`, `read_backups`, `write_backups`, `delete_backups`, `delete_production_branch_backups`, `write_branch_vschema`, `write_production_branch_vschema`
3001
+ *
3002
+ * **OAuth Scopes**
3003
+ *
3004
+ * | Resource | Scopes |
3005
+ * | :------- | :---------- |
3006
+ * | Organization | `read_databases` |
3007
+ * | Database | `read_database` |
3008
+ */
3009
+ public listDatabaseRegions<ThrowOnError extends boolean = true>(
3010
+ options: Options<ListDatabaseRegionsData, ThrowOnError>,
3011
+ ) {
3012
+ return (options.client ?? this._client).get<
3013
+ ListDatabaseRegionsResponses,
3014
+ ListDatabaseRegionsErrors,
3015
+ ThrowOnError
3016
+ >({
3017
+ url: "/organizations/{organization}/databases/{name}/regions",
3018
+ ...options,
3019
+ });
3020
+ }
3021
+
3022
+ /**
3023
+ * Get invoices
3024
+ * Get the invoices for an organization
3025
+ * ### Authorization
3026
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
3027
+ *
3028
+ * **Service Token Accesses**
3029
+ * `read_invoices`
3030
+ *
3031
+ * **OAuth Scopes**
3032
+ *
3033
+ * | Resource | Scopes |
3034
+ * | :------- | :---------- |
3035
+ * | Organization | `read_invoices` |
3036
+ */
3037
+ public listInvoices<ThrowOnError extends boolean = true>(
3038
+ options: Options<ListInvoicesData, ThrowOnError>,
3039
+ ) {
3040
+ return (options.client ?? this._client).get<
3041
+ ListInvoicesResponses,
3042
+ ListInvoicesErrors,
3043
+ ThrowOnError
3044
+ >({
3045
+ url: "/organizations/{organization}/invoices",
3046
+ ...options,
3047
+ });
3048
+ }
3049
+
3050
+ /**
3051
+ * Get an invoice
3052
+ *
3053
+ * ### Authorization
3054
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
3055
+ *
3056
+ * **Service Token Accesses**
3057
+ * `read_invoices`
3058
+ *
3059
+ * **OAuth Scopes**
3060
+ *
3061
+ * | Resource | Scopes |
3062
+ * | :------- | :---------- |
3063
+ * | Organization | `read_invoices` |
3064
+ */
3065
+ public getInvoice<ThrowOnError extends boolean = true>(
3066
+ options: Options<GetInvoiceData, ThrowOnError>,
3067
+ ) {
3068
+ return (options.client ?? this._client).get<
3069
+ GetInvoiceResponses,
3070
+ GetInvoiceErrors,
3071
+ ThrowOnError
3072
+ >({
3073
+ url: "/organizations/{organization}/invoices/{id}",
3074
+ ...options,
3075
+ });
3076
+ }
3077
+
3078
+ /**
3079
+ * Get invoice line items
3080
+ * Get the line items for an invoice
3081
+ * ### Authorization
3082
+ * A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
3083
+ *
3084
+ * **Service Token Accesses**
3085
+ * `read_invoices`
3086
+ *
3087
+ * **OAuth Scopes**
3088
+ *
3089
+ * | Resource | Scopes |
3090
+ * | :------- | :---------- |
3091
+ * | Organization | `read_invoices` |
3092
+ */
3093
+ public getInvoiceLineItems<ThrowOnError extends boolean = true>(
3094
+ options: Options<GetInvoiceLineItemsData, ThrowOnError>,
3095
+ ) {
3096
+ return (options.client ?? this._client).get<
3097
+ GetInvoiceLineItemsResponses,
3098
+ GetInvoiceLineItemsErrors,
3099
+ ThrowOnError
3100
+ >({
3101
+ url: "/organizations/{organization}/invoices/{id}/line-items",
3102
+ ...options,
3103
+ });
3104
+ }
3105
+
3106
+ /**
3107
+ * List organization members
3108
+ *
3109
+ * ### Authorization
3110
+ * A service token must have at least one of the following access in order to use this API endpoint:
3111
+ *
3112
+ * **Service Token Accesses**
3113
+ * `read_organization`
3114
+ *
3115
+ *
3116
+ */
3117
+ public listOrganizationMembers<ThrowOnError extends boolean = true>(
3118
+ options: Options<ListOrganizationMembersData, ThrowOnError>,
3119
+ ) {
3120
+ return (options.client ?? this._client).get<
3121
+ ListOrganizationMembersResponses,
3122
+ ListOrganizationMembersErrors,
3123
+ ThrowOnError
3124
+ >({
3125
+ url: "/organizations/{organization}/members",
3126
+ ...options,
3127
+ });
3128
+ }
3129
+
3130
+ /**
3131
+ * List OAuth applications
3132
+ *
3133
+ * ### Authorization
3134
+ * A service token must have at least one of the following access in order to use this API endpoint:
3135
+ *
3136
+ * **Service Token Accesses**
3137
+ * `read_oauth_applications`
3138
+ *
3139
+ *
3140
+ */
3141
+ public listOauthApplications<ThrowOnError extends boolean = true>(
3142
+ options: Options<ListOauthApplicationsData, ThrowOnError>,
3143
+ ) {
3144
+ return (options.client ?? this._client).get<
3145
+ ListOauthApplicationsResponses,
3146
+ ListOauthApplicationsErrors,
3147
+ ThrowOnError
3148
+ >({
3149
+ url: "/organizations/{organization}/oauth-applications",
3150
+ ...options,
3151
+ });
3152
+ }
3153
+
3154
+ /**
3155
+ * Get an OAuth application
3156
+ *
3157
+ * ### Authorization
3158
+ * A service token must have at least one of the following access in order to use this API endpoint:
3159
+ *
3160
+ * **Service Token Accesses**
3161
+ * `read_oauth_applications`
3162
+ *
3163
+ *
3164
+ */
3165
+ public getOauthApplication<ThrowOnError extends boolean = true>(
3166
+ options: Options<GetOauthApplicationData, ThrowOnError>,
3167
+ ) {
3168
+ return (options.client ?? this._client).get<
3169
+ GetOauthApplicationResponses,
3170
+ GetOauthApplicationErrors,
3171
+ ThrowOnError
3172
+ >({
3173
+ url: "/organizations/{organization}/oauth-applications/{application_id}",
3174
+ ...options,
3175
+ });
3176
+ }
3177
+
3178
+ /**
3179
+ * List OAuth tokens
3180
+ * List OAuth tokens created by an OAuth application
3181
+ * ### Authorization
3182
+ * A service token must have at least one of the following access in order to use this API endpoint:
3183
+ *
3184
+ * **Service Token Accesses**
3185
+ * `read_oauth_tokens`
3186
+ *
3187
+ *
3188
+ */
3189
+ public listOauthTokens<ThrowOnError extends boolean = true>(
3190
+ options: Options<ListOauthTokensData, ThrowOnError>,
3191
+ ) {
3192
+ return (options.client ?? this._client).get<
3193
+ ListOauthTokensResponses,
3194
+ ListOauthTokensErrors,
3195
+ ThrowOnError
3196
+ >({
3197
+ url: "/organizations/{organization}/oauth-applications/{application_id}/tokens",
3198
+ ...options,
3199
+ });
3200
+ }
3201
+
3202
+ /**
3203
+ * Delete an OAuth token
3204
+ *
3205
+ * ### Authorization
3206
+ * A service token must have at least one of the following access in order to use this API endpoint:
3207
+ *
3208
+ * **Service Token Accesses**
3209
+ * `delete_oauth_tokens`
3210
+ *
3211
+ *
3212
+ */
3213
+ public deleteOauthToken<ThrowOnError extends boolean = true>(
3214
+ options: Options<DeleteOauthTokenData, ThrowOnError>,
3215
+ ) {
3216
+ return (options.client ?? this._client).delete<
3217
+ DeleteOauthTokenResponses,
3218
+ DeleteOauthTokenErrors,
3219
+ ThrowOnError
3220
+ >({
3221
+ url: "/organizations/{organization}/oauth-applications/{application_id}/tokens/{token_id}",
3222
+ ...options,
3223
+ });
3224
+ }
3225
+
3226
+ /**
3227
+ * Get an OAuth token
3228
+ *
3229
+ * ### Authorization
3230
+ * A service token must have at least one of the following access in order to use this API endpoint:
3231
+ *
3232
+ * **Service Token Accesses**
3233
+ * `read_oauth_tokens`
3234
+ *
3235
+ *
3236
+ */
3237
+ public getOauthToken<ThrowOnError extends boolean = true>(
3238
+ options: Options<GetOauthTokenData, ThrowOnError>,
3239
+ ) {
3240
+ return (options.client ?? this._client).get<
3241
+ GetOauthTokenResponses,
3242
+ GetOauthTokenErrors,
3243
+ ThrowOnError
3244
+ >({
3245
+ url: "/organizations/{organization}/oauth-applications/{application_id}/tokens/{token_id}",
3246
+ ...options,
3247
+ });
3248
+ }
3249
+
3250
+ /**
3251
+ * Create or renew an OAuth token
3252
+ * Create an OAuth token from an authorization grant code, or refresh an OAuth token from a refresh token
3253
+ * ### Authorization
3254
+ * A service token must have at least one of the following access in order to use this API endpoint:
3255
+ *
3256
+ * **Service Token Accesses**
3257
+ * `write_oauth_tokens`
3258
+ *
3259
+ *
3260
+ */
3261
+ public createOauthToken<ThrowOnError extends boolean = true>(
3262
+ options: Options<CreateOauthTokenData, ThrowOnError>,
3263
+ ) {
3264
+ return (options.client ?? this._client).post<
3265
+ CreateOauthTokenResponses,
3266
+ CreateOauthTokenErrors,
3267
+ ThrowOnError
3268
+ >({
3269
+ url: "/organizations/{organization}/oauth-applications/{id}/token",
3270
+ ...options,
3271
+ headers: {
3272
+ "Content-Type": "application/json",
3273
+ ...options.headers,
3274
+ },
3275
+ });
3276
+ }
3277
+
3278
+ /**
3279
+ * List public regions
3280
+ * Endpoint is available without authentication.
3281
+ *
3282
+ */
3283
+ public listPublicRegions<ThrowOnError extends boolean = true>(
3284
+ options?: Options<ListPublicRegionsData, ThrowOnError>,
3285
+ ) {
3286
+ return (options?.client ?? this._client).get<
3287
+ ListPublicRegionsResponses,
3288
+ ListPublicRegionsErrors,
3289
+ ThrowOnError
3290
+ >({
3291
+ url: "/regions",
3292
+ ...options,
3293
+ });
3294
+ }
3295
+
3296
+ /**
3297
+ * Get current user
3298
+ * Get the user associated with this service token
3299
+ * ### Authorization
3300
+ * A OAuth token must have at least one of the following scopes in order to use this API endpoint:
3301
+ *
3302
+ * **OAuth Scopes**
3303
+ *
3304
+ * | Resource | Scopes |
3305
+ * | :------- | :---------- |
3306
+ * | User | `read_user` |
3307
+ */
3308
+ public getCurrentUser<ThrowOnError extends boolean = true>(
3309
+ options?: Options<GetCurrentUserData, ThrowOnError>,
3310
+ ) {
3311
+ return (options?.client ?? this._client).get<
3312
+ GetCurrentUserResponses,
3313
+ GetCurrentUserErrors,
3314
+ ThrowOnError
3315
+ >({
3316
+ url: "/user",
3317
+ ...options,
3318
+ });
3319
+ }
3320
+
3321
+ /**
3322
+ * List keyspace resizes
3323
+ */
3324
+ public listKeyspaceResizes<ThrowOnError extends boolean = true>(
3325
+ options: Options<ListKeyspaceResizesData, ThrowOnError>,
3326
+ ) {
3327
+ return (options.client ?? this._client).get<
3328
+ ListKeyspaceResizesResponses,
3329
+ ListKeyspaceResizesErrors,
3330
+ ThrowOnError
3331
+ >({
3332
+ url: "/organizations/{organization}/databases/{database}/branches/{branch}/keyspaces/{name}/resizes",
3333
+ ...options,
3334
+ });
3335
+ }
3336
+ }