@distilled.cloud/cloudflare 0.0.0 → 0.2.0-alpha

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