botshield-sdk 2.2.1 → 4.0.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 (408) hide show
  1. package/README.md +29 -9
  2. package/bin/mcp-server.js +1163 -122
  3. package/bin/mcp-server.js.map +37 -26
  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/actions-verify-resolution.d.ts +18 -0
  7. package/dist/commonjs/funcs/actions-verify-resolution.d.ts.map +1 -0
  8. package/dist/commonjs/funcs/actions-verify-resolution.js +129 -0
  9. package/dist/commonjs/funcs/actions-verify-resolution.js.map +1 -0
  10. package/dist/commonjs/funcs/census-confirm-link.d.ts +17 -0
  11. package/dist/commonjs/funcs/census-confirm-link.d.ts.map +1 -0
  12. package/dist/commonjs/funcs/census-confirm-link.js +119 -0
  13. package/dist/commonjs/funcs/census-confirm-link.js.map +1 -0
  14. package/dist/commonjs/funcs/census-create-verification-link.d.ts +2 -0
  15. package/dist/commonjs/funcs/census-create-verification-link.d.ts.map +1 -1
  16. package/dist/commonjs/funcs/census-create-verification-link.js +2 -0
  17. package/dist/commonjs/funcs/census-create-verification-link.js.map +1 -1
  18. package/dist/commonjs/funcs/census-send-by-number.d.ts +18 -0
  19. package/dist/commonjs/funcs/census-send-by-number.d.ts.map +1 -0
  20. package/dist/commonjs/funcs/census-send-by-number.js +123 -0
  21. package/dist/commonjs/funcs/census-send-by-number.js.map +1 -0
  22. package/dist/commonjs/funcs/census-verify-token.d.ts +1 -1
  23. package/dist/commonjs/funcs/census-verify-token.js +1 -1
  24. package/dist/commonjs/funcs/gates-actions-request-cancel.d.ts +18 -0
  25. package/dist/commonjs/funcs/gates-actions-request-cancel.d.ts.map +1 -0
  26. package/dist/commonjs/funcs/gates-actions-request-cancel.js +123 -0
  27. package/dist/commonjs/funcs/gates-actions-request-cancel.js.map +1 -0
  28. package/dist/commonjs/funcs/gates-actions-request-status.js +1 -0
  29. package/dist/commonjs/funcs/gates-actions-request-status.js.map +1 -1
  30. package/dist/commonjs/funcs/gates-actions-request.d.ts +1 -1
  31. package/dist/commonjs/funcs/gates-actions-request.js +1 -1
  32. package/dist/commonjs/funcs/gates-actions-update.d.ts +18 -0
  33. package/dist/commonjs/funcs/gates-actions-update.d.ts.map +1 -0
  34. package/dist/commonjs/funcs/gates-actions-update.js +123 -0
  35. package/dist/commonjs/funcs/gates-actions-update.js.map +1 -0
  36. package/dist/commonjs/funcs/inline-passkey-complete.d.ts +20 -0
  37. package/dist/commonjs/funcs/inline-passkey-complete.d.ts.map +1 -0
  38. package/dist/commonjs/funcs/inline-passkey-complete.js +116 -0
  39. package/dist/commonjs/funcs/inline-passkey-complete.js.map +1 -0
  40. package/dist/commonjs/funcs/inline-passkey-get-options.d.ts +20 -0
  41. package/dist/commonjs/funcs/inline-passkey-get-options.d.ts.map +1 -0
  42. package/dist/commonjs/funcs/inline-passkey-get-options.js +116 -0
  43. package/dist/commonjs/funcs/inline-passkey-get-options.js.map +1 -0
  44. package/dist/commonjs/funcs/verification-get-status.d.ts +1 -1
  45. package/dist/commonjs/funcs/verification-get-status.js +1 -1
  46. package/dist/commonjs/lib/config.d.ts +20 -4
  47. package/dist/commonjs/lib/config.d.ts.map +1 -1
  48. package/dist/commonjs/lib/config.js +22 -18
  49. package/dist/commonjs/lib/config.js.map +1 -1
  50. package/dist/commonjs/mcp-server/cli/start/command.d.ts.map +1 -1
  51. package/dist/commonjs/mcp-server/cli/start/command.js +4 -3
  52. package/dist/commonjs/mcp-server/cli/start/command.js.map +1 -1
  53. package/dist/commonjs/mcp-server/cli/start/impl.d.ts +1 -1
  54. package/dist/commonjs/mcp-server/cli/start/impl.d.ts.map +1 -1
  55. package/dist/commonjs/mcp-server/cli/start/impl.js +2 -2
  56. package/dist/commonjs/mcp-server/cli/start/impl.js.map +1 -1
  57. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  58. package/dist/commonjs/mcp-server/server.d.ts +1 -1
  59. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  60. package/dist/commonjs/mcp-server/server.js +2 -2
  61. package/dist/commonjs/mcp-server/server.js.map +1 -1
  62. package/dist/commonjs/models/bot-shield-action.d.ts +10 -0
  63. package/dist/commonjs/models/bot-shield-action.d.ts.map +1 -1
  64. package/dist/commonjs/models/bot-shield-action.js +8 -0
  65. package/dist/commonjs/models/bot-shield-action.js.map +1 -1
  66. package/dist/commonjs/models/error-body.d.ts +11 -1
  67. package/dist/commonjs/models/error-body.d.ts.map +1 -1
  68. package/dist/commonjs/models/error-body.js +6 -0
  69. package/dist/commonjs/models/error-body.js.map +1 -1
  70. package/dist/commonjs/models/gate-human-verified-event.d.ts +93 -0
  71. package/dist/commonjs/models/gate-human-verified-event.d.ts.map +1 -0
  72. package/dist/commonjs/models/gate-human-verified-event.js +119 -0
  73. package/dist/commonjs/models/gate-human-verified-event.js.map +1 -0
  74. package/dist/commonjs/models/gate-unavailable-event.d.ts +112 -0
  75. package/dist/commonjs/models/gate-unavailable-event.d.ts.map +1 -0
  76. package/dist/commonjs/models/gate-unavailable-event.js +137 -0
  77. package/dist/commonjs/models/gate-unavailable-event.js.map +1 -0
  78. package/dist/commonjs/models/gates-api-error.d.ts +5 -0
  79. package/dist/commonjs/models/gates-api-error.d.ts.map +1 -1
  80. package/dist/commonjs/models/gates-api-error.js +11 -0
  81. package/dist/commonjs/models/gates-api-error.js.map +1 -1
  82. package/dist/commonjs/models/index.d.ts +4 -0
  83. package/dist/commonjs/models/index.d.ts.map +1 -1
  84. package/dist/commonjs/models/index.js +4 -0
  85. package/dist/commonjs/models/index.js.map +1 -1
  86. package/dist/commonjs/models/inline-passkey-assertion.d.ts +66 -0
  87. package/dist/commonjs/models/inline-passkey-assertion.d.ts.map +1 -0
  88. package/dist/commonjs/models/inline-passkey-assertion.js +98 -0
  89. package/dist/commonjs/models/inline-passkey-assertion.js.map +1 -0
  90. package/dist/commonjs/models/inline-passkey-request-options.d.ts +78 -0
  91. package/dist/commonjs/models/inline-passkey-request-options.d.ts.map +1 -0
  92. package/dist/commonjs/models/inline-passkey-request-options.js +107 -0
  93. package/dist/commonjs/models/inline-passkey-request-options.js.map +1 -0
  94. package/dist/commonjs/models/operations/actions-propose.d.ts +21 -1
  95. package/dist/commonjs/models/operations/actions-propose.d.ts.map +1 -1
  96. package/dist/commonjs/models/operations/actions-propose.js +16 -0
  97. package/dist/commonjs/models/operations/actions-propose.js.map +1 -1
  98. package/dist/commonjs/models/operations/gates-api-actions-create.d.ts +11 -1
  99. package/dist/commonjs/models/operations/gates-api-actions-create.d.ts.map +1 -1
  100. package/dist/commonjs/models/operations/gates-api-actions-create.js +4 -0
  101. package/dist/commonjs/models/operations/gates-api-actions-create.js.map +1 -1
  102. package/dist/commonjs/models/operations/gates-api-actions-list.d.ts +1 -1
  103. package/dist/commonjs/models/operations/gates-api-actions-request-cancel.d.ts +113 -0
  104. package/dist/commonjs/models/operations/gates-api-actions-request-cancel.d.ts.map +1 -0
  105. package/dist/commonjs/models/operations/gates-api-actions-request-cancel.js +178 -0
  106. package/dist/commonjs/models/operations/gates-api-actions-request-cancel.js.map +1 -0
  107. package/dist/commonjs/models/operations/gates-api-actions-request-status.d.ts +12 -1
  108. package/dist/commonjs/models/operations/gates-api-actions-request-status.d.ts.map +1 -1
  109. package/dist/commonjs/models/operations/gates-api-actions-request-status.js +2 -0
  110. package/dist/commonjs/models/operations/gates-api-actions-request-status.js.map +1 -1
  111. package/dist/commonjs/models/operations/gates-api-actions-request.d.ts +34 -4
  112. package/dist/commonjs/models/operations/gates-api-actions-request.d.ts.map +1 -1
  113. package/dist/commonjs/models/operations/gates-api-actions-request.js +32 -3
  114. package/dist/commonjs/models/operations/gates-api-actions-request.js.map +1 -1
  115. package/dist/commonjs/models/operations/gates-api-actions-set-state.d.ts +1 -1
  116. package/dist/commonjs/models/operations/gates-api-actions-update.d.ts +99 -0
  117. package/dist/commonjs/models/operations/gates-api-actions-update.d.ts.map +1 -0
  118. package/dist/commonjs/models/operations/gates-api-actions-update.js +141 -0
  119. package/dist/commonjs/models/operations/gates-api-actions-update.js.map +1 -0
  120. package/dist/commonjs/models/operations/index.d.ts +7 -0
  121. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  122. package/dist/commonjs/models/operations/index.js +7 -0
  123. package/dist/commonjs/models/operations/index.js.map +1 -1
  124. package/dist/commonjs/models/operations/request-passkey-complete.d.ts +107 -0
  125. package/dist/commonjs/models/operations/request-passkey-complete.d.ts.map +1 -0
  126. package/dist/commonjs/models/operations/request-passkey-complete.js +141 -0
  127. package/dist/commonjs/models/operations/request-passkey-complete.js.map +1 -0
  128. package/dist/commonjs/models/operations/request-passkey-options.d.ts +178 -0
  129. package/dist/commonjs/models/operations/request-passkey-options.d.ts.map +1 -0
  130. package/dist/commonjs/models/operations/request-passkey-options.js +193 -0
  131. package/dist/commonjs/models/operations/request-passkey-options.js.map +1 -0
  132. package/dist/commonjs/models/operations/sdk-confirm-link.d.ts +130 -0
  133. package/dist/commonjs/models/operations/sdk-confirm-link.d.ts.map +1 -0
  134. package/dist/commonjs/models/operations/sdk-confirm-link.js +205 -0
  135. package/dist/commonjs/models/operations/sdk-confirm-link.js.map +1 -0
  136. package/dist/commonjs/models/operations/sdk-create-session.d.ts +1 -1
  137. package/dist/commonjs/models/operations/sdk-create-verification-link.d.ts +43 -2
  138. package/dist/commonjs/models/operations/sdk-create-verification-link.d.ts.map +1 -1
  139. package/dist/commonjs/models/operations/sdk-create-verification-link.js +30 -1
  140. package/dist/commonjs/models/operations/sdk-create-verification-link.js.map +1 -1
  141. package/dist/commonjs/models/operations/sdk-send-by-number.d.ts +124 -0
  142. package/dist/commonjs/models/operations/sdk-send-by-number.d.ts.map +1 -0
  143. package/dist/commonjs/models/operations/sdk-send-by-number.js +203 -0
  144. package/dist/commonjs/models/operations/sdk-send-by-number.js.map +1 -0
  145. package/dist/commonjs/models/operations/sdk-verify-resolution.d.ts +125 -0
  146. package/dist/commonjs/models/operations/sdk-verify-resolution.d.ts.map +1 -0
  147. package/dist/commonjs/models/operations/sdk-verify-resolution.js +182 -0
  148. package/dist/commonjs/models/operations/sdk-verify-resolution.js.map +1 -0
  149. package/dist/commonjs/models/operations/sdk-verify-token.d.ts +95 -1
  150. package/dist/commonjs/models/operations/sdk-verify-token.d.ts.map +1 -1
  151. package/dist/commonjs/models/operations/sdk-verify-token.js +86 -1
  152. package/dist/commonjs/models/operations/sdk-verify-token.js.map +1 -1
  153. package/dist/commonjs/models/operations/verification-get-status.d.ts +86 -24
  154. package/dist/commonjs/models/operations/verification-get-status.d.ts.map +1 -1
  155. package/dist/commonjs/models/operations/verification-get-status.js +70 -18
  156. package/dist/commonjs/models/operations/verification-get-status.js.map +1 -1
  157. package/dist/commonjs/models/passes-per-person.d.ts +1 -1
  158. package/dist/commonjs/sdk/actions.d.ts +8 -1
  159. package/dist/commonjs/sdk/actions.d.ts.map +1 -1
  160. package/dist/commonjs/sdk/actions.js +11 -1
  161. package/dist/commonjs/sdk/actions.js.map +1 -1
  162. package/dist/commonjs/sdk/census.d.ts +17 -1
  163. package/dist/commonjs/sdk/census.d.ts.map +1 -1
  164. package/dist/commonjs/sdk/census.js +23 -1
  165. package/dist/commonjs/sdk/census.js.map +1 -1
  166. package/dist/commonjs/sdk/gates-actions.d.ts +15 -1
  167. package/dist/commonjs/sdk/gates-actions.d.ts.map +1 -1
  168. package/dist/commonjs/sdk/gates-actions.js +21 -1
  169. package/dist/commonjs/sdk/gates-actions.js.map +1 -1
  170. package/dist/commonjs/sdk/inline-passkey.d.ts +23 -0
  171. package/dist/commonjs/sdk/inline-passkey.d.ts.map +1 -0
  172. package/dist/commonjs/sdk/inline-passkey.js +36 -0
  173. package/dist/commonjs/sdk/inline-passkey.js.map +1 -0
  174. package/dist/commonjs/sdk/sdk.d.ts +5 -2
  175. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  176. package/dist/commonjs/sdk/sdk.js +9 -4
  177. package/dist/commonjs/sdk/sdk.js.map +1 -1
  178. package/dist/commonjs/sdk/verification.d.ts +1 -1
  179. package/dist/commonjs/sdk/verification.js +1 -1
  180. package/dist/esm/funcs/actions-propose-action.d.ts +1 -1
  181. package/dist/esm/funcs/actions-propose-action.js +1 -1
  182. package/dist/esm/funcs/actions-verify-resolution.d.ts +18 -0
  183. package/dist/esm/funcs/actions-verify-resolution.d.ts.map +1 -0
  184. package/dist/esm/funcs/actions-verify-resolution.js +93 -0
  185. package/dist/esm/funcs/actions-verify-resolution.js.map +1 -0
  186. package/dist/esm/funcs/census-confirm-link.d.ts +17 -0
  187. package/dist/esm/funcs/census-confirm-link.d.ts.map +1 -0
  188. package/dist/esm/funcs/census-confirm-link.js +83 -0
  189. package/dist/esm/funcs/census-confirm-link.js.map +1 -0
  190. package/dist/esm/funcs/census-create-verification-link.d.ts +2 -0
  191. package/dist/esm/funcs/census-create-verification-link.d.ts.map +1 -1
  192. package/dist/esm/funcs/census-create-verification-link.js +2 -0
  193. package/dist/esm/funcs/census-create-verification-link.js.map +1 -1
  194. package/dist/esm/funcs/census-send-by-number.d.ts +18 -0
  195. package/dist/esm/funcs/census-send-by-number.d.ts.map +1 -0
  196. package/dist/esm/funcs/census-send-by-number.js +87 -0
  197. package/dist/esm/funcs/census-send-by-number.js.map +1 -0
  198. package/dist/esm/funcs/census-verify-token.d.ts +1 -1
  199. package/dist/esm/funcs/census-verify-token.js +1 -1
  200. package/dist/esm/funcs/gates-actions-request-cancel.d.ts +18 -0
  201. package/dist/esm/funcs/gates-actions-request-cancel.d.ts.map +1 -0
  202. package/dist/esm/funcs/gates-actions-request-cancel.js +87 -0
  203. package/dist/esm/funcs/gates-actions-request-cancel.js.map +1 -0
  204. package/dist/esm/funcs/gates-actions-request-status.js +1 -0
  205. package/dist/esm/funcs/gates-actions-request-status.js.map +1 -1
  206. package/dist/esm/funcs/gates-actions-request.d.ts +1 -1
  207. package/dist/esm/funcs/gates-actions-request.js +1 -1
  208. package/dist/esm/funcs/gates-actions-update.d.ts +18 -0
  209. package/dist/esm/funcs/gates-actions-update.d.ts.map +1 -0
  210. package/dist/esm/funcs/gates-actions-update.js +87 -0
  211. package/dist/esm/funcs/gates-actions-update.js.map +1 -0
  212. package/dist/esm/funcs/inline-passkey-complete.d.ts +20 -0
  213. package/dist/esm/funcs/inline-passkey-complete.d.ts.map +1 -0
  214. package/dist/esm/funcs/inline-passkey-complete.js +80 -0
  215. package/dist/esm/funcs/inline-passkey-complete.js.map +1 -0
  216. package/dist/esm/funcs/inline-passkey-get-options.d.ts +20 -0
  217. package/dist/esm/funcs/inline-passkey-get-options.d.ts.map +1 -0
  218. package/dist/esm/funcs/inline-passkey-get-options.js +80 -0
  219. package/dist/esm/funcs/inline-passkey-get-options.js.map +1 -0
  220. package/dist/esm/funcs/verification-get-status.d.ts +1 -1
  221. package/dist/esm/funcs/verification-get-status.js +1 -1
  222. package/dist/esm/lib/config.d.ts +20 -4
  223. package/dist/esm/lib/config.d.ts.map +1 -1
  224. package/dist/esm/lib/config.js +21 -17
  225. package/dist/esm/lib/config.js.map +1 -1
  226. package/dist/esm/mcp-server/cli/start/command.d.ts.map +1 -1
  227. package/dist/esm/mcp-server/cli/start/command.js +5 -4
  228. package/dist/esm/mcp-server/cli/start/command.js.map +1 -1
  229. package/dist/esm/mcp-server/cli/start/impl.d.ts +1 -1
  230. package/dist/esm/mcp-server/cli/start/impl.d.ts.map +1 -1
  231. package/dist/esm/mcp-server/cli/start/impl.js +2 -2
  232. package/dist/esm/mcp-server/cli/start/impl.js.map +1 -1
  233. package/dist/esm/mcp-server/mcp-server.js +1 -1
  234. package/dist/esm/mcp-server/server.d.ts +1 -1
  235. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  236. package/dist/esm/mcp-server/server.js +2 -2
  237. package/dist/esm/mcp-server/server.js.map +1 -1
  238. package/dist/esm/models/bot-shield-action.d.ts +10 -0
  239. package/dist/esm/models/bot-shield-action.d.ts.map +1 -1
  240. package/dist/esm/models/bot-shield-action.js +8 -0
  241. package/dist/esm/models/bot-shield-action.js.map +1 -1
  242. package/dist/esm/models/error-body.d.ts +11 -1
  243. package/dist/esm/models/error-body.d.ts.map +1 -1
  244. package/dist/esm/models/error-body.js +6 -0
  245. package/dist/esm/models/error-body.js.map +1 -1
  246. package/dist/esm/models/gate-human-verified-event.d.ts +93 -0
  247. package/dist/esm/models/gate-human-verified-event.d.ts.map +1 -0
  248. package/dist/esm/models/gate-human-verified-event.js +81 -0
  249. package/dist/esm/models/gate-human-verified-event.js.map +1 -0
  250. package/dist/esm/models/gate-unavailable-event.d.ts +112 -0
  251. package/dist/esm/models/gate-unavailable-event.d.ts.map +1 -0
  252. package/dist/esm/models/gate-unavailable-event.js +99 -0
  253. package/dist/esm/models/gate-unavailable-event.js.map +1 -0
  254. package/dist/esm/models/gates-api-error.d.ts +5 -0
  255. package/dist/esm/models/gates-api-error.d.ts.map +1 -1
  256. package/dist/esm/models/gates-api-error.js +11 -0
  257. package/dist/esm/models/gates-api-error.js.map +1 -1
  258. package/dist/esm/models/index.d.ts +4 -0
  259. package/dist/esm/models/index.d.ts.map +1 -1
  260. package/dist/esm/models/index.js +4 -0
  261. package/dist/esm/models/index.js.map +1 -1
  262. package/dist/esm/models/inline-passkey-assertion.d.ts +66 -0
  263. package/dist/esm/models/inline-passkey-assertion.d.ts.map +1 -0
  264. package/dist/esm/models/inline-passkey-assertion.js +58 -0
  265. package/dist/esm/models/inline-passkey-assertion.js.map +1 -0
  266. package/dist/esm/models/inline-passkey-request-options.d.ts +78 -0
  267. package/dist/esm/models/inline-passkey-request-options.d.ts.map +1 -0
  268. package/dist/esm/models/inline-passkey-request-options.js +67 -0
  269. package/dist/esm/models/inline-passkey-request-options.js.map +1 -0
  270. package/dist/esm/models/operations/actions-propose.d.ts +21 -1
  271. package/dist/esm/models/operations/actions-propose.d.ts.map +1 -1
  272. package/dist/esm/models/operations/actions-propose.js +16 -0
  273. package/dist/esm/models/operations/actions-propose.js.map +1 -1
  274. package/dist/esm/models/operations/gates-api-actions-create.d.ts +11 -1
  275. package/dist/esm/models/operations/gates-api-actions-create.d.ts.map +1 -1
  276. package/dist/esm/models/operations/gates-api-actions-create.js +4 -0
  277. package/dist/esm/models/operations/gates-api-actions-create.js.map +1 -1
  278. package/dist/esm/models/operations/gates-api-actions-list.d.ts +1 -1
  279. package/dist/esm/models/operations/gates-api-actions-request-cancel.d.ts +113 -0
  280. package/dist/esm/models/operations/gates-api-actions-request-cancel.d.ts.map +1 -0
  281. package/dist/esm/models/operations/gates-api-actions-request-cancel.js +132 -0
  282. package/dist/esm/models/operations/gates-api-actions-request-cancel.js.map +1 -0
  283. package/dist/esm/models/operations/gates-api-actions-request-status.d.ts +12 -1
  284. package/dist/esm/models/operations/gates-api-actions-request-status.d.ts.map +1 -1
  285. package/dist/esm/models/operations/gates-api-actions-request-status.js +2 -0
  286. package/dist/esm/models/operations/gates-api-actions-request-status.js.map +1 -1
  287. package/dist/esm/models/operations/gates-api-actions-request.d.ts +34 -4
  288. package/dist/esm/models/operations/gates-api-actions-request.d.ts.map +1 -1
  289. package/dist/esm/models/operations/gates-api-actions-request.js +29 -2
  290. package/dist/esm/models/operations/gates-api-actions-request.js.map +1 -1
  291. package/dist/esm/models/operations/gates-api-actions-set-state.d.ts +1 -1
  292. package/dist/esm/models/operations/gates-api-actions-update.d.ts +99 -0
  293. package/dist/esm/models/operations/gates-api-actions-update.d.ts.map +1 -0
  294. package/dist/esm/models/operations/gates-api-actions-update.js +95 -0
  295. package/dist/esm/models/operations/gates-api-actions-update.js.map +1 -0
  296. package/dist/esm/models/operations/index.d.ts +7 -0
  297. package/dist/esm/models/operations/index.d.ts.map +1 -1
  298. package/dist/esm/models/operations/index.js +7 -0
  299. package/dist/esm/models/operations/index.js.map +1 -1
  300. package/dist/esm/models/operations/request-passkey-complete.d.ts +107 -0
  301. package/dist/esm/models/operations/request-passkey-complete.d.ts.map +1 -0
  302. package/dist/esm/models/operations/request-passkey-complete.js +97 -0
  303. package/dist/esm/models/operations/request-passkey-complete.js.map +1 -0
  304. package/dist/esm/models/operations/request-passkey-options.d.ts +178 -0
  305. package/dist/esm/models/operations/request-passkey-options.d.ts.map +1 -0
  306. package/dist/esm/models/operations/request-passkey-options.js +149 -0
  307. package/dist/esm/models/operations/request-passkey-options.js.map +1 -0
  308. package/dist/esm/models/operations/sdk-confirm-link.d.ts +130 -0
  309. package/dist/esm/models/operations/sdk-confirm-link.d.ts.map +1 -0
  310. package/dist/esm/models/operations/sdk-confirm-link.js +157 -0
  311. package/dist/esm/models/operations/sdk-confirm-link.js.map +1 -0
  312. package/dist/esm/models/operations/sdk-create-session.d.ts +1 -1
  313. package/dist/esm/models/operations/sdk-create-verification-link.d.ts +43 -2
  314. package/dist/esm/models/operations/sdk-create-verification-link.d.ts.map +1 -1
  315. package/dist/esm/models/operations/sdk-create-verification-link.js +29 -0
  316. package/dist/esm/models/operations/sdk-create-verification-link.js.map +1 -1
  317. package/dist/esm/models/operations/sdk-send-by-number.d.ts +124 -0
  318. package/dist/esm/models/operations/sdk-send-by-number.d.ts.map +1 -0
  319. package/dist/esm/models/operations/sdk-send-by-number.js +155 -0
  320. package/dist/esm/models/operations/sdk-send-by-number.js.map +1 -0
  321. package/dist/esm/models/operations/sdk-verify-resolution.d.ts +125 -0
  322. package/dist/esm/models/operations/sdk-verify-resolution.d.ts.map +1 -0
  323. package/dist/esm/models/operations/sdk-verify-resolution.js +136 -0
  324. package/dist/esm/models/operations/sdk-verify-resolution.js.map +1 -0
  325. package/dist/esm/models/operations/sdk-verify-token.d.ts +95 -1
  326. package/dist/esm/models/operations/sdk-verify-token.d.ts.map +1 -1
  327. package/dist/esm/models/operations/sdk-verify-token.js +83 -0
  328. package/dist/esm/models/operations/sdk-verify-token.js.map +1 -1
  329. package/dist/esm/models/operations/verification-get-status.d.ts +86 -24
  330. package/dist/esm/models/operations/verification-get-status.d.ts.map +1 -1
  331. package/dist/esm/models/operations/verification-get-status.js +69 -17
  332. package/dist/esm/models/operations/verification-get-status.js.map +1 -1
  333. package/dist/esm/models/passes-per-person.d.ts +1 -1
  334. package/dist/esm/sdk/actions.d.ts +8 -1
  335. package/dist/esm/sdk/actions.d.ts.map +1 -1
  336. package/dist/esm/sdk/actions.js +11 -1
  337. package/dist/esm/sdk/actions.js.map +1 -1
  338. package/dist/esm/sdk/census.d.ts +17 -1
  339. package/dist/esm/sdk/census.d.ts.map +1 -1
  340. package/dist/esm/sdk/census.js +23 -1
  341. package/dist/esm/sdk/census.js.map +1 -1
  342. package/dist/esm/sdk/gates-actions.d.ts +15 -1
  343. package/dist/esm/sdk/gates-actions.d.ts.map +1 -1
  344. package/dist/esm/sdk/gates-actions.js +21 -1
  345. package/dist/esm/sdk/gates-actions.js.map +1 -1
  346. package/dist/esm/sdk/inline-passkey.d.ts +23 -0
  347. package/dist/esm/sdk/inline-passkey.d.ts.map +1 -0
  348. package/dist/esm/sdk/inline-passkey.js +32 -0
  349. package/dist/esm/sdk/inline-passkey.js.map +1 -0
  350. package/dist/esm/sdk/sdk.d.ts +5 -2
  351. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  352. package/dist/esm/sdk/sdk.js +9 -4
  353. package/dist/esm/sdk/sdk.js.map +1 -1
  354. package/dist/esm/sdk/verification.d.ts +1 -1
  355. package/dist/esm/sdk/verification.js +1 -1
  356. package/jsr.json +1 -1
  357. package/package.json +1 -1
  358. package/src/funcs/actions-propose-action.ts +1 -1
  359. package/src/funcs/actions-verify-resolution.ts +192 -0
  360. package/src/funcs/census-confirm-link.ts +171 -0
  361. package/src/funcs/census-create-verification-link.ts +2 -0
  362. package/src/funcs/census-send-by-number.ts +180 -0
  363. package/src/funcs/census-verify-token.ts +1 -1
  364. package/src/funcs/gates-actions-request-cancel.ts +187 -0
  365. package/src/funcs/gates-actions-request-status.ts +1 -0
  366. package/src/funcs/gates-actions-request.ts +1 -1
  367. package/src/funcs/gates-actions-update.ts +185 -0
  368. package/src/funcs/inline-passkey-complete.ts +172 -0
  369. package/src/funcs/inline-passkey-get-options.ts +172 -0
  370. package/src/funcs/verification-get-status.ts +1 -1
  371. package/src/lib/config.ts +22 -18
  372. package/src/mcp-server/cli/start/command.ts +5 -4
  373. package/src/mcp-server/cli/start/impl.ts +3 -3
  374. package/src/mcp-server/mcp-server.ts +1 -1
  375. package/src/mcp-server/server.ts +3 -3
  376. package/src/models/bot-shield-action.ts +18 -0
  377. package/src/models/error-body.ts +17 -1
  378. package/src/models/gate-human-verified-event.ts +181 -0
  379. package/src/models/gate-unavailable-event.ts +218 -0
  380. package/src/models/gates-api-error.ts +16 -0
  381. package/src/models/index.ts +4 -0
  382. package/src/models/inline-passkey-assertion.ts +147 -0
  383. package/src/models/inline-passkey-request-options.ts +175 -0
  384. package/src/models/operations/actions-propose.ts +37 -1
  385. package/src/models/operations/gates-api-actions-create.ts +15 -1
  386. package/src/models/operations/gates-api-actions-list.ts +1 -1
  387. package/src/models/operations/gates-api-actions-request-cancel.ts +339 -0
  388. package/src/models/operations/gates-api-actions-request-status.ts +14 -1
  389. package/src/models/operations/gates-api-actions-request.ts +83 -6
  390. package/src/models/operations/gates-api-actions-set-state.ts +1 -1
  391. package/src/models/operations/gates-api-actions-update.ts +281 -0
  392. package/src/models/operations/index.ts +7 -0
  393. package/src/models/operations/request-passkey-complete.ts +272 -0
  394. package/src/models/operations/request-passkey-options.ts +372 -0
  395. package/src/models/operations/sdk-confirm-link.ts +380 -0
  396. package/src/models/operations/sdk-create-session.ts +1 -1
  397. package/src/models/operations/sdk-create-verification-link.ts +69 -2
  398. package/src/models/operations/sdk-send-by-number.ts +372 -0
  399. package/src/models/operations/sdk-verify-resolution.ts +341 -0
  400. package/src/models/operations/sdk-verify-token.ts +189 -1
  401. package/src/models/operations/verification-get-status.ts +151 -38
  402. package/src/models/passes-per-person.ts +1 -1
  403. package/src/sdk/actions.ts +21 -1
  404. package/src/sdk/census.ts +43 -1
  405. package/src/sdk/gates-actions.ts +41 -1
  406. package/src/sdk/inline-passkey.ts +49 -0
  407. package/src/sdk/sdk.ts +11 -5
  408. package/src/sdk/verification.ts +1 -1
@@ -13,13 +13,15 @@ export declare class Census extends ClientSDK {
13
13
  *
14
14
  * @remarks
15
15
  * Creates a verification request (deep link, web URL, QR code) for a gate. Requires an anchor grant token from create-session. Returns 409 when a pending request already exists for the same gate and user.
16
+ *
17
+ * **A check sent to one person** (a request with `partner_user_ref` whose account is linked, pushed to the person's phones): one is open at a time per organization, environment and person. A newer one that is pushed replaces the open one, which ends `cancelled` with reason `superseded` (verification/status) and fires `gate.unavailable` once with `failure_code: "superseded"`. Pushes are capped per person per day (default 5 in 24 hours); over the cap the request is still created and its QR / deep link work, but nothing is pushed (`push_skipped: "daily_cap"`).
16
18
  */
17
19
  createVerificationLink(security: operations.SDKCreateVerificationLinkSecurity, request: operations.SDKCreateVerificationLinkRequest, options?: RequestOptions): Promise<operations.SDKCreateVerificationLinkResponse>;
18
20
  /**
19
21
  * Validate a verification token
20
22
  *
21
23
  * @remarks
22
- * 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 refused (`valid: false`, `replayed: true`). Check it once, on your server.
24
+ * 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 refused (`valid: false`, `replayed: true`). Check it once, on your server. Each token names its `kind` (`verification` or `action`) and the `environment` it was issued in. A token of any other kind is refused, and when you call with your secret key (`Authorization: Bearer bs_…`) a token from the other environment is refused (a development token never passes a production check). A refused token is not spent.
23
25
  */
24
26
  verifyToken(security: operations.SDKVerifyTokenSecurity, request: operations.SDKVerifyTokenRequest, options?: RequestOptions): Promise<operations.SDKVerifyTokenResponse>;
25
27
  /**
@@ -54,5 +56,19 @@ export declare class Census extends ClientSDK {
54
56
  * Revoke a grant token
55
57
  */
56
58
  logout(security: operations.SDKLogoutSecurity, request: operations.SDKLogoutRequest, options?: RequestOptions): Promise<operations.SDKLogoutResponse>;
59
+ /**
60
+ * Confirm a pending link
61
+ *
62
+ * @remarks
63
+ * 4.0: on a key with “Pending until your server confirms” on, a link waits after the person's tap (account.link_pending). Confirm it from your server with your SECRET key, sending the account your own session shows. The same account makes the link live (account.link_live, account.secured) and returns the finished token on this response only. Another account is refused and the waiting link is dropped. A link not confirmed within 24 hours expires. You can also confirm by passing `partner_user_ref` to sdk/verify-token with your secret key.
64
+ */
65
+ confirmLink(security: operations.SDKConfirmLinkSecurity, request: operations.SDKConfirmLinkRequest, options?: RequestOptions): Promise<operations.SDKConfirmLinkResponse>;
66
+ /**
67
+ * Send a request to verify by phone number
68
+ *
69
+ * @remarks
70
+ * 4.0: from your server, with your SECRET key, send a request to verify to the person whose BotShield ID carries this phone number. BotShield keeps none of your customer data: the number is used once and is not stored, logged or returned. The answer is the same whether or not anyone holds the number: status `sent`, the request id, its expiry and a two-digit `match_number` — show it to your customer; they pick it in the BotShield app before their passkey. Outcomes arrive as webhooks (or verification/status with this key): verified, declined, or expired. A person who has not linked your company first sees an introduction from you; your request can be answered only after they allow it. Production sends need a verified business. Limits: a cap per key per hour and on unanswered sends per company.
71
+ */
72
+ sendByNumber(security: operations.SDKSendByNumberSecurity, request: operations.SDKSendByNumberRequest, options?: RequestOptions): Promise<operations.SDKSendByNumberResponse>;
57
73
  }
58
74
  //# sourceMappingURL=census.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"census.d.ts","sourceRoot":"","sources":["../../../src/sdk/census.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,MAAO,SAAQ,SAAS;I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CAAC,UAAU,CAAC,yBAAyB,CAAC,CAM/C;IAED;;;;;OAKG;IACG,gBAAgB,CACpB,QAAQ,EAAE,UAAU,CAAC,2BAA2B,EAChD,OAAO,EAAE,UAAU,CAAC,0BAA0B,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,2BAA2B,CAAC,CAOjD;IAED;;;;;OAKG;IACG,kBAAkB,CACtB,QAAQ,EAAE,UAAU,CAAC,6BAA6B,EAClD,OAAO,EAAE,UAAU,CAAC,4BAA4B,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,6BAA6B,CAAC,CAOnD;IAED;;OAEG;IACG,MAAM,CACV,QAAQ,EAAE,UAAU,CAAC,iBAAiB,EACtC,OAAO,EAAE,UAAU,CAAC,gBAAgB,EACpC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAOvC;IAED;;;;;OAKG;IACG,WAAW,CACf,QAAQ,EAAE,UAAU,CAAC,sBAAsB,EAC3C,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,sBAAsB,CAAC,CAO5C;IAED;;;;;OAKG;IACG,YAAY,CAChB,QAAQ,EAAE,UAAU,CAAC,uBAAuB,EAC5C,OAAO,EAAE,UAAU,CAAC,sBAAsB,EAC1C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAO7C;CACF"}
@@ -1,11 +1,13 @@
1
1
  /*
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
+ import { censusConfirmLink } from "../funcs/census-confirm-link.js";
4
5
  import { censusCreateSession } from "../funcs/census-create-session.js";
5
6
  import { censusCreateVerificationLink } from "../funcs/census-create-verification-link.js";
6
7
  import { censusGetPartnerConfig } from "../funcs/census-get-partner-config.js";
7
8
  import { censusLogout } from "../funcs/census-logout.js";
8
9
  import { censusRevokeVerification } from "../funcs/census-revoke-verification.js";
10
+ import { censusSendByNumber } from "../funcs/census-send-by-number.js";
9
11
  import { censusStoreSignal } from "../funcs/census-store-signal.js";
10
12
  import { censusValidateSignal } from "../funcs/census-validate-signal.js";
11
13
  import { censusVerifyToken } from "../funcs/census-verify-token.js";
@@ -26,6 +28,8 @@ export class Census extends ClientSDK {
26
28
  *
27
29
  * @remarks
28
30
  * Creates a verification request (deep link, web URL, QR code) for a gate. Requires an anchor grant token from create-session. Returns 409 when a pending request already exists for the same gate and user.
31
+ *
32
+ * **A check sent to one person** (a request with `partner_user_ref` whose account is linked, pushed to the person's phones): one is open at a time per organization, environment and person. A newer one that is pushed replaces the open one, which ends `cancelled` with reason `superseded` (verification/status) and fires `gate.unavailable` once with `failure_code: "superseded"`. Pushes are capped per person per day (default 5 in 24 hours); over the cap the request is still created and its QR / deep link work, but nothing is pushed (`push_skipped: "daily_cap"`).
29
33
  */
30
34
  async createVerificationLink(security, request, options) {
31
35
  return unwrapAsync(censusCreateVerificationLink(this, security, request, options));
@@ -34,7 +38,7 @@ export class Census extends ClientSDK {
34
38
  * Validate a verification token
35
39
  *
36
40
  * @remarks
37
- * 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 refused (`valid: false`, `replayed: true`). Check it once, on your server.
41
+ * 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 refused (`valid: false`, `replayed: true`). Check it once, on your server. Each token names its `kind` (`verification` or `action`) and the `environment` it was issued in. A token of any other kind is refused, and when you call with your secret key (`Authorization: Bearer bs_…`) a token from the other environment is refused (a development token never passes a production check). A refused token is not spent.
38
42
  */
39
43
  async verifyToken(security, request, options) {
40
44
  return unwrapAsync(censusVerifyToken(this, security, request, options));
@@ -81,5 +85,23 @@ export class Census extends ClientSDK {
81
85
  async logout(security, request, options) {
82
86
  return unwrapAsync(censusLogout(this, security, request, options));
83
87
  }
88
+ /**
89
+ * Confirm a pending link
90
+ *
91
+ * @remarks
92
+ * 4.0: on a key with “Pending until your server confirms” on, a link waits after the person's tap (account.link_pending). Confirm it from your server with your SECRET key, sending the account your own session shows. The same account makes the link live (account.link_live, account.secured) and returns the finished token on this response only. Another account is refused and the waiting link is dropped. A link not confirmed within 24 hours expires. You can also confirm by passing `partner_user_ref` to sdk/verify-token with your secret key.
93
+ */
94
+ async confirmLink(security, request, options) {
95
+ return unwrapAsync(censusConfirmLink(this, security, request, options));
96
+ }
97
+ /**
98
+ * Send a request to verify by phone number
99
+ *
100
+ * @remarks
101
+ * 4.0: from your server, with your SECRET key, send a request to verify to the person whose BotShield ID carries this phone number. BotShield keeps none of your customer data: the number is used once and is not stored, logged or returned. The answer is the same whether or not anyone holds the number: status `sent`, the request id, its expiry and a two-digit `match_number` — show it to your customer; they pick it in the BotShield app before their passkey. Outcomes arrive as webhooks (or verification/status with this key): verified, declined, or expired. A person who has not linked your company first sees an introduction from you; your request can be answered only after they allow it. Production sends need a verified business. Limits: a cap per key per hour and on unanswered sends per company.
102
+ */
103
+ async sendByNumber(security, request, options) {
104
+ return unwrapAsync(censusSendByNumber(this, security, request, options));
105
+ }
84
106
  }
85
107
  //# sourceMappingURL=census.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"census.js","sourceRoot":"","sources":["../../../src/sdk/census.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,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EAChD,OAA8C,EAC9C,OAAwB,EACyB;QACjD,OAAO,WAAW,CAAC,sBAAsB,CACvC,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;IAED;;;;;OAKG;IACH,KAAK,CAAC,kBAAkB,CACtB,QAAkD,EAClD,OAAgD,EAChD,OAAwB,EAC2B;QACnD,OAAO,WAAW,CAAC,wBAAwB,CACzC,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,QAAsC,EACtC,OAAoC,EACpC,OAAwB,EACe;QACvC,OAAO,WAAW,CAAC,YAAY,CAC7B,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;IAED;;;;;OAKG;IACH,KAAK,CAAC,WAAW,CACf,QAA2C,EAC3C,OAAyC,EACzC,OAAwB,EACoB;QAC5C,OAAO,WAAW,CAAC,iBAAiB,CAClC,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;IAED;;;;;OAKG;IACH,KAAK,CAAC,YAAY,CAChB,QAA4C,EAC5C,OAA0C,EAC1C,OAAwB,EACqB;QAC7C,OAAO,WAAW,CAAC,kBAAkB,CACnC,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;CACF"}
@@ -22,11 +22,18 @@ export declare class GatesActions extends ClientSDK {
22
22
  * Turn an action on (`live`) or `off` by its key. Off takes effect at once — new requests are refused with `action_off`, and a tap in flight fails at completion. Idempotent.
23
23
  */
24
24
  setState(security: operations.GatesApiActionsSetStateSecurity, request: operations.GatesApiActionsSetStateRequest, options?: RequestOptions): Promise<operations.GatesApiActionsSetStateResponse>;
25
+ /**
26
+ * Rename a BotShield Action, or mark it staff can send
27
+ *
28
+ * @remarks
29
+ * Change an action's `name` (what the person reads on their card) or `staffCanSend` (your support team can send it to a customer), by its key. Send at least one.
30
+ */
31
+ update(security: operations.GatesApiActionsUpdateSecurity, request: operations.GatesApiActionsUpdateRequest, options?: RequestOptions): Promise<operations.GatesApiActionsUpdateResponse>;
25
32
  /**
26
33
  * Ask a linked person to confirm an action
27
34
  *
28
35
  * @remarks
29
- * An agent asks, a person confirms. Puts ONE BotShield Action in front of a person already linked to your company, as a card in their BotShield app naming the agent that asked. The person approves with their passkey, which signs the act itself. Collect the action token with gates-api/actions/request-status and check it with sdk/verify-token (claims.act), exactly as for a tapped action. Idempotent on (agent, request_id).
36
+ * An agent asks, a person confirms. Puts ONE BotShield Action in front of a person already linked to your company, as a card in their BotShield app naming the agent that asked. The person approves with their passkey, which signs the act itself. Collect the action token with gates-api/actions/request-status and check it with sdk/verify-token (claims.act), exactly as for a tapped action. Idempotent on (agent, request_id). Or address the person by `phone_number` (no link needed beforehand; see the field).
30
37
  */
31
38
  request(security: operations.GatesApiActionsRequestSecurity, request: operations.GatesApiActionsRequestRequest, options?: RequestOptions): Promise<operations.GatesApiActionsRequestResponse>;
32
39
  /**
@@ -36,5 +43,12 @@ export declare class GatesActions extends ClientSDK {
36
43
  * Status of a request from gates-api/actions/request. `wait_seconds` (≤ 25) holds the call until the status changes. Once `approved`, `token` is the action token (claims.act) for `token_expires_in` seconds — check it with sdk/verify-token; it works once. After the collection window (10 minutes from the approval) the status stays `approved` with `token: null`.
37
44
  */
38
45
  requestStatus(security: operations.GatesApiActionsRequestStatusSecurity, request: operations.GatesApiActionsRequestStatusRequest, options?: RequestOptions): Promise<operations.GatesApiActionsRequestStatusResponse>;
46
+ /**
47
+ * Withdraw an action request
48
+ *
49
+ * @remarks
50
+ * Withdraws a request you sent with actions/request while it is still waiting for the person. The card leaves their BotShield app. A request that was already answered, expired or withdrawn comes back as it stands with already_resolved true; an approval cannot be undone here. A withdrawn request is not billed.
51
+ */
52
+ requestCancel(security: operations.GatesApiActionsRequestCancelSecurity, request: operations.GatesApiActionsRequestCancelRequest, options?: RequestOptions): Promise<operations.GatesApiActionsRequestCancelResponse>;
39
53
  }
40
54
  //# sourceMappingURL=gates-actions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"gates-actions.d.ts","sourceRoot":"","sources":["../../../src/sdk/gates-actions.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,YAAa,SAAQ,SAAS;IACzC;;;;;OAKG;IACG,MAAM,CACV,QAAQ,EAAE,UAAU,CAAC,6BAA6B,EAClD,OAAO,EAAE,UAAU,CAAC,4BAA4B,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,6BAA6B,CAAC,CAOnD;IAED;;;;;OAKG;IACG,IAAI,CACR,QAAQ,EAAE,UAAU,CAAC,2BAA2B,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,2BAA2B,CAAC,CAMjD;IAED;;;;;OAKG;IACG,QAAQ,CACZ,QAAQ,EAAE,UAAU,CAAC,+BAA+B,EACpD,OAAO,EAAE,UAAU,CAAC,8BAA8B,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,+BAA+B,CAAC,CAOrD;IAED;;;;;OAKG;IACG,OAAO,CACX,QAAQ,EAAE,UAAU,CAAC,8BAA8B,EACnD,OAAO,EAAE,UAAU,CAAC,6BAA6B,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAOpD;IAED;;;;;OAKG;IACG,aAAa,CACjB,QAAQ,EAAE,UAAU,CAAC,oCAAoC,EACzD,OAAO,EAAE,UAAU,CAAC,mCAAmC,EACvD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,oCAAoC,CAAC,CAO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ACvD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,oCAAoC,CAAC,CAO1D;IAED;;;;;OAKG;IACG,aAAa,CACjB,QAAQ,EAAE,UAAU,CAAC,oCAAoC,EACzD,OAAO,EAAE,UAAU,CAAC,mCAAmC,EACvD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,oCAAoC,CAAC,CAO1D;CACF"}
@@ -3,9 +3,11 @@
3
3
  */
4
4
  import { gatesActionsCreate } from "../funcs/gates-actions-create.js";
5
5
  import { gatesActionsList } from "../funcs/gates-actions-list.js";
6
+ import { gatesActionsRequestCancel } from "../funcs/gates-actions-request-cancel.js";
6
7
  import { gatesActionsRequestStatus } from "../funcs/gates-actions-request-status.js";
7
8
  import { gatesActionsRequest } from "../funcs/gates-actions-request.js";
8
9
  import { gatesActionsSetState } from "../funcs/gates-actions-set-state.js";
10
+ import { gatesActionsUpdate } from "../funcs/gates-actions-update.js";
9
11
  import { ClientSDK } from "../lib/sdks.js";
10
12
  import { unwrapAsync } from "../types/fp.js";
11
13
  export class GatesActions extends ClientSDK {
@@ -36,11 +38,20 @@ export class GatesActions extends ClientSDK {
36
38
  async setState(security, request, options) {
37
39
  return unwrapAsync(gatesActionsSetState(this, security, request, options));
38
40
  }
41
+ /**
42
+ * Rename a BotShield Action, or mark it staff can send
43
+ *
44
+ * @remarks
45
+ * Change an action's `name` (what the person reads on their card) or `staffCanSend` (your support team can send it to a customer), by its key. Send at least one.
46
+ */
47
+ async update(security, request, options) {
48
+ return unwrapAsync(gatesActionsUpdate(this, security, request, options));
49
+ }
39
50
  /**
40
51
  * Ask a linked person to confirm an action
41
52
  *
42
53
  * @remarks
43
- * An agent asks, a person confirms. Puts ONE BotShield Action in front of a person already linked to your company, as a card in their BotShield app naming the agent that asked. The person approves with their passkey, which signs the act itself. Collect the action token with gates-api/actions/request-status and check it with sdk/verify-token (claims.act), exactly as for a tapped action. Idempotent on (agent, request_id).
54
+ * An agent asks, a person confirms. Puts ONE BotShield Action in front of a person already linked to your company, as a card in their BotShield app naming the agent that asked. The person approves with their passkey, which signs the act itself. Collect the action token with gates-api/actions/request-status and check it with sdk/verify-token (claims.act), exactly as for a tapped action. Idempotent on (agent, request_id). Or address the person by `phone_number` (no link needed beforehand; see the field).
44
55
  */
45
56
  async request(security, request, options) {
46
57
  return unwrapAsync(gatesActionsRequest(this, security, request, options));
@@ -54,5 +65,14 @@ export class GatesActions extends ClientSDK {
54
65
  async requestStatus(security, request, options) {
55
66
  return unwrapAsync(gatesActionsRequestStatus(this, security, request, options));
56
67
  }
68
+ /**
69
+ * Withdraw an action request
70
+ *
71
+ * @remarks
72
+ * Withdraws a request you sent with actions/request while it is still waiting for the person. The card leaves their BotShield app. A request that was already answered, expired or withdrawn comes back as it stands with already_resolved true; an approval cannot be undone here. A withdrawn request is not billed.
73
+ */
74
+ async requestCancel(security, request, options) {
75
+ return unwrapAsync(gatesActionsRequestCancel(this, security, request, options));
76
+ }
57
77
  }
58
78
  //# sourceMappingURL=gates-actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"gates-actions.js","sourceRoot":"","sources":["../../../src/sdk/gates-actions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,YAAa,SAAQ,SAAS;IACzC;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,QAAkD,EAClD,OAAgD,EAChD,OAAwB,EAC2B;QACnD,OAAO,WAAW,CAAC,kBAAkB,CACnC,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;IAED;;;;;OAKG;IACH,KAAK,CAAC,IAAI,CACR,QAAgD,EAChD,OAAwB,EACyB;QACjD,OAAO,WAAW,CAAC,gBAAgB,CACjC,IAAI,EACJ,QAAQ,EACR,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;IAED;;;;;OAKG;IACH,KAAK,CAAC,QAAQ,CACZ,QAAoD,EACpD,OAAkD,EAClD,OAAwB,EAC6B;QACrD,OAAO,WAAW,CAAC,oBAAoB,CACrC,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;IAED;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CACX,QAAmD,EACnD,OAAiD,EACjD,OAAwB,EAC4B;QACpD,OAAO,WAAW,CAAC,mBAAmB,CACpC,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;IAED;;;;;OAKG;IACH,KAAK,CAAC,aAAa,CACjB,QAAyD,EACzD,OAAuD,EACvD,OAAwB,EACkC;QAC1D,OAAO,WAAW,CAAC,yBAAyB,CAC1C,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;CACF"}
1
+ {"version":3,"file":"gates-actions.js","sourceRoot":"","sources":["../../../src/sdk/gates-actions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,mBAAmB,EAAE,MAAM,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AAC,aAAa,CACjB,QAAyD,EACzD,OAAuD,EACvD,OAAwB,EACkC;QAC1D,OAAO,WAAW,CAAC,yBAAyB,CAC1C,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;IAED;;;;;OAKG;IACH,KAAK,CAAC,aAAa,CACjB,QAAyD,EACzD,OAAuD,EACvD,OAAwB,EACkC;QAC1D,OAAO,WAAW,CAAC,yBAAyB,CAC1C,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;CACF"}
@@ -0,0 +1,23 @@
1
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
2
+ import * as operations from "../models/operations/index.js";
3
+ export declare class InlinePasskey extends ClientSDK {
4
+ /**
5
+ * Start the inline passkey for one request
6
+ *
7
+ * @remarks
8
+ * Partner inline lane, step 1. Returns WebAuthn request options whose `allowCredentials` are the passkeys of the ONE BotShield ID this request is for (the id it was issued for, else the active link for its `partner_user_ref`), or the app fallback. Public — no API key; the request_id is the credential. Works for gate requests and BotShield Action requests (`act`); refuses an Age Gate.
9
+ *
10
+ * Wire: HTTP 200 with the result at `data.data`; a refusal at `data.error`.
11
+ */
12
+ getOptions(request: operations.RequestPasskeyOptionsRequest, options?: RequestOptions): Promise<operations.RequestPasskeyOptionsResponse>;
13
+ /**
14
+ * Finish the inline passkey for one request
15
+ *
16
+ * @remarks
17
+ * Partner inline lane, step 2. Verifies the assertion against the challenge bound to THIS request and its one BotShield ID (user verification required), then runs the same completion as the BotShield app (token minted, partner webhook, gate / act events). Returns `{ outcome, code? }` only. The challenge is single use and is burned on every path.
18
+ *
19
+ * Wire: HTTP 200 with the result at `data.data`; a refusal at `data.error`.
20
+ */
21
+ complete(request: operations.RequestPasskeyCompleteRequest, options?: RequestOptions): Promise<operations.RequestPasskeyCompleteResponse>;
22
+ }
23
+ //# sourceMappingURL=inline-passkey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline-passkey.d.ts","sourceRoot":"","sources":["../../../src/sdk/inline-passkey.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,aAAc,SAAQ,SAAS;IAC1C;;;;;;;OAOG;IACG,UAAU,CACd,OAAO,EAAE,UAAU,CAAC,4BAA4B,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,6BAA6B,CAAC,CAMnD;IAED;;;;;;;OAOG;IACG,QAAQ,CACZ,OAAO,EAAE,UAAU,CAAC,6BAA6B,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAMpD;CACF"}
@@ -0,0 +1,32 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import { inlinePasskeyComplete } from "../funcs/inline-passkey-complete.js";
5
+ import { inlinePasskeyGetOptions } from "../funcs/inline-passkey-get-options.js";
6
+ import { ClientSDK } from "../lib/sdks.js";
7
+ import { unwrapAsync } from "../types/fp.js";
8
+ export class InlinePasskey extends ClientSDK {
9
+ /**
10
+ * Start the inline passkey for one request
11
+ *
12
+ * @remarks
13
+ * Partner inline lane, step 1. Returns WebAuthn request options whose `allowCredentials` are the passkeys of the ONE BotShield ID this request is for (the id it was issued for, else the active link for its `partner_user_ref`), or the app fallback. Public — no API key; the request_id is the credential. Works for gate requests and BotShield Action requests (`act`); refuses an Age Gate.
14
+ *
15
+ * Wire: HTTP 200 with the result at `data.data`; a refusal at `data.error`.
16
+ */
17
+ async getOptions(request, options) {
18
+ return unwrapAsync(inlinePasskeyGetOptions(this, request, options));
19
+ }
20
+ /**
21
+ * Finish the inline passkey for one request
22
+ *
23
+ * @remarks
24
+ * Partner inline lane, step 2. Verifies the assertion against the challenge bound to THIS request and its one BotShield ID (user verification required), then runs the same completion as the BotShield app (token minted, partner webhook, gate / act events). Returns `{ outcome, code? }` only. The challenge is single use and is burned on every path.
25
+ *
26
+ * Wire: HTTP 200 with the result at `data.data`; a refusal at `data.error`.
27
+ */
28
+ async complete(request, options) {
29
+ return unwrapAsync(inlinePasskeyComplete(this, request, options));
30
+ }
31
+ }
32
+ //# sourceMappingURL=inline-passkey.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline-passkey.js","sourceRoot":"","sources":["../../../src/sdk/inline-passkey.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,aAAc,SAAQ,SAAS;IAC1C;;;;;;;OAOG;IACH,KAAK,CAAC,UAAU,CACd,OAAgD,EAChD,OAAwB,EAC2B;QACnD,OAAO,WAAW,CAAC,uBAAuB,CACxC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,QAAQ,CACZ,OAAiD,EACjD,OAAwB,EAC4B;QACpD,OAAO,WAAW,CAAC,qBAAqB,CACtC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;CACF"}
@@ -2,18 +2,21 @@ import { ClientSDK } from "../lib/sdks.js";
2
2
  import { Actions } from "./actions.js";
3
3
  import { Census } from "./census.js";
4
4
  import { Gates } from "./gates.js";
5
+ import { InlinePasskey } from "./inline-passkey.js";
5
6
  import { SecuredAccounts } from "./secured-accounts.js";
6
7
  import { Verification } from "./verification.js";
7
8
  export declare class BotShield extends ClientSDK {
8
9
  private _census?;
9
10
  get census(): Census;
10
- private _verification?;
11
- get verification(): Verification;
12
11
  private _actions?;
13
12
  get actions(): Actions;
13
+ private _verification?;
14
+ get verification(): Verification;
14
15
  private _securedAccounts?;
15
16
  get securedAccounts(): SecuredAccounts;
16
17
  private _gates?;
17
18
  get gates(): Gates;
19
+ private _inlinePasskey?;
20
+ get inlinePasskey(): InlinePasskey;
18
21
  }
19
22
  //# sourceMappingURL=sdk.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/sdk/sdk.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,qBAAa,SAAU,SAAQ,SAAS;IACtC,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,OAAO,CAAC,aAAa,CAAC,CAAe;IACrC,IAAI,YAAY,IAAI,YAAY,CAE/B;IAED,OAAO,CAAC,QAAQ,CAAC,CAAU;IAC3B,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,OAAO,CAAC,gBAAgB,CAAC,CAAkB;IAC3C,IAAI,eAAe,IAAI,eAAe,CAErC;IAED,OAAO,CAAC,MAAM,CAAC,CAAQ;IACvB,IAAI,KAAK,IAAI,KAAK,CAEjB;CACF"}
1
+ {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/sdk/sdk.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,qBAAa,SAAU,SAAQ,SAAS;IACtC,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,OAAO,CAAC,QAAQ,CAAC,CAAU;IAC3B,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,OAAO,CAAC,aAAa,CAAC,CAAe;IACrC,IAAI,YAAY,IAAI,YAAY,CAE/B;IAED,OAAO,CAAC,gBAAgB,CAAC,CAAkB;IAC3C,IAAI,eAAe,IAAI,eAAe,CAErC;IAED,OAAO,CAAC,MAAM,CAAC,CAAQ;IACvB,IAAI,KAAK,IAAI,KAAK,CAEjB;IAED,OAAO,CAAC,cAAc,CAAC,CAAgB;IACvC,IAAI,aAAa,IAAI,aAAa,CAEjC;CACF"}
@@ -5,6 +5,7 @@ import { ClientSDK } from "../lib/sdks.js";
5
5
  import { Actions } from "./actions.js";
6
6
  import { Census } from "./census.js";
7
7
  import { Gates } from "./gates.js";
8
+ import { InlinePasskey } from "./inline-passkey.js";
8
9
  import { SecuredAccounts } from "./secured-accounts.js";
9
10
  import { Verification } from "./verification.js";
10
11
  export class BotShield extends ClientSDK {
@@ -12,14 +13,14 @@ export class BotShield extends ClientSDK {
12
13
  get census() {
13
14
  return (this._census ?? (this._census = new Census(this._options)));
14
15
  }
15
- _verification;
16
- get verification() {
17
- return (this._verification ?? (this._verification = new Verification(this._options)));
18
- }
19
16
  _actions;
20
17
  get actions() {
21
18
  return (this._actions ?? (this._actions = new Actions(this._options)));
22
19
  }
20
+ _verification;
21
+ get verification() {
22
+ return (this._verification ?? (this._verification = new Verification(this._options)));
23
+ }
23
24
  _securedAccounts;
24
25
  get securedAccounts() {
25
26
  return (this._securedAccounts ?? (this._securedAccounts = new SecuredAccounts(this._options)));
@@ -28,5 +29,9 @@ export class BotShield extends ClientSDK {
28
29
  get gates() {
29
30
  return (this._gates ?? (this._gates = new Gates(this._options)));
30
31
  }
32
+ _inlinePasskey;
33
+ get inlinePasskey() {
34
+ return (this._inlinePasskey ?? (this._inlinePasskey = new InlinePasskey(this._options)));
35
+ }
31
36
  }
32
37
  //# sourceMappingURL=sdk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.js","sourceRoot":"","sources":["../../../src/sdk/sdk.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,OAAO,SAAU,SAAQ,SAAS;IAC9B,OAAO,CAAU;IACzB,IAAI,MAAM,GAAW;QACnB,OAAO,CAAC,IAAI,CAAC,OAAO,KAAZ,IAAI,CAAC,OAAO,GAAK,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAAA,CACrD;IAEO,aAAa,CAAgB;IACrC,IAAI,YAAY,GAAiB;QAC/B,OAAO,CAAC,IAAI,CAAC,aAAa,KAAlB,IAAI,CAAC,aAAa,GAAK,IAAI,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAAA,CACjE;IAEO,QAAQ,CAAW;IAC3B,IAAI,OAAO,GAAY;QACrB,OAAO,CAAC,IAAI,CAAC,QAAQ,KAAb,IAAI,CAAC,QAAQ,G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AC,QAAQ,CAAC,EAAC,CAAC;IAAA,CACvD;IAEO,aAAa,CAAgB;IACrC,IAAI,YAAY,GAAiB;QAC/B,OAAO,CAAC,IAAI,CAAC,aAAa,KAAlB,IAAI,CAAC,aAAa,GAAK,IAAI,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAAA,CACjE;IAEO,gBAAgB,CAAmB;IAC3C,IAAI,eAAe,GAAoB;QACrC,OAAO,CAAC,IAAI,CAAC,gBAAgB,KAArB,IAAI,CAAC,gBAAgB,GAAK,IAAI,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAAA,CACvE;IAEO,MAAM,CAAS;IACvB,IAAI,KAAK,GAAU;QACjB,OAAO,CAAC,IAAI,CAAC,MAAM,KAAX,IAAI,CAAC,MAAM,GAAK,IAAI,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAAA,CACnD;IAEO,cAAc,CAAiB;IACvC,IAAI,aAAa,GAAkB;QACjC,OAAO,CAAC,IAAI,CAAC,cAAc,KAAnB,IAAI,CAAC,cAAc,GAAK,IAAI,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAAA,CACnE;CACF"}
@@ -5,7 +5,7 @@ export declare class Verification extends ClientSDK {
5
5
  * Check verification status
6
6
  *
7
7
  * @remarks
8
- * Poll a verification request. Carries the signed attestation on completion and NO identity — no user_email, partner_user_id, auth_mode, or botshield_user_id ever cross this boundary.
8
+ * Poll a verification request. Carries the signed attestation on completion and NO identity — no user_email, partner_user_id, auth_mode, or botshield_user_id ever cross this boundary. Called without a key, it is rate-limited per client address (a page polling every 2 seconds stays well inside it); over the limit the call is refused with HTTP 403 and `errors[0].code = "RATE_LIMITED"`.
9
9
  */
10
10
  getStatus(security: operations.VerificationGetStatusSecurity, request: operations.VerificationGetStatusRequest, options?: RequestOptions): Promise<operations.VerificationGetStatusResponse>;
11
11
  }
@@ -9,7 +9,7 @@ export class Verification extends ClientSDK {
9
9
  * Check verification status
10
10
  *
11
11
  * @remarks
12
- * Poll a verification request. Carries the signed attestation on completion and NO identity — no user_email, partner_user_id, auth_mode, or botshield_user_id ever cross this boundary.
12
+ * Poll a verification request. Carries the signed attestation on completion and NO identity — no user_email, partner_user_id, auth_mode, or botshield_user_id ever cross this boundary. Called without a key, it is rate-limited per client address (a page polling every 2 seconds stays well inside it); over the limit the call is refused with HTTP 403 and `errors[0].code = "RATE_LIMITED"`.
13
13
  */
14
14
  async getStatus(security, request, options) {
15
15
  return unwrapAsync(verificationGetStatus(this, security, request, options));
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "botshield-sdk",
5
- "version": "2.2.1",
5
+ "version": "4.0.0",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "botshield-sdk",
3
- "version": "2.2.1",
3
+ "version": "4.0.0",
4
4
  "author": "BotShield",
5
5
  "description": "Official TypeScript SDK for BotShield — privacy-first human verification (passkeys, no PII) and Agents Ask approvals",
6
6
  "homepage": "https://docs.botshield.ai",
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
30
30
  * Propose an action for human confirmation
31
31
  *
32
32
  * @remarks
33
- * 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.
33
+ * 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. Or address the person by `phone_number` (no link needed beforehand; see the field).
34
34
  */
35
35
  export function actionsProposeAction(
36
36
  client: BotShieldCore,
@@ -0,0 +1,192 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { BotShieldCore } from "../core.js";
6
+ import { encodeJSON } from "../lib/encodings.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 { safeParse } from "../lib/schemas.js";
11
+ import { RequestOptions } from "../lib/sdks.js";
12
+ import { resolveSecurity } from "../lib/security.js";
13
+ import { pathToFunc } from "../lib/url.js";
14
+ import { BotShieldError } from "../models/errors/bot-shield-error.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 { SDKValidationError } from "../models/errors/sdk-validation-error.js";
25
+ import * as operations from "../models/operations/index.js";
26
+ import { APICall, APIPromise } from "../types/async.js";
27
+ import { Result } from "../types/fp.js";
28
+
29
+ /**
30
+ * Check a Proof of Resolution (works once)
31
+ *
32
+ * @remarks
33
+ * An approved ask mints a proof that the agent reads with agentlink/check-status. Send it here before acting on it. The first check answers valid true with what was approved; every later check answers valid false with replayed true. Checking the signature yourself against the public keys shows the proof is real, not that it is unused. Call with the agent's own key (for a proof minted for that agent) or the company's secret key (for a proof minted for one of its agents).
34
+ */
35
+ export function actionsVerifyResolution(
36
+ client: BotShieldCore,
37
+ security: operations.SDKVerifyResolutionSecurity,
38
+ request: operations.SDKVerifyResolutionRequest,
39
+ options?: RequestOptions,
40
+ ): APIPromise<
41
+ Result<
42
+ operations.SDKVerifyResolutionResponse,
43
+ | errors.InvalidInputError
44
+ | errors.ErrorResponse
45
+ | BotShieldError
46
+ | ResponseValidationError
47
+ | ConnectionError
48
+ | RequestAbortedError
49
+ | RequestTimeoutError
50
+ | InvalidRequestError
51
+ | UnexpectedClientError
52
+ | SDKValidationError
53
+ >
54
+ > {
55
+ return new APIPromise($do(
56
+ client,
57
+ security,
58
+ request,
59
+ options,
60
+ ));
61
+ }
62
+
63
+ async function $do(
64
+ client: BotShieldCore,
65
+ security: operations.SDKVerifyResolutionSecurity,
66
+ request: operations.SDKVerifyResolutionRequest,
67
+ options?: RequestOptions,
68
+ ): Promise<
69
+ [
70
+ Result<
71
+ operations.SDKVerifyResolutionResponse,
72
+ | errors.InvalidInputError
73
+ | errors.ErrorResponse
74
+ | BotShieldError
75
+ | ResponseValidationError
76
+ | ConnectionError
77
+ | RequestAbortedError
78
+ | RequestTimeoutError
79
+ | InvalidRequestError
80
+ | UnexpectedClientError
81
+ | SDKValidationError
82
+ >,
83
+ APICall,
84
+ ]
85
+ > {
86
+ const parsed = safeParse(
87
+ request,
88
+ (value) =>
89
+ operations.SDKVerifyResolutionRequest$outboundSchema.parse(value),
90
+ "Input validation failed",
91
+ );
92
+ if (!parsed.ok) {
93
+ return [parsed, { status: "invalid" }];
94
+ }
95
+ const payload = parsed.value;
96
+ const body = encodeJSON("body", payload, { explode: true });
97
+
98
+ const path = pathToFunc("/sdk/verify-resolution")();
99
+
100
+ const headers = new Headers(compactMap({
101
+ "Content-Type": "application/json",
102
+ Accept: "application/json",
103
+ }));
104
+
105
+ const requestSecurity = resolveSecurity(
106
+ [
107
+ {
108
+ fieldName: "Authorization",
109
+ type: "apiKey:header",
110
+ value: security?.agentKeyAuth,
111
+ },
112
+ ],
113
+ [
114
+ {
115
+ fieldName: "Authorization",
116
+ type: "apiKey:header",
117
+ value: security?.apiKeyAuth,
118
+ },
119
+ ],
120
+ );
121
+
122
+ const context = {
123
+ options: client._options,
124
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
125
+ operationID: "SdkVerifyResolution",
126
+ oAuth2Scopes: null,
127
+
128
+ resolvedSecurity: requestSecurity,
129
+
130
+ securitySource: security,
131
+ retryConfig: options?.retries
132
+ || client._options.retryConfig
133
+ || { strategy: "none" },
134
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
135
+ };
136
+
137
+ const requestRes = client._createRequest(context, {
138
+ security: requestSecurity,
139
+ method: "POST",
140
+ baseURL: options?.serverURL,
141
+ path: path,
142
+ headers: headers,
143
+ body: body,
144
+ userAgent: client._options.userAgent,
145
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
146
+ }, options);
147
+ if (!requestRes.ok) {
148
+ return [requestRes, { status: "invalid" }];
149
+ }
150
+ const req = requestRes.value;
151
+
152
+ const doResult = await client._do(req, {
153
+ context,
154
+ isErrorStatusCode: (statusCode: number) =>
155
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
156
+ retryConfig: context.retryConfig,
157
+ retryCodes: context.retryCodes,
158
+ });
159
+ if (!doResult.ok) {
160
+ return [doResult, { status: "request-error", request: req }];
161
+ }
162
+ const response = doResult.value;
163
+
164
+ const responseFields = {
165
+ HttpMeta: { Response: response, Request: req },
166
+ };
167
+
168
+ const [result] = await M.match<
169
+ operations.SDKVerifyResolutionResponse,
170
+ | errors.InvalidInputError
171
+ | errors.ErrorResponse
172
+ | BotShieldError
173
+ | ResponseValidationError
174
+ | ConnectionError
175
+ | RequestAbortedError
176
+ | RequestTimeoutError
177
+ | InvalidRequestError
178
+ | UnexpectedClientError
179
+ | SDKValidationError
180
+ >(
181
+ M.json(200, operations.SDKVerifyResolutionResponse$inboundSchema),
182
+ M.jsonErr(400, errors.InvalidInputError$inboundSchema),
183
+ M.jsonErr(500, errors.ErrorResponse$inboundSchema),
184
+ M.fail("4XX"),
185
+ M.fail("5XX"),
186
+ )(response, req, { extraFields: responseFields });
187
+ if (!result.ok) {
188
+ return [result, { status: "complete", request: req, response }];
189
+ }
190
+
191
+ return [result, { status: "complete", request: req, response }];
192
+ }