@distilled.cloud/cloudflare 0.0.0 → 0.2.0-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (560) hide show
  1. package/lib/auth.d.ts +13 -0
  2. package/lib/auth.d.ts.map +1 -0
  3. package/lib/auth.js +12 -0
  4. package/lib/auth.js.map +1 -0
  5. package/lib/category.d.ts +2 -0
  6. package/lib/category.d.ts.map +1 -0
  7. package/lib/category.js +2 -0
  8. package/lib/category.js.map +1 -0
  9. package/lib/client/api.d.ts +14 -0
  10. package/lib/client/api.d.ts.map +1 -0
  11. package/lib/client/api.js +197 -0
  12. package/lib/client/api.js.map +1 -0
  13. package/lib/client/index.d.ts +8 -0
  14. package/lib/client/index.d.ts.map +1 -0
  15. package/lib/client/index.js +8 -0
  16. package/lib/client/index.js.map +1 -0
  17. package/lib/credentials.d.ts +14 -0
  18. package/lib/credentials.d.ts.map +1 -0
  19. package/lib/credentials.js +17 -0
  20. package/lib/credentials.js.map +1 -0
  21. package/lib/errors.d.ts +48 -0
  22. package/lib/errors.d.ts.map +1 -0
  23. package/lib/errors.js +38 -0
  24. package/lib/errors.js.map +1 -0
  25. package/lib/index.d.ts +10 -0
  26. package/lib/index.d.ts.map +1 -0
  27. package/lib/index.js +10 -0
  28. package/lib/index.js.map +1 -0
  29. package/lib/retry.d.ts +14 -0
  30. package/lib/retry.d.ts.map +1 -0
  31. package/lib/retry.js +14 -0
  32. package/lib/retry.js.map +1 -0
  33. package/lib/schemas.d.ts +29 -0
  34. package/lib/schemas.d.ts.map +1 -0
  35. package/lib/schemas.js +34 -0
  36. package/lib/schemas.js.map +1 -0
  37. package/lib/services/abuse-reports.d.ts +224 -0
  38. package/lib/services/abuse-reports.d.ts.map +1 -0
  39. package/lib/services/abuse-reports.js +353 -0
  40. package/lib/services/abuse-reports.js.map +1 -0
  41. package/lib/services/accounts.d.ts +682 -0
  42. package/lib/services/accounts.d.ts.map +1 -0
  43. package/lib/services/accounts.js +805 -0
  44. package/lib/services/accounts.js.map +1 -0
  45. package/lib/services/acm.d.ts +73 -0
  46. package/lib/services/acm.d.ts.map +1 -0
  47. package/lib/services/acm.js +76 -0
  48. package/lib/services/acm.js.map +1 -0
  49. package/lib/services/addressing.d.ts +1208 -0
  50. package/lib/services/addressing.d.ts.map +1 -0
  51. package/lib/services/addressing.js +1776 -0
  52. package/lib/services/addressing.js.map +1 -0
  53. package/lib/services/ai-gateway.d.ts +956 -0
  54. package/lib/services/ai-gateway.d.ts.map +1 -0
  55. package/lib/services/ai-gateway.js +1706 -0
  56. package/lib/services/ai-gateway.js.map +1 -0
  57. package/lib/services/ai.d.ts +243 -0
  58. package/lib/services/ai.d.ts.map +1 -0
  59. package/lib/services/ai.js +299 -0
  60. package/lib/services/ai.js.map +1 -0
  61. package/lib/services/aisearch.d.ts +915 -0
  62. package/lib/services/aisearch.d.ts.map +1 -0
  63. package/lib/services/aisearch.js +2425 -0
  64. package/lib/services/aisearch.js.map +1 -0
  65. package/lib/services/alerting.d.ts +718 -0
  66. package/lib/services/alerting.d.ts.map +1 -0
  67. package/lib/services/alerting.js +1388 -0
  68. package/lib/services/alerting.js.map +1 -0
  69. package/lib/services/api-gateway.d.ts +830 -0
  70. package/lib/services/api-gateway.d.ts.map +1 -0
  71. package/lib/services/api-gateway.js +1548 -0
  72. package/lib/services/api-gateway.js.map +1 -0
  73. package/lib/services/argo.d.ts +101 -0
  74. package/lib/services/argo.d.ts.map +1 -0
  75. package/lib/services/argo.js +105 -0
  76. package/lib/services/argo.js.map +1 -0
  77. package/lib/services/audit-logs.d.ts +46 -0
  78. package/lib/services/audit-logs.d.ts.map +1 -0
  79. package/lib/services/audit-logs.js +37 -0
  80. package/lib/services/audit-logs.js.map +1 -0
  81. package/lib/services/billing.d.ts +62 -0
  82. package/lib/services/billing.d.ts.map +1 -0
  83. package/lib/services/billing.js +100 -0
  84. package/lib/services/billing.js.map +1 -0
  85. package/lib/services/bot-management.d.ts +124 -0
  86. package/lib/services/bot-management.d.ts.map +1 -0
  87. package/lib/services/bot-management.js +262 -0
  88. package/lib/services/bot-management.js.map +1 -0
  89. package/lib/services/botnet-feed.d.ts +65 -0
  90. package/lib/services/botnet-feed.d.ts.map +1 -0
  91. package/lib/services/botnet-feed.js +84 -0
  92. package/lib/services/botnet-feed.js.map +1 -0
  93. package/lib/services/brand-protection.d.ts +188 -0
  94. package/lib/services/brand-protection.d.ts.map +1 -0
  95. package/lib/services/brand-protection.js +214 -0
  96. package/lib/services/brand-protection.js.map +1 -0
  97. package/lib/services/browser-rendering.d.ts +857 -0
  98. package/lib/services/browser-rendering.d.ts.map +1 -0
  99. package/lib/services/browser-rendering.js +1141 -0
  100. package/lib/services/browser-rendering.js.map +1 -0
  101. package/lib/services/cache.d.ts +287 -0
  102. package/lib/services/cache.d.ts.map +1 -0
  103. package/lib/services/cache.js +330 -0
  104. package/lib/services/cache.js.map +1 -0
  105. package/lib/services/calls.d.ts +202 -0
  106. package/lib/services/calls.d.ts.map +1 -0
  107. package/lib/services/calls.js +175 -0
  108. package/lib/services/calls.js.map +1 -0
  109. package/lib/services/certificate-authorities.d.ts +40 -0
  110. package/lib/services/certificate-authorities.d.ts.map +1 -0
  111. package/lib/services/certificate-authorities.js +49 -0
  112. package/lib/services/certificate-authorities.js.map +1 -0
  113. package/lib/services/client-certificates.d.ts +254 -0
  114. package/lib/services/client-certificates.d.ts.map +1 -0
  115. package/lib/services/client-certificates.js +350 -0
  116. package/lib/services/client-certificates.js.map +1 -0
  117. package/lib/services/cloud-connector.d.ts +59 -0
  118. package/lib/services/cloud-connector.d.ts.map +1 -0
  119. package/lib/services/cloud-connector.js +84 -0
  120. package/lib/services/cloud-connector.js.map +1 -0
  121. package/lib/services/cloudforce-one.d.ts +1318 -0
  122. package/lib/services/cloudforce-one.d.ts.map +1 -0
  123. package/lib/services/cloudforce-one.js +1684 -0
  124. package/lib/services/cloudforce-one.js.map +1 -0
  125. package/lib/services/connectivity.d.ts +248 -0
  126. package/lib/services/connectivity.d.ts.map +1 -0
  127. package/lib/services/connectivity.js +377 -0
  128. package/lib/services/connectivity.js.map +1 -0
  129. package/lib/services/content-scanning.d.ts +131 -0
  130. package/lib/services/content-scanning.d.ts.map +1 -0
  131. package/lib/services/content-scanning.js +156 -0
  132. package/lib/services/content-scanning.js.map +1 -0
  133. package/lib/services/custom-certificates.d.ts +211 -0
  134. package/lib/services/custom-certificates.d.ts.map +1 -0
  135. package/lib/services/custom-certificates.js +309 -0
  136. package/lib/services/custom-certificates.js.map +1 -0
  137. package/lib/services/custom-hostnames.d.ts +525 -0
  138. package/lib/services/custom-hostnames.d.ts.map +1 -0
  139. package/lib/services/custom-hostnames.js +1164 -0
  140. package/lib/services/custom-hostnames.js.map +1 -0
  141. package/lib/services/custom-nameservers.d.ts +67 -0
  142. package/lib/services/custom-nameservers.d.ts.map +1 -0
  143. package/lib/services/custom-nameservers.js +80 -0
  144. package/lib/services/custom-nameservers.js.map +1 -0
  145. package/lib/services/custom-pages.d.ts +74 -0
  146. package/lib/services/custom-pages.d.ts.map +1 -0
  147. package/lib/services/custom-pages.js +125 -0
  148. package/lib/services/custom-pages.js.map +1 -0
  149. package/lib/services/d1.d.ts +326 -0
  150. package/lib/services/d1.d.ts.map +1 -0
  151. package/lib/services/d1.js +448 -0
  152. package/lib/services/d1.js.map +1 -0
  153. package/lib/services/dcv-delegation.d.ts +24 -0
  154. package/lib/services/dcv-delegation.d.ts.map +1 -0
  155. package/lib/services/dcv-delegation.js +24 -0
  156. package/lib/services/dcv-delegation.js.map +1 -0
  157. package/lib/services/diagnostics.d.ts +175 -0
  158. package/lib/services/diagnostics.d.ts.map +1 -0
  159. package/lib/services/diagnostics.js +273 -0
  160. package/lib/services/diagnostics.js.map +1 -0
  161. package/lib/services/dns-firewall.d.ts +288 -0
  162. package/lib/services/dns-firewall.d.ts.map +1 -0
  163. package/lib/services/dns-firewall.js +373 -0
  164. package/lib/services/dns-firewall.js.map +1 -0
  165. package/lib/services/dns.d.ts +2946 -0
  166. package/lib/services/dns.d.ts.map +1 -0
  167. package/lib/services/dns.js +4511 -0
  168. package/lib/services/dns.js.map +1 -0
  169. package/lib/services/durable-objects.d.ts +61 -0
  170. package/lib/services/durable-objects.d.ts.map +1 -0
  171. package/lib/services/durable-objects.js +66 -0
  172. package/lib/services/durable-objects.js.map +1 -0
  173. package/lib/services/email-routing.d.ts +542 -0
  174. package/lib/services/email-routing.d.ts.map +1 -0
  175. package/lib/services/email-routing.js +662 -0
  176. package/lib/services/email-routing.js.map +1 -0
  177. package/lib/services/email-security.d.ts +1131 -0
  178. package/lib/services/email-security.d.ts.map +1 -0
  179. package/lib/services/email-security.js +2065 -0
  180. package/lib/services/email-security.js.map +1 -0
  181. package/lib/services/filters.d.ts +157 -0
  182. package/lib/services/filters.d.ts.map +1 -0
  183. package/lib/services/filters.js +135 -0
  184. package/lib/services/filters.js.map +1 -0
  185. package/lib/services/firewall.d.ts +1080 -0
  186. package/lib/services/firewall.d.ts.map +1 -0
  187. package/lib/services/firewall.js +1881 -0
  188. package/lib/services/firewall.js.map +1 -0
  189. package/lib/services/healthchecks.d.ts +464 -0
  190. package/lib/services/healthchecks.d.ts.map +1 -0
  191. package/lib/services/healthchecks.js +838 -0
  192. package/lib/services/healthchecks.js.map +1 -0
  193. package/lib/services/hostnames.d.ts +74 -0
  194. package/lib/services/hostnames.d.ts.map +1 -0
  195. package/lib/services/hostnames.js +100 -0
  196. package/lib/services/hostnames.js.map +1 -0
  197. package/lib/services/hyperdrive.d.ts +203 -0
  198. package/lib/services/hyperdrive.d.ts.map +1 -0
  199. package/lib/services/hyperdrive.js +299 -0
  200. package/lib/services/hyperdrive.js.map +1 -0
  201. package/lib/services/iam.d.ts +554 -0
  202. package/lib/services/iam.d.ts.map +1 -0
  203. package/lib/services/iam.js +743 -0
  204. package/lib/services/iam.js.map +1 -0
  205. package/lib/services/images.d.ts +403 -0
  206. package/lib/services/images.d.ts.map +1 -0
  207. package/lib/services/images.js +417 -0
  208. package/lib/services/images.js.map +1 -0
  209. package/lib/services/intel.d.ts +768 -0
  210. package/lib/services/intel.d.ts.map +1 -0
  211. package/lib/services/intel.js +1179 -0
  212. package/lib/services/intel.js.map +1 -0
  213. package/lib/services/ips.d.ts +28 -0
  214. package/lib/services/ips.d.ts.map +1 -0
  215. package/lib/services/ips.js +39 -0
  216. package/lib/services/ips.js.map +1 -0
  217. package/lib/services/keyless-certificates.d.ts +177 -0
  218. package/lib/services/keyless-certificates.d.ts.map +1 -0
  219. package/lib/services/keyless-certificates.js +216 -0
  220. package/lib/services/keyless-certificates.js.map +1 -0
  221. package/lib/services/kv.d.ts +339 -0
  222. package/lib/services/kv.d.ts.map +1 -0
  223. package/lib/services/kv.js +402 -0
  224. package/lib/services/kv.js.map +1 -0
  225. package/lib/services/leaked-credential-checks.d.ts +119 -0
  226. package/lib/services/leaked-credential-checks.d.ts.map +1 -0
  227. package/lib/services/leaked-credential-checks.js +130 -0
  228. package/lib/services/leaked-credential-checks.js.map +1 -0
  229. package/lib/services/load-balancers.d.ts +1767 -0
  230. package/lib/services/load-balancers.d.ts.map +1 -0
  231. package/lib/services/load-balancers.js +3068 -0
  232. package/lib/services/load-balancers.js.map +1 -0
  233. package/lib/services/logpush.d.ts +401 -0
  234. package/lib/services/logpush.d.ts.map +1 -0
  235. package/lib/services/logpush.js +724 -0
  236. package/lib/services/logpush.js.map +1 -0
  237. package/lib/services/logs.d.ts +125 -0
  238. package/lib/services/logs.d.ts.map +1 -0
  239. package/lib/services/logs.js +145 -0
  240. package/lib/services/logs.js.map +1 -0
  241. package/lib/services/magic-cloud-networking.d.ts +1599 -0
  242. package/lib/services/magic-cloud-networking.d.ts.map +1 -0
  243. package/lib/services/magic-cloud-networking.js +5205 -0
  244. package/lib/services/magic-cloud-networking.js.map +1 -0
  245. package/lib/services/magic-network-monitoring.d.ts +379 -0
  246. package/lib/services/magic-network-monitoring.d.ts.map +1 -0
  247. package/lib/services/magic-network-monitoring.js +535 -0
  248. package/lib/services/magic-network-monitoring.js.map +1 -0
  249. package/lib/services/magic-transit.d.ts +3650 -0
  250. package/lib/services/magic-transit.d.ts.map +1 -0
  251. package/lib/services/magic-transit.js +6120 -0
  252. package/lib/services/magic-transit.js.map +1 -0
  253. package/lib/services/managed-transforms.d.ts +79 -0
  254. package/lib/services/managed-transforms.d.ts.map +1 -0
  255. package/lib/services/managed-transforms.js +107 -0
  256. package/lib/services/managed-transforms.js.map +1 -0
  257. package/lib/services/memberships.d.ts +172 -0
  258. package/lib/services/memberships.d.ts.map +1 -0
  259. package/lib/services/memberships.js +282 -0
  260. package/lib/services/memberships.js.map +1 -0
  261. package/lib/services/mtls-certificates.d.ts +140 -0
  262. package/lib/services/mtls-certificates.d.ts.map +1 -0
  263. package/lib/services/mtls-certificates.js +173 -0
  264. package/lib/services/mtls-certificates.js.map +1 -0
  265. package/lib/services/network-interconnects.d.ts +410 -0
  266. package/lib/services/network-interconnects.d.ts.map +1 -0
  267. package/lib/services/network-interconnects.js +583 -0
  268. package/lib/services/network-interconnects.js.map +1 -0
  269. package/lib/services/organizations.d.ts +201 -0
  270. package/lib/services/organizations.d.ts.map +1 -0
  271. package/lib/services/organizations.js +355 -0
  272. package/lib/services/organizations.js.map +1 -0
  273. package/lib/services/origin-ca-certificates.d.ts +99 -0
  274. package/lib/services/origin-ca-certificates.d.ts.map +1 -0
  275. package/lib/services/origin-ca-certificates.js +156 -0
  276. package/lib/services/origin-ca-certificates.js.map +1 -0
  277. package/lib/services/origin-post-quantum-encryption.d.ts +50 -0
  278. package/lib/services/origin-post-quantum-encryption.d.ts.map +1 -0
  279. package/lib/services/origin-post-quantum-encryption.js +60 -0
  280. package/lib/services/origin-post-quantum-encryption.js.map +1 -0
  281. package/lib/services/origin-tls-client-auth.d.ts +273 -0
  282. package/lib/services/origin-tls-client-auth.d.ts.map +1 -0
  283. package/lib/services/origin-tls-client-auth.js +401 -0
  284. package/lib/services/origin-tls-client-auth.js.map +1 -0
  285. package/lib/services/page-rules.d.ts +773 -0
  286. package/lib/services/page-rules.d.ts.map +1 -0
  287. package/lib/services/page-rules.js +1365 -0
  288. package/lib/services/page-rules.js.map +1 -0
  289. package/lib/services/page-shield.d.ts +426 -0
  290. package/lib/services/page-shield.d.ts.map +1 -0
  291. package/lib/services/page-shield.js +484 -0
  292. package/lib/services/page-shield.js.map +1 -0
  293. package/lib/services/pages.d.ts +1654 -0
  294. package/lib/services/pages.d.ts.map +1 -0
  295. package/lib/services/pages.js +2954 -0
  296. package/lib/services/pages.js.map +1 -0
  297. package/lib/services/pipelines.d.ts +1461 -0
  298. package/lib/services/pipelines.d.ts.map +1 -0
  299. package/lib/services/pipelines.js +2912 -0
  300. package/lib/services/pipelines.js.map +1 -0
  301. package/lib/services/queues.d.ts +807 -0
  302. package/lib/services/queues.d.ts.map +1 -0
  303. package/lib/services/queues.js +1194 -0
  304. package/lib/services/queues.js.map +1 -0
  305. package/lib/services/r2-data-catalog.d.ts +341 -0
  306. package/lib/services/r2-data-catalog.d.ts.map +1 -0
  307. package/lib/services/r2-data-catalog.js +499 -0
  308. package/lib/services/r2-data-catalog.js.map +1 -0
  309. package/lib/services/r2.d.ts +1041 -0
  310. package/lib/services/r2.d.ts.map +1 -0
  311. package/lib/services/r2.js +1384 -0
  312. package/lib/services/r2.js.map +1 -0
  313. package/lib/services/radar.d.ts +9276 -0
  314. package/lib/services/radar.d.ts.map +1 -0
  315. package/lib/services/radar.js +20491 -0
  316. package/lib/services/radar.js.map +1 -0
  317. package/lib/services/rate-limits.d.ts +315 -0
  318. package/lib/services/rate-limits.d.ts.map +1 -0
  319. package/lib/services/rate-limits.js +521 -0
  320. package/lib/services/rate-limits.js.map +1 -0
  321. package/lib/services/realtime-kit.d.ts +2728 -0
  322. package/lib/services/realtime-kit.d.ts.map +1 -0
  323. package/lib/services/realtime-kit.js +5401 -0
  324. package/lib/services/realtime-kit.js.map +1 -0
  325. package/lib/services/registrar.d.ts +81 -0
  326. package/lib/services/registrar.d.ts.map +1 -0
  327. package/lib/services/registrar.js +154 -0
  328. package/lib/services/registrar.js.map +1 -0
  329. package/lib/services/request-tracers.d.ts +61 -0
  330. package/lib/services/request-tracers.d.ts.map +1 -0
  331. package/lib/services/request-tracers.js +82 -0
  332. package/lib/services/request-tracers.js.map +1 -0
  333. package/lib/services/resource-sharing.d.ts +540 -0
  334. package/lib/services/resource-sharing.d.ts.map +1 -0
  335. package/lib/services/resource-sharing.js +846 -0
  336. package/lib/services/resource-sharing.js.map +1 -0
  337. package/lib/services/rules.d.ts +297 -0
  338. package/lib/services/rules.d.ts.map +1 -0
  339. package/lib/services/rules.js +396 -0
  340. package/lib/services/rules.js.map +1 -0
  341. package/lib/services/rulesets.d.ts +3300 -0
  342. package/lib/services/rulesets.d.ts.map +1 -0
  343. package/lib/services/rulesets.js +7852 -0
  344. package/lib/services/rulesets.js.map +1 -0
  345. package/lib/services/rum.d.ts +289 -0
  346. package/lib/services/rum.d.ts.map +1 -0
  347. package/lib/services/rum.js +409 -0
  348. package/lib/services/rum.js.map +1 -0
  349. package/lib/services/schema-validation.d.ts +240 -0
  350. package/lib/services/schema-validation.d.ts.map +1 -0
  351. package/lib/services/schema-validation.js +306 -0
  352. package/lib/services/schema-validation.js.map +1 -0
  353. package/lib/services/secrets-store.d.ts +321 -0
  354. package/lib/services/secrets-store.d.ts.map +1 -0
  355. package/lib/services/secrets-store.js +385 -0
  356. package/lib/services/secrets-store.js.map +1 -0
  357. package/lib/services/security-center.d.ts +102 -0
  358. package/lib/services/security-center.d.ts.map +1 -0
  359. package/lib/services/security-center.js +170 -0
  360. package/lib/services/security-center.js.map +1 -0
  361. package/lib/services/security-txt.d.ts +105 -0
  362. package/lib/services/security-txt.d.ts.map +1 -0
  363. package/lib/services/security-txt.js +136 -0
  364. package/lib/services/security-txt.js.map +1 -0
  365. package/lib/services/snippets.d.ts +138 -0
  366. package/lib/services/snippets.d.ts.map +1 -0
  367. package/lib/services/snippets.js +178 -0
  368. package/lib/services/snippets.js.map +1 -0
  369. package/lib/services/spectrum.d.ts +316 -0
  370. package/lib/services/spectrum.d.ts.map +1 -0
  371. package/lib/services/spectrum.js +510 -0
  372. package/lib/services/spectrum.js.map +1 -0
  373. package/lib/services/speed.d.ts +227 -0
  374. package/lib/services/speed.d.ts.map +1 -0
  375. package/lib/services/speed.js +444 -0
  376. package/lib/services/speed.js.map +1 -0
  377. package/lib/services/ssl.d.ts +370 -0
  378. package/lib/services/ssl.d.ts.map +1 -0
  379. package/lib/services/ssl.js +732 -0
  380. package/lib/services/ssl.js.map +1 -0
  381. package/lib/services/stream.d.ts +1014 -0
  382. package/lib/services/stream.d.ts.map +1 -0
  383. package/lib/services/stream.js +1049 -0
  384. package/lib/services/stream.js.map +1 -0
  385. package/lib/services/token-validation.d.ts +547 -0
  386. package/lib/services/token-validation.d.ts.map +1 -0
  387. package/lib/services/token-validation.js +768 -0
  388. package/lib/services/token-validation.js.map +1 -0
  389. package/lib/services/turnstile.d.ts +248 -0
  390. package/lib/services/turnstile.d.ts.map +1 -0
  391. package/lib/services/turnstile.js +308 -0
  392. package/lib/services/turnstile.js.map +1 -0
  393. package/lib/services/url-normalization.d.ts +53 -0
  394. package/lib/services/url-normalization.d.ts.map +1 -0
  395. package/lib/services/url-normalization.js +52 -0
  396. package/lib/services/url-normalization.js.map +1 -0
  397. package/lib/services/url-scanner.d.ts +612 -0
  398. package/lib/services/url-scanner.d.ts.map +1 -0
  399. package/lib/services/url-scanner.js +915 -0
  400. package/lib/services/url-scanner.js.map +1 -0
  401. package/lib/services/user.d.ts +441 -0
  402. package/lib/services/user.d.ts.map +1 -0
  403. package/lib/services/user.js +567 -0
  404. package/lib/services/user.js.map +1 -0
  405. package/lib/services/vectorize.d.ts +282 -0
  406. package/lib/services/vectorize.d.ts.map +1 -0
  407. package/lib/services/vectorize.js +340 -0
  408. package/lib/services/vectorize.js.map +1 -0
  409. package/lib/services/waiting-rooms.d.ts +1009 -0
  410. package/lib/services/waiting-rooms.d.ts.map +1 -0
  411. package/lib/services/waiting-rooms.js +1757 -0
  412. package/lib/services/waiting-rooms.js.map +1 -0
  413. package/lib/services/web3.d.ts +274 -0
  414. package/lib/services/web3.d.ts.map +1 -0
  415. package/lib/services/web3.js +362 -0
  416. package/lib/services/web3.js.map +1 -0
  417. package/lib/services/workers-for-platforms.d.ts +1224 -0
  418. package/lib/services/workers-for-platforms.d.ts.map +1 -0
  419. package/lib/services/workers-for-platforms.js +2078 -0
  420. package/lib/services/workers-for-platforms.js.map +1 -0
  421. package/lib/services/workers.d.ts +3498 -0
  422. package/lib/services/workers.d.ts.map +1 -0
  423. package/lib/services/workers.js +5967 -0
  424. package/lib/services/workers.js.map +1 -0
  425. package/lib/services/workflows.d.ts +359 -0
  426. package/lib/services/workflows.d.ts.map +1 -0
  427. package/lib/services/workflows.js +516 -0
  428. package/lib/services/workflows.js.map +1 -0
  429. package/lib/services/zaraz.d.ts +300 -0
  430. package/lib/services/zaraz.d.ts.map +1 -0
  431. package/lib/services/zaraz.js +298 -0
  432. package/lib/services/zaraz.js.map +1 -0
  433. package/lib/services/zero-trust.d.ts +15449 -0
  434. package/lib/services/zero-trust.d.ts.map +1 -0
  435. package/lib/services/zero-trust.js +29194 -0
  436. package/lib/services/zero-trust.js.map +1 -0
  437. package/lib/services/zones.d.ts +1278 -0
  438. package/lib/services/zones.d.ts.map +1 -0
  439. package/lib/services/zones.js +2416 -0
  440. package/lib/services/zones.js.map +1 -0
  441. package/lib/traits.d.ts +28 -0
  442. package/lib/traits.d.ts.map +1 -0
  443. package/lib/traits.js +26 -0
  444. package/lib/traits.js.map +1 -0
  445. package/package.json +67 -5
  446. package/src/auth.ts +14 -0
  447. package/src/category.ts +1 -0
  448. package/src/client/api.ts +269 -0
  449. package/src/client/index.ts +7 -0
  450. package/src/credentials.ts +30 -0
  451. package/src/errors.ts +65 -0
  452. package/src/index.ts +9 -0
  453. package/src/retry.ts +35 -0
  454. package/src/schemas.ts +51 -0
  455. package/src/services/abuse-reports.ts +747 -0
  456. package/src/services/accounts.ts +1947 -0
  457. package/src/services/acm.ts +170 -0
  458. package/src/services/addressing.ts +3947 -0
  459. package/src/services/ai-gateway.ts +3335 -0
  460. package/src/services/ai.ts +727 -0
  461. package/src/services/aisearch.ts +4750 -0
  462. package/src/services/alerting.ts +2947 -0
  463. package/src/services/api-gateway.ts +3391 -0
  464. package/src/services/argo.ts +254 -0
  465. package/src/services/audit-logs.ts +90 -0
  466. package/src/services/billing.ts +172 -0
  467. package/src/services/bot-management.ts +541 -0
  468. package/src/services/botnet-feed.ts +193 -0
  469. package/src/services/brand-protection.ts +553 -0
  470. package/src/services/browser-rendering.ts +2707 -0
  471. package/src/services/cache.ts +827 -0
  472. package/src/services/calls.ts +483 -0
  473. package/src/services/certificate-authorities.ts +110 -0
  474. package/src/services/client-certificates.ts +718 -0
  475. package/src/services/cloud-connector.ts +181 -0
  476. package/src/services/cloudforce-one.ts +3876 -0
  477. package/src/services/connectivity.ts +629 -0
  478. package/src/services/content-scanning.ts +385 -0
  479. package/src/services/custom-certificates.ts +611 -0
  480. package/src/services/custom-hostnames.ts +2453 -0
  481. package/src/services/custom-nameservers.ts +182 -0
  482. package/src/services/custom-pages.ts +264 -0
  483. package/src/services/d1.ts +1034 -0
  484. package/src/services/dcv-delegation.ts +52 -0
  485. package/src/services/diagnostics.ts +603 -0
  486. package/src/services/dns-firewall.ts +823 -0
  487. package/src/services/dns.ts +8897 -0
  488. package/src/services/durable-objects.ts +148 -0
  489. package/src/services/email-routing.ts +1602 -0
  490. package/src/services/email-security.ts +4283 -0
  491. package/src/services/filters.ts +370 -0
  492. package/src/services/firewall.ts +3896 -0
  493. package/src/services/healthchecks.ts +1750 -0
  494. package/src/services/hostnames.ts +218 -0
  495. package/src/services/hyperdrive.ts +592 -0
  496. package/src/services/iam.ts +1668 -0
  497. package/src/services/images.ts +1086 -0
  498. package/src/services/intel.ts +2768 -0
  499. package/src/services/ips.ts +88 -0
  500. package/src/services/keyless-certificates.ts +462 -0
  501. package/src/services/kv.ts +1011 -0
  502. package/src/services/leaked-credential-checks.ts +325 -0
  503. package/src/services/load-balancers.ts +6438 -0
  504. package/src/services/logpush.ts +1667 -0
  505. package/src/services/logs.ts +375 -0
  506. package/src/services/magic-cloud-networking.ts +10020 -0
  507. package/src/services/magic-network-monitoring.ts +1156 -0
  508. package/src/services/magic-transit.ts +13050 -0
  509. package/src/services/managed-transforms.ts +237 -0
  510. package/src/services/memberships.ts +615 -0
  511. package/src/services/mtls-certificates.ts +374 -0
  512. package/src/services/network-interconnects.ts +1253 -0
  513. package/src/services/organizations.ts +674 -0
  514. package/src/services/origin-ca-certificates.ts +303 -0
  515. package/src/services/origin-post-quantum-encryption.ts +128 -0
  516. package/src/services/origin-tls-client-auth.ts +878 -0
  517. package/src/services/page-rules.ts +2612 -0
  518. package/src/services/page-shield.ts +1195 -0
  519. package/src/services/pages.ts +5709 -0
  520. package/src/services/pipelines.ts +6000 -0
  521. package/src/services/queues.ts +2629 -0
  522. package/src/services/r2-data-catalog.ts +1119 -0
  523. package/src/services/r2.ts +3348 -0
  524. package/src/services/radar.ts +42152 -0
  525. package/src/services/rate-limits.ts +1150 -0
  526. package/src/services/realtime-kit.ts +11079 -0
  527. package/src/services/registrar.ts +295 -0
  528. package/src/services/request-tracers.ts +158 -0
  529. package/src/services/resource-sharing.ts +1832 -0
  530. package/src/services/rules.ts +837 -0
  531. package/src/services/rulesets.ts +15144 -0
  532. package/src/services/rum.ts +901 -0
  533. package/src/services/schema-validation.ts +733 -0
  534. package/src/services/secrets-store.ts +860 -0
  535. package/src/services/security-center.ts +397 -0
  536. package/src/services/security-txt.ts +315 -0
  537. package/src/services/snippets.ts +420 -0
  538. package/src/services/spectrum.ts +1103 -0
  539. package/src/services/speed.ts +1056 -0
  540. package/src/services/ssl.ts +1587 -0
  541. package/src/services/stream.ts +2756 -0
  542. package/src/services/token-validation.ts +1585 -0
  543. package/src/services/turnstile.ts +643 -0
  544. package/src/services/url-normalization.ts +129 -0
  545. package/src/services/url-scanner.ts +1851 -0
  546. package/src/services/user.ts +1384 -0
  547. package/src/services/vectorize.ts +816 -0
  548. package/src/services/waiting-rooms.ts +3807 -0
  549. package/src/services/web3.ts +834 -0
  550. package/src/services/workers-for-platforms.ts +3859 -0
  551. package/src/services/workers.ts +11637 -0
  552. package/src/services/workflows.ts +1124 -0
  553. package/src/services/zaraz.ts +797 -0
  554. package/src/services/zero-trust.ts +58933 -0
  555. package/src/services/zones.ts +4875 -0
  556. package/src/traits.ts +47 -0
  557. package/README.md +0 -15
  558. package/bun.lock +0 -26
  559. package/index.ts +0 -1
  560. package/tsconfig.json +0 -29
@@ -0,0 +1,1832 @@
1
+ /**
2
+ * Cloudflare RESOURCE-SHARING API
3
+ *
4
+ * Generated from Cloudflare TypeScript SDK.
5
+ * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service resource-sharing
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
+ // Recipient
17
+ // =============================================================================
18
+
19
+ export interface GetRecipientRequest {
20
+ shareId: string;
21
+ recipientId: string;
22
+ /** Path param: Account identifier. */
23
+ accountId: string;
24
+ /** Query param: Include resources in the response. */
25
+ includeResources?: boolean;
26
+ }
27
+
28
+ export const GetRecipientRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
29
+ shareId: Schema.String.pipe(T.HttpPath("shareId")),
30
+ recipientId: Schema.String.pipe(T.HttpPath("recipientId")),
31
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
32
+ includeResources: Schema.optional(Schema.Boolean).pipe(
33
+ T.HttpQuery("include_resources"),
34
+ ),
35
+ }).pipe(
36
+ T.Http({
37
+ method: "GET",
38
+ path: "/accounts/{account_id}/shares/{shareId}/recipients/{recipientId}",
39
+ }),
40
+ ) as unknown as Schema.Schema<GetRecipientRequest>;
41
+
42
+ export interface GetRecipientResponse {
43
+ /** Share Recipient identifier tag. */
44
+ id: string;
45
+ /** Account identifier. */
46
+ accountId: string;
47
+ /** Share Recipient association status. */
48
+ associationStatus:
49
+ | "associating"
50
+ | "associated"
51
+ | "disassociating"
52
+ | "disassociated";
53
+ /** When the share was created. */
54
+ created: string;
55
+ /** When the share was modified. */
56
+ modified: string;
57
+ resources?:
58
+ | {
59
+ error: string;
60
+ resourceId: string;
61
+ resourceVersion: number;
62
+ terminal: boolean;
63
+ }[]
64
+ | null;
65
+ }
66
+
67
+ export const GetRecipientResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
68
+ id: Schema.String,
69
+ accountId: Schema.String,
70
+ associationStatus: Schema.Literals([
71
+ "associating",
72
+ "associated",
73
+ "disassociating",
74
+ "disassociated",
75
+ ]),
76
+ created: Schema.String,
77
+ modified: Schema.String,
78
+ resources: Schema.optional(
79
+ Schema.Union([
80
+ Schema.Array(
81
+ Schema.Struct({
82
+ error: Schema.String,
83
+ resourceId: Schema.String,
84
+ resourceVersion: Schema.Number,
85
+ terminal: Schema.Boolean,
86
+ }).pipe(
87
+ Schema.encodeKeys({
88
+ error: "error",
89
+ resourceId: "resource_id",
90
+ resourceVersion: "resource_version",
91
+ terminal: "terminal",
92
+ }),
93
+ ),
94
+ ),
95
+ Schema.Null,
96
+ ]),
97
+ ),
98
+ }).pipe(
99
+ Schema.encodeKeys({
100
+ id: "id",
101
+ accountId: "account_id",
102
+ associationStatus: "association_status",
103
+ created: "created",
104
+ modified: "modified",
105
+ resources: "resources",
106
+ }),
107
+ ) as unknown as Schema.Schema<GetRecipientResponse>;
108
+
109
+ export type GetRecipientError = DefaultErrors;
110
+
111
+ export const getRecipient: API.OperationMethod<
112
+ GetRecipientRequest,
113
+ GetRecipientResponse,
114
+ GetRecipientError,
115
+ Credentials | HttpClient.HttpClient
116
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
117
+ input: GetRecipientRequest,
118
+ output: GetRecipientResponse,
119
+ errors: [],
120
+ }));
121
+
122
+ export interface ListRecipientsRequest {
123
+ shareId: string;
124
+ /** Path param: Account identifier. */
125
+ accountId: string;
126
+ /** Query param: Include resources in the response. */
127
+ includeResources?: boolean;
128
+ }
129
+
130
+ export const ListRecipientsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
131
+ shareId: Schema.String.pipe(T.HttpPath("shareId")),
132
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
133
+ includeResources: Schema.optional(Schema.Boolean).pipe(
134
+ T.HttpQuery("include_resources"),
135
+ ),
136
+ }).pipe(
137
+ T.Http({
138
+ method: "GET",
139
+ path: "/accounts/{account_id}/shares/{shareId}/recipients",
140
+ }),
141
+ ) as unknown as Schema.Schema<ListRecipientsRequest>;
142
+
143
+ export type ListRecipientsResponse = {
144
+ id: string;
145
+ accountId: string;
146
+ associationStatus:
147
+ | "associating"
148
+ | "associated"
149
+ | "disassociating"
150
+ | "disassociated";
151
+ created: string;
152
+ modified: string;
153
+ resources?:
154
+ | {
155
+ error: string;
156
+ resourceId: string;
157
+ resourceVersion: number;
158
+ terminal: boolean;
159
+ }[]
160
+ | null;
161
+ }[];
162
+
163
+ export const ListRecipientsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
164
+ Schema.Struct({
165
+ id: Schema.String,
166
+ accountId: Schema.String,
167
+ associationStatus: Schema.Literals([
168
+ "associating",
169
+ "associated",
170
+ "disassociating",
171
+ "disassociated",
172
+ ]),
173
+ created: Schema.String,
174
+ modified: Schema.String,
175
+ resources: Schema.optional(
176
+ Schema.Union([
177
+ Schema.Array(
178
+ Schema.Struct({
179
+ error: Schema.String,
180
+ resourceId: Schema.String,
181
+ resourceVersion: Schema.Number,
182
+ terminal: Schema.Boolean,
183
+ }).pipe(
184
+ Schema.encodeKeys({
185
+ error: "error",
186
+ resourceId: "resource_id",
187
+ resourceVersion: "resource_version",
188
+ terminal: "terminal",
189
+ }),
190
+ ),
191
+ ),
192
+ Schema.Null,
193
+ ]),
194
+ ),
195
+ }).pipe(
196
+ Schema.encodeKeys({
197
+ id: "id",
198
+ accountId: "account_id",
199
+ associationStatus: "association_status",
200
+ created: "created",
201
+ modified: "modified",
202
+ resources: "resources",
203
+ }),
204
+ ),
205
+ ) as unknown as Schema.Schema<ListRecipientsResponse>;
206
+
207
+ export type ListRecipientsError = DefaultErrors;
208
+
209
+ export const listRecipients: API.OperationMethod<
210
+ ListRecipientsRequest,
211
+ ListRecipientsResponse,
212
+ ListRecipientsError,
213
+ Credentials | HttpClient.HttpClient
214
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
215
+ input: ListRecipientsRequest,
216
+ output: ListRecipientsResponse,
217
+ errors: [],
218
+ }));
219
+
220
+ export interface CreateRecipientRequest {
221
+ shareId: string;
222
+ /** Path param: Account identifier. */
223
+ pathAccountId: string;
224
+ /** Body param: Account identifier. */
225
+ bodyAccountId?: string;
226
+ /** Body param: Organization identifier. */
227
+ organizationId?: string;
228
+ }
229
+
230
+ export const CreateRecipientRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
231
+ {
232
+ shareId: Schema.String.pipe(T.HttpPath("shareId")),
233
+ pathAccountId: Schema.String.pipe(T.HttpPath("path_account_id")),
234
+ bodyAccountId: Schema.optional(Schema.String),
235
+ organizationId: Schema.optional(Schema.String),
236
+ },
237
+ ).pipe(
238
+ Schema.encodeKeys({
239
+ bodyAccountId: "body_account_id",
240
+ organizationId: "organization_id",
241
+ }),
242
+ T.Http({
243
+ method: "POST",
244
+ path: "/accounts/{path_account_id}/shares/{shareId}/recipients",
245
+ }),
246
+ ) as unknown as Schema.Schema<CreateRecipientRequest>;
247
+
248
+ export interface CreateRecipientResponse {
249
+ /** Share Recipient identifier tag. */
250
+ id: string;
251
+ /** Account identifier. */
252
+ accountId: string;
253
+ /** Share Recipient association status. */
254
+ associationStatus:
255
+ | "associating"
256
+ | "associated"
257
+ | "disassociating"
258
+ | "disassociated";
259
+ /** When the share was created. */
260
+ created: string;
261
+ /** When the share was modified. */
262
+ modified: string;
263
+ resources?:
264
+ | {
265
+ error: string;
266
+ resourceId: string;
267
+ resourceVersion: number;
268
+ terminal: boolean;
269
+ }[]
270
+ | null;
271
+ }
272
+
273
+ export const CreateRecipientResponse =
274
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
275
+ id: Schema.String,
276
+ accountId: Schema.String,
277
+ associationStatus: Schema.Literals([
278
+ "associating",
279
+ "associated",
280
+ "disassociating",
281
+ "disassociated",
282
+ ]),
283
+ created: Schema.String,
284
+ modified: Schema.String,
285
+ resources: Schema.optional(
286
+ Schema.Union([
287
+ Schema.Array(
288
+ Schema.Struct({
289
+ error: Schema.String,
290
+ resourceId: Schema.String,
291
+ resourceVersion: Schema.Number,
292
+ terminal: Schema.Boolean,
293
+ }).pipe(
294
+ Schema.encodeKeys({
295
+ error: "error",
296
+ resourceId: "resource_id",
297
+ resourceVersion: "resource_version",
298
+ terminal: "terminal",
299
+ }),
300
+ ),
301
+ ),
302
+ Schema.Null,
303
+ ]),
304
+ ),
305
+ }).pipe(
306
+ Schema.encodeKeys({
307
+ id: "id",
308
+ accountId: "account_id",
309
+ associationStatus: "association_status",
310
+ created: "created",
311
+ modified: "modified",
312
+ resources: "resources",
313
+ }),
314
+ ) as unknown as Schema.Schema<CreateRecipientResponse>;
315
+
316
+ export type CreateRecipientError = DefaultErrors;
317
+
318
+ export const createRecipient: API.OperationMethod<
319
+ CreateRecipientRequest,
320
+ CreateRecipientResponse,
321
+ CreateRecipientError,
322
+ Credentials | HttpClient.HttpClient
323
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
324
+ input: CreateRecipientRequest,
325
+ output: CreateRecipientResponse,
326
+ errors: [],
327
+ }));
328
+
329
+ export interface DeleteRecipientRequest {
330
+ shareId: string;
331
+ recipientId: string;
332
+ /** Account identifier. */
333
+ accountId: string;
334
+ }
335
+
336
+ export const DeleteRecipientRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
337
+ {
338
+ shareId: Schema.String.pipe(T.HttpPath("shareId")),
339
+ recipientId: Schema.String.pipe(T.HttpPath("recipientId")),
340
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
341
+ },
342
+ ).pipe(
343
+ T.Http({
344
+ method: "DELETE",
345
+ path: "/accounts/{account_id}/shares/{shareId}/recipients/{recipientId}",
346
+ }),
347
+ ) as unknown as Schema.Schema<DeleteRecipientRequest>;
348
+
349
+ export interface DeleteRecipientResponse {
350
+ /** Share Recipient identifier tag. */
351
+ id: string;
352
+ /** Account identifier. */
353
+ accountId: string;
354
+ /** Share Recipient association status. */
355
+ associationStatus:
356
+ | "associating"
357
+ | "associated"
358
+ | "disassociating"
359
+ | "disassociated";
360
+ /** When the share was created. */
361
+ created: string;
362
+ /** When the share was modified. */
363
+ modified: string;
364
+ resources?:
365
+ | {
366
+ error: string;
367
+ resourceId: string;
368
+ resourceVersion: number;
369
+ terminal: boolean;
370
+ }[]
371
+ | null;
372
+ }
373
+
374
+ export const DeleteRecipientResponse =
375
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
376
+ id: Schema.String,
377
+ accountId: Schema.String,
378
+ associationStatus: Schema.Literals([
379
+ "associating",
380
+ "associated",
381
+ "disassociating",
382
+ "disassociated",
383
+ ]),
384
+ created: Schema.String,
385
+ modified: Schema.String,
386
+ resources: Schema.optional(
387
+ Schema.Union([
388
+ Schema.Array(
389
+ Schema.Struct({
390
+ error: Schema.String,
391
+ resourceId: Schema.String,
392
+ resourceVersion: Schema.Number,
393
+ terminal: Schema.Boolean,
394
+ }).pipe(
395
+ Schema.encodeKeys({
396
+ error: "error",
397
+ resourceId: "resource_id",
398
+ resourceVersion: "resource_version",
399
+ terminal: "terminal",
400
+ }),
401
+ ),
402
+ ),
403
+ Schema.Null,
404
+ ]),
405
+ ),
406
+ }).pipe(
407
+ Schema.encodeKeys({
408
+ id: "id",
409
+ accountId: "account_id",
410
+ associationStatus: "association_status",
411
+ created: "created",
412
+ modified: "modified",
413
+ resources: "resources",
414
+ }),
415
+ ) as unknown as Schema.Schema<DeleteRecipientResponse>;
416
+
417
+ export type DeleteRecipientError = DefaultErrors;
418
+
419
+ export const deleteRecipient: API.OperationMethod<
420
+ DeleteRecipientRequest,
421
+ DeleteRecipientResponse,
422
+ DeleteRecipientError,
423
+ Credentials | HttpClient.HttpClient
424
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
425
+ input: DeleteRecipientRequest,
426
+ output: DeleteRecipientResponse,
427
+ errors: [],
428
+ }));
429
+
430
+ // =============================================================================
431
+ // Resource
432
+ // =============================================================================
433
+
434
+ export interface GetResourceRequest {
435
+ shareId: string;
436
+ resourceId: string;
437
+ /** Account identifier. */
438
+ accountId: string;
439
+ }
440
+
441
+ export const GetResourceRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
442
+ shareId: Schema.String.pipe(T.HttpPath("shareId")),
443
+ resourceId: Schema.String.pipe(T.HttpPath("resourceId")),
444
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
445
+ }).pipe(
446
+ T.Http({
447
+ method: "GET",
448
+ path: "/accounts/{account_id}/shares/{shareId}/resources/{resourceId}",
449
+ }),
450
+ ) as unknown as Schema.Schema<GetResourceRequest>;
451
+
452
+ export interface GetResourceResponse {
453
+ /** Share Resource identifier. */
454
+ id: string;
455
+ /** When the share was created. */
456
+ created: string;
457
+ /** Resource Metadata. */
458
+ meta: unknown;
459
+ /** When the share was modified. */
460
+ modified: string;
461
+ /** Account identifier. */
462
+ resourceAccountId: string;
463
+ /** Share Resource identifier. */
464
+ resourceId: string;
465
+ /** Resource Type. */
466
+ resourceType:
467
+ | "custom-ruleset"
468
+ | "widget"
469
+ | "gateway-policy"
470
+ | "gateway-destination-ip"
471
+ | "gateway-block-page-settings"
472
+ | "gateway-extended-email-matching";
473
+ /** Resource Version. */
474
+ resourceVersion: number;
475
+ /** Resource Status. */
476
+ status: "active" | "deleting" | "deleted";
477
+ }
478
+
479
+ export const GetResourceResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
480
+ id: Schema.String,
481
+ created: Schema.String,
482
+ meta: Schema.Unknown,
483
+ modified: Schema.String,
484
+ resourceAccountId: Schema.String,
485
+ resourceId: Schema.String,
486
+ resourceType: Schema.Literals([
487
+ "custom-ruleset",
488
+ "widget",
489
+ "gateway-policy",
490
+ "gateway-destination-ip",
491
+ "gateway-block-page-settings",
492
+ "gateway-extended-email-matching",
493
+ ]),
494
+ resourceVersion: Schema.Number,
495
+ status: Schema.Literals(["active", "deleting", "deleted"]),
496
+ }).pipe(
497
+ Schema.encodeKeys({
498
+ id: "id",
499
+ created: "created",
500
+ meta: "meta",
501
+ modified: "modified",
502
+ resourceAccountId: "resource_account_id",
503
+ resourceId: "resource_id",
504
+ resourceType: "resource_type",
505
+ resourceVersion: "resource_version",
506
+ status: "status",
507
+ }),
508
+ ) as unknown as Schema.Schema<GetResourceResponse>;
509
+
510
+ export type GetResourceError = DefaultErrors;
511
+
512
+ export const getResource: API.OperationMethod<
513
+ GetResourceRequest,
514
+ GetResourceResponse,
515
+ GetResourceError,
516
+ Credentials | HttpClient.HttpClient
517
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
518
+ input: GetResourceRequest,
519
+ output: GetResourceResponse,
520
+ errors: [],
521
+ }));
522
+
523
+ export interface ListResourcesRequest {
524
+ shareId: string;
525
+ /** Path param: Account identifier. */
526
+ accountId: string;
527
+ /** Query param: Filter share resources by resource_type. */
528
+ resourceType?:
529
+ | "custom-ruleset"
530
+ | "widget"
531
+ | "gateway-policy"
532
+ | "gateway-destination-ip"
533
+ | "gateway-block-page-settings"
534
+ | "gateway-extended-email-matching";
535
+ /** Query param: Filter share resources by status. */
536
+ status?: "active" | "deleting" | "deleted";
537
+ }
538
+
539
+ export const ListResourcesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
540
+ shareId: Schema.String.pipe(T.HttpPath("shareId")),
541
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
542
+ resourceType: Schema.optional(
543
+ Schema.Literals([
544
+ "custom-ruleset",
545
+ "widget",
546
+ "gateway-policy",
547
+ "gateway-destination-ip",
548
+ "gateway-block-page-settings",
549
+ "gateway-extended-email-matching",
550
+ ]),
551
+ ).pipe(T.HttpQuery("resource_type")),
552
+ status: Schema.optional(
553
+ Schema.Literals(["active", "deleting", "deleted"]),
554
+ ).pipe(T.HttpQuery("status")),
555
+ }).pipe(
556
+ T.Http({
557
+ method: "GET",
558
+ path: "/accounts/{account_id}/shares/{shareId}/resources",
559
+ }),
560
+ ) as unknown as Schema.Schema<ListResourcesRequest>;
561
+
562
+ export type ListResourcesResponse = {
563
+ id: string;
564
+ created: string;
565
+ meta: unknown;
566
+ modified: string;
567
+ resourceAccountId: string;
568
+ resourceId: string;
569
+ resourceType:
570
+ | "custom-ruleset"
571
+ | "widget"
572
+ | "gateway-policy"
573
+ | "gateway-destination-ip"
574
+ | "gateway-block-page-settings"
575
+ | "gateway-extended-email-matching";
576
+ resourceVersion: number;
577
+ status: "active" | "deleting" | "deleted";
578
+ }[];
579
+
580
+ export const ListResourcesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
581
+ Schema.Struct({
582
+ id: Schema.String,
583
+ created: Schema.String,
584
+ meta: Schema.Unknown,
585
+ modified: Schema.String,
586
+ resourceAccountId: Schema.String,
587
+ resourceId: Schema.String,
588
+ resourceType: Schema.Literals([
589
+ "custom-ruleset",
590
+ "widget",
591
+ "gateway-policy",
592
+ "gateway-destination-ip",
593
+ "gateway-block-page-settings",
594
+ "gateway-extended-email-matching",
595
+ ]),
596
+ resourceVersion: Schema.Number,
597
+ status: Schema.Literals(["active", "deleting", "deleted"]),
598
+ }).pipe(
599
+ Schema.encodeKeys({
600
+ id: "id",
601
+ created: "created",
602
+ meta: "meta",
603
+ modified: "modified",
604
+ resourceAccountId: "resource_account_id",
605
+ resourceId: "resource_id",
606
+ resourceType: "resource_type",
607
+ resourceVersion: "resource_version",
608
+ status: "status",
609
+ }),
610
+ ),
611
+ ) as unknown as Schema.Schema<ListResourcesResponse>;
612
+
613
+ export type ListResourcesError = DefaultErrors;
614
+
615
+ export const listResources: API.OperationMethod<
616
+ ListResourcesRequest,
617
+ ListResourcesResponse,
618
+ ListResourcesError,
619
+ Credentials | HttpClient.HttpClient
620
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
621
+ input: ListResourcesRequest,
622
+ output: ListResourcesResponse,
623
+ errors: [],
624
+ }));
625
+
626
+ export interface CreateResourceRequest {
627
+ shareId: string;
628
+ /** Path param: Account identifier. */
629
+ accountId: string;
630
+ /** Body param: Resource Metadata. */
631
+ meta: unknown;
632
+ /** Body param: Account identifier. */
633
+ resourceAccountId: string;
634
+ /** Body param: Share Resource identifier. */
635
+ resourceId: string;
636
+ /** Body param: Resource Type. */
637
+ resourceType:
638
+ | "custom-ruleset"
639
+ | "widget"
640
+ | "gateway-policy"
641
+ | "gateway-destination-ip"
642
+ | "gateway-block-page-settings"
643
+ | "gateway-extended-email-matching";
644
+ }
645
+
646
+ export const CreateResourceRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
647
+ shareId: Schema.String.pipe(T.HttpPath("shareId")),
648
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
649
+ meta: Schema.Unknown,
650
+ resourceAccountId: Schema.String,
651
+ resourceId: Schema.String,
652
+ resourceType: Schema.Literals([
653
+ "custom-ruleset",
654
+ "widget",
655
+ "gateway-policy",
656
+ "gateway-destination-ip",
657
+ "gateway-block-page-settings",
658
+ "gateway-extended-email-matching",
659
+ ]),
660
+ }).pipe(
661
+ Schema.encodeKeys({
662
+ meta: "meta",
663
+ resourceAccountId: "resource_account_id",
664
+ resourceId: "resource_id",
665
+ resourceType: "resource_type",
666
+ }),
667
+ T.Http({
668
+ method: "POST",
669
+ path: "/accounts/{account_id}/shares/{shareId}/resources",
670
+ }),
671
+ ) as unknown as Schema.Schema<CreateResourceRequest>;
672
+
673
+ export interface CreateResourceResponse {
674
+ /** Share Resource identifier. */
675
+ id: string;
676
+ /** When the share was created. */
677
+ created: string;
678
+ /** Resource Metadata. */
679
+ meta: unknown;
680
+ /** When the share was modified. */
681
+ modified: string;
682
+ /** Account identifier. */
683
+ resourceAccountId: string;
684
+ /** Share Resource identifier. */
685
+ resourceId: string;
686
+ /** Resource Type. */
687
+ resourceType:
688
+ | "custom-ruleset"
689
+ | "widget"
690
+ | "gateway-policy"
691
+ | "gateway-destination-ip"
692
+ | "gateway-block-page-settings"
693
+ | "gateway-extended-email-matching";
694
+ /** Resource Version. */
695
+ resourceVersion: number;
696
+ /** Resource Status. */
697
+ status: "active" | "deleting" | "deleted";
698
+ }
699
+
700
+ export const CreateResourceResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
701
+ {
702
+ id: Schema.String,
703
+ created: Schema.String,
704
+ meta: Schema.Unknown,
705
+ modified: Schema.String,
706
+ resourceAccountId: Schema.String,
707
+ resourceId: Schema.String,
708
+ resourceType: Schema.Literals([
709
+ "custom-ruleset",
710
+ "widget",
711
+ "gateway-policy",
712
+ "gateway-destination-ip",
713
+ "gateway-block-page-settings",
714
+ "gateway-extended-email-matching",
715
+ ]),
716
+ resourceVersion: Schema.Number,
717
+ status: Schema.Literals(["active", "deleting", "deleted"]),
718
+ },
719
+ ).pipe(
720
+ Schema.encodeKeys({
721
+ id: "id",
722
+ created: "created",
723
+ meta: "meta",
724
+ modified: "modified",
725
+ resourceAccountId: "resource_account_id",
726
+ resourceId: "resource_id",
727
+ resourceType: "resource_type",
728
+ resourceVersion: "resource_version",
729
+ status: "status",
730
+ }),
731
+ ) as unknown as Schema.Schema<CreateResourceResponse>;
732
+
733
+ export type CreateResourceError = DefaultErrors;
734
+
735
+ export const createResource: API.OperationMethod<
736
+ CreateResourceRequest,
737
+ CreateResourceResponse,
738
+ CreateResourceError,
739
+ Credentials | HttpClient.HttpClient
740
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
741
+ input: CreateResourceRequest,
742
+ output: CreateResourceResponse,
743
+ errors: [],
744
+ }));
745
+
746
+ export interface UpdateResourceRequest {
747
+ shareId: string;
748
+ resourceId: string;
749
+ /** Path param: Account identifier. */
750
+ accountId: string;
751
+ /** Body param: Resource Metadata. */
752
+ meta: unknown;
753
+ }
754
+
755
+ export const UpdateResourceRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
756
+ shareId: Schema.String.pipe(T.HttpPath("shareId")),
757
+ resourceId: Schema.String.pipe(T.HttpPath("resourceId")),
758
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
759
+ meta: Schema.Unknown,
760
+ }).pipe(
761
+ T.Http({
762
+ method: "PUT",
763
+ path: "/accounts/{account_id}/shares/{shareId}/resources/{resourceId}",
764
+ }),
765
+ ) as unknown as Schema.Schema<UpdateResourceRequest>;
766
+
767
+ export interface UpdateResourceResponse {
768
+ /** Share Resource identifier. */
769
+ id: string;
770
+ /** When the share was created. */
771
+ created: string;
772
+ /** Resource Metadata. */
773
+ meta: unknown;
774
+ /** When the share was modified. */
775
+ modified: string;
776
+ /** Account identifier. */
777
+ resourceAccountId: string;
778
+ /** Share Resource identifier. */
779
+ resourceId: string;
780
+ /** Resource Type. */
781
+ resourceType:
782
+ | "custom-ruleset"
783
+ | "widget"
784
+ | "gateway-policy"
785
+ | "gateway-destination-ip"
786
+ | "gateway-block-page-settings"
787
+ | "gateway-extended-email-matching";
788
+ /** Resource Version. */
789
+ resourceVersion: number;
790
+ /** Resource Status. */
791
+ status: "active" | "deleting" | "deleted";
792
+ }
793
+
794
+ export const UpdateResourceResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
795
+ {
796
+ id: Schema.String,
797
+ created: Schema.String,
798
+ meta: Schema.Unknown,
799
+ modified: Schema.String,
800
+ resourceAccountId: Schema.String,
801
+ resourceId: Schema.String,
802
+ resourceType: Schema.Literals([
803
+ "custom-ruleset",
804
+ "widget",
805
+ "gateway-policy",
806
+ "gateway-destination-ip",
807
+ "gateway-block-page-settings",
808
+ "gateway-extended-email-matching",
809
+ ]),
810
+ resourceVersion: Schema.Number,
811
+ status: Schema.Literals(["active", "deleting", "deleted"]),
812
+ },
813
+ ).pipe(
814
+ Schema.encodeKeys({
815
+ id: "id",
816
+ created: "created",
817
+ meta: "meta",
818
+ modified: "modified",
819
+ resourceAccountId: "resource_account_id",
820
+ resourceId: "resource_id",
821
+ resourceType: "resource_type",
822
+ resourceVersion: "resource_version",
823
+ status: "status",
824
+ }),
825
+ ) as unknown as Schema.Schema<UpdateResourceResponse>;
826
+
827
+ export type UpdateResourceError = DefaultErrors;
828
+
829
+ export const updateResource: API.OperationMethod<
830
+ UpdateResourceRequest,
831
+ UpdateResourceResponse,
832
+ UpdateResourceError,
833
+ Credentials | HttpClient.HttpClient
834
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
835
+ input: UpdateResourceRequest,
836
+ output: UpdateResourceResponse,
837
+ errors: [],
838
+ }));
839
+
840
+ export interface DeleteResourceRequest {
841
+ shareId: string;
842
+ resourceId: string;
843
+ /** Account identifier. */
844
+ accountId: string;
845
+ }
846
+
847
+ export const DeleteResourceRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
848
+ shareId: Schema.String.pipe(T.HttpPath("shareId")),
849
+ resourceId: Schema.String.pipe(T.HttpPath("resourceId")),
850
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
851
+ }).pipe(
852
+ T.Http({
853
+ method: "DELETE",
854
+ path: "/accounts/{account_id}/shares/{shareId}/resources/{resourceId}",
855
+ }),
856
+ ) as unknown as Schema.Schema<DeleteResourceRequest>;
857
+
858
+ export interface DeleteResourceResponse {
859
+ /** Share Resource identifier. */
860
+ id: string;
861
+ /** When the share was created. */
862
+ created: string;
863
+ /** Resource Metadata. */
864
+ meta: unknown;
865
+ /** When the share was modified. */
866
+ modified: string;
867
+ /** Account identifier. */
868
+ resourceAccountId: string;
869
+ /** Share Resource identifier. */
870
+ resourceId: string;
871
+ /** Resource Type. */
872
+ resourceType:
873
+ | "custom-ruleset"
874
+ | "widget"
875
+ | "gateway-policy"
876
+ | "gateway-destination-ip"
877
+ | "gateway-block-page-settings"
878
+ | "gateway-extended-email-matching";
879
+ /** Resource Version. */
880
+ resourceVersion: number;
881
+ /** Resource Status. */
882
+ status: "active" | "deleting" | "deleted";
883
+ }
884
+
885
+ export const DeleteResourceResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
886
+ {
887
+ id: Schema.String,
888
+ created: Schema.String,
889
+ meta: Schema.Unknown,
890
+ modified: Schema.String,
891
+ resourceAccountId: Schema.String,
892
+ resourceId: Schema.String,
893
+ resourceType: Schema.Literals([
894
+ "custom-ruleset",
895
+ "widget",
896
+ "gateway-policy",
897
+ "gateway-destination-ip",
898
+ "gateway-block-page-settings",
899
+ "gateway-extended-email-matching",
900
+ ]),
901
+ resourceVersion: Schema.Number,
902
+ status: Schema.Literals(["active", "deleting", "deleted"]),
903
+ },
904
+ ).pipe(
905
+ Schema.encodeKeys({
906
+ id: "id",
907
+ created: "created",
908
+ meta: "meta",
909
+ modified: "modified",
910
+ resourceAccountId: "resource_account_id",
911
+ resourceId: "resource_id",
912
+ resourceType: "resource_type",
913
+ resourceVersion: "resource_version",
914
+ status: "status",
915
+ }),
916
+ ) as unknown as Schema.Schema<DeleteResourceResponse>;
917
+
918
+ export type DeleteResourceError = DefaultErrors;
919
+
920
+ export const deleteResource: API.OperationMethod<
921
+ DeleteResourceRequest,
922
+ DeleteResourceResponse,
923
+ DeleteResourceError,
924
+ Credentials | HttpClient.HttpClient
925
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
926
+ input: DeleteResourceRequest,
927
+ output: DeleteResourceResponse,
928
+ errors: [],
929
+ }));
930
+
931
+ // =============================================================================
932
+ // ResourceSharing
933
+ // =============================================================================
934
+
935
+ export interface GetResourceSharingRequest {
936
+ shareId: string;
937
+ /** Path param: Account identifier. */
938
+ accountId: string;
939
+ /** Query param: Include recipient counts in the response. */
940
+ includeRecipientCounts?: boolean;
941
+ /** Query param: Include resources in the response. */
942
+ includeResources?: boolean;
943
+ }
944
+
945
+ export const GetResourceSharingRequest =
946
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
947
+ shareId: Schema.String.pipe(T.HttpPath("shareId")),
948
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
949
+ includeRecipientCounts: Schema.optional(Schema.Boolean).pipe(
950
+ T.HttpQuery("include_recipient_counts"),
951
+ ),
952
+ includeResources: Schema.optional(Schema.Boolean).pipe(
953
+ T.HttpQuery("include_resources"),
954
+ ),
955
+ }).pipe(
956
+ T.Http({ method: "GET", path: "/accounts/{account_id}/shares/{shareId}" }),
957
+ ) as unknown as Schema.Schema<GetResourceSharingRequest>;
958
+
959
+ export interface GetResourceSharingResponse {
960
+ /** Share identifier tag. */
961
+ id: string;
962
+ /** Account identifier. */
963
+ accountId: string;
964
+ /** The display name of an account. */
965
+ accountName: string;
966
+ /** When the share was created. */
967
+ created: string;
968
+ /** When the share was modified. */
969
+ modified: string;
970
+ /** The name of the share. */
971
+ name: string;
972
+ /** Organization identifier. */
973
+ organizationId: string;
974
+ status: "active" | "deleting" | "deleted";
975
+ targetType: "account" | "organization";
976
+ /** The number of recipients in the 'associated' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
977
+ associatedRecipientCount?: number | null;
978
+ /** The number of recipients in the 'associating' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
979
+ associatingRecipientCount?: number | null;
980
+ /** The number of recipients in the 'disassociated' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
981
+ disassociatedRecipientCount?: number | null;
982
+ /** The number of recipients in the 'disassociating' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
983
+ disassociatingRecipientCount?: number | null;
984
+ kind?: "sent" | "received" | null;
985
+ /** A list of resources that are part of the share. This field is only included when requested via the 'include_resources' parameter. */
986
+ resources?:
987
+ | {
988
+ id: string;
989
+ created: string;
990
+ meta: unknown;
991
+ modified: string;
992
+ resourceAccountId: string;
993
+ resourceId: string;
994
+ resourceType:
995
+ | "custom-ruleset"
996
+ | "widget"
997
+ | "gateway-policy"
998
+ | "gateway-destination-ip"
999
+ | "gateway-block-page-settings"
1000
+ | "gateway-extended-email-matching";
1001
+ resourceVersion: number;
1002
+ status: "active" | "deleting" | "deleted";
1003
+ }[]
1004
+ | null;
1005
+ }
1006
+
1007
+ export const GetResourceSharingResponse =
1008
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1009
+ id: Schema.String,
1010
+ accountId: Schema.String,
1011
+ accountName: Schema.String,
1012
+ created: Schema.String,
1013
+ modified: Schema.String,
1014
+ name: Schema.String,
1015
+ organizationId: Schema.String,
1016
+ status: Schema.Literals(["active", "deleting", "deleted"]),
1017
+ targetType: Schema.Literals(["account", "organization"]),
1018
+ associatedRecipientCount: Schema.optional(
1019
+ Schema.Union([Schema.Number, Schema.Null]),
1020
+ ),
1021
+ associatingRecipientCount: Schema.optional(
1022
+ Schema.Union([Schema.Number, Schema.Null]),
1023
+ ),
1024
+ disassociatedRecipientCount: Schema.optional(
1025
+ Schema.Union([Schema.Number, Schema.Null]),
1026
+ ),
1027
+ disassociatingRecipientCount: Schema.optional(
1028
+ Schema.Union([Schema.Number, Schema.Null]),
1029
+ ),
1030
+ kind: Schema.optional(
1031
+ Schema.Union([Schema.Literals(["sent", "received"]), Schema.Null]),
1032
+ ),
1033
+ resources: Schema.optional(
1034
+ Schema.Union([
1035
+ Schema.Array(
1036
+ Schema.Struct({
1037
+ id: Schema.String,
1038
+ created: Schema.String,
1039
+ meta: Schema.Unknown,
1040
+ modified: Schema.String,
1041
+ resourceAccountId: Schema.String,
1042
+ resourceId: Schema.String,
1043
+ resourceType: Schema.Literals([
1044
+ "custom-ruleset",
1045
+ "widget",
1046
+ "gateway-policy",
1047
+ "gateway-destination-ip",
1048
+ "gateway-block-page-settings",
1049
+ "gateway-extended-email-matching",
1050
+ ]),
1051
+ resourceVersion: Schema.Number,
1052
+ status: Schema.Literals(["active", "deleting", "deleted"]),
1053
+ }).pipe(
1054
+ Schema.encodeKeys({
1055
+ id: "id",
1056
+ created: "created",
1057
+ meta: "meta",
1058
+ modified: "modified",
1059
+ resourceAccountId: "resource_account_id",
1060
+ resourceId: "resource_id",
1061
+ resourceType: "resource_type",
1062
+ resourceVersion: "resource_version",
1063
+ status: "status",
1064
+ }),
1065
+ ),
1066
+ ),
1067
+ Schema.Null,
1068
+ ]),
1069
+ ),
1070
+ }).pipe(
1071
+ Schema.encodeKeys({
1072
+ id: "id",
1073
+ accountId: "account_id",
1074
+ accountName: "account_name",
1075
+ created: "created",
1076
+ modified: "modified",
1077
+ name: "name",
1078
+ organizationId: "organization_id",
1079
+ status: "status",
1080
+ targetType: "target_type",
1081
+ associatedRecipientCount: "associated_recipient_count",
1082
+ associatingRecipientCount: "associating_recipient_count",
1083
+ disassociatedRecipientCount: "disassociated_recipient_count",
1084
+ disassociatingRecipientCount: "disassociating_recipient_count",
1085
+ kind: "kind",
1086
+ resources: "resources",
1087
+ }),
1088
+ ) as unknown as Schema.Schema<GetResourceSharingResponse>;
1089
+
1090
+ export type GetResourceSharingError = DefaultErrors;
1091
+
1092
+ export const getResourceSharing: API.OperationMethod<
1093
+ GetResourceSharingRequest,
1094
+ GetResourceSharingResponse,
1095
+ GetResourceSharingError,
1096
+ Credentials | HttpClient.HttpClient
1097
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1098
+ input: GetResourceSharingRequest,
1099
+ output: GetResourceSharingResponse,
1100
+ errors: [],
1101
+ }));
1102
+
1103
+ export interface ListResourceSharingsRequest {
1104
+ /** Path param: Account identifier. */
1105
+ accountId: string;
1106
+ /** Query param: Direction to sort objects. */
1107
+ direction?: "asc" | "desc";
1108
+ /** Query param: Include recipient counts in the response. */
1109
+ includeRecipientCounts?: boolean;
1110
+ /** Query param: Include resources in the response. */
1111
+ includeResources?: boolean;
1112
+ /** Query param: Filter shares by kind. */
1113
+ kind?: "sent" | "received";
1114
+ /** Query param: Order shares by values in the given field. */
1115
+ order?: "name" | "created";
1116
+ /** Query param: Filter share resources by resource_types. */
1117
+ resourceTypes?: (
1118
+ | "custom-ruleset"
1119
+ | "widget"
1120
+ | "gateway-policy"
1121
+ | "gateway-destination-ip"
1122
+ | "gateway-block-page-settings"
1123
+ | "gateway-extended-email-matching"
1124
+ )[];
1125
+ /** Query param: Filter shares by status. */
1126
+ status?: "active" | "deleting" | "deleted";
1127
+ /** Query param: Filter shares by target_type. */
1128
+ targetType?: "account" | "organization";
1129
+ }
1130
+
1131
+ export const ListResourceSharingsRequest =
1132
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1133
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1134
+ direction: Schema.optional(Schema.Literals(["asc", "desc"])).pipe(
1135
+ T.HttpQuery("direction"),
1136
+ ),
1137
+ includeRecipientCounts: Schema.optional(Schema.Boolean).pipe(
1138
+ T.HttpQuery("include_recipient_counts"),
1139
+ ),
1140
+ includeResources: Schema.optional(Schema.Boolean).pipe(
1141
+ T.HttpQuery("include_resources"),
1142
+ ),
1143
+ kind: Schema.optional(Schema.Literals(["sent", "received"])).pipe(
1144
+ T.HttpQuery("kind"),
1145
+ ),
1146
+ order: Schema.optional(Schema.Literals(["name", "created"])).pipe(
1147
+ T.HttpQuery("order"),
1148
+ ),
1149
+ resourceTypes: Schema.optional(
1150
+ Schema.Array(
1151
+ Schema.Literals([
1152
+ "custom-ruleset",
1153
+ "widget",
1154
+ "gateway-policy",
1155
+ "gateway-destination-ip",
1156
+ "gateway-block-page-settings",
1157
+ "gateway-extended-email-matching",
1158
+ ]),
1159
+ ),
1160
+ ).pipe(T.HttpQuery("resource_types")),
1161
+ status: Schema.optional(
1162
+ Schema.Literals(["active", "deleting", "deleted"]),
1163
+ ).pipe(T.HttpQuery("status")),
1164
+ targetType: Schema.optional(
1165
+ Schema.Literals(["account", "organization"]),
1166
+ ).pipe(T.HttpQuery("target_type")),
1167
+ }).pipe(
1168
+ T.Http({ method: "GET", path: "/accounts/{account_id}/shares" }),
1169
+ ) as unknown as Schema.Schema<ListResourceSharingsRequest>;
1170
+
1171
+ export type ListResourceSharingsResponse = {
1172
+ id: string;
1173
+ accountId: string;
1174
+ accountName: string;
1175
+ created: string;
1176
+ modified: string;
1177
+ name: string;
1178
+ organizationId: string;
1179
+ status: "active" | "deleting" | "deleted";
1180
+ targetType: "account" | "organization";
1181
+ associatedRecipientCount?: number | null;
1182
+ associatingRecipientCount?: number | null;
1183
+ disassociatedRecipientCount?: number | null;
1184
+ disassociatingRecipientCount?: number | null;
1185
+ kind?: "sent" | "received" | null;
1186
+ resources?:
1187
+ | {
1188
+ id: string;
1189
+ created: string;
1190
+ meta: unknown;
1191
+ modified: string;
1192
+ resourceAccountId: string;
1193
+ resourceId: string;
1194
+ resourceType:
1195
+ | "custom-ruleset"
1196
+ | "widget"
1197
+ | "gateway-policy"
1198
+ | "gateway-destination-ip"
1199
+ | "gateway-block-page-settings"
1200
+ | "gateway-extended-email-matching";
1201
+ resourceVersion: number;
1202
+ status: "active" | "deleting" | "deleted";
1203
+ }[]
1204
+ | null;
1205
+ }[];
1206
+
1207
+ export const ListResourceSharingsResponse =
1208
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
1209
+ Schema.Struct({
1210
+ id: Schema.String,
1211
+ accountId: Schema.String,
1212
+ accountName: Schema.String,
1213
+ created: Schema.String,
1214
+ modified: Schema.String,
1215
+ name: Schema.String,
1216
+ organizationId: Schema.String,
1217
+ status: Schema.Literals(["active", "deleting", "deleted"]),
1218
+ targetType: Schema.Literals(["account", "organization"]),
1219
+ associatedRecipientCount: Schema.optional(
1220
+ Schema.Union([Schema.Number, Schema.Null]),
1221
+ ),
1222
+ associatingRecipientCount: Schema.optional(
1223
+ Schema.Union([Schema.Number, Schema.Null]),
1224
+ ),
1225
+ disassociatedRecipientCount: Schema.optional(
1226
+ Schema.Union([Schema.Number, Schema.Null]),
1227
+ ),
1228
+ disassociatingRecipientCount: Schema.optional(
1229
+ Schema.Union([Schema.Number, Schema.Null]),
1230
+ ),
1231
+ kind: Schema.optional(
1232
+ Schema.Union([Schema.Literals(["sent", "received"]), Schema.Null]),
1233
+ ),
1234
+ resources: Schema.optional(
1235
+ Schema.Union([
1236
+ Schema.Array(
1237
+ Schema.Struct({
1238
+ id: Schema.String,
1239
+ created: Schema.String,
1240
+ meta: Schema.Unknown,
1241
+ modified: Schema.String,
1242
+ resourceAccountId: Schema.String,
1243
+ resourceId: Schema.String,
1244
+ resourceType: Schema.Literals([
1245
+ "custom-ruleset",
1246
+ "widget",
1247
+ "gateway-policy",
1248
+ "gateway-destination-ip",
1249
+ "gateway-block-page-settings",
1250
+ "gateway-extended-email-matching",
1251
+ ]),
1252
+ resourceVersion: Schema.Number,
1253
+ status: Schema.Literals(["active", "deleting", "deleted"]),
1254
+ }).pipe(
1255
+ Schema.encodeKeys({
1256
+ id: "id",
1257
+ created: "created",
1258
+ meta: "meta",
1259
+ modified: "modified",
1260
+ resourceAccountId: "resource_account_id",
1261
+ resourceId: "resource_id",
1262
+ resourceType: "resource_type",
1263
+ resourceVersion: "resource_version",
1264
+ status: "status",
1265
+ }),
1266
+ ),
1267
+ ),
1268
+ Schema.Null,
1269
+ ]),
1270
+ ),
1271
+ }).pipe(
1272
+ Schema.encodeKeys({
1273
+ id: "id",
1274
+ accountId: "account_id",
1275
+ accountName: "account_name",
1276
+ created: "created",
1277
+ modified: "modified",
1278
+ name: "name",
1279
+ organizationId: "organization_id",
1280
+ status: "status",
1281
+ targetType: "target_type",
1282
+ associatedRecipientCount: "associated_recipient_count",
1283
+ associatingRecipientCount: "associating_recipient_count",
1284
+ disassociatedRecipientCount: "disassociated_recipient_count",
1285
+ disassociatingRecipientCount: "disassociating_recipient_count",
1286
+ kind: "kind",
1287
+ resources: "resources",
1288
+ }),
1289
+ ),
1290
+ ) as unknown as Schema.Schema<ListResourceSharingsResponse>;
1291
+
1292
+ export type ListResourceSharingsError = DefaultErrors;
1293
+
1294
+ export const listResourceSharings: API.OperationMethod<
1295
+ ListResourceSharingsRequest,
1296
+ ListResourceSharingsResponse,
1297
+ ListResourceSharingsError,
1298
+ Credentials | HttpClient.HttpClient
1299
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1300
+ input: ListResourceSharingsRequest,
1301
+ output: ListResourceSharingsResponse,
1302
+ errors: [],
1303
+ }));
1304
+
1305
+ export interface CreateResourceSharingRequest {
1306
+ /** Path param: Account identifier. */
1307
+ accountId: string;
1308
+ /** Body param: The name of the share. */
1309
+ name: string;
1310
+ /** Body param: */
1311
+ recipients: { accountId?: string; organizationId?: string }[];
1312
+ /** Body param: */
1313
+ resources: {
1314
+ meta: unknown;
1315
+ resourceAccountId: string;
1316
+ resourceId: string;
1317
+ resourceType:
1318
+ | "custom-ruleset"
1319
+ | "widget"
1320
+ | "gateway-policy"
1321
+ | "gateway-destination-ip"
1322
+ | "gateway-block-page-settings"
1323
+ | "gateway-extended-email-matching";
1324
+ }[];
1325
+ }
1326
+
1327
+ export const CreateResourceSharingRequest =
1328
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1329
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1330
+ name: Schema.String,
1331
+ recipients: Schema.Array(
1332
+ Schema.Struct({
1333
+ accountId: Schema.optional(Schema.String),
1334
+ organizationId: Schema.optional(Schema.String),
1335
+ }).pipe(
1336
+ Schema.encodeKeys({
1337
+ accountId: "account_id",
1338
+ organizationId: "organization_id",
1339
+ }),
1340
+ ),
1341
+ ),
1342
+ resources: Schema.Array(
1343
+ Schema.Struct({
1344
+ meta: Schema.Unknown,
1345
+ resourceAccountId: Schema.String,
1346
+ resourceId: Schema.String,
1347
+ resourceType: Schema.Literals([
1348
+ "custom-ruleset",
1349
+ "widget",
1350
+ "gateway-policy",
1351
+ "gateway-destination-ip",
1352
+ "gateway-block-page-settings",
1353
+ "gateway-extended-email-matching",
1354
+ ]),
1355
+ }).pipe(
1356
+ Schema.encodeKeys({
1357
+ meta: "meta",
1358
+ resourceAccountId: "resource_account_id",
1359
+ resourceId: "resource_id",
1360
+ resourceType: "resource_type",
1361
+ }),
1362
+ ),
1363
+ ),
1364
+ }).pipe(
1365
+ T.Http({ method: "POST", path: "/accounts/{account_id}/shares" }),
1366
+ ) as unknown as Schema.Schema<CreateResourceSharingRequest>;
1367
+
1368
+ export interface CreateResourceSharingResponse {
1369
+ /** Share identifier tag. */
1370
+ id: string;
1371
+ /** Account identifier. */
1372
+ accountId: string;
1373
+ /** The display name of an account. */
1374
+ accountName: string;
1375
+ /** When the share was created. */
1376
+ created: string;
1377
+ /** When the share was modified. */
1378
+ modified: string;
1379
+ /** The name of the share. */
1380
+ name: string;
1381
+ /** Organization identifier. */
1382
+ organizationId: string;
1383
+ status: "active" | "deleting" | "deleted";
1384
+ targetType: "account" | "organization";
1385
+ /** The number of recipients in the 'associated' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
1386
+ associatedRecipientCount?: number | null;
1387
+ /** The number of recipients in the 'associating' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
1388
+ associatingRecipientCount?: number | null;
1389
+ /** The number of recipients in the 'disassociated' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
1390
+ disassociatedRecipientCount?: number | null;
1391
+ /** The number of recipients in the 'disassociating' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
1392
+ disassociatingRecipientCount?: number | null;
1393
+ kind?: "sent" | "received" | null;
1394
+ /** A list of resources that are part of the share. This field is only included when requested via the 'include_resources' parameter. */
1395
+ resources?:
1396
+ | {
1397
+ id: string;
1398
+ created: string;
1399
+ meta: unknown;
1400
+ modified: string;
1401
+ resourceAccountId: string;
1402
+ resourceId: string;
1403
+ resourceType:
1404
+ | "custom-ruleset"
1405
+ | "widget"
1406
+ | "gateway-policy"
1407
+ | "gateway-destination-ip"
1408
+ | "gateway-block-page-settings"
1409
+ | "gateway-extended-email-matching";
1410
+ resourceVersion: number;
1411
+ status: "active" | "deleting" | "deleted";
1412
+ }[]
1413
+ | null;
1414
+ }
1415
+
1416
+ export const CreateResourceSharingResponse =
1417
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1418
+ id: Schema.String,
1419
+ accountId: Schema.String,
1420
+ accountName: Schema.String,
1421
+ created: Schema.String,
1422
+ modified: Schema.String,
1423
+ name: Schema.String,
1424
+ organizationId: Schema.String,
1425
+ status: Schema.Literals(["active", "deleting", "deleted"]),
1426
+ targetType: Schema.Literals(["account", "organization"]),
1427
+ associatedRecipientCount: Schema.optional(
1428
+ Schema.Union([Schema.Number, Schema.Null]),
1429
+ ),
1430
+ associatingRecipientCount: Schema.optional(
1431
+ Schema.Union([Schema.Number, Schema.Null]),
1432
+ ),
1433
+ disassociatedRecipientCount: Schema.optional(
1434
+ Schema.Union([Schema.Number, Schema.Null]),
1435
+ ),
1436
+ disassociatingRecipientCount: Schema.optional(
1437
+ Schema.Union([Schema.Number, Schema.Null]),
1438
+ ),
1439
+ kind: Schema.optional(
1440
+ Schema.Union([Schema.Literals(["sent", "received"]), Schema.Null]),
1441
+ ),
1442
+ resources: Schema.optional(
1443
+ Schema.Union([
1444
+ Schema.Array(
1445
+ Schema.Struct({
1446
+ id: Schema.String,
1447
+ created: Schema.String,
1448
+ meta: Schema.Unknown,
1449
+ modified: Schema.String,
1450
+ resourceAccountId: Schema.String,
1451
+ resourceId: Schema.String,
1452
+ resourceType: Schema.Literals([
1453
+ "custom-ruleset",
1454
+ "widget",
1455
+ "gateway-policy",
1456
+ "gateway-destination-ip",
1457
+ "gateway-block-page-settings",
1458
+ "gateway-extended-email-matching",
1459
+ ]),
1460
+ resourceVersion: Schema.Number,
1461
+ status: Schema.Literals(["active", "deleting", "deleted"]),
1462
+ }).pipe(
1463
+ Schema.encodeKeys({
1464
+ id: "id",
1465
+ created: "created",
1466
+ meta: "meta",
1467
+ modified: "modified",
1468
+ resourceAccountId: "resource_account_id",
1469
+ resourceId: "resource_id",
1470
+ resourceType: "resource_type",
1471
+ resourceVersion: "resource_version",
1472
+ status: "status",
1473
+ }),
1474
+ ),
1475
+ ),
1476
+ Schema.Null,
1477
+ ]),
1478
+ ),
1479
+ }).pipe(
1480
+ Schema.encodeKeys({
1481
+ id: "id",
1482
+ accountId: "account_id",
1483
+ accountName: "account_name",
1484
+ created: "created",
1485
+ modified: "modified",
1486
+ name: "name",
1487
+ organizationId: "organization_id",
1488
+ status: "status",
1489
+ targetType: "target_type",
1490
+ associatedRecipientCount: "associated_recipient_count",
1491
+ associatingRecipientCount: "associating_recipient_count",
1492
+ disassociatedRecipientCount: "disassociated_recipient_count",
1493
+ disassociatingRecipientCount: "disassociating_recipient_count",
1494
+ kind: "kind",
1495
+ resources: "resources",
1496
+ }),
1497
+ ) as unknown as Schema.Schema<CreateResourceSharingResponse>;
1498
+
1499
+ export type CreateResourceSharingError = DefaultErrors;
1500
+
1501
+ export const createResourceSharing: API.OperationMethod<
1502
+ CreateResourceSharingRequest,
1503
+ CreateResourceSharingResponse,
1504
+ CreateResourceSharingError,
1505
+ Credentials | HttpClient.HttpClient
1506
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1507
+ input: CreateResourceSharingRequest,
1508
+ output: CreateResourceSharingResponse,
1509
+ errors: [],
1510
+ }));
1511
+
1512
+ export interface UpdateResourceSharingRequest {
1513
+ shareId: string;
1514
+ /** Path param: Account identifier. */
1515
+ accountId: string;
1516
+ /** Body param: The name of the share. */
1517
+ name: string;
1518
+ }
1519
+
1520
+ export const UpdateResourceSharingRequest =
1521
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1522
+ shareId: Schema.String.pipe(T.HttpPath("shareId")),
1523
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1524
+ name: Schema.String,
1525
+ }).pipe(
1526
+ T.Http({ method: "PUT", path: "/accounts/{account_id}/shares/{shareId}" }),
1527
+ ) as unknown as Schema.Schema<UpdateResourceSharingRequest>;
1528
+
1529
+ export interface UpdateResourceSharingResponse {
1530
+ /** Share identifier tag. */
1531
+ id: string;
1532
+ /** Account identifier. */
1533
+ accountId: string;
1534
+ /** The display name of an account. */
1535
+ accountName: string;
1536
+ /** When the share was created. */
1537
+ created: string;
1538
+ /** When the share was modified. */
1539
+ modified: string;
1540
+ /** The name of the share. */
1541
+ name: string;
1542
+ /** Organization identifier. */
1543
+ organizationId: string;
1544
+ status: "active" | "deleting" | "deleted";
1545
+ targetType: "account" | "organization";
1546
+ /** The number of recipients in the 'associated' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
1547
+ associatedRecipientCount?: number | null;
1548
+ /** The number of recipients in the 'associating' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
1549
+ associatingRecipientCount?: number | null;
1550
+ /** The number of recipients in the 'disassociated' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
1551
+ disassociatedRecipientCount?: number | null;
1552
+ /** The number of recipients in the 'disassociating' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
1553
+ disassociatingRecipientCount?: number | null;
1554
+ kind?: "sent" | "received" | null;
1555
+ /** A list of resources that are part of the share. This field is only included when requested via the 'include_resources' parameter. */
1556
+ resources?:
1557
+ | {
1558
+ id: string;
1559
+ created: string;
1560
+ meta: unknown;
1561
+ modified: string;
1562
+ resourceAccountId: string;
1563
+ resourceId: string;
1564
+ resourceType:
1565
+ | "custom-ruleset"
1566
+ | "widget"
1567
+ | "gateway-policy"
1568
+ | "gateway-destination-ip"
1569
+ | "gateway-block-page-settings"
1570
+ | "gateway-extended-email-matching";
1571
+ resourceVersion: number;
1572
+ status: "active" | "deleting" | "deleted";
1573
+ }[]
1574
+ | null;
1575
+ }
1576
+
1577
+ export const UpdateResourceSharingResponse =
1578
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1579
+ id: Schema.String,
1580
+ accountId: Schema.String,
1581
+ accountName: Schema.String,
1582
+ created: Schema.String,
1583
+ modified: Schema.String,
1584
+ name: Schema.String,
1585
+ organizationId: Schema.String,
1586
+ status: Schema.Literals(["active", "deleting", "deleted"]),
1587
+ targetType: Schema.Literals(["account", "organization"]),
1588
+ associatedRecipientCount: Schema.optional(
1589
+ Schema.Union([Schema.Number, Schema.Null]),
1590
+ ),
1591
+ associatingRecipientCount: Schema.optional(
1592
+ Schema.Union([Schema.Number, Schema.Null]),
1593
+ ),
1594
+ disassociatedRecipientCount: Schema.optional(
1595
+ Schema.Union([Schema.Number, Schema.Null]),
1596
+ ),
1597
+ disassociatingRecipientCount: Schema.optional(
1598
+ Schema.Union([Schema.Number, Schema.Null]),
1599
+ ),
1600
+ kind: Schema.optional(
1601
+ Schema.Union([Schema.Literals(["sent", "received"]), Schema.Null]),
1602
+ ),
1603
+ resources: Schema.optional(
1604
+ Schema.Union([
1605
+ Schema.Array(
1606
+ Schema.Struct({
1607
+ id: Schema.String,
1608
+ created: Schema.String,
1609
+ meta: Schema.Unknown,
1610
+ modified: Schema.String,
1611
+ resourceAccountId: Schema.String,
1612
+ resourceId: Schema.String,
1613
+ resourceType: Schema.Literals([
1614
+ "custom-ruleset",
1615
+ "widget",
1616
+ "gateway-policy",
1617
+ "gateway-destination-ip",
1618
+ "gateway-block-page-settings",
1619
+ "gateway-extended-email-matching",
1620
+ ]),
1621
+ resourceVersion: Schema.Number,
1622
+ status: Schema.Literals(["active", "deleting", "deleted"]),
1623
+ }).pipe(
1624
+ Schema.encodeKeys({
1625
+ id: "id",
1626
+ created: "created",
1627
+ meta: "meta",
1628
+ modified: "modified",
1629
+ resourceAccountId: "resource_account_id",
1630
+ resourceId: "resource_id",
1631
+ resourceType: "resource_type",
1632
+ resourceVersion: "resource_version",
1633
+ status: "status",
1634
+ }),
1635
+ ),
1636
+ ),
1637
+ Schema.Null,
1638
+ ]),
1639
+ ),
1640
+ }).pipe(
1641
+ Schema.encodeKeys({
1642
+ id: "id",
1643
+ accountId: "account_id",
1644
+ accountName: "account_name",
1645
+ created: "created",
1646
+ modified: "modified",
1647
+ name: "name",
1648
+ organizationId: "organization_id",
1649
+ status: "status",
1650
+ targetType: "target_type",
1651
+ associatedRecipientCount: "associated_recipient_count",
1652
+ associatingRecipientCount: "associating_recipient_count",
1653
+ disassociatedRecipientCount: "disassociated_recipient_count",
1654
+ disassociatingRecipientCount: "disassociating_recipient_count",
1655
+ kind: "kind",
1656
+ resources: "resources",
1657
+ }),
1658
+ ) as unknown as Schema.Schema<UpdateResourceSharingResponse>;
1659
+
1660
+ export type UpdateResourceSharingError = DefaultErrors;
1661
+
1662
+ export const updateResourceSharing: API.OperationMethod<
1663
+ UpdateResourceSharingRequest,
1664
+ UpdateResourceSharingResponse,
1665
+ UpdateResourceSharingError,
1666
+ Credentials | HttpClient.HttpClient
1667
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1668
+ input: UpdateResourceSharingRequest,
1669
+ output: UpdateResourceSharingResponse,
1670
+ errors: [],
1671
+ }));
1672
+
1673
+ export interface DeleteResourceSharingRequest {
1674
+ shareId: string;
1675
+ /** Account identifier. */
1676
+ accountId: string;
1677
+ }
1678
+
1679
+ export const DeleteResourceSharingRequest =
1680
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1681
+ shareId: Schema.String.pipe(T.HttpPath("shareId")),
1682
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1683
+ }).pipe(
1684
+ T.Http({
1685
+ method: "DELETE",
1686
+ path: "/accounts/{account_id}/shares/{shareId}",
1687
+ }),
1688
+ ) as unknown as Schema.Schema<DeleteResourceSharingRequest>;
1689
+
1690
+ export interface DeleteResourceSharingResponse {
1691
+ /** Share identifier tag. */
1692
+ id: string;
1693
+ /** Account identifier. */
1694
+ accountId: string;
1695
+ /** The display name of an account. */
1696
+ accountName: string;
1697
+ /** When the share was created. */
1698
+ created: string;
1699
+ /** When the share was modified. */
1700
+ modified: string;
1701
+ /** The name of the share. */
1702
+ name: string;
1703
+ /** Organization identifier. */
1704
+ organizationId: string;
1705
+ status: "active" | "deleting" | "deleted";
1706
+ targetType: "account" | "organization";
1707
+ /** The number of recipients in the 'associated' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
1708
+ associatedRecipientCount?: number | null;
1709
+ /** The number of recipients in the 'associating' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
1710
+ associatingRecipientCount?: number | null;
1711
+ /** The number of recipients in the 'disassociated' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
1712
+ disassociatedRecipientCount?: number | null;
1713
+ /** The number of recipients in the 'disassociating' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
1714
+ disassociatingRecipientCount?: number | null;
1715
+ kind?: "sent" | "received" | null;
1716
+ /** A list of resources that are part of the share. This field is only included when requested via the 'include_resources' parameter. */
1717
+ resources?:
1718
+ | {
1719
+ id: string;
1720
+ created: string;
1721
+ meta: unknown;
1722
+ modified: string;
1723
+ resourceAccountId: string;
1724
+ resourceId: string;
1725
+ resourceType:
1726
+ | "custom-ruleset"
1727
+ | "widget"
1728
+ | "gateway-policy"
1729
+ | "gateway-destination-ip"
1730
+ | "gateway-block-page-settings"
1731
+ | "gateway-extended-email-matching";
1732
+ resourceVersion: number;
1733
+ status: "active" | "deleting" | "deleted";
1734
+ }[]
1735
+ | null;
1736
+ }
1737
+
1738
+ export const DeleteResourceSharingResponse =
1739
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1740
+ id: Schema.String,
1741
+ accountId: Schema.String,
1742
+ accountName: Schema.String,
1743
+ created: Schema.String,
1744
+ modified: Schema.String,
1745
+ name: Schema.String,
1746
+ organizationId: Schema.String,
1747
+ status: Schema.Literals(["active", "deleting", "deleted"]),
1748
+ targetType: Schema.Literals(["account", "organization"]),
1749
+ associatedRecipientCount: Schema.optional(
1750
+ Schema.Union([Schema.Number, Schema.Null]),
1751
+ ),
1752
+ associatingRecipientCount: Schema.optional(
1753
+ Schema.Union([Schema.Number, Schema.Null]),
1754
+ ),
1755
+ disassociatedRecipientCount: Schema.optional(
1756
+ Schema.Union([Schema.Number, Schema.Null]),
1757
+ ),
1758
+ disassociatingRecipientCount: Schema.optional(
1759
+ Schema.Union([Schema.Number, Schema.Null]),
1760
+ ),
1761
+ kind: Schema.optional(
1762
+ Schema.Union([Schema.Literals(["sent", "received"]), Schema.Null]),
1763
+ ),
1764
+ resources: Schema.optional(
1765
+ Schema.Union([
1766
+ Schema.Array(
1767
+ Schema.Struct({
1768
+ id: Schema.String,
1769
+ created: Schema.String,
1770
+ meta: Schema.Unknown,
1771
+ modified: Schema.String,
1772
+ resourceAccountId: Schema.String,
1773
+ resourceId: Schema.String,
1774
+ resourceType: Schema.Literals([
1775
+ "custom-ruleset",
1776
+ "widget",
1777
+ "gateway-policy",
1778
+ "gateway-destination-ip",
1779
+ "gateway-block-page-settings",
1780
+ "gateway-extended-email-matching",
1781
+ ]),
1782
+ resourceVersion: Schema.Number,
1783
+ status: Schema.Literals(["active", "deleting", "deleted"]),
1784
+ }).pipe(
1785
+ Schema.encodeKeys({
1786
+ id: "id",
1787
+ created: "created",
1788
+ meta: "meta",
1789
+ modified: "modified",
1790
+ resourceAccountId: "resource_account_id",
1791
+ resourceId: "resource_id",
1792
+ resourceType: "resource_type",
1793
+ resourceVersion: "resource_version",
1794
+ status: "status",
1795
+ }),
1796
+ ),
1797
+ ),
1798
+ Schema.Null,
1799
+ ]),
1800
+ ),
1801
+ }).pipe(
1802
+ Schema.encodeKeys({
1803
+ id: "id",
1804
+ accountId: "account_id",
1805
+ accountName: "account_name",
1806
+ created: "created",
1807
+ modified: "modified",
1808
+ name: "name",
1809
+ organizationId: "organization_id",
1810
+ status: "status",
1811
+ targetType: "target_type",
1812
+ associatedRecipientCount: "associated_recipient_count",
1813
+ associatingRecipientCount: "associating_recipient_count",
1814
+ disassociatedRecipientCount: "disassociated_recipient_count",
1815
+ disassociatingRecipientCount: "disassociating_recipient_count",
1816
+ kind: "kind",
1817
+ resources: "resources",
1818
+ }),
1819
+ ) as unknown as Schema.Schema<DeleteResourceSharingResponse>;
1820
+
1821
+ export type DeleteResourceSharingError = DefaultErrors;
1822
+
1823
+ export const deleteResourceSharing: API.OperationMethod<
1824
+ DeleteResourceSharingRequest,
1825
+ DeleteResourceSharingResponse,
1826
+ DeleteResourceSharingError,
1827
+ Credentials | HttpClient.HttpClient
1828
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1829
+ input: DeleteResourceSharingRequest,
1830
+ output: DeleteResourceSharingResponse,
1831
+ errors: [],
1832
+ }));