@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,1587 @@
1
+ /**
2
+ * Cloudflare USER API
3
+ *
4
+ * Generated from Cloudflare TypeScript SDK.
5
+ * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service user
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
+ // AuditLog
18
+ // =============================================================================
19
+
20
+ export interface ListAuditLogsRequest {}
21
+
22
+ export const ListAuditLogsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
23
+ {},
24
+ ).pipe(
25
+ T.Http({ method: "GET", path: "/user/audit_logs" }),
26
+ ) as unknown as Schema.Schema<ListAuditLogsRequest>;
27
+
28
+ export type ListAuditLogsResponse = unknown;
29
+
30
+ export const ListAuditLogsResponse =
31
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<ListAuditLogsResponse>;
32
+
33
+ export type ListAuditLogsError = DefaultErrors;
34
+
35
+ export const listAuditLogs: API.OperationMethod<
36
+ ListAuditLogsRequest,
37
+ ListAuditLogsResponse,
38
+ ListAuditLogsError,
39
+ Credentials | HttpClient.HttpClient
40
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
41
+ input: ListAuditLogsRequest,
42
+ output: ListAuditLogsResponse,
43
+ errors: [],
44
+ }));
45
+
46
+ // =============================================================================
47
+ // BillingHistory
48
+ // =============================================================================
49
+
50
+ export interface ListBillingHistoriesRequest {}
51
+
52
+ export const ListBillingHistoriesRequest =
53
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({}).pipe(
54
+ T.Http({ method: "GET", path: "/user/billing/history" }),
55
+ ) as unknown as Schema.Schema<ListBillingHistoriesRequest>;
56
+
57
+ export interface ListBillingHistoriesResponse {
58
+ result: {
59
+ id: string;
60
+ action: string;
61
+ amount: number;
62
+ currency: string;
63
+ description: string;
64
+ occurredAt: string;
65
+ type: string;
66
+ zone: { name?: string | null };
67
+ }[];
68
+ resultInfo: {
69
+ count?: number | null;
70
+ page?: number | null;
71
+ perPage?: number | null;
72
+ totalCount?: number | null;
73
+ };
74
+ }
75
+
76
+ export const ListBillingHistoriesResponse =
77
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
78
+ result: Schema.Array(
79
+ Schema.Struct({
80
+ id: Schema.String,
81
+ action: Schema.String,
82
+ amount: Schema.Number,
83
+ currency: Schema.String,
84
+ description: Schema.String,
85
+ occurredAt: Schema.String,
86
+ type: Schema.String,
87
+ zone: Schema.Struct({
88
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
89
+ }),
90
+ }).pipe(
91
+ Schema.encodeKeys({
92
+ id: "id",
93
+ action: "action",
94
+ amount: "amount",
95
+ currency: "currency",
96
+ description: "description",
97
+ occurredAt: "occurred_at",
98
+ type: "type",
99
+ zone: "zone",
100
+ }),
101
+ ),
102
+ ),
103
+ resultInfo: Schema.Struct({
104
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
105
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
106
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
107
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
108
+ }).pipe(
109
+ Schema.encodeKeys({
110
+ count: "count",
111
+ page: "page",
112
+ perPage: "per_page",
113
+ totalCount: "total_count",
114
+ }),
115
+ ),
116
+ }).pipe(
117
+ Schema.encodeKeys({ result: "result", resultInfo: "result_info" }),
118
+ ) as unknown as Schema.Schema<ListBillingHistoriesResponse>;
119
+
120
+ export type ListBillingHistoriesError = DefaultErrors;
121
+
122
+ export const listBillingHistories: API.PaginatedOperationMethod<
123
+ ListBillingHistoriesRequest,
124
+ ListBillingHistoriesResponse,
125
+ ListBillingHistoriesError,
126
+ Credentials | HttpClient.HttpClient
127
+ > & {
128
+ pages: (
129
+ input: ListBillingHistoriesRequest,
130
+ ) => stream.Stream<
131
+ ListBillingHistoriesResponse,
132
+ ListBillingHistoriesError,
133
+ Credentials | HttpClient.HttpClient
134
+ >;
135
+ items: (input: ListBillingHistoriesRequest) => stream.Stream<
136
+ {
137
+ id: string;
138
+ action: string;
139
+ amount: number;
140
+ currency: string;
141
+ description: string;
142
+ occurredAt: string;
143
+ type: string;
144
+ zone: { name?: string | null };
145
+ },
146
+ ListBillingHistoriesError,
147
+ Credentials | HttpClient.HttpClient
148
+ >;
149
+ } = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
150
+ input: ListBillingHistoriesRequest,
151
+ output: ListBillingHistoriesResponse,
152
+ errors: [],
153
+ pagination: {
154
+ mode: "page",
155
+ inputToken: "page",
156
+ outputToken: "resultInfo.page",
157
+ items: "result",
158
+ pageSize: "perPage",
159
+ } as const,
160
+ }));
161
+
162
+ // =============================================================================
163
+ // BillingProfile
164
+ // =============================================================================
165
+
166
+ export interface GetBillingProfileRequest {}
167
+
168
+ export const GetBillingProfileRequest =
169
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({}).pipe(
170
+ T.Http({ method: "GET", path: "/user/billing/profile" }),
171
+ ) as unknown as Schema.Schema<GetBillingProfileRequest>;
172
+
173
+ export interface GetBillingProfileResponse {
174
+ /** Billing item identifier tag. */
175
+ id?: string | null;
176
+ accountType?: string | null;
177
+ address?: string | null;
178
+ address2?: string | null;
179
+ balance?: string | null;
180
+ cardExpiryMonth?: number | null;
181
+ cardExpiryYear?: number | null;
182
+ cardNumber?: string | null;
183
+ city?: string | null;
184
+ company?: string | null;
185
+ country?: string | null;
186
+ createdOn?: string | null;
187
+ deviceData?: string | null;
188
+ editedOn?: string | null;
189
+ enterpriseBillingEmail?: string | null;
190
+ enterprisePrimaryEmail?: string | null;
191
+ firstName?: string | null;
192
+ isPartner?: boolean | null;
193
+ lastName?: string | null;
194
+ nextBillDate?: string | null;
195
+ paymentAddress?: string | null;
196
+ paymentAddress2?: string | null;
197
+ paymentCity?: string | null;
198
+ paymentCountry?: string | null;
199
+ paymentEmail?: string | null;
200
+ paymentFirstName?: string | null;
201
+ paymentGateway?: string | null;
202
+ paymentLastName?: string | null;
203
+ paymentNonce?: string | null;
204
+ paymentState?: string | null;
205
+ paymentZipcode?: string | null;
206
+ primaryEmail?: string | null;
207
+ state?: string | null;
208
+ taxIdType?: string | null;
209
+ telephone?: string | null;
210
+ useLegacy?: boolean | null;
211
+ validationCode?: string | null;
212
+ vat?: string | null;
213
+ zipcode?: string | null;
214
+ }
215
+
216
+ export const GetBillingProfileResponse =
217
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
218
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
219
+ accountType: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
220
+ address: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
221
+ address2: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
222
+ balance: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
223
+ cardExpiryMonth: Schema.optional(
224
+ Schema.Union([Schema.Number, Schema.Null]),
225
+ ),
226
+ cardExpiryYear: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
227
+ cardNumber: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
228
+ city: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
229
+ company: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
230
+ country: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
231
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
232
+ deviceData: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
233
+ editedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
234
+ enterpriseBillingEmail: Schema.optional(
235
+ Schema.Union([Schema.String, Schema.Null]),
236
+ ),
237
+ enterprisePrimaryEmail: Schema.optional(
238
+ Schema.Union([Schema.String, Schema.Null]),
239
+ ),
240
+ firstName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
241
+ isPartner: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
242
+ lastName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
243
+ nextBillDate: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
244
+ paymentAddress: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
245
+ paymentAddress2: Schema.optional(
246
+ Schema.Union([Schema.String, Schema.Null]),
247
+ ),
248
+ paymentCity: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
249
+ paymentCountry: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
250
+ paymentEmail: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
251
+ paymentFirstName: Schema.optional(
252
+ Schema.Union([Schema.String, Schema.Null]),
253
+ ),
254
+ paymentGateway: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
255
+ paymentLastName: Schema.optional(
256
+ Schema.Union([Schema.String, Schema.Null]),
257
+ ),
258
+ paymentNonce: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
259
+ paymentState: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
260
+ paymentZipcode: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
261
+ primaryEmail: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
262
+ state: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
263
+ taxIdType: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
264
+ telephone: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
265
+ useLegacy: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
266
+ validationCode: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
267
+ vat: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
268
+ zipcode: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
269
+ })
270
+ .pipe(
271
+ Schema.encodeKeys({
272
+ id: "id",
273
+ accountType: "account_type",
274
+ address: "address",
275
+ address2: "address2",
276
+ balance: "balance",
277
+ cardExpiryMonth: "card_expiry_month",
278
+ cardExpiryYear: "card_expiry_year",
279
+ cardNumber: "card_number",
280
+ city: "city",
281
+ company: "company",
282
+ country: "country",
283
+ createdOn: "created_on",
284
+ deviceData: "device_data",
285
+ editedOn: "edited_on",
286
+ enterpriseBillingEmail: "enterprise_billing_email",
287
+ enterprisePrimaryEmail: "enterprise_primary_email",
288
+ firstName: "first_name",
289
+ isPartner: "is_partner",
290
+ lastName: "last_name",
291
+ nextBillDate: "next_bill_date",
292
+ paymentAddress: "payment_address",
293
+ paymentAddress2: "payment_address2",
294
+ paymentCity: "payment_city",
295
+ paymentCountry: "payment_country",
296
+ paymentEmail: "payment_email",
297
+ paymentFirstName: "payment_first_name",
298
+ paymentGateway: "payment_gateway",
299
+ paymentLastName: "payment_last_name",
300
+ paymentNonce: "payment_nonce",
301
+ paymentState: "payment_state",
302
+ paymentZipcode: "payment_zipcode",
303
+ primaryEmail: "primary_email",
304
+ state: "state",
305
+ taxIdType: "tax_id_type",
306
+ telephone: "telephone",
307
+ useLegacy: "use_legacy",
308
+ validationCode: "validation_code",
309
+ vat: "vat",
310
+ zipcode: "zipcode",
311
+ }),
312
+ )
313
+ .pipe(
314
+ T.ResponsePath("result"),
315
+ ) as unknown as Schema.Schema<GetBillingProfileResponse>;
316
+
317
+ export type GetBillingProfileError = DefaultErrors;
318
+
319
+ export const getBillingProfile: API.OperationMethod<
320
+ GetBillingProfileRequest,
321
+ GetBillingProfileResponse,
322
+ GetBillingProfileError,
323
+ Credentials | HttpClient.HttpClient
324
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
325
+ input: GetBillingProfileRequest,
326
+ output: GetBillingProfileResponse,
327
+ errors: [],
328
+ }));
329
+
330
+ // =============================================================================
331
+ // Invite
332
+ // =============================================================================
333
+
334
+ export interface GetInviteRequest {
335
+ inviteId: string;
336
+ }
337
+
338
+ export const GetInviteRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
339
+ inviteId: Schema.String.pipe(T.HttpPath("inviteId")),
340
+ }).pipe(
341
+ T.Http({ method: "GET", path: "/user/invites/{inviteId}" }),
342
+ ) as unknown as Schema.Schema<GetInviteRequest>;
343
+
344
+ export interface GetInviteResponse {
345
+ /** ID of the user to add to the organization. */
346
+ invitedMemberId: string | null;
347
+ /** ID of the organization the user will be added to. */
348
+ organizationId: string;
349
+ /** Invite identifier tag. */
350
+ id?: string | null;
351
+ /** When the invite is no longer active. */
352
+ expiresOn?: string | null;
353
+ /** The email address of the user who created the invite. */
354
+ invitedBy?: string | null;
355
+ /** Email address of the user to add to the organization. */
356
+ invitedMemberEmail?: string | null;
357
+ /** When the invite was sent. */
358
+ invitedOn?: string | null;
359
+ organizationIsEnforcingTwofactor?: boolean | null;
360
+ /** Organization name. */
361
+ organizationName?: string | null;
362
+ /** List of role names the membership has for this account. */
363
+ roles?: string[] | null;
364
+ /** Current status of the invitation. */
365
+ status?: "pending" | "accepted" | "rejected" | "expired" | null;
366
+ }
367
+
368
+ export const GetInviteResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
369
+ invitedMemberId: Schema.Union([Schema.String, Schema.Null]),
370
+ organizationId: Schema.String,
371
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
372
+ expiresOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
373
+ invitedBy: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
374
+ invitedMemberEmail: Schema.optional(
375
+ Schema.Union([Schema.String, Schema.Null]),
376
+ ),
377
+ invitedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
378
+ organizationIsEnforcingTwofactor: Schema.optional(
379
+ Schema.Union([Schema.Boolean, Schema.Null]),
380
+ ),
381
+ organizationName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
382
+ roles: Schema.optional(
383
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
384
+ ),
385
+ status: Schema.optional(
386
+ Schema.Union([
387
+ Schema.Literals(["pending", "accepted", "rejected", "expired"]),
388
+ Schema.Null,
389
+ ]),
390
+ ),
391
+ })
392
+ .pipe(
393
+ Schema.encodeKeys({
394
+ invitedMemberId: "invited_member_id",
395
+ organizationId: "organization_id",
396
+ id: "id",
397
+ expiresOn: "expires_on",
398
+ invitedBy: "invited_by",
399
+ invitedMemberEmail: "invited_member_email",
400
+ invitedOn: "invited_on",
401
+ organizationIsEnforcingTwofactor: "organization_is_enforcing_twofactor",
402
+ organizationName: "organization_name",
403
+ roles: "roles",
404
+ status: "status",
405
+ }),
406
+ )
407
+ .pipe(
408
+ T.ResponsePath("result"),
409
+ ) as unknown as Schema.Schema<GetInviteResponse>;
410
+
411
+ export type GetInviteError = DefaultErrors;
412
+
413
+ export const getInvite: API.OperationMethod<
414
+ GetInviteRequest,
415
+ GetInviteResponse,
416
+ GetInviteError,
417
+ Credentials | HttpClient.HttpClient
418
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
419
+ input: GetInviteRequest,
420
+ output: GetInviteResponse,
421
+ errors: [],
422
+ }));
423
+
424
+ export interface ListInvitesRequest {}
425
+
426
+ export const ListInvitesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
427
+ {},
428
+ ).pipe(
429
+ T.Http({ method: "GET", path: "/user/invites" }),
430
+ ) as unknown as Schema.Schema<ListInvitesRequest>;
431
+
432
+ export interface ListInvitesResponse {
433
+ result: {
434
+ invitedMemberId: string | null;
435
+ organizationId: string;
436
+ id?: string | null;
437
+ expiresOn?: string | null;
438
+ invitedBy?: string | null;
439
+ invitedMemberEmail?: string | null;
440
+ invitedOn?: string | null;
441
+ organizationIsEnforcingTwofactor?: boolean | null;
442
+ organizationName?: string | null;
443
+ roles?: string[] | null;
444
+ status?: "pending" | "accepted" | "rejected" | "expired" | null;
445
+ }[];
446
+ }
447
+
448
+ export const ListInvitesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
449
+ result: Schema.Array(
450
+ Schema.Struct({
451
+ invitedMemberId: Schema.Union([Schema.String, Schema.Null]),
452
+ organizationId: Schema.String,
453
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
454
+ expiresOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
455
+ invitedBy: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
456
+ invitedMemberEmail: Schema.optional(
457
+ Schema.Union([Schema.String, Schema.Null]),
458
+ ),
459
+ invitedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
460
+ organizationIsEnforcingTwofactor: Schema.optional(
461
+ Schema.Union([Schema.Boolean, Schema.Null]),
462
+ ),
463
+ organizationName: Schema.optional(
464
+ Schema.Union([Schema.String, Schema.Null]),
465
+ ),
466
+ roles: Schema.optional(
467
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
468
+ ),
469
+ status: Schema.optional(
470
+ Schema.Union([
471
+ Schema.Literals(["pending", "accepted", "rejected", "expired"]),
472
+ Schema.Null,
473
+ ]),
474
+ ),
475
+ }).pipe(
476
+ Schema.encodeKeys({
477
+ invitedMemberId: "invited_member_id",
478
+ organizationId: "organization_id",
479
+ id: "id",
480
+ expiresOn: "expires_on",
481
+ invitedBy: "invited_by",
482
+ invitedMemberEmail: "invited_member_email",
483
+ invitedOn: "invited_on",
484
+ organizationIsEnforcingTwofactor: "organization_is_enforcing_twofactor",
485
+ organizationName: "organization_name",
486
+ roles: "roles",
487
+ status: "status",
488
+ }),
489
+ ),
490
+ ),
491
+ }) as unknown as Schema.Schema<ListInvitesResponse>;
492
+
493
+ export type ListInvitesError = DefaultErrors;
494
+
495
+ export const listInvites: API.PaginatedOperationMethod<
496
+ ListInvitesRequest,
497
+ ListInvitesResponse,
498
+ ListInvitesError,
499
+ Credentials | HttpClient.HttpClient
500
+ > & {
501
+ pages: (
502
+ input: ListInvitesRequest,
503
+ ) => stream.Stream<
504
+ ListInvitesResponse,
505
+ ListInvitesError,
506
+ Credentials | HttpClient.HttpClient
507
+ >;
508
+ items: (input: ListInvitesRequest) => stream.Stream<
509
+ {
510
+ invitedMemberId: string | null;
511
+ organizationId: string;
512
+ id?: string | null;
513
+ expiresOn?: string | null;
514
+ invitedBy?: string | null;
515
+ invitedMemberEmail?: string | null;
516
+ invitedOn?: string | null;
517
+ organizationIsEnforcingTwofactor?: boolean | null;
518
+ organizationName?: string | null;
519
+ roles?: string[] | null;
520
+ status?: "pending" | "accepted" | "rejected" | "expired" | null;
521
+ },
522
+ ListInvitesError,
523
+ Credentials | HttpClient.HttpClient
524
+ >;
525
+ } = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
526
+ input: ListInvitesRequest,
527
+ output: ListInvitesResponse,
528
+ errors: [],
529
+ pagination: {
530
+ mode: "single",
531
+ items: "result",
532
+ } as const,
533
+ }));
534
+
535
+ export interface PatchInviteRequest {
536
+ inviteId: string;
537
+ /** Status of your response to the invitation (rejected or accepted). */
538
+ status: "accepted" | "rejected";
539
+ }
540
+
541
+ export const PatchInviteRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
542
+ inviteId: Schema.String.pipe(T.HttpPath("inviteId")),
543
+ status: Schema.Literals(["accepted", "rejected"]),
544
+ }).pipe(
545
+ T.Http({ method: "PATCH", path: "/user/invites/{inviteId}" }),
546
+ ) as unknown as Schema.Schema<PatchInviteRequest>;
547
+
548
+ export interface PatchInviteResponse {
549
+ /** ID of the user to add to the organization. */
550
+ invitedMemberId: string | null;
551
+ /** ID of the organization the user will be added to. */
552
+ organizationId: string;
553
+ /** Invite identifier tag. */
554
+ id?: string | null;
555
+ /** When the invite is no longer active. */
556
+ expiresOn?: string | null;
557
+ /** The email address of the user who created the invite. */
558
+ invitedBy?: string | null;
559
+ /** Email address of the user to add to the organization. */
560
+ invitedMemberEmail?: string | null;
561
+ /** When the invite was sent. */
562
+ invitedOn?: string | null;
563
+ organizationIsEnforcingTwofactor?: boolean | null;
564
+ /** Organization name. */
565
+ organizationName?: string | null;
566
+ /** List of role names the membership has for this account. */
567
+ roles?: string[] | null;
568
+ /** Current status of the invitation. */
569
+ status?: "pending" | "accepted" | "rejected" | "expired" | null;
570
+ }
571
+
572
+ export const PatchInviteResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
573
+ invitedMemberId: Schema.Union([Schema.String, Schema.Null]),
574
+ organizationId: Schema.String,
575
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
576
+ expiresOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
577
+ invitedBy: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
578
+ invitedMemberEmail: Schema.optional(
579
+ Schema.Union([Schema.String, Schema.Null]),
580
+ ),
581
+ invitedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
582
+ organizationIsEnforcingTwofactor: Schema.optional(
583
+ Schema.Union([Schema.Boolean, Schema.Null]),
584
+ ),
585
+ organizationName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
586
+ roles: Schema.optional(
587
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
588
+ ),
589
+ status: Schema.optional(
590
+ Schema.Union([
591
+ Schema.Literals(["pending", "accepted", "rejected", "expired"]),
592
+ Schema.Null,
593
+ ]),
594
+ ),
595
+ })
596
+ .pipe(
597
+ Schema.encodeKeys({
598
+ invitedMemberId: "invited_member_id",
599
+ organizationId: "organization_id",
600
+ id: "id",
601
+ expiresOn: "expires_on",
602
+ invitedBy: "invited_by",
603
+ invitedMemberEmail: "invited_member_email",
604
+ invitedOn: "invited_on",
605
+ organizationIsEnforcingTwofactor: "organization_is_enforcing_twofactor",
606
+ organizationName: "organization_name",
607
+ roles: "roles",
608
+ status: "status",
609
+ }),
610
+ )
611
+ .pipe(
612
+ T.ResponsePath("result"),
613
+ ) as unknown as Schema.Schema<PatchInviteResponse>;
614
+
615
+ export type PatchInviteError = DefaultErrors;
616
+
617
+ export const patchInvite: API.OperationMethod<
618
+ PatchInviteRequest,
619
+ PatchInviteResponse,
620
+ PatchInviteError,
621
+ Credentials | HttpClient.HttpClient
622
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
623
+ input: PatchInviteRequest,
624
+ output: PatchInviteResponse,
625
+ errors: [],
626
+ }));
627
+
628
+ // =============================================================================
629
+ // Organization
630
+ // =============================================================================
631
+
632
+ export interface GetOrganizationRequest {
633
+ organizationId: string;
634
+ }
635
+
636
+ export const GetOrganizationRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
637
+ {
638
+ organizationId: Schema.String.pipe(T.HttpPath("organizationId")),
639
+ },
640
+ ).pipe(
641
+ T.Http({ method: "GET", path: "/user/organizations/{organizationId}" }),
642
+ ) as unknown as Schema.Schema<GetOrganizationRequest>;
643
+
644
+ export type GetOrganizationResponse = unknown;
645
+
646
+ export const GetOrganizationResponse =
647
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown.pipe(
648
+ T.ResponsePath("result"),
649
+ ) as unknown as Schema.Schema<GetOrganizationResponse>;
650
+
651
+ export type GetOrganizationError = DefaultErrors;
652
+
653
+ export const getOrganization: API.OperationMethod<
654
+ GetOrganizationRequest,
655
+ GetOrganizationResponse,
656
+ GetOrganizationError,
657
+ Credentials | HttpClient.HttpClient
658
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
659
+ input: GetOrganizationRequest,
660
+ output: GetOrganizationResponse,
661
+ errors: [],
662
+ }));
663
+
664
+ export interface ListOrganizationsRequest {}
665
+
666
+ export const ListOrganizationsRequest =
667
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({}).pipe(
668
+ T.Http({ method: "GET", path: "/user/organizations" }),
669
+ ) as unknown as Schema.Schema<ListOrganizationsRequest>;
670
+
671
+ export interface ListOrganizationsResponse {
672
+ result: {
673
+ id?: string | null;
674
+ name?: string | null;
675
+ permissions?: string[] | null;
676
+ roles?: string[] | null;
677
+ status?: "member" | "invited" | null;
678
+ }[];
679
+ resultInfo: {
680
+ count?: number | null;
681
+ page?: number | null;
682
+ perPage?: number | null;
683
+ totalCount?: number | null;
684
+ };
685
+ }
686
+
687
+ export const ListOrganizationsResponse =
688
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
689
+ result: Schema.Array(
690
+ Schema.Struct({
691
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
692
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
693
+ permissions: Schema.optional(
694
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
695
+ ),
696
+ roles: Schema.optional(
697
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
698
+ ),
699
+ status: Schema.optional(
700
+ Schema.Union([Schema.Literals(["member", "invited"]), Schema.Null]),
701
+ ),
702
+ }),
703
+ ),
704
+ resultInfo: Schema.Struct({
705
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
706
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
707
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
708
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
709
+ }).pipe(
710
+ Schema.encodeKeys({
711
+ count: "count",
712
+ page: "page",
713
+ perPage: "per_page",
714
+ totalCount: "total_count",
715
+ }),
716
+ ),
717
+ }).pipe(
718
+ Schema.encodeKeys({ result: "result", resultInfo: "result_info" }),
719
+ ) as unknown as Schema.Schema<ListOrganizationsResponse>;
720
+
721
+ export type ListOrganizationsError = DefaultErrors;
722
+
723
+ export const listOrganizations: API.PaginatedOperationMethod<
724
+ ListOrganizationsRequest,
725
+ ListOrganizationsResponse,
726
+ ListOrganizationsError,
727
+ Credentials | HttpClient.HttpClient
728
+ > & {
729
+ pages: (
730
+ input: ListOrganizationsRequest,
731
+ ) => stream.Stream<
732
+ ListOrganizationsResponse,
733
+ ListOrganizationsError,
734
+ Credentials | HttpClient.HttpClient
735
+ >;
736
+ items: (input: ListOrganizationsRequest) => stream.Stream<
737
+ {
738
+ id?: string | null;
739
+ name?: string | null;
740
+ permissions?: string[] | null;
741
+ roles?: string[] | null;
742
+ status?: "member" | "invited" | null;
743
+ },
744
+ ListOrganizationsError,
745
+ Credentials | HttpClient.HttpClient
746
+ >;
747
+ } = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
748
+ input: ListOrganizationsRequest,
749
+ output: ListOrganizationsResponse,
750
+ errors: [],
751
+ pagination: {
752
+ mode: "page",
753
+ inputToken: "page",
754
+ outputToken: "resultInfo.page",
755
+ items: "result",
756
+ pageSize: "perPage",
757
+ } as const,
758
+ }));
759
+
760
+ export interface DeleteOrganizationRequest {
761
+ organizationId: string;
762
+ }
763
+
764
+ export const DeleteOrganizationRequest =
765
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
766
+ organizationId: Schema.String.pipe(T.HttpPath("organizationId")),
767
+ }).pipe(
768
+ T.Http({ method: "DELETE", path: "/user/organizations/{organizationId}" }),
769
+ ) as unknown as Schema.Schema<DeleteOrganizationRequest>;
770
+
771
+ export interface DeleteOrganizationResponse {
772
+ /** Identifier */
773
+ id?: string | null;
774
+ }
775
+
776
+ export const DeleteOrganizationResponse =
777
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
778
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
779
+ }) as unknown as Schema.Schema<DeleteOrganizationResponse>;
780
+
781
+ export type DeleteOrganizationError = DefaultErrors;
782
+
783
+ export const deleteOrganization: API.OperationMethod<
784
+ DeleteOrganizationRequest,
785
+ DeleteOrganizationResponse,
786
+ DeleteOrganizationError,
787
+ Credentials | HttpClient.HttpClient
788
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
789
+ input: DeleteOrganizationRequest,
790
+ output: DeleteOrganizationResponse,
791
+ errors: [],
792
+ }));
793
+
794
+ // =============================================================================
795
+ // Subscription
796
+ // =============================================================================
797
+
798
+ export interface GetSubscriptionRequest {}
799
+
800
+ export const GetSubscriptionRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
801
+ {},
802
+ ).pipe(
803
+ T.Http({ method: "GET", path: "/user/subscriptions" }),
804
+ ) as unknown as Schema.Schema<GetSubscriptionRequest>;
805
+
806
+ export type GetSubscriptionResponse = unknown;
807
+
808
+ export const GetSubscriptionResponse =
809
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<GetSubscriptionResponse>;
810
+
811
+ export type GetSubscriptionError = DefaultErrors;
812
+
813
+ export const getSubscription: API.OperationMethod<
814
+ GetSubscriptionRequest,
815
+ GetSubscriptionResponse,
816
+ GetSubscriptionError,
817
+ Credentials | HttpClient.HttpClient
818
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
819
+ input: GetSubscriptionRequest,
820
+ output: GetSubscriptionResponse,
821
+ errors: [],
822
+ }));
823
+
824
+ export interface PutSubscriptionRequest {
825
+ identifier: string;
826
+ /** How often the subscription is renewed automatically. */
827
+ frequency?: "weekly" | "monthly" | "quarterly" | "yearly";
828
+ /** The rate plan applied to the subscription. */
829
+ ratePlan?: unknown;
830
+ }
831
+
832
+ export const PutSubscriptionRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
833
+ {
834
+ identifier: Schema.String.pipe(T.HttpPath("identifier")),
835
+ frequency: Schema.optional(
836
+ Schema.Literals(["weekly", "monthly", "quarterly", "yearly"]),
837
+ ),
838
+ ratePlan: Schema.optional(Schema.Unknown),
839
+ },
840
+ ).pipe(
841
+ Schema.encodeKeys({ frequency: "frequency", ratePlan: "rate_plan" }),
842
+ T.Http({ method: "PUT", path: "/user/subscriptions/{identifier}" }),
843
+ ) as unknown as Schema.Schema<PutSubscriptionRequest>;
844
+
845
+ export type PutSubscriptionResponse = string | null;
846
+
847
+ export const PutSubscriptionResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Union(
848
+ [Schema.String, Schema.Null],
849
+ ).pipe(
850
+ T.ResponsePath("result"),
851
+ ) as unknown as Schema.Schema<PutSubscriptionResponse>;
852
+
853
+ export type PutSubscriptionError = DefaultErrors;
854
+
855
+ export const putSubscription: API.OperationMethod<
856
+ PutSubscriptionRequest,
857
+ PutSubscriptionResponse,
858
+ PutSubscriptionError,
859
+ Credentials | HttpClient.HttpClient
860
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
861
+ input: PutSubscriptionRequest,
862
+ output: PutSubscriptionResponse,
863
+ errors: [],
864
+ }));
865
+
866
+ export interface DeleteSubscriptionRequest {
867
+ identifier: string;
868
+ }
869
+
870
+ export const DeleteSubscriptionRequest =
871
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
872
+ identifier: Schema.String.pipe(T.HttpPath("identifier")),
873
+ }).pipe(
874
+ T.Http({ method: "DELETE", path: "/user/subscriptions/{identifier}" }),
875
+ ) as unknown as Schema.Schema<DeleteSubscriptionRequest>;
876
+
877
+ export interface DeleteSubscriptionResponse {
878
+ /** Subscription identifier tag. */
879
+ subscriptionId?: string | null;
880
+ }
881
+
882
+ export const DeleteSubscriptionResponse =
883
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
884
+ subscriptionId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
885
+ }).pipe(
886
+ Schema.encodeKeys({ subscriptionId: "subscription_id" }),
887
+ ) as unknown as Schema.Schema<DeleteSubscriptionResponse>;
888
+
889
+ export type DeleteSubscriptionError = DefaultErrors;
890
+
891
+ export const deleteSubscription: API.OperationMethod<
892
+ DeleteSubscriptionRequest,
893
+ DeleteSubscriptionResponse,
894
+ DeleteSubscriptionError,
895
+ Credentials | HttpClient.HttpClient
896
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
897
+ input: DeleteSubscriptionRequest,
898
+ output: DeleteSubscriptionResponse,
899
+ errors: [],
900
+ }));
901
+
902
+ // =============================================================================
903
+ // Token
904
+ // =============================================================================
905
+
906
+ export interface GetTokenRequest {
907
+ tokenId: string;
908
+ }
909
+
910
+ export const GetTokenRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
911
+ tokenId: Schema.String.pipe(T.HttpPath("tokenId")),
912
+ }).pipe(
913
+ T.Http({ method: "GET", path: "/user/tokens/{tokenId}" }),
914
+ ) as unknown as Schema.Schema<GetTokenRequest>;
915
+
916
+ export type GetTokenResponse = unknown;
917
+
918
+ export const GetTokenResponse =
919
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<GetTokenResponse>;
920
+
921
+ export type GetTokenError = DefaultErrors;
922
+
923
+ export const getToken: API.OperationMethod<
924
+ GetTokenRequest,
925
+ GetTokenResponse,
926
+ GetTokenError,
927
+ Credentials | HttpClient.HttpClient
928
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
929
+ input: GetTokenRequest,
930
+ output: GetTokenResponse,
931
+ errors: [],
932
+ }));
933
+
934
+ export interface ListTokensRequest {}
935
+
936
+ export const ListTokensRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
937
+ {},
938
+ ).pipe(
939
+ T.Http({ method: "GET", path: "/user/tokens" }),
940
+ ) as unknown as Schema.Schema<ListTokensRequest>;
941
+
942
+ export type ListTokensResponse = unknown;
943
+
944
+ export const ListTokensResponse =
945
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<ListTokensResponse>;
946
+
947
+ export type ListTokensError = DefaultErrors;
948
+
949
+ export const listTokens: API.OperationMethod<
950
+ ListTokensRequest,
951
+ ListTokensResponse,
952
+ ListTokensError,
953
+ Credentials | HttpClient.HttpClient
954
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
955
+ input: ListTokensRequest,
956
+ output: ListTokensResponse,
957
+ errors: [],
958
+ }));
959
+
960
+ export interface CreateTokenRequest {
961
+ /** Token name. */
962
+ name: string;
963
+ /** List of access policies assigned to the token. */
964
+ policies: unknown[];
965
+ condition?: { requestIp?: { in?: string[]; notIn?: string[] } };
966
+ /** The expiration time on or after which the JWT MUST NOT be accepted for processing. */
967
+ expiresOn?: string;
968
+ /** The time before which the token MUST NOT be accepted for processing. */
969
+ notBefore?: string;
970
+ }
971
+
972
+ export const CreateTokenRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
973
+ name: Schema.String,
974
+ policies: Schema.Array(Schema.Unknown),
975
+ condition: Schema.optional(
976
+ Schema.Struct({
977
+ requestIp: Schema.optional(
978
+ Schema.Struct({
979
+ in: Schema.optional(Schema.Array(Schema.String)),
980
+ notIn: Schema.optional(Schema.Array(Schema.String)),
981
+ }).pipe(Schema.encodeKeys({ in: "in", notIn: "not_in" })),
982
+ ),
983
+ }).pipe(Schema.encodeKeys({ requestIp: "request_ip" })),
984
+ ),
985
+ expiresOn: Schema.optional(Schema.String),
986
+ notBefore: Schema.optional(Schema.String),
987
+ }).pipe(
988
+ Schema.encodeKeys({
989
+ name: "name",
990
+ policies: "policies",
991
+ condition: "condition",
992
+ expiresOn: "expires_on",
993
+ notBefore: "not_before",
994
+ }),
995
+ T.Http({ method: "POST", path: "/user/tokens" }),
996
+ ) as unknown as Schema.Schema<CreateTokenRequest>;
997
+
998
+ export interface CreateTokenResponse {
999
+ /** Token identifier tag. */
1000
+ id?: string | null;
1001
+ condition?: {
1002
+ requestIp?: { in?: string[] | null; notIn?: string[] | null } | null;
1003
+ } | null;
1004
+ /** The expiration time on or after which the JWT MUST NOT be accepted for processing. */
1005
+ expiresOn?: string | null;
1006
+ /** The time on which the token was created. */
1007
+ issuedOn?: string | null;
1008
+ /** Last time the token was used. */
1009
+ lastUsedOn?: string | null;
1010
+ /** Last time the token was modified. */
1011
+ modifiedOn?: string | null;
1012
+ /** Token name. */
1013
+ name?: string | null;
1014
+ /** The time before which the token MUST NOT be accepted for processing. */
1015
+ notBefore?: string | null;
1016
+ /** List of access policies assigned to the token. */
1017
+ policies?: unknown[] | null;
1018
+ /** Status of the token. */
1019
+ status?: "active" | "disabled" | "expired" | null;
1020
+ /** The token value. */
1021
+ value?: string | null;
1022
+ }
1023
+
1024
+ export const CreateTokenResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1025
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1026
+ condition: Schema.optional(
1027
+ Schema.Union([
1028
+ Schema.Struct({
1029
+ requestIp: Schema.optional(
1030
+ Schema.Union([
1031
+ Schema.Struct({
1032
+ in: Schema.optional(
1033
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1034
+ ),
1035
+ notIn: Schema.optional(
1036
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1037
+ ),
1038
+ }).pipe(Schema.encodeKeys({ in: "in", notIn: "not_in" })),
1039
+ Schema.Null,
1040
+ ]),
1041
+ ),
1042
+ }).pipe(Schema.encodeKeys({ requestIp: "request_ip" })),
1043
+ Schema.Null,
1044
+ ]),
1045
+ ),
1046
+ expiresOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1047
+ issuedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1048
+ lastUsedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1049
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1050
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1051
+ notBefore: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1052
+ policies: Schema.optional(
1053
+ Schema.Union([Schema.Array(Schema.Unknown), Schema.Null]),
1054
+ ),
1055
+ status: Schema.optional(
1056
+ Schema.Union([
1057
+ Schema.Literals(["active", "disabled", "expired"]),
1058
+ Schema.Null,
1059
+ ]),
1060
+ ),
1061
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1062
+ })
1063
+ .pipe(
1064
+ Schema.encodeKeys({
1065
+ id: "id",
1066
+ condition: "condition",
1067
+ expiresOn: "expires_on",
1068
+ issuedOn: "issued_on",
1069
+ lastUsedOn: "last_used_on",
1070
+ modifiedOn: "modified_on",
1071
+ name: "name",
1072
+ notBefore: "not_before",
1073
+ policies: "policies",
1074
+ status: "status",
1075
+ value: "value",
1076
+ }),
1077
+ )
1078
+ .pipe(
1079
+ T.ResponsePath("result"),
1080
+ ) as unknown as Schema.Schema<CreateTokenResponse>;
1081
+
1082
+ export type CreateTokenError = DefaultErrors;
1083
+
1084
+ export const createToken: API.OperationMethod<
1085
+ CreateTokenRequest,
1086
+ CreateTokenResponse,
1087
+ CreateTokenError,
1088
+ Credentials | HttpClient.HttpClient
1089
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1090
+ input: CreateTokenRequest,
1091
+ output: CreateTokenResponse,
1092
+ errors: [],
1093
+ }));
1094
+
1095
+ export interface UpdateTokenRequest {
1096
+ tokenId: string;
1097
+ /** Token name. */
1098
+ name: string;
1099
+ /** List of access policies assigned to the token. */
1100
+ policies: unknown[];
1101
+ condition?: { requestIp?: { in?: string[]; notIn?: string[] } };
1102
+ /** The expiration time on or after which the JWT MUST NOT be accepted for processing. */
1103
+ expiresOn?: string;
1104
+ /** The time before which the token MUST NOT be accepted for processing. */
1105
+ notBefore?: string;
1106
+ /** Status of the token. */
1107
+ status?: "active" | "disabled" | "expired";
1108
+ }
1109
+
1110
+ export const UpdateTokenRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1111
+ tokenId: Schema.String.pipe(T.HttpPath("tokenId")),
1112
+ name: Schema.String,
1113
+ policies: Schema.Array(Schema.Unknown),
1114
+ condition: Schema.optional(
1115
+ Schema.Struct({
1116
+ requestIp: Schema.optional(
1117
+ Schema.Struct({
1118
+ in: Schema.optional(Schema.Array(Schema.String)),
1119
+ notIn: Schema.optional(Schema.Array(Schema.String)),
1120
+ }).pipe(Schema.encodeKeys({ in: "in", notIn: "not_in" })),
1121
+ ),
1122
+ }).pipe(Schema.encodeKeys({ requestIp: "request_ip" })),
1123
+ ),
1124
+ expiresOn: Schema.optional(Schema.String),
1125
+ notBefore: Schema.optional(Schema.String),
1126
+ status: Schema.optional(Schema.Literals(["active", "disabled", "expired"])),
1127
+ }).pipe(
1128
+ Schema.encodeKeys({
1129
+ name: "name",
1130
+ policies: "policies",
1131
+ condition: "condition",
1132
+ expiresOn: "expires_on",
1133
+ notBefore: "not_before",
1134
+ status: "status",
1135
+ }),
1136
+ T.Http({ method: "PUT", path: "/user/tokens/{tokenId}" }),
1137
+ ) as unknown as Schema.Schema<UpdateTokenRequest>;
1138
+
1139
+ export type UpdateTokenResponse = unknown;
1140
+
1141
+ export const UpdateTokenResponse =
1142
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<UpdateTokenResponse>;
1143
+
1144
+ export type UpdateTokenError = DefaultErrors;
1145
+
1146
+ export const updateToken: API.OperationMethod<
1147
+ UpdateTokenRequest,
1148
+ UpdateTokenResponse,
1149
+ UpdateTokenError,
1150
+ Credentials | HttpClient.HttpClient
1151
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1152
+ input: UpdateTokenRequest,
1153
+ output: UpdateTokenResponse,
1154
+ errors: [],
1155
+ }));
1156
+
1157
+ export interface DeleteTokenRequest {
1158
+ tokenId: string;
1159
+ }
1160
+
1161
+ export const DeleteTokenRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1162
+ tokenId: Schema.String.pipe(T.HttpPath("tokenId")),
1163
+ }).pipe(
1164
+ T.Http({ method: "DELETE", path: "/user/tokens/{tokenId}" }),
1165
+ ) as unknown as Schema.Schema<DeleteTokenRequest>;
1166
+
1167
+ export interface DeleteTokenResponse {
1168
+ /** Identifier */
1169
+ id: string;
1170
+ }
1171
+
1172
+ export const DeleteTokenResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1173
+ id: Schema.String,
1174
+ }).pipe(
1175
+ T.ResponsePath("result"),
1176
+ ) as unknown as Schema.Schema<DeleteTokenResponse>;
1177
+
1178
+ export type DeleteTokenError = DefaultErrors;
1179
+
1180
+ export const deleteToken: API.OperationMethod<
1181
+ DeleteTokenRequest,
1182
+ DeleteTokenResponse,
1183
+ DeleteTokenError,
1184
+ Credentials | HttpClient.HttpClient
1185
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1186
+ input: DeleteTokenRequest,
1187
+ output: DeleteTokenResponse,
1188
+ errors: [],
1189
+ }));
1190
+
1191
+ export interface VerifyTokenRequest {}
1192
+
1193
+ export const VerifyTokenRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
1194
+ {},
1195
+ ).pipe(
1196
+ T.Http({ method: "GET", path: "/user/tokens/verify" }),
1197
+ ) as unknown as Schema.Schema<VerifyTokenRequest>;
1198
+
1199
+ export interface VerifyTokenResponse {
1200
+ /** Token identifier tag. */
1201
+ id: string;
1202
+ /** Status of the token. */
1203
+ status: "active" | "disabled" | "expired";
1204
+ /** The expiration time on or after which the JWT MUST NOT be accepted for processing. */
1205
+ expiresOn?: string | null;
1206
+ /** The time before which the token MUST NOT be accepted for processing. */
1207
+ notBefore?: string | null;
1208
+ }
1209
+
1210
+ export const VerifyTokenResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1211
+ id: Schema.String,
1212
+ status: Schema.Literals(["active", "disabled", "expired"]),
1213
+ expiresOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1214
+ notBefore: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1215
+ })
1216
+ .pipe(
1217
+ Schema.encodeKeys({
1218
+ id: "id",
1219
+ status: "status",
1220
+ expiresOn: "expires_on",
1221
+ notBefore: "not_before",
1222
+ }),
1223
+ )
1224
+ .pipe(
1225
+ T.ResponsePath("result"),
1226
+ ) as unknown as Schema.Schema<VerifyTokenResponse>;
1227
+
1228
+ export type VerifyTokenError = DefaultErrors;
1229
+
1230
+ export const verifyToken: API.OperationMethod<
1231
+ VerifyTokenRequest,
1232
+ VerifyTokenResponse,
1233
+ VerifyTokenError,
1234
+ Credentials | HttpClient.HttpClient
1235
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1236
+ input: VerifyTokenRequest,
1237
+ output: VerifyTokenResponse,
1238
+ errors: [],
1239
+ }));
1240
+
1241
+ // =============================================================================
1242
+ // TokenPermissionGroup
1243
+ // =============================================================================
1244
+
1245
+ export interface ListTokenPermissionGroupsRequest {}
1246
+
1247
+ export const ListTokenPermissionGroupsRequest =
1248
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({}).pipe(
1249
+ T.Http({ method: "GET", path: "/user/tokens/permission_groups" }),
1250
+ ) as unknown as Schema.Schema<ListTokenPermissionGroupsRequest>;
1251
+
1252
+ export interface ListTokenPermissionGroupsResponse {
1253
+ result: {
1254
+ id?: string | null;
1255
+ name?: string | null;
1256
+ scopes?:
1257
+ | (
1258
+ | "com.cloudflare.api.account"
1259
+ | "com.cloudflare.api.account.zone"
1260
+ | "com.cloudflare.api.user"
1261
+ | "com.cloudflare.edge.r2.bucket"
1262
+ )[]
1263
+ | null;
1264
+ }[];
1265
+ }
1266
+
1267
+ export const ListTokenPermissionGroupsResponse =
1268
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1269
+ result: Schema.Array(
1270
+ Schema.Struct({
1271
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1272
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1273
+ scopes: Schema.optional(
1274
+ Schema.Union([
1275
+ Schema.Array(
1276
+ Schema.Literals([
1277
+ "com.cloudflare.api.account",
1278
+ "com.cloudflare.api.account.zone",
1279
+ "com.cloudflare.api.user",
1280
+ "com.cloudflare.edge.r2.bucket",
1281
+ ]),
1282
+ ),
1283
+ Schema.Null,
1284
+ ]),
1285
+ ),
1286
+ }),
1287
+ ),
1288
+ }) as unknown as Schema.Schema<ListTokenPermissionGroupsResponse>;
1289
+
1290
+ export type ListTokenPermissionGroupsError = DefaultErrors;
1291
+
1292
+ export const listTokenPermissionGroups: API.PaginatedOperationMethod<
1293
+ ListTokenPermissionGroupsRequest,
1294
+ ListTokenPermissionGroupsResponse,
1295
+ ListTokenPermissionGroupsError,
1296
+ Credentials | HttpClient.HttpClient
1297
+ > & {
1298
+ pages: (
1299
+ input: ListTokenPermissionGroupsRequest,
1300
+ ) => stream.Stream<
1301
+ ListTokenPermissionGroupsResponse,
1302
+ ListTokenPermissionGroupsError,
1303
+ Credentials | HttpClient.HttpClient
1304
+ >;
1305
+ items: (input: ListTokenPermissionGroupsRequest) => stream.Stream<
1306
+ {
1307
+ id?: string | null;
1308
+ name?: string | null;
1309
+ scopes?:
1310
+ | (
1311
+ | "com.cloudflare.api.account"
1312
+ | "com.cloudflare.api.account.zone"
1313
+ | "com.cloudflare.api.user"
1314
+ | "com.cloudflare.edge.r2.bucket"
1315
+ )[]
1316
+ | null;
1317
+ },
1318
+ ListTokenPermissionGroupsError,
1319
+ Credentials | HttpClient.HttpClient
1320
+ >;
1321
+ } = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
1322
+ input: ListTokenPermissionGroupsRequest,
1323
+ output: ListTokenPermissionGroupsResponse,
1324
+ errors: [],
1325
+ pagination: {
1326
+ mode: "single",
1327
+ items: "result",
1328
+ } as const,
1329
+ }));
1330
+
1331
+ // =============================================================================
1332
+ // TokenValue
1333
+ // =============================================================================
1334
+
1335
+ export interface PutTokenValueRequest {
1336
+ tokenId: string;
1337
+ }
1338
+
1339
+ export const PutTokenValueRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1340
+ tokenId: Schema.String.pipe(T.HttpPath("tokenId")),
1341
+ }).pipe(
1342
+ T.Http({ method: "PUT", path: "/user/tokens/{tokenId}/value" }),
1343
+ ) as unknown as Schema.Schema<PutTokenValueRequest>;
1344
+
1345
+ export type PutTokenValueResponse = unknown;
1346
+
1347
+ export const PutTokenValueResponse =
1348
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<PutTokenValueResponse>;
1349
+
1350
+ export type PutTokenValueError = DefaultErrors;
1351
+
1352
+ export const putTokenValue: API.OperationMethod<
1353
+ PutTokenValueRequest,
1354
+ PutTokenValueResponse,
1355
+ PutTokenValueError,
1356
+ Credentials | HttpClient.HttpClient
1357
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1358
+ input: PutTokenValueRequest,
1359
+ output: PutTokenValueResponse,
1360
+ errors: [],
1361
+ }));
1362
+
1363
+ // =============================================================================
1364
+ // User
1365
+ // =============================================================================
1366
+
1367
+ export interface GetUserRequest {}
1368
+
1369
+ export const GetUserRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
1370
+ {},
1371
+ ).pipe(
1372
+ T.Http({ method: "GET", path: "/user" }),
1373
+ ) as unknown as Schema.Schema<GetUserRequest>;
1374
+
1375
+ export interface GetUserResponse {
1376
+ /** Identifier of the user. */
1377
+ id?: string | null;
1378
+ /** Lists the betas that the user is participating in. */
1379
+ betas?: string[] | null;
1380
+ /** The country in which the user lives. */
1381
+ country?: string | null;
1382
+ /** User's first name */
1383
+ firstName?: string | null;
1384
+ /** Indicates whether user has any business zones */
1385
+ hasBusinessZones?: boolean | null;
1386
+ /** Indicates whether user has any enterprise zones */
1387
+ hasEnterpriseZones?: boolean | null;
1388
+ /** Indicates whether user has any pro zones */
1389
+ hasProZones?: boolean | null;
1390
+ /** User's last name */
1391
+ lastName?: string | null;
1392
+ organizations?: unknown[] | null;
1393
+ /** Indicates whether user has been suspended */
1394
+ suspended?: boolean | null;
1395
+ /** User's telephone number */
1396
+ telephone?: string | null;
1397
+ /** Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication. */
1398
+ twoFactorAuthenticationEnabled?: boolean | null;
1399
+ /** Indicates whether two-factor authentication is required by one of the accounts that the user is a member of. */
1400
+ twoFactorAuthenticationLocked?: boolean | null;
1401
+ /** The zipcode or postal code where the user lives. */
1402
+ zipcode?: string | null;
1403
+ }
1404
+
1405
+ export const GetUserResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1406
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1407
+ betas: Schema.optional(
1408
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1409
+ ),
1410
+ country: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1411
+ firstName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1412
+ hasBusinessZones: Schema.optional(
1413
+ Schema.Union([Schema.Boolean, Schema.Null]),
1414
+ ),
1415
+ hasEnterpriseZones: Schema.optional(
1416
+ Schema.Union([Schema.Boolean, Schema.Null]),
1417
+ ),
1418
+ hasProZones: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1419
+ lastName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1420
+ organizations: Schema.optional(
1421
+ Schema.Union([Schema.Array(Schema.Unknown), Schema.Null]),
1422
+ ),
1423
+ suspended: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1424
+ telephone: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1425
+ twoFactorAuthenticationEnabled: Schema.optional(
1426
+ Schema.Union([Schema.Boolean, Schema.Null]),
1427
+ ),
1428
+ twoFactorAuthenticationLocked: Schema.optional(
1429
+ Schema.Union([Schema.Boolean, Schema.Null]),
1430
+ ),
1431
+ zipcode: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1432
+ })
1433
+ .pipe(
1434
+ Schema.encodeKeys({
1435
+ id: "id",
1436
+ betas: "betas",
1437
+ country: "country",
1438
+ firstName: "first_name",
1439
+ hasBusinessZones: "has_business_zones",
1440
+ hasEnterpriseZones: "has_enterprise_zones",
1441
+ hasProZones: "has_pro_zones",
1442
+ lastName: "last_name",
1443
+ organizations: "organizations",
1444
+ suspended: "suspended",
1445
+ telephone: "telephone",
1446
+ twoFactorAuthenticationEnabled: "two_factor_authentication_enabled",
1447
+ twoFactorAuthenticationLocked: "two_factor_authentication_locked",
1448
+ zipcode: "zipcode",
1449
+ }),
1450
+ )
1451
+ .pipe(T.ResponsePath("result")) as unknown as Schema.Schema<GetUserResponse>;
1452
+
1453
+ export type GetUserError = DefaultErrors;
1454
+
1455
+ export const getUser: API.OperationMethod<
1456
+ GetUserRequest,
1457
+ GetUserResponse,
1458
+ GetUserError,
1459
+ Credentials | HttpClient.HttpClient
1460
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1461
+ input: GetUserRequest,
1462
+ output: GetUserResponse,
1463
+ errors: [],
1464
+ }));
1465
+
1466
+ export interface PatchUserRequest {
1467
+ /** The country in which the user lives. */
1468
+ country?: string | null;
1469
+ /** User's first name */
1470
+ firstName?: string | null;
1471
+ /** User's last name */
1472
+ lastName?: string | null;
1473
+ /** User's telephone number */
1474
+ telephone?: string | null;
1475
+ /** The zipcode or postal code where the user lives. */
1476
+ zipcode?: string | null;
1477
+ }
1478
+
1479
+ export const PatchUserRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1480
+ country: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1481
+ firstName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1482
+ lastName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1483
+ telephone: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1484
+ zipcode: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1485
+ }).pipe(
1486
+ Schema.encodeKeys({
1487
+ country: "country",
1488
+ firstName: "first_name",
1489
+ lastName: "last_name",
1490
+ telephone: "telephone",
1491
+ zipcode: "zipcode",
1492
+ }),
1493
+ T.Http({ method: "PATCH", path: "/user" }),
1494
+ ) as unknown as Schema.Schema<PatchUserRequest>;
1495
+
1496
+ export interface PatchUserResponse {
1497
+ /** Identifier of the user. */
1498
+ id?: string | null;
1499
+ /** Lists the betas that the user is participating in. */
1500
+ betas?: string[] | null;
1501
+ /** The country in which the user lives. */
1502
+ country?: string | null;
1503
+ /** User's first name */
1504
+ firstName?: string | null;
1505
+ /** Indicates whether user has any business zones */
1506
+ hasBusinessZones?: boolean | null;
1507
+ /** Indicates whether user has any enterprise zones */
1508
+ hasEnterpriseZones?: boolean | null;
1509
+ /** Indicates whether user has any pro zones */
1510
+ hasProZones?: boolean | null;
1511
+ /** User's last name */
1512
+ lastName?: string | null;
1513
+ organizations?: unknown[] | null;
1514
+ /** Indicates whether user has been suspended */
1515
+ suspended?: boolean | null;
1516
+ /** User's telephone number */
1517
+ telephone?: string | null;
1518
+ /** Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication. */
1519
+ twoFactorAuthenticationEnabled?: boolean | null;
1520
+ /** Indicates whether two-factor authentication is required by one of the accounts that the user is a member of. */
1521
+ twoFactorAuthenticationLocked?: boolean | null;
1522
+ /** The zipcode or postal code where the user lives. */
1523
+ zipcode?: string | null;
1524
+ }
1525
+
1526
+ export const PatchUserResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1527
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1528
+ betas: Schema.optional(
1529
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1530
+ ),
1531
+ country: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1532
+ firstName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1533
+ hasBusinessZones: Schema.optional(
1534
+ Schema.Union([Schema.Boolean, Schema.Null]),
1535
+ ),
1536
+ hasEnterpriseZones: Schema.optional(
1537
+ Schema.Union([Schema.Boolean, Schema.Null]),
1538
+ ),
1539
+ hasProZones: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1540
+ lastName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1541
+ organizations: Schema.optional(
1542
+ Schema.Union([Schema.Array(Schema.Unknown), Schema.Null]),
1543
+ ),
1544
+ suspended: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1545
+ telephone: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1546
+ twoFactorAuthenticationEnabled: Schema.optional(
1547
+ Schema.Union([Schema.Boolean, Schema.Null]),
1548
+ ),
1549
+ twoFactorAuthenticationLocked: Schema.optional(
1550
+ Schema.Union([Schema.Boolean, Schema.Null]),
1551
+ ),
1552
+ zipcode: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1553
+ })
1554
+ .pipe(
1555
+ Schema.encodeKeys({
1556
+ id: "id",
1557
+ betas: "betas",
1558
+ country: "country",
1559
+ firstName: "first_name",
1560
+ hasBusinessZones: "has_business_zones",
1561
+ hasEnterpriseZones: "has_enterprise_zones",
1562
+ hasProZones: "has_pro_zones",
1563
+ lastName: "last_name",
1564
+ organizations: "organizations",
1565
+ suspended: "suspended",
1566
+ telephone: "telephone",
1567
+ twoFactorAuthenticationEnabled: "two_factor_authentication_enabled",
1568
+ twoFactorAuthenticationLocked: "two_factor_authentication_locked",
1569
+ zipcode: "zipcode",
1570
+ }),
1571
+ )
1572
+ .pipe(
1573
+ T.ResponsePath("result"),
1574
+ ) as unknown as Schema.Schema<PatchUserResponse>;
1575
+
1576
+ export type PatchUserError = DefaultErrors;
1577
+
1578
+ export const patchUser: API.OperationMethod<
1579
+ PatchUserRequest,
1580
+ PatchUserResponse,
1581
+ PatchUserError,
1582
+ Credentials | HttpClient.HttpClient
1583
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1584
+ input: PatchUserRequest,
1585
+ output: PatchUserResponse,
1586
+ errors: [],
1587
+ }));