@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,1655 @@
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
+ import * as stream from "effect/Stream";
8
+ import * as Schema from "effect/Schema";
9
+ import * as API from "../client/api.js";
10
+ import * as T from "../traits.js";
11
+ import {} from "../errors.js";
12
+ import { UploadableSchema } from "../schemas.js";
13
+ // =============================================================================
14
+ // Errors
15
+ // =============================================================================
16
+ export class InvalidObjectIdentifier extends Schema.TaggedErrorClass()("InvalidObjectIdentifier", { code: Schema.Number, message: Schema.String }) {
17
+ }
18
+ T.applyErrorMatchers(InvalidObjectIdentifier, [{ code: 7003 }]);
19
+ export class NotEntitled extends Schema.TaggedErrorClass()("NotEntitled", { code: Schema.Number, message: Schema.String }) {
20
+ }
21
+ T.applyErrorMatchers(NotEntitled, [{ code: 10403 }, { code: 10404 }]);
22
+ export class OperationNotFound extends Schema.TaggedErrorClass()("OperationNotFound", { code: Schema.Number, message: Schema.String }) {
23
+ }
24
+ T.applyErrorMatchers(OperationNotFound, [{ code: 10404 }]);
25
+ export class SchemaNotFound extends Schema.TaggedErrorClass()("SchemaNotFound", { code: Schema.Number, message: Schema.String }) {
26
+ }
27
+ T.applyErrorMatchers(SchemaNotFound, [{ code: 19400 }]);
28
+ export const GetConfigurationRequest =
29
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
30
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
31
+ normalize: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("normalize")),
32
+ }).pipe(T.Http({
33
+ method: "GET",
34
+ path: "/zones/{zone_id}/api_gateway/configuration",
35
+ }));
36
+ export const GetConfigurationResponse =
37
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
38
+ authIdCharacteristics: Schema.Array(Schema.Union([
39
+ Schema.Struct({
40
+ name: Schema.String,
41
+ type: Schema.Literals(["header", "cookie"]),
42
+ }),
43
+ Schema.Struct({
44
+ name: Schema.String,
45
+ type: Schema.Literal("jwt"),
46
+ }),
47
+ ])),
48
+ })
49
+ .pipe(Schema.encodeKeys({ authIdCharacteristics: "auth_id_characteristics" }))
50
+ .pipe(T.ResponsePath("result"));
51
+ export const getConfiguration = API.make(() => ({
52
+ input: GetConfigurationRequest,
53
+ output: GetConfigurationResponse,
54
+ errors: [InvalidObjectIdentifier, NotEntitled],
55
+ }));
56
+ export const PutConfigurationRequest =
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
+ authIdCharacteristics: Schema.Array(Schema.Union([
61
+ Schema.Struct({
62
+ name: Schema.String,
63
+ type: Schema.Literals(["header", "cookie"]),
64
+ }),
65
+ Schema.Struct({
66
+ name: Schema.String,
67
+ type: Schema.Literal("jwt"),
68
+ }),
69
+ ])),
70
+ }).pipe(Schema.encodeKeys({ authIdCharacteristics: "auth_id_characteristics" }), T.Http({
71
+ method: "PUT",
72
+ path: "/zones/{zone_id}/api_gateway/configuration",
73
+ }));
74
+ export const PutConfigurationResponse =
75
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
76
+ authIdCharacteristics: Schema.Array(Schema.Union([
77
+ Schema.Struct({
78
+ name: Schema.String,
79
+ type: Schema.Literals(["header", "cookie"]),
80
+ }),
81
+ Schema.Struct({
82
+ name: Schema.String,
83
+ type: Schema.Literal("jwt"),
84
+ }),
85
+ ])),
86
+ })
87
+ .pipe(Schema.encodeKeys({ authIdCharacteristics: "auth_id_characteristics" }))
88
+ .pipe(T.ResponsePath("result"));
89
+ export const putConfiguration = API.make(() => ({
90
+ input: PutConfigurationRequest,
91
+ output: PutConfigurationResponse,
92
+ errors: [InvalidObjectIdentifier, NotEntitled],
93
+ }));
94
+ export const GetDiscoveryRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
95
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
96
+ }).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/api_gateway/discovery" }));
97
+ export const GetDiscoveryResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
98
+ schemas: Schema.Array(Schema.Unknown),
99
+ timestamp: Schema.String,
100
+ }).pipe(T.ResponsePath("result"));
101
+ export const getDiscovery = API.make(() => ({
102
+ input: GetDiscoveryRequest,
103
+ output: GetDiscoveryResponse,
104
+ errors: [InvalidObjectIdentifier, NotEntitled],
105
+ }));
106
+ export const ListDiscoveryOperationsRequest =
107
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
108
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
109
+ diff: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("diff")),
110
+ direction: Schema.optional(Schema.Literals(["asc", "desc"])).pipe(T.HttpQuery("direction")),
111
+ endpoint: Schema.optional(Schema.String).pipe(T.HttpQuery("endpoint")),
112
+ host: Schema.optional(Schema.Array(Schema.String)).pipe(T.HttpQuery("host")),
113
+ method: Schema.optional(Schema.Array(Schema.String)).pipe(T.HttpQuery("method")),
114
+ order: Schema.optional(Schema.Literals([
115
+ "host",
116
+ "method",
117
+ "endpoint",
118
+ "traffic_stats.requests",
119
+ "traffic_stats.last_updated",
120
+ ])).pipe(T.HttpQuery("order")),
121
+ origin: Schema.optional(Schema.Literals(["ML", "SessionIdentifier", "LabelDiscovery"])).pipe(T.HttpQuery("origin")),
122
+ state: Schema.optional(Schema.Literals(["review", "saved", "ignored"])).pipe(T.HttpQuery("state")),
123
+ }).pipe(T.Http({
124
+ method: "GET",
125
+ path: "/zones/{zone_id}/api_gateway/discovery/operations",
126
+ }));
127
+ export const ListDiscoveryOperationsResponse =
128
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
129
+ export const listDiscoveryOperations = API.make(() => ({
130
+ input: ListDiscoveryOperationsRequest,
131
+ output: ListDiscoveryOperationsResponse,
132
+ errors: [],
133
+ }));
134
+ export const PatchDiscoveryOperationRequest =
135
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
136
+ operationId: Schema.String.pipe(T.HttpPath("operationId")),
137
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
138
+ state: Schema.optional(Schema.Literals(["review", "ignored"])),
139
+ }).pipe(T.Http({
140
+ method: "PATCH",
141
+ path: "/zones/{zone_id}/api_gateway/discovery/operations/{operationId}",
142
+ }));
143
+ export const PatchDiscoveryOperationResponse =
144
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
145
+ state: Schema.optional(Schema.Union([
146
+ Schema.Literals(["review", "saved", "ignored"]),
147
+ Schema.Null,
148
+ ])),
149
+ }).pipe(T.ResponsePath("result"));
150
+ export const patchDiscoveryOperation = API.make(() => ({
151
+ input: PatchDiscoveryOperationRequest,
152
+ output: PatchDiscoveryOperationResponse,
153
+ errors: [InvalidObjectIdentifier, NotEntitled],
154
+ }));
155
+ export const BulkPatchDiscoveryOperationsRequest =
156
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
157
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
158
+ body: Schema.Struct({}).pipe(T.HttpBody()),
159
+ }).pipe(T.Http({
160
+ method: "PATCH",
161
+ path: "/zones/{zone_id}/api_gateway/discovery/operations",
162
+ }));
163
+ export const BulkPatchDiscoveryOperationsResponse =
164
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({}).pipe(T.ResponsePath("result"));
165
+ export const bulkPatchDiscoveryOperations = API.make(() => ({
166
+ input: BulkPatchDiscoveryOperationsRequest,
167
+ output: BulkPatchDiscoveryOperationsResponse,
168
+ errors: [InvalidObjectIdentifier, NotEntitled],
169
+ }));
170
+ export const CreateExpressionTemplateFallthroughRequest =
171
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
172
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
173
+ hosts: Schema.Array(Schema.String),
174
+ }).pipe(T.Http({
175
+ method: "POST",
176
+ path: "/zones/{zone_id}/api_gateway/expression-template/fallthrough",
177
+ }));
178
+ export const CreateExpressionTemplateFallthroughResponse =
179
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
180
+ expression: Schema.String,
181
+ title: Schema.String,
182
+ }).pipe(T.ResponsePath("result"));
183
+ export const createExpressionTemplateFallthrough = API.make(() => ({
184
+ input: CreateExpressionTemplateFallthroughRequest,
185
+ output: CreateExpressionTemplateFallthroughResponse,
186
+ errors: [InvalidObjectIdentifier],
187
+ }));
188
+ export const GetOperationRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
189
+ operationId: Schema.String.pipe(T.HttpPath("operationId")),
190
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
191
+ feature: Schema.optional(Schema.Array(Schema.Literals(["thresholds", "parameter_schemas", "schema_info"]))).pipe(T.HttpQuery("feature")),
192
+ }).pipe(T.Http({
193
+ method: "GET",
194
+ path: "/zones/{zone_id}/api_gateway/operations/{operationId}",
195
+ }));
196
+ export const GetOperationResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
197
+ endpoint: Schema.String,
198
+ host: Schema.String,
199
+ lastUpdated: Schema.String,
200
+ method: Schema.Literals([
201
+ "GET",
202
+ "POST",
203
+ "HEAD",
204
+ "OPTIONS",
205
+ "PUT",
206
+ "DELETE",
207
+ "CONNECT",
208
+ "PATCH",
209
+ "TRACE",
210
+ ]),
211
+ operationId: Schema.String,
212
+ features: Schema.optional(Schema.Union([
213
+ Schema.Union([
214
+ Schema.Struct({
215
+ thresholds: Schema.optional(Schema.Union([
216
+ Schema.Struct({
217
+ authIdTokens: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
218
+ dataPoints: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
219
+ lastUpdated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
220
+ p50: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
221
+ p90: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
222
+ p99: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
223
+ periodSeconds: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
224
+ requests: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
225
+ suggestedThreshold: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
226
+ }).pipe(Schema.encodeKeys({
227
+ authIdTokens: "auth_id_tokens",
228
+ dataPoints: "data_points",
229
+ lastUpdated: "last_updated",
230
+ p50: "p50",
231
+ p90: "p90",
232
+ p99: "p99",
233
+ periodSeconds: "period_seconds",
234
+ requests: "requests",
235
+ suggestedThreshold: "suggested_threshold",
236
+ })),
237
+ Schema.Null,
238
+ ])),
239
+ }),
240
+ Schema.Struct({
241
+ parameterSchemas: Schema.Struct({
242
+ lastUpdated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
243
+ parameterSchemas: Schema.optional(Schema.Union([
244
+ Schema.Struct({
245
+ parameters: Schema.optional(Schema.Union([Schema.Array(Schema.Unknown), Schema.Null])),
246
+ responses: Schema.optional(Schema.Null),
247
+ }),
248
+ Schema.Null,
249
+ ])),
250
+ }).pipe(Schema.encodeKeys({
251
+ lastUpdated: "last_updated",
252
+ parameterSchemas: "parameter_schemas",
253
+ })),
254
+ }).pipe(Schema.encodeKeys({ parameterSchemas: "parameter_schemas" })),
255
+ Schema.Struct({
256
+ apiRouting: Schema.optional(Schema.Union([
257
+ Schema.Struct({
258
+ lastUpdated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
259
+ route: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
260
+ }).pipe(Schema.encodeKeys({
261
+ lastUpdated: "last_updated",
262
+ route: "route",
263
+ })),
264
+ Schema.Null,
265
+ ])),
266
+ }).pipe(Schema.encodeKeys({ apiRouting: "api_routing" })),
267
+ Schema.Struct({
268
+ confidenceIntervals: Schema.optional(Schema.Union([
269
+ Schema.Struct({
270
+ lastUpdated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
271
+ suggestedThreshold: Schema.optional(Schema.Union([
272
+ Schema.Struct({
273
+ confidenceIntervals: Schema.optional(Schema.Union([
274
+ Schema.Struct({
275
+ p90: Schema.optional(Schema.Union([
276
+ Schema.Struct({
277
+ lower: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
278
+ upper: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
279
+ }),
280
+ Schema.Null,
281
+ ])),
282
+ p95: Schema.optional(Schema.Union([
283
+ Schema.Struct({
284
+ lower: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
285
+ upper: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
286
+ }),
287
+ Schema.Null,
288
+ ])),
289
+ p99: Schema.optional(Schema.Union([
290
+ Schema.Struct({
291
+ lower: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
292
+ upper: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
293
+ }),
294
+ Schema.Null,
295
+ ])),
296
+ }),
297
+ Schema.Null,
298
+ ])),
299
+ mean: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
300
+ }).pipe(Schema.encodeKeys({
301
+ confidenceIntervals: "confidence_intervals",
302
+ mean: "mean",
303
+ })),
304
+ Schema.Null,
305
+ ])),
306
+ }).pipe(Schema.encodeKeys({
307
+ lastUpdated: "last_updated",
308
+ suggestedThreshold: "suggested_threshold",
309
+ })),
310
+ Schema.Null,
311
+ ])),
312
+ }).pipe(Schema.encodeKeys({ confidenceIntervals: "confidence_intervals" })),
313
+ Schema.Struct({
314
+ schemaInfo: Schema.optional(Schema.Union([
315
+ Schema.Struct({
316
+ activeSchema: Schema.optional(Schema.Union([
317
+ Schema.Struct({
318
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
319
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
320
+ isLearned: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
321
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
322
+ }).pipe(Schema.encodeKeys({
323
+ id: "id",
324
+ createdAt: "created_at",
325
+ isLearned: "is_learned",
326
+ name: "name",
327
+ })),
328
+ Schema.Null,
329
+ ])),
330
+ learnedAvailable: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
331
+ mitigationAction: Schema.optional(Schema.Union([
332
+ Schema.Literal("none"),
333
+ Schema.Literal("log"),
334
+ Schema.Literal("block"),
335
+ Schema.Null,
336
+ ])),
337
+ }).pipe(Schema.encodeKeys({
338
+ activeSchema: "active_schema",
339
+ learnedAvailable: "learned_available",
340
+ mitigationAction: "mitigation_action",
341
+ })),
342
+ Schema.Null,
343
+ ])),
344
+ }).pipe(Schema.encodeKeys({ schemaInfo: "schema_info" })),
345
+ ]),
346
+ Schema.Null,
347
+ ])),
348
+ })
349
+ .pipe(Schema.encodeKeys({
350
+ endpoint: "endpoint",
351
+ host: "host",
352
+ lastUpdated: "last_updated",
353
+ method: "method",
354
+ operationId: "operation_id",
355
+ features: "features",
356
+ }))
357
+ .pipe(T.ResponsePath("result"));
358
+ export const getOperation = API.make(() => ({
359
+ input: GetOperationRequest,
360
+ output: GetOperationResponse,
361
+ errors: [InvalidObjectIdentifier, OperationNotFound],
362
+ }));
363
+ export const ListOperationsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
364
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
365
+ direction: Schema.optional(Schema.Literals(["asc", "desc"])).pipe(T.HttpQuery("direction")),
366
+ endpoint: Schema.optional(Schema.String).pipe(T.HttpQuery("endpoint")),
367
+ feature: Schema.optional(Schema.Array(Schema.Literals(["thresholds", "parameter_schemas", "schema_info"]))).pipe(T.HttpQuery("feature")),
368
+ host: Schema.optional(Schema.Array(Schema.String)).pipe(T.HttpQuery("host")),
369
+ method: Schema.optional(Schema.Array(Schema.String)).pipe(T.HttpQuery("method")),
370
+ order: Schema.optional(Schema.Literals(["method", "host", "endpoint", "thresholds.$key"])).pipe(T.HttpQuery("order")),
371
+ }).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/api_gateway/operations" }));
372
+ export const ListOperationsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
373
+ result: Schema.Array(Schema.Struct({
374
+ endpoint: Schema.String,
375
+ host: Schema.String,
376
+ lastUpdated: Schema.String,
377
+ method: Schema.Literals([
378
+ "GET",
379
+ "POST",
380
+ "HEAD",
381
+ "OPTIONS",
382
+ "PUT",
383
+ "DELETE",
384
+ "CONNECT",
385
+ "PATCH",
386
+ "TRACE",
387
+ ]),
388
+ operationId: Schema.String,
389
+ features: Schema.optional(Schema.Union([
390
+ Schema.Union([
391
+ Schema.Struct({
392
+ thresholds: Schema.optional(Schema.Union([
393
+ Schema.Struct({
394
+ authIdTokens: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
395
+ dataPoints: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
396
+ lastUpdated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
397
+ p50: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
398
+ p90: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
399
+ p99: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
400
+ periodSeconds: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
401
+ requests: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
402
+ suggestedThreshold: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
403
+ }).pipe(Schema.encodeKeys({
404
+ authIdTokens: "auth_id_tokens",
405
+ dataPoints: "data_points",
406
+ lastUpdated: "last_updated",
407
+ p50: "p50",
408
+ p90: "p90",
409
+ p99: "p99",
410
+ periodSeconds: "period_seconds",
411
+ requests: "requests",
412
+ suggestedThreshold: "suggested_threshold",
413
+ })),
414
+ Schema.Null,
415
+ ])),
416
+ }),
417
+ Schema.Struct({
418
+ parameterSchemas: Schema.Struct({
419
+ lastUpdated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
420
+ parameterSchemas: Schema.optional(Schema.Union([
421
+ Schema.Struct({
422
+ parameters: Schema.optional(Schema.Union([
423
+ Schema.Array(Schema.Unknown),
424
+ Schema.Null,
425
+ ])),
426
+ responses: Schema.optional(Schema.Null),
427
+ }),
428
+ Schema.Null,
429
+ ])),
430
+ }).pipe(Schema.encodeKeys({
431
+ lastUpdated: "last_updated",
432
+ parameterSchemas: "parameter_schemas",
433
+ })),
434
+ }).pipe(Schema.encodeKeys({ parameterSchemas: "parameter_schemas" })),
435
+ Schema.Struct({
436
+ apiRouting: Schema.optional(Schema.Union([
437
+ Schema.Struct({
438
+ lastUpdated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
439
+ route: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
440
+ }).pipe(Schema.encodeKeys({
441
+ lastUpdated: "last_updated",
442
+ route: "route",
443
+ })),
444
+ Schema.Null,
445
+ ])),
446
+ }).pipe(Schema.encodeKeys({ apiRouting: "api_routing" })),
447
+ Schema.Struct({
448
+ confidenceIntervals: Schema.optional(Schema.Union([
449
+ Schema.Struct({
450
+ lastUpdated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
451
+ suggestedThreshold: Schema.optional(Schema.Union([
452
+ Schema.Struct({
453
+ confidenceIntervals: Schema.optional(Schema.Union([
454
+ Schema.Struct({
455
+ p90: Schema.optional(Schema.Union([
456
+ Schema.Struct({
457
+ lower: Schema.optional(Schema.Union([
458
+ Schema.Number,
459
+ Schema.Null,
460
+ ])),
461
+ upper: Schema.optional(Schema.Union([
462
+ Schema.Number,
463
+ Schema.Null,
464
+ ])),
465
+ }),
466
+ Schema.Null,
467
+ ])),
468
+ p95: Schema.optional(Schema.Union([
469
+ Schema.Struct({
470
+ lower: Schema.optional(Schema.Union([
471
+ Schema.Number,
472
+ Schema.Null,
473
+ ])),
474
+ upper: Schema.optional(Schema.Union([
475
+ Schema.Number,
476
+ Schema.Null,
477
+ ])),
478
+ }),
479
+ Schema.Null,
480
+ ])),
481
+ p99: Schema.optional(Schema.Union([
482
+ Schema.Struct({
483
+ lower: Schema.optional(Schema.Union([
484
+ Schema.Number,
485
+ Schema.Null,
486
+ ])),
487
+ upper: Schema.optional(Schema.Union([
488
+ Schema.Number,
489
+ Schema.Null,
490
+ ])),
491
+ }),
492
+ Schema.Null,
493
+ ])),
494
+ }),
495
+ Schema.Null,
496
+ ])),
497
+ mean: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
498
+ }).pipe(Schema.encodeKeys({
499
+ confidenceIntervals: "confidence_intervals",
500
+ mean: "mean",
501
+ })),
502
+ Schema.Null,
503
+ ])),
504
+ }).pipe(Schema.encodeKeys({
505
+ lastUpdated: "last_updated",
506
+ suggestedThreshold: "suggested_threshold",
507
+ })),
508
+ Schema.Null,
509
+ ])),
510
+ }).pipe(Schema.encodeKeys({
511
+ confidenceIntervals: "confidence_intervals",
512
+ })),
513
+ Schema.Struct({
514
+ schemaInfo: Schema.optional(Schema.Union([
515
+ Schema.Struct({
516
+ activeSchema: Schema.optional(Schema.Union([
517
+ Schema.Struct({
518
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
519
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
520
+ isLearned: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
521
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
522
+ }).pipe(Schema.encodeKeys({
523
+ id: "id",
524
+ createdAt: "created_at",
525
+ isLearned: "is_learned",
526
+ name: "name",
527
+ })),
528
+ Schema.Null,
529
+ ])),
530
+ learnedAvailable: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
531
+ mitigationAction: Schema.optional(Schema.Union([
532
+ Schema.Literal("none"),
533
+ Schema.Literal("log"),
534
+ Schema.Literal("block"),
535
+ Schema.Null,
536
+ ])),
537
+ }).pipe(Schema.encodeKeys({
538
+ activeSchema: "active_schema",
539
+ learnedAvailable: "learned_available",
540
+ mitigationAction: "mitigation_action",
541
+ })),
542
+ Schema.Null,
543
+ ])),
544
+ }).pipe(Schema.encodeKeys({ schemaInfo: "schema_info" })),
545
+ ]),
546
+ Schema.Null,
547
+ ])),
548
+ }).pipe(Schema.encodeKeys({
549
+ endpoint: "endpoint",
550
+ host: "host",
551
+ lastUpdated: "last_updated",
552
+ method: "method",
553
+ operationId: "operation_id",
554
+ features: "features",
555
+ }))),
556
+ resultInfo: Schema.Struct({
557
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
558
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
559
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
560
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
561
+ }).pipe(Schema.encodeKeys({
562
+ count: "count",
563
+ page: "page",
564
+ perPage: "per_page",
565
+ totalCount: "total_count",
566
+ })),
567
+ }).pipe(Schema.encodeKeys({ result: "result", resultInfo: "result_info" }));
568
+ export const listOperations = API.makePaginated(() => ({
569
+ input: ListOperationsRequest,
570
+ output: ListOperationsResponse,
571
+ errors: [],
572
+ pagination: {
573
+ mode: "page",
574
+ inputToken: "page",
575
+ outputToken: "resultInfo.page",
576
+ items: "result",
577
+ pageSize: "perPage",
578
+ },
579
+ }));
580
+ export const CreateOperationRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
581
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
582
+ endpoint: Schema.String,
583
+ host: Schema.String,
584
+ method: Schema.Literals([
585
+ "GET",
586
+ "POST",
587
+ "HEAD",
588
+ "OPTIONS",
589
+ "PUT",
590
+ "DELETE",
591
+ "CONNECT",
592
+ "PATCH",
593
+ "TRACE",
594
+ ]),
595
+ }).pipe(T.Http({
596
+ method: "POST",
597
+ path: "/zones/{zone_id}/api_gateway/operations/item",
598
+ }));
599
+ export const CreateOperationResponse =
600
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
601
+ endpoint: Schema.String,
602
+ host: Schema.String,
603
+ lastUpdated: Schema.String,
604
+ method: Schema.Literals([
605
+ "GET",
606
+ "POST",
607
+ "HEAD",
608
+ "OPTIONS",
609
+ "PUT",
610
+ "DELETE",
611
+ "CONNECT",
612
+ "PATCH",
613
+ "TRACE",
614
+ ]),
615
+ operationId: Schema.String,
616
+ features: Schema.optional(Schema.Union([
617
+ Schema.Union([
618
+ Schema.Struct({
619
+ thresholds: Schema.optional(Schema.Union([
620
+ Schema.Struct({
621
+ authIdTokens: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
622
+ dataPoints: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
623
+ lastUpdated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
624
+ p50: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
625
+ p90: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
626
+ p99: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
627
+ periodSeconds: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
628
+ requests: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
629
+ suggestedThreshold: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
630
+ }).pipe(Schema.encodeKeys({
631
+ authIdTokens: "auth_id_tokens",
632
+ dataPoints: "data_points",
633
+ lastUpdated: "last_updated",
634
+ p50: "p50",
635
+ p90: "p90",
636
+ p99: "p99",
637
+ periodSeconds: "period_seconds",
638
+ requests: "requests",
639
+ suggestedThreshold: "suggested_threshold",
640
+ })),
641
+ Schema.Null,
642
+ ])),
643
+ }),
644
+ Schema.Struct({
645
+ parameterSchemas: Schema.Struct({
646
+ lastUpdated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
647
+ parameterSchemas: Schema.optional(Schema.Union([
648
+ Schema.Struct({
649
+ parameters: Schema.optional(Schema.Union([Schema.Array(Schema.Unknown), Schema.Null])),
650
+ responses: Schema.optional(Schema.Null),
651
+ }),
652
+ Schema.Null,
653
+ ])),
654
+ }).pipe(Schema.encodeKeys({
655
+ lastUpdated: "last_updated",
656
+ parameterSchemas: "parameter_schemas",
657
+ })),
658
+ }).pipe(Schema.encodeKeys({ parameterSchemas: "parameter_schemas" })),
659
+ Schema.Struct({
660
+ apiRouting: Schema.optional(Schema.Union([
661
+ Schema.Struct({
662
+ lastUpdated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
663
+ route: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
664
+ }).pipe(Schema.encodeKeys({
665
+ lastUpdated: "last_updated",
666
+ route: "route",
667
+ })),
668
+ Schema.Null,
669
+ ])),
670
+ }).pipe(Schema.encodeKeys({ apiRouting: "api_routing" })),
671
+ Schema.Struct({
672
+ confidenceIntervals: Schema.optional(Schema.Union([
673
+ Schema.Struct({
674
+ lastUpdated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
675
+ suggestedThreshold: Schema.optional(Schema.Union([
676
+ Schema.Struct({
677
+ confidenceIntervals: Schema.optional(Schema.Union([
678
+ Schema.Struct({
679
+ p90: Schema.optional(Schema.Union([
680
+ Schema.Struct({
681
+ lower: Schema.optional(Schema.Union([
682
+ Schema.Number,
683
+ Schema.Null,
684
+ ])),
685
+ upper: Schema.optional(Schema.Union([
686
+ Schema.Number,
687
+ Schema.Null,
688
+ ])),
689
+ }),
690
+ Schema.Null,
691
+ ])),
692
+ p95: Schema.optional(Schema.Union([
693
+ Schema.Struct({
694
+ lower: Schema.optional(Schema.Union([
695
+ Schema.Number,
696
+ Schema.Null,
697
+ ])),
698
+ upper: Schema.optional(Schema.Union([
699
+ Schema.Number,
700
+ Schema.Null,
701
+ ])),
702
+ }),
703
+ Schema.Null,
704
+ ])),
705
+ p99: Schema.optional(Schema.Union([
706
+ Schema.Struct({
707
+ lower: Schema.optional(Schema.Union([
708
+ Schema.Number,
709
+ Schema.Null,
710
+ ])),
711
+ upper: Schema.optional(Schema.Union([
712
+ Schema.Number,
713
+ Schema.Null,
714
+ ])),
715
+ }),
716
+ Schema.Null,
717
+ ])),
718
+ }),
719
+ Schema.Null,
720
+ ])),
721
+ mean: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
722
+ }).pipe(Schema.encodeKeys({
723
+ confidenceIntervals: "confidence_intervals",
724
+ mean: "mean",
725
+ })),
726
+ Schema.Null,
727
+ ])),
728
+ }).pipe(Schema.encodeKeys({
729
+ lastUpdated: "last_updated",
730
+ suggestedThreshold: "suggested_threshold",
731
+ })),
732
+ Schema.Null,
733
+ ])),
734
+ }).pipe(Schema.encodeKeys({ confidenceIntervals: "confidence_intervals" })),
735
+ Schema.Struct({
736
+ schemaInfo: Schema.optional(Schema.Union([
737
+ Schema.Struct({
738
+ activeSchema: Schema.optional(Schema.Union([
739
+ Schema.Struct({
740
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
741
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
742
+ isLearned: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
743
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
744
+ }).pipe(Schema.encodeKeys({
745
+ id: "id",
746
+ createdAt: "created_at",
747
+ isLearned: "is_learned",
748
+ name: "name",
749
+ })),
750
+ Schema.Null,
751
+ ])),
752
+ learnedAvailable: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
753
+ mitigationAction: Schema.optional(Schema.Union([
754
+ Schema.Literal("none"),
755
+ Schema.Literal("log"),
756
+ Schema.Literal("block"),
757
+ Schema.Null,
758
+ ])),
759
+ }).pipe(Schema.encodeKeys({
760
+ activeSchema: "active_schema",
761
+ learnedAvailable: "learned_available",
762
+ mitigationAction: "mitigation_action",
763
+ })),
764
+ Schema.Null,
765
+ ])),
766
+ }).pipe(Schema.encodeKeys({ schemaInfo: "schema_info" })),
767
+ ]),
768
+ Schema.Null,
769
+ ])),
770
+ })
771
+ .pipe(Schema.encodeKeys({
772
+ endpoint: "endpoint",
773
+ host: "host",
774
+ lastUpdated: "last_updated",
775
+ method: "method",
776
+ operationId: "operation_id",
777
+ features: "features",
778
+ }))
779
+ .pipe(T.ResponsePath("result"));
780
+ export const createOperation = API.make(() => ({
781
+ input: CreateOperationRequest,
782
+ output: CreateOperationResponse,
783
+ errors: [InvalidObjectIdentifier],
784
+ }));
785
+ export const DeleteOperationRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
786
+ operationId: Schema.String.pipe(T.HttpPath("operationId")),
787
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
788
+ }).pipe(T.Http({
789
+ method: "DELETE",
790
+ path: "/zones/{zone_id}/api_gateway/operations/{operationId}",
791
+ }));
792
+ export const DeleteOperationResponse =
793
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
794
+ errors: Schema.Unknown,
795
+ messages: Schema.Unknown,
796
+ success: Schema.Literal(true),
797
+ });
798
+ export const deleteOperation = API.make(() => ({
799
+ input: DeleteOperationRequest,
800
+ output: DeleteOperationResponse,
801
+ errors: [InvalidObjectIdentifier, OperationNotFound],
802
+ }));
803
+ export const BulkCreateOperationsRequest =
804
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
805
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
806
+ body: Schema.Array(Schema.Struct({
807
+ endpoint: Schema.String,
808
+ host: Schema.String,
809
+ method: Schema.Literals([
810
+ "GET",
811
+ "POST",
812
+ "HEAD",
813
+ "OPTIONS",
814
+ "PUT",
815
+ "DELETE",
816
+ "CONNECT",
817
+ "PATCH",
818
+ "TRACE",
819
+ ]),
820
+ })).pipe(T.HttpBody()),
821
+ }).pipe(T.Http({ method: "POST", path: "/zones/{zone_id}/api_gateway/operations" }));
822
+ export const BulkCreateOperationsResponse =
823
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
824
+ result: Schema.Array(Schema.Struct({
825
+ endpoint: Schema.String,
826
+ host: Schema.String,
827
+ lastUpdated: Schema.String,
828
+ method: Schema.Literals([
829
+ "GET",
830
+ "POST",
831
+ "HEAD",
832
+ "OPTIONS",
833
+ "PUT",
834
+ "DELETE",
835
+ "CONNECT",
836
+ "PATCH",
837
+ "TRACE",
838
+ ]),
839
+ operationId: Schema.String,
840
+ features: Schema.optional(Schema.Union([
841
+ Schema.Union([
842
+ Schema.Struct({
843
+ thresholds: Schema.optional(Schema.Union([
844
+ Schema.Struct({
845
+ authIdTokens: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
846
+ dataPoints: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
847
+ lastUpdated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
848
+ p50: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
849
+ p90: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
850
+ p99: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
851
+ periodSeconds: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
852
+ requests: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
853
+ suggestedThreshold: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
854
+ }).pipe(Schema.encodeKeys({
855
+ authIdTokens: "auth_id_tokens",
856
+ dataPoints: "data_points",
857
+ lastUpdated: "last_updated",
858
+ p50: "p50",
859
+ p90: "p90",
860
+ p99: "p99",
861
+ periodSeconds: "period_seconds",
862
+ requests: "requests",
863
+ suggestedThreshold: "suggested_threshold",
864
+ })),
865
+ Schema.Null,
866
+ ])),
867
+ }),
868
+ Schema.Struct({
869
+ parameterSchemas: Schema.Struct({
870
+ lastUpdated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
871
+ parameterSchemas: Schema.optional(Schema.Union([
872
+ Schema.Struct({
873
+ parameters: Schema.optional(Schema.Union([
874
+ Schema.Array(Schema.Unknown),
875
+ Schema.Null,
876
+ ])),
877
+ responses: Schema.optional(Schema.Null),
878
+ }),
879
+ Schema.Null,
880
+ ])),
881
+ }).pipe(Schema.encodeKeys({
882
+ lastUpdated: "last_updated",
883
+ parameterSchemas: "parameter_schemas",
884
+ })),
885
+ }).pipe(Schema.encodeKeys({ parameterSchemas: "parameter_schemas" })),
886
+ Schema.Struct({
887
+ apiRouting: Schema.optional(Schema.Union([
888
+ Schema.Struct({
889
+ lastUpdated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
890
+ route: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
891
+ }).pipe(Schema.encodeKeys({
892
+ lastUpdated: "last_updated",
893
+ route: "route",
894
+ })),
895
+ Schema.Null,
896
+ ])),
897
+ }).pipe(Schema.encodeKeys({ apiRouting: "api_routing" })),
898
+ Schema.Struct({
899
+ confidenceIntervals: Schema.optional(Schema.Union([
900
+ Schema.Struct({
901
+ lastUpdated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
902
+ suggestedThreshold: Schema.optional(Schema.Union([
903
+ Schema.Struct({
904
+ confidenceIntervals: Schema.optional(Schema.Union([
905
+ Schema.Struct({
906
+ p90: Schema.optional(Schema.Union([
907
+ Schema.Struct({
908
+ lower: Schema.optional(Schema.Union([
909
+ Schema.Number,
910
+ Schema.Null,
911
+ ])),
912
+ upper: Schema.optional(Schema.Union([
913
+ Schema.Number,
914
+ Schema.Null,
915
+ ])),
916
+ }),
917
+ Schema.Null,
918
+ ])),
919
+ p95: Schema.optional(Schema.Union([
920
+ Schema.Struct({
921
+ lower: Schema.optional(Schema.Union([
922
+ Schema.Number,
923
+ Schema.Null,
924
+ ])),
925
+ upper: Schema.optional(Schema.Union([
926
+ Schema.Number,
927
+ Schema.Null,
928
+ ])),
929
+ }),
930
+ Schema.Null,
931
+ ])),
932
+ p99: Schema.optional(Schema.Union([
933
+ Schema.Struct({
934
+ lower: Schema.optional(Schema.Union([
935
+ Schema.Number,
936
+ Schema.Null,
937
+ ])),
938
+ upper: Schema.optional(Schema.Union([
939
+ Schema.Number,
940
+ Schema.Null,
941
+ ])),
942
+ }),
943
+ Schema.Null,
944
+ ])),
945
+ }),
946
+ Schema.Null,
947
+ ])),
948
+ mean: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
949
+ }).pipe(Schema.encodeKeys({
950
+ confidenceIntervals: "confidence_intervals",
951
+ mean: "mean",
952
+ })),
953
+ Schema.Null,
954
+ ])),
955
+ }).pipe(Schema.encodeKeys({
956
+ lastUpdated: "last_updated",
957
+ suggestedThreshold: "suggested_threshold",
958
+ })),
959
+ Schema.Null,
960
+ ])),
961
+ }).pipe(Schema.encodeKeys({
962
+ confidenceIntervals: "confidence_intervals",
963
+ })),
964
+ Schema.Struct({
965
+ schemaInfo: Schema.optional(Schema.Union([
966
+ Schema.Struct({
967
+ activeSchema: Schema.optional(Schema.Union([
968
+ Schema.Struct({
969
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
970
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
971
+ isLearned: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
972
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
973
+ }).pipe(Schema.encodeKeys({
974
+ id: "id",
975
+ createdAt: "created_at",
976
+ isLearned: "is_learned",
977
+ name: "name",
978
+ })),
979
+ Schema.Null,
980
+ ])),
981
+ learnedAvailable: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
982
+ mitigationAction: Schema.optional(Schema.Union([
983
+ Schema.Literal("none"),
984
+ Schema.Literal("log"),
985
+ Schema.Literal("block"),
986
+ Schema.Null,
987
+ ])),
988
+ }).pipe(Schema.encodeKeys({
989
+ activeSchema: "active_schema",
990
+ learnedAvailable: "learned_available",
991
+ mitigationAction: "mitigation_action",
992
+ })),
993
+ Schema.Null,
994
+ ])),
995
+ }).pipe(Schema.encodeKeys({ schemaInfo: "schema_info" })),
996
+ ]),
997
+ Schema.Null,
998
+ ])),
999
+ }).pipe(Schema.encodeKeys({
1000
+ endpoint: "endpoint",
1001
+ host: "host",
1002
+ lastUpdated: "last_updated",
1003
+ method: "method",
1004
+ operationId: "operation_id",
1005
+ features: "features",
1006
+ }))),
1007
+ });
1008
+ export const bulkCreateOperations = API.makePaginated(() => ({
1009
+ input: BulkCreateOperationsRequest,
1010
+ output: BulkCreateOperationsResponse,
1011
+ errors: [],
1012
+ pagination: {
1013
+ mode: "single",
1014
+ items: "result",
1015
+ },
1016
+ }));
1017
+ export const BulkDeleteOperationsRequest =
1018
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1019
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1020
+ }).pipe(T.Http({
1021
+ method: "DELETE",
1022
+ path: "/zones/{zone_id}/api_gateway/operations",
1023
+ }));
1024
+ export const BulkDeleteOperationsResponse =
1025
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1026
+ errors: Schema.Unknown,
1027
+ messages: Schema.Unknown,
1028
+ success: Schema.Literal(true),
1029
+ });
1030
+ export const bulkDeleteOperations = API.make(() => ({
1031
+ input: BulkDeleteOperationsRequest,
1032
+ output: BulkDeleteOperationsResponse,
1033
+ errors: [InvalidObjectIdentifier],
1034
+ }));
1035
+ export const GetOperationSchemaValidationRequest =
1036
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1037
+ operationId: Schema.String.pipe(T.HttpPath("operationId")),
1038
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1039
+ }).pipe(T.Http({
1040
+ method: "GET",
1041
+ path: "/zones/{zone_id}/api_gateway/operations/{operationId}/schema_validation",
1042
+ }));
1043
+ export const GetOperationSchemaValidationResponse =
1044
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1045
+ mitigationAction: Schema.optional(Schema.Union([
1046
+ Schema.Literal("log"),
1047
+ Schema.Literal("block"),
1048
+ Schema.Literal("none"),
1049
+ Schema.Null,
1050
+ ])),
1051
+ operationId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1052
+ }).pipe(Schema.encodeKeys({
1053
+ mitigationAction: "mitigation_action",
1054
+ operationId: "operation_id",
1055
+ }));
1056
+ export const getOperationSchemaValidation = API.make(() => ({
1057
+ input: GetOperationSchemaValidationRequest,
1058
+ output: GetOperationSchemaValidationResponse,
1059
+ errors: [InvalidObjectIdentifier, OperationNotFound],
1060
+ }));
1061
+ export const PutOperationSchemaValidationRequest =
1062
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1063
+ operationId: Schema.String.pipe(T.HttpPath("operationId")),
1064
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1065
+ mitigationAction: Schema.optional(Schema.Union([
1066
+ Schema.Literal("log"),
1067
+ Schema.Literal("block"),
1068
+ Schema.Literal("none"),
1069
+ Schema.Null,
1070
+ ])),
1071
+ }).pipe(Schema.encodeKeys({ mitigationAction: "mitigation_action" }), T.Http({
1072
+ method: "PUT",
1073
+ path: "/zones/{zone_id}/api_gateway/operations/{operationId}/schema_validation",
1074
+ }));
1075
+ export const PutOperationSchemaValidationResponse =
1076
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1077
+ mitigationAction: Schema.optional(Schema.Union([
1078
+ Schema.Literal("log"),
1079
+ Schema.Literal("block"),
1080
+ Schema.Literal("none"),
1081
+ Schema.Null,
1082
+ ])),
1083
+ operationId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1084
+ }).pipe(Schema.encodeKeys({
1085
+ mitigationAction: "mitigation_action",
1086
+ operationId: "operation_id",
1087
+ }));
1088
+ export const putOperationSchemaValidation = API.make(() => ({
1089
+ input: PutOperationSchemaValidationRequest,
1090
+ output: PutOperationSchemaValidationResponse,
1091
+ errors: [InvalidObjectIdentifier, OperationNotFound],
1092
+ }));
1093
+ export const PatchOperationSchemaValidationRequest =
1094
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1095
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1096
+ settingsMultipleRequest: Schema.Unknown,
1097
+ }).pipe(Schema.encodeKeys({ settingsMultipleRequest: "settings_multiple_request" }), T.Http({
1098
+ method: "PATCH",
1099
+ path: "/zones/{zone_id}/api_gateway/operations/schema_validation",
1100
+ }));
1101
+ export const PatchOperationSchemaValidationResponse =
1102
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({}).pipe(T.ResponsePath("result"));
1103
+ export const patchOperationSchemaValidation = API.make(() => ({
1104
+ input: PatchOperationSchemaValidationRequest,
1105
+ output: PatchOperationSchemaValidationResponse,
1106
+ errors: [InvalidObjectIdentifier],
1107
+ }));
1108
+ export const ListSchemasRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1109
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1110
+ feature: Schema.optional(Schema.Array(Schema.Literals(["thresholds", "parameter_schemas", "schema_info"]))).pipe(T.HttpQuery("feature")),
1111
+ host: Schema.optional(Schema.Array(Schema.String)).pipe(T.HttpQuery("host")),
1112
+ }).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/api_gateway/schemas" }));
1113
+ export const ListSchemasResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1114
+ schemas: Schema.optional(Schema.Union([Schema.Array(Schema.Unknown), Schema.Null])),
1115
+ timestamp: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1116
+ }).pipe(T.ResponsePath("result"));
1117
+ export const listSchemas = API.make(() => ({
1118
+ input: ListSchemasRequest,
1119
+ output: ListSchemasResponse,
1120
+ errors: [InvalidObjectIdentifier],
1121
+ }));
1122
+ export const GetSettingSchemaValidationRequest =
1123
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1124
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1125
+ }).pipe(T.Http({
1126
+ method: "GET",
1127
+ path: "/zones/{zone_id}/api_gateway/settings/schema_validation",
1128
+ }));
1129
+ export const GetSettingSchemaValidationResponse =
1130
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
1131
+ export const getSettingSchemaValidation = API.make(() => ({
1132
+ input: GetSettingSchemaValidationRequest,
1133
+ output: GetSettingSchemaValidationResponse,
1134
+ errors: [InvalidObjectIdentifier],
1135
+ }));
1136
+ export const PutSettingSchemaValidationRequest =
1137
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1138
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1139
+ validationDefaultMitigationAction: Schema.Literals([
1140
+ "none",
1141
+ "log",
1142
+ "block",
1143
+ ]),
1144
+ validationOverrideMitigationAction: Schema.optional(Schema.Union([
1145
+ Schema.Literal("none"),
1146
+ Schema.Literal("disable_override"),
1147
+ Schema.Null,
1148
+ ])),
1149
+ }).pipe(Schema.encodeKeys({
1150
+ validationDefaultMitigationAction: "validation_default_mitigation_action",
1151
+ validationOverrideMitigationAction: "validation_override_mitigation_action",
1152
+ }), T.Http({
1153
+ method: "PUT",
1154
+ path: "/zones/{zone_id}/api_gateway/settings/schema_validation",
1155
+ }));
1156
+ export const PutSettingSchemaValidationResponse =
1157
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
1158
+ export const putSettingSchemaValidation = API.make(() => ({
1159
+ input: PutSettingSchemaValidationRequest,
1160
+ output: PutSettingSchemaValidationResponse,
1161
+ errors: [InvalidObjectIdentifier],
1162
+ }));
1163
+ export const PatchSettingSchemaValidationRequest =
1164
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1165
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1166
+ validationDefaultMitigationAction: Schema.optional(Schema.Union([
1167
+ Schema.Literal("none"),
1168
+ Schema.Literal("log"),
1169
+ Schema.Literal("block"),
1170
+ Schema.Null,
1171
+ ])),
1172
+ validationOverrideMitigationAction: Schema.optional(Schema.Union([
1173
+ Schema.Literal("none"),
1174
+ Schema.Literal("disable_override"),
1175
+ Schema.Null,
1176
+ ])),
1177
+ }).pipe(Schema.encodeKeys({
1178
+ validationDefaultMitigationAction: "validation_default_mitigation_action",
1179
+ validationOverrideMitigationAction: "validation_override_mitigation_action",
1180
+ }), T.Http({
1181
+ method: "PATCH",
1182
+ path: "/zones/{zone_id}/api_gateway/settings/schema_validation",
1183
+ }));
1184
+ export const PatchSettingSchemaValidationResponse =
1185
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
1186
+ export const patchSettingSchemaValidation = API.make(() => ({
1187
+ input: PatchSettingSchemaValidationRequest,
1188
+ output: PatchSettingSchemaValidationResponse,
1189
+ errors: [InvalidObjectIdentifier],
1190
+ }));
1191
+ export const GetUserSchemaRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1192
+ schemaId: Schema.String.pipe(T.HttpPath("schemaId")),
1193
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1194
+ omitSource: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("omit_source")),
1195
+ }).pipe(T.Http({
1196
+ method: "GET",
1197
+ path: "/zones/{zone_id}/api_gateway/user_schemas/{schemaId}",
1198
+ }));
1199
+ export const GetUserSchemaResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1200
+ createdAt: Schema.String,
1201
+ kind: Schema.Literal("openapi_v3"),
1202
+ name: Schema.String,
1203
+ schemaId: Schema.String,
1204
+ source: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1205
+ validationEnabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1206
+ })
1207
+ .pipe(Schema.encodeKeys({
1208
+ createdAt: "created_at",
1209
+ kind: "kind",
1210
+ name: "name",
1211
+ schemaId: "schema_id",
1212
+ source: "source",
1213
+ validationEnabled: "validation_enabled",
1214
+ }))
1215
+ .pipe(T.ResponsePath("result"));
1216
+ export const getUserSchema = API.make(() => ({
1217
+ input: GetUserSchemaRequest,
1218
+ output: GetUserSchemaResponse,
1219
+ errors: [InvalidObjectIdentifier, SchemaNotFound],
1220
+ }));
1221
+ export const ListUserSchemasRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1222
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1223
+ omitSource: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("omit_source")),
1224
+ validationEnabled: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("validation_enabled")),
1225
+ }).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/api_gateway/user_schemas" }));
1226
+ export const ListUserSchemasResponse =
1227
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1228
+ result: Schema.Array(Schema.Struct({
1229
+ createdAt: Schema.String,
1230
+ kind: Schema.Literal("openapi_v3"),
1231
+ name: Schema.String,
1232
+ schemaId: Schema.String,
1233
+ source: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1234
+ validationEnabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1235
+ }).pipe(Schema.encodeKeys({
1236
+ createdAt: "created_at",
1237
+ kind: "kind",
1238
+ name: "name",
1239
+ schemaId: "schema_id",
1240
+ source: "source",
1241
+ validationEnabled: "validation_enabled",
1242
+ }))),
1243
+ resultInfo: Schema.Struct({
1244
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1245
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1246
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1247
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1248
+ }).pipe(Schema.encodeKeys({
1249
+ count: "count",
1250
+ page: "page",
1251
+ perPage: "per_page",
1252
+ totalCount: "total_count",
1253
+ })),
1254
+ }).pipe(Schema.encodeKeys({ result: "result", resultInfo: "result_info" }));
1255
+ export const listUserSchemas = API.makePaginated(() => ({
1256
+ input: ListUserSchemasRequest,
1257
+ output: ListUserSchemasResponse,
1258
+ errors: [],
1259
+ pagination: {
1260
+ mode: "page",
1261
+ inputToken: "page",
1262
+ outputToken: "resultInfo.page",
1263
+ items: "result",
1264
+ pageSize: "perPage",
1265
+ },
1266
+ }));
1267
+ export const CreateUserSchemaRequest =
1268
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1269
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1270
+ file: UploadableSchema.pipe(T.HttpFormDataFile()),
1271
+ kind: Schema.Literal("openapi_v3"),
1272
+ name: Schema.optional(Schema.String),
1273
+ validationEnabled: Schema.optional(Schema.Literals([true, false])),
1274
+ }).pipe(Schema.encodeKeys({
1275
+ file: "file",
1276
+ kind: "kind",
1277
+ name: "name",
1278
+ validationEnabled: "validation_enabled",
1279
+ }), T.Http({
1280
+ method: "POST",
1281
+ path: "/zones/{zone_id}/api_gateway/user_schemas",
1282
+ contentType: "multipart",
1283
+ }));
1284
+ export const CreateUserSchemaResponse =
1285
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1286
+ schema: Schema.Struct({
1287
+ createdAt: Schema.String,
1288
+ kind: Schema.Literal("openapi_v3"),
1289
+ name: Schema.String,
1290
+ schemaId: Schema.String,
1291
+ source: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1292
+ validationEnabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1293
+ }).pipe(Schema.encodeKeys({
1294
+ createdAt: "created_at",
1295
+ kind: "kind",
1296
+ name: "name",
1297
+ schemaId: "schema_id",
1298
+ source: "source",
1299
+ validationEnabled: "validation_enabled",
1300
+ })),
1301
+ uploadDetails: Schema.optional(Schema.Union([
1302
+ Schema.Struct({
1303
+ warnings: Schema.optional(Schema.Union([
1304
+ Schema.Array(Schema.Struct({
1305
+ code: Schema.Number,
1306
+ locations: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1307
+ message: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1308
+ })),
1309
+ Schema.Null,
1310
+ ])),
1311
+ }),
1312
+ Schema.Null,
1313
+ ])),
1314
+ })
1315
+ .pipe(Schema.encodeKeys({ schema: "schema", uploadDetails: "upload_details" }))
1316
+ .pipe(T.ResponsePath("result"));
1317
+ export const createUserSchema = API.make(() => ({
1318
+ input: CreateUserSchemaRequest,
1319
+ output: CreateUserSchemaResponse,
1320
+ errors: [InvalidObjectIdentifier],
1321
+ }));
1322
+ export const PatchUserSchemaRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1323
+ schemaId: Schema.String.pipe(T.HttpPath("schemaId")),
1324
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1325
+ validationEnabled: Schema.optional(Schema.Literal(true)),
1326
+ }).pipe(Schema.encodeKeys({ validationEnabled: "validation_enabled" }), T.Http({
1327
+ method: "PATCH",
1328
+ path: "/zones/{zone_id}/api_gateway/user_schemas/{schemaId}",
1329
+ }));
1330
+ export const PatchUserSchemaResponse =
1331
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1332
+ createdAt: Schema.String,
1333
+ kind: Schema.Literal("openapi_v3"),
1334
+ name: Schema.String,
1335
+ schemaId: Schema.String,
1336
+ source: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1337
+ validationEnabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1338
+ })
1339
+ .pipe(Schema.encodeKeys({
1340
+ createdAt: "created_at",
1341
+ kind: "kind",
1342
+ name: "name",
1343
+ schemaId: "schema_id",
1344
+ source: "source",
1345
+ validationEnabled: "validation_enabled",
1346
+ }))
1347
+ .pipe(T.ResponsePath("result"));
1348
+ export const patchUserSchema = API.make(() => ({
1349
+ input: PatchUserSchemaRequest,
1350
+ output: PatchUserSchemaResponse,
1351
+ errors: [InvalidObjectIdentifier, SchemaNotFound],
1352
+ }));
1353
+ export const DeleteUserSchemaRequest =
1354
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1355
+ schemaId: Schema.String.pipe(T.HttpPath("schemaId")),
1356
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1357
+ }).pipe(T.Http({
1358
+ method: "DELETE",
1359
+ path: "/zones/{zone_id}/api_gateway/user_schemas/{schemaId}",
1360
+ }));
1361
+ export const DeleteUserSchemaResponse =
1362
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1363
+ errors: Schema.Unknown,
1364
+ messages: Schema.Unknown,
1365
+ success: Schema.Literal(true),
1366
+ });
1367
+ export const deleteUserSchema = API.make(() => ({
1368
+ input: DeleteUserSchemaRequest,
1369
+ output: DeleteUserSchemaResponse,
1370
+ errors: [InvalidObjectIdentifier, SchemaNotFound],
1371
+ }));
1372
+ export const ListUserSchemaHostsRequest =
1373
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1374
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1375
+ }).pipe(T.Http({
1376
+ method: "GET",
1377
+ path: "/zones/{zone_id}/api_gateway/user_schemas/hosts",
1378
+ }));
1379
+ export const ListUserSchemaHostsResponse =
1380
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1381
+ result: Schema.Array(Schema.Struct({
1382
+ createdAt: Schema.String,
1383
+ hosts: Schema.Array(Schema.String),
1384
+ name: Schema.String,
1385
+ schemaId: Schema.String,
1386
+ }).pipe(Schema.encodeKeys({
1387
+ createdAt: "created_at",
1388
+ hosts: "hosts",
1389
+ name: "name",
1390
+ schemaId: "schema_id",
1391
+ }))),
1392
+ resultInfo: Schema.Struct({
1393
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1394
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1395
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1396
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1397
+ }).pipe(Schema.encodeKeys({
1398
+ count: "count",
1399
+ page: "page",
1400
+ perPage: "per_page",
1401
+ totalCount: "total_count",
1402
+ })),
1403
+ }).pipe(Schema.encodeKeys({ result: "result", resultInfo: "result_info" }));
1404
+ export const listUserSchemaHosts = API.makePaginated(() => ({
1405
+ input: ListUserSchemaHostsRequest,
1406
+ output: ListUserSchemaHostsResponse,
1407
+ errors: [],
1408
+ pagination: {
1409
+ mode: "page",
1410
+ inputToken: "page",
1411
+ outputToken: "resultInfo.page",
1412
+ items: "result",
1413
+ pageSize: "perPage",
1414
+ },
1415
+ }));
1416
+ export const ListUserSchemaOperationsRequest =
1417
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1418
+ schemaId: Schema.String.pipe(T.HttpPath("schemaId")),
1419
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1420
+ endpoint: Schema.optional(Schema.String).pipe(T.HttpQuery("endpoint")),
1421
+ feature: Schema.optional(Schema.Array(Schema.Literals(["thresholds", "parameter_schemas", "schema_info"]))).pipe(T.HttpQuery("feature")),
1422
+ host: Schema.optional(Schema.Array(Schema.String)).pipe(T.HttpQuery("host")),
1423
+ method: Schema.optional(Schema.Array(Schema.String)).pipe(T.HttpQuery("method")),
1424
+ operationStatus: Schema.optional(Schema.Literals(["new", "existing"])).pipe(T.HttpQuery("operation_status")),
1425
+ }).pipe(T.Http({
1426
+ method: "GET",
1427
+ path: "/zones/{zone_id}/api_gateway/user_schemas/{schemaId}/operations",
1428
+ }));
1429
+ export const ListUserSchemaOperationsResponse =
1430
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1431
+ result: Schema.Array(Schema.Union([
1432
+ Schema.Struct({
1433
+ endpoint: Schema.String,
1434
+ host: Schema.String,
1435
+ lastUpdated: Schema.String,
1436
+ method: Schema.Literals([
1437
+ "GET",
1438
+ "POST",
1439
+ "HEAD",
1440
+ "OPTIONS",
1441
+ "PUT",
1442
+ "DELETE",
1443
+ "CONNECT",
1444
+ "PATCH",
1445
+ "TRACE",
1446
+ ]),
1447
+ operationId: Schema.String,
1448
+ features: Schema.optional(Schema.Union([
1449
+ Schema.Union([
1450
+ Schema.Struct({
1451
+ thresholds: Schema.optional(Schema.Union([
1452
+ Schema.Struct({
1453
+ authIdTokens: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1454
+ dataPoints: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1455
+ lastUpdated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1456
+ p50: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1457
+ p90: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1458
+ p99: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1459
+ periodSeconds: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1460
+ requests: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1461
+ suggestedThreshold: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1462
+ }).pipe(Schema.encodeKeys({
1463
+ authIdTokens: "auth_id_tokens",
1464
+ dataPoints: "data_points",
1465
+ lastUpdated: "last_updated",
1466
+ p50: "p50",
1467
+ p90: "p90",
1468
+ p99: "p99",
1469
+ periodSeconds: "period_seconds",
1470
+ requests: "requests",
1471
+ suggestedThreshold: "suggested_threshold",
1472
+ })),
1473
+ Schema.Null,
1474
+ ])),
1475
+ }),
1476
+ Schema.Struct({
1477
+ parameterSchemas: Schema.Struct({
1478
+ lastUpdated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1479
+ parameterSchemas: Schema.optional(Schema.Union([
1480
+ Schema.Struct({
1481
+ parameters: Schema.optional(Schema.Union([
1482
+ Schema.Array(Schema.Unknown),
1483
+ Schema.Null,
1484
+ ])),
1485
+ responses: Schema.optional(Schema.Null),
1486
+ }),
1487
+ Schema.Null,
1488
+ ])),
1489
+ }).pipe(Schema.encodeKeys({
1490
+ lastUpdated: "last_updated",
1491
+ parameterSchemas: "parameter_schemas",
1492
+ })),
1493
+ }).pipe(Schema.encodeKeys({ parameterSchemas: "parameter_schemas" })),
1494
+ Schema.Struct({
1495
+ apiRouting: Schema.optional(Schema.Union([
1496
+ Schema.Struct({
1497
+ lastUpdated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1498
+ route: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1499
+ }).pipe(Schema.encodeKeys({
1500
+ lastUpdated: "last_updated",
1501
+ route: "route",
1502
+ })),
1503
+ Schema.Null,
1504
+ ])),
1505
+ }).pipe(Schema.encodeKeys({ apiRouting: "api_routing" })),
1506
+ Schema.Struct({
1507
+ confidenceIntervals: Schema.optional(Schema.Union([
1508
+ Schema.Struct({
1509
+ lastUpdated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1510
+ suggestedThreshold: Schema.optional(Schema.Union([
1511
+ Schema.Struct({
1512
+ confidenceIntervals: Schema.optional(Schema.Union([
1513
+ Schema.Struct({
1514
+ p90: Schema.optional(Schema.Union([
1515
+ Schema.Struct({
1516
+ lower: Schema.optional(Schema.Union([
1517
+ Schema.Number,
1518
+ Schema.Null,
1519
+ ])),
1520
+ upper: Schema.optional(Schema.Union([
1521
+ Schema.Number,
1522
+ Schema.Null,
1523
+ ])),
1524
+ }),
1525
+ Schema.Null,
1526
+ ])),
1527
+ p95: Schema.optional(Schema.Union([
1528
+ Schema.Struct({
1529
+ lower: Schema.optional(Schema.Union([
1530
+ Schema.Number,
1531
+ Schema.Null,
1532
+ ])),
1533
+ upper: Schema.optional(Schema.Union([
1534
+ Schema.Number,
1535
+ Schema.Null,
1536
+ ])),
1537
+ }),
1538
+ Schema.Null,
1539
+ ])),
1540
+ p99: Schema.optional(Schema.Union([
1541
+ Schema.Struct({
1542
+ lower: Schema.optional(Schema.Union([
1543
+ Schema.Number,
1544
+ Schema.Null,
1545
+ ])),
1546
+ upper: Schema.optional(Schema.Union([
1547
+ Schema.Number,
1548
+ Schema.Null,
1549
+ ])),
1550
+ }),
1551
+ Schema.Null,
1552
+ ])),
1553
+ }),
1554
+ Schema.Null,
1555
+ ])),
1556
+ mean: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1557
+ }).pipe(Schema.encodeKeys({
1558
+ confidenceIntervals: "confidence_intervals",
1559
+ mean: "mean",
1560
+ })),
1561
+ Schema.Null,
1562
+ ])),
1563
+ }).pipe(Schema.encodeKeys({
1564
+ lastUpdated: "last_updated",
1565
+ suggestedThreshold: "suggested_threshold",
1566
+ })),
1567
+ Schema.Null,
1568
+ ])),
1569
+ }).pipe(Schema.encodeKeys({
1570
+ confidenceIntervals: "confidence_intervals",
1571
+ })),
1572
+ Schema.Struct({
1573
+ schemaInfo: Schema.optional(Schema.Union([
1574
+ Schema.Struct({
1575
+ activeSchema: Schema.optional(Schema.Union([
1576
+ Schema.Struct({
1577
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1578
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1579
+ isLearned: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1580
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1581
+ }).pipe(Schema.encodeKeys({
1582
+ id: "id",
1583
+ createdAt: "created_at",
1584
+ isLearned: "is_learned",
1585
+ name: "name",
1586
+ })),
1587
+ Schema.Null,
1588
+ ])),
1589
+ learnedAvailable: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1590
+ mitigationAction: Schema.optional(Schema.Union([
1591
+ Schema.Literal("none"),
1592
+ Schema.Literal("log"),
1593
+ Schema.Literal("block"),
1594
+ Schema.Null,
1595
+ ])),
1596
+ }).pipe(Schema.encodeKeys({
1597
+ activeSchema: "active_schema",
1598
+ learnedAvailable: "learned_available",
1599
+ mitigationAction: "mitigation_action",
1600
+ })),
1601
+ Schema.Null,
1602
+ ])),
1603
+ }).pipe(Schema.encodeKeys({ schemaInfo: "schema_info" })),
1604
+ ]),
1605
+ Schema.Null,
1606
+ ])),
1607
+ }).pipe(Schema.encodeKeys({
1608
+ endpoint: "endpoint",
1609
+ host: "host",
1610
+ lastUpdated: "last_updated",
1611
+ method: "method",
1612
+ operationId: "operation_id",
1613
+ features: "features",
1614
+ })),
1615
+ Schema.Struct({
1616
+ endpoint: Schema.String,
1617
+ host: Schema.String,
1618
+ method: Schema.Literals([
1619
+ "GET",
1620
+ "POST",
1621
+ "HEAD",
1622
+ "OPTIONS",
1623
+ "PUT",
1624
+ "DELETE",
1625
+ "CONNECT",
1626
+ "PATCH",
1627
+ "TRACE",
1628
+ ]),
1629
+ }),
1630
+ ])),
1631
+ resultInfo: Schema.Struct({
1632
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1633
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1634
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1635
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1636
+ }).pipe(Schema.encodeKeys({
1637
+ count: "count",
1638
+ page: "page",
1639
+ perPage: "per_page",
1640
+ totalCount: "total_count",
1641
+ })),
1642
+ }).pipe(Schema.encodeKeys({ result: "result", resultInfo: "result_info" }));
1643
+ export const listUserSchemaOperations = API.makePaginated(() => ({
1644
+ input: ListUserSchemaOperationsRequest,
1645
+ output: ListUserSchemaOperationsResponse,
1646
+ errors: [],
1647
+ pagination: {
1648
+ mode: "page",
1649
+ inputToken: "page",
1650
+ outputToken: "resultInfo.page",
1651
+ items: "result",
1652
+ pageSize: "perPage",
1653
+ },
1654
+ }));
1655
+ //# sourceMappingURL=api-gateway.js.map