@clossir-tech/ts-sdk 0.10.6 → 0.11.0

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 (399) hide show
  1. package/README.md +69 -19
  2. package/esm/funcs/approvals-get-approvals-by-approval-id-status.d.ts +20 -0
  3. package/esm/funcs/approvals-get-approvals-by-approval-id-status.d.ts.map +1 -0
  4. package/esm/funcs/approvals-get-approvals-by-approval-id-status.js +96 -0
  5. package/esm/funcs/approvals-get-approvals-by-approval-id-status.js.map +1 -0
  6. package/esm/funcs/approvals-get-approvals-by-approval-id.d.ts +20 -0
  7. package/esm/funcs/approvals-get-approvals-by-approval-id.d.ts.map +1 -0
  8. package/esm/funcs/approvals-get-approvals-by-approval-id.js +100 -0
  9. package/esm/funcs/approvals-get-approvals-by-approval-id.js.map +1 -0
  10. package/esm/funcs/approvals-post-approvals.d.ts +20 -0
  11. package/esm/funcs/approvals-post-approvals.d.ts.map +1 -0
  12. package/esm/funcs/approvals-post-approvals.js +90 -0
  13. package/esm/funcs/approvals-post-approvals.js.map +1 -0
  14. package/esm/funcs/assets-post-orgs-by-org-id-assets-by-asset-id-allocate.js +3 -1
  15. package/esm/funcs/assets-post-orgs-by-org-id-assets-by-asset-id-allocate.js.map +1 -1
  16. package/esm/funcs/assets-post-orgs-by-org-id-assets-by-asset-id-documents.d.ts +4 -2
  17. package/esm/funcs/assets-post-orgs-by-org-id-assets-by-asset-id-documents.d.ts.map +1 -1
  18. package/esm/funcs/assets-post-orgs-by-org-id-assets-by-asset-id-documents.js +11 -19
  19. package/esm/funcs/assets-post-orgs-by-org-id-assets-by-asset-id-documents.js.map +1 -1
  20. package/esm/funcs/attestations-post-attestations.d.ts +1 -1
  21. package/esm/funcs/attestations-post-attestations.js +2 -2
  22. package/esm/funcs/attestations-post-attestations.js.map +1 -1
  23. package/esm/funcs/auth-post-auth-accept-invite.js +1 -1
  24. package/esm/funcs/auth-post-auth-accept-invite.js.map +1 -1
  25. package/esm/funcs/auth-post-auth-login.js +1 -1
  26. package/esm/funcs/auth-post-auth-login.js.map +1 -1
  27. package/esm/funcs/auth-post-auth-refresh.d.ts +1 -1
  28. package/esm/funcs/auth-post-auth-refresh.js +1 -1
  29. package/esm/funcs/bridge-get-orgs-by-org-id-bridge-history.d.ts +1 -1
  30. package/esm/funcs/bridge-get-orgs-by-org-id-bridge-history.js +1 -1
  31. package/esm/funcs/bridge-post-orgs-by-org-id-assets-by-asset-id-bridge.js +1 -1
  32. package/esm/funcs/bridge-post-orgs-by-org-id-assets-by-asset-id-bridge.js.map +1 -1
  33. package/esm/funcs/eligibility-post-eligibility-check.d.ts +20 -0
  34. package/esm/funcs/eligibility-post-eligibility-check.d.ts.map +1 -0
  35. package/esm/funcs/eligibility-post-eligibility-check.js +90 -0
  36. package/esm/funcs/eligibility-post-eligibility-check.js.map +1 -0
  37. package/esm/funcs/health-get-health.d.ts +1 -1
  38. package/esm/funcs/health-get-health.js +1 -1
  39. package/esm/funcs/mfa-post-auth-mfa-verify.js +2 -2
  40. package/esm/funcs/mfa-post-auth-mfa-verify.js.map +1 -1
  41. package/esm/funcs/o-auth-get-oauth-authorize.d.ts +1 -1
  42. package/esm/funcs/o-auth-get-oauth-authorize.js +1 -1
  43. package/esm/funcs/o-auth-get-oauth-userinfo.d.ts +2 -2
  44. package/esm/funcs/o-auth-get-oauth-userinfo.d.ts.map +1 -1
  45. package/esm/funcs/o-auth-get-oauth-userinfo.js +2 -2
  46. package/esm/funcs/o-auth-get-oauth-userinfo.js.map +1 -1
  47. package/esm/funcs/o-auth-management-delete-orgs-by-org-id-oauth-clients-by-client-id.js +2 -0
  48. package/esm/funcs/o-auth-management-delete-orgs-by-org-id-oauth-clients-by-client-id.js.map +1 -1
  49. package/esm/funcs/o-auth-management-post-orgs-by-org-id-oauth-clients.js +1 -1
  50. package/esm/funcs/o-auth-management-post-orgs-by-org-id-oauth-clients.js.map +1 -1
  51. package/esm/funcs/o-auth-management-put-orgs-by-org-id-oauth-clients-by-client-id.js +3 -1
  52. package/esm/funcs/o-auth-management-put-orgs-by-org-id-oauth-clients-by-client-id.js.map +1 -1
  53. package/esm/funcs/o-auth-post-oauth-token.d.ts +2 -2
  54. package/esm/funcs/o-auth-post-oauth-token.d.ts.map +1 -1
  55. package/esm/funcs/o-auth-post-oauth-token.js +2 -2
  56. package/esm/funcs/o-auth-post-oauth-token.js.map +1 -1
  57. package/esm/funcs/organizations-put-orgs-by-org-id-sub-orgs-by-sub-org-id-move.d.ts +4 -2
  58. package/esm/funcs/organizations-put-orgs-by-org-id-sub-orgs-by-sub-org-id-move.d.ts.map +1 -1
  59. package/esm/funcs/organizations-put-orgs-by-org-id-sub-orgs-by-sub-org-id-move.js +12 -22
  60. package/esm/funcs/organizations-put-orgs-by-org-id-sub-orgs-by-sub-org-id-move.js.map +1 -1
  61. package/esm/funcs/passport-get-login-passport-status.d.ts +18 -0
  62. package/esm/funcs/passport-get-login-passport-status.d.ts.map +1 -0
  63. package/esm/funcs/passport-get-login-passport-status.js +77 -0
  64. package/esm/funcs/passport-get-login-passport-status.js.map +1 -0
  65. package/esm/funcs/passport-get-passport-home.d.ts +17 -0
  66. package/esm/funcs/passport-get-passport-home.d.ts.map +1 -0
  67. package/esm/funcs/passport-get-passport-home.js +77 -0
  68. package/esm/funcs/passport-get-passport-home.js.map +1 -0
  69. package/esm/funcs/passport-get-passport-sign-in.d.ts +17 -0
  70. package/esm/funcs/passport-get-passport-sign-in.d.ts.map +1 -0
  71. package/esm/funcs/passport-get-passport-sign-in.js +75 -0
  72. package/esm/funcs/passport-get-passport-sign-in.js.map +1 -0
  73. package/esm/funcs/passport-post-login-passport-finish.d.ts +18 -0
  74. package/esm/funcs/passport-post-login-passport-finish.d.ts.map +1 -0
  75. package/esm/funcs/passport-post-login-passport-finish.js +89 -0
  76. package/esm/funcs/passport-post-login-passport-finish.js.map +1 -0
  77. package/esm/funcs/passport-post-passport-sign-in-decision.d.ts +18 -0
  78. package/esm/funcs/passport-post-passport-sign-in-decision.d.ts.map +1 -0
  79. package/esm/funcs/passport-post-passport-sign-in-decision.js +86 -0
  80. package/esm/funcs/passport-post-passport-sign-in-decision.js.map +1 -0
  81. package/esm/funcs/preflight-get-preflight-results-by-result-id.d.ts +20 -0
  82. package/esm/funcs/preflight-get-preflight-results-by-result-id.d.ts.map +1 -0
  83. package/esm/funcs/preflight-get-preflight-results-by-result-id.js +98 -0
  84. package/esm/funcs/preflight-get-preflight-results-by-result-id.js.map +1 -0
  85. package/esm/funcs/preflight-post-preflight-intents.d.ts +20 -0
  86. package/esm/funcs/preflight-post-preflight-intents.d.ts.map +1 -0
  87. package/esm/funcs/preflight-post-preflight-intents.js +90 -0
  88. package/esm/funcs/preflight-post-preflight-intents.js.map +1 -0
  89. package/esm/funcs/transfers-get-transfers.d.ts +1 -1
  90. package/esm/funcs/transfers-get-transfers.js +1 -1
  91. package/esm/funcs/travel-rule-post-travel-rule-records.d.ts +20 -0
  92. package/esm/funcs/travel-rule-post-travel-rule-records.d.ts.map +1 -0
  93. package/esm/funcs/travel-rule-post-travel-rule-records.js +90 -0
  94. package/esm/funcs/travel-rule-post-travel-rule-records.js.map +1 -0
  95. package/esm/funcs/ui-get-login.js +1 -0
  96. package/esm/funcs/ui-get-login.js.map +1 -1
  97. package/esm/lib/config.d.ts +2 -2
  98. package/esm/lib/config.js +2 -2
  99. package/esm/models/errors/get-approvals-by-approval-id.d.ts +41 -0
  100. package/esm/models/errors/get-approvals-by-approval-id.d.ts.map +1 -0
  101. package/esm/models/errors/get-approvals-by-approval-id.js +56 -0
  102. package/esm/models/errors/get-approvals-by-approval-id.js.map +1 -0
  103. package/esm/models/errors/get-oauth-authorize.d.ts +6 -6
  104. package/esm/models/errors/get-oauth-authorize.js +3 -3
  105. package/esm/models/errors/get-oauth-userinfo.d.ts +152 -4
  106. package/esm/models/errors/get-oauth-userinfo.d.ts.map +1 -1
  107. package/esm/models/errors/get-oauth-userinfo.js +166 -2
  108. package/esm/models/errors/get-oauth-userinfo.js.map +1 -1
  109. package/esm/models/errors/get-passport-home.d.ts +96 -0
  110. package/esm/models/errors/get-passport-home.d.ts.map +1 -0
  111. package/esm/models/errors/get-passport-home.js +114 -0
  112. package/esm/models/errors/get-passport-home.js.map +1 -0
  113. package/esm/models/errors/get-passport-sign-in.d.ts +96 -0
  114. package/esm/models/errors/get-passport-sign-in.d.ts.map +1 -0
  115. package/esm/models/errors/get-passport-sign-in.js +114 -0
  116. package/esm/models/errors/get-passport-sign-in.js.map +1 -0
  117. package/esm/models/errors/index.d.ts +6 -0
  118. package/esm/models/errors/index.d.ts.map +1 -1
  119. package/esm/models/errors/index.js +6 -0
  120. package/esm/models/errors/index.js.map +1 -1
  121. package/esm/models/errors/o-auth-error-response.d.ts +52 -0
  122. package/esm/models/errors/o-auth-error-response.d.ts.map +1 -0
  123. package/esm/models/errors/o-auth-error-response.js +63 -0
  124. package/esm/models/errors/o-auth-error-response.js.map +1 -0
  125. package/esm/models/errors/post-eligibility-check.d.ts +58 -0
  126. package/esm/models/errors/post-eligibility-check.d.ts.map +1 -0
  127. package/esm/models/errors/post-eligibility-check.js +66 -0
  128. package/esm/models/errors/post-eligibility-check.js.map +1 -0
  129. package/esm/models/errors/post-oauth-par.d.ts +10 -10
  130. package/esm/models/errors/post-oauth-par.js +5 -5
  131. package/esm/models/errors/post-oauth-revoke.d.ts +10 -10
  132. package/esm/models/errors/post-oauth-revoke.js +5 -5
  133. package/esm/models/errors/post-oauth-token.d.ts +99 -6
  134. package/esm/models/errors/post-oauth-token.d.ts.map +1 -1
  135. package/esm/models/errors/post-oauth-token.js +109 -3
  136. package/esm/models/errors/post-oauth-token.js.map +1 -1
  137. package/esm/models/errors/post-passport-sign-in-decision.d.ts +96 -0
  138. package/esm/models/errors/post-passport-sign-in-decision.d.ts.map +1 -0
  139. package/esm/models/errors/post-passport-sign-in-decision.js +115 -0
  140. package/esm/models/errors/post-passport-sign-in-decision.js.map +1 -0
  141. package/esm/models/errors/problem-details-error.d.ts +24 -0
  142. package/esm/models/errors/problem-details-error.d.ts.map +1 -1
  143. package/esm/models/errors/problem-details-error.js +21 -0
  144. package/esm/models/errors/problem-details-error.js.map +1 -1
  145. package/esm/models/operations/get-approvals-by-approval-id-status.d.ts +91 -0
  146. package/esm/models/operations/get-approvals-by-approval-id-status.d.ts.map +1 -0
  147. package/esm/models/operations/get-approvals-by-approval-id-status.js +60 -0
  148. package/esm/models/operations/get-approvals-by-approval-id-status.js.map +1 -0
  149. package/esm/models/operations/get-approvals-by-approval-id.d.ts +391 -0
  150. package/esm/models/operations/get-approvals-by-approval-id.d.ts.map +1 -0
  151. package/esm/models/operations/get-approvals-by-approval-id.js +299 -0
  152. package/esm/models/operations/get-approvals-by-approval-id.js.map +1 -0
  153. package/esm/models/operations/get-health.d.ts +8 -0
  154. package/esm/models/operations/get-health.d.ts.map +1 -1
  155. package/esm/models/operations/get-health.js +2 -0
  156. package/esm/models/operations/get-health.js.map +1 -1
  157. package/esm/models/operations/get-login-passport-status.d.ts +42 -0
  158. package/esm/models/operations/get-login-passport-status.d.ts.map +1 -0
  159. package/esm/models/operations/get-login-passport-status.js +45 -0
  160. package/esm/models/operations/get-login-passport-status.js.map +1 -0
  161. package/esm/models/operations/get-login.d.ts +2 -0
  162. package/esm/models/operations/get-login.d.ts.map +1 -1
  163. package/esm/models/operations/get-login.js +1 -0
  164. package/esm/models/operations/get-login.js.map +1 -1
  165. package/esm/models/operations/get-oauth-userinfo.d.ts +48 -0
  166. package/esm/models/operations/get-oauth-userinfo.d.ts.map +1 -1
  167. package/esm/models/operations/get-oauth-userinfo.js +32 -0
  168. package/esm/models/operations/get-oauth-userinfo.js.map +1 -1
  169. package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-compliance-policy.d.ts +1 -0
  170. package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-compliance-policy.d.ts.map +1 -1
  171. package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-compliance-policy.js +1 -0
  172. package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id-compliance-policy.js.map +1 -1
  173. package/esm/models/operations/get-orgs-by-org-id-oauth-clients-by-client-id.d.ts +47 -0
  174. package/esm/models/operations/get-orgs-by-org-id-oauth-clients-by-client-id.d.ts.map +1 -1
  175. package/esm/models/operations/get-orgs-by-org-id-oauth-clients-by-client-id.js +41 -0
  176. package/esm/models/operations/get-orgs-by-org-id-oauth-clients-by-client-id.js.map +1 -1
  177. package/esm/models/operations/get-orgs-by-org-id-oauth-clients.d.ts +47 -0
  178. package/esm/models/operations/get-orgs-by-org-id-oauth-clients.d.ts.map +1 -1
  179. package/esm/models/operations/get-orgs-by-org-id-oauth-clients.js +40 -0
  180. package/esm/models/operations/get-orgs-by-org-id-oauth-clients.js.map +1 -1
  181. package/esm/models/operations/get-passport-home.d.ts +9 -0
  182. package/esm/models/operations/get-passport-home.d.ts.map +1 -0
  183. package/esm/models/operations/get-passport-home.js +10 -0
  184. package/esm/models/operations/get-passport-home.js.map +1 -0
  185. package/esm/models/operations/get-passport-sign-in.d.ts +9 -0
  186. package/esm/models/operations/get-passport-sign-in.d.ts.map +1 -0
  187. package/esm/models/operations/get-passport-sign-in.js +10 -0
  188. package/esm/models/operations/get-passport-sign-in.js.map +1 -0
  189. package/esm/models/operations/get-preflight-results-by-result-id.d.ts +329 -0
  190. package/esm/models/operations/get-preflight-results-by-result-id.d.ts.map +1 -0
  191. package/esm/models/operations/get-preflight-results-by-result-id.js +280 -0
  192. package/esm/models/operations/get-preflight-results-by-result-id.js.map +1 -0
  193. package/esm/models/operations/index.d.ts +12 -0
  194. package/esm/models/operations/index.d.ts.map +1 -1
  195. package/esm/models/operations/index.js +12 -0
  196. package/esm/models/operations/index.js.map +1 -1
  197. package/esm/models/operations/post-approvals.d.ts +114 -0
  198. package/esm/models/operations/post-approvals.d.ts.map +1 -0
  199. package/esm/models/operations/post-approvals.js +76 -0
  200. package/esm/models/operations/post-approvals.js.map +1 -0
  201. package/esm/models/operations/post-attestations.d.ts +24 -7
  202. package/esm/models/operations/post-attestations.d.ts.map +1 -1
  203. package/esm/models/operations/post-attestations.js +7 -1
  204. package/esm/models/operations/post-attestations.js.map +1 -1
  205. package/esm/models/operations/post-auth-verify-email.d.ts +10 -10
  206. package/esm/models/operations/post-auth-verify-email.d.ts.map +1 -1
  207. package/esm/models/operations/post-auth-verify-email.js +8 -8
  208. package/esm/models/operations/post-auth-verify-email.js.map +1 -1
  209. package/esm/models/operations/post-consent.d.ts +2 -0
  210. package/esm/models/operations/post-consent.d.ts.map +1 -1
  211. package/esm/models/operations/post-consent.js +2 -0
  212. package/esm/models/operations/post-consent.js.map +1 -1
  213. package/esm/models/operations/post-eligibility-check.d.ts +45 -0
  214. package/esm/models/operations/post-eligibility-check.d.ts.map +1 -0
  215. package/esm/models/operations/post-eligibility-check.js +43 -0
  216. package/esm/models/operations/post-eligibility-check.js.map +1 -0
  217. package/esm/models/operations/post-login-passport-finish.d.ts +24 -0
  218. package/esm/models/operations/post-login-passport-finish.d.ts.map +1 -0
  219. package/esm/models/operations/post-login-passport-finish.js +31 -0
  220. package/esm/models/operations/post-login-passport-finish.js.map +1 -0
  221. package/esm/models/operations/post-oauth-token.d.ts +22 -9
  222. package/esm/models/operations/post-oauth-token.d.ts.map +1 -1
  223. package/esm/models/operations/post-oauth-token.js +25 -6
  224. package/esm/models/operations/post-oauth-token.js.map +1 -1
  225. package/esm/models/operations/post-orgs-by-org-id-assets-by-asset-id-allocate.d.ts +4 -4
  226. package/esm/models/operations/post-orgs-by-org-id-assets-by-asset-id-allocate.d.ts.map +1 -1
  227. package/esm/models/operations/post-orgs-by-org-id-assets-by-asset-id-allocate.js +5 -4
  228. package/esm/models/operations/post-orgs-by-org-id-assets-by-asset-id-allocate.js.map +1 -1
  229. package/esm/models/operations/post-orgs-by-org-id-assets-by-asset-id-compliance-policy.d.ts +2 -0
  230. package/esm/models/operations/post-orgs-by-org-id-assets-by-asset-id-compliance-policy.d.ts.map +1 -1
  231. package/esm/models/operations/post-orgs-by-org-id-assets-by-asset-id-compliance-policy.js +2 -0
  232. package/esm/models/operations/post-orgs-by-org-id-assets-by-asset-id-compliance-policy.js.map +1 -1
  233. package/esm/models/operations/post-orgs-by-org-id-assets-by-asset-id-documents.d.ts +0 -12
  234. package/esm/models/operations/post-orgs-by-org-id-assets-by-asset-id-documents.d.ts.map +1 -1
  235. package/esm/models/operations/post-orgs-by-org-id-assets-by-asset-id-documents.js +0 -8
  236. package/esm/models/operations/post-orgs-by-org-id-assets-by-asset-id-documents.js.map +1 -1
  237. package/esm/models/operations/post-orgs-by-org-id-oauth-clients.d.ts +101 -0
  238. package/esm/models/operations/post-orgs-by-org-id-oauth-clients.d.ts.map +1 -1
  239. package/esm/models/operations/post-orgs-by-org-id-oauth-clients.js +81 -0
  240. package/esm/models/operations/post-orgs-by-org-id-oauth-clients.js.map +1 -1
  241. package/esm/models/operations/post-passport-sign-in-decision.d.ts +25 -0
  242. package/esm/models/operations/post-passport-sign-in-decision.d.ts.map +1 -0
  243. package/esm/models/operations/post-passport-sign-in-decision.js +27 -0
  244. package/esm/models/operations/post-passport-sign-in-decision.js.map +1 -0
  245. package/esm/models/operations/post-preflight-intents.d.ts +367 -0
  246. package/esm/models/operations/post-preflight-intents.d.ts.map +1 -0
  247. package/esm/models/operations/post-preflight-intents.js +299 -0
  248. package/esm/models/operations/post-preflight-intents.js.map +1 -0
  249. package/esm/models/operations/post-preflight.d.ts +8 -8
  250. package/esm/models/operations/post-preflight.d.ts.map +1 -1
  251. package/esm/models/operations/post-preflight.js +7 -7
  252. package/esm/models/operations/post-preflight.js.map +1 -1
  253. package/esm/models/operations/post-travel-rule-records.d.ts +27 -0
  254. package/esm/models/operations/post-travel-rule-records.d.ts.map +1 -0
  255. package/esm/models/operations/post-travel-rule-records.js +24 -0
  256. package/esm/models/operations/post-travel-rule-records.js.map +1 -0
  257. package/esm/models/operations/put-orgs-by-org-id-oauth-clients-by-client-id.d.ts +101 -0
  258. package/esm/models/operations/put-orgs-by-org-id-oauth-clients-by-client-id.d.ts.map +1 -1
  259. package/esm/models/operations/put-orgs-by-org-id-oauth-clients-by-client-id.js +79 -0
  260. package/esm/models/operations/put-orgs-by-org-id-oauth-clients-by-client-id.js.map +1 -1
  261. package/esm/models/operations/put-orgs-by-org-id-sub-orgs-by-sub-org-id-move.d.ts +0 -12
  262. package/esm/models/operations/put-orgs-by-org-id-sub-orgs-by-sub-org-id-move.d.ts.map +1 -1
  263. package/esm/models/operations/put-orgs-by-org-id-sub-orgs-by-sub-org-id-move.js +0 -8
  264. package/esm/models/operations/put-orgs-by-org-id-sub-orgs-by-sub-org-id-move.js.map +1 -1
  265. package/esm/sdk/approvals.d.ts +26 -0
  266. package/esm/sdk/approvals.d.ts.map +1 -0
  267. package/esm/sdk/approvals.js +38 -0
  268. package/esm/sdk/approvals.js.map +1 -0
  269. package/esm/sdk/assets.d.ts +2 -2
  270. package/esm/sdk/assets.d.ts.map +1 -1
  271. package/esm/sdk/assets.js +3 -3
  272. package/esm/sdk/assets.js.map +1 -1
  273. package/esm/sdk/attestations.d.ts +1 -1
  274. package/esm/sdk/attestations.js +1 -1
  275. package/esm/sdk/auth.d.ts +1 -1
  276. package/esm/sdk/auth.js +1 -1
  277. package/esm/sdk/bridge.d.ts +1 -1
  278. package/esm/sdk/bridge.js +1 -1
  279. package/esm/sdk/eligibility.d.ts +12 -0
  280. package/esm/sdk/eligibility.d.ts.map +1 -0
  281. package/esm/sdk/eligibility.js +18 -0
  282. package/esm/sdk/eligibility.js.map +1 -0
  283. package/esm/sdk/health.d.ts +1 -1
  284. package/esm/sdk/health.js +1 -1
  285. package/esm/sdk/o-auth.d.ts +3 -3
  286. package/esm/sdk/o-auth.js +3 -3
  287. package/esm/sdk/organizations.d.ts +2 -2
  288. package/esm/sdk/organizations.d.ts.map +1 -1
  289. package/esm/sdk/organizations.js +3 -3
  290. package/esm/sdk/organizations.js.map +1 -1
  291. package/esm/sdk/passport.d.ts +40 -0
  292. package/esm/sdk/passport.d.ts.map +1 -0
  293. package/esm/sdk/passport.js +58 -0
  294. package/esm/sdk/passport.js.map +1 -0
  295. package/esm/sdk/preflight.d.ts +14 -0
  296. package/esm/sdk/preflight.d.ts.map +1 -1
  297. package/esm/sdk/preflight.js +20 -0
  298. package/esm/sdk/preflight.js.map +1 -1
  299. package/esm/sdk/sdk.d.ts +12 -0
  300. package/esm/sdk/sdk.d.ts.map +1 -1
  301. package/esm/sdk/sdk.js +20 -0
  302. package/esm/sdk/sdk.js.map +1 -1
  303. package/esm/sdk/transfers.d.ts +1 -1
  304. package/esm/sdk/transfers.js +1 -1
  305. package/esm/sdk/travel-rule.d.ts +12 -0
  306. package/esm/sdk/travel-rule.d.ts.map +1 -0
  307. package/esm/sdk/travel-rule.js +18 -0
  308. package/esm/sdk/travel-rule.js.map +1 -0
  309. package/jsr.json +1 -1
  310. package/package.json +1 -1
  311. package/src/funcs/approvals-get-approvals-by-approval-id-status.ts +197 -0
  312. package/src/funcs/approvals-get-approvals-by-approval-id.ts +204 -0
  313. package/src/funcs/approvals-post-approvals.ts +189 -0
  314. package/src/funcs/assets-post-orgs-by-org-id-assets-by-asset-id-allocate.ts +3 -0
  315. package/src/funcs/assets-post-orgs-by-org-id-assets-by-asset-id-documents.ts +8 -22
  316. package/src/funcs/attestations-post-attestations.ts +2 -2
  317. package/src/funcs/auth-post-auth-accept-invite.ts +1 -1
  318. package/src/funcs/auth-post-auth-login.ts +1 -1
  319. package/src/funcs/auth-post-auth-refresh.ts +1 -1
  320. package/src/funcs/bridge-get-orgs-by-org-id-bridge-history.ts +1 -1
  321. package/src/funcs/bridge-post-orgs-by-org-id-assets-by-asset-id-bridge.ts +1 -1
  322. package/src/funcs/eligibility-post-eligibility-check.ts +191 -0
  323. package/src/funcs/health-get-health.ts +1 -1
  324. package/src/funcs/mfa-post-auth-mfa-verify.ts +2 -2
  325. package/src/funcs/o-auth-get-oauth-authorize.ts +1 -1
  326. package/src/funcs/o-auth-get-oauth-userinfo.ts +16 -1
  327. package/src/funcs/o-auth-management-delete-orgs-by-org-id-oauth-clients-by-client-id.ts +3 -0
  328. package/src/funcs/o-auth-management-post-orgs-by-org-id-oauth-clients.ts +6 -1
  329. package/src/funcs/o-auth-management-put-orgs-by-org-id-oauth-clients-by-client-id.ts +4 -1
  330. package/src/funcs/o-auth-post-oauth-token.ts +9 -1
  331. package/src/funcs/organizations-put-orgs-by-org-id-sub-orgs-by-sub-org-id-move.ts +13 -25
  332. package/src/funcs/passport-get-login-passport-status.ts +158 -0
  333. package/src/funcs/passport-get-passport-home.ts +170 -0
  334. package/src/funcs/passport-get-passport-sign-in.ts +172 -0
  335. package/src/funcs/passport-post-login-passport-finish.ts +184 -0
  336. package/src/funcs/passport-post-passport-sign-in-decision.ts +201 -0
  337. package/src/funcs/preflight-get-preflight-results-by-result-id.ts +202 -0
  338. package/src/funcs/preflight-post-preflight-intents.ts +190 -0
  339. package/src/funcs/transfers-get-transfers.ts +1 -1
  340. package/src/funcs/travel-rule-post-travel-rule-records.ts +190 -0
  341. package/src/funcs/ui-get-login.ts +1 -0
  342. package/src/lib/config.ts +2 -2
  343. package/src/models/errors/get-approvals-by-approval-id.ts +83 -0
  344. package/src/models/errors/get-oauth-authorize.ts +6 -6
  345. package/src/models/errors/get-oauth-userinfo.ts +273 -4
  346. package/src/models/errors/get-passport-home.ts +182 -0
  347. package/src/models/errors/get-passport-sign-in.ts +182 -0
  348. package/src/models/errors/index.ts +6 -0
  349. package/src/models/errors/o-auth-error-response.ts +99 -0
  350. package/src/models/errors/post-eligibility-check.ts +103 -0
  351. package/src/models/errors/post-oauth-par.ts +10 -10
  352. package/src/models/errors/post-oauth-revoke.ts +10 -10
  353. package/src/models/errors/post-oauth-token.ts +180 -6
  354. package/src/models/errors/post-passport-sign-in-decision.ts +179 -0
  355. package/src/models/errors/problem-details-error.ts +30 -0
  356. package/src/models/operations/get-approvals-by-approval-id-status.ts +161 -0
  357. package/src/models/operations/get-approvals-by-approval-id.ts +735 -0
  358. package/src/models/operations/get-health.ts +10 -0
  359. package/src/models/operations/get-login-passport-status.ts +91 -0
  360. package/src/models/operations/get-login.ts +3 -0
  361. package/src/models/operations/get-oauth-userinfo.ts +112 -0
  362. package/src/models/operations/get-orgs-by-org-id-assets-by-asset-id-compliance-policy.ts +2 -0
  363. package/src/models/operations/get-orgs-by-org-id-oauth-clients-by-client-id.ts +118 -0
  364. package/src/models/operations/get-orgs-by-org-id-oauth-clients.ts +113 -0
  365. package/src/models/operations/get-passport-home.ts +16 -0
  366. package/src/models/operations/get-passport-sign-in.ts +16 -0
  367. package/src/models/operations/get-preflight-results-by-result-id.ts +653 -0
  368. package/src/models/operations/index.ts +12 -0
  369. package/src/models/operations/post-approvals.ts +192 -0
  370. package/src/models/operations/post-attestations.ts +39 -8
  371. package/src/models/operations/post-auth-verify-email.ts +33 -19
  372. package/src/models/operations/post-consent.ts +4 -0
  373. package/src/models/operations/post-eligibility-check.ts +120 -0
  374. package/src/models/operations/post-login-passport-finish.ts +76 -0
  375. package/src/models/operations/post-oauth-token.ts +53 -14
  376. package/src/models/operations/post-orgs-by-org-id-assets-by-asset-id-allocate.ts +23 -11
  377. package/src/models/operations/post-orgs-by-org-id-assets-by-asset-id-compliance-policy.ts +4 -0
  378. package/src/models/operations/post-orgs-by-org-id-assets-by-asset-id-documents.ts +0 -32
  379. package/src/models/operations/post-orgs-by-org-id-oauth-clients.ts +248 -0
  380. package/src/models/operations/post-passport-sign-in-decision.ts +67 -0
  381. package/src/models/operations/post-preflight-intents.ts +728 -0
  382. package/src/models/operations/post-preflight.ts +18 -15
  383. package/src/models/operations/post-travel-rule-records.ts +68 -0
  384. package/src/models/operations/put-orgs-by-org-id-oauth-clients-by-client-id.ts +263 -0
  385. package/src/models/operations/put-orgs-by-org-id-sub-orgs-by-sub-org-id-move.ts +0 -32
  386. package/src/sdk/approvals.ts +63 -0
  387. package/src/sdk/assets.ts +1 -3
  388. package/src/sdk/attestations.ts +1 -1
  389. package/src/sdk/auth.ts +1 -1
  390. package/src/sdk/bridge.ts +1 -1
  391. package/src/sdk/eligibility.ts +27 -0
  392. package/src/sdk/health.ts +1 -1
  393. package/src/sdk/o-auth.ts +3 -3
  394. package/src/sdk/organizations.ts +1 -3
  395. package/src/sdk/passport.ts +93 -0
  396. package/src/sdk/preflight.ts +36 -0
  397. package/src/sdk/sdk.ts +24 -0
  398. package/src/sdk/transfers.ts +1 -1
  399. package/src/sdk/travel-rule.ts +27 -0
@@ -0,0 +1,158 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { ClossirCore } from "../core.js";
6
+ import { matchStatusCode } from "../lib/http.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { RequestOptions } from "../lib/sdks.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import {
13
+ ConnectionError,
14
+ InvalidRequestError,
15
+ RequestAbortedError,
16
+ RequestTimeoutError,
17
+ UnexpectedClientError,
18
+ } from "../models/errors/http-client-errors.js";
19
+ import * as errors from "../models/errors/index.js";
20
+ import { ResponseValidationError } from "../models/errors/response-validation-error.js";
21
+ import { SDKError } from "../models/errors/sdk-error.js";
22
+ import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
23
+ import * as operations from "../models/operations/index.js";
24
+ import { APICall, APIPromise } from "../types/async.js";
25
+ import { Result } from "../types/fp.js";
26
+
27
+ /**
28
+ * Poll a Passport sign-in from the browser that started it
29
+ *
30
+ * @remarks
31
+ * Answers waiting (not claimed), claimed (a Passport holds it) or decided (allow or deny; never which) for the sign-in named by ?session_id= (exactly one lowercase v4 UUID). Requires the browser-binding cookie set by /oauth/authorize. 404 not_found, one identical body, for a missing or wrong cookie and an unknown, expired or malformed session. 429 when polled faster than once a second. 503 when the session store is unavailable. Served with Cache-Control: no-store.
32
+ */
33
+ export function passportGetLoginPassportStatus(
34
+ client: ClossirCore,
35
+ options?: RequestOptions,
36
+ ): APIPromise<
37
+ Result<
38
+ operations.GetLoginPassportStatusResponse,
39
+ | errors.ProblemDetailsError
40
+ | SDKError
41
+ | ResponseValidationError
42
+ | ConnectionError
43
+ | RequestAbortedError
44
+ | RequestTimeoutError
45
+ | InvalidRequestError
46
+ | UnexpectedClientError
47
+ | SDKValidationError
48
+ >
49
+ > {
50
+ return new APIPromise($do(
51
+ client,
52
+ options,
53
+ ));
54
+ }
55
+
56
+ async function $do(
57
+ client: ClossirCore,
58
+ options?: RequestOptions,
59
+ ): Promise<
60
+ [
61
+ Result<
62
+ operations.GetLoginPassportStatusResponse,
63
+ | errors.ProblemDetailsError
64
+ | SDKError
65
+ | ResponseValidationError
66
+ | ConnectionError
67
+ | RequestAbortedError
68
+ | RequestTimeoutError
69
+ | InvalidRequestError
70
+ | UnexpectedClientError
71
+ | SDKValidationError
72
+ >,
73
+ APICall,
74
+ ]
75
+ > {
76
+ const path = pathToFunc("/login/passport/status")();
77
+
78
+ const headers = new Headers(compactMap({
79
+ Accept: "application/json",
80
+ }));
81
+
82
+ const secConfig = await extractSecurity(client._options.bearerAuth);
83
+ const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
84
+ const requestSecurity = resolveGlobalSecurity(securityInput);
85
+
86
+ const context = {
87
+ options: client._options,
88
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
89
+ operationID: "getLoginPassportStatus",
90
+ oAuth2Scopes: null,
91
+
92
+ resolvedSecurity: requestSecurity,
93
+
94
+ securitySource: client._options.bearerAuth,
95
+ retryConfig: options?.retries
96
+ || client._options.retryConfig
97
+ || { strategy: "none" },
98
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
99
+ };
100
+
101
+ const requestRes = client._createRequest(context, {
102
+ security: requestSecurity,
103
+ method: "GET",
104
+ baseURL: options?.serverURL,
105
+ path: path,
106
+ headers: headers,
107
+ userAgent: client._options.userAgent,
108
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
109
+ }, options);
110
+ if (!requestRes.ok) {
111
+ return [requestRes, { status: "invalid" }];
112
+ }
113
+ const req = requestRes.value;
114
+
115
+ const doResult = await client._do(req, {
116
+ context,
117
+ isErrorStatusCode: (statusCode: number) =>
118
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
119
+ retryConfig: context.retryConfig,
120
+ retryCodes: context.retryCodes,
121
+ });
122
+ if (!doResult.ok) {
123
+ return [doResult, { status: "request-error", request: req }];
124
+ }
125
+ const response = doResult.value;
126
+
127
+ const responseFields = {
128
+ HttpMeta: { Response: response, Request: req },
129
+ };
130
+
131
+ const [result] = await M.match<
132
+ operations.GetLoginPassportStatusResponse,
133
+ | errors.ProblemDetailsError
134
+ | SDKError
135
+ | ResponseValidationError
136
+ | ConnectionError
137
+ | RequestAbortedError
138
+ | RequestTimeoutError
139
+ | InvalidRequestError
140
+ | UnexpectedClientError
141
+ | SDKValidationError
142
+ >(
143
+ M.json(200, operations.GetLoginPassportStatusResponse$inboundSchema),
144
+ M.jsonErr([404, 428, 429], errors.ProblemDetailsError$inboundSchema, {
145
+ ctype: "application/problem+json",
146
+ }),
147
+ M.jsonErr(503, errors.ProblemDetailsError$inboundSchema, {
148
+ ctype: "application/problem+json",
149
+ }),
150
+ M.fail("4XX"),
151
+ M.fail("5XX"),
152
+ )(response, req, { extraFields: responseFields });
153
+ if (!result.ok) {
154
+ return [result, { status: "complete", request: req, response }];
155
+ }
156
+
157
+ return [result, { status: "complete", request: req, response }];
158
+ }
@@ -0,0 +1,170 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { ClossirCore } from "../core.js";
7
+ import { matchStatusCode } from "../lib/http.js";
8
+ import * as M from "../lib/matchers.js";
9
+ import { compactMap } from "../lib/primitives.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../models/errors/http-client-errors.js";
20
+ import * as errors from "../models/errors/index.js";
21
+ import { ResponseValidationError } from "../models/errors/response-validation-error.js";
22
+ import { SDKError } from "../models/errors/sdk-error.js";
23
+ import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
24
+ import { APICall, APIPromise } from "../types/async.js";
25
+ import { Result } from "../types/fp.js";
26
+
27
+ /**
28
+ * Passport home (personal context)
29
+ *
30
+ * @remarks
31
+ * The signed-in user's identity verification, holdings, wallets, value, 12-month change, yield and recent activity. Requires a Clossir Passport client's DPoP-bound access token sent as Authorization: DPoP with a fresh DPoP proof, plus X-Clossir-Passport-Version; session JWTs, API keys, Bearer tokens and partner tokens answer 401 with a WWW-Authenticate: DPoP challenge. context=personal is required; context=org and context=org:<id> answer 422 context_not_available. Amounts are decimal strings; a value that cannot be computed completely is null with a reason. 503 temporarily_unavailable with Retry-After on a database fault, including when MFA enforcement cannot be evaluated; never 401, so the token is not discarded.
32
+ */
33
+ export function passportGetPassportHome(
34
+ client: ClossirCore,
35
+ options?: RequestOptions,
36
+ ): APIPromise<
37
+ Result<
38
+ any,
39
+ | errors.GetPassportHomeUnauthorizedError
40
+ | errors.GetPassportHomeUpdateRequiredError
41
+ | errors.ProblemDetailsError
42
+ | errors.OAuthErrorResponse
43
+ | SDKError
44
+ | ResponseValidationError
45
+ | ConnectionError
46
+ | RequestAbortedError
47
+ | RequestTimeoutError
48
+ | InvalidRequestError
49
+ | UnexpectedClientError
50
+ | SDKValidationError
51
+ >
52
+ > {
53
+ return new APIPromise($do(
54
+ client,
55
+ options,
56
+ ));
57
+ }
58
+
59
+ async function $do(
60
+ client: ClossirCore,
61
+ options?: RequestOptions,
62
+ ): Promise<
63
+ [
64
+ Result<
65
+ any,
66
+ | errors.GetPassportHomeUnauthorizedError
67
+ | errors.GetPassportHomeUpdateRequiredError
68
+ | errors.ProblemDetailsError
69
+ | errors.OAuthErrorResponse
70
+ | SDKError
71
+ | ResponseValidationError
72
+ | ConnectionError
73
+ | RequestAbortedError
74
+ | RequestTimeoutError
75
+ | InvalidRequestError
76
+ | UnexpectedClientError
77
+ | SDKValidationError
78
+ >,
79
+ APICall,
80
+ ]
81
+ > {
82
+ const path = pathToFunc("/passport/home")();
83
+
84
+ const headers = new Headers(compactMap({
85
+ Accept: "application/json",
86
+ }));
87
+
88
+ const secConfig = await extractSecurity(client._options.bearerAuth);
89
+ const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
90
+ const requestSecurity = resolveGlobalSecurity(securityInput);
91
+
92
+ const context = {
93
+ options: client._options,
94
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
95
+ operationID: "getPassportHome",
96
+ oAuth2Scopes: null,
97
+
98
+ resolvedSecurity: requestSecurity,
99
+
100
+ securitySource: client._options.bearerAuth,
101
+ retryConfig: options?.retries
102
+ || client._options.retryConfig
103
+ || { strategy: "none" },
104
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
105
+ };
106
+
107
+ const requestRes = client._createRequest(context, {
108
+ security: requestSecurity,
109
+ method: "GET",
110
+ baseURL: options?.serverURL,
111
+ path: path,
112
+ headers: headers,
113
+ userAgent: client._options.userAgent,
114
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
115
+ }, options);
116
+ if (!requestRes.ok) {
117
+ return [requestRes, { status: "invalid" }];
118
+ }
119
+ const req = requestRes.value;
120
+
121
+ const doResult = await client._do(req, {
122
+ context,
123
+ isErrorStatusCode: (statusCode: number) =>
124
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
125
+ retryConfig: context.retryConfig,
126
+ retryCodes: context.retryCodes,
127
+ });
128
+ if (!doResult.ok) {
129
+ return [doResult, { status: "request-error", request: req }];
130
+ }
131
+ const response = doResult.value;
132
+
133
+ const responseFields = {
134
+ HttpMeta: { Response: response, Request: req },
135
+ };
136
+
137
+ const [result] = await M.match<
138
+ any,
139
+ | errors.GetPassportHomeUnauthorizedError
140
+ | errors.GetPassportHomeUpdateRequiredError
141
+ | errors.ProblemDetailsError
142
+ | errors.OAuthErrorResponse
143
+ | SDKError
144
+ | ResponseValidationError
145
+ | ConnectionError
146
+ | RequestAbortedError
147
+ | RequestTimeoutError
148
+ | InvalidRequestError
149
+ | UnexpectedClientError
150
+ | SDKValidationError
151
+ >(
152
+ M.json(200, z.any()),
153
+ M.jsonErr(401, errors.GetPassportHomeUnauthorizedError$inboundSchema),
154
+ M.jsonErr(426, errors.GetPassportHomeUpdateRequiredError$inboundSchema),
155
+ M.jsonErr([400, 422, 428], errors.ProblemDetailsError$inboundSchema, {
156
+ ctype: "application/problem+json",
157
+ }),
158
+ M.jsonErr([500, 503], errors.ProblemDetailsError$inboundSchema, {
159
+ ctype: "application/problem+json",
160
+ }),
161
+ M.jsonErr([500, 503], errors.OAuthErrorResponse$inboundSchema),
162
+ M.fail("4XX"),
163
+ M.fail("5XX"),
164
+ )(response, req, { extraFields: responseFields });
165
+ if (!result.ok) {
166
+ return [result, { status: "complete", request: req, response }];
167
+ }
168
+
169
+ return [result, { status: "complete", request: req, response }];
170
+ }
@@ -0,0 +1,172 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { ClossirCore } from "../core.js";
7
+ import { matchStatusCode } from "../lib/http.js";
8
+ import * as M from "../lib/matchers.js";
9
+ import { compactMap } from "../lib/primitives.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../models/errors/http-client-errors.js";
20
+ import * as errors from "../models/errors/index.js";
21
+ import { ResponseValidationError } from "../models/errors/response-validation-error.js";
22
+ import { SDKError } from "../models/errors/sdk-error.js";
23
+ import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
24
+ import { APICall, APIPromise } from "../types/async.js";
25
+ import { Result } from "../types/fp.js";
26
+
27
+ /**
28
+ * Claim a pending web sign-in for Passport
29
+ *
30
+ * @remarks
31
+ * Claims the pending web sign-in named by ?session_id= (exactly one lowercase v4 UUID) for the calling Passport (user, Passport client and DPoP key) and returns the partner's display name, the origin of its registered redirect, and each requested scope with its required flag. No user data. Idempotent for the same Passport. Requires a Clossir Passport client's DPoP-bound access token sent as Authorization: DPoP with a fresh DPoP proof, plus X-Clossir-Passport-Version; session JWTs, API keys, Bearer tokens and partner tokens answer 401 with a WWW-Authenticate: DPoP challenge. Requires the per-sign-in hand-off secret in the X-Clossir-Passport-Handoff header (never the query); a missing or wrong secret answers as not found. 400 invalid_request for a missing, repeated or malformed session_id. 404 not_found, one identical body, for an unknown, expired or ineligible sign-in or a missing or wrong hand-off secret. 409 identity_mismatch when the sign-in belongs to another user; 409 already_decided when another Passport holds it or it was already decided. 503 when the session store is unavailable. Served with Cache-Control: no-store.
32
+ */
33
+ export function passportGetPassportSignIn(
34
+ client: ClossirCore,
35
+ options?: RequestOptions,
36
+ ): APIPromise<
37
+ Result<
38
+ any,
39
+ | errors.GetPassportSignInUnauthorizedError
40
+ | errors.GetPassportSignInUpdateRequiredError
41
+ | errors.ProblemDetailsError
42
+ | errors.OAuthErrorResponse
43
+ | SDKError
44
+ | ResponseValidationError
45
+ | ConnectionError
46
+ | RequestAbortedError
47
+ | RequestTimeoutError
48
+ | InvalidRequestError
49
+ | UnexpectedClientError
50
+ | SDKValidationError
51
+ >
52
+ > {
53
+ return new APIPromise($do(
54
+ client,
55
+ options,
56
+ ));
57
+ }
58
+
59
+ async function $do(
60
+ client: ClossirCore,
61
+ options?: RequestOptions,
62
+ ): Promise<
63
+ [
64
+ Result<
65
+ any,
66
+ | errors.GetPassportSignInUnauthorizedError
67
+ | errors.GetPassportSignInUpdateRequiredError
68
+ | errors.ProblemDetailsError
69
+ | errors.OAuthErrorResponse
70
+ | SDKError
71
+ | ResponseValidationError
72
+ | ConnectionError
73
+ | RequestAbortedError
74
+ | RequestTimeoutError
75
+ | InvalidRequestError
76
+ | UnexpectedClientError
77
+ | SDKValidationError
78
+ >,
79
+ APICall,
80
+ ]
81
+ > {
82
+ const path = pathToFunc("/passport/sign-in")();
83
+
84
+ const headers = new Headers(compactMap({
85
+ Accept: "application/json",
86
+ }));
87
+
88
+ const secConfig = await extractSecurity(client._options.bearerAuth);
89
+ const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
90
+ const requestSecurity = resolveGlobalSecurity(securityInput);
91
+
92
+ const context = {
93
+ options: client._options,
94
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
95
+ operationID: "getPassportSign-in",
96
+ oAuth2Scopes: null,
97
+
98
+ resolvedSecurity: requestSecurity,
99
+
100
+ securitySource: client._options.bearerAuth,
101
+ retryConfig: options?.retries
102
+ || client._options.retryConfig
103
+ || { strategy: "none" },
104
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
105
+ };
106
+
107
+ const requestRes = client._createRequest(context, {
108
+ security: requestSecurity,
109
+ method: "GET",
110
+ baseURL: options?.serverURL,
111
+ path: path,
112
+ headers: headers,
113
+ userAgent: client._options.userAgent,
114
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
115
+ }, options);
116
+ if (!requestRes.ok) {
117
+ return [requestRes, { status: "invalid" }];
118
+ }
119
+ const req = requestRes.value;
120
+
121
+ const doResult = await client._do(req, {
122
+ context,
123
+ isErrorStatusCode: (statusCode: number) =>
124
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
125
+ retryConfig: context.retryConfig,
126
+ retryCodes: context.retryCodes,
127
+ });
128
+ if (!doResult.ok) {
129
+ return [doResult, { status: "request-error", request: req }];
130
+ }
131
+ const response = doResult.value;
132
+
133
+ const responseFields = {
134
+ HttpMeta: { Response: response, Request: req },
135
+ };
136
+
137
+ const [result] = await M.match<
138
+ any,
139
+ | errors.GetPassportSignInUnauthorizedError
140
+ | errors.GetPassportSignInUpdateRequiredError
141
+ | errors.ProblemDetailsError
142
+ | errors.OAuthErrorResponse
143
+ | SDKError
144
+ | ResponseValidationError
145
+ | ConnectionError
146
+ | RequestAbortedError
147
+ | RequestTimeoutError
148
+ | InvalidRequestError
149
+ | UnexpectedClientError
150
+ | SDKValidationError
151
+ >(
152
+ M.json(200, z.any()),
153
+ M.jsonErr(401, errors.GetPassportSignInUnauthorizedError$inboundSchema),
154
+ M.jsonErr(426, errors.GetPassportSignInUpdateRequiredError$inboundSchema),
155
+ M.jsonErr(
156
+ [400, 404, 409, 428, 429],
157
+ errors.ProblemDetailsError$inboundSchema,
158
+ { ctype: "application/problem+json" },
159
+ ),
160
+ M.jsonErr([500, 503], errors.ProblemDetailsError$inboundSchema, {
161
+ ctype: "application/problem+json",
162
+ }),
163
+ M.jsonErr([500, 503], errors.OAuthErrorResponse$inboundSchema),
164
+ M.fail("4XX"),
165
+ M.fail("5XX"),
166
+ )(response, req, { extraFields: responseFields });
167
+ if (!result.ok) {
168
+ return [result, { status: "complete", request: req, response }];
169
+ }
170
+
171
+ return [result, { status: "complete", request: req, response }];
172
+ }
@@ -0,0 +1,184 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { ClossirCore } from "../core.js";
7
+ import { encodeBodyForm } from "../lib/encodings.js";
8
+ import { matchStatusCode } from "../lib/http.js";
9
+ import * as M from "../lib/matchers.js";
10
+ import { compactMap } from "../lib/primitives.js";
11
+ import { safeParse } from "../lib/schemas.js";
12
+ import { RequestOptions } from "../lib/sdks.js";
13
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
14
+ import { pathToFunc } from "../lib/url.js";
15
+ import {
16
+ ConnectionError,
17
+ InvalidRequestError,
18
+ RequestAbortedError,
19
+ RequestTimeoutError,
20
+ UnexpectedClientError,
21
+ } from "../models/errors/http-client-errors.js";
22
+ import * as errors from "../models/errors/index.js";
23
+ import { ResponseValidationError } from "../models/errors/response-validation-error.js";
24
+ import { SDKError } from "../models/errors/sdk-error.js";
25
+ import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
26
+ import * as operations from "../models/operations/index.js";
27
+ import { APICall, APIPromise } from "../types/async.js";
28
+ import { Result } from "../types/fp.js";
29
+ import * as types$ from "../types/primitives.js";
30
+
31
+ /**
32
+ * Finish a Passport sign-in in the browser that started it
33
+ *
34
+ * @remarks
35
+ * Form post from the hosted sign-in page with session_id and csrf_token, from the browser holding the binding cookie. On allow, saves consent and issues the authorization code (302 to the client's redirect with code and state); on deny, 302 with error=access_denied. 303 back to /login while Passport has not decided. HTML refusal pages otherwise. Every redirect that ends the flow clears the binding cookie.
36
+ */
37
+ export function passportPostLoginPassportFinish(
38
+ client: ClossirCore,
39
+ request: operations.PostLoginPassportFinishRequest,
40
+ options?: RequestOptions,
41
+ ): APIPromise<
42
+ Result<
43
+ operations.PostLoginPassportFinishResponse | undefined,
44
+ | errors.ProblemDetailsError
45
+ | SDKError
46
+ | ResponseValidationError
47
+ | ConnectionError
48
+ | RequestAbortedError
49
+ | RequestTimeoutError
50
+ | InvalidRequestError
51
+ | UnexpectedClientError
52
+ | SDKValidationError
53
+ >
54
+ > {
55
+ return new APIPromise($do(
56
+ client,
57
+ request,
58
+ options,
59
+ ));
60
+ }
61
+
62
+ async function $do(
63
+ client: ClossirCore,
64
+ request: operations.PostLoginPassportFinishRequest,
65
+ options?: RequestOptions,
66
+ ): Promise<
67
+ [
68
+ Result<
69
+ operations.PostLoginPassportFinishResponse | undefined,
70
+ | errors.ProblemDetailsError
71
+ | SDKError
72
+ | ResponseValidationError
73
+ | ConnectionError
74
+ | RequestAbortedError
75
+ | RequestTimeoutError
76
+ | InvalidRequestError
77
+ | UnexpectedClientError
78
+ | SDKValidationError
79
+ >,
80
+ APICall,
81
+ ]
82
+ > {
83
+ const parsed = safeParse(
84
+ request,
85
+ (value) =>
86
+ z.parse(operations.PostLoginPassportFinishRequest$outboundSchema, value),
87
+ "Input validation failed",
88
+ );
89
+ if (!parsed.ok) {
90
+ return [parsed, { status: "invalid" }];
91
+ }
92
+ const payload = parsed.value;
93
+
94
+ const body = Object.entries(payload || {}).map(([k, v]) => {
95
+ return encodeBodyForm(k, v, { charEncoding: "percent" });
96
+ }).join("&");
97
+
98
+ const path = pathToFunc("/login/passport/finish")();
99
+
100
+ const headers = new Headers(compactMap({
101
+ "Content-Type": "application/x-www-form-urlencoded",
102
+ Accept: "application/problem+json",
103
+ }));
104
+
105
+ const secConfig = await extractSecurity(client._options.bearerAuth);
106
+ const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
107
+ const requestSecurity = resolveGlobalSecurity(securityInput);
108
+
109
+ const context = {
110
+ options: client._options,
111
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
112
+ operationID: "postLoginPassportFinish",
113
+ oAuth2Scopes: null,
114
+
115
+ resolvedSecurity: requestSecurity,
116
+
117
+ securitySource: client._options.bearerAuth,
118
+ retryConfig: options?.retries
119
+ || client._options.retryConfig
120
+ || { strategy: "none" },
121
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
122
+ };
123
+
124
+ const requestRes = client._createRequest(context, {
125
+ security: requestSecurity,
126
+ method: "POST",
127
+ baseURL: options?.serverURL,
128
+ path: path,
129
+ headers: headers,
130
+ body: body,
131
+ userAgent: client._options.userAgent,
132
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
133
+ }, options);
134
+ if (!requestRes.ok) {
135
+ return [requestRes, { status: "invalid" }];
136
+ }
137
+ const req = requestRes.value;
138
+
139
+ const doResult = await client._do(req, {
140
+ context,
141
+ isErrorStatusCode: (statusCode: number) =>
142
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
143
+ retryConfig: context.retryConfig,
144
+ retryCodes: context.retryCodes,
145
+ });
146
+ if (!doResult.ok) {
147
+ return [doResult, { status: "request-error", request: req }];
148
+ }
149
+ const response = doResult.value;
150
+
151
+ const responseFields = {
152
+ HttpMeta: { Response: response, Request: req },
153
+ };
154
+
155
+ const [result] = await M.match<
156
+ operations.PostLoginPassportFinishResponse | undefined,
157
+ | errors.ProblemDetailsError
158
+ | SDKError
159
+ | ResponseValidationError
160
+ | ConnectionError
161
+ | RequestAbortedError
162
+ | RequestTimeoutError
163
+ | InvalidRequestError
164
+ | UnexpectedClientError
165
+ | SDKValidationError
166
+ >(
167
+ M.nil(
168
+ [302, 303],
169
+ types$.optional(operations.PostLoginPassportFinishResponse$inboundSchema),
170
+ { hdrs: true },
171
+ ),
172
+ M.jsonErr(428, errors.ProblemDetailsError$inboundSchema, {
173
+ ctype: "application/problem+json",
174
+ }),
175
+ M.fail(429),
176
+ M.fail([400, "4XX"]),
177
+ M.fail([500, 503, "5XX"]),
178
+ )(response, req, { extraFields: responseFields });
179
+ if (!result.ok) {
180
+ return [result, { status: "complete", request: req, response }];
181
+ }
182
+
183
+ return [result, { status: "complete", request: req, response }];
184
+ }