@distilled.cloud/cloudflare 0.0.0-john

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