botshield-sdk 2.0.2 → 2.2.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 (275) hide show
  1. package/README.md +18 -46
  2. package/bin/mcp-server.js +596 -468
  3. package/bin/mcp-server.js.map +32 -29
  4. package/dist/commonjs/funcs/actions-propose-action.d.ts +1 -1
  5. package/dist/commonjs/funcs/actions-propose-action.js +1 -1
  6. package/dist/commonjs/funcs/census-get-partner-config.js +2 -78
  7. package/dist/commonjs/funcs/census-get-partner-config.js.map +1 -1
  8. package/dist/commonjs/funcs/census-verify-token.d.ts +1 -1
  9. package/dist/commonjs/funcs/census-verify-token.js +1 -79
  10. package/dist/commonjs/funcs/census-verify-token.js.map +1 -1
  11. package/dist/commonjs/funcs/secured-accounts-get-status.d.ts +18 -0
  12. package/dist/commonjs/funcs/secured-accounts-get-status.d.ts.map +1 -0
  13. package/dist/commonjs/funcs/secured-accounts-get-status.js +126 -0
  14. package/dist/commonjs/funcs/secured-accounts-get-status.js.map +1 -0
  15. package/dist/commonjs/funcs/secured-accounts-list.d.ts +18 -0
  16. package/dist/commonjs/funcs/secured-accounts-list.d.ts.map +1 -0
  17. package/dist/commonjs/funcs/secured-accounts-list.js +129 -0
  18. package/dist/commonjs/funcs/secured-accounts-list.js.map +1 -0
  19. package/dist/commonjs/funcs/secured-accounts-revoke.d.ts +18 -0
  20. package/dist/commonjs/funcs/secured-accounts-revoke.d.ts.map +1 -0
  21. package/dist/commonjs/funcs/secured-accounts-revoke.js +123 -0
  22. package/dist/commonjs/funcs/secured-accounts-revoke.js.map +1 -0
  23. package/dist/commonjs/funcs/verification-get-status.js +0 -78
  24. package/dist/commonjs/funcs/verification-get-status.js.map +1 -1
  25. package/dist/commonjs/lib/config.d.ts +2 -2
  26. package/dist/commonjs/lib/config.js +2 -2
  27. package/dist/commonjs/lib/security.d.ts.map +1 -1
  28. package/dist/commonjs/lib/security.js +0 -91
  29. package/dist/commonjs/lib/security.js.map +1 -1
  30. package/dist/commonjs/mcp-server/cli/start/command.d.ts.map +1 -1
  31. package/dist/commonjs/mcp-server/cli/start/command.js +0 -104
  32. package/dist/commonjs/mcp-server/cli/start/command.js.map +1 -1
  33. package/dist/commonjs/mcp-server/cli/start/impl.d.ts +0 -13
  34. package/dist/commonjs/mcp-server/cli/start/impl.d.ts.map +1 -1
  35. package/dist/commonjs/mcp-server/cli/start/impl.js +0 -26
  36. package/dist/commonjs/mcp-server/cli/start/impl.js.map +1 -1
  37. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  38. package/dist/commonjs/mcp-server/server.js +1 -1
  39. package/dist/commonjs/mcp-server/tools/actions-cancel-action.d.ts.map +1 -1
  40. package/dist/commonjs/mcp-server/tools/actions-cancel-action.js +1 -17
  41. package/dist/commonjs/mcp-server/tools/actions-cancel-action.js.map +1 -1
  42. package/dist/commonjs/mcp-server/tools/actions-check-action-status.d.ts.map +1 -1
  43. package/dist/commonjs/mcp-server/tools/actions-check-action-status.js +1 -17
  44. package/dist/commonjs/mcp-server/tools/actions-check-action-status.js.map +1 -1
  45. package/dist/commonjs/mcp-server/tools/actions-propose-action.d.ts.map +1 -1
  46. package/dist/commonjs/mcp-server/tools/actions-propose-action.js +1 -17
  47. package/dist/commonjs/mcp-server/tools/actions-propose-action.js.map +1 -1
  48. package/dist/commonjs/models/error-body.d.ts +43 -8
  49. package/dist/commonjs/models/error-body.d.ts.map +1 -1
  50. package/dist/commonjs/models/error-body.js +51 -1
  51. package/dist/commonjs/models/error-body.js.map +1 -1
  52. package/dist/commonjs/models/operations/actions-cancel.d.ts +1 -1
  53. package/dist/commonjs/models/operations/actions-check-status.d.ts +6 -6
  54. package/dist/commonjs/models/operations/actions-check-status.d.ts.map +1 -1
  55. package/dist/commonjs/models/operations/actions-check-status.js +6 -6
  56. package/dist/commonjs/models/operations/actions-check-status.js.map +1 -1
  57. package/dist/commonjs/models/operations/actions-propose.d.ts +1 -1
  58. package/dist/commonjs/models/operations/index.d.ts +3 -0
  59. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  60. package/dist/commonjs/models/operations/index.js +3 -0
  61. package/dist/commonjs/models/operations/index.js.map +1 -1
  62. package/dist/commonjs/models/operations/sdk-create-session.d.ts +44 -10
  63. package/dist/commonjs/models/operations/sdk-create-session.d.ts.map +1 -1
  64. package/dist/commonjs/models/operations/sdk-create-session.js +32 -11
  65. package/dist/commonjs/models/operations/sdk-create-session.js.map +1 -1
  66. package/dist/commonjs/models/operations/sdk-create-verification-link.d.ts +96 -2
  67. package/dist/commonjs/models/operations/sdk-create-verification-link.d.ts.map +1 -1
  68. package/dist/commonjs/models/operations/sdk-create-verification-link.js +58 -1
  69. package/dist/commonjs/models/operations/sdk-create-verification-link.js.map +1 -1
  70. package/dist/commonjs/models/operations/sdk-get-partner-config.d.ts +23 -27
  71. package/dist/commonjs/models/operations/sdk-get-partner-config.d.ts.map +1 -1
  72. package/dist/commonjs/models/operations/sdk-get-partner-config.js +18 -26
  73. package/dist/commonjs/models/operations/sdk-get-partner-config.js.map +1 -1
  74. package/dist/commonjs/models/operations/sdk-logout.d.ts +1 -1
  75. package/dist/commonjs/models/operations/sdk-revoke-verification.d.ts +14 -4
  76. package/dist/commonjs/models/operations/sdk-revoke-verification.d.ts.map +1 -1
  77. package/dist/commonjs/models/operations/sdk-revoke-verification.js +4 -2
  78. package/dist/commonjs/models/operations/sdk-revoke-verification.js.map +1 -1
  79. package/dist/commonjs/models/operations/sdk-store-signal.d.ts +1 -1
  80. package/dist/commonjs/models/operations/sdk-validate-signal.d.ts +6 -6
  81. package/dist/commonjs/models/operations/sdk-validate-signal.d.ts.map +1 -1
  82. package/dist/commonjs/models/operations/sdk-validate-signal.js +6 -6
  83. package/dist/commonjs/models/operations/sdk-validate-signal.js.map +1 -1
  84. package/dist/commonjs/models/operations/sdk-verify-token.d.ts +78 -27
  85. package/dist/commonjs/models/operations/sdk-verify-token.d.ts.map +1 -1
  86. package/dist/commonjs/models/operations/sdk-verify-token.js +51 -27
  87. package/dist/commonjs/models/operations/sdk-verify-token.js.map +1 -1
  88. package/dist/commonjs/models/operations/secured-accounts-list.d.ts +212 -0
  89. package/dist/commonjs/models/operations/secured-accounts-list.d.ts.map +1 -0
  90. package/dist/commonjs/models/operations/secured-accounts-list.js +254 -0
  91. package/dist/commonjs/models/operations/secured-accounts-list.js.map +1 -0
  92. package/dist/commonjs/models/operations/secured-accounts-revoke.d.ts +130 -0
  93. package/dist/commonjs/models/operations/secured-accounts-revoke.d.ts.map +1 -0
  94. package/dist/commonjs/models/operations/secured-accounts-revoke.js +185 -0
  95. package/dist/commonjs/models/operations/secured-accounts-revoke.js.map +1 -0
  96. package/dist/commonjs/models/operations/secured-accounts-status.d.ts +97 -0
  97. package/dist/commonjs/models/operations/secured-accounts-status.d.ts.map +1 -0
  98. package/dist/commonjs/models/operations/secured-accounts-status.js +163 -0
  99. package/dist/commonjs/models/operations/secured-accounts-status.js.map +1 -0
  100. package/dist/commonjs/models/operations/verification-get-status.d.ts +47 -30
  101. package/dist/commonjs/models/operations/verification-get-status.d.ts.map +1 -1
  102. package/dist/commonjs/models/operations/verification-get-status.js +30 -28
  103. package/dist/commonjs/models/operations/verification-get-status.js.map +1 -1
  104. package/dist/commonjs/models/security.d.ts +0 -26
  105. package/dist/commonjs/models/security.d.ts.map +1 -1
  106. package/dist/commonjs/models/security.js +0 -26
  107. package/dist/commonjs/models/security.js.map +1 -1
  108. package/dist/commonjs/sdk/actions.d.ts +1 -1
  109. package/dist/commonjs/sdk/actions.js +1 -1
  110. package/dist/commonjs/sdk/census.d.ts +1 -1
  111. package/dist/commonjs/sdk/census.js +1 -1
  112. package/dist/commonjs/sdk/sdk.d.ts +3 -0
  113. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  114. package/dist/commonjs/sdk/sdk.js +5 -0
  115. package/dist/commonjs/sdk/sdk.js.map +1 -1
  116. package/dist/commonjs/sdk/secured-accounts.d.ts +26 -0
  117. package/dist/commonjs/sdk/secured-accounts.d.ts.map +1 -0
  118. package/dist/commonjs/sdk/secured-accounts.js +42 -0
  119. package/dist/commonjs/sdk/secured-accounts.js.map +1 -0
  120. package/dist/esm/funcs/actions-propose-action.d.ts +1 -1
  121. package/dist/esm/funcs/actions-propose-action.js +1 -1
  122. package/dist/esm/funcs/census-get-partner-config.js +2 -78
  123. package/dist/esm/funcs/census-get-partner-config.js.map +1 -1
  124. package/dist/esm/funcs/census-verify-token.d.ts +1 -1
  125. package/dist/esm/funcs/census-verify-token.js +1 -79
  126. package/dist/esm/funcs/census-verify-token.js.map +1 -1
  127. package/dist/esm/funcs/secured-accounts-get-status.d.ts +18 -0
  128. package/dist/esm/funcs/secured-accounts-get-status.d.ts.map +1 -0
  129. package/dist/esm/funcs/secured-accounts-get-status.js +90 -0
  130. package/dist/esm/funcs/secured-accounts-get-status.js.map +1 -0
  131. package/dist/esm/funcs/secured-accounts-list.d.ts +18 -0
  132. package/dist/esm/funcs/secured-accounts-list.d.ts.map +1 -0
  133. package/dist/esm/funcs/secured-accounts-list.js +93 -0
  134. package/dist/esm/funcs/secured-accounts-list.js.map +1 -0
  135. package/dist/esm/funcs/secured-accounts-revoke.d.ts +18 -0
  136. package/dist/esm/funcs/secured-accounts-revoke.d.ts.map +1 -0
  137. package/dist/esm/funcs/secured-accounts-revoke.js +87 -0
  138. package/dist/esm/funcs/secured-accounts-revoke.js.map +1 -0
  139. package/dist/esm/funcs/verification-get-status.js +0 -78
  140. package/dist/esm/funcs/verification-get-status.js.map +1 -1
  141. package/dist/esm/lib/config.d.ts +2 -2
  142. package/dist/esm/lib/config.js +2 -2
  143. package/dist/esm/lib/security.d.ts.map +1 -1
  144. package/dist/esm/lib/security.js +0 -91
  145. package/dist/esm/lib/security.js.map +1 -1
  146. package/dist/esm/mcp-server/cli/start/command.d.ts.map +1 -1
  147. package/dist/esm/mcp-server/cli/start/command.js +0 -104
  148. package/dist/esm/mcp-server/cli/start/command.js.map +1 -1
  149. package/dist/esm/mcp-server/cli/start/impl.d.ts +0 -13
  150. package/dist/esm/mcp-server/cli/start/impl.d.ts.map +1 -1
  151. package/dist/esm/mcp-server/cli/start/impl.js +0 -26
  152. package/dist/esm/mcp-server/cli/start/impl.js.map +1 -1
  153. package/dist/esm/mcp-server/mcp-server.js +1 -1
  154. package/dist/esm/mcp-server/server.js +1 -1
  155. package/dist/esm/mcp-server/tools/actions-cancel-action.d.ts.map +1 -1
  156. package/dist/esm/mcp-server/tools/actions-cancel-action.js +1 -17
  157. package/dist/esm/mcp-server/tools/actions-cancel-action.js.map +1 -1
  158. package/dist/esm/mcp-server/tools/actions-check-action-status.d.ts.map +1 -1
  159. package/dist/esm/mcp-server/tools/actions-check-action-status.js +1 -17
  160. package/dist/esm/mcp-server/tools/actions-check-action-status.js.map +1 -1
  161. package/dist/esm/mcp-server/tools/actions-propose-action.d.ts.map +1 -1
  162. package/dist/esm/mcp-server/tools/actions-propose-action.js +1 -17
  163. package/dist/esm/mcp-server/tools/actions-propose-action.js.map +1 -1
  164. package/dist/esm/models/error-body.d.ts +43 -8
  165. package/dist/esm/models/error-body.d.ts.map +1 -1
  166. package/dist/esm/models/error-body.js +48 -0
  167. package/dist/esm/models/error-body.js.map +1 -1
  168. package/dist/esm/models/operations/actions-cancel.d.ts +1 -1
  169. package/dist/esm/models/operations/actions-check-status.d.ts +6 -6
  170. package/dist/esm/models/operations/actions-check-status.d.ts.map +1 -1
  171. package/dist/esm/models/operations/actions-check-status.js +5 -5
  172. package/dist/esm/models/operations/actions-check-status.js.map +1 -1
  173. package/dist/esm/models/operations/actions-propose.d.ts +1 -1
  174. package/dist/esm/models/operations/index.d.ts +3 -0
  175. package/dist/esm/models/operations/index.d.ts.map +1 -1
  176. package/dist/esm/models/operations/index.js +3 -0
  177. package/dist/esm/models/operations/index.js.map +1 -1
  178. package/dist/esm/models/operations/sdk-create-session.d.ts +44 -10
  179. package/dist/esm/models/operations/sdk-create-session.d.ts.map +1 -1
  180. package/dist/esm/models/operations/sdk-create-session.js +29 -8
  181. package/dist/esm/models/operations/sdk-create-session.js.map +1 -1
  182. package/dist/esm/models/operations/sdk-create-verification-link.d.ts +96 -2
  183. package/dist/esm/models/operations/sdk-create-verification-link.d.ts.map +1 -1
  184. package/dist/esm/models/operations/sdk-create-verification-link.js +57 -0
  185. package/dist/esm/models/operations/sdk-create-verification-link.js.map +1 -1
  186. package/dist/esm/models/operations/sdk-get-partner-config.d.ts +23 -27
  187. package/dist/esm/models/operations/sdk-get-partner-config.d.ts.map +1 -1
  188. package/dist/esm/models/operations/sdk-get-partner-config.js +18 -26
  189. package/dist/esm/models/operations/sdk-get-partner-config.js.map +1 -1
  190. package/dist/esm/models/operations/sdk-logout.d.ts +1 -1
  191. package/dist/esm/models/operations/sdk-revoke-verification.d.ts +14 -4
  192. package/dist/esm/models/operations/sdk-revoke-verification.d.ts.map +1 -1
  193. package/dist/esm/models/operations/sdk-revoke-verification.js +4 -2
  194. package/dist/esm/models/operations/sdk-revoke-verification.js.map +1 -1
  195. package/dist/esm/models/operations/sdk-store-signal.d.ts +1 -1
  196. package/dist/esm/models/operations/sdk-validate-signal.d.ts +6 -6
  197. package/dist/esm/models/operations/sdk-validate-signal.d.ts.map +1 -1
  198. package/dist/esm/models/operations/sdk-validate-signal.js +5 -5
  199. package/dist/esm/models/operations/sdk-validate-signal.js.map +1 -1
  200. package/dist/esm/models/operations/sdk-verify-token.d.ts +78 -27
  201. package/dist/esm/models/operations/sdk-verify-token.d.ts.map +1 -1
  202. package/dist/esm/models/operations/sdk-verify-token.js +50 -26
  203. package/dist/esm/models/operations/sdk-verify-token.js.map +1 -1
  204. package/dist/esm/models/operations/secured-accounts-list.d.ts +212 -0
  205. package/dist/esm/models/operations/secured-accounts-list.d.ts.map +1 -0
  206. package/dist/esm/models/operations/secured-accounts-list.js +206 -0
  207. package/dist/esm/models/operations/secured-accounts-list.js.map +1 -0
  208. package/dist/esm/models/operations/secured-accounts-revoke.d.ts +130 -0
  209. package/dist/esm/models/operations/secured-accounts-revoke.d.ts.map +1 -0
  210. package/dist/esm/models/operations/secured-accounts-revoke.js +139 -0
  211. package/dist/esm/models/operations/secured-accounts-revoke.js.map +1 -0
  212. package/dist/esm/models/operations/secured-accounts-status.d.ts +97 -0
  213. package/dist/esm/models/operations/secured-accounts-status.d.ts.map +1 -0
  214. package/dist/esm/models/operations/secured-accounts-status.js +117 -0
  215. package/dist/esm/models/operations/secured-accounts-status.js.map +1 -0
  216. package/dist/esm/models/operations/verification-get-status.d.ts +47 -30
  217. package/dist/esm/models/operations/verification-get-status.d.ts.map +1 -1
  218. package/dist/esm/models/operations/verification-get-status.js +29 -27
  219. package/dist/esm/models/operations/verification-get-status.js.map +1 -1
  220. package/dist/esm/models/security.d.ts +0 -26
  221. package/dist/esm/models/security.d.ts.map +1 -1
  222. package/dist/esm/models/security.js +0 -26
  223. package/dist/esm/models/security.js.map +1 -1
  224. package/dist/esm/sdk/actions.d.ts +1 -1
  225. package/dist/esm/sdk/actions.js +1 -1
  226. package/dist/esm/sdk/census.d.ts +1 -1
  227. package/dist/esm/sdk/census.js +1 -1
  228. package/dist/esm/sdk/sdk.d.ts +3 -0
  229. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  230. package/dist/esm/sdk/sdk.js +5 -0
  231. package/dist/esm/sdk/sdk.js.map +1 -1
  232. package/dist/esm/sdk/secured-accounts.d.ts +26 -0
  233. package/dist/esm/sdk/secured-accounts.d.ts.map +1 -0
  234. package/dist/esm/sdk/secured-accounts.js +38 -0
  235. package/dist/esm/sdk/secured-accounts.js.map +1 -0
  236. package/jsr.json +1 -1
  237. package/package.json +1 -1
  238. package/src/funcs/actions-propose-action.ts +1 -1
  239. package/src/funcs/census-get-partner-config.ts +2 -91
  240. package/src/funcs/census-verify-token.ts +1 -92
  241. package/src/funcs/secured-accounts-get-status.ts +189 -0
  242. package/src/funcs/secured-accounts-list.ts +194 -0
  243. package/src/funcs/secured-accounts-revoke.ts +185 -0
  244. package/src/funcs/verification-get-status.ts +0 -91
  245. package/src/lib/config.ts +2 -2
  246. package/src/lib/security.ts +0 -91
  247. package/src/mcp-server/cli/start/command.ts +0 -104
  248. package/src/mcp-server/cli/start/impl.ts +0 -39
  249. package/src/mcp-server/mcp-server.ts +1 -1
  250. package/src/mcp-server/server.ts +1 -1
  251. package/src/mcp-server/tools/actions-cancel-action.ts +1 -17
  252. package/src/mcp-server/tools/actions-check-action-status.ts +1 -17
  253. package/src/mcp-server/tools/actions-propose-action.ts +1 -17
  254. package/src/models/error-body.ts +95 -8
  255. package/src/models/operations/actions-cancel.ts +1 -1
  256. package/src/models/operations/actions-check-status.ts +18 -10
  257. package/src/models/operations/actions-propose.ts +1 -1
  258. package/src/models/operations/index.ts +3 -0
  259. package/src/models/operations/sdk-create-session.ts +78 -20
  260. package/src/models/operations/sdk-create-verification-link.ts +157 -2
  261. package/src/models/operations/sdk-get-partner-config.ts +41 -53
  262. package/src/models/operations/sdk-logout.ts +1 -1
  263. package/src/models/operations/sdk-revoke-verification.ts +18 -6
  264. package/src/models/operations/sdk-store-signal.ts +1 -1
  265. package/src/models/operations/sdk-validate-signal.ts +16 -10
  266. package/src/models/operations/sdk-verify-token.ts +119 -53
  267. package/src/models/operations/secured-accounts-list.ts +507 -0
  268. package/src/models/operations/secured-accounts-revoke.ts +359 -0
  269. package/src/models/operations/secured-accounts-status.ts +296 -0
  270. package/src/models/operations/verification-get-status.ts +73 -56
  271. package/src/models/security.ts +0 -52
  272. package/src/sdk/actions.ts +1 -1
  273. package/src/sdk/census.ts +1 -1
  274. package/src/sdk/sdk.ts +6 -0
  275. package/src/sdk/secured-accounts.ts +69 -0
@@ -15,19 +15,6 @@ import * as models from "../index.js";
15
15
  export type VerificationGetStatusSecurity = {
16
16
  apiKeyAuth?: string | undefined;
17
17
  apiKeyAuth1?: string | undefined;
18
- apiKeyAuth2?: string | undefined;
19
- apiKeyAuth3?: string | undefined;
20
- apiKeyAuth4?: string | undefined;
21
- apiKeyAuth5?: string | undefined;
22
- apiKeyAuth6?: string | undefined;
23
- apiKeyAuth7?: string | undefined;
24
- apiKeyAuth8?: string | undefined;
25
- apiKeyAuth9?: string | undefined;
26
- apiKeyAuth10?: string | undefined;
27
- apiKeyAuth11?: string | undefined;
28
- apiKeyAuth12?: string | undefined;
29
- apiKeyAuth13?: string | undefined;
30
- apiKeyAuth14?: string | undefined;
31
18
  };
32
19
 
33
20
  export type VerificationGetStatusRequest = {
@@ -35,7 +22,7 @@ export type VerificationGetStatusRequest = {
35
22
  };
36
23
 
37
24
  /**
38
- * `pass` is a Recent Presence pass: the pre-check resolved the person without a new ceremony. Its record expires 60 seconds after the check, after which this endpoint reports `expired` — it never becomes `completed`. Treat `pass` as success and read it promptly.
25
+ * `pass` is legacy: a success recorded without a new confirmation on the phone. Gates always ask in 3.3, so new requests end `completed`. A `pass` record expires 60 seconds after the check, after which this endpoint reports `expired`.
39
26
  */
40
27
  export const VerificationGetStatusStatus = {
41
28
  Pending: "pending",
@@ -47,7 +34,7 @@ export const VerificationGetStatusStatus = {
47
34
  Error: "error",
48
35
  } as const;
49
36
  /**
50
- * `pass` is a Recent Presence pass: the pre-check resolved the person without a new ceremony. Its record expires 60 seconds after the check, after which this endpoint reports `expired` — it never becomes `completed`. Treat `pass` as success and read it promptly.
37
+ * `pass` is legacy: a success recorded without a new confirmation on the phone. Gates always ask in 3.3, so new requests end `completed`. A `pass` record expires 60 seconds after the check, after which this endpoint reports `expired`.
51
38
  */
52
39
  export type VerificationGetStatusStatus = OpenEnum<
53
40
  typeof VerificationGetStatusStatus
@@ -72,10 +59,27 @@ export type Metadata = {
72
59
  parentRequestId?: string | null | undefined;
73
60
  };
74
61
 
62
+ /**
63
+ * Why a request ended `failed`. Null while pending and on success. `already_trusted`: this BotShield ID already secures another account on your platform. `rebind_requires_prior_id`: this account is already secured by another BotShield ID. `pass_limit_reached`: the person has used the passes the gate allows. `real_days_not_met`: the BotShield ID has not yet proved a person on as many days as the gate asks. `unavailable`: the standard Unavailable result.
64
+ */
65
+ export const VerificationGetStatusReason = {
66
+ AlreadyTrusted: "already_trusted",
67
+ RebindRequiresPriorId: "rebind_requires_prior_id",
68
+ PassLimitReached: "pass_limit_reached",
69
+ RealDaysNotMet: "real_days_not_met",
70
+ Unavailable: "unavailable",
71
+ } as const;
72
+ /**
73
+ * Why a request ended `failed`. Null while pending and on success. `already_trusted`: this BotShield ID already secures another account on your platform. `rebind_requires_prior_id`: this account is already secured by another BotShield ID. `pass_limit_reached`: the person has used the passes the gate allows. `real_days_not_met`: the BotShield ID has not yet proved a person on as many days as the gate asks. `unavailable`: the standard Unavailable result.
74
+ */
75
+ export type VerificationGetStatusReason = OpenEnum<
76
+ typeof VerificationGetStatusReason
77
+ >;
78
+
75
79
  export type VerificationGetStatusData = {
76
80
  found?: boolean | undefined;
77
81
  /**
78
- * `pass` is a Recent Presence pass: the pre-check resolved the person without a new ceremony. Its record expires 60 seconds after the check, after which this endpoint reports `expired` — it never becomes `completed`. Treat `pass` as success and read it promptly.
82
+ * `pass` is legacy: a success recorded without a new confirmation on the phone. Gates always ask in 3.3, so new requests end `completed`. A `pass` record expires 60 seconds after the check, after which this endpoint reports `expired`.
79
83
  */
80
84
  status?: VerificationGetStatusStatus | undefined;
81
85
  requestId?: string | undefined;
@@ -101,9 +105,29 @@ export type VerificationGetStatusData = {
101
105
  */
102
106
  message?: string | undefined;
103
107
  /**
104
- * Handler error. Arrives inside data.error with HTTP 200 — check for it before reading the result.
108
+ * Handler error. Arrives inside `data.error` with HTTP 200. Check for it before reading the result.
105
109
  */
106
110
  error?: models.ErrorBody | undefined;
111
+ /**
112
+ * Why a request ended `failed`. Null while pending and on success. `already_trusted`: this BotShield ID already secures another account on your platform. `rebind_requires_prior_id`: this account is already secured by another BotShield ID. `pass_limit_reached`: the person has used the passes the gate allows. `real_days_not_met`: the BotShield ID has not yet proved a person on as many days as the gate asks. `unavailable`: the standard Unavailable result.
113
+ */
114
+ reason?: VerificationGetStatusReason | null | undefined;
115
+ /**
116
+ * GA 3.0: on a completed ceremony, whether an active Secured Account binding exists for (your platform, platform-user-ref). Null until completed.
117
+ */
118
+ trusted?: boolean | null | undefined;
119
+ /**
120
+ * GA 3.0: on a completed ceremony, whether THIS ceremony created the binding. Null until completed.
121
+ */
122
+ firstTime?: boolean | null | undefined;
123
+ /**
124
+ * GA 3.0: this request was minted as a notarize ceremony.
125
+ */
126
+ notarize?: boolean | undefined;
127
+ /**
128
+ * Your organization's public display name, as the BotShield app shows it to the person.
129
+ */
130
+ organizationName?: string | null | undefined;
107
131
  };
108
132
 
109
133
  /**
@@ -121,37 +145,11 @@ export const VerificationGetStatusSecurity$inboundSchema: z.ZodType<
121
145
  > = z.object({
122
146
  apiKeyAuth: types.optional(types.string()),
123
147
  apiKeyAuth1: types.optional(types.string()),
124
- apiKeyAuth2: types.optional(types.string()),
125
- apiKeyAuth3: types.optional(types.string()),
126
- apiKeyAuth4: types.optional(types.string()),
127
- apiKeyAuth5: types.optional(types.string()),
128
- apiKeyAuth6: types.optional(types.string()),
129
- apiKeyAuth7: types.optional(types.string()),
130
- apiKeyAuth8: types.optional(types.string()),
131
- apiKeyAuth9: types.optional(types.string()),
132
- apiKeyAuth10: types.optional(types.string()),
133
- apiKeyAuth11: types.optional(types.string()),
134
- apiKeyAuth12: types.optional(types.string()),
135
- apiKeyAuth13: types.optional(types.string()),
136
- apiKeyAuth14: types.optional(types.string()),
137
148
  });
138
149
  /** @internal */
139
150
  export type VerificationGetStatusSecurity$Outbound = {
140
151
  apiKeyAuth?: string | undefined;
141
152
  apiKeyAuth1?: string | undefined;
142
- apiKeyAuth2?: string | undefined;
143
- apiKeyAuth3?: string | undefined;
144
- apiKeyAuth4?: string | undefined;
145
- apiKeyAuth5?: string | undefined;
146
- apiKeyAuth6?: string | undefined;
147
- apiKeyAuth7?: string | undefined;
148
- apiKeyAuth8?: string | undefined;
149
- apiKeyAuth9?: string | undefined;
150
- apiKeyAuth10?: string | undefined;
151
- apiKeyAuth11?: string | undefined;
152
- apiKeyAuth12?: string | undefined;
153
- apiKeyAuth13?: string | undefined;
154
- apiKeyAuth14?: string | undefined;
155
153
  };
156
154
 
157
155
  /** @internal */
@@ -162,19 +160,6 @@ export const VerificationGetStatusSecurity$outboundSchema: z.ZodType<
162
160
  > = z.object({
163
161
  apiKeyAuth: z.string().optional(),
164
162
  apiKeyAuth1: z.string().optional(),
165
- apiKeyAuth2: z.string().optional(),
166
- apiKeyAuth3: z.string().optional(),
167
- apiKeyAuth4: z.string().optional(),
168
- apiKeyAuth5: z.string().optional(),
169
- apiKeyAuth6: z.string().optional(),
170
- apiKeyAuth7: z.string().optional(),
171
- apiKeyAuth8: z.string().optional(),
172
- apiKeyAuth9: z.string().optional(),
173
- apiKeyAuth10: z.string().optional(),
174
- apiKeyAuth11: z.string().optional(),
175
- apiKeyAuth12: z.string().optional(),
176
- apiKeyAuth13: z.string().optional(),
177
- apiKeyAuth14: z.string().optional(),
178
163
  });
179
164
 
180
165
  export function verificationGetStatusSecurityToJSON(
@@ -330,6 +315,19 @@ export function metadataFromJSON(
330
315
  );
331
316
  }
332
317
 
318
+ /** @internal */
319
+ export const VerificationGetStatusReason$inboundSchema: z.ZodType<
320
+ VerificationGetStatusReason,
321
+ z.ZodTypeDef,
322
+ unknown
323
+ > = openEnums.inboundSchema(VerificationGetStatusReason);
324
+ /** @internal */
325
+ export const VerificationGetStatusReason$outboundSchema: z.ZodType<
326
+ string,
327
+ z.ZodTypeDef,
328
+ VerificationGetStatusReason
329
+ > = openEnums.outboundSchema(VerificationGetStatusReason);
330
+
333
331
  /** @internal */
334
332
  export const VerificationGetStatusData$inboundSchema: z.ZodType<
335
333
  VerificationGetStatusData,
@@ -352,6 +350,11 @@ export const VerificationGetStatusData$inboundSchema: z.ZodType<
352
350
  metadata: z.nullable(z.lazy(() => Metadata$inboundSchema)).optional(),
353
351
  message: types.optional(types.string()),
354
352
  error: types.optional(models.ErrorBody$inboundSchema),
353
+ reason: z.nullable(VerificationGetStatusReason$inboundSchema).optional(),
354
+ trusted: z.nullable(types.boolean()).optional(),
355
+ first_time: z.nullable(types.boolean()).optional(),
356
+ notarize: types.optional(types.boolean()),
357
+ organization_name: z.nullable(types.string()).optional(),
355
358
  }).transform((v) => {
356
359
  return remap$(v, {
357
360
  "request_id": "requestId",
@@ -364,6 +367,8 @@ export const VerificationGetStatusData$inboundSchema: z.ZodType<
364
367
  "error_message": "errorMessage",
365
368
  "sdk_type": "sdkType",
366
369
  "presence_address": "presenceAddress",
370
+ "first_time": "firstTime",
371
+ "organization_name": "organizationName",
367
372
  });
368
373
  });
369
374
  /** @internal */
@@ -384,6 +389,11 @@ export type VerificationGetStatusData$Outbound = {
384
389
  metadata?: Metadata$Outbound | null | undefined;
385
390
  message?: string | undefined;
386
391
  error?: models.ErrorBody$Outbound | undefined;
392
+ reason?: string | null | undefined;
393
+ trusted?: boolean | null | undefined;
394
+ first_time?: boolean | null | undefined;
395
+ notarize?: boolean | undefined;
396
+ organization_name?: string | null | undefined;
387
397
  };
388
398
 
389
399
  /** @internal */
@@ -408,6 +418,11 @@ export const VerificationGetStatusData$outboundSchema: z.ZodType<
408
418
  metadata: z.nullable(z.lazy(() => Metadata$outboundSchema)).optional(),
409
419
  message: z.string().optional(),
410
420
  error: models.ErrorBody$outboundSchema.optional(),
421
+ reason: z.nullable(VerificationGetStatusReason$outboundSchema).optional(),
422
+ trusted: z.nullable(z.boolean()).optional(),
423
+ firstTime: z.nullable(z.boolean()).optional(),
424
+ notarize: z.boolean().optional(),
425
+ organizationName: z.nullable(z.string()).optional(),
411
426
  }).transform((v) => {
412
427
  return remap$(v, {
413
428
  requestId: "request_id",
@@ -420,6 +435,8 @@ export const VerificationGetStatusData$outboundSchema: z.ZodType<
420
435
  errorMessage: "error_message",
421
436
  sdkType: "sdk_type",
422
437
  presenceAddress: "presence_address",
438
+ firstTime: "first_time",
439
+ organizationName: "organization_name",
423
440
  });
424
441
  });
425
442
 
@@ -11,19 +11,6 @@ import { SDKValidationError } from "./errors/sdk-validation-error.js";
11
11
  export type Security = {
12
12
  agentKeyAuth?: string | undefined;
13
13
  agentKeyAuth1?: string | undefined;
14
- agentKeyAuth2?: string | undefined;
15
- agentKeyAuth3?: string | undefined;
16
- agentKeyAuth4?: string | undefined;
17
- agentKeyAuth5?: string | undefined;
18
- agentKeyAuth6?: string | undefined;
19
- agentKeyAuth7?: string | undefined;
20
- agentKeyAuth8?: string | undefined;
21
- agentKeyAuth9?: string | undefined;
22
- agentKeyAuth10?: string | undefined;
23
- agentKeyAuth11?: string | undefined;
24
- agentKeyAuth12?: string | undefined;
25
- agentKeyAuth13?: string | undefined;
26
- agentKeyAuth14?: string | undefined;
27
14
  };
28
15
 
29
16
  /** @internal */
@@ -34,37 +21,11 @@ export const Security$inboundSchema: z.ZodType<
34
21
  > = z.object({
35
22
  agentKeyAuth: types.optional(types.string()),
36
23
  agentKeyAuth1: types.optional(types.string()),
37
- agentKeyAuth2: types.optional(types.string()),
38
- agentKeyAuth3: types.optional(types.string()),
39
- agentKeyAuth4: types.optional(types.string()),
40
- agentKeyAuth5: types.optional(types.string()),
41
- agentKeyAuth6: types.optional(types.string()),
42
- agentKeyAuth7: types.optional(types.string()),
43
- agentKeyAuth8: types.optional(types.string()),
44
- agentKeyAuth9: types.optional(types.string()),
45
- agentKeyAuth10: types.optional(types.string()),
46
- agentKeyAuth11: types.optional(types.string()),
47
- agentKeyAuth12: types.optional(types.string()),
48
- agentKeyAuth13: types.optional(types.string()),
49
- agentKeyAuth14: types.optional(types.string()),
50
24
  });
51
25
  /** @internal */
52
26
  export type Security$Outbound = {
53
27
  agentKeyAuth?: string | undefined;
54
28
  agentKeyAuth1?: string | undefined;
55
- agentKeyAuth2?: string | undefined;
56
- agentKeyAuth3?: string | undefined;
57
- agentKeyAuth4?: string | undefined;
58
- agentKeyAuth5?: string | undefined;
59
- agentKeyAuth6?: string | undefined;
60
- agentKeyAuth7?: string | undefined;
61
- agentKeyAuth8?: string | undefined;
62
- agentKeyAuth9?: string | undefined;
63
- agentKeyAuth10?: string | undefined;
64
- agentKeyAuth11?: string | undefined;
65
- agentKeyAuth12?: string | undefined;
66
- agentKeyAuth13?: string | undefined;
67
- agentKeyAuth14?: string | undefined;
68
29
  };
69
30
 
70
31
  /** @internal */
@@ -75,19 +36,6 @@ export const Security$outboundSchema: z.ZodType<
75
36
  > = z.object({
76
37
  agentKeyAuth: z.string().optional(),
77
38
  agentKeyAuth1: z.string().optional(),
78
- agentKeyAuth2: z.string().optional(),
79
- agentKeyAuth3: z.string().optional(),
80
- agentKeyAuth4: z.string().optional(),
81
- agentKeyAuth5: z.string().optional(),
82
- agentKeyAuth6: z.string().optional(),
83
- agentKeyAuth7: z.string().optional(),
84
- agentKeyAuth8: z.string().optional(),
85
- agentKeyAuth9: z.string().optional(),
86
- agentKeyAuth10: z.string().optional(),
87
- agentKeyAuth11: z.string().optional(),
88
- agentKeyAuth12: z.string().optional(),
89
- agentKeyAuth13: z.string().optional(),
90
- agentKeyAuth14: z.string().optional(),
91
39
  });
92
40
 
93
41
  export function securityToJSON(security: Security): string {
@@ -14,7 +14,7 @@ export class Actions extends ClientSDK {
14
14
  * Propose an action for human confirmation
15
15
  *
16
16
  * @remarks
17
- * Queue a human-presence-gated action for a BotShield user. The user receives the card in the BotShield app (Agents Ask), confirms or denies with a biometric ceremony, and BotShield delivers a signed Proof of Resolution JWT to your registered callback URL (or poll check-status). Identify the user by opaque_id — the pairwise id from the bind ceremony. Authentication: agent key (bs_agent_<name>__<secret>) in the Authorization header.
17
+ * Queue a human-presence-gated action for a BotShield user. The user receives the card in the BotShield app (Agents Ask), confirms or denies with their passkey, and BotShield delivers a signed Proof of Resolution JWT to your registered callback URL (or poll check-status). Identify the user by opaque_id — the pairwise id from the bind ceremony. Authentication: agent key (bs_agent_<name>__<secret>) in the Authorization header.
18
18
  */
19
19
  async proposeAction(
20
20
  request: operations.ActionsProposeRequest,
package/src/sdk/census.ts CHANGED
@@ -57,7 +57,7 @@ export class Census extends ClientSDK {
57
57
  * Validate a verification token
58
58
  *
59
59
  * @remarks
60
- * Validates a BotShield attestation JWT — the primary server-side check. Attestations are ES256-signed; the public key is published at /.well-known/jwks.json (kid in the header), so you may also verify locally with any JWT library. Claims are anonymous by construction: the token attests the event, never the person.
60
+ * Validates a BotShield attestation JWT — the primary server-side check. Attestations are ES256-signed; the public key is published at /.well-known/jwks.json (kid in the header), so you may also verify locally with any JWT library. Claims are anonymous by construction: the token attests the event, never the person. Each attestation is for one organization (aud = its organization_id; pass `audience` to enforce it) and one check: a repeat check is flagged `replayed` and refused from 2026-11-15.
61
61
  */
62
62
  async verifyToken(
63
63
  security: operations.SDKVerifyTokenSecurity,
package/src/sdk/sdk.ts CHANGED
@@ -5,6 +5,7 @@
5
5
  import { ClientSDK } from "../lib/sdks.js";
6
6
  import { Actions } from "./actions.js";
7
7
  import { Census } from "./census.js";
8
+ import { SecuredAccounts } from "./secured-accounts.js";
8
9
  import { Verification } from "./verification.js";
9
10
 
10
11
  export class BotShield extends ClientSDK {
@@ -22,4 +23,9 @@ export class BotShield extends ClientSDK {
22
23
  get actions(): Actions {
23
24
  return (this._actions ??= new Actions(this._options));
24
25
  }
26
+
27
+ private _securedAccounts?: SecuredAccounts;
28
+ get securedAccounts(): SecuredAccounts {
29
+ return (this._securedAccounts ??= new SecuredAccounts(this._options));
30
+ }
25
31
  }
@@ -0,0 +1,69 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { securedAccountsGetStatus } from "../funcs/secured-accounts-get-status.js";
6
+ import { securedAccountsList } from "../funcs/secured-accounts-list.js";
7
+ import { securedAccountsRevoke } from "../funcs/secured-accounts-revoke.js";
8
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
9
+ import * as operations from "../models/operations/index.js";
10
+ import { unwrapAsync } from "../types/fp.js";
11
+
12
+ export class SecuredAccounts extends ClientSDK {
13
+ /**
14
+ * List Secured Accounts
15
+ *
16
+ * @remarks
17
+ * Your Secured Accounts, newest first. Filter to one account with `platform_user_ref` (exact match) or by `status`. Rows carry the handle and binding facts — never your ref or anything that identifies the person. The environment is your API key's: a `bs_dev_…` key sees and changes development Secured Accounts only, a `bs_prod_…` key production only. Server API keys only — site keys (`pk_…`) are refused.
18
+ */
19
+ async list(
20
+ security: operations.SecuredAccountsListSecurity,
21
+ request?: operations.SecuredAccountsListRequest | undefined,
22
+ options?: RequestOptions,
23
+ ): Promise<operations.SecuredAccountsListResponse> {
24
+ return unwrapAsync(securedAccountsList(
25
+ this,
26
+ security,
27
+ request,
28
+ options,
29
+ ));
30
+ }
31
+
32
+ /**
33
+ * Revoke a Secured Account
34
+ *
35
+ * @remarks
36
+ * End a Secured Account from your server. Send `reason: 'credential_changed'` when a primary sign-in detail changed on your side (password reset, email change, …) — the Secured Accounts spec requires it; the person's app then shows the account as Unlinked with a Re-link action. Your company's agents for that person are revoked with it, `account.unlinked { handle, by: 'platform', unlinked_at, reason, surface_id }` is sent to your webhook endpoints, live widgets for the account update at once, and the person is told. The next passkey ceremony on that account secures it again from scratch. Idempotent: an account that is not secured (or already unlinked) returns `revoked: false`. Select it by `platform_user_ref` or by `handle` — exactly one. The environment is your API key's: a `bs_dev_…` key sees and changes development Secured Accounts only, a `bs_prod_…` key production only. Server API keys only — site keys (`pk_…`) are refused.
37
+ */
38
+ async revoke(
39
+ security: operations.SecuredAccountsRevokeSecurity,
40
+ request: operations.SecuredAccountsRevokeRequest,
41
+ options?: RequestOptions,
42
+ ): Promise<operations.SecuredAccountsRevokeResponse> {
43
+ return unwrapAsync(securedAccountsRevoke(
44
+ this,
45
+ security,
46
+ request,
47
+ options,
48
+ ));
49
+ }
50
+
51
+ /**
52
+ * Get Secured Account status
53
+ *
54
+ * @remarks
55
+ * Is this account a Secured Account, and is the person's recent presence fresh? Returns exactly what the embed widget's live presence stream reports for the same account, so your server and the page always agree: `none` (not secured), `fresh` (secured, recent passkey presence until `fresh_until`), `stale` (secured, presence has lapsed — ask for a passkey again). The environment is your API key's: a `bs_dev_…` key sees and changes development Secured Accounts only, a `bs_prod_…` key production only. Server API keys only — site keys (`pk_…`) are refused.
56
+ */
57
+ async getStatus(
58
+ security: operations.SecuredAccountsStatusSecurity,
59
+ request: operations.SecuredAccountsStatusRequest,
60
+ options?: RequestOptions,
61
+ ): Promise<operations.SecuredAccountsStatusResponse> {
62
+ return unwrapAsync(securedAccountsGetStatus(
63
+ this,
64
+ security,
65
+ request,
66
+ options,
67
+ ));
68
+ }
69
+ }