@distilled.cloud/cloudflare 0.0.0-john

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 (562) hide show
  1. package/README.md +59 -0
  2. package/lib/auth.d.ts +14 -0
  3. package/lib/auth.d.ts.map +1 -0
  4. package/lib/auth.js +13 -0
  5. package/lib/auth.js.map +1 -0
  6. package/lib/category.d.ts +2 -0
  7. package/lib/category.d.ts.map +1 -0
  8. package/lib/category.js +2 -0
  9. package/lib/category.js.map +1 -0
  10. package/lib/client/api.d.ts +12 -0
  11. package/lib/client/api.d.ts.map +1 -0
  12. package/lib/client/api.js +292 -0
  13. package/lib/client/api.js.map +1 -0
  14. package/lib/client/index.d.ts +8 -0
  15. package/lib/client/index.d.ts.map +1 -0
  16. package/lib/client/index.js +8 -0
  17. package/lib/client/index.js.map +1 -0
  18. package/lib/credentials.d.ts +68 -0
  19. package/lib/credentials.d.ts.map +1 -0
  20. package/lib/credentials.js +136 -0
  21. package/lib/credentials.js.map +1 -0
  22. package/lib/errors.d.ts +48 -0
  23. package/lib/errors.d.ts.map +1 -0
  24. package/lib/errors.js +31 -0
  25. package/lib/errors.js.map +1 -0
  26. package/lib/index.d.ts +10 -0
  27. package/lib/index.d.ts.map +1 -0
  28. package/lib/index.js +10 -0
  29. package/lib/index.js.map +1 -0
  30. package/lib/retry.d.ts +14 -0
  31. package/lib/retry.d.ts.map +1 -0
  32. package/lib/retry.js +14 -0
  33. package/lib/retry.js.map +1 -0
  34. package/lib/schemas.d.ts +29 -0
  35. package/lib/schemas.d.ts.map +1 -0
  36. package/lib/schemas.js +34 -0
  37. package/lib/schemas.js.map +1 -0
  38. package/lib/sensitive.d.ts +5 -0
  39. package/lib/sensitive.d.ts.map +1 -0
  40. package/lib/sensitive.js +5 -0
  41. package/lib/sensitive.js.map +1 -0
  42. package/lib/services/abuse-reports.d.ts +296 -0
  43. package/lib/services/abuse-reports.d.ts.map +1 -0
  44. package/lib/services/abuse-reports.js +414 -0
  45. package/lib/services/abuse-reports.js.map +1 -0
  46. package/lib/services/accounts.d.ts +766 -0
  47. package/lib/services/accounts.d.ts.map +1 -0
  48. package/lib/services/accounts.js +860 -0
  49. package/lib/services/accounts.js.map +1 -0
  50. package/lib/services/acm.d.ts +73 -0
  51. package/lib/services/acm.d.ts.map +1 -0
  52. package/lib/services/acm.js +80 -0
  53. package/lib/services/acm.js.map +1 -0
  54. package/lib/services/addressing.d.ts +1321 -0
  55. package/lib/services/addressing.d.ts.map +1 -0
  56. package/lib/services/addressing.js +1863 -0
  57. package/lib/services/addressing.js.map +1 -0
  58. package/lib/services/ai-gateway.d.ts +1137 -0
  59. package/lib/services/ai-gateway.d.ts.map +1 -0
  60. package/lib/services/ai-gateway.js +1830 -0
  61. package/lib/services/ai-gateway.js.map +1 -0
  62. package/lib/services/ai.d.ts +297 -0
  63. package/lib/services/ai.d.ts.map +1 -0
  64. package/lib/services/ai.js +352 -0
  65. package/lib/services/ai.js.map +1 -0
  66. package/lib/services/aisearch.d.ts +1069 -0
  67. package/lib/services/aisearch.d.ts.map +1 -0
  68. package/lib/services/aisearch.js +2542 -0
  69. package/lib/services/aisearch.js.map +1 -0
  70. package/lib/services/alerting.d.ts +855 -0
  71. package/lib/services/alerting.d.ts.map +1 -0
  72. package/lib/services/alerting.js +1445 -0
  73. package/lib/services/alerting.js.map +1 -0
  74. package/lib/services/api-gateway.d.ts +1088 -0
  75. package/lib/services/api-gateway.d.ts.map +1 -0
  76. package/lib/services/api-gateway.js +1655 -0
  77. package/lib/services/api-gateway.js.map +1 -0
  78. package/lib/services/argo.d.ts +101 -0
  79. package/lib/services/argo.d.ts.map +1 -0
  80. package/lib/services/argo.js +113 -0
  81. package/lib/services/argo.js.map +1 -0
  82. package/lib/services/audit-logs.d.ts +46 -0
  83. package/lib/services/audit-logs.d.ts.map +1 -0
  84. package/lib/services/audit-logs.js +37 -0
  85. package/lib/services/audit-logs.js.map +1 -0
  86. package/lib/services/billing.d.ts +62 -0
  87. package/lib/services/billing.d.ts.map +1 -0
  88. package/lib/services/billing.js +102 -0
  89. package/lib/services/billing.js.map +1 -0
  90. package/lib/services/bot-management.d.ts +124 -0
  91. package/lib/services/bot-management.d.ts.map +1 -0
  92. package/lib/services/bot-management.js +262 -0
  93. package/lib/services/bot-management.js.map +1 -0
  94. package/lib/services/botnet-feed.d.ts +65 -0
  95. package/lib/services/botnet-feed.d.ts.map +1 -0
  96. package/lib/services/botnet-feed.js +88 -0
  97. package/lib/services/botnet-feed.js.map +1 -0
  98. package/lib/services/brand-protection.d.ts +194 -0
  99. package/lib/services/brand-protection.d.ts.map +1 -0
  100. package/lib/services/brand-protection.js +221 -0
  101. package/lib/services/brand-protection.js.map +1 -0
  102. package/lib/services/browser-rendering.d.ts +857 -0
  103. package/lib/services/browser-rendering.d.ts.map +1 -0
  104. package/lib/services/browser-rendering.js +1142 -0
  105. package/lib/services/browser-rendering.js.map +1 -0
  106. package/lib/services/cache.d.ts +287 -0
  107. package/lib/services/cache.d.ts.map +1 -0
  108. package/lib/services/cache.js +354 -0
  109. package/lib/services/cache.js.map +1 -0
  110. package/lib/services/calls.d.ts +223 -0
  111. package/lib/services/calls.d.ts.map +1 -0
  112. package/lib/services/calls.js +188 -0
  113. package/lib/services/calls.js.map +1 -0
  114. package/lib/services/certificate-authorities.d.ts +40 -0
  115. package/lib/services/certificate-authorities.d.ts.map +1 -0
  116. package/lib/services/certificate-authorities.js +49 -0
  117. package/lib/services/certificate-authorities.js.map +1 -0
  118. package/lib/services/client-certificates.d.ts +288 -0
  119. package/lib/services/client-certificates.d.ts.map +1 -0
  120. package/lib/services/client-certificates.js +379 -0
  121. package/lib/services/client-certificates.js.map +1 -0
  122. package/lib/services/cloud-connector.d.ts +88 -0
  123. package/lib/services/cloud-connector.d.ts.map +1 -0
  124. package/lib/services/cloud-connector.js +97 -0
  125. package/lib/services/cloud-connector.js.map +1 -0
  126. package/lib/services/cloudforce-one.d.ts +1387 -0
  127. package/lib/services/cloudforce-one.d.ts.map +1 -0
  128. package/lib/services/cloudforce-one.js +1741 -0
  129. package/lib/services/cloudforce-one.js.map +1 -0
  130. package/lib/services/connectivity.d.ts +291 -0
  131. package/lib/services/connectivity.d.ts.map +1 -0
  132. package/lib/services/connectivity.js +404 -0
  133. package/lib/services/connectivity.js.map +1 -0
  134. package/lib/services/content-scanning.d.ts +156 -0
  135. package/lib/services/content-scanning.d.ts.map +1 -0
  136. package/lib/services/content-scanning.js +175 -0
  137. package/lib/services/content-scanning.js.map +1 -0
  138. package/lib/services/custom-certificates.d.ts +240 -0
  139. package/lib/services/custom-certificates.d.ts.map +1 -0
  140. package/lib/services/custom-certificates.js +336 -0
  141. package/lib/services/custom-certificates.js.map +1 -0
  142. package/lib/services/custom-hostnames.d.ts +590 -0
  143. package/lib/services/custom-hostnames.d.ts.map +1 -0
  144. package/lib/services/custom-hostnames.js +1204 -0
  145. package/lib/services/custom-hostnames.js.map +1 -0
  146. package/lib/services/custom-nameservers.d.ts +87 -0
  147. package/lib/services/custom-nameservers.d.ts.map +1 -0
  148. package/lib/services/custom-nameservers.js +95 -0
  149. package/lib/services/custom-nameservers.js.map +1 -0
  150. package/lib/services/custom-pages.d.ts +89 -0
  151. package/lib/services/custom-pages.d.ts.map +1 -0
  152. package/lib/services/custom-pages.js +140 -0
  153. package/lib/services/custom-pages.js.map +1 -0
  154. package/lib/services/d1.d.ts +392 -0
  155. package/lib/services/d1.d.ts.map +1 -0
  156. package/lib/services/d1.js +487 -0
  157. package/lib/services/d1.js.map +1 -0
  158. package/lib/services/dcv-delegation.d.ts +24 -0
  159. package/lib/services/dcv-delegation.d.ts.map +1 -0
  160. package/lib/services/dcv-delegation.js +24 -0
  161. package/lib/services/dcv-delegation.js.map +1 -0
  162. package/lib/services/diagnostics.d.ts +208 -0
  163. package/lib/services/diagnostics.d.ts.map +1 -0
  164. package/lib/services/diagnostics.js +288 -0
  165. package/lib/services/diagnostics.js.map +1 -0
  166. package/lib/services/dns-firewall.d.ts +317 -0
  167. package/lib/services/dns-firewall.d.ts.map +1 -0
  168. package/lib/services/dns-firewall.js +400 -0
  169. package/lib/services/dns-firewall.js.map +1 -0
  170. package/lib/services/dns.d.ts +3065 -0
  171. package/lib/services/dns.d.ts.map +1 -0
  172. package/lib/services/dns.js +4627 -0
  173. package/lib/services/dns.js.map +1 -0
  174. package/lib/services/durable-objects.d.ts +92 -0
  175. package/lib/services/durable-objects.d.ts.map +1 -0
  176. package/lib/services/durable-objects.js +103 -0
  177. package/lib/services/durable-objects.js.map +1 -0
  178. package/lib/services/email-routing.d.ts +598 -0
  179. package/lib/services/email-routing.d.ts.map +1 -0
  180. package/lib/services/email-routing.js +715 -0
  181. package/lib/services/email-routing.js.map +1 -0
  182. package/lib/services/email-security.d.ts +1389 -0
  183. package/lib/services/email-security.d.ts.map +1 -0
  184. package/lib/services/email-security.js +2261 -0
  185. package/lib/services/email-security.js.map +1 -0
  186. package/lib/services/filters.d.ts +197 -0
  187. package/lib/services/filters.d.ts.map +1 -0
  188. package/lib/services/filters.js +168 -0
  189. package/lib/services/filters.js.map +1 -0
  190. package/lib/services/firewall.d.ts +1352 -0
  191. package/lib/services/firewall.d.ts.map +1 -0
  192. package/lib/services/firewall.js +2084 -0
  193. package/lib/services/firewall.js.map +1 -0
  194. package/lib/services/healthchecks.d.ts +507 -0
  195. package/lib/services/healthchecks.d.ts.map +1 -0
  196. package/lib/services/healthchecks.js +867 -0
  197. package/lib/services/healthchecks.js.map +1 -0
  198. package/lib/services/hostnames.d.ts +86 -0
  199. package/lib/services/hostnames.d.ts.map +1 -0
  200. package/lib/services/hostnames.js +111 -0
  201. package/lib/services/hostnames.js.map +1 -0
  202. package/lib/services/hyperdrive.d.ts +203 -0
  203. package/lib/services/hyperdrive.d.ts.map +1 -0
  204. package/lib/services/hyperdrive.js +300 -0
  205. package/lib/services/hyperdrive.js.map +1 -0
  206. package/lib/services/iam.d.ts +657 -0
  207. package/lib/services/iam.d.ts.map +1 -0
  208. package/lib/services/iam.js +843 -0
  209. package/lib/services/iam.js.map +1 -0
  210. package/lib/services/images.d.ts +427 -0
  211. package/lib/services/images.d.ts.map +1 -0
  212. package/lib/services/images.js +444 -0
  213. package/lib/services/images.js.map +1 -0
  214. package/lib/services/intel.d.ts +865 -0
  215. package/lib/services/intel.d.ts.map +1 -0
  216. package/lib/services/intel.js +1266 -0
  217. package/lib/services/intel.js.map +1 -0
  218. package/lib/services/ips.d.ts +28 -0
  219. package/lib/services/ips.d.ts.map +1 -0
  220. package/lib/services/ips.js +39 -0
  221. package/lib/services/ips.js.map +1 -0
  222. package/lib/services/keyless-certificates.d.ts +197 -0
  223. package/lib/services/keyless-certificates.d.ts.map +1 -0
  224. package/lib/services/keyless-certificates.js +229 -0
  225. package/lib/services/keyless-certificates.js.map +1 -0
  226. package/lib/services/kv.d.ts +369 -0
  227. package/lib/services/kv.d.ts.map +1 -0
  228. package/lib/services/kv.js +453 -0
  229. package/lib/services/kv.js.map +1 -0
  230. package/lib/services/leaked-credential-checks.d.ts +129 -0
  231. package/lib/services/leaked-credential-checks.d.ts.map +1 -0
  232. package/lib/services/leaked-credential-checks.js +138 -0
  233. package/lib/services/leaked-credential-checks.js.map +1 -0
  234. package/lib/services/load-balancers.d.ts +1973 -0
  235. package/lib/services/load-balancers.d.ts.map +1 -0
  236. package/lib/services/load-balancers.js +3181 -0
  237. package/lib/services/load-balancers.js.map +1 -0
  238. package/lib/services/logpush.d.ts +401 -0
  239. package/lib/services/logpush.d.ts.map +1 -0
  240. package/lib/services/logpush.js +732 -0
  241. package/lib/services/logpush.js.map +1 -0
  242. package/lib/services/logs.d.ts +125 -0
  243. package/lib/services/logs.d.ts.map +1 -0
  244. package/lib/services/logs.js +149 -0
  245. package/lib/services/logs.js.map +1 -0
  246. package/lib/services/magic-cloud-networking.d.ts +1892 -0
  247. package/lib/services/magic-cloud-networking.d.ts.map +1 -0
  248. package/lib/services/magic-cloud-networking.js +5291 -0
  249. package/lib/services/magic-cloud-networking.js.map +1 -0
  250. package/lib/services/magic-network-monitoring.d.ts +379 -0
  251. package/lib/services/magic-network-monitoring.d.ts.map +1 -0
  252. package/lib/services/magic-network-monitoring.js +557 -0
  253. package/lib/services/magic-network-monitoring.js.map +1 -0
  254. package/lib/services/magic-transit.d.ts +3886 -0
  255. package/lib/services/magic-transit.d.ts.map +1 -0
  256. package/lib/services/magic-transit.js +6284 -0
  257. package/lib/services/magic-transit.js.map +1 -0
  258. package/lib/services/managed-transforms.d.ts +79 -0
  259. package/lib/services/managed-transforms.d.ts.map +1 -0
  260. package/lib/services/managed-transforms.js +111 -0
  261. package/lib/services/managed-transforms.js.map +1 -0
  262. package/lib/services/memberships.d.ts +204 -0
  263. package/lib/services/memberships.d.ts.map +1 -0
  264. package/lib/services/memberships.js +308 -0
  265. package/lib/services/memberships.js.map +1 -0
  266. package/lib/services/mtls-certificates.d.ts +164 -0
  267. package/lib/services/mtls-certificates.d.ts.map +1 -0
  268. package/lib/services/mtls-certificates.js +192 -0
  269. package/lib/services/mtls-certificates.js.map +1 -0
  270. package/lib/services/network-interconnects.d.ts +410 -0
  271. package/lib/services/network-interconnects.d.ts.map +1 -0
  272. package/lib/services/network-interconnects.js +583 -0
  273. package/lib/services/network-interconnects.js.map +1 -0
  274. package/lib/services/organizations.d.ts +232 -0
  275. package/lib/services/organizations.d.ts.map +1 -0
  276. package/lib/services/organizations.js +370 -0
  277. package/lib/services/organizations.js.map +1 -0
  278. package/lib/services/origin-ca-certificates.d.ts +119 -0
  279. package/lib/services/origin-ca-certificates.d.ts.map +1 -0
  280. package/lib/services/origin-ca-certificates.js +183 -0
  281. package/lib/services/origin-ca-certificates.js.map +1 -0
  282. package/lib/services/origin-post-quantum-encryption.d.ts +50 -0
  283. package/lib/services/origin-post-quantum-encryption.d.ts.map +1 -0
  284. package/lib/services/origin-post-quantum-encryption.js +64 -0
  285. package/lib/services/origin-post-quantum-encryption.js.map +1 -0
  286. package/lib/services/origin-tls-client-auth.d.ts +308 -0
  287. package/lib/services/origin-tls-client-auth.d.ts.map +1 -0
  288. package/lib/services/origin-tls-client-auth.js +435 -0
  289. package/lib/services/origin-tls-client-auth.js.map +1 -0
  290. package/lib/services/page-rules.d.ts +773 -0
  291. package/lib/services/page-rules.d.ts.map +1 -0
  292. package/lib/services/page-rules.js +1373 -0
  293. package/lib/services/page-rules.js.map +1 -0
  294. package/lib/services/page-shield.d.ts +505 -0
  295. package/lib/services/page-shield.d.ts.map +1 -0
  296. package/lib/services/page-shield.js +520 -0
  297. package/lib/services/page-shield.js.map +1 -0
  298. package/lib/services/pages.d.ts +1949 -0
  299. package/lib/services/pages.d.ts.map +1 -0
  300. package/lib/services/pages.js +3030 -0
  301. package/lib/services/pages.js.map +1 -0
  302. package/lib/services/pipelines.d.ts +1716 -0
  303. package/lib/services/pipelines.d.ts.map +1 -0
  304. package/lib/services/pipelines.js +2991 -0
  305. package/lib/services/pipelines.js.map +1 -0
  306. package/lib/services/queues.d.ts +904 -0
  307. package/lib/services/queues.d.ts.map +1 -0
  308. package/lib/services/queues.js +1250 -0
  309. package/lib/services/queues.js.map +1 -0
  310. package/lib/services/r2-data-catalog.d.ts +341 -0
  311. package/lib/services/r2-data-catalog.d.ts.map +1 -0
  312. package/lib/services/r2-data-catalog.js +513 -0
  313. package/lib/services/r2-data-catalog.js.map +1 -0
  314. package/lib/services/r2.d.ts +1087 -0
  315. package/lib/services/r2.d.ts.map +1 -0
  316. package/lib/services/r2.js +1404 -0
  317. package/lib/services/r2.js.map +1 -0
  318. package/lib/services/radar.d.ts +9365 -0
  319. package/lib/services/radar.d.ts.map +1 -0
  320. package/lib/services/radar.js +20552 -0
  321. package/lib/services/radar.js.map +1 -0
  322. package/lib/services/rate-limits.d.ts +360 -0
  323. package/lib/services/rate-limits.d.ts.map +1 -0
  324. package/lib/services/rate-limits.js +545 -0
  325. package/lib/services/rate-limits.js.map +1 -0
  326. package/lib/services/realtime-kit.d.ts +2728 -0
  327. package/lib/services/realtime-kit.d.ts.map +1 -0
  328. package/lib/services/realtime-kit.js +5402 -0
  329. package/lib/services/realtime-kit.js.map +1 -0
  330. package/lib/services/registrar.d.ts +121 -0
  331. package/lib/services/registrar.d.ts.map +1 -0
  332. package/lib/services/registrar.js +167 -0
  333. package/lib/services/registrar.js.map +1 -0
  334. package/lib/services/request-tracers.d.ts +61 -0
  335. package/lib/services/request-tracers.d.ts.map +1 -0
  336. package/lib/services/request-tracers.js +85 -0
  337. package/lib/services/request-tracers.js.map +1 -0
  338. package/lib/services/resource-sharing.d.ts +622 -0
  339. package/lib/services/resource-sharing.d.ts.map +1 -0
  340. package/lib/services/resource-sharing.js +929 -0
  341. package/lib/services/resource-sharing.js.map +1 -0
  342. package/lib/services/rules.d.ts +346 -0
  343. package/lib/services/rules.d.ts.map +1 -0
  344. package/lib/services/rules.js +431 -0
  345. package/lib/services/rules.js.map +1 -0
  346. package/lib/services/rulesets.d.ts +3345 -0
  347. package/lib/services/rulesets.d.ts.map +1 -0
  348. package/lib/services/rulesets.js +7904 -0
  349. package/lib/services/rulesets.js.map +1 -0
  350. package/lib/services/rum.d.ts +314 -0
  351. package/lib/services/rum.d.ts.map +1 -0
  352. package/lib/services/rum.js +442 -0
  353. package/lib/services/rum.js.map +1 -0
  354. package/lib/services/schema-validation.d.ts +273 -0
  355. package/lib/services/schema-validation.d.ts.map +1 -0
  356. package/lib/services/schema-validation.js +365 -0
  357. package/lib/services/schema-validation.js.map +1 -0
  358. package/lib/services/secrets-store.d.ts +393 -0
  359. package/lib/services/secrets-store.d.ts.map +1 -0
  360. package/lib/services/secrets-store.js +452 -0
  361. package/lib/services/secrets-store.js.map +1 -0
  362. package/lib/services/security-center.d.ts +136 -0
  363. package/lib/services/security-center.d.ts.map +1 -0
  364. package/lib/services/security-center.js +196 -0
  365. package/lib/services/security-center.js.map +1 -0
  366. package/lib/services/security-txt.d.ts +105 -0
  367. package/lib/services/security-txt.d.ts.map +1 -0
  368. package/lib/services/security-txt.js +136 -0
  369. package/lib/services/security-txt.js.map +1 -0
  370. package/lib/services/snippets.d.ts +190 -0
  371. package/lib/services/snippets.d.ts.map +1 -0
  372. package/lib/services/snippets.js +221 -0
  373. package/lib/services/snippets.js.map +1 -0
  374. package/lib/services/spectrum.d.ts +350 -0
  375. package/lib/services/spectrum.d.ts.map +1 -0
  376. package/lib/services/spectrum.js +535 -0
  377. package/lib/services/spectrum.js.map +1 -0
  378. package/lib/services/speed.d.ts +257 -0
  379. package/lib/services/speed.d.ts.map +1 -0
  380. package/lib/services/speed.js +471 -0
  381. package/lib/services/speed.js.map +1 -0
  382. package/lib/services/ssl.d.ts +412 -0
  383. package/lib/services/ssl.d.ts.map +1 -0
  384. package/lib/services/ssl.js +755 -0
  385. package/lib/services/ssl.js.map +1 -0
  386. package/lib/services/stream.d.ts +1110 -0
  387. package/lib/services/stream.d.ts.map +1 -0
  388. package/lib/services/stream.js +1085 -0
  389. package/lib/services/stream.js.map +1 -0
  390. package/lib/services/token-validation.d.ts +662 -0
  391. package/lib/services/token-validation.d.ts.map +1 -0
  392. package/lib/services/token-validation.js +834 -0
  393. package/lib/services/token-validation.js.map +1 -0
  394. package/lib/services/turnstile.d.ts +272 -0
  395. package/lib/services/turnstile.d.ts.map +1 -0
  396. package/lib/services/turnstile.js +339 -0
  397. package/lib/services/turnstile.js.map +1 -0
  398. package/lib/services/url-normalization.d.ts +53 -0
  399. package/lib/services/url-normalization.d.ts.map +1 -0
  400. package/lib/services/url-normalization.js +52 -0
  401. package/lib/services/url-normalization.js.map +1 -0
  402. package/lib/services/url-scanner.d.ts +612 -0
  403. package/lib/services/url-scanner.d.ts.map +1 -0
  404. package/lib/services/url-scanner.js +915 -0
  405. package/lib/services/url-scanner.js.map +1 -0
  406. package/lib/services/user.d.ts +507 -0
  407. package/lib/services/user.d.ts.map +1 -0
  408. package/lib/services/user.js +634 -0
  409. package/lib/services/user.js.map +1 -0
  410. package/lib/services/vectorize.d.ts +297 -0
  411. package/lib/services/vectorize.d.ts.map +1 -0
  412. package/lib/services/vectorize.js +351 -0
  413. package/lib/services/vectorize.js.map +1 -0
  414. package/lib/services/waiting-rooms.d.ts +1149 -0
  415. package/lib/services/waiting-rooms.d.ts.map +1 -0
  416. package/lib/services/waiting-rooms.js +1859 -0
  417. package/lib/services/waiting-rooms.js.map +1 -0
  418. package/lib/services/web3.d.ts +289 -0
  419. package/lib/services/web3.d.ts.map +1 -0
  420. package/lib/services/web3.js +381 -0
  421. package/lib/services/web3.js.map +1 -0
  422. package/lib/services/workers-for-platforms.d.ts +1394 -0
  423. package/lib/services/workers-for-platforms.d.ts.map +1 -0
  424. package/lib/services/workers-for-platforms.js +2121 -0
  425. package/lib/services/workers-for-platforms.js.map +1 -0
  426. package/lib/services/workers.d.ts +3827 -0
  427. package/lib/services/workers.d.ts.map +1 -0
  428. package/lib/services/workers.js +6105 -0
  429. package/lib/services/workers.js.map +1 -0
  430. package/lib/services/workflows.d.ts +442 -0
  431. package/lib/services/workflows.d.ts.map +1 -0
  432. package/lib/services/workflows.js +599 -0
  433. package/lib/services/workflows.js.map +1 -0
  434. package/lib/services/zaraz.d.ts +312 -0
  435. package/lib/services/zaraz.d.ts.map +1 -0
  436. package/lib/services/zaraz.js +305 -0
  437. package/lib/services/zaraz.js.map +1 -0
  438. package/lib/services/zero-trust.d.ts +18235 -0
  439. package/lib/services/zero-trust.d.ts.map +1 -0
  440. package/lib/services/zero-trust.js +30268 -0
  441. package/lib/services/zero-trust.js.map +1 -0
  442. package/lib/services/zones.d.ts +1382 -0
  443. package/lib/services/zones.d.ts.map +1 -0
  444. package/lib/services/zones.js +2477 -0
  445. package/lib/services/zones.js.map +1 -0
  446. package/lib/traits.d.ts +28 -0
  447. package/lib/traits.d.ts.map +1 -0
  448. package/lib/traits.js +26 -0
  449. package/lib/traits.js.map +1 -0
  450. package/package.json +82 -0
  451. package/src/auth.ts +15 -0
  452. package/src/category.ts +1 -0
  453. package/src/client/api.ts +421 -0
  454. package/src/client/index.ts +7 -0
  455. package/src/credentials.ts +271 -0
  456. package/src/errors.ts +73 -0
  457. package/src/index.ts +9 -0
  458. package/src/retry.ts +35 -0
  459. package/src/schemas.ts +51 -0
  460. package/src/sensitive.ts +4 -0
  461. package/src/services/abuse-reports.ts +955 -0
  462. package/src/services/accounts.ts +2152 -0
  463. package/src/services/acm.ts +178 -0
  464. package/src/services/addressing.ts +4262 -0
  465. package/src/services/ai-gateway.ts +3773 -0
  466. package/src/services/ai.ts +901 -0
  467. package/src/services/aisearch.ts +5215 -0
  468. package/src/services/alerting.ts +3303 -0
  469. package/src/services/api-gateway.ts +3890 -0
  470. package/src/services/argo.ts +270 -0
  471. package/src/services/audit-logs.ts +90 -0
  472. package/src/services/billing.ts +176 -0
  473. package/src/services/bot-management.ts +545 -0
  474. package/src/services/botnet-feed.ts +205 -0
  475. package/src/services/brand-protection.ts +575 -0
  476. package/src/services/browser-rendering.ts +2720 -0
  477. package/src/services/cache.ts +877 -0
  478. package/src/services/calls.ts +548 -0
  479. package/src/services/certificate-authorities.ts +114 -0
  480. package/src/services/client-certificates.ts +815 -0
  481. package/src/services/cloud-connector.ts +248 -0
  482. package/src/services/cloudforce-one.ts +4104 -0
  483. package/src/services/connectivity.ts +706 -0
  484. package/src/services/content-scanning.ts +458 -0
  485. package/src/services/custom-certificates.ts +690 -0
  486. package/src/services/custom-hostnames.ts +2641 -0
  487. package/src/services/custom-nameservers.ts +235 -0
  488. package/src/services/custom-pages.ts +311 -0
  489. package/src/services/d1.ts +1208 -0
  490. package/src/services/dcv-delegation.ts +54 -0
  491. package/src/services/diagnostics.ts +677 -0
  492. package/src/services/dns-firewall.ts +904 -0
  493. package/src/services/dns.ts +9277 -0
  494. package/src/services/durable-objects.ts +237 -0
  495. package/src/services/email-routing.ts +1796 -0
  496. package/src/services/email-security.ts +5052 -0
  497. package/src/services/filters.ts +488 -0
  498. package/src/services/firewall.ts +4728 -0
  499. package/src/services/healthchecks.ts +1866 -0
  500. package/src/services/hostnames.ts +254 -0
  501. package/src/services/hyperdrive.ts +595 -0
  502. package/src/services/iam.ts +1969 -0
  503. package/src/services/images.ts +1180 -0
  504. package/src/services/intel.ts +3072 -0
  505. package/src/services/ips.ts +88 -0
  506. package/src/services/keyless-certificates.ts +509 -0
  507. package/src/services/kv.ts +1129 -0
  508. package/src/services/leaked-credential-checks.ts +364 -0
  509. package/src/services/load-balancers.ts +6993 -0
  510. package/src/services/logpush.ts +1695 -0
  511. package/src/services/logs.ts +389 -0
  512. package/src/services/magic-cloud-networking.ts +10747 -0
  513. package/src/services/magic-network-monitoring.ts +1200 -0
  514. package/src/services/magic-transit.ts +13673 -0
  515. package/src/services/managed-transforms.ts +245 -0
  516. package/src/services/memberships.ts +698 -0
  517. package/src/services/mtls-certificates.ts +444 -0
  518. package/src/services/network-interconnects.ts +1253 -0
  519. package/src/services/organizations.ts +738 -0
  520. package/src/services/origin-ca-certificates.ts +369 -0
  521. package/src/services/origin-post-quantum-encryption.ts +136 -0
  522. package/src/services/origin-tls-client-auth.ts +1002 -0
  523. package/src/services/page-rules.ts +2632 -0
  524. package/src/services/page-shield.ts +1371 -0
  525. package/src/services/pages.ts +6167 -0
  526. package/src/services/pipelines.ts +6455 -0
  527. package/src/services/queues.ts +2827 -0
  528. package/src/services/r2-data-catalog.ts +1151 -0
  529. package/src/services/r2.ts +3529 -0
  530. package/src/services/radar.ts +42836 -0
  531. package/src/services/rate-limits.ts +1252 -0
  532. package/src/services/realtime-kit.ts +11080 -0
  533. package/src/services/registrar.ts +390 -0
  534. package/src/services/request-tracers.ts +161 -0
  535. package/src/services/resource-sharing.ts +2082 -0
  536. package/src/services/rules.ts +953 -0
  537. package/src/services/rulesets.ts +15361 -0
  538. package/src/services/rum.ts +994 -0
  539. package/src/services/schema-validation.ts +869 -0
  540. package/src/services/secrets-store.ts +1050 -0
  541. package/src/services/security-center.ts +495 -0
  542. package/src/services/security-txt.ts +317 -0
  543. package/src/services/snippets.ts +562 -0
  544. package/src/services/spectrum.ts +1190 -0
  545. package/src/services/speed.ts +1154 -0
  546. package/src/services/ssl.ts +1714 -0
  547. package/src/services/stream.ts +3008 -0
  548. package/src/services/token-validation.ts +1825 -0
  549. package/src/services/turnstile.ts +725 -0
  550. package/src/services/url-normalization.ts +133 -0
  551. package/src/services/url-scanner.ts +1851 -0
  552. package/src/services/user.ts +1587 -0
  553. package/src/services/vectorize.ts +875 -0
  554. package/src/services/waiting-rooms.ts +4216 -0
  555. package/src/services/web3.ts +899 -0
  556. package/src/services/workers-for-platforms.ts +4134 -0
  557. package/src/services/workers.ts +12298 -0
  558. package/src/services/workflows.ts +1372 -0
  559. package/src/services/zaraz.ts +833 -0
  560. package/src/services/zero-trust.ts +64685 -0
  561. package/src/services/zones.ts +5106 -0
  562. package/src/traits.ts +47 -0
@@ -0,0 +1,1180 @@
1
+ /**
2
+ * Cloudflare IMAGES API
3
+ *
4
+ * Generated from Cloudflare TypeScript SDK.
5
+ * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service images
6
+ */
7
+
8
+ import * as stream from "effect/Stream";
9
+ import * as Schema from "effect/Schema";
10
+ import type * as HttpClient from "effect/unstable/http/HttpClient";
11
+ import * as API from "../client/api.ts";
12
+ import * as T from "../traits.ts";
13
+ import type { Credentials } from "../credentials.ts";
14
+ import { type DefaultErrors } from "../errors.ts";
15
+ import { UploadableSchema } from "../schemas.ts";
16
+
17
+ // =============================================================================
18
+ // Errors
19
+ // =============================================================================
20
+
21
+ export class ImageAlreadyExists extends Schema.TaggedErrorClass<ImageAlreadyExists>()(
22
+ "ImageAlreadyExists",
23
+ { code: Schema.Number, message: Schema.String },
24
+ ) {}
25
+ T.applyErrorMatchers(ImageAlreadyExists, [{ code: 5409 }]);
26
+
27
+ export class ImageNotFound extends Schema.TaggedErrorClass<ImageNotFound>()(
28
+ "ImageNotFound",
29
+ { code: Schema.Number, message: Schema.String },
30
+ ) {}
31
+ T.applyErrorMatchers(ImageNotFound, [{ code: 5404 }]);
32
+
33
+ export class ImagesAccessNotEnabled extends Schema.TaggedErrorClass<ImagesAccessNotEnabled>()(
34
+ "ImagesAccessNotEnabled",
35
+ { code: Schema.Number, message: Schema.String },
36
+ ) {}
37
+ T.applyErrorMatchers(ImagesAccessNotEnabled, [{ code: 5403 }]);
38
+
39
+ export class InvalidUploadFormat extends Schema.TaggedErrorClass<InvalidUploadFormat>()(
40
+ "InvalidUploadFormat",
41
+ { code: Schema.Number, message: Schema.String },
42
+ ) {}
43
+ T.applyErrorMatchers(InvalidUploadFormat, [{ code: 5415 }]);
44
+
45
+ export class KeyNotFound extends Schema.TaggedErrorClass<KeyNotFound>()(
46
+ "KeyNotFound",
47
+ { code: Schema.Number, message: Schema.String },
48
+ ) {}
49
+ T.applyErrorMatchers(KeyNotFound, [{ code: 5404 }]);
50
+
51
+ export class VariantNameNotAllowed extends Schema.TaggedErrorClass<VariantNameNotAllowed>()(
52
+ "VariantNameNotAllowed",
53
+ { code: Schema.Number, message: Schema.String },
54
+ ) {}
55
+ T.applyErrorMatchers(VariantNameNotAllowed, [{ code: 5400 }]);
56
+
57
+ export class VariantNotFound extends Schema.TaggedErrorClass<VariantNotFound>()(
58
+ "VariantNotFound",
59
+ { code: Schema.Number, message: Schema.String },
60
+ ) {}
61
+ T.applyErrorMatchers(VariantNotFound, [{ code: 5401 }]);
62
+
63
+ // =============================================================================
64
+ // V1
65
+ // =============================================================================
66
+
67
+ export interface GetV1Request {
68
+ imageId: string;
69
+ /** Account identifier tag. */
70
+ accountId: string;
71
+ }
72
+
73
+ export const GetV1Request = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
74
+ imageId: Schema.String.pipe(T.HttpPath("imageId")),
75
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
76
+ }).pipe(
77
+ T.Http({ method: "GET", path: "/accounts/{account_id}/images/v1/{imageId}" }),
78
+ ) as unknown as Schema.Schema<GetV1Request>;
79
+
80
+ export interface GetV1Response {
81
+ /** Image unique identifier. */
82
+ id?: string | null;
83
+ /** Can set the creator field with an internal user ID. */
84
+ creator?: string | null;
85
+ /** Image file name. */
86
+ filename?: string | null;
87
+ /** User modifiable key-value store. Can be used for keeping references to another system of record for managing images. Metadata must not exceed 1024 bytes. */
88
+ meta?: unknown | null;
89
+ /** Indicates whether the image can be a accessed only using it's UID. If set to true, a signed token needs to be generated with a signing key to view the image. */
90
+ requireSignedURLs?: boolean | null;
91
+ /** When the media item was uploaded. */
92
+ uploaded?: string | null;
93
+ /** Object specifying available variants for an image. */
94
+ variants?: string[] | null;
95
+ }
96
+
97
+ export const GetV1Response = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
98
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
99
+ creator: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
100
+ filename: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
101
+ meta: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
102
+ requireSignedURLs: Schema.optional(
103
+ Schema.Union([Schema.Boolean, Schema.Null]),
104
+ ),
105
+ uploaded: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
106
+ variants: Schema.optional(
107
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
108
+ ),
109
+ }).pipe(T.ResponsePath("result")) as unknown as Schema.Schema<GetV1Response>;
110
+
111
+ export type GetV1Error = DefaultErrors | ImagesAccessNotEnabled | ImageNotFound;
112
+
113
+ export const getV1: API.OperationMethod<
114
+ GetV1Request,
115
+ GetV1Response,
116
+ GetV1Error,
117
+ Credentials | HttpClient.HttpClient
118
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
119
+ input: GetV1Request,
120
+ output: GetV1Response,
121
+ errors: [ImagesAccessNotEnabled, ImageNotFound],
122
+ }));
123
+
124
+ export interface ListV1sRequest {
125
+ /** Path param: Account identifier tag. */
126
+ accountId: string;
127
+ /** Query param: Internal user ID set within the creator field. Setting to empty string "" will return images where creator field is not set */
128
+ creator?: string | null;
129
+ }
130
+
131
+ export const ListV1sRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
132
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
133
+ creator: Schema.optional(Schema.Union([Schema.String, Schema.Null])).pipe(
134
+ T.HttpQuery("creator"),
135
+ ),
136
+ }).pipe(
137
+ T.Http({ method: "GET", path: "/accounts/{account_id}/images/v1" }),
138
+ ) as unknown as Schema.Schema<ListV1sRequest>;
139
+
140
+ export interface ListV1sResponse {
141
+ result: {
142
+ items?:
143
+ | {
144
+ images?:
145
+ | {
146
+ id?: string | null;
147
+ creator?: string | null;
148
+ filename?: string | null;
149
+ meta?: unknown | null;
150
+ requireSignedURLs?: boolean | null;
151
+ uploaded?: string | null;
152
+ variants?: string[] | null;
153
+ }[]
154
+ | null;
155
+ }[]
156
+ | null;
157
+ };
158
+ resultInfo: {
159
+ count?: number | null;
160
+ page?: number | null;
161
+ perPage?: number | null;
162
+ totalCount?: number | null;
163
+ };
164
+ }
165
+
166
+ export const ListV1sResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
167
+ result: Schema.Struct({
168
+ items: Schema.optional(
169
+ Schema.Union([
170
+ Schema.Array(
171
+ Schema.Struct({
172
+ images: Schema.optional(
173
+ Schema.Union([
174
+ Schema.Array(
175
+ Schema.Struct({
176
+ id: Schema.optional(
177
+ Schema.Union([Schema.String, Schema.Null]),
178
+ ),
179
+ creator: Schema.optional(
180
+ Schema.Union([Schema.String, Schema.Null]),
181
+ ),
182
+ filename: Schema.optional(
183
+ Schema.Union([Schema.String, Schema.Null]),
184
+ ),
185
+ meta: Schema.optional(
186
+ Schema.Union([Schema.Unknown, Schema.Null]),
187
+ ),
188
+ requireSignedURLs: Schema.optional(
189
+ Schema.Union([Schema.Boolean, Schema.Null]),
190
+ ),
191
+ uploaded: Schema.optional(
192
+ Schema.Union([Schema.String, Schema.Null]),
193
+ ),
194
+ variants: Schema.optional(
195
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
196
+ ),
197
+ }),
198
+ ),
199
+ Schema.Null,
200
+ ]),
201
+ ),
202
+ }),
203
+ ),
204
+ Schema.Null,
205
+ ]),
206
+ ),
207
+ }),
208
+ resultInfo: Schema.Struct({
209
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
210
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
211
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
212
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
213
+ }).pipe(
214
+ Schema.encodeKeys({
215
+ count: "count",
216
+ page: "page",
217
+ perPage: "per_page",
218
+ totalCount: "total_count",
219
+ }),
220
+ ),
221
+ }).pipe(
222
+ Schema.encodeKeys({ result: "result", resultInfo: "result_info" }),
223
+ ) as unknown as Schema.Schema<ListV1sResponse>;
224
+
225
+ export type ListV1sError = DefaultErrors | ImagesAccessNotEnabled;
226
+
227
+ export const listV1s: API.PaginatedOperationMethod<
228
+ ListV1sRequest,
229
+ ListV1sResponse,
230
+ ListV1sError,
231
+ Credentials | HttpClient.HttpClient
232
+ > & {
233
+ pages: (
234
+ input: ListV1sRequest,
235
+ ) => stream.Stream<
236
+ ListV1sResponse,
237
+ ListV1sError,
238
+ Credentials | HttpClient.HttpClient
239
+ >;
240
+ items: (input: ListV1sRequest) => stream.Stream<
241
+ {
242
+ images?:
243
+ | {
244
+ id?: string | null;
245
+ creator?: string | null;
246
+ filename?: string | null;
247
+ meta?: unknown | null;
248
+ requireSignedURLs?: boolean | null;
249
+ uploaded?: string | null;
250
+ variants?: string[] | null;
251
+ }[]
252
+ | null;
253
+ },
254
+ ListV1sError,
255
+ Credentials | HttpClient.HttpClient
256
+ >;
257
+ } = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
258
+ input: ListV1sRequest,
259
+ output: ListV1sResponse,
260
+ errors: [ImagesAccessNotEnabled],
261
+ pagination: {
262
+ mode: "page",
263
+ inputToken: "page",
264
+ outputToken: "resultInfo.page",
265
+ items: "result.items",
266
+ pageSize: "perPage",
267
+ } as const,
268
+ }));
269
+
270
+ export interface CreateV1Request {
271
+ /** Path param: Account identifier tag. */
272
+ accountId: string;
273
+ /** Body param: An optional custom unique identifier for your image. */
274
+ id?: string;
275
+ /** Body param: Can set the creator field with an internal user ID. */
276
+ creator?: string;
277
+ /** Body param: An image binary data. Only needed when type is uploading a file. */
278
+ file?: File | Blob;
279
+ /** Body param: User modifiable key-value store. Can use used for keeping references to another system of record for managing images. */
280
+ metadata?: unknown;
281
+ /** Body param: Indicates whether the image requires a signature token for the access. */
282
+ requireSignedURLs?: boolean;
283
+ /** Body param: A URL to fetch an image from origin. Only needed when type is uploading from a URL. */
284
+ url?: string;
285
+ }
286
+
287
+ export const CreateV1Request = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
288
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
289
+ id: Schema.optional(Schema.String),
290
+ creator: Schema.optional(Schema.String),
291
+ file: Schema.optional(UploadableSchema.pipe(T.HttpFormDataFile())),
292
+ metadata: Schema.optional(Schema.Unknown),
293
+ requireSignedURLs: Schema.optional(Schema.Boolean),
294
+ url: Schema.optional(Schema.String),
295
+ }).pipe(
296
+ T.Http({
297
+ method: "POST",
298
+ path: "/accounts/{account_id}/images/v1",
299
+ contentType: "multipart",
300
+ }),
301
+ ) as unknown as Schema.Schema<CreateV1Request>;
302
+
303
+ export interface CreateV1Response {
304
+ /** Image unique identifier. */
305
+ id?: string | null;
306
+ /** Can set the creator field with an internal user ID. */
307
+ creator?: string | null;
308
+ /** Image file name. */
309
+ filename?: string | null;
310
+ /** User modifiable key-value store. Can be used for keeping references to another system of record for managing images. Metadata must not exceed 1024 bytes. */
311
+ meta?: unknown | null;
312
+ /** Indicates whether the image can be a accessed only using it's UID. If set to true, a signed token needs to be generated with a signing key to view the image. */
313
+ requireSignedURLs?: boolean | null;
314
+ /** When the media item was uploaded. */
315
+ uploaded?: string | null;
316
+ /** Object specifying available variants for an image. */
317
+ variants?: string[] | null;
318
+ }
319
+
320
+ export const CreateV1Response = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
321
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
322
+ creator: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
323
+ filename: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
324
+ meta: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
325
+ requireSignedURLs: Schema.optional(
326
+ Schema.Union([Schema.Boolean, Schema.Null]),
327
+ ),
328
+ uploaded: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
329
+ variants: Schema.optional(
330
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
331
+ ),
332
+ }).pipe(T.ResponsePath("result")) as unknown as Schema.Schema<CreateV1Response>;
333
+
334
+ export type CreateV1Error = DefaultErrors | ImagesAccessNotEnabled;
335
+
336
+ export const createV1: API.OperationMethod<
337
+ CreateV1Request,
338
+ CreateV1Response,
339
+ CreateV1Error,
340
+ Credentials | HttpClient.HttpClient
341
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
342
+ input: CreateV1Request,
343
+ output: CreateV1Response,
344
+ errors: [ImagesAccessNotEnabled],
345
+ }));
346
+
347
+ export interface PatchV1Request {
348
+ imageId: string;
349
+ /** Path param: Account identifier tag. */
350
+ accountId: string;
351
+ /** Body param: Can set the creator field with an internal user ID. */
352
+ creator?: string;
353
+ /** Body param: User modifiable key-value store. Can be used for keeping references to another system of record for managing images. No change if not specified. */
354
+ metadata?: unknown;
355
+ /** Body param: Indicates whether the image can be accessed using only its UID. If set to `true`, a signed token needs to be generated with a signing key to view the image. Returns a new UID on a change. */
356
+ requireSignedURLs?: boolean;
357
+ }
358
+
359
+ export const PatchV1Request = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
360
+ imageId: Schema.String.pipe(T.HttpPath("imageId")),
361
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
362
+ creator: Schema.optional(Schema.String),
363
+ metadata: Schema.optional(Schema.Unknown),
364
+ requireSignedURLs: Schema.optional(Schema.Boolean),
365
+ }).pipe(
366
+ T.Http({
367
+ method: "PATCH",
368
+ path: "/accounts/{account_id}/images/v1/{imageId}",
369
+ }),
370
+ ) as unknown as Schema.Schema<PatchV1Request>;
371
+
372
+ export interface PatchV1Response {
373
+ /** Image unique identifier. */
374
+ id?: string | null;
375
+ /** Can set the creator field with an internal user ID. */
376
+ creator?: string | null;
377
+ /** Image file name. */
378
+ filename?: string | null;
379
+ /** User modifiable key-value store. Can be used for keeping references to another system of record for managing images. Metadata must not exceed 1024 bytes. */
380
+ meta?: unknown | null;
381
+ /** Indicates whether the image can be a accessed only using it's UID. If set to true, a signed token needs to be generated with a signing key to view the image. */
382
+ requireSignedURLs?: boolean | null;
383
+ /** When the media item was uploaded. */
384
+ uploaded?: string | null;
385
+ /** Object specifying available variants for an image. */
386
+ variants?: string[] | null;
387
+ }
388
+
389
+ export const PatchV1Response = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
390
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
391
+ creator: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
392
+ filename: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
393
+ meta: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
394
+ requireSignedURLs: Schema.optional(
395
+ Schema.Union([Schema.Boolean, Schema.Null]),
396
+ ),
397
+ uploaded: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
398
+ variants: Schema.optional(
399
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
400
+ ),
401
+ }).pipe(T.ResponsePath("result")) as unknown as Schema.Schema<PatchV1Response>;
402
+
403
+ export type PatchV1Error =
404
+ | DefaultErrors
405
+ | ImagesAccessNotEnabled
406
+ | ImageNotFound;
407
+
408
+ export const patchV1: API.OperationMethod<
409
+ PatchV1Request,
410
+ PatchV1Response,
411
+ PatchV1Error,
412
+ Credentials | HttpClient.HttpClient
413
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
414
+ input: PatchV1Request,
415
+ output: PatchV1Response,
416
+ errors: [ImagesAccessNotEnabled, ImageNotFound],
417
+ }));
418
+
419
+ export interface DeleteV1Request {
420
+ imageId: string;
421
+ /** Account identifier tag. */
422
+ accountId: string;
423
+ }
424
+
425
+ export const DeleteV1Request = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
426
+ imageId: Schema.String.pipe(T.HttpPath("imageId")),
427
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
428
+ }).pipe(
429
+ T.Http({
430
+ method: "DELETE",
431
+ path: "/accounts/{account_id}/images/v1/{imageId}",
432
+ }),
433
+ ) as unknown as Schema.Schema<DeleteV1Request>;
434
+
435
+ export type DeleteV1Response = string;
436
+
437
+ export const DeleteV1Response = /*@__PURE__*/ /*#__PURE__*/ Schema.String.pipe(
438
+ T.ResponsePath("result"),
439
+ ) as unknown as Schema.Schema<DeleteV1Response>;
440
+
441
+ export type DeleteV1Error =
442
+ | DefaultErrors
443
+ | ImagesAccessNotEnabled
444
+ | ImageNotFound;
445
+
446
+ export const deleteV1: API.OperationMethod<
447
+ DeleteV1Request,
448
+ DeleteV1Response,
449
+ DeleteV1Error,
450
+ Credentials | HttpClient.HttpClient
451
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
452
+ input: DeleteV1Request,
453
+ output: DeleteV1Response,
454
+ errors: [ImagesAccessNotEnabled, ImageNotFound],
455
+ }));
456
+
457
+ // =============================================================================
458
+ // V1Blob
459
+ // =============================================================================
460
+
461
+ export interface GetV1BlobRequest {
462
+ imageId: string;
463
+ /** Account identifier tag. */
464
+ accountId: string;
465
+ }
466
+
467
+ export const GetV1BlobRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
468
+ imageId: Schema.String.pipe(T.HttpPath("imageId")),
469
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
470
+ }).pipe(
471
+ T.Http({
472
+ method: "GET",
473
+ path: "/accounts/{account_id}/images/v1/{imageId}/blob",
474
+ }),
475
+ ) as unknown as Schema.Schema<GetV1BlobRequest>;
476
+
477
+ export type GetV1BlobResponse = unknown;
478
+
479
+ export const GetV1BlobResponse =
480
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<GetV1BlobResponse>;
481
+
482
+ export type GetV1BlobError =
483
+ | DefaultErrors
484
+ | ImagesAccessNotEnabled
485
+ | ImageNotFound;
486
+
487
+ export const getV1Blob: API.OperationMethod<
488
+ GetV1BlobRequest,
489
+ GetV1BlobResponse,
490
+ GetV1BlobError,
491
+ Credentials | HttpClient.HttpClient
492
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
493
+ input: GetV1BlobRequest,
494
+ output: GetV1BlobResponse,
495
+ errors: [ImagesAccessNotEnabled, ImageNotFound],
496
+ }));
497
+
498
+ // =============================================================================
499
+ // V1Key
500
+ // =============================================================================
501
+
502
+ export interface ListV1KeysRequest {
503
+ /** Account identifier tag. */
504
+ accountId: string;
505
+ }
506
+
507
+ export const ListV1KeysRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
508
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
509
+ }).pipe(
510
+ T.Http({ method: "GET", path: "/accounts/{account_id}/images/v1/keys" }),
511
+ ) as unknown as Schema.Schema<ListV1KeysRequest>;
512
+
513
+ export interface ListV1KeysResponse {
514
+ keys?: { name?: string | null; value?: string | null }[] | null;
515
+ }
516
+
517
+ export const ListV1KeysResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
518
+ keys: Schema.optional(
519
+ Schema.Union([
520
+ Schema.Array(
521
+ Schema.Struct({
522
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
523
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
524
+ }),
525
+ ),
526
+ Schema.Null,
527
+ ]),
528
+ ),
529
+ }).pipe(
530
+ T.ResponsePath("result"),
531
+ ) as unknown as Schema.Schema<ListV1KeysResponse>;
532
+
533
+ export type ListV1KeysError = DefaultErrors | ImagesAccessNotEnabled;
534
+
535
+ export const listV1Keys: API.OperationMethod<
536
+ ListV1KeysRequest,
537
+ ListV1KeysResponse,
538
+ ListV1KeysError,
539
+ Credentials | HttpClient.HttpClient
540
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
541
+ input: ListV1KeysRequest,
542
+ output: ListV1KeysResponse,
543
+ errors: [ImagesAccessNotEnabled],
544
+ }));
545
+
546
+ export interface PutV1KeyRequest {
547
+ signingKeyName: string;
548
+ /** Account identifier tag. */
549
+ accountId: string;
550
+ }
551
+
552
+ export const PutV1KeyRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
553
+ signingKeyName: Schema.String.pipe(T.HttpPath("signingKeyName")),
554
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
555
+ }).pipe(
556
+ T.Http({
557
+ method: "PUT",
558
+ path: "/accounts/{account_id}/images/v1/keys/{signingKeyName}",
559
+ }),
560
+ ) as unknown as Schema.Schema<PutV1KeyRequest>;
561
+
562
+ export interface PutV1KeyResponse {
563
+ keys?: { name?: string | null; value?: string | null }[] | null;
564
+ }
565
+
566
+ export const PutV1KeyResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
567
+ keys: Schema.optional(
568
+ Schema.Union([
569
+ Schema.Array(
570
+ Schema.Struct({
571
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
572
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
573
+ }),
574
+ ),
575
+ Schema.Null,
576
+ ]),
577
+ ),
578
+ }).pipe(T.ResponsePath("result")) as unknown as Schema.Schema<PutV1KeyResponse>;
579
+
580
+ export type PutV1KeyError = DefaultErrors | ImagesAccessNotEnabled;
581
+
582
+ export const putV1Key: API.OperationMethod<
583
+ PutV1KeyRequest,
584
+ PutV1KeyResponse,
585
+ PutV1KeyError,
586
+ Credentials | HttpClient.HttpClient
587
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
588
+ input: PutV1KeyRequest,
589
+ output: PutV1KeyResponse,
590
+ errors: [ImagesAccessNotEnabled],
591
+ }));
592
+
593
+ export interface DeleteV1KeyRequest {
594
+ signingKeyName: string;
595
+ /** Account identifier tag. */
596
+ accountId: string;
597
+ }
598
+
599
+ export const DeleteV1KeyRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
600
+ signingKeyName: Schema.String.pipe(T.HttpPath("signingKeyName")),
601
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
602
+ }).pipe(
603
+ T.Http({
604
+ method: "DELETE",
605
+ path: "/accounts/{account_id}/images/v1/keys/{signingKeyName}",
606
+ }),
607
+ ) as unknown as Schema.Schema<DeleteV1KeyRequest>;
608
+
609
+ export interface DeleteV1KeyResponse {
610
+ keys?: { name?: string | null; value?: string | null }[] | null;
611
+ }
612
+
613
+ export const DeleteV1KeyResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
614
+ keys: Schema.optional(
615
+ Schema.Union([
616
+ Schema.Array(
617
+ Schema.Struct({
618
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
619
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
620
+ }),
621
+ ),
622
+ Schema.Null,
623
+ ]),
624
+ ),
625
+ }).pipe(
626
+ T.ResponsePath("result"),
627
+ ) as unknown as Schema.Schema<DeleteV1KeyResponse>;
628
+
629
+ export type DeleteV1KeyError =
630
+ | DefaultErrors
631
+ | ImagesAccessNotEnabled
632
+ | KeyNotFound;
633
+
634
+ export const deleteV1Key: API.OperationMethod<
635
+ DeleteV1KeyRequest,
636
+ DeleteV1KeyResponse,
637
+ DeleteV1KeyError,
638
+ Credentials | HttpClient.HttpClient
639
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
640
+ input: DeleteV1KeyRequest,
641
+ output: DeleteV1KeyResponse,
642
+ errors: [ImagesAccessNotEnabled, KeyNotFound],
643
+ }));
644
+
645
+ // =============================================================================
646
+ // V1Stat
647
+ // =============================================================================
648
+
649
+ export interface GetV1StatRequest {
650
+ /** Account identifier tag. */
651
+ accountId: string;
652
+ }
653
+
654
+ export const GetV1StatRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
655
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
656
+ }).pipe(
657
+ T.Http({ method: "GET", path: "/accounts/{account_id}/images/v1/stats" }),
658
+ ) as unknown as Schema.Schema<GetV1StatRequest>;
659
+
660
+ export interface GetV1StatResponse {
661
+ count?: { allowed?: number | null; current?: number | null } | null;
662
+ }
663
+
664
+ export const GetV1StatResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
665
+ count: Schema.optional(
666
+ Schema.Union([
667
+ Schema.Struct({
668
+ allowed: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
669
+ current: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
670
+ }),
671
+ Schema.Null,
672
+ ]),
673
+ ),
674
+ }).pipe(
675
+ T.ResponsePath("result"),
676
+ ) as unknown as Schema.Schema<GetV1StatResponse>;
677
+
678
+ export type GetV1StatError = DefaultErrors | ImagesAccessNotEnabled;
679
+
680
+ export const getV1Stat: API.OperationMethod<
681
+ GetV1StatRequest,
682
+ GetV1StatResponse,
683
+ GetV1StatError,
684
+ Credentials | HttpClient.HttpClient
685
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
686
+ input: GetV1StatRequest,
687
+ output: GetV1StatResponse,
688
+ errors: [ImagesAccessNotEnabled],
689
+ }));
690
+
691
+ // =============================================================================
692
+ // V1Variant
693
+ // =============================================================================
694
+
695
+ export interface GetV1VariantRequest {
696
+ variantId: string;
697
+ /** Account identifier tag. */
698
+ accountId: string;
699
+ }
700
+
701
+ export const GetV1VariantRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
702
+ variantId: Schema.String.pipe(T.HttpPath("variantId")),
703
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
704
+ }).pipe(
705
+ T.Http({
706
+ method: "GET",
707
+ path: "/accounts/{account_id}/images/v1/variants/{variantId}",
708
+ }),
709
+ ) as unknown as Schema.Schema<GetV1VariantRequest>;
710
+
711
+ export interface GetV1VariantResponse {
712
+ variant?: {
713
+ id: string;
714
+ options: {
715
+ fit: "scale-down" | "contain" | "cover" | "crop" | "pad";
716
+ height: number;
717
+ metadata: "keep" | "copyright" | "none";
718
+ width: number;
719
+ };
720
+ neverRequireSignedURLs?: boolean | null;
721
+ } | null;
722
+ }
723
+
724
+ export const GetV1VariantResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
725
+ variant: Schema.optional(
726
+ Schema.Union([
727
+ Schema.Struct({
728
+ id: Schema.String,
729
+ options: Schema.Struct({
730
+ fit: Schema.Literals([
731
+ "scale-down",
732
+ "contain",
733
+ "cover",
734
+ "crop",
735
+ "pad",
736
+ ]),
737
+ height: Schema.Number,
738
+ metadata: Schema.Literals(["keep", "copyright", "none"]),
739
+ width: Schema.Number,
740
+ }),
741
+ neverRequireSignedURLs: Schema.optional(
742
+ Schema.Union([Schema.Boolean, Schema.Null]),
743
+ ),
744
+ }),
745
+ Schema.Null,
746
+ ]),
747
+ ),
748
+ }).pipe(
749
+ T.ResponsePath("result"),
750
+ ) as unknown as Schema.Schema<GetV1VariantResponse>;
751
+
752
+ export type GetV1VariantError =
753
+ | DefaultErrors
754
+ | ImagesAccessNotEnabled
755
+ | VariantNameNotAllowed
756
+ | VariantNotFound;
757
+
758
+ export const getV1Variant: API.OperationMethod<
759
+ GetV1VariantRequest,
760
+ GetV1VariantResponse,
761
+ GetV1VariantError,
762
+ Credentials | HttpClient.HttpClient
763
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
764
+ input: GetV1VariantRequest,
765
+ output: GetV1VariantResponse,
766
+ errors: [ImagesAccessNotEnabled, VariantNameNotAllowed, VariantNotFound],
767
+ }));
768
+
769
+ export interface ListV1VariantsRequest {
770
+ /** Account identifier tag. */
771
+ accountId: string;
772
+ }
773
+
774
+ export const ListV1VariantsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
775
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
776
+ }).pipe(
777
+ T.Http({ method: "GET", path: "/accounts/{account_id}/images/v1/variants" }),
778
+ ) as unknown as Schema.Schema<ListV1VariantsRequest>;
779
+
780
+ export interface ListV1VariantsResponse {
781
+ id: string;
782
+ /** Allows you to define image resizing sizes for different use cases. */
783
+ options: {
784
+ fit: "scale-down" | "contain" | "cover" | "crop" | "pad";
785
+ height: number;
786
+ metadata: "keep" | "copyright" | "none";
787
+ width: number;
788
+ };
789
+ /** Indicates whether the variant can access an image without a signature, regardless of image access control. */
790
+ neverRequireSignedURLs?: boolean | null;
791
+ }
792
+
793
+ export const ListV1VariantsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
794
+ {
795
+ id: Schema.String,
796
+ options: Schema.Struct({
797
+ fit: Schema.Literals(["scale-down", "contain", "cover", "crop", "pad"]),
798
+ height: Schema.Number,
799
+ metadata: Schema.Literals(["keep", "copyright", "none"]),
800
+ width: Schema.Number,
801
+ }),
802
+ neverRequireSignedURLs: Schema.optional(
803
+ Schema.Union([Schema.Boolean, Schema.Null]),
804
+ ),
805
+ },
806
+ ).pipe(
807
+ T.ResponsePath("result"),
808
+ ) as unknown as Schema.Schema<ListV1VariantsResponse>;
809
+
810
+ export type ListV1VariantsError = DefaultErrors | ImagesAccessNotEnabled;
811
+
812
+ export const listV1Variants: API.OperationMethod<
813
+ ListV1VariantsRequest,
814
+ ListV1VariantsResponse,
815
+ ListV1VariantsError,
816
+ Credentials | HttpClient.HttpClient
817
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
818
+ input: ListV1VariantsRequest,
819
+ output: ListV1VariantsResponse,
820
+ errors: [ImagesAccessNotEnabled],
821
+ }));
822
+
823
+ export interface CreateV1VariantRequest {
824
+ /** Path param: Account identifier tag. */
825
+ accountId: string;
826
+ /** Body param: */
827
+ id: string;
828
+ /** Body param: Allows you to define image resizing sizes for different use cases. */
829
+ options: {
830
+ fit: "scale-down" | "contain" | "cover" | "crop" | "pad";
831
+ height: number;
832
+ metadata: "keep" | "copyright" | "none";
833
+ width: number;
834
+ };
835
+ /** Body param: Indicates whether the variant can access an image without a signature, regardless of image access control. */
836
+ neverRequireSignedURLs?: boolean;
837
+ }
838
+
839
+ export const CreateV1VariantRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
840
+ {
841
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
842
+ id: Schema.String,
843
+ options: Schema.Struct({
844
+ fit: Schema.Literals(["scale-down", "contain", "cover", "crop", "pad"]),
845
+ height: Schema.Number,
846
+ metadata: Schema.Literals(["keep", "copyright", "none"]),
847
+ width: Schema.Number,
848
+ }),
849
+ neverRequireSignedURLs: Schema.optional(Schema.Boolean),
850
+ },
851
+ ).pipe(
852
+ T.Http({ method: "POST", path: "/accounts/{account_id}/images/v1/variants" }),
853
+ ) as unknown as Schema.Schema<CreateV1VariantRequest>;
854
+
855
+ export interface CreateV1VariantResponse {
856
+ variant?: {
857
+ id: string;
858
+ options: {
859
+ fit: "scale-down" | "contain" | "cover" | "crop" | "pad";
860
+ height: number;
861
+ metadata: "keep" | "copyright" | "none";
862
+ width: number;
863
+ };
864
+ neverRequireSignedURLs?: boolean | null;
865
+ } | null;
866
+ }
867
+
868
+ export const CreateV1VariantResponse =
869
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
870
+ variant: Schema.optional(
871
+ Schema.Union([
872
+ Schema.Struct({
873
+ id: Schema.String,
874
+ options: Schema.Struct({
875
+ fit: Schema.Literals([
876
+ "scale-down",
877
+ "contain",
878
+ "cover",
879
+ "crop",
880
+ "pad",
881
+ ]),
882
+ height: Schema.Number,
883
+ metadata: Schema.Literals(["keep", "copyright", "none"]),
884
+ width: Schema.Number,
885
+ }),
886
+ neverRequireSignedURLs: Schema.optional(
887
+ Schema.Union([Schema.Boolean, Schema.Null]),
888
+ ),
889
+ }),
890
+ Schema.Null,
891
+ ]),
892
+ ),
893
+ }).pipe(
894
+ T.ResponsePath("result"),
895
+ ) as unknown as Schema.Schema<CreateV1VariantResponse>;
896
+
897
+ export type CreateV1VariantError =
898
+ | DefaultErrors
899
+ | ImagesAccessNotEnabled
900
+ | VariantNameNotAllowed;
901
+
902
+ export const createV1Variant: API.OperationMethod<
903
+ CreateV1VariantRequest,
904
+ CreateV1VariantResponse,
905
+ CreateV1VariantError,
906
+ Credentials | HttpClient.HttpClient
907
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
908
+ input: CreateV1VariantRequest,
909
+ output: CreateV1VariantResponse,
910
+ errors: [ImagesAccessNotEnabled, VariantNameNotAllowed],
911
+ }));
912
+
913
+ export interface PatchV1VariantRequest {
914
+ variantId: string;
915
+ /** Path param: Account identifier tag. */
916
+ accountId: string;
917
+ /** Body param: Allows you to define image resizing sizes for different use cases. */
918
+ options: {
919
+ fit: "scale-down" | "contain" | "cover" | "crop" | "pad";
920
+ height: number;
921
+ metadata: "keep" | "copyright" | "none";
922
+ width: number;
923
+ };
924
+ /** Body param: Indicates whether the variant can access an image without a signature, regardless of image access control. */
925
+ neverRequireSignedURLs?: boolean;
926
+ }
927
+
928
+ export const PatchV1VariantRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
929
+ variantId: Schema.String.pipe(T.HttpPath("variantId")),
930
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
931
+ options: Schema.Struct({
932
+ fit: Schema.Literals(["scale-down", "contain", "cover", "crop", "pad"]),
933
+ height: Schema.Number,
934
+ metadata: Schema.Literals(["keep", "copyright", "none"]),
935
+ width: Schema.Number,
936
+ }),
937
+ neverRequireSignedURLs: Schema.optional(Schema.Boolean),
938
+ }).pipe(
939
+ T.Http({
940
+ method: "PATCH",
941
+ path: "/accounts/{account_id}/images/v1/variants/{variantId}",
942
+ }),
943
+ ) as unknown as Schema.Schema<PatchV1VariantRequest>;
944
+
945
+ export interface PatchV1VariantResponse {
946
+ variant?: {
947
+ id: string;
948
+ options: {
949
+ fit: "scale-down" | "contain" | "cover" | "crop" | "pad";
950
+ height: number;
951
+ metadata: "keep" | "copyright" | "none";
952
+ width: number;
953
+ };
954
+ neverRequireSignedURLs?: boolean | null;
955
+ } | null;
956
+ }
957
+
958
+ export const PatchV1VariantResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
959
+ {
960
+ variant: Schema.optional(
961
+ Schema.Union([
962
+ Schema.Struct({
963
+ id: Schema.String,
964
+ options: Schema.Struct({
965
+ fit: Schema.Literals([
966
+ "scale-down",
967
+ "contain",
968
+ "cover",
969
+ "crop",
970
+ "pad",
971
+ ]),
972
+ height: Schema.Number,
973
+ metadata: Schema.Literals(["keep", "copyright", "none"]),
974
+ width: Schema.Number,
975
+ }),
976
+ neverRequireSignedURLs: Schema.optional(
977
+ Schema.Union([Schema.Boolean, Schema.Null]),
978
+ ),
979
+ }),
980
+ Schema.Null,
981
+ ]),
982
+ ),
983
+ },
984
+ ).pipe(
985
+ T.ResponsePath("result"),
986
+ ) as unknown as Schema.Schema<PatchV1VariantResponse>;
987
+
988
+ export type PatchV1VariantError =
989
+ | DefaultErrors
990
+ | ImagesAccessNotEnabled
991
+ | VariantNameNotAllowed
992
+ | VariantNotFound;
993
+
994
+ export const patchV1Variant: API.OperationMethod<
995
+ PatchV1VariantRequest,
996
+ PatchV1VariantResponse,
997
+ PatchV1VariantError,
998
+ Credentials | HttpClient.HttpClient
999
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1000
+ input: PatchV1VariantRequest,
1001
+ output: PatchV1VariantResponse,
1002
+ errors: [ImagesAccessNotEnabled, VariantNameNotAllowed, VariantNotFound],
1003
+ }));
1004
+
1005
+ export interface DeleteV1VariantRequest {
1006
+ variantId: string;
1007
+ /** Account identifier tag. */
1008
+ accountId: string;
1009
+ }
1010
+
1011
+ export const DeleteV1VariantRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
1012
+ {
1013
+ variantId: Schema.String.pipe(T.HttpPath("variantId")),
1014
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1015
+ },
1016
+ ).pipe(
1017
+ T.Http({
1018
+ method: "DELETE",
1019
+ path: "/accounts/{account_id}/images/v1/variants/{variantId}",
1020
+ }),
1021
+ ) as unknown as Schema.Schema<DeleteV1VariantRequest>;
1022
+
1023
+ export type DeleteV1VariantResponse = string;
1024
+
1025
+ export const DeleteV1VariantResponse =
1026
+ /*@__PURE__*/ /*#__PURE__*/ Schema.String.pipe(
1027
+ T.ResponsePath("result"),
1028
+ ) as unknown as Schema.Schema<DeleteV1VariantResponse>;
1029
+
1030
+ export type DeleteV1VariantError =
1031
+ | DefaultErrors
1032
+ | ImagesAccessNotEnabled
1033
+ | VariantNameNotAllowed
1034
+ | VariantNotFound;
1035
+
1036
+ export const deleteV1Variant: API.OperationMethod<
1037
+ DeleteV1VariantRequest,
1038
+ DeleteV1VariantResponse,
1039
+ DeleteV1VariantError,
1040
+ Credentials | HttpClient.HttpClient
1041
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1042
+ input: DeleteV1VariantRequest,
1043
+ output: DeleteV1VariantResponse,
1044
+ errors: [ImagesAccessNotEnabled, VariantNameNotAllowed, VariantNotFound],
1045
+ }));
1046
+
1047
+ // =============================================================================
1048
+ // V2
1049
+ // =============================================================================
1050
+
1051
+ export interface ListV2sRequest {
1052
+ /** Path param: Account identifier tag. */
1053
+ accountId: string;
1054
+ /** Query param: Continuation token for a next page. List images V2 returns continuation_token */
1055
+ continuationToken?: string | null;
1056
+ /** Query param: Internal user ID set within the creator field. Setting to empty string "" will return images where creator field is not set */
1057
+ creator?: string | null;
1058
+ /** Query param: Number of items per page. */
1059
+ perPage?: number;
1060
+ /** Query param: Sorting order by upload time. */
1061
+ sortOrder?: "asc" | "desc";
1062
+ }
1063
+
1064
+ export const ListV2sRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1065
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1066
+ continuationToken: Schema.optional(
1067
+ Schema.Union([Schema.String, Schema.Null]),
1068
+ ).pipe(T.HttpQuery("continuation_token")),
1069
+ creator: Schema.optional(Schema.Union([Schema.String, Schema.Null])).pipe(
1070
+ T.HttpQuery("creator"),
1071
+ ),
1072
+ perPage: Schema.optional(Schema.Number).pipe(T.HttpQuery("per_page")),
1073
+ sortOrder: Schema.optional(Schema.Literals(["asc", "desc"])).pipe(
1074
+ T.HttpQuery("sort_order"),
1075
+ ),
1076
+ }).pipe(
1077
+ T.Http({ method: "GET", path: "/accounts/{account_id}/images/v2" }),
1078
+ ) as unknown as Schema.Schema<ListV2sRequest>;
1079
+
1080
+ export interface ListV2sResponse {
1081
+ /** Continuation token to fetch next page. Passed as a query param when requesting List V2 api endpoint. */
1082
+ continuationToken?: string | null;
1083
+ images?: unknown[] | null;
1084
+ }
1085
+
1086
+ export const ListV2sResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1087
+ continuationToken: Schema.optional(
1088
+ Schema.Union([Schema.String, Schema.Null]),
1089
+ ),
1090
+ images: Schema.optional(
1091
+ Schema.Union([Schema.Array(Schema.Unknown), Schema.Null]),
1092
+ ),
1093
+ })
1094
+ .pipe(
1095
+ Schema.encodeKeys({
1096
+ continuationToken: "continuation_token",
1097
+ images: "images",
1098
+ }),
1099
+ )
1100
+ .pipe(T.ResponsePath("result")) as unknown as Schema.Schema<ListV2sResponse>;
1101
+
1102
+ export type ListV2sError = DefaultErrors | ImagesAccessNotEnabled;
1103
+
1104
+ export const listV2s: API.OperationMethod<
1105
+ ListV2sRequest,
1106
+ ListV2sResponse,
1107
+ ListV2sError,
1108
+ Credentials | HttpClient.HttpClient
1109
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1110
+ input: ListV2sRequest,
1111
+ output: ListV2sResponse,
1112
+ errors: [ImagesAccessNotEnabled],
1113
+ }));
1114
+
1115
+ // =============================================================================
1116
+ // V2DirectUpload
1117
+ // =============================================================================
1118
+
1119
+ export interface CreateV2DirectUploadRequest {
1120
+ /** Path param: Account identifier tag. */
1121
+ accountId: string;
1122
+ /** Body param: Optional Image Custom ID. Up to 1024 chars. Can include any number of subpaths, and utf8 characters. Cannot start nor end with a / (forward slash). Cannot be a UUID. */
1123
+ id?: string;
1124
+ /** Body param: Can set the creator field with an internal user ID. */
1125
+ creator?: string;
1126
+ /** Body param: The date after which the upload will not be accepted. Minimum: Now + 2 minutes. Maximum: Now + 6 hours. */
1127
+ expiry?: string;
1128
+ /** Body param: User modifiable key-value store. Can be used for keeping references to another system of record, for managing images. */
1129
+ metadata?: unknown;
1130
+ /** Body param: Indicates whether the image requires a signature token to be accessed. */
1131
+ requireSignedURLs?: boolean;
1132
+ }
1133
+
1134
+ export const CreateV2DirectUploadRequest =
1135
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1136
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1137
+ id: Schema.optional(Schema.String),
1138
+ creator: Schema.optional(Schema.String),
1139
+ expiry: Schema.optional(Schema.String),
1140
+ metadata: Schema.optional(Schema.Unknown),
1141
+ requireSignedURLs: Schema.optional(Schema.Boolean),
1142
+ }).pipe(
1143
+ T.Http({
1144
+ method: "POST",
1145
+ path: "/accounts/{account_id}/images/v2/direct_upload",
1146
+ contentType: "multipart",
1147
+ }),
1148
+ ) as unknown as Schema.Schema<CreateV2DirectUploadRequest>;
1149
+
1150
+ export interface CreateV2DirectUploadResponse {
1151
+ /** Image unique identifier. */
1152
+ id?: string | null;
1153
+ /** The URL the unauthenticated upload can be performed to using a single HTTP POST (multipart/form-data) request. */
1154
+ uploadURL?: string | null;
1155
+ }
1156
+
1157
+ export const CreateV2DirectUploadResponse =
1158
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1159
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1160
+ uploadURL: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1161
+ }).pipe(
1162
+ T.ResponsePath("result"),
1163
+ ) as unknown as Schema.Schema<CreateV2DirectUploadResponse>;
1164
+
1165
+ export type CreateV2DirectUploadError =
1166
+ | DefaultErrors
1167
+ | ImagesAccessNotEnabled
1168
+ | ImageAlreadyExists
1169
+ | InvalidUploadFormat;
1170
+
1171
+ export const createV2DirectUpload: API.OperationMethod<
1172
+ CreateV2DirectUploadRequest,
1173
+ CreateV2DirectUploadResponse,
1174
+ CreateV2DirectUploadError,
1175
+ Credentials | HttpClient.HttpClient
1176
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1177
+ input: CreateV2DirectUploadRequest,
1178
+ output: CreateV2DirectUploadResponse,
1179
+ errors: [ImagesAccessNotEnabled, ImageAlreadyExists, InvalidUploadFormat],
1180
+ }));