@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,1190 @@
1
+ /**
2
+ * Cloudflare SPECTRUM API
3
+ *
4
+ * Generated from Cloudflare TypeScript SDK.
5
+ * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service spectrum
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
+
16
+ // =============================================================================
17
+ // AnalyticAggregateCurrent
18
+ // =============================================================================
19
+
20
+ export interface GetAnalyticAggregateCurrentRequest {
21
+ /** Path param: Identifier. */
22
+ zoneId: string;
23
+ /** Query param: Comma-delimited list of Spectrum Application Id(s). If provided, the response will be limited to Spectrum Application Id(s) that match. */
24
+ appID?: string;
25
+ /** Query param: Co-location identifier. */
26
+ coloName?: string;
27
+ }
28
+
29
+ export const GetAnalyticAggregateCurrentRequest =
30
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
31
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
32
+ appID: Schema.optional(Schema.String).pipe(T.HttpQuery("appID")),
33
+ coloName: Schema.optional(Schema.String).pipe(T.HttpQuery("colo_name")),
34
+ }).pipe(
35
+ T.Http({
36
+ method: "GET",
37
+ path: "/zones/{zone_id}/spectrum/analytics/aggregate/current",
38
+ }),
39
+ ) as unknown as Schema.Schema<GetAnalyticAggregateCurrentRequest>;
40
+
41
+ export type GetAnalyticAggregateCurrentResponse = {
42
+ appID: string;
43
+ bytesEgress: number;
44
+ bytesIngress: number;
45
+ connections: number;
46
+ durationAvg: number;
47
+ }[];
48
+
49
+ export const GetAnalyticAggregateCurrentResponse =
50
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
51
+ Schema.Struct({
52
+ appID: Schema.String,
53
+ bytesEgress: Schema.Number,
54
+ bytesIngress: Schema.Number,
55
+ connections: Schema.Number,
56
+ durationAvg: Schema.Number,
57
+ }),
58
+ ).pipe(
59
+ T.ResponsePath("result"),
60
+ ) as unknown as Schema.Schema<GetAnalyticAggregateCurrentResponse>;
61
+
62
+ export type GetAnalyticAggregateCurrentError = DefaultErrors;
63
+
64
+ export const getAnalyticAggregateCurrent: API.OperationMethod<
65
+ GetAnalyticAggregateCurrentRequest,
66
+ GetAnalyticAggregateCurrentResponse,
67
+ GetAnalyticAggregateCurrentError,
68
+ Credentials | HttpClient.HttpClient
69
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
70
+ input: GetAnalyticAggregateCurrentRequest,
71
+ output: GetAnalyticAggregateCurrentResponse,
72
+ errors: [],
73
+ }));
74
+
75
+ // =============================================================================
76
+ // AnalyticEventBytime
77
+ // =============================================================================
78
+
79
+ export interface GetAnalyticEventBytimeRequest {
80
+ /** Path param: Identifier. */
81
+ zoneId: string;
82
+ /** Query param: Used to select time series resolution. */
83
+ timeDelta:
84
+ | "year"
85
+ | "quarter"
86
+ | "month"
87
+ | "week"
88
+ | "day"
89
+ | "hour"
90
+ | "dekaminute"
91
+ | "minute";
92
+ /** Query param: Can be used to break down the data by given attributes. Options are: | Dimension | Name | Example | | -------- */
93
+ dimensions?: ("event" | "appID" | "coloName" | "ipVersion")[];
94
+ /** Query param: Used to filter rows by one or more dimensions. Filters can be combined using OR and AND boolean logic. AND takes precedence over OR in all the expressions. The OR operator is defined usin */
95
+ filters?: string;
96
+ /** Query param: One or more metrics to compute. Options are: | Metric | Name | Example | Unit | | -------------- | ------------------------------- */
97
+ metrics?: (
98
+ | "count"
99
+ | "bytesIngress"
100
+ | "bytesEgress"
101
+ | "durationAvg"
102
+ | "durationMedian"
103
+ | "duration90th"
104
+ | "duration99th"
105
+ )[];
106
+ /** Query param: Start of time interval to query, defaults to `until` - 6 hours. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified. */
107
+ since?: string;
108
+ /** Query param: The sort order for the result set; sort fields must be included in `metrics` or `dimensions`. */
109
+ sort?: string[];
110
+ /** Query param: End of time interval to query, defaults to current time. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified. */
111
+ until?: string;
112
+ }
113
+
114
+ export const GetAnalyticEventBytimeRequest =
115
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
116
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
117
+ timeDelta: Schema.Literals([
118
+ "year",
119
+ "quarter",
120
+ "month",
121
+ "week",
122
+ "day",
123
+ "hour",
124
+ "dekaminute",
125
+ "minute",
126
+ ]).pipe(T.HttpQuery("time_delta")),
127
+ dimensions: Schema.optional(
128
+ Schema.Array(
129
+ Schema.Literals(["event", "appID", "coloName", "ipVersion"]),
130
+ ),
131
+ ).pipe(T.HttpQuery("dimensions")),
132
+ filters: Schema.optional(Schema.String).pipe(T.HttpQuery("filters")),
133
+ metrics: Schema.optional(
134
+ Schema.Array(
135
+ Schema.Literals([
136
+ "count",
137
+ "bytesIngress",
138
+ "bytesEgress",
139
+ "durationAvg",
140
+ "durationMedian",
141
+ "duration90th",
142
+ "duration99th",
143
+ ]),
144
+ ),
145
+ ).pipe(T.HttpQuery("metrics")),
146
+ since: Schema.optional(Schema.String).pipe(T.HttpQuery("since")),
147
+ sort: Schema.optional(Schema.Array(Schema.String)).pipe(
148
+ T.HttpQuery("sort"),
149
+ ),
150
+ until: Schema.optional(Schema.String).pipe(T.HttpQuery("until")),
151
+ }).pipe(
152
+ T.Http({
153
+ method: "GET",
154
+ path: "/zones/{zone_id}/spectrum/analytics/events/bytime",
155
+ }),
156
+ ) as unknown as Schema.Schema<GetAnalyticEventBytimeRequest>;
157
+
158
+ export interface GetAnalyticEventBytimeResponse {
159
+ /** List of columns returned by the analytics query. */
160
+ data: {
161
+ dimensions?: string[] | null;
162
+ metrics?: number[] | number[][] | null;
163
+ }[];
164
+ /** Number of seconds between current time and last processed event, i.e. how many seconds of data could be missing. */
165
+ dataLag: number;
166
+ /** Maximum result for each selected metrics across all data. */
167
+ max: Record<string, unknown>;
168
+ /** Minimum result for each selected metrics across all data. */
169
+ min: Record<string, unknown>;
170
+ query: {
171
+ dimensions?: ("event" | "appID" | "coloName" | "ipVersion")[] | null;
172
+ filters?: string | null;
173
+ limit?: number | null;
174
+ metrics?:
175
+ | (
176
+ | "count"
177
+ | "bytesIngress"
178
+ | "bytesEgress"
179
+ | "durationAvg"
180
+ | "durationMedian"
181
+ | "duration90th"
182
+ | "duration99th"
183
+ )[]
184
+ | null;
185
+ since?: string | null;
186
+ sort?: string[] | null;
187
+ until?: string | null;
188
+ };
189
+ /** Total number of rows in the result. */
190
+ rows: number;
191
+ /** Total result for each selected metrics across all data. */
192
+ totals: Record<string, unknown>;
193
+ /** List of time interval buckets: [start, end] */
194
+ timeIntervals?: string[][] | null;
195
+ }
196
+
197
+ export const GetAnalyticEventBytimeResponse =
198
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
199
+ data: Schema.Array(
200
+ Schema.Struct({
201
+ dimensions: Schema.optional(
202
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
203
+ ),
204
+ metrics: Schema.optional(
205
+ Schema.Union([
206
+ Schema.Union([
207
+ Schema.Array(Schema.Number),
208
+ Schema.Array(Schema.Array(Schema.Number)),
209
+ ]),
210
+ Schema.Null,
211
+ ]),
212
+ ),
213
+ }),
214
+ ),
215
+ dataLag: Schema.Number,
216
+ max: Schema.Struct({}),
217
+ min: Schema.Struct({}),
218
+ query: Schema.Struct({
219
+ dimensions: Schema.optional(
220
+ Schema.Union([
221
+ Schema.Array(
222
+ Schema.Literals(["event", "appID", "coloName", "ipVersion"]),
223
+ ),
224
+ Schema.Null,
225
+ ]),
226
+ ),
227
+ filters: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
228
+ limit: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
229
+ metrics: Schema.optional(
230
+ Schema.Union([
231
+ Schema.Array(
232
+ Schema.Literals([
233
+ "count",
234
+ "bytesIngress",
235
+ "bytesEgress",
236
+ "durationAvg",
237
+ "durationMedian",
238
+ "duration90th",
239
+ "duration99th",
240
+ ]),
241
+ ),
242
+ Schema.Null,
243
+ ]),
244
+ ),
245
+ since: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
246
+ sort: Schema.optional(
247
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
248
+ ),
249
+ until: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
250
+ }),
251
+ rows: Schema.Number,
252
+ totals: Schema.Struct({}),
253
+ timeIntervals: Schema.optional(
254
+ Schema.Union([Schema.Array(Schema.Array(Schema.String)), Schema.Null]),
255
+ ),
256
+ })
257
+ .pipe(
258
+ Schema.encodeKeys({
259
+ data: "data",
260
+ dataLag: "data_lag",
261
+ max: "max",
262
+ min: "min",
263
+ query: "query",
264
+ rows: "rows",
265
+ totals: "totals",
266
+ timeIntervals: "time_intervals",
267
+ }),
268
+ )
269
+ .pipe(
270
+ T.ResponsePath("result"),
271
+ ) as unknown as Schema.Schema<GetAnalyticEventBytimeResponse>;
272
+
273
+ export type GetAnalyticEventBytimeError = DefaultErrors;
274
+
275
+ export const getAnalyticEventBytime: API.OperationMethod<
276
+ GetAnalyticEventBytimeRequest,
277
+ GetAnalyticEventBytimeResponse,
278
+ GetAnalyticEventBytimeError,
279
+ Credentials | HttpClient.HttpClient
280
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
281
+ input: GetAnalyticEventBytimeRequest,
282
+ output: GetAnalyticEventBytimeResponse,
283
+ errors: [],
284
+ }));
285
+
286
+ // =============================================================================
287
+ // AnalyticEventSummary
288
+ // =============================================================================
289
+
290
+ export interface GetAnalyticEventSummaryRequest {
291
+ /** Path param: Identifier. */
292
+ zoneId: string;
293
+ /** Query param: Can be used to break down the data by given attributes. Options are: | Dimension | Name | Example | | -------- */
294
+ dimensions?: ("event" | "appID" | "coloName" | "ipVersion")[];
295
+ /** Query param: Used to filter rows by one or more dimensions. Filters can be combined using OR and AND boolean logic. AND takes precedence over OR in all the expressions. The OR operator is defined usin */
296
+ filters?: string;
297
+ /** Query param: One or more metrics to compute. Options are: | Metric | Name | Example | Unit | | -------------- | ------------------------------- */
298
+ metrics?: (
299
+ | "count"
300
+ | "bytesIngress"
301
+ | "bytesEgress"
302
+ | "durationAvg"
303
+ | "durationMedian"
304
+ | "duration90th"
305
+ | "duration99th"
306
+ )[];
307
+ /** Query param: Start of time interval to query, defaults to `until` - 6 hours. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified. */
308
+ since?: string;
309
+ /** Query param: The sort order for the result set; sort fields must be included in `metrics` or `dimensions`. */
310
+ sort?: string[];
311
+ /** Query param: End of time interval to query, defaults to current time. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified. */
312
+ until?: string;
313
+ }
314
+
315
+ export const GetAnalyticEventSummaryRequest =
316
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
317
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
318
+ dimensions: Schema.optional(
319
+ Schema.Array(
320
+ Schema.Literals(["event", "appID", "coloName", "ipVersion"]),
321
+ ),
322
+ ).pipe(T.HttpQuery("dimensions")),
323
+ filters: Schema.optional(Schema.String).pipe(T.HttpQuery("filters")),
324
+ metrics: Schema.optional(
325
+ Schema.Array(
326
+ Schema.Literals([
327
+ "count",
328
+ "bytesIngress",
329
+ "bytesEgress",
330
+ "durationAvg",
331
+ "durationMedian",
332
+ "duration90th",
333
+ "duration99th",
334
+ ]),
335
+ ),
336
+ ).pipe(T.HttpQuery("metrics")),
337
+ since: Schema.optional(Schema.String).pipe(T.HttpQuery("since")),
338
+ sort: Schema.optional(Schema.Array(Schema.String)).pipe(
339
+ T.HttpQuery("sort"),
340
+ ),
341
+ until: Schema.optional(Schema.String).pipe(T.HttpQuery("until")),
342
+ }).pipe(
343
+ T.Http({
344
+ method: "GET",
345
+ path: "/zones/{zone_id}/spectrum/analytics/events/summary",
346
+ }),
347
+ ) as unknown as Schema.Schema<GetAnalyticEventSummaryRequest>;
348
+
349
+ export interface GetAnalyticEventSummaryResponse {
350
+ /** List of columns returned by the analytics query. */
351
+ data: {
352
+ dimensions?: string[] | null;
353
+ metrics?: number[] | number[][] | null;
354
+ }[];
355
+ /** Number of seconds between current time and last processed event, i.e. how many seconds of data could be missing. */
356
+ dataLag: number;
357
+ /** Maximum result for each selected metrics across all data. */
358
+ max: Record<string, unknown>;
359
+ /** Minimum result for each selected metrics across all data. */
360
+ min: Record<string, unknown>;
361
+ query: {
362
+ dimensions?: ("event" | "appID" | "coloName" | "ipVersion")[] | null;
363
+ filters?: string | null;
364
+ limit?: number | null;
365
+ metrics?:
366
+ | (
367
+ | "count"
368
+ | "bytesIngress"
369
+ | "bytesEgress"
370
+ | "durationAvg"
371
+ | "durationMedian"
372
+ | "duration90th"
373
+ | "duration99th"
374
+ )[]
375
+ | null;
376
+ since?: string | null;
377
+ sort?: string[] | null;
378
+ until?: string | null;
379
+ };
380
+ /** Total number of rows in the result. */
381
+ rows: number;
382
+ /** Total result for each selected metrics across all data. */
383
+ totals: Record<string, unknown>;
384
+ /** List of time interval buckets: [start, end] */
385
+ timeIntervals?: string[][] | null;
386
+ }
387
+
388
+ export const GetAnalyticEventSummaryResponse =
389
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
390
+ data: Schema.Array(
391
+ Schema.Struct({
392
+ dimensions: Schema.optional(
393
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
394
+ ),
395
+ metrics: Schema.optional(
396
+ Schema.Union([
397
+ Schema.Union([
398
+ Schema.Array(Schema.Number),
399
+ Schema.Array(Schema.Array(Schema.Number)),
400
+ ]),
401
+ Schema.Null,
402
+ ]),
403
+ ),
404
+ }),
405
+ ),
406
+ dataLag: Schema.Number,
407
+ max: Schema.Struct({}),
408
+ min: Schema.Struct({}),
409
+ query: Schema.Struct({
410
+ dimensions: Schema.optional(
411
+ Schema.Union([
412
+ Schema.Array(
413
+ Schema.Literals(["event", "appID", "coloName", "ipVersion"]),
414
+ ),
415
+ Schema.Null,
416
+ ]),
417
+ ),
418
+ filters: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
419
+ limit: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
420
+ metrics: Schema.optional(
421
+ Schema.Union([
422
+ Schema.Array(
423
+ Schema.Literals([
424
+ "count",
425
+ "bytesIngress",
426
+ "bytesEgress",
427
+ "durationAvg",
428
+ "durationMedian",
429
+ "duration90th",
430
+ "duration99th",
431
+ ]),
432
+ ),
433
+ Schema.Null,
434
+ ]),
435
+ ),
436
+ since: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
437
+ sort: Schema.optional(
438
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
439
+ ),
440
+ until: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
441
+ }),
442
+ rows: Schema.Number,
443
+ totals: Schema.Struct({}),
444
+ timeIntervals: Schema.optional(
445
+ Schema.Union([Schema.Array(Schema.Array(Schema.String)), Schema.Null]),
446
+ ),
447
+ })
448
+ .pipe(
449
+ Schema.encodeKeys({
450
+ data: "data",
451
+ dataLag: "data_lag",
452
+ max: "max",
453
+ min: "min",
454
+ query: "query",
455
+ rows: "rows",
456
+ totals: "totals",
457
+ timeIntervals: "time_intervals",
458
+ }),
459
+ )
460
+ .pipe(
461
+ T.ResponsePath("result"),
462
+ ) as unknown as Schema.Schema<GetAnalyticEventSummaryResponse>;
463
+
464
+ export type GetAnalyticEventSummaryError = DefaultErrors;
465
+
466
+ export const getAnalyticEventSummary: API.OperationMethod<
467
+ GetAnalyticEventSummaryRequest,
468
+ GetAnalyticEventSummaryResponse,
469
+ GetAnalyticEventSummaryError,
470
+ Credentials | HttpClient.HttpClient
471
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
472
+ input: GetAnalyticEventSummaryRequest,
473
+ output: GetAnalyticEventSummaryResponse,
474
+ errors: [],
475
+ }));
476
+
477
+ // =============================================================================
478
+ // App
479
+ // =============================================================================
480
+
481
+ export interface GetAppRequest {
482
+ appId: string;
483
+ /** Zone identifier. */
484
+ zoneId: string;
485
+ }
486
+
487
+ export const GetAppRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
488
+ appId: Schema.String.pipe(T.HttpPath("appId")),
489
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
490
+ }).pipe(
491
+ T.Http({ method: "GET", path: "/zones/{zone_id}/spectrum/apps/{appId}" }),
492
+ ) as unknown as Schema.Schema<GetAppRequest>;
493
+
494
+ export type GetAppResponse =
495
+ | {
496
+ id: string;
497
+ createdOn: string;
498
+ dns: unknown;
499
+ modifiedOn: string;
500
+ protocol: string;
501
+ trafficType: "direct" | "http" | "https";
502
+ argoSmartRouting?: boolean | null;
503
+ edgeIps?: unknown | null;
504
+ ipFirewall?: boolean | null;
505
+ originDirect?: string[] | null;
506
+ originDns?: unknown | null;
507
+ originPort?: string | number | null;
508
+ proxyProtocol?: "off" | "v1" | "v2" | "simple" | null;
509
+ tls?: "off" | "flexible" | "full" | "strict" | null;
510
+ }
511
+ | {
512
+ id: string;
513
+ createdOn: string;
514
+ dns: unknown;
515
+ modifiedOn: string;
516
+ protocol: string;
517
+ originDirect?: string[] | null;
518
+ };
519
+
520
+ export const GetAppResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Union([
521
+ Schema.Struct({
522
+ id: Schema.String,
523
+ createdOn: Schema.String,
524
+ dns: Schema.Unknown,
525
+ modifiedOn: Schema.String,
526
+ protocol: Schema.String,
527
+ trafficType: Schema.Literals(["direct", "http", "https"]),
528
+ argoSmartRouting: Schema.optional(
529
+ Schema.Union([Schema.Boolean, Schema.Null]),
530
+ ),
531
+ edgeIps: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
532
+ ipFirewall: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
533
+ originDirect: Schema.optional(
534
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
535
+ ),
536
+ originDns: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
537
+ originPort: Schema.optional(
538
+ Schema.Union([Schema.Union([Schema.String, Schema.Number]), Schema.Null]),
539
+ ),
540
+ proxyProtocol: Schema.optional(
541
+ Schema.Union([
542
+ Schema.Literals(["off", "v1", "v2", "simple"]),
543
+ Schema.Null,
544
+ ]),
545
+ ),
546
+ tls: Schema.optional(
547
+ Schema.Union([
548
+ Schema.Literals(["off", "flexible", "full", "strict"]),
549
+ Schema.Null,
550
+ ]),
551
+ ),
552
+ }).pipe(
553
+ Schema.encodeKeys({
554
+ id: "id",
555
+ createdOn: "created_on",
556
+ dns: "dns",
557
+ modifiedOn: "modified_on",
558
+ protocol: "protocol",
559
+ trafficType: "traffic_type",
560
+ argoSmartRouting: "argo_smart_routing",
561
+ edgeIps: "edge_ips",
562
+ ipFirewall: "ip_firewall",
563
+ originDirect: "origin_direct",
564
+ originDns: "origin_dns",
565
+ originPort: "origin_port",
566
+ proxyProtocol: "proxy_protocol",
567
+ tls: "tls",
568
+ }),
569
+ ),
570
+ Schema.Struct({
571
+ id: Schema.String,
572
+ createdOn: Schema.String,
573
+ dns: Schema.Unknown,
574
+ modifiedOn: Schema.String,
575
+ protocol: Schema.String,
576
+ originDirect: Schema.optional(
577
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
578
+ ),
579
+ }).pipe(
580
+ Schema.encodeKeys({
581
+ id: "id",
582
+ createdOn: "created_on",
583
+ dns: "dns",
584
+ modifiedOn: "modified_on",
585
+ protocol: "protocol",
586
+ originDirect: "origin_direct",
587
+ }),
588
+ ),
589
+ ]).pipe(T.ResponsePath("result")) as unknown as Schema.Schema<GetAppResponse>;
590
+
591
+ export type GetAppError = DefaultErrors;
592
+
593
+ export const getApp: API.OperationMethod<
594
+ GetAppRequest,
595
+ GetAppResponse,
596
+ GetAppError,
597
+ Credentials | HttpClient.HttpClient
598
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
599
+ input: GetAppRequest,
600
+ output: GetAppResponse,
601
+ errors: [],
602
+ }));
603
+
604
+ export interface ListAppsRequest {
605
+ /** Path param: Zone identifier. */
606
+ zoneId: string;
607
+ /** Query param: Sets the direction by which results are ordered. */
608
+ direction?: "asc" | "desc";
609
+ /** Query param: Application field by which results are ordered. */
610
+ order?: "protocol" | "app_id" | "created_on" | "modified_on" | "dns";
611
+ }
612
+
613
+ export const ListAppsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
614
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
615
+ direction: Schema.optional(Schema.Literals(["asc", "desc"])).pipe(
616
+ T.HttpQuery("direction"),
617
+ ),
618
+ order: Schema.optional(
619
+ Schema.Literals(["protocol", "app_id", "created_on", "modified_on", "dns"]),
620
+ ).pipe(T.HttpQuery("order")),
621
+ }).pipe(
622
+ T.Http({ method: "GET", path: "/zones/{zone_id}/spectrum/apps" }),
623
+ ) as unknown as Schema.Schema<ListAppsRequest>;
624
+
625
+ export interface ListAppsResponse {
626
+ result: (
627
+ | {
628
+ id: string;
629
+ createdOn: string;
630
+ dns: unknown;
631
+ modifiedOn: string;
632
+ protocol: string;
633
+ trafficType: "direct" | "http" | "https";
634
+ argoSmartRouting?: boolean | null;
635
+ edgeIps?: unknown | null;
636
+ ipFirewall?: boolean | null;
637
+ originDirect?: string[] | null;
638
+ originDns?: unknown | null;
639
+ originPort?: string | number | null;
640
+ proxyProtocol?: "off" | "v1" | "v2" | "simple" | null;
641
+ tls?: "off" | "flexible" | "full" | "strict" | null;
642
+ }
643
+ | {
644
+ id: string;
645
+ createdOn: string;
646
+ dns: unknown;
647
+ modifiedOn: string;
648
+ protocol: string;
649
+ originDirect?: string[] | null;
650
+ }
651
+ )[];
652
+ resultInfo: {
653
+ count?: number | null;
654
+ page?: number | null;
655
+ perPage?: number | null;
656
+ totalCount?: number | null;
657
+ };
658
+ }
659
+
660
+ export const ListAppsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
661
+ result: Schema.Array(
662
+ Schema.Union([
663
+ Schema.Struct({
664
+ id: Schema.String,
665
+ createdOn: Schema.String,
666
+ dns: Schema.Unknown,
667
+ modifiedOn: Schema.String,
668
+ protocol: Schema.String,
669
+ trafficType: Schema.Literals(["direct", "http", "https"]),
670
+ argoSmartRouting: Schema.optional(
671
+ Schema.Union([Schema.Boolean, Schema.Null]),
672
+ ),
673
+ edgeIps: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
674
+ ipFirewall: Schema.optional(
675
+ Schema.Union([Schema.Boolean, Schema.Null]),
676
+ ),
677
+ originDirect: Schema.optional(
678
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
679
+ ),
680
+ originDns: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
681
+ originPort: Schema.optional(
682
+ Schema.Union([
683
+ Schema.Union([Schema.String, Schema.Number]),
684
+ Schema.Null,
685
+ ]),
686
+ ),
687
+ proxyProtocol: Schema.optional(
688
+ Schema.Union([
689
+ Schema.Literals(["off", "v1", "v2", "simple"]),
690
+ Schema.Null,
691
+ ]),
692
+ ),
693
+ tls: Schema.optional(
694
+ Schema.Union([
695
+ Schema.Literals(["off", "flexible", "full", "strict"]),
696
+ Schema.Null,
697
+ ]),
698
+ ),
699
+ }).pipe(
700
+ Schema.encodeKeys({
701
+ id: "id",
702
+ createdOn: "created_on",
703
+ dns: "dns",
704
+ modifiedOn: "modified_on",
705
+ protocol: "protocol",
706
+ trafficType: "traffic_type",
707
+ argoSmartRouting: "argo_smart_routing",
708
+ edgeIps: "edge_ips",
709
+ ipFirewall: "ip_firewall",
710
+ originDirect: "origin_direct",
711
+ originDns: "origin_dns",
712
+ originPort: "origin_port",
713
+ proxyProtocol: "proxy_protocol",
714
+ tls: "tls",
715
+ }),
716
+ ),
717
+ Schema.Struct({
718
+ id: Schema.String,
719
+ createdOn: Schema.String,
720
+ dns: Schema.Unknown,
721
+ modifiedOn: Schema.String,
722
+ protocol: Schema.String,
723
+ originDirect: Schema.optional(
724
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
725
+ ),
726
+ }).pipe(
727
+ Schema.encodeKeys({
728
+ id: "id",
729
+ createdOn: "created_on",
730
+ dns: "dns",
731
+ modifiedOn: "modified_on",
732
+ protocol: "protocol",
733
+ originDirect: "origin_direct",
734
+ }),
735
+ ),
736
+ ]),
737
+ ),
738
+ resultInfo: Schema.Struct({
739
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
740
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
741
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
742
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
743
+ }).pipe(
744
+ Schema.encodeKeys({
745
+ count: "count",
746
+ page: "page",
747
+ perPage: "per_page",
748
+ totalCount: "total_count",
749
+ }),
750
+ ),
751
+ }).pipe(
752
+ Schema.encodeKeys({ result: "result", resultInfo: "result_info" }),
753
+ ) as unknown as Schema.Schema<ListAppsResponse>;
754
+
755
+ export type ListAppsError = DefaultErrors;
756
+
757
+ export const listApps: API.PaginatedOperationMethod<
758
+ ListAppsRequest,
759
+ ListAppsResponse,
760
+ ListAppsError,
761
+ Credentials | HttpClient.HttpClient
762
+ > & {
763
+ pages: (
764
+ input: ListAppsRequest,
765
+ ) => stream.Stream<
766
+ ListAppsResponse,
767
+ ListAppsError,
768
+ Credentials | HttpClient.HttpClient
769
+ >;
770
+ items: (input: ListAppsRequest) => stream.Stream<
771
+ | {
772
+ id: string;
773
+ createdOn: string;
774
+ dns: unknown;
775
+ modifiedOn: string;
776
+ protocol: string;
777
+ trafficType: "direct" | "http" | "https";
778
+ argoSmartRouting?: boolean | null;
779
+ edgeIps?: unknown | null;
780
+ ipFirewall?: boolean | null;
781
+ originDirect?: string[] | null;
782
+ originDns?: unknown | null;
783
+ originPort?: string | number | null;
784
+ proxyProtocol?: "off" | "v1" | "v2" | "simple" | null;
785
+ tls?: "off" | "flexible" | "full" | "strict" | null;
786
+ }
787
+ | {
788
+ id: string;
789
+ createdOn: string;
790
+ dns: unknown;
791
+ modifiedOn: string;
792
+ protocol: string;
793
+ originDirect?: string[] | null;
794
+ },
795
+ ListAppsError,
796
+ Credentials | HttpClient.HttpClient
797
+ >;
798
+ } = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
799
+ input: ListAppsRequest,
800
+ output: ListAppsResponse,
801
+ errors: [],
802
+ pagination: {
803
+ mode: "page",
804
+ inputToken: "page",
805
+ outputToken: "resultInfo.page",
806
+ items: "result",
807
+ pageSize: "perPage",
808
+ } as const,
809
+ }));
810
+
811
+ export interface CreateAppRequest {
812
+ /** Path param: Zone identifier. */
813
+ zoneId: string;
814
+ /** Body param: The name and type of DNS record for the Spectrum application. */
815
+ dns: unknown;
816
+ /** Body param: The port configuration at Cloudflare's edge. May specify a single port, for example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`. */
817
+ protocol: string;
818
+ /** Body param: Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application's type is derived from the `protocol */
819
+ trafficType: "direct" | "http" | "https";
820
+ /** Body param: Enables Argo Smart Routing for this application. Notes: Only available for TCP applications with traffic_type set to "direct". */
821
+ argoSmartRouting?: boolean;
822
+ /** Body param: The anycast edge IP configuration for the hostname of this application. */
823
+ edgeIps?: unknown;
824
+ /** Body param: Enables IP Access Rules for this application. Notes: Only available for TCP applications. */
825
+ ipFirewall?: boolean;
826
+ /** Body param: List of origin IP addresses. Array may contain multiple IP addresses for load balancing. */
827
+ originDirect?: string[];
828
+ /** Body param: The name and type of DNS record for the Spectrum application. */
829
+ originDns?: unknown;
830
+ /** Body param: The destination port at the origin. Only specified in conjunction with origin_dns. May use an integer to specify a single origin port, for example `1000`, or a string to specify a range of */
831
+ originPort?: string | number;
832
+ /** Body param: Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Proto */
833
+ proxyProtocol?: "off" | "v1" | "v2" | "simple";
834
+ /** Body param: The type of TLS termination associated with the application. */
835
+ tls?: "off" | "flexible" | "full" | "strict";
836
+ }
837
+
838
+ export const CreateAppRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
839
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
840
+ dns: Schema.Unknown,
841
+ protocol: Schema.String,
842
+ trafficType: Schema.Literals(["direct", "http", "https"]),
843
+ argoSmartRouting: Schema.optional(Schema.Boolean),
844
+ edgeIps: Schema.optional(Schema.Unknown),
845
+ ipFirewall: Schema.optional(Schema.Boolean),
846
+ originDirect: Schema.optional(Schema.Array(Schema.String)),
847
+ originDns: Schema.optional(Schema.Unknown),
848
+ originPort: Schema.optional(Schema.Union([Schema.String, Schema.Number])),
849
+ proxyProtocol: Schema.optional(
850
+ Schema.Literals(["off", "v1", "v2", "simple"]),
851
+ ),
852
+ tls: Schema.optional(Schema.Literals(["off", "flexible", "full", "strict"])),
853
+ }).pipe(
854
+ Schema.encodeKeys({
855
+ dns: "dns",
856
+ protocol: "protocol",
857
+ trafficType: "traffic_type",
858
+ argoSmartRouting: "argo_smart_routing",
859
+ edgeIps: "edge_ips",
860
+ ipFirewall: "ip_firewall",
861
+ originDirect: "origin_direct",
862
+ originDns: "origin_dns",
863
+ originPort: "origin_port",
864
+ proxyProtocol: "proxy_protocol",
865
+ tls: "tls",
866
+ }),
867
+ T.Http({ method: "POST", path: "/zones/{zone_id}/spectrum/apps" }),
868
+ ) as unknown as Schema.Schema<CreateAppRequest>;
869
+
870
+ export type CreateAppResponse =
871
+ | {
872
+ id: string;
873
+ createdOn: string;
874
+ dns: unknown;
875
+ modifiedOn: string;
876
+ protocol: string;
877
+ trafficType: "direct" | "http" | "https";
878
+ argoSmartRouting?: boolean | null;
879
+ edgeIps?: unknown | null;
880
+ ipFirewall?: boolean | null;
881
+ originDirect?: string[] | null;
882
+ originDns?: unknown | null;
883
+ originPort?: string | number | null;
884
+ proxyProtocol?: "off" | "v1" | "v2" | "simple" | null;
885
+ tls?: "off" | "flexible" | "full" | "strict" | null;
886
+ }
887
+ | {
888
+ id: string;
889
+ createdOn: string;
890
+ dns: unknown;
891
+ modifiedOn: string;
892
+ protocol: string;
893
+ originDirect?: string[] | null;
894
+ };
895
+
896
+ export const CreateAppResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Union([
897
+ Schema.Struct({
898
+ id: Schema.String,
899
+ createdOn: Schema.String,
900
+ dns: Schema.Unknown,
901
+ modifiedOn: Schema.String,
902
+ protocol: Schema.String,
903
+ trafficType: Schema.Literals(["direct", "http", "https"]),
904
+ argoSmartRouting: Schema.optional(
905
+ Schema.Union([Schema.Boolean, Schema.Null]),
906
+ ),
907
+ edgeIps: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
908
+ ipFirewall: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
909
+ originDirect: Schema.optional(
910
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
911
+ ),
912
+ originDns: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
913
+ originPort: Schema.optional(
914
+ Schema.Union([Schema.Union([Schema.String, Schema.Number]), Schema.Null]),
915
+ ),
916
+ proxyProtocol: Schema.optional(
917
+ Schema.Union([
918
+ Schema.Literals(["off", "v1", "v2", "simple"]),
919
+ Schema.Null,
920
+ ]),
921
+ ),
922
+ tls: Schema.optional(
923
+ Schema.Union([
924
+ Schema.Literals(["off", "flexible", "full", "strict"]),
925
+ Schema.Null,
926
+ ]),
927
+ ),
928
+ }).pipe(
929
+ Schema.encodeKeys({
930
+ id: "id",
931
+ createdOn: "created_on",
932
+ dns: "dns",
933
+ modifiedOn: "modified_on",
934
+ protocol: "protocol",
935
+ trafficType: "traffic_type",
936
+ argoSmartRouting: "argo_smart_routing",
937
+ edgeIps: "edge_ips",
938
+ ipFirewall: "ip_firewall",
939
+ originDirect: "origin_direct",
940
+ originDns: "origin_dns",
941
+ originPort: "origin_port",
942
+ proxyProtocol: "proxy_protocol",
943
+ tls: "tls",
944
+ }),
945
+ ),
946
+ Schema.Struct({
947
+ id: Schema.String,
948
+ createdOn: Schema.String,
949
+ dns: Schema.Unknown,
950
+ modifiedOn: Schema.String,
951
+ protocol: Schema.String,
952
+ originDirect: Schema.optional(
953
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
954
+ ),
955
+ }).pipe(
956
+ Schema.encodeKeys({
957
+ id: "id",
958
+ createdOn: "created_on",
959
+ dns: "dns",
960
+ modifiedOn: "modified_on",
961
+ protocol: "protocol",
962
+ originDirect: "origin_direct",
963
+ }),
964
+ ),
965
+ ]).pipe(
966
+ T.ResponsePath("result"),
967
+ ) as unknown as Schema.Schema<CreateAppResponse>;
968
+
969
+ export type CreateAppError = DefaultErrors;
970
+
971
+ export const createApp: API.OperationMethod<
972
+ CreateAppRequest,
973
+ CreateAppResponse,
974
+ CreateAppError,
975
+ Credentials | HttpClient.HttpClient
976
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
977
+ input: CreateAppRequest,
978
+ output: CreateAppResponse,
979
+ errors: [],
980
+ }));
981
+
982
+ export interface UpdateAppRequest {
983
+ appId: string;
984
+ /** Path param: Zone identifier. */
985
+ zoneId: string;
986
+ /** Body param: The name and type of DNS record for the Spectrum application. */
987
+ dns: unknown;
988
+ /** Body param: The port configuration at Cloudflare's edge. May specify a single port, for example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`. */
989
+ protocol: string;
990
+ /** Body param: Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application's type is derived from the `protocol */
991
+ trafficType: "direct" | "http" | "https";
992
+ /** Body param: Enables Argo Smart Routing for this application. Notes: Only available for TCP applications with traffic_type set to "direct". */
993
+ argoSmartRouting?: boolean;
994
+ /** Body param: The anycast edge IP configuration for the hostname of this application. */
995
+ edgeIps?: unknown;
996
+ /** Body param: Enables IP Access Rules for this application. Notes: Only available for TCP applications. */
997
+ ipFirewall?: boolean;
998
+ /** Body param: List of origin IP addresses. Array may contain multiple IP addresses for load balancing. */
999
+ originDirect?: string[];
1000
+ /** Body param: The name and type of DNS record for the Spectrum application. */
1001
+ originDns?: unknown;
1002
+ /** Body param: The destination port at the origin. Only specified in conjunction with origin_dns. May use an integer to specify a single origin port, for example `1000`, or a string to specify a range of */
1003
+ originPort?: string | number;
1004
+ /** Body param: Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Proto */
1005
+ proxyProtocol?: "off" | "v1" | "v2" | "simple";
1006
+ /** Body param: The type of TLS termination associated with the application. */
1007
+ tls?: "off" | "flexible" | "full" | "strict";
1008
+ }
1009
+
1010
+ export const UpdateAppRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1011
+ appId: Schema.String.pipe(T.HttpPath("appId")),
1012
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1013
+ dns: Schema.Unknown,
1014
+ protocol: Schema.String,
1015
+ trafficType: Schema.Literals(["direct", "http", "https"]),
1016
+ argoSmartRouting: Schema.optional(Schema.Boolean),
1017
+ edgeIps: Schema.optional(Schema.Unknown),
1018
+ ipFirewall: Schema.optional(Schema.Boolean),
1019
+ originDirect: Schema.optional(Schema.Array(Schema.String)),
1020
+ originDns: Schema.optional(Schema.Unknown),
1021
+ originPort: Schema.optional(Schema.Union([Schema.String, Schema.Number])),
1022
+ proxyProtocol: Schema.optional(
1023
+ Schema.Literals(["off", "v1", "v2", "simple"]),
1024
+ ),
1025
+ tls: Schema.optional(Schema.Literals(["off", "flexible", "full", "strict"])),
1026
+ }).pipe(
1027
+ Schema.encodeKeys({
1028
+ dns: "dns",
1029
+ protocol: "protocol",
1030
+ trafficType: "traffic_type",
1031
+ argoSmartRouting: "argo_smart_routing",
1032
+ edgeIps: "edge_ips",
1033
+ ipFirewall: "ip_firewall",
1034
+ originDirect: "origin_direct",
1035
+ originDns: "origin_dns",
1036
+ originPort: "origin_port",
1037
+ proxyProtocol: "proxy_protocol",
1038
+ tls: "tls",
1039
+ }),
1040
+ T.Http({ method: "PUT", path: "/zones/{zone_id}/spectrum/apps/{appId}" }),
1041
+ ) as unknown as Schema.Schema<UpdateAppRequest>;
1042
+
1043
+ export type UpdateAppResponse =
1044
+ | {
1045
+ id: string;
1046
+ createdOn: string;
1047
+ dns: unknown;
1048
+ modifiedOn: string;
1049
+ protocol: string;
1050
+ trafficType: "direct" | "http" | "https";
1051
+ argoSmartRouting?: boolean | null;
1052
+ edgeIps?: unknown | null;
1053
+ ipFirewall?: boolean | null;
1054
+ originDirect?: string[] | null;
1055
+ originDns?: unknown | null;
1056
+ originPort?: string | number | null;
1057
+ proxyProtocol?: "off" | "v1" | "v2" | "simple" | null;
1058
+ tls?: "off" | "flexible" | "full" | "strict" | null;
1059
+ }
1060
+ | {
1061
+ id: string;
1062
+ createdOn: string;
1063
+ dns: unknown;
1064
+ modifiedOn: string;
1065
+ protocol: string;
1066
+ originDirect?: string[] | null;
1067
+ };
1068
+
1069
+ export const UpdateAppResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Union([
1070
+ Schema.Struct({
1071
+ id: Schema.String,
1072
+ createdOn: Schema.String,
1073
+ dns: Schema.Unknown,
1074
+ modifiedOn: Schema.String,
1075
+ protocol: Schema.String,
1076
+ trafficType: Schema.Literals(["direct", "http", "https"]),
1077
+ argoSmartRouting: Schema.optional(
1078
+ Schema.Union([Schema.Boolean, Schema.Null]),
1079
+ ),
1080
+ edgeIps: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
1081
+ ipFirewall: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1082
+ originDirect: Schema.optional(
1083
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1084
+ ),
1085
+ originDns: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
1086
+ originPort: Schema.optional(
1087
+ Schema.Union([Schema.Union([Schema.String, Schema.Number]), Schema.Null]),
1088
+ ),
1089
+ proxyProtocol: Schema.optional(
1090
+ Schema.Union([
1091
+ Schema.Literals(["off", "v1", "v2", "simple"]),
1092
+ Schema.Null,
1093
+ ]),
1094
+ ),
1095
+ tls: Schema.optional(
1096
+ Schema.Union([
1097
+ Schema.Literals(["off", "flexible", "full", "strict"]),
1098
+ Schema.Null,
1099
+ ]),
1100
+ ),
1101
+ }).pipe(
1102
+ Schema.encodeKeys({
1103
+ id: "id",
1104
+ createdOn: "created_on",
1105
+ dns: "dns",
1106
+ modifiedOn: "modified_on",
1107
+ protocol: "protocol",
1108
+ trafficType: "traffic_type",
1109
+ argoSmartRouting: "argo_smart_routing",
1110
+ edgeIps: "edge_ips",
1111
+ ipFirewall: "ip_firewall",
1112
+ originDirect: "origin_direct",
1113
+ originDns: "origin_dns",
1114
+ originPort: "origin_port",
1115
+ proxyProtocol: "proxy_protocol",
1116
+ tls: "tls",
1117
+ }),
1118
+ ),
1119
+ Schema.Struct({
1120
+ id: Schema.String,
1121
+ createdOn: Schema.String,
1122
+ dns: Schema.Unknown,
1123
+ modifiedOn: Schema.String,
1124
+ protocol: Schema.String,
1125
+ originDirect: Schema.optional(
1126
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1127
+ ),
1128
+ }).pipe(
1129
+ Schema.encodeKeys({
1130
+ id: "id",
1131
+ createdOn: "created_on",
1132
+ dns: "dns",
1133
+ modifiedOn: "modified_on",
1134
+ protocol: "protocol",
1135
+ originDirect: "origin_direct",
1136
+ }),
1137
+ ),
1138
+ ]).pipe(
1139
+ T.ResponsePath("result"),
1140
+ ) as unknown as Schema.Schema<UpdateAppResponse>;
1141
+
1142
+ export type UpdateAppError = DefaultErrors;
1143
+
1144
+ export const updateApp: API.OperationMethod<
1145
+ UpdateAppRequest,
1146
+ UpdateAppResponse,
1147
+ UpdateAppError,
1148
+ Credentials | HttpClient.HttpClient
1149
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1150
+ input: UpdateAppRequest,
1151
+ output: UpdateAppResponse,
1152
+ errors: [],
1153
+ }));
1154
+
1155
+ export interface DeleteAppRequest {
1156
+ appId: string;
1157
+ /** Zone identifier. */
1158
+ zoneId: string;
1159
+ }
1160
+
1161
+ export const DeleteAppRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1162
+ appId: Schema.String.pipe(T.HttpPath("appId")),
1163
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1164
+ }).pipe(
1165
+ T.Http({ method: "DELETE", path: "/zones/{zone_id}/spectrum/apps/{appId}" }),
1166
+ ) as unknown as Schema.Schema<DeleteAppRequest>;
1167
+
1168
+ export interface DeleteAppResponse {
1169
+ /** Identifier. */
1170
+ id: string;
1171
+ }
1172
+
1173
+ export const DeleteAppResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1174
+ id: Schema.String,
1175
+ }).pipe(
1176
+ T.ResponsePath("result"),
1177
+ ) as unknown as Schema.Schema<DeleteAppResponse>;
1178
+
1179
+ export type DeleteAppError = DefaultErrors;
1180
+
1181
+ export const deleteApp: API.OperationMethod<
1182
+ DeleteAppRequest,
1183
+ DeleteAppResponse,
1184
+ DeleteAppError,
1185
+ Credentials | HttpClient.HttpClient
1186
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1187
+ input: DeleteAppRequest,
1188
+ output: DeleteAppResponse,
1189
+ errors: [],
1190
+ }));