@distilled.cloud/cloudflare 0.0.0 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (560) hide show
  1. package/README.md +41 -7
  2. package/lib/auth.d.ts +13 -0
  3. package/lib/auth.d.ts.map +1 -0
  4. package/lib/auth.js +12 -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 +14 -0
  11. package/lib/client/api.d.ts.map +1 -0
  12. package/lib/client/api.js +245 -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 +14 -0
  19. package/lib/credentials.d.ts.map +1 -0
  20. package/lib/credentials.js +17 -0
  21. package/lib/credentials.js.map +1 -0
  22. package/lib/errors.d.ts +37 -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/services/abuse-reports.d.ts +224 -0
  39. package/lib/services/abuse-reports.d.ts.map +1 -0
  40. package/lib/services/abuse-reports.js +353 -0
  41. package/lib/services/abuse-reports.js.map +1 -0
  42. package/lib/services/accounts.d.ts +682 -0
  43. package/lib/services/accounts.d.ts.map +1 -0
  44. package/lib/services/accounts.js +805 -0
  45. package/lib/services/accounts.js.map +1 -0
  46. package/lib/services/acm.d.ts +73 -0
  47. package/lib/services/acm.d.ts.map +1 -0
  48. package/lib/services/acm.js +76 -0
  49. package/lib/services/acm.js.map +1 -0
  50. package/lib/services/addressing.d.ts +1208 -0
  51. package/lib/services/addressing.d.ts.map +1 -0
  52. package/lib/services/addressing.js +1776 -0
  53. package/lib/services/addressing.js.map +1 -0
  54. package/lib/services/ai-gateway.d.ts +956 -0
  55. package/lib/services/ai-gateway.d.ts.map +1 -0
  56. package/lib/services/ai-gateway.js +1706 -0
  57. package/lib/services/ai-gateway.js.map +1 -0
  58. package/lib/services/ai.d.ts +243 -0
  59. package/lib/services/ai.d.ts.map +1 -0
  60. package/lib/services/ai.js +299 -0
  61. package/lib/services/ai.js.map +1 -0
  62. package/lib/services/aisearch.d.ts +915 -0
  63. package/lib/services/aisearch.d.ts.map +1 -0
  64. package/lib/services/aisearch.js +2425 -0
  65. package/lib/services/aisearch.js.map +1 -0
  66. package/lib/services/alerting.d.ts +718 -0
  67. package/lib/services/alerting.d.ts.map +1 -0
  68. package/lib/services/alerting.js +1388 -0
  69. package/lib/services/alerting.js.map +1 -0
  70. package/lib/services/api-gateway.d.ts +830 -0
  71. package/lib/services/api-gateway.d.ts.map +1 -0
  72. package/lib/services/api-gateway.js +1548 -0
  73. package/lib/services/api-gateway.js.map +1 -0
  74. package/lib/services/argo.d.ts +101 -0
  75. package/lib/services/argo.d.ts.map +1 -0
  76. package/lib/services/argo.js +105 -0
  77. package/lib/services/argo.js.map +1 -0
  78. package/lib/services/audit-logs.d.ts +46 -0
  79. package/lib/services/audit-logs.d.ts.map +1 -0
  80. package/lib/services/audit-logs.js +37 -0
  81. package/lib/services/audit-logs.js.map +1 -0
  82. package/lib/services/billing.d.ts +62 -0
  83. package/lib/services/billing.d.ts.map +1 -0
  84. package/lib/services/billing.js +100 -0
  85. package/lib/services/billing.js.map +1 -0
  86. package/lib/services/bot-management.d.ts +124 -0
  87. package/lib/services/bot-management.d.ts.map +1 -0
  88. package/lib/services/bot-management.js +262 -0
  89. package/lib/services/bot-management.js.map +1 -0
  90. package/lib/services/botnet-feed.d.ts +65 -0
  91. package/lib/services/botnet-feed.d.ts.map +1 -0
  92. package/lib/services/botnet-feed.js +84 -0
  93. package/lib/services/botnet-feed.js.map +1 -0
  94. package/lib/services/brand-protection.d.ts +188 -0
  95. package/lib/services/brand-protection.d.ts.map +1 -0
  96. package/lib/services/brand-protection.js +214 -0
  97. package/lib/services/brand-protection.js.map +1 -0
  98. package/lib/services/browser-rendering.d.ts +857 -0
  99. package/lib/services/browser-rendering.d.ts.map +1 -0
  100. package/lib/services/browser-rendering.js +1141 -0
  101. package/lib/services/browser-rendering.js.map +1 -0
  102. package/lib/services/cache.d.ts +287 -0
  103. package/lib/services/cache.d.ts.map +1 -0
  104. package/lib/services/cache.js +330 -0
  105. package/lib/services/cache.js.map +1 -0
  106. package/lib/services/calls.d.ts +202 -0
  107. package/lib/services/calls.d.ts.map +1 -0
  108. package/lib/services/calls.js +175 -0
  109. package/lib/services/calls.js.map +1 -0
  110. package/lib/services/certificate-authorities.d.ts +40 -0
  111. package/lib/services/certificate-authorities.d.ts.map +1 -0
  112. package/lib/services/certificate-authorities.js +49 -0
  113. package/lib/services/certificate-authorities.js.map +1 -0
  114. package/lib/services/client-certificates.d.ts +254 -0
  115. package/lib/services/client-certificates.d.ts.map +1 -0
  116. package/lib/services/client-certificates.js +350 -0
  117. package/lib/services/client-certificates.js.map +1 -0
  118. package/lib/services/cloud-connector.d.ts +59 -0
  119. package/lib/services/cloud-connector.d.ts.map +1 -0
  120. package/lib/services/cloud-connector.js +84 -0
  121. package/lib/services/cloud-connector.js.map +1 -0
  122. package/lib/services/cloudforce-one.d.ts +1318 -0
  123. package/lib/services/cloudforce-one.d.ts.map +1 -0
  124. package/lib/services/cloudforce-one.js +1684 -0
  125. package/lib/services/cloudforce-one.js.map +1 -0
  126. package/lib/services/connectivity.d.ts +248 -0
  127. package/lib/services/connectivity.d.ts.map +1 -0
  128. package/lib/services/connectivity.js +377 -0
  129. package/lib/services/connectivity.js.map +1 -0
  130. package/lib/services/content-scanning.d.ts +131 -0
  131. package/lib/services/content-scanning.d.ts.map +1 -0
  132. package/lib/services/content-scanning.js +156 -0
  133. package/lib/services/content-scanning.js.map +1 -0
  134. package/lib/services/custom-certificates.d.ts +211 -0
  135. package/lib/services/custom-certificates.d.ts.map +1 -0
  136. package/lib/services/custom-certificates.js +309 -0
  137. package/lib/services/custom-certificates.js.map +1 -0
  138. package/lib/services/custom-hostnames.d.ts +525 -0
  139. package/lib/services/custom-hostnames.d.ts.map +1 -0
  140. package/lib/services/custom-hostnames.js +1164 -0
  141. package/lib/services/custom-hostnames.js.map +1 -0
  142. package/lib/services/custom-nameservers.d.ts +67 -0
  143. package/lib/services/custom-nameservers.d.ts.map +1 -0
  144. package/lib/services/custom-nameservers.js +80 -0
  145. package/lib/services/custom-nameservers.js.map +1 -0
  146. package/lib/services/custom-pages.d.ts +74 -0
  147. package/lib/services/custom-pages.d.ts.map +1 -0
  148. package/lib/services/custom-pages.js +125 -0
  149. package/lib/services/custom-pages.js.map +1 -0
  150. package/lib/services/d1.d.ts +326 -0
  151. package/lib/services/d1.d.ts.map +1 -0
  152. package/lib/services/d1.js +448 -0
  153. package/lib/services/d1.js.map +1 -0
  154. package/lib/services/dcv-delegation.d.ts +24 -0
  155. package/lib/services/dcv-delegation.d.ts.map +1 -0
  156. package/lib/services/dcv-delegation.js +24 -0
  157. package/lib/services/dcv-delegation.js.map +1 -0
  158. package/lib/services/diagnostics.d.ts +175 -0
  159. package/lib/services/diagnostics.d.ts.map +1 -0
  160. package/lib/services/diagnostics.js +273 -0
  161. package/lib/services/diagnostics.js.map +1 -0
  162. package/lib/services/dns-firewall.d.ts +288 -0
  163. package/lib/services/dns-firewall.d.ts.map +1 -0
  164. package/lib/services/dns-firewall.js +373 -0
  165. package/lib/services/dns-firewall.js.map +1 -0
  166. package/lib/services/dns.d.ts +2946 -0
  167. package/lib/services/dns.d.ts.map +1 -0
  168. package/lib/services/dns.js +4511 -0
  169. package/lib/services/dns.js.map +1 -0
  170. package/lib/services/durable-objects.d.ts +61 -0
  171. package/lib/services/durable-objects.d.ts.map +1 -0
  172. package/lib/services/durable-objects.js +66 -0
  173. package/lib/services/durable-objects.js.map +1 -0
  174. package/lib/services/email-routing.d.ts +542 -0
  175. package/lib/services/email-routing.d.ts.map +1 -0
  176. package/lib/services/email-routing.js +662 -0
  177. package/lib/services/email-routing.js.map +1 -0
  178. package/lib/services/email-security.d.ts +1131 -0
  179. package/lib/services/email-security.d.ts.map +1 -0
  180. package/lib/services/email-security.js +2065 -0
  181. package/lib/services/email-security.js.map +1 -0
  182. package/lib/services/filters.d.ts +157 -0
  183. package/lib/services/filters.d.ts.map +1 -0
  184. package/lib/services/filters.js +135 -0
  185. package/lib/services/filters.js.map +1 -0
  186. package/lib/services/firewall.d.ts +1080 -0
  187. package/lib/services/firewall.d.ts.map +1 -0
  188. package/lib/services/firewall.js +1881 -0
  189. package/lib/services/firewall.js.map +1 -0
  190. package/lib/services/healthchecks.d.ts +464 -0
  191. package/lib/services/healthchecks.d.ts.map +1 -0
  192. package/lib/services/healthchecks.js +838 -0
  193. package/lib/services/healthchecks.js.map +1 -0
  194. package/lib/services/hostnames.d.ts +74 -0
  195. package/lib/services/hostnames.d.ts.map +1 -0
  196. package/lib/services/hostnames.js +100 -0
  197. package/lib/services/hostnames.js.map +1 -0
  198. package/lib/services/hyperdrive.d.ts +203 -0
  199. package/lib/services/hyperdrive.d.ts.map +1 -0
  200. package/lib/services/hyperdrive.js +299 -0
  201. package/lib/services/hyperdrive.js.map +1 -0
  202. package/lib/services/iam.d.ts +554 -0
  203. package/lib/services/iam.d.ts.map +1 -0
  204. package/lib/services/iam.js +743 -0
  205. package/lib/services/iam.js.map +1 -0
  206. package/lib/services/images.d.ts +403 -0
  207. package/lib/services/images.d.ts.map +1 -0
  208. package/lib/services/images.js +417 -0
  209. package/lib/services/images.js.map +1 -0
  210. package/lib/services/intel.d.ts +768 -0
  211. package/lib/services/intel.d.ts.map +1 -0
  212. package/lib/services/intel.js +1179 -0
  213. package/lib/services/intel.js.map +1 -0
  214. package/lib/services/ips.d.ts +28 -0
  215. package/lib/services/ips.d.ts.map +1 -0
  216. package/lib/services/ips.js +39 -0
  217. package/lib/services/ips.js.map +1 -0
  218. package/lib/services/keyless-certificates.d.ts +177 -0
  219. package/lib/services/keyless-certificates.d.ts.map +1 -0
  220. package/lib/services/keyless-certificates.js +216 -0
  221. package/lib/services/keyless-certificates.js.map +1 -0
  222. package/lib/services/kv.d.ts +339 -0
  223. package/lib/services/kv.d.ts.map +1 -0
  224. package/lib/services/kv.js +402 -0
  225. package/lib/services/kv.js.map +1 -0
  226. package/lib/services/leaked-credential-checks.d.ts +119 -0
  227. package/lib/services/leaked-credential-checks.d.ts.map +1 -0
  228. package/lib/services/leaked-credential-checks.js +130 -0
  229. package/lib/services/leaked-credential-checks.js.map +1 -0
  230. package/lib/services/load-balancers.d.ts +1767 -0
  231. package/lib/services/load-balancers.d.ts.map +1 -0
  232. package/lib/services/load-balancers.js +3068 -0
  233. package/lib/services/load-balancers.js.map +1 -0
  234. package/lib/services/logpush.d.ts +401 -0
  235. package/lib/services/logpush.d.ts.map +1 -0
  236. package/lib/services/logpush.js +724 -0
  237. package/lib/services/logpush.js.map +1 -0
  238. package/lib/services/logs.d.ts +125 -0
  239. package/lib/services/logs.d.ts.map +1 -0
  240. package/lib/services/logs.js +145 -0
  241. package/lib/services/logs.js.map +1 -0
  242. package/lib/services/magic-cloud-networking.d.ts +1599 -0
  243. package/lib/services/magic-cloud-networking.d.ts.map +1 -0
  244. package/lib/services/magic-cloud-networking.js +5205 -0
  245. package/lib/services/magic-cloud-networking.js.map +1 -0
  246. package/lib/services/magic-network-monitoring.d.ts +379 -0
  247. package/lib/services/magic-network-monitoring.d.ts.map +1 -0
  248. package/lib/services/magic-network-monitoring.js +535 -0
  249. package/lib/services/magic-network-monitoring.js.map +1 -0
  250. package/lib/services/magic-transit.d.ts +3650 -0
  251. package/lib/services/magic-transit.d.ts.map +1 -0
  252. package/lib/services/magic-transit.js +6120 -0
  253. package/lib/services/magic-transit.js.map +1 -0
  254. package/lib/services/managed-transforms.d.ts +79 -0
  255. package/lib/services/managed-transforms.d.ts.map +1 -0
  256. package/lib/services/managed-transforms.js +107 -0
  257. package/lib/services/managed-transforms.js.map +1 -0
  258. package/lib/services/memberships.d.ts +172 -0
  259. package/lib/services/memberships.d.ts.map +1 -0
  260. package/lib/services/memberships.js +282 -0
  261. package/lib/services/memberships.js.map +1 -0
  262. package/lib/services/mtls-certificates.d.ts +140 -0
  263. package/lib/services/mtls-certificates.d.ts.map +1 -0
  264. package/lib/services/mtls-certificates.js +173 -0
  265. package/lib/services/mtls-certificates.js.map +1 -0
  266. package/lib/services/network-interconnects.d.ts +410 -0
  267. package/lib/services/network-interconnects.d.ts.map +1 -0
  268. package/lib/services/network-interconnects.js +583 -0
  269. package/lib/services/network-interconnects.js.map +1 -0
  270. package/lib/services/organizations.d.ts +201 -0
  271. package/lib/services/organizations.d.ts.map +1 -0
  272. package/lib/services/organizations.js +355 -0
  273. package/lib/services/organizations.js.map +1 -0
  274. package/lib/services/origin-ca-certificates.d.ts +99 -0
  275. package/lib/services/origin-ca-certificates.d.ts.map +1 -0
  276. package/lib/services/origin-ca-certificates.js +156 -0
  277. package/lib/services/origin-ca-certificates.js.map +1 -0
  278. package/lib/services/origin-post-quantum-encryption.d.ts +50 -0
  279. package/lib/services/origin-post-quantum-encryption.d.ts.map +1 -0
  280. package/lib/services/origin-post-quantum-encryption.js +60 -0
  281. package/lib/services/origin-post-quantum-encryption.js.map +1 -0
  282. package/lib/services/origin-tls-client-auth.d.ts +273 -0
  283. package/lib/services/origin-tls-client-auth.d.ts.map +1 -0
  284. package/lib/services/origin-tls-client-auth.js +401 -0
  285. package/lib/services/origin-tls-client-auth.js.map +1 -0
  286. package/lib/services/page-rules.d.ts +773 -0
  287. package/lib/services/page-rules.d.ts.map +1 -0
  288. package/lib/services/page-rules.js +1365 -0
  289. package/lib/services/page-rules.js.map +1 -0
  290. package/lib/services/page-shield.d.ts +426 -0
  291. package/lib/services/page-shield.d.ts.map +1 -0
  292. package/lib/services/page-shield.js +484 -0
  293. package/lib/services/page-shield.js.map +1 -0
  294. package/lib/services/pages.d.ts +1654 -0
  295. package/lib/services/pages.d.ts.map +1 -0
  296. package/lib/services/pages.js +2954 -0
  297. package/lib/services/pages.js.map +1 -0
  298. package/lib/services/pipelines.d.ts +1461 -0
  299. package/lib/services/pipelines.d.ts.map +1 -0
  300. package/lib/services/pipelines.js +2912 -0
  301. package/lib/services/pipelines.js.map +1 -0
  302. package/lib/services/queues.d.ts +807 -0
  303. package/lib/services/queues.d.ts.map +1 -0
  304. package/lib/services/queues.js +1194 -0
  305. package/lib/services/queues.js.map +1 -0
  306. package/lib/services/r2-data-catalog.d.ts +341 -0
  307. package/lib/services/r2-data-catalog.d.ts.map +1 -0
  308. package/lib/services/r2-data-catalog.js +499 -0
  309. package/lib/services/r2-data-catalog.js.map +1 -0
  310. package/lib/services/r2.d.ts +1041 -0
  311. package/lib/services/r2.d.ts.map +1 -0
  312. package/lib/services/r2.js +1384 -0
  313. package/lib/services/r2.js.map +1 -0
  314. package/lib/services/radar.d.ts +9276 -0
  315. package/lib/services/radar.d.ts.map +1 -0
  316. package/lib/services/radar.js +20491 -0
  317. package/lib/services/radar.js.map +1 -0
  318. package/lib/services/rate-limits.d.ts +315 -0
  319. package/lib/services/rate-limits.d.ts.map +1 -0
  320. package/lib/services/rate-limits.js +521 -0
  321. package/lib/services/rate-limits.js.map +1 -0
  322. package/lib/services/realtime-kit.d.ts +2728 -0
  323. package/lib/services/realtime-kit.d.ts.map +1 -0
  324. package/lib/services/realtime-kit.js +5401 -0
  325. package/lib/services/realtime-kit.js.map +1 -0
  326. package/lib/services/registrar.d.ts +81 -0
  327. package/lib/services/registrar.d.ts.map +1 -0
  328. package/lib/services/registrar.js +154 -0
  329. package/lib/services/registrar.js.map +1 -0
  330. package/lib/services/request-tracers.d.ts +61 -0
  331. package/lib/services/request-tracers.d.ts.map +1 -0
  332. package/lib/services/request-tracers.js +82 -0
  333. package/lib/services/request-tracers.js.map +1 -0
  334. package/lib/services/resource-sharing.d.ts +540 -0
  335. package/lib/services/resource-sharing.d.ts.map +1 -0
  336. package/lib/services/resource-sharing.js +846 -0
  337. package/lib/services/resource-sharing.js.map +1 -0
  338. package/lib/services/rules.d.ts +297 -0
  339. package/lib/services/rules.d.ts.map +1 -0
  340. package/lib/services/rules.js +396 -0
  341. package/lib/services/rules.js.map +1 -0
  342. package/lib/services/rulesets.d.ts +3300 -0
  343. package/lib/services/rulesets.d.ts.map +1 -0
  344. package/lib/services/rulesets.js +7852 -0
  345. package/lib/services/rulesets.js.map +1 -0
  346. package/lib/services/rum.d.ts +289 -0
  347. package/lib/services/rum.d.ts.map +1 -0
  348. package/lib/services/rum.js +409 -0
  349. package/lib/services/rum.js.map +1 -0
  350. package/lib/services/schema-validation.d.ts +240 -0
  351. package/lib/services/schema-validation.d.ts.map +1 -0
  352. package/lib/services/schema-validation.js +306 -0
  353. package/lib/services/schema-validation.js.map +1 -0
  354. package/lib/services/secrets-store.d.ts +321 -0
  355. package/lib/services/secrets-store.d.ts.map +1 -0
  356. package/lib/services/secrets-store.js +385 -0
  357. package/lib/services/secrets-store.js.map +1 -0
  358. package/lib/services/security-center.d.ts +102 -0
  359. package/lib/services/security-center.d.ts.map +1 -0
  360. package/lib/services/security-center.js +170 -0
  361. package/lib/services/security-center.js.map +1 -0
  362. package/lib/services/security-txt.d.ts +105 -0
  363. package/lib/services/security-txt.d.ts.map +1 -0
  364. package/lib/services/security-txt.js +136 -0
  365. package/lib/services/security-txt.js.map +1 -0
  366. package/lib/services/snippets.d.ts +138 -0
  367. package/lib/services/snippets.d.ts.map +1 -0
  368. package/lib/services/snippets.js +178 -0
  369. package/lib/services/snippets.js.map +1 -0
  370. package/lib/services/spectrum.d.ts +316 -0
  371. package/lib/services/spectrum.d.ts.map +1 -0
  372. package/lib/services/spectrum.js +510 -0
  373. package/lib/services/spectrum.js.map +1 -0
  374. package/lib/services/speed.d.ts +227 -0
  375. package/lib/services/speed.d.ts.map +1 -0
  376. package/lib/services/speed.js +444 -0
  377. package/lib/services/speed.js.map +1 -0
  378. package/lib/services/ssl.d.ts +370 -0
  379. package/lib/services/ssl.d.ts.map +1 -0
  380. package/lib/services/ssl.js +732 -0
  381. package/lib/services/ssl.js.map +1 -0
  382. package/lib/services/stream.d.ts +1014 -0
  383. package/lib/services/stream.d.ts.map +1 -0
  384. package/lib/services/stream.js +1049 -0
  385. package/lib/services/stream.js.map +1 -0
  386. package/lib/services/token-validation.d.ts +547 -0
  387. package/lib/services/token-validation.d.ts.map +1 -0
  388. package/lib/services/token-validation.js +768 -0
  389. package/lib/services/token-validation.js.map +1 -0
  390. package/lib/services/turnstile.d.ts +248 -0
  391. package/lib/services/turnstile.d.ts.map +1 -0
  392. package/lib/services/turnstile.js +308 -0
  393. package/lib/services/turnstile.js.map +1 -0
  394. package/lib/services/url-normalization.d.ts +53 -0
  395. package/lib/services/url-normalization.d.ts.map +1 -0
  396. package/lib/services/url-normalization.js +52 -0
  397. package/lib/services/url-normalization.js.map +1 -0
  398. package/lib/services/url-scanner.d.ts +612 -0
  399. package/lib/services/url-scanner.d.ts.map +1 -0
  400. package/lib/services/url-scanner.js +915 -0
  401. package/lib/services/url-scanner.js.map +1 -0
  402. package/lib/services/user.d.ts +441 -0
  403. package/lib/services/user.d.ts.map +1 -0
  404. package/lib/services/user.js +567 -0
  405. package/lib/services/user.js.map +1 -0
  406. package/lib/services/vectorize.d.ts +282 -0
  407. package/lib/services/vectorize.d.ts.map +1 -0
  408. package/lib/services/vectorize.js +340 -0
  409. package/lib/services/vectorize.js.map +1 -0
  410. package/lib/services/waiting-rooms.d.ts +1009 -0
  411. package/lib/services/waiting-rooms.d.ts.map +1 -0
  412. package/lib/services/waiting-rooms.js +1757 -0
  413. package/lib/services/waiting-rooms.js.map +1 -0
  414. package/lib/services/web3.d.ts +274 -0
  415. package/lib/services/web3.d.ts.map +1 -0
  416. package/lib/services/web3.js +362 -0
  417. package/lib/services/web3.js.map +1 -0
  418. package/lib/services/workers-for-platforms.d.ts +1224 -0
  419. package/lib/services/workers-for-platforms.d.ts.map +1 -0
  420. package/lib/services/workers-for-platforms.js +2078 -0
  421. package/lib/services/workers-for-platforms.js.map +1 -0
  422. package/lib/services/workers.d.ts +3498 -0
  423. package/lib/services/workers.d.ts.map +1 -0
  424. package/lib/services/workers.js +5967 -0
  425. package/lib/services/workers.js.map +1 -0
  426. package/lib/services/workflows.d.ts +359 -0
  427. package/lib/services/workflows.d.ts.map +1 -0
  428. package/lib/services/workflows.js +516 -0
  429. package/lib/services/workflows.js.map +1 -0
  430. package/lib/services/zaraz.d.ts +300 -0
  431. package/lib/services/zaraz.d.ts.map +1 -0
  432. package/lib/services/zaraz.js +298 -0
  433. package/lib/services/zaraz.js.map +1 -0
  434. package/lib/services/zero-trust.d.ts +15449 -0
  435. package/lib/services/zero-trust.d.ts.map +1 -0
  436. package/lib/services/zero-trust.js +29194 -0
  437. package/lib/services/zero-trust.js.map +1 -0
  438. package/lib/services/zones.d.ts +1278 -0
  439. package/lib/services/zones.d.ts.map +1 -0
  440. package/lib/services/zones.js +2416 -0
  441. package/lib/services/zones.js.map +1 -0
  442. package/lib/traits.d.ts +28 -0
  443. package/lib/traits.d.ts.map +1 -0
  444. package/lib/traits.js +26 -0
  445. package/lib/traits.js.map +1 -0
  446. package/package.json +68 -5
  447. package/src/auth.ts +14 -0
  448. package/src/category.ts +1 -0
  449. package/src/client/api.ts +329 -0
  450. package/src/client/index.ts +7 -0
  451. package/src/credentials.ts +30 -0
  452. package/src/errors.ts +57 -0
  453. package/src/index.ts +9 -0
  454. package/src/retry.ts +35 -0
  455. package/src/schemas.ts +51 -0
  456. package/src/services/abuse-reports.ts +747 -0
  457. package/src/services/accounts.ts +1947 -0
  458. package/src/services/acm.ts +170 -0
  459. package/src/services/addressing.ts +3947 -0
  460. package/src/services/ai-gateway.ts +3335 -0
  461. package/src/services/ai.ts +727 -0
  462. package/src/services/aisearch.ts +4750 -0
  463. package/src/services/alerting.ts +2947 -0
  464. package/src/services/api-gateway.ts +3391 -0
  465. package/src/services/argo.ts +254 -0
  466. package/src/services/audit-logs.ts +90 -0
  467. package/src/services/billing.ts +172 -0
  468. package/src/services/bot-management.ts +541 -0
  469. package/src/services/botnet-feed.ts +193 -0
  470. package/src/services/brand-protection.ts +553 -0
  471. package/src/services/browser-rendering.ts +2707 -0
  472. package/src/services/cache.ts +827 -0
  473. package/src/services/calls.ts +483 -0
  474. package/src/services/certificate-authorities.ts +110 -0
  475. package/src/services/client-certificates.ts +718 -0
  476. package/src/services/cloud-connector.ts +181 -0
  477. package/src/services/cloudforce-one.ts +3876 -0
  478. package/src/services/connectivity.ts +629 -0
  479. package/src/services/content-scanning.ts +385 -0
  480. package/src/services/custom-certificates.ts +611 -0
  481. package/src/services/custom-hostnames.ts +2453 -0
  482. package/src/services/custom-nameservers.ts +182 -0
  483. package/src/services/custom-pages.ts +264 -0
  484. package/src/services/d1.ts +1034 -0
  485. package/src/services/dcv-delegation.ts +52 -0
  486. package/src/services/diagnostics.ts +603 -0
  487. package/src/services/dns-firewall.ts +823 -0
  488. package/src/services/dns.ts +8897 -0
  489. package/src/services/durable-objects.ts +148 -0
  490. package/src/services/email-routing.ts +1602 -0
  491. package/src/services/email-security.ts +4283 -0
  492. package/src/services/filters.ts +370 -0
  493. package/src/services/firewall.ts +3896 -0
  494. package/src/services/healthchecks.ts +1750 -0
  495. package/src/services/hostnames.ts +218 -0
  496. package/src/services/hyperdrive.ts +592 -0
  497. package/src/services/iam.ts +1668 -0
  498. package/src/services/images.ts +1086 -0
  499. package/src/services/intel.ts +2768 -0
  500. package/src/services/ips.ts +88 -0
  501. package/src/services/keyless-certificates.ts +462 -0
  502. package/src/services/kv.ts +1011 -0
  503. package/src/services/leaked-credential-checks.ts +325 -0
  504. package/src/services/load-balancers.ts +6438 -0
  505. package/src/services/logpush.ts +1667 -0
  506. package/src/services/logs.ts +375 -0
  507. package/src/services/magic-cloud-networking.ts +10020 -0
  508. package/src/services/magic-network-monitoring.ts +1156 -0
  509. package/src/services/magic-transit.ts +13050 -0
  510. package/src/services/managed-transforms.ts +237 -0
  511. package/src/services/memberships.ts +615 -0
  512. package/src/services/mtls-certificates.ts +374 -0
  513. package/src/services/network-interconnects.ts +1253 -0
  514. package/src/services/organizations.ts +674 -0
  515. package/src/services/origin-ca-certificates.ts +303 -0
  516. package/src/services/origin-post-quantum-encryption.ts +128 -0
  517. package/src/services/origin-tls-client-auth.ts +878 -0
  518. package/src/services/page-rules.ts +2612 -0
  519. package/src/services/page-shield.ts +1195 -0
  520. package/src/services/pages.ts +5709 -0
  521. package/src/services/pipelines.ts +6000 -0
  522. package/src/services/queues.ts +2629 -0
  523. package/src/services/r2-data-catalog.ts +1119 -0
  524. package/src/services/r2.ts +3348 -0
  525. package/src/services/radar.ts +42152 -0
  526. package/src/services/rate-limits.ts +1150 -0
  527. package/src/services/realtime-kit.ts +11079 -0
  528. package/src/services/registrar.ts +295 -0
  529. package/src/services/request-tracers.ts +158 -0
  530. package/src/services/resource-sharing.ts +1832 -0
  531. package/src/services/rules.ts +837 -0
  532. package/src/services/rulesets.ts +15144 -0
  533. package/src/services/rum.ts +901 -0
  534. package/src/services/schema-validation.ts +733 -0
  535. package/src/services/secrets-store.ts +860 -0
  536. package/src/services/security-center.ts +397 -0
  537. package/src/services/security-txt.ts +315 -0
  538. package/src/services/snippets.ts +420 -0
  539. package/src/services/spectrum.ts +1103 -0
  540. package/src/services/speed.ts +1056 -0
  541. package/src/services/ssl.ts +1587 -0
  542. package/src/services/stream.ts +2756 -0
  543. package/src/services/token-validation.ts +1585 -0
  544. package/src/services/turnstile.ts +643 -0
  545. package/src/services/url-normalization.ts +129 -0
  546. package/src/services/url-scanner.ts +1851 -0
  547. package/src/services/user.ts +1384 -0
  548. package/src/services/vectorize.ts +816 -0
  549. package/src/services/waiting-rooms.ts +3807 -0
  550. package/src/services/web3.ts +834 -0
  551. package/src/services/workers-for-platforms.ts +3859 -0
  552. package/src/services/workers.ts +11637 -0
  553. package/src/services/workflows.ts +1124 -0
  554. package/src/services/zaraz.ts +797 -0
  555. package/src/services/zero-trust.ts +58929 -0
  556. package/src/services/zones.ts +4875 -0
  557. package/src/traits.ts +47 -0
  558. package/bun.lock +0 -26
  559. package/index.ts +0 -1
  560. package/tsconfig.json +0 -29
@@ -0,0 +1,4283 @@
1
+ /**
2
+ * Cloudflare EMAIL-SECURITY API
3
+ *
4
+ * Generated from Cloudflare TypeScript SDK.
5
+ * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service email-security
6
+ */
7
+
8
+ import * as Schema from "effect/Schema";
9
+ import type * as HttpClient from "effect/unstable/http/HttpClient";
10
+ import * as API from "../client/api.ts";
11
+ import * as T from "../traits";
12
+ import type { Credentials } from "../credentials";
13
+ import { type DefaultErrors } from "../errors";
14
+
15
+ // =============================================================================
16
+ // Investigate
17
+ // =============================================================================
18
+
19
+ export interface GetInvestigateRequest {
20
+ postfixId: string;
21
+ /** Account Identifier */
22
+ accountId: string;
23
+ }
24
+
25
+ export const GetInvestigateRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
26
+ postfixId: Schema.String.pipe(T.HttpPath("postfixId")),
27
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
28
+ }).pipe(
29
+ T.Http({
30
+ method: "GET",
31
+ path: "/accounts/{account_id}/email-security/investigate/{postfixId}",
32
+ }),
33
+ ) as unknown as Schema.Schema<GetInvestigateRequest>;
34
+
35
+ export interface GetInvestigateResponse {
36
+ id: string;
37
+ actionLog: unknown;
38
+ clientRecipients: string[];
39
+ detectionReasons: string[];
40
+ isPhishSubmission: boolean;
41
+ isQuarantined: boolean;
42
+ /** The identifier of the message. */
43
+ postfixId: string;
44
+ properties: {
45
+ allowlistedPattern?: string | null;
46
+ allowlistedPatternType?:
47
+ | "quarantine_release"
48
+ | "acceptable_sender"
49
+ | "allowed_sender"
50
+ | "allowed_recipient"
51
+ | "domain_similarity"
52
+ | "domain_recency"
53
+ | "managed_acceptable_sender"
54
+ | "outbound_ndr"
55
+ | null;
56
+ blocklistedMessage?: boolean | null;
57
+ blocklistedPattern?: string | null;
58
+ whitelistedPatternType?:
59
+ | "quarantine_release"
60
+ | "acceptable_sender"
61
+ | "allowed_sender"
62
+ | "allowed_recipient"
63
+ | "domain_similarity"
64
+ | "domain_recency"
65
+ | "managed_acceptable_sender"
66
+ | "outbound_ndr"
67
+ | null;
68
+ };
69
+ ts: string;
70
+ alertId?: string | null;
71
+ deliveryMode?:
72
+ | "DIRECT"
73
+ | "BCC"
74
+ | "JOURNAL"
75
+ | "REVIEW_SUBMISSION"
76
+ | "DMARC_UNVERIFIED"
77
+ | "DMARC_FAILURE_REPORT"
78
+ | "DMARC_AGGREGATE_REPORT"
79
+ | "THREAT_INTEL_SUBMISSION"
80
+ | "SIMULATION_SUBMISSION"
81
+ | "API"
82
+ | "RETRO_SCAN"
83
+ | null;
84
+ edfHash?: string | null;
85
+ envelopeFrom?: string | null;
86
+ envelopeTo?: string[] | null;
87
+ finalDisposition?:
88
+ | "MALICIOUS"
89
+ | "MALICIOUS-BEC"
90
+ | "SUSPICIOUS"
91
+ | "SPOOF"
92
+ | "SPAM"
93
+ | "BULK"
94
+ | "ENCRYPTED"
95
+ | "EXTERNAL"
96
+ | "UNKNOWN"
97
+ | "NONE"
98
+ | null;
99
+ findings?:
100
+ | {
101
+ attachment?: string | null;
102
+ detail?: string | null;
103
+ detection?:
104
+ | "MALICIOUS"
105
+ | "MALICIOUS-BEC"
106
+ | "SUSPICIOUS"
107
+ | "SPOOF"
108
+ | "SPAM"
109
+ | "BULK"
110
+ | "ENCRYPTED"
111
+ | "EXTERNAL"
112
+ | "UNKNOWN"
113
+ | "NONE"
114
+ | null;
115
+ field?: string | null;
116
+ name?: string | null;
117
+ portion?: string | null;
118
+ reason?: string | null;
119
+ score?: number | null;
120
+ value?: string | null;
121
+ }[]
122
+ | null;
123
+ from?: string | null;
124
+ fromName?: string | null;
125
+ htmltextStructureHash?: string | null;
126
+ messageId?: string | null;
127
+ postfixIdOutbound?: string | null;
128
+ replyto?: string | null;
129
+ sentDate?: string | null;
130
+ subject?: string | null;
131
+ threatCategories?: string[] | null;
132
+ to?: string[] | null;
133
+ toName?: string[] | null;
134
+ validation?: {
135
+ comment?: string | null;
136
+ dkim?: "pass" | "neutral" | "fail" | "error" | "none" | null;
137
+ dmarc?: "pass" | "neutral" | "fail" | "error" | "none" | null;
138
+ spf?: "pass" | "neutral" | "fail" | "error" | "none" | null;
139
+ } | null;
140
+ }
141
+
142
+ export const GetInvestigateResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
143
+ {
144
+ id: Schema.String,
145
+ actionLog: Schema.Unknown,
146
+ clientRecipients: Schema.Array(Schema.String),
147
+ detectionReasons: Schema.Array(Schema.String),
148
+ isPhishSubmission: Schema.Boolean,
149
+ isQuarantined: Schema.Boolean,
150
+ postfixId: Schema.String,
151
+ properties: Schema.Struct({
152
+ allowlistedPattern: Schema.optional(
153
+ Schema.Union([Schema.String, Schema.Null]),
154
+ ),
155
+ allowlistedPatternType: Schema.optional(
156
+ Schema.Union([
157
+ Schema.Literals([
158
+ "quarantine_release",
159
+ "acceptable_sender",
160
+ "allowed_sender",
161
+ "allowed_recipient",
162
+ "domain_similarity",
163
+ "domain_recency",
164
+ "managed_acceptable_sender",
165
+ "outbound_ndr",
166
+ ]),
167
+ Schema.Null,
168
+ ]),
169
+ ),
170
+ blocklistedMessage: Schema.optional(
171
+ Schema.Union([Schema.Boolean, Schema.Null]),
172
+ ),
173
+ blocklistedPattern: Schema.optional(
174
+ Schema.Union([Schema.String, Schema.Null]),
175
+ ),
176
+ whitelistedPatternType: Schema.optional(
177
+ Schema.Union([
178
+ Schema.Literals([
179
+ "quarantine_release",
180
+ "acceptable_sender",
181
+ "allowed_sender",
182
+ "allowed_recipient",
183
+ "domain_similarity",
184
+ "domain_recency",
185
+ "managed_acceptable_sender",
186
+ "outbound_ndr",
187
+ ]),
188
+ Schema.Null,
189
+ ]),
190
+ ),
191
+ }).pipe(
192
+ Schema.encodeKeys({
193
+ allowlistedPattern: "allowlisted_pattern",
194
+ allowlistedPatternType: "allowlisted_pattern_type",
195
+ blocklistedMessage: "blocklisted_message",
196
+ blocklistedPattern: "blocklisted_pattern",
197
+ whitelistedPatternType: "whitelisted_pattern_type",
198
+ }),
199
+ ),
200
+ ts: Schema.String,
201
+ alertId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
202
+ deliveryMode: Schema.optional(
203
+ Schema.Union([
204
+ Schema.Literal("DIRECT"),
205
+ Schema.Literal("BCC"),
206
+ Schema.Literal("JOURNAL"),
207
+ Schema.Literal("REVIEW_SUBMISSION"),
208
+ Schema.Literal("DMARC_UNVERIFIED"),
209
+ Schema.Literal("DMARC_FAILURE_REPORT"),
210
+ Schema.Literal("DMARC_AGGREGATE_REPORT"),
211
+ Schema.Literal("THREAT_INTEL_SUBMISSION"),
212
+ Schema.Literal("SIMULATION_SUBMISSION"),
213
+ Schema.Literal("API"),
214
+ Schema.Literal("RETRO_SCAN"),
215
+ Schema.Null,
216
+ ]),
217
+ ),
218
+ edfHash: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
219
+ envelopeFrom: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
220
+ envelopeTo: Schema.optional(
221
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
222
+ ),
223
+ finalDisposition: Schema.optional(
224
+ Schema.Union([
225
+ Schema.Literal("MALICIOUS"),
226
+ Schema.Literal("MALICIOUS-BEC"),
227
+ Schema.Literal("SUSPICIOUS"),
228
+ Schema.Literal("SPOOF"),
229
+ Schema.Literal("SPAM"),
230
+ Schema.Literal("BULK"),
231
+ Schema.Literal("ENCRYPTED"),
232
+ Schema.Literal("EXTERNAL"),
233
+ Schema.Literal("UNKNOWN"),
234
+ Schema.Literal("NONE"),
235
+ Schema.Null,
236
+ ]),
237
+ ),
238
+ findings: Schema.optional(
239
+ Schema.Union([
240
+ Schema.Array(
241
+ Schema.Struct({
242
+ attachment: Schema.optional(
243
+ Schema.Union([Schema.String, Schema.Null]),
244
+ ),
245
+ detail: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
246
+ detection: Schema.optional(
247
+ Schema.Union([
248
+ Schema.Literal("MALICIOUS"),
249
+ Schema.Literal("MALICIOUS-BEC"),
250
+ Schema.Literal("SUSPICIOUS"),
251
+ Schema.Literal("SPOOF"),
252
+ Schema.Literal("SPAM"),
253
+ Schema.Literal("BULK"),
254
+ Schema.Literal("ENCRYPTED"),
255
+ Schema.Literal("EXTERNAL"),
256
+ Schema.Literal("UNKNOWN"),
257
+ Schema.Literal("NONE"),
258
+ Schema.Null,
259
+ ]),
260
+ ),
261
+ field: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
262
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
263
+ portion: Schema.optional(
264
+ Schema.Union([Schema.String, Schema.Null]),
265
+ ),
266
+ reason: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
267
+ score: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
268
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
269
+ }),
270
+ ),
271
+ Schema.Null,
272
+ ]),
273
+ ),
274
+ from: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
275
+ fromName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
276
+ htmltextStructureHash: Schema.optional(
277
+ Schema.Union([Schema.String, Schema.Null]),
278
+ ),
279
+ messageId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
280
+ postfixIdOutbound: Schema.optional(
281
+ Schema.Union([Schema.String, Schema.Null]),
282
+ ),
283
+ replyto: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
284
+ sentDate: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
285
+ subject: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
286
+ threatCategories: Schema.optional(
287
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
288
+ ),
289
+ to: Schema.optional(
290
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
291
+ ),
292
+ toName: Schema.optional(
293
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
294
+ ),
295
+ validation: Schema.optional(
296
+ Schema.Union([
297
+ Schema.Struct({
298
+ comment: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
299
+ dkim: Schema.optional(
300
+ Schema.Union([
301
+ Schema.Literal("pass"),
302
+ Schema.Literal("neutral"),
303
+ Schema.Literal("fail"),
304
+ Schema.Literal("error"),
305
+ Schema.Literal("none"),
306
+ Schema.Null,
307
+ ]),
308
+ ),
309
+ dmarc: Schema.optional(
310
+ Schema.Union([
311
+ Schema.Literal("pass"),
312
+ Schema.Literal("neutral"),
313
+ Schema.Literal("fail"),
314
+ Schema.Literal("error"),
315
+ Schema.Literal("none"),
316
+ Schema.Null,
317
+ ]),
318
+ ),
319
+ spf: Schema.optional(
320
+ Schema.Union([
321
+ Schema.Literal("pass"),
322
+ Schema.Literal("neutral"),
323
+ Schema.Literal("fail"),
324
+ Schema.Literal("error"),
325
+ Schema.Literal("none"),
326
+ Schema.Null,
327
+ ]),
328
+ ),
329
+ }),
330
+ Schema.Null,
331
+ ]),
332
+ ),
333
+ },
334
+ ).pipe(
335
+ Schema.encodeKeys({
336
+ id: "id",
337
+ actionLog: "action_log",
338
+ clientRecipients: "client_recipients",
339
+ detectionReasons: "detection_reasons",
340
+ isPhishSubmission: "is_phish_submission",
341
+ isQuarantined: "is_quarantined",
342
+ postfixId: "postfix_id",
343
+ properties: "properties",
344
+ ts: "ts",
345
+ alertId: "alert_id",
346
+ deliveryMode: "delivery_mode",
347
+ edfHash: "edf_hash",
348
+ envelopeFrom: "envelope_from",
349
+ envelopeTo: "envelope_to",
350
+ finalDisposition: "final_disposition",
351
+ findings: "findings",
352
+ from: "from",
353
+ fromName: "from_name",
354
+ htmltextStructureHash: "htmltext_structure_hash",
355
+ messageId: "message_id",
356
+ postfixIdOutbound: "postfix_id_outbound",
357
+ replyto: "replyto",
358
+ sentDate: "sent_date",
359
+ subject: "subject",
360
+ threatCategories: "threat_categories",
361
+ to: "to",
362
+ toName: "to_name",
363
+ validation: "validation",
364
+ }),
365
+ ) as unknown as Schema.Schema<GetInvestigateResponse>;
366
+
367
+ export type GetInvestigateError = DefaultErrors;
368
+
369
+ export const getInvestigate: API.OperationMethod<
370
+ GetInvestigateRequest,
371
+ GetInvestigateResponse,
372
+ GetInvestigateError,
373
+ Credentials | HttpClient.HttpClient
374
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
375
+ input: GetInvestigateRequest,
376
+ output: GetInvestigateResponse,
377
+ errors: [],
378
+ }));
379
+
380
+ export interface ListInvestigatesRequest {
381
+ /** Path param: Account Identifier */
382
+ accountId: string;
383
+ /** Query param: Determines if the message action log is included in the response. */
384
+ actionLog?: boolean;
385
+ /** Query param: */
386
+ alertId?: string;
387
+ /** Query param: */
388
+ cursor?: string;
389
+ /** Query param: Determines if the search results will include detections or not. */
390
+ detectionsOnly?: boolean;
391
+ /** Query param: The sender domains the search filters by. */
392
+ domain?: string;
393
+ /** Query param: The end of the search date range. Defaults to `now`. */
394
+ end?: string;
395
+ /** Query param: The dispositions the search filters by. */
396
+ finalDisposition?:
397
+ | "MALICIOUS"
398
+ | "SUSPICIOUS"
399
+ | "SPOOF"
400
+ | "SPAM"
401
+ | "BULK"
402
+ | "NONE";
403
+ /** Query param: The message actions the search filters by. */
404
+ messageAction?: "PREVIEW" | "QUARANTINE_RELEASED" | "MOVED";
405
+ /** Query param: */
406
+ messageId?: string;
407
+ /** Query param: */
408
+ metric?: string;
409
+ /** Query param: The space-delimited term used in the query. The search is case-insensitive. The content of the following email metadata fields are searched: - alert_id - CC - From (envelope_from) - Fro */
410
+ query?: string;
411
+ /** Query param: */
412
+ recipient?: string;
413
+ /** Query param: */
414
+ sender?: string;
415
+ /** Query param: The beginning of the search date range. Defaults to `now - 30 days`. */
416
+ start?: string;
417
+ /** Query param: */
418
+ subject?: string;
419
+ }
420
+
421
+ export const ListInvestigatesRequest =
422
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
423
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
424
+ actionLog: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("action_log")),
425
+ alertId: Schema.optional(Schema.String).pipe(T.HttpQuery("alert_id")),
426
+ cursor: Schema.optional(Schema.String).pipe(T.HttpQuery("cursor")),
427
+ detectionsOnly: Schema.optional(Schema.Boolean).pipe(
428
+ T.HttpQuery("detections_only"),
429
+ ),
430
+ domain: Schema.optional(Schema.String).pipe(T.HttpQuery("domain")),
431
+ end: Schema.optional(Schema.String).pipe(T.HttpQuery("end")),
432
+ finalDisposition: Schema.optional(
433
+ Schema.Literals([
434
+ "MALICIOUS",
435
+ "SUSPICIOUS",
436
+ "SPOOF",
437
+ "SPAM",
438
+ "BULK",
439
+ "NONE",
440
+ ]),
441
+ ).pipe(T.HttpQuery("final_disposition")),
442
+ messageAction: Schema.optional(
443
+ Schema.Literals(["PREVIEW", "QUARANTINE_RELEASED", "MOVED"]),
444
+ ).pipe(T.HttpQuery("message_action")),
445
+ messageId: Schema.optional(Schema.String).pipe(T.HttpQuery("message_id")),
446
+ metric: Schema.optional(Schema.String).pipe(T.HttpQuery("metric")),
447
+ query: Schema.optional(Schema.String).pipe(T.HttpQuery("query")),
448
+ recipient: Schema.optional(Schema.String).pipe(T.HttpQuery("recipient")),
449
+ sender: Schema.optional(Schema.String).pipe(T.HttpQuery("sender")),
450
+ start: Schema.optional(Schema.String).pipe(T.HttpQuery("start")),
451
+ subject: Schema.optional(Schema.String).pipe(T.HttpQuery("subject")),
452
+ }).pipe(
453
+ T.Http({
454
+ method: "GET",
455
+ path: "/accounts/{account_id}/email-security/investigate",
456
+ }),
457
+ ) as unknown as Schema.Schema<ListInvestigatesRequest>;
458
+
459
+ export type ListInvestigatesResponse = {
460
+ id: string;
461
+ actionLog: unknown;
462
+ clientRecipients: string[];
463
+ detectionReasons: string[];
464
+ isPhishSubmission: boolean;
465
+ isQuarantined: boolean;
466
+ postfixId: string;
467
+ properties: {
468
+ allowlistedPattern?: string | null;
469
+ allowlistedPatternType?:
470
+ | "quarantine_release"
471
+ | "acceptable_sender"
472
+ | "allowed_sender"
473
+ | "allowed_recipient"
474
+ | "domain_similarity"
475
+ | "domain_recency"
476
+ | "managed_acceptable_sender"
477
+ | "outbound_ndr"
478
+ | null;
479
+ blocklistedMessage?: boolean | null;
480
+ blocklistedPattern?: string | null;
481
+ whitelistedPatternType?:
482
+ | "quarantine_release"
483
+ | "acceptable_sender"
484
+ | "allowed_sender"
485
+ | "allowed_recipient"
486
+ | "domain_similarity"
487
+ | "domain_recency"
488
+ | "managed_acceptable_sender"
489
+ | "outbound_ndr"
490
+ | null;
491
+ };
492
+ ts: string;
493
+ alertId?: string | null;
494
+ deliveryMode?:
495
+ | "DIRECT"
496
+ | "BCC"
497
+ | "JOURNAL"
498
+ | "REVIEW_SUBMISSION"
499
+ | "DMARC_UNVERIFIED"
500
+ | "DMARC_FAILURE_REPORT"
501
+ | "DMARC_AGGREGATE_REPORT"
502
+ | "THREAT_INTEL_SUBMISSION"
503
+ | "SIMULATION_SUBMISSION"
504
+ | "API"
505
+ | "RETRO_SCAN"
506
+ | null;
507
+ edfHash?: string | null;
508
+ envelopeFrom?: string | null;
509
+ envelopeTo?: string[] | null;
510
+ finalDisposition?:
511
+ | "MALICIOUS"
512
+ | "MALICIOUS-BEC"
513
+ | "SUSPICIOUS"
514
+ | "SPOOF"
515
+ | "SPAM"
516
+ | "BULK"
517
+ | "ENCRYPTED"
518
+ | "EXTERNAL"
519
+ | "UNKNOWN"
520
+ | "NONE"
521
+ | null;
522
+ findings?:
523
+ | {
524
+ attachment?: string | null;
525
+ detail?: string | null;
526
+ detection?:
527
+ | "MALICIOUS"
528
+ | "MALICIOUS-BEC"
529
+ | "SUSPICIOUS"
530
+ | "SPOOF"
531
+ | "SPAM"
532
+ | "BULK"
533
+ | "ENCRYPTED"
534
+ | "EXTERNAL"
535
+ | "UNKNOWN"
536
+ | "NONE"
537
+ | null;
538
+ field?: string | null;
539
+ name?: string | null;
540
+ portion?: string | null;
541
+ reason?: string | null;
542
+ score?: number | null;
543
+ value?: string | null;
544
+ }[]
545
+ | null;
546
+ from?: string | null;
547
+ fromName?: string | null;
548
+ htmltextStructureHash?: string | null;
549
+ messageId?: string | null;
550
+ postfixIdOutbound?: string | null;
551
+ replyto?: string | null;
552
+ sentDate?: string | null;
553
+ subject?: string | null;
554
+ threatCategories?: string[] | null;
555
+ to?: string[] | null;
556
+ toName?: string[] | null;
557
+ validation?: {
558
+ comment?: string | null;
559
+ dkim?: "pass" | "neutral" | "fail" | "error" | "none" | null;
560
+ dmarc?: "pass" | "neutral" | "fail" | "error" | "none" | null;
561
+ spf?: "pass" | "neutral" | "fail" | "error" | "none" | null;
562
+ } | null;
563
+ }[];
564
+
565
+ export const ListInvestigatesResponse =
566
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
567
+ Schema.Struct({
568
+ id: Schema.String,
569
+ actionLog: Schema.Unknown,
570
+ clientRecipients: Schema.Array(Schema.String),
571
+ detectionReasons: Schema.Array(Schema.String),
572
+ isPhishSubmission: Schema.Boolean,
573
+ isQuarantined: Schema.Boolean,
574
+ postfixId: Schema.String,
575
+ properties: Schema.Struct({
576
+ allowlistedPattern: Schema.optional(
577
+ Schema.Union([Schema.String, Schema.Null]),
578
+ ),
579
+ allowlistedPatternType: Schema.optional(
580
+ Schema.Union([
581
+ Schema.Literals([
582
+ "quarantine_release",
583
+ "acceptable_sender",
584
+ "allowed_sender",
585
+ "allowed_recipient",
586
+ "domain_similarity",
587
+ "domain_recency",
588
+ "managed_acceptable_sender",
589
+ "outbound_ndr",
590
+ ]),
591
+ Schema.Null,
592
+ ]),
593
+ ),
594
+ blocklistedMessage: Schema.optional(
595
+ Schema.Union([Schema.Boolean, Schema.Null]),
596
+ ),
597
+ blocklistedPattern: Schema.optional(
598
+ Schema.Union([Schema.String, Schema.Null]),
599
+ ),
600
+ whitelistedPatternType: Schema.optional(
601
+ Schema.Union([
602
+ Schema.Literals([
603
+ "quarantine_release",
604
+ "acceptable_sender",
605
+ "allowed_sender",
606
+ "allowed_recipient",
607
+ "domain_similarity",
608
+ "domain_recency",
609
+ "managed_acceptable_sender",
610
+ "outbound_ndr",
611
+ ]),
612
+ Schema.Null,
613
+ ]),
614
+ ),
615
+ }).pipe(
616
+ Schema.encodeKeys({
617
+ allowlistedPattern: "allowlisted_pattern",
618
+ allowlistedPatternType: "allowlisted_pattern_type",
619
+ blocklistedMessage: "blocklisted_message",
620
+ blocklistedPattern: "blocklisted_pattern",
621
+ whitelistedPatternType: "whitelisted_pattern_type",
622
+ }),
623
+ ),
624
+ ts: Schema.String,
625
+ alertId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
626
+ deliveryMode: Schema.optional(
627
+ Schema.Union([
628
+ Schema.Literal("DIRECT"),
629
+ Schema.Literal("BCC"),
630
+ Schema.Literal("JOURNAL"),
631
+ Schema.Literal("REVIEW_SUBMISSION"),
632
+ Schema.Literal("DMARC_UNVERIFIED"),
633
+ Schema.Literal("DMARC_FAILURE_REPORT"),
634
+ Schema.Literal("DMARC_AGGREGATE_REPORT"),
635
+ Schema.Literal("THREAT_INTEL_SUBMISSION"),
636
+ Schema.Literal("SIMULATION_SUBMISSION"),
637
+ Schema.Literal("API"),
638
+ Schema.Literal("RETRO_SCAN"),
639
+ Schema.Null,
640
+ ]),
641
+ ),
642
+ edfHash: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
643
+ envelopeFrom: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
644
+ envelopeTo: Schema.optional(
645
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
646
+ ),
647
+ finalDisposition: Schema.optional(
648
+ Schema.Union([
649
+ Schema.Literal("MALICIOUS"),
650
+ Schema.Literal("MALICIOUS-BEC"),
651
+ Schema.Literal("SUSPICIOUS"),
652
+ Schema.Literal("SPOOF"),
653
+ Schema.Literal("SPAM"),
654
+ Schema.Literal("BULK"),
655
+ Schema.Literal("ENCRYPTED"),
656
+ Schema.Literal("EXTERNAL"),
657
+ Schema.Literal("UNKNOWN"),
658
+ Schema.Literal("NONE"),
659
+ Schema.Null,
660
+ ]),
661
+ ),
662
+ findings: Schema.optional(
663
+ Schema.Union([
664
+ Schema.Array(
665
+ Schema.Struct({
666
+ attachment: Schema.optional(
667
+ Schema.Union([Schema.String, Schema.Null]),
668
+ ),
669
+ detail: Schema.optional(
670
+ Schema.Union([Schema.String, Schema.Null]),
671
+ ),
672
+ detection: Schema.optional(
673
+ Schema.Union([
674
+ Schema.Literal("MALICIOUS"),
675
+ Schema.Literal("MALICIOUS-BEC"),
676
+ Schema.Literal("SUSPICIOUS"),
677
+ Schema.Literal("SPOOF"),
678
+ Schema.Literal("SPAM"),
679
+ Schema.Literal("BULK"),
680
+ Schema.Literal("ENCRYPTED"),
681
+ Schema.Literal("EXTERNAL"),
682
+ Schema.Literal("UNKNOWN"),
683
+ Schema.Literal("NONE"),
684
+ Schema.Null,
685
+ ]),
686
+ ),
687
+ field: Schema.optional(
688
+ Schema.Union([Schema.String, Schema.Null]),
689
+ ),
690
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
691
+ portion: Schema.optional(
692
+ Schema.Union([Schema.String, Schema.Null]),
693
+ ),
694
+ reason: Schema.optional(
695
+ Schema.Union([Schema.String, Schema.Null]),
696
+ ),
697
+ score: Schema.optional(
698
+ Schema.Union([Schema.Number, Schema.Null]),
699
+ ),
700
+ value: Schema.optional(
701
+ Schema.Union([Schema.String, Schema.Null]),
702
+ ),
703
+ }),
704
+ ),
705
+ Schema.Null,
706
+ ]),
707
+ ),
708
+ from: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
709
+ fromName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
710
+ htmltextStructureHash: Schema.optional(
711
+ Schema.Union([Schema.String, Schema.Null]),
712
+ ),
713
+ messageId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
714
+ postfixIdOutbound: Schema.optional(
715
+ Schema.Union([Schema.String, Schema.Null]),
716
+ ),
717
+ replyto: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
718
+ sentDate: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
719
+ subject: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
720
+ threatCategories: Schema.optional(
721
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
722
+ ),
723
+ to: Schema.optional(
724
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
725
+ ),
726
+ toName: Schema.optional(
727
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
728
+ ),
729
+ validation: Schema.optional(
730
+ Schema.Union([
731
+ Schema.Struct({
732
+ comment: Schema.optional(
733
+ Schema.Union([Schema.String, Schema.Null]),
734
+ ),
735
+ dkim: Schema.optional(
736
+ Schema.Union([
737
+ Schema.Literal("pass"),
738
+ Schema.Literal("neutral"),
739
+ Schema.Literal("fail"),
740
+ Schema.Literal("error"),
741
+ Schema.Literal("none"),
742
+ Schema.Null,
743
+ ]),
744
+ ),
745
+ dmarc: Schema.optional(
746
+ Schema.Union([
747
+ Schema.Literal("pass"),
748
+ Schema.Literal("neutral"),
749
+ Schema.Literal("fail"),
750
+ Schema.Literal("error"),
751
+ Schema.Literal("none"),
752
+ Schema.Null,
753
+ ]),
754
+ ),
755
+ spf: Schema.optional(
756
+ Schema.Union([
757
+ Schema.Literal("pass"),
758
+ Schema.Literal("neutral"),
759
+ Schema.Literal("fail"),
760
+ Schema.Literal("error"),
761
+ Schema.Literal("none"),
762
+ Schema.Null,
763
+ ]),
764
+ ),
765
+ }),
766
+ Schema.Null,
767
+ ]),
768
+ ),
769
+ }).pipe(
770
+ Schema.encodeKeys({
771
+ id: "id",
772
+ actionLog: "action_log",
773
+ clientRecipients: "client_recipients",
774
+ detectionReasons: "detection_reasons",
775
+ isPhishSubmission: "is_phish_submission",
776
+ isQuarantined: "is_quarantined",
777
+ postfixId: "postfix_id",
778
+ properties: "properties",
779
+ ts: "ts",
780
+ alertId: "alert_id",
781
+ deliveryMode: "delivery_mode",
782
+ edfHash: "edf_hash",
783
+ envelopeFrom: "envelope_from",
784
+ envelopeTo: "envelope_to",
785
+ finalDisposition: "final_disposition",
786
+ findings: "findings",
787
+ from: "from",
788
+ fromName: "from_name",
789
+ htmltextStructureHash: "htmltext_structure_hash",
790
+ messageId: "message_id",
791
+ postfixIdOutbound: "postfix_id_outbound",
792
+ replyto: "replyto",
793
+ sentDate: "sent_date",
794
+ subject: "subject",
795
+ threatCategories: "threat_categories",
796
+ to: "to",
797
+ toName: "to_name",
798
+ validation: "validation",
799
+ }),
800
+ ),
801
+ ) as unknown as Schema.Schema<ListInvestigatesResponse>;
802
+
803
+ export type ListInvestigatesError = DefaultErrors;
804
+
805
+ export const listInvestigates: API.OperationMethod<
806
+ ListInvestigatesRequest,
807
+ ListInvestigatesResponse,
808
+ ListInvestigatesError,
809
+ Credentials | HttpClient.HttpClient
810
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
811
+ input: ListInvestigatesRequest,
812
+ output: ListInvestigatesResponse,
813
+ errors: [],
814
+ }));
815
+
816
+ // =============================================================================
817
+ // InvestigateDetection
818
+ // =============================================================================
819
+
820
+ export interface GetInvestigateDetectionRequest {
821
+ postfixId: string;
822
+ /** Account Identifier */
823
+ accountId: string;
824
+ }
825
+
826
+ export const GetInvestigateDetectionRequest =
827
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
828
+ postfixId: Schema.String.pipe(T.HttpPath("postfixId")),
829
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
830
+ }).pipe(
831
+ T.Http({
832
+ method: "GET",
833
+ path: "/accounts/{account_id}/email-security/investigate/{postfixId}/detections",
834
+ }),
835
+ ) as unknown as Schema.Schema<GetInvestigateDetectionRequest>;
836
+
837
+ export interface GetInvestigateDetectionResponse {
838
+ action: string;
839
+ attachments: {
840
+ size: number;
841
+ contentType?: string | null;
842
+ detection?:
843
+ | "MALICIOUS"
844
+ | "MALICIOUS-BEC"
845
+ | "SUSPICIOUS"
846
+ | "SPOOF"
847
+ | "SPAM"
848
+ | "BULK"
849
+ | "ENCRYPTED"
850
+ | "EXTERNAL"
851
+ | "UNKNOWN"
852
+ | "NONE"
853
+ | null;
854
+ encrypted?: boolean | null;
855
+ name?: string | null;
856
+ }[];
857
+ headers: { name: string; value: string }[];
858
+ links: { href: string; text?: string | null }[];
859
+ senderInfo: {
860
+ asName?: string | null;
861
+ asNumber?: number | null;
862
+ geo?: string | null;
863
+ ip?: string | null;
864
+ pld?: string | null;
865
+ };
866
+ threatCategories: {
867
+ id: number;
868
+ description?: string | null;
869
+ name?: string | null;
870
+ }[];
871
+ validation: {
872
+ comment?: string | null;
873
+ dkim?: "pass" | "neutral" | "fail" | "error" | "none" | null;
874
+ dmarc?: "pass" | "neutral" | "fail" | "error" | "none" | null;
875
+ spf?: "pass" | "neutral" | "fail" | "error" | "none" | null;
876
+ };
877
+ finalDisposition?:
878
+ | "MALICIOUS"
879
+ | "MALICIOUS-BEC"
880
+ | "SUSPICIOUS"
881
+ | "SPOOF"
882
+ | "SPAM"
883
+ | "BULK"
884
+ | "ENCRYPTED"
885
+ | "EXTERNAL"
886
+ | "UNKNOWN"
887
+ | "NONE"
888
+ | null;
889
+ }
890
+
891
+ export const GetInvestigateDetectionResponse =
892
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
893
+ action: Schema.String,
894
+ attachments: Schema.Array(
895
+ Schema.Struct({
896
+ size: Schema.Number,
897
+ contentType: Schema.optional(
898
+ Schema.Union([Schema.String, Schema.Null]),
899
+ ),
900
+ detection: Schema.optional(
901
+ Schema.Union([
902
+ Schema.Literal("MALICIOUS"),
903
+ Schema.Literal("MALICIOUS-BEC"),
904
+ Schema.Literal("SUSPICIOUS"),
905
+ Schema.Literal("SPOOF"),
906
+ Schema.Literal("SPAM"),
907
+ Schema.Literal("BULK"),
908
+ Schema.Literal("ENCRYPTED"),
909
+ Schema.Literal("EXTERNAL"),
910
+ Schema.Literal("UNKNOWN"),
911
+ Schema.Literal("NONE"),
912
+ Schema.Null,
913
+ ]),
914
+ ),
915
+ encrypted: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
916
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
917
+ }).pipe(
918
+ Schema.encodeKeys({
919
+ size: "size",
920
+ contentType: "content_type",
921
+ detection: "detection",
922
+ encrypted: "encrypted",
923
+ name: "name",
924
+ }),
925
+ ),
926
+ ),
927
+ headers: Schema.Array(
928
+ Schema.Struct({
929
+ name: Schema.String,
930
+ value: Schema.String,
931
+ }),
932
+ ),
933
+ links: Schema.Array(
934
+ Schema.Struct({
935
+ href: Schema.String,
936
+ text: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
937
+ }),
938
+ ),
939
+ senderInfo: Schema.Struct({
940
+ asName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
941
+ asNumber: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
942
+ geo: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
943
+ ip: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
944
+ pld: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
945
+ }).pipe(
946
+ Schema.encodeKeys({
947
+ asName: "as_name",
948
+ asNumber: "as_number",
949
+ geo: "geo",
950
+ ip: "ip",
951
+ pld: "pld",
952
+ }),
953
+ ),
954
+ threatCategories: Schema.Array(
955
+ Schema.Struct({
956
+ id: Schema.Number,
957
+ description: Schema.optional(
958
+ Schema.Union([Schema.String, Schema.Null]),
959
+ ),
960
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
961
+ }),
962
+ ),
963
+ validation: Schema.Struct({
964
+ comment: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
965
+ dkim: Schema.optional(
966
+ Schema.Union([
967
+ Schema.Literal("pass"),
968
+ Schema.Literal("neutral"),
969
+ Schema.Literal("fail"),
970
+ Schema.Literal("error"),
971
+ Schema.Literal("none"),
972
+ Schema.Null,
973
+ ]),
974
+ ),
975
+ dmarc: Schema.optional(
976
+ Schema.Union([
977
+ Schema.Literal("pass"),
978
+ Schema.Literal("neutral"),
979
+ Schema.Literal("fail"),
980
+ Schema.Literal("error"),
981
+ Schema.Literal("none"),
982
+ Schema.Null,
983
+ ]),
984
+ ),
985
+ spf: Schema.optional(
986
+ Schema.Union([
987
+ Schema.Literal("pass"),
988
+ Schema.Literal("neutral"),
989
+ Schema.Literal("fail"),
990
+ Schema.Literal("error"),
991
+ Schema.Literal("none"),
992
+ Schema.Null,
993
+ ]),
994
+ ),
995
+ }),
996
+ finalDisposition: Schema.optional(
997
+ Schema.Union([
998
+ Schema.Literal("MALICIOUS"),
999
+ Schema.Literal("MALICIOUS-BEC"),
1000
+ Schema.Literal("SUSPICIOUS"),
1001
+ Schema.Literal("SPOOF"),
1002
+ Schema.Literal("SPAM"),
1003
+ Schema.Literal("BULK"),
1004
+ Schema.Literal("ENCRYPTED"),
1005
+ Schema.Literal("EXTERNAL"),
1006
+ Schema.Literal("UNKNOWN"),
1007
+ Schema.Literal("NONE"),
1008
+ Schema.Null,
1009
+ ]),
1010
+ ),
1011
+ }).pipe(
1012
+ Schema.encodeKeys({
1013
+ action: "action",
1014
+ attachments: "attachments",
1015
+ headers: "headers",
1016
+ links: "links",
1017
+ senderInfo: "sender_info",
1018
+ threatCategories: "threat_categories",
1019
+ validation: "validation",
1020
+ finalDisposition: "final_disposition",
1021
+ }),
1022
+ ) as unknown as Schema.Schema<GetInvestigateDetectionResponse>;
1023
+
1024
+ export type GetInvestigateDetectionError = DefaultErrors;
1025
+
1026
+ export const getInvestigateDetection: API.OperationMethod<
1027
+ GetInvestigateDetectionRequest,
1028
+ GetInvestigateDetectionResponse,
1029
+ GetInvestigateDetectionError,
1030
+ Credentials | HttpClient.HttpClient
1031
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1032
+ input: GetInvestigateDetectionRequest,
1033
+ output: GetInvestigateDetectionResponse,
1034
+ errors: [],
1035
+ }));
1036
+
1037
+ // =============================================================================
1038
+ // InvestigateMove
1039
+ // =============================================================================
1040
+
1041
+ export interface CreateInvestigateMoveRequest {
1042
+ postfixId: string;
1043
+ /** Path param: Account Identifier */
1044
+ accountId: string;
1045
+ /** Body param: */
1046
+ destination:
1047
+ | "Inbox"
1048
+ | "JunkEmail"
1049
+ | "DeletedItems"
1050
+ | "RecoverableItemsDeletions"
1051
+ | "RecoverableItemsPurges";
1052
+ }
1053
+
1054
+ export const CreateInvestigateMoveRequest =
1055
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1056
+ postfixId: Schema.String.pipe(T.HttpPath("postfixId")),
1057
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1058
+ destination: Schema.Literals([
1059
+ "Inbox",
1060
+ "JunkEmail",
1061
+ "DeletedItems",
1062
+ "RecoverableItemsDeletions",
1063
+ "RecoverableItemsPurges",
1064
+ ]),
1065
+ }).pipe(
1066
+ T.Http({
1067
+ method: "POST",
1068
+ path: "/accounts/{account_id}/email-security/investigate/{postfixId}/move",
1069
+ }),
1070
+ ) as unknown as Schema.Schema<CreateInvestigateMoveRequest>;
1071
+
1072
+ export type CreateInvestigateMoveResponse = {
1073
+ completedTimestamp: string;
1074
+ itemCount: number;
1075
+ success: boolean;
1076
+ destination?: string | null;
1077
+ messageId?: string | null;
1078
+ operation?: string | null;
1079
+ recipient?: string | null;
1080
+ status?: string | null;
1081
+ }[];
1082
+
1083
+ export const CreateInvestigateMoveResponse =
1084
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
1085
+ Schema.Struct({
1086
+ completedTimestamp: Schema.String,
1087
+ itemCount: Schema.Number,
1088
+ success: Schema.Boolean,
1089
+ destination: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1090
+ messageId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1091
+ operation: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1092
+ recipient: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1093
+ status: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1094
+ }).pipe(
1095
+ Schema.encodeKeys({
1096
+ completedTimestamp: "completed_timestamp",
1097
+ itemCount: "item_count",
1098
+ success: "success",
1099
+ destination: "destination",
1100
+ messageId: "message_id",
1101
+ operation: "operation",
1102
+ recipient: "recipient",
1103
+ status: "status",
1104
+ }),
1105
+ ),
1106
+ ) as unknown as Schema.Schema<CreateInvestigateMoveResponse>;
1107
+
1108
+ export type CreateInvestigateMoveError = DefaultErrors;
1109
+
1110
+ export const createInvestigateMove: API.OperationMethod<
1111
+ CreateInvestigateMoveRequest,
1112
+ CreateInvestigateMoveResponse,
1113
+ CreateInvestigateMoveError,
1114
+ Credentials | HttpClient.HttpClient
1115
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1116
+ input: CreateInvestigateMoveRequest,
1117
+ output: CreateInvestigateMoveResponse,
1118
+ errors: [],
1119
+ }));
1120
+
1121
+ export interface BulkInvestigateMoveRequest {
1122
+ /** Path param: Account Identifier */
1123
+ accountId: string;
1124
+ /** Body param: */
1125
+ destination:
1126
+ | "Inbox"
1127
+ | "JunkEmail"
1128
+ | "DeletedItems"
1129
+ | "RecoverableItemsDeletions"
1130
+ | "RecoverableItemsPurges";
1131
+ /** Body param: */
1132
+ postfixIds: string[];
1133
+ }
1134
+
1135
+ export const BulkInvestigateMoveRequest =
1136
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1137
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1138
+ destination: Schema.Literals([
1139
+ "Inbox",
1140
+ "JunkEmail",
1141
+ "DeletedItems",
1142
+ "RecoverableItemsDeletions",
1143
+ "RecoverableItemsPurges",
1144
+ ]),
1145
+ postfixIds: Schema.Array(Schema.String),
1146
+ }).pipe(
1147
+ Schema.encodeKeys({
1148
+ destination: "destination",
1149
+ postfixIds: "postfix_ids",
1150
+ }),
1151
+ T.Http({
1152
+ method: "POST",
1153
+ path: "/accounts/{account_id}/email-security/investigate/move",
1154
+ }),
1155
+ ) as unknown as Schema.Schema<BulkInvestigateMoveRequest>;
1156
+
1157
+ export type BulkInvestigateMoveResponse = {
1158
+ completedTimestamp: string;
1159
+ itemCount: number;
1160
+ success: boolean;
1161
+ destination?: string | null;
1162
+ messageId?: string | null;
1163
+ operation?: string | null;
1164
+ recipient?: string | null;
1165
+ status?: string | null;
1166
+ }[];
1167
+
1168
+ export const BulkInvestigateMoveResponse =
1169
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
1170
+ Schema.Struct({
1171
+ completedTimestamp: Schema.String,
1172
+ itemCount: Schema.Number,
1173
+ success: Schema.Boolean,
1174
+ destination: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1175
+ messageId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1176
+ operation: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1177
+ recipient: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1178
+ status: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1179
+ }).pipe(
1180
+ Schema.encodeKeys({
1181
+ completedTimestamp: "completed_timestamp",
1182
+ itemCount: "item_count",
1183
+ success: "success",
1184
+ destination: "destination",
1185
+ messageId: "message_id",
1186
+ operation: "operation",
1187
+ recipient: "recipient",
1188
+ status: "status",
1189
+ }),
1190
+ ),
1191
+ ) as unknown as Schema.Schema<BulkInvestigateMoveResponse>;
1192
+
1193
+ export type BulkInvestigateMoveError = DefaultErrors;
1194
+
1195
+ export const bulkInvestigateMove: API.OperationMethod<
1196
+ BulkInvestigateMoveRequest,
1197
+ BulkInvestigateMoveResponse,
1198
+ BulkInvestigateMoveError,
1199
+ Credentials | HttpClient.HttpClient
1200
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1201
+ input: BulkInvestigateMoveRequest,
1202
+ output: BulkInvestigateMoveResponse,
1203
+ errors: [],
1204
+ }));
1205
+
1206
+ // =============================================================================
1207
+ // InvestigatePreview
1208
+ // =============================================================================
1209
+
1210
+ export interface GetInvestigatePreviewRequest {
1211
+ postfixId: string;
1212
+ /** Account Identifier */
1213
+ accountId: string;
1214
+ }
1215
+
1216
+ export const GetInvestigatePreviewRequest =
1217
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1218
+ postfixId: Schema.String.pipe(T.HttpPath("postfixId")),
1219
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1220
+ }).pipe(
1221
+ T.Http({
1222
+ method: "GET",
1223
+ path: "/accounts/{account_id}/email-security/investigate/{postfixId}/preview",
1224
+ }),
1225
+ ) as unknown as Schema.Schema<GetInvestigatePreviewRequest>;
1226
+
1227
+ export interface GetInvestigatePreviewResponse {
1228
+ /** A base64 encoded PNG image of the email. */
1229
+ screenshot: string;
1230
+ }
1231
+
1232
+ export const GetInvestigatePreviewResponse =
1233
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1234
+ screenshot: Schema.String,
1235
+ }) as unknown as Schema.Schema<GetInvestigatePreviewResponse>;
1236
+
1237
+ export type GetInvestigatePreviewError = DefaultErrors;
1238
+
1239
+ export const getInvestigatePreview: API.OperationMethod<
1240
+ GetInvestigatePreviewRequest,
1241
+ GetInvestigatePreviewResponse,
1242
+ GetInvestigatePreviewError,
1243
+ Credentials | HttpClient.HttpClient
1244
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1245
+ input: GetInvestigatePreviewRequest,
1246
+ output: GetInvestigatePreviewResponse,
1247
+ errors: [],
1248
+ }));
1249
+
1250
+ export interface CreateInvestigatePreviewRequest {
1251
+ /** Path param: Account Identifier */
1252
+ accountId: string;
1253
+ /** Body param: The identifier of the message. */
1254
+ postfixId: string;
1255
+ }
1256
+
1257
+ export const CreateInvestigatePreviewRequest =
1258
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1259
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1260
+ postfixId: Schema.String,
1261
+ }).pipe(
1262
+ Schema.encodeKeys({ postfixId: "postfix_id" }),
1263
+ T.Http({
1264
+ method: "POST",
1265
+ path: "/accounts/{account_id}/email-security/investigate/preview",
1266
+ }),
1267
+ ) as unknown as Schema.Schema<CreateInvestigatePreviewRequest>;
1268
+
1269
+ export interface CreateInvestigatePreviewResponse {
1270
+ /** A base64 encoded PNG image of the email. */
1271
+ screenshot: string;
1272
+ }
1273
+
1274
+ export const CreateInvestigatePreviewResponse =
1275
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1276
+ screenshot: Schema.String,
1277
+ }) as unknown as Schema.Schema<CreateInvestigatePreviewResponse>;
1278
+
1279
+ export type CreateInvestigatePreviewError = DefaultErrors;
1280
+
1281
+ export const createInvestigatePreview: API.OperationMethod<
1282
+ CreateInvestigatePreviewRequest,
1283
+ CreateInvestigatePreviewResponse,
1284
+ CreateInvestigatePreviewError,
1285
+ Credentials | HttpClient.HttpClient
1286
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1287
+ input: CreateInvestigatePreviewRequest,
1288
+ output: CreateInvestigatePreviewResponse,
1289
+ errors: [],
1290
+ }));
1291
+
1292
+ // =============================================================================
1293
+ // InvestigateRaw
1294
+ // =============================================================================
1295
+
1296
+ export interface GetInvestigateRawRequest {
1297
+ postfixId: string;
1298
+ /** Account Identifier */
1299
+ accountId: string;
1300
+ }
1301
+
1302
+ export const GetInvestigateRawRequest =
1303
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1304
+ postfixId: Schema.String.pipe(T.HttpPath("postfixId")),
1305
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1306
+ }).pipe(
1307
+ T.Http({
1308
+ method: "GET",
1309
+ path: "/accounts/{account_id}/email-security/investigate/{postfixId}/raw",
1310
+ }),
1311
+ ) as unknown as Schema.Schema<GetInvestigateRawRequest>;
1312
+
1313
+ export interface GetInvestigateRawResponse {
1314
+ /** A UTF-8 encoded eml file of the email. */
1315
+ raw: string;
1316
+ }
1317
+
1318
+ export const GetInvestigateRawResponse =
1319
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1320
+ raw: Schema.String,
1321
+ }) as unknown as Schema.Schema<GetInvestigateRawResponse>;
1322
+
1323
+ export type GetInvestigateRawError = DefaultErrors;
1324
+
1325
+ export const getInvestigateRaw: API.OperationMethod<
1326
+ GetInvestigateRawRequest,
1327
+ GetInvestigateRawResponse,
1328
+ GetInvestigateRawError,
1329
+ Credentials | HttpClient.HttpClient
1330
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1331
+ input: GetInvestigateRawRequest,
1332
+ output: GetInvestigateRawResponse,
1333
+ errors: [],
1334
+ }));
1335
+
1336
+ // =============================================================================
1337
+ // InvestigateReclassify
1338
+ // =============================================================================
1339
+
1340
+ export interface CreateInvestigateReclassifyRequest {
1341
+ postfixId: string;
1342
+ /** Path param: Account Identifier */
1343
+ accountId: string;
1344
+ /** Body param: */
1345
+ expectedDisposition:
1346
+ | "NONE"
1347
+ | "BULK"
1348
+ | "MALICIOUS"
1349
+ | "SPAM"
1350
+ | "SPOOF"
1351
+ | "SUSPICIOUS";
1352
+ /** Body param: Base64 encoded content of the EML file */
1353
+ emlContent?: string;
1354
+ /** Body param: */
1355
+ escalatedSubmissionId?: string;
1356
+ }
1357
+
1358
+ export const CreateInvestigateReclassifyRequest =
1359
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1360
+ postfixId: Schema.String.pipe(T.HttpPath("postfixId")),
1361
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1362
+ expectedDisposition: Schema.Literals([
1363
+ "NONE",
1364
+ "BULK",
1365
+ "MALICIOUS",
1366
+ "SPAM",
1367
+ "SPOOF",
1368
+ "SUSPICIOUS",
1369
+ ]),
1370
+ emlContent: Schema.optional(Schema.String),
1371
+ escalatedSubmissionId: Schema.optional(Schema.String),
1372
+ }).pipe(
1373
+ Schema.encodeKeys({
1374
+ expectedDisposition: "expected_disposition",
1375
+ emlContent: "eml_content",
1376
+ escalatedSubmissionId: "escalated_submission_id",
1377
+ }),
1378
+ T.Http({
1379
+ method: "POST",
1380
+ path: "/accounts/{account_id}/email-security/investigate/{postfixId}/reclassify",
1381
+ }),
1382
+ ) as unknown as Schema.Schema<CreateInvestigateReclassifyRequest>;
1383
+
1384
+ export type CreateInvestigateReclassifyResponse = unknown;
1385
+
1386
+ export const CreateInvestigateReclassifyResponse =
1387
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<CreateInvestigateReclassifyResponse>;
1388
+
1389
+ export type CreateInvestigateReclassifyError = DefaultErrors;
1390
+
1391
+ export const createInvestigateReclassify: API.OperationMethod<
1392
+ CreateInvestigateReclassifyRequest,
1393
+ CreateInvestigateReclassifyResponse,
1394
+ CreateInvestigateReclassifyError,
1395
+ Credentials | HttpClient.HttpClient
1396
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1397
+ input: CreateInvestigateReclassifyRequest,
1398
+ output: CreateInvestigateReclassifyResponse,
1399
+ errors: [],
1400
+ }));
1401
+
1402
+ // =============================================================================
1403
+ // InvestigateRelease
1404
+ // =============================================================================
1405
+
1406
+ export interface BulkInvestigateReleaseRequest {
1407
+ /** Path param: Account Identifier */
1408
+ accountId: string;
1409
+ /** Body param: A list of messages identfied by their `postfix_id`s that should be released. */
1410
+ body: string[];
1411
+ }
1412
+
1413
+ export const BulkInvestigateReleaseRequest =
1414
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1415
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1416
+ body: Schema.Array(Schema.String).pipe(T.HttpBody()),
1417
+ }).pipe(
1418
+ T.Http({
1419
+ method: "POST",
1420
+ path: "/accounts/{account_id}/email-security/investigate/release",
1421
+ }),
1422
+ ) as unknown as Schema.Schema<BulkInvestigateReleaseRequest>;
1423
+
1424
+ export type BulkInvestigateReleaseResponse = {
1425
+ postfixId: string;
1426
+ delivered?: string[] | null;
1427
+ failed?: string[] | null;
1428
+ undelivered?: string[] | null;
1429
+ }[];
1430
+
1431
+ export const BulkInvestigateReleaseResponse =
1432
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
1433
+ Schema.Struct({
1434
+ postfixId: Schema.String,
1435
+ delivered: Schema.optional(
1436
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1437
+ ),
1438
+ failed: Schema.optional(
1439
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1440
+ ),
1441
+ undelivered: Schema.optional(
1442
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1443
+ ),
1444
+ }).pipe(
1445
+ Schema.encodeKeys({
1446
+ postfixId: "postfix_id",
1447
+ delivered: "delivered",
1448
+ failed: "failed",
1449
+ undelivered: "undelivered",
1450
+ }),
1451
+ ),
1452
+ ) as unknown as Schema.Schema<BulkInvestigateReleaseResponse>;
1453
+
1454
+ export type BulkInvestigateReleaseError = DefaultErrors;
1455
+
1456
+ export const bulkInvestigateRelease: API.OperationMethod<
1457
+ BulkInvestigateReleaseRequest,
1458
+ BulkInvestigateReleaseResponse,
1459
+ BulkInvestigateReleaseError,
1460
+ Credentials | HttpClient.HttpClient
1461
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1462
+ input: BulkInvestigateReleaseRequest,
1463
+ output: BulkInvestigateReleaseResponse,
1464
+ errors: [],
1465
+ }));
1466
+
1467
+ // =============================================================================
1468
+ // InvestigateTrace
1469
+ // =============================================================================
1470
+
1471
+ export interface GetInvestigateTraceRequest {
1472
+ postfixId: string;
1473
+ /** Account Identifier */
1474
+ accountId: string;
1475
+ }
1476
+
1477
+ export const GetInvestigateTraceRequest =
1478
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1479
+ postfixId: Schema.String.pipe(T.HttpPath("postfixId")),
1480
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1481
+ }).pipe(
1482
+ T.Http({
1483
+ method: "GET",
1484
+ path: "/accounts/{account_id}/email-security/investigate/{postfixId}/trace",
1485
+ }),
1486
+ ) as unknown as Schema.Schema<GetInvestigateTraceRequest>;
1487
+
1488
+ export interface GetInvestigateTraceResponse {
1489
+ inbound: {
1490
+ lines?: { lineno: number; message: string; ts: string }[] | null;
1491
+ pending?: boolean | null;
1492
+ };
1493
+ outbound: {
1494
+ lines?: { lineno: number; message: string; ts: string }[] | null;
1495
+ pending?: boolean | null;
1496
+ };
1497
+ }
1498
+
1499
+ export const GetInvestigateTraceResponse =
1500
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1501
+ inbound: Schema.Struct({
1502
+ lines: Schema.optional(
1503
+ Schema.Union([
1504
+ Schema.Array(
1505
+ Schema.Struct({
1506
+ lineno: Schema.Number,
1507
+ message: Schema.String,
1508
+ ts: Schema.String,
1509
+ }),
1510
+ ),
1511
+ Schema.Null,
1512
+ ]),
1513
+ ),
1514
+ pending: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1515
+ }),
1516
+ outbound: Schema.Struct({
1517
+ lines: Schema.optional(
1518
+ Schema.Union([
1519
+ Schema.Array(
1520
+ Schema.Struct({
1521
+ lineno: Schema.Number,
1522
+ message: Schema.String,
1523
+ ts: Schema.String,
1524
+ }),
1525
+ ),
1526
+ Schema.Null,
1527
+ ]),
1528
+ ),
1529
+ pending: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1530
+ }),
1531
+ }) as unknown as Schema.Schema<GetInvestigateTraceResponse>;
1532
+
1533
+ export type GetInvestigateTraceError = DefaultErrors;
1534
+
1535
+ export const getInvestigateTrace: API.OperationMethod<
1536
+ GetInvestigateTraceRequest,
1537
+ GetInvestigateTraceResponse,
1538
+ GetInvestigateTraceError,
1539
+ Credentials | HttpClient.HttpClient
1540
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1541
+ input: GetInvestigateTraceRequest,
1542
+ output: GetInvestigateTraceResponse,
1543
+ errors: [],
1544
+ }));
1545
+
1546
+ // =============================================================================
1547
+ // SettingAllowPolicy
1548
+ // =============================================================================
1549
+
1550
+ export interface GetSettingAllowPolicyRequest {
1551
+ policyId: number;
1552
+ /** Account Identifier */
1553
+ accountId: string;
1554
+ }
1555
+
1556
+ export const GetSettingAllowPolicyRequest =
1557
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1558
+ policyId: Schema.Number.pipe(T.HttpPath("policyId")),
1559
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1560
+ }).pipe(
1561
+ T.Http({
1562
+ method: "GET",
1563
+ path: "/accounts/{account_id}/email-security/settings/allow_policies/{policyId}",
1564
+ }),
1565
+ ) as unknown as Schema.Schema<GetSettingAllowPolicyRequest>;
1566
+
1567
+ export interface GetSettingAllowPolicyResponse {
1568
+ /** The unique identifier for the allow policy. */
1569
+ id: number;
1570
+ createdAt: string;
1571
+ /** Messages from this sender will be exempted from Spam, Spoof and Bulk dispositions. Note: This will not exempt messages with Malicious or Suspicious dispositions. */
1572
+ isAcceptableSender: boolean;
1573
+ /** Messages to this recipient will bypass all detections. */
1574
+ isExemptRecipient: boolean;
1575
+ isRegex: boolean;
1576
+ /** Messages from this sender will bypass all detections and link following. */
1577
+ isTrustedSender: boolean;
1578
+ lastModified: string;
1579
+ pattern: string;
1580
+ patternType: "EMAIL" | "DOMAIN" | "IP" | "UNKNOWN";
1581
+ /** Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors policies that pass authentication. */
1582
+ verifySender: boolean;
1583
+ comments?: string | null;
1584
+ /** @deprecated */
1585
+ isRecipient?: boolean | null;
1586
+ /** @deprecated */
1587
+ isSender?: boolean | null;
1588
+ /** @deprecated */
1589
+ isSpoof?: boolean | null;
1590
+ }
1591
+
1592
+ export const GetSettingAllowPolicyResponse =
1593
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1594
+ id: Schema.Number,
1595
+ createdAt: Schema.String,
1596
+ isAcceptableSender: Schema.Boolean,
1597
+ isExemptRecipient: Schema.Boolean,
1598
+ isRegex: Schema.Boolean,
1599
+ isTrustedSender: Schema.Boolean,
1600
+ lastModified: Schema.String,
1601
+ pattern: Schema.String,
1602
+ patternType: Schema.Literals(["EMAIL", "DOMAIN", "IP", "UNKNOWN"]),
1603
+ verifySender: Schema.Boolean,
1604
+ comments: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1605
+ isRecipient: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1606
+ isSender: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1607
+ isSpoof: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1608
+ }).pipe(
1609
+ Schema.encodeKeys({
1610
+ id: "id",
1611
+ createdAt: "created_at",
1612
+ isAcceptableSender: "is_acceptable_sender",
1613
+ isExemptRecipient: "is_exempt_recipient",
1614
+ isRegex: "is_regex",
1615
+ isTrustedSender: "is_trusted_sender",
1616
+ lastModified: "last_modified",
1617
+ pattern: "pattern",
1618
+ patternType: "pattern_type",
1619
+ verifySender: "verify_sender",
1620
+ comments: "comments",
1621
+ isRecipient: "is_recipient",
1622
+ isSender: "is_sender",
1623
+ isSpoof: "is_spoof",
1624
+ }),
1625
+ ) as unknown as Schema.Schema<GetSettingAllowPolicyResponse>;
1626
+
1627
+ export type GetSettingAllowPolicyError = DefaultErrors;
1628
+
1629
+ export const getSettingAllowPolicy: API.OperationMethod<
1630
+ GetSettingAllowPolicyRequest,
1631
+ GetSettingAllowPolicyResponse,
1632
+ GetSettingAllowPolicyError,
1633
+ Credentials | HttpClient.HttpClient
1634
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1635
+ input: GetSettingAllowPolicyRequest,
1636
+ output: GetSettingAllowPolicyResponse,
1637
+ errors: [],
1638
+ }));
1639
+
1640
+ export interface ListSettingAllowPoliciesRequest {
1641
+ /** Path param: Account Identifier */
1642
+ accountId: string;
1643
+ /** Query param: The sorting direction. */
1644
+ direction?: "asc" | "desc";
1645
+ /** Query param: */
1646
+ isAcceptableSender?: boolean;
1647
+ /** Query param: */
1648
+ isExemptRecipient?: boolean;
1649
+ /** Query param: */
1650
+ isRecipient?: boolean;
1651
+ /** Query param: */
1652
+ isSender?: boolean;
1653
+ /** Query param: */
1654
+ isSpoof?: boolean;
1655
+ /** Query param: */
1656
+ isTrustedSender?: boolean;
1657
+ /** Query param: The field to sort by. */
1658
+ order?: "pattern" | "created_at";
1659
+ /** Query param: */
1660
+ pattern?: string;
1661
+ /** Query param: */
1662
+ patternType?: "EMAIL" | "DOMAIN" | "IP" | "UNKNOWN";
1663
+ /** Query param: Allows searching in multiple properties of a record simultaneously. This parameter is intended for human users, not automation. Its exact behavior is intentionally left unspecified and is */
1664
+ search?: string;
1665
+ /** Query param: */
1666
+ verifySender?: boolean;
1667
+ }
1668
+
1669
+ export const ListSettingAllowPoliciesRequest =
1670
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1671
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1672
+ direction: Schema.optional(Schema.Literals(["asc", "desc"])).pipe(
1673
+ T.HttpQuery("direction"),
1674
+ ),
1675
+ isAcceptableSender: Schema.optional(Schema.Boolean).pipe(
1676
+ T.HttpQuery("is_acceptable_sender"),
1677
+ ),
1678
+ isExemptRecipient: Schema.optional(Schema.Boolean).pipe(
1679
+ T.HttpQuery("is_exempt_recipient"),
1680
+ ),
1681
+ isRecipient: Schema.optional(Schema.Boolean).pipe(
1682
+ T.HttpQuery("is_recipient"),
1683
+ ),
1684
+ isSender: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("is_sender")),
1685
+ isSpoof: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("is_spoof")),
1686
+ isTrustedSender: Schema.optional(Schema.Boolean).pipe(
1687
+ T.HttpQuery("is_trusted_sender"),
1688
+ ),
1689
+ order: Schema.optional(Schema.Literals(["pattern", "created_at"])).pipe(
1690
+ T.HttpQuery("order"),
1691
+ ),
1692
+ pattern: Schema.optional(Schema.String).pipe(T.HttpQuery("pattern")),
1693
+ patternType: Schema.optional(
1694
+ Schema.Literals(["EMAIL", "DOMAIN", "IP", "UNKNOWN"]),
1695
+ ).pipe(T.HttpQuery("pattern_type")),
1696
+ search: Schema.optional(Schema.String).pipe(T.HttpQuery("search")),
1697
+ verifySender: Schema.optional(Schema.Boolean).pipe(
1698
+ T.HttpQuery("verify_sender"),
1699
+ ),
1700
+ }).pipe(
1701
+ T.Http({
1702
+ method: "GET",
1703
+ path: "/accounts/{account_id}/email-security/settings/allow_policies",
1704
+ }),
1705
+ ) as unknown as Schema.Schema<ListSettingAllowPoliciesRequest>;
1706
+
1707
+ export type ListSettingAllowPoliciesResponse = {
1708
+ id: number;
1709
+ createdAt: string;
1710
+ isAcceptableSender: boolean;
1711
+ isExemptRecipient: boolean;
1712
+ isRegex: boolean;
1713
+ isTrustedSender: boolean;
1714
+ lastModified: string;
1715
+ pattern: string;
1716
+ patternType: "EMAIL" | "DOMAIN" | "IP" | "UNKNOWN";
1717
+ verifySender: boolean;
1718
+ comments?: string | null;
1719
+ isRecipient?: boolean | null;
1720
+ isSender?: boolean | null;
1721
+ isSpoof?: boolean | null;
1722
+ }[];
1723
+
1724
+ export const ListSettingAllowPoliciesResponse =
1725
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
1726
+ Schema.Struct({
1727
+ id: Schema.Number,
1728
+ createdAt: Schema.String,
1729
+ isAcceptableSender: Schema.Boolean,
1730
+ isExemptRecipient: Schema.Boolean,
1731
+ isRegex: Schema.Boolean,
1732
+ isTrustedSender: Schema.Boolean,
1733
+ lastModified: Schema.String,
1734
+ pattern: Schema.String,
1735
+ patternType: Schema.Literals(["EMAIL", "DOMAIN", "IP", "UNKNOWN"]),
1736
+ verifySender: Schema.Boolean,
1737
+ comments: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1738
+ isRecipient: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1739
+ isSender: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1740
+ isSpoof: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1741
+ }).pipe(
1742
+ Schema.encodeKeys({
1743
+ id: "id",
1744
+ createdAt: "created_at",
1745
+ isAcceptableSender: "is_acceptable_sender",
1746
+ isExemptRecipient: "is_exempt_recipient",
1747
+ isRegex: "is_regex",
1748
+ isTrustedSender: "is_trusted_sender",
1749
+ lastModified: "last_modified",
1750
+ pattern: "pattern",
1751
+ patternType: "pattern_type",
1752
+ verifySender: "verify_sender",
1753
+ comments: "comments",
1754
+ isRecipient: "is_recipient",
1755
+ isSender: "is_sender",
1756
+ isSpoof: "is_spoof",
1757
+ }),
1758
+ ),
1759
+ ) as unknown as Schema.Schema<ListSettingAllowPoliciesResponse>;
1760
+
1761
+ export type ListSettingAllowPoliciesError = DefaultErrors;
1762
+
1763
+ export const listSettingAllowPolicies: API.OperationMethod<
1764
+ ListSettingAllowPoliciesRequest,
1765
+ ListSettingAllowPoliciesResponse,
1766
+ ListSettingAllowPoliciesError,
1767
+ Credentials | HttpClient.HttpClient
1768
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1769
+ input: ListSettingAllowPoliciesRequest,
1770
+ output: ListSettingAllowPoliciesResponse,
1771
+ errors: [],
1772
+ }));
1773
+
1774
+ export interface CreateSettingAllowPolicyRequest {
1775
+ /** Path param: Account Identifier */
1776
+ accountId: string;
1777
+ /** Body param: Messages from this sender will be exempted from Spam, Spoof and Bulk dispositions. Note: This will not exempt messages with Malicious or Suspicious dispositions. */
1778
+ isAcceptableSender: boolean;
1779
+ /** Body param: Messages to this recipient will bypass all detections. */
1780
+ isExemptRecipient: boolean;
1781
+ /** Body param: */
1782
+ isRegex: boolean;
1783
+ /** Body param: Messages from this sender will bypass all detections and link following. */
1784
+ isTrustedSender: boolean;
1785
+ /** Body param: */
1786
+ pattern: string;
1787
+ /** Body param: */
1788
+ patternType: "EMAIL" | "DOMAIN" | "IP" | "UNKNOWN";
1789
+ /** Body param: Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors policies that pass authentication. */
1790
+ verifySender: boolean;
1791
+ /** Body param: */
1792
+ comments?: string | null;
1793
+ /** @deprecated Body param: */
1794
+ isRecipient?: boolean;
1795
+ /** @deprecated Body param: */
1796
+ isSender?: boolean;
1797
+ /** @deprecated Body param: */
1798
+ isSpoof?: boolean;
1799
+ }
1800
+
1801
+ export const CreateSettingAllowPolicyRequest =
1802
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1803
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1804
+ isAcceptableSender: Schema.Boolean,
1805
+ isExemptRecipient: Schema.Boolean,
1806
+ isRegex: Schema.Boolean,
1807
+ isTrustedSender: Schema.Boolean,
1808
+ pattern: Schema.String,
1809
+ patternType: Schema.Literals(["EMAIL", "DOMAIN", "IP", "UNKNOWN"]),
1810
+ verifySender: Schema.Boolean,
1811
+ comments: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1812
+ isRecipient: Schema.optional(Schema.Boolean),
1813
+ isSender: Schema.optional(Schema.Boolean),
1814
+ isSpoof: Schema.optional(Schema.Boolean),
1815
+ }).pipe(
1816
+ Schema.encodeKeys({
1817
+ isAcceptableSender: "is_acceptable_sender",
1818
+ isExemptRecipient: "is_exempt_recipient",
1819
+ isRegex: "is_regex",
1820
+ isTrustedSender: "is_trusted_sender",
1821
+ pattern: "pattern",
1822
+ patternType: "pattern_type",
1823
+ verifySender: "verify_sender",
1824
+ comments: "comments",
1825
+ isRecipient: "is_recipient",
1826
+ isSender: "is_sender",
1827
+ isSpoof: "is_spoof",
1828
+ }),
1829
+ T.Http({
1830
+ method: "POST",
1831
+ path: "/accounts/{account_id}/email-security/settings/allow_policies",
1832
+ }),
1833
+ ) as unknown as Schema.Schema<CreateSettingAllowPolicyRequest>;
1834
+
1835
+ export interface CreateSettingAllowPolicyResponse {
1836
+ /** The unique identifier for the allow policy. */
1837
+ id: number;
1838
+ createdAt: string;
1839
+ /** Messages from this sender will be exempted from Spam, Spoof and Bulk dispositions. Note: This will not exempt messages with Malicious or Suspicious dispositions. */
1840
+ isAcceptableSender: boolean;
1841
+ /** Messages to this recipient will bypass all detections. */
1842
+ isExemptRecipient: boolean;
1843
+ isRegex: boolean;
1844
+ /** Messages from this sender will bypass all detections and link following. */
1845
+ isTrustedSender: boolean;
1846
+ lastModified: string;
1847
+ pattern: string;
1848
+ patternType: "EMAIL" | "DOMAIN" | "IP" | "UNKNOWN";
1849
+ /** Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors policies that pass authentication. */
1850
+ verifySender: boolean;
1851
+ comments?: string | null;
1852
+ /** @deprecated */
1853
+ isRecipient?: boolean | null;
1854
+ /** @deprecated */
1855
+ isSender?: boolean | null;
1856
+ /** @deprecated */
1857
+ isSpoof?: boolean | null;
1858
+ }
1859
+
1860
+ export const CreateSettingAllowPolicyResponse =
1861
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1862
+ id: Schema.Number,
1863
+ createdAt: Schema.String,
1864
+ isAcceptableSender: Schema.Boolean,
1865
+ isExemptRecipient: Schema.Boolean,
1866
+ isRegex: Schema.Boolean,
1867
+ isTrustedSender: Schema.Boolean,
1868
+ lastModified: Schema.String,
1869
+ pattern: Schema.String,
1870
+ patternType: Schema.Literals(["EMAIL", "DOMAIN", "IP", "UNKNOWN"]),
1871
+ verifySender: Schema.Boolean,
1872
+ comments: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1873
+ isRecipient: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1874
+ isSender: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1875
+ isSpoof: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1876
+ }).pipe(
1877
+ Schema.encodeKeys({
1878
+ id: "id",
1879
+ createdAt: "created_at",
1880
+ isAcceptableSender: "is_acceptable_sender",
1881
+ isExemptRecipient: "is_exempt_recipient",
1882
+ isRegex: "is_regex",
1883
+ isTrustedSender: "is_trusted_sender",
1884
+ lastModified: "last_modified",
1885
+ pattern: "pattern",
1886
+ patternType: "pattern_type",
1887
+ verifySender: "verify_sender",
1888
+ comments: "comments",
1889
+ isRecipient: "is_recipient",
1890
+ isSender: "is_sender",
1891
+ isSpoof: "is_spoof",
1892
+ }),
1893
+ ) as unknown as Schema.Schema<CreateSettingAllowPolicyResponse>;
1894
+
1895
+ export type CreateSettingAllowPolicyError = DefaultErrors;
1896
+
1897
+ export const createSettingAllowPolicy: API.OperationMethod<
1898
+ CreateSettingAllowPolicyRequest,
1899
+ CreateSettingAllowPolicyResponse,
1900
+ CreateSettingAllowPolicyError,
1901
+ Credentials | HttpClient.HttpClient
1902
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1903
+ input: CreateSettingAllowPolicyRequest,
1904
+ output: CreateSettingAllowPolicyResponse,
1905
+ errors: [],
1906
+ }));
1907
+
1908
+ export interface PatchSettingAllowPolicyRequest {
1909
+ policyId: number;
1910
+ /** Path param: Account Identifier */
1911
+ accountId: string;
1912
+ /** Body param: */
1913
+ comments?: string | null;
1914
+ /** Body param: Messages from this sender will be exempted from Spam, Spoof and Bulk dispositions. Note: This will not exempt messages with Malicious or Suspicious dispositions. */
1915
+ isAcceptableSender?: boolean | null;
1916
+ /** Body param: Messages to this recipient will bypass all detections. */
1917
+ isExemptRecipient?: boolean | null;
1918
+ /** Body param: */
1919
+ isRegex?: boolean | null;
1920
+ /** Body param: Messages from this sender will bypass all detections and link following. */
1921
+ isTrustedSender?: boolean | null;
1922
+ /** Body param: */
1923
+ pattern?: string | null;
1924
+ /** Body param: */
1925
+ patternType?: "EMAIL" | "DOMAIN" | "IP" | "UNKNOWN" | null;
1926
+ /** Body param: Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors policies that pass authentication. */
1927
+ verifySender?: boolean | null;
1928
+ }
1929
+
1930
+ export const PatchSettingAllowPolicyRequest =
1931
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1932
+ policyId: Schema.Number.pipe(T.HttpPath("policyId")),
1933
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1934
+ comments: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1935
+ isAcceptableSender: Schema.optional(
1936
+ Schema.Union([Schema.Boolean, Schema.Null]),
1937
+ ),
1938
+ isExemptRecipient: Schema.optional(
1939
+ Schema.Union([Schema.Boolean, Schema.Null]),
1940
+ ),
1941
+ isRegex: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1942
+ isTrustedSender: Schema.optional(
1943
+ Schema.Union([Schema.Boolean, Schema.Null]),
1944
+ ),
1945
+ pattern: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1946
+ patternType: Schema.optional(
1947
+ Schema.Union([
1948
+ Schema.Literal("EMAIL"),
1949
+ Schema.Literal("DOMAIN"),
1950
+ Schema.Literal("IP"),
1951
+ Schema.Literal("UNKNOWN"),
1952
+ Schema.Null,
1953
+ ]),
1954
+ ),
1955
+ verifySender: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1956
+ }).pipe(
1957
+ Schema.encodeKeys({
1958
+ comments: "comments",
1959
+ isAcceptableSender: "is_acceptable_sender",
1960
+ isExemptRecipient: "is_exempt_recipient",
1961
+ isRegex: "is_regex",
1962
+ isTrustedSender: "is_trusted_sender",
1963
+ pattern: "pattern",
1964
+ patternType: "pattern_type",
1965
+ verifySender: "verify_sender",
1966
+ }),
1967
+ T.Http({
1968
+ method: "PATCH",
1969
+ path: "/accounts/{account_id}/email-security/settings/allow_policies/{policyId}",
1970
+ }),
1971
+ ) as unknown as Schema.Schema<PatchSettingAllowPolicyRequest>;
1972
+
1973
+ export interface PatchSettingAllowPolicyResponse {
1974
+ /** The unique identifier for the allow policy. */
1975
+ id: number;
1976
+ createdAt: string;
1977
+ /** Messages from this sender will be exempted from Spam, Spoof and Bulk dispositions. Note: This will not exempt messages with Malicious or Suspicious dispositions. */
1978
+ isAcceptableSender: boolean;
1979
+ /** Messages to this recipient will bypass all detections. */
1980
+ isExemptRecipient: boolean;
1981
+ isRegex: boolean;
1982
+ /** Messages from this sender will bypass all detections and link following. */
1983
+ isTrustedSender: boolean;
1984
+ lastModified: string;
1985
+ pattern: string;
1986
+ patternType: "EMAIL" | "DOMAIN" | "IP" | "UNKNOWN";
1987
+ /** Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors policies that pass authentication. */
1988
+ verifySender: boolean;
1989
+ comments?: string | null;
1990
+ /** @deprecated */
1991
+ isRecipient?: boolean | null;
1992
+ /** @deprecated */
1993
+ isSender?: boolean | null;
1994
+ /** @deprecated */
1995
+ isSpoof?: boolean | null;
1996
+ }
1997
+
1998
+ export const PatchSettingAllowPolicyResponse =
1999
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2000
+ id: Schema.Number,
2001
+ createdAt: Schema.String,
2002
+ isAcceptableSender: Schema.Boolean,
2003
+ isExemptRecipient: Schema.Boolean,
2004
+ isRegex: Schema.Boolean,
2005
+ isTrustedSender: Schema.Boolean,
2006
+ lastModified: Schema.String,
2007
+ pattern: Schema.String,
2008
+ patternType: Schema.Literals(["EMAIL", "DOMAIN", "IP", "UNKNOWN"]),
2009
+ verifySender: Schema.Boolean,
2010
+ comments: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2011
+ isRecipient: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2012
+ isSender: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2013
+ isSpoof: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2014
+ }).pipe(
2015
+ Schema.encodeKeys({
2016
+ id: "id",
2017
+ createdAt: "created_at",
2018
+ isAcceptableSender: "is_acceptable_sender",
2019
+ isExemptRecipient: "is_exempt_recipient",
2020
+ isRegex: "is_regex",
2021
+ isTrustedSender: "is_trusted_sender",
2022
+ lastModified: "last_modified",
2023
+ pattern: "pattern",
2024
+ patternType: "pattern_type",
2025
+ verifySender: "verify_sender",
2026
+ comments: "comments",
2027
+ isRecipient: "is_recipient",
2028
+ isSender: "is_sender",
2029
+ isSpoof: "is_spoof",
2030
+ }),
2031
+ ) as unknown as Schema.Schema<PatchSettingAllowPolicyResponse>;
2032
+
2033
+ export type PatchSettingAllowPolicyError = DefaultErrors;
2034
+
2035
+ export const patchSettingAllowPolicy: API.OperationMethod<
2036
+ PatchSettingAllowPolicyRequest,
2037
+ PatchSettingAllowPolicyResponse,
2038
+ PatchSettingAllowPolicyError,
2039
+ Credentials | HttpClient.HttpClient
2040
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2041
+ input: PatchSettingAllowPolicyRequest,
2042
+ output: PatchSettingAllowPolicyResponse,
2043
+ errors: [],
2044
+ }));
2045
+
2046
+ export interface DeleteSettingAllowPolicyRequest {
2047
+ policyId: number;
2048
+ /** Account Identifier */
2049
+ accountId: string;
2050
+ }
2051
+
2052
+ export const DeleteSettingAllowPolicyRequest =
2053
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2054
+ policyId: Schema.Number.pipe(T.HttpPath("policyId")),
2055
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2056
+ }).pipe(
2057
+ T.Http({
2058
+ method: "DELETE",
2059
+ path: "/accounts/{account_id}/email-security/settings/allow_policies/{policyId}",
2060
+ }),
2061
+ ) as unknown as Schema.Schema<DeleteSettingAllowPolicyRequest>;
2062
+
2063
+ export interface DeleteSettingAllowPolicyResponse {
2064
+ /** The unique identifier for the allow policy. */
2065
+ id: number;
2066
+ }
2067
+
2068
+ export const DeleteSettingAllowPolicyResponse =
2069
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2070
+ id: Schema.Number,
2071
+ }) as unknown as Schema.Schema<DeleteSettingAllowPolicyResponse>;
2072
+
2073
+ export type DeleteSettingAllowPolicyError = DefaultErrors;
2074
+
2075
+ export const deleteSettingAllowPolicy: API.OperationMethod<
2076
+ DeleteSettingAllowPolicyRequest,
2077
+ DeleteSettingAllowPolicyResponse,
2078
+ DeleteSettingAllowPolicyError,
2079
+ Credentials | HttpClient.HttpClient
2080
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2081
+ input: DeleteSettingAllowPolicyRequest,
2082
+ output: DeleteSettingAllowPolicyResponse,
2083
+ errors: [],
2084
+ }));
2085
+
2086
+ // =============================================================================
2087
+ // SettingBlockSender
2088
+ // =============================================================================
2089
+
2090
+ export interface GetSettingBlockSenderRequest {
2091
+ patternId: number;
2092
+ /** Account Identifier */
2093
+ accountId: string;
2094
+ }
2095
+
2096
+ export const GetSettingBlockSenderRequest =
2097
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2098
+ patternId: Schema.Number.pipe(T.HttpPath("patternId")),
2099
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2100
+ }).pipe(
2101
+ T.Http({
2102
+ method: "GET",
2103
+ path: "/accounts/{account_id}/email-security/settings/block_senders/{patternId}",
2104
+ }),
2105
+ ) as unknown as Schema.Schema<GetSettingBlockSenderRequest>;
2106
+
2107
+ export interface GetSettingBlockSenderResponse {
2108
+ /** The unique identifier for the allow policy. */
2109
+ id: number;
2110
+ createdAt: string;
2111
+ isRegex: boolean;
2112
+ lastModified: string;
2113
+ pattern: string;
2114
+ patternType: "EMAIL" | "DOMAIN" | "IP" | "UNKNOWN";
2115
+ comments?: string | null;
2116
+ }
2117
+
2118
+ export const GetSettingBlockSenderResponse =
2119
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2120
+ id: Schema.Number,
2121
+ createdAt: Schema.String,
2122
+ isRegex: Schema.Boolean,
2123
+ lastModified: Schema.String,
2124
+ pattern: Schema.String,
2125
+ patternType: Schema.Literals(["EMAIL", "DOMAIN", "IP", "UNKNOWN"]),
2126
+ comments: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2127
+ }).pipe(
2128
+ Schema.encodeKeys({
2129
+ id: "id",
2130
+ createdAt: "created_at",
2131
+ isRegex: "is_regex",
2132
+ lastModified: "last_modified",
2133
+ pattern: "pattern",
2134
+ patternType: "pattern_type",
2135
+ comments: "comments",
2136
+ }),
2137
+ ) as unknown as Schema.Schema<GetSettingBlockSenderResponse>;
2138
+
2139
+ export type GetSettingBlockSenderError = DefaultErrors;
2140
+
2141
+ export const getSettingBlockSender: API.OperationMethod<
2142
+ GetSettingBlockSenderRequest,
2143
+ GetSettingBlockSenderResponse,
2144
+ GetSettingBlockSenderError,
2145
+ Credentials | HttpClient.HttpClient
2146
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2147
+ input: GetSettingBlockSenderRequest,
2148
+ output: GetSettingBlockSenderResponse,
2149
+ errors: [],
2150
+ }));
2151
+
2152
+ export interface ListSettingBlockSendersRequest {
2153
+ /** Path param: Account Identifier */
2154
+ accountId: string;
2155
+ /** Query param: The sorting direction. */
2156
+ direction?: "asc" | "desc";
2157
+ /** Query param: The field to sort by. */
2158
+ order?: "pattern" | "created_at";
2159
+ /** Query param: */
2160
+ pattern?: string;
2161
+ /** Query param: */
2162
+ patternType?: "EMAIL" | "DOMAIN" | "IP" | "UNKNOWN";
2163
+ /** Query param: Allows searching in multiple properties of a record simultaneously. This parameter is intended for human users, not automation. Its exact behavior is intentionally left unspecified and is */
2164
+ search?: string;
2165
+ }
2166
+
2167
+ export const ListSettingBlockSendersRequest =
2168
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2169
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2170
+ direction: Schema.optional(Schema.Literals(["asc", "desc"])).pipe(
2171
+ T.HttpQuery("direction"),
2172
+ ),
2173
+ order: Schema.optional(Schema.Literals(["pattern", "created_at"])).pipe(
2174
+ T.HttpQuery("order"),
2175
+ ),
2176
+ pattern: Schema.optional(Schema.String).pipe(T.HttpQuery("pattern")),
2177
+ patternType: Schema.optional(
2178
+ Schema.Literals(["EMAIL", "DOMAIN", "IP", "UNKNOWN"]),
2179
+ ).pipe(T.HttpQuery("pattern_type")),
2180
+ search: Schema.optional(Schema.String).pipe(T.HttpQuery("search")),
2181
+ }).pipe(
2182
+ T.Http({
2183
+ method: "GET",
2184
+ path: "/accounts/{account_id}/email-security/settings/block_senders",
2185
+ }),
2186
+ ) as unknown as Schema.Schema<ListSettingBlockSendersRequest>;
2187
+
2188
+ export type ListSettingBlockSendersResponse = {
2189
+ id: number;
2190
+ createdAt: string;
2191
+ isRegex: boolean;
2192
+ lastModified: string;
2193
+ pattern: string;
2194
+ patternType: "EMAIL" | "DOMAIN" | "IP" | "UNKNOWN";
2195
+ comments?: string | null;
2196
+ }[];
2197
+
2198
+ export const ListSettingBlockSendersResponse =
2199
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
2200
+ Schema.Struct({
2201
+ id: Schema.Number,
2202
+ createdAt: Schema.String,
2203
+ isRegex: Schema.Boolean,
2204
+ lastModified: Schema.String,
2205
+ pattern: Schema.String,
2206
+ patternType: Schema.Literals(["EMAIL", "DOMAIN", "IP", "UNKNOWN"]),
2207
+ comments: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2208
+ }).pipe(
2209
+ Schema.encodeKeys({
2210
+ id: "id",
2211
+ createdAt: "created_at",
2212
+ isRegex: "is_regex",
2213
+ lastModified: "last_modified",
2214
+ pattern: "pattern",
2215
+ patternType: "pattern_type",
2216
+ comments: "comments",
2217
+ }),
2218
+ ),
2219
+ ) as unknown as Schema.Schema<ListSettingBlockSendersResponse>;
2220
+
2221
+ export type ListSettingBlockSendersError = DefaultErrors;
2222
+
2223
+ export const listSettingBlockSenders: API.OperationMethod<
2224
+ ListSettingBlockSendersRequest,
2225
+ ListSettingBlockSendersResponse,
2226
+ ListSettingBlockSendersError,
2227
+ Credentials | HttpClient.HttpClient
2228
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2229
+ input: ListSettingBlockSendersRequest,
2230
+ output: ListSettingBlockSendersResponse,
2231
+ errors: [],
2232
+ }));
2233
+
2234
+ export interface CreateSettingBlockSenderRequest {
2235
+ /** Path param: Account Identifier */
2236
+ accountId: string;
2237
+ /** Body param: */
2238
+ isRegex: boolean;
2239
+ /** Body param: */
2240
+ pattern: string;
2241
+ /** Body param: */
2242
+ patternType: "EMAIL" | "DOMAIN" | "IP" | "UNKNOWN";
2243
+ /** Body param: */
2244
+ comments?: string | null;
2245
+ }
2246
+
2247
+ export const CreateSettingBlockSenderRequest =
2248
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2249
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2250
+ isRegex: Schema.Boolean,
2251
+ pattern: Schema.String,
2252
+ patternType: Schema.Literals(["EMAIL", "DOMAIN", "IP", "UNKNOWN"]),
2253
+ comments: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2254
+ }).pipe(
2255
+ Schema.encodeKeys({
2256
+ isRegex: "is_regex",
2257
+ pattern: "pattern",
2258
+ patternType: "pattern_type",
2259
+ comments: "comments",
2260
+ }),
2261
+ T.Http({
2262
+ method: "POST",
2263
+ path: "/accounts/{account_id}/email-security/settings/block_senders",
2264
+ }),
2265
+ ) as unknown as Schema.Schema<CreateSettingBlockSenderRequest>;
2266
+
2267
+ export interface CreateSettingBlockSenderResponse {
2268
+ /** The unique identifier for the allow policy. */
2269
+ id: number;
2270
+ createdAt: string;
2271
+ isRegex: boolean;
2272
+ lastModified: string;
2273
+ pattern: string;
2274
+ patternType: "EMAIL" | "DOMAIN" | "IP" | "UNKNOWN";
2275
+ comments?: string | null;
2276
+ }
2277
+
2278
+ export const CreateSettingBlockSenderResponse =
2279
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2280
+ id: Schema.Number,
2281
+ createdAt: Schema.String,
2282
+ isRegex: Schema.Boolean,
2283
+ lastModified: Schema.String,
2284
+ pattern: Schema.String,
2285
+ patternType: Schema.Literals(["EMAIL", "DOMAIN", "IP", "UNKNOWN"]),
2286
+ comments: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2287
+ }).pipe(
2288
+ Schema.encodeKeys({
2289
+ id: "id",
2290
+ createdAt: "created_at",
2291
+ isRegex: "is_regex",
2292
+ lastModified: "last_modified",
2293
+ pattern: "pattern",
2294
+ patternType: "pattern_type",
2295
+ comments: "comments",
2296
+ }),
2297
+ ) as unknown as Schema.Schema<CreateSettingBlockSenderResponse>;
2298
+
2299
+ export type CreateSettingBlockSenderError = DefaultErrors;
2300
+
2301
+ export const createSettingBlockSender: API.OperationMethod<
2302
+ CreateSettingBlockSenderRequest,
2303
+ CreateSettingBlockSenderResponse,
2304
+ CreateSettingBlockSenderError,
2305
+ Credentials | HttpClient.HttpClient
2306
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2307
+ input: CreateSettingBlockSenderRequest,
2308
+ output: CreateSettingBlockSenderResponse,
2309
+ errors: [],
2310
+ }));
2311
+
2312
+ export interface PatchSettingBlockSenderRequest {
2313
+ patternId: number;
2314
+ /** Path param: Account Identifier */
2315
+ accountId: string;
2316
+ /** Body param: */
2317
+ comments?: string | null;
2318
+ /** Body param: */
2319
+ isRegex?: boolean | null;
2320
+ /** Body param: */
2321
+ pattern?: string | null;
2322
+ /** Body param: */
2323
+ patternType?: "EMAIL" | "DOMAIN" | "IP" | "UNKNOWN" | null;
2324
+ }
2325
+
2326
+ export const PatchSettingBlockSenderRequest =
2327
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2328
+ patternId: Schema.Number.pipe(T.HttpPath("patternId")),
2329
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2330
+ comments: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2331
+ isRegex: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2332
+ pattern: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2333
+ patternType: Schema.optional(
2334
+ Schema.Union([
2335
+ Schema.Literal("EMAIL"),
2336
+ Schema.Literal("DOMAIN"),
2337
+ Schema.Literal("IP"),
2338
+ Schema.Literal("UNKNOWN"),
2339
+ Schema.Null,
2340
+ ]),
2341
+ ),
2342
+ }).pipe(
2343
+ Schema.encodeKeys({
2344
+ comments: "comments",
2345
+ isRegex: "is_regex",
2346
+ pattern: "pattern",
2347
+ patternType: "pattern_type",
2348
+ }),
2349
+ T.Http({
2350
+ method: "PATCH",
2351
+ path: "/accounts/{account_id}/email-security/settings/block_senders/{patternId}",
2352
+ }),
2353
+ ) as unknown as Schema.Schema<PatchSettingBlockSenderRequest>;
2354
+
2355
+ export interface PatchSettingBlockSenderResponse {
2356
+ /** The unique identifier for the allow policy. */
2357
+ id: number;
2358
+ createdAt: string;
2359
+ isRegex: boolean;
2360
+ lastModified: string;
2361
+ pattern: string;
2362
+ patternType: "EMAIL" | "DOMAIN" | "IP" | "UNKNOWN";
2363
+ comments?: string | null;
2364
+ }
2365
+
2366
+ export const PatchSettingBlockSenderResponse =
2367
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2368
+ id: Schema.Number,
2369
+ createdAt: Schema.String,
2370
+ isRegex: Schema.Boolean,
2371
+ lastModified: Schema.String,
2372
+ pattern: Schema.String,
2373
+ patternType: Schema.Literals(["EMAIL", "DOMAIN", "IP", "UNKNOWN"]),
2374
+ comments: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2375
+ }).pipe(
2376
+ Schema.encodeKeys({
2377
+ id: "id",
2378
+ createdAt: "created_at",
2379
+ isRegex: "is_regex",
2380
+ lastModified: "last_modified",
2381
+ pattern: "pattern",
2382
+ patternType: "pattern_type",
2383
+ comments: "comments",
2384
+ }),
2385
+ ) as unknown as Schema.Schema<PatchSettingBlockSenderResponse>;
2386
+
2387
+ export type PatchSettingBlockSenderError = DefaultErrors;
2388
+
2389
+ export const patchSettingBlockSender: API.OperationMethod<
2390
+ PatchSettingBlockSenderRequest,
2391
+ PatchSettingBlockSenderResponse,
2392
+ PatchSettingBlockSenderError,
2393
+ Credentials | HttpClient.HttpClient
2394
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2395
+ input: PatchSettingBlockSenderRequest,
2396
+ output: PatchSettingBlockSenderResponse,
2397
+ errors: [],
2398
+ }));
2399
+
2400
+ export interface DeleteSettingBlockSenderRequest {
2401
+ patternId: number;
2402
+ /** Account Identifier */
2403
+ accountId: string;
2404
+ }
2405
+
2406
+ export const DeleteSettingBlockSenderRequest =
2407
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2408
+ patternId: Schema.Number.pipe(T.HttpPath("patternId")),
2409
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2410
+ }).pipe(
2411
+ T.Http({
2412
+ method: "DELETE",
2413
+ path: "/accounts/{account_id}/email-security/settings/block_senders/{patternId}",
2414
+ }),
2415
+ ) as unknown as Schema.Schema<DeleteSettingBlockSenderRequest>;
2416
+
2417
+ export interface DeleteSettingBlockSenderResponse {
2418
+ /** The unique identifier for the allow policy. */
2419
+ id: number;
2420
+ }
2421
+
2422
+ export const DeleteSettingBlockSenderResponse =
2423
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2424
+ id: Schema.Number,
2425
+ }) as unknown as Schema.Schema<DeleteSettingBlockSenderResponse>;
2426
+
2427
+ export type DeleteSettingBlockSenderError = DefaultErrors;
2428
+
2429
+ export const deleteSettingBlockSender: API.OperationMethod<
2430
+ DeleteSettingBlockSenderRequest,
2431
+ DeleteSettingBlockSenderResponse,
2432
+ DeleteSettingBlockSenderError,
2433
+ Credentials | HttpClient.HttpClient
2434
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2435
+ input: DeleteSettingBlockSenderRequest,
2436
+ output: DeleteSettingBlockSenderResponse,
2437
+ errors: [],
2438
+ }));
2439
+
2440
+ // =============================================================================
2441
+ // SettingDomain
2442
+ // =============================================================================
2443
+
2444
+ export interface GetSettingDomainRequest {
2445
+ domainId: number;
2446
+ /** Account Identifier */
2447
+ accountId: string;
2448
+ }
2449
+
2450
+ export const GetSettingDomainRequest =
2451
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2452
+ domainId: Schema.Number.pipe(T.HttpPath("domainId")),
2453
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2454
+ }).pipe(
2455
+ T.Http({
2456
+ method: "GET",
2457
+ path: "/accounts/{account_id}/email-security/settings/domains/{domainId}",
2458
+ }),
2459
+ ) as unknown as Schema.Schema<GetSettingDomainRequest>;
2460
+
2461
+ export interface GetSettingDomainResponse {
2462
+ /** The unique identifier for the domain. */
2463
+ id: number;
2464
+ allowedDeliveryModes: ("DIRECT" | "BCC" | "JOURNAL" | "API" | "RETRO_SCAN")[];
2465
+ createdAt: string;
2466
+ domain: string;
2467
+ dropDispositions: (
2468
+ | "MALICIOUS"
2469
+ | "MALICIOUS-BEC"
2470
+ | "SUSPICIOUS"
2471
+ | "SPOOF"
2472
+ | "SPAM"
2473
+ | "BULK"
2474
+ | "ENCRYPTED"
2475
+ | "EXTERNAL"
2476
+ | "UNKNOWN"
2477
+ | "NONE"
2478
+ )[];
2479
+ ipRestrictions: string[];
2480
+ lastModified: string;
2481
+ lookbackHops: number;
2482
+ regions: ("GLOBAL" | "AU" | "DE" | "IN" | "US")[];
2483
+ transport: string;
2484
+ authorization?: {
2485
+ authorized: boolean;
2486
+ timestamp: string;
2487
+ statusMessage?: string | null;
2488
+ } | null;
2489
+ dmarcStatus?: "none" | "good" | "invalid" | null;
2490
+ emailsProcessed?: {
2491
+ timestamp: string;
2492
+ totalEmailsProcessed: number;
2493
+ totalEmailsProcessedPrevious: number;
2494
+ } | null;
2495
+ folder?: "AllItems" | "Inbox" | null;
2496
+ inboxProvider?: "Microsoft" | "Google" | null;
2497
+ integrationId?: string | null;
2498
+ o365TenantId?: string | null;
2499
+ requireTlsInbound?: boolean | null;
2500
+ requireTlsOutbound?: boolean | null;
2501
+ spfStatus?: "none" | "good" | "neutral" | "open" | "invalid" | null;
2502
+ }
2503
+
2504
+ export const GetSettingDomainResponse =
2505
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2506
+ id: Schema.Number,
2507
+ allowedDeliveryModes: Schema.Array(
2508
+ Schema.Literals(["DIRECT", "BCC", "JOURNAL", "API", "RETRO_SCAN"]),
2509
+ ),
2510
+ createdAt: Schema.String,
2511
+ domain: Schema.String,
2512
+ dropDispositions: Schema.Array(
2513
+ Schema.Literals([
2514
+ "MALICIOUS",
2515
+ "MALICIOUS-BEC",
2516
+ "SUSPICIOUS",
2517
+ "SPOOF",
2518
+ "SPAM",
2519
+ "BULK",
2520
+ "ENCRYPTED",
2521
+ "EXTERNAL",
2522
+ "UNKNOWN",
2523
+ "NONE",
2524
+ ]),
2525
+ ),
2526
+ ipRestrictions: Schema.Array(Schema.String),
2527
+ lastModified: Schema.String,
2528
+ lookbackHops: Schema.Number,
2529
+ regions: Schema.Array(Schema.Literals(["GLOBAL", "AU", "DE", "IN", "US"])),
2530
+ transport: Schema.String,
2531
+ authorization: Schema.optional(
2532
+ Schema.Union([
2533
+ Schema.Struct({
2534
+ authorized: Schema.Boolean,
2535
+ timestamp: Schema.String,
2536
+ statusMessage: Schema.optional(
2537
+ Schema.Union([Schema.String, Schema.Null]),
2538
+ ),
2539
+ }).pipe(
2540
+ Schema.encodeKeys({
2541
+ authorized: "authorized",
2542
+ timestamp: "timestamp",
2543
+ statusMessage: "status_message",
2544
+ }),
2545
+ ),
2546
+ Schema.Null,
2547
+ ]),
2548
+ ),
2549
+ dmarcStatus: Schema.optional(
2550
+ Schema.Union([
2551
+ Schema.Literal("none"),
2552
+ Schema.Literal("good"),
2553
+ Schema.Literal("invalid"),
2554
+ Schema.Null,
2555
+ ]),
2556
+ ),
2557
+ emailsProcessed: Schema.optional(
2558
+ Schema.Union([
2559
+ Schema.Struct({
2560
+ timestamp: Schema.String,
2561
+ totalEmailsProcessed: Schema.Number,
2562
+ totalEmailsProcessedPrevious: Schema.Number,
2563
+ }).pipe(
2564
+ Schema.encodeKeys({
2565
+ timestamp: "timestamp",
2566
+ totalEmailsProcessed: "total_emails_processed",
2567
+ totalEmailsProcessedPrevious: "total_emails_processed_previous",
2568
+ }),
2569
+ ),
2570
+ Schema.Null,
2571
+ ]),
2572
+ ),
2573
+ folder: Schema.optional(
2574
+ Schema.Union([
2575
+ Schema.Literal("AllItems"),
2576
+ Schema.Literal("Inbox"),
2577
+ Schema.Null,
2578
+ ]),
2579
+ ),
2580
+ inboxProvider: Schema.optional(
2581
+ Schema.Union([
2582
+ Schema.Literal("Microsoft"),
2583
+ Schema.Literal("Google"),
2584
+ Schema.Null,
2585
+ ]),
2586
+ ),
2587
+ integrationId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2588
+ o365TenantId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2589
+ requireTlsInbound: Schema.optional(
2590
+ Schema.Union([Schema.Boolean, Schema.Null]),
2591
+ ),
2592
+ requireTlsOutbound: Schema.optional(
2593
+ Schema.Union([Schema.Boolean, Schema.Null]),
2594
+ ),
2595
+ spfStatus: Schema.optional(
2596
+ Schema.Union([
2597
+ Schema.Literal("none"),
2598
+ Schema.Literal("good"),
2599
+ Schema.Literal("neutral"),
2600
+ Schema.Literal("open"),
2601
+ Schema.Literal("invalid"),
2602
+ Schema.Null,
2603
+ ]),
2604
+ ),
2605
+ }).pipe(
2606
+ Schema.encodeKeys({
2607
+ id: "id",
2608
+ allowedDeliveryModes: "allowed_delivery_modes",
2609
+ createdAt: "created_at",
2610
+ domain: "domain",
2611
+ dropDispositions: "drop_dispositions",
2612
+ ipRestrictions: "ip_restrictions",
2613
+ lastModified: "last_modified",
2614
+ lookbackHops: "lookback_hops",
2615
+ regions: "regions",
2616
+ transport: "transport",
2617
+ authorization: "authorization",
2618
+ dmarcStatus: "dmarc_status",
2619
+ emailsProcessed: "emails_processed",
2620
+ folder: "folder",
2621
+ inboxProvider: "inbox_provider",
2622
+ integrationId: "integration_id",
2623
+ o365TenantId: "o365_tenant_id",
2624
+ requireTlsInbound: "require_tls_inbound",
2625
+ requireTlsOutbound: "require_tls_outbound",
2626
+ spfStatus: "spf_status",
2627
+ }),
2628
+ ) as unknown as Schema.Schema<GetSettingDomainResponse>;
2629
+
2630
+ export type GetSettingDomainError = DefaultErrors;
2631
+
2632
+ export const getSettingDomain: API.OperationMethod<
2633
+ GetSettingDomainRequest,
2634
+ GetSettingDomainResponse,
2635
+ GetSettingDomainError,
2636
+ Credentials | HttpClient.HttpClient
2637
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2638
+ input: GetSettingDomainRequest,
2639
+ output: GetSettingDomainResponse,
2640
+ errors: [],
2641
+ }));
2642
+
2643
+ export interface ListSettingDomainsRequest {
2644
+ /** Path param: Account Identifier */
2645
+ accountId: string;
2646
+ /** Query param: Filters response to domains with the currently active delivery mode. */
2647
+ activeDeliveryMode?: "DIRECT" | "BCC" | "JOURNAL" | "API" | "RETRO_SCAN";
2648
+ /** Query param: Filters response to domains with the provided delivery mode. */
2649
+ allowedDeliveryMode?: "DIRECT" | "BCC" | "JOURNAL" | "API" | "RETRO_SCAN";
2650
+ /** Query param: The sorting direction. */
2651
+ direction?: "asc" | "desc";
2652
+ /** Query param: Filters results by the provided domains, allowing for multiple occurrences. */
2653
+ domain?: string[];
2654
+ /** Query param: Filters response to domains with the provided integration ID. */
2655
+ integrationId?: string;
2656
+ /** Query param: The field to sort by. */
2657
+ order?: "domain" | "created_at";
2658
+ /** Query param: Allows searching in multiple properties of a record simultaneously. This parameter is intended for human users, not automation. Its exact behavior is intentionally left unspecified and is */
2659
+ search?: string;
2660
+ }
2661
+
2662
+ export const ListSettingDomainsRequest =
2663
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2664
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2665
+ activeDeliveryMode: Schema.optional(
2666
+ Schema.Literals(["DIRECT", "BCC", "JOURNAL", "API", "RETRO_SCAN"]),
2667
+ ).pipe(T.HttpQuery("active_delivery_mode")),
2668
+ allowedDeliveryMode: Schema.optional(
2669
+ Schema.Literals(["DIRECT", "BCC", "JOURNAL", "API", "RETRO_SCAN"]),
2670
+ ).pipe(T.HttpQuery("allowed_delivery_mode")),
2671
+ direction: Schema.optional(Schema.Literals(["asc", "desc"])).pipe(
2672
+ T.HttpQuery("direction"),
2673
+ ),
2674
+ domain: Schema.optional(Schema.Array(Schema.String)).pipe(
2675
+ T.HttpQuery("domain"),
2676
+ ),
2677
+ integrationId: Schema.optional(Schema.String).pipe(
2678
+ T.HttpQuery("integration_id"),
2679
+ ),
2680
+ order: Schema.optional(Schema.Literals(["domain", "created_at"])).pipe(
2681
+ T.HttpQuery("order"),
2682
+ ),
2683
+ search: Schema.optional(Schema.String).pipe(T.HttpQuery("search")),
2684
+ }).pipe(
2685
+ T.Http({
2686
+ method: "GET",
2687
+ path: "/accounts/{account_id}/email-security/settings/domains",
2688
+ }),
2689
+ ) as unknown as Schema.Schema<ListSettingDomainsRequest>;
2690
+
2691
+ export type ListSettingDomainsResponse = {
2692
+ id: number;
2693
+ allowedDeliveryModes: ("DIRECT" | "BCC" | "JOURNAL" | "API" | "RETRO_SCAN")[];
2694
+ createdAt: string;
2695
+ domain: string;
2696
+ dropDispositions: (
2697
+ | "MALICIOUS"
2698
+ | "MALICIOUS-BEC"
2699
+ | "SUSPICIOUS"
2700
+ | "SPOOF"
2701
+ | "SPAM"
2702
+ | "BULK"
2703
+ | "ENCRYPTED"
2704
+ | "EXTERNAL"
2705
+ | "UNKNOWN"
2706
+ | "NONE"
2707
+ )[];
2708
+ ipRestrictions: string[];
2709
+ lastModified: string;
2710
+ lookbackHops: number;
2711
+ regions: ("GLOBAL" | "AU" | "DE" | "IN" | "US")[];
2712
+ transport: string;
2713
+ authorization?: {
2714
+ authorized: boolean;
2715
+ timestamp: string;
2716
+ statusMessage?: string | null;
2717
+ } | null;
2718
+ dmarcStatus?: "none" | "good" | "invalid" | null;
2719
+ emailsProcessed?: {
2720
+ timestamp: string;
2721
+ totalEmailsProcessed: number;
2722
+ totalEmailsProcessedPrevious: number;
2723
+ } | null;
2724
+ folder?: "AllItems" | "Inbox" | null;
2725
+ inboxProvider?: "Microsoft" | "Google" | null;
2726
+ integrationId?: string | null;
2727
+ o365TenantId?: string | null;
2728
+ requireTlsInbound?: boolean | null;
2729
+ requireTlsOutbound?: boolean | null;
2730
+ spfStatus?: "none" | "good" | "neutral" | "open" | "invalid" | null;
2731
+ }[];
2732
+
2733
+ export const ListSettingDomainsResponse =
2734
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
2735
+ Schema.Struct({
2736
+ id: Schema.Number,
2737
+ allowedDeliveryModes: Schema.Array(
2738
+ Schema.Literals(["DIRECT", "BCC", "JOURNAL", "API", "RETRO_SCAN"]),
2739
+ ),
2740
+ createdAt: Schema.String,
2741
+ domain: Schema.String,
2742
+ dropDispositions: Schema.Array(
2743
+ Schema.Literals([
2744
+ "MALICIOUS",
2745
+ "MALICIOUS-BEC",
2746
+ "SUSPICIOUS",
2747
+ "SPOOF",
2748
+ "SPAM",
2749
+ "BULK",
2750
+ "ENCRYPTED",
2751
+ "EXTERNAL",
2752
+ "UNKNOWN",
2753
+ "NONE",
2754
+ ]),
2755
+ ),
2756
+ ipRestrictions: Schema.Array(Schema.String),
2757
+ lastModified: Schema.String,
2758
+ lookbackHops: Schema.Number,
2759
+ regions: Schema.Array(
2760
+ Schema.Literals(["GLOBAL", "AU", "DE", "IN", "US"]),
2761
+ ),
2762
+ transport: Schema.String,
2763
+ authorization: Schema.optional(
2764
+ Schema.Union([
2765
+ Schema.Struct({
2766
+ authorized: Schema.Boolean,
2767
+ timestamp: Schema.String,
2768
+ statusMessage: Schema.optional(
2769
+ Schema.Union([Schema.String, Schema.Null]),
2770
+ ),
2771
+ }).pipe(
2772
+ Schema.encodeKeys({
2773
+ authorized: "authorized",
2774
+ timestamp: "timestamp",
2775
+ statusMessage: "status_message",
2776
+ }),
2777
+ ),
2778
+ Schema.Null,
2779
+ ]),
2780
+ ),
2781
+ dmarcStatus: Schema.optional(
2782
+ Schema.Union([
2783
+ Schema.Literal("none"),
2784
+ Schema.Literal("good"),
2785
+ Schema.Literal("invalid"),
2786
+ Schema.Null,
2787
+ ]),
2788
+ ),
2789
+ emailsProcessed: Schema.optional(
2790
+ Schema.Union([
2791
+ Schema.Struct({
2792
+ timestamp: Schema.String,
2793
+ totalEmailsProcessed: Schema.Number,
2794
+ totalEmailsProcessedPrevious: Schema.Number,
2795
+ }).pipe(
2796
+ Schema.encodeKeys({
2797
+ timestamp: "timestamp",
2798
+ totalEmailsProcessed: "total_emails_processed",
2799
+ totalEmailsProcessedPrevious: "total_emails_processed_previous",
2800
+ }),
2801
+ ),
2802
+ Schema.Null,
2803
+ ]),
2804
+ ),
2805
+ folder: Schema.optional(
2806
+ Schema.Union([
2807
+ Schema.Literal("AllItems"),
2808
+ Schema.Literal("Inbox"),
2809
+ Schema.Null,
2810
+ ]),
2811
+ ),
2812
+ inboxProvider: Schema.optional(
2813
+ Schema.Union([
2814
+ Schema.Literal("Microsoft"),
2815
+ Schema.Literal("Google"),
2816
+ Schema.Null,
2817
+ ]),
2818
+ ),
2819
+ integrationId: Schema.optional(
2820
+ Schema.Union([Schema.String, Schema.Null]),
2821
+ ),
2822
+ o365TenantId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2823
+ requireTlsInbound: Schema.optional(
2824
+ Schema.Union([Schema.Boolean, Schema.Null]),
2825
+ ),
2826
+ requireTlsOutbound: Schema.optional(
2827
+ Schema.Union([Schema.Boolean, Schema.Null]),
2828
+ ),
2829
+ spfStatus: Schema.optional(
2830
+ Schema.Union([
2831
+ Schema.Literal("none"),
2832
+ Schema.Literal("good"),
2833
+ Schema.Literal("neutral"),
2834
+ Schema.Literal("open"),
2835
+ Schema.Literal("invalid"),
2836
+ Schema.Null,
2837
+ ]),
2838
+ ),
2839
+ }).pipe(
2840
+ Schema.encodeKeys({
2841
+ id: "id",
2842
+ allowedDeliveryModes: "allowed_delivery_modes",
2843
+ createdAt: "created_at",
2844
+ domain: "domain",
2845
+ dropDispositions: "drop_dispositions",
2846
+ ipRestrictions: "ip_restrictions",
2847
+ lastModified: "last_modified",
2848
+ lookbackHops: "lookback_hops",
2849
+ regions: "regions",
2850
+ transport: "transport",
2851
+ authorization: "authorization",
2852
+ dmarcStatus: "dmarc_status",
2853
+ emailsProcessed: "emails_processed",
2854
+ folder: "folder",
2855
+ inboxProvider: "inbox_provider",
2856
+ integrationId: "integration_id",
2857
+ o365TenantId: "o365_tenant_id",
2858
+ requireTlsInbound: "require_tls_inbound",
2859
+ requireTlsOutbound: "require_tls_outbound",
2860
+ spfStatus: "spf_status",
2861
+ }),
2862
+ ),
2863
+ ) as unknown as Schema.Schema<ListSettingDomainsResponse>;
2864
+
2865
+ export type ListSettingDomainsError = DefaultErrors;
2866
+
2867
+ export const listSettingDomains: API.OperationMethod<
2868
+ ListSettingDomainsRequest,
2869
+ ListSettingDomainsResponse,
2870
+ ListSettingDomainsError,
2871
+ Credentials | HttpClient.HttpClient
2872
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2873
+ input: ListSettingDomainsRequest,
2874
+ output: ListSettingDomainsResponse,
2875
+ errors: [],
2876
+ }));
2877
+
2878
+ export interface PatchSettingDomainRequest {
2879
+ domainId: number;
2880
+ /** Path param: Account Identifier */
2881
+ accountId: string;
2882
+ /** Body param: */
2883
+ ipRestrictions: string[];
2884
+ /** Body param: */
2885
+ allowedDeliveryModes?: (
2886
+ | "DIRECT"
2887
+ | "BCC"
2888
+ | "JOURNAL"
2889
+ | "API"
2890
+ | "RETRO_SCAN"
2891
+ )[];
2892
+ /** Body param: */
2893
+ domain?: string;
2894
+ /** Body param: */
2895
+ dropDispositions?: (
2896
+ | "MALICIOUS"
2897
+ | "MALICIOUS-BEC"
2898
+ | "SUSPICIOUS"
2899
+ | "SPOOF"
2900
+ | "SPAM"
2901
+ | "BULK"
2902
+ | "ENCRYPTED"
2903
+ | "EXTERNAL"
2904
+ | "UNKNOWN"
2905
+ | "NONE"
2906
+ )[];
2907
+ /** Body param: */
2908
+ folder?: "AllItems" | "Inbox";
2909
+ /** Body param: */
2910
+ integrationId?: string;
2911
+ /** Body param: */
2912
+ lookbackHops?: number;
2913
+ /** Body param: */
2914
+ regions?: ("GLOBAL" | "AU" | "DE" | "IN" | "US")[];
2915
+ /** Body param: */
2916
+ requireTlsInbound?: boolean;
2917
+ /** Body param: */
2918
+ requireTlsOutbound?: boolean;
2919
+ /** Body param: */
2920
+ transport?: string;
2921
+ }
2922
+
2923
+ export const PatchSettingDomainRequest =
2924
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2925
+ domainId: Schema.Number.pipe(T.HttpPath("domainId")),
2926
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2927
+ ipRestrictions: Schema.Array(Schema.String),
2928
+ allowedDeliveryModes: Schema.optional(
2929
+ Schema.Array(
2930
+ Schema.Literals(["DIRECT", "BCC", "JOURNAL", "API", "RETRO_SCAN"]),
2931
+ ),
2932
+ ),
2933
+ domain: Schema.optional(Schema.String),
2934
+ dropDispositions: Schema.optional(
2935
+ Schema.Array(
2936
+ Schema.Literals([
2937
+ "MALICIOUS",
2938
+ "MALICIOUS-BEC",
2939
+ "SUSPICIOUS",
2940
+ "SPOOF",
2941
+ "SPAM",
2942
+ "BULK",
2943
+ "ENCRYPTED",
2944
+ "EXTERNAL",
2945
+ "UNKNOWN",
2946
+ "NONE",
2947
+ ]),
2948
+ ),
2949
+ ),
2950
+ folder: Schema.optional(Schema.Literals(["AllItems", "Inbox"])),
2951
+ integrationId: Schema.optional(Schema.String),
2952
+ lookbackHops: Schema.optional(Schema.Number),
2953
+ regions: Schema.optional(
2954
+ Schema.Array(Schema.Literals(["GLOBAL", "AU", "DE", "IN", "US"])),
2955
+ ),
2956
+ requireTlsInbound: Schema.optional(Schema.Boolean),
2957
+ requireTlsOutbound: Schema.optional(Schema.Boolean),
2958
+ transport: Schema.optional(Schema.String),
2959
+ }).pipe(
2960
+ Schema.encodeKeys({
2961
+ ipRestrictions: "ip_restrictions",
2962
+ allowedDeliveryModes: "allowed_delivery_modes",
2963
+ domain: "domain",
2964
+ dropDispositions: "drop_dispositions",
2965
+ folder: "folder",
2966
+ integrationId: "integration_id",
2967
+ lookbackHops: "lookback_hops",
2968
+ regions: "regions",
2969
+ requireTlsInbound: "require_tls_inbound",
2970
+ requireTlsOutbound: "require_tls_outbound",
2971
+ transport: "transport",
2972
+ }),
2973
+ T.Http({
2974
+ method: "PATCH",
2975
+ path: "/accounts/{account_id}/email-security/settings/domains/{domainId}",
2976
+ }),
2977
+ ) as unknown as Schema.Schema<PatchSettingDomainRequest>;
2978
+
2979
+ export interface PatchSettingDomainResponse {
2980
+ /** The unique identifier for the domain. */
2981
+ id: number;
2982
+ allowedDeliveryModes: ("DIRECT" | "BCC" | "JOURNAL" | "API" | "RETRO_SCAN")[];
2983
+ createdAt: string;
2984
+ domain: string;
2985
+ dropDispositions: (
2986
+ | "MALICIOUS"
2987
+ | "MALICIOUS-BEC"
2988
+ | "SUSPICIOUS"
2989
+ | "SPOOF"
2990
+ | "SPAM"
2991
+ | "BULK"
2992
+ | "ENCRYPTED"
2993
+ | "EXTERNAL"
2994
+ | "UNKNOWN"
2995
+ | "NONE"
2996
+ )[];
2997
+ ipRestrictions: string[];
2998
+ lastModified: string;
2999
+ lookbackHops: number;
3000
+ regions: ("GLOBAL" | "AU" | "DE" | "IN" | "US")[];
3001
+ transport: string;
3002
+ authorization?: {
3003
+ authorized: boolean;
3004
+ timestamp: string;
3005
+ statusMessage?: string | null;
3006
+ } | null;
3007
+ dmarcStatus?: "none" | "good" | "invalid" | null;
3008
+ emailsProcessed?: {
3009
+ timestamp: string;
3010
+ totalEmailsProcessed: number;
3011
+ totalEmailsProcessedPrevious: number;
3012
+ } | null;
3013
+ folder?: "AllItems" | "Inbox" | null;
3014
+ inboxProvider?: "Microsoft" | "Google" | null;
3015
+ integrationId?: string | null;
3016
+ o365TenantId?: string | null;
3017
+ requireTlsInbound?: boolean | null;
3018
+ requireTlsOutbound?: boolean | null;
3019
+ spfStatus?: "none" | "good" | "neutral" | "open" | "invalid" | null;
3020
+ }
3021
+
3022
+ export const PatchSettingDomainResponse =
3023
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3024
+ id: Schema.Number,
3025
+ allowedDeliveryModes: Schema.Array(
3026
+ Schema.Literals(["DIRECT", "BCC", "JOURNAL", "API", "RETRO_SCAN"]),
3027
+ ),
3028
+ createdAt: Schema.String,
3029
+ domain: Schema.String,
3030
+ dropDispositions: Schema.Array(
3031
+ Schema.Literals([
3032
+ "MALICIOUS",
3033
+ "MALICIOUS-BEC",
3034
+ "SUSPICIOUS",
3035
+ "SPOOF",
3036
+ "SPAM",
3037
+ "BULK",
3038
+ "ENCRYPTED",
3039
+ "EXTERNAL",
3040
+ "UNKNOWN",
3041
+ "NONE",
3042
+ ]),
3043
+ ),
3044
+ ipRestrictions: Schema.Array(Schema.String),
3045
+ lastModified: Schema.String,
3046
+ lookbackHops: Schema.Number,
3047
+ regions: Schema.Array(Schema.Literals(["GLOBAL", "AU", "DE", "IN", "US"])),
3048
+ transport: Schema.String,
3049
+ authorization: Schema.optional(
3050
+ Schema.Union([
3051
+ Schema.Struct({
3052
+ authorized: Schema.Boolean,
3053
+ timestamp: Schema.String,
3054
+ statusMessage: Schema.optional(
3055
+ Schema.Union([Schema.String, Schema.Null]),
3056
+ ),
3057
+ }).pipe(
3058
+ Schema.encodeKeys({
3059
+ authorized: "authorized",
3060
+ timestamp: "timestamp",
3061
+ statusMessage: "status_message",
3062
+ }),
3063
+ ),
3064
+ Schema.Null,
3065
+ ]),
3066
+ ),
3067
+ dmarcStatus: Schema.optional(
3068
+ Schema.Union([
3069
+ Schema.Literal("none"),
3070
+ Schema.Literal("good"),
3071
+ Schema.Literal("invalid"),
3072
+ Schema.Null,
3073
+ ]),
3074
+ ),
3075
+ emailsProcessed: Schema.optional(
3076
+ Schema.Union([
3077
+ Schema.Struct({
3078
+ timestamp: Schema.String,
3079
+ totalEmailsProcessed: Schema.Number,
3080
+ totalEmailsProcessedPrevious: Schema.Number,
3081
+ }).pipe(
3082
+ Schema.encodeKeys({
3083
+ timestamp: "timestamp",
3084
+ totalEmailsProcessed: "total_emails_processed",
3085
+ totalEmailsProcessedPrevious: "total_emails_processed_previous",
3086
+ }),
3087
+ ),
3088
+ Schema.Null,
3089
+ ]),
3090
+ ),
3091
+ folder: Schema.optional(
3092
+ Schema.Union([
3093
+ Schema.Literal("AllItems"),
3094
+ Schema.Literal("Inbox"),
3095
+ Schema.Null,
3096
+ ]),
3097
+ ),
3098
+ inboxProvider: Schema.optional(
3099
+ Schema.Union([
3100
+ Schema.Literal("Microsoft"),
3101
+ Schema.Literal("Google"),
3102
+ Schema.Null,
3103
+ ]),
3104
+ ),
3105
+ integrationId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3106
+ o365TenantId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3107
+ requireTlsInbound: Schema.optional(
3108
+ Schema.Union([Schema.Boolean, Schema.Null]),
3109
+ ),
3110
+ requireTlsOutbound: Schema.optional(
3111
+ Schema.Union([Schema.Boolean, Schema.Null]),
3112
+ ),
3113
+ spfStatus: Schema.optional(
3114
+ Schema.Union([
3115
+ Schema.Literal("none"),
3116
+ Schema.Literal("good"),
3117
+ Schema.Literal("neutral"),
3118
+ Schema.Literal("open"),
3119
+ Schema.Literal("invalid"),
3120
+ Schema.Null,
3121
+ ]),
3122
+ ),
3123
+ }).pipe(
3124
+ Schema.encodeKeys({
3125
+ id: "id",
3126
+ allowedDeliveryModes: "allowed_delivery_modes",
3127
+ createdAt: "created_at",
3128
+ domain: "domain",
3129
+ dropDispositions: "drop_dispositions",
3130
+ ipRestrictions: "ip_restrictions",
3131
+ lastModified: "last_modified",
3132
+ lookbackHops: "lookback_hops",
3133
+ regions: "regions",
3134
+ transport: "transport",
3135
+ authorization: "authorization",
3136
+ dmarcStatus: "dmarc_status",
3137
+ emailsProcessed: "emails_processed",
3138
+ folder: "folder",
3139
+ inboxProvider: "inbox_provider",
3140
+ integrationId: "integration_id",
3141
+ o365TenantId: "o365_tenant_id",
3142
+ requireTlsInbound: "require_tls_inbound",
3143
+ requireTlsOutbound: "require_tls_outbound",
3144
+ spfStatus: "spf_status",
3145
+ }),
3146
+ ) as unknown as Schema.Schema<PatchSettingDomainResponse>;
3147
+
3148
+ export type PatchSettingDomainError = DefaultErrors;
3149
+
3150
+ export const patchSettingDomain: API.OperationMethod<
3151
+ PatchSettingDomainRequest,
3152
+ PatchSettingDomainResponse,
3153
+ PatchSettingDomainError,
3154
+ Credentials | HttpClient.HttpClient
3155
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3156
+ input: PatchSettingDomainRequest,
3157
+ output: PatchSettingDomainResponse,
3158
+ errors: [],
3159
+ }));
3160
+
3161
+ export interface DeleteSettingDomainRequest {
3162
+ domainId: number;
3163
+ /** Account Identifier */
3164
+ accountId: string;
3165
+ }
3166
+
3167
+ export const DeleteSettingDomainRequest =
3168
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3169
+ domainId: Schema.Number.pipe(T.HttpPath("domainId")),
3170
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
3171
+ }).pipe(
3172
+ T.Http({
3173
+ method: "DELETE",
3174
+ path: "/accounts/{account_id}/email-security/settings/domains/{domainId}",
3175
+ }),
3176
+ ) as unknown as Schema.Schema<DeleteSettingDomainRequest>;
3177
+
3178
+ export interface DeleteSettingDomainResponse {
3179
+ /** The unique identifier for the domain. */
3180
+ id: number;
3181
+ }
3182
+
3183
+ export const DeleteSettingDomainResponse =
3184
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3185
+ id: Schema.Number,
3186
+ }) as unknown as Schema.Schema<DeleteSettingDomainResponse>;
3187
+
3188
+ export type DeleteSettingDomainError = DefaultErrors;
3189
+
3190
+ export const deleteSettingDomain: API.OperationMethod<
3191
+ DeleteSettingDomainRequest,
3192
+ DeleteSettingDomainResponse,
3193
+ DeleteSettingDomainError,
3194
+ Credentials | HttpClient.HttpClient
3195
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3196
+ input: DeleteSettingDomainRequest,
3197
+ output: DeleteSettingDomainResponse,
3198
+ errors: [],
3199
+ }));
3200
+
3201
+ export interface BulkDeleteSettingDomainsRequest {
3202
+ /** Account Identifier */
3203
+ accountId: string;
3204
+ }
3205
+
3206
+ export const BulkDeleteSettingDomainsRequest =
3207
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3208
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
3209
+ }).pipe(
3210
+ T.Http({
3211
+ method: "DELETE",
3212
+ path: "/accounts/{account_id}/email-security/settings/domains",
3213
+ }),
3214
+ ) as unknown as Schema.Schema<BulkDeleteSettingDomainsRequest>;
3215
+
3216
+ export type BulkDeleteSettingDomainsResponse = { id: number }[];
3217
+
3218
+ export const BulkDeleteSettingDomainsResponse =
3219
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
3220
+ Schema.Struct({
3221
+ id: Schema.Number,
3222
+ }),
3223
+ ) as unknown as Schema.Schema<BulkDeleteSettingDomainsResponse>;
3224
+
3225
+ export type BulkDeleteSettingDomainsError = DefaultErrors;
3226
+
3227
+ export const bulkDeleteSettingDomains: API.OperationMethod<
3228
+ BulkDeleteSettingDomainsRequest,
3229
+ BulkDeleteSettingDomainsResponse,
3230
+ BulkDeleteSettingDomainsError,
3231
+ Credentials | HttpClient.HttpClient
3232
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3233
+ input: BulkDeleteSettingDomainsRequest,
3234
+ output: BulkDeleteSettingDomainsResponse,
3235
+ errors: [],
3236
+ }));
3237
+
3238
+ // =============================================================================
3239
+ // SettingImpersonationRegistry
3240
+ // =============================================================================
3241
+
3242
+ export interface GetSettingImpersonationRegistryRequest {
3243
+ displayNameId: number;
3244
+ /** Account Identifier */
3245
+ accountId: string;
3246
+ }
3247
+
3248
+ export const GetSettingImpersonationRegistryRequest =
3249
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3250
+ displayNameId: Schema.Number.pipe(T.HttpPath("displayNameId")),
3251
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
3252
+ }).pipe(
3253
+ T.Http({
3254
+ method: "GET",
3255
+ path: "/accounts/{account_id}/email-security/settings/impersonation_registry/{displayNameId}",
3256
+ }),
3257
+ ) as unknown as Schema.Schema<GetSettingImpersonationRegistryRequest>;
3258
+
3259
+ export interface GetSettingImpersonationRegistryResponse {
3260
+ id: number;
3261
+ createdAt: string;
3262
+ email: string;
3263
+ isEmailRegex: boolean;
3264
+ lastModified: string;
3265
+ name: string;
3266
+ comments?: string | null;
3267
+ directoryId?: number | null;
3268
+ directoryNodeId?: number | null;
3269
+ /** @deprecated */
3270
+ externalDirectoryNodeId?: string | null;
3271
+ provenance?: string | null;
3272
+ }
3273
+
3274
+ export const GetSettingImpersonationRegistryResponse =
3275
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3276
+ id: Schema.Number,
3277
+ createdAt: Schema.String,
3278
+ email: Schema.String,
3279
+ isEmailRegex: Schema.Boolean,
3280
+ lastModified: Schema.String,
3281
+ name: Schema.String,
3282
+ comments: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3283
+ directoryId: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
3284
+ directoryNodeId: Schema.optional(
3285
+ Schema.Union([Schema.Number, Schema.Null]),
3286
+ ),
3287
+ externalDirectoryNodeId: Schema.optional(
3288
+ Schema.Union([Schema.String, Schema.Null]),
3289
+ ),
3290
+ provenance: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3291
+ }).pipe(
3292
+ Schema.encodeKeys({
3293
+ id: "id",
3294
+ createdAt: "created_at",
3295
+ email: "email",
3296
+ isEmailRegex: "is_email_regex",
3297
+ lastModified: "last_modified",
3298
+ name: "name",
3299
+ comments: "comments",
3300
+ directoryId: "directory_id",
3301
+ directoryNodeId: "directory_node_id",
3302
+ externalDirectoryNodeId: "external_directory_node_id",
3303
+ provenance: "provenance",
3304
+ }),
3305
+ ) as unknown as Schema.Schema<GetSettingImpersonationRegistryResponse>;
3306
+
3307
+ export type GetSettingImpersonationRegistryError = DefaultErrors;
3308
+
3309
+ export const getSettingImpersonationRegistry: API.OperationMethod<
3310
+ GetSettingImpersonationRegistryRequest,
3311
+ GetSettingImpersonationRegistryResponse,
3312
+ GetSettingImpersonationRegistryError,
3313
+ Credentials | HttpClient.HttpClient
3314
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3315
+ input: GetSettingImpersonationRegistryRequest,
3316
+ output: GetSettingImpersonationRegistryResponse,
3317
+ errors: [],
3318
+ }));
3319
+
3320
+ export interface ListSettingImpersonationRegistriesRequest {
3321
+ /** Path param: Account Identifier */
3322
+ accountId: string;
3323
+ /** Query param: The sorting direction. */
3324
+ direction?: "asc" | "desc";
3325
+ /** Query param: The field to sort by. */
3326
+ order?: "name" | "email" | "created_at";
3327
+ /** Query param: */
3328
+ provenance?:
3329
+ | "A1S_INTERNAL"
3330
+ | "SNOOPY-CASB_OFFICE_365"
3331
+ | "SNOOPY-OFFICE_365"
3332
+ | "SNOOPY-GOOGLE_DIRECTORY";
3333
+ /** Query param: Allows searching in multiple properties of a record simultaneously. This parameter is intended for human users, not automation. Its exact behavior is intentionally left unspecified and is */
3334
+ search?: string;
3335
+ }
3336
+
3337
+ export const ListSettingImpersonationRegistriesRequest =
3338
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3339
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
3340
+ direction: Schema.optional(Schema.Literals(["asc", "desc"])).pipe(
3341
+ T.HttpQuery("direction"),
3342
+ ),
3343
+ order: Schema.optional(
3344
+ Schema.Literals(["name", "email", "created_at"]),
3345
+ ).pipe(T.HttpQuery("order")),
3346
+ provenance: Schema.optional(
3347
+ Schema.Literals([
3348
+ "A1S_INTERNAL",
3349
+ "SNOOPY-CASB_OFFICE_365",
3350
+ "SNOOPY-OFFICE_365",
3351
+ "SNOOPY-GOOGLE_DIRECTORY",
3352
+ ]),
3353
+ ).pipe(T.HttpQuery("provenance")),
3354
+ search: Schema.optional(Schema.String).pipe(T.HttpQuery("search")),
3355
+ }).pipe(
3356
+ T.Http({
3357
+ method: "GET",
3358
+ path: "/accounts/{account_id}/email-security/settings/impersonation_registry",
3359
+ }),
3360
+ ) as unknown as Schema.Schema<ListSettingImpersonationRegistriesRequest>;
3361
+
3362
+ export type ListSettingImpersonationRegistriesResponse = {
3363
+ id: number;
3364
+ createdAt: string;
3365
+ email: string;
3366
+ isEmailRegex: boolean;
3367
+ lastModified: string;
3368
+ name: string;
3369
+ comments?: string | null;
3370
+ directoryId?: number | null;
3371
+ directoryNodeId?: number | null;
3372
+ externalDirectoryNodeId?: string | null;
3373
+ provenance?: string | null;
3374
+ }[];
3375
+
3376
+ export const ListSettingImpersonationRegistriesResponse =
3377
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
3378
+ Schema.Struct({
3379
+ id: Schema.Number,
3380
+ createdAt: Schema.String,
3381
+ email: Schema.String,
3382
+ isEmailRegex: Schema.Boolean,
3383
+ lastModified: Schema.String,
3384
+ name: Schema.String,
3385
+ comments: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3386
+ directoryId: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
3387
+ directoryNodeId: Schema.optional(
3388
+ Schema.Union([Schema.Number, Schema.Null]),
3389
+ ),
3390
+ externalDirectoryNodeId: Schema.optional(
3391
+ Schema.Union([Schema.String, Schema.Null]),
3392
+ ),
3393
+ provenance: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3394
+ }).pipe(
3395
+ Schema.encodeKeys({
3396
+ id: "id",
3397
+ createdAt: "created_at",
3398
+ email: "email",
3399
+ isEmailRegex: "is_email_regex",
3400
+ lastModified: "last_modified",
3401
+ name: "name",
3402
+ comments: "comments",
3403
+ directoryId: "directory_id",
3404
+ directoryNodeId: "directory_node_id",
3405
+ externalDirectoryNodeId: "external_directory_node_id",
3406
+ provenance: "provenance",
3407
+ }),
3408
+ ),
3409
+ ) as unknown as Schema.Schema<ListSettingImpersonationRegistriesResponse>;
3410
+
3411
+ export type ListSettingImpersonationRegistriesError = DefaultErrors;
3412
+
3413
+ export const listSettingImpersonationRegistries: API.OperationMethod<
3414
+ ListSettingImpersonationRegistriesRequest,
3415
+ ListSettingImpersonationRegistriesResponse,
3416
+ ListSettingImpersonationRegistriesError,
3417
+ Credentials | HttpClient.HttpClient
3418
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3419
+ input: ListSettingImpersonationRegistriesRequest,
3420
+ output: ListSettingImpersonationRegistriesResponse,
3421
+ errors: [],
3422
+ }));
3423
+
3424
+ export interface CreateSettingImpersonationRegistryRequest {
3425
+ /** Path param: Account Identifier */
3426
+ accountId: string;
3427
+ /** Body param: */
3428
+ email: string;
3429
+ /** Body param: */
3430
+ isEmailRegex: boolean;
3431
+ /** Body param: */
3432
+ name: string;
3433
+ }
3434
+
3435
+ export const CreateSettingImpersonationRegistryRequest =
3436
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3437
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
3438
+ email: Schema.String,
3439
+ isEmailRegex: Schema.Boolean,
3440
+ name: Schema.String,
3441
+ }).pipe(
3442
+ Schema.encodeKeys({
3443
+ email: "email",
3444
+ isEmailRegex: "is_email_regex",
3445
+ name: "name",
3446
+ }),
3447
+ T.Http({
3448
+ method: "POST",
3449
+ path: "/accounts/{account_id}/email-security/settings/impersonation_registry",
3450
+ }),
3451
+ ) as unknown as Schema.Schema<CreateSettingImpersonationRegistryRequest>;
3452
+
3453
+ export interface CreateSettingImpersonationRegistryResponse {
3454
+ id: number;
3455
+ createdAt: string;
3456
+ email: string;
3457
+ isEmailRegex: boolean;
3458
+ lastModified: string;
3459
+ name: string;
3460
+ comments?: string | null;
3461
+ directoryId?: number | null;
3462
+ directoryNodeId?: number | null;
3463
+ /** @deprecated */
3464
+ externalDirectoryNodeId?: string | null;
3465
+ provenance?: string | null;
3466
+ }
3467
+
3468
+ export const CreateSettingImpersonationRegistryResponse =
3469
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3470
+ id: Schema.Number,
3471
+ createdAt: Schema.String,
3472
+ email: Schema.String,
3473
+ isEmailRegex: Schema.Boolean,
3474
+ lastModified: Schema.String,
3475
+ name: Schema.String,
3476
+ comments: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3477
+ directoryId: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
3478
+ directoryNodeId: Schema.optional(
3479
+ Schema.Union([Schema.Number, Schema.Null]),
3480
+ ),
3481
+ externalDirectoryNodeId: Schema.optional(
3482
+ Schema.Union([Schema.String, Schema.Null]),
3483
+ ),
3484
+ provenance: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3485
+ }).pipe(
3486
+ Schema.encodeKeys({
3487
+ id: "id",
3488
+ createdAt: "created_at",
3489
+ email: "email",
3490
+ isEmailRegex: "is_email_regex",
3491
+ lastModified: "last_modified",
3492
+ name: "name",
3493
+ comments: "comments",
3494
+ directoryId: "directory_id",
3495
+ directoryNodeId: "directory_node_id",
3496
+ externalDirectoryNodeId: "external_directory_node_id",
3497
+ provenance: "provenance",
3498
+ }),
3499
+ ) as unknown as Schema.Schema<CreateSettingImpersonationRegistryResponse>;
3500
+
3501
+ export type CreateSettingImpersonationRegistryError = DefaultErrors;
3502
+
3503
+ export const createSettingImpersonationRegistry: API.OperationMethod<
3504
+ CreateSettingImpersonationRegistryRequest,
3505
+ CreateSettingImpersonationRegistryResponse,
3506
+ CreateSettingImpersonationRegistryError,
3507
+ Credentials | HttpClient.HttpClient
3508
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3509
+ input: CreateSettingImpersonationRegistryRequest,
3510
+ output: CreateSettingImpersonationRegistryResponse,
3511
+ errors: [],
3512
+ }));
3513
+
3514
+ export interface PatchSettingImpersonationRegistryRequest {
3515
+ displayNameId: number;
3516
+ /** Path param: Account Identifier */
3517
+ accountId: string;
3518
+ /** Body param: */
3519
+ email?: string | null;
3520
+ /** Body param: */
3521
+ isEmailRegex?: boolean | null;
3522
+ /** Body param: */
3523
+ name?: string | null;
3524
+ }
3525
+
3526
+ export const PatchSettingImpersonationRegistryRequest =
3527
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3528
+ displayNameId: Schema.Number.pipe(T.HttpPath("displayNameId")),
3529
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
3530
+ email: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3531
+ isEmailRegex: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
3532
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3533
+ }).pipe(
3534
+ Schema.encodeKeys({
3535
+ email: "email",
3536
+ isEmailRegex: "is_email_regex",
3537
+ name: "name",
3538
+ }),
3539
+ T.Http({
3540
+ method: "PATCH",
3541
+ path: "/accounts/{account_id}/email-security/settings/impersonation_registry/{displayNameId}",
3542
+ }),
3543
+ ) as unknown as Schema.Schema<PatchSettingImpersonationRegistryRequest>;
3544
+
3545
+ export interface PatchSettingImpersonationRegistryResponse {
3546
+ id: number;
3547
+ createdAt: string;
3548
+ email: string;
3549
+ isEmailRegex: boolean;
3550
+ lastModified: string;
3551
+ name: string;
3552
+ comments?: string | null;
3553
+ directoryId?: number | null;
3554
+ directoryNodeId?: number | null;
3555
+ /** @deprecated */
3556
+ externalDirectoryNodeId?: string | null;
3557
+ provenance?: string | null;
3558
+ }
3559
+
3560
+ export const PatchSettingImpersonationRegistryResponse =
3561
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3562
+ id: Schema.Number,
3563
+ createdAt: Schema.String,
3564
+ email: Schema.String,
3565
+ isEmailRegex: Schema.Boolean,
3566
+ lastModified: Schema.String,
3567
+ name: Schema.String,
3568
+ comments: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3569
+ directoryId: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
3570
+ directoryNodeId: Schema.optional(
3571
+ Schema.Union([Schema.Number, Schema.Null]),
3572
+ ),
3573
+ externalDirectoryNodeId: Schema.optional(
3574
+ Schema.Union([Schema.String, Schema.Null]),
3575
+ ),
3576
+ provenance: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3577
+ }).pipe(
3578
+ Schema.encodeKeys({
3579
+ id: "id",
3580
+ createdAt: "created_at",
3581
+ email: "email",
3582
+ isEmailRegex: "is_email_regex",
3583
+ lastModified: "last_modified",
3584
+ name: "name",
3585
+ comments: "comments",
3586
+ directoryId: "directory_id",
3587
+ directoryNodeId: "directory_node_id",
3588
+ externalDirectoryNodeId: "external_directory_node_id",
3589
+ provenance: "provenance",
3590
+ }),
3591
+ ) as unknown as Schema.Schema<PatchSettingImpersonationRegistryResponse>;
3592
+
3593
+ export type PatchSettingImpersonationRegistryError = DefaultErrors;
3594
+
3595
+ export const patchSettingImpersonationRegistry: API.OperationMethod<
3596
+ PatchSettingImpersonationRegistryRequest,
3597
+ PatchSettingImpersonationRegistryResponse,
3598
+ PatchSettingImpersonationRegistryError,
3599
+ Credentials | HttpClient.HttpClient
3600
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3601
+ input: PatchSettingImpersonationRegistryRequest,
3602
+ output: PatchSettingImpersonationRegistryResponse,
3603
+ errors: [],
3604
+ }));
3605
+
3606
+ export interface DeleteSettingImpersonationRegistryRequest {
3607
+ displayNameId: number;
3608
+ /** Account Identifier */
3609
+ accountId: string;
3610
+ }
3611
+
3612
+ export const DeleteSettingImpersonationRegistryRequest =
3613
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3614
+ displayNameId: Schema.Number.pipe(T.HttpPath("displayNameId")),
3615
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
3616
+ }).pipe(
3617
+ T.Http({
3618
+ method: "DELETE",
3619
+ path: "/accounts/{account_id}/email-security/settings/impersonation_registry/{displayNameId}",
3620
+ }),
3621
+ ) as unknown as Schema.Schema<DeleteSettingImpersonationRegistryRequest>;
3622
+
3623
+ export interface DeleteSettingImpersonationRegistryResponse {
3624
+ id: number;
3625
+ }
3626
+
3627
+ export const DeleteSettingImpersonationRegistryResponse =
3628
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3629
+ id: Schema.Number,
3630
+ }) as unknown as Schema.Schema<DeleteSettingImpersonationRegistryResponse>;
3631
+
3632
+ export type DeleteSettingImpersonationRegistryError = DefaultErrors;
3633
+
3634
+ export const deleteSettingImpersonationRegistry: API.OperationMethod<
3635
+ DeleteSettingImpersonationRegistryRequest,
3636
+ DeleteSettingImpersonationRegistryResponse,
3637
+ DeleteSettingImpersonationRegistryError,
3638
+ Credentials | HttpClient.HttpClient
3639
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3640
+ input: DeleteSettingImpersonationRegistryRequest,
3641
+ output: DeleteSettingImpersonationRegistryResponse,
3642
+ errors: [],
3643
+ }));
3644
+
3645
+ // =============================================================================
3646
+ // SettingTrustedDomain
3647
+ // =============================================================================
3648
+
3649
+ export interface GetSettingTrustedDomainRequest {
3650
+ trustedDomainId: number;
3651
+ /** Account Identifier */
3652
+ accountId: string;
3653
+ }
3654
+
3655
+ export const GetSettingTrustedDomainRequest =
3656
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3657
+ trustedDomainId: Schema.Number.pipe(T.HttpPath("trustedDomainId")),
3658
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
3659
+ }).pipe(
3660
+ T.Http({
3661
+ method: "GET",
3662
+ path: "/accounts/{account_id}/email-security/settings/trusted_domains/{trustedDomainId}",
3663
+ }),
3664
+ ) as unknown as Schema.Schema<GetSettingTrustedDomainRequest>;
3665
+
3666
+ export interface GetSettingTrustedDomainResponse {
3667
+ /** The unique identifier for the trusted domain. */
3668
+ id: number;
3669
+ createdAt: string;
3670
+ /** Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition. */
3671
+ isRecent: boolean;
3672
+ isRegex: boolean;
3673
+ /** Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition. */
3674
+ isSimilarity: boolean;
3675
+ lastModified: string;
3676
+ pattern: string;
3677
+ comments?: string | null;
3678
+ }
3679
+
3680
+ export const GetSettingTrustedDomainResponse =
3681
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3682
+ id: Schema.Number,
3683
+ createdAt: Schema.String,
3684
+ isRecent: Schema.Boolean,
3685
+ isRegex: Schema.Boolean,
3686
+ isSimilarity: Schema.Boolean,
3687
+ lastModified: Schema.String,
3688
+ pattern: Schema.String,
3689
+ comments: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3690
+ }).pipe(
3691
+ Schema.encodeKeys({
3692
+ id: "id",
3693
+ createdAt: "created_at",
3694
+ isRecent: "is_recent",
3695
+ isRegex: "is_regex",
3696
+ isSimilarity: "is_similarity",
3697
+ lastModified: "last_modified",
3698
+ pattern: "pattern",
3699
+ comments: "comments",
3700
+ }),
3701
+ ) as unknown as Schema.Schema<GetSettingTrustedDomainResponse>;
3702
+
3703
+ export type GetSettingTrustedDomainError = DefaultErrors;
3704
+
3705
+ export const getSettingTrustedDomain: API.OperationMethod<
3706
+ GetSettingTrustedDomainRequest,
3707
+ GetSettingTrustedDomainResponse,
3708
+ GetSettingTrustedDomainError,
3709
+ Credentials | HttpClient.HttpClient
3710
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3711
+ input: GetSettingTrustedDomainRequest,
3712
+ output: GetSettingTrustedDomainResponse,
3713
+ errors: [],
3714
+ }));
3715
+
3716
+ export interface ListSettingTrustedDomainsRequest {
3717
+ /** Path param: Account Identifier */
3718
+ accountId: string;
3719
+ /** Query param: The sorting direction. */
3720
+ direction?: "asc" | "desc";
3721
+ /** Query param: */
3722
+ isRecent?: boolean;
3723
+ /** Query param: */
3724
+ isSimilarity?: boolean;
3725
+ /** Query param: The field to sort by. */
3726
+ order?: "pattern" | "created_at";
3727
+ /** Query param: */
3728
+ pattern?: string;
3729
+ /** Query param: Allows searching in multiple properties of a record simultaneously. This parameter is intended for human users, not automation. Its exact behavior is intentionally left unspecified and is */
3730
+ search?: string;
3731
+ }
3732
+
3733
+ export const ListSettingTrustedDomainsRequest =
3734
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3735
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
3736
+ direction: Schema.optional(Schema.Literals(["asc", "desc"])).pipe(
3737
+ T.HttpQuery("direction"),
3738
+ ),
3739
+ isRecent: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("is_recent")),
3740
+ isSimilarity: Schema.optional(Schema.Boolean).pipe(
3741
+ T.HttpQuery("is_similarity"),
3742
+ ),
3743
+ order: Schema.optional(Schema.Literals(["pattern", "created_at"])).pipe(
3744
+ T.HttpQuery("order"),
3745
+ ),
3746
+ pattern: Schema.optional(Schema.String).pipe(T.HttpQuery("pattern")),
3747
+ search: Schema.optional(Schema.String).pipe(T.HttpQuery("search")),
3748
+ }).pipe(
3749
+ T.Http({
3750
+ method: "GET",
3751
+ path: "/accounts/{account_id}/email-security/settings/trusted_domains",
3752
+ }),
3753
+ ) as unknown as Schema.Schema<ListSettingTrustedDomainsRequest>;
3754
+
3755
+ export type ListSettingTrustedDomainsResponse = {
3756
+ id: number;
3757
+ createdAt: string;
3758
+ isRecent: boolean;
3759
+ isRegex: boolean;
3760
+ isSimilarity: boolean;
3761
+ lastModified: string;
3762
+ pattern: string;
3763
+ comments?: string | null;
3764
+ }[];
3765
+
3766
+ export const ListSettingTrustedDomainsResponse =
3767
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
3768
+ Schema.Struct({
3769
+ id: Schema.Number,
3770
+ createdAt: Schema.String,
3771
+ isRecent: Schema.Boolean,
3772
+ isRegex: Schema.Boolean,
3773
+ isSimilarity: Schema.Boolean,
3774
+ lastModified: Schema.String,
3775
+ pattern: Schema.String,
3776
+ comments: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3777
+ }).pipe(
3778
+ Schema.encodeKeys({
3779
+ id: "id",
3780
+ createdAt: "created_at",
3781
+ isRecent: "is_recent",
3782
+ isRegex: "is_regex",
3783
+ isSimilarity: "is_similarity",
3784
+ lastModified: "last_modified",
3785
+ pattern: "pattern",
3786
+ comments: "comments",
3787
+ }),
3788
+ ),
3789
+ ) as unknown as Schema.Schema<ListSettingTrustedDomainsResponse>;
3790
+
3791
+ export type ListSettingTrustedDomainsError = DefaultErrors;
3792
+
3793
+ export const listSettingTrustedDomains: API.OperationMethod<
3794
+ ListSettingTrustedDomainsRequest,
3795
+ ListSettingTrustedDomainsResponse,
3796
+ ListSettingTrustedDomainsError,
3797
+ Credentials | HttpClient.HttpClient
3798
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3799
+ input: ListSettingTrustedDomainsRequest,
3800
+ output: ListSettingTrustedDomainsResponse,
3801
+ errors: [],
3802
+ }));
3803
+
3804
+ export interface CreateSettingTrustedDomainRequest {
3805
+ /** Path param: Account Identifier */
3806
+ accountId: string;
3807
+ /** Body param: Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition. */
3808
+ isRecent: boolean;
3809
+ /** Body param: */
3810
+ isRegex: boolean;
3811
+ /** Body param: Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition. */
3812
+ isSimilarity: boolean;
3813
+ /** Body param: */
3814
+ pattern: string;
3815
+ /** Body param: */
3816
+ comments?: string | null;
3817
+ }
3818
+
3819
+ export const CreateSettingTrustedDomainRequest =
3820
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3821
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
3822
+ isRecent: Schema.Boolean,
3823
+ isRegex: Schema.Boolean,
3824
+ isSimilarity: Schema.Boolean,
3825
+ pattern: Schema.String,
3826
+ comments: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3827
+ }).pipe(
3828
+ Schema.encodeKeys({
3829
+ isRecent: "is_recent",
3830
+ isRegex: "is_regex",
3831
+ isSimilarity: "is_similarity",
3832
+ pattern: "pattern",
3833
+ comments: "comments",
3834
+ }),
3835
+ T.Http({
3836
+ method: "POST",
3837
+ path: "/accounts/{account_id}/email-security/settings/trusted_domains",
3838
+ }),
3839
+ ) as unknown as Schema.Schema<CreateSettingTrustedDomainRequest>;
3840
+
3841
+ export type CreateSettingTrustedDomainResponse =
3842
+ | {
3843
+ id: number;
3844
+ createdAt: string;
3845
+ isRecent: boolean;
3846
+ isRegex: boolean;
3847
+ isSimilarity: boolean;
3848
+ lastModified: string;
3849
+ pattern: string;
3850
+ comments?: string | null;
3851
+ }
3852
+ | {
3853
+ id: number;
3854
+ createdAt: string;
3855
+ isRecent: boolean;
3856
+ isRegex: boolean;
3857
+ isSimilarity: boolean;
3858
+ lastModified: string;
3859
+ pattern: string;
3860
+ comments?: string | null;
3861
+ }[];
3862
+
3863
+ export const CreateSettingTrustedDomainResponse =
3864
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Union([
3865
+ Schema.Struct({
3866
+ id: Schema.Number,
3867
+ createdAt: Schema.String,
3868
+ isRecent: Schema.Boolean,
3869
+ isRegex: Schema.Boolean,
3870
+ isSimilarity: Schema.Boolean,
3871
+ lastModified: Schema.String,
3872
+ pattern: Schema.String,
3873
+ comments: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3874
+ }).pipe(
3875
+ Schema.encodeKeys({
3876
+ id: "id",
3877
+ createdAt: "created_at",
3878
+ isRecent: "is_recent",
3879
+ isRegex: "is_regex",
3880
+ isSimilarity: "is_similarity",
3881
+ lastModified: "last_modified",
3882
+ pattern: "pattern",
3883
+ comments: "comments",
3884
+ }),
3885
+ ),
3886
+ Schema.Array(
3887
+ Schema.Struct({
3888
+ id: Schema.Number,
3889
+ createdAt: Schema.String,
3890
+ isRecent: Schema.Boolean,
3891
+ isRegex: Schema.Boolean,
3892
+ isSimilarity: Schema.Boolean,
3893
+ lastModified: Schema.String,
3894
+ pattern: Schema.String,
3895
+ comments: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3896
+ }).pipe(
3897
+ Schema.encodeKeys({
3898
+ id: "id",
3899
+ createdAt: "created_at",
3900
+ isRecent: "is_recent",
3901
+ isRegex: "is_regex",
3902
+ isSimilarity: "is_similarity",
3903
+ lastModified: "last_modified",
3904
+ pattern: "pattern",
3905
+ comments: "comments",
3906
+ }),
3907
+ ),
3908
+ ),
3909
+ ]) as unknown as Schema.Schema<CreateSettingTrustedDomainResponse>;
3910
+
3911
+ export type CreateSettingTrustedDomainError = DefaultErrors;
3912
+
3913
+ export const createSettingTrustedDomain: API.OperationMethod<
3914
+ CreateSettingTrustedDomainRequest,
3915
+ CreateSettingTrustedDomainResponse,
3916
+ CreateSettingTrustedDomainError,
3917
+ Credentials | HttpClient.HttpClient
3918
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3919
+ input: CreateSettingTrustedDomainRequest,
3920
+ output: CreateSettingTrustedDomainResponse,
3921
+ errors: [],
3922
+ }));
3923
+
3924
+ export interface PatchSettingTrustedDomainRequest {
3925
+ trustedDomainId: number;
3926
+ /** Path param: Account Identifier */
3927
+ accountId: string;
3928
+ /** Body param: */
3929
+ comments?: string;
3930
+ /** Body param: Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition. */
3931
+ isRecent?: boolean;
3932
+ /** Body param: */
3933
+ isRegex?: boolean;
3934
+ /** Body param: Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition. */
3935
+ isSimilarity?: boolean;
3936
+ /** Body param: */
3937
+ pattern?: string;
3938
+ }
3939
+
3940
+ export const PatchSettingTrustedDomainRequest =
3941
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3942
+ trustedDomainId: Schema.Number.pipe(T.HttpPath("trustedDomainId")),
3943
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
3944
+ comments: Schema.optional(Schema.String),
3945
+ isRecent: Schema.optional(Schema.Boolean),
3946
+ isRegex: Schema.optional(Schema.Boolean),
3947
+ isSimilarity: Schema.optional(Schema.Boolean),
3948
+ pattern: Schema.optional(Schema.String),
3949
+ }).pipe(
3950
+ Schema.encodeKeys({
3951
+ comments: "comments",
3952
+ isRecent: "is_recent",
3953
+ isRegex: "is_regex",
3954
+ isSimilarity: "is_similarity",
3955
+ pattern: "pattern",
3956
+ }),
3957
+ T.Http({
3958
+ method: "PATCH",
3959
+ path: "/accounts/{account_id}/email-security/settings/trusted_domains/{trustedDomainId}",
3960
+ }),
3961
+ ) as unknown as Schema.Schema<PatchSettingTrustedDomainRequest>;
3962
+
3963
+ export interface PatchSettingTrustedDomainResponse {
3964
+ /** The unique identifier for the trusted domain. */
3965
+ id: number;
3966
+ createdAt: string;
3967
+ /** Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition. */
3968
+ isRecent: boolean;
3969
+ isRegex: boolean;
3970
+ /** Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition. */
3971
+ isSimilarity: boolean;
3972
+ lastModified: string;
3973
+ pattern: string;
3974
+ comments?: string | null;
3975
+ }
3976
+
3977
+ export const PatchSettingTrustedDomainResponse =
3978
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3979
+ id: Schema.Number,
3980
+ createdAt: Schema.String,
3981
+ isRecent: Schema.Boolean,
3982
+ isRegex: Schema.Boolean,
3983
+ isSimilarity: Schema.Boolean,
3984
+ lastModified: Schema.String,
3985
+ pattern: Schema.String,
3986
+ comments: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3987
+ }).pipe(
3988
+ Schema.encodeKeys({
3989
+ id: "id",
3990
+ createdAt: "created_at",
3991
+ isRecent: "is_recent",
3992
+ isRegex: "is_regex",
3993
+ isSimilarity: "is_similarity",
3994
+ lastModified: "last_modified",
3995
+ pattern: "pattern",
3996
+ comments: "comments",
3997
+ }),
3998
+ ) as unknown as Schema.Schema<PatchSettingTrustedDomainResponse>;
3999
+
4000
+ export type PatchSettingTrustedDomainError = DefaultErrors;
4001
+
4002
+ export const patchSettingTrustedDomain: API.OperationMethod<
4003
+ PatchSettingTrustedDomainRequest,
4004
+ PatchSettingTrustedDomainResponse,
4005
+ PatchSettingTrustedDomainError,
4006
+ Credentials | HttpClient.HttpClient
4007
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
4008
+ input: PatchSettingTrustedDomainRequest,
4009
+ output: PatchSettingTrustedDomainResponse,
4010
+ errors: [],
4011
+ }));
4012
+
4013
+ export interface DeleteSettingTrustedDomainRequest {
4014
+ trustedDomainId: number;
4015
+ /** Account Identifier */
4016
+ accountId: string;
4017
+ }
4018
+
4019
+ export const DeleteSettingTrustedDomainRequest =
4020
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
4021
+ trustedDomainId: Schema.Number.pipe(T.HttpPath("trustedDomainId")),
4022
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
4023
+ }).pipe(
4024
+ T.Http({
4025
+ method: "DELETE",
4026
+ path: "/accounts/{account_id}/email-security/settings/trusted_domains/{trustedDomainId}",
4027
+ }),
4028
+ ) as unknown as Schema.Schema<DeleteSettingTrustedDomainRequest>;
4029
+
4030
+ export interface DeleteSettingTrustedDomainResponse {
4031
+ /** The unique identifier for the trusted domain. */
4032
+ id: number;
4033
+ }
4034
+
4035
+ export const DeleteSettingTrustedDomainResponse =
4036
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
4037
+ id: Schema.Number,
4038
+ }) as unknown as Schema.Schema<DeleteSettingTrustedDomainResponse>;
4039
+
4040
+ export type DeleteSettingTrustedDomainError = DefaultErrors;
4041
+
4042
+ export const deleteSettingTrustedDomain: API.OperationMethod<
4043
+ DeleteSettingTrustedDomainRequest,
4044
+ DeleteSettingTrustedDomainResponse,
4045
+ DeleteSettingTrustedDomainError,
4046
+ Credentials | HttpClient.HttpClient
4047
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
4048
+ input: DeleteSettingTrustedDomainRequest,
4049
+ output: DeleteSettingTrustedDomainResponse,
4050
+ errors: [],
4051
+ }));
4052
+
4053
+ // =============================================================================
4054
+ // Submission
4055
+ // =============================================================================
4056
+
4057
+ export interface ListSubmissionsRequest {
4058
+ /** Path param: Account Identifier */
4059
+ accountId: string;
4060
+ /** Query param: The end of the search date range. Defaults to `now`. */
4061
+ end?: string;
4062
+ /** Query param: */
4063
+ originalDisposition?:
4064
+ | "MALICIOUS"
4065
+ | "SUSPICIOUS"
4066
+ | "SPOOF"
4067
+ | "SPAM"
4068
+ | "BULK"
4069
+ | "NONE";
4070
+ /** Query param: */
4071
+ outcomeDisposition?:
4072
+ | "MALICIOUS"
4073
+ | "SUSPICIOUS"
4074
+ | "SPOOF"
4075
+ | "SPAM"
4076
+ | "BULK"
4077
+ | "NONE";
4078
+ /** Query param: */
4079
+ query?: string | null;
4080
+ /** Query param: */
4081
+ requestedDisposition?:
4082
+ | "MALICIOUS"
4083
+ | "SUSPICIOUS"
4084
+ | "SPOOF"
4085
+ | "SPAM"
4086
+ | "BULK"
4087
+ | "NONE";
4088
+ /** Query param: The beginning of the search date range. Defaults to `now - 30 days`. */
4089
+ start?: string;
4090
+ /** Query param: */
4091
+ status?: string;
4092
+ /** Query param: */
4093
+ submissionId?: string;
4094
+ /** Query param: */
4095
+ type?: "TEAM" | "USER";
4096
+ }
4097
+
4098
+ export const ListSubmissionsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
4099
+ {
4100
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
4101
+ end: Schema.optional(Schema.String).pipe(T.HttpQuery("end")),
4102
+ originalDisposition: Schema.optional(
4103
+ Schema.Literals([
4104
+ "MALICIOUS",
4105
+ "SUSPICIOUS",
4106
+ "SPOOF",
4107
+ "SPAM",
4108
+ "BULK",
4109
+ "NONE",
4110
+ ]),
4111
+ ).pipe(T.HttpQuery("original_disposition")),
4112
+ outcomeDisposition: Schema.optional(
4113
+ Schema.Literals([
4114
+ "MALICIOUS",
4115
+ "SUSPICIOUS",
4116
+ "SPOOF",
4117
+ "SPAM",
4118
+ "BULK",
4119
+ "NONE",
4120
+ ]),
4121
+ ).pipe(T.HttpQuery("outcome_disposition")),
4122
+ query: Schema.optional(Schema.Union([Schema.String, Schema.Null])).pipe(
4123
+ T.HttpQuery("query"),
4124
+ ),
4125
+ requestedDisposition: Schema.optional(
4126
+ Schema.Literals([
4127
+ "MALICIOUS",
4128
+ "SUSPICIOUS",
4129
+ "SPOOF",
4130
+ "SPAM",
4131
+ "BULK",
4132
+ "NONE",
4133
+ ]),
4134
+ ).pipe(T.HttpQuery("requested_disposition")),
4135
+ start: Schema.optional(Schema.String).pipe(T.HttpQuery("start")),
4136
+ status: Schema.optional(Schema.String).pipe(T.HttpQuery("status")),
4137
+ submissionId: Schema.optional(Schema.String).pipe(
4138
+ T.HttpQuery("submission_id"),
4139
+ ),
4140
+ type: Schema.optional(Schema.Literals(["TEAM", "USER"])).pipe(
4141
+ T.HttpQuery("type"),
4142
+ ),
4143
+ },
4144
+ ).pipe(
4145
+ T.Http({
4146
+ method: "GET",
4147
+ path: "/accounts/{account_id}/email-security/submissions",
4148
+ }),
4149
+ ) as unknown as Schema.Schema<ListSubmissionsRequest>;
4150
+
4151
+ export type ListSubmissionsResponse = {
4152
+ requestedTs: string;
4153
+ submissionId: string;
4154
+ originalDisposition?:
4155
+ | "MALICIOUS"
4156
+ | "MALICIOUS-BEC"
4157
+ | "SUSPICIOUS"
4158
+ | "SPOOF"
4159
+ | "SPAM"
4160
+ | "BULK"
4161
+ | "ENCRYPTED"
4162
+ | "EXTERNAL"
4163
+ | "UNKNOWN"
4164
+ | "NONE"
4165
+ | null;
4166
+ originalEdfHash?: string | null;
4167
+ outcome?: string | null;
4168
+ outcomeDisposition?:
4169
+ | "MALICIOUS"
4170
+ | "MALICIOUS-BEC"
4171
+ | "SUSPICIOUS"
4172
+ | "SPOOF"
4173
+ | "SPAM"
4174
+ | "BULK"
4175
+ | "ENCRYPTED"
4176
+ | "EXTERNAL"
4177
+ | "UNKNOWN"
4178
+ | "NONE"
4179
+ | null;
4180
+ requestedBy?: string | null;
4181
+ requestedDisposition?:
4182
+ | "MALICIOUS"
4183
+ | "MALICIOUS-BEC"
4184
+ | "SUSPICIOUS"
4185
+ | "SPOOF"
4186
+ | "SPAM"
4187
+ | "BULK"
4188
+ | "ENCRYPTED"
4189
+ | "EXTERNAL"
4190
+ | "UNKNOWN"
4191
+ | "NONE"
4192
+ | null;
4193
+ status?: string | null;
4194
+ subject?: string | null;
4195
+ type?: string | null;
4196
+ }[];
4197
+
4198
+ export const ListSubmissionsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
4199
+ Schema.Struct({
4200
+ requestedTs: Schema.String,
4201
+ submissionId: Schema.String,
4202
+ originalDisposition: Schema.optional(
4203
+ Schema.Union([
4204
+ Schema.Literal("MALICIOUS"),
4205
+ Schema.Literal("MALICIOUS-BEC"),
4206
+ Schema.Literal("SUSPICIOUS"),
4207
+ Schema.Literal("SPOOF"),
4208
+ Schema.Literal("SPAM"),
4209
+ Schema.Literal("BULK"),
4210
+ Schema.Literal("ENCRYPTED"),
4211
+ Schema.Literal("EXTERNAL"),
4212
+ Schema.Literal("UNKNOWN"),
4213
+ Schema.Literal("NONE"),
4214
+ Schema.Null,
4215
+ ]),
4216
+ ),
4217
+ originalEdfHash: Schema.optional(
4218
+ Schema.Union([Schema.String, Schema.Null]),
4219
+ ),
4220
+ outcome: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
4221
+ outcomeDisposition: Schema.optional(
4222
+ Schema.Union([
4223
+ Schema.Literal("MALICIOUS"),
4224
+ Schema.Literal("MALICIOUS-BEC"),
4225
+ Schema.Literal("SUSPICIOUS"),
4226
+ Schema.Literal("SPOOF"),
4227
+ Schema.Literal("SPAM"),
4228
+ Schema.Literal("BULK"),
4229
+ Schema.Literal("ENCRYPTED"),
4230
+ Schema.Literal("EXTERNAL"),
4231
+ Schema.Literal("UNKNOWN"),
4232
+ Schema.Literal("NONE"),
4233
+ Schema.Null,
4234
+ ]),
4235
+ ),
4236
+ requestedBy: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
4237
+ requestedDisposition: Schema.optional(
4238
+ Schema.Union([
4239
+ Schema.Literal("MALICIOUS"),
4240
+ Schema.Literal("MALICIOUS-BEC"),
4241
+ Schema.Literal("SUSPICIOUS"),
4242
+ Schema.Literal("SPOOF"),
4243
+ Schema.Literal("SPAM"),
4244
+ Schema.Literal("BULK"),
4245
+ Schema.Literal("ENCRYPTED"),
4246
+ Schema.Literal("EXTERNAL"),
4247
+ Schema.Literal("UNKNOWN"),
4248
+ Schema.Literal("NONE"),
4249
+ Schema.Null,
4250
+ ]),
4251
+ ),
4252
+ status: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
4253
+ subject: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
4254
+ type: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
4255
+ }).pipe(
4256
+ Schema.encodeKeys({
4257
+ requestedTs: "requested_ts",
4258
+ submissionId: "submission_id",
4259
+ originalDisposition: "original_disposition",
4260
+ originalEdfHash: "original_edf_hash",
4261
+ outcome: "outcome",
4262
+ outcomeDisposition: "outcome_disposition",
4263
+ requestedBy: "requested_by",
4264
+ requestedDisposition: "requested_disposition",
4265
+ status: "status",
4266
+ subject: "subject",
4267
+ type: "type",
4268
+ }),
4269
+ ),
4270
+ ) as unknown as Schema.Schema<ListSubmissionsResponse>;
4271
+
4272
+ export type ListSubmissionsError = DefaultErrors;
4273
+
4274
+ export const listSubmissions: API.OperationMethod<
4275
+ ListSubmissionsRequest,
4276
+ ListSubmissionsResponse,
4277
+ ListSubmissionsError,
4278
+ Credentials | HttpClient.HttpClient
4279
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
4280
+ input: ListSubmissionsRequest,
4281
+ output: ListSubmissionsResponse,
4282
+ errors: [],
4283
+ }));