@distilled.cloud/cloudflare 0.0.0-john

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