@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,1445 @@
1
+ /**
2
+ * Cloudflare ALERTING API
3
+ *
4
+ * Generated from Cloudflare TypeScript SDK.
5
+ * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service alerting
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
+ // =============================================================================
13
+ // Errors
14
+ // =============================================================================
15
+ export class FiltersRequired extends Schema.TaggedErrorClass()("FiltersRequired", { code: Schema.Number, message: Schema.String }) {
16
+ }
17
+ T.applyErrorMatchers(FiltersRequired, [{ code: 17103 }]);
18
+ export class InternalServerError extends Schema.TaggedErrorClass()("InternalServerError", { code: Schema.Number, message: Schema.String }) {
19
+ }
20
+ T.applyErrorMatchers(InternalServerError, [{ code: 15000 }]);
21
+ export class InvalidAlertType extends Schema.TaggedErrorClass()("InvalidAlertType", { code: Schema.Number, message: Schema.String }) {
22
+ }
23
+ T.applyErrorMatchers(InvalidAlertType, [{ code: 17004 }]);
24
+ export class InvalidRoute extends Schema.TaggedErrorClass()("InvalidRoute", { code: Schema.Number, message: Schema.String }) {
25
+ }
26
+ T.applyErrorMatchers(InvalidRoute, [{ code: 7003 }]);
27
+ export class InvalidWebhookId extends Schema.TaggedErrorClass()("InvalidWebhookId", { code: Schema.Number, message: Schema.String }) {
28
+ }
29
+ T.applyErrorMatchers(InvalidWebhookId, [
30
+ { code: 0, message: { includes: "invalid Webhook ID" } },
31
+ ]);
32
+ export class MechanismRequired extends Schema.TaggedErrorClass()("MechanismRequired", { code: Schema.Number, message: Schema.String }) {
33
+ }
34
+ T.applyErrorMatchers(MechanismRequired, [{ code: 17102 }]);
35
+ export class PolicyNotFound extends Schema.TaggedErrorClass()("PolicyNotFound", { code: Schema.Number, message: Schema.String }) {
36
+ }
37
+ T.applyErrorMatchers(PolicyNotFound, [
38
+ { code: 0, message: { includes: "Policy not found" } },
39
+ ]);
40
+ export class WebhookNotFound extends Schema.TaggedErrorClass()("WebhookNotFound", { code: Schema.Number, message: Schema.String }) {
41
+ }
42
+ T.applyErrorMatchers(WebhookNotFound, [
43
+ { code: 0, message: { includes: "Webhook not found" } },
44
+ ]);
45
+ export class WebhookTestFailed extends Schema.TaggedErrorClass()("WebhookTestFailed", { code: Schema.Number, message: Schema.String }) {
46
+ }
47
+ T.applyErrorMatchers(WebhookTestFailed, [
48
+ { code: 0, message: { includes: "Webhook test failed" } },
49
+ ]);
50
+ export const ListAvailableAlertsRequest =
51
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
52
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
53
+ }).pipe(T.Http({
54
+ method: "GET",
55
+ path: "/accounts/{account_id}/alerting/v3/available_alerts",
56
+ }));
57
+ export const ListAvailableAlertsResponse =
58
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({}).pipe(T.ResponsePath("result"));
59
+ export const listAvailableAlerts = API.make(() => ({
60
+ input: ListAvailableAlertsRequest,
61
+ output: ListAvailableAlertsResponse,
62
+ errors: [InvalidRoute],
63
+ }));
64
+ export const GetDestinationEligibleRequest =
65
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
66
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
67
+ }).pipe(T.Http({
68
+ method: "GET",
69
+ path: "/accounts/{account_id}/alerting/v3/destinations/eligible",
70
+ }));
71
+ export const GetDestinationEligibleResponse =
72
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({}).pipe(T.ResponsePath("result"));
73
+ export const getDestinationEligible = API.make(() => ({
74
+ input: GetDestinationEligibleRequest,
75
+ output: GetDestinationEligibleResponse,
76
+ errors: [InvalidRoute],
77
+ }));
78
+ export const GetDestinationPagerdutyRequest =
79
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
80
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
81
+ }).pipe(T.Http({
82
+ method: "GET",
83
+ path: "/accounts/{account_id}/alerting/v3/destinations/pagerduty",
84
+ }));
85
+ export const GetDestinationPagerdutyResponse =
86
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
87
+ result: Schema.Array(Schema.Struct({
88
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
89
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
90
+ })),
91
+ });
92
+ export const getDestinationPagerduty = API.makePaginated(() => ({
93
+ input: GetDestinationPagerdutyRequest,
94
+ output: GetDestinationPagerdutyResponse,
95
+ errors: [],
96
+ pagination: {
97
+ mode: "single",
98
+ items: "result",
99
+ },
100
+ }));
101
+ export const CreateDestinationPagerdutyRequest =
102
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
103
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
104
+ }).pipe(T.Http({
105
+ method: "POST",
106
+ path: "/accounts/{account_id}/alerting/v3/destinations/pagerduty/connect",
107
+ }));
108
+ export const CreateDestinationPagerdutyResponse =
109
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
110
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
111
+ }).pipe(T.ResponsePath("result"));
112
+ export const createDestinationPagerduty = API.make(() => ({
113
+ input: CreateDestinationPagerdutyRequest,
114
+ output: CreateDestinationPagerdutyResponse,
115
+ errors: [InvalidRoute],
116
+ }));
117
+ export const DeleteDestinationPagerdutyRequest =
118
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
119
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
120
+ }).pipe(T.Http({
121
+ method: "DELETE",
122
+ path: "/accounts/{account_id}/alerting/v3/destinations/pagerduty",
123
+ }));
124
+ export const DeleteDestinationPagerdutyResponse =
125
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
126
+ errors: Schema.Array(Schema.Struct({
127
+ message: Schema.String,
128
+ code: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
129
+ })),
130
+ messages: Schema.Array(Schema.Struct({
131
+ message: Schema.String,
132
+ code: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
133
+ })),
134
+ success: Schema.Literal(true),
135
+ });
136
+ export const deleteDestinationPagerduty = API.make(() => ({
137
+ input: DeleteDestinationPagerdutyRequest,
138
+ output: DeleteDestinationPagerdutyResponse,
139
+ errors: [InvalidRoute],
140
+ }));
141
+ export const LinkDestinationPagerdutyRequest =
142
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
143
+ tokenId: Schema.String.pipe(T.HttpPath("tokenId")),
144
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
145
+ }).pipe(T.Http({
146
+ method: "GET",
147
+ path: "/accounts/{account_id}/alerting/v3/destinations/pagerduty/connect/{tokenId}",
148
+ }));
149
+ export const LinkDestinationPagerdutyResponse =
150
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
151
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
152
+ }).pipe(T.ResponsePath("result"));
153
+ export const linkDestinationPagerduty = API.make(() => ({
154
+ input: LinkDestinationPagerdutyRequest,
155
+ output: LinkDestinationPagerdutyResponse,
156
+ errors: [InvalidRoute],
157
+ }));
158
+ export const GetDestinationWebhookRequest =
159
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
160
+ webhookId: Schema.String.pipe(T.HttpPath("webhookId")),
161
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
162
+ }).pipe(T.Http({
163
+ method: "GET",
164
+ path: "/accounts/{account_id}/alerting/v3/destinations/webhooks/{webhookId}",
165
+ }));
166
+ export const GetDestinationWebhookResponse =
167
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
168
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
169
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
170
+ lastFailure: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
171
+ lastSuccess: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
172
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
173
+ type: Schema.optional(Schema.Union([
174
+ Schema.Literals([
175
+ "datadog",
176
+ "discord",
177
+ "feishu",
178
+ "gchat",
179
+ "generic",
180
+ "opsgenie",
181
+ "slack",
182
+ "splunk",
183
+ ]),
184
+ Schema.Null,
185
+ ])),
186
+ url: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
187
+ })
188
+ .pipe(Schema.encodeKeys({
189
+ id: "id",
190
+ createdAt: "created_at",
191
+ lastFailure: "last_failure",
192
+ lastSuccess: "last_success",
193
+ name: "name",
194
+ type: "type",
195
+ url: "url",
196
+ }))
197
+ .pipe(T.ResponsePath("result"));
198
+ export const getDestinationWebhook = API.make(() => ({
199
+ input: GetDestinationWebhookRequest,
200
+ output: GetDestinationWebhookResponse,
201
+ errors: [InvalidRoute, WebhookNotFound],
202
+ }));
203
+ export const ListDestinationWebhooksRequest =
204
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
205
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
206
+ }).pipe(T.Http({
207
+ method: "GET",
208
+ path: "/accounts/{account_id}/alerting/v3/destinations/webhooks",
209
+ }));
210
+ export const ListDestinationWebhooksResponse =
211
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
212
+ result: Schema.Array(Schema.Struct({
213
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
214
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
215
+ lastFailure: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
216
+ lastSuccess: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
217
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
218
+ type: Schema.optional(Schema.Union([
219
+ Schema.Literals([
220
+ "datadog",
221
+ "discord",
222
+ "feishu",
223
+ "gchat",
224
+ "generic",
225
+ "opsgenie",
226
+ "slack",
227
+ "splunk",
228
+ ]),
229
+ Schema.Null,
230
+ ])),
231
+ url: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
232
+ }).pipe(Schema.encodeKeys({
233
+ id: "id",
234
+ createdAt: "created_at",
235
+ lastFailure: "last_failure",
236
+ lastSuccess: "last_success",
237
+ name: "name",
238
+ type: "type",
239
+ url: "url",
240
+ }))),
241
+ });
242
+ export const listDestinationWebhooks = API.makePaginated(() => ({
243
+ input: ListDestinationWebhooksRequest,
244
+ output: ListDestinationWebhooksResponse,
245
+ errors: [],
246
+ pagination: {
247
+ mode: "single",
248
+ items: "result",
249
+ },
250
+ }));
251
+ export const CreateDestinationWebhookRequest =
252
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
253
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
254
+ name: Schema.String,
255
+ url: Schema.String,
256
+ secret: Schema.optional(Schema.String),
257
+ }).pipe(T.Http({
258
+ method: "POST",
259
+ path: "/accounts/{account_id}/alerting/v3/destinations/webhooks",
260
+ }));
261
+ export const CreateDestinationWebhookResponse =
262
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
263
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
264
+ }).pipe(T.ResponsePath("result"));
265
+ export const createDestinationWebhook = API.make(() => ({
266
+ input: CreateDestinationWebhookRequest,
267
+ output: CreateDestinationWebhookResponse,
268
+ errors: [InvalidRoute, WebhookTestFailed],
269
+ }));
270
+ export const UpdateDestinationWebhookRequest =
271
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
272
+ webhookId: Schema.String.pipe(T.HttpPath("webhookId")),
273
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
274
+ name: Schema.String,
275
+ url: Schema.String,
276
+ secret: Schema.optional(Schema.String),
277
+ }).pipe(T.Http({
278
+ method: "PUT",
279
+ path: "/accounts/{account_id}/alerting/v3/destinations/webhooks/{webhookId}",
280
+ }));
281
+ export const UpdateDestinationWebhookResponse =
282
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
283
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
284
+ }).pipe(T.ResponsePath("result"));
285
+ export const updateDestinationWebhook = API.make(() => ({
286
+ input: UpdateDestinationWebhookRequest,
287
+ output: UpdateDestinationWebhookResponse,
288
+ errors: [InvalidRoute, InvalidWebhookId],
289
+ }));
290
+ export const DeleteDestinationWebhookRequest =
291
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
292
+ webhookId: Schema.String.pipe(T.HttpPath("webhookId")),
293
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
294
+ }).pipe(T.Http({
295
+ method: "DELETE",
296
+ path: "/accounts/{account_id}/alerting/v3/destinations/webhooks/{webhookId}",
297
+ }));
298
+ export const DeleteDestinationWebhookResponse =
299
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
300
+ errors: Schema.Array(Schema.Struct({
301
+ message: Schema.String,
302
+ code: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
303
+ })),
304
+ messages: Schema.Array(Schema.Struct({
305
+ message: Schema.String,
306
+ code: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
307
+ })),
308
+ success: Schema.Literal(true),
309
+ });
310
+ export const deleteDestinationWebhook = API.make(() => ({
311
+ input: DeleteDestinationWebhookRequest,
312
+ output: DeleteDestinationWebhookResponse,
313
+ errors: [InvalidRoute, InternalServerError],
314
+ }));
315
+ export const ListHistoriesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
316
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
317
+ before: Schema.optional(Schema.String).pipe(T.HttpQuery("before")),
318
+ since: Schema.optional(Schema.String).pipe(T.HttpQuery("since")),
319
+ }).pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/alerting/v3/history" }));
320
+ export const ListHistoriesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
321
+ result: Schema.Array(Schema.Struct({
322
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
323
+ alertBody: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
324
+ alertType: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
325
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
326
+ mechanism: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
327
+ mechanismType: Schema.optional(Schema.Union([
328
+ Schema.Literals(["email", "pagerduty", "webhook"]),
329
+ Schema.Null,
330
+ ])),
331
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
332
+ policyId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
333
+ sent: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
334
+ }).pipe(Schema.encodeKeys({
335
+ id: "id",
336
+ alertBody: "alert_body",
337
+ alertType: "alert_type",
338
+ description: "description",
339
+ mechanism: "mechanism",
340
+ mechanismType: "mechanism_type",
341
+ name: "name",
342
+ policyId: "policy_id",
343
+ sent: "sent",
344
+ }))),
345
+ resultInfo: Schema.Struct({
346
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
347
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
348
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
349
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
350
+ }).pipe(Schema.encodeKeys({
351
+ count: "count",
352
+ page: "page",
353
+ perPage: "per_page",
354
+ totalCount: "total_count",
355
+ })),
356
+ }).pipe(Schema.encodeKeys({ result: "result", resultInfo: "result_info" }));
357
+ export const listHistories = API.makePaginated(() => ({
358
+ input: ListHistoriesRequest,
359
+ output: ListHistoriesResponse,
360
+ errors: [],
361
+ pagination: {
362
+ mode: "page",
363
+ inputToken: "page",
364
+ outputToken: "resultInfo.page",
365
+ items: "result",
366
+ pageSize: "perPage",
367
+ },
368
+ }));
369
+ export const GetPolicyRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
370
+ policyId: Schema.String.pipe(T.HttpPath("policyId")),
371
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
372
+ }).pipe(T.Http({
373
+ method: "GET",
374
+ path: "/accounts/{account_id}/alerting/v3/policies/{policyId}",
375
+ }));
376
+ export const GetPolicyResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
377
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
378
+ alertInterval: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
379
+ alertType: Schema.optional(Schema.Union([
380
+ Schema.Literals([
381
+ "abuse_report_alert",
382
+ "access_custom_certificate_expiration_type",
383
+ "advanced_ddos_attack_l4_alert",
384
+ "advanced_ddos_attack_l7_alert",
385
+ "advanced_http_alert_error",
386
+ "bgp_hijack_notification",
387
+ "billing_usage_alert",
388
+ "block_notification_block_removed",
389
+ "block_notification_new_block",
390
+ "block_notification_review_rejected",
391
+ "bot_traffic_basic_alert",
392
+ "brand_protection_alert",
393
+ "brand_protection_digest",
394
+ "clickhouse_alert_fw_anomaly",
395
+ "clickhouse_alert_fw_ent_anomaly",
396
+ "cloudforce_one_request_notification",
397
+ "custom_analytics",
398
+ "custom_bot_detection_alert",
399
+ "custom_ssl_certificate_event_type",
400
+ "dedicated_ssl_certificate_event_type",
401
+ "device_connectivity_anomaly_alert",
402
+ "dos_attack_l4",
403
+ "dos_attack_l7",
404
+ "expiring_service_token_alert",
405
+ "failing_logpush_job_disabled_alert",
406
+ "fbm_auto_advertisement",
407
+ "fbm_dosd_attack",
408
+ "fbm_volumetric_attack",
409
+ "health_check_status_notification",
410
+ "hostname_aop_custom_certificate_expiration_type",
411
+ "http_alert_edge_error",
412
+ "http_alert_origin_error",
413
+ "image_notification",
414
+ "image_resizing_notification",
415
+ "incident_alert",
416
+ "load_balancing_health_alert",
417
+ "load_balancing_pool_enablement_alert",
418
+ "logo_match_alert",
419
+ "magic_tunnel_health_check_event",
420
+ "magic_wan_tunnel_health",
421
+ "maintenance_event_notification",
422
+ "mtls_certificate_store_certificate_expiration_type",
423
+ "pages_event_alert",
424
+ "radar_notification",
425
+ "real_origin_monitoring",
426
+ "scriptmonitor_alert_new_code_change_detections",
427
+ "scriptmonitor_alert_new_hosts",
428
+ "scriptmonitor_alert_new_malicious_hosts",
429
+ "scriptmonitor_alert_new_malicious_scripts",
430
+ "scriptmonitor_alert_new_malicious_url",
431
+ "scriptmonitor_alert_new_max_length_resource_url",
432
+ "scriptmonitor_alert_new_resources",
433
+ "secondary_dns_all_primaries_failing",
434
+ "secondary_dns_primaries_failing",
435
+ "secondary_dns_warning",
436
+ "secondary_dns_zone_successfully_updated",
437
+ "secondary_dns_zone_validation_warning",
438
+ "security_insights_alert",
439
+ "sentinel_alert",
440
+ "stream_live_notifications",
441
+ "synthetic_test_latency_alert",
442
+ "synthetic_test_low_availability_alert",
443
+ "traffic_anomalies_alert",
444
+ "tunnel_health_event",
445
+ "tunnel_update_event",
446
+ "universal_ssl_event_type",
447
+ "web_analytics_metrics_update",
448
+ "zone_aop_custom_certificate_expiration_type",
449
+ ]),
450
+ Schema.Null,
451
+ ])),
452
+ created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
453
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
454
+ enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
455
+ filters: Schema.optional(Schema.Union([
456
+ Schema.Struct({
457
+ actions: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
458
+ affectedAsns: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
459
+ affectedComponents: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
460
+ affectedLocations: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
461
+ airportCode: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
462
+ alertTriggerPreferences: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
463
+ alertTriggerPreferencesValue: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
464
+ enabled: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
465
+ environment: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
466
+ event: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
467
+ eventSource: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
468
+ eventType: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
469
+ groupBy: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
470
+ healthCheckId: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
471
+ incidentImpact: Schema.optional(Schema.Union([
472
+ Schema.Array(Schema.Literals([
473
+ "INCIDENT_IMPACT_NONE",
474
+ "INCIDENT_IMPACT_MINOR",
475
+ "INCIDENT_IMPACT_MAJOR",
476
+ "INCIDENT_IMPACT_CRITICAL",
477
+ ])),
478
+ Schema.Null,
479
+ ])),
480
+ inputId: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
481
+ insightClass: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
482
+ limit: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
483
+ logoTag: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
484
+ megabitsPerSecond: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
485
+ newHealth: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
486
+ newStatus: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
487
+ packetsPerSecond: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
488
+ poolId: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
489
+ popNames: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
490
+ product: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
491
+ projectId: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
492
+ protocol: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
493
+ queryTag: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
494
+ requestsPerSecond: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
495
+ selectors: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
496
+ services: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
497
+ slo: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
498
+ status: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
499
+ targetHostname: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
500
+ targetIp: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
501
+ targetZoneName: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
502
+ trafficExclusions: Schema.optional(Schema.Union([
503
+ Schema.Array(Schema.Literal("security_events")),
504
+ Schema.Null,
505
+ ])),
506
+ tunnelId: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
507
+ tunnelName: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
508
+ type: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
509
+ where: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
510
+ zones: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
511
+ }).pipe(Schema.encodeKeys({
512
+ actions: "actions",
513
+ affectedAsns: "affected_asns",
514
+ affectedComponents: "affected_components",
515
+ affectedLocations: "affected_locations",
516
+ airportCode: "airport_code",
517
+ alertTriggerPreferences: "alert_trigger_preferences",
518
+ alertTriggerPreferencesValue: "alert_trigger_preferences_value",
519
+ enabled: "enabled",
520
+ environment: "environment",
521
+ event: "event",
522
+ eventSource: "event_source",
523
+ eventType: "event_type",
524
+ groupBy: "group_by",
525
+ healthCheckId: "health_check_id",
526
+ incidentImpact: "incident_impact",
527
+ inputId: "input_id",
528
+ insightClass: "insight_class",
529
+ limit: "limit",
530
+ logoTag: "logo_tag",
531
+ megabitsPerSecond: "megabits_per_second",
532
+ newHealth: "new_health",
533
+ newStatus: "new_status",
534
+ packetsPerSecond: "packets_per_second",
535
+ poolId: "pool_id",
536
+ popNames: "pop_names",
537
+ product: "product",
538
+ projectId: "project_id",
539
+ protocol: "protocol",
540
+ queryTag: "query_tag",
541
+ requestsPerSecond: "requests_per_second",
542
+ selectors: "selectors",
543
+ services: "services",
544
+ slo: "slo",
545
+ status: "status",
546
+ targetHostname: "target_hostname",
547
+ targetIp: "target_ip",
548
+ targetZoneName: "target_zone_name",
549
+ trafficExclusions: "traffic_exclusions",
550
+ tunnelId: "tunnel_id",
551
+ tunnelName: "tunnel_name",
552
+ type: "type",
553
+ where: "where",
554
+ zones: "zones",
555
+ })),
556
+ Schema.Null,
557
+ ])),
558
+ mechanisms: Schema.optional(Schema.Union([
559
+ Schema.Struct({
560
+ email: Schema.optional(Schema.Union([
561
+ Schema.Array(Schema.Struct({
562
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
563
+ })),
564
+ Schema.Null,
565
+ ])),
566
+ pagerduty: Schema.optional(Schema.Union([
567
+ Schema.Array(Schema.Struct({
568
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
569
+ })),
570
+ Schema.Null,
571
+ ])),
572
+ webhooks: Schema.optional(Schema.Union([
573
+ Schema.Array(Schema.Struct({
574
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
575
+ })),
576
+ Schema.Null,
577
+ ])),
578
+ }),
579
+ Schema.Null,
580
+ ])),
581
+ modified: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
582
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
583
+ })
584
+ .pipe(Schema.encodeKeys({
585
+ id: "id",
586
+ alertInterval: "alert_interval",
587
+ alertType: "alert_type",
588
+ created: "created",
589
+ description: "description",
590
+ enabled: "enabled",
591
+ filters: "filters",
592
+ mechanisms: "mechanisms",
593
+ modified: "modified",
594
+ name: "name",
595
+ }))
596
+ .pipe(T.ResponsePath("result"));
597
+ export const getPolicy = API.make(() => ({
598
+ input: GetPolicyRequest,
599
+ output: GetPolicyResponse,
600
+ errors: [InvalidRoute, PolicyNotFound],
601
+ }));
602
+ export const ListPoliciesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
603
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
604
+ }).pipe(T.Http({
605
+ method: "GET",
606
+ path: "/accounts/{account_id}/alerting/v3/policies",
607
+ }));
608
+ export const ListPoliciesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
609
+ result: Schema.Array(Schema.Struct({
610
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
611
+ alertInterval: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
612
+ alertType: Schema.optional(Schema.Union([
613
+ Schema.Literals([
614
+ "abuse_report_alert",
615
+ "access_custom_certificate_expiration_type",
616
+ "advanced_ddos_attack_l4_alert",
617
+ "advanced_ddos_attack_l7_alert",
618
+ "advanced_http_alert_error",
619
+ "bgp_hijack_notification",
620
+ "billing_usage_alert",
621
+ "block_notification_block_removed",
622
+ "block_notification_new_block",
623
+ "block_notification_review_rejected",
624
+ "bot_traffic_basic_alert",
625
+ "brand_protection_alert",
626
+ "brand_protection_digest",
627
+ "clickhouse_alert_fw_anomaly",
628
+ "clickhouse_alert_fw_ent_anomaly",
629
+ "cloudforce_one_request_notification",
630
+ "custom_analytics",
631
+ "custom_bot_detection_alert",
632
+ "custom_ssl_certificate_event_type",
633
+ "dedicated_ssl_certificate_event_type",
634
+ "device_connectivity_anomaly_alert",
635
+ "dos_attack_l4",
636
+ "dos_attack_l7",
637
+ "expiring_service_token_alert",
638
+ "failing_logpush_job_disabled_alert",
639
+ "fbm_auto_advertisement",
640
+ "fbm_dosd_attack",
641
+ "fbm_volumetric_attack",
642
+ "health_check_status_notification",
643
+ "hostname_aop_custom_certificate_expiration_type",
644
+ "http_alert_edge_error",
645
+ "http_alert_origin_error",
646
+ "image_notification",
647
+ "image_resizing_notification",
648
+ "incident_alert",
649
+ "load_balancing_health_alert",
650
+ "load_balancing_pool_enablement_alert",
651
+ "logo_match_alert",
652
+ "magic_tunnel_health_check_event",
653
+ "magic_wan_tunnel_health",
654
+ "maintenance_event_notification",
655
+ "mtls_certificate_store_certificate_expiration_type",
656
+ "pages_event_alert",
657
+ "radar_notification",
658
+ "real_origin_monitoring",
659
+ "scriptmonitor_alert_new_code_change_detections",
660
+ "scriptmonitor_alert_new_hosts",
661
+ "scriptmonitor_alert_new_malicious_hosts",
662
+ "scriptmonitor_alert_new_malicious_scripts",
663
+ "scriptmonitor_alert_new_malicious_url",
664
+ "scriptmonitor_alert_new_max_length_resource_url",
665
+ "scriptmonitor_alert_new_resources",
666
+ "secondary_dns_all_primaries_failing",
667
+ "secondary_dns_primaries_failing",
668
+ "secondary_dns_warning",
669
+ "secondary_dns_zone_successfully_updated",
670
+ "secondary_dns_zone_validation_warning",
671
+ "security_insights_alert",
672
+ "sentinel_alert",
673
+ "stream_live_notifications",
674
+ "synthetic_test_latency_alert",
675
+ "synthetic_test_low_availability_alert",
676
+ "traffic_anomalies_alert",
677
+ "tunnel_health_event",
678
+ "tunnel_update_event",
679
+ "universal_ssl_event_type",
680
+ "web_analytics_metrics_update",
681
+ "zone_aop_custom_certificate_expiration_type",
682
+ ]),
683
+ Schema.Null,
684
+ ])),
685
+ created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
686
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
687
+ enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
688
+ filters: Schema.optional(Schema.Union([
689
+ Schema.Struct({
690
+ actions: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
691
+ affectedAsns: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
692
+ affectedComponents: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
693
+ affectedLocations: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
694
+ airportCode: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
695
+ alertTriggerPreferences: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
696
+ alertTriggerPreferencesValue: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
697
+ enabled: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
698
+ environment: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
699
+ event: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
700
+ eventSource: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
701
+ eventType: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
702
+ groupBy: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
703
+ healthCheckId: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
704
+ incidentImpact: Schema.optional(Schema.Union([
705
+ Schema.Array(Schema.Literals([
706
+ "INCIDENT_IMPACT_NONE",
707
+ "INCIDENT_IMPACT_MINOR",
708
+ "INCIDENT_IMPACT_MAJOR",
709
+ "INCIDENT_IMPACT_CRITICAL",
710
+ ])),
711
+ Schema.Null,
712
+ ])),
713
+ inputId: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
714
+ insightClass: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
715
+ limit: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
716
+ logoTag: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
717
+ megabitsPerSecond: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
718
+ newHealth: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
719
+ newStatus: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
720
+ packetsPerSecond: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
721
+ poolId: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
722
+ popNames: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
723
+ product: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
724
+ projectId: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
725
+ protocol: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
726
+ queryTag: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
727
+ requestsPerSecond: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
728
+ selectors: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
729
+ services: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
730
+ slo: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
731
+ status: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
732
+ targetHostname: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
733
+ targetIp: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
734
+ targetZoneName: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
735
+ trafficExclusions: Schema.optional(Schema.Union([
736
+ Schema.Array(Schema.Literal("security_events")),
737
+ Schema.Null,
738
+ ])),
739
+ tunnelId: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
740
+ tunnelName: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
741
+ type: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
742
+ where: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
743
+ zones: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
744
+ }).pipe(Schema.encodeKeys({
745
+ actions: "actions",
746
+ affectedAsns: "affected_asns",
747
+ affectedComponents: "affected_components",
748
+ affectedLocations: "affected_locations",
749
+ airportCode: "airport_code",
750
+ alertTriggerPreferences: "alert_trigger_preferences",
751
+ alertTriggerPreferencesValue: "alert_trigger_preferences_value",
752
+ enabled: "enabled",
753
+ environment: "environment",
754
+ event: "event",
755
+ eventSource: "event_source",
756
+ eventType: "event_type",
757
+ groupBy: "group_by",
758
+ healthCheckId: "health_check_id",
759
+ incidentImpact: "incident_impact",
760
+ inputId: "input_id",
761
+ insightClass: "insight_class",
762
+ limit: "limit",
763
+ logoTag: "logo_tag",
764
+ megabitsPerSecond: "megabits_per_second",
765
+ newHealth: "new_health",
766
+ newStatus: "new_status",
767
+ packetsPerSecond: "packets_per_second",
768
+ poolId: "pool_id",
769
+ popNames: "pop_names",
770
+ product: "product",
771
+ projectId: "project_id",
772
+ protocol: "protocol",
773
+ queryTag: "query_tag",
774
+ requestsPerSecond: "requests_per_second",
775
+ selectors: "selectors",
776
+ services: "services",
777
+ slo: "slo",
778
+ status: "status",
779
+ targetHostname: "target_hostname",
780
+ targetIp: "target_ip",
781
+ targetZoneName: "target_zone_name",
782
+ trafficExclusions: "traffic_exclusions",
783
+ tunnelId: "tunnel_id",
784
+ tunnelName: "tunnel_name",
785
+ type: "type",
786
+ where: "where",
787
+ zones: "zones",
788
+ })),
789
+ Schema.Null,
790
+ ])),
791
+ mechanisms: Schema.optional(Schema.Union([
792
+ Schema.Struct({
793
+ email: Schema.optional(Schema.Union([
794
+ Schema.Array(Schema.Struct({
795
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
796
+ })),
797
+ Schema.Null,
798
+ ])),
799
+ pagerduty: Schema.optional(Schema.Union([
800
+ Schema.Array(Schema.Struct({
801
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
802
+ })),
803
+ Schema.Null,
804
+ ])),
805
+ webhooks: Schema.optional(Schema.Union([
806
+ Schema.Array(Schema.Struct({
807
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
808
+ })),
809
+ Schema.Null,
810
+ ])),
811
+ }),
812
+ Schema.Null,
813
+ ])),
814
+ modified: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
815
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
816
+ }).pipe(Schema.encodeKeys({
817
+ id: "id",
818
+ alertInterval: "alert_interval",
819
+ alertType: "alert_type",
820
+ created: "created",
821
+ description: "description",
822
+ enabled: "enabled",
823
+ filters: "filters",
824
+ mechanisms: "mechanisms",
825
+ modified: "modified",
826
+ name: "name",
827
+ }))),
828
+ });
829
+ export const listPolicies = API.makePaginated(() => ({
830
+ input: ListPoliciesRequest,
831
+ output: ListPoliciesResponse,
832
+ errors: [],
833
+ pagination: {
834
+ mode: "single",
835
+ items: "result",
836
+ },
837
+ }));
838
+ export const CreatePolicyRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
839
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
840
+ alertType: Schema.Literals([
841
+ "abuse_report_alert",
842
+ "access_custom_certificate_expiration_type",
843
+ "advanced_ddos_attack_l4_alert",
844
+ "advanced_ddos_attack_l7_alert",
845
+ "advanced_http_alert_error",
846
+ "bgp_hijack_notification",
847
+ "billing_usage_alert",
848
+ "block_notification_block_removed",
849
+ "block_notification_new_block",
850
+ "block_notification_review_rejected",
851
+ "bot_traffic_basic_alert",
852
+ "brand_protection_alert",
853
+ "brand_protection_digest",
854
+ "clickhouse_alert_fw_anomaly",
855
+ "clickhouse_alert_fw_ent_anomaly",
856
+ "cloudforce_one_request_notification",
857
+ "custom_analytics",
858
+ "custom_bot_detection_alert",
859
+ "custom_ssl_certificate_event_type",
860
+ "dedicated_ssl_certificate_event_type",
861
+ "device_connectivity_anomaly_alert",
862
+ "dos_attack_l4",
863
+ "dos_attack_l7",
864
+ "expiring_service_token_alert",
865
+ "failing_logpush_job_disabled_alert",
866
+ "fbm_auto_advertisement",
867
+ "fbm_dosd_attack",
868
+ "fbm_volumetric_attack",
869
+ "health_check_status_notification",
870
+ "hostname_aop_custom_certificate_expiration_type",
871
+ "http_alert_edge_error",
872
+ "http_alert_origin_error",
873
+ "image_notification",
874
+ "image_resizing_notification",
875
+ "incident_alert",
876
+ "load_balancing_health_alert",
877
+ "load_balancing_pool_enablement_alert",
878
+ "logo_match_alert",
879
+ "magic_tunnel_health_check_event",
880
+ "magic_wan_tunnel_health",
881
+ "maintenance_event_notification",
882
+ "mtls_certificate_store_certificate_expiration_type",
883
+ "pages_event_alert",
884
+ "radar_notification",
885
+ "real_origin_monitoring",
886
+ "scriptmonitor_alert_new_code_change_detections",
887
+ "scriptmonitor_alert_new_hosts",
888
+ "scriptmonitor_alert_new_malicious_hosts",
889
+ "scriptmonitor_alert_new_malicious_scripts",
890
+ "scriptmonitor_alert_new_malicious_url",
891
+ "scriptmonitor_alert_new_max_length_resource_url",
892
+ "scriptmonitor_alert_new_resources",
893
+ "secondary_dns_all_primaries_failing",
894
+ "secondary_dns_primaries_failing",
895
+ "secondary_dns_warning",
896
+ "secondary_dns_zone_successfully_updated",
897
+ "secondary_dns_zone_validation_warning",
898
+ "security_insights_alert",
899
+ "sentinel_alert",
900
+ "stream_live_notifications",
901
+ "synthetic_test_latency_alert",
902
+ "synthetic_test_low_availability_alert",
903
+ "traffic_anomalies_alert",
904
+ "tunnel_health_event",
905
+ "tunnel_update_event",
906
+ "universal_ssl_event_type",
907
+ "web_analytics_metrics_update",
908
+ "zone_aop_custom_certificate_expiration_type",
909
+ ]),
910
+ enabled: Schema.Boolean,
911
+ mechanisms: Schema.Struct({
912
+ email: Schema.optional(Schema.Array(Schema.Struct({
913
+ id: Schema.optional(Schema.String),
914
+ }))),
915
+ pagerduty: Schema.optional(Schema.Array(Schema.Struct({
916
+ id: Schema.optional(Schema.String),
917
+ }))),
918
+ webhooks: Schema.optional(Schema.Array(Schema.Struct({
919
+ id: Schema.optional(Schema.String),
920
+ }))),
921
+ }),
922
+ name: Schema.String,
923
+ alertInterval: Schema.optional(Schema.String),
924
+ description: Schema.optional(Schema.String),
925
+ filters: Schema.optional(Schema.Struct({
926
+ actions: Schema.optional(Schema.Array(Schema.String)),
927
+ affectedAsns: Schema.optional(Schema.Array(Schema.String)),
928
+ affectedComponents: Schema.optional(Schema.Array(Schema.String)),
929
+ affectedLocations: Schema.optional(Schema.Array(Schema.String)),
930
+ airportCode: Schema.optional(Schema.Array(Schema.String)),
931
+ alertTriggerPreferences: Schema.optional(Schema.Array(Schema.String)),
932
+ alertTriggerPreferencesValue: Schema.optional(Schema.Array(Schema.String)),
933
+ enabled: Schema.optional(Schema.Array(Schema.String)),
934
+ environment: Schema.optional(Schema.Array(Schema.String)),
935
+ event: Schema.optional(Schema.Array(Schema.String)),
936
+ eventSource: Schema.optional(Schema.Array(Schema.String)),
937
+ eventType: Schema.optional(Schema.Array(Schema.String)),
938
+ groupBy: Schema.optional(Schema.Array(Schema.String)),
939
+ healthCheckId: Schema.optional(Schema.Array(Schema.String)),
940
+ incidentImpact: Schema.optional(Schema.Array(Schema.Literals([
941
+ "INCIDENT_IMPACT_NONE",
942
+ "INCIDENT_IMPACT_MINOR",
943
+ "INCIDENT_IMPACT_MAJOR",
944
+ "INCIDENT_IMPACT_CRITICAL",
945
+ ]))),
946
+ inputId: Schema.optional(Schema.Array(Schema.String)),
947
+ insightClass: Schema.optional(Schema.Array(Schema.String)),
948
+ limit: Schema.optional(Schema.Array(Schema.String)),
949
+ logoTag: Schema.optional(Schema.Array(Schema.String)),
950
+ megabitsPerSecond: Schema.optional(Schema.Array(Schema.String)),
951
+ newHealth: Schema.optional(Schema.Array(Schema.String)),
952
+ newStatus: Schema.optional(Schema.Array(Schema.String)),
953
+ packetsPerSecond: Schema.optional(Schema.Array(Schema.String)),
954
+ poolId: Schema.optional(Schema.Array(Schema.String)),
955
+ popNames: Schema.optional(Schema.Array(Schema.String)),
956
+ product: Schema.optional(Schema.Array(Schema.String)),
957
+ projectId: Schema.optional(Schema.Array(Schema.String)),
958
+ protocol: Schema.optional(Schema.Array(Schema.String)),
959
+ queryTag: Schema.optional(Schema.Array(Schema.String)),
960
+ requestsPerSecond: Schema.optional(Schema.Array(Schema.String)),
961
+ selectors: Schema.optional(Schema.Array(Schema.String)),
962
+ services: Schema.optional(Schema.Array(Schema.String)),
963
+ slo: Schema.optional(Schema.Array(Schema.String)),
964
+ status: Schema.optional(Schema.Array(Schema.String)),
965
+ targetHostname: Schema.optional(Schema.Array(Schema.String)),
966
+ targetIp: Schema.optional(Schema.Array(Schema.String)),
967
+ targetZoneName: Schema.optional(Schema.Array(Schema.String)),
968
+ trafficExclusions: Schema.optional(Schema.Array(Schema.Literal("security_events"))),
969
+ tunnelId: Schema.optional(Schema.Array(Schema.String)),
970
+ tunnelName: Schema.optional(Schema.Array(Schema.String)),
971
+ type: Schema.optional(Schema.Array(Schema.String)),
972
+ where: Schema.optional(Schema.Array(Schema.String)),
973
+ zones: Schema.optional(Schema.Array(Schema.String)),
974
+ }).pipe(Schema.encodeKeys({
975
+ actions: "actions",
976
+ affectedAsns: "affected_asns",
977
+ affectedComponents: "affected_components",
978
+ affectedLocations: "affected_locations",
979
+ airportCode: "airport_code",
980
+ alertTriggerPreferences: "alert_trigger_preferences",
981
+ alertTriggerPreferencesValue: "alert_trigger_preferences_value",
982
+ enabled: "enabled",
983
+ environment: "environment",
984
+ event: "event",
985
+ eventSource: "event_source",
986
+ eventType: "event_type",
987
+ groupBy: "group_by",
988
+ healthCheckId: "health_check_id",
989
+ incidentImpact: "incident_impact",
990
+ inputId: "input_id",
991
+ insightClass: "insight_class",
992
+ limit: "limit",
993
+ logoTag: "logo_tag",
994
+ megabitsPerSecond: "megabits_per_second",
995
+ newHealth: "new_health",
996
+ newStatus: "new_status",
997
+ packetsPerSecond: "packets_per_second",
998
+ poolId: "pool_id",
999
+ popNames: "pop_names",
1000
+ product: "product",
1001
+ projectId: "project_id",
1002
+ protocol: "protocol",
1003
+ queryTag: "query_tag",
1004
+ requestsPerSecond: "requests_per_second",
1005
+ selectors: "selectors",
1006
+ services: "services",
1007
+ slo: "slo",
1008
+ status: "status",
1009
+ targetHostname: "target_hostname",
1010
+ targetIp: "target_ip",
1011
+ targetZoneName: "target_zone_name",
1012
+ trafficExclusions: "traffic_exclusions",
1013
+ tunnelId: "tunnel_id",
1014
+ tunnelName: "tunnel_name",
1015
+ type: "type",
1016
+ where: "where",
1017
+ zones: "zones",
1018
+ }))),
1019
+ }).pipe(Schema.encodeKeys({
1020
+ alertType: "alert_type",
1021
+ enabled: "enabled",
1022
+ mechanisms: "mechanisms",
1023
+ name: "name",
1024
+ alertInterval: "alert_interval",
1025
+ description: "description",
1026
+ filters: "filters",
1027
+ }), T.Http({
1028
+ method: "POST",
1029
+ path: "/accounts/{account_id}/alerting/v3/policies",
1030
+ }));
1031
+ export const CreatePolicyResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1032
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1033
+ }).pipe(T.ResponsePath("result"));
1034
+ export const createPolicy = API.make(() => ({
1035
+ input: CreatePolicyRequest,
1036
+ output: CreatePolicyResponse,
1037
+ errors: [InvalidRoute, FiltersRequired, MechanismRequired],
1038
+ }));
1039
+ export const UpdatePolicyRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1040
+ policyId: Schema.String.pipe(T.HttpPath("policyId")),
1041
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1042
+ alertInterval: Schema.optional(Schema.String),
1043
+ alertType: Schema.optional(Schema.Literals([
1044
+ "abuse_report_alert",
1045
+ "access_custom_certificate_expiration_type",
1046
+ "advanced_ddos_attack_l4_alert",
1047
+ "advanced_ddos_attack_l7_alert",
1048
+ "advanced_http_alert_error",
1049
+ "bgp_hijack_notification",
1050
+ "billing_usage_alert",
1051
+ "block_notification_block_removed",
1052
+ "block_notification_new_block",
1053
+ "block_notification_review_rejected",
1054
+ "bot_traffic_basic_alert",
1055
+ "brand_protection_alert",
1056
+ "brand_protection_digest",
1057
+ "clickhouse_alert_fw_anomaly",
1058
+ "clickhouse_alert_fw_ent_anomaly",
1059
+ "cloudforce_one_request_notification",
1060
+ "custom_analytics",
1061
+ "custom_bot_detection_alert",
1062
+ "custom_ssl_certificate_event_type",
1063
+ "dedicated_ssl_certificate_event_type",
1064
+ "device_connectivity_anomaly_alert",
1065
+ "dos_attack_l4",
1066
+ "dos_attack_l7",
1067
+ "expiring_service_token_alert",
1068
+ "failing_logpush_job_disabled_alert",
1069
+ "fbm_auto_advertisement",
1070
+ "fbm_dosd_attack",
1071
+ "fbm_volumetric_attack",
1072
+ "health_check_status_notification",
1073
+ "hostname_aop_custom_certificate_expiration_type",
1074
+ "http_alert_edge_error",
1075
+ "http_alert_origin_error",
1076
+ "image_notification",
1077
+ "image_resizing_notification",
1078
+ "incident_alert",
1079
+ "load_balancing_health_alert",
1080
+ "load_balancing_pool_enablement_alert",
1081
+ "logo_match_alert",
1082
+ "magic_tunnel_health_check_event",
1083
+ "magic_wan_tunnel_health",
1084
+ "maintenance_event_notification",
1085
+ "mtls_certificate_store_certificate_expiration_type",
1086
+ "pages_event_alert",
1087
+ "radar_notification",
1088
+ "real_origin_monitoring",
1089
+ "scriptmonitor_alert_new_code_change_detections",
1090
+ "scriptmonitor_alert_new_hosts",
1091
+ "scriptmonitor_alert_new_malicious_hosts",
1092
+ "scriptmonitor_alert_new_malicious_scripts",
1093
+ "scriptmonitor_alert_new_malicious_url",
1094
+ "scriptmonitor_alert_new_max_length_resource_url",
1095
+ "scriptmonitor_alert_new_resources",
1096
+ "secondary_dns_all_primaries_failing",
1097
+ "secondary_dns_primaries_failing",
1098
+ "secondary_dns_warning",
1099
+ "secondary_dns_zone_successfully_updated",
1100
+ "secondary_dns_zone_validation_warning",
1101
+ "security_insights_alert",
1102
+ "sentinel_alert",
1103
+ "stream_live_notifications",
1104
+ "synthetic_test_latency_alert",
1105
+ "synthetic_test_low_availability_alert",
1106
+ "traffic_anomalies_alert",
1107
+ "tunnel_health_event",
1108
+ "tunnel_update_event",
1109
+ "universal_ssl_event_type",
1110
+ "web_analytics_metrics_update",
1111
+ "zone_aop_custom_certificate_expiration_type",
1112
+ ])),
1113
+ description: Schema.optional(Schema.String),
1114
+ enabled: Schema.optional(Schema.Boolean),
1115
+ filters: Schema.optional(Schema.Struct({
1116
+ actions: Schema.optional(Schema.Array(Schema.String)),
1117
+ affectedAsns: Schema.optional(Schema.Array(Schema.String)),
1118
+ affectedComponents: Schema.optional(Schema.Array(Schema.String)),
1119
+ affectedLocations: Schema.optional(Schema.Array(Schema.String)),
1120
+ airportCode: Schema.optional(Schema.Array(Schema.String)),
1121
+ alertTriggerPreferences: Schema.optional(Schema.Array(Schema.String)),
1122
+ alertTriggerPreferencesValue: Schema.optional(Schema.Array(Schema.String)),
1123
+ enabled: Schema.optional(Schema.Array(Schema.String)),
1124
+ environment: Schema.optional(Schema.Array(Schema.String)),
1125
+ event: Schema.optional(Schema.Array(Schema.String)),
1126
+ eventSource: Schema.optional(Schema.Array(Schema.String)),
1127
+ eventType: Schema.optional(Schema.Array(Schema.String)),
1128
+ groupBy: Schema.optional(Schema.Array(Schema.String)),
1129
+ healthCheckId: Schema.optional(Schema.Array(Schema.String)),
1130
+ incidentImpact: Schema.optional(Schema.Array(Schema.Literals([
1131
+ "INCIDENT_IMPACT_NONE",
1132
+ "INCIDENT_IMPACT_MINOR",
1133
+ "INCIDENT_IMPACT_MAJOR",
1134
+ "INCIDENT_IMPACT_CRITICAL",
1135
+ ]))),
1136
+ inputId: Schema.optional(Schema.Array(Schema.String)),
1137
+ insightClass: Schema.optional(Schema.Array(Schema.String)),
1138
+ limit: Schema.optional(Schema.Array(Schema.String)),
1139
+ logoTag: Schema.optional(Schema.Array(Schema.String)),
1140
+ megabitsPerSecond: Schema.optional(Schema.Array(Schema.String)),
1141
+ newHealth: Schema.optional(Schema.Array(Schema.String)),
1142
+ newStatus: Schema.optional(Schema.Array(Schema.String)),
1143
+ packetsPerSecond: Schema.optional(Schema.Array(Schema.String)),
1144
+ poolId: Schema.optional(Schema.Array(Schema.String)),
1145
+ popNames: Schema.optional(Schema.Array(Schema.String)),
1146
+ product: Schema.optional(Schema.Array(Schema.String)),
1147
+ projectId: Schema.optional(Schema.Array(Schema.String)),
1148
+ protocol: Schema.optional(Schema.Array(Schema.String)),
1149
+ queryTag: Schema.optional(Schema.Array(Schema.String)),
1150
+ requestsPerSecond: Schema.optional(Schema.Array(Schema.String)),
1151
+ selectors: Schema.optional(Schema.Array(Schema.String)),
1152
+ services: Schema.optional(Schema.Array(Schema.String)),
1153
+ slo: Schema.optional(Schema.Array(Schema.String)),
1154
+ status: Schema.optional(Schema.Array(Schema.String)),
1155
+ targetHostname: Schema.optional(Schema.Array(Schema.String)),
1156
+ targetIp: Schema.optional(Schema.Array(Schema.String)),
1157
+ targetZoneName: Schema.optional(Schema.Array(Schema.String)),
1158
+ trafficExclusions: Schema.optional(Schema.Array(Schema.Literal("security_events"))),
1159
+ tunnelId: Schema.optional(Schema.Array(Schema.String)),
1160
+ tunnelName: Schema.optional(Schema.Array(Schema.String)),
1161
+ type: Schema.optional(Schema.Array(Schema.String)),
1162
+ where: Schema.optional(Schema.Array(Schema.String)),
1163
+ zones: Schema.optional(Schema.Array(Schema.String)),
1164
+ }).pipe(Schema.encodeKeys({
1165
+ actions: "actions",
1166
+ affectedAsns: "affected_asns",
1167
+ affectedComponents: "affected_components",
1168
+ affectedLocations: "affected_locations",
1169
+ airportCode: "airport_code",
1170
+ alertTriggerPreferences: "alert_trigger_preferences",
1171
+ alertTriggerPreferencesValue: "alert_trigger_preferences_value",
1172
+ enabled: "enabled",
1173
+ environment: "environment",
1174
+ event: "event",
1175
+ eventSource: "event_source",
1176
+ eventType: "event_type",
1177
+ groupBy: "group_by",
1178
+ healthCheckId: "health_check_id",
1179
+ incidentImpact: "incident_impact",
1180
+ inputId: "input_id",
1181
+ insightClass: "insight_class",
1182
+ limit: "limit",
1183
+ logoTag: "logo_tag",
1184
+ megabitsPerSecond: "megabits_per_second",
1185
+ newHealth: "new_health",
1186
+ newStatus: "new_status",
1187
+ packetsPerSecond: "packets_per_second",
1188
+ poolId: "pool_id",
1189
+ popNames: "pop_names",
1190
+ product: "product",
1191
+ projectId: "project_id",
1192
+ protocol: "protocol",
1193
+ queryTag: "query_tag",
1194
+ requestsPerSecond: "requests_per_second",
1195
+ selectors: "selectors",
1196
+ services: "services",
1197
+ slo: "slo",
1198
+ status: "status",
1199
+ targetHostname: "target_hostname",
1200
+ targetIp: "target_ip",
1201
+ targetZoneName: "target_zone_name",
1202
+ trafficExclusions: "traffic_exclusions",
1203
+ tunnelId: "tunnel_id",
1204
+ tunnelName: "tunnel_name",
1205
+ type: "type",
1206
+ where: "where",
1207
+ zones: "zones",
1208
+ }))),
1209
+ mechanisms: Schema.optional(Schema.Struct({
1210
+ email: Schema.optional(Schema.Array(Schema.Struct({
1211
+ id: Schema.optional(Schema.String),
1212
+ }))),
1213
+ pagerduty: Schema.optional(Schema.Array(Schema.Struct({
1214
+ id: Schema.optional(Schema.String),
1215
+ }))),
1216
+ webhooks: Schema.optional(Schema.Array(Schema.Struct({
1217
+ id: Schema.optional(Schema.String),
1218
+ }))),
1219
+ })),
1220
+ name: Schema.optional(Schema.String),
1221
+ }).pipe(Schema.encodeKeys({
1222
+ alertInterval: "alert_interval",
1223
+ alertType: "alert_type",
1224
+ description: "description",
1225
+ enabled: "enabled",
1226
+ filters: "filters",
1227
+ mechanisms: "mechanisms",
1228
+ name: "name",
1229
+ }), T.Http({
1230
+ method: "PUT",
1231
+ path: "/accounts/{account_id}/alerting/v3/policies/{policyId}",
1232
+ }));
1233
+ export const UpdatePolicyResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1234
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1235
+ }).pipe(T.ResponsePath("result"));
1236
+ export const updatePolicy = API.make(() => ({
1237
+ input: UpdatePolicyRequest,
1238
+ output: UpdatePolicyResponse,
1239
+ errors: [InvalidRoute, PolicyNotFound, InvalidAlertType, MechanismRequired],
1240
+ }));
1241
+ export const DeletePolicyRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1242
+ policyId: Schema.String.pipe(T.HttpPath("policyId")),
1243
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1244
+ }).pipe(T.Http({
1245
+ method: "DELETE",
1246
+ path: "/accounts/{account_id}/alerting/v3/policies/{policyId}",
1247
+ }));
1248
+ export const DeletePolicyResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1249
+ errors: Schema.optional(Schema.Union([
1250
+ Schema.Array(Schema.Struct({
1251
+ message: Schema.String,
1252
+ code: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1253
+ })),
1254
+ Schema.Null,
1255
+ ])),
1256
+ messages: Schema.optional(Schema.Union([
1257
+ Schema.Array(Schema.Struct({
1258
+ message: Schema.String,
1259
+ code: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1260
+ })),
1261
+ Schema.Null,
1262
+ ])),
1263
+ success: Schema.optional(Schema.Union([Schema.Literal(true), Schema.Null])),
1264
+ resultInfo: Schema.optional(Schema.Union([
1265
+ Schema.Struct({
1266
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1267
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1268
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1269
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1270
+ }).pipe(Schema.encodeKeys({
1271
+ count: "count",
1272
+ page: "page",
1273
+ perPage: "per_page",
1274
+ totalCount: "total_count",
1275
+ })),
1276
+ Schema.Null,
1277
+ ])),
1278
+ }).pipe(Schema.encodeKeys({
1279
+ errors: "errors",
1280
+ messages: "messages",
1281
+ success: "success",
1282
+ resultInfo: "result_info",
1283
+ }));
1284
+ export const deletePolicy = API.make(() => ({
1285
+ input: DeletePolicyRequest,
1286
+ output: DeletePolicyResponse,
1287
+ errors: [InvalidRoute, PolicyNotFound],
1288
+ }));
1289
+ export const GetSilenceRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1290
+ silenceId: Schema.String.pipe(T.HttpPath("silenceId")),
1291
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1292
+ }).pipe(T.Http({
1293
+ method: "GET",
1294
+ path: "/accounts/{account_id}/alerting/v3/silences/{silenceId}",
1295
+ }));
1296
+ export const GetSilenceResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1297
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1298
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1299
+ endTime: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1300
+ policyId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1301
+ startTime: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1302
+ updatedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1303
+ })
1304
+ .pipe(Schema.encodeKeys({
1305
+ id: "id",
1306
+ createdAt: "created_at",
1307
+ endTime: "end_time",
1308
+ policyId: "policy_id",
1309
+ startTime: "start_time",
1310
+ updatedAt: "updated_at",
1311
+ }))
1312
+ .pipe(T.ResponsePath("result"));
1313
+ export const getSilence = API.make(() => ({
1314
+ input: GetSilenceRequest,
1315
+ output: GetSilenceResponse,
1316
+ errors: [InvalidRoute, InternalServerError],
1317
+ }));
1318
+ export const ListSilencesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1319
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1320
+ }).pipe(T.Http({
1321
+ method: "GET",
1322
+ path: "/accounts/{account_id}/alerting/v3/silences",
1323
+ }));
1324
+ export const ListSilencesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1325
+ result: Schema.Array(Schema.Struct({
1326
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1327
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1328
+ endTime: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1329
+ policyId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1330
+ startTime: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1331
+ updatedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1332
+ }).pipe(Schema.encodeKeys({
1333
+ id: "id",
1334
+ createdAt: "created_at",
1335
+ endTime: "end_time",
1336
+ policyId: "policy_id",
1337
+ startTime: "start_time",
1338
+ updatedAt: "updated_at",
1339
+ }))),
1340
+ });
1341
+ export const listSilences = API.makePaginated(() => ({
1342
+ input: ListSilencesRequest,
1343
+ output: ListSilencesResponse,
1344
+ errors: [],
1345
+ pagination: {
1346
+ mode: "single",
1347
+ items: "result",
1348
+ },
1349
+ }));
1350
+ export const CreateSilenceRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1351
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1352
+ body: Schema.Array(Schema.Struct({
1353
+ endTime: Schema.optional(Schema.String),
1354
+ policyId: Schema.optional(Schema.String),
1355
+ startTime: Schema.optional(Schema.String),
1356
+ }).pipe(Schema.encodeKeys({
1357
+ endTime: "end_time",
1358
+ policyId: "policy_id",
1359
+ startTime: "start_time",
1360
+ }))).pipe(T.HttpBody()),
1361
+ }).pipe(T.Http({
1362
+ method: "POST",
1363
+ path: "/accounts/{account_id}/alerting/v3/silences",
1364
+ }));
1365
+ export const CreateSilenceResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1366
+ errors: Schema.Array(Schema.Struct({
1367
+ message: Schema.String,
1368
+ code: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1369
+ })),
1370
+ messages: Schema.Array(Schema.Struct({
1371
+ message: Schema.String,
1372
+ code: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1373
+ })),
1374
+ success: Schema.Literal(true),
1375
+ });
1376
+ export const createSilence = API.make(() => ({
1377
+ input: CreateSilenceRequest,
1378
+ output: CreateSilenceResponse,
1379
+ errors: [InvalidRoute],
1380
+ }));
1381
+ export const UpdateSilenceRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1382
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1383
+ body: Schema.Array(Schema.Struct({
1384
+ id: Schema.optional(Schema.String),
1385
+ endTime: Schema.optional(Schema.String),
1386
+ startTime: Schema.optional(Schema.String),
1387
+ }).pipe(Schema.encodeKeys({
1388
+ id: "id",
1389
+ endTime: "end_time",
1390
+ startTime: "start_time",
1391
+ }))).pipe(T.HttpBody()),
1392
+ }).pipe(T.Http({
1393
+ method: "PUT",
1394
+ path: "/accounts/{account_id}/alerting/v3/silences",
1395
+ }));
1396
+ export const UpdateSilenceResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1397
+ result: Schema.Array(Schema.Struct({
1398
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1399
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1400
+ endTime: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1401
+ policyId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1402
+ startTime: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1403
+ updatedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1404
+ }).pipe(Schema.encodeKeys({
1405
+ id: "id",
1406
+ createdAt: "created_at",
1407
+ endTime: "end_time",
1408
+ policyId: "policy_id",
1409
+ startTime: "start_time",
1410
+ updatedAt: "updated_at",
1411
+ }))),
1412
+ });
1413
+ export const updateSilence = API.makePaginated(() => ({
1414
+ input: UpdateSilenceRequest,
1415
+ output: UpdateSilenceResponse,
1416
+ errors: [],
1417
+ pagination: {
1418
+ mode: "single",
1419
+ items: "result",
1420
+ },
1421
+ }));
1422
+ export const DeleteSilenceRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1423
+ silenceId: Schema.String.pipe(T.HttpPath("silenceId")),
1424
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1425
+ }).pipe(T.Http({
1426
+ method: "DELETE",
1427
+ path: "/accounts/{account_id}/alerting/v3/silences/{silenceId}",
1428
+ }));
1429
+ export const DeleteSilenceResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1430
+ errors: Schema.Array(Schema.Struct({
1431
+ message: Schema.String,
1432
+ code: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1433
+ })),
1434
+ messages: Schema.Array(Schema.Struct({
1435
+ message: Schema.String,
1436
+ code: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1437
+ })),
1438
+ success: Schema.Literal(true),
1439
+ });
1440
+ export const deleteSilence = API.make(() => ({
1441
+ input: DeleteSilenceRequest,
1442
+ output: DeleteSilenceResponse,
1443
+ errors: [InvalidRoute],
1444
+ }));
1445
+ //# sourceMappingURL=alerting.js.map