@distilled.cloud/cloudflare 0.25.2 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (387) hide show
  1. package/lib/services/abuse-reports.d.ts.map +1 -1
  2. package/lib/services/abuse-reports.js +12 -6
  3. package/lib/services/abuse-reports.js.map +1 -1
  4. package/lib/services/accounts.d.ts.map +1 -1
  5. package/lib/services/accounts.js +53 -50
  6. package/lib/services/accounts.js.map +1 -1
  7. package/lib/services/acm.d.ts.map +1 -1
  8. package/lib/services/acm.js +15 -12
  9. package/lib/services/acm.js.map +1 -1
  10. package/lib/services/addressing.d.ts.map +1 -1
  11. package/lib/services/addressing.js +74 -65
  12. package/lib/services/addressing.js.map +1 -1
  13. package/lib/services/ai-gateway.d.ts.map +1 -1
  14. package/lib/services/ai-gateway.js +36 -38
  15. package/lib/services/ai-gateway.js.map +1 -1
  16. package/lib/services/ai-security.d.ts.map +1 -1
  17. package/lib/services/ai-security.js +12 -10
  18. package/lib/services/ai-security.js.map +1 -1
  19. package/lib/services/ai.d.ts.map +1 -1
  20. package/lib/services/ai.js +16 -8
  21. package/lib/services/ai.js.map +1 -1
  22. package/lib/services/aisearch.d.ts +46 -34
  23. package/lib/services/aisearch.d.ts.map +1 -1
  24. package/lib/services/aisearch.js +131 -318
  25. package/lib/services/aisearch.js.map +1 -1
  26. package/lib/services/alerting.d.ts.map +1 -1
  27. package/lib/services/alerting.js +44 -34
  28. package/lib/services/alerting.js.map +1 -1
  29. package/lib/services/api-gateway.d.ts.map +1 -1
  30. package/lib/services/api-gateway.js +31 -19
  31. package/lib/services/api-gateway.js.map +1 -1
  32. package/lib/services/argo.d.ts.map +1 -1
  33. package/lib/services/argo.js +13 -10
  34. package/lib/services/argo.js.map +1 -1
  35. package/lib/services/bot-management.d.ts.map +1 -1
  36. package/lib/services/bot-management.js +4 -2
  37. package/lib/services/bot-management.js.map +1 -1
  38. package/lib/services/cache.d.ts.map +1 -1
  39. package/lib/services/cache.js +12 -12
  40. package/lib/services/cache.js.map +1 -1
  41. package/lib/services/calls.d.ts.map +1 -1
  42. package/lib/services/calls.js +12 -6
  43. package/lib/services/calls.js.map +1 -1
  44. package/lib/services/certificate-authorities.d.ts.map +1 -1
  45. package/lib/services/certificate-authorities.js +4 -2
  46. package/lib/services/certificate-authorities.js.map +1 -1
  47. package/lib/services/client-certificates.d.ts.map +1 -1
  48. package/lib/services/client-certificates.js +8 -10
  49. package/lib/services/client-certificates.js.map +1 -1
  50. package/lib/services/cloud-connector.d.ts.map +1 -1
  51. package/lib/services/cloud-connector.js +5 -6
  52. package/lib/services/cloud-connector.js.map +1 -1
  53. package/lib/services/cloudforce-one.d.ts.map +1 -1
  54. package/lib/services/cloudforce-one.js +4 -2
  55. package/lib/services/cloudforce-one.js.map +1 -1
  56. package/lib/services/connectivity.d.ts.map +1 -1
  57. package/lib/services/connectivity.js +13 -12
  58. package/lib/services/connectivity.js.map +1 -1
  59. package/lib/services/containers.d.ts.map +1 -1
  60. package/lib/services/containers.js +15 -15
  61. package/lib/services/containers.js.map +1 -1
  62. package/lib/services/content-scanning.d.ts.map +1 -1
  63. package/lib/services/content-scanning.js +6 -10
  64. package/lib/services/content-scanning.js.map +1 -1
  65. package/lib/services/custom-certificates.d.ts.map +1 -1
  66. package/lib/services/custom-certificates.js +15 -12
  67. package/lib/services/custom-certificates.js.map +1 -1
  68. package/lib/services/custom-hostnames.d.ts.map +1 -1
  69. package/lib/services/custom-hostnames.js +20 -10
  70. package/lib/services/custom-hostnames.js.map +1 -1
  71. package/lib/services/custom-nameservers.d.ts.map +1 -1
  72. package/lib/services/custom-nameservers.js +7 -12
  73. package/lib/services/custom-nameservers.js.map +1 -1
  74. package/lib/services/d1.d.ts.map +1 -1
  75. package/lib/services/d1.js +33 -18
  76. package/lib/services/d1.js.map +1 -1
  77. package/lib/services/ddos-protection.d.ts.map +1 -1
  78. package/lib/services/ddos-protection.js +13 -14
  79. package/lib/services/ddos-protection.js.map +1 -1
  80. package/lib/services/diagnostics.d.ts.map +1 -1
  81. package/lib/services/diagnostics.js +6 -6
  82. package/lib/services/diagnostics.js.map +1 -1
  83. package/lib/services/dns-firewall.d.ts.map +1 -1
  84. package/lib/services/dns-firewall.js +12 -6
  85. package/lib/services/dns-firewall.js.map +1 -1
  86. package/lib/services/dns.d.ts.map +1 -1
  87. package/lib/services/dns.js +34 -24
  88. package/lib/services/dns.js.map +1 -1
  89. package/lib/services/durable-objects.d.ts.map +1 -1
  90. package/lib/services/durable-objects.js +12 -6
  91. package/lib/services/durable-objects.js.map +1 -1
  92. package/lib/services/email-routing.d.ts.map +1 -1
  93. package/lib/services/email-routing.js +9 -6
  94. package/lib/services/email-routing.js.map +1 -1
  95. package/lib/services/email-security.d.ts.map +1 -1
  96. package/lib/services/email-security.js +21 -16
  97. package/lib/services/email-security.js.map +1 -1
  98. package/lib/services/email-sending.d.ts.map +1 -1
  99. package/lib/services/email-sending.js +6 -6
  100. package/lib/services/email-sending.js.map +1 -1
  101. package/lib/services/firewall.d.ts.map +1 -1
  102. package/lib/services/firewall.js +33 -24
  103. package/lib/services/firewall.js.map +1 -1
  104. package/lib/services/flagship.d.ts.map +1 -1
  105. package/lib/services/flagship.js +9 -12
  106. package/lib/services/flagship.js.map +1 -1
  107. package/lib/services/fraud.d.ts.map +1 -1
  108. package/lib/services/fraud.js +5 -4
  109. package/lib/services/fraud.js.map +1 -1
  110. package/lib/services/google-tag-gateway.d.ts.map +1 -1
  111. package/lib/services/google-tag-gateway.js +4 -2
  112. package/lib/services/google-tag-gateway.js.map +1 -1
  113. package/lib/services/healthchecks.d.ts.map +1 -1
  114. package/lib/services/healthchecks.js +9 -8
  115. package/lib/services/healthchecks.js.map +1 -1
  116. package/lib/services/hostnames.d.ts.map +1 -1
  117. package/lib/services/hostnames.js +6 -6
  118. package/lib/services/hostnames.js.map +1 -1
  119. package/lib/services/hyperdrive.d.ts.map +1 -1
  120. package/lib/services/hyperdrive.js +13 -15
  121. package/lib/services/hyperdrive.js.map +1 -1
  122. package/lib/services/iam.d.ts.map +1 -1
  123. package/lib/services/iam.js +21 -20
  124. package/lib/services/iam.js.map +1 -1
  125. package/lib/services/images.d.ts.map +1 -1
  126. package/lib/services/images.js +32 -19
  127. package/lib/services/images.js.map +1 -1
  128. package/lib/services/intel.d.ts.map +1 -1
  129. package/lib/services/intel.js +11 -10
  130. package/lib/services/intel.js.map +1 -1
  131. package/lib/services/keyless-certificates.d.ts.map +1 -1
  132. package/lib/services/keyless-certificates.js +9 -10
  133. package/lib/services/keyless-certificates.js.map +1 -1
  134. package/lib/services/kv.d.ts.map +1 -1
  135. package/lib/services/kv.js +32 -20
  136. package/lib/services/kv.js.map +1 -1
  137. package/lib/services/leaked-credential-checks.d.ts.map +1 -1
  138. package/lib/services/leaked-credential-checks.js +13 -8
  139. package/lib/services/leaked-credential-checks.js.map +1 -1
  140. package/lib/services/load-balancers.d.ts.map +1 -1
  141. package/lib/services/load-balancers.js +39 -38
  142. package/lib/services/load-balancers.js.map +1 -1
  143. package/lib/services/logpush.d.ts.map +1 -1
  144. package/lib/services/logpush.js +10 -10
  145. package/lib/services/logpush.js.map +1 -1
  146. package/lib/services/logs.d.ts.map +1 -1
  147. package/lib/services/logs.js +9 -8
  148. package/lib/services/logs.js.map +1 -1
  149. package/lib/services/magic-cloud-networking.d.ts.map +1 -1
  150. package/lib/services/magic-cloud-networking.js +17 -10
  151. package/lib/services/magic-cloud-networking.js.map +1 -1
  152. package/lib/services/magic-network-monitoring.d.ts.map +1 -1
  153. package/lib/services/magic-network-monitoring.js +30 -22
  154. package/lib/services/magic-network-monitoring.js.map +1 -1
  155. package/lib/services/magic-transit.d.ts.map +1 -1
  156. package/lib/services/magic-transit.js +41 -22
  157. package/lib/services/magic-transit.js.map +1 -1
  158. package/lib/services/managed-transforms.d.ts.map +1 -1
  159. package/lib/services/managed-transforms.js +4 -2
  160. package/lib/services/managed-transforms.js.map +1 -1
  161. package/lib/services/mtls-certificates.d.ts.map +1 -1
  162. package/lib/services/mtls-certificates.js +8 -12
  163. package/lib/services/mtls-certificates.js.map +1 -1
  164. package/lib/services/network-interconnects.d.ts.map +1 -1
  165. package/lib/services/network-interconnects.js +4 -2
  166. package/lib/services/network-interconnects.js.map +1 -1
  167. package/lib/services/organizations.d.ts.map +1 -1
  168. package/lib/services/organizations.js +8 -4
  169. package/lib/services/organizations.js.map +1 -1
  170. package/lib/services/origin-ca-certificates.d.ts.map +1 -1
  171. package/lib/services/origin-ca-certificates.js +14 -10
  172. package/lib/services/origin-ca-certificates.js.map +1 -1
  173. package/lib/services/origin-post-quantum-encryption.d.ts.map +1 -1
  174. package/lib/services/origin-post-quantum-encryption.js +12 -8
  175. package/lib/services/origin-post-quantum-encryption.js.map +1 -1
  176. package/lib/services/origin-tls-client-auth.d.ts.map +1 -1
  177. package/lib/services/origin-tls-client-auth.js +39 -52
  178. package/lib/services/origin-tls-client-auth.js.map +1 -1
  179. package/lib/services/page-rules.d.ts.map +1 -1
  180. package/lib/services/page-rules.js +8 -4
  181. package/lib/services/page-rules.js.map +1 -1
  182. package/lib/services/page-shield.d.ts.map +1 -1
  183. package/lib/services/page-shield.js +18 -14
  184. package/lib/services/page-shield.js.map +1 -1
  185. package/lib/services/pages.d.ts.map +1 -1
  186. package/lib/services/pages.js +22 -14
  187. package/lib/services/pages.js.map +1 -1
  188. package/lib/services/pipelines.d.ts.map +1 -1
  189. package/lib/services/pipelines.js +60 -38
  190. package/lib/services/pipelines.js.map +1 -1
  191. package/lib/services/queues.d.ts.map +1 -1
  192. package/lib/services/queues.js +62 -44
  193. package/lib/services/queues.js.map +1 -1
  194. package/lib/services/r2-data-catalog.d.ts.map +1 -1
  195. package/lib/services/r2-data-catalog.js +28 -14
  196. package/lib/services/r2-data-catalog.js.map +1 -1
  197. package/lib/services/r2.d.ts.map +1 -1
  198. package/lib/services/r2.js +47 -38
  199. package/lib/services/r2.js.map +1 -1
  200. package/lib/services/realtime-kit.d.ts.map +1 -1
  201. package/lib/services/realtime-kit.js +8 -10
  202. package/lib/services/realtime-kit.js.map +1 -1
  203. package/lib/services/registrar.d.ts.map +1 -1
  204. package/lib/services/registrar.js +8 -8
  205. package/lib/services/registrar.js.map +1 -1
  206. package/lib/services/resource-sharing.d.ts.map +1 -1
  207. package/lib/services/resource-sharing.js +16 -8
  208. package/lib/services/resource-sharing.js.map +1 -1
  209. package/lib/services/resource-tagging.d.ts.map +1 -1
  210. package/lib/services/resource-tagging.js +9 -6
  211. package/lib/services/resource-tagging.js.map +1 -1
  212. package/lib/services/rules.d.ts.map +1 -1
  213. package/lib/services/rules.js +12 -6
  214. package/lib/services/rules.js.map +1 -1
  215. package/lib/services/rulesets.d.ts.map +1 -1
  216. package/lib/services/rulesets.js +12 -9
  217. package/lib/services/rulesets.js.map +1 -1
  218. package/lib/services/rum.d.ts.map +1 -1
  219. package/lib/services/rum.js +20 -12
  220. package/lib/services/rum.js.map +1 -1
  221. package/lib/services/schema-validation.d.ts.map +1 -1
  222. package/lib/services/schema-validation.js +17 -10
  223. package/lib/services/schema-validation.js.map +1 -1
  224. package/lib/services/secrets-store.d.ts.map +1 -1
  225. package/lib/services/secrets-store.js +35 -37
  226. package/lib/services/secrets-store.js.map +1 -1
  227. package/lib/services/security-txt.d.ts.map +1 -1
  228. package/lib/services/security-txt.js +8 -6
  229. package/lib/services/security-txt.js.map +1 -1
  230. package/lib/services/snippets.d.ts.map +1 -1
  231. package/lib/services/snippets.js +19 -11
  232. package/lib/services/snippets.js.map +1 -1
  233. package/lib/services/spectrum.d.ts.map +1 -1
  234. package/lib/services/spectrum.js +9 -6
  235. package/lib/services/spectrum.js.map +1 -1
  236. package/lib/services/speed.d.ts.map +1 -1
  237. package/lib/services/speed.js +10 -15
  238. package/lib/services/speed.js.map +1 -1
  239. package/lib/services/ssl.d.ts.map +1 -1
  240. package/lib/services/ssl.js +6 -9
  241. package/lib/services/ssl.js.map +1 -1
  242. package/lib/services/stream.d.ts.map +1 -1
  243. package/lib/services/stream.js +28 -14
  244. package/lib/services/stream.js.map +1 -1
  245. package/lib/services/token-validation.d.ts.map +1 -1
  246. package/lib/services/token-validation.js +7 -8
  247. package/lib/services/token-validation.js.map +1 -1
  248. package/lib/services/turnstile.d.ts.map +1 -1
  249. package/lib/services/turnstile.js +8 -4
  250. package/lib/services/turnstile.js.map +1 -1
  251. package/lib/services/url-normalization.d.ts.map +1 -1
  252. package/lib/services/url-normalization.js +4 -2
  253. package/lib/services/url-normalization.js.map +1 -1
  254. package/lib/services/user.d.ts.map +1 -1
  255. package/lib/services/user.js +21 -16
  256. package/lib/services/user.js.map +1 -1
  257. package/lib/services/vectorize.d.ts.map +1 -1
  258. package/lib/services/vectorize.js +22 -21
  259. package/lib/services/vectorize.js.map +1 -1
  260. package/lib/services/vulnerability-scanner.d.ts.map +1 -1
  261. package/lib/services/vulnerability-scanner.js +17 -10
  262. package/lib/services/vulnerability-scanner.js.map +1 -1
  263. package/lib/services/waiting-rooms.d.ts.map +1 -1
  264. package/lib/services/waiting-rooms.js +12 -6
  265. package/lib/services/waiting-rooms.js.map +1 -1
  266. package/lib/services/web3.d.ts.map +1 -1
  267. package/lib/services/web3.js +10 -10
  268. package/lib/services/web3.js.map +1 -1
  269. package/lib/services/workers-for-platforms.d.ts.map +1 -1
  270. package/lib/services/workers-for-platforms.js +7 -8
  271. package/lib/services/workers-for-platforms.js.map +1 -1
  272. package/lib/services/workers.d.ts.map +1 -1
  273. package/lib/services/workers.js +83 -61
  274. package/lib/services/workers.js.map +1 -1
  275. package/lib/services/workflows.d.ts.map +1 -1
  276. package/lib/services/workflows.js +29 -16
  277. package/lib/services/workflows.js.map +1 -1
  278. package/lib/services/zaraz.d.ts.map +1 -1
  279. package/lib/services/zaraz.js +6 -5
  280. package/lib/services/zaraz.js.map +1 -1
  281. package/lib/services/zero-trust.d.ts.map +1 -1
  282. package/lib/services/zero-trust.js +116 -96
  283. package/lib/services/zero-trust.js.map +1 -1
  284. package/lib/services/zones.d.ts.map +1 -1
  285. package/lib/services/zones.js +40 -27
  286. package/lib/services/zones.js.map +1 -1
  287. package/lib/traits.d.ts +21 -5
  288. package/lib/traits.d.ts.map +1 -1
  289. package/lib/traits.js +20 -3
  290. package/lib/traits.js.map +1 -1
  291. package/package.json +2 -2
  292. package/src/services/abuse-reports.ts +18 -12
  293. package/src/services/accounts.ts +103 -85
  294. package/src/services/acm.ts +36 -24
  295. package/src/services/addressing.ts +131 -113
  296. package/src/services/ai-gateway.ts +72 -62
  297. package/src/services/ai-security.ts +18 -16
  298. package/src/services/ai.ts +24 -16
  299. package/src/services/aisearch.ts +240 -553
  300. package/src/services/alerting.ts +66 -56
  301. package/src/services/api-gateway.ts +55 -37
  302. package/src/services/argo.ts +24 -18
  303. package/src/services/bot-management.ts +6 -4
  304. package/src/services/cache.ts +28 -22
  305. package/src/services/calls.ts +18 -12
  306. package/src/services/certificate-authorities.ts +6 -4
  307. package/src/services/client-certificates.ts +22 -18
  308. package/src/services/cloud-connector.ts +12 -10
  309. package/src/services/cloudforce-one.ts +6 -4
  310. package/src/services/connectivity.ts +24 -20
  311. package/src/services/containers.ts +37 -28
  312. package/src/services/content-scanning.ts +18 -16
  313. package/src/services/custom-certificates.ts +27 -21
  314. package/src/services/custom-hostnames.ts +30 -20
  315. package/src/services/custom-nameservers.ts +24 -20
  316. package/src/services/d1.ts +54 -36
  317. package/src/services/ddos-protection.ts +42 -28
  318. package/src/services/diagnostics.ts +18 -12
  319. package/src/services/dns-firewall.ts +18 -12
  320. package/src/services/dns.ts +71 -49
  321. package/src/services/durable-objects.ts +18 -12
  322. package/src/services/email-routing.ts +18 -12
  323. package/src/services/email-security.ts +48 -34
  324. package/src/services/email-sending.ts +18 -12
  325. package/src/services/firewall.ts +62 -53
  326. package/src/services/flagship.ts +18 -18
  327. package/src/services/fraud.ts +12 -8
  328. package/src/services/google-tag-gateway.ts +6 -4
  329. package/src/services/healthchecks.ts +18 -14
  330. package/src/services/hostnames.ts +18 -12
  331. package/src/services/hyperdrive.ts +33 -26
  332. package/src/services/iam.ts +36 -32
  333. package/src/services/images.ts +48 -35
  334. package/src/services/intel.ts +23 -19
  335. package/src/services/keyless-certificates.ts +18 -16
  336. package/src/services/kv.ts +58 -40
  337. package/src/services/leaked-credential-checks.ts +24 -16
  338. package/src/services/load-balancers.ts +72 -62
  339. package/src/services/logpush.ts +20 -17
  340. package/src/services/logs.ts +18 -14
  341. package/src/services/magic-cloud-networking.ts +30 -20
  342. package/src/services/magic-network-monitoring.ts +48 -40
  343. package/src/services/magic-transit.ts +66 -44
  344. package/src/services/managed-transforms.ts +6 -4
  345. package/src/services/mtls-certificates.ts +21 -19
  346. package/src/services/network-interconnects.ts +6 -4
  347. package/src/services/organizations.ts +12 -8
  348. package/src/services/origin-ca-certificates.ts +30 -20
  349. package/src/services/origin-post-quantum-encryption.ts +18 -14
  350. package/src/services/origin-tls-client-auth.ts +96 -85
  351. package/src/services/page-rules.ts +12 -8
  352. package/src/services/page-shield.ts +32 -28
  353. package/src/services/pages.ts +42 -28
  354. package/src/services/pipelines.ts +90 -68
  355. package/src/services/queues.ts +112 -88
  356. package/src/services/r2-data-catalog.ts +42 -28
  357. package/src/services/r2.ts +98 -71
  358. package/src/services/realtime-kit.ts +30 -20
  359. package/src/services/registrar.ts +25 -19
  360. package/src/services/resource-sharing.ts +24 -16
  361. package/src/services/resource-tagging.ts +18 -12
  362. package/src/services/rules.ts +18 -12
  363. package/src/services/rulesets.ts +18 -15
  364. package/src/services/rum.ts +30 -22
  365. package/src/services/schema-validation.ts +30 -20
  366. package/src/services/secrets-store.ts +63 -59
  367. package/src/services/security-txt.ts +12 -10
  368. package/src/services/snippets.ts +32 -24
  369. package/src/services/spectrum.ts +18 -12
  370. package/src/services/speed.ts +25 -24
  371. package/src/services/ssl.ts +19 -16
  372. package/src/services/stream.ts +42 -28
  373. package/src/services/token-validation.ts +24 -16
  374. package/src/services/turnstile.ts +12 -8
  375. package/src/services/url-normalization.ts +6 -4
  376. package/src/services/user.ts +36 -28
  377. package/src/services/vectorize.ts +51 -38
  378. package/src/services/vulnerability-scanner.ts +30 -20
  379. package/src/services/waiting-rooms.ts +18 -12
  380. package/src/services/web3.ts +24 -18
  381. package/src/services/workers-for-platforms.ts +24 -16
  382. package/src/services/workers.ts +149 -112
  383. package/src/services/workflows.ts +48 -32
  384. package/src/services/zaraz.ts +13 -9
  385. package/src/services/zero-trust.ts +271 -194
  386. package/src/services/zones.ts +66 -47
  387. package/src/traits.ts +23 -6
@@ -17,84 +17,123 @@ import { UploadableSchema } from "../schemas.ts";
17
17
  // Errors
18
18
  // =============================================================================
19
19
 
20
- export class Forbidden extends Schema.TaggedErrorClass<Forbidden>()(
21
- "Forbidden",
22
- { code: Schema.Number, message: Schema.String },
20
+ export class AiSearchInstanceNotFound extends T.applyErrorMatchers(
21
+ Schema.TaggedErrorClass<AiSearchInstanceNotFound>()(
22
+ "AiSearchInstanceNotFound",
23
+ { code: Schema.Number, message: Schema.String },
24
+ ),
25
+ [
26
+ { code: 7002 },
27
+ { status: 404, message: { includes: "ai_search_not_found" } },
28
+ ],
23
29
  ) {}
24
- T.applyErrorMatchers(Forbidden, [{ status: 403 }]);
25
30
 
26
- export class InstanceAlreadyExists extends Schema.TaggedErrorClass<InstanceAlreadyExists>()(
27
- "InstanceAlreadyExists",
28
- { code: Schema.Number, message: Schema.String },
31
+ export class Forbidden extends T.applyErrorMatchers(
32
+ Schema.TaggedErrorClass<Forbidden>()("Forbidden", {
33
+ code: Schema.Number,
34
+ message: Schema.String,
35
+ }),
36
+ [{ status: 403 }],
29
37
  ) {}
30
- T.applyErrorMatchers(InstanceAlreadyExists, [
31
- { status: 400, message: { includes: "already_exist" } },
32
- ]);
33
38
 
34
- export class InvalidRoute extends Schema.TaggedErrorClass<InvalidRoute>()(
35
- "InvalidRoute",
36
- { code: Schema.Number, message: Schema.String },
39
+ export class InstanceAlreadyExists extends T.applyErrorMatchers(
40
+ Schema.TaggedErrorClass<InstanceAlreadyExists>()("InstanceAlreadyExists", {
41
+ code: Schema.Number,
42
+ message: Schema.String,
43
+ }),
44
+ [{ status: 400, message: { includes: "already_exist" } }],
37
45
  ) {}
38
- T.applyErrorMatchers(InvalidRoute, [{ code: 7003 }]);
39
46
 
40
- export class InvalidTokenCredentials extends Schema.TaggedErrorClass<InvalidTokenCredentials>()(
41
- "InvalidTokenCredentials",
42
- { code: Schema.Number, message: Schema.String },
47
+ export class InvalidRoute extends T.applyErrorMatchers(
48
+ Schema.TaggedErrorClass<InvalidRoute>()("InvalidRoute", {
49
+ code: Schema.Number,
50
+ message: Schema.String,
51
+ }),
52
+ [{ code: 7003 }],
53
+ ) {}
54
+
55
+ export class InvalidTokenCredentials extends T.applyErrorMatchers(
56
+ Schema.TaggedErrorClass<InvalidTokenCredentials>()(
57
+ "InvalidTokenCredentials",
58
+ { code: Schema.Number, message: Schema.String },
59
+ ),
60
+ [{ code: 7012 }, { status: 400, message: { includes: "invalid_token" } }],
43
61
  ) {}
44
- T.applyErrorMatchers(InvalidTokenCredentials, [
45
- { code: 7012 },
46
- { status: 400, message: { includes: "invalid_token" } },
47
- ]);
48
-
49
- export class NamespaceAlreadyExists extends Schema.TaggedErrorClass<NamespaceAlreadyExists>()(
50
- "NamespaceAlreadyExists",
51
- { code: Schema.Number, message: Schema.String },
62
+
63
+ export class NamespaceAlreadyExists extends T.applyErrorMatchers(
64
+ Schema.TaggedErrorClass<NamespaceAlreadyExists>()("NamespaceAlreadyExists", {
65
+ code: Schema.Number,
66
+ message: Schema.String,
67
+ }),
68
+ [{ code: 7064 }],
52
69
  ) {}
53
- T.applyErrorMatchers(NamespaceAlreadyExists, [{ code: 7064 }]);
54
70
 
55
- export class NamespaceNotFound extends Schema.TaggedErrorClass<NamespaceNotFound>()(
56
- "NamespaceNotFound",
57
- { code: Schema.Number, message: Schema.String },
71
+ export class NamespaceNotFound extends T.applyErrorMatchers(
72
+ Schema.TaggedErrorClass<NamespaceNotFound>()("NamespaceNotFound", {
73
+ code: Schema.Number,
74
+ message: Schema.String,
75
+ }),
76
+ [
77
+ { code: 7063 },
78
+ { status: 404, message: { includes: "namespace_not_found" } },
79
+ ],
58
80
  ) {}
59
- T.applyErrorMatchers(NamespaceNotFound, [{ code: 7063 }]);
60
81
 
61
- export class NotFound extends Schema.TaggedErrorClass<NotFound>()("NotFound", {
62
- code: Schema.Number,
63
- message: Schema.String,
64
- }) {}
65
- T.applyErrorMatchers(NotFound, [{ code: 7002 }]);
82
+ export class NotFound extends T.applyErrorMatchers(
83
+ Schema.TaggedErrorClass<NotFound>()("NotFound", {
84
+ code: Schema.Number,
85
+ message: Schema.String,
86
+ }),
87
+ [{ code: 7002 }],
88
+ ) {}
66
89
 
67
- export class SyncInCooldown extends Schema.TaggedErrorClass<SyncInCooldown>()(
68
- "SyncInCooldown",
69
- { code: Schema.Number, message: Schema.String },
90
+ export class SyncInCooldown extends T.applyErrorMatchers(
91
+ Schema.TaggedErrorClass<SyncInCooldown>()("SyncInCooldown", {
92
+ code: Schema.Number,
93
+ message: Schema.String,
94
+ }),
95
+ [{ code: 7020 }],
70
96
  ) {}
71
- T.applyErrorMatchers(SyncInCooldown, [{ code: 7020 }]);
72
97
 
73
- export class TokenInUseByInstances extends Schema.TaggedErrorClass<TokenInUseByInstances>()(
74
- "TokenInUseByInstances",
75
- { code: Schema.Number, message: Schema.String },
98
+ export class TokenInUseByInstances extends T.applyErrorMatchers(
99
+ Schema.TaggedErrorClass<TokenInUseByInstances>()("TokenInUseByInstances", {
100
+ code: Schema.Number,
101
+ message: Schema.String,
102
+ }),
103
+ [{ status: 409, message: { includes: "token_in_use_by_instances" } }],
76
104
  ) {}
77
- T.applyErrorMatchers(TokenInUseByInstances, [
78
- { status: 409, message: { includes: "token_in_use_by_instances" } },
79
- ]);
80
105
 
81
- export class TokenNotFound extends Schema.TaggedErrorClass<TokenNotFound>()(
82
- "TokenNotFound",
83
- { code: Schema.Number, message: Schema.String },
106
+ export class TokenNotFound extends T.applyErrorMatchers(
107
+ Schema.TaggedErrorClass<TokenNotFound>()("TokenNotFound", {
108
+ code: Schema.Number,
109
+ message: Schema.String,
110
+ }),
111
+ [{ code: 7075 }],
84
112
  ) {}
85
- T.applyErrorMatchers(TokenNotFound, [{ code: 7075 }]);
86
113
 
87
- export class UnableToConnect extends Schema.TaggedErrorClass<UnableToConnect>()(
88
- "UnableToConnect",
89
- { code: Schema.Number, message: Schema.String },
114
+ export class UnableToConnect extends T.applyErrorMatchers(
115
+ Schema.TaggedErrorClass<UnableToConnect>()("UnableToConnect", {
116
+ code: Schema.Number,
117
+ message: Schema.String,
118
+ }),
119
+ [{ code: 7017 }],
90
120
  ) {}
91
- T.applyErrorMatchers(UnableToConnect, [{ code: 7017 }]);
92
121
 
93
- export class ValidationError extends Schema.TaggedErrorClass<ValidationError>()(
94
- "ValidationError",
95
- { code: Schema.Number, message: Schema.String },
122
+ export class ValidationError extends T.applyErrorMatchers(
123
+ Schema.TaggedErrorClass<ValidationError>()("ValidationError", {
124
+ code: Schema.Number,
125
+ message: Schema.String,
126
+ }),
127
+ [{ code: 7001 }],
128
+ ) {}
129
+
130
+ export class WebCrawlerDomainNotOwned extends T.applyErrorMatchers(
131
+ Schema.TaggedErrorClass<WebCrawlerDomainNotOwned>()(
132
+ "WebCrawlerDomainNotOwned",
133
+ { code: Schema.Number, message: Schema.String },
134
+ ),
135
+ [{ status: 400, message: { includes: "domain_not_owned_by_user" } }],
96
136
  ) {}
97
- T.applyErrorMatchers(ValidationError, [{ code: 7001 }]);
98
137
 
99
138
  // =============================================================================
100
139
  // CompletionsInstance
@@ -8355,8 +8394,8 @@ export const ListNamespaceInstancesRequest =
8355
8394
  export interface ListNamespaceInstancesResponse {
8356
8395
  result: {
8357
8396
  id: string;
8358
- createdAt: string;
8359
- modifiedAt: string;
8397
+ createdAt?: string | null;
8398
+ modifiedAt?: string | null;
8360
8399
  aiGatewayId?: string | null;
8361
8400
  aiSearchModel?:
8362
8401
  | "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
@@ -8396,21 +8435,8 @@ export interface ListNamespaceInstancesResponse {
8396
8435
  | "close_enough"
8397
8436
  | "flexible_friend"
8398
8437
  | "anything_goes"
8399
- | (string & {})
8400
- | null;
8401
- cacheTtl?:
8402
- | "600"
8403
- | "1800"
8404
- | "3600"
8405
- | "7200"
8406
- | "21600"
8407
- | "43200"
8408
- | "86400"
8409
- | "172800"
8410
- | "259200"
8411
- | "518400"
8412
- | (string & {})
8413
8438
  | null;
8439
+ cacheTtl?: number | null;
8414
8440
  chunkOverlap?: number | null;
8415
8441
  chunkSize?: number | null;
8416
8442
  createdBy?: string | null;
@@ -8542,17 +8568,7 @@ export interface ListNamespaceInstancesResponse {
8542
8568
  } | null;
8543
8569
  } | null;
8544
8570
  status?: string | null;
8545
- syncInterval?:
8546
- | "900"
8547
- | "1800"
8548
- | "3600"
8549
- | "7200"
8550
- | "14400"
8551
- | "21600"
8552
- | "43200"
8553
- | "86400"
8554
- | (string & {})
8555
- | null;
8571
+ syncInterval?: number | null;
8556
8572
  tokenId?: string | null;
8557
8573
  type?: "r2" | "web-crawler" | null;
8558
8574
  }[];
@@ -8570,8 +8586,12 @@ export const ListNamespaceInstancesResponse =
8570
8586
  result: Schema.Array(
8571
8587
  Schema.Struct({
8572
8588
  id: Schema.String,
8573
- createdAt: Schema.String,
8574
- modifiedAt: Schema.String,
8589
+ createdAt: Schema.optional(
8590
+ Schema.Union([Schema.String, Schema.Null]),
8591
+ ),
8592
+ modifiedAt: Schema.optional(
8593
+ Schema.Union([Schema.String, Schema.Null]),
8594
+ ),
8575
8595
  aiGatewayId: Schema.optional(
8576
8596
  Schema.Union([Schema.String, Schema.Null]),
8577
8597
  ),
@@ -8613,38 +8633,14 @@ export const ListNamespaceInstancesResponse =
8613
8633
  cache: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
8614
8634
  cacheThreshold: Schema.optional(
8615
8635
  Schema.Union([
8616
- Schema.Union([
8617
- Schema.Literals([
8618
- "super_strict_match",
8619
- "close_enough",
8620
- "flexible_friend",
8621
- "anything_goes",
8622
- ]),
8623
- Schema.String,
8624
- ]),
8625
- Schema.Null,
8626
- ]),
8627
- ),
8628
- cacheTtl: Schema.optional(
8629
- Schema.Union([
8630
- Schema.Union([
8631
- Schema.Literals([
8632
- "600",
8633
- "1800",
8634
- "3600",
8635
- "7200",
8636
- "21600",
8637
- "43200",
8638
- "86400",
8639
- "172800",
8640
- "259200",
8641
- "518400",
8642
- ]),
8643
- Schema.String,
8644
- ]),
8636
+ Schema.Literal("super_strict_match"),
8637
+ Schema.Literal("close_enough"),
8638
+ Schema.Literal("flexible_friend"),
8639
+ Schema.Literal("anything_goes"),
8645
8640
  Schema.Null,
8646
8641
  ]),
8647
8642
  ),
8643
+ cacheTtl: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
8648
8644
  chunkOverlap: Schema.optional(
8649
8645
  Schema.Union([Schema.Number, Schema.Null]),
8650
8646
  ),
@@ -9093,22 +9089,7 @@ export const ListNamespaceInstancesResponse =
9093
9089
  ),
9094
9090
  status: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
9095
9091
  syncInterval: Schema.optional(
9096
- Schema.Union([
9097
- Schema.Union([
9098
- Schema.Literals([
9099
- "900",
9100
- "1800",
9101
- "3600",
9102
- "7200",
9103
- "14400",
9104
- "21600",
9105
- "43200",
9106
- "86400",
9107
- ]),
9108
- Schema.String,
9109
- ]),
9110
- Schema.Null,
9111
- ]),
9092
+ Schema.Union([Schema.Number, Schema.Null]),
9112
9093
  ),
9113
9094
  tokenId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
9114
9095
  type: Schema.optional(
@@ -9187,7 +9168,11 @@ export const ListNamespaceInstancesResponse =
9187
9168
  }).pipe(Schema.encodeKeys({ result: "result", resultInfo: "result_info" })),
9188
9169
  ) as unknown as Schema.Schema<ListNamespaceInstancesResponse>;
9189
9170
 
9190
- export type ListNamespaceInstancesError = DefaultErrors;
9171
+ export type ListNamespaceInstancesError =
9172
+ | DefaultErrors
9173
+ | NamespaceNotFound
9174
+ | InvalidRoute
9175
+ | Forbidden;
9191
9176
 
9192
9177
  export const listNamespaceInstances: API.PaginatedOperationMethod<
9193
9178
  ListNamespaceInstancesRequest,
@@ -9197,7 +9182,7 @@ export const listNamespaceInstances: API.PaginatedOperationMethod<
9197
9182
  > = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
9198
9183
  input: ListNamespaceInstancesRequest,
9199
9184
  output: ListNamespaceInstancesResponse,
9200
- errors: [],
9185
+ errors: [NamespaceNotFound, InvalidRoute, Forbidden],
9201
9186
  pagination: {
9202
9187
  mode: "page",
9203
9188
  inputToken: "page",
@@ -9258,18 +9243,7 @@ export interface CreateNamespaceInstanceRequest {
9258
9243
  | "anything_goes"
9259
9244
  | (string & {});
9260
9245
  /** Body param: Cache entry TTL in seconds. Allowed values: 600 (10min), 1800 (30min), 3600 (1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800 (48h), 259200 (72h), 518400 (6d). */
9261
- cacheTtl?:
9262
- | "600"
9263
- | "1800"
9264
- | "3600"
9265
- | "7200"
9266
- | "21600"
9267
- | "43200"
9268
- | "86400"
9269
- | "172800"
9270
- | "259200"
9271
- | "518400"
9272
- | (string & {});
9246
+ cacheTtl?: number;
9273
9247
  /** Body param */
9274
9248
  chunk?: boolean;
9275
9249
  /** Body param */
@@ -9401,16 +9375,7 @@ export interface CreateNamespaceInstanceRequest {
9401
9375
  };
9402
9376
  } | null;
9403
9377
  /** Body param: Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h). */
9404
- syncInterval?:
9405
- | "900"
9406
- | "1800"
9407
- | "3600"
9408
- | "7200"
9409
- | "14400"
9410
- | "21600"
9411
- | "43200"
9412
- | "86400"
9413
- | (string & {});
9378
+ syncInterval?: number;
9414
9379
  /** Body param */
9415
9380
  tokenId?: string;
9416
9381
  /** Body param */
@@ -9471,23 +9436,7 @@ export const CreateNamespaceInstanceRequest =
9471
9436
  Schema.String,
9472
9437
  ]),
9473
9438
  ),
9474
- cacheTtl: Schema.optional(
9475
- Schema.Union([
9476
- Schema.Literals([
9477
- "600",
9478
- "1800",
9479
- "3600",
9480
- "7200",
9481
- "21600",
9482
- "43200",
9483
- "86400",
9484
- "172800",
9485
- "259200",
9486
- "518400",
9487
- ]),
9488
- Schema.String,
9489
- ]),
9490
- ),
9439
+ cacheTtl: Schema.optional(Schema.Number),
9491
9440
  chunk: Schema.optional(Schema.Boolean),
9492
9441
  chunkOverlap: Schema.optional(Schema.Number),
9493
9442
  chunkSize: Schema.optional(Schema.Number),
@@ -9778,21 +9727,7 @@ export const CreateNamespaceInstanceRequest =
9778
9727
  Schema.Null,
9779
9728
  ]),
9780
9729
  ),
9781
- syncInterval: Schema.optional(
9782
- Schema.Union([
9783
- Schema.Literals([
9784
- "900",
9785
- "1800",
9786
- "3600",
9787
- "7200",
9788
- "14400",
9789
- "21600",
9790
- "43200",
9791
- "86400",
9792
- ]),
9793
- Schema.String,
9794
- ]),
9795
- ),
9730
+ syncInterval: Schema.optional(Schema.Number),
9796
9731
  tokenId: Schema.optional(Schema.String),
9797
9732
  type: Schema.optional(
9798
9733
  Schema.Union([
@@ -9843,8 +9778,8 @@ export const CreateNamespaceInstanceRequest =
9843
9778
  export interface CreateNamespaceInstanceResponse {
9844
9779
  /** AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. */
9845
9780
  id: string;
9846
- createdAt: string;
9847
- modifiedAt: string;
9781
+ createdAt?: string | null;
9782
+ modifiedAt?: string | null;
9848
9783
  aiGatewayId?: string | null;
9849
9784
  aiSearchModel?:
9850
9785
  | "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
@@ -9884,22 +9819,9 @@ export interface CreateNamespaceInstanceResponse {
9884
9819
  | "close_enough"
9885
9820
  | "flexible_friend"
9886
9821
  | "anything_goes"
9887
- | (string & {})
9888
9822
  | null;
9889
9823
  /** Cache entry TTL in seconds. Allowed values: 600 (10min), 1800 (30min), 3600 (1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800 (48h), 259200 (72h), 518400 (6d). */
9890
- cacheTtl?:
9891
- | "600"
9892
- | "1800"
9893
- | "3600"
9894
- | "7200"
9895
- | "21600"
9896
- | "43200"
9897
- | "86400"
9898
- | "172800"
9899
- | "259200"
9900
- | "518400"
9901
- | (string & {})
9902
- | null;
9824
+ cacheTtl?: number | null;
9903
9825
  chunkOverlap?: number | null;
9904
9826
  chunkSize?: number | null;
9905
9827
  createdBy?: string | null;
@@ -10034,17 +9956,7 @@ export interface CreateNamespaceInstanceResponse {
10034
9956
  } | null;
10035
9957
  status?: string | null;
10036
9958
  /** Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h). */
10037
- syncInterval?:
10038
- | "900"
10039
- | "1800"
10040
- | "3600"
10041
- | "7200"
10042
- | "14400"
10043
- | "21600"
10044
- | "43200"
10045
- | "86400"
10046
- | (string & {})
10047
- | null;
9959
+ syncInterval?: number | null;
10048
9960
  tokenId?: string | null;
10049
9961
  type?: "r2" | "web-crawler" | null;
10050
9962
  }
@@ -10053,8 +9965,8 @@ export const CreateNamespaceInstanceResponse =
10053
9965
  /*@__PURE__*/ /*#__PURE__*/ Schema.suspend(() =>
10054
9966
  Schema.Struct({
10055
9967
  id: Schema.String,
10056
- createdAt: Schema.String,
10057
- modifiedAt: Schema.String,
9968
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
9969
+ modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
10058
9970
  aiGatewayId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
10059
9971
  aiSearchModel: Schema.optional(
10060
9972
  Schema.Union([
@@ -10094,38 +10006,14 @@ export const CreateNamespaceInstanceResponse =
10094
10006
  cache: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
10095
10007
  cacheThreshold: Schema.optional(
10096
10008
  Schema.Union([
10097
- Schema.Union([
10098
- Schema.Literals([
10099
- "super_strict_match",
10100
- "close_enough",
10101
- "flexible_friend",
10102
- "anything_goes",
10103
- ]),
10104
- Schema.String,
10105
- ]),
10106
- Schema.Null,
10107
- ]),
10108
- ),
10109
- cacheTtl: Schema.optional(
10110
- Schema.Union([
10111
- Schema.Union([
10112
- Schema.Literals([
10113
- "600",
10114
- "1800",
10115
- "3600",
10116
- "7200",
10117
- "21600",
10118
- "43200",
10119
- "86400",
10120
- "172800",
10121
- "259200",
10122
- "518400",
10123
- ]),
10124
- Schema.String,
10125
- ]),
10009
+ Schema.Literal("super_strict_match"),
10010
+ Schema.Literal("close_enough"),
10011
+ Schema.Literal("flexible_friend"),
10012
+ Schema.Literal("anything_goes"),
10126
10013
  Schema.Null,
10127
10014
  ]),
10128
10015
  ),
10016
+ cacheTtl: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
10129
10017
  chunkOverlap: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
10130
10018
  chunkSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
10131
10019
  createdBy: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
@@ -10552,24 +10440,7 @@ export const CreateNamespaceInstanceResponse =
10552
10440
  ]),
10553
10441
  ),
10554
10442
  status: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
10555
- syncInterval: Schema.optional(
10556
- Schema.Union([
10557
- Schema.Union([
10558
- Schema.Literals([
10559
- "900",
10560
- "1800",
10561
- "3600",
10562
- "7200",
10563
- "14400",
10564
- "21600",
10565
- "43200",
10566
- "86400",
10567
- ]),
10568
- Schema.String,
10569
- ]),
10570
- Schema.Null,
10571
- ]),
10572
- ),
10443
+ syncInterval: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
10573
10444
  tokenId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
10574
10445
  type: Schema.optional(
10575
10446
  Schema.Union([
@@ -10625,7 +10496,16 @@ export const CreateNamespaceInstanceResponse =
10625
10496
  .pipe(T.ResponsePath("result")),
10626
10497
  ) as unknown as Schema.Schema<CreateNamespaceInstanceResponse>;
10627
10498
 
10628
- export type CreateNamespaceInstanceError = DefaultErrors;
10499
+ export type CreateNamespaceInstanceError =
10500
+ | DefaultErrors
10501
+ | ValidationError
10502
+ | NamespaceNotFound
10503
+ | AiSearchInstanceNotFound
10504
+ | InvalidRoute
10505
+ | InstanceAlreadyExists
10506
+ | InvalidTokenCredentials
10507
+ | WebCrawlerDomainNotOwned
10508
+ | Forbidden;
10629
10509
 
10630
10510
  export const createNamespaceInstance: API.OperationMethod<
10631
10511
  CreateNamespaceInstanceRequest,
@@ -10635,7 +10515,16 @@ export const createNamespaceInstance: API.OperationMethod<
10635
10515
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
10636
10516
  input: CreateNamespaceInstanceRequest,
10637
10517
  output: CreateNamespaceInstanceResponse,
10638
- errors: [],
10518
+ errors: [
10519
+ ValidationError,
10520
+ NamespaceNotFound,
10521
+ AiSearchInstanceNotFound,
10522
+ InvalidRoute,
10523
+ InstanceAlreadyExists,
10524
+ InvalidTokenCredentials,
10525
+ WebCrawlerDomainNotOwned,
10526
+ Forbidden,
10527
+ ],
10639
10528
  }));
10640
10529
 
10641
10530
  export interface UpdateNamespaceInstanceRequest {
@@ -10688,18 +10577,7 @@ export interface UpdateNamespaceInstanceRequest {
10688
10577
  | "anything_goes"
10689
10578
  | (string & {});
10690
10579
  /** Body param: Cache entry TTL in seconds. Allowed values: 600 (10min), 1800 (30min), 3600 (1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800 (48h), 259200 (72h), 518400 (6d). */
10691
- cacheTtl?:
10692
- | "600"
10693
- | "1800"
10694
- | "3600"
10695
- | "7200"
10696
- | "21600"
10697
- | "43200"
10698
- | "86400"
10699
- | "172800"
10700
- | "259200"
10701
- | "518400"
10702
- | (string & {});
10580
+ cacheTtl?: number;
10703
10581
  /** Body param */
10704
10582
  chunk?: boolean;
10705
10583
  /** Body param */
@@ -10864,16 +10742,7 @@ export interface UpdateNamespaceInstanceRequest {
10864
10742
  | ""
10865
10743
  | null;
10866
10744
  /** Body param: Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h). */
10867
- syncInterval?:
10868
- | "900"
10869
- | "1800"
10870
- | "3600"
10871
- | "7200"
10872
- | "14400"
10873
- | "21600"
10874
- | "43200"
10875
- | "86400"
10876
- | (string & {});
10745
+ syncInterval?: number;
10877
10746
  /** Body param */
10878
10747
  systemPromptAiSearch?: string | null;
10879
10748
  /** Body param */
@@ -10938,23 +10807,7 @@ export const UpdateNamespaceInstanceRequest =
10938
10807
  Schema.String,
10939
10808
  ]),
10940
10809
  ),
10941
- cacheTtl: Schema.optional(
10942
- Schema.Union([
10943
- Schema.Literals([
10944
- "600",
10945
- "1800",
10946
- "3600",
10947
- "7200",
10948
- "21600",
10949
- "43200",
10950
- "86400",
10951
- "172800",
10952
- "259200",
10953
- "518400",
10954
- ]),
10955
- Schema.String,
10956
- ]),
10957
- ),
10810
+ cacheTtl: Schema.optional(Schema.Number),
10958
10811
  chunk: Schema.optional(Schema.Boolean),
10959
10812
  chunkOverlap: Schema.optional(Schema.Number),
10960
10813
  chunkSize: Schema.optional(Schema.Number),
@@ -11280,21 +11133,7 @@ export const UpdateNamespaceInstanceRequest =
11280
11133
  Schema.Null,
11281
11134
  ]),
11282
11135
  ),
11283
- syncInterval: Schema.optional(
11284
- Schema.Union([
11285
- Schema.Literals([
11286
- "900",
11287
- "1800",
11288
- "3600",
11289
- "7200",
11290
- "14400",
11291
- "21600",
11292
- "43200",
11293
- "86400",
11294
- ]),
11295
- Schema.String,
11296
- ]),
11297
- ),
11136
+ syncInterval: Schema.optional(Schema.Number),
11298
11137
  systemPromptAiSearch: Schema.optional(
11299
11138
  Schema.Union([Schema.String, Schema.Null]),
11300
11139
  ),
@@ -11349,8 +11188,8 @@ export const UpdateNamespaceInstanceRequest =
11349
11188
  export interface UpdateNamespaceInstanceResponse {
11350
11189
  /** AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. */
11351
11190
  id: string;
11352
- createdAt: string;
11353
- modifiedAt: string;
11191
+ createdAt?: string | null;
11192
+ modifiedAt?: string | null;
11354
11193
  aiGatewayId?: string | null;
11355
11194
  aiSearchModel?:
11356
11195
  | "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
@@ -11390,22 +11229,9 @@ export interface UpdateNamespaceInstanceResponse {
11390
11229
  | "close_enough"
11391
11230
  | "flexible_friend"
11392
11231
  | "anything_goes"
11393
- | (string & {})
11394
11232
  | null;
11395
11233
  /** Cache entry TTL in seconds. Allowed values: 600 (10min), 1800 (30min), 3600 (1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800 (48h), 259200 (72h), 518400 (6d). */
11396
- cacheTtl?:
11397
- | "600"
11398
- | "1800"
11399
- | "3600"
11400
- | "7200"
11401
- | "21600"
11402
- | "43200"
11403
- | "86400"
11404
- | "172800"
11405
- | "259200"
11406
- | "518400"
11407
- | (string & {})
11408
- | null;
11234
+ cacheTtl?: number | null;
11409
11235
  chunkOverlap?: number | null;
11410
11236
  chunkSize?: number | null;
11411
11237
  createdBy?: string | null;
@@ -11540,17 +11366,7 @@ export interface UpdateNamespaceInstanceResponse {
11540
11366
  } | null;
11541
11367
  status?: string | null;
11542
11368
  /** Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h). */
11543
- syncInterval?:
11544
- | "900"
11545
- | "1800"
11546
- | "3600"
11547
- | "7200"
11548
- | "14400"
11549
- | "21600"
11550
- | "43200"
11551
- | "86400"
11552
- | (string & {})
11553
- | null;
11369
+ syncInterval?: number | null;
11554
11370
  tokenId?: string | null;
11555
11371
  type?: "r2" | "web-crawler" | null;
11556
11372
  }
@@ -11559,8 +11375,8 @@ export const UpdateNamespaceInstanceResponse =
11559
11375
  /*@__PURE__*/ /*#__PURE__*/ Schema.suspend(() =>
11560
11376
  Schema.Struct({
11561
11377
  id: Schema.String,
11562
- createdAt: Schema.String,
11563
- modifiedAt: Schema.String,
11378
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
11379
+ modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
11564
11380
  aiGatewayId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
11565
11381
  aiSearchModel: Schema.optional(
11566
11382
  Schema.Union([
@@ -11600,38 +11416,14 @@ export const UpdateNamespaceInstanceResponse =
11600
11416
  cache: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
11601
11417
  cacheThreshold: Schema.optional(
11602
11418
  Schema.Union([
11603
- Schema.Union([
11604
- Schema.Literals([
11605
- "super_strict_match",
11606
- "close_enough",
11607
- "flexible_friend",
11608
- "anything_goes",
11609
- ]),
11610
- Schema.String,
11611
- ]),
11612
- Schema.Null,
11613
- ]),
11614
- ),
11615
- cacheTtl: Schema.optional(
11616
- Schema.Union([
11617
- Schema.Union([
11618
- Schema.Literals([
11619
- "600",
11620
- "1800",
11621
- "3600",
11622
- "7200",
11623
- "21600",
11624
- "43200",
11625
- "86400",
11626
- "172800",
11627
- "259200",
11628
- "518400",
11629
- ]),
11630
- Schema.String,
11631
- ]),
11419
+ Schema.Literal("super_strict_match"),
11420
+ Schema.Literal("close_enough"),
11421
+ Schema.Literal("flexible_friend"),
11422
+ Schema.Literal("anything_goes"),
11632
11423
  Schema.Null,
11633
11424
  ]),
11634
11425
  ),
11426
+ cacheTtl: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
11635
11427
  chunkOverlap: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
11636
11428
  chunkSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
11637
11429
  createdBy: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
@@ -12058,24 +11850,7 @@ export const UpdateNamespaceInstanceResponse =
12058
11850
  ]),
12059
11851
  ),
12060
11852
  status: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
12061
- syncInterval: Schema.optional(
12062
- Schema.Union([
12063
- Schema.Union([
12064
- Schema.Literals([
12065
- "900",
12066
- "1800",
12067
- "3600",
12068
- "7200",
12069
- "14400",
12070
- "21600",
12071
- "43200",
12072
- "86400",
12073
- ]),
12074
- Schema.String,
12075
- ]),
12076
- Schema.Null,
12077
- ]),
12078
- ),
11853
+ syncInterval: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
12079
11854
  tokenId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
12080
11855
  type: Schema.optional(
12081
11856
  Schema.Union([
@@ -12131,7 +11906,15 @@ export const UpdateNamespaceInstanceResponse =
12131
11906
  .pipe(T.ResponsePath("result")),
12132
11907
  ) as unknown as Schema.Schema<UpdateNamespaceInstanceResponse>;
12133
11908
 
12134
- export type UpdateNamespaceInstanceError = DefaultErrors;
11909
+ export type UpdateNamespaceInstanceError =
11910
+ | DefaultErrors
11911
+ | ValidationError
11912
+ | NamespaceNotFound
11913
+ | AiSearchInstanceNotFound
11914
+ | InvalidRoute
11915
+ | InvalidTokenCredentials
11916
+ | WebCrawlerDomainNotOwned
11917
+ | Forbidden;
12135
11918
 
12136
11919
  export const updateNamespaceInstance: API.OperationMethod<
12137
11920
  UpdateNamespaceInstanceRequest,
@@ -12141,7 +11924,15 @@ export const updateNamespaceInstance: API.OperationMethod<
12141
11924
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
12142
11925
  input: UpdateNamespaceInstanceRequest,
12143
11926
  output: UpdateNamespaceInstanceResponse,
12144
- errors: [],
11927
+ errors: [
11928
+ ValidationError,
11929
+ NamespaceNotFound,
11930
+ AiSearchInstanceNotFound,
11931
+ InvalidRoute,
11932
+ InvalidTokenCredentials,
11933
+ WebCrawlerDomainNotOwned,
11934
+ Forbidden,
11935
+ ],
12145
11936
  }));
12146
11937
 
12147
11938
  export interface DeleteNamespaceInstanceRequest {
@@ -12167,8 +11958,8 @@ export const DeleteNamespaceInstanceRequest =
12167
11958
  export interface DeleteNamespaceInstanceResponse {
12168
11959
  /** AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. */
12169
11960
  id: string;
12170
- createdAt: string;
12171
- modifiedAt: string;
11961
+ createdAt?: string | null;
11962
+ modifiedAt?: string | null;
12172
11963
  aiGatewayId?: string | null;
12173
11964
  aiSearchModel?:
12174
11965
  | "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
@@ -12208,22 +11999,9 @@ export interface DeleteNamespaceInstanceResponse {
12208
11999
  | "close_enough"
12209
12000
  | "flexible_friend"
12210
12001
  | "anything_goes"
12211
- | (string & {})
12212
12002
  | null;
12213
12003
  /** Cache entry TTL in seconds. Allowed values: 600 (10min), 1800 (30min), 3600 (1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800 (48h), 259200 (72h), 518400 (6d). */
12214
- cacheTtl?:
12215
- | "600"
12216
- | "1800"
12217
- | "3600"
12218
- | "7200"
12219
- | "21600"
12220
- | "43200"
12221
- | "86400"
12222
- | "172800"
12223
- | "259200"
12224
- | "518400"
12225
- | (string & {})
12226
- | null;
12004
+ cacheTtl?: number | null;
12227
12005
  chunkOverlap?: number | null;
12228
12006
  chunkSize?: number | null;
12229
12007
  createdBy?: string | null;
@@ -12358,17 +12136,7 @@ export interface DeleteNamespaceInstanceResponse {
12358
12136
  } | null;
12359
12137
  status?: string | null;
12360
12138
  /** Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h). */
12361
- syncInterval?:
12362
- | "900"
12363
- | "1800"
12364
- | "3600"
12365
- | "7200"
12366
- | "14400"
12367
- | "21600"
12368
- | "43200"
12369
- | "86400"
12370
- | (string & {})
12371
- | null;
12139
+ syncInterval?: number | null;
12372
12140
  tokenId?: string | null;
12373
12141
  type?: "r2" | "web-crawler" | null;
12374
12142
  }
@@ -12377,8 +12145,8 @@ export const DeleteNamespaceInstanceResponse =
12377
12145
  /*@__PURE__*/ /*#__PURE__*/ Schema.suspend(() =>
12378
12146
  Schema.Struct({
12379
12147
  id: Schema.String,
12380
- createdAt: Schema.String,
12381
- modifiedAt: Schema.String,
12148
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
12149
+ modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
12382
12150
  aiGatewayId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
12383
12151
  aiSearchModel: Schema.optional(
12384
12152
  Schema.Union([
@@ -12418,38 +12186,14 @@ export const DeleteNamespaceInstanceResponse =
12418
12186
  cache: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
12419
12187
  cacheThreshold: Schema.optional(
12420
12188
  Schema.Union([
12421
- Schema.Union([
12422
- Schema.Literals([
12423
- "super_strict_match",
12424
- "close_enough",
12425
- "flexible_friend",
12426
- "anything_goes",
12427
- ]),
12428
- Schema.String,
12429
- ]),
12430
- Schema.Null,
12431
- ]),
12432
- ),
12433
- cacheTtl: Schema.optional(
12434
- Schema.Union([
12435
- Schema.Union([
12436
- Schema.Literals([
12437
- "600",
12438
- "1800",
12439
- "3600",
12440
- "7200",
12441
- "21600",
12442
- "43200",
12443
- "86400",
12444
- "172800",
12445
- "259200",
12446
- "518400",
12447
- ]),
12448
- Schema.String,
12449
- ]),
12189
+ Schema.Literal("super_strict_match"),
12190
+ Schema.Literal("close_enough"),
12191
+ Schema.Literal("flexible_friend"),
12192
+ Schema.Literal("anything_goes"),
12450
12193
  Schema.Null,
12451
12194
  ]),
12452
12195
  ),
12196
+ cacheTtl: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
12453
12197
  chunkOverlap: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
12454
12198
  chunkSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
12455
12199
  createdBy: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
@@ -12876,24 +12620,7 @@ export const DeleteNamespaceInstanceResponse =
12876
12620
  ]),
12877
12621
  ),
12878
12622
  status: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
12879
- syncInterval: Schema.optional(
12880
- Schema.Union([
12881
- Schema.Union([
12882
- Schema.Literals([
12883
- "900",
12884
- "1800",
12885
- "3600",
12886
- "7200",
12887
- "14400",
12888
- "21600",
12889
- "43200",
12890
- "86400",
12891
- ]),
12892
- Schema.String,
12893
- ]),
12894
- Schema.Null,
12895
- ]),
12896
- ),
12623
+ syncInterval: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
12897
12624
  tokenId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
12898
12625
  type: Schema.optional(
12899
12626
  Schema.Union([
@@ -12949,7 +12676,13 @@ export const DeleteNamespaceInstanceResponse =
12949
12676
  .pipe(T.ResponsePath("result")),
12950
12677
  ) as unknown as Schema.Schema<DeleteNamespaceInstanceResponse>;
12951
12678
 
12952
- export type DeleteNamespaceInstanceError = DefaultErrors;
12679
+ export type DeleteNamespaceInstanceError =
12680
+ | DefaultErrors
12681
+ | ValidationError
12682
+ | NamespaceNotFound
12683
+ | AiSearchInstanceNotFound
12684
+ | InvalidRoute
12685
+ | Forbidden;
12953
12686
 
12954
12687
  export const deleteNamespaceInstance: API.OperationMethod<
12955
12688
  DeleteNamespaceInstanceRequest,
@@ -12959,7 +12692,13 @@ export const deleteNamespaceInstance: API.OperationMethod<
12959
12692
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
12960
12693
  input: DeleteNamespaceInstanceRequest,
12961
12694
  output: DeleteNamespaceInstanceResponse,
12962
- errors: [],
12695
+ errors: [
12696
+ ValidationError,
12697
+ NamespaceNotFound,
12698
+ AiSearchInstanceNotFound,
12699
+ InvalidRoute,
12700
+ Forbidden,
12701
+ ],
12963
12702
  }));
12964
12703
 
12965
12704
  export interface ReadNamespaceInstanceRequest {
@@ -12985,8 +12724,8 @@ export const ReadNamespaceInstanceRequest =
12985
12724
  export interface ReadNamespaceInstanceResponse {
12986
12725
  /** AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. */
12987
12726
  id: string;
12988
- createdAt: string;
12989
- modifiedAt: string;
12727
+ createdAt?: string | null;
12728
+ modifiedAt?: string | null;
12990
12729
  aiGatewayId?: string | null;
12991
12730
  aiSearchModel?:
12992
12731
  | "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
@@ -13026,22 +12765,9 @@ export interface ReadNamespaceInstanceResponse {
13026
12765
  | "close_enough"
13027
12766
  | "flexible_friend"
13028
12767
  | "anything_goes"
13029
- | (string & {})
13030
12768
  | null;
13031
12769
  /** Cache entry TTL in seconds. Allowed values: 600 (10min), 1800 (30min), 3600 (1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800 (48h), 259200 (72h), 518400 (6d). */
13032
- cacheTtl?:
13033
- | "600"
13034
- | "1800"
13035
- | "3600"
13036
- | "7200"
13037
- | "21600"
13038
- | "43200"
13039
- | "86400"
13040
- | "172800"
13041
- | "259200"
13042
- | "518400"
13043
- | (string & {})
13044
- | null;
12770
+ cacheTtl?: number | null;
13045
12771
  chunkOverlap?: number | null;
13046
12772
  chunkSize?: number | null;
13047
12773
  createdBy?: string | null;
@@ -13176,17 +12902,7 @@ export interface ReadNamespaceInstanceResponse {
13176
12902
  } | null;
13177
12903
  status?: string | null;
13178
12904
  /** Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h). */
13179
- syncInterval?:
13180
- | "900"
13181
- | "1800"
13182
- | "3600"
13183
- | "7200"
13184
- | "14400"
13185
- | "21600"
13186
- | "43200"
13187
- | "86400"
13188
- | (string & {})
13189
- | null;
12905
+ syncInterval?: number | null;
13190
12906
  tokenId?: string | null;
13191
12907
  type?: "r2" | "web-crawler" | null;
13192
12908
  }
@@ -13195,8 +12911,8 @@ export const ReadNamespaceInstanceResponse =
13195
12911
  /*@__PURE__*/ /*#__PURE__*/ Schema.suspend(() =>
13196
12912
  Schema.Struct({
13197
12913
  id: Schema.String,
13198
- createdAt: Schema.String,
13199
- modifiedAt: Schema.String,
12914
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
12915
+ modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
13200
12916
  aiGatewayId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
13201
12917
  aiSearchModel: Schema.optional(
13202
12918
  Schema.Union([
@@ -13236,38 +12952,14 @@ export const ReadNamespaceInstanceResponse =
13236
12952
  cache: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
13237
12953
  cacheThreshold: Schema.optional(
13238
12954
  Schema.Union([
13239
- Schema.Union([
13240
- Schema.Literals([
13241
- "super_strict_match",
13242
- "close_enough",
13243
- "flexible_friend",
13244
- "anything_goes",
13245
- ]),
13246
- Schema.String,
13247
- ]),
13248
- Schema.Null,
13249
- ]),
13250
- ),
13251
- cacheTtl: Schema.optional(
13252
- Schema.Union([
13253
- Schema.Union([
13254
- Schema.Literals([
13255
- "600",
13256
- "1800",
13257
- "3600",
13258
- "7200",
13259
- "21600",
13260
- "43200",
13261
- "86400",
13262
- "172800",
13263
- "259200",
13264
- "518400",
13265
- ]),
13266
- Schema.String,
13267
- ]),
12955
+ Schema.Literal("super_strict_match"),
12956
+ Schema.Literal("close_enough"),
12957
+ Schema.Literal("flexible_friend"),
12958
+ Schema.Literal("anything_goes"),
13268
12959
  Schema.Null,
13269
12960
  ]),
13270
12961
  ),
12962
+ cacheTtl: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
13271
12963
  chunkOverlap: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
13272
12964
  chunkSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
13273
12965
  createdBy: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
@@ -13694,24 +13386,7 @@ export const ReadNamespaceInstanceResponse =
13694
13386
  ]),
13695
13387
  ),
13696
13388
  status: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
13697
- syncInterval: Schema.optional(
13698
- Schema.Union([
13699
- Schema.Union([
13700
- Schema.Literals([
13701
- "900",
13702
- "1800",
13703
- "3600",
13704
- "7200",
13705
- "14400",
13706
- "21600",
13707
- "43200",
13708
- "86400",
13709
- ]),
13710
- Schema.String,
13711
- ]),
13712
- Schema.Null,
13713
- ]),
13714
- ),
13389
+ syncInterval: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
13715
13390
  tokenId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
13716
13391
  type: Schema.optional(
13717
13392
  Schema.Union([
@@ -13767,7 +13442,13 @@ export const ReadNamespaceInstanceResponse =
13767
13442
  .pipe(T.ResponsePath("result")),
13768
13443
  ) as unknown as Schema.Schema<ReadNamespaceInstanceResponse>;
13769
13444
 
13770
- export type ReadNamespaceInstanceError = DefaultErrors;
13445
+ export type ReadNamespaceInstanceError =
13446
+ | DefaultErrors
13447
+ | ValidationError
13448
+ | NamespaceNotFound
13449
+ | AiSearchInstanceNotFound
13450
+ | InvalidRoute
13451
+ | Forbidden;
13771
13452
 
13772
13453
  export const readNamespaceInstance: API.OperationMethod<
13773
13454
  ReadNamespaceInstanceRequest,
@@ -13777,7 +13458,13 @@ export const readNamespaceInstance: API.OperationMethod<
13777
13458
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
13778
13459
  input: ReadNamespaceInstanceRequest,
13779
13460
  output: ReadNamespaceInstanceResponse,
13780
- errors: [],
13461
+ errors: [
13462
+ ValidationError,
13463
+ NamespaceNotFound,
13464
+ AiSearchInstanceNotFound,
13465
+ InvalidRoute,
13466
+ Forbidden,
13467
+ ],
13781
13468
  }));
13782
13469
 
13783
13470
  export interface SearchNamespaceInstanceRequest {