botshield-sdk 2.3.0 → 4.0.1
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.
- package/README.md +28 -2
- package/bin/mcp-server.js +1129 -52
- package/bin/mcp-server.js.map +34 -24
- package/dist/commonjs/funcs/actions-propose-action.d.ts +1 -1
- package/dist/commonjs/funcs/actions-propose-action.js +1 -1
- package/dist/commonjs/funcs/actions-verify-resolution.d.ts +18 -0
- package/dist/commonjs/funcs/actions-verify-resolution.d.ts.map +1 -0
- package/dist/commonjs/funcs/actions-verify-resolution.js +129 -0
- package/dist/commonjs/funcs/actions-verify-resolution.js.map +1 -0
- package/dist/commonjs/funcs/census-confirm-link.d.ts +17 -0
- package/dist/commonjs/funcs/census-confirm-link.d.ts.map +1 -0
- package/dist/commonjs/funcs/census-confirm-link.js +119 -0
- package/dist/commonjs/funcs/census-confirm-link.js.map +1 -0
- package/dist/commonjs/funcs/census-create-verification-link.d.ts +2 -0
- package/dist/commonjs/funcs/census-create-verification-link.d.ts.map +1 -1
- package/dist/commonjs/funcs/census-create-verification-link.js +2 -0
- package/dist/commonjs/funcs/census-create-verification-link.js.map +1 -1
- package/dist/commonjs/funcs/census-send-by-number.d.ts +18 -0
- package/dist/commonjs/funcs/census-send-by-number.d.ts.map +1 -0
- package/dist/commonjs/funcs/census-send-by-number.js +123 -0
- package/dist/commonjs/funcs/census-send-by-number.js.map +1 -0
- package/dist/commonjs/funcs/census-verify-token.d.ts +1 -1
- package/dist/commonjs/funcs/census-verify-token.js +1 -1
- package/dist/commonjs/funcs/gates-actions-request-cancel.d.ts +18 -0
- package/dist/commonjs/funcs/gates-actions-request-cancel.d.ts.map +1 -0
- package/dist/commonjs/funcs/gates-actions-request-cancel.js +123 -0
- package/dist/commonjs/funcs/gates-actions-request-cancel.js.map +1 -0
- package/dist/commonjs/funcs/gates-actions-request-status.js +1 -0
- package/dist/commonjs/funcs/gates-actions-request-status.js.map +1 -1
- package/dist/commonjs/funcs/gates-actions-request.d.ts +1 -1
- package/dist/commonjs/funcs/gates-actions-request.js +1 -1
- package/dist/commonjs/funcs/gates-actions-update.d.ts +18 -0
- package/dist/commonjs/funcs/gates-actions-update.d.ts.map +1 -0
- package/dist/commonjs/funcs/gates-actions-update.js +123 -0
- package/dist/commonjs/funcs/gates-actions-update.js.map +1 -0
- package/dist/commonjs/funcs/recovery-exchange.d.ts +18 -0
- package/dist/commonjs/funcs/recovery-exchange.d.ts.map +1 -0
- package/dist/commonjs/funcs/recovery-exchange.js +123 -0
- package/dist/commonjs/funcs/recovery-exchange.js.map +1 -0
- package/dist/commonjs/funcs/recovery-other-route.d.ts +18 -0
- package/dist/commonjs/funcs/recovery-other-route.d.ts.map +1 -0
- package/dist/commonjs/funcs/recovery-other-route.js +123 -0
- package/dist/commonjs/funcs/recovery-other-route.js.map +1 -0
- package/dist/commonjs/funcs/sign-in-confirm.d.ts +18 -0
- package/dist/commonjs/funcs/sign-in-confirm.d.ts.map +1 -0
- package/dist/commonjs/funcs/sign-in-confirm.js +123 -0
- package/dist/commonjs/funcs/sign-in-confirm.js.map +1 -0
- package/dist/commonjs/funcs/sign-in-request.d.ts +18 -0
- package/dist/commonjs/funcs/sign-in-request.d.ts.map +1 -0
- package/dist/commonjs/funcs/sign-in-request.js +123 -0
- package/dist/commonjs/funcs/sign-in-request.js.map +1 -0
- package/dist/commonjs/funcs/verification-get-status.d.ts +1 -1
- package/dist/commonjs/funcs/verification-get-status.js +2 -1
- package/dist/commonjs/funcs/verification-get-status.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/models/bot-shield-action.d.ts +46 -0
- package/dist/commonjs/models/bot-shield-action.d.ts.map +1 -1
- package/dist/commonjs/models/bot-shield-action.js +36 -1
- package/dist/commonjs/models/bot-shield-action.js.map +1 -1
- package/dist/commonjs/models/error-body.d.ts +6 -1
- package/dist/commonjs/models/error-body.d.ts.map +1 -1
- package/dist/commonjs/models/error-body.js +4 -0
- package/dist/commonjs/models/error-body.js.map +1 -1
- package/dist/commonjs/models/gate-unavailable-event.d.ts +112 -0
- package/dist/commonjs/models/gate-unavailable-event.d.ts.map +1 -0
- package/dist/commonjs/models/gate-unavailable-event.js +137 -0
- package/dist/commonjs/models/gate-unavailable-event.js.map +1 -0
- package/dist/commonjs/models/gates-api-error.d.ts +5 -0
- package/dist/commonjs/models/gates-api-error.d.ts.map +1 -1
- package/dist/commonjs/models/gates-api-error.js +11 -0
- package/dist/commonjs/models/gates-api-error.js.map +1 -1
- package/dist/commonjs/models/index.d.ts +1 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +1 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/operations/actions-propose.d.ts +21 -1
- package/dist/commonjs/models/operations/actions-propose.d.ts.map +1 -1
- package/dist/commonjs/models/operations/actions-propose.js +16 -0
- package/dist/commonjs/models/operations/actions-propose.js.map +1 -1
- package/dist/commonjs/models/operations/gates-api-actions-create.d.ts +11 -1
- package/dist/commonjs/models/operations/gates-api-actions-create.d.ts.map +1 -1
- package/dist/commonjs/models/operations/gates-api-actions-create.js +4 -0
- package/dist/commonjs/models/operations/gates-api-actions-create.js.map +1 -1
- package/dist/commonjs/models/operations/gates-api-actions-list.d.ts +1 -1
- package/dist/commonjs/models/operations/gates-api-actions-request-cancel.d.ts +113 -0
- package/dist/commonjs/models/operations/gates-api-actions-request-cancel.d.ts.map +1 -0
- package/dist/commonjs/models/operations/gates-api-actions-request-cancel.js +178 -0
- package/dist/commonjs/models/operations/gates-api-actions-request-cancel.js.map +1 -0
- package/dist/commonjs/models/operations/gates-api-actions-request-status.d.ts +5 -0
- package/dist/commonjs/models/operations/gates-api-actions-request-status.d.ts.map +1 -1
- package/dist/commonjs/models/operations/gates-api-actions-request-status.js +2 -0
- package/dist/commonjs/models/operations/gates-api-actions-request-status.js.map +1 -1
- package/dist/commonjs/models/operations/gates-api-actions-request.d.ts +34 -4
- package/dist/commonjs/models/operations/gates-api-actions-request.d.ts.map +1 -1
- package/dist/commonjs/models/operations/gates-api-actions-request.js +32 -3
- package/dist/commonjs/models/operations/gates-api-actions-request.js.map +1 -1
- package/dist/commonjs/models/operations/gates-api-actions-set-state.d.ts +1 -1
- package/dist/commonjs/models/operations/gates-api-actions-update.d.ts +99 -0
- package/dist/commonjs/models/operations/gates-api-actions-update.d.ts.map +1 -0
- package/dist/commonjs/models/operations/gates-api-actions-update.js +141 -0
- package/dist/commonjs/models/operations/gates-api-actions-update.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +9 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +9 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/recovery-exchange.d.ts +114 -0
- package/dist/commonjs/models/operations/recovery-exchange.d.ts.map +1 -0
- package/dist/commonjs/models/operations/recovery-exchange.js +164 -0
- package/dist/commonjs/models/operations/recovery-exchange.js.map +1 -0
- package/dist/commonjs/models/operations/recovery-other-route.d.ts +86 -0
- package/dist/commonjs/models/operations/recovery-other-route.d.ts.map +1 -0
- package/dist/commonjs/models/operations/recovery-other-route.js +145 -0
- package/dist/commonjs/models/operations/recovery-other-route.js.map +1 -0
- package/dist/commonjs/models/operations/request-passkey-complete.d.ts +1 -1
- package/dist/commonjs/models/operations/sdk-confirm-link.d.ts +130 -0
- package/dist/commonjs/models/operations/sdk-confirm-link.d.ts.map +1 -0
- package/dist/commonjs/models/operations/sdk-confirm-link.js +205 -0
- package/dist/commonjs/models/operations/sdk-confirm-link.js.map +1 -0
- package/dist/commonjs/models/operations/sdk-create-session.d.ts +1 -1
- package/dist/commonjs/models/operations/sdk-create-verification-link.d.ts +48 -2
- package/dist/commonjs/models/operations/sdk-create-verification-link.d.ts.map +1 -1
- package/dist/commonjs/models/operations/sdk-create-verification-link.js +34 -1
- package/dist/commonjs/models/operations/sdk-create-verification-link.js.map +1 -1
- package/dist/commonjs/models/operations/sdk-send-by-number.d.ts +124 -0
- package/dist/commonjs/models/operations/sdk-send-by-number.d.ts.map +1 -0
- package/dist/commonjs/models/operations/sdk-send-by-number.js +203 -0
- package/dist/commonjs/models/operations/sdk-send-by-number.js.map +1 -0
- package/dist/commonjs/models/operations/sdk-verify-resolution.d.ts +125 -0
- package/dist/commonjs/models/operations/sdk-verify-resolution.d.ts.map +1 -0
- package/dist/commonjs/models/operations/sdk-verify-resolution.js +182 -0
- package/dist/commonjs/models/operations/sdk-verify-resolution.js.map +1 -0
- package/dist/commonjs/models/operations/sdk-verify-token.d.ts +110 -1
- package/dist/commonjs/models/operations/sdk-verify-token.d.ts.map +1 -1
- package/dist/commonjs/models/operations/sdk-verify-token.js +96 -1
- package/dist/commonjs/models/operations/sdk-verify-token.js.map +1 -1
- package/dist/commonjs/models/operations/signin-confirm.d.ts +148 -0
- package/dist/commonjs/models/operations/signin-confirm.d.ts.map +1 -0
- package/dist/commonjs/models/operations/signin-confirm.js +202 -0
- package/dist/commonjs/models/operations/signin-confirm.js.map +1 -0
- package/dist/commonjs/models/operations/signin-request.d.ts +115 -0
- package/dist/commonjs/models/operations/signin-request.d.ts.map +1 -0
- package/dist/commonjs/models/operations/signin-request.js +174 -0
- package/dist/commonjs/models/operations/signin-request.js.map +1 -0
- package/dist/commonjs/models/operations/verification-get-status.d.ts +45 -5
- package/dist/commonjs/models/operations/verification-get-status.d.ts.map +1 -1
- package/dist/commonjs/models/operations/verification-get-status.js +37 -2
- package/dist/commonjs/models/operations/verification-get-status.js.map +1 -1
- package/dist/commonjs/models/passes-per-person.d.ts +1 -1
- package/dist/commonjs/sdk/actions.d.ts +8 -1
- package/dist/commonjs/sdk/actions.d.ts.map +1 -1
- package/dist/commonjs/sdk/actions.js +11 -1
- package/dist/commonjs/sdk/actions.js.map +1 -1
- package/dist/commonjs/sdk/census.d.ts +17 -1
- package/dist/commonjs/sdk/census.d.ts.map +1 -1
- package/dist/commonjs/sdk/census.js +23 -1
- package/dist/commonjs/sdk/census.js.map +1 -1
- package/dist/commonjs/sdk/gates-actions.d.ts +15 -1
- package/dist/commonjs/sdk/gates-actions.d.ts.map +1 -1
- package/dist/commonjs/sdk/gates-actions.js +21 -1
- package/dist/commonjs/sdk/gates-actions.js.map +1 -1
- package/dist/commonjs/sdk/recovery.d.ts +19 -0
- package/dist/commonjs/sdk/recovery.d.ts.map +1 -0
- package/dist/commonjs/sdk/recovery.js +32 -0
- package/dist/commonjs/sdk/recovery.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +8 -2
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +14 -4
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/commonjs/sdk/sign-in.d.ts +19 -0
- package/dist/commonjs/sdk/sign-in.d.ts.map +1 -0
- package/dist/commonjs/sdk/sign-in.js +32 -0
- package/dist/commonjs/sdk/sign-in.js.map +1 -0
- package/dist/commonjs/sdk/verification.d.ts +1 -1
- package/dist/commonjs/sdk/verification.js +1 -1
- package/dist/esm/funcs/actions-propose-action.d.ts +1 -1
- package/dist/esm/funcs/actions-propose-action.js +1 -1
- package/dist/esm/funcs/actions-verify-resolution.d.ts +18 -0
- package/dist/esm/funcs/actions-verify-resolution.d.ts.map +1 -0
- package/dist/esm/funcs/actions-verify-resolution.js +93 -0
- package/dist/esm/funcs/actions-verify-resolution.js.map +1 -0
- package/dist/esm/funcs/census-confirm-link.d.ts +17 -0
- package/dist/esm/funcs/census-confirm-link.d.ts.map +1 -0
- package/dist/esm/funcs/census-confirm-link.js +83 -0
- package/dist/esm/funcs/census-confirm-link.js.map +1 -0
- package/dist/esm/funcs/census-create-verification-link.d.ts +2 -0
- package/dist/esm/funcs/census-create-verification-link.d.ts.map +1 -1
- package/dist/esm/funcs/census-create-verification-link.js +2 -0
- package/dist/esm/funcs/census-create-verification-link.js.map +1 -1
- package/dist/esm/funcs/census-send-by-number.d.ts +18 -0
- package/dist/esm/funcs/census-send-by-number.d.ts.map +1 -0
- package/dist/esm/funcs/census-send-by-number.js +87 -0
- package/dist/esm/funcs/census-send-by-number.js.map +1 -0
- package/dist/esm/funcs/census-verify-token.d.ts +1 -1
- package/dist/esm/funcs/census-verify-token.js +1 -1
- package/dist/esm/funcs/gates-actions-request-cancel.d.ts +18 -0
- package/dist/esm/funcs/gates-actions-request-cancel.d.ts.map +1 -0
- package/dist/esm/funcs/gates-actions-request-cancel.js +87 -0
- package/dist/esm/funcs/gates-actions-request-cancel.js.map +1 -0
- package/dist/esm/funcs/gates-actions-request-status.js +1 -0
- package/dist/esm/funcs/gates-actions-request-status.js.map +1 -1
- package/dist/esm/funcs/gates-actions-request.d.ts +1 -1
- package/dist/esm/funcs/gates-actions-request.js +1 -1
- package/dist/esm/funcs/gates-actions-update.d.ts +18 -0
- package/dist/esm/funcs/gates-actions-update.d.ts.map +1 -0
- package/dist/esm/funcs/gates-actions-update.js +87 -0
- package/dist/esm/funcs/gates-actions-update.js.map +1 -0
- package/dist/esm/funcs/recovery-exchange.d.ts +18 -0
- package/dist/esm/funcs/recovery-exchange.d.ts.map +1 -0
- package/dist/esm/funcs/recovery-exchange.js +87 -0
- package/dist/esm/funcs/recovery-exchange.js.map +1 -0
- package/dist/esm/funcs/recovery-other-route.d.ts +18 -0
- package/dist/esm/funcs/recovery-other-route.d.ts.map +1 -0
- package/dist/esm/funcs/recovery-other-route.js +87 -0
- package/dist/esm/funcs/recovery-other-route.js.map +1 -0
- package/dist/esm/funcs/sign-in-confirm.d.ts +18 -0
- package/dist/esm/funcs/sign-in-confirm.d.ts.map +1 -0
- package/dist/esm/funcs/sign-in-confirm.js +87 -0
- package/dist/esm/funcs/sign-in-confirm.js.map +1 -0
- package/dist/esm/funcs/sign-in-request.d.ts +18 -0
- package/dist/esm/funcs/sign-in-request.d.ts.map +1 -0
- package/dist/esm/funcs/sign-in-request.js +87 -0
- package/dist/esm/funcs/sign-in-request.js.map +1 -0
- package/dist/esm/funcs/verification-get-status.d.ts +1 -1
- package/dist/esm/funcs/verification-get-status.js +3 -2
- package/dist/esm/funcs/verification-get-status.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/models/bot-shield-action.d.ts +46 -0
- package/dist/esm/models/bot-shield-action.d.ts.map +1 -1
- package/dist/esm/models/bot-shield-action.js +35 -0
- package/dist/esm/models/bot-shield-action.js.map +1 -1
- package/dist/esm/models/error-body.d.ts +6 -1
- package/dist/esm/models/error-body.d.ts.map +1 -1
- package/dist/esm/models/error-body.js +4 -0
- package/dist/esm/models/error-body.js.map +1 -1
- package/dist/esm/models/gate-unavailable-event.d.ts +112 -0
- package/dist/esm/models/gate-unavailable-event.d.ts.map +1 -0
- package/dist/esm/models/gate-unavailable-event.js +99 -0
- package/dist/esm/models/gate-unavailable-event.js.map +1 -0
- package/dist/esm/models/gates-api-error.d.ts +5 -0
- package/dist/esm/models/gates-api-error.d.ts.map +1 -1
- package/dist/esm/models/gates-api-error.js +11 -0
- package/dist/esm/models/gates-api-error.js.map +1 -1
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +1 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/operations/actions-propose.d.ts +21 -1
- package/dist/esm/models/operations/actions-propose.d.ts.map +1 -1
- package/dist/esm/models/operations/actions-propose.js +16 -0
- package/dist/esm/models/operations/actions-propose.js.map +1 -1
- package/dist/esm/models/operations/gates-api-actions-create.d.ts +11 -1
- package/dist/esm/models/operations/gates-api-actions-create.d.ts.map +1 -1
- package/dist/esm/models/operations/gates-api-actions-create.js +4 -0
- package/dist/esm/models/operations/gates-api-actions-create.js.map +1 -1
- package/dist/esm/models/operations/gates-api-actions-list.d.ts +1 -1
- package/dist/esm/models/operations/gates-api-actions-request-cancel.d.ts +113 -0
- package/dist/esm/models/operations/gates-api-actions-request-cancel.d.ts.map +1 -0
- package/dist/esm/models/operations/gates-api-actions-request-cancel.js +132 -0
- package/dist/esm/models/operations/gates-api-actions-request-cancel.js.map +1 -0
- package/dist/esm/models/operations/gates-api-actions-request-status.d.ts +5 -0
- package/dist/esm/models/operations/gates-api-actions-request-status.d.ts.map +1 -1
- package/dist/esm/models/operations/gates-api-actions-request-status.js +2 -0
- package/dist/esm/models/operations/gates-api-actions-request-status.js.map +1 -1
- package/dist/esm/models/operations/gates-api-actions-request.d.ts +34 -4
- package/dist/esm/models/operations/gates-api-actions-request.d.ts.map +1 -1
- package/dist/esm/models/operations/gates-api-actions-request.js +29 -2
- package/dist/esm/models/operations/gates-api-actions-request.js.map +1 -1
- package/dist/esm/models/operations/gates-api-actions-set-state.d.ts +1 -1
- package/dist/esm/models/operations/gates-api-actions-update.d.ts +99 -0
- package/dist/esm/models/operations/gates-api-actions-update.d.ts.map +1 -0
- package/dist/esm/models/operations/gates-api-actions-update.js +95 -0
- package/dist/esm/models/operations/gates-api-actions-update.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +9 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +9 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/recovery-exchange.d.ts +114 -0
- package/dist/esm/models/operations/recovery-exchange.d.ts.map +1 -0
- package/dist/esm/models/operations/recovery-exchange.js +118 -0
- package/dist/esm/models/operations/recovery-exchange.js.map +1 -0
- package/dist/esm/models/operations/recovery-other-route.d.ts +86 -0
- package/dist/esm/models/operations/recovery-other-route.d.ts.map +1 -0
- package/dist/esm/models/operations/recovery-other-route.js +99 -0
- package/dist/esm/models/operations/recovery-other-route.js.map +1 -0
- package/dist/esm/models/operations/request-passkey-complete.d.ts +1 -1
- package/dist/esm/models/operations/sdk-confirm-link.d.ts +130 -0
- package/dist/esm/models/operations/sdk-confirm-link.d.ts.map +1 -0
- package/dist/esm/models/operations/sdk-confirm-link.js +157 -0
- package/dist/esm/models/operations/sdk-confirm-link.js.map +1 -0
- package/dist/esm/models/operations/sdk-create-session.d.ts +1 -1
- package/dist/esm/models/operations/sdk-create-verification-link.d.ts +48 -2
- package/dist/esm/models/operations/sdk-create-verification-link.d.ts.map +1 -1
- package/dist/esm/models/operations/sdk-create-verification-link.js +33 -0
- package/dist/esm/models/operations/sdk-create-verification-link.js.map +1 -1
- package/dist/esm/models/operations/sdk-send-by-number.d.ts +124 -0
- package/dist/esm/models/operations/sdk-send-by-number.d.ts.map +1 -0
- package/dist/esm/models/operations/sdk-send-by-number.js +155 -0
- package/dist/esm/models/operations/sdk-send-by-number.js.map +1 -0
- package/dist/esm/models/operations/sdk-verify-resolution.d.ts +125 -0
- package/dist/esm/models/operations/sdk-verify-resolution.d.ts.map +1 -0
- package/dist/esm/models/operations/sdk-verify-resolution.js +136 -0
- package/dist/esm/models/operations/sdk-verify-resolution.js.map +1 -0
- package/dist/esm/models/operations/sdk-verify-token.d.ts +110 -1
- package/dist/esm/models/operations/sdk-verify-token.d.ts.map +1 -1
- package/dist/esm/models/operations/sdk-verify-token.js +93 -0
- package/dist/esm/models/operations/sdk-verify-token.js.map +1 -1
- package/dist/esm/models/operations/signin-confirm.d.ts +148 -0
- package/dist/esm/models/operations/signin-confirm.d.ts.map +1 -0
- package/dist/esm/models/operations/signin-confirm.js +156 -0
- package/dist/esm/models/operations/signin-confirm.js.map +1 -0
- package/dist/esm/models/operations/signin-request.d.ts +115 -0
- package/dist/esm/models/operations/signin-request.d.ts.map +1 -0
- package/dist/esm/models/operations/signin-request.js +128 -0
- package/dist/esm/models/operations/signin-request.js.map +1 -0
- package/dist/esm/models/operations/verification-get-status.d.ts +45 -5
- package/dist/esm/models/operations/verification-get-status.d.ts.map +1 -1
- package/dist/esm/models/operations/verification-get-status.js +36 -1
- package/dist/esm/models/operations/verification-get-status.js.map +1 -1
- package/dist/esm/models/passes-per-person.d.ts +1 -1
- package/dist/esm/sdk/actions.d.ts +8 -1
- package/dist/esm/sdk/actions.d.ts.map +1 -1
- package/dist/esm/sdk/actions.js +11 -1
- package/dist/esm/sdk/actions.js.map +1 -1
- package/dist/esm/sdk/census.d.ts +17 -1
- package/dist/esm/sdk/census.d.ts.map +1 -1
- package/dist/esm/sdk/census.js +23 -1
- package/dist/esm/sdk/census.js.map +1 -1
- package/dist/esm/sdk/gates-actions.d.ts +15 -1
- package/dist/esm/sdk/gates-actions.d.ts.map +1 -1
- package/dist/esm/sdk/gates-actions.js +21 -1
- package/dist/esm/sdk/gates-actions.js.map +1 -1
- package/dist/esm/sdk/recovery.d.ts +19 -0
- package/dist/esm/sdk/recovery.d.ts.map +1 -0
- package/dist/esm/sdk/recovery.js +28 -0
- package/dist/esm/sdk/recovery.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +8 -2
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +14 -4
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/dist/esm/sdk/sign-in.d.ts +19 -0
- package/dist/esm/sdk/sign-in.d.ts.map +1 -0
- package/dist/esm/sdk/sign-in.js +28 -0
- package/dist/esm/sdk/sign-in.js.map +1 -0
- package/dist/esm/sdk/verification.d.ts +1 -1
- package/dist/esm/sdk/verification.js +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/actions-propose-action.ts +1 -1
- package/src/funcs/actions-verify-resolution.ts +192 -0
- package/src/funcs/census-confirm-link.ts +171 -0
- package/src/funcs/census-create-verification-link.ts +2 -0
- package/src/funcs/census-send-by-number.ts +180 -0
- package/src/funcs/census-verify-token.ts +1 -1
- package/src/funcs/gates-actions-request-cancel.ts +187 -0
- package/src/funcs/gates-actions-request-status.ts +1 -0
- package/src/funcs/gates-actions-request.ts +1 -1
- package/src/funcs/gates-actions-update.ts +185 -0
- package/src/funcs/recovery-exchange.ts +184 -0
- package/src/funcs/recovery-other-route.ts +184 -0
- package/src/funcs/sign-in-confirm.ts +184 -0
- package/src/funcs/sign-in-request.ts +184 -0
- package/src/funcs/verification-get-status.ts +7 -2
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/bot-shield-action.ts +79 -0
- package/src/models/error-body.ts +10 -1
- package/src/models/gate-unavailable-event.ts +218 -0
- package/src/models/gates-api-error.ts +16 -0
- package/src/models/index.ts +1 -0
- package/src/models/operations/actions-propose.ts +37 -1
- package/src/models/operations/gates-api-actions-create.ts +15 -1
- package/src/models/operations/gates-api-actions-list.ts +1 -1
- package/src/models/operations/gates-api-actions-request-cancel.ts +339 -0
- package/src/models/operations/gates-api-actions-request-status.ts +7 -0
- package/src/models/operations/gates-api-actions-request.ts +83 -6
- package/src/models/operations/gates-api-actions-set-state.ts +1 -1
- package/src/models/operations/gates-api-actions-update.ts +281 -0
- package/src/models/operations/index.ts +9 -0
- package/src/models/operations/recovery-exchange.ts +308 -0
- package/src/models/operations/recovery-other-route.ts +262 -0
- package/src/models/operations/request-passkey-complete.ts +1 -1
- package/src/models/operations/sdk-confirm-link.ts +380 -0
- package/src/models/operations/sdk-create-session.ts +1 -1
- package/src/models/operations/sdk-create-verification-link.ts +78 -2
- package/src/models/operations/sdk-send-by-number.ts +372 -0
- package/src/models/operations/sdk-verify-resolution.ts +341 -0
- package/src/models/operations/sdk-verify-token.ts +214 -1
- package/src/models/operations/signin-confirm.ts +383 -0
- package/src/models/operations/signin-request.ts +319 -0
- package/src/models/operations/verification-get-status.ts +76 -5
- package/src/models/passes-per-person.ts +1 -1
- package/src/sdk/actions.ts +21 -1
- package/src/sdk/census.ts +43 -1
- package/src/sdk/gates-actions.ts +41 -1
- package/src/sdk/recovery.ts +49 -0
- package/src/sdk/sdk.ts +17 -5
- package/src/sdk/sign-in.ts +49 -0
- package/src/sdk/verification.ts +1 -1
|
@@ -19,10 +19,14 @@ export type VerificationGetStatusSecurity = {
|
|
|
19
19
|
|
|
20
20
|
export type VerificationGetStatusRequest = {
|
|
21
21
|
requestId: string;
|
|
22
|
+
/**
|
|
23
|
+
* 4.0: the `read_secret` create-verification-link returned for a request started with your site key. Without it such a request's `verification_token` / `signed_token` are never returned. A request your server started reads them with your secret key (`Authorization: Bearer bs_…`) instead. A passkey sign-in's answer is never returned here (use signin/confirm).
|
|
24
|
+
*/
|
|
25
|
+
xBotShieldRequestSecret?: string | undefined;
|
|
22
26
|
};
|
|
23
27
|
|
|
24
28
|
/**
|
|
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`.
|
|
29
|
+
* `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
30
|
*/
|
|
27
31
|
export const VerificationGetStatusStatus = {
|
|
28
32
|
Pending: "pending",
|
|
@@ -30,11 +34,12 @@ export const VerificationGetStatusStatus = {
|
|
|
30
34
|
Pass: "pass",
|
|
31
35
|
Expired: "expired",
|
|
32
36
|
Failed: "failed",
|
|
37
|
+
Cancelled: "cancelled",
|
|
33
38
|
NotFound: "not_found",
|
|
34
39
|
Error: "error",
|
|
35
40
|
} as const;
|
|
36
41
|
/**
|
|
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`.
|
|
42
|
+
* `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
43
|
*/
|
|
39
44
|
export type VerificationGetStatusStatus = OpenEnum<
|
|
40
45
|
typeof VerificationGetStatusStatus
|
|
@@ -121,7 +126,7 @@ export type Gate = {
|
|
|
121
126
|
linked?: boolean | null | undefined;
|
|
122
127
|
signedUpRequired?: boolean | undefined;
|
|
123
128
|
/**
|
|
124
|
-
* Passes per
|
|
129
|
+
* Passes per BotShield ID. Null = as often as they like.
|
|
125
130
|
*/
|
|
126
131
|
perPerson?: models.PassesPerPerson | null | undefined;
|
|
127
132
|
/**
|
|
@@ -166,10 +171,24 @@ export type VerificationGetStatusGateType = OpenEnum<
|
|
|
166
171
|
typeof VerificationGetStatusGateType
|
|
167
172
|
>;
|
|
168
173
|
|
|
174
|
+
/**
|
|
175
|
+
* 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.
|
|
176
|
+
*/
|
|
177
|
+
export const LinkState = {
|
|
178
|
+
Pending: "pending",
|
|
179
|
+
Live: "live",
|
|
180
|
+
Expired: "expired",
|
|
181
|
+
Refused: "refused",
|
|
182
|
+
} as const;
|
|
183
|
+
/**
|
|
184
|
+
* 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.
|
|
185
|
+
*/
|
|
186
|
+
export type LinkState = OpenEnum<typeof LinkState>;
|
|
187
|
+
|
|
169
188
|
export type VerificationGetStatusData = {
|
|
170
189
|
found?: boolean | undefined;
|
|
171
190
|
/**
|
|
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`.
|
|
191
|
+
* `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
192
|
*/
|
|
174
193
|
status?: VerificationGetStatusStatus | undefined;
|
|
175
194
|
requestId?: string | undefined;
|
|
@@ -199,7 +218,7 @@ export type VerificationGetStatusData = {
|
|
|
199
218
|
*/
|
|
200
219
|
error?: models.ErrorBody | undefined;
|
|
201
220
|
/**
|
|
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.
|
|
221
|
+
* 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
222
|
*/
|
|
204
223
|
reason?: string | null | undefined;
|
|
205
224
|
/**
|
|
@@ -250,6 +269,19 @@ export type VerificationGetStatusData = {
|
|
|
250
269
|
* Age Gate only, once completed: where the age answer came from.
|
|
251
270
|
*/
|
|
252
271
|
ageSource?: string | null | undefined;
|
|
272
|
+
/**
|
|
273
|
+
* 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.
|
|
274
|
+
*/
|
|
275
|
+
linkState?: LinkState | null | undefined;
|
|
276
|
+
/**
|
|
277
|
+
* 4.0: when a pending link expires (24 hours after the tap). Null unless `link_state` is `pending`.
|
|
278
|
+
*/
|
|
279
|
+
linkExpiresAt?: Date | null | undefined;
|
|
280
|
+
/**
|
|
281
|
+
* 4.0: `link_pending` while the link waits for your server.
|
|
282
|
+
*/
|
|
283
|
+
linkCode?: string | undefined;
|
|
284
|
+
linkMessage?: string | undefined;
|
|
253
285
|
};
|
|
254
286
|
|
|
255
287
|
/**
|
|
@@ -310,14 +342,17 @@ export const VerificationGetStatusRequest$inboundSchema: z.ZodType<
|
|
|
310
342
|
unknown
|
|
311
343
|
> = z.object({
|
|
312
344
|
request_id: types.string(),
|
|
345
|
+
"X-BotShield-Request-Secret": types.optional(types.string()),
|
|
313
346
|
}).transform((v) => {
|
|
314
347
|
return remap$(v, {
|
|
315
348
|
"request_id": "requestId",
|
|
349
|
+
"X-BotShield-Request-Secret": "xBotShieldRequestSecret",
|
|
316
350
|
});
|
|
317
351
|
});
|
|
318
352
|
/** @internal */
|
|
319
353
|
export type VerificationGetStatusRequest$Outbound = {
|
|
320
354
|
request_id: string;
|
|
355
|
+
"X-BotShield-Request-Secret"?: string | undefined;
|
|
321
356
|
};
|
|
322
357
|
|
|
323
358
|
/** @internal */
|
|
@@ -327,9 +362,11 @@ export const VerificationGetStatusRequest$outboundSchema: z.ZodType<
|
|
|
327
362
|
VerificationGetStatusRequest
|
|
328
363
|
> = z.object({
|
|
329
364
|
requestId: z.string(),
|
|
365
|
+
xBotShieldRequestSecret: z.string().optional(),
|
|
330
366
|
}).transform((v) => {
|
|
331
367
|
return remap$(v, {
|
|
332
368
|
requestId: "request_id",
|
|
369
|
+
xBotShieldRequestSecret: "X-BotShield-Request-Secret",
|
|
333
370
|
});
|
|
334
371
|
});
|
|
335
372
|
|
|
@@ -622,6 +659,19 @@ export const VerificationGetStatusGateType$outboundSchema: z.ZodType<
|
|
|
622
659
|
VerificationGetStatusGateType
|
|
623
660
|
> = openEnums.outboundSchema(VerificationGetStatusGateType);
|
|
624
661
|
|
|
662
|
+
/** @internal */
|
|
663
|
+
export const LinkState$inboundSchema: z.ZodType<
|
|
664
|
+
LinkState,
|
|
665
|
+
z.ZodTypeDef,
|
|
666
|
+
unknown
|
|
667
|
+
> = openEnums.inboundSchema(LinkState);
|
|
668
|
+
/** @internal */
|
|
669
|
+
export const LinkState$outboundSchema: z.ZodType<
|
|
670
|
+
string,
|
|
671
|
+
z.ZodTypeDef,
|
|
672
|
+
LinkState
|
|
673
|
+
> = openEnums.outboundSchema(LinkState);
|
|
674
|
+
|
|
625
675
|
/** @internal */
|
|
626
676
|
export const VerificationGetStatusData$inboundSchema: z.ZodType<
|
|
627
677
|
VerificationGetStatusData,
|
|
@@ -658,6 +708,10 @@ export const VerificationGetStatusData$inboundSchema: z.ZodType<
|
|
|
658
708
|
age_threshold: z.nullable(types.number()).optional(),
|
|
659
709
|
age_verdict: z.nullable(types.string()).optional(),
|
|
660
710
|
age_source: z.nullable(types.string()).optional(),
|
|
711
|
+
link_state: z.nullable(LinkState$inboundSchema).optional(),
|
|
712
|
+
link_expires_at: z.nullable(types.date()).optional(),
|
|
713
|
+
link_code: types.optional(types.string()),
|
|
714
|
+
link_message: types.optional(types.string()),
|
|
661
715
|
}).transform((v) => {
|
|
662
716
|
return remap$(v, {
|
|
663
717
|
"request_id": "requestId",
|
|
@@ -678,6 +732,10 @@ export const VerificationGetStatusData$inboundSchema: z.ZodType<
|
|
|
678
732
|
"age_threshold": "ageThreshold",
|
|
679
733
|
"age_verdict": "ageVerdict",
|
|
680
734
|
"age_source": "ageSource",
|
|
735
|
+
"link_state": "linkState",
|
|
736
|
+
"link_expires_at": "linkExpiresAt",
|
|
737
|
+
"link_code": "linkCode",
|
|
738
|
+
"link_message": "linkMessage",
|
|
681
739
|
});
|
|
682
740
|
});
|
|
683
741
|
/** @internal */
|
|
@@ -711,6 +769,10 @@ export type VerificationGetStatusData$Outbound = {
|
|
|
711
769
|
age_threshold?: number | null | undefined;
|
|
712
770
|
age_verdict?: string | null | undefined;
|
|
713
771
|
age_source?: string | null | undefined;
|
|
772
|
+
link_state?: string | null | undefined;
|
|
773
|
+
link_expires_at?: string | null | undefined;
|
|
774
|
+
link_code?: string | undefined;
|
|
775
|
+
link_message?: string | undefined;
|
|
714
776
|
};
|
|
715
777
|
|
|
716
778
|
/** @internal */
|
|
@@ -749,6 +811,11 @@ export const VerificationGetStatusData$outboundSchema: z.ZodType<
|
|
|
749
811
|
ageThreshold: z.nullable(z.number().int()).optional(),
|
|
750
812
|
ageVerdict: z.nullable(z.string()).optional(),
|
|
751
813
|
ageSource: z.nullable(z.string()).optional(),
|
|
814
|
+
linkState: z.nullable(LinkState$outboundSchema).optional(),
|
|
815
|
+
linkExpiresAt: z.nullable(z.date().transform(v => v.toISOString()))
|
|
816
|
+
.optional(),
|
|
817
|
+
linkCode: z.string().optional(),
|
|
818
|
+
linkMessage: z.string().optional(),
|
|
752
819
|
}).transform((v) => {
|
|
753
820
|
return remap$(v, {
|
|
754
821
|
requestId: "request_id",
|
|
@@ -769,6 +836,10 @@ export const VerificationGetStatusData$outboundSchema: z.ZodType<
|
|
|
769
836
|
ageThreshold: "age_threshold",
|
|
770
837
|
ageVerdict: "age_verdict",
|
|
771
838
|
ageSource: "age_source",
|
|
839
|
+
linkState: "link_state",
|
|
840
|
+
linkExpiresAt: "link_expires_at",
|
|
841
|
+
linkCode: "link_code",
|
|
842
|
+
linkMessage: "link_message",
|
|
772
843
|
});
|
|
773
844
|
});
|
|
774
845
|
|
|
@@ -19,7 +19,7 @@ export const Window = {
|
|
|
19
19
|
export type Window = OpenEnum<typeof Window>;
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
* Passes per
|
|
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;
|
package/src/sdk/actions.ts
CHANGED
|
@@ -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. 4.0: the check needs your secret key (`Authorization: Bearer bs_…`); without it the answer is `valid: false, code: secret_key_required` and the token is not spent. Send `expected_request_id` (the request your server made) and a token for any other request is refused (`code: request_mismatch`), unspent. A passkey sign-in's token is refused here: redeem a sign-in with signin/confirm.
|
|
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
|
}
|
package/src/sdk/gates-actions.ts
CHANGED
|
@@ -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
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { recoveryExchange } from "../funcs/recovery-exchange.js";
|
|
6
|
+
import { recoveryOtherRoute } from "../funcs/recovery-other-route.js";
|
|
7
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
8
|
+
import * as operations from "../models/operations/index.js";
|
|
9
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
10
|
+
|
|
11
|
+
export class Recovery extends ClientSDK {
|
|
12
|
+
/**
|
|
13
|
+
* Redeem a recovery code
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* Your landing page received `?botshield_recovery_code=…` from the BotShield app. Your SERVER sends the code, your secret key, and the secret it set in that browser's cookie before the tap (the button carried its challenge: SHA-256 of the secret, base64url). BotShield answers only when the secret matches. The first call destroys the code whether or not it matched, so a landing page with no secret must still call this. A second call, a call after 2 minutes, a call with another company's key or the wrong secret all read the same: `recovery_code_invalid`. On success, sign the customer in to the account named by `handle` (the per-company handle given when the account was verified, as on `account.secured`); BotShield tells the person and sends `account.recovered` to your webhook endpoints.
|
|
17
|
+
*/
|
|
18
|
+
async exchange(
|
|
19
|
+
security: operations.RecoveryExchangeSecurity,
|
|
20
|
+
request: operations.RecoveryExchangeRequest,
|
|
21
|
+
options?: RequestOptions,
|
|
22
|
+
): Promise<operations.RecoveryExchangeResponse> {
|
|
23
|
+
return unwrapAsync(recoveryExchange(
|
|
24
|
+
this,
|
|
25
|
+
security,
|
|
26
|
+
request,
|
|
27
|
+
options,
|
|
28
|
+
));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Report another sign-in reset
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
* Tell BotShield that your other way to reset sign-in (a link by email, a code by text) was started for a verified account, by its handle. BotShield tells the person ("<Company> sign-in reset by email · It works from <day>. Not you? Open BotShield."), at most once per account in 6 hours. The answer is the same whether or not the handle is a live verified account.
|
|
36
|
+
*/
|
|
37
|
+
async otherRoute(
|
|
38
|
+
security: operations.RecoveryOtherRouteSecurity,
|
|
39
|
+
request: operations.RecoveryOtherRouteRequest,
|
|
40
|
+
options?: RequestOptions,
|
|
41
|
+
): Promise<operations.RecoveryOtherRouteResponse> {
|
|
42
|
+
return unwrapAsync(recoveryOtherRoute(
|
|
43
|
+
this,
|
|
44
|
+
security,
|
|
45
|
+
request,
|
|
46
|
+
options,
|
|
47
|
+
));
|
|
48
|
+
}
|
|
49
|
+
}
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -7,7 +7,9 @@ import { Actions } from "./actions.js";
|
|
|
7
7
|
import { Census } from "./census.js";
|
|
8
8
|
import { Gates } from "./gates.js";
|
|
9
9
|
import { InlinePasskey } from "./inline-passkey.js";
|
|
10
|
+
import { Recovery } from "./recovery.js";
|
|
10
11
|
import { SecuredAccounts } from "./secured-accounts.js";
|
|
12
|
+
import { SignIn } from "./sign-in.js";
|
|
11
13
|
import { Verification } from "./verification.js";
|
|
12
14
|
|
|
13
15
|
export class BotShield extends ClientSDK {
|
|
@@ -16,16 +18,16 @@ export class BotShield extends ClientSDK {
|
|
|
16
18
|
return (this._census ??= new Census(this._options));
|
|
17
19
|
}
|
|
18
20
|
|
|
19
|
-
private _verification?: Verification;
|
|
20
|
-
get verification(): Verification {
|
|
21
|
-
return (this._verification ??= new Verification(this._options));
|
|
22
|
-
}
|
|
23
|
-
|
|
24
21
|
private _actions?: Actions;
|
|
25
22
|
get actions(): Actions {
|
|
26
23
|
return (this._actions ??= new Actions(this._options));
|
|
27
24
|
}
|
|
28
25
|
|
|
26
|
+
private _verification?: Verification;
|
|
27
|
+
get verification(): Verification {
|
|
28
|
+
return (this._verification ??= new Verification(this._options));
|
|
29
|
+
}
|
|
30
|
+
|
|
29
31
|
private _securedAccounts?: SecuredAccounts;
|
|
30
32
|
get securedAccounts(): SecuredAccounts {
|
|
31
33
|
return (this._securedAccounts ??= new SecuredAccounts(this._options));
|
|
@@ -40,4 +42,14 @@ export class BotShield extends ClientSDK {
|
|
|
40
42
|
get inlinePasskey(): InlinePasskey {
|
|
41
43
|
return (this._inlinePasskey ??= new InlinePasskey(this._options));
|
|
42
44
|
}
|
|
45
|
+
|
|
46
|
+
private _recovery?: Recovery;
|
|
47
|
+
get recovery(): Recovery {
|
|
48
|
+
return (this._recovery ??= new Recovery(this._options));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
private _signIn?: SignIn;
|
|
52
|
+
get signIn(): SignIn {
|
|
53
|
+
return (this._signIn ??= new SignIn(this._options));
|
|
54
|
+
}
|
|
43
55
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { signInConfirm } from "../funcs/sign-in-confirm.js";
|
|
6
|
+
import { signInRequest } from "../funcs/sign-in-request.js";
|
|
7
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
8
|
+
import * as operations from "../models/operations/index.js";
|
|
9
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
10
|
+
|
|
11
|
+
export class SignIn extends ClientSDK {
|
|
12
|
+
/**
|
|
13
|
+
* Ask for a passkey sign-in
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* Your SERVER asks for a sign-in for ONE of your accounts, after the password has passed or after the customer named their account. Hand the page only `request_id`. Answers only for an account that is already an active verified account here; otherwise `not_verified`, nothing is started, and you do not show the button. It never links an account. A paused account is refused (`account_paused`). The request lives 2 minutes. Needs a live Sign-on Action with your sign-in page's address (BotShield Console › Verified Accounts › BotShield Actions).
|
|
17
|
+
*/
|
|
18
|
+
async request(
|
|
19
|
+
security: operations.SigninRequestSecurity,
|
|
20
|
+
request: operations.SigninRequestRequest,
|
|
21
|
+
options?: RequestOptions,
|
|
22
|
+
): Promise<operations.SigninRequestResponse> {
|
|
23
|
+
return unwrapAsync(signInRequest(
|
|
24
|
+
this,
|
|
25
|
+
security,
|
|
26
|
+
request,
|
|
27
|
+
options,
|
|
28
|
+
));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Redeem a passkey sign-in
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
* Your SERVER redeems a sign-in with your secret key and the `request_id` IT made for this attempt: once, within 2 minutes of the passkey. The page's message from the frame is only a cue to call this. Send `partner_user_ref` to have a sign-in for any other account refused. The sign-in's token is not checked with verify-token (which refuses it), and verification/status never returns it.
|
|
36
|
+
*/
|
|
37
|
+
async confirm(
|
|
38
|
+
security: operations.SigninConfirmSecurity,
|
|
39
|
+
request: operations.SigninConfirmRequest,
|
|
40
|
+
options?: RequestOptions,
|
|
41
|
+
): Promise<operations.SigninConfirmResponse> {
|
|
42
|
+
return unwrapAsync(signInConfirm(
|
|
43
|
+
this,
|
|
44
|
+
security,
|
|
45
|
+
request,
|
|
46
|
+
options,
|
|
47
|
+
));
|
|
48
|
+
}
|
|
49
|
+
}
|
package/src/sdk/verification.ts
CHANGED
|
@@ -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"`. 4.0: knowing the request id is not enough to read the finished tokens. A request started with a site key returns them only with its `read_secret` (`X-BotShield-Request-Secret`); a request your server started, only to your secret key. A passkey sign-in's tokens are never returned here.
|
|
16
16
|
*/
|
|
17
17
|
async getStatus(
|
|
18
18
|
security: operations.VerificationGetStatusSecurity,
|