@distilled.cloud/cloudflare 0.0.0-john

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