@distilled.cloud/cloudflare 0.0.0 → 0.2.0-alpha

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 (560) hide show
  1. package/lib/auth.d.ts +13 -0
  2. package/lib/auth.d.ts.map +1 -0
  3. package/lib/auth.js +12 -0
  4. package/lib/auth.js.map +1 -0
  5. package/lib/category.d.ts +2 -0
  6. package/lib/category.d.ts.map +1 -0
  7. package/lib/category.js +2 -0
  8. package/lib/category.js.map +1 -0
  9. package/lib/client/api.d.ts +14 -0
  10. package/lib/client/api.d.ts.map +1 -0
  11. package/lib/client/api.js +197 -0
  12. package/lib/client/api.js.map +1 -0
  13. package/lib/client/index.d.ts +8 -0
  14. package/lib/client/index.d.ts.map +1 -0
  15. package/lib/client/index.js +8 -0
  16. package/lib/client/index.js.map +1 -0
  17. package/lib/credentials.d.ts +14 -0
  18. package/lib/credentials.d.ts.map +1 -0
  19. package/lib/credentials.js +17 -0
  20. package/lib/credentials.js.map +1 -0
  21. package/lib/errors.d.ts +48 -0
  22. package/lib/errors.d.ts.map +1 -0
  23. package/lib/errors.js +38 -0
  24. package/lib/errors.js.map +1 -0
  25. package/lib/index.d.ts +10 -0
  26. package/lib/index.d.ts.map +1 -0
  27. package/lib/index.js +10 -0
  28. package/lib/index.js.map +1 -0
  29. package/lib/retry.d.ts +14 -0
  30. package/lib/retry.d.ts.map +1 -0
  31. package/lib/retry.js +14 -0
  32. package/lib/retry.js.map +1 -0
  33. package/lib/schemas.d.ts +29 -0
  34. package/lib/schemas.d.ts.map +1 -0
  35. package/lib/schemas.js +34 -0
  36. package/lib/schemas.js.map +1 -0
  37. package/lib/services/abuse-reports.d.ts +224 -0
  38. package/lib/services/abuse-reports.d.ts.map +1 -0
  39. package/lib/services/abuse-reports.js +353 -0
  40. package/lib/services/abuse-reports.js.map +1 -0
  41. package/lib/services/accounts.d.ts +682 -0
  42. package/lib/services/accounts.d.ts.map +1 -0
  43. package/lib/services/accounts.js +805 -0
  44. package/lib/services/accounts.js.map +1 -0
  45. package/lib/services/acm.d.ts +73 -0
  46. package/lib/services/acm.d.ts.map +1 -0
  47. package/lib/services/acm.js +76 -0
  48. package/lib/services/acm.js.map +1 -0
  49. package/lib/services/addressing.d.ts +1208 -0
  50. package/lib/services/addressing.d.ts.map +1 -0
  51. package/lib/services/addressing.js +1776 -0
  52. package/lib/services/addressing.js.map +1 -0
  53. package/lib/services/ai-gateway.d.ts +956 -0
  54. package/lib/services/ai-gateway.d.ts.map +1 -0
  55. package/lib/services/ai-gateway.js +1706 -0
  56. package/lib/services/ai-gateway.js.map +1 -0
  57. package/lib/services/ai.d.ts +243 -0
  58. package/lib/services/ai.d.ts.map +1 -0
  59. package/lib/services/ai.js +299 -0
  60. package/lib/services/ai.js.map +1 -0
  61. package/lib/services/aisearch.d.ts +915 -0
  62. package/lib/services/aisearch.d.ts.map +1 -0
  63. package/lib/services/aisearch.js +2425 -0
  64. package/lib/services/aisearch.js.map +1 -0
  65. package/lib/services/alerting.d.ts +718 -0
  66. package/lib/services/alerting.d.ts.map +1 -0
  67. package/lib/services/alerting.js +1388 -0
  68. package/lib/services/alerting.js.map +1 -0
  69. package/lib/services/api-gateway.d.ts +830 -0
  70. package/lib/services/api-gateway.d.ts.map +1 -0
  71. package/lib/services/api-gateway.js +1548 -0
  72. package/lib/services/api-gateway.js.map +1 -0
  73. package/lib/services/argo.d.ts +101 -0
  74. package/lib/services/argo.d.ts.map +1 -0
  75. package/lib/services/argo.js +105 -0
  76. package/lib/services/argo.js.map +1 -0
  77. package/lib/services/audit-logs.d.ts +46 -0
  78. package/lib/services/audit-logs.d.ts.map +1 -0
  79. package/lib/services/audit-logs.js +37 -0
  80. package/lib/services/audit-logs.js.map +1 -0
  81. package/lib/services/billing.d.ts +62 -0
  82. package/lib/services/billing.d.ts.map +1 -0
  83. package/lib/services/billing.js +100 -0
  84. package/lib/services/billing.js.map +1 -0
  85. package/lib/services/bot-management.d.ts +124 -0
  86. package/lib/services/bot-management.d.ts.map +1 -0
  87. package/lib/services/bot-management.js +262 -0
  88. package/lib/services/bot-management.js.map +1 -0
  89. package/lib/services/botnet-feed.d.ts +65 -0
  90. package/lib/services/botnet-feed.d.ts.map +1 -0
  91. package/lib/services/botnet-feed.js +84 -0
  92. package/lib/services/botnet-feed.js.map +1 -0
  93. package/lib/services/brand-protection.d.ts +188 -0
  94. package/lib/services/brand-protection.d.ts.map +1 -0
  95. package/lib/services/brand-protection.js +214 -0
  96. package/lib/services/brand-protection.js.map +1 -0
  97. package/lib/services/browser-rendering.d.ts +857 -0
  98. package/lib/services/browser-rendering.d.ts.map +1 -0
  99. package/lib/services/browser-rendering.js +1141 -0
  100. package/lib/services/browser-rendering.js.map +1 -0
  101. package/lib/services/cache.d.ts +287 -0
  102. package/lib/services/cache.d.ts.map +1 -0
  103. package/lib/services/cache.js +330 -0
  104. package/lib/services/cache.js.map +1 -0
  105. package/lib/services/calls.d.ts +202 -0
  106. package/lib/services/calls.d.ts.map +1 -0
  107. package/lib/services/calls.js +175 -0
  108. package/lib/services/calls.js.map +1 -0
  109. package/lib/services/certificate-authorities.d.ts +40 -0
  110. package/lib/services/certificate-authorities.d.ts.map +1 -0
  111. package/lib/services/certificate-authorities.js +49 -0
  112. package/lib/services/certificate-authorities.js.map +1 -0
  113. package/lib/services/client-certificates.d.ts +254 -0
  114. package/lib/services/client-certificates.d.ts.map +1 -0
  115. package/lib/services/client-certificates.js +350 -0
  116. package/lib/services/client-certificates.js.map +1 -0
  117. package/lib/services/cloud-connector.d.ts +59 -0
  118. package/lib/services/cloud-connector.d.ts.map +1 -0
  119. package/lib/services/cloud-connector.js +84 -0
  120. package/lib/services/cloud-connector.js.map +1 -0
  121. package/lib/services/cloudforce-one.d.ts +1318 -0
  122. package/lib/services/cloudforce-one.d.ts.map +1 -0
  123. package/lib/services/cloudforce-one.js +1684 -0
  124. package/lib/services/cloudforce-one.js.map +1 -0
  125. package/lib/services/connectivity.d.ts +248 -0
  126. package/lib/services/connectivity.d.ts.map +1 -0
  127. package/lib/services/connectivity.js +377 -0
  128. package/lib/services/connectivity.js.map +1 -0
  129. package/lib/services/content-scanning.d.ts +131 -0
  130. package/lib/services/content-scanning.d.ts.map +1 -0
  131. package/lib/services/content-scanning.js +156 -0
  132. package/lib/services/content-scanning.js.map +1 -0
  133. package/lib/services/custom-certificates.d.ts +211 -0
  134. package/lib/services/custom-certificates.d.ts.map +1 -0
  135. package/lib/services/custom-certificates.js +309 -0
  136. package/lib/services/custom-certificates.js.map +1 -0
  137. package/lib/services/custom-hostnames.d.ts +525 -0
  138. package/lib/services/custom-hostnames.d.ts.map +1 -0
  139. package/lib/services/custom-hostnames.js +1164 -0
  140. package/lib/services/custom-hostnames.js.map +1 -0
  141. package/lib/services/custom-nameservers.d.ts +67 -0
  142. package/lib/services/custom-nameservers.d.ts.map +1 -0
  143. package/lib/services/custom-nameservers.js +80 -0
  144. package/lib/services/custom-nameservers.js.map +1 -0
  145. package/lib/services/custom-pages.d.ts +74 -0
  146. package/lib/services/custom-pages.d.ts.map +1 -0
  147. package/lib/services/custom-pages.js +125 -0
  148. package/lib/services/custom-pages.js.map +1 -0
  149. package/lib/services/d1.d.ts +326 -0
  150. package/lib/services/d1.d.ts.map +1 -0
  151. package/lib/services/d1.js +448 -0
  152. package/lib/services/d1.js.map +1 -0
  153. package/lib/services/dcv-delegation.d.ts +24 -0
  154. package/lib/services/dcv-delegation.d.ts.map +1 -0
  155. package/lib/services/dcv-delegation.js +24 -0
  156. package/lib/services/dcv-delegation.js.map +1 -0
  157. package/lib/services/diagnostics.d.ts +175 -0
  158. package/lib/services/diagnostics.d.ts.map +1 -0
  159. package/lib/services/diagnostics.js +273 -0
  160. package/lib/services/diagnostics.js.map +1 -0
  161. package/lib/services/dns-firewall.d.ts +288 -0
  162. package/lib/services/dns-firewall.d.ts.map +1 -0
  163. package/lib/services/dns-firewall.js +373 -0
  164. package/lib/services/dns-firewall.js.map +1 -0
  165. package/lib/services/dns.d.ts +2946 -0
  166. package/lib/services/dns.d.ts.map +1 -0
  167. package/lib/services/dns.js +4511 -0
  168. package/lib/services/dns.js.map +1 -0
  169. package/lib/services/durable-objects.d.ts +61 -0
  170. package/lib/services/durable-objects.d.ts.map +1 -0
  171. package/lib/services/durable-objects.js +66 -0
  172. package/lib/services/durable-objects.js.map +1 -0
  173. package/lib/services/email-routing.d.ts +542 -0
  174. package/lib/services/email-routing.d.ts.map +1 -0
  175. package/lib/services/email-routing.js +662 -0
  176. package/lib/services/email-routing.js.map +1 -0
  177. package/lib/services/email-security.d.ts +1131 -0
  178. package/lib/services/email-security.d.ts.map +1 -0
  179. package/lib/services/email-security.js +2065 -0
  180. package/lib/services/email-security.js.map +1 -0
  181. package/lib/services/filters.d.ts +157 -0
  182. package/lib/services/filters.d.ts.map +1 -0
  183. package/lib/services/filters.js +135 -0
  184. package/lib/services/filters.js.map +1 -0
  185. package/lib/services/firewall.d.ts +1080 -0
  186. package/lib/services/firewall.d.ts.map +1 -0
  187. package/lib/services/firewall.js +1881 -0
  188. package/lib/services/firewall.js.map +1 -0
  189. package/lib/services/healthchecks.d.ts +464 -0
  190. package/lib/services/healthchecks.d.ts.map +1 -0
  191. package/lib/services/healthchecks.js +838 -0
  192. package/lib/services/healthchecks.js.map +1 -0
  193. package/lib/services/hostnames.d.ts +74 -0
  194. package/lib/services/hostnames.d.ts.map +1 -0
  195. package/lib/services/hostnames.js +100 -0
  196. package/lib/services/hostnames.js.map +1 -0
  197. package/lib/services/hyperdrive.d.ts +203 -0
  198. package/lib/services/hyperdrive.d.ts.map +1 -0
  199. package/lib/services/hyperdrive.js +299 -0
  200. package/lib/services/hyperdrive.js.map +1 -0
  201. package/lib/services/iam.d.ts +554 -0
  202. package/lib/services/iam.d.ts.map +1 -0
  203. package/lib/services/iam.js +743 -0
  204. package/lib/services/iam.js.map +1 -0
  205. package/lib/services/images.d.ts +403 -0
  206. package/lib/services/images.d.ts.map +1 -0
  207. package/lib/services/images.js +417 -0
  208. package/lib/services/images.js.map +1 -0
  209. package/lib/services/intel.d.ts +768 -0
  210. package/lib/services/intel.d.ts.map +1 -0
  211. package/lib/services/intel.js +1179 -0
  212. package/lib/services/intel.js.map +1 -0
  213. package/lib/services/ips.d.ts +28 -0
  214. package/lib/services/ips.d.ts.map +1 -0
  215. package/lib/services/ips.js +39 -0
  216. package/lib/services/ips.js.map +1 -0
  217. package/lib/services/keyless-certificates.d.ts +177 -0
  218. package/lib/services/keyless-certificates.d.ts.map +1 -0
  219. package/lib/services/keyless-certificates.js +216 -0
  220. package/lib/services/keyless-certificates.js.map +1 -0
  221. package/lib/services/kv.d.ts +339 -0
  222. package/lib/services/kv.d.ts.map +1 -0
  223. package/lib/services/kv.js +402 -0
  224. package/lib/services/kv.js.map +1 -0
  225. package/lib/services/leaked-credential-checks.d.ts +119 -0
  226. package/lib/services/leaked-credential-checks.d.ts.map +1 -0
  227. package/lib/services/leaked-credential-checks.js +130 -0
  228. package/lib/services/leaked-credential-checks.js.map +1 -0
  229. package/lib/services/load-balancers.d.ts +1767 -0
  230. package/lib/services/load-balancers.d.ts.map +1 -0
  231. package/lib/services/load-balancers.js +3068 -0
  232. package/lib/services/load-balancers.js.map +1 -0
  233. package/lib/services/logpush.d.ts +401 -0
  234. package/lib/services/logpush.d.ts.map +1 -0
  235. package/lib/services/logpush.js +724 -0
  236. package/lib/services/logpush.js.map +1 -0
  237. package/lib/services/logs.d.ts +125 -0
  238. package/lib/services/logs.d.ts.map +1 -0
  239. package/lib/services/logs.js +145 -0
  240. package/lib/services/logs.js.map +1 -0
  241. package/lib/services/magic-cloud-networking.d.ts +1599 -0
  242. package/lib/services/magic-cloud-networking.d.ts.map +1 -0
  243. package/lib/services/magic-cloud-networking.js +5205 -0
  244. package/lib/services/magic-cloud-networking.js.map +1 -0
  245. package/lib/services/magic-network-monitoring.d.ts +379 -0
  246. package/lib/services/magic-network-monitoring.d.ts.map +1 -0
  247. package/lib/services/magic-network-monitoring.js +535 -0
  248. package/lib/services/magic-network-monitoring.js.map +1 -0
  249. package/lib/services/magic-transit.d.ts +3650 -0
  250. package/lib/services/magic-transit.d.ts.map +1 -0
  251. package/lib/services/magic-transit.js +6120 -0
  252. package/lib/services/magic-transit.js.map +1 -0
  253. package/lib/services/managed-transforms.d.ts +79 -0
  254. package/lib/services/managed-transforms.d.ts.map +1 -0
  255. package/lib/services/managed-transforms.js +107 -0
  256. package/lib/services/managed-transforms.js.map +1 -0
  257. package/lib/services/memberships.d.ts +172 -0
  258. package/lib/services/memberships.d.ts.map +1 -0
  259. package/lib/services/memberships.js +282 -0
  260. package/lib/services/memberships.js.map +1 -0
  261. package/lib/services/mtls-certificates.d.ts +140 -0
  262. package/lib/services/mtls-certificates.d.ts.map +1 -0
  263. package/lib/services/mtls-certificates.js +173 -0
  264. package/lib/services/mtls-certificates.js.map +1 -0
  265. package/lib/services/network-interconnects.d.ts +410 -0
  266. package/lib/services/network-interconnects.d.ts.map +1 -0
  267. package/lib/services/network-interconnects.js +583 -0
  268. package/lib/services/network-interconnects.js.map +1 -0
  269. package/lib/services/organizations.d.ts +201 -0
  270. package/lib/services/organizations.d.ts.map +1 -0
  271. package/lib/services/organizations.js +355 -0
  272. package/lib/services/organizations.js.map +1 -0
  273. package/lib/services/origin-ca-certificates.d.ts +99 -0
  274. package/lib/services/origin-ca-certificates.d.ts.map +1 -0
  275. package/lib/services/origin-ca-certificates.js +156 -0
  276. package/lib/services/origin-ca-certificates.js.map +1 -0
  277. package/lib/services/origin-post-quantum-encryption.d.ts +50 -0
  278. package/lib/services/origin-post-quantum-encryption.d.ts.map +1 -0
  279. package/lib/services/origin-post-quantum-encryption.js +60 -0
  280. package/lib/services/origin-post-quantum-encryption.js.map +1 -0
  281. package/lib/services/origin-tls-client-auth.d.ts +273 -0
  282. package/lib/services/origin-tls-client-auth.d.ts.map +1 -0
  283. package/lib/services/origin-tls-client-auth.js +401 -0
  284. package/lib/services/origin-tls-client-auth.js.map +1 -0
  285. package/lib/services/page-rules.d.ts +773 -0
  286. package/lib/services/page-rules.d.ts.map +1 -0
  287. package/lib/services/page-rules.js +1365 -0
  288. package/lib/services/page-rules.js.map +1 -0
  289. package/lib/services/page-shield.d.ts +426 -0
  290. package/lib/services/page-shield.d.ts.map +1 -0
  291. package/lib/services/page-shield.js +484 -0
  292. package/lib/services/page-shield.js.map +1 -0
  293. package/lib/services/pages.d.ts +1654 -0
  294. package/lib/services/pages.d.ts.map +1 -0
  295. package/lib/services/pages.js +2954 -0
  296. package/lib/services/pages.js.map +1 -0
  297. package/lib/services/pipelines.d.ts +1461 -0
  298. package/lib/services/pipelines.d.ts.map +1 -0
  299. package/lib/services/pipelines.js +2912 -0
  300. package/lib/services/pipelines.js.map +1 -0
  301. package/lib/services/queues.d.ts +807 -0
  302. package/lib/services/queues.d.ts.map +1 -0
  303. package/lib/services/queues.js +1194 -0
  304. package/lib/services/queues.js.map +1 -0
  305. package/lib/services/r2-data-catalog.d.ts +341 -0
  306. package/lib/services/r2-data-catalog.d.ts.map +1 -0
  307. package/lib/services/r2-data-catalog.js +499 -0
  308. package/lib/services/r2-data-catalog.js.map +1 -0
  309. package/lib/services/r2.d.ts +1041 -0
  310. package/lib/services/r2.d.ts.map +1 -0
  311. package/lib/services/r2.js +1384 -0
  312. package/lib/services/r2.js.map +1 -0
  313. package/lib/services/radar.d.ts +9276 -0
  314. package/lib/services/radar.d.ts.map +1 -0
  315. package/lib/services/radar.js +20491 -0
  316. package/lib/services/radar.js.map +1 -0
  317. package/lib/services/rate-limits.d.ts +315 -0
  318. package/lib/services/rate-limits.d.ts.map +1 -0
  319. package/lib/services/rate-limits.js +521 -0
  320. package/lib/services/rate-limits.js.map +1 -0
  321. package/lib/services/realtime-kit.d.ts +2728 -0
  322. package/lib/services/realtime-kit.d.ts.map +1 -0
  323. package/lib/services/realtime-kit.js +5401 -0
  324. package/lib/services/realtime-kit.js.map +1 -0
  325. package/lib/services/registrar.d.ts +81 -0
  326. package/lib/services/registrar.d.ts.map +1 -0
  327. package/lib/services/registrar.js +154 -0
  328. package/lib/services/registrar.js.map +1 -0
  329. package/lib/services/request-tracers.d.ts +61 -0
  330. package/lib/services/request-tracers.d.ts.map +1 -0
  331. package/lib/services/request-tracers.js +82 -0
  332. package/lib/services/request-tracers.js.map +1 -0
  333. package/lib/services/resource-sharing.d.ts +540 -0
  334. package/lib/services/resource-sharing.d.ts.map +1 -0
  335. package/lib/services/resource-sharing.js +846 -0
  336. package/lib/services/resource-sharing.js.map +1 -0
  337. package/lib/services/rules.d.ts +297 -0
  338. package/lib/services/rules.d.ts.map +1 -0
  339. package/lib/services/rules.js +396 -0
  340. package/lib/services/rules.js.map +1 -0
  341. package/lib/services/rulesets.d.ts +3300 -0
  342. package/lib/services/rulesets.d.ts.map +1 -0
  343. package/lib/services/rulesets.js +7852 -0
  344. package/lib/services/rulesets.js.map +1 -0
  345. package/lib/services/rum.d.ts +289 -0
  346. package/lib/services/rum.d.ts.map +1 -0
  347. package/lib/services/rum.js +409 -0
  348. package/lib/services/rum.js.map +1 -0
  349. package/lib/services/schema-validation.d.ts +240 -0
  350. package/lib/services/schema-validation.d.ts.map +1 -0
  351. package/lib/services/schema-validation.js +306 -0
  352. package/lib/services/schema-validation.js.map +1 -0
  353. package/lib/services/secrets-store.d.ts +321 -0
  354. package/lib/services/secrets-store.d.ts.map +1 -0
  355. package/lib/services/secrets-store.js +385 -0
  356. package/lib/services/secrets-store.js.map +1 -0
  357. package/lib/services/security-center.d.ts +102 -0
  358. package/lib/services/security-center.d.ts.map +1 -0
  359. package/lib/services/security-center.js +170 -0
  360. package/lib/services/security-center.js.map +1 -0
  361. package/lib/services/security-txt.d.ts +105 -0
  362. package/lib/services/security-txt.d.ts.map +1 -0
  363. package/lib/services/security-txt.js +136 -0
  364. package/lib/services/security-txt.js.map +1 -0
  365. package/lib/services/snippets.d.ts +138 -0
  366. package/lib/services/snippets.d.ts.map +1 -0
  367. package/lib/services/snippets.js +178 -0
  368. package/lib/services/snippets.js.map +1 -0
  369. package/lib/services/spectrum.d.ts +316 -0
  370. package/lib/services/spectrum.d.ts.map +1 -0
  371. package/lib/services/spectrum.js +510 -0
  372. package/lib/services/spectrum.js.map +1 -0
  373. package/lib/services/speed.d.ts +227 -0
  374. package/lib/services/speed.d.ts.map +1 -0
  375. package/lib/services/speed.js +444 -0
  376. package/lib/services/speed.js.map +1 -0
  377. package/lib/services/ssl.d.ts +370 -0
  378. package/lib/services/ssl.d.ts.map +1 -0
  379. package/lib/services/ssl.js +732 -0
  380. package/lib/services/ssl.js.map +1 -0
  381. package/lib/services/stream.d.ts +1014 -0
  382. package/lib/services/stream.d.ts.map +1 -0
  383. package/lib/services/stream.js +1049 -0
  384. package/lib/services/stream.js.map +1 -0
  385. package/lib/services/token-validation.d.ts +547 -0
  386. package/lib/services/token-validation.d.ts.map +1 -0
  387. package/lib/services/token-validation.js +768 -0
  388. package/lib/services/token-validation.js.map +1 -0
  389. package/lib/services/turnstile.d.ts +248 -0
  390. package/lib/services/turnstile.d.ts.map +1 -0
  391. package/lib/services/turnstile.js +308 -0
  392. package/lib/services/turnstile.js.map +1 -0
  393. package/lib/services/url-normalization.d.ts +53 -0
  394. package/lib/services/url-normalization.d.ts.map +1 -0
  395. package/lib/services/url-normalization.js +52 -0
  396. package/lib/services/url-normalization.js.map +1 -0
  397. package/lib/services/url-scanner.d.ts +612 -0
  398. package/lib/services/url-scanner.d.ts.map +1 -0
  399. package/lib/services/url-scanner.js +915 -0
  400. package/lib/services/url-scanner.js.map +1 -0
  401. package/lib/services/user.d.ts +441 -0
  402. package/lib/services/user.d.ts.map +1 -0
  403. package/lib/services/user.js +567 -0
  404. package/lib/services/user.js.map +1 -0
  405. package/lib/services/vectorize.d.ts +282 -0
  406. package/lib/services/vectorize.d.ts.map +1 -0
  407. package/lib/services/vectorize.js +340 -0
  408. package/lib/services/vectorize.js.map +1 -0
  409. package/lib/services/waiting-rooms.d.ts +1009 -0
  410. package/lib/services/waiting-rooms.d.ts.map +1 -0
  411. package/lib/services/waiting-rooms.js +1757 -0
  412. package/lib/services/waiting-rooms.js.map +1 -0
  413. package/lib/services/web3.d.ts +274 -0
  414. package/lib/services/web3.d.ts.map +1 -0
  415. package/lib/services/web3.js +362 -0
  416. package/lib/services/web3.js.map +1 -0
  417. package/lib/services/workers-for-platforms.d.ts +1224 -0
  418. package/lib/services/workers-for-platforms.d.ts.map +1 -0
  419. package/lib/services/workers-for-platforms.js +2078 -0
  420. package/lib/services/workers-for-platforms.js.map +1 -0
  421. package/lib/services/workers.d.ts +3498 -0
  422. package/lib/services/workers.d.ts.map +1 -0
  423. package/lib/services/workers.js +5967 -0
  424. package/lib/services/workers.js.map +1 -0
  425. package/lib/services/workflows.d.ts +359 -0
  426. package/lib/services/workflows.d.ts.map +1 -0
  427. package/lib/services/workflows.js +516 -0
  428. package/lib/services/workflows.js.map +1 -0
  429. package/lib/services/zaraz.d.ts +300 -0
  430. package/lib/services/zaraz.d.ts.map +1 -0
  431. package/lib/services/zaraz.js +298 -0
  432. package/lib/services/zaraz.js.map +1 -0
  433. package/lib/services/zero-trust.d.ts +15449 -0
  434. package/lib/services/zero-trust.d.ts.map +1 -0
  435. package/lib/services/zero-trust.js +29194 -0
  436. package/lib/services/zero-trust.js.map +1 -0
  437. package/lib/services/zones.d.ts +1278 -0
  438. package/lib/services/zones.d.ts.map +1 -0
  439. package/lib/services/zones.js +2416 -0
  440. package/lib/services/zones.js.map +1 -0
  441. package/lib/traits.d.ts +28 -0
  442. package/lib/traits.d.ts.map +1 -0
  443. package/lib/traits.js +26 -0
  444. package/lib/traits.js.map +1 -0
  445. package/package.json +67 -5
  446. package/src/auth.ts +14 -0
  447. package/src/category.ts +1 -0
  448. package/src/client/api.ts +269 -0
  449. package/src/client/index.ts +7 -0
  450. package/src/credentials.ts +30 -0
  451. package/src/errors.ts +65 -0
  452. package/src/index.ts +9 -0
  453. package/src/retry.ts +35 -0
  454. package/src/schemas.ts +51 -0
  455. package/src/services/abuse-reports.ts +747 -0
  456. package/src/services/accounts.ts +1947 -0
  457. package/src/services/acm.ts +170 -0
  458. package/src/services/addressing.ts +3947 -0
  459. package/src/services/ai-gateway.ts +3335 -0
  460. package/src/services/ai.ts +727 -0
  461. package/src/services/aisearch.ts +4750 -0
  462. package/src/services/alerting.ts +2947 -0
  463. package/src/services/api-gateway.ts +3391 -0
  464. package/src/services/argo.ts +254 -0
  465. package/src/services/audit-logs.ts +90 -0
  466. package/src/services/billing.ts +172 -0
  467. package/src/services/bot-management.ts +541 -0
  468. package/src/services/botnet-feed.ts +193 -0
  469. package/src/services/brand-protection.ts +553 -0
  470. package/src/services/browser-rendering.ts +2707 -0
  471. package/src/services/cache.ts +827 -0
  472. package/src/services/calls.ts +483 -0
  473. package/src/services/certificate-authorities.ts +110 -0
  474. package/src/services/client-certificates.ts +718 -0
  475. package/src/services/cloud-connector.ts +181 -0
  476. package/src/services/cloudforce-one.ts +3876 -0
  477. package/src/services/connectivity.ts +629 -0
  478. package/src/services/content-scanning.ts +385 -0
  479. package/src/services/custom-certificates.ts +611 -0
  480. package/src/services/custom-hostnames.ts +2453 -0
  481. package/src/services/custom-nameservers.ts +182 -0
  482. package/src/services/custom-pages.ts +264 -0
  483. package/src/services/d1.ts +1034 -0
  484. package/src/services/dcv-delegation.ts +52 -0
  485. package/src/services/diagnostics.ts +603 -0
  486. package/src/services/dns-firewall.ts +823 -0
  487. package/src/services/dns.ts +8897 -0
  488. package/src/services/durable-objects.ts +148 -0
  489. package/src/services/email-routing.ts +1602 -0
  490. package/src/services/email-security.ts +4283 -0
  491. package/src/services/filters.ts +370 -0
  492. package/src/services/firewall.ts +3896 -0
  493. package/src/services/healthchecks.ts +1750 -0
  494. package/src/services/hostnames.ts +218 -0
  495. package/src/services/hyperdrive.ts +592 -0
  496. package/src/services/iam.ts +1668 -0
  497. package/src/services/images.ts +1086 -0
  498. package/src/services/intel.ts +2768 -0
  499. package/src/services/ips.ts +88 -0
  500. package/src/services/keyless-certificates.ts +462 -0
  501. package/src/services/kv.ts +1011 -0
  502. package/src/services/leaked-credential-checks.ts +325 -0
  503. package/src/services/load-balancers.ts +6438 -0
  504. package/src/services/logpush.ts +1667 -0
  505. package/src/services/logs.ts +375 -0
  506. package/src/services/magic-cloud-networking.ts +10020 -0
  507. package/src/services/magic-network-monitoring.ts +1156 -0
  508. package/src/services/magic-transit.ts +13050 -0
  509. package/src/services/managed-transforms.ts +237 -0
  510. package/src/services/memberships.ts +615 -0
  511. package/src/services/mtls-certificates.ts +374 -0
  512. package/src/services/network-interconnects.ts +1253 -0
  513. package/src/services/organizations.ts +674 -0
  514. package/src/services/origin-ca-certificates.ts +303 -0
  515. package/src/services/origin-post-quantum-encryption.ts +128 -0
  516. package/src/services/origin-tls-client-auth.ts +878 -0
  517. package/src/services/page-rules.ts +2612 -0
  518. package/src/services/page-shield.ts +1195 -0
  519. package/src/services/pages.ts +5709 -0
  520. package/src/services/pipelines.ts +6000 -0
  521. package/src/services/queues.ts +2629 -0
  522. package/src/services/r2-data-catalog.ts +1119 -0
  523. package/src/services/r2.ts +3348 -0
  524. package/src/services/radar.ts +42152 -0
  525. package/src/services/rate-limits.ts +1150 -0
  526. package/src/services/realtime-kit.ts +11079 -0
  527. package/src/services/registrar.ts +295 -0
  528. package/src/services/request-tracers.ts +158 -0
  529. package/src/services/resource-sharing.ts +1832 -0
  530. package/src/services/rules.ts +837 -0
  531. package/src/services/rulesets.ts +15144 -0
  532. package/src/services/rum.ts +901 -0
  533. package/src/services/schema-validation.ts +733 -0
  534. package/src/services/secrets-store.ts +860 -0
  535. package/src/services/security-center.ts +397 -0
  536. package/src/services/security-txt.ts +315 -0
  537. package/src/services/snippets.ts +420 -0
  538. package/src/services/spectrum.ts +1103 -0
  539. package/src/services/speed.ts +1056 -0
  540. package/src/services/ssl.ts +1587 -0
  541. package/src/services/stream.ts +2756 -0
  542. package/src/services/token-validation.ts +1585 -0
  543. package/src/services/turnstile.ts +643 -0
  544. package/src/services/url-normalization.ts +129 -0
  545. package/src/services/url-scanner.ts +1851 -0
  546. package/src/services/user.ts +1384 -0
  547. package/src/services/vectorize.ts +816 -0
  548. package/src/services/waiting-rooms.ts +3807 -0
  549. package/src/services/web3.ts +834 -0
  550. package/src/services/workers-for-platforms.ts +3859 -0
  551. package/src/services/workers.ts +11637 -0
  552. package/src/services/workflows.ts +1124 -0
  553. package/src/services/zaraz.ts +797 -0
  554. package/src/services/zero-trust.ts +58933 -0
  555. package/src/services/zones.ts +4875 -0
  556. package/src/traits.ts +47 -0
  557. package/README.md +0 -15
  558. package/bun.lock +0 -26
  559. package/index.ts +0 -1
  560. package/tsconfig.json +0 -29
@@ -0,0 +1,3348 @@
1
+ /**
2
+ * Cloudflare R2 API
3
+ *
4
+ * Generated from Cloudflare TypeScript SDK.
5
+ * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service r2
6
+ */
7
+
8
+ import * as Schema from "effect/Schema";
9
+ import type * as HttpClient from "effect/unstable/http/HttpClient";
10
+ import * as API from "../client/api.ts";
11
+ import * as T from "../traits";
12
+ import type { Credentials } from "../credentials";
13
+ import { type DefaultErrors } from "../errors";
14
+
15
+ // =============================================================================
16
+ // Errors
17
+ // =============================================================================
18
+
19
+ export class BucketAlreadyExists extends Schema.TaggedErrorClass<BucketAlreadyExists>()(
20
+ "BucketAlreadyExists",
21
+ { code: Schema.Number, message: Schema.String },
22
+ ) {}
23
+ T.applyErrorMatchers(BucketAlreadyExists, [{ code: 10004 }]);
24
+
25
+ export class BucketNotFound extends Schema.TaggedErrorClass<BucketNotFound>()(
26
+ "BucketNotFound",
27
+ { code: Schema.Number, message: Schema.String },
28
+ ) {}
29
+ T.applyErrorMatchers(BucketNotFound, [{ code: 10085 }]);
30
+
31
+ export class InvalidBucketName extends Schema.TaggedErrorClass<InvalidBucketName>()(
32
+ "InvalidBucketName",
33
+ { code: Schema.Number, message: Schema.String },
34
+ ) {}
35
+ T.applyErrorMatchers(InvalidBucketName, [{ code: 10005 }]);
36
+
37
+ export class InvalidRoute extends Schema.TaggedErrorClass<InvalidRoute>()(
38
+ "InvalidRoute",
39
+ { code: Schema.Number, message: Schema.String },
40
+ ) {}
41
+ T.applyErrorMatchers(InvalidRoute, [{ code: 7003 }]);
42
+
43
+ export class NoCorsConfiguration extends Schema.TaggedErrorClass<NoCorsConfiguration>()(
44
+ "NoCorsConfiguration",
45
+ { code: Schema.Number, message: Schema.String },
46
+ ) {}
47
+ T.applyErrorMatchers(NoCorsConfiguration, [{ code: 10059 }]);
48
+
49
+ export class NoEventNotificationConfig extends Schema.TaggedErrorClass<NoEventNotificationConfig>()(
50
+ "NoEventNotificationConfig",
51
+ { code: Schema.Number, message: Schema.String },
52
+ ) {}
53
+ T.applyErrorMatchers(NoEventNotificationConfig, [{ code: 11015 }]);
54
+
55
+ export class NoRoute extends Schema.TaggedErrorClass<NoRoute>()("NoRoute", {
56
+ code: Schema.Number,
57
+ message: Schema.String,
58
+ }) {}
59
+ T.applyErrorMatchers(NoRoute, [{ code: 10015 }]);
60
+
61
+ export class NoSuchBucket extends Schema.TaggedErrorClass<NoSuchBucket>()(
62
+ "NoSuchBucket",
63
+ { code: Schema.Number, message: Schema.String },
64
+ ) {}
65
+ T.applyErrorMatchers(NoSuchBucket, [{ code: 10006 }]);
66
+
67
+ // =============================================================================
68
+ // AllSuperSlurperJob
69
+ // =============================================================================
70
+
71
+ export interface AbortAllSuperSlurperJobRequest {
72
+ accountId: string;
73
+ }
74
+
75
+ export const AbortAllSuperSlurperJobRequest =
76
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
77
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
78
+ }).pipe(
79
+ T.Http({
80
+ method: "PUT",
81
+ path: "/accounts/{account_id}/slurper/jobs/abortAll",
82
+ }),
83
+ ) as unknown as Schema.Schema<AbortAllSuperSlurperJobRequest>;
84
+
85
+ export type AbortAllSuperSlurperJobResponse = string;
86
+
87
+ export const AbortAllSuperSlurperJobResponse =
88
+ /*@__PURE__*/ /*#__PURE__*/ Schema.String as unknown as Schema.Schema<AbortAllSuperSlurperJobResponse>;
89
+
90
+ export type AbortAllSuperSlurperJobError = DefaultErrors;
91
+
92
+ export const abortAllSuperSlurperJob: API.OperationMethod<
93
+ AbortAllSuperSlurperJobRequest,
94
+ AbortAllSuperSlurperJobResponse,
95
+ AbortAllSuperSlurperJobError,
96
+ Credentials | HttpClient.HttpClient
97
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
98
+ input: AbortAllSuperSlurperJobRequest,
99
+ output: AbortAllSuperSlurperJobResponse,
100
+ errors: [],
101
+ }));
102
+
103
+ // =============================================================================
104
+ // Bucket
105
+ // =============================================================================
106
+
107
+ export interface GetBucketRequest {
108
+ bucketName: string;
109
+ /** Path param: Account ID. */
110
+ accountId: string;
111
+ /** Header param: Jurisdiction where objects in this bucket are guaranteed to be stored. */
112
+ jurisdiction?: "default" | "eu" | "fedramp";
113
+ }
114
+
115
+ export const GetBucketRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
116
+ bucketName: Schema.String.pipe(T.HttpPath("bucketName")),
117
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
118
+ jurisdiction: Schema.optional(
119
+ Schema.Literals(["default", "eu", "fedramp"]),
120
+ ).pipe(T.HttpHeader("cf-r2-jurisdiction")),
121
+ }).pipe(
122
+ T.Http({
123
+ method: "GET",
124
+ path: "/accounts/{account_id}/r2/buckets/{bucketName}",
125
+ }),
126
+ ) as unknown as Schema.Schema<GetBucketRequest>;
127
+
128
+ export interface GetBucketResponse {
129
+ /** Creation timestamp. */
130
+ creationDate?: string | null;
131
+ /** Jurisdiction where objects in this bucket are guaranteed to be stored. */
132
+ jurisdiction?: "default" | "eu" | "fedramp" | null;
133
+ /** Location of the bucket. */
134
+ location?:
135
+ | "apac"
136
+ | "eeur"
137
+ | "enam"
138
+ | "weur"
139
+ | "wnam"
140
+ | "oc"
141
+ | "APAC"
142
+ | "EEUR"
143
+ | "ENAM"
144
+ | "WEUR"
145
+ | "WNAM"
146
+ | "OC"
147
+ | null;
148
+ /** Name of the bucket. */
149
+ name?: string | null;
150
+ /** Storage class for newly uploaded objects, unless specified otherwise. */
151
+ storageClass?: "Standard" | "InfrequentAccess" | null;
152
+ }
153
+
154
+ export const GetBucketResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
155
+ creationDate: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
156
+ jurisdiction: Schema.optional(
157
+ Schema.Union([Schema.Literals(["default", "eu", "fedramp"]), Schema.Null]),
158
+ ),
159
+ location: Schema.optional(
160
+ Schema.Union([
161
+ Schema.Literals([
162
+ "apac",
163
+ "eeur",
164
+ "enam",
165
+ "weur",
166
+ "wnam",
167
+ "oc",
168
+ "APAC",
169
+ "EEUR",
170
+ "ENAM",
171
+ "WEUR",
172
+ "WNAM",
173
+ "OC",
174
+ ]),
175
+ Schema.Null,
176
+ ]),
177
+ ),
178
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
179
+ storageClass: Schema.optional(
180
+ Schema.Union([
181
+ Schema.Literals(["Standard", "InfrequentAccess"]),
182
+ Schema.Null,
183
+ ]),
184
+ ),
185
+ }).pipe(
186
+ Schema.encodeKeys({
187
+ creationDate: "creation_date",
188
+ jurisdiction: "jurisdiction",
189
+ location: "location",
190
+ name: "name",
191
+ storageClass: "storage_class",
192
+ }),
193
+ ) as unknown as Schema.Schema<GetBucketResponse>;
194
+
195
+ export type GetBucketError = DefaultErrors | NoSuchBucket | InvalidRoute;
196
+
197
+ export const getBucket: API.OperationMethod<
198
+ GetBucketRequest,
199
+ GetBucketResponse,
200
+ GetBucketError,
201
+ Credentials | HttpClient.HttpClient
202
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
203
+ input: GetBucketRequest,
204
+ output: GetBucketResponse,
205
+ errors: [NoSuchBucket, InvalidRoute],
206
+ }));
207
+
208
+ export interface ListBucketsRequest {
209
+ /** Path param: Account ID. */
210
+ accountId: string;
211
+ /** Query param: Pagination cursor received during the last List Buckets call. R2 buckets are paginated using cursors instead of page numbers. */
212
+ cursor?: string;
213
+ /** Query param: Direction to order buckets. */
214
+ direction?: "asc" | "desc";
215
+ /** Query param: Bucket names to filter by. Only buckets with this phrase in their name will be returned. */
216
+ nameContains?: string;
217
+ /** Query param: Field to order buckets by. */
218
+ order?: "name";
219
+ /** Query param: Maximum number of buckets to return in a single call. */
220
+ perPage?: number;
221
+ /** Query param: Bucket name to start searching after. Buckets are ordered lexicographically. */
222
+ startAfter?: string;
223
+ /** Header param: Jurisdiction where objects in this bucket are guaranteed to be stored. */
224
+ jurisdiction?: "default" | "eu" | "fedramp";
225
+ }
226
+
227
+ export const ListBucketsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
228
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
229
+ cursor: Schema.optional(Schema.String).pipe(T.HttpQuery("cursor")),
230
+ direction: Schema.optional(Schema.Literals(["asc", "desc"])).pipe(
231
+ T.HttpQuery("direction"),
232
+ ),
233
+ nameContains: Schema.optional(Schema.String).pipe(
234
+ T.HttpQuery("name_contains"),
235
+ ),
236
+ order: Schema.optional(Schema.Literal("name")).pipe(T.HttpQuery("order")),
237
+ perPage: Schema.optional(Schema.Number).pipe(T.HttpQuery("per_page")),
238
+ startAfter: Schema.optional(Schema.String).pipe(T.HttpQuery("start_after")),
239
+ jurisdiction: Schema.optional(
240
+ Schema.Literals(["default", "eu", "fedramp"]),
241
+ ).pipe(T.HttpHeader("cf-r2-jurisdiction")),
242
+ }).pipe(
243
+ T.Http({ method: "GET", path: "/accounts/{account_id}/r2/buckets" }),
244
+ ) as unknown as Schema.Schema<ListBucketsRequest>;
245
+
246
+ export interface ListBucketsResponse {
247
+ buckets?:
248
+ | {
249
+ creationDate?: string | null;
250
+ jurisdiction?: "default" | "eu" | "fedramp" | null;
251
+ location?:
252
+ | "apac"
253
+ | "eeur"
254
+ | "enam"
255
+ | "weur"
256
+ | "wnam"
257
+ | "oc"
258
+ | "APAC"
259
+ | "EEUR"
260
+ | "ENAM"
261
+ | "WEUR"
262
+ | "WNAM"
263
+ | "OC"
264
+ | null;
265
+ name?: string | null;
266
+ storageClass?: "Standard" | "InfrequentAccess" | null;
267
+ }[]
268
+ | null;
269
+ }
270
+
271
+ export const ListBucketsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
272
+ buckets: Schema.optional(
273
+ Schema.Union([
274
+ Schema.Array(
275
+ Schema.Struct({
276
+ creationDate: Schema.optional(
277
+ Schema.Union([Schema.String, Schema.Null]),
278
+ ),
279
+ jurisdiction: Schema.optional(
280
+ Schema.Union([
281
+ Schema.Literals(["default", "eu", "fedramp"]),
282
+ Schema.Null,
283
+ ]),
284
+ ),
285
+ location: Schema.optional(
286
+ Schema.Union([
287
+ Schema.Literals([
288
+ "apac",
289
+ "eeur",
290
+ "enam",
291
+ "weur",
292
+ "wnam",
293
+ "oc",
294
+ "APAC",
295
+ "EEUR",
296
+ "ENAM",
297
+ "WEUR",
298
+ "WNAM",
299
+ "OC",
300
+ ]),
301
+ Schema.Null,
302
+ ]),
303
+ ),
304
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
305
+ storageClass: Schema.optional(
306
+ Schema.Union([
307
+ Schema.Literals(["Standard", "InfrequentAccess"]),
308
+ Schema.Null,
309
+ ]),
310
+ ),
311
+ }).pipe(
312
+ Schema.encodeKeys({
313
+ creationDate: "creation_date",
314
+ jurisdiction: "jurisdiction",
315
+ location: "location",
316
+ name: "name",
317
+ storageClass: "storage_class",
318
+ }),
319
+ ),
320
+ ),
321
+ Schema.Null,
322
+ ]),
323
+ ),
324
+ }) as unknown as Schema.Schema<ListBucketsResponse>;
325
+
326
+ export type ListBucketsError = DefaultErrors | InvalidRoute;
327
+
328
+ export const listBuckets: API.OperationMethod<
329
+ ListBucketsRequest,
330
+ ListBucketsResponse,
331
+ ListBucketsError,
332
+ Credentials | HttpClient.HttpClient
333
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
334
+ input: ListBucketsRequest,
335
+ output: ListBucketsResponse,
336
+ errors: [InvalidRoute],
337
+ }));
338
+
339
+ export interface CreateBucketRequest {
340
+ /** Path param: Account ID. */
341
+ accountId: string;
342
+ /** Header param: Jurisdiction where objects in this bucket are guaranteed to be stored. */
343
+ jurisdiction?: "default" | "eu" | "fedramp";
344
+ /** Body param: Name of the bucket. */
345
+ name: string;
346
+ /** Body param: Location of the bucket. */
347
+ locationHint?: "apac" | "eeur" | "enam" | "weur" | "wnam" | "oc";
348
+ /** Body param: Storage class for newly uploaded objects, unless specified otherwise. */
349
+ storageClass?: "Standard" | "InfrequentAccess";
350
+ }
351
+
352
+ export const CreateBucketRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
353
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
354
+ jurisdiction: Schema.optional(
355
+ Schema.Literals(["default", "eu", "fedramp"]),
356
+ ).pipe(T.HttpHeader("cf-r2-jurisdiction")),
357
+ name: Schema.String,
358
+ locationHint: Schema.optional(
359
+ Schema.Literals(["apac", "eeur", "enam", "weur", "wnam", "oc"]),
360
+ ),
361
+ storageClass: Schema.optional(
362
+ Schema.Literals(["Standard", "InfrequentAccess"]),
363
+ ),
364
+ }).pipe(
365
+ T.Http({ method: "POST", path: "/accounts/{account_id}/r2/buckets" }),
366
+ ) as unknown as Schema.Schema<CreateBucketRequest>;
367
+
368
+ export interface CreateBucketResponse {
369
+ /** Creation timestamp. */
370
+ creationDate?: string | null;
371
+ /** Jurisdiction where objects in this bucket are guaranteed to be stored. */
372
+ jurisdiction?: "default" | "eu" | "fedramp" | null;
373
+ /** Location of the bucket. */
374
+ location?:
375
+ | "apac"
376
+ | "eeur"
377
+ | "enam"
378
+ | "weur"
379
+ | "wnam"
380
+ | "oc"
381
+ | "APAC"
382
+ | "EEUR"
383
+ | "ENAM"
384
+ | "WEUR"
385
+ | "WNAM"
386
+ | "OC"
387
+ | null;
388
+ /** Name of the bucket. */
389
+ name?: string | null;
390
+ /** Storage class for newly uploaded objects, unless specified otherwise. */
391
+ storageClass?: "Standard" | "InfrequentAccess" | null;
392
+ }
393
+
394
+ export const CreateBucketResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
395
+ creationDate: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
396
+ jurisdiction: Schema.optional(
397
+ Schema.Union([Schema.Literals(["default", "eu", "fedramp"]), Schema.Null]),
398
+ ),
399
+ location: Schema.optional(
400
+ Schema.Union([
401
+ Schema.Literals([
402
+ "apac",
403
+ "eeur",
404
+ "enam",
405
+ "weur",
406
+ "wnam",
407
+ "oc",
408
+ "APAC",
409
+ "EEUR",
410
+ "ENAM",
411
+ "WEUR",
412
+ "WNAM",
413
+ "OC",
414
+ ]),
415
+ Schema.Null,
416
+ ]),
417
+ ),
418
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
419
+ storageClass: Schema.optional(
420
+ Schema.Union([
421
+ Schema.Literals(["Standard", "InfrequentAccess"]),
422
+ Schema.Null,
423
+ ]),
424
+ ),
425
+ }).pipe(
426
+ Schema.encodeKeys({
427
+ creationDate: "creation_date",
428
+ jurisdiction: "jurisdiction",
429
+ location: "location",
430
+ name: "name",
431
+ storageClass: "storage_class",
432
+ }),
433
+ ) as unknown as Schema.Schema<CreateBucketResponse>;
434
+
435
+ export type CreateBucketError =
436
+ | DefaultErrors
437
+ | InvalidBucketName
438
+ | BucketAlreadyExists
439
+ | InvalidRoute;
440
+
441
+ export const createBucket: API.OperationMethod<
442
+ CreateBucketRequest,
443
+ CreateBucketResponse,
444
+ CreateBucketError,
445
+ Credentials | HttpClient.HttpClient
446
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
447
+ input: CreateBucketRequest,
448
+ output: CreateBucketResponse,
449
+ errors: [InvalidBucketName, BucketAlreadyExists, InvalidRoute],
450
+ }));
451
+
452
+ export interface PatchBucketRequest {
453
+ bucketName: string;
454
+ /** Path param: Account ID. */
455
+ accountId: string;
456
+ /** Header param: Storage class for newly uploaded objects, unless specified otherwise. */
457
+ storageClass: "Standard" | "InfrequentAccess";
458
+ /** Header param: Jurisdiction where objects in this bucket are guaranteed to be stored. */
459
+ jurisdiction?: "default" | "eu" | "fedramp";
460
+ }
461
+
462
+ export const PatchBucketRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
463
+ bucketName: Schema.String.pipe(T.HttpPath("bucketName")),
464
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
465
+ storageClass: Schema.Literals(["Standard", "InfrequentAccess"]).pipe(
466
+ T.HttpHeader("cf-r2-storage-class"),
467
+ ),
468
+ jurisdiction: Schema.optional(
469
+ Schema.Literals(["default", "eu", "fedramp"]),
470
+ ).pipe(T.HttpHeader("cf-r2-jurisdiction")),
471
+ }).pipe(
472
+ T.Http({
473
+ method: "PATCH",
474
+ path: "/accounts/{account_id}/r2/buckets/{bucketName}",
475
+ }),
476
+ ) as unknown as Schema.Schema<PatchBucketRequest>;
477
+
478
+ export interface PatchBucketResponse {
479
+ /** Creation timestamp. */
480
+ creationDate?: string | null;
481
+ /** Jurisdiction where objects in this bucket are guaranteed to be stored. */
482
+ jurisdiction?: "default" | "eu" | "fedramp" | null;
483
+ /** Location of the bucket. */
484
+ location?:
485
+ | "apac"
486
+ | "eeur"
487
+ | "enam"
488
+ | "weur"
489
+ | "wnam"
490
+ | "oc"
491
+ | "APAC"
492
+ | "EEUR"
493
+ | "ENAM"
494
+ | "WEUR"
495
+ | "WNAM"
496
+ | "OC"
497
+ | null;
498
+ /** Name of the bucket. */
499
+ name?: string | null;
500
+ /** Storage class for newly uploaded objects, unless specified otherwise. */
501
+ storageClass?: "Standard" | "InfrequentAccess" | null;
502
+ }
503
+
504
+ export const PatchBucketResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
505
+ creationDate: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
506
+ jurisdiction: Schema.optional(
507
+ Schema.Union([Schema.Literals(["default", "eu", "fedramp"]), Schema.Null]),
508
+ ),
509
+ location: Schema.optional(
510
+ Schema.Union([
511
+ Schema.Literals([
512
+ "apac",
513
+ "eeur",
514
+ "enam",
515
+ "weur",
516
+ "wnam",
517
+ "oc",
518
+ "APAC",
519
+ "EEUR",
520
+ "ENAM",
521
+ "WEUR",
522
+ "WNAM",
523
+ "OC",
524
+ ]),
525
+ Schema.Null,
526
+ ]),
527
+ ),
528
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
529
+ storageClass: Schema.optional(
530
+ Schema.Union([
531
+ Schema.Literals(["Standard", "InfrequentAccess"]),
532
+ Schema.Null,
533
+ ]),
534
+ ),
535
+ }).pipe(
536
+ Schema.encodeKeys({
537
+ creationDate: "creation_date",
538
+ jurisdiction: "jurisdiction",
539
+ location: "location",
540
+ name: "name",
541
+ storageClass: "storage_class",
542
+ }),
543
+ ) as unknown as Schema.Schema<PatchBucketResponse>;
544
+
545
+ export type PatchBucketError = DefaultErrors | NoSuchBucket | InvalidRoute;
546
+
547
+ export const patchBucket: API.OperationMethod<
548
+ PatchBucketRequest,
549
+ PatchBucketResponse,
550
+ PatchBucketError,
551
+ Credentials | HttpClient.HttpClient
552
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
553
+ input: PatchBucketRequest,
554
+ output: PatchBucketResponse,
555
+ errors: [NoSuchBucket, InvalidRoute],
556
+ }));
557
+
558
+ export interface DeleteBucketRequest {
559
+ bucketName: string;
560
+ /** Path param: Account ID. */
561
+ accountId: string;
562
+ /** Header param: Jurisdiction where objects in this bucket are guaranteed to be stored. */
563
+ jurisdiction?: "default" | "eu" | "fedramp";
564
+ }
565
+
566
+ export const DeleteBucketRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
567
+ bucketName: Schema.String.pipe(T.HttpPath("bucketName")),
568
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
569
+ jurisdiction: Schema.optional(
570
+ Schema.Literals(["default", "eu", "fedramp"]),
571
+ ).pipe(T.HttpHeader("cf-r2-jurisdiction")),
572
+ }).pipe(
573
+ T.Http({
574
+ method: "DELETE",
575
+ path: "/accounts/{account_id}/r2/buckets/{bucketName}",
576
+ }),
577
+ ) as unknown as Schema.Schema<DeleteBucketRequest>;
578
+
579
+ export type DeleteBucketResponse = unknown;
580
+
581
+ export const DeleteBucketResponse =
582
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<DeleteBucketResponse>;
583
+
584
+ export type DeleteBucketError =
585
+ | DefaultErrors
586
+ | NoSuchBucket
587
+ | InvalidRoute
588
+ | NoRoute;
589
+
590
+ export const deleteBucket: API.OperationMethod<
591
+ DeleteBucketRequest,
592
+ DeleteBucketResponse,
593
+ DeleteBucketError,
594
+ Credentials | HttpClient.HttpClient
595
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
596
+ input: DeleteBucketRequest,
597
+ output: DeleteBucketResponse,
598
+ errors: [NoSuchBucket, InvalidRoute, NoRoute],
599
+ }));
600
+
601
+ // =============================================================================
602
+ // BucketCor
603
+ // =============================================================================
604
+
605
+ export interface GetBucketCorsRequest {
606
+ bucketName: string;
607
+ /** Path param: Account ID. */
608
+ accountId: string;
609
+ /** Header param: Jurisdiction where objects in this bucket are guaranteed to be stored. */
610
+ jurisdiction?: "default" | "eu" | "fedramp";
611
+ }
612
+
613
+ export const GetBucketCorsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
614
+ bucketName: Schema.String.pipe(T.HttpPath("bucketName")),
615
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
616
+ jurisdiction: Schema.optional(
617
+ Schema.Literals(["default", "eu", "fedramp"]),
618
+ ).pipe(T.HttpHeader("cf-r2-jurisdiction")),
619
+ }).pipe(
620
+ T.Http({
621
+ method: "GET",
622
+ path: "/accounts/{account_id}/r2/buckets/{bucketName}/cors",
623
+ }),
624
+ ) as unknown as Schema.Schema<GetBucketCorsRequest>;
625
+
626
+ export interface GetBucketCorsResponse {
627
+ rules?:
628
+ | {
629
+ allowed: {
630
+ methods: ("GET" | "PUT" | "POST" | "DELETE" | "HEAD")[];
631
+ origins: string[];
632
+ headers?: string[] | null;
633
+ };
634
+ id?: string | null;
635
+ exposeHeaders?: string[] | null;
636
+ maxAgeSeconds?: number | null;
637
+ }[]
638
+ | null;
639
+ }
640
+
641
+ export const GetBucketCorsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
642
+ rules: Schema.optional(
643
+ Schema.Union([
644
+ Schema.Array(
645
+ Schema.Struct({
646
+ allowed: Schema.Struct({
647
+ methods: Schema.Array(
648
+ Schema.Literals(["GET", "PUT", "POST", "DELETE", "HEAD"]),
649
+ ),
650
+ origins: Schema.Array(Schema.String),
651
+ headers: Schema.optional(
652
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
653
+ ),
654
+ }),
655
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
656
+ exposeHeaders: Schema.optional(
657
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
658
+ ),
659
+ maxAgeSeconds: Schema.optional(
660
+ Schema.Union([Schema.Number, Schema.Null]),
661
+ ),
662
+ }),
663
+ ),
664
+ Schema.Null,
665
+ ]),
666
+ ),
667
+ }) as unknown as Schema.Schema<GetBucketCorsResponse>;
668
+
669
+ export type GetBucketCorsError =
670
+ | DefaultErrors
671
+ | NoSuchBucket
672
+ | InvalidRoute
673
+ | NoCorsConfiguration;
674
+
675
+ export const getBucketCors: API.OperationMethod<
676
+ GetBucketCorsRequest,
677
+ GetBucketCorsResponse,
678
+ GetBucketCorsError,
679
+ Credentials | HttpClient.HttpClient
680
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
681
+ input: GetBucketCorsRequest,
682
+ output: GetBucketCorsResponse,
683
+ errors: [NoSuchBucket, InvalidRoute, NoCorsConfiguration],
684
+ }));
685
+
686
+ export interface PutBucketCorsRequest {
687
+ bucketName: string;
688
+ /** Path param: Account ID. */
689
+ accountId: string;
690
+ /** Header param: Jurisdiction where objects in this bucket are guaranteed to be stored. */
691
+ jurisdiction?: "default" | "eu" | "fedramp";
692
+ /** Body param: */
693
+ rules?: {
694
+ allowed: {
695
+ methods: ("GET" | "PUT" | "POST" | "DELETE" | "HEAD")[];
696
+ origins: string[];
697
+ headers?: string[];
698
+ };
699
+ id?: string;
700
+ exposeHeaders?: string[];
701
+ maxAgeSeconds?: number;
702
+ }[];
703
+ }
704
+
705
+ export const PutBucketCorsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
706
+ bucketName: Schema.String.pipe(T.HttpPath("bucketName")),
707
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
708
+ jurisdiction: Schema.optional(
709
+ Schema.Literals(["default", "eu", "fedramp"]),
710
+ ).pipe(T.HttpHeader("cf-r2-jurisdiction")),
711
+ rules: Schema.optional(
712
+ Schema.Array(
713
+ Schema.Struct({
714
+ allowed: Schema.Struct({
715
+ methods: Schema.Array(
716
+ Schema.Literals(["GET", "PUT", "POST", "DELETE", "HEAD"]),
717
+ ),
718
+ origins: Schema.Array(Schema.String),
719
+ headers: Schema.optional(Schema.Array(Schema.String)),
720
+ }),
721
+ id: Schema.optional(Schema.String),
722
+ exposeHeaders: Schema.optional(Schema.Array(Schema.String)),
723
+ maxAgeSeconds: Schema.optional(Schema.Number),
724
+ }),
725
+ ),
726
+ ),
727
+ }).pipe(
728
+ T.Http({
729
+ method: "PUT",
730
+ path: "/accounts/{account_id}/r2/buckets/{bucketName}/cors",
731
+ }),
732
+ ) as unknown as Schema.Schema<PutBucketCorsRequest>;
733
+
734
+ export type PutBucketCorsResponse = unknown;
735
+
736
+ export const PutBucketCorsResponse =
737
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<PutBucketCorsResponse>;
738
+
739
+ export type PutBucketCorsError = DefaultErrors | NoSuchBucket | InvalidRoute;
740
+
741
+ export const putBucketCors: API.OperationMethod<
742
+ PutBucketCorsRequest,
743
+ PutBucketCorsResponse,
744
+ PutBucketCorsError,
745
+ Credentials | HttpClient.HttpClient
746
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
747
+ input: PutBucketCorsRequest,
748
+ output: PutBucketCorsResponse,
749
+ errors: [NoSuchBucket, InvalidRoute],
750
+ }));
751
+
752
+ export interface DeleteBucketCorsRequest {
753
+ bucketName: string;
754
+ /** Path param: Account ID. */
755
+ accountId: string;
756
+ /** Header param: Jurisdiction where objects in this bucket are guaranteed to be stored. */
757
+ jurisdiction?: "default" | "eu" | "fedramp";
758
+ }
759
+
760
+ export const DeleteBucketCorsRequest =
761
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
762
+ bucketName: Schema.String.pipe(T.HttpPath("bucketName")),
763
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
764
+ jurisdiction: Schema.optional(
765
+ Schema.Literals(["default", "eu", "fedramp"]),
766
+ ).pipe(T.HttpHeader("cf-r2-jurisdiction")),
767
+ }).pipe(
768
+ T.Http({
769
+ method: "DELETE",
770
+ path: "/accounts/{account_id}/r2/buckets/{bucketName}/cors",
771
+ }),
772
+ ) as unknown as Schema.Schema<DeleteBucketCorsRequest>;
773
+
774
+ export type DeleteBucketCorsResponse = unknown;
775
+
776
+ export const DeleteBucketCorsResponse =
777
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<DeleteBucketCorsResponse>;
778
+
779
+ export type DeleteBucketCorsError = DefaultErrors | NoSuchBucket | InvalidRoute;
780
+
781
+ export const deleteBucketCors: API.OperationMethod<
782
+ DeleteBucketCorsRequest,
783
+ DeleteBucketCorsResponse,
784
+ DeleteBucketCorsError,
785
+ Credentials | HttpClient.HttpClient
786
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
787
+ input: DeleteBucketCorsRequest,
788
+ output: DeleteBucketCorsResponse,
789
+ errors: [NoSuchBucket, InvalidRoute],
790
+ }));
791
+
792
+ // =============================================================================
793
+ // BucketDomainCustom
794
+ // =============================================================================
795
+
796
+ export interface GetBucketDomainCustomRequest {
797
+ bucketName: string;
798
+ domain: string;
799
+ /** Path param: Account ID. */
800
+ accountId: string;
801
+ /** Header param: Jurisdiction where objects in this bucket are guaranteed to be stored. */
802
+ jurisdiction?: "default" | "eu" | "fedramp";
803
+ }
804
+
805
+ export const GetBucketDomainCustomRequest =
806
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
807
+ bucketName: Schema.String.pipe(T.HttpPath("bucketName")),
808
+ domain: Schema.String.pipe(T.HttpPath("domain")),
809
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
810
+ jurisdiction: Schema.optional(
811
+ Schema.Literals(["default", "eu", "fedramp"]),
812
+ ).pipe(T.HttpHeader("cf-r2-jurisdiction")),
813
+ }).pipe(
814
+ T.Http({
815
+ method: "GET",
816
+ path: "/accounts/{account_id}/r2/buckets/{bucketName}/domains/custom/{domain}",
817
+ }),
818
+ ) as unknown as Schema.Schema<GetBucketDomainCustomRequest>;
819
+
820
+ export interface GetBucketDomainCustomResponse {
821
+ /** Domain name of the custom domain to be added. */
822
+ domain: string;
823
+ /** Whether this bucket is publicly accessible at the specified custom domain. */
824
+ enabled: boolean;
825
+ status: {
826
+ ownership:
827
+ | "pending"
828
+ | "active"
829
+ | "deactivated"
830
+ | "blocked"
831
+ | "error"
832
+ | "unknown";
833
+ ssl:
834
+ | "initializing"
835
+ | "pending"
836
+ | "active"
837
+ | "deactivated"
838
+ | "error"
839
+ | "unknown";
840
+ };
841
+ /** An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format. */
842
+ ciphers?: string[] | null;
843
+ /** Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0. */
844
+ minTLS?: "1.0" | "1.1" | "1.2" | "1.3" | null;
845
+ /** Zone ID of the custom domain resides in. */
846
+ zoneId?: string | null;
847
+ /** Zone that the custom domain resides in. */
848
+ zoneName?: string | null;
849
+ }
850
+
851
+ export const GetBucketDomainCustomResponse =
852
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
853
+ domain: Schema.String,
854
+ enabled: Schema.Boolean,
855
+ status: Schema.Struct({
856
+ ownership: Schema.Literals([
857
+ "pending",
858
+ "active",
859
+ "deactivated",
860
+ "blocked",
861
+ "error",
862
+ "unknown",
863
+ ]),
864
+ ssl: Schema.Literals([
865
+ "initializing",
866
+ "pending",
867
+ "active",
868
+ "deactivated",
869
+ "error",
870
+ "unknown",
871
+ ]),
872
+ }),
873
+ ciphers: Schema.optional(
874
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
875
+ ),
876
+ minTLS: Schema.optional(
877
+ Schema.Union([
878
+ Schema.Literals(["1.0", "1.1", "1.2", "1.3"]),
879
+ Schema.Null,
880
+ ]),
881
+ ),
882
+ zoneId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
883
+ zoneName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
884
+ }) as unknown as Schema.Schema<GetBucketDomainCustomResponse>;
885
+
886
+ export type GetBucketDomainCustomError = DefaultErrors;
887
+
888
+ export const getBucketDomainCustom: API.OperationMethod<
889
+ GetBucketDomainCustomRequest,
890
+ GetBucketDomainCustomResponse,
891
+ GetBucketDomainCustomError,
892
+ Credentials | HttpClient.HttpClient
893
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
894
+ input: GetBucketDomainCustomRequest,
895
+ output: GetBucketDomainCustomResponse,
896
+ errors: [],
897
+ }));
898
+
899
+ export interface ListBucketDomainCustomsRequest {
900
+ bucketName: string;
901
+ /** Path param: Account ID. */
902
+ accountId: string;
903
+ /** Header param: Jurisdiction where objects in this bucket are guaranteed to be stored. */
904
+ jurisdiction?: "default" | "eu" | "fedramp";
905
+ }
906
+
907
+ export const ListBucketDomainCustomsRequest =
908
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
909
+ bucketName: Schema.String.pipe(T.HttpPath("bucketName")),
910
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
911
+ jurisdiction: Schema.optional(
912
+ Schema.Literals(["default", "eu", "fedramp"]),
913
+ ).pipe(T.HttpHeader("cf-r2-jurisdiction")),
914
+ }).pipe(
915
+ T.Http({
916
+ method: "GET",
917
+ path: "/accounts/{account_id}/r2/buckets/{bucketName}/domains/custom",
918
+ }),
919
+ ) as unknown as Schema.Schema<ListBucketDomainCustomsRequest>;
920
+
921
+ export interface ListBucketDomainCustomsResponse {
922
+ domains: {
923
+ domain: string;
924
+ enabled: boolean;
925
+ status: {
926
+ ownership:
927
+ | "pending"
928
+ | "active"
929
+ | "deactivated"
930
+ | "blocked"
931
+ | "error"
932
+ | "unknown";
933
+ ssl:
934
+ | "initializing"
935
+ | "pending"
936
+ | "active"
937
+ | "deactivated"
938
+ | "error"
939
+ | "unknown";
940
+ };
941
+ ciphers?: string[] | null;
942
+ minTLS?: "1.0" | "1.1" | "1.2" | "1.3" | null;
943
+ zoneId?: string | null;
944
+ zoneName?: string | null;
945
+ }[];
946
+ }
947
+
948
+ export const ListBucketDomainCustomsResponse =
949
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
950
+ domains: Schema.Array(
951
+ Schema.Struct({
952
+ domain: Schema.String,
953
+ enabled: Schema.Boolean,
954
+ status: Schema.Struct({
955
+ ownership: Schema.Literals([
956
+ "pending",
957
+ "active",
958
+ "deactivated",
959
+ "blocked",
960
+ "error",
961
+ "unknown",
962
+ ]),
963
+ ssl: Schema.Literals([
964
+ "initializing",
965
+ "pending",
966
+ "active",
967
+ "deactivated",
968
+ "error",
969
+ "unknown",
970
+ ]),
971
+ }),
972
+ ciphers: Schema.optional(
973
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
974
+ ),
975
+ minTLS: Schema.optional(
976
+ Schema.Union([
977
+ Schema.Literals(["1.0", "1.1", "1.2", "1.3"]),
978
+ Schema.Null,
979
+ ]),
980
+ ),
981
+ zoneId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
982
+ zoneName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
983
+ }),
984
+ ),
985
+ }) as unknown as Schema.Schema<ListBucketDomainCustomsResponse>;
986
+
987
+ export type ListBucketDomainCustomsError =
988
+ | DefaultErrors
989
+ | NoSuchBucket
990
+ | InvalidRoute;
991
+
992
+ export const listBucketDomainCustoms: API.OperationMethod<
993
+ ListBucketDomainCustomsRequest,
994
+ ListBucketDomainCustomsResponse,
995
+ ListBucketDomainCustomsError,
996
+ Credentials | HttpClient.HttpClient
997
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
998
+ input: ListBucketDomainCustomsRequest,
999
+ output: ListBucketDomainCustomsResponse,
1000
+ errors: [NoSuchBucket, InvalidRoute],
1001
+ }));
1002
+
1003
+ export interface CreateBucketDomainCustomRequest {
1004
+ bucketName: string;
1005
+ /** Path param: Account ID. */
1006
+ accountId: string;
1007
+ /** Header param: Jurisdiction where objects in this bucket are guaranteed to be stored. */
1008
+ jurisdiction?: "default" | "eu" | "fedramp";
1009
+ /** Body param: Name of the custom domain to be added. */
1010
+ domain: string;
1011
+ /** Body param: Whether to enable public bucket access at the custom domain. If undefined, the domain will be enabled. */
1012
+ enabled: boolean;
1013
+ /** Body param: Zone ID of the custom domain. */
1014
+ zoneId: string;
1015
+ /** Body param: An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format. */
1016
+ ciphers?: string[];
1017
+ /** Body param: Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0. */
1018
+ minTLS?: "1.0" | "1.1" | "1.2" | "1.3";
1019
+ }
1020
+
1021
+ export const CreateBucketDomainCustomRequest =
1022
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1023
+ bucketName: Schema.String.pipe(T.HttpPath("bucketName")),
1024
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1025
+ jurisdiction: Schema.optional(
1026
+ Schema.Literals(["default", "eu", "fedramp"]),
1027
+ ).pipe(T.HttpHeader("cf-r2-jurisdiction")),
1028
+ domain: Schema.String,
1029
+ enabled: Schema.Boolean,
1030
+ zoneId: Schema.String,
1031
+ ciphers: Schema.optional(Schema.Array(Schema.String)),
1032
+ minTLS: Schema.optional(Schema.Literals(["1.0", "1.1", "1.2", "1.3"])),
1033
+ }).pipe(
1034
+ T.Http({
1035
+ method: "POST",
1036
+ path: "/accounts/{account_id}/r2/buckets/{bucketName}/domains/custom",
1037
+ }),
1038
+ ) as unknown as Schema.Schema<CreateBucketDomainCustomRequest>;
1039
+
1040
+ export interface CreateBucketDomainCustomResponse {
1041
+ /** Domain name of the affected custom domain. */
1042
+ domain: string;
1043
+ /** Whether this bucket is publicly accessible at the specified custom domain. */
1044
+ enabled: boolean;
1045
+ /** An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format. */
1046
+ ciphers?: string[] | null;
1047
+ /** Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0. */
1048
+ minTLS?: "1.0" | "1.1" | "1.2" | "1.3" | null;
1049
+ }
1050
+
1051
+ export const CreateBucketDomainCustomResponse =
1052
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1053
+ domain: Schema.String,
1054
+ enabled: Schema.Boolean,
1055
+ ciphers: Schema.optional(
1056
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1057
+ ),
1058
+ minTLS: Schema.optional(
1059
+ Schema.Union([
1060
+ Schema.Literals(["1.0", "1.1", "1.2", "1.3"]),
1061
+ Schema.Null,
1062
+ ]),
1063
+ ),
1064
+ }) as unknown as Schema.Schema<CreateBucketDomainCustomResponse>;
1065
+
1066
+ export type CreateBucketDomainCustomError =
1067
+ | DefaultErrors
1068
+ | NoSuchBucket
1069
+ | InvalidBucketName;
1070
+
1071
+ export const createBucketDomainCustom: API.OperationMethod<
1072
+ CreateBucketDomainCustomRequest,
1073
+ CreateBucketDomainCustomResponse,
1074
+ CreateBucketDomainCustomError,
1075
+ Credentials | HttpClient.HttpClient
1076
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1077
+ input: CreateBucketDomainCustomRequest,
1078
+ output: CreateBucketDomainCustomResponse,
1079
+ errors: [NoSuchBucket, InvalidBucketName],
1080
+ }));
1081
+
1082
+ export interface UpdateBucketDomainCustomRequest {
1083
+ bucketName: string;
1084
+ domain: string;
1085
+ /** Path param: Account ID. */
1086
+ accountId: string;
1087
+ /** Header param: Jurisdiction where objects in this bucket are guaranteed to be stored. */
1088
+ jurisdiction?: "default" | "eu" | "fedramp";
1089
+ /** Body param: An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format. */
1090
+ ciphers?: string[];
1091
+ /** Body param: Whether to enable public bucket access at the specified custom domain. */
1092
+ enabled?: boolean;
1093
+ /** Body param: Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to previous value. */
1094
+ minTLS?: "1.0" | "1.1" | "1.2" | "1.3";
1095
+ }
1096
+
1097
+ export const UpdateBucketDomainCustomRequest =
1098
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1099
+ bucketName: Schema.String.pipe(T.HttpPath("bucketName")),
1100
+ domain: Schema.String.pipe(T.HttpPath("domain")),
1101
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1102
+ jurisdiction: Schema.optional(
1103
+ Schema.Literals(["default", "eu", "fedramp"]),
1104
+ ).pipe(T.HttpHeader("cf-r2-jurisdiction")),
1105
+ ciphers: Schema.optional(Schema.Array(Schema.String)),
1106
+ enabled: Schema.optional(Schema.Boolean),
1107
+ minTLS: Schema.optional(Schema.Literals(["1.0", "1.1", "1.2", "1.3"])),
1108
+ }).pipe(
1109
+ T.Http({
1110
+ method: "PUT",
1111
+ path: "/accounts/{account_id}/r2/buckets/{bucketName}/domains/custom/{domain}",
1112
+ }),
1113
+ ) as unknown as Schema.Schema<UpdateBucketDomainCustomRequest>;
1114
+
1115
+ export interface UpdateBucketDomainCustomResponse {
1116
+ /** Domain name of the affected custom domain. */
1117
+ domain: string;
1118
+ /** An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format. */
1119
+ ciphers?: string[] | null;
1120
+ /** Whether this bucket is publicly accessible at the specified custom domain. */
1121
+ enabled?: boolean | null;
1122
+ /** Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0. */
1123
+ minTLS?: "1.0" | "1.1" | "1.2" | "1.3" | null;
1124
+ }
1125
+
1126
+ export const UpdateBucketDomainCustomResponse =
1127
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1128
+ domain: Schema.String,
1129
+ ciphers: Schema.optional(
1130
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1131
+ ),
1132
+ enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1133
+ minTLS: Schema.optional(
1134
+ Schema.Union([
1135
+ Schema.Literals(["1.0", "1.1", "1.2", "1.3"]),
1136
+ Schema.Null,
1137
+ ]),
1138
+ ),
1139
+ }) as unknown as Schema.Schema<UpdateBucketDomainCustomResponse>;
1140
+
1141
+ export type UpdateBucketDomainCustomError = DefaultErrors;
1142
+
1143
+ export const updateBucketDomainCustom: API.OperationMethod<
1144
+ UpdateBucketDomainCustomRequest,
1145
+ UpdateBucketDomainCustomResponse,
1146
+ UpdateBucketDomainCustomError,
1147
+ Credentials | HttpClient.HttpClient
1148
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1149
+ input: UpdateBucketDomainCustomRequest,
1150
+ output: UpdateBucketDomainCustomResponse,
1151
+ errors: [],
1152
+ }));
1153
+
1154
+ export interface DeleteBucketDomainCustomRequest {
1155
+ bucketName: string;
1156
+ domain: string;
1157
+ /** Path param: Account ID. */
1158
+ accountId: string;
1159
+ /** Header param: Jurisdiction where objects in this bucket are guaranteed to be stored. */
1160
+ jurisdiction?: "default" | "eu" | "fedramp";
1161
+ }
1162
+
1163
+ export const DeleteBucketDomainCustomRequest =
1164
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1165
+ bucketName: Schema.String.pipe(T.HttpPath("bucketName")),
1166
+ domain: Schema.String.pipe(T.HttpPath("domain")),
1167
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1168
+ jurisdiction: Schema.optional(
1169
+ Schema.Literals(["default", "eu", "fedramp"]),
1170
+ ).pipe(T.HttpHeader("cf-r2-jurisdiction")),
1171
+ }).pipe(
1172
+ T.Http({
1173
+ method: "DELETE",
1174
+ path: "/accounts/{account_id}/r2/buckets/{bucketName}/domains/custom/{domain}",
1175
+ }),
1176
+ ) as unknown as Schema.Schema<DeleteBucketDomainCustomRequest>;
1177
+
1178
+ export interface DeleteBucketDomainCustomResponse {
1179
+ /** Name of the removed custom domain. */
1180
+ domain: string;
1181
+ }
1182
+
1183
+ export const DeleteBucketDomainCustomResponse =
1184
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1185
+ domain: Schema.String,
1186
+ }) as unknown as Schema.Schema<DeleteBucketDomainCustomResponse>;
1187
+
1188
+ export type DeleteBucketDomainCustomError = DefaultErrors;
1189
+
1190
+ export const deleteBucketDomainCustom: API.OperationMethod<
1191
+ DeleteBucketDomainCustomRequest,
1192
+ DeleteBucketDomainCustomResponse,
1193
+ DeleteBucketDomainCustomError,
1194
+ Credentials | HttpClient.HttpClient
1195
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1196
+ input: DeleteBucketDomainCustomRequest,
1197
+ output: DeleteBucketDomainCustomResponse,
1198
+ errors: [],
1199
+ }));
1200
+
1201
+ // =============================================================================
1202
+ // BucketDomainManaged
1203
+ // =============================================================================
1204
+
1205
+ export interface ListBucketDomainManagedsRequest {
1206
+ bucketName: string;
1207
+ /** Path param: Account ID. */
1208
+ accountId: string;
1209
+ /** Header param: Jurisdiction where objects in this bucket are guaranteed to be stored. */
1210
+ jurisdiction?: "default" | "eu" | "fedramp";
1211
+ }
1212
+
1213
+ export const ListBucketDomainManagedsRequest =
1214
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1215
+ bucketName: Schema.String.pipe(T.HttpPath("bucketName")),
1216
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1217
+ jurisdiction: Schema.optional(
1218
+ Schema.Literals(["default", "eu", "fedramp"]),
1219
+ ).pipe(T.HttpHeader("cf-r2-jurisdiction")),
1220
+ }).pipe(
1221
+ T.Http({
1222
+ method: "GET",
1223
+ path: "/accounts/{account_id}/r2/buckets/{bucketName}/domains/managed",
1224
+ }),
1225
+ ) as unknown as Schema.Schema<ListBucketDomainManagedsRequest>;
1226
+
1227
+ export interface ListBucketDomainManagedsResponse {
1228
+ /** Bucket ID. */
1229
+ bucketId: string;
1230
+ /** Domain name of the bucket's r2.dev domain. */
1231
+ domain: string;
1232
+ /** Whether this bucket is publicly accessible at the r2.dev domain. */
1233
+ enabled: boolean;
1234
+ }
1235
+
1236
+ export const ListBucketDomainManagedsResponse =
1237
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1238
+ bucketId: Schema.String,
1239
+ domain: Schema.String,
1240
+ enabled: Schema.Boolean,
1241
+ }) as unknown as Schema.Schema<ListBucketDomainManagedsResponse>;
1242
+
1243
+ export type ListBucketDomainManagedsError =
1244
+ | DefaultErrors
1245
+ | NoSuchBucket
1246
+ | InvalidRoute;
1247
+
1248
+ export const listBucketDomainManageds: API.OperationMethod<
1249
+ ListBucketDomainManagedsRequest,
1250
+ ListBucketDomainManagedsResponse,
1251
+ ListBucketDomainManagedsError,
1252
+ Credentials | HttpClient.HttpClient
1253
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1254
+ input: ListBucketDomainManagedsRequest,
1255
+ output: ListBucketDomainManagedsResponse,
1256
+ errors: [NoSuchBucket, InvalidRoute],
1257
+ }));
1258
+
1259
+ export interface PutBucketDomainManagedRequest {
1260
+ bucketName: string;
1261
+ /** Path param: Account ID. */
1262
+ accountId: string;
1263
+ /** Header param: Jurisdiction where objects in this bucket are guaranteed to be stored. */
1264
+ jurisdiction?: "default" | "eu" | "fedramp";
1265
+ /** Body param: Whether to enable public bucket access at the r2.dev domain. */
1266
+ enabled: boolean;
1267
+ }
1268
+
1269
+ export const PutBucketDomainManagedRequest =
1270
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1271
+ bucketName: Schema.String.pipe(T.HttpPath("bucketName")),
1272
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1273
+ jurisdiction: Schema.optional(
1274
+ Schema.Literals(["default", "eu", "fedramp"]),
1275
+ ).pipe(T.HttpHeader("cf-r2-jurisdiction")),
1276
+ enabled: Schema.Boolean,
1277
+ }).pipe(
1278
+ T.Http({
1279
+ method: "PUT",
1280
+ path: "/accounts/{account_id}/r2/buckets/{bucketName}/domains/managed",
1281
+ }),
1282
+ ) as unknown as Schema.Schema<PutBucketDomainManagedRequest>;
1283
+
1284
+ export interface PutBucketDomainManagedResponse {
1285
+ /** Bucket ID. */
1286
+ bucketId: string;
1287
+ /** Domain name of the bucket's r2.dev domain. */
1288
+ domain: string;
1289
+ /** Whether this bucket is publicly accessible at the r2.dev domain. */
1290
+ enabled: boolean;
1291
+ }
1292
+
1293
+ export const PutBucketDomainManagedResponse =
1294
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1295
+ bucketId: Schema.String,
1296
+ domain: Schema.String,
1297
+ enabled: Schema.Boolean,
1298
+ }) as unknown as Schema.Schema<PutBucketDomainManagedResponse>;
1299
+
1300
+ export type PutBucketDomainManagedError =
1301
+ | DefaultErrors
1302
+ | NoSuchBucket
1303
+ | InvalidRoute;
1304
+
1305
+ export const putBucketDomainManaged: API.OperationMethod<
1306
+ PutBucketDomainManagedRequest,
1307
+ PutBucketDomainManagedResponse,
1308
+ PutBucketDomainManagedError,
1309
+ Credentials | HttpClient.HttpClient
1310
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1311
+ input: PutBucketDomainManagedRequest,
1312
+ output: PutBucketDomainManagedResponse,
1313
+ errors: [NoSuchBucket, InvalidRoute],
1314
+ }));
1315
+
1316
+ // =============================================================================
1317
+ // BucketEventNotification
1318
+ // =============================================================================
1319
+
1320
+ export interface GetBucketEventNotificationRequest {
1321
+ bucketName: string;
1322
+ queueId: string;
1323
+ /** Path param: Account ID. */
1324
+ accountId: string;
1325
+ /** Header param: The bucket jurisdiction. */
1326
+ jurisdiction?: "default" | "eu" | "fedramp";
1327
+ }
1328
+
1329
+ export const GetBucketEventNotificationRequest =
1330
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1331
+ bucketName: Schema.String.pipe(T.HttpPath("bucketName")),
1332
+ queueId: Schema.String.pipe(T.HttpPath("queueId")),
1333
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1334
+ jurisdiction: Schema.optional(
1335
+ Schema.Literals(["default", "eu", "fedramp"]),
1336
+ ).pipe(T.HttpHeader("cf-r2-jurisdiction")),
1337
+ }).pipe(
1338
+ T.Http({
1339
+ method: "GET",
1340
+ path: "/accounts/{account_id}/event_notifications/r2/{bucketName}/configuration/queues/{queueId}",
1341
+ }),
1342
+ ) as unknown as Schema.Schema<GetBucketEventNotificationRequest>;
1343
+
1344
+ export interface GetBucketEventNotificationResponse {
1345
+ /** Queue ID. */
1346
+ queueId?: string | null;
1347
+ /** Name of the queue. */
1348
+ queueName?: string | null;
1349
+ rules?:
1350
+ | {
1351
+ actions: (
1352
+ | "PutObject"
1353
+ | "CopyObject"
1354
+ | "DeleteObject"
1355
+ | "CompleteMultipartUpload"
1356
+ | "LifecycleDeletion"
1357
+ )[];
1358
+ createdAt?: string | null;
1359
+ description?: string | null;
1360
+ prefix?: string | null;
1361
+ ruleId?: string | null;
1362
+ suffix?: string | null;
1363
+ }[]
1364
+ | null;
1365
+ }
1366
+
1367
+ export const GetBucketEventNotificationResponse =
1368
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1369
+ queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1370
+ queueName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1371
+ rules: Schema.optional(
1372
+ Schema.Union([
1373
+ Schema.Array(
1374
+ Schema.Struct({
1375
+ actions: Schema.Array(
1376
+ Schema.Literals([
1377
+ "PutObject",
1378
+ "CopyObject",
1379
+ "DeleteObject",
1380
+ "CompleteMultipartUpload",
1381
+ "LifecycleDeletion",
1382
+ ]),
1383
+ ),
1384
+ createdAt: Schema.optional(
1385
+ Schema.Union([Schema.String, Schema.Null]),
1386
+ ),
1387
+ description: Schema.optional(
1388
+ Schema.Union([Schema.String, Schema.Null]),
1389
+ ),
1390
+ prefix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1391
+ ruleId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1392
+ suffix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1393
+ }),
1394
+ ),
1395
+ Schema.Null,
1396
+ ]),
1397
+ ),
1398
+ }) as unknown as Schema.Schema<GetBucketEventNotificationResponse>;
1399
+
1400
+ export type GetBucketEventNotificationError = DefaultErrors;
1401
+
1402
+ export const getBucketEventNotification: API.OperationMethod<
1403
+ GetBucketEventNotificationRequest,
1404
+ GetBucketEventNotificationResponse,
1405
+ GetBucketEventNotificationError,
1406
+ Credentials | HttpClient.HttpClient
1407
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1408
+ input: GetBucketEventNotificationRequest,
1409
+ output: GetBucketEventNotificationResponse,
1410
+ errors: [],
1411
+ }));
1412
+
1413
+ export interface ListBucketEventNotificationsRequest {
1414
+ bucketName: string;
1415
+ /** Path param: Account ID. */
1416
+ accountId: string;
1417
+ /** Header param: Jurisdiction where objects in this bucket are guaranteed to be stored. */
1418
+ jurisdiction?: "default" | "eu" | "fedramp";
1419
+ }
1420
+
1421
+ export const ListBucketEventNotificationsRequest =
1422
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1423
+ bucketName: Schema.String.pipe(T.HttpPath("bucketName")),
1424
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1425
+ jurisdiction: Schema.optional(
1426
+ Schema.Literals(["default", "eu", "fedramp"]),
1427
+ ).pipe(T.HttpHeader("cf-r2-jurisdiction")),
1428
+ }).pipe(
1429
+ T.Http({
1430
+ method: "GET",
1431
+ path: "/accounts/{account_id}/event_notifications/r2/{bucketName}/configuration",
1432
+ }),
1433
+ ) as unknown as Schema.Schema<ListBucketEventNotificationsRequest>;
1434
+
1435
+ export interface ListBucketEventNotificationsResponse {
1436
+ /** Name of the bucket. */
1437
+ bucketName?: string | null;
1438
+ /** List of queues associated with the bucket. */
1439
+ queues?:
1440
+ | {
1441
+ queueId?: string | null;
1442
+ queueName?: string | null;
1443
+ rules?:
1444
+ | {
1445
+ actions: (
1446
+ | "PutObject"
1447
+ | "CopyObject"
1448
+ | "DeleteObject"
1449
+ | "CompleteMultipartUpload"
1450
+ | "LifecycleDeletion"
1451
+ )[];
1452
+ createdAt?: string | null;
1453
+ description?: string | null;
1454
+ prefix?: string | null;
1455
+ ruleId?: string | null;
1456
+ suffix?: string | null;
1457
+ }[]
1458
+ | null;
1459
+ }[]
1460
+ | null;
1461
+ }
1462
+
1463
+ export const ListBucketEventNotificationsResponse =
1464
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1465
+ bucketName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1466
+ queues: Schema.optional(
1467
+ Schema.Union([
1468
+ Schema.Array(
1469
+ Schema.Struct({
1470
+ queueId: Schema.optional(
1471
+ Schema.Union([Schema.String, Schema.Null]),
1472
+ ),
1473
+ queueName: Schema.optional(
1474
+ Schema.Union([Schema.String, Schema.Null]),
1475
+ ),
1476
+ rules: Schema.optional(
1477
+ Schema.Union([
1478
+ Schema.Array(
1479
+ Schema.Struct({
1480
+ actions: Schema.Array(
1481
+ Schema.Literals([
1482
+ "PutObject",
1483
+ "CopyObject",
1484
+ "DeleteObject",
1485
+ "CompleteMultipartUpload",
1486
+ "LifecycleDeletion",
1487
+ ]),
1488
+ ),
1489
+ createdAt: Schema.optional(
1490
+ Schema.Union([Schema.String, Schema.Null]),
1491
+ ),
1492
+ description: Schema.optional(
1493
+ Schema.Union([Schema.String, Schema.Null]),
1494
+ ),
1495
+ prefix: Schema.optional(
1496
+ Schema.Union([Schema.String, Schema.Null]),
1497
+ ),
1498
+ ruleId: Schema.optional(
1499
+ Schema.Union([Schema.String, Schema.Null]),
1500
+ ),
1501
+ suffix: Schema.optional(
1502
+ Schema.Union([Schema.String, Schema.Null]),
1503
+ ),
1504
+ }),
1505
+ ),
1506
+ Schema.Null,
1507
+ ]),
1508
+ ),
1509
+ }),
1510
+ ),
1511
+ Schema.Null,
1512
+ ]),
1513
+ ),
1514
+ }) as unknown as Schema.Schema<ListBucketEventNotificationsResponse>;
1515
+
1516
+ export type ListBucketEventNotificationsError =
1517
+ | DefaultErrors
1518
+ | NoSuchBucket
1519
+ | InvalidRoute
1520
+ | NoEventNotificationConfig
1521
+ | BucketNotFound;
1522
+
1523
+ export const listBucketEventNotifications: API.OperationMethod<
1524
+ ListBucketEventNotificationsRequest,
1525
+ ListBucketEventNotificationsResponse,
1526
+ ListBucketEventNotificationsError,
1527
+ Credentials | HttpClient.HttpClient
1528
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1529
+ input: ListBucketEventNotificationsRequest,
1530
+ output: ListBucketEventNotificationsResponse,
1531
+ errors: [
1532
+ NoSuchBucket,
1533
+ InvalidRoute,
1534
+ NoEventNotificationConfig,
1535
+ BucketNotFound,
1536
+ ],
1537
+ }));
1538
+
1539
+ export interface PutBucketEventNotificationRequest {
1540
+ bucketName: string;
1541
+ queueId: string;
1542
+ /** Path param: Account ID. */
1543
+ accountId: string;
1544
+ /** Header param: Jurisdiction where objects in this bucket are guaranteed to be stored. */
1545
+ jurisdiction?: "default" | "eu" | "fedramp";
1546
+ /** Body param: Array of rules to drive notifications. */
1547
+ rules: {
1548
+ actions: (
1549
+ | "PutObject"
1550
+ | "CopyObject"
1551
+ | "DeleteObject"
1552
+ | "CompleteMultipartUpload"
1553
+ | "LifecycleDeletion"
1554
+ )[];
1555
+ description?: string;
1556
+ prefix?: string;
1557
+ suffix?: string;
1558
+ }[];
1559
+ }
1560
+
1561
+ export const PutBucketEventNotificationRequest =
1562
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1563
+ bucketName: Schema.String.pipe(T.HttpPath("bucketName")),
1564
+ queueId: Schema.String.pipe(T.HttpPath("queueId")),
1565
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1566
+ jurisdiction: Schema.optional(
1567
+ Schema.Literals(["default", "eu", "fedramp"]),
1568
+ ).pipe(T.HttpHeader("cf-r2-jurisdiction")),
1569
+ rules: Schema.Array(
1570
+ Schema.Struct({
1571
+ actions: Schema.Array(
1572
+ Schema.Literals([
1573
+ "PutObject",
1574
+ "CopyObject",
1575
+ "DeleteObject",
1576
+ "CompleteMultipartUpload",
1577
+ "LifecycleDeletion",
1578
+ ]),
1579
+ ),
1580
+ description: Schema.optional(Schema.String),
1581
+ prefix: Schema.optional(Schema.String),
1582
+ suffix: Schema.optional(Schema.String),
1583
+ }),
1584
+ ),
1585
+ }).pipe(
1586
+ T.Http({
1587
+ method: "PUT",
1588
+ path: "/accounts/{account_id}/event_notifications/r2/{bucketName}/configuration/queues/{queueId}",
1589
+ }),
1590
+ ) as unknown as Schema.Schema<PutBucketEventNotificationRequest>;
1591
+
1592
+ export type PutBucketEventNotificationResponse = unknown;
1593
+
1594
+ export const PutBucketEventNotificationResponse =
1595
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<PutBucketEventNotificationResponse>;
1596
+
1597
+ export type PutBucketEventNotificationError = DefaultErrors;
1598
+
1599
+ export const putBucketEventNotification: API.OperationMethod<
1600
+ PutBucketEventNotificationRequest,
1601
+ PutBucketEventNotificationResponse,
1602
+ PutBucketEventNotificationError,
1603
+ Credentials | HttpClient.HttpClient
1604
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1605
+ input: PutBucketEventNotificationRequest,
1606
+ output: PutBucketEventNotificationResponse,
1607
+ errors: [],
1608
+ }));
1609
+
1610
+ export interface DeleteBucketEventNotificationRequest {
1611
+ bucketName: string;
1612
+ queueId: string;
1613
+ /** Path param: Account ID. */
1614
+ accountId: string;
1615
+ /** Header param: Jurisdiction where objects in this bucket are guaranteed to be stored. */
1616
+ jurisdiction?: "default" | "eu" | "fedramp";
1617
+ }
1618
+
1619
+ export const DeleteBucketEventNotificationRequest =
1620
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1621
+ bucketName: Schema.String.pipe(T.HttpPath("bucketName")),
1622
+ queueId: Schema.String.pipe(T.HttpPath("queueId")),
1623
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1624
+ jurisdiction: Schema.optional(
1625
+ Schema.Literals(["default", "eu", "fedramp"]),
1626
+ ).pipe(T.HttpHeader("cf-r2-jurisdiction")),
1627
+ }).pipe(
1628
+ T.Http({
1629
+ method: "DELETE",
1630
+ path: "/accounts/{account_id}/event_notifications/r2/{bucketName}/configuration/queues/{queueId}",
1631
+ }),
1632
+ ) as unknown as Schema.Schema<DeleteBucketEventNotificationRequest>;
1633
+
1634
+ export type DeleteBucketEventNotificationResponse = unknown;
1635
+
1636
+ export const DeleteBucketEventNotificationResponse =
1637
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<DeleteBucketEventNotificationResponse>;
1638
+
1639
+ export type DeleteBucketEventNotificationError = DefaultErrors;
1640
+
1641
+ export const deleteBucketEventNotification: API.OperationMethod<
1642
+ DeleteBucketEventNotificationRequest,
1643
+ DeleteBucketEventNotificationResponse,
1644
+ DeleteBucketEventNotificationError,
1645
+ Credentials | HttpClient.HttpClient
1646
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1647
+ input: DeleteBucketEventNotificationRequest,
1648
+ output: DeleteBucketEventNotificationResponse,
1649
+ errors: [],
1650
+ }));
1651
+
1652
+ // =============================================================================
1653
+ // BucketLifecycle
1654
+ // =============================================================================
1655
+
1656
+ export interface GetBucketLifecycleRequest {
1657
+ bucketName: string;
1658
+ /** Path param: Account ID. */
1659
+ accountId: string;
1660
+ /** Header param: Jurisdiction where objects in this bucket are guaranteed to be stored. */
1661
+ jurisdiction?: "default" | "eu" | "fedramp";
1662
+ }
1663
+
1664
+ export const GetBucketLifecycleRequest =
1665
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1666
+ bucketName: Schema.String.pipe(T.HttpPath("bucketName")),
1667
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1668
+ jurisdiction: Schema.optional(
1669
+ Schema.Literals(["default", "eu", "fedramp"]),
1670
+ ).pipe(T.HttpHeader("cf-r2-jurisdiction")),
1671
+ }).pipe(
1672
+ T.Http({
1673
+ method: "GET",
1674
+ path: "/accounts/{account_id}/r2/buckets/{bucketName}/lifecycle",
1675
+ }),
1676
+ ) as unknown as Schema.Schema<GetBucketLifecycleRequest>;
1677
+
1678
+ export interface GetBucketLifecycleResponse {
1679
+ rules?:
1680
+ | {
1681
+ id: string;
1682
+ conditions: { prefix?: string | null };
1683
+ enabled: boolean;
1684
+ abortMultipartUploadsTransition?: {
1685
+ condition?: { maxAge: number; type: "Age" } | null;
1686
+ } | null;
1687
+ deleteObjectsTransition?: {
1688
+ condition?:
1689
+ | { maxAge: number; type: "Age" }
1690
+ | { date: string; type: "Date" }
1691
+ | null;
1692
+ } | null;
1693
+ storageClassTransitions?:
1694
+ | {
1695
+ condition:
1696
+ | { maxAge: number; type: "Age" }
1697
+ | { date: string; type: "Date" };
1698
+ storageClass: "InfrequentAccess";
1699
+ }[]
1700
+ | null;
1701
+ }[]
1702
+ | null;
1703
+ }
1704
+
1705
+ export const GetBucketLifecycleResponse =
1706
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1707
+ rules: Schema.optional(
1708
+ Schema.Union([
1709
+ Schema.Array(
1710
+ Schema.Struct({
1711
+ id: Schema.String,
1712
+ conditions: Schema.Struct({
1713
+ prefix: Schema.optional(
1714
+ Schema.Union([Schema.String, Schema.Null]),
1715
+ ),
1716
+ }),
1717
+ enabled: Schema.Boolean,
1718
+ abortMultipartUploadsTransition: Schema.optional(
1719
+ Schema.Union([
1720
+ Schema.Struct({
1721
+ condition: Schema.optional(
1722
+ Schema.Union([
1723
+ Schema.Struct({
1724
+ maxAge: Schema.Number,
1725
+ type: Schema.Literal("Age"),
1726
+ }),
1727
+ Schema.Null,
1728
+ ]),
1729
+ ),
1730
+ }),
1731
+ Schema.Null,
1732
+ ]),
1733
+ ),
1734
+ deleteObjectsTransition: Schema.optional(
1735
+ Schema.Union([
1736
+ Schema.Struct({
1737
+ condition: Schema.optional(
1738
+ Schema.Union([
1739
+ Schema.Union([
1740
+ Schema.Struct({
1741
+ maxAge: Schema.Number,
1742
+ type: Schema.Literal("Age"),
1743
+ }),
1744
+ Schema.Struct({
1745
+ date: Schema.String,
1746
+ type: Schema.Literal("Date"),
1747
+ }),
1748
+ ]),
1749
+ Schema.Null,
1750
+ ]),
1751
+ ),
1752
+ }),
1753
+ Schema.Null,
1754
+ ]),
1755
+ ),
1756
+ storageClassTransitions: Schema.optional(
1757
+ Schema.Union([
1758
+ Schema.Array(
1759
+ Schema.Struct({
1760
+ condition: Schema.Union([
1761
+ Schema.Struct({
1762
+ maxAge: Schema.Number,
1763
+ type: Schema.Literal("Age"),
1764
+ }),
1765
+ Schema.Struct({
1766
+ date: Schema.String,
1767
+ type: Schema.Literal("Date"),
1768
+ }),
1769
+ ]),
1770
+ storageClass: Schema.Literal("InfrequentAccess"),
1771
+ }),
1772
+ ),
1773
+ Schema.Null,
1774
+ ]),
1775
+ ),
1776
+ }),
1777
+ ),
1778
+ Schema.Null,
1779
+ ]),
1780
+ ),
1781
+ }) as unknown as Schema.Schema<GetBucketLifecycleResponse>;
1782
+
1783
+ export type GetBucketLifecycleError =
1784
+ | DefaultErrors
1785
+ | NoSuchBucket
1786
+ | InvalidRoute;
1787
+
1788
+ export const getBucketLifecycle: API.OperationMethod<
1789
+ GetBucketLifecycleRequest,
1790
+ GetBucketLifecycleResponse,
1791
+ GetBucketLifecycleError,
1792
+ Credentials | HttpClient.HttpClient
1793
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1794
+ input: GetBucketLifecycleRequest,
1795
+ output: GetBucketLifecycleResponse,
1796
+ errors: [NoSuchBucket, InvalidRoute],
1797
+ }));
1798
+
1799
+ export interface PutBucketLifecycleRequest {
1800
+ bucketName: string;
1801
+ /** Path param: Account ID. */
1802
+ accountId: string;
1803
+ /** Header param: Jurisdiction where objects in this bucket are guaranteed to be stored. */
1804
+ jurisdiction?: "default" | "eu" | "fedramp";
1805
+ /** Body param: */
1806
+ rules?: {
1807
+ id: string;
1808
+ conditions: { prefix: string };
1809
+ enabled: boolean;
1810
+ abortMultipartUploadsTransition?: {
1811
+ condition?: { maxAge: number; type: "Age" };
1812
+ };
1813
+ deleteObjectsTransition?: {
1814
+ condition?:
1815
+ | { maxAge: number; type: "Age" }
1816
+ | { date: string; type: "Date" };
1817
+ };
1818
+ storageClassTransitions?: {
1819
+ condition:
1820
+ | { maxAge: number; type: "Age" }
1821
+ | { date: string; type: "Date" };
1822
+ storageClass: "InfrequentAccess";
1823
+ }[];
1824
+ }[];
1825
+ }
1826
+
1827
+ export const PutBucketLifecycleRequest =
1828
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1829
+ bucketName: Schema.String.pipe(T.HttpPath("bucketName")),
1830
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1831
+ jurisdiction: Schema.optional(
1832
+ Schema.Literals(["default", "eu", "fedramp"]),
1833
+ ).pipe(T.HttpHeader("cf-r2-jurisdiction")),
1834
+ rules: Schema.optional(
1835
+ Schema.Array(
1836
+ Schema.Struct({
1837
+ id: Schema.String,
1838
+ conditions: Schema.Struct({
1839
+ prefix: Schema.String,
1840
+ }),
1841
+ enabled: Schema.Boolean,
1842
+ abortMultipartUploadsTransition: Schema.optional(
1843
+ Schema.Struct({
1844
+ condition: Schema.optional(
1845
+ Schema.Struct({
1846
+ maxAge: Schema.Number,
1847
+ type: Schema.Literal("Age"),
1848
+ }),
1849
+ ),
1850
+ }),
1851
+ ),
1852
+ deleteObjectsTransition: Schema.optional(
1853
+ Schema.Struct({
1854
+ condition: Schema.optional(
1855
+ Schema.Union([
1856
+ Schema.Struct({
1857
+ maxAge: Schema.Number,
1858
+ type: Schema.Literal("Age"),
1859
+ }),
1860
+ Schema.Struct({
1861
+ date: Schema.String,
1862
+ type: Schema.Literal("Date"),
1863
+ }),
1864
+ ]),
1865
+ ),
1866
+ }),
1867
+ ),
1868
+ storageClassTransitions: Schema.optional(
1869
+ Schema.Array(
1870
+ Schema.Struct({
1871
+ condition: Schema.Union([
1872
+ Schema.Struct({
1873
+ maxAge: Schema.Number,
1874
+ type: Schema.Literal("Age"),
1875
+ }),
1876
+ Schema.Struct({
1877
+ date: Schema.String,
1878
+ type: Schema.Literal("Date"),
1879
+ }),
1880
+ ]),
1881
+ storageClass: Schema.Literal("InfrequentAccess"),
1882
+ }),
1883
+ ),
1884
+ ),
1885
+ }),
1886
+ ),
1887
+ ),
1888
+ }).pipe(
1889
+ T.Http({
1890
+ method: "PUT",
1891
+ path: "/accounts/{account_id}/r2/buckets/{bucketName}/lifecycle",
1892
+ }),
1893
+ ) as unknown as Schema.Schema<PutBucketLifecycleRequest>;
1894
+
1895
+ export type PutBucketLifecycleResponse = unknown;
1896
+
1897
+ export const PutBucketLifecycleResponse =
1898
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<PutBucketLifecycleResponse>;
1899
+
1900
+ export type PutBucketLifecycleError =
1901
+ | DefaultErrors
1902
+ | NoSuchBucket
1903
+ | InvalidRoute;
1904
+
1905
+ export const putBucketLifecycle: API.OperationMethod<
1906
+ PutBucketLifecycleRequest,
1907
+ PutBucketLifecycleResponse,
1908
+ PutBucketLifecycleError,
1909
+ Credentials | HttpClient.HttpClient
1910
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1911
+ input: PutBucketLifecycleRequest,
1912
+ output: PutBucketLifecycleResponse,
1913
+ errors: [NoSuchBucket, InvalidRoute],
1914
+ }));
1915
+
1916
+ // =============================================================================
1917
+ // BucketLock
1918
+ // =============================================================================
1919
+
1920
+ export interface GetBucketLockRequest {
1921
+ bucketName: string;
1922
+ /** Path param: Account ID. */
1923
+ accountId: string;
1924
+ /** Header param: Jurisdiction where objects in this bucket are guaranteed to be stored. */
1925
+ jurisdiction?: "default" | "eu" | "fedramp";
1926
+ }
1927
+
1928
+ export const GetBucketLockRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1929
+ bucketName: Schema.String.pipe(T.HttpPath("bucketName")),
1930
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1931
+ jurisdiction: Schema.optional(
1932
+ Schema.Literals(["default", "eu", "fedramp"]),
1933
+ ).pipe(T.HttpHeader("cf-r2-jurisdiction")),
1934
+ }).pipe(
1935
+ T.Http({
1936
+ method: "GET",
1937
+ path: "/accounts/{account_id}/r2/buckets/{bucketName}/lock",
1938
+ }),
1939
+ ) as unknown as Schema.Schema<GetBucketLockRequest>;
1940
+
1941
+ export interface GetBucketLockResponse {
1942
+ rules?:
1943
+ | {
1944
+ id: string;
1945
+ condition:
1946
+ | { maxAgeSeconds: number; type: "Age" }
1947
+ | { date: string; type: "Date" }
1948
+ | { type: "Indefinite" };
1949
+ enabled: boolean;
1950
+ prefix?: string | null;
1951
+ }[]
1952
+ | null;
1953
+ }
1954
+
1955
+ export const GetBucketLockResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1956
+ rules: Schema.optional(
1957
+ Schema.Union([
1958
+ Schema.Array(
1959
+ Schema.Struct({
1960
+ id: Schema.String,
1961
+ condition: Schema.Union([
1962
+ Schema.Struct({
1963
+ maxAgeSeconds: Schema.Number,
1964
+ type: Schema.Literal("Age"),
1965
+ }),
1966
+ Schema.Struct({
1967
+ date: Schema.String,
1968
+ type: Schema.Literal("Date"),
1969
+ }),
1970
+ Schema.Struct({
1971
+ type: Schema.Literal("Indefinite"),
1972
+ }),
1973
+ ]),
1974
+ enabled: Schema.Boolean,
1975
+ prefix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1976
+ }),
1977
+ ),
1978
+ Schema.Null,
1979
+ ]),
1980
+ ),
1981
+ }) as unknown as Schema.Schema<GetBucketLockResponse>;
1982
+
1983
+ export type GetBucketLockError = DefaultErrors | NoSuchBucket | InvalidRoute;
1984
+
1985
+ export const getBucketLock: API.OperationMethod<
1986
+ GetBucketLockRequest,
1987
+ GetBucketLockResponse,
1988
+ GetBucketLockError,
1989
+ Credentials | HttpClient.HttpClient
1990
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1991
+ input: GetBucketLockRequest,
1992
+ output: GetBucketLockResponse,
1993
+ errors: [NoSuchBucket, InvalidRoute],
1994
+ }));
1995
+
1996
+ export interface PutBucketLockRequest {
1997
+ bucketName: string;
1998
+ /** Path param: Account ID. */
1999
+ accountId: string;
2000
+ /** Header param: Jurisdiction where objects in this bucket are guaranteed to be stored. */
2001
+ jurisdiction?: "default" | "eu" | "fedramp";
2002
+ /** Body param: */
2003
+ rules?: {
2004
+ id: string;
2005
+ condition:
2006
+ | { maxAgeSeconds: number; type: "Age" }
2007
+ | { date: string; type: "Date" }
2008
+ | { type: "Indefinite" };
2009
+ enabled: boolean;
2010
+ prefix?: string;
2011
+ }[];
2012
+ }
2013
+
2014
+ export const PutBucketLockRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2015
+ bucketName: Schema.String.pipe(T.HttpPath("bucketName")),
2016
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2017
+ jurisdiction: Schema.optional(
2018
+ Schema.Literals(["default", "eu", "fedramp"]),
2019
+ ).pipe(T.HttpHeader("cf-r2-jurisdiction")),
2020
+ rules: Schema.optional(
2021
+ Schema.Array(
2022
+ Schema.Struct({
2023
+ id: Schema.String,
2024
+ condition: Schema.Union([
2025
+ Schema.Struct({
2026
+ maxAgeSeconds: Schema.Number,
2027
+ type: Schema.Literal("Age"),
2028
+ }),
2029
+ Schema.Struct({
2030
+ date: Schema.String,
2031
+ type: Schema.Literal("Date"),
2032
+ }),
2033
+ Schema.Struct({
2034
+ type: Schema.Literal("Indefinite"),
2035
+ }),
2036
+ ]),
2037
+ enabled: Schema.Boolean,
2038
+ prefix: Schema.optional(Schema.String),
2039
+ }),
2040
+ ),
2041
+ ),
2042
+ }).pipe(
2043
+ T.Http({
2044
+ method: "PUT",
2045
+ path: "/accounts/{account_id}/r2/buckets/{bucketName}/lock",
2046
+ }),
2047
+ ) as unknown as Schema.Schema<PutBucketLockRequest>;
2048
+
2049
+ export type PutBucketLockResponse = unknown;
2050
+
2051
+ export const PutBucketLockResponse =
2052
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<PutBucketLockResponse>;
2053
+
2054
+ export type PutBucketLockError = DefaultErrors | NoSuchBucket | InvalidRoute;
2055
+
2056
+ export const putBucketLock: API.OperationMethod<
2057
+ PutBucketLockRequest,
2058
+ PutBucketLockResponse,
2059
+ PutBucketLockError,
2060
+ Credentials | HttpClient.HttpClient
2061
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2062
+ input: PutBucketLockRequest,
2063
+ output: PutBucketLockResponse,
2064
+ errors: [NoSuchBucket, InvalidRoute],
2065
+ }));
2066
+
2067
+ // =============================================================================
2068
+ // BucketMetric
2069
+ // =============================================================================
2070
+
2071
+ export interface ListBucketMetricsRequest {
2072
+ /** Account ID. */
2073
+ accountId: string;
2074
+ }
2075
+
2076
+ export const ListBucketMetricsRequest =
2077
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2078
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2079
+ }).pipe(
2080
+ T.Http({ method: "GET", path: "/accounts/{account_id}/r2/metrics" }),
2081
+ ) as unknown as Schema.Schema<ListBucketMetricsRequest>;
2082
+
2083
+ export interface ListBucketMetricsResponse {
2084
+ /** Metrics based on what state they are in(uploaded or published). */
2085
+ infrequentAccess?: {
2086
+ published?: {
2087
+ metadataSize?: number | null;
2088
+ objects?: number | null;
2089
+ payloadSize?: number | null;
2090
+ } | null;
2091
+ uploaded?: {
2092
+ metadataSize?: number | null;
2093
+ objects?: number | null;
2094
+ payloadSize?: number | null;
2095
+ } | null;
2096
+ } | null;
2097
+ /** Metrics based on what state they are in(uploaded or published). */
2098
+ standard?: {
2099
+ published?: {
2100
+ metadataSize?: number | null;
2101
+ objects?: number | null;
2102
+ payloadSize?: number | null;
2103
+ } | null;
2104
+ uploaded?: {
2105
+ metadataSize?: number | null;
2106
+ objects?: number | null;
2107
+ payloadSize?: number | null;
2108
+ } | null;
2109
+ } | null;
2110
+ }
2111
+
2112
+ export const ListBucketMetricsResponse =
2113
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2114
+ infrequentAccess: Schema.optional(
2115
+ Schema.Union([
2116
+ Schema.Struct({
2117
+ published: Schema.optional(
2118
+ Schema.Union([
2119
+ Schema.Struct({
2120
+ metadataSize: Schema.optional(
2121
+ Schema.Union([Schema.Number, Schema.Null]),
2122
+ ),
2123
+ objects: Schema.optional(
2124
+ Schema.Union([Schema.Number, Schema.Null]),
2125
+ ),
2126
+ payloadSize: Schema.optional(
2127
+ Schema.Union([Schema.Number, Schema.Null]),
2128
+ ),
2129
+ }),
2130
+ Schema.Null,
2131
+ ]),
2132
+ ),
2133
+ uploaded: Schema.optional(
2134
+ Schema.Union([
2135
+ Schema.Struct({
2136
+ metadataSize: Schema.optional(
2137
+ Schema.Union([Schema.Number, Schema.Null]),
2138
+ ),
2139
+ objects: Schema.optional(
2140
+ Schema.Union([Schema.Number, Schema.Null]),
2141
+ ),
2142
+ payloadSize: Schema.optional(
2143
+ Schema.Union([Schema.Number, Schema.Null]),
2144
+ ),
2145
+ }),
2146
+ Schema.Null,
2147
+ ]),
2148
+ ),
2149
+ }),
2150
+ Schema.Null,
2151
+ ]),
2152
+ ),
2153
+ standard: Schema.optional(
2154
+ Schema.Union([
2155
+ Schema.Struct({
2156
+ published: Schema.optional(
2157
+ Schema.Union([
2158
+ Schema.Struct({
2159
+ metadataSize: Schema.optional(
2160
+ Schema.Union([Schema.Number, Schema.Null]),
2161
+ ),
2162
+ objects: Schema.optional(
2163
+ Schema.Union([Schema.Number, Schema.Null]),
2164
+ ),
2165
+ payloadSize: Schema.optional(
2166
+ Schema.Union([Schema.Number, Schema.Null]),
2167
+ ),
2168
+ }),
2169
+ Schema.Null,
2170
+ ]),
2171
+ ),
2172
+ uploaded: Schema.optional(
2173
+ Schema.Union([
2174
+ Schema.Struct({
2175
+ metadataSize: Schema.optional(
2176
+ Schema.Union([Schema.Number, Schema.Null]),
2177
+ ),
2178
+ objects: Schema.optional(
2179
+ Schema.Union([Schema.Number, Schema.Null]),
2180
+ ),
2181
+ payloadSize: Schema.optional(
2182
+ Schema.Union([Schema.Number, Schema.Null]),
2183
+ ),
2184
+ }),
2185
+ Schema.Null,
2186
+ ]),
2187
+ ),
2188
+ }),
2189
+ Schema.Null,
2190
+ ]),
2191
+ ),
2192
+ }) as unknown as Schema.Schema<ListBucketMetricsResponse>;
2193
+
2194
+ export type ListBucketMetricsError = DefaultErrors | InvalidRoute;
2195
+
2196
+ export const listBucketMetrics: API.OperationMethod<
2197
+ ListBucketMetricsRequest,
2198
+ ListBucketMetricsResponse,
2199
+ ListBucketMetricsError,
2200
+ Credentials | HttpClient.HttpClient
2201
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2202
+ input: ListBucketMetricsRequest,
2203
+ output: ListBucketMetricsResponse,
2204
+ errors: [InvalidRoute],
2205
+ }));
2206
+
2207
+ // =============================================================================
2208
+ // BucketSippy
2209
+ // =============================================================================
2210
+
2211
+ export interface GetBucketSippyRequest {
2212
+ bucketName: string;
2213
+ /** Path param: Account ID. */
2214
+ accountId: string;
2215
+ /** Header param: Jurisdiction where objects in this bucket are guaranteed to be stored. */
2216
+ jurisdiction?: "default" | "eu" | "fedramp";
2217
+ }
2218
+
2219
+ export const GetBucketSippyRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2220
+ bucketName: Schema.String.pipe(T.HttpPath("bucketName")),
2221
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2222
+ jurisdiction: Schema.optional(
2223
+ Schema.Literals(["default", "eu", "fedramp"]),
2224
+ ).pipe(T.HttpHeader("cf-r2-jurisdiction")),
2225
+ }).pipe(
2226
+ T.Http({
2227
+ method: "GET",
2228
+ path: "/accounts/{account_id}/r2/buckets/{bucketName}/sippy",
2229
+ }),
2230
+ ) as unknown as Schema.Schema<GetBucketSippyRequest>;
2231
+
2232
+ export interface GetBucketSippyResponse {
2233
+ /** Details about the configured destination bucket. */
2234
+ destination?: {
2235
+ accessKeyId?: string | null;
2236
+ account?: string | null;
2237
+ bucket?: string | null;
2238
+ provider?: "r2" | null;
2239
+ } | null;
2240
+ /** State of Sippy for this bucket. */
2241
+ enabled?: boolean | null;
2242
+ /** Details about the configured source bucket. */
2243
+ source?: {
2244
+ bucket?: string | null;
2245
+ bucketUrl?: string | null;
2246
+ provider?: "aws" | "gcs" | "s3" | null;
2247
+ region?: string | null;
2248
+ } | null;
2249
+ }
2250
+
2251
+ export const GetBucketSippyResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
2252
+ {
2253
+ destination: Schema.optional(
2254
+ Schema.Union([
2255
+ Schema.Struct({
2256
+ accessKeyId: Schema.optional(
2257
+ Schema.Union([Schema.String, Schema.Null]),
2258
+ ),
2259
+ account: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2260
+ bucket: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2261
+ provider: Schema.optional(
2262
+ Schema.Union([Schema.Literal("r2"), Schema.Null]),
2263
+ ),
2264
+ }),
2265
+ Schema.Null,
2266
+ ]),
2267
+ ),
2268
+ enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2269
+ source: Schema.optional(
2270
+ Schema.Union([
2271
+ Schema.Struct({
2272
+ bucket: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2273
+ bucketUrl: Schema.optional(
2274
+ Schema.Union([Schema.String, Schema.Null]),
2275
+ ),
2276
+ provider: Schema.optional(
2277
+ Schema.Union([Schema.Literals(["aws", "gcs", "s3"]), Schema.Null]),
2278
+ ),
2279
+ region: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2280
+ }),
2281
+ Schema.Null,
2282
+ ]),
2283
+ ),
2284
+ },
2285
+ ) as unknown as Schema.Schema<GetBucketSippyResponse>;
2286
+
2287
+ export type GetBucketSippyError = DefaultErrors | NoSuchBucket | InvalidRoute;
2288
+
2289
+ export const getBucketSippy: API.OperationMethod<
2290
+ GetBucketSippyRequest,
2291
+ GetBucketSippyResponse,
2292
+ GetBucketSippyError,
2293
+ Credentials | HttpClient.HttpClient
2294
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2295
+ input: GetBucketSippyRequest,
2296
+ output: GetBucketSippyResponse,
2297
+ errors: [NoSuchBucket, InvalidRoute],
2298
+ }));
2299
+
2300
+ export interface PutBucketSippyRequest {
2301
+ bucketName: string;
2302
+ /** Path param: Account ID. */
2303
+ accountId: string;
2304
+ /** Header param: Jurisdiction where objects in this bucket are guaranteed to be stored. */
2305
+ jurisdiction?: "default" | "eu" | "fedramp";
2306
+ /** Body param: R2 bucket to copy objects to. */
2307
+ destination?: {
2308
+ accessKeyId?: string;
2309
+ provider?: "r2";
2310
+ secretAccessKey?: string;
2311
+ };
2312
+ /** Body param: AWS S3 bucket to copy objects from. */
2313
+ source?: {
2314
+ accessKeyId?: string;
2315
+ bucket?: string;
2316
+ provider?: "aws";
2317
+ region?: string;
2318
+ secretAccessKey?: string;
2319
+ };
2320
+ }
2321
+
2322
+ export const PutBucketSippyRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2323
+ bucketName: Schema.String.pipe(T.HttpPath("bucketName")),
2324
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2325
+ jurisdiction: Schema.optional(
2326
+ Schema.Literals(["default", "eu", "fedramp"]),
2327
+ ).pipe(T.HttpHeader("cf-r2-jurisdiction")),
2328
+ destination: Schema.optional(
2329
+ Schema.Struct({
2330
+ accessKeyId: Schema.optional(Schema.String),
2331
+ provider: Schema.optional(Schema.Literal("r2")),
2332
+ secretAccessKey: Schema.optional(Schema.String),
2333
+ }),
2334
+ ),
2335
+ source: Schema.optional(
2336
+ Schema.Struct({
2337
+ accessKeyId: Schema.optional(Schema.String),
2338
+ bucket: Schema.optional(Schema.String),
2339
+ provider: Schema.optional(Schema.Literal("aws")),
2340
+ region: Schema.optional(Schema.String),
2341
+ secretAccessKey: Schema.optional(Schema.String),
2342
+ }),
2343
+ ),
2344
+ }).pipe(
2345
+ T.Http({
2346
+ method: "PUT",
2347
+ path: "/accounts/{account_id}/r2/buckets/{bucketName}/sippy",
2348
+ }),
2349
+ ) as unknown as Schema.Schema<PutBucketSippyRequest>;
2350
+
2351
+ export interface PutBucketSippyResponse {
2352
+ /** Details about the configured destination bucket. */
2353
+ destination?: {
2354
+ accessKeyId?: string | null;
2355
+ account?: string | null;
2356
+ bucket?: string | null;
2357
+ provider?: "r2" | null;
2358
+ } | null;
2359
+ /** State of Sippy for this bucket. */
2360
+ enabled?: boolean | null;
2361
+ /** Details about the configured source bucket. */
2362
+ source?: {
2363
+ bucket?: string | null;
2364
+ bucketUrl?: string | null;
2365
+ provider?: "aws" | "gcs" | "s3" | null;
2366
+ region?: string | null;
2367
+ } | null;
2368
+ }
2369
+
2370
+ export const PutBucketSippyResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
2371
+ {
2372
+ destination: Schema.optional(
2373
+ Schema.Union([
2374
+ Schema.Struct({
2375
+ accessKeyId: Schema.optional(
2376
+ Schema.Union([Schema.String, Schema.Null]),
2377
+ ),
2378
+ account: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2379
+ bucket: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2380
+ provider: Schema.optional(
2381
+ Schema.Union([Schema.Literal("r2"), Schema.Null]),
2382
+ ),
2383
+ }),
2384
+ Schema.Null,
2385
+ ]),
2386
+ ),
2387
+ enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2388
+ source: Schema.optional(
2389
+ Schema.Union([
2390
+ Schema.Struct({
2391
+ bucket: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2392
+ bucketUrl: Schema.optional(
2393
+ Schema.Union([Schema.String, Schema.Null]),
2394
+ ),
2395
+ provider: Schema.optional(
2396
+ Schema.Union([Schema.Literals(["aws", "gcs", "s3"]), Schema.Null]),
2397
+ ),
2398
+ region: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2399
+ }),
2400
+ Schema.Null,
2401
+ ]),
2402
+ ),
2403
+ },
2404
+ ) as unknown as Schema.Schema<PutBucketSippyResponse>;
2405
+
2406
+ export type PutBucketSippyError = DefaultErrors;
2407
+
2408
+ export const putBucketSippy: API.OperationMethod<
2409
+ PutBucketSippyRequest,
2410
+ PutBucketSippyResponse,
2411
+ PutBucketSippyError,
2412
+ Credentials | HttpClient.HttpClient
2413
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2414
+ input: PutBucketSippyRequest,
2415
+ output: PutBucketSippyResponse,
2416
+ errors: [],
2417
+ }));
2418
+
2419
+ export interface DeleteBucketSippyRequest {
2420
+ bucketName: string;
2421
+ /** Path param: Account ID. */
2422
+ accountId: string;
2423
+ /** Header param: Jurisdiction where objects in this bucket are guaranteed to be stored. */
2424
+ jurisdiction?: "default" | "eu" | "fedramp";
2425
+ }
2426
+
2427
+ export const DeleteBucketSippyRequest =
2428
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2429
+ bucketName: Schema.String.pipe(T.HttpPath("bucketName")),
2430
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2431
+ jurisdiction: Schema.optional(
2432
+ Schema.Literals(["default", "eu", "fedramp"]),
2433
+ ).pipe(T.HttpHeader("cf-r2-jurisdiction")),
2434
+ }).pipe(
2435
+ T.Http({
2436
+ method: "DELETE",
2437
+ path: "/accounts/{account_id}/r2/buckets/{bucketName}/sippy",
2438
+ }),
2439
+ ) as unknown as Schema.Schema<DeleteBucketSippyRequest>;
2440
+
2441
+ export interface DeleteBucketSippyResponse {
2442
+ enabled?: false | null;
2443
+ }
2444
+
2445
+ export const DeleteBucketSippyResponse =
2446
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2447
+ enabled: Schema.optional(
2448
+ Schema.Union([Schema.Literal(false), Schema.Null]),
2449
+ ),
2450
+ }) as unknown as Schema.Schema<DeleteBucketSippyResponse>;
2451
+
2452
+ export type DeleteBucketSippyError =
2453
+ | DefaultErrors
2454
+ | NoSuchBucket
2455
+ | InvalidRoute;
2456
+
2457
+ export const deleteBucketSippy: API.OperationMethod<
2458
+ DeleteBucketSippyRequest,
2459
+ DeleteBucketSippyResponse,
2460
+ DeleteBucketSippyError,
2461
+ Credentials | HttpClient.HttpClient
2462
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2463
+ input: DeleteBucketSippyRequest,
2464
+ output: DeleteBucketSippyResponse,
2465
+ errors: [NoSuchBucket, InvalidRoute],
2466
+ }));
2467
+
2468
+ // =============================================================================
2469
+ // SuperSlurperConnectivityPrecheck
2470
+ // =============================================================================
2471
+
2472
+ export interface SourceSuperSlurperConnectivityPrecheckRequest {
2473
+ /** Path param: */
2474
+ accountId: string;
2475
+ /** Body param: */
2476
+ bucket: string;
2477
+ /** Body param: */
2478
+ secret: { accessKeyId: string; secretAccessKey: string };
2479
+ /** Body param: */
2480
+ vendor: "s3";
2481
+ /** Body param: */
2482
+ endpoint?: string | null;
2483
+ /** Body param: */
2484
+ pathPrefix?: string | null;
2485
+ /** Body param: */
2486
+ region?: string | null;
2487
+ }
2488
+
2489
+ export const SourceSuperSlurperConnectivityPrecheckRequest =
2490
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2491
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2492
+ bucket: Schema.String,
2493
+ secret: Schema.Struct({
2494
+ accessKeyId: Schema.String,
2495
+ secretAccessKey: Schema.String,
2496
+ }),
2497
+ vendor: Schema.Literal("s3"),
2498
+ endpoint: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2499
+ pathPrefix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2500
+ region: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2501
+ }).pipe(
2502
+ T.Http({
2503
+ method: "PUT",
2504
+ path: "/accounts/{account_id}/slurper/source/connectivity-precheck",
2505
+ }),
2506
+ ) as unknown as Schema.Schema<SourceSuperSlurperConnectivityPrecheckRequest>;
2507
+
2508
+ export interface SourceSuperSlurperConnectivityPrecheckResponse {
2509
+ connectivityStatus?: "success" | "error" | null;
2510
+ }
2511
+
2512
+ export const SourceSuperSlurperConnectivityPrecheckResponse =
2513
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2514
+ connectivityStatus: Schema.optional(
2515
+ Schema.Union([Schema.Literals(["success", "error"]), Schema.Null]),
2516
+ ),
2517
+ }) as unknown as Schema.Schema<SourceSuperSlurperConnectivityPrecheckResponse>;
2518
+
2519
+ export type SourceSuperSlurperConnectivityPrecheckError = DefaultErrors;
2520
+
2521
+ export const sourceSuperSlurperConnectivityPrecheck: API.OperationMethod<
2522
+ SourceSuperSlurperConnectivityPrecheckRequest,
2523
+ SourceSuperSlurperConnectivityPrecheckResponse,
2524
+ SourceSuperSlurperConnectivityPrecheckError,
2525
+ Credentials | HttpClient.HttpClient
2526
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2527
+ input: SourceSuperSlurperConnectivityPrecheckRequest,
2528
+ output: SourceSuperSlurperConnectivityPrecheckResponse,
2529
+ errors: [],
2530
+ }));
2531
+
2532
+ export interface TargetSuperSlurperConnectivityPrecheckRequest {
2533
+ /** Path param: */
2534
+ accountId: string;
2535
+ /** Body param: */
2536
+ bucket: string;
2537
+ /** Body param: */
2538
+ secret: { accessKeyId: string; secretAccessKey: string };
2539
+ /** Body param: */
2540
+ vendor: "r2";
2541
+ /** Body param: */
2542
+ jurisdiction?: "default" | "eu" | "fedramp";
2543
+ }
2544
+
2545
+ export const TargetSuperSlurperConnectivityPrecheckRequest =
2546
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2547
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2548
+ bucket: Schema.String,
2549
+ secret: Schema.Struct({
2550
+ accessKeyId: Schema.String,
2551
+ secretAccessKey: Schema.String,
2552
+ }),
2553
+ vendor: Schema.Literal("r2"),
2554
+ jurisdiction: Schema.optional(
2555
+ Schema.Literals(["default", "eu", "fedramp"]),
2556
+ ),
2557
+ }).pipe(
2558
+ T.Http({
2559
+ method: "PUT",
2560
+ path: "/accounts/{account_id}/slurper/target/connectivity-precheck",
2561
+ }),
2562
+ ) as unknown as Schema.Schema<TargetSuperSlurperConnectivityPrecheckRequest>;
2563
+
2564
+ export interface TargetSuperSlurperConnectivityPrecheckResponse {
2565
+ connectivityStatus?: "success" | "error" | null;
2566
+ }
2567
+
2568
+ export const TargetSuperSlurperConnectivityPrecheckResponse =
2569
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2570
+ connectivityStatus: Schema.optional(
2571
+ Schema.Union([Schema.Literals(["success", "error"]), Schema.Null]),
2572
+ ),
2573
+ }) as unknown as Schema.Schema<TargetSuperSlurperConnectivityPrecheckResponse>;
2574
+
2575
+ export type TargetSuperSlurperConnectivityPrecheckError = DefaultErrors;
2576
+
2577
+ export const targetSuperSlurperConnectivityPrecheck: API.OperationMethod<
2578
+ TargetSuperSlurperConnectivityPrecheckRequest,
2579
+ TargetSuperSlurperConnectivityPrecheckResponse,
2580
+ TargetSuperSlurperConnectivityPrecheckError,
2581
+ Credentials | HttpClient.HttpClient
2582
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2583
+ input: TargetSuperSlurperConnectivityPrecheckRequest,
2584
+ output: TargetSuperSlurperConnectivityPrecheckResponse,
2585
+ errors: [],
2586
+ }));
2587
+
2588
+ // =============================================================================
2589
+ // SuperSlurperJob
2590
+ // =============================================================================
2591
+
2592
+ export interface GetSuperSlurperJobRequest {
2593
+ jobId: string;
2594
+ accountId: string;
2595
+ }
2596
+
2597
+ export const GetSuperSlurperJobRequest =
2598
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2599
+ jobId: Schema.String.pipe(T.HttpPath("jobId")),
2600
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2601
+ }).pipe(
2602
+ T.Http({
2603
+ method: "GET",
2604
+ path: "/accounts/{account_id}/slurper/jobs/{jobId}",
2605
+ }),
2606
+ ) as unknown as Schema.Schema<GetSuperSlurperJobRequest>;
2607
+
2608
+ export interface GetSuperSlurperJobResponse {
2609
+ id?: string | null;
2610
+ createdAt?: string | null;
2611
+ finishedAt?: string | null;
2612
+ overwrite?: boolean | null;
2613
+ source?:
2614
+ | {
2615
+ bucket?: string | null;
2616
+ endpoint?: string | null;
2617
+ keys?: string[] | null;
2618
+ pathPrefix?: string | null;
2619
+ vendor?: "s3" | null;
2620
+ }
2621
+ | {
2622
+ bucket?: string | null;
2623
+ keys?: string[] | null;
2624
+ pathPrefix?: string | null;
2625
+ vendor?: "gcs" | null;
2626
+ }
2627
+ | {
2628
+ bucket?: string | null;
2629
+ jurisdiction?: "default" | "eu" | "fedramp" | null;
2630
+ keys?: string[] | null;
2631
+ pathPrefix?: string | null;
2632
+ vendor?: "r2" | null;
2633
+ }
2634
+ | null;
2635
+ status?: "running" | "paused" | "aborted" | "completed" | null;
2636
+ target?: {
2637
+ bucket?: string | null;
2638
+ jurisdiction?: "default" | "eu" | "fedramp" | null;
2639
+ vendor?: "r2" | null;
2640
+ } | null;
2641
+ }
2642
+
2643
+ export const GetSuperSlurperJobResponse =
2644
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2645
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2646
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2647
+ finishedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2648
+ overwrite: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2649
+ source: Schema.optional(
2650
+ Schema.Union([
2651
+ Schema.Union([
2652
+ Schema.Struct({
2653
+ bucket: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2654
+ endpoint: Schema.optional(
2655
+ Schema.Union([Schema.String, Schema.Null]),
2656
+ ),
2657
+ keys: Schema.optional(
2658
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2659
+ ),
2660
+ pathPrefix: Schema.optional(
2661
+ Schema.Union([Schema.String, Schema.Null]),
2662
+ ),
2663
+ vendor: Schema.optional(
2664
+ Schema.Union([Schema.Literal("s3"), Schema.Null]),
2665
+ ),
2666
+ }),
2667
+ Schema.Struct({
2668
+ bucket: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2669
+ keys: Schema.optional(
2670
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2671
+ ),
2672
+ pathPrefix: Schema.optional(
2673
+ Schema.Union([Schema.String, Schema.Null]),
2674
+ ),
2675
+ vendor: Schema.optional(
2676
+ Schema.Union([Schema.Literal("gcs"), Schema.Null]),
2677
+ ),
2678
+ }),
2679
+ Schema.Struct({
2680
+ bucket: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2681
+ jurisdiction: Schema.optional(
2682
+ Schema.Union([
2683
+ Schema.Literals(["default", "eu", "fedramp"]),
2684
+ Schema.Null,
2685
+ ]),
2686
+ ),
2687
+ keys: Schema.optional(
2688
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2689
+ ),
2690
+ pathPrefix: Schema.optional(
2691
+ Schema.Union([Schema.String, Schema.Null]),
2692
+ ),
2693
+ vendor: Schema.optional(
2694
+ Schema.Union([Schema.Literal("r2"), Schema.Null]),
2695
+ ),
2696
+ }),
2697
+ ]),
2698
+ Schema.Null,
2699
+ ]),
2700
+ ),
2701
+ status: Schema.optional(
2702
+ Schema.Union([
2703
+ Schema.Literals(["running", "paused", "aborted", "completed"]),
2704
+ Schema.Null,
2705
+ ]),
2706
+ ),
2707
+ target: Schema.optional(
2708
+ Schema.Union([
2709
+ Schema.Struct({
2710
+ bucket: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2711
+ jurisdiction: Schema.optional(
2712
+ Schema.Union([
2713
+ Schema.Literals(["default", "eu", "fedramp"]),
2714
+ Schema.Null,
2715
+ ]),
2716
+ ),
2717
+ vendor: Schema.optional(
2718
+ Schema.Union([Schema.Literal("r2"), Schema.Null]),
2719
+ ),
2720
+ }),
2721
+ Schema.Null,
2722
+ ]),
2723
+ ),
2724
+ }) as unknown as Schema.Schema<GetSuperSlurperJobResponse>;
2725
+
2726
+ export type GetSuperSlurperJobError = DefaultErrors;
2727
+
2728
+ export const getSuperSlurperJob: API.OperationMethod<
2729
+ GetSuperSlurperJobRequest,
2730
+ GetSuperSlurperJobResponse,
2731
+ GetSuperSlurperJobError,
2732
+ Credentials | HttpClient.HttpClient
2733
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2734
+ input: GetSuperSlurperJobRequest,
2735
+ output: GetSuperSlurperJobResponse,
2736
+ errors: [],
2737
+ }));
2738
+
2739
+ export interface ListSuperSlurperJobsRequest {
2740
+ /** Path param: */
2741
+ accountId: string;
2742
+ /** Query param: */
2743
+ limit?: number;
2744
+ /** Query param: */
2745
+ offset?: number;
2746
+ }
2747
+
2748
+ export const ListSuperSlurperJobsRequest =
2749
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2750
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2751
+ limit: Schema.optional(Schema.Number).pipe(T.HttpQuery("limit")),
2752
+ offset: Schema.optional(Schema.Number).pipe(T.HttpQuery("offset")),
2753
+ }).pipe(
2754
+ T.Http({ method: "GET", path: "/accounts/{account_id}/slurper/jobs" }),
2755
+ ) as unknown as Schema.Schema<ListSuperSlurperJobsRequest>;
2756
+
2757
+ export type ListSuperSlurperJobsResponse = {
2758
+ id?: string | null;
2759
+ createdAt?: string | null;
2760
+ finishedAt?: string | null;
2761
+ overwrite?: boolean | null;
2762
+ source?:
2763
+ | {
2764
+ bucket?: string | null;
2765
+ endpoint?: string | null;
2766
+ keys?: string[] | null;
2767
+ pathPrefix?: string | null;
2768
+ vendor?: "s3" | null;
2769
+ }
2770
+ | {
2771
+ bucket?: string | null;
2772
+ keys?: string[] | null;
2773
+ pathPrefix?: string | null;
2774
+ vendor?: "gcs" | null;
2775
+ }
2776
+ | {
2777
+ bucket?: string | null;
2778
+ jurisdiction?: "default" | "eu" | "fedramp" | null;
2779
+ keys?: string[] | null;
2780
+ pathPrefix?: string | null;
2781
+ vendor?: "r2" | null;
2782
+ }
2783
+ | null;
2784
+ status?: "running" | "paused" | "aborted" | "completed" | null;
2785
+ target?: {
2786
+ bucket?: string | null;
2787
+ jurisdiction?: "default" | "eu" | "fedramp" | null;
2788
+ vendor?: "r2" | null;
2789
+ } | null;
2790
+ }[];
2791
+
2792
+ export const ListSuperSlurperJobsResponse =
2793
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
2794
+ Schema.Struct({
2795
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2796
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2797
+ finishedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2798
+ overwrite: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2799
+ source: Schema.optional(
2800
+ Schema.Union([
2801
+ Schema.Union([
2802
+ Schema.Struct({
2803
+ bucket: Schema.optional(
2804
+ Schema.Union([Schema.String, Schema.Null]),
2805
+ ),
2806
+ endpoint: Schema.optional(
2807
+ Schema.Union([Schema.String, Schema.Null]),
2808
+ ),
2809
+ keys: Schema.optional(
2810
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2811
+ ),
2812
+ pathPrefix: Schema.optional(
2813
+ Schema.Union([Schema.String, Schema.Null]),
2814
+ ),
2815
+ vendor: Schema.optional(
2816
+ Schema.Union([Schema.Literal("s3"), Schema.Null]),
2817
+ ),
2818
+ }),
2819
+ Schema.Struct({
2820
+ bucket: Schema.optional(
2821
+ Schema.Union([Schema.String, Schema.Null]),
2822
+ ),
2823
+ keys: Schema.optional(
2824
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2825
+ ),
2826
+ pathPrefix: Schema.optional(
2827
+ Schema.Union([Schema.String, Schema.Null]),
2828
+ ),
2829
+ vendor: Schema.optional(
2830
+ Schema.Union([Schema.Literal("gcs"), Schema.Null]),
2831
+ ),
2832
+ }),
2833
+ Schema.Struct({
2834
+ bucket: Schema.optional(
2835
+ Schema.Union([Schema.String, Schema.Null]),
2836
+ ),
2837
+ jurisdiction: Schema.optional(
2838
+ Schema.Union([
2839
+ Schema.Literals(["default", "eu", "fedramp"]),
2840
+ Schema.Null,
2841
+ ]),
2842
+ ),
2843
+ keys: Schema.optional(
2844
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2845
+ ),
2846
+ pathPrefix: Schema.optional(
2847
+ Schema.Union([Schema.String, Schema.Null]),
2848
+ ),
2849
+ vendor: Schema.optional(
2850
+ Schema.Union([Schema.Literal("r2"), Schema.Null]),
2851
+ ),
2852
+ }),
2853
+ ]),
2854
+ Schema.Null,
2855
+ ]),
2856
+ ),
2857
+ status: Schema.optional(
2858
+ Schema.Union([
2859
+ Schema.Literals(["running", "paused", "aborted", "completed"]),
2860
+ Schema.Null,
2861
+ ]),
2862
+ ),
2863
+ target: Schema.optional(
2864
+ Schema.Union([
2865
+ Schema.Struct({
2866
+ bucket: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2867
+ jurisdiction: Schema.optional(
2868
+ Schema.Union([
2869
+ Schema.Literals(["default", "eu", "fedramp"]),
2870
+ Schema.Null,
2871
+ ]),
2872
+ ),
2873
+ vendor: Schema.optional(
2874
+ Schema.Union([Schema.Literal("r2"), Schema.Null]),
2875
+ ),
2876
+ }),
2877
+ Schema.Null,
2878
+ ]),
2879
+ ),
2880
+ }),
2881
+ ) as unknown as Schema.Schema<ListSuperSlurperJobsResponse>;
2882
+
2883
+ export type ListSuperSlurperJobsError = DefaultErrors;
2884
+
2885
+ export const listSuperSlurperJobs: API.OperationMethod<
2886
+ ListSuperSlurperJobsRequest,
2887
+ ListSuperSlurperJobsResponse,
2888
+ ListSuperSlurperJobsError,
2889
+ Credentials | HttpClient.HttpClient
2890
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2891
+ input: ListSuperSlurperJobsRequest,
2892
+ output: ListSuperSlurperJobsResponse,
2893
+ errors: [],
2894
+ }));
2895
+
2896
+ export interface CreateSuperSlurperJobRequest {
2897
+ /** Path param: */
2898
+ accountId: string;
2899
+ /** Body param: */
2900
+ overwrite?: boolean;
2901
+ /** Body param: */
2902
+ source?:
2903
+ | {
2904
+ bucket: string;
2905
+ secret: { accessKeyId: string; secretAccessKey: string };
2906
+ vendor: "s3";
2907
+ endpoint?: string | null;
2908
+ pathPrefix?: string | null;
2909
+ region?: string | null;
2910
+ }
2911
+ | {
2912
+ bucket: string;
2913
+ secret: { clientEmail: string; privateKey: string };
2914
+ vendor: "gcs";
2915
+ pathPrefix?: string | null;
2916
+ }
2917
+ | {
2918
+ bucket: string;
2919
+ secret: { accessKeyId: string; secretAccessKey: string };
2920
+ vendor: "r2";
2921
+ jurisdiction?: "default" | "eu" | "fedramp";
2922
+ pathPrefix?: string | null;
2923
+ };
2924
+ /** Body param: */
2925
+ target?: {
2926
+ bucket: string;
2927
+ secret: { accessKeyId: string; secretAccessKey: string };
2928
+ vendor: "r2";
2929
+ jurisdiction?: "default" | "eu" | "fedramp";
2930
+ };
2931
+ }
2932
+
2933
+ export const CreateSuperSlurperJobRequest =
2934
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2935
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2936
+ overwrite: Schema.optional(Schema.Boolean),
2937
+ source: Schema.optional(
2938
+ Schema.Union([
2939
+ Schema.Struct({
2940
+ bucket: Schema.String,
2941
+ secret: Schema.Struct({
2942
+ accessKeyId: Schema.String,
2943
+ secretAccessKey: Schema.String,
2944
+ }),
2945
+ vendor: Schema.Literal("s3"),
2946
+ endpoint: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2947
+ pathPrefix: Schema.optional(
2948
+ Schema.Union([Schema.String, Schema.Null]),
2949
+ ),
2950
+ region: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2951
+ }),
2952
+ Schema.Struct({
2953
+ bucket: Schema.String,
2954
+ secret: Schema.Struct({
2955
+ clientEmail: Schema.String,
2956
+ privateKey: Schema.String,
2957
+ }),
2958
+ vendor: Schema.Literal("gcs"),
2959
+ pathPrefix: Schema.optional(
2960
+ Schema.Union([Schema.String, Schema.Null]),
2961
+ ),
2962
+ }),
2963
+ Schema.Struct({
2964
+ bucket: Schema.String,
2965
+ secret: Schema.Struct({
2966
+ accessKeyId: Schema.String,
2967
+ secretAccessKey: Schema.String,
2968
+ }),
2969
+ vendor: Schema.Literal("r2"),
2970
+ jurisdiction: Schema.optional(
2971
+ Schema.Literals(["default", "eu", "fedramp"]),
2972
+ ),
2973
+ pathPrefix: Schema.optional(
2974
+ Schema.Union([Schema.String, Schema.Null]),
2975
+ ),
2976
+ }),
2977
+ ]),
2978
+ ),
2979
+ target: Schema.optional(
2980
+ Schema.Struct({
2981
+ bucket: Schema.String,
2982
+ secret: Schema.Struct({
2983
+ accessKeyId: Schema.String,
2984
+ secretAccessKey: Schema.String,
2985
+ }),
2986
+ vendor: Schema.Literal("r2"),
2987
+ jurisdiction: Schema.optional(
2988
+ Schema.Literals(["default", "eu", "fedramp"]),
2989
+ ),
2990
+ }),
2991
+ ),
2992
+ }).pipe(
2993
+ T.Http({ method: "POST", path: "/accounts/{account_id}/slurper/jobs" }),
2994
+ ) as unknown as Schema.Schema<CreateSuperSlurperJobRequest>;
2995
+
2996
+ export interface CreateSuperSlurperJobResponse {
2997
+ id?: string | null;
2998
+ }
2999
+
3000
+ export const CreateSuperSlurperJobResponse =
3001
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3002
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3003
+ }) as unknown as Schema.Schema<CreateSuperSlurperJobResponse>;
3004
+
3005
+ export type CreateSuperSlurperJobError = DefaultErrors;
3006
+
3007
+ export const createSuperSlurperJob: API.OperationMethod<
3008
+ CreateSuperSlurperJobRequest,
3009
+ CreateSuperSlurperJobResponse,
3010
+ CreateSuperSlurperJobError,
3011
+ Credentials | HttpClient.HttpClient
3012
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3013
+ input: CreateSuperSlurperJobRequest,
3014
+ output: CreateSuperSlurperJobResponse,
3015
+ errors: [],
3016
+ }));
3017
+
3018
+ export interface AbortSuperSlurperJobRequest {
3019
+ jobId: string;
3020
+ accountId: string;
3021
+ }
3022
+
3023
+ export const AbortSuperSlurperJobRequest =
3024
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3025
+ jobId: Schema.String.pipe(T.HttpPath("jobId")),
3026
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
3027
+ }).pipe(
3028
+ T.Http({
3029
+ method: "PUT",
3030
+ path: "/accounts/{account_id}/slurper/jobs/{jobId}/abort",
3031
+ }),
3032
+ ) as unknown as Schema.Schema<AbortSuperSlurperJobRequest>;
3033
+
3034
+ export type AbortSuperSlurperJobResponse = string;
3035
+
3036
+ export const AbortSuperSlurperJobResponse =
3037
+ /*@__PURE__*/ /*#__PURE__*/ Schema.String as unknown as Schema.Schema<AbortSuperSlurperJobResponse>;
3038
+
3039
+ export type AbortSuperSlurperJobError = DefaultErrors;
3040
+
3041
+ export const abortSuperSlurperJob: API.OperationMethod<
3042
+ AbortSuperSlurperJobRequest,
3043
+ AbortSuperSlurperJobResponse,
3044
+ AbortSuperSlurperJobError,
3045
+ Credentials | HttpClient.HttpClient
3046
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3047
+ input: AbortSuperSlurperJobRequest,
3048
+ output: AbortSuperSlurperJobResponse,
3049
+ errors: [],
3050
+ }));
3051
+
3052
+ export interface PauseSuperSlurperJobRequest {
3053
+ jobId: string;
3054
+ accountId: string;
3055
+ }
3056
+
3057
+ export const PauseSuperSlurperJobRequest =
3058
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3059
+ jobId: Schema.String.pipe(T.HttpPath("jobId")),
3060
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
3061
+ }).pipe(
3062
+ T.Http({
3063
+ method: "PUT",
3064
+ path: "/accounts/{account_id}/slurper/jobs/{jobId}/pause",
3065
+ }),
3066
+ ) as unknown as Schema.Schema<PauseSuperSlurperJobRequest>;
3067
+
3068
+ export type PauseSuperSlurperJobResponse = string;
3069
+
3070
+ export const PauseSuperSlurperJobResponse =
3071
+ /*@__PURE__*/ /*#__PURE__*/ Schema.String as unknown as Schema.Schema<PauseSuperSlurperJobResponse>;
3072
+
3073
+ export type PauseSuperSlurperJobError = DefaultErrors;
3074
+
3075
+ export const pauseSuperSlurperJob: API.OperationMethod<
3076
+ PauseSuperSlurperJobRequest,
3077
+ PauseSuperSlurperJobResponse,
3078
+ PauseSuperSlurperJobError,
3079
+ Credentials | HttpClient.HttpClient
3080
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3081
+ input: PauseSuperSlurperJobRequest,
3082
+ output: PauseSuperSlurperJobResponse,
3083
+ errors: [],
3084
+ }));
3085
+
3086
+ export interface ProgressSuperSlurperJobRequest {
3087
+ jobId: string;
3088
+ accountId: string;
3089
+ }
3090
+
3091
+ export const ProgressSuperSlurperJobRequest =
3092
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3093
+ jobId: Schema.String.pipe(T.HttpPath("jobId")),
3094
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
3095
+ }).pipe(
3096
+ T.Http({
3097
+ method: "GET",
3098
+ path: "/accounts/{account_id}/slurper/jobs/{jobId}/progress",
3099
+ }),
3100
+ ) as unknown as Schema.Schema<ProgressSuperSlurperJobRequest>;
3101
+
3102
+ export interface ProgressSuperSlurperJobResponse {
3103
+ id?: string | null;
3104
+ createdAt?: string | null;
3105
+ failedObjects?: number | null;
3106
+ objects?: number | null;
3107
+ skippedObjects?: number | null;
3108
+ status?: "running" | "paused" | "aborted" | "completed" | null;
3109
+ transferredObjects?: number | null;
3110
+ }
3111
+
3112
+ export const ProgressSuperSlurperJobResponse =
3113
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3114
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3115
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3116
+ failedObjects: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
3117
+ objects: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
3118
+ skippedObjects: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
3119
+ status: Schema.optional(
3120
+ Schema.Union([
3121
+ Schema.Literals(["running", "paused", "aborted", "completed"]),
3122
+ Schema.Null,
3123
+ ]),
3124
+ ),
3125
+ transferredObjects: Schema.optional(
3126
+ Schema.Union([Schema.Number, Schema.Null]),
3127
+ ),
3128
+ }) as unknown as Schema.Schema<ProgressSuperSlurperJobResponse>;
3129
+
3130
+ export type ProgressSuperSlurperJobError = DefaultErrors;
3131
+
3132
+ export const progressSuperSlurperJob: API.OperationMethod<
3133
+ ProgressSuperSlurperJobRequest,
3134
+ ProgressSuperSlurperJobResponse,
3135
+ ProgressSuperSlurperJobError,
3136
+ Credentials | HttpClient.HttpClient
3137
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3138
+ input: ProgressSuperSlurperJobRequest,
3139
+ output: ProgressSuperSlurperJobResponse,
3140
+ errors: [],
3141
+ }));
3142
+
3143
+ export interface ResumeSuperSlurperJobRequest {
3144
+ jobId: string;
3145
+ accountId: string;
3146
+ }
3147
+
3148
+ export const ResumeSuperSlurperJobRequest =
3149
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3150
+ jobId: Schema.String.pipe(T.HttpPath("jobId")),
3151
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
3152
+ }).pipe(
3153
+ T.Http({
3154
+ method: "PUT",
3155
+ path: "/accounts/{account_id}/slurper/jobs/{jobId}/resume",
3156
+ }),
3157
+ ) as unknown as Schema.Schema<ResumeSuperSlurperJobRequest>;
3158
+
3159
+ export type ResumeSuperSlurperJobResponse = string;
3160
+
3161
+ export const ResumeSuperSlurperJobResponse =
3162
+ /*@__PURE__*/ /*#__PURE__*/ Schema.String as unknown as Schema.Schema<ResumeSuperSlurperJobResponse>;
3163
+
3164
+ export type ResumeSuperSlurperJobError = DefaultErrors;
3165
+
3166
+ export const resumeSuperSlurperJob: API.OperationMethod<
3167
+ ResumeSuperSlurperJobRequest,
3168
+ ResumeSuperSlurperJobResponse,
3169
+ ResumeSuperSlurperJobError,
3170
+ Credentials | HttpClient.HttpClient
3171
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3172
+ input: ResumeSuperSlurperJobRequest,
3173
+ output: ResumeSuperSlurperJobResponse,
3174
+ errors: [],
3175
+ }));
3176
+
3177
+ // =============================================================================
3178
+ // SuperSlurperJobLog
3179
+ // =============================================================================
3180
+
3181
+ export interface ListSuperSlurperJobLogsRequest {
3182
+ jobId: string;
3183
+ /** Path param: */
3184
+ accountId: string;
3185
+ /** Query param: */
3186
+ limit?: number;
3187
+ /** Query param: */
3188
+ offset?: number;
3189
+ }
3190
+
3191
+ export const ListSuperSlurperJobLogsRequest =
3192
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3193
+ jobId: Schema.String.pipe(T.HttpPath("jobId")),
3194
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
3195
+ limit: Schema.optional(Schema.Number).pipe(T.HttpQuery("limit")),
3196
+ offset: Schema.optional(Schema.Number).pipe(T.HttpQuery("offset")),
3197
+ }).pipe(
3198
+ T.Http({
3199
+ method: "GET",
3200
+ path: "/accounts/{account_id}/slurper/jobs/{jobId}/logs",
3201
+ }),
3202
+ ) as unknown as Schema.Schema<ListSuperSlurperJobLogsRequest>;
3203
+
3204
+ export type ListSuperSlurperJobLogsResponse = {
3205
+ createdAt?: string | null;
3206
+ job?: string | null;
3207
+ logType?:
3208
+ | "migrationStart"
3209
+ | "migrationComplete"
3210
+ | "migrationAbort"
3211
+ | "migrationError"
3212
+ | "migrationPause"
3213
+ | "migrationResume"
3214
+ | "migrationErrorFailedContinuation"
3215
+ | "importErrorRetryExhaustion"
3216
+ | "importSkippedStorageClass"
3217
+ | "importSkippedOversized"
3218
+ | "importSkippedEmptyObject"
3219
+ | "importSkippedUnsupportedContentType"
3220
+ | "importSkippedExcludedContentType"
3221
+ | "importSkippedInvalidMedia"
3222
+ | "importSkippedRequiresRetrieval"
3223
+ | null;
3224
+ message?: string | null;
3225
+ objectKey?: string | null;
3226
+ }[];
3227
+
3228
+ export const ListSuperSlurperJobLogsResponse =
3229
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
3230
+ Schema.Struct({
3231
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3232
+ job: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3233
+ logType: Schema.optional(
3234
+ Schema.Union([
3235
+ Schema.Literals([
3236
+ "migrationStart",
3237
+ "migrationComplete",
3238
+ "migrationAbort",
3239
+ "migrationError",
3240
+ "migrationPause",
3241
+ "migrationResume",
3242
+ "migrationErrorFailedContinuation",
3243
+ "importErrorRetryExhaustion",
3244
+ "importSkippedStorageClass",
3245
+ "importSkippedOversized",
3246
+ "importSkippedEmptyObject",
3247
+ "importSkippedUnsupportedContentType",
3248
+ "importSkippedExcludedContentType",
3249
+ "importSkippedInvalidMedia",
3250
+ "importSkippedRequiresRetrieval",
3251
+ ]),
3252
+ Schema.Null,
3253
+ ]),
3254
+ ),
3255
+ message: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3256
+ objectKey: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3257
+ }),
3258
+ ) as unknown as Schema.Schema<ListSuperSlurperJobLogsResponse>;
3259
+
3260
+ export type ListSuperSlurperJobLogsError = DefaultErrors;
3261
+
3262
+ export const listSuperSlurperJobLogs: API.OperationMethod<
3263
+ ListSuperSlurperJobLogsRequest,
3264
+ ListSuperSlurperJobLogsResponse,
3265
+ ListSuperSlurperJobLogsError,
3266
+ Credentials | HttpClient.HttpClient
3267
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3268
+ input: ListSuperSlurperJobLogsRequest,
3269
+ output: ListSuperSlurperJobLogsResponse,
3270
+ errors: [],
3271
+ }));
3272
+
3273
+ // =============================================================================
3274
+ // TemporaryCredential
3275
+ // =============================================================================
3276
+
3277
+ export interface CreateTemporaryCredentialRequest {
3278
+ /** Path param: Account ID. */
3279
+ accountId: string;
3280
+ /** Body param: Name of the R2 bucket. */
3281
+ bucket: string;
3282
+ /** Body param: The parent access key id to use for signing. */
3283
+ parentAccessKeyId: string;
3284
+ /** Body param: Permissions allowed on the credentials. */
3285
+ permission:
3286
+ | "admin-read-write"
3287
+ | "admin-read-only"
3288
+ | "object-read-write"
3289
+ | "object-read-only";
3290
+ /** Body param: How long the credentials will live for in seconds. */
3291
+ ttlSeconds: number;
3292
+ /** Body param: Optional object paths to scope the credentials to. */
3293
+ objects?: string[];
3294
+ /** Body param: Optional prefix paths to scope the credentials to. */
3295
+ prefixes?: string[];
3296
+ }
3297
+
3298
+ export const CreateTemporaryCredentialRequest =
3299
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3300
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
3301
+ bucket: Schema.String,
3302
+ parentAccessKeyId: Schema.String,
3303
+ permission: Schema.Literals([
3304
+ "admin-read-write",
3305
+ "admin-read-only",
3306
+ "object-read-write",
3307
+ "object-read-only",
3308
+ ]),
3309
+ ttlSeconds: Schema.Number,
3310
+ objects: Schema.optional(Schema.Array(Schema.String)),
3311
+ prefixes: Schema.optional(Schema.Array(Schema.String)),
3312
+ }).pipe(
3313
+ T.Http({
3314
+ method: "POST",
3315
+ path: "/accounts/{account_id}/r2/temp-access-credentials",
3316
+ }),
3317
+ ) as unknown as Schema.Schema<CreateTemporaryCredentialRequest>;
3318
+
3319
+ export interface CreateTemporaryCredentialResponse {
3320
+ /** ID for new access key. */
3321
+ accessKeyId?: string | null;
3322
+ /** Secret access key. */
3323
+ secretAccessKey?: string | null;
3324
+ /** Security token. */
3325
+ sessionToken?: string | null;
3326
+ }
3327
+
3328
+ export const CreateTemporaryCredentialResponse =
3329
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3330
+ accessKeyId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3331
+ secretAccessKey: Schema.optional(
3332
+ Schema.Union([Schema.String, Schema.Null]),
3333
+ ),
3334
+ sessionToken: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3335
+ }) as unknown as Schema.Schema<CreateTemporaryCredentialResponse>;
3336
+
3337
+ export type CreateTemporaryCredentialError = DefaultErrors;
3338
+
3339
+ export const createTemporaryCredential: API.OperationMethod<
3340
+ CreateTemporaryCredentialRequest,
3341
+ CreateTemporaryCredentialResponse,
3342
+ CreateTemporaryCredentialError,
3343
+ Credentials | HttpClient.HttpClient
3344
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3345
+ input: CreateTemporaryCredentialRequest,
3346
+ output: CreateTemporaryCredentialResponse,
3347
+ errors: [],
3348
+ }));