botshield-sdk 2.3.0 → 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 (313) hide show
  1. package/README.md +14 -2
  2. package/bin/mcp-server.js +753 -47
  3. package/bin/mcp-server.js.map +30 -24
  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/verification-get-status.d.ts +1 -1
  37. package/dist/commonjs/funcs/verification-get-status.js +1 -1
  38. package/dist/commonjs/lib/config.d.ts +2 -2
  39. package/dist/commonjs/lib/config.js +2 -2
  40. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  41. package/dist/commonjs/mcp-server/server.js +1 -1
  42. package/dist/commonjs/models/bot-shield-action.d.ts +10 -0
  43. package/dist/commonjs/models/bot-shield-action.d.ts.map +1 -1
  44. package/dist/commonjs/models/bot-shield-action.js +8 -0
  45. package/dist/commonjs/models/bot-shield-action.js.map +1 -1
  46. package/dist/commonjs/models/error-body.d.ts +6 -1
  47. package/dist/commonjs/models/error-body.d.ts.map +1 -1
  48. package/dist/commonjs/models/error-body.js +4 -0
  49. package/dist/commonjs/models/error-body.js.map +1 -1
  50. package/dist/commonjs/models/gate-unavailable-event.d.ts +112 -0
  51. package/dist/commonjs/models/gate-unavailable-event.d.ts.map +1 -0
  52. package/dist/commonjs/models/gate-unavailable-event.js +137 -0
  53. package/dist/commonjs/models/gate-unavailable-event.js.map +1 -0
  54. package/dist/commonjs/models/gates-api-error.d.ts +5 -0
  55. package/dist/commonjs/models/gates-api-error.d.ts.map +1 -1
  56. package/dist/commonjs/models/gates-api-error.js +11 -0
  57. package/dist/commonjs/models/gates-api-error.js.map +1 -1
  58. package/dist/commonjs/models/index.d.ts +1 -0
  59. package/dist/commonjs/models/index.d.ts.map +1 -1
  60. package/dist/commonjs/models/index.js +1 -0
  61. package/dist/commonjs/models/index.js.map +1 -1
  62. package/dist/commonjs/models/operations/actions-propose.d.ts +21 -1
  63. package/dist/commonjs/models/operations/actions-propose.d.ts.map +1 -1
  64. package/dist/commonjs/models/operations/actions-propose.js +16 -0
  65. package/dist/commonjs/models/operations/actions-propose.js.map +1 -1
  66. package/dist/commonjs/models/operations/gates-api-actions-create.d.ts +11 -1
  67. package/dist/commonjs/models/operations/gates-api-actions-create.d.ts.map +1 -1
  68. package/dist/commonjs/models/operations/gates-api-actions-create.js +4 -0
  69. package/dist/commonjs/models/operations/gates-api-actions-create.js.map +1 -1
  70. package/dist/commonjs/models/operations/gates-api-actions-list.d.ts +1 -1
  71. package/dist/commonjs/models/operations/gates-api-actions-request-cancel.d.ts +113 -0
  72. package/dist/commonjs/models/operations/gates-api-actions-request-cancel.d.ts.map +1 -0
  73. package/dist/commonjs/models/operations/gates-api-actions-request-cancel.js +178 -0
  74. package/dist/commonjs/models/operations/gates-api-actions-request-cancel.js.map +1 -0
  75. package/dist/commonjs/models/operations/gates-api-actions-request-status.d.ts +5 -0
  76. package/dist/commonjs/models/operations/gates-api-actions-request-status.d.ts.map +1 -1
  77. package/dist/commonjs/models/operations/gates-api-actions-request-status.js +2 -0
  78. package/dist/commonjs/models/operations/gates-api-actions-request-status.js.map +1 -1
  79. package/dist/commonjs/models/operations/gates-api-actions-request.d.ts +34 -4
  80. package/dist/commonjs/models/operations/gates-api-actions-request.d.ts.map +1 -1
  81. package/dist/commonjs/models/operations/gates-api-actions-request.js +32 -3
  82. package/dist/commonjs/models/operations/gates-api-actions-request.js.map +1 -1
  83. package/dist/commonjs/models/operations/gates-api-actions-set-state.d.ts +1 -1
  84. package/dist/commonjs/models/operations/gates-api-actions-update.d.ts +99 -0
  85. package/dist/commonjs/models/operations/gates-api-actions-update.d.ts.map +1 -0
  86. package/dist/commonjs/models/operations/gates-api-actions-update.js +141 -0
  87. package/dist/commonjs/models/operations/gates-api-actions-update.js.map +1 -0
  88. package/dist/commonjs/models/operations/index.d.ts +5 -0
  89. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  90. package/dist/commonjs/models/operations/index.js +5 -0
  91. package/dist/commonjs/models/operations/index.js.map +1 -1
  92. package/dist/commonjs/models/operations/request-passkey-complete.d.ts +1 -1
  93. package/dist/commonjs/models/operations/sdk-confirm-link.d.ts +130 -0
  94. package/dist/commonjs/models/operations/sdk-confirm-link.d.ts.map +1 -0
  95. package/dist/commonjs/models/operations/sdk-confirm-link.js +205 -0
  96. package/dist/commonjs/models/operations/sdk-confirm-link.js.map +1 -0
  97. package/dist/commonjs/models/operations/sdk-create-session.d.ts +1 -1
  98. package/dist/commonjs/models/operations/sdk-create-verification-link.d.ts +43 -2
  99. package/dist/commonjs/models/operations/sdk-create-verification-link.d.ts.map +1 -1
  100. package/dist/commonjs/models/operations/sdk-create-verification-link.js +30 -1
  101. package/dist/commonjs/models/operations/sdk-create-verification-link.js.map +1 -1
  102. package/dist/commonjs/models/operations/sdk-send-by-number.d.ts +124 -0
  103. package/dist/commonjs/models/operations/sdk-send-by-number.d.ts.map +1 -0
  104. package/dist/commonjs/models/operations/sdk-send-by-number.js +203 -0
  105. package/dist/commonjs/models/operations/sdk-send-by-number.js.map +1 -0
  106. package/dist/commonjs/models/operations/sdk-verify-resolution.d.ts +125 -0
  107. package/dist/commonjs/models/operations/sdk-verify-resolution.d.ts.map +1 -0
  108. package/dist/commonjs/models/operations/sdk-verify-resolution.js +182 -0
  109. package/dist/commonjs/models/operations/sdk-verify-resolution.js.map +1 -0
  110. package/dist/commonjs/models/operations/sdk-verify-token.d.ts +95 -1
  111. package/dist/commonjs/models/operations/sdk-verify-token.d.ts.map +1 -1
  112. package/dist/commonjs/models/operations/sdk-verify-token.js +86 -1
  113. package/dist/commonjs/models/operations/sdk-verify-token.js.map +1 -1
  114. package/dist/commonjs/models/operations/verification-get-status.d.ts +40 -5
  115. package/dist/commonjs/models/operations/verification-get-status.d.ts.map +1 -1
  116. package/dist/commonjs/models/operations/verification-get-status.js +33 -2
  117. package/dist/commonjs/models/operations/verification-get-status.js.map +1 -1
  118. package/dist/commonjs/models/passes-per-person.d.ts +1 -1
  119. package/dist/commonjs/sdk/actions.d.ts +8 -1
  120. package/dist/commonjs/sdk/actions.d.ts.map +1 -1
  121. package/dist/commonjs/sdk/actions.js +11 -1
  122. package/dist/commonjs/sdk/actions.js.map +1 -1
  123. package/dist/commonjs/sdk/census.d.ts +17 -1
  124. package/dist/commonjs/sdk/census.d.ts.map +1 -1
  125. package/dist/commonjs/sdk/census.js +23 -1
  126. package/dist/commonjs/sdk/census.js.map +1 -1
  127. package/dist/commonjs/sdk/gates-actions.d.ts +15 -1
  128. package/dist/commonjs/sdk/gates-actions.d.ts.map +1 -1
  129. package/dist/commonjs/sdk/gates-actions.js +21 -1
  130. package/dist/commonjs/sdk/gates-actions.js.map +1 -1
  131. package/dist/commonjs/sdk/sdk.d.ts +2 -2
  132. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  133. package/dist/commonjs/sdk/sdk.js +4 -4
  134. package/dist/commonjs/sdk/sdk.js.map +1 -1
  135. package/dist/commonjs/sdk/verification.d.ts +1 -1
  136. package/dist/commonjs/sdk/verification.js +1 -1
  137. package/dist/esm/funcs/actions-propose-action.d.ts +1 -1
  138. package/dist/esm/funcs/actions-propose-action.js +1 -1
  139. package/dist/esm/funcs/actions-verify-resolution.d.ts +18 -0
  140. package/dist/esm/funcs/actions-verify-resolution.d.ts.map +1 -0
  141. package/dist/esm/funcs/actions-verify-resolution.js +93 -0
  142. package/dist/esm/funcs/actions-verify-resolution.js.map +1 -0
  143. package/dist/esm/funcs/census-confirm-link.d.ts +17 -0
  144. package/dist/esm/funcs/census-confirm-link.d.ts.map +1 -0
  145. package/dist/esm/funcs/census-confirm-link.js +83 -0
  146. package/dist/esm/funcs/census-confirm-link.js.map +1 -0
  147. package/dist/esm/funcs/census-create-verification-link.d.ts +2 -0
  148. package/dist/esm/funcs/census-create-verification-link.d.ts.map +1 -1
  149. package/dist/esm/funcs/census-create-verification-link.js +2 -0
  150. package/dist/esm/funcs/census-create-verification-link.js.map +1 -1
  151. package/dist/esm/funcs/census-send-by-number.d.ts +18 -0
  152. package/dist/esm/funcs/census-send-by-number.d.ts.map +1 -0
  153. package/dist/esm/funcs/census-send-by-number.js +87 -0
  154. package/dist/esm/funcs/census-send-by-number.js.map +1 -0
  155. package/dist/esm/funcs/census-verify-token.d.ts +1 -1
  156. package/dist/esm/funcs/census-verify-token.js +1 -1
  157. package/dist/esm/funcs/gates-actions-request-cancel.d.ts +18 -0
  158. package/dist/esm/funcs/gates-actions-request-cancel.d.ts.map +1 -0
  159. package/dist/esm/funcs/gates-actions-request-cancel.js +87 -0
  160. package/dist/esm/funcs/gates-actions-request-cancel.js.map +1 -0
  161. package/dist/esm/funcs/gates-actions-request-status.js +1 -0
  162. package/dist/esm/funcs/gates-actions-request-status.js.map +1 -1
  163. package/dist/esm/funcs/gates-actions-request.d.ts +1 -1
  164. package/dist/esm/funcs/gates-actions-request.js +1 -1
  165. package/dist/esm/funcs/gates-actions-update.d.ts +18 -0
  166. package/dist/esm/funcs/gates-actions-update.d.ts.map +1 -0
  167. package/dist/esm/funcs/gates-actions-update.js +87 -0
  168. package/dist/esm/funcs/gates-actions-update.js.map +1 -0
  169. package/dist/esm/funcs/verification-get-status.d.ts +1 -1
  170. package/dist/esm/funcs/verification-get-status.js +1 -1
  171. package/dist/esm/lib/config.d.ts +2 -2
  172. package/dist/esm/lib/config.js +2 -2
  173. package/dist/esm/mcp-server/mcp-server.js +1 -1
  174. package/dist/esm/mcp-server/server.js +1 -1
  175. package/dist/esm/models/bot-shield-action.d.ts +10 -0
  176. package/dist/esm/models/bot-shield-action.d.ts.map +1 -1
  177. package/dist/esm/models/bot-shield-action.js +8 -0
  178. package/dist/esm/models/bot-shield-action.js.map +1 -1
  179. package/dist/esm/models/error-body.d.ts +6 -1
  180. package/dist/esm/models/error-body.d.ts.map +1 -1
  181. package/dist/esm/models/error-body.js +4 -0
  182. package/dist/esm/models/error-body.js.map +1 -1
  183. package/dist/esm/models/gate-unavailable-event.d.ts +112 -0
  184. package/dist/esm/models/gate-unavailable-event.d.ts.map +1 -0
  185. package/dist/esm/models/gate-unavailable-event.js +99 -0
  186. package/dist/esm/models/gate-unavailable-event.js.map +1 -0
  187. package/dist/esm/models/gates-api-error.d.ts +5 -0
  188. package/dist/esm/models/gates-api-error.d.ts.map +1 -1
  189. package/dist/esm/models/gates-api-error.js +11 -0
  190. package/dist/esm/models/gates-api-error.js.map +1 -1
  191. package/dist/esm/models/index.d.ts +1 -0
  192. package/dist/esm/models/index.d.ts.map +1 -1
  193. package/dist/esm/models/index.js +1 -0
  194. package/dist/esm/models/index.js.map +1 -1
  195. package/dist/esm/models/operations/actions-propose.d.ts +21 -1
  196. package/dist/esm/models/operations/actions-propose.d.ts.map +1 -1
  197. package/dist/esm/models/operations/actions-propose.js +16 -0
  198. package/dist/esm/models/operations/actions-propose.js.map +1 -1
  199. package/dist/esm/models/operations/gates-api-actions-create.d.ts +11 -1
  200. package/dist/esm/models/operations/gates-api-actions-create.d.ts.map +1 -1
  201. package/dist/esm/models/operations/gates-api-actions-create.js +4 -0
  202. package/dist/esm/models/operations/gates-api-actions-create.js.map +1 -1
  203. package/dist/esm/models/operations/gates-api-actions-list.d.ts +1 -1
  204. package/dist/esm/models/operations/gates-api-actions-request-cancel.d.ts +113 -0
  205. package/dist/esm/models/operations/gates-api-actions-request-cancel.d.ts.map +1 -0
  206. package/dist/esm/models/operations/gates-api-actions-request-cancel.js +132 -0
  207. package/dist/esm/models/operations/gates-api-actions-request-cancel.js.map +1 -0
  208. package/dist/esm/models/operations/gates-api-actions-request-status.d.ts +5 -0
  209. package/dist/esm/models/operations/gates-api-actions-request-status.d.ts.map +1 -1
  210. package/dist/esm/models/operations/gates-api-actions-request-status.js +2 -0
  211. package/dist/esm/models/operations/gates-api-actions-request-status.js.map +1 -1
  212. package/dist/esm/models/operations/gates-api-actions-request.d.ts +34 -4
  213. package/dist/esm/models/operations/gates-api-actions-request.d.ts.map +1 -1
  214. package/dist/esm/models/operations/gates-api-actions-request.js +29 -2
  215. package/dist/esm/models/operations/gates-api-actions-request.js.map +1 -1
  216. package/dist/esm/models/operations/gates-api-actions-set-state.d.ts +1 -1
  217. package/dist/esm/models/operations/gates-api-actions-update.d.ts +99 -0
  218. package/dist/esm/models/operations/gates-api-actions-update.d.ts.map +1 -0
  219. package/dist/esm/models/operations/gates-api-actions-update.js +95 -0
  220. package/dist/esm/models/operations/gates-api-actions-update.js.map +1 -0
  221. package/dist/esm/models/operations/index.d.ts +5 -0
  222. package/dist/esm/models/operations/index.d.ts.map +1 -1
  223. package/dist/esm/models/operations/index.js +5 -0
  224. package/dist/esm/models/operations/index.js.map +1 -1
  225. package/dist/esm/models/operations/request-passkey-complete.d.ts +1 -1
  226. package/dist/esm/models/operations/sdk-confirm-link.d.ts +130 -0
  227. package/dist/esm/models/operations/sdk-confirm-link.d.ts.map +1 -0
  228. package/dist/esm/models/operations/sdk-confirm-link.js +157 -0
  229. package/dist/esm/models/operations/sdk-confirm-link.js.map +1 -0
  230. package/dist/esm/models/operations/sdk-create-session.d.ts +1 -1
  231. package/dist/esm/models/operations/sdk-create-verification-link.d.ts +43 -2
  232. package/dist/esm/models/operations/sdk-create-verification-link.d.ts.map +1 -1
  233. package/dist/esm/models/operations/sdk-create-verification-link.js +29 -0
  234. package/dist/esm/models/operations/sdk-create-verification-link.js.map +1 -1
  235. package/dist/esm/models/operations/sdk-send-by-number.d.ts +124 -0
  236. package/dist/esm/models/operations/sdk-send-by-number.d.ts.map +1 -0
  237. package/dist/esm/models/operations/sdk-send-by-number.js +155 -0
  238. package/dist/esm/models/operations/sdk-send-by-number.js.map +1 -0
  239. package/dist/esm/models/operations/sdk-verify-resolution.d.ts +125 -0
  240. package/dist/esm/models/operations/sdk-verify-resolution.d.ts.map +1 -0
  241. package/dist/esm/models/operations/sdk-verify-resolution.js +136 -0
  242. package/dist/esm/models/operations/sdk-verify-resolution.js.map +1 -0
  243. package/dist/esm/models/operations/sdk-verify-token.d.ts +95 -1
  244. package/dist/esm/models/operations/sdk-verify-token.d.ts.map +1 -1
  245. package/dist/esm/models/operations/sdk-verify-token.js +83 -0
  246. package/dist/esm/models/operations/sdk-verify-token.js.map +1 -1
  247. package/dist/esm/models/operations/verification-get-status.d.ts +40 -5
  248. package/dist/esm/models/operations/verification-get-status.d.ts.map +1 -1
  249. package/dist/esm/models/operations/verification-get-status.js +32 -1
  250. package/dist/esm/models/operations/verification-get-status.js.map +1 -1
  251. package/dist/esm/models/passes-per-person.d.ts +1 -1
  252. package/dist/esm/sdk/actions.d.ts +8 -1
  253. package/dist/esm/sdk/actions.d.ts.map +1 -1
  254. package/dist/esm/sdk/actions.js +11 -1
  255. package/dist/esm/sdk/actions.js.map +1 -1
  256. package/dist/esm/sdk/census.d.ts +17 -1
  257. package/dist/esm/sdk/census.d.ts.map +1 -1
  258. package/dist/esm/sdk/census.js +23 -1
  259. package/dist/esm/sdk/census.js.map +1 -1
  260. package/dist/esm/sdk/gates-actions.d.ts +15 -1
  261. package/dist/esm/sdk/gates-actions.d.ts.map +1 -1
  262. package/dist/esm/sdk/gates-actions.js +21 -1
  263. package/dist/esm/sdk/gates-actions.js.map +1 -1
  264. package/dist/esm/sdk/sdk.d.ts +2 -2
  265. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  266. package/dist/esm/sdk/sdk.js +4 -4
  267. package/dist/esm/sdk/sdk.js.map +1 -1
  268. package/dist/esm/sdk/verification.d.ts +1 -1
  269. package/dist/esm/sdk/verification.js +1 -1
  270. package/jsr.json +1 -1
  271. package/package.json +1 -1
  272. package/src/funcs/actions-propose-action.ts +1 -1
  273. package/src/funcs/actions-verify-resolution.ts +192 -0
  274. package/src/funcs/census-confirm-link.ts +171 -0
  275. package/src/funcs/census-create-verification-link.ts +2 -0
  276. package/src/funcs/census-send-by-number.ts +180 -0
  277. package/src/funcs/census-verify-token.ts +1 -1
  278. package/src/funcs/gates-actions-request-cancel.ts +187 -0
  279. package/src/funcs/gates-actions-request-status.ts +1 -0
  280. package/src/funcs/gates-actions-request.ts +1 -1
  281. package/src/funcs/gates-actions-update.ts +185 -0
  282. package/src/funcs/verification-get-status.ts +1 -1
  283. package/src/lib/config.ts +2 -2
  284. package/src/mcp-server/mcp-server.ts +1 -1
  285. package/src/mcp-server/server.ts +1 -1
  286. package/src/models/bot-shield-action.ts +18 -0
  287. package/src/models/error-body.ts +10 -1
  288. package/src/models/gate-unavailable-event.ts +218 -0
  289. package/src/models/gates-api-error.ts +16 -0
  290. package/src/models/index.ts +1 -0
  291. package/src/models/operations/actions-propose.ts +37 -1
  292. package/src/models/operations/gates-api-actions-create.ts +15 -1
  293. package/src/models/operations/gates-api-actions-list.ts +1 -1
  294. package/src/models/operations/gates-api-actions-request-cancel.ts +339 -0
  295. package/src/models/operations/gates-api-actions-request-status.ts +7 -0
  296. package/src/models/operations/gates-api-actions-request.ts +83 -6
  297. package/src/models/operations/gates-api-actions-set-state.ts +1 -1
  298. package/src/models/operations/gates-api-actions-update.ts +281 -0
  299. package/src/models/operations/index.ts +5 -0
  300. package/src/models/operations/request-passkey-complete.ts +1 -1
  301. package/src/models/operations/sdk-confirm-link.ts +380 -0
  302. package/src/models/operations/sdk-create-session.ts +1 -1
  303. package/src/models/operations/sdk-create-verification-link.ts +69 -2
  304. package/src/models/operations/sdk-send-by-number.ts +372 -0
  305. package/src/models/operations/sdk-verify-resolution.ts +341 -0
  306. package/src/models/operations/sdk-verify-token.ts +189 -1
  307. package/src/models/operations/verification-get-status.ts +67 -5
  308. package/src/models/passes-per-person.ts +1 -1
  309. package/src/sdk/actions.ts +21 -1
  310. package/src/sdk/census.ts +43 -1
  311. package/src/sdk/gates-actions.ts +41 -1
  312. package/src/sdk/sdk.ts +5 -5
  313. package/src/sdk/verification.ts +1 -1
@@ -22,7 +22,7 @@ export type VerificationGetStatusRequest = {
22
22
  };
23
23
 
24
24
  /**
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`.
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`. `cancelled`: the request ended without an answer; see `reason` (`declined`: the person cancelled the link ask; `superseded`: a newer check sent to the same person replaced this one).
26
26
  */
27
27
  export const VerificationGetStatusStatus = {
28
28
  Pending: "pending",
@@ -30,11 +30,12 @@ export const VerificationGetStatusStatus = {
30
30
  Pass: "pass",
31
31
  Expired: "expired",
32
32
  Failed: "failed",
33
+ Cancelled: "cancelled",
33
34
  NotFound: "not_found",
34
35
  Error: "error",
35
36
  } as const;
36
37
  /**
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`.
38
+ * `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`. `cancelled`: the request ended without an answer; see `reason` (`declined`: the person cancelled the link ask; `superseded`: a newer check sent to the same person replaced this one).
38
39
  */
39
40
  export type VerificationGetStatusStatus = OpenEnum<
40
41
  typeof VerificationGetStatusStatus
@@ -121,7 +122,7 @@ export type Gate = {
121
122
  linked?: boolean | null | undefined;
122
123
  signedUpRequired?: boolean | undefined;
123
124
  /**
124
- * Passes per person. Null = as often as they like.
125
+ * Passes per BotShield ID. Null = as often as they like.
125
126
  */
126
127
  perPerson?: models.PassesPerPerson | null | undefined;
127
128
  /**
@@ -166,10 +167,24 @@ export type VerificationGetStatusGateType = OpenEnum<
166
167
  typeof VerificationGetStatusGateType
167
168
  >;
168
169
 
170
+ /**
171
+ * 4.0: where the link stands on this request. Null on a plain check and on a link from before 4.0. A pass whose link is not live carries no destination.
172
+ */
173
+ export const LinkState = {
174
+ Pending: "pending",
175
+ Live: "live",
176
+ Expired: "expired",
177
+ Refused: "refused",
178
+ } as const;
179
+ /**
180
+ * 4.0: where the link stands on this request. Null on a plain check and on a link from before 4.0. A pass whose link is not live carries no destination.
181
+ */
182
+ export type LinkState = OpenEnum<typeof LinkState>;
183
+
169
184
  export type VerificationGetStatusData = {
170
185
  found?: boolean | undefined;
171
186
  /**
172
- * `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`.
187
+ * `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`. `cancelled`: the request ended without an answer; see `reason` (`declined`: the person cancelled the link ask; `superseded`: a newer check sent to the same person replaced this one).
173
188
  */
174
189
  status?: VerificationGetStatusStatus | undefined;
175
190
  requestId?: string | undefined;
@@ -199,7 +214,7 @@ export type VerificationGetStatusData = {
199
214
  */
200
215
  error?: models.ErrorBody | undefined;
201
216
  /**
202
- * Why a request ended `failed`. Null while pending and on success. An open set — treat unknown values as `unavailable`. `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. `gate_not_open`, `signup_required`, `link_requires_user_ref`: the gate's policy refused. `action_off`: the BotShield Action was turned off mid-tap. `action_requires_user_ref`: an action request without a linking ceremony. `unavailable`: the standard Unavailable result.
217
+ * Why a request ended `failed` or `cancelled`. Null while pending and on success. An open set — treat unknown values as `unavailable`. `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. `gate_not_open`, `signup_required`, `link_requires_user_ref`: the gate's policy refused. `action_off`: the BotShield Action was turned off mid-tap. `action_requires_user_ref`: an action request without a linking ceremony. `superseded`: a newer check you sent to the same person replaced this one (status `cancelled`). `unavailable`: the standard Unavailable result.
203
218
  */
204
219
  reason?: string | null | undefined;
205
220
  /**
@@ -250,6 +265,19 @@ export type VerificationGetStatusData = {
250
265
  * Age Gate only, once completed: where the age answer came from.
251
266
  */
252
267
  ageSource?: string | null | undefined;
268
+ /**
269
+ * 4.0: where the link stands on this request. Null on a plain check and on a link from before 4.0. A pass whose link is not live carries no destination.
270
+ */
271
+ linkState?: LinkState | null | undefined;
272
+ /**
273
+ * 4.0: when a pending link expires (24 hours after the tap). Null unless `link_state` is `pending`.
274
+ */
275
+ linkExpiresAt?: Date | null | undefined;
276
+ /**
277
+ * 4.0: `link_pending` while the link waits for your server.
278
+ */
279
+ linkCode?: string | undefined;
280
+ linkMessage?: string | undefined;
253
281
  };
254
282
 
255
283
  /**
@@ -622,6 +650,19 @@ export const VerificationGetStatusGateType$outboundSchema: z.ZodType<
622
650
  VerificationGetStatusGateType
623
651
  > = openEnums.outboundSchema(VerificationGetStatusGateType);
624
652
 
653
+ /** @internal */
654
+ export const LinkState$inboundSchema: z.ZodType<
655
+ LinkState,
656
+ z.ZodTypeDef,
657
+ unknown
658
+ > = openEnums.inboundSchema(LinkState);
659
+ /** @internal */
660
+ export const LinkState$outboundSchema: z.ZodType<
661
+ string,
662
+ z.ZodTypeDef,
663
+ LinkState
664
+ > = openEnums.outboundSchema(LinkState);
665
+
625
666
  /** @internal */
626
667
  export const VerificationGetStatusData$inboundSchema: z.ZodType<
627
668
  VerificationGetStatusData,
@@ -658,6 +699,10 @@ export const VerificationGetStatusData$inboundSchema: z.ZodType<
658
699
  age_threshold: z.nullable(types.number()).optional(),
659
700
  age_verdict: z.nullable(types.string()).optional(),
660
701
  age_source: z.nullable(types.string()).optional(),
702
+ link_state: z.nullable(LinkState$inboundSchema).optional(),
703
+ link_expires_at: z.nullable(types.date()).optional(),
704
+ link_code: types.optional(types.string()),
705
+ link_message: types.optional(types.string()),
661
706
  }).transform((v) => {
662
707
  return remap$(v, {
663
708
  "request_id": "requestId",
@@ -678,6 +723,10 @@ export const VerificationGetStatusData$inboundSchema: z.ZodType<
678
723
  "age_threshold": "ageThreshold",
679
724
  "age_verdict": "ageVerdict",
680
725
  "age_source": "ageSource",
726
+ "link_state": "linkState",
727
+ "link_expires_at": "linkExpiresAt",
728
+ "link_code": "linkCode",
729
+ "link_message": "linkMessage",
681
730
  });
682
731
  });
683
732
  /** @internal */
@@ -711,6 +760,10 @@ export type VerificationGetStatusData$Outbound = {
711
760
  age_threshold?: number | null | undefined;
712
761
  age_verdict?: string | null | undefined;
713
762
  age_source?: string | null | undefined;
763
+ link_state?: string | null | undefined;
764
+ link_expires_at?: string | null | undefined;
765
+ link_code?: string | undefined;
766
+ link_message?: string | undefined;
714
767
  };
715
768
 
716
769
  /** @internal */
@@ -749,6 +802,11 @@ export const VerificationGetStatusData$outboundSchema: z.ZodType<
749
802
  ageThreshold: z.nullable(z.number().int()).optional(),
750
803
  ageVerdict: z.nullable(z.string()).optional(),
751
804
  ageSource: z.nullable(z.string()).optional(),
805
+ linkState: z.nullable(LinkState$outboundSchema).optional(),
806
+ linkExpiresAt: z.nullable(z.date().transform(v => v.toISOString()))
807
+ .optional(),
808
+ linkCode: z.string().optional(),
809
+ linkMessage: z.string().optional(),
752
810
  }).transform((v) => {
753
811
  return remap$(v, {
754
812
  requestId: "request_id",
@@ -769,6 +827,10 @@ export const VerificationGetStatusData$outboundSchema: z.ZodType<
769
827
  ageThreshold: "age_threshold",
770
828
  ageVerdict: "age_verdict",
771
829
  ageSource: "age_source",
830
+ linkState: "link_state",
831
+ linkExpiresAt: "link_expires_at",
832
+ linkCode: "link_code",
833
+ linkMessage: "link_message",
772
834
  });
773
835
  });
774
836
 
@@ -19,7 +19,7 @@ export const Window = {
19
19
  export type Window = OpenEnum<typeof Window>;
20
20
 
21
21
  /**
22
- * Passes per person on your platform: `limit` per `window` (`30d` = rolling 30 days, `ever` = lifetime).
22
+ * Passes per BotShield ID on your platform: `limit` per `window` (`30d` = rolling 30 days, `ever` = lifetime).
23
23
  */
24
24
  export type PassesPerPerson = {
25
25
  limit: number;
@@ -5,16 +5,36 @@
5
5
  import { actionsCancelAction } from "../funcs/actions-cancel-action.js";
6
6
  import { actionsCheckActionStatus } from "../funcs/actions-check-action-status.js";
7
7
  import { actionsProposeAction } from "../funcs/actions-propose-action.js";
8
+ import { actionsVerifyResolution } from "../funcs/actions-verify-resolution.js";
8
9
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
9
10
  import * as operations from "../models/operations/index.js";
10
11
  import { unwrapAsync } from "../types/fp.js";
11
12
 
12
13
  export class Actions extends ClientSDK {
14
+ /**
15
+ * Check a Proof of Resolution (works once)
16
+ *
17
+ * @remarks
18
+ * 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).
19
+ */
20
+ async verifyResolution(
21
+ security: operations.SDKVerifyResolutionSecurity,
22
+ request: operations.SDKVerifyResolutionRequest,
23
+ options?: RequestOptions,
24
+ ): Promise<operations.SDKVerifyResolutionResponse> {
25
+ return unwrapAsync(actionsVerifyResolution(
26
+ this,
27
+ security,
28
+ request,
29
+ options,
30
+ ));
31
+ }
32
+
13
33
  /**
14
34
  * Propose an action for human confirmation
15
35
  *
16
36
  * @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 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.
37
+ * 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).
18
38
  */
19
39
  async proposeAction(
20
40
  request: operations.ActionsProposeRequest,
package/src/sdk/census.ts CHANGED
@@ -2,11 +2,13 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ import { censusConfirmLink } from "../funcs/census-confirm-link.js";
5
6
  import { censusCreateSession } from "../funcs/census-create-session.js";
6
7
  import { censusCreateVerificationLink } from "../funcs/census-create-verification-link.js";
7
8
  import { censusGetPartnerConfig } from "../funcs/census-get-partner-config.js";
8
9
  import { censusLogout } from "../funcs/census-logout.js";
9
10
  import { censusRevokeVerification } from "../funcs/census-revoke-verification.js";
11
+ import { censusSendByNumber } from "../funcs/census-send-by-number.js";
10
12
  import { censusStoreSignal } from "../funcs/census-store-signal.js";
11
13
  import { censusValidateSignal } from "../funcs/census-validate-signal.js";
12
14
  import { censusVerifyToken } from "../funcs/census-verify-token.js";
@@ -39,6 +41,8 @@ export class Census extends ClientSDK {
39
41
  *
40
42
  * @remarks
41
43
  * 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.
44
+ *
45
+ * **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"`).
42
46
  */
43
47
  async createVerificationLink(
44
48
  security: operations.SDKCreateVerificationLinkSecurity,
@@ -57,7 +61,7 @@ export class Census extends ClientSDK {
57
61
  * Validate a verification token
58
62
  *
59
63
  * @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. 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.
64
+ * 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.
61
65
  */
62
66
  async verifyToken(
63
67
  security: operations.SDKVerifyTokenSecurity,
@@ -159,4 +163,42 @@ export class Census extends ClientSDK {
159
163
  options,
160
164
  ));
161
165
  }
166
+
167
+ /**
168
+ * Confirm a pending link
169
+ *
170
+ * @remarks
171
+ * 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.
172
+ */
173
+ async confirmLink(
174
+ security: operations.SDKConfirmLinkSecurity,
175
+ request: operations.SDKConfirmLinkRequest,
176
+ options?: RequestOptions,
177
+ ): Promise<operations.SDKConfirmLinkResponse> {
178
+ return unwrapAsync(censusConfirmLink(
179
+ this,
180
+ security,
181
+ request,
182
+ options,
183
+ ));
184
+ }
185
+
186
+ /**
187
+ * Send a request to verify by phone number
188
+ *
189
+ * @remarks
190
+ * 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.
191
+ */
192
+ async sendByNumber(
193
+ security: operations.SDKSendByNumberSecurity,
194
+ request: operations.SDKSendByNumberRequest,
195
+ options?: RequestOptions,
196
+ ): Promise<operations.SDKSendByNumberResponse> {
197
+ return unwrapAsync(censusSendByNumber(
198
+ this,
199
+ security,
200
+ request,
201
+ options,
202
+ ));
203
+ }
162
204
  }
@@ -4,9 +4,11 @@
4
4
 
5
5
  import { gatesActionsCreate } from "../funcs/gates-actions-create.js";
6
6
  import { gatesActionsList } from "../funcs/gates-actions-list.js";
7
+ import { gatesActionsRequestCancel } from "../funcs/gates-actions-request-cancel.js";
7
8
  import { gatesActionsRequestStatus } from "../funcs/gates-actions-request-status.js";
8
9
  import { gatesActionsRequest } from "../funcs/gates-actions-request.js";
9
10
  import { gatesActionsSetState } from "../funcs/gates-actions-set-state.js";
11
+ import { gatesActionsUpdate } from "../funcs/gates-actions-update.js";
10
12
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
11
13
  import * as operations from "../models/operations/index.js";
12
14
  import { unwrapAsync } from "../types/fp.js";
@@ -67,11 +69,30 @@ export class GatesActions extends ClientSDK {
67
69
  ));
68
70
  }
69
71
 
72
+ /**
73
+ * Rename a BotShield Action, or mark it staff can send
74
+ *
75
+ * @remarks
76
+ * 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.
77
+ */
78
+ async update(
79
+ security: operations.GatesApiActionsUpdateSecurity,
80
+ request: operations.GatesApiActionsUpdateRequest,
81
+ options?: RequestOptions,
82
+ ): Promise<operations.GatesApiActionsUpdateResponse> {
83
+ return unwrapAsync(gatesActionsUpdate(
84
+ this,
85
+ security,
86
+ request,
87
+ options,
88
+ ));
89
+ }
90
+
70
91
  /**
71
92
  * Ask a linked person to confirm an action
72
93
  *
73
94
  * @remarks
74
- * 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).
95
+ * 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).
75
96
  */
76
97
  async request(
77
98
  security: operations.GatesApiActionsRequestSecurity,
@@ -104,4 +125,23 @@ export class GatesActions extends ClientSDK {
104
125
  options,
105
126
  ));
106
127
  }
128
+
129
+ /**
130
+ * Withdraw an action request
131
+ *
132
+ * @remarks
133
+ * 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.
134
+ */
135
+ async requestCancel(
136
+ security: operations.GatesApiActionsRequestCancelSecurity,
137
+ request: operations.GatesApiActionsRequestCancelRequest,
138
+ options?: RequestOptions,
139
+ ): Promise<operations.GatesApiActionsRequestCancelResponse> {
140
+ return unwrapAsync(gatesActionsRequestCancel(
141
+ this,
142
+ security,
143
+ request,
144
+ options,
145
+ ));
146
+ }
107
147
  }
package/src/sdk/sdk.ts CHANGED
@@ -16,16 +16,16 @@ export class BotShield extends ClientSDK {
16
16
  return (this._census ??= new Census(this._options));
17
17
  }
18
18
 
19
- private _verification?: Verification;
20
- get verification(): Verification {
21
- return (this._verification ??= new Verification(this._options));
22
- }
23
-
24
19
  private _actions?: Actions;
25
20
  get actions(): Actions {
26
21
  return (this._actions ??= new Actions(this._options));
27
22
  }
28
23
 
24
+ private _verification?: Verification;
25
+ get verification(): Verification {
26
+ return (this._verification ??= new Verification(this._options));
27
+ }
28
+
29
29
  private _securedAccounts?: SecuredAccounts;
30
30
  get securedAccounts(): SecuredAccounts {
31
31
  return (this._securedAccounts ??= new SecuredAccounts(this._options));
@@ -12,7 +12,7 @@ export class Verification extends ClientSDK {
12
12
  * Check verification status
13
13
  *
14
14
  * @remarks
15
- * 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.
15
+ * 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"`.
16
16
  */
17
17
  async getStatus(
18
18
  security: operations.VerificationGetStatusSecurity,