@distilled.cloud/cloudflare 0.0.0 → 0.2.0-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (560) hide show
  1. package/lib/auth.d.ts +13 -0
  2. package/lib/auth.d.ts.map +1 -0
  3. package/lib/auth.js +12 -0
  4. package/lib/auth.js.map +1 -0
  5. package/lib/category.d.ts +2 -0
  6. package/lib/category.d.ts.map +1 -0
  7. package/lib/category.js +2 -0
  8. package/lib/category.js.map +1 -0
  9. package/lib/client/api.d.ts +14 -0
  10. package/lib/client/api.d.ts.map +1 -0
  11. package/lib/client/api.js +197 -0
  12. package/lib/client/api.js.map +1 -0
  13. package/lib/client/index.d.ts +8 -0
  14. package/lib/client/index.d.ts.map +1 -0
  15. package/lib/client/index.js +8 -0
  16. package/lib/client/index.js.map +1 -0
  17. package/lib/credentials.d.ts +14 -0
  18. package/lib/credentials.d.ts.map +1 -0
  19. package/lib/credentials.js +17 -0
  20. package/lib/credentials.js.map +1 -0
  21. package/lib/errors.d.ts +48 -0
  22. package/lib/errors.d.ts.map +1 -0
  23. package/lib/errors.js +38 -0
  24. package/lib/errors.js.map +1 -0
  25. package/lib/index.d.ts +10 -0
  26. package/lib/index.d.ts.map +1 -0
  27. package/lib/index.js +10 -0
  28. package/lib/index.js.map +1 -0
  29. package/lib/retry.d.ts +14 -0
  30. package/lib/retry.d.ts.map +1 -0
  31. package/lib/retry.js +14 -0
  32. package/lib/retry.js.map +1 -0
  33. package/lib/schemas.d.ts +29 -0
  34. package/lib/schemas.d.ts.map +1 -0
  35. package/lib/schemas.js +34 -0
  36. package/lib/schemas.js.map +1 -0
  37. package/lib/services/abuse-reports.d.ts +224 -0
  38. package/lib/services/abuse-reports.d.ts.map +1 -0
  39. package/lib/services/abuse-reports.js +353 -0
  40. package/lib/services/abuse-reports.js.map +1 -0
  41. package/lib/services/accounts.d.ts +682 -0
  42. package/lib/services/accounts.d.ts.map +1 -0
  43. package/lib/services/accounts.js +805 -0
  44. package/lib/services/accounts.js.map +1 -0
  45. package/lib/services/acm.d.ts +73 -0
  46. package/lib/services/acm.d.ts.map +1 -0
  47. package/lib/services/acm.js +76 -0
  48. package/lib/services/acm.js.map +1 -0
  49. package/lib/services/addressing.d.ts +1208 -0
  50. package/lib/services/addressing.d.ts.map +1 -0
  51. package/lib/services/addressing.js +1776 -0
  52. package/lib/services/addressing.js.map +1 -0
  53. package/lib/services/ai-gateway.d.ts +956 -0
  54. package/lib/services/ai-gateway.d.ts.map +1 -0
  55. package/lib/services/ai-gateway.js +1706 -0
  56. package/lib/services/ai-gateway.js.map +1 -0
  57. package/lib/services/ai.d.ts +243 -0
  58. package/lib/services/ai.d.ts.map +1 -0
  59. package/lib/services/ai.js +299 -0
  60. package/lib/services/ai.js.map +1 -0
  61. package/lib/services/aisearch.d.ts +915 -0
  62. package/lib/services/aisearch.d.ts.map +1 -0
  63. package/lib/services/aisearch.js +2425 -0
  64. package/lib/services/aisearch.js.map +1 -0
  65. package/lib/services/alerting.d.ts +718 -0
  66. package/lib/services/alerting.d.ts.map +1 -0
  67. package/lib/services/alerting.js +1388 -0
  68. package/lib/services/alerting.js.map +1 -0
  69. package/lib/services/api-gateway.d.ts +830 -0
  70. package/lib/services/api-gateway.d.ts.map +1 -0
  71. package/lib/services/api-gateway.js +1548 -0
  72. package/lib/services/api-gateway.js.map +1 -0
  73. package/lib/services/argo.d.ts +101 -0
  74. package/lib/services/argo.d.ts.map +1 -0
  75. package/lib/services/argo.js +105 -0
  76. package/lib/services/argo.js.map +1 -0
  77. package/lib/services/audit-logs.d.ts +46 -0
  78. package/lib/services/audit-logs.d.ts.map +1 -0
  79. package/lib/services/audit-logs.js +37 -0
  80. package/lib/services/audit-logs.js.map +1 -0
  81. package/lib/services/billing.d.ts +62 -0
  82. package/lib/services/billing.d.ts.map +1 -0
  83. package/lib/services/billing.js +100 -0
  84. package/lib/services/billing.js.map +1 -0
  85. package/lib/services/bot-management.d.ts +124 -0
  86. package/lib/services/bot-management.d.ts.map +1 -0
  87. package/lib/services/bot-management.js +262 -0
  88. package/lib/services/bot-management.js.map +1 -0
  89. package/lib/services/botnet-feed.d.ts +65 -0
  90. package/lib/services/botnet-feed.d.ts.map +1 -0
  91. package/lib/services/botnet-feed.js +84 -0
  92. package/lib/services/botnet-feed.js.map +1 -0
  93. package/lib/services/brand-protection.d.ts +188 -0
  94. package/lib/services/brand-protection.d.ts.map +1 -0
  95. package/lib/services/brand-protection.js +214 -0
  96. package/lib/services/brand-protection.js.map +1 -0
  97. package/lib/services/browser-rendering.d.ts +857 -0
  98. package/lib/services/browser-rendering.d.ts.map +1 -0
  99. package/lib/services/browser-rendering.js +1141 -0
  100. package/lib/services/browser-rendering.js.map +1 -0
  101. package/lib/services/cache.d.ts +287 -0
  102. package/lib/services/cache.d.ts.map +1 -0
  103. package/lib/services/cache.js +330 -0
  104. package/lib/services/cache.js.map +1 -0
  105. package/lib/services/calls.d.ts +202 -0
  106. package/lib/services/calls.d.ts.map +1 -0
  107. package/lib/services/calls.js +175 -0
  108. package/lib/services/calls.js.map +1 -0
  109. package/lib/services/certificate-authorities.d.ts +40 -0
  110. package/lib/services/certificate-authorities.d.ts.map +1 -0
  111. package/lib/services/certificate-authorities.js +49 -0
  112. package/lib/services/certificate-authorities.js.map +1 -0
  113. package/lib/services/client-certificates.d.ts +254 -0
  114. package/lib/services/client-certificates.d.ts.map +1 -0
  115. package/lib/services/client-certificates.js +350 -0
  116. package/lib/services/client-certificates.js.map +1 -0
  117. package/lib/services/cloud-connector.d.ts +59 -0
  118. package/lib/services/cloud-connector.d.ts.map +1 -0
  119. package/lib/services/cloud-connector.js +84 -0
  120. package/lib/services/cloud-connector.js.map +1 -0
  121. package/lib/services/cloudforce-one.d.ts +1318 -0
  122. package/lib/services/cloudforce-one.d.ts.map +1 -0
  123. package/lib/services/cloudforce-one.js +1684 -0
  124. package/lib/services/cloudforce-one.js.map +1 -0
  125. package/lib/services/connectivity.d.ts +248 -0
  126. package/lib/services/connectivity.d.ts.map +1 -0
  127. package/lib/services/connectivity.js +377 -0
  128. package/lib/services/connectivity.js.map +1 -0
  129. package/lib/services/content-scanning.d.ts +131 -0
  130. package/lib/services/content-scanning.d.ts.map +1 -0
  131. package/lib/services/content-scanning.js +156 -0
  132. package/lib/services/content-scanning.js.map +1 -0
  133. package/lib/services/custom-certificates.d.ts +211 -0
  134. package/lib/services/custom-certificates.d.ts.map +1 -0
  135. package/lib/services/custom-certificates.js +309 -0
  136. package/lib/services/custom-certificates.js.map +1 -0
  137. package/lib/services/custom-hostnames.d.ts +525 -0
  138. package/lib/services/custom-hostnames.d.ts.map +1 -0
  139. package/lib/services/custom-hostnames.js +1164 -0
  140. package/lib/services/custom-hostnames.js.map +1 -0
  141. package/lib/services/custom-nameservers.d.ts +67 -0
  142. package/lib/services/custom-nameservers.d.ts.map +1 -0
  143. package/lib/services/custom-nameservers.js +80 -0
  144. package/lib/services/custom-nameservers.js.map +1 -0
  145. package/lib/services/custom-pages.d.ts +74 -0
  146. package/lib/services/custom-pages.d.ts.map +1 -0
  147. package/lib/services/custom-pages.js +125 -0
  148. package/lib/services/custom-pages.js.map +1 -0
  149. package/lib/services/d1.d.ts +326 -0
  150. package/lib/services/d1.d.ts.map +1 -0
  151. package/lib/services/d1.js +448 -0
  152. package/lib/services/d1.js.map +1 -0
  153. package/lib/services/dcv-delegation.d.ts +24 -0
  154. package/lib/services/dcv-delegation.d.ts.map +1 -0
  155. package/lib/services/dcv-delegation.js +24 -0
  156. package/lib/services/dcv-delegation.js.map +1 -0
  157. package/lib/services/diagnostics.d.ts +175 -0
  158. package/lib/services/diagnostics.d.ts.map +1 -0
  159. package/lib/services/diagnostics.js +273 -0
  160. package/lib/services/diagnostics.js.map +1 -0
  161. package/lib/services/dns-firewall.d.ts +288 -0
  162. package/lib/services/dns-firewall.d.ts.map +1 -0
  163. package/lib/services/dns-firewall.js +373 -0
  164. package/lib/services/dns-firewall.js.map +1 -0
  165. package/lib/services/dns.d.ts +2946 -0
  166. package/lib/services/dns.d.ts.map +1 -0
  167. package/lib/services/dns.js +4511 -0
  168. package/lib/services/dns.js.map +1 -0
  169. package/lib/services/durable-objects.d.ts +61 -0
  170. package/lib/services/durable-objects.d.ts.map +1 -0
  171. package/lib/services/durable-objects.js +66 -0
  172. package/lib/services/durable-objects.js.map +1 -0
  173. package/lib/services/email-routing.d.ts +542 -0
  174. package/lib/services/email-routing.d.ts.map +1 -0
  175. package/lib/services/email-routing.js +662 -0
  176. package/lib/services/email-routing.js.map +1 -0
  177. package/lib/services/email-security.d.ts +1131 -0
  178. package/lib/services/email-security.d.ts.map +1 -0
  179. package/lib/services/email-security.js +2065 -0
  180. package/lib/services/email-security.js.map +1 -0
  181. package/lib/services/filters.d.ts +157 -0
  182. package/lib/services/filters.d.ts.map +1 -0
  183. package/lib/services/filters.js +135 -0
  184. package/lib/services/filters.js.map +1 -0
  185. package/lib/services/firewall.d.ts +1080 -0
  186. package/lib/services/firewall.d.ts.map +1 -0
  187. package/lib/services/firewall.js +1881 -0
  188. package/lib/services/firewall.js.map +1 -0
  189. package/lib/services/healthchecks.d.ts +464 -0
  190. package/lib/services/healthchecks.d.ts.map +1 -0
  191. package/lib/services/healthchecks.js +838 -0
  192. package/lib/services/healthchecks.js.map +1 -0
  193. package/lib/services/hostnames.d.ts +74 -0
  194. package/lib/services/hostnames.d.ts.map +1 -0
  195. package/lib/services/hostnames.js +100 -0
  196. package/lib/services/hostnames.js.map +1 -0
  197. package/lib/services/hyperdrive.d.ts +203 -0
  198. package/lib/services/hyperdrive.d.ts.map +1 -0
  199. package/lib/services/hyperdrive.js +299 -0
  200. package/lib/services/hyperdrive.js.map +1 -0
  201. package/lib/services/iam.d.ts +554 -0
  202. package/lib/services/iam.d.ts.map +1 -0
  203. package/lib/services/iam.js +743 -0
  204. package/lib/services/iam.js.map +1 -0
  205. package/lib/services/images.d.ts +403 -0
  206. package/lib/services/images.d.ts.map +1 -0
  207. package/lib/services/images.js +417 -0
  208. package/lib/services/images.js.map +1 -0
  209. package/lib/services/intel.d.ts +768 -0
  210. package/lib/services/intel.d.ts.map +1 -0
  211. package/lib/services/intel.js +1179 -0
  212. package/lib/services/intel.js.map +1 -0
  213. package/lib/services/ips.d.ts +28 -0
  214. package/lib/services/ips.d.ts.map +1 -0
  215. package/lib/services/ips.js +39 -0
  216. package/lib/services/ips.js.map +1 -0
  217. package/lib/services/keyless-certificates.d.ts +177 -0
  218. package/lib/services/keyless-certificates.d.ts.map +1 -0
  219. package/lib/services/keyless-certificates.js +216 -0
  220. package/lib/services/keyless-certificates.js.map +1 -0
  221. package/lib/services/kv.d.ts +339 -0
  222. package/lib/services/kv.d.ts.map +1 -0
  223. package/lib/services/kv.js +402 -0
  224. package/lib/services/kv.js.map +1 -0
  225. package/lib/services/leaked-credential-checks.d.ts +119 -0
  226. package/lib/services/leaked-credential-checks.d.ts.map +1 -0
  227. package/lib/services/leaked-credential-checks.js +130 -0
  228. package/lib/services/leaked-credential-checks.js.map +1 -0
  229. package/lib/services/load-balancers.d.ts +1767 -0
  230. package/lib/services/load-balancers.d.ts.map +1 -0
  231. package/lib/services/load-balancers.js +3068 -0
  232. package/lib/services/load-balancers.js.map +1 -0
  233. package/lib/services/logpush.d.ts +401 -0
  234. package/lib/services/logpush.d.ts.map +1 -0
  235. package/lib/services/logpush.js +724 -0
  236. package/lib/services/logpush.js.map +1 -0
  237. package/lib/services/logs.d.ts +125 -0
  238. package/lib/services/logs.d.ts.map +1 -0
  239. package/lib/services/logs.js +145 -0
  240. package/lib/services/logs.js.map +1 -0
  241. package/lib/services/magic-cloud-networking.d.ts +1599 -0
  242. package/lib/services/magic-cloud-networking.d.ts.map +1 -0
  243. package/lib/services/magic-cloud-networking.js +5205 -0
  244. package/lib/services/magic-cloud-networking.js.map +1 -0
  245. package/lib/services/magic-network-monitoring.d.ts +379 -0
  246. package/lib/services/magic-network-monitoring.d.ts.map +1 -0
  247. package/lib/services/magic-network-monitoring.js +535 -0
  248. package/lib/services/magic-network-monitoring.js.map +1 -0
  249. package/lib/services/magic-transit.d.ts +3650 -0
  250. package/lib/services/magic-transit.d.ts.map +1 -0
  251. package/lib/services/magic-transit.js +6120 -0
  252. package/lib/services/magic-transit.js.map +1 -0
  253. package/lib/services/managed-transforms.d.ts +79 -0
  254. package/lib/services/managed-transforms.d.ts.map +1 -0
  255. package/lib/services/managed-transforms.js +107 -0
  256. package/lib/services/managed-transforms.js.map +1 -0
  257. package/lib/services/memberships.d.ts +172 -0
  258. package/lib/services/memberships.d.ts.map +1 -0
  259. package/lib/services/memberships.js +282 -0
  260. package/lib/services/memberships.js.map +1 -0
  261. package/lib/services/mtls-certificates.d.ts +140 -0
  262. package/lib/services/mtls-certificates.d.ts.map +1 -0
  263. package/lib/services/mtls-certificates.js +173 -0
  264. package/lib/services/mtls-certificates.js.map +1 -0
  265. package/lib/services/network-interconnects.d.ts +410 -0
  266. package/lib/services/network-interconnects.d.ts.map +1 -0
  267. package/lib/services/network-interconnects.js +583 -0
  268. package/lib/services/network-interconnects.js.map +1 -0
  269. package/lib/services/organizations.d.ts +201 -0
  270. package/lib/services/organizations.d.ts.map +1 -0
  271. package/lib/services/organizations.js +355 -0
  272. package/lib/services/organizations.js.map +1 -0
  273. package/lib/services/origin-ca-certificates.d.ts +99 -0
  274. package/lib/services/origin-ca-certificates.d.ts.map +1 -0
  275. package/lib/services/origin-ca-certificates.js +156 -0
  276. package/lib/services/origin-ca-certificates.js.map +1 -0
  277. package/lib/services/origin-post-quantum-encryption.d.ts +50 -0
  278. package/lib/services/origin-post-quantum-encryption.d.ts.map +1 -0
  279. package/lib/services/origin-post-quantum-encryption.js +60 -0
  280. package/lib/services/origin-post-quantum-encryption.js.map +1 -0
  281. package/lib/services/origin-tls-client-auth.d.ts +273 -0
  282. package/lib/services/origin-tls-client-auth.d.ts.map +1 -0
  283. package/lib/services/origin-tls-client-auth.js +401 -0
  284. package/lib/services/origin-tls-client-auth.js.map +1 -0
  285. package/lib/services/page-rules.d.ts +773 -0
  286. package/lib/services/page-rules.d.ts.map +1 -0
  287. package/lib/services/page-rules.js +1365 -0
  288. package/lib/services/page-rules.js.map +1 -0
  289. package/lib/services/page-shield.d.ts +426 -0
  290. package/lib/services/page-shield.d.ts.map +1 -0
  291. package/lib/services/page-shield.js +484 -0
  292. package/lib/services/page-shield.js.map +1 -0
  293. package/lib/services/pages.d.ts +1654 -0
  294. package/lib/services/pages.d.ts.map +1 -0
  295. package/lib/services/pages.js +2954 -0
  296. package/lib/services/pages.js.map +1 -0
  297. package/lib/services/pipelines.d.ts +1461 -0
  298. package/lib/services/pipelines.d.ts.map +1 -0
  299. package/lib/services/pipelines.js +2912 -0
  300. package/lib/services/pipelines.js.map +1 -0
  301. package/lib/services/queues.d.ts +807 -0
  302. package/lib/services/queues.d.ts.map +1 -0
  303. package/lib/services/queues.js +1194 -0
  304. package/lib/services/queues.js.map +1 -0
  305. package/lib/services/r2-data-catalog.d.ts +341 -0
  306. package/lib/services/r2-data-catalog.d.ts.map +1 -0
  307. package/lib/services/r2-data-catalog.js +499 -0
  308. package/lib/services/r2-data-catalog.js.map +1 -0
  309. package/lib/services/r2.d.ts +1041 -0
  310. package/lib/services/r2.d.ts.map +1 -0
  311. package/lib/services/r2.js +1384 -0
  312. package/lib/services/r2.js.map +1 -0
  313. package/lib/services/radar.d.ts +9276 -0
  314. package/lib/services/radar.d.ts.map +1 -0
  315. package/lib/services/radar.js +20491 -0
  316. package/lib/services/radar.js.map +1 -0
  317. package/lib/services/rate-limits.d.ts +315 -0
  318. package/lib/services/rate-limits.d.ts.map +1 -0
  319. package/lib/services/rate-limits.js +521 -0
  320. package/lib/services/rate-limits.js.map +1 -0
  321. package/lib/services/realtime-kit.d.ts +2728 -0
  322. package/lib/services/realtime-kit.d.ts.map +1 -0
  323. package/lib/services/realtime-kit.js +5401 -0
  324. package/lib/services/realtime-kit.js.map +1 -0
  325. package/lib/services/registrar.d.ts +81 -0
  326. package/lib/services/registrar.d.ts.map +1 -0
  327. package/lib/services/registrar.js +154 -0
  328. package/lib/services/registrar.js.map +1 -0
  329. package/lib/services/request-tracers.d.ts +61 -0
  330. package/lib/services/request-tracers.d.ts.map +1 -0
  331. package/lib/services/request-tracers.js +82 -0
  332. package/lib/services/request-tracers.js.map +1 -0
  333. package/lib/services/resource-sharing.d.ts +540 -0
  334. package/lib/services/resource-sharing.d.ts.map +1 -0
  335. package/lib/services/resource-sharing.js +846 -0
  336. package/lib/services/resource-sharing.js.map +1 -0
  337. package/lib/services/rules.d.ts +297 -0
  338. package/lib/services/rules.d.ts.map +1 -0
  339. package/lib/services/rules.js +396 -0
  340. package/lib/services/rules.js.map +1 -0
  341. package/lib/services/rulesets.d.ts +3300 -0
  342. package/lib/services/rulesets.d.ts.map +1 -0
  343. package/lib/services/rulesets.js +7852 -0
  344. package/lib/services/rulesets.js.map +1 -0
  345. package/lib/services/rum.d.ts +289 -0
  346. package/lib/services/rum.d.ts.map +1 -0
  347. package/lib/services/rum.js +409 -0
  348. package/lib/services/rum.js.map +1 -0
  349. package/lib/services/schema-validation.d.ts +240 -0
  350. package/lib/services/schema-validation.d.ts.map +1 -0
  351. package/lib/services/schema-validation.js +306 -0
  352. package/lib/services/schema-validation.js.map +1 -0
  353. package/lib/services/secrets-store.d.ts +321 -0
  354. package/lib/services/secrets-store.d.ts.map +1 -0
  355. package/lib/services/secrets-store.js +385 -0
  356. package/lib/services/secrets-store.js.map +1 -0
  357. package/lib/services/security-center.d.ts +102 -0
  358. package/lib/services/security-center.d.ts.map +1 -0
  359. package/lib/services/security-center.js +170 -0
  360. package/lib/services/security-center.js.map +1 -0
  361. package/lib/services/security-txt.d.ts +105 -0
  362. package/lib/services/security-txt.d.ts.map +1 -0
  363. package/lib/services/security-txt.js +136 -0
  364. package/lib/services/security-txt.js.map +1 -0
  365. package/lib/services/snippets.d.ts +138 -0
  366. package/lib/services/snippets.d.ts.map +1 -0
  367. package/lib/services/snippets.js +178 -0
  368. package/lib/services/snippets.js.map +1 -0
  369. package/lib/services/spectrum.d.ts +316 -0
  370. package/lib/services/spectrum.d.ts.map +1 -0
  371. package/lib/services/spectrum.js +510 -0
  372. package/lib/services/spectrum.js.map +1 -0
  373. package/lib/services/speed.d.ts +227 -0
  374. package/lib/services/speed.d.ts.map +1 -0
  375. package/lib/services/speed.js +444 -0
  376. package/lib/services/speed.js.map +1 -0
  377. package/lib/services/ssl.d.ts +370 -0
  378. package/lib/services/ssl.d.ts.map +1 -0
  379. package/lib/services/ssl.js +732 -0
  380. package/lib/services/ssl.js.map +1 -0
  381. package/lib/services/stream.d.ts +1014 -0
  382. package/lib/services/stream.d.ts.map +1 -0
  383. package/lib/services/stream.js +1049 -0
  384. package/lib/services/stream.js.map +1 -0
  385. package/lib/services/token-validation.d.ts +547 -0
  386. package/lib/services/token-validation.d.ts.map +1 -0
  387. package/lib/services/token-validation.js +768 -0
  388. package/lib/services/token-validation.js.map +1 -0
  389. package/lib/services/turnstile.d.ts +248 -0
  390. package/lib/services/turnstile.d.ts.map +1 -0
  391. package/lib/services/turnstile.js +308 -0
  392. package/lib/services/turnstile.js.map +1 -0
  393. package/lib/services/url-normalization.d.ts +53 -0
  394. package/lib/services/url-normalization.d.ts.map +1 -0
  395. package/lib/services/url-normalization.js +52 -0
  396. package/lib/services/url-normalization.js.map +1 -0
  397. package/lib/services/url-scanner.d.ts +612 -0
  398. package/lib/services/url-scanner.d.ts.map +1 -0
  399. package/lib/services/url-scanner.js +915 -0
  400. package/lib/services/url-scanner.js.map +1 -0
  401. package/lib/services/user.d.ts +441 -0
  402. package/lib/services/user.d.ts.map +1 -0
  403. package/lib/services/user.js +567 -0
  404. package/lib/services/user.js.map +1 -0
  405. package/lib/services/vectorize.d.ts +282 -0
  406. package/lib/services/vectorize.d.ts.map +1 -0
  407. package/lib/services/vectorize.js +340 -0
  408. package/lib/services/vectorize.js.map +1 -0
  409. package/lib/services/waiting-rooms.d.ts +1009 -0
  410. package/lib/services/waiting-rooms.d.ts.map +1 -0
  411. package/lib/services/waiting-rooms.js +1757 -0
  412. package/lib/services/waiting-rooms.js.map +1 -0
  413. package/lib/services/web3.d.ts +274 -0
  414. package/lib/services/web3.d.ts.map +1 -0
  415. package/lib/services/web3.js +362 -0
  416. package/lib/services/web3.js.map +1 -0
  417. package/lib/services/workers-for-platforms.d.ts +1224 -0
  418. package/lib/services/workers-for-platforms.d.ts.map +1 -0
  419. package/lib/services/workers-for-platforms.js +2078 -0
  420. package/lib/services/workers-for-platforms.js.map +1 -0
  421. package/lib/services/workers.d.ts +3498 -0
  422. package/lib/services/workers.d.ts.map +1 -0
  423. package/lib/services/workers.js +5967 -0
  424. package/lib/services/workers.js.map +1 -0
  425. package/lib/services/workflows.d.ts +359 -0
  426. package/lib/services/workflows.d.ts.map +1 -0
  427. package/lib/services/workflows.js +516 -0
  428. package/lib/services/workflows.js.map +1 -0
  429. package/lib/services/zaraz.d.ts +300 -0
  430. package/lib/services/zaraz.d.ts.map +1 -0
  431. package/lib/services/zaraz.js +298 -0
  432. package/lib/services/zaraz.js.map +1 -0
  433. package/lib/services/zero-trust.d.ts +15449 -0
  434. package/lib/services/zero-trust.d.ts.map +1 -0
  435. package/lib/services/zero-trust.js +29194 -0
  436. package/lib/services/zero-trust.js.map +1 -0
  437. package/lib/services/zones.d.ts +1278 -0
  438. package/lib/services/zones.d.ts.map +1 -0
  439. package/lib/services/zones.js +2416 -0
  440. package/lib/services/zones.js.map +1 -0
  441. package/lib/traits.d.ts +28 -0
  442. package/lib/traits.d.ts.map +1 -0
  443. package/lib/traits.js +26 -0
  444. package/lib/traits.js.map +1 -0
  445. package/package.json +67 -5
  446. package/src/auth.ts +14 -0
  447. package/src/category.ts +1 -0
  448. package/src/client/api.ts +269 -0
  449. package/src/client/index.ts +7 -0
  450. package/src/credentials.ts +30 -0
  451. package/src/errors.ts +65 -0
  452. package/src/index.ts +9 -0
  453. package/src/retry.ts +35 -0
  454. package/src/schemas.ts +51 -0
  455. package/src/services/abuse-reports.ts +747 -0
  456. package/src/services/accounts.ts +1947 -0
  457. package/src/services/acm.ts +170 -0
  458. package/src/services/addressing.ts +3947 -0
  459. package/src/services/ai-gateway.ts +3335 -0
  460. package/src/services/ai.ts +727 -0
  461. package/src/services/aisearch.ts +4750 -0
  462. package/src/services/alerting.ts +2947 -0
  463. package/src/services/api-gateway.ts +3391 -0
  464. package/src/services/argo.ts +254 -0
  465. package/src/services/audit-logs.ts +90 -0
  466. package/src/services/billing.ts +172 -0
  467. package/src/services/bot-management.ts +541 -0
  468. package/src/services/botnet-feed.ts +193 -0
  469. package/src/services/brand-protection.ts +553 -0
  470. package/src/services/browser-rendering.ts +2707 -0
  471. package/src/services/cache.ts +827 -0
  472. package/src/services/calls.ts +483 -0
  473. package/src/services/certificate-authorities.ts +110 -0
  474. package/src/services/client-certificates.ts +718 -0
  475. package/src/services/cloud-connector.ts +181 -0
  476. package/src/services/cloudforce-one.ts +3876 -0
  477. package/src/services/connectivity.ts +629 -0
  478. package/src/services/content-scanning.ts +385 -0
  479. package/src/services/custom-certificates.ts +611 -0
  480. package/src/services/custom-hostnames.ts +2453 -0
  481. package/src/services/custom-nameservers.ts +182 -0
  482. package/src/services/custom-pages.ts +264 -0
  483. package/src/services/d1.ts +1034 -0
  484. package/src/services/dcv-delegation.ts +52 -0
  485. package/src/services/diagnostics.ts +603 -0
  486. package/src/services/dns-firewall.ts +823 -0
  487. package/src/services/dns.ts +8897 -0
  488. package/src/services/durable-objects.ts +148 -0
  489. package/src/services/email-routing.ts +1602 -0
  490. package/src/services/email-security.ts +4283 -0
  491. package/src/services/filters.ts +370 -0
  492. package/src/services/firewall.ts +3896 -0
  493. package/src/services/healthchecks.ts +1750 -0
  494. package/src/services/hostnames.ts +218 -0
  495. package/src/services/hyperdrive.ts +592 -0
  496. package/src/services/iam.ts +1668 -0
  497. package/src/services/images.ts +1086 -0
  498. package/src/services/intel.ts +2768 -0
  499. package/src/services/ips.ts +88 -0
  500. package/src/services/keyless-certificates.ts +462 -0
  501. package/src/services/kv.ts +1011 -0
  502. package/src/services/leaked-credential-checks.ts +325 -0
  503. package/src/services/load-balancers.ts +6438 -0
  504. package/src/services/logpush.ts +1667 -0
  505. package/src/services/logs.ts +375 -0
  506. package/src/services/magic-cloud-networking.ts +10020 -0
  507. package/src/services/magic-network-monitoring.ts +1156 -0
  508. package/src/services/magic-transit.ts +13050 -0
  509. package/src/services/managed-transforms.ts +237 -0
  510. package/src/services/memberships.ts +615 -0
  511. package/src/services/mtls-certificates.ts +374 -0
  512. package/src/services/network-interconnects.ts +1253 -0
  513. package/src/services/organizations.ts +674 -0
  514. package/src/services/origin-ca-certificates.ts +303 -0
  515. package/src/services/origin-post-quantum-encryption.ts +128 -0
  516. package/src/services/origin-tls-client-auth.ts +878 -0
  517. package/src/services/page-rules.ts +2612 -0
  518. package/src/services/page-shield.ts +1195 -0
  519. package/src/services/pages.ts +5709 -0
  520. package/src/services/pipelines.ts +6000 -0
  521. package/src/services/queues.ts +2629 -0
  522. package/src/services/r2-data-catalog.ts +1119 -0
  523. package/src/services/r2.ts +3348 -0
  524. package/src/services/radar.ts +42152 -0
  525. package/src/services/rate-limits.ts +1150 -0
  526. package/src/services/realtime-kit.ts +11079 -0
  527. package/src/services/registrar.ts +295 -0
  528. package/src/services/request-tracers.ts +158 -0
  529. package/src/services/resource-sharing.ts +1832 -0
  530. package/src/services/rules.ts +837 -0
  531. package/src/services/rulesets.ts +15144 -0
  532. package/src/services/rum.ts +901 -0
  533. package/src/services/schema-validation.ts +733 -0
  534. package/src/services/secrets-store.ts +860 -0
  535. package/src/services/security-center.ts +397 -0
  536. package/src/services/security-txt.ts +315 -0
  537. package/src/services/snippets.ts +420 -0
  538. package/src/services/spectrum.ts +1103 -0
  539. package/src/services/speed.ts +1056 -0
  540. package/src/services/ssl.ts +1587 -0
  541. package/src/services/stream.ts +2756 -0
  542. package/src/services/token-validation.ts +1585 -0
  543. package/src/services/turnstile.ts +643 -0
  544. package/src/services/url-normalization.ts +129 -0
  545. package/src/services/url-scanner.ts +1851 -0
  546. package/src/services/user.ts +1384 -0
  547. package/src/services/vectorize.ts +816 -0
  548. package/src/services/waiting-rooms.ts +3807 -0
  549. package/src/services/web3.ts +834 -0
  550. package/src/services/workers-for-platforms.ts +3859 -0
  551. package/src/services/workers.ts +11637 -0
  552. package/src/services/workflows.ts +1124 -0
  553. package/src/services/zaraz.ts +797 -0
  554. package/src/services/zero-trust.ts +58933 -0
  555. package/src/services/zones.ts +4875 -0
  556. package/src/traits.ts +47 -0
  557. package/README.md +0 -15
  558. package/bun.lock +0 -26
  559. package/index.ts +0 -1
  560. package/tsconfig.json +0 -29
@@ -0,0 +1,2947 @@
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
+
8
+ import * as Schema from "effect/Schema";
9
+ import type * as HttpClient from "effect/unstable/http/HttpClient";
10
+ import * as API from "../client/api.ts";
11
+ import * as T from "../traits";
12
+ import type { Credentials } from "../credentials";
13
+ import { type DefaultErrors } from "../errors";
14
+
15
+ // =============================================================================
16
+ // Errors
17
+ // =============================================================================
18
+
19
+ export class FiltersRequired extends Schema.TaggedErrorClass<FiltersRequired>()(
20
+ "FiltersRequired",
21
+ { code: Schema.Number, message: Schema.String },
22
+ ) {}
23
+ T.applyErrorMatchers(FiltersRequired, [{ code: 17103 }]);
24
+
25
+ export class InternalServerError extends Schema.TaggedErrorClass<InternalServerError>()(
26
+ "InternalServerError",
27
+ { code: Schema.Number, message: Schema.String },
28
+ ) {}
29
+ T.applyErrorMatchers(InternalServerError, [{ code: 15000 }]);
30
+
31
+ export class InvalidAlertType extends Schema.TaggedErrorClass<InvalidAlertType>()(
32
+ "InvalidAlertType",
33
+ { code: Schema.Number, message: Schema.String },
34
+ ) {}
35
+ T.applyErrorMatchers(InvalidAlertType, [{ code: 17004 }]);
36
+
37
+ export class InvalidRoute extends Schema.TaggedErrorClass<InvalidRoute>()(
38
+ "InvalidRoute",
39
+ { code: Schema.Number, message: Schema.String },
40
+ ) {}
41
+ T.applyErrorMatchers(InvalidRoute, [{ code: 7003 }]);
42
+
43
+ export class InvalidWebhookId extends Schema.TaggedErrorClass<InvalidWebhookId>()(
44
+ "InvalidWebhookId",
45
+ { code: Schema.Number, message: Schema.String },
46
+ ) {}
47
+ T.applyErrorMatchers(InvalidWebhookId, [
48
+ { code: 0, message: { includes: "invalid Webhook ID" } },
49
+ ]);
50
+
51
+ export class MechanismRequired extends Schema.TaggedErrorClass<MechanismRequired>()(
52
+ "MechanismRequired",
53
+ { code: Schema.Number, message: Schema.String },
54
+ ) {}
55
+ T.applyErrorMatchers(MechanismRequired, [{ code: 17102 }]);
56
+
57
+ export class PolicyNotFound extends Schema.TaggedErrorClass<PolicyNotFound>()(
58
+ "PolicyNotFound",
59
+ { code: Schema.Number, message: Schema.String },
60
+ ) {}
61
+ T.applyErrorMatchers(PolicyNotFound, [
62
+ { code: 0, message: { includes: "Policy not found" } },
63
+ ]);
64
+
65
+ export class WebhookNotFound extends Schema.TaggedErrorClass<WebhookNotFound>()(
66
+ "WebhookNotFound",
67
+ { code: Schema.Number, message: Schema.String },
68
+ ) {}
69
+ T.applyErrorMatchers(WebhookNotFound, [
70
+ { code: 0, message: { includes: "Webhook not found" } },
71
+ ]);
72
+
73
+ export class WebhookTestFailed extends Schema.TaggedErrorClass<WebhookTestFailed>()(
74
+ "WebhookTestFailed",
75
+ { code: Schema.Number, message: Schema.String },
76
+ ) {}
77
+ T.applyErrorMatchers(WebhookTestFailed, [
78
+ { code: 0, message: { includes: "Webhook test failed" } },
79
+ ]);
80
+
81
+ // =============================================================================
82
+ // AvailableAlert
83
+ // =============================================================================
84
+
85
+ export interface ListAvailableAlertsRequest {
86
+ /** The account id */
87
+ accountId: string;
88
+ }
89
+
90
+ export const ListAvailableAlertsRequest =
91
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
92
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
93
+ }).pipe(
94
+ T.Http({
95
+ method: "GET",
96
+ path: "/accounts/{account_id}/alerting/v3/available_alerts",
97
+ }),
98
+ ) as unknown as Schema.Schema<ListAvailableAlertsRequest>;
99
+
100
+ export type ListAvailableAlertsResponse = Record<string, unknown>;
101
+
102
+ export const ListAvailableAlertsResponse =
103
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
104
+ {},
105
+ ) as unknown as Schema.Schema<ListAvailableAlertsResponse>;
106
+
107
+ export type ListAvailableAlertsError = DefaultErrors | InvalidRoute;
108
+
109
+ export const listAvailableAlerts: API.OperationMethod<
110
+ ListAvailableAlertsRequest,
111
+ ListAvailableAlertsResponse,
112
+ ListAvailableAlertsError,
113
+ Credentials | HttpClient.HttpClient
114
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
115
+ input: ListAvailableAlertsRequest,
116
+ output: ListAvailableAlertsResponse,
117
+ errors: [InvalidRoute],
118
+ }));
119
+
120
+ // =============================================================================
121
+ // DestinationEligible
122
+ // =============================================================================
123
+
124
+ export interface GetDestinationEligibleRequest {
125
+ /** The account id */
126
+ accountId: string;
127
+ }
128
+
129
+ export const GetDestinationEligibleRequest =
130
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
131
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
132
+ }).pipe(
133
+ T.Http({
134
+ method: "GET",
135
+ path: "/accounts/{account_id}/alerting/v3/destinations/eligible",
136
+ }),
137
+ ) as unknown as Schema.Schema<GetDestinationEligibleRequest>;
138
+
139
+ export type GetDestinationEligibleResponse = Record<string, unknown>;
140
+
141
+ export const GetDestinationEligibleResponse =
142
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
143
+ {},
144
+ ) as unknown as Schema.Schema<GetDestinationEligibleResponse>;
145
+
146
+ export type GetDestinationEligibleError = DefaultErrors | InvalidRoute;
147
+
148
+ export const getDestinationEligible: API.OperationMethod<
149
+ GetDestinationEligibleRequest,
150
+ GetDestinationEligibleResponse,
151
+ GetDestinationEligibleError,
152
+ Credentials | HttpClient.HttpClient
153
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
154
+ input: GetDestinationEligibleRequest,
155
+ output: GetDestinationEligibleResponse,
156
+ errors: [InvalidRoute],
157
+ }));
158
+
159
+ // =============================================================================
160
+ // DestinationPagerduty
161
+ // =============================================================================
162
+
163
+ export interface GetDestinationPagerdutyRequest {
164
+ /** The account id */
165
+ accountId: string;
166
+ }
167
+
168
+ export const GetDestinationPagerdutyRequest =
169
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
170
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
171
+ }).pipe(
172
+ T.Http({
173
+ method: "GET",
174
+ path: "/accounts/{account_id}/alerting/v3/destinations/pagerduty",
175
+ }),
176
+ ) as unknown as Schema.Schema<GetDestinationPagerdutyRequest>;
177
+
178
+ export type GetDestinationPagerdutyResponse = {
179
+ id?: string | null;
180
+ name?: string | null;
181
+ }[];
182
+
183
+ export const GetDestinationPagerdutyResponse =
184
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
185
+ Schema.Struct({
186
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
187
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
188
+ }),
189
+ ) as unknown as Schema.Schema<GetDestinationPagerdutyResponse>;
190
+
191
+ export type GetDestinationPagerdutyError = DefaultErrors;
192
+
193
+ export const getDestinationPagerduty: API.OperationMethod<
194
+ GetDestinationPagerdutyRequest,
195
+ GetDestinationPagerdutyResponse,
196
+ GetDestinationPagerdutyError,
197
+ Credentials | HttpClient.HttpClient
198
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
199
+ input: GetDestinationPagerdutyRequest,
200
+ output: GetDestinationPagerdutyResponse,
201
+ errors: [],
202
+ }));
203
+
204
+ export interface CreateDestinationPagerdutyRequest {
205
+ /** The account id */
206
+ accountId: string;
207
+ }
208
+
209
+ export const CreateDestinationPagerdutyRequest =
210
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
211
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
212
+ }).pipe(
213
+ T.Http({
214
+ method: "POST",
215
+ path: "/accounts/{account_id}/alerting/v3/destinations/pagerduty/connect",
216
+ }),
217
+ ) as unknown as Schema.Schema<CreateDestinationPagerdutyRequest>;
218
+
219
+ export interface CreateDestinationPagerdutyResponse {
220
+ /** token in form of UUID */
221
+ id?: string | null;
222
+ }
223
+
224
+ export const CreateDestinationPagerdutyResponse =
225
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
226
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
227
+ }) as unknown as Schema.Schema<CreateDestinationPagerdutyResponse>;
228
+
229
+ export type CreateDestinationPagerdutyError = DefaultErrors | InvalidRoute;
230
+
231
+ export const createDestinationPagerduty: API.OperationMethod<
232
+ CreateDestinationPagerdutyRequest,
233
+ CreateDestinationPagerdutyResponse,
234
+ CreateDestinationPagerdutyError,
235
+ Credentials | HttpClient.HttpClient
236
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
237
+ input: CreateDestinationPagerdutyRequest,
238
+ output: CreateDestinationPagerdutyResponse,
239
+ errors: [InvalidRoute],
240
+ }));
241
+
242
+ export interface DeleteDestinationPagerdutyRequest {
243
+ /** The account id */
244
+ accountId: string;
245
+ }
246
+
247
+ export const DeleteDestinationPagerdutyRequest =
248
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
249
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
250
+ }).pipe(
251
+ T.Http({
252
+ method: "DELETE",
253
+ path: "/accounts/{account_id}/alerting/v3/destinations/pagerduty",
254
+ }),
255
+ ) as unknown as Schema.Schema<DeleteDestinationPagerdutyRequest>;
256
+
257
+ export interface DeleteDestinationPagerdutyResponse {
258
+ errors: { message: string; code?: number | null }[];
259
+ messages: { message: string; code?: number | null }[];
260
+ /** Whether the API call was successful */
261
+ success: true;
262
+ }
263
+
264
+ export const DeleteDestinationPagerdutyResponse =
265
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
266
+ errors: Schema.Array(
267
+ Schema.Struct({
268
+ message: Schema.String,
269
+ code: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
270
+ }),
271
+ ),
272
+ messages: Schema.Array(
273
+ Schema.Struct({
274
+ message: Schema.String,
275
+ code: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
276
+ }),
277
+ ),
278
+ success: Schema.Literal(true),
279
+ }) as unknown as Schema.Schema<DeleteDestinationPagerdutyResponse>;
280
+
281
+ export type DeleteDestinationPagerdutyError = DefaultErrors | InvalidRoute;
282
+
283
+ export const deleteDestinationPagerduty: API.OperationMethod<
284
+ DeleteDestinationPagerdutyRequest,
285
+ DeleteDestinationPagerdutyResponse,
286
+ DeleteDestinationPagerdutyError,
287
+ Credentials | HttpClient.HttpClient
288
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
289
+ input: DeleteDestinationPagerdutyRequest,
290
+ output: DeleteDestinationPagerdutyResponse,
291
+ errors: [InvalidRoute],
292
+ }));
293
+
294
+ export interface LinkDestinationPagerdutyRequest {
295
+ tokenId: string;
296
+ /** The account id */
297
+ accountId: string;
298
+ }
299
+
300
+ export const LinkDestinationPagerdutyRequest =
301
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
302
+ tokenId: Schema.String.pipe(T.HttpPath("tokenId")),
303
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
304
+ }).pipe(
305
+ T.Http({
306
+ method: "GET",
307
+ path: "/accounts/{account_id}/alerting/v3/destinations/pagerduty/connect/{tokenId}",
308
+ }),
309
+ ) as unknown as Schema.Schema<LinkDestinationPagerdutyRequest>;
310
+
311
+ export interface LinkDestinationPagerdutyResponse {
312
+ /** UUID */
313
+ id?: string | null;
314
+ }
315
+
316
+ export const LinkDestinationPagerdutyResponse =
317
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
318
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
319
+ }) as unknown as Schema.Schema<LinkDestinationPagerdutyResponse>;
320
+
321
+ export type LinkDestinationPagerdutyError = DefaultErrors | InvalidRoute;
322
+
323
+ export const linkDestinationPagerduty: API.OperationMethod<
324
+ LinkDestinationPagerdutyRequest,
325
+ LinkDestinationPagerdutyResponse,
326
+ LinkDestinationPagerdutyError,
327
+ Credentials | HttpClient.HttpClient
328
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
329
+ input: LinkDestinationPagerdutyRequest,
330
+ output: LinkDestinationPagerdutyResponse,
331
+ errors: [InvalidRoute],
332
+ }));
333
+
334
+ // =============================================================================
335
+ // DestinationWebhook
336
+ // =============================================================================
337
+
338
+ export interface GetDestinationWebhookRequest {
339
+ webhookId: string;
340
+ /** The account id */
341
+ accountId: string;
342
+ }
343
+
344
+ export const GetDestinationWebhookRequest =
345
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
346
+ webhookId: Schema.String.pipe(T.HttpPath("webhookId")),
347
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
348
+ }).pipe(
349
+ T.Http({
350
+ method: "GET",
351
+ path: "/accounts/{account_id}/alerting/v3/destinations/webhooks/{webhookId}",
352
+ }),
353
+ ) as unknown as Schema.Schema<GetDestinationWebhookRequest>;
354
+
355
+ export interface GetDestinationWebhookResponse {
356
+ /** The unique identifier of a webhook */
357
+ id?: string | null;
358
+ /** Timestamp of when the webhook destination was created. */
359
+ createdAt?: string | null;
360
+ /** Timestamp of the last time an attempt to dispatch a notification to this webhook failed. */
361
+ lastFailure?: string | null;
362
+ /** Timestamp of the last time Cloudflare was able to successfully dispatch a notification using this webhook. */
363
+ lastSuccess?: string | null;
364
+ /** The name of the webhook destination. This will be included in the request body when you receive a webhook notification. */
365
+ name?: string | null;
366
+ /** Type of webhook endpoint. */
367
+ type?:
368
+ | "datadog"
369
+ | "discord"
370
+ | "feishu"
371
+ | "gchat"
372
+ | "generic"
373
+ | "opsgenie"
374
+ | "slack"
375
+ | "splunk"
376
+ | null;
377
+ /** The POST endpoint to call when dispatching a notification. */
378
+ url?: string | null;
379
+ }
380
+
381
+ export const GetDestinationWebhookResponse =
382
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
383
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
384
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
385
+ lastFailure: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
386
+ lastSuccess: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
387
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
388
+ type: Schema.optional(
389
+ Schema.Union([
390
+ Schema.Literals([
391
+ "datadog",
392
+ "discord",
393
+ "feishu",
394
+ "gchat",
395
+ "generic",
396
+ "opsgenie",
397
+ "slack",
398
+ "splunk",
399
+ ]),
400
+ Schema.Null,
401
+ ]),
402
+ ),
403
+ url: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
404
+ }).pipe(
405
+ Schema.encodeKeys({
406
+ id: "id",
407
+ createdAt: "created_at",
408
+ lastFailure: "last_failure",
409
+ lastSuccess: "last_success",
410
+ name: "name",
411
+ type: "type",
412
+ url: "url",
413
+ }),
414
+ ) as unknown as Schema.Schema<GetDestinationWebhookResponse>;
415
+
416
+ export type GetDestinationWebhookError =
417
+ | DefaultErrors
418
+ | InvalidRoute
419
+ | WebhookNotFound;
420
+
421
+ export const getDestinationWebhook: API.OperationMethod<
422
+ GetDestinationWebhookRequest,
423
+ GetDestinationWebhookResponse,
424
+ GetDestinationWebhookError,
425
+ Credentials | HttpClient.HttpClient
426
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
427
+ input: GetDestinationWebhookRequest,
428
+ output: GetDestinationWebhookResponse,
429
+ errors: [InvalidRoute, WebhookNotFound],
430
+ }));
431
+
432
+ export interface ListDestinationWebhooksRequest {
433
+ /** The account id */
434
+ accountId: string;
435
+ }
436
+
437
+ export const ListDestinationWebhooksRequest =
438
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
439
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
440
+ }).pipe(
441
+ T.Http({
442
+ method: "GET",
443
+ path: "/accounts/{account_id}/alerting/v3/destinations/webhooks",
444
+ }),
445
+ ) as unknown as Schema.Schema<ListDestinationWebhooksRequest>;
446
+
447
+ export type ListDestinationWebhooksResponse = {
448
+ id?: string | null;
449
+ createdAt?: string | null;
450
+ lastFailure?: string | null;
451
+ lastSuccess?: string | null;
452
+ name?: string | null;
453
+ type?:
454
+ | "datadog"
455
+ | "discord"
456
+ | "feishu"
457
+ | "gchat"
458
+ | "generic"
459
+ | "opsgenie"
460
+ | "slack"
461
+ | "splunk"
462
+ | null;
463
+ url?: string | null;
464
+ }[];
465
+
466
+ export const ListDestinationWebhooksResponse =
467
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
468
+ Schema.Struct({
469
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
470
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
471
+ lastFailure: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
472
+ lastSuccess: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
473
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
474
+ type: Schema.optional(
475
+ Schema.Union([
476
+ Schema.Literals([
477
+ "datadog",
478
+ "discord",
479
+ "feishu",
480
+ "gchat",
481
+ "generic",
482
+ "opsgenie",
483
+ "slack",
484
+ "splunk",
485
+ ]),
486
+ Schema.Null,
487
+ ]),
488
+ ),
489
+ url: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
490
+ }).pipe(
491
+ Schema.encodeKeys({
492
+ id: "id",
493
+ createdAt: "created_at",
494
+ lastFailure: "last_failure",
495
+ lastSuccess: "last_success",
496
+ name: "name",
497
+ type: "type",
498
+ url: "url",
499
+ }),
500
+ ),
501
+ ) as unknown as Schema.Schema<ListDestinationWebhooksResponse>;
502
+
503
+ export type ListDestinationWebhooksError = DefaultErrors;
504
+
505
+ export const listDestinationWebhooks: API.OperationMethod<
506
+ ListDestinationWebhooksRequest,
507
+ ListDestinationWebhooksResponse,
508
+ ListDestinationWebhooksError,
509
+ Credentials | HttpClient.HttpClient
510
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
511
+ input: ListDestinationWebhooksRequest,
512
+ output: ListDestinationWebhooksResponse,
513
+ errors: [],
514
+ }));
515
+
516
+ export interface CreateDestinationWebhookRequest {
517
+ /** Path param: The account id */
518
+ accountId: string;
519
+ /** Body param: The name of the webhook destination. This will be included in the request body when you receive a webhook notification. */
520
+ name: string;
521
+ /** Body param: The POST endpoint to call when dispatching a notification. */
522
+ url: string;
523
+ /** Body param: Optional secret that will be passed in the `cf-webhook-auth` header when dispatching generic webhook notifications or formatted for supported destinations. Secrets are not returned in any */
524
+ secret?: string;
525
+ }
526
+
527
+ export const CreateDestinationWebhookRequest =
528
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
529
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
530
+ name: Schema.String,
531
+ url: Schema.String,
532
+ secret: Schema.optional(Schema.String),
533
+ }).pipe(
534
+ T.Http({
535
+ method: "POST",
536
+ path: "/accounts/{account_id}/alerting/v3/destinations/webhooks",
537
+ }),
538
+ ) as unknown as Schema.Schema<CreateDestinationWebhookRequest>;
539
+
540
+ export interface CreateDestinationWebhookResponse {
541
+ /** UUID */
542
+ id?: string | null;
543
+ }
544
+
545
+ export const CreateDestinationWebhookResponse =
546
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
547
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
548
+ }) as unknown as Schema.Schema<CreateDestinationWebhookResponse>;
549
+
550
+ export type CreateDestinationWebhookError =
551
+ | DefaultErrors
552
+ | InvalidRoute
553
+ | WebhookTestFailed;
554
+
555
+ export const createDestinationWebhook: API.OperationMethod<
556
+ CreateDestinationWebhookRequest,
557
+ CreateDestinationWebhookResponse,
558
+ CreateDestinationWebhookError,
559
+ Credentials | HttpClient.HttpClient
560
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
561
+ input: CreateDestinationWebhookRequest,
562
+ output: CreateDestinationWebhookResponse,
563
+ errors: [InvalidRoute, WebhookTestFailed],
564
+ }));
565
+
566
+ export interface UpdateDestinationWebhookRequest {
567
+ webhookId: string;
568
+ /** Path param: The account id */
569
+ accountId: string;
570
+ /** Body param: The name of the webhook destination. This will be included in the request body when you receive a webhook notification. */
571
+ name: string;
572
+ /** Body param: The POST endpoint to call when dispatching a notification. */
573
+ url: string;
574
+ /** Body param: Optional secret that will be passed in the `cf-webhook-auth` header when dispatching generic webhook notifications or formatted for supported destinations. Secrets are not returned in any */
575
+ secret?: string;
576
+ }
577
+
578
+ export const UpdateDestinationWebhookRequest =
579
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
580
+ webhookId: Schema.String.pipe(T.HttpPath("webhookId")),
581
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
582
+ name: Schema.String,
583
+ url: Schema.String,
584
+ secret: Schema.optional(Schema.String),
585
+ }).pipe(
586
+ T.Http({
587
+ method: "PUT",
588
+ path: "/accounts/{account_id}/alerting/v3/destinations/webhooks/{webhookId}",
589
+ }),
590
+ ) as unknown as Schema.Schema<UpdateDestinationWebhookRequest>;
591
+
592
+ export interface UpdateDestinationWebhookResponse {
593
+ /** UUID */
594
+ id?: string | null;
595
+ }
596
+
597
+ export const UpdateDestinationWebhookResponse =
598
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
599
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
600
+ }) as unknown as Schema.Schema<UpdateDestinationWebhookResponse>;
601
+
602
+ export type UpdateDestinationWebhookError =
603
+ | DefaultErrors
604
+ | InvalidRoute
605
+ | InvalidWebhookId;
606
+
607
+ export const updateDestinationWebhook: API.OperationMethod<
608
+ UpdateDestinationWebhookRequest,
609
+ UpdateDestinationWebhookResponse,
610
+ UpdateDestinationWebhookError,
611
+ Credentials | HttpClient.HttpClient
612
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
613
+ input: UpdateDestinationWebhookRequest,
614
+ output: UpdateDestinationWebhookResponse,
615
+ errors: [InvalidRoute, InvalidWebhookId],
616
+ }));
617
+
618
+ export interface DeleteDestinationWebhookRequest {
619
+ webhookId: string;
620
+ /** The account id */
621
+ accountId: string;
622
+ }
623
+
624
+ export const DeleteDestinationWebhookRequest =
625
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
626
+ webhookId: Schema.String.pipe(T.HttpPath("webhookId")),
627
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
628
+ }).pipe(
629
+ T.Http({
630
+ method: "DELETE",
631
+ path: "/accounts/{account_id}/alerting/v3/destinations/webhooks/{webhookId}",
632
+ }),
633
+ ) as unknown as Schema.Schema<DeleteDestinationWebhookRequest>;
634
+
635
+ export interface DeleteDestinationWebhookResponse {
636
+ errors: { message: string; code?: number | null }[];
637
+ messages: { message: string; code?: number | null }[];
638
+ /** Whether the API call was successful */
639
+ success: true;
640
+ }
641
+
642
+ export const DeleteDestinationWebhookResponse =
643
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
644
+ errors: Schema.Array(
645
+ Schema.Struct({
646
+ message: Schema.String,
647
+ code: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
648
+ }),
649
+ ),
650
+ messages: Schema.Array(
651
+ Schema.Struct({
652
+ message: Schema.String,
653
+ code: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
654
+ }),
655
+ ),
656
+ success: Schema.Literal(true),
657
+ }) as unknown as Schema.Schema<DeleteDestinationWebhookResponse>;
658
+
659
+ export type DeleteDestinationWebhookError =
660
+ | DefaultErrors
661
+ | InvalidRoute
662
+ | InternalServerError;
663
+
664
+ export const deleteDestinationWebhook: API.OperationMethod<
665
+ DeleteDestinationWebhookRequest,
666
+ DeleteDestinationWebhookResponse,
667
+ DeleteDestinationWebhookError,
668
+ Credentials | HttpClient.HttpClient
669
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
670
+ input: DeleteDestinationWebhookRequest,
671
+ output: DeleteDestinationWebhookResponse,
672
+ errors: [InvalidRoute, InternalServerError],
673
+ }));
674
+
675
+ // =============================================================================
676
+ // History
677
+ // =============================================================================
678
+
679
+ export interface ListHistoriesRequest {
680
+ /** Path param: The account id */
681
+ accountId: string;
682
+ /** Query param: Limit the returned results to history records older than the specified date. This must be a timestamp that conforms to RFC3339. */
683
+ before?: string;
684
+ /** Query param: Limit the returned results to history records newer than the specified date. This must be a timestamp that conforms to RFC3339. */
685
+ since?: string;
686
+ }
687
+
688
+ export const ListHistoriesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
689
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
690
+ before: Schema.optional(Schema.String).pipe(T.HttpQuery("before")),
691
+ since: Schema.optional(Schema.String).pipe(T.HttpQuery("since")),
692
+ }).pipe(
693
+ T.Http({ method: "GET", path: "/accounts/{account_id}/alerting/v3/history" }),
694
+ ) as unknown as Schema.Schema<ListHistoriesRequest>;
695
+
696
+ export type ListHistoriesResponse = {
697
+ id?: string | null;
698
+ alertBody?: string | null;
699
+ alertType?: string | null;
700
+ description?: string | null;
701
+ mechanism?: string | null;
702
+ mechanismType?: "email" | "pagerduty" | "webhook" | null;
703
+ name?: string | null;
704
+ policyId?: string | null;
705
+ sent?: string | null;
706
+ }[];
707
+
708
+ export const ListHistoriesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
709
+ Schema.Struct({
710
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
711
+ alertBody: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
712
+ alertType: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
713
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
714
+ mechanism: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
715
+ mechanismType: Schema.optional(
716
+ Schema.Union([
717
+ Schema.Literals(["email", "pagerduty", "webhook"]),
718
+ Schema.Null,
719
+ ]),
720
+ ),
721
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
722
+ policyId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
723
+ sent: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
724
+ }).pipe(
725
+ Schema.encodeKeys({
726
+ id: "id",
727
+ alertBody: "alert_body",
728
+ alertType: "alert_type",
729
+ description: "description",
730
+ mechanism: "mechanism",
731
+ mechanismType: "mechanism_type",
732
+ name: "name",
733
+ policyId: "policy_id",
734
+ sent: "sent",
735
+ }),
736
+ ),
737
+ ) as unknown as Schema.Schema<ListHistoriesResponse>;
738
+
739
+ export type ListHistoriesError = DefaultErrors;
740
+
741
+ export const listHistories: API.OperationMethod<
742
+ ListHistoriesRequest,
743
+ ListHistoriesResponse,
744
+ ListHistoriesError,
745
+ Credentials | HttpClient.HttpClient
746
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
747
+ input: ListHistoriesRequest,
748
+ output: ListHistoriesResponse,
749
+ errors: [],
750
+ }));
751
+
752
+ // =============================================================================
753
+ // Policy
754
+ // =============================================================================
755
+
756
+ export interface GetPolicyRequest {
757
+ policyId: string;
758
+ /** The account id */
759
+ accountId: string;
760
+ }
761
+
762
+ export const GetPolicyRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
763
+ policyId: Schema.String.pipe(T.HttpPath("policyId")),
764
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
765
+ }).pipe(
766
+ T.Http({
767
+ method: "GET",
768
+ path: "/accounts/{account_id}/alerting/v3/policies/{policyId}",
769
+ }),
770
+ ) as unknown as Schema.Schema<GetPolicyRequest>;
771
+
772
+ export interface GetPolicyResponse {
773
+ /** The unique identifier of a notification policy */
774
+ id?: string | null;
775
+ /** Optional specification of how often to re-alert from the same incident, not support on all alert types. */
776
+ alertInterval?: string | null;
777
+ /** Refers to which event will trigger a Notification dispatch. You can use the endpoint to get available alert types which then will give you a list of possible values. */
778
+ alertType?:
779
+ | "abuse_report_alert"
780
+ | "access_custom_certificate_expiration_type"
781
+ | "advanced_ddos_attack_l4_alert"
782
+ | "advanced_ddos_attack_l7_alert"
783
+ | "advanced_http_alert_error"
784
+ | "bgp_hijack_notification"
785
+ | "billing_usage_alert"
786
+ | "block_notification_block_removed"
787
+ | "block_notification_new_block"
788
+ | "block_notification_review_rejected"
789
+ | "bot_traffic_basic_alert"
790
+ | "brand_protection_alert"
791
+ | "brand_protection_digest"
792
+ | "clickhouse_alert_fw_anomaly"
793
+ | "clickhouse_alert_fw_ent_anomaly"
794
+ | "cloudforce_one_request_notification"
795
+ | "custom_analytics"
796
+ | "custom_bot_detection_alert"
797
+ | "custom_ssl_certificate_event_type"
798
+ | "dedicated_ssl_certificate_event_type"
799
+ | "device_connectivity_anomaly_alert"
800
+ | "dos_attack_l4"
801
+ | "dos_attack_l7"
802
+ | "expiring_service_token_alert"
803
+ | "failing_logpush_job_disabled_alert"
804
+ | "fbm_auto_advertisement"
805
+ | "fbm_dosd_attack"
806
+ | "fbm_volumetric_attack"
807
+ | "health_check_status_notification"
808
+ | "hostname_aop_custom_certificate_expiration_type"
809
+ | "http_alert_edge_error"
810
+ | "http_alert_origin_error"
811
+ | "image_notification"
812
+ | "image_resizing_notification"
813
+ | "incident_alert"
814
+ | "load_balancing_health_alert"
815
+ | "load_balancing_pool_enablement_alert"
816
+ | "logo_match_alert"
817
+ | "magic_tunnel_health_check_event"
818
+ | "magic_wan_tunnel_health"
819
+ | "maintenance_event_notification"
820
+ | "mtls_certificate_store_certificate_expiration_type"
821
+ | "pages_event_alert"
822
+ | "radar_notification"
823
+ | "real_origin_monitoring"
824
+ | "scriptmonitor_alert_new_code_change_detections"
825
+ | "scriptmonitor_alert_new_hosts"
826
+ | "scriptmonitor_alert_new_malicious_hosts"
827
+ | "scriptmonitor_alert_new_malicious_scripts"
828
+ | "scriptmonitor_alert_new_malicious_url"
829
+ | "scriptmonitor_alert_new_max_length_resource_url"
830
+ | "scriptmonitor_alert_new_resources"
831
+ | "secondary_dns_all_primaries_failing"
832
+ | "secondary_dns_primaries_failing"
833
+ | "secondary_dns_warning"
834
+ | "secondary_dns_zone_successfully_updated"
835
+ | "secondary_dns_zone_validation_warning"
836
+ | "security_insights_alert"
837
+ | "sentinel_alert"
838
+ | "stream_live_notifications"
839
+ | "synthetic_test_latency_alert"
840
+ | "synthetic_test_low_availability_alert"
841
+ | "traffic_anomalies_alert"
842
+ | "tunnel_health_event"
843
+ | "tunnel_update_event"
844
+ | "universal_ssl_event_type"
845
+ | "web_analytics_metrics_update"
846
+ | "zone_aop_custom_certificate_expiration_type"
847
+ | null;
848
+ created?: string | null;
849
+ /** Optional description for the Notification policy. */
850
+ description?: string | null;
851
+ /** Whether or not the Notification policy is enabled. */
852
+ enabled?: boolean | null;
853
+ /** Optional filters that allow you to be alerted only on a subset of events for that alert type based on some criteria. This is only available for select alert types. See alert type documentation for mor */
854
+ filters?: {
855
+ actions?: string[] | null;
856
+ affectedAsns?: string[] | null;
857
+ affectedComponents?: string[] | null;
858
+ affectedLocations?: string[] | null;
859
+ airportCode?: string[] | null;
860
+ alertTriggerPreferences?: string[] | null;
861
+ alertTriggerPreferencesValue?: string[] | null;
862
+ enabled?: string[] | null;
863
+ environment?: string[] | null;
864
+ event?: string[] | null;
865
+ eventSource?: string[] | null;
866
+ eventType?: string[] | null;
867
+ groupBy?: string[] | null;
868
+ healthCheckId?: string[] | null;
869
+ incidentImpact?:
870
+ | (
871
+ | "INCIDENT_IMPACT_NONE"
872
+ | "INCIDENT_IMPACT_MINOR"
873
+ | "INCIDENT_IMPACT_MAJOR"
874
+ | "INCIDENT_IMPACT_CRITICAL"
875
+ )[]
876
+ | null;
877
+ inputId?: string[] | null;
878
+ insightClass?: string[] | null;
879
+ limit?: string[] | null;
880
+ logoTag?: string[] | null;
881
+ megabitsPerSecond?: string[] | null;
882
+ newHealth?: string[] | null;
883
+ newStatus?: string[] | null;
884
+ packetsPerSecond?: string[] | null;
885
+ poolId?: string[] | null;
886
+ popNames?: string[] | null;
887
+ product?: string[] | null;
888
+ projectId?: string[] | null;
889
+ protocol?: string[] | null;
890
+ queryTag?: string[] | null;
891
+ requestsPerSecond?: string[] | null;
892
+ selectors?: string[] | null;
893
+ services?: string[] | null;
894
+ slo?: string[] | null;
895
+ status?: string[] | null;
896
+ targetHostname?: string[] | null;
897
+ targetIp?: string[] | null;
898
+ targetZoneName?: string[] | null;
899
+ trafficExclusions?: "security_events"[] | null;
900
+ tunnelId?: string[] | null;
901
+ tunnelName?: string[] | null;
902
+ type?: string[] | null;
903
+ where?: string[] | null;
904
+ zones?: string[] | null;
905
+ } | null;
906
+ /** List of IDs that will be used when dispatching a notification. IDs for email type will be the email address. */
907
+ mechanisms?: {
908
+ email?: { id?: string | null }[] | null;
909
+ pagerduty?: { id?: string | null }[] | null;
910
+ webhooks?: { id?: string | null }[] | null;
911
+ } | null;
912
+ modified?: string | null;
913
+ /** Name of the policy. */
914
+ name?: string | null;
915
+ }
916
+
917
+ export const GetPolicyResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
918
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
919
+ alertInterval: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
920
+ alertType: Schema.optional(
921
+ Schema.Union([
922
+ Schema.Literals([
923
+ "abuse_report_alert",
924
+ "access_custom_certificate_expiration_type",
925
+ "advanced_ddos_attack_l4_alert",
926
+ "advanced_ddos_attack_l7_alert",
927
+ "advanced_http_alert_error",
928
+ "bgp_hijack_notification",
929
+ "billing_usage_alert",
930
+ "block_notification_block_removed",
931
+ "block_notification_new_block",
932
+ "block_notification_review_rejected",
933
+ "bot_traffic_basic_alert",
934
+ "brand_protection_alert",
935
+ "brand_protection_digest",
936
+ "clickhouse_alert_fw_anomaly",
937
+ "clickhouse_alert_fw_ent_anomaly",
938
+ "cloudforce_one_request_notification",
939
+ "custom_analytics",
940
+ "custom_bot_detection_alert",
941
+ "custom_ssl_certificate_event_type",
942
+ "dedicated_ssl_certificate_event_type",
943
+ "device_connectivity_anomaly_alert",
944
+ "dos_attack_l4",
945
+ "dos_attack_l7",
946
+ "expiring_service_token_alert",
947
+ "failing_logpush_job_disabled_alert",
948
+ "fbm_auto_advertisement",
949
+ "fbm_dosd_attack",
950
+ "fbm_volumetric_attack",
951
+ "health_check_status_notification",
952
+ "hostname_aop_custom_certificate_expiration_type",
953
+ "http_alert_edge_error",
954
+ "http_alert_origin_error",
955
+ "image_notification",
956
+ "image_resizing_notification",
957
+ "incident_alert",
958
+ "load_balancing_health_alert",
959
+ "load_balancing_pool_enablement_alert",
960
+ "logo_match_alert",
961
+ "magic_tunnel_health_check_event",
962
+ "magic_wan_tunnel_health",
963
+ "maintenance_event_notification",
964
+ "mtls_certificate_store_certificate_expiration_type",
965
+ "pages_event_alert",
966
+ "radar_notification",
967
+ "real_origin_monitoring",
968
+ "scriptmonitor_alert_new_code_change_detections",
969
+ "scriptmonitor_alert_new_hosts",
970
+ "scriptmonitor_alert_new_malicious_hosts",
971
+ "scriptmonitor_alert_new_malicious_scripts",
972
+ "scriptmonitor_alert_new_malicious_url",
973
+ "scriptmonitor_alert_new_max_length_resource_url",
974
+ "scriptmonitor_alert_new_resources",
975
+ "secondary_dns_all_primaries_failing",
976
+ "secondary_dns_primaries_failing",
977
+ "secondary_dns_warning",
978
+ "secondary_dns_zone_successfully_updated",
979
+ "secondary_dns_zone_validation_warning",
980
+ "security_insights_alert",
981
+ "sentinel_alert",
982
+ "stream_live_notifications",
983
+ "synthetic_test_latency_alert",
984
+ "synthetic_test_low_availability_alert",
985
+ "traffic_anomalies_alert",
986
+ "tunnel_health_event",
987
+ "tunnel_update_event",
988
+ "universal_ssl_event_type",
989
+ "web_analytics_metrics_update",
990
+ "zone_aop_custom_certificate_expiration_type",
991
+ ]),
992
+ Schema.Null,
993
+ ]),
994
+ ),
995
+ created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
996
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
997
+ enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
998
+ filters: Schema.optional(
999
+ Schema.Union([
1000
+ Schema.Struct({
1001
+ actions: Schema.optional(
1002
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1003
+ ),
1004
+ affectedAsns: Schema.optional(
1005
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1006
+ ),
1007
+ affectedComponents: Schema.optional(
1008
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1009
+ ),
1010
+ affectedLocations: Schema.optional(
1011
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1012
+ ),
1013
+ airportCode: Schema.optional(
1014
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1015
+ ),
1016
+ alertTriggerPreferences: Schema.optional(
1017
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1018
+ ),
1019
+ alertTriggerPreferencesValue: Schema.optional(
1020
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1021
+ ),
1022
+ enabled: Schema.optional(
1023
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1024
+ ),
1025
+ environment: Schema.optional(
1026
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1027
+ ),
1028
+ event: Schema.optional(
1029
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1030
+ ),
1031
+ eventSource: Schema.optional(
1032
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1033
+ ),
1034
+ eventType: Schema.optional(
1035
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1036
+ ),
1037
+ groupBy: Schema.optional(
1038
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1039
+ ),
1040
+ healthCheckId: Schema.optional(
1041
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1042
+ ),
1043
+ incidentImpact: Schema.optional(
1044
+ Schema.Union([
1045
+ Schema.Array(
1046
+ Schema.Literals([
1047
+ "INCIDENT_IMPACT_NONE",
1048
+ "INCIDENT_IMPACT_MINOR",
1049
+ "INCIDENT_IMPACT_MAJOR",
1050
+ "INCIDENT_IMPACT_CRITICAL",
1051
+ ]),
1052
+ ),
1053
+ Schema.Null,
1054
+ ]),
1055
+ ),
1056
+ inputId: Schema.optional(
1057
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1058
+ ),
1059
+ insightClass: Schema.optional(
1060
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1061
+ ),
1062
+ limit: Schema.optional(
1063
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1064
+ ),
1065
+ logoTag: Schema.optional(
1066
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1067
+ ),
1068
+ megabitsPerSecond: Schema.optional(
1069
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1070
+ ),
1071
+ newHealth: Schema.optional(
1072
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1073
+ ),
1074
+ newStatus: Schema.optional(
1075
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1076
+ ),
1077
+ packetsPerSecond: Schema.optional(
1078
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1079
+ ),
1080
+ poolId: Schema.optional(
1081
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1082
+ ),
1083
+ popNames: Schema.optional(
1084
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1085
+ ),
1086
+ product: Schema.optional(
1087
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1088
+ ),
1089
+ projectId: Schema.optional(
1090
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1091
+ ),
1092
+ protocol: Schema.optional(
1093
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1094
+ ),
1095
+ queryTag: Schema.optional(
1096
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1097
+ ),
1098
+ requestsPerSecond: Schema.optional(
1099
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1100
+ ),
1101
+ selectors: Schema.optional(
1102
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1103
+ ),
1104
+ services: Schema.optional(
1105
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1106
+ ),
1107
+ slo: Schema.optional(
1108
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1109
+ ),
1110
+ status: Schema.optional(
1111
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1112
+ ),
1113
+ targetHostname: Schema.optional(
1114
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1115
+ ),
1116
+ targetIp: Schema.optional(
1117
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1118
+ ),
1119
+ targetZoneName: Schema.optional(
1120
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1121
+ ),
1122
+ trafficExclusions: Schema.optional(
1123
+ Schema.Union([
1124
+ Schema.Array(Schema.Literal("security_events")),
1125
+ Schema.Null,
1126
+ ]),
1127
+ ),
1128
+ tunnelId: Schema.optional(
1129
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1130
+ ),
1131
+ tunnelName: Schema.optional(
1132
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1133
+ ),
1134
+ type: Schema.optional(
1135
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1136
+ ),
1137
+ where: Schema.optional(
1138
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1139
+ ),
1140
+ zones: Schema.optional(
1141
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1142
+ ),
1143
+ }).pipe(
1144
+ Schema.encodeKeys({
1145
+ actions: "actions",
1146
+ affectedAsns: "affected_asns",
1147
+ affectedComponents: "affected_components",
1148
+ affectedLocations: "affected_locations",
1149
+ airportCode: "airport_code",
1150
+ alertTriggerPreferences: "alert_trigger_preferences",
1151
+ alertTriggerPreferencesValue: "alert_trigger_preferences_value",
1152
+ enabled: "enabled",
1153
+ environment: "environment",
1154
+ event: "event",
1155
+ eventSource: "event_source",
1156
+ eventType: "event_type",
1157
+ groupBy: "group_by",
1158
+ healthCheckId: "health_check_id",
1159
+ incidentImpact: "incident_impact",
1160
+ inputId: "input_id",
1161
+ insightClass: "insight_class",
1162
+ limit: "limit",
1163
+ logoTag: "logo_tag",
1164
+ megabitsPerSecond: "megabits_per_second",
1165
+ newHealth: "new_health",
1166
+ newStatus: "new_status",
1167
+ packetsPerSecond: "packets_per_second",
1168
+ poolId: "pool_id",
1169
+ popNames: "pop_names",
1170
+ product: "product",
1171
+ projectId: "project_id",
1172
+ protocol: "protocol",
1173
+ queryTag: "query_tag",
1174
+ requestsPerSecond: "requests_per_second",
1175
+ selectors: "selectors",
1176
+ services: "services",
1177
+ slo: "slo",
1178
+ status: "status",
1179
+ targetHostname: "target_hostname",
1180
+ targetIp: "target_ip",
1181
+ targetZoneName: "target_zone_name",
1182
+ trafficExclusions: "traffic_exclusions",
1183
+ tunnelId: "tunnel_id",
1184
+ tunnelName: "tunnel_name",
1185
+ type: "type",
1186
+ where: "where",
1187
+ zones: "zones",
1188
+ }),
1189
+ ),
1190
+ Schema.Null,
1191
+ ]),
1192
+ ),
1193
+ mechanisms: Schema.optional(
1194
+ Schema.Union([
1195
+ Schema.Struct({
1196
+ email: Schema.optional(
1197
+ Schema.Union([
1198
+ Schema.Array(
1199
+ Schema.Struct({
1200
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1201
+ }),
1202
+ ),
1203
+ Schema.Null,
1204
+ ]),
1205
+ ),
1206
+ pagerduty: Schema.optional(
1207
+ Schema.Union([
1208
+ Schema.Array(
1209
+ Schema.Struct({
1210
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1211
+ }),
1212
+ ),
1213
+ Schema.Null,
1214
+ ]),
1215
+ ),
1216
+ webhooks: Schema.optional(
1217
+ Schema.Union([
1218
+ Schema.Array(
1219
+ Schema.Struct({
1220
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1221
+ }),
1222
+ ),
1223
+ Schema.Null,
1224
+ ]),
1225
+ ),
1226
+ }),
1227
+ Schema.Null,
1228
+ ]),
1229
+ ),
1230
+ modified: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1231
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1232
+ }).pipe(
1233
+ Schema.encodeKeys({
1234
+ id: "id",
1235
+ alertInterval: "alert_interval",
1236
+ alertType: "alert_type",
1237
+ created: "created",
1238
+ description: "description",
1239
+ enabled: "enabled",
1240
+ filters: "filters",
1241
+ mechanisms: "mechanisms",
1242
+ modified: "modified",
1243
+ name: "name",
1244
+ }),
1245
+ ) as unknown as Schema.Schema<GetPolicyResponse>;
1246
+
1247
+ export type GetPolicyError = DefaultErrors | InvalidRoute | PolicyNotFound;
1248
+
1249
+ export const getPolicy: API.OperationMethod<
1250
+ GetPolicyRequest,
1251
+ GetPolicyResponse,
1252
+ GetPolicyError,
1253
+ Credentials | HttpClient.HttpClient
1254
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1255
+ input: GetPolicyRequest,
1256
+ output: GetPolicyResponse,
1257
+ errors: [InvalidRoute, PolicyNotFound],
1258
+ }));
1259
+
1260
+ export interface ListPoliciesRequest {
1261
+ /** The account id */
1262
+ accountId: string;
1263
+ }
1264
+
1265
+ export const ListPoliciesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1266
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1267
+ }).pipe(
1268
+ T.Http({
1269
+ method: "GET",
1270
+ path: "/accounts/{account_id}/alerting/v3/policies",
1271
+ }),
1272
+ ) as unknown as Schema.Schema<ListPoliciesRequest>;
1273
+
1274
+ export type ListPoliciesResponse = {
1275
+ id?: string | null;
1276
+ alertInterval?: string | null;
1277
+ alertType?:
1278
+ | "abuse_report_alert"
1279
+ | "access_custom_certificate_expiration_type"
1280
+ | "advanced_ddos_attack_l4_alert"
1281
+ | "advanced_ddos_attack_l7_alert"
1282
+ | "advanced_http_alert_error"
1283
+ | "bgp_hijack_notification"
1284
+ | "billing_usage_alert"
1285
+ | "block_notification_block_removed"
1286
+ | "block_notification_new_block"
1287
+ | "block_notification_review_rejected"
1288
+ | "bot_traffic_basic_alert"
1289
+ | "brand_protection_alert"
1290
+ | "brand_protection_digest"
1291
+ | "clickhouse_alert_fw_anomaly"
1292
+ | "clickhouse_alert_fw_ent_anomaly"
1293
+ | "cloudforce_one_request_notification"
1294
+ | "custom_analytics"
1295
+ | "custom_bot_detection_alert"
1296
+ | "custom_ssl_certificate_event_type"
1297
+ | "dedicated_ssl_certificate_event_type"
1298
+ | "device_connectivity_anomaly_alert"
1299
+ | "dos_attack_l4"
1300
+ | "dos_attack_l7"
1301
+ | "expiring_service_token_alert"
1302
+ | "failing_logpush_job_disabled_alert"
1303
+ | "fbm_auto_advertisement"
1304
+ | "fbm_dosd_attack"
1305
+ | "fbm_volumetric_attack"
1306
+ | "health_check_status_notification"
1307
+ | "hostname_aop_custom_certificate_expiration_type"
1308
+ | "http_alert_edge_error"
1309
+ | "http_alert_origin_error"
1310
+ | "image_notification"
1311
+ | "image_resizing_notification"
1312
+ | "incident_alert"
1313
+ | "load_balancing_health_alert"
1314
+ | "load_balancing_pool_enablement_alert"
1315
+ | "logo_match_alert"
1316
+ | "magic_tunnel_health_check_event"
1317
+ | "magic_wan_tunnel_health"
1318
+ | "maintenance_event_notification"
1319
+ | "mtls_certificate_store_certificate_expiration_type"
1320
+ | "pages_event_alert"
1321
+ | "radar_notification"
1322
+ | "real_origin_monitoring"
1323
+ | "scriptmonitor_alert_new_code_change_detections"
1324
+ | "scriptmonitor_alert_new_hosts"
1325
+ | "scriptmonitor_alert_new_malicious_hosts"
1326
+ | "scriptmonitor_alert_new_malicious_scripts"
1327
+ | "scriptmonitor_alert_new_malicious_url"
1328
+ | "scriptmonitor_alert_new_max_length_resource_url"
1329
+ | "scriptmonitor_alert_new_resources"
1330
+ | "secondary_dns_all_primaries_failing"
1331
+ | "secondary_dns_primaries_failing"
1332
+ | "secondary_dns_warning"
1333
+ | "secondary_dns_zone_successfully_updated"
1334
+ | "secondary_dns_zone_validation_warning"
1335
+ | "security_insights_alert"
1336
+ | "sentinel_alert"
1337
+ | "stream_live_notifications"
1338
+ | "synthetic_test_latency_alert"
1339
+ | "synthetic_test_low_availability_alert"
1340
+ | "traffic_anomalies_alert"
1341
+ | "tunnel_health_event"
1342
+ | "tunnel_update_event"
1343
+ | "universal_ssl_event_type"
1344
+ | "web_analytics_metrics_update"
1345
+ | "zone_aop_custom_certificate_expiration_type"
1346
+ | null;
1347
+ created?: string | null;
1348
+ description?: string | null;
1349
+ enabled?: boolean | null;
1350
+ filters?: {
1351
+ actions?: string[] | null;
1352
+ affectedAsns?: string[] | null;
1353
+ affectedComponents?: string[] | null;
1354
+ affectedLocations?: string[] | null;
1355
+ airportCode?: string[] | null;
1356
+ alertTriggerPreferences?: string[] | null;
1357
+ alertTriggerPreferencesValue?: string[] | null;
1358
+ enabled?: string[] | null;
1359
+ environment?: string[] | null;
1360
+ event?: string[] | null;
1361
+ eventSource?: string[] | null;
1362
+ eventType?: string[] | null;
1363
+ groupBy?: string[] | null;
1364
+ healthCheckId?: string[] | null;
1365
+ incidentImpact?:
1366
+ | (
1367
+ | "INCIDENT_IMPACT_NONE"
1368
+ | "INCIDENT_IMPACT_MINOR"
1369
+ | "INCIDENT_IMPACT_MAJOR"
1370
+ | "INCIDENT_IMPACT_CRITICAL"
1371
+ )[]
1372
+ | null;
1373
+ inputId?: string[] | null;
1374
+ insightClass?: string[] | null;
1375
+ limit?: string[] | null;
1376
+ logoTag?: string[] | null;
1377
+ megabitsPerSecond?: string[] | null;
1378
+ newHealth?: string[] | null;
1379
+ newStatus?: string[] | null;
1380
+ packetsPerSecond?: string[] | null;
1381
+ poolId?: string[] | null;
1382
+ popNames?: string[] | null;
1383
+ product?: string[] | null;
1384
+ projectId?: string[] | null;
1385
+ protocol?: string[] | null;
1386
+ queryTag?: string[] | null;
1387
+ requestsPerSecond?: string[] | null;
1388
+ selectors?: string[] | null;
1389
+ services?: string[] | null;
1390
+ slo?: string[] | null;
1391
+ status?: string[] | null;
1392
+ targetHostname?: string[] | null;
1393
+ targetIp?: string[] | null;
1394
+ targetZoneName?: string[] | null;
1395
+ trafficExclusions?: "security_events"[] | null;
1396
+ tunnelId?: string[] | null;
1397
+ tunnelName?: string[] | null;
1398
+ type?: string[] | null;
1399
+ where?: string[] | null;
1400
+ zones?: string[] | null;
1401
+ } | null;
1402
+ mechanisms?: {
1403
+ email?: { id?: string | null }[] | null;
1404
+ pagerduty?: { id?: string | null }[] | null;
1405
+ webhooks?: { id?: string | null }[] | null;
1406
+ } | null;
1407
+ modified?: string | null;
1408
+ name?: string | null;
1409
+ }[];
1410
+
1411
+ export const ListPoliciesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
1412
+ Schema.Struct({
1413
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1414
+ alertInterval: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1415
+ alertType: Schema.optional(
1416
+ Schema.Union([
1417
+ Schema.Literals([
1418
+ "abuse_report_alert",
1419
+ "access_custom_certificate_expiration_type",
1420
+ "advanced_ddos_attack_l4_alert",
1421
+ "advanced_ddos_attack_l7_alert",
1422
+ "advanced_http_alert_error",
1423
+ "bgp_hijack_notification",
1424
+ "billing_usage_alert",
1425
+ "block_notification_block_removed",
1426
+ "block_notification_new_block",
1427
+ "block_notification_review_rejected",
1428
+ "bot_traffic_basic_alert",
1429
+ "brand_protection_alert",
1430
+ "brand_protection_digest",
1431
+ "clickhouse_alert_fw_anomaly",
1432
+ "clickhouse_alert_fw_ent_anomaly",
1433
+ "cloudforce_one_request_notification",
1434
+ "custom_analytics",
1435
+ "custom_bot_detection_alert",
1436
+ "custom_ssl_certificate_event_type",
1437
+ "dedicated_ssl_certificate_event_type",
1438
+ "device_connectivity_anomaly_alert",
1439
+ "dos_attack_l4",
1440
+ "dos_attack_l7",
1441
+ "expiring_service_token_alert",
1442
+ "failing_logpush_job_disabled_alert",
1443
+ "fbm_auto_advertisement",
1444
+ "fbm_dosd_attack",
1445
+ "fbm_volumetric_attack",
1446
+ "health_check_status_notification",
1447
+ "hostname_aop_custom_certificate_expiration_type",
1448
+ "http_alert_edge_error",
1449
+ "http_alert_origin_error",
1450
+ "image_notification",
1451
+ "image_resizing_notification",
1452
+ "incident_alert",
1453
+ "load_balancing_health_alert",
1454
+ "load_balancing_pool_enablement_alert",
1455
+ "logo_match_alert",
1456
+ "magic_tunnel_health_check_event",
1457
+ "magic_wan_tunnel_health",
1458
+ "maintenance_event_notification",
1459
+ "mtls_certificate_store_certificate_expiration_type",
1460
+ "pages_event_alert",
1461
+ "radar_notification",
1462
+ "real_origin_monitoring",
1463
+ "scriptmonitor_alert_new_code_change_detections",
1464
+ "scriptmonitor_alert_new_hosts",
1465
+ "scriptmonitor_alert_new_malicious_hosts",
1466
+ "scriptmonitor_alert_new_malicious_scripts",
1467
+ "scriptmonitor_alert_new_malicious_url",
1468
+ "scriptmonitor_alert_new_max_length_resource_url",
1469
+ "scriptmonitor_alert_new_resources",
1470
+ "secondary_dns_all_primaries_failing",
1471
+ "secondary_dns_primaries_failing",
1472
+ "secondary_dns_warning",
1473
+ "secondary_dns_zone_successfully_updated",
1474
+ "secondary_dns_zone_validation_warning",
1475
+ "security_insights_alert",
1476
+ "sentinel_alert",
1477
+ "stream_live_notifications",
1478
+ "synthetic_test_latency_alert",
1479
+ "synthetic_test_low_availability_alert",
1480
+ "traffic_anomalies_alert",
1481
+ "tunnel_health_event",
1482
+ "tunnel_update_event",
1483
+ "universal_ssl_event_type",
1484
+ "web_analytics_metrics_update",
1485
+ "zone_aop_custom_certificate_expiration_type",
1486
+ ]),
1487
+ Schema.Null,
1488
+ ]),
1489
+ ),
1490
+ created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1491
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1492
+ enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1493
+ filters: Schema.optional(
1494
+ Schema.Union([
1495
+ Schema.Struct({
1496
+ actions: Schema.optional(
1497
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1498
+ ),
1499
+ affectedAsns: Schema.optional(
1500
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1501
+ ),
1502
+ affectedComponents: Schema.optional(
1503
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1504
+ ),
1505
+ affectedLocations: Schema.optional(
1506
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1507
+ ),
1508
+ airportCode: Schema.optional(
1509
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1510
+ ),
1511
+ alertTriggerPreferences: Schema.optional(
1512
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1513
+ ),
1514
+ alertTriggerPreferencesValue: Schema.optional(
1515
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1516
+ ),
1517
+ enabled: Schema.optional(
1518
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1519
+ ),
1520
+ environment: Schema.optional(
1521
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1522
+ ),
1523
+ event: Schema.optional(
1524
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1525
+ ),
1526
+ eventSource: Schema.optional(
1527
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1528
+ ),
1529
+ eventType: Schema.optional(
1530
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1531
+ ),
1532
+ groupBy: Schema.optional(
1533
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1534
+ ),
1535
+ healthCheckId: Schema.optional(
1536
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1537
+ ),
1538
+ incidentImpact: Schema.optional(
1539
+ Schema.Union([
1540
+ Schema.Array(
1541
+ Schema.Literals([
1542
+ "INCIDENT_IMPACT_NONE",
1543
+ "INCIDENT_IMPACT_MINOR",
1544
+ "INCIDENT_IMPACT_MAJOR",
1545
+ "INCIDENT_IMPACT_CRITICAL",
1546
+ ]),
1547
+ ),
1548
+ Schema.Null,
1549
+ ]),
1550
+ ),
1551
+ inputId: Schema.optional(
1552
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1553
+ ),
1554
+ insightClass: Schema.optional(
1555
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1556
+ ),
1557
+ limit: Schema.optional(
1558
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1559
+ ),
1560
+ logoTag: Schema.optional(
1561
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1562
+ ),
1563
+ megabitsPerSecond: Schema.optional(
1564
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1565
+ ),
1566
+ newHealth: Schema.optional(
1567
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1568
+ ),
1569
+ newStatus: Schema.optional(
1570
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1571
+ ),
1572
+ packetsPerSecond: Schema.optional(
1573
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1574
+ ),
1575
+ poolId: Schema.optional(
1576
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1577
+ ),
1578
+ popNames: Schema.optional(
1579
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1580
+ ),
1581
+ product: Schema.optional(
1582
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1583
+ ),
1584
+ projectId: Schema.optional(
1585
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1586
+ ),
1587
+ protocol: Schema.optional(
1588
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1589
+ ),
1590
+ queryTag: Schema.optional(
1591
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1592
+ ),
1593
+ requestsPerSecond: Schema.optional(
1594
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1595
+ ),
1596
+ selectors: Schema.optional(
1597
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1598
+ ),
1599
+ services: Schema.optional(
1600
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1601
+ ),
1602
+ slo: Schema.optional(
1603
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1604
+ ),
1605
+ status: Schema.optional(
1606
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1607
+ ),
1608
+ targetHostname: Schema.optional(
1609
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1610
+ ),
1611
+ targetIp: Schema.optional(
1612
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1613
+ ),
1614
+ targetZoneName: Schema.optional(
1615
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1616
+ ),
1617
+ trafficExclusions: Schema.optional(
1618
+ Schema.Union([
1619
+ Schema.Array(Schema.Literal("security_events")),
1620
+ Schema.Null,
1621
+ ]),
1622
+ ),
1623
+ tunnelId: Schema.optional(
1624
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1625
+ ),
1626
+ tunnelName: Schema.optional(
1627
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1628
+ ),
1629
+ type: Schema.optional(
1630
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1631
+ ),
1632
+ where: Schema.optional(
1633
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1634
+ ),
1635
+ zones: Schema.optional(
1636
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1637
+ ),
1638
+ }).pipe(
1639
+ Schema.encodeKeys({
1640
+ actions: "actions",
1641
+ affectedAsns: "affected_asns",
1642
+ affectedComponents: "affected_components",
1643
+ affectedLocations: "affected_locations",
1644
+ airportCode: "airport_code",
1645
+ alertTriggerPreferences: "alert_trigger_preferences",
1646
+ alertTriggerPreferencesValue: "alert_trigger_preferences_value",
1647
+ enabled: "enabled",
1648
+ environment: "environment",
1649
+ event: "event",
1650
+ eventSource: "event_source",
1651
+ eventType: "event_type",
1652
+ groupBy: "group_by",
1653
+ healthCheckId: "health_check_id",
1654
+ incidentImpact: "incident_impact",
1655
+ inputId: "input_id",
1656
+ insightClass: "insight_class",
1657
+ limit: "limit",
1658
+ logoTag: "logo_tag",
1659
+ megabitsPerSecond: "megabits_per_second",
1660
+ newHealth: "new_health",
1661
+ newStatus: "new_status",
1662
+ packetsPerSecond: "packets_per_second",
1663
+ poolId: "pool_id",
1664
+ popNames: "pop_names",
1665
+ product: "product",
1666
+ projectId: "project_id",
1667
+ protocol: "protocol",
1668
+ queryTag: "query_tag",
1669
+ requestsPerSecond: "requests_per_second",
1670
+ selectors: "selectors",
1671
+ services: "services",
1672
+ slo: "slo",
1673
+ status: "status",
1674
+ targetHostname: "target_hostname",
1675
+ targetIp: "target_ip",
1676
+ targetZoneName: "target_zone_name",
1677
+ trafficExclusions: "traffic_exclusions",
1678
+ tunnelId: "tunnel_id",
1679
+ tunnelName: "tunnel_name",
1680
+ type: "type",
1681
+ where: "where",
1682
+ zones: "zones",
1683
+ }),
1684
+ ),
1685
+ Schema.Null,
1686
+ ]),
1687
+ ),
1688
+ mechanisms: Schema.optional(
1689
+ Schema.Union([
1690
+ Schema.Struct({
1691
+ email: Schema.optional(
1692
+ Schema.Union([
1693
+ Schema.Array(
1694
+ Schema.Struct({
1695
+ id: Schema.optional(
1696
+ Schema.Union([Schema.String, Schema.Null]),
1697
+ ),
1698
+ }),
1699
+ ),
1700
+ Schema.Null,
1701
+ ]),
1702
+ ),
1703
+ pagerduty: Schema.optional(
1704
+ Schema.Union([
1705
+ Schema.Array(
1706
+ Schema.Struct({
1707
+ id: Schema.optional(
1708
+ Schema.Union([Schema.String, Schema.Null]),
1709
+ ),
1710
+ }),
1711
+ ),
1712
+ Schema.Null,
1713
+ ]),
1714
+ ),
1715
+ webhooks: Schema.optional(
1716
+ Schema.Union([
1717
+ Schema.Array(
1718
+ Schema.Struct({
1719
+ id: Schema.optional(
1720
+ Schema.Union([Schema.String, Schema.Null]),
1721
+ ),
1722
+ }),
1723
+ ),
1724
+ Schema.Null,
1725
+ ]),
1726
+ ),
1727
+ }),
1728
+ Schema.Null,
1729
+ ]),
1730
+ ),
1731
+ modified: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1732
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1733
+ }).pipe(
1734
+ Schema.encodeKeys({
1735
+ id: "id",
1736
+ alertInterval: "alert_interval",
1737
+ alertType: "alert_type",
1738
+ created: "created",
1739
+ description: "description",
1740
+ enabled: "enabled",
1741
+ filters: "filters",
1742
+ mechanisms: "mechanisms",
1743
+ modified: "modified",
1744
+ name: "name",
1745
+ }),
1746
+ ),
1747
+ ) as unknown as Schema.Schema<ListPoliciesResponse>;
1748
+
1749
+ export type ListPoliciesError = DefaultErrors;
1750
+
1751
+ export const listPolicies: API.OperationMethod<
1752
+ ListPoliciesRequest,
1753
+ ListPoliciesResponse,
1754
+ ListPoliciesError,
1755
+ Credentials | HttpClient.HttpClient
1756
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1757
+ input: ListPoliciesRequest,
1758
+ output: ListPoliciesResponse,
1759
+ errors: [],
1760
+ }));
1761
+
1762
+ export interface CreatePolicyRequest {
1763
+ /** Path param: The account id */
1764
+ accountId: string;
1765
+ /** Body param: Refers to which event will trigger a Notification dispatch. You can use the endpoint to get available alert types which then will give you a list of possible values. */
1766
+ alertType:
1767
+ | "abuse_report_alert"
1768
+ | "access_custom_certificate_expiration_type"
1769
+ | "advanced_ddos_attack_l4_alert"
1770
+ | "advanced_ddos_attack_l7_alert"
1771
+ | "advanced_http_alert_error"
1772
+ | "bgp_hijack_notification"
1773
+ | "billing_usage_alert"
1774
+ | "block_notification_block_removed"
1775
+ | "block_notification_new_block"
1776
+ | "block_notification_review_rejected"
1777
+ | "bot_traffic_basic_alert"
1778
+ | "brand_protection_alert"
1779
+ | "brand_protection_digest"
1780
+ | "clickhouse_alert_fw_anomaly"
1781
+ | "clickhouse_alert_fw_ent_anomaly"
1782
+ | "cloudforce_one_request_notification"
1783
+ | "custom_analytics"
1784
+ | "custom_bot_detection_alert"
1785
+ | "custom_ssl_certificate_event_type"
1786
+ | "dedicated_ssl_certificate_event_type"
1787
+ | "device_connectivity_anomaly_alert"
1788
+ | "dos_attack_l4"
1789
+ | "dos_attack_l7"
1790
+ | "expiring_service_token_alert"
1791
+ | "failing_logpush_job_disabled_alert"
1792
+ | "fbm_auto_advertisement"
1793
+ | "fbm_dosd_attack"
1794
+ | "fbm_volumetric_attack"
1795
+ | "health_check_status_notification"
1796
+ | "hostname_aop_custom_certificate_expiration_type"
1797
+ | "http_alert_edge_error"
1798
+ | "http_alert_origin_error"
1799
+ | "image_notification"
1800
+ | "image_resizing_notification"
1801
+ | "incident_alert"
1802
+ | "load_balancing_health_alert"
1803
+ | "load_balancing_pool_enablement_alert"
1804
+ | "logo_match_alert"
1805
+ | "magic_tunnel_health_check_event"
1806
+ | "magic_wan_tunnel_health"
1807
+ | "maintenance_event_notification"
1808
+ | "mtls_certificate_store_certificate_expiration_type"
1809
+ | "pages_event_alert"
1810
+ | "radar_notification"
1811
+ | "real_origin_monitoring"
1812
+ | "scriptmonitor_alert_new_code_change_detections"
1813
+ | "scriptmonitor_alert_new_hosts"
1814
+ | "scriptmonitor_alert_new_malicious_hosts"
1815
+ | "scriptmonitor_alert_new_malicious_scripts"
1816
+ | "scriptmonitor_alert_new_malicious_url"
1817
+ | "scriptmonitor_alert_new_max_length_resource_url"
1818
+ | "scriptmonitor_alert_new_resources"
1819
+ | "secondary_dns_all_primaries_failing"
1820
+ | "secondary_dns_primaries_failing"
1821
+ | "secondary_dns_warning"
1822
+ | "secondary_dns_zone_successfully_updated"
1823
+ | "secondary_dns_zone_validation_warning"
1824
+ | "security_insights_alert"
1825
+ | "sentinel_alert"
1826
+ | "stream_live_notifications"
1827
+ | "synthetic_test_latency_alert"
1828
+ | "synthetic_test_low_availability_alert"
1829
+ | "traffic_anomalies_alert"
1830
+ | "tunnel_health_event"
1831
+ | "tunnel_update_event"
1832
+ | "universal_ssl_event_type"
1833
+ | "web_analytics_metrics_update"
1834
+ | "zone_aop_custom_certificate_expiration_type";
1835
+ /** Body param: Whether or not the Notification policy is enabled. */
1836
+ enabled: boolean;
1837
+ /** Body param: List of IDs that will be used when dispatching a notification. IDs for email type will be the email address. */
1838
+ mechanisms: {
1839
+ email?: { id?: string }[];
1840
+ pagerduty?: { id?: string }[];
1841
+ webhooks?: { id?: string }[];
1842
+ };
1843
+ /** Body param: Name of the policy. */
1844
+ name: string;
1845
+ /** Body param: Optional specification of how often to re-alert from the same incident, not support on all alert types. */
1846
+ alertInterval?: string;
1847
+ /** Body param: Optional description for the Notification policy. */
1848
+ description?: string;
1849
+ /** Body param: Optional filters that allow you to be alerted only on a subset of events for that alert type based on some criteria. This is only available for select alert types. See alert type documenta */
1850
+ filters?: {
1851
+ actions?: string[];
1852
+ affectedAsns?: string[];
1853
+ affectedComponents?: string[];
1854
+ affectedLocations?: string[];
1855
+ airportCode?: string[];
1856
+ alertTriggerPreferences?: string[];
1857
+ alertTriggerPreferencesValue?: string[];
1858
+ enabled?: string[];
1859
+ environment?: string[];
1860
+ event?: string[];
1861
+ eventSource?: string[];
1862
+ eventType?: string[];
1863
+ groupBy?: string[];
1864
+ healthCheckId?: string[];
1865
+ incidentImpact?: (
1866
+ | "INCIDENT_IMPACT_NONE"
1867
+ | "INCIDENT_IMPACT_MINOR"
1868
+ | "INCIDENT_IMPACT_MAJOR"
1869
+ | "INCIDENT_IMPACT_CRITICAL"
1870
+ )[];
1871
+ inputId?: string[];
1872
+ insightClass?: string[];
1873
+ limit?: string[];
1874
+ logoTag?: string[];
1875
+ megabitsPerSecond?: string[];
1876
+ newHealth?: string[];
1877
+ newStatus?: string[];
1878
+ packetsPerSecond?: string[];
1879
+ poolId?: string[];
1880
+ popNames?: string[];
1881
+ product?: string[];
1882
+ projectId?: string[];
1883
+ protocol?: string[];
1884
+ queryTag?: string[];
1885
+ requestsPerSecond?: string[];
1886
+ selectors?: string[];
1887
+ services?: string[];
1888
+ slo?: string[];
1889
+ status?: string[];
1890
+ targetHostname?: string[];
1891
+ targetIp?: string[];
1892
+ targetZoneName?: string[];
1893
+ trafficExclusions?: "security_events"[];
1894
+ tunnelId?: string[];
1895
+ tunnelName?: string[];
1896
+ type?: string[];
1897
+ where?: string[];
1898
+ zones?: string[];
1899
+ };
1900
+ }
1901
+
1902
+ export const CreatePolicyRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1903
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1904
+ alertType: Schema.Literals([
1905
+ "abuse_report_alert",
1906
+ "access_custom_certificate_expiration_type",
1907
+ "advanced_ddos_attack_l4_alert",
1908
+ "advanced_ddos_attack_l7_alert",
1909
+ "advanced_http_alert_error",
1910
+ "bgp_hijack_notification",
1911
+ "billing_usage_alert",
1912
+ "block_notification_block_removed",
1913
+ "block_notification_new_block",
1914
+ "block_notification_review_rejected",
1915
+ "bot_traffic_basic_alert",
1916
+ "brand_protection_alert",
1917
+ "brand_protection_digest",
1918
+ "clickhouse_alert_fw_anomaly",
1919
+ "clickhouse_alert_fw_ent_anomaly",
1920
+ "cloudforce_one_request_notification",
1921
+ "custom_analytics",
1922
+ "custom_bot_detection_alert",
1923
+ "custom_ssl_certificate_event_type",
1924
+ "dedicated_ssl_certificate_event_type",
1925
+ "device_connectivity_anomaly_alert",
1926
+ "dos_attack_l4",
1927
+ "dos_attack_l7",
1928
+ "expiring_service_token_alert",
1929
+ "failing_logpush_job_disabled_alert",
1930
+ "fbm_auto_advertisement",
1931
+ "fbm_dosd_attack",
1932
+ "fbm_volumetric_attack",
1933
+ "health_check_status_notification",
1934
+ "hostname_aop_custom_certificate_expiration_type",
1935
+ "http_alert_edge_error",
1936
+ "http_alert_origin_error",
1937
+ "image_notification",
1938
+ "image_resizing_notification",
1939
+ "incident_alert",
1940
+ "load_balancing_health_alert",
1941
+ "load_balancing_pool_enablement_alert",
1942
+ "logo_match_alert",
1943
+ "magic_tunnel_health_check_event",
1944
+ "magic_wan_tunnel_health",
1945
+ "maintenance_event_notification",
1946
+ "mtls_certificate_store_certificate_expiration_type",
1947
+ "pages_event_alert",
1948
+ "radar_notification",
1949
+ "real_origin_monitoring",
1950
+ "scriptmonitor_alert_new_code_change_detections",
1951
+ "scriptmonitor_alert_new_hosts",
1952
+ "scriptmonitor_alert_new_malicious_hosts",
1953
+ "scriptmonitor_alert_new_malicious_scripts",
1954
+ "scriptmonitor_alert_new_malicious_url",
1955
+ "scriptmonitor_alert_new_max_length_resource_url",
1956
+ "scriptmonitor_alert_new_resources",
1957
+ "secondary_dns_all_primaries_failing",
1958
+ "secondary_dns_primaries_failing",
1959
+ "secondary_dns_warning",
1960
+ "secondary_dns_zone_successfully_updated",
1961
+ "secondary_dns_zone_validation_warning",
1962
+ "security_insights_alert",
1963
+ "sentinel_alert",
1964
+ "stream_live_notifications",
1965
+ "synthetic_test_latency_alert",
1966
+ "synthetic_test_low_availability_alert",
1967
+ "traffic_anomalies_alert",
1968
+ "tunnel_health_event",
1969
+ "tunnel_update_event",
1970
+ "universal_ssl_event_type",
1971
+ "web_analytics_metrics_update",
1972
+ "zone_aop_custom_certificate_expiration_type",
1973
+ ]),
1974
+ enabled: Schema.Boolean,
1975
+ mechanisms: Schema.Struct({
1976
+ email: Schema.optional(
1977
+ Schema.Array(
1978
+ Schema.Struct({
1979
+ id: Schema.optional(Schema.String),
1980
+ }),
1981
+ ),
1982
+ ),
1983
+ pagerduty: Schema.optional(
1984
+ Schema.Array(
1985
+ Schema.Struct({
1986
+ id: Schema.optional(Schema.String),
1987
+ }),
1988
+ ),
1989
+ ),
1990
+ webhooks: Schema.optional(
1991
+ Schema.Array(
1992
+ Schema.Struct({
1993
+ id: Schema.optional(Schema.String),
1994
+ }),
1995
+ ),
1996
+ ),
1997
+ }),
1998
+ name: Schema.String,
1999
+ alertInterval: Schema.optional(Schema.String),
2000
+ description: Schema.optional(Schema.String),
2001
+ filters: Schema.optional(
2002
+ Schema.Struct({
2003
+ actions: Schema.optional(Schema.Array(Schema.String)),
2004
+ affectedAsns: Schema.optional(Schema.Array(Schema.String)),
2005
+ affectedComponents: Schema.optional(Schema.Array(Schema.String)),
2006
+ affectedLocations: Schema.optional(Schema.Array(Schema.String)),
2007
+ airportCode: Schema.optional(Schema.Array(Schema.String)),
2008
+ alertTriggerPreferences: Schema.optional(Schema.Array(Schema.String)),
2009
+ alertTriggerPreferencesValue: Schema.optional(
2010
+ Schema.Array(Schema.String),
2011
+ ),
2012
+ enabled: Schema.optional(Schema.Array(Schema.String)),
2013
+ environment: Schema.optional(Schema.Array(Schema.String)),
2014
+ event: Schema.optional(Schema.Array(Schema.String)),
2015
+ eventSource: Schema.optional(Schema.Array(Schema.String)),
2016
+ eventType: Schema.optional(Schema.Array(Schema.String)),
2017
+ groupBy: Schema.optional(Schema.Array(Schema.String)),
2018
+ healthCheckId: Schema.optional(Schema.Array(Schema.String)),
2019
+ incidentImpact: Schema.optional(
2020
+ Schema.Array(
2021
+ Schema.Literals([
2022
+ "INCIDENT_IMPACT_NONE",
2023
+ "INCIDENT_IMPACT_MINOR",
2024
+ "INCIDENT_IMPACT_MAJOR",
2025
+ "INCIDENT_IMPACT_CRITICAL",
2026
+ ]),
2027
+ ),
2028
+ ),
2029
+ inputId: Schema.optional(Schema.Array(Schema.String)),
2030
+ insightClass: Schema.optional(Schema.Array(Schema.String)),
2031
+ limit: Schema.optional(Schema.Array(Schema.String)),
2032
+ logoTag: Schema.optional(Schema.Array(Schema.String)),
2033
+ megabitsPerSecond: Schema.optional(Schema.Array(Schema.String)),
2034
+ newHealth: Schema.optional(Schema.Array(Schema.String)),
2035
+ newStatus: Schema.optional(Schema.Array(Schema.String)),
2036
+ packetsPerSecond: Schema.optional(Schema.Array(Schema.String)),
2037
+ poolId: Schema.optional(Schema.Array(Schema.String)),
2038
+ popNames: Schema.optional(Schema.Array(Schema.String)),
2039
+ product: Schema.optional(Schema.Array(Schema.String)),
2040
+ projectId: Schema.optional(Schema.Array(Schema.String)),
2041
+ protocol: Schema.optional(Schema.Array(Schema.String)),
2042
+ queryTag: Schema.optional(Schema.Array(Schema.String)),
2043
+ requestsPerSecond: Schema.optional(Schema.Array(Schema.String)),
2044
+ selectors: Schema.optional(Schema.Array(Schema.String)),
2045
+ services: Schema.optional(Schema.Array(Schema.String)),
2046
+ slo: Schema.optional(Schema.Array(Schema.String)),
2047
+ status: Schema.optional(Schema.Array(Schema.String)),
2048
+ targetHostname: Schema.optional(Schema.Array(Schema.String)),
2049
+ targetIp: Schema.optional(Schema.Array(Schema.String)),
2050
+ targetZoneName: Schema.optional(Schema.Array(Schema.String)),
2051
+ trafficExclusions: Schema.optional(
2052
+ Schema.Array(Schema.Literal("security_events")),
2053
+ ),
2054
+ tunnelId: Schema.optional(Schema.Array(Schema.String)),
2055
+ tunnelName: Schema.optional(Schema.Array(Schema.String)),
2056
+ type: Schema.optional(Schema.Array(Schema.String)),
2057
+ where: Schema.optional(Schema.Array(Schema.String)),
2058
+ zones: Schema.optional(Schema.Array(Schema.String)),
2059
+ }).pipe(
2060
+ Schema.encodeKeys({
2061
+ actions: "actions",
2062
+ affectedAsns: "affected_asns",
2063
+ affectedComponents: "affected_components",
2064
+ affectedLocations: "affected_locations",
2065
+ airportCode: "airport_code",
2066
+ alertTriggerPreferences: "alert_trigger_preferences",
2067
+ alertTriggerPreferencesValue: "alert_trigger_preferences_value",
2068
+ enabled: "enabled",
2069
+ environment: "environment",
2070
+ event: "event",
2071
+ eventSource: "event_source",
2072
+ eventType: "event_type",
2073
+ groupBy: "group_by",
2074
+ healthCheckId: "health_check_id",
2075
+ incidentImpact: "incident_impact",
2076
+ inputId: "input_id",
2077
+ insightClass: "insight_class",
2078
+ limit: "limit",
2079
+ logoTag: "logo_tag",
2080
+ megabitsPerSecond: "megabits_per_second",
2081
+ newHealth: "new_health",
2082
+ newStatus: "new_status",
2083
+ packetsPerSecond: "packets_per_second",
2084
+ poolId: "pool_id",
2085
+ popNames: "pop_names",
2086
+ product: "product",
2087
+ projectId: "project_id",
2088
+ protocol: "protocol",
2089
+ queryTag: "query_tag",
2090
+ requestsPerSecond: "requests_per_second",
2091
+ selectors: "selectors",
2092
+ services: "services",
2093
+ slo: "slo",
2094
+ status: "status",
2095
+ targetHostname: "target_hostname",
2096
+ targetIp: "target_ip",
2097
+ targetZoneName: "target_zone_name",
2098
+ trafficExclusions: "traffic_exclusions",
2099
+ tunnelId: "tunnel_id",
2100
+ tunnelName: "tunnel_name",
2101
+ type: "type",
2102
+ where: "where",
2103
+ zones: "zones",
2104
+ }),
2105
+ ),
2106
+ ),
2107
+ }).pipe(
2108
+ Schema.encodeKeys({
2109
+ alertType: "alert_type",
2110
+ enabled: "enabled",
2111
+ mechanisms: "mechanisms",
2112
+ name: "name",
2113
+ alertInterval: "alert_interval",
2114
+ description: "description",
2115
+ filters: "filters",
2116
+ }),
2117
+ T.Http({
2118
+ method: "POST",
2119
+ path: "/accounts/{account_id}/alerting/v3/policies",
2120
+ }),
2121
+ ) as unknown as Schema.Schema<CreatePolicyRequest>;
2122
+
2123
+ export interface CreatePolicyResponse {
2124
+ /** UUID */
2125
+ id?: string | null;
2126
+ }
2127
+
2128
+ export const CreatePolicyResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2129
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2130
+ }) as unknown as Schema.Schema<CreatePolicyResponse>;
2131
+
2132
+ export type CreatePolicyError =
2133
+ | DefaultErrors
2134
+ | InvalidRoute
2135
+ | FiltersRequired
2136
+ | MechanismRequired;
2137
+
2138
+ export const createPolicy: API.OperationMethod<
2139
+ CreatePolicyRequest,
2140
+ CreatePolicyResponse,
2141
+ CreatePolicyError,
2142
+ Credentials | HttpClient.HttpClient
2143
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2144
+ input: CreatePolicyRequest,
2145
+ output: CreatePolicyResponse,
2146
+ errors: [InvalidRoute, FiltersRequired, MechanismRequired],
2147
+ }));
2148
+
2149
+ export interface UpdatePolicyRequest {
2150
+ policyId: string;
2151
+ /** Path param: The account id */
2152
+ accountId: string;
2153
+ /** Body param: Optional specification of how often to re-alert from the same incident, not support on all alert types. */
2154
+ alertInterval?: string;
2155
+ /** Body param: Refers to which event will trigger a Notification dispatch. You can use the endpoint to get available alert types which then will give you a list of possible values. */
2156
+ alertType?:
2157
+ | "abuse_report_alert"
2158
+ | "access_custom_certificate_expiration_type"
2159
+ | "advanced_ddos_attack_l4_alert"
2160
+ | "advanced_ddos_attack_l7_alert"
2161
+ | "advanced_http_alert_error"
2162
+ | "bgp_hijack_notification"
2163
+ | "billing_usage_alert"
2164
+ | "block_notification_block_removed"
2165
+ | "block_notification_new_block"
2166
+ | "block_notification_review_rejected"
2167
+ | "bot_traffic_basic_alert"
2168
+ | "brand_protection_alert"
2169
+ | "brand_protection_digest"
2170
+ | "clickhouse_alert_fw_anomaly"
2171
+ | "clickhouse_alert_fw_ent_anomaly"
2172
+ | "cloudforce_one_request_notification"
2173
+ | "custom_analytics"
2174
+ | "custom_bot_detection_alert"
2175
+ | "custom_ssl_certificate_event_type"
2176
+ | "dedicated_ssl_certificate_event_type"
2177
+ | "device_connectivity_anomaly_alert"
2178
+ | "dos_attack_l4"
2179
+ | "dos_attack_l7"
2180
+ | "expiring_service_token_alert"
2181
+ | "failing_logpush_job_disabled_alert"
2182
+ | "fbm_auto_advertisement"
2183
+ | "fbm_dosd_attack"
2184
+ | "fbm_volumetric_attack"
2185
+ | "health_check_status_notification"
2186
+ | "hostname_aop_custom_certificate_expiration_type"
2187
+ | "http_alert_edge_error"
2188
+ | "http_alert_origin_error"
2189
+ | "image_notification"
2190
+ | "image_resizing_notification"
2191
+ | "incident_alert"
2192
+ | "load_balancing_health_alert"
2193
+ | "load_balancing_pool_enablement_alert"
2194
+ | "logo_match_alert"
2195
+ | "magic_tunnel_health_check_event"
2196
+ | "magic_wan_tunnel_health"
2197
+ | "maintenance_event_notification"
2198
+ | "mtls_certificate_store_certificate_expiration_type"
2199
+ | "pages_event_alert"
2200
+ | "radar_notification"
2201
+ | "real_origin_monitoring"
2202
+ | "scriptmonitor_alert_new_code_change_detections"
2203
+ | "scriptmonitor_alert_new_hosts"
2204
+ | "scriptmonitor_alert_new_malicious_hosts"
2205
+ | "scriptmonitor_alert_new_malicious_scripts"
2206
+ | "scriptmonitor_alert_new_malicious_url"
2207
+ | "scriptmonitor_alert_new_max_length_resource_url"
2208
+ | "scriptmonitor_alert_new_resources"
2209
+ | "secondary_dns_all_primaries_failing"
2210
+ | "secondary_dns_primaries_failing"
2211
+ | "secondary_dns_warning"
2212
+ | "secondary_dns_zone_successfully_updated"
2213
+ | "secondary_dns_zone_validation_warning"
2214
+ | "security_insights_alert"
2215
+ | "sentinel_alert"
2216
+ | "stream_live_notifications"
2217
+ | "synthetic_test_latency_alert"
2218
+ | "synthetic_test_low_availability_alert"
2219
+ | "traffic_anomalies_alert"
2220
+ | "tunnel_health_event"
2221
+ | "tunnel_update_event"
2222
+ | "universal_ssl_event_type"
2223
+ | "web_analytics_metrics_update"
2224
+ | "zone_aop_custom_certificate_expiration_type";
2225
+ /** Body param: Optional description for the Notification policy. */
2226
+ description?: string;
2227
+ /** Body param: Whether or not the Notification policy is enabled. */
2228
+ enabled?: boolean;
2229
+ /** Body param: Optional filters that allow you to be alerted only on a subset of events for that alert type based on some criteria. This is only available for select alert types. See alert type documenta */
2230
+ filters?: {
2231
+ actions?: string[];
2232
+ affectedAsns?: string[];
2233
+ affectedComponents?: string[];
2234
+ affectedLocations?: string[];
2235
+ airportCode?: string[];
2236
+ alertTriggerPreferences?: string[];
2237
+ alertTriggerPreferencesValue?: string[];
2238
+ enabled?: string[];
2239
+ environment?: string[];
2240
+ event?: string[];
2241
+ eventSource?: string[];
2242
+ eventType?: string[];
2243
+ groupBy?: string[];
2244
+ healthCheckId?: string[];
2245
+ incidentImpact?: (
2246
+ | "INCIDENT_IMPACT_NONE"
2247
+ | "INCIDENT_IMPACT_MINOR"
2248
+ | "INCIDENT_IMPACT_MAJOR"
2249
+ | "INCIDENT_IMPACT_CRITICAL"
2250
+ )[];
2251
+ inputId?: string[];
2252
+ insightClass?: string[];
2253
+ limit?: string[];
2254
+ logoTag?: string[];
2255
+ megabitsPerSecond?: string[];
2256
+ newHealth?: string[];
2257
+ newStatus?: string[];
2258
+ packetsPerSecond?: string[];
2259
+ poolId?: string[];
2260
+ popNames?: string[];
2261
+ product?: string[];
2262
+ projectId?: string[];
2263
+ protocol?: string[];
2264
+ queryTag?: string[];
2265
+ requestsPerSecond?: string[];
2266
+ selectors?: string[];
2267
+ services?: string[];
2268
+ slo?: string[];
2269
+ status?: string[];
2270
+ targetHostname?: string[];
2271
+ targetIp?: string[];
2272
+ targetZoneName?: string[];
2273
+ trafficExclusions?: "security_events"[];
2274
+ tunnelId?: string[];
2275
+ tunnelName?: string[];
2276
+ type?: string[];
2277
+ where?: string[];
2278
+ zones?: string[];
2279
+ };
2280
+ /** Body param: List of IDs that will be used when dispatching a notification. IDs for email type will be the email address. */
2281
+ mechanisms?: {
2282
+ email?: { id?: string }[];
2283
+ pagerduty?: { id?: string }[];
2284
+ webhooks?: { id?: string }[];
2285
+ };
2286
+ /** Body param: Name of the policy. */
2287
+ name?: string;
2288
+ }
2289
+
2290
+ export const UpdatePolicyRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2291
+ policyId: Schema.String.pipe(T.HttpPath("policyId")),
2292
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2293
+ alertInterval: Schema.optional(Schema.String),
2294
+ alertType: Schema.optional(
2295
+ Schema.Literals([
2296
+ "abuse_report_alert",
2297
+ "access_custom_certificate_expiration_type",
2298
+ "advanced_ddos_attack_l4_alert",
2299
+ "advanced_ddos_attack_l7_alert",
2300
+ "advanced_http_alert_error",
2301
+ "bgp_hijack_notification",
2302
+ "billing_usage_alert",
2303
+ "block_notification_block_removed",
2304
+ "block_notification_new_block",
2305
+ "block_notification_review_rejected",
2306
+ "bot_traffic_basic_alert",
2307
+ "brand_protection_alert",
2308
+ "brand_protection_digest",
2309
+ "clickhouse_alert_fw_anomaly",
2310
+ "clickhouse_alert_fw_ent_anomaly",
2311
+ "cloudforce_one_request_notification",
2312
+ "custom_analytics",
2313
+ "custom_bot_detection_alert",
2314
+ "custom_ssl_certificate_event_type",
2315
+ "dedicated_ssl_certificate_event_type",
2316
+ "device_connectivity_anomaly_alert",
2317
+ "dos_attack_l4",
2318
+ "dos_attack_l7",
2319
+ "expiring_service_token_alert",
2320
+ "failing_logpush_job_disabled_alert",
2321
+ "fbm_auto_advertisement",
2322
+ "fbm_dosd_attack",
2323
+ "fbm_volumetric_attack",
2324
+ "health_check_status_notification",
2325
+ "hostname_aop_custom_certificate_expiration_type",
2326
+ "http_alert_edge_error",
2327
+ "http_alert_origin_error",
2328
+ "image_notification",
2329
+ "image_resizing_notification",
2330
+ "incident_alert",
2331
+ "load_balancing_health_alert",
2332
+ "load_balancing_pool_enablement_alert",
2333
+ "logo_match_alert",
2334
+ "magic_tunnel_health_check_event",
2335
+ "magic_wan_tunnel_health",
2336
+ "maintenance_event_notification",
2337
+ "mtls_certificate_store_certificate_expiration_type",
2338
+ "pages_event_alert",
2339
+ "radar_notification",
2340
+ "real_origin_monitoring",
2341
+ "scriptmonitor_alert_new_code_change_detections",
2342
+ "scriptmonitor_alert_new_hosts",
2343
+ "scriptmonitor_alert_new_malicious_hosts",
2344
+ "scriptmonitor_alert_new_malicious_scripts",
2345
+ "scriptmonitor_alert_new_malicious_url",
2346
+ "scriptmonitor_alert_new_max_length_resource_url",
2347
+ "scriptmonitor_alert_new_resources",
2348
+ "secondary_dns_all_primaries_failing",
2349
+ "secondary_dns_primaries_failing",
2350
+ "secondary_dns_warning",
2351
+ "secondary_dns_zone_successfully_updated",
2352
+ "secondary_dns_zone_validation_warning",
2353
+ "security_insights_alert",
2354
+ "sentinel_alert",
2355
+ "stream_live_notifications",
2356
+ "synthetic_test_latency_alert",
2357
+ "synthetic_test_low_availability_alert",
2358
+ "traffic_anomalies_alert",
2359
+ "tunnel_health_event",
2360
+ "tunnel_update_event",
2361
+ "universal_ssl_event_type",
2362
+ "web_analytics_metrics_update",
2363
+ "zone_aop_custom_certificate_expiration_type",
2364
+ ]),
2365
+ ),
2366
+ description: Schema.optional(Schema.String),
2367
+ enabled: Schema.optional(Schema.Boolean),
2368
+ filters: Schema.optional(
2369
+ Schema.Struct({
2370
+ actions: Schema.optional(Schema.Array(Schema.String)),
2371
+ affectedAsns: Schema.optional(Schema.Array(Schema.String)),
2372
+ affectedComponents: Schema.optional(Schema.Array(Schema.String)),
2373
+ affectedLocations: Schema.optional(Schema.Array(Schema.String)),
2374
+ airportCode: Schema.optional(Schema.Array(Schema.String)),
2375
+ alertTriggerPreferences: Schema.optional(Schema.Array(Schema.String)),
2376
+ alertTriggerPreferencesValue: Schema.optional(
2377
+ Schema.Array(Schema.String),
2378
+ ),
2379
+ enabled: Schema.optional(Schema.Array(Schema.String)),
2380
+ environment: Schema.optional(Schema.Array(Schema.String)),
2381
+ event: Schema.optional(Schema.Array(Schema.String)),
2382
+ eventSource: Schema.optional(Schema.Array(Schema.String)),
2383
+ eventType: Schema.optional(Schema.Array(Schema.String)),
2384
+ groupBy: Schema.optional(Schema.Array(Schema.String)),
2385
+ healthCheckId: Schema.optional(Schema.Array(Schema.String)),
2386
+ incidentImpact: Schema.optional(
2387
+ Schema.Array(
2388
+ Schema.Literals([
2389
+ "INCIDENT_IMPACT_NONE",
2390
+ "INCIDENT_IMPACT_MINOR",
2391
+ "INCIDENT_IMPACT_MAJOR",
2392
+ "INCIDENT_IMPACT_CRITICAL",
2393
+ ]),
2394
+ ),
2395
+ ),
2396
+ inputId: Schema.optional(Schema.Array(Schema.String)),
2397
+ insightClass: Schema.optional(Schema.Array(Schema.String)),
2398
+ limit: Schema.optional(Schema.Array(Schema.String)),
2399
+ logoTag: Schema.optional(Schema.Array(Schema.String)),
2400
+ megabitsPerSecond: Schema.optional(Schema.Array(Schema.String)),
2401
+ newHealth: Schema.optional(Schema.Array(Schema.String)),
2402
+ newStatus: Schema.optional(Schema.Array(Schema.String)),
2403
+ packetsPerSecond: Schema.optional(Schema.Array(Schema.String)),
2404
+ poolId: Schema.optional(Schema.Array(Schema.String)),
2405
+ popNames: Schema.optional(Schema.Array(Schema.String)),
2406
+ product: Schema.optional(Schema.Array(Schema.String)),
2407
+ projectId: Schema.optional(Schema.Array(Schema.String)),
2408
+ protocol: Schema.optional(Schema.Array(Schema.String)),
2409
+ queryTag: Schema.optional(Schema.Array(Schema.String)),
2410
+ requestsPerSecond: Schema.optional(Schema.Array(Schema.String)),
2411
+ selectors: Schema.optional(Schema.Array(Schema.String)),
2412
+ services: Schema.optional(Schema.Array(Schema.String)),
2413
+ slo: Schema.optional(Schema.Array(Schema.String)),
2414
+ status: Schema.optional(Schema.Array(Schema.String)),
2415
+ targetHostname: Schema.optional(Schema.Array(Schema.String)),
2416
+ targetIp: Schema.optional(Schema.Array(Schema.String)),
2417
+ targetZoneName: Schema.optional(Schema.Array(Schema.String)),
2418
+ trafficExclusions: Schema.optional(
2419
+ Schema.Array(Schema.Literal("security_events")),
2420
+ ),
2421
+ tunnelId: Schema.optional(Schema.Array(Schema.String)),
2422
+ tunnelName: Schema.optional(Schema.Array(Schema.String)),
2423
+ type: Schema.optional(Schema.Array(Schema.String)),
2424
+ where: Schema.optional(Schema.Array(Schema.String)),
2425
+ zones: Schema.optional(Schema.Array(Schema.String)),
2426
+ }).pipe(
2427
+ Schema.encodeKeys({
2428
+ actions: "actions",
2429
+ affectedAsns: "affected_asns",
2430
+ affectedComponents: "affected_components",
2431
+ affectedLocations: "affected_locations",
2432
+ airportCode: "airport_code",
2433
+ alertTriggerPreferences: "alert_trigger_preferences",
2434
+ alertTriggerPreferencesValue: "alert_trigger_preferences_value",
2435
+ enabled: "enabled",
2436
+ environment: "environment",
2437
+ event: "event",
2438
+ eventSource: "event_source",
2439
+ eventType: "event_type",
2440
+ groupBy: "group_by",
2441
+ healthCheckId: "health_check_id",
2442
+ incidentImpact: "incident_impact",
2443
+ inputId: "input_id",
2444
+ insightClass: "insight_class",
2445
+ limit: "limit",
2446
+ logoTag: "logo_tag",
2447
+ megabitsPerSecond: "megabits_per_second",
2448
+ newHealth: "new_health",
2449
+ newStatus: "new_status",
2450
+ packetsPerSecond: "packets_per_second",
2451
+ poolId: "pool_id",
2452
+ popNames: "pop_names",
2453
+ product: "product",
2454
+ projectId: "project_id",
2455
+ protocol: "protocol",
2456
+ queryTag: "query_tag",
2457
+ requestsPerSecond: "requests_per_second",
2458
+ selectors: "selectors",
2459
+ services: "services",
2460
+ slo: "slo",
2461
+ status: "status",
2462
+ targetHostname: "target_hostname",
2463
+ targetIp: "target_ip",
2464
+ targetZoneName: "target_zone_name",
2465
+ trafficExclusions: "traffic_exclusions",
2466
+ tunnelId: "tunnel_id",
2467
+ tunnelName: "tunnel_name",
2468
+ type: "type",
2469
+ where: "where",
2470
+ zones: "zones",
2471
+ }),
2472
+ ),
2473
+ ),
2474
+ mechanisms: Schema.optional(
2475
+ Schema.Struct({
2476
+ email: Schema.optional(
2477
+ Schema.Array(
2478
+ Schema.Struct({
2479
+ id: Schema.optional(Schema.String),
2480
+ }),
2481
+ ),
2482
+ ),
2483
+ pagerduty: Schema.optional(
2484
+ Schema.Array(
2485
+ Schema.Struct({
2486
+ id: Schema.optional(Schema.String),
2487
+ }),
2488
+ ),
2489
+ ),
2490
+ webhooks: Schema.optional(
2491
+ Schema.Array(
2492
+ Schema.Struct({
2493
+ id: Schema.optional(Schema.String),
2494
+ }),
2495
+ ),
2496
+ ),
2497
+ }),
2498
+ ),
2499
+ name: Schema.optional(Schema.String),
2500
+ }).pipe(
2501
+ Schema.encodeKeys({
2502
+ alertInterval: "alert_interval",
2503
+ alertType: "alert_type",
2504
+ description: "description",
2505
+ enabled: "enabled",
2506
+ filters: "filters",
2507
+ mechanisms: "mechanisms",
2508
+ name: "name",
2509
+ }),
2510
+ T.Http({
2511
+ method: "PUT",
2512
+ path: "/accounts/{account_id}/alerting/v3/policies/{policyId}",
2513
+ }),
2514
+ ) as unknown as Schema.Schema<UpdatePolicyRequest>;
2515
+
2516
+ export interface UpdatePolicyResponse {
2517
+ /** UUID */
2518
+ id?: string | null;
2519
+ }
2520
+
2521
+ export const UpdatePolicyResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2522
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2523
+ }) as unknown as Schema.Schema<UpdatePolicyResponse>;
2524
+
2525
+ export type UpdatePolicyError =
2526
+ | DefaultErrors
2527
+ | InvalidRoute
2528
+ | PolicyNotFound
2529
+ | InvalidAlertType
2530
+ | MechanismRequired;
2531
+
2532
+ export const updatePolicy: API.OperationMethod<
2533
+ UpdatePolicyRequest,
2534
+ UpdatePolicyResponse,
2535
+ UpdatePolicyError,
2536
+ Credentials | HttpClient.HttpClient
2537
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2538
+ input: UpdatePolicyRequest,
2539
+ output: UpdatePolicyResponse,
2540
+ errors: [InvalidRoute, PolicyNotFound, InvalidAlertType, MechanismRequired],
2541
+ }));
2542
+
2543
+ export interface DeletePolicyRequest {
2544
+ policyId: string;
2545
+ /** The account id */
2546
+ accountId: string;
2547
+ }
2548
+
2549
+ export const DeletePolicyRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2550
+ policyId: Schema.String.pipe(T.HttpPath("policyId")),
2551
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2552
+ }).pipe(
2553
+ T.Http({
2554
+ method: "DELETE",
2555
+ path: "/accounts/{account_id}/alerting/v3/policies/{policyId}",
2556
+ }),
2557
+ ) as unknown as Schema.Schema<DeletePolicyRequest>;
2558
+
2559
+ export interface DeletePolicyResponse {
2560
+ errors?: { message: string; code?: number | null }[] | null;
2561
+ messages?: { message: string; code?: number | null }[] | null;
2562
+ /** Whether the API call was successful */
2563
+ success?: true | null;
2564
+ resultInfo?: {
2565
+ count?: number | null;
2566
+ page?: number | null;
2567
+ perPage?: number | null;
2568
+ totalCount?: number | null;
2569
+ } | null;
2570
+ }
2571
+
2572
+ export const DeletePolicyResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2573
+ errors: Schema.optional(
2574
+ Schema.Union([
2575
+ Schema.Array(
2576
+ Schema.Struct({
2577
+ message: Schema.String,
2578
+ code: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2579
+ }),
2580
+ ),
2581
+ Schema.Null,
2582
+ ]),
2583
+ ),
2584
+ messages: Schema.optional(
2585
+ Schema.Union([
2586
+ Schema.Array(
2587
+ Schema.Struct({
2588
+ message: Schema.String,
2589
+ code: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2590
+ }),
2591
+ ),
2592
+ Schema.Null,
2593
+ ]),
2594
+ ),
2595
+ success: Schema.optional(Schema.Union([Schema.Literal(true), Schema.Null])),
2596
+ resultInfo: Schema.optional(
2597
+ Schema.Union([
2598
+ Schema.Struct({
2599
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2600
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2601
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2602
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2603
+ }).pipe(
2604
+ Schema.encodeKeys({
2605
+ count: "count",
2606
+ page: "page",
2607
+ perPage: "per_page",
2608
+ totalCount: "total_count",
2609
+ }),
2610
+ ),
2611
+ Schema.Null,
2612
+ ]),
2613
+ ),
2614
+ }).pipe(
2615
+ Schema.encodeKeys({
2616
+ errors: "errors",
2617
+ messages: "messages",
2618
+ success: "success",
2619
+ resultInfo: "result_info",
2620
+ }),
2621
+ ) as unknown as Schema.Schema<DeletePolicyResponse>;
2622
+
2623
+ export type DeletePolicyError = DefaultErrors | InvalidRoute | PolicyNotFound;
2624
+
2625
+ export const deletePolicy: API.OperationMethod<
2626
+ DeletePolicyRequest,
2627
+ DeletePolicyResponse,
2628
+ DeletePolicyError,
2629
+ Credentials | HttpClient.HttpClient
2630
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2631
+ input: DeletePolicyRequest,
2632
+ output: DeletePolicyResponse,
2633
+ errors: [InvalidRoute, PolicyNotFound],
2634
+ }));
2635
+
2636
+ // =============================================================================
2637
+ // Silence
2638
+ // =============================================================================
2639
+
2640
+ export interface GetSilenceRequest {
2641
+ silenceId: string;
2642
+ /** The account id */
2643
+ accountId: string;
2644
+ }
2645
+
2646
+ export const GetSilenceRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2647
+ silenceId: Schema.String.pipe(T.HttpPath("silenceId")),
2648
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2649
+ }).pipe(
2650
+ T.Http({
2651
+ method: "GET",
2652
+ path: "/accounts/{account_id}/alerting/v3/silences/{silenceId}",
2653
+ }),
2654
+ ) as unknown as Schema.Schema<GetSilenceRequest>;
2655
+
2656
+ export interface GetSilenceResponse {
2657
+ /** Silence ID */
2658
+ id?: string | null;
2659
+ /** When the silence was created. */
2660
+ createdAt?: string | null;
2661
+ /** When the silence ends. */
2662
+ endTime?: string | null;
2663
+ /** The unique identifier of a notification policy */
2664
+ policyId?: string | null;
2665
+ /** When the silence starts. */
2666
+ startTime?: string | null;
2667
+ /** When the silence was modified. */
2668
+ updatedAt?: string | null;
2669
+ }
2670
+
2671
+ export const GetSilenceResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2672
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2673
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2674
+ endTime: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2675
+ policyId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2676
+ startTime: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2677
+ updatedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2678
+ }).pipe(
2679
+ Schema.encodeKeys({
2680
+ id: "id",
2681
+ createdAt: "created_at",
2682
+ endTime: "end_time",
2683
+ policyId: "policy_id",
2684
+ startTime: "start_time",
2685
+ updatedAt: "updated_at",
2686
+ }),
2687
+ ) as unknown as Schema.Schema<GetSilenceResponse>;
2688
+
2689
+ export type GetSilenceError =
2690
+ | DefaultErrors
2691
+ | InvalidRoute
2692
+ | InternalServerError;
2693
+
2694
+ export const getSilence: API.OperationMethod<
2695
+ GetSilenceRequest,
2696
+ GetSilenceResponse,
2697
+ GetSilenceError,
2698
+ Credentials | HttpClient.HttpClient
2699
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2700
+ input: GetSilenceRequest,
2701
+ output: GetSilenceResponse,
2702
+ errors: [InvalidRoute, InternalServerError],
2703
+ }));
2704
+
2705
+ export interface ListSilencesRequest {
2706
+ /** The account id */
2707
+ accountId: string;
2708
+ }
2709
+
2710
+ export const ListSilencesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2711
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2712
+ }).pipe(
2713
+ T.Http({
2714
+ method: "GET",
2715
+ path: "/accounts/{account_id}/alerting/v3/silences",
2716
+ }),
2717
+ ) as unknown as Schema.Schema<ListSilencesRequest>;
2718
+
2719
+ export type ListSilencesResponse = {
2720
+ id?: string | null;
2721
+ createdAt?: string | null;
2722
+ endTime?: string | null;
2723
+ policyId?: string | null;
2724
+ startTime?: string | null;
2725
+ updatedAt?: string | null;
2726
+ }[];
2727
+
2728
+ export const ListSilencesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
2729
+ Schema.Struct({
2730
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2731
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2732
+ endTime: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2733
+ policyId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2734
+ startTime: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2735
+ updatedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2736
+ }).pipe(
2737
+ Schema.encodeKeys({
2738
+ id: "id",
2739
+ createdAt: "created_at",
2740
+ endTime: "end_time",
2741
+ policyId: "policy_id",
2742
+ startTime: "start_time",
2743
+ updatedAt: "updated_at",
2744
+ }),
2745
+ ),
2746
+ ) as unknown as Schema.Schema<ListSilencesResponse>;
2747
+
2748
+ export type ListSilencesError = DefaultErrors;
2749
+
2750
+ export const listSilences: API.OperationMethod<
2751
+ ListSilencesRequest,
2752
+ ListSilencesResponse,
2753
+ ListSilencesError,
2754
+ Credentials | HttpClient.HttpClient
2755
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2756
+ input: ListSilencesRequest,
2757
+ output: ListSilencesResponse,
2758
+ errors: [],
2759
+ }));
2760
+
2761
+ export interface CreateSilenceRequest {
2762
+ /** Path param: The account id */
2763
+ accountId: string;
2764
+ /** Body param: */
2765
+ body: { endTime?: string; policyId?: string; startTime?: string }[];
2766
+ }
2767
+
2768
+ export const CreateSilenceRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2769
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2770
+ body: Schema.Array(
2771
+ Schema.Struct({
2772
+ endTime: Schema.optional(Schema.String),
2773
+ policyId: Schema.optional(Schema.String),
2774
+ startTime: Schema.optional(Schema.String),
2775
+ }).pipe(
2776
+ Schema.encodeKeys({
2777
+ endTime: "end_time",
2778
+ policyId: "policy_id",
2779
+ startTime: "start_time",
2780
+ }),
2781
+ ),
2782
+ ).pipe(T.HttpBody()),
2783
+ }).pipe(
2784
+ T.Http({
2785
+ method: "POST",
2786
+ path: "/accounts/{account_id}/alerting/v3/silences",
2787
+ }),
2788
+ ) as unknown as Schema.Schema<CreateSilenceRequest>;
2789
+
2790
+ export interface CreateSilenceResponse {
2791
+ errors: { message: string; code?: number | null }[];
2792
+ messages: { message: string; code?: number | null }[];
2793
+ /** Whether the API call was successful */
2794
+ success: true;
2795
+ }
2796
+
2797
+ export const CreateSilenceResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2798
+ errors: Schema.Array(
2799
+ Schema.Struct({
2800
+ message: Schema.String,
2801
+ code: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2802
+ }),
2803
+ ),
2804
+ messages: Schema.Array(
2805
+ Schema.Struct({
2806
+ message: Schema.String,
2807
+ code: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2808
+ }),
2809
+ ),
2810
+ success: Schema.Literal(true),
2811
+ }) as unknown as Schema.Schema<CreateSilenceResponse>;
2812
+
2813
+ export type CreateSilenceError = DefaultErrors | InvalidRoute;
2814
+
2815
+ export const createSilence: API.OperationMethod<
2816
+ CreateSilenceRequest,
2817
+ CreateSilenceResponse,
2818
+ CreateSilenceError,
2819
+ Credentials | HttpClient.HttpClient
2820
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2821
+ input: CreateSilenceRequest,
2822
+ output: CreateSilenceResponse,
2823
+ errors: [InvalidRoute],
2824
+ }));
2825
+
2826
+ export interface UpdateSilenceRequest {
2827
+ /** Path param: The account id */
2828
+ accountId: string;
2829
+ /** Body param: */
2830
+ body: { id?: string; endTime?: string; startTime?: string }[];
2831
+ }
2832
+
2833
+ export const UpdateSilenceRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2834
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2835
+ body: Schema.Array(
2836
+ Schema.Struct({
2837
+ id: Schema.optional(Schema.String),
2838
+ endTime: Schema.optional(Schema.String),
2839
+ startTime: Schema.optional(Schema.String),
2840
+ }).pipe(
2841
+ Schema.encodeKeys({
2842
+ id: "id",
2843
+ endTime: "end_time",
2844
+ startTime: "start_time",
2845
+ }),
2846
+ ),
2847
+ ).pipe(T.HttpBody()),
2848
+ }).pipe(
2849
+ T.Http({
2850
+ method: "PUT",
2851
+ path: "/accounts/{account_id}/alerting/v3/silences",
2852
+ }),
2853
+ ) as unknown as Schema.Schema<UpdateSilenceRequest>;
2854
+
2855
+ export type UpdateSilenceResponse = {
2856
+ id?: string | null;
2857
+ createdAt?: string | null;
2858
+ endTime?: string | null;
2859
+ policyId?: string | null;
2860
+ startTime?: string | null;
2861
+ updatedAt?: string | null;
2862
+ }[];
2863
+
2864
+ export const UpdateSilenceResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
2865
+ Schema.Struct({
2866
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2867
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2868
+ endTime: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2869
+ policyId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2870
+ startTime: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2871
+ updatedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2872
+ }).pipe(
2873
+ Schema.encodeKeys({
2874
+ id: "id",
2875
+ createdAt: "created_at",
2876
+ endTime: "end_time",
2877
+ policyId: "policy_id",
2878
+ startTime: "start_time",
2879
+ updatedAt: "updated_at",
2880
+ }),
2881
+ ),
2882
+ ) as unknown as Schema.Schema<UpdateSilenceResponse>;
2883
+
2884
+ export type UpdateSilenceError = DefaultErrors;
2885
+
2886
+ export const updateSilence: API.OperationMethod<
2887
+ UpdateSilenceRequest,
2888
+ UpdateSilenceResponse,
2889
+ UpdateSilenceError,
2890
+ Credentials | HttpClient.HttpClient
2891
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2892
+ input: UpdateSilenceRequest,
2893
+ output: UpdateSilenceResponse,
2894
+ errors: [],
2895
+ }));
2896
+
2897
+ export interface DeleteSilenceRequest {
2898
+ silenceId: string;
2899
+ /** The account id */
2900
+ accountId: string;
2901
+ }
2902
+
2903
+ export const DeleteSilenceRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2904
+ silenceId: Schema.String.pipe(T.HttpPath("silenceId")),
2905
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2906
+ }).pipe(
2907
+ T.Http({
2908
+ method: "DELETE",
2909
+ path: "/accounts/{account_id}/alerting/v3/silences/{silenceId}",
2910
+ }),
2911
+ ) as unknown as Schema.Schema<DeleteSilenceRequest>;
2912
+
2913
+ export interface DeleteSilenceResponse {
2914
+ errors: { message: string; code?: number | null }[];
2915
+ messages: { message: string; code?: number | null }[];
2916
+ /** Whether the API call was successful */
2917
+ success: true;
2918
+ }
2919
+
2920
+ export const DeleteSilenceResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2921
+ errors: Schema.Array(
2922
+ Schema.Struct({
2923
+ message: Schema.String,
2924
+ code: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2925
+ }),
2926
+ ),
2927
+ messages: Schema.Array(
2928
+ Schema.Struct({
2929
+ message: Schema.String,
2930
+ code: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2931
+ }),
2932
+ ),
2933
+ success: Schema.Literal(true),
2934
+ }) as unknown as Schema.Schema<DeleteSilenceResponse>;
2935
+
2936
+ export type DeleteSilenceError = DefaultErrors | InvalidRoute;
2937
+
2938
+ export const deleteSilence: API.OperationMethod<
2939
+ DeleteSilenceRequest,
2940
+ DeleteSilenceResponse,
2941
+ DeleteSilenceError,
2942
+ Credentials | HttpClient.HttpClient
2943
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2944
+ input: DeleteSilenceRequest,
2945
+ output: DeleteSilenceResponse,
2946
+ errors: [InvalidRoute],
2947
+ }));