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
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { BotShieldCore } from "../core.js";
|
|
6
|
+
import { encodeJSON } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { resolveSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import { BotShieldError } from "../models/errors/bot-shield-error.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/http-client-errors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { ResponseValidationError } from "../models/errors/response-validation-error.js";
|
|
24
|
+
import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
26
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Ask for a passkey sign-in
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* 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).
|
|
34
|
+
*/
|
|
35
|
+
export function signInRequest(
|
|
36
|
+
client: BotShieldCore,
|
|
37
|
+
security: operations.SigninRequestSecurity,
|
|
38
|
+
request: operations.SigninRequestRequest,
|
|
39
|
+
options?: RequestOptions,
|
|
40
|
+
): APIPromise<
|
|
41
|
+
Result<
|
|
42
|
+
operations.SigninRequestResponse,
|
|
43
|
+
| errors.InvalidInputError
|
|
44
|
+
| errors.ErrorResponse
|
|
45
|
+
| BotShieldError
|
|
46
|
+
| ResponseValidationError
|
|
47
|
+
| ConnectionError
|
|
48
|
+
| RequestAbortedError
|
|
49
|
+
| RequestTimeoutError
|
|
50
|
+
| InvalidRequestError
|
|
51
|
+
| UnexpectedClientError
|
|
52
|
+
| SDKValidationError
|
|
53
|
+
>
|
|
54
|
+
> {
|
|
55
|
+
return new APIPromise($do(
|
|
56
|
+
client,
|
|
57
|
+
security,
|
|
58
|
+
request,
|
|
59
|
+
options,
|
|
60
|
+
));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
async function $do(
|
|
64
|
+
client: BotShieldCore,
|
|
65
|
+
security: operations.SigninRequestSecurity,
|
|
66
|
+
request: operations.SigninRequestRequest,
|
|
67
|
+
options?: RequestOptions,
|
|
68
|
+
): Promise<
|
|
69
|
+
[
|
|
70
|
+
Result<
|
|
71
|
+
operations.SigninRequestResponse,
|
|
72
|
+
| errors.InvalidInputError
|
|
73
|
+
| errors.ErrorResponse
|
|
74
|
+
| BotShieldError
|
|
75
|
+
| ResponseValidationError
|
|
76
|
+
| ConnectionError
|
|
77
|
+
| RequestAbortedError
|
|
78
|
+
| RequestTimeoutError
|
|
79
|
+
| InvalidRequestError
|
|
80
|
+
| UnexpectedClientError
|
|
81
|
+
| SDKValidationError
|
|
82
|
+
>,
|
|
83
|
+
APICall,
|
|
84
|
+
]
|
|
85
|
+
> {
|
|
86
|
+
const parsed = safeParse(
|
|
87
|
+
request,
|
|
88
|
+
(value) => operations.SigninRequestRequest$outboundSchema.parse(value),
|
|
89
|
+
"Input validation failed",
|
|
90
|
+
);
|
|
91
|
+
if (!parsed.ok) {
|
|
92
|
+
return [parsed, { status: "invalid" }];
|
|
93
|
+
}
|
|
94
|
+
const payload = parsed.value;
|
|
95
|
+
const body = encodeJSON("body", payload, { explode: true });
|
|
96
|
+
|
|
97
|
+
const path = pathToFunc("/signin/request")();
|
|
98
|
+
|
|
99
|
+
const headers = new Headers(compactMap({
|
|
100
|
+
"Content-Type": "application/json",
|
|
101
|
+
Accept: "application/json",
|
|
102
|
+
}));
|
|
103
|
+
|
|
104
|
+
const requestSecurity = resolveSecurity(
|
|
105
|
+
[
|
|
106
|
+
{
|
|
107
|
+
fieldName: "Authorization",
|
|
108
|
+
type: "apiKey:header",
|
|
109
|
+
value: security?.apiKeyAuth,
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
const context = {
|
|
115
|
+
options: client._options,
|
|
116
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
117
|
+
operationID: "SigninRequest",
|
|
118
|
+
oAuth2Scopes: null,
|
|
119
|
+
|
|
120
|
+
resolvedSecurity: requestSecurity,
|
|
121
|
+
|
|
122
|
+
securitySource: security,
|
|
123
|
+
retryConfig: options?.retries
|
|
124
|
+
|| client._options.retryConfig
|
|
125
|
+
|| { strategy: "none" },
|
|
126
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const requestRes = client._createRequest(context, {
|
|
130
|
+
security: requestSecurity,
|
|
131
|
+
method: "POST",
|
|
132
|
+
baseURL: options?.serverURL,
|
|
133
|
+
path: path,
|
|
134
|
+
headers: headers,
|
|
135
|
+
body: body,
|
|
136
|
+
userAgent: client._options.userAgent,
|
|
137
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
138
|
+
}, options);
|
|
139
|
+
if (!requestRes.ok) {
|
|
140
|
+
return [requestRes, { status: "invalid" }];
|
|
141
|
+
}
|
|
142
|
+
const req = requestRes.value;
|
|
143
|
+
|
|
144
|
+
const doResult = await client._do(req, {
|
|
145
|
+
context,
|
|
146
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
147
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
148
|
+
retryConfig: context.retryConfig,
|
|
149
|
+
retryCodes: context.retryCodes,
|
|
150
|
+
});
|
|
151
|
+
if (!doResult.ok) {
|
|
152
|
+
return [doResult, { status: "request-error", request: req }];
|
|
153
|
+
}
|
|
154
|
+
const response = doResult.value;
|
|
155
|
+
|
|
156
|
+
const responseFields = {
|
|
157
|
+
HttpMeta: { Response: response, Request: req },
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
const [result] = await M.match<
|
|
161
|
+
operations.SigninRequestResponse,
|
|
162
|
+
| errors.InvalidInputError
|
|
163
|
+
| errors.ErrorResponse
|
|
164
|
+
| BotShieldError
|
|
165
|
+
| ResponseValidationError
|
|
166
|
+
| ConnectionError
|
|
167
|
+
| RequestAbortedError
|
|
168
|
+
| RequestTimeoutError
|
|
169
|
+
| InvalidRequestError
|
|
170
|
+
| UnexpectedClientError
|
|
171
|
+
| SDKValidationError
|
|
172
|
+
>(
|
|
173
|
+
M.json(200, operations.SigninRequestResponse$inboundSchema),
|
|
174
|
+
M.jsonErr(400, errors.InvalidInputError$inboundSchema),
|
|
175
|
+
M.jsonErr(500, errors.ErrorResponse$inboundSchema),
|
|
176
|
+
M.fail("4XX"),
|
|
177
|
+
M.fail("5XX"),
|
|
178
|
+
)(response, req, { extraFields: responseFields });
|
|
179
|
+
if (!result.ok) {
|
|
180
|
+
return [result, { status: "complete", request: req, response }];
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
return [result, { status: "complete", request: req, response }];
|
|
184
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { BotShieldCore } from "../core.js";
|
|
6
|
-
import { encodeFormQuery } from "../lib/encodings.js";
|
|
6
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
7
7
|
import { matchStatusCode } from "../lib/http.js";
|
|
8
8
|
import * as M from "../lib/matchers.js";
|
|
9
9
|
import { compactMap } from "../lib/primitives.js";
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Check verification status
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* 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.
|
|
33
|
+
* 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.
|
|
34
34
|
*/
|
|
35
35
|
export function verificationGetStatus(
|
|
36
36
|
client: BotShieldCore,
|
|
@@ -103,6 +103,11 @@ async function $do(
|
|
|
103
103
|
|
|
104
104
|
const headers = new Headers(compactMap({
|
|
105
105
|
Accept: "application/json",
|
|
106
|
+
"X-BotShield-Request-Secret": encodeSimple(
|
|
107
|
+
"X-BotShield-Request-Secret",
|
|
108
|
+
payload["X-BotShield-Request-Secret"],
|
|
109
|
+
{ explode: false, charEncoding: "none" },
|
|
110
|
+
),
|
|
106
111
|
}));
|
|
107
112
|
|
|
108
113
|
const requestSecurity = resolveSecurity(
|
package/src/lib/config.ts
CHANGED
|
@@ -73,7 +73,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
73
73
|
export const SDK_METADATA = {
|
|
74
74
|
language: "typescript",
|
|
75
75
|
openapiDocVersion: "2.0.0",
|
|
76
|
-
sdkVersion: "
|
|
76
|
+
sdkVersion: "4.0.1",
|
|
77
77
|
genVersion: "2.934.1",
|
|
78
|
-
userAgent: "speakeasy-sdk/typescript
|
|
78
|
+
userAgent: "speakeasy-sdk/typescript 4.0.1 2.934.1 2.0.0 botshield-sdk",
|
|
79
79
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -31,6 +31,19 @@ export type BotShieldActionEnvironment = OpenEnum<
|
|
|
31
31
|
typeof BotShieldActionEnvironment
|
|
32
32
|
>;
|
|
33
33
|
|
|
34
|
+
/**
|
|
35
|
+
* 4.0: `action` (a BotShield Action), `recovery` (your one Recovery Action: only your customer starts it, from the Recover Account with BotShield button) or `signin` (your one Sign-on Action: only signin/request starts it). Recovery and Sign-on Actions are placed in the Console; no `act`, server ask, send by number or staff send reaches them (`action_is_recovery` / `action_is_signin`). `action` on an engine before 4.0.
|
|
36
|
+
*/
|
|
37
|
+
export const BotShieldActionKind = {
|
|
38
|
+
Action: "action",
|
|
39
|
+
Recovery: "recovery",
|
|
40
|
+
Signin: "signin",
|
|
41
|
+
} as const;
|
|
42
|
+
/**
|
|
43
|
+
* 4.0: `action` (a BotShield Action), `recovery` (your one Recovery Action: only your customer starts it, from the Recover Account with BotShield button) or `signin` (your one Sign-on Action: only signin/request starts it). Recovery and Sign-on Actions are placed in the Console; no `act`, server ask, send by number or staff send reaches them (`action_is_recovery` / `action_is_signin`). `action` on an engine before 4.0.
|
|
44
|
+
*/
|
|
45
|
+
export type BotShieldActionKind = OpenEnum<typeof BotShieldActionKind>;
|
|
46
|
+
|
|
34
47
|
/**
|
|
35
48
|
* A BotShield Action: one act on your own surface keyed to a passkey. Not a gate — no schedule, no levers — and it always stands on a verified account, so a tap runs the linking ceremony.
|
|
36
49
|
*/
|
|
@@ -55,6 +68,30 @@ export type BotShieldAction = {
|
|
|
55
68
|
environment: BotShieldActionEnvironment;
|
|
56
69
|
placedAt: Date;
|
|
57
70
|
turnedOffAt: Date | null;
|
|
71
|
+
/**
|
|
72
|
+
* Your support team can send this to a customer; its name is what the customer reads. Set with `staffCanSend` on create or update.
|
|
73
|
+
*/
|
|
74
|
+
staffCanSend?: boolean | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* 4.0: `action` (a BotShield Action), `recovery` (your one Recovery Action: only your customer starts it, from the Recover Account with BotShield button) or `signin` (your one Sign-on Action: only signin/request starts it). Recovery and Sign-on Actions are placed in the Console; no `act`, server ask, send by number or staff send reaches them (`action_is_recovery` / `action_is_signin`). `action` on an engine before 4.0.
|
|
77
|
+
*/
|
|
78
|
+
kind?: BotShieldActionKind | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* 4.0: on a Sign-on Action, whether BotShield's own QR may finish a sign-in (default off: your page's passkey only). Always false on other kinds.
|
|
81
|
+
*/
|
|
82
|
+
signinQr?: boolean | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* 4.0: a Recovery Action's new landing address while it waits to take effect (24 hours in Production; every admin is told). `where_url` is the address in effect until then.
|
|
85
|
+
*/
|
|
86
|
+
pendingWhereUrl?: string | null | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* 4.0: when `pending_where_url` takes effect.
|
|
89
|
+
*/
|
|
90
|
+
pendingWhereUrlAt?: Date | null | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* 4.0: high-value. It starts only from your customer's signed-in session (your server naming the account by your own reference); by phone number or by staff it is refused (`action_requires_signed_in`). Set with `highValue` on create or update.
|
|
93
|
+
*/
|
|
94
|
+
highValue?: boolean | undefined;
|
|
58
95
|
};
|
|
59
96
|
|
|
60
97
|
/** @internal */
|
|
@@ -83,6 +120,19 @@ export const BotShieldActionEnvironment$outboundSchema: z.ZodType<
|
|
|
83
120
|
BotShieldActionEnvironment
|
|
84
121
|
> = openEnums.outboundSchema(BotShieldActionEnvironment);
|
|
85
122
|
|
|
123
|
+
/** @internal */
|
|
124
|
+
export const BotShieldActionKind$inboundSchema: z.ZodType<
|
|
125
|
+
BotShieldActionKind,
|
|
126
|
+
z.ZodTypeDef,
|
|
127
|
+
unknown
|
|
128
|
+
> = openEnums.inboundSchema(BotShieldActionKind);
|
|
129
|
+
/** @internal */
|
|
130
|
+
export const BotShieldActionKind$outboundSchema: z.ZodType<
|
|
131
|
+
string,
|
|
132
|
+
z.ZodTypeDef,
|
|
133
|
+
BotShieldActionKind
|
|
134
|
+
> = openEnums.outboundSchema(BotShieldActionKind);
|
|
135
|
+
|
|
86
136
|
/** @internal */
|
|
87
137
|
export const BotShieldAction$inboundSchema: z.ZodType<
|
|
88
138
|
BotShieldAction,
|
|
@@ -97,12 +147,23 @@ export const BotShieldAction$inboundSchema: z.ZodType<
|
|
|
97
147
|
environment: BotShieldActionEnvironment$inboundSchema,
|
|
98
148
|
placed_at: types.date(),
|
|
99
149
|
turned_off_at: types.nullable(types.date()),
|
|
150
|
+
staff_can_send: types.optional(types.boolean()),
|
|
151
|
+
kind: types.optional(BotShieldActionKind$inboundSchema),
|
|
152
|
+
signin_qr: types.optional(types.boolean()),
|
|
153
|
+
pending_where_url: z.nullable(types.string()).optional(),
|
|
154
|
+
pending_where_url_at: z.nullable(types.date()).optional(),
|
|
155
|
+
high_value: types.optional(types.boolean()),
|
|
100
156
|
}).transform((v) => {
|
|
101
157
|
return remap$(v, {
|
|
102
158
|
"act_key": "actKey",
|
|
103
159
|
"where_url": "whereUrl",
|
|
104
160
|
"placed_at": "placedAt",
|
|
105
161
|
"turned_off_at": "turnedOffAt",
|
|
162
|
+
"staff_can_send": "staffCanSend",
|
|
163
|
+
"signin_qr": "signinQr",
|
|
164
|
+
"pending_where_url": "pendingWhereUrl",
|
|
165
|
+
"pending_where_url_at": "pendingWhereUrlAt",
|
|
166
|
+
"high_value": "highValue",
|
|
106
167
|
});
|
|
107
168
|
});
|
|
108
169
|
/** @internal */
|
|
@@ -115,6 +176,12 @@ export type BotShieldAction$Outbound = {
|
|
|
115
176
|
environment: string;
|
|
116
177
|
placed_at: string;
|
|
117
178
|
turned_off_at: string | null;
|
|
179
|
+
staff_can_send?: boolean | undefined;
|
|
180
|
+
kind?: string | undefined;
|
|
181
|
+
signin_qr?: boolean | undefined;
|
|
182
|
+
pending_where_url?: string | null | undefined;
|
|
183
|
+
pending_where_url_at?: string | null | undefined;
|
|
184
|
+
high_value?: boolean | undefined;
|
|
118
185
|
};
|
|
119
186
|
|
|
120
187
|
/** @internal */
|
|
@@ -131,12 +198,24 @@ export const BotShieldAction$outboundSchema: z.ZodType<
|
|
|
131
198
|
environment: BotShieldActionEnvironment$outboundSchema,
|
|
132
199
|
placedAt: z.date().transform(v => v.toISOString()),
|
|
133
200
|
turnedOffAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
201
|
+
staffCanSend: z.boolean().optional(),
|
|
202
|
+
kind: BotShieldActionKind$outboundSchema.optional(),
|
|
203
|
+
signinQr: z.boolean().optional(),
|
|
204
|
+
pendingWhereUrl: z.nullable(z.string()).optional(),
|
|
205
|
+
pendingWhereUrlAt: z.nullable(z.date().transform(v => v.toISOString()))
|
|
206
|
+
.optional(),
|
|
207
|
+
highValue: z.boolean().optional(),
|
|
134
208
|
}).transform((v) => {
|
|
135
209
|
return remap$(v, {
|
|
136
210
|
actKey: "act_key",
|
|
137
211
|
whereUrl: "where_url",
|
|
138
212
|
placedAt: "placed_at",
|
|
139
213
|
turnedOffAt: "turned_off_at",
|
|
214
|
+
staffCanSend: "staff_can_send",
|
|
215
|
+
signinQr: "signin_qr",
|
|
216
|
+
pendingWhereUrl: "pending_where_url",
|
|
217
|
+
pendingWhereUrlAt: "pending_where_url_at",
|
|
218
|
+
highValue: "high_value",
|
|
140
219
|
});
|
|
141
220
|
});
|
|
142
221
|
|
package/src/models/error-body.ts
CHANGED
|
@@ -36,7 +36,7 @@ export type ErrorBody = {
|
|
|
36
36
|
message: string;
|
|
37
37
|
statusCode: number;
|
|
38
38
|
/**
|
|
39
|
-
* `ttl_below_floor`, `ttl_above_ceiling`, `trust_layer_rejected`, `trust_layer_unavailable`, `gate_required`, `alias_retired`, `RATE_LIMITED`, `inline_not_for_age_gate`.
|
|
39
|
+
* `ttl_below_floor`, `ttl_above_ceiling`, `trust_layer_rejected`, `trust_layer_unavailable`, `gate_required`, `alias_retired`, `RATE_LIMITED`, `inline_not_for_age_gate`, `act_label_has_link`, and in 4.0 `link_requires_server_session`, `account_override_refused`, `action_is_recovery`, `action_is_signin`, `invalid_key`, `recovery_code_invalid`, `handle_invalid`, `signin_not_set_up`, `not_verified`, `account_paused`, `signin_unknown`, `signin_pending`, `signin_refused`, `signin_expired`, `signin_used`, `signin_wrong_account`, `unavailable`.
|
|
40
40
|
*/
|
|
41
41
|
code?: string | undefined;
|
|
42
42
|
minTtlSeconds?: number | undefined;
|
|
@@ -53,6 +53,10 @@ export type ErrorBody = {
|
|
|
53
53
|
* inline_not_for_age_gate only: the app hand-off for this request.
|
|
54
54
|
*/
|
|
55
55
|
url?: string | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* On a 429 limit (`too_many_open_requests`, `daily_request_limit`, `send_rate_limited`, `unanswered_limit_reached`): seconds until a retry can succeed.
|
|
58
|
+
*/
|
|
59
|
+
retryAfterSeconds?: number | undefined;
|
|
56
60
|
};
|
|
57
61
|
|
|
58
62
|
/** @internal */
|
|
@@ -161,6 +165,7 @@ export const ErrorBody$inboundSchema: z.ZodType<
|
|
|
161
165
|
limits: types.optional(z.lazy(() => Limits$inboundSchema)),
|
|
162
166
|
upgrade_url: types.optional(types.string()),
|
|
163
167
|
url: types.optional(types.string()),
|
|
168
|
+
retry_after_seconds: types.optional(types.number()),
|
|
164
169
|
}).transform((v) => {
|
|
165
170
|
return remap$(v, {
|
|
166
171
|
"min_ttl_seconds": "minTtlSeconds",
|
|
@@ -168,6 +173,7 @@ export const ErrorBody$inboundSchema: z.ZodType<
|
|
|
168
173
|
"next_step": "nextStep",
|
|
169
174
|
"retry_in": "retryIn",
|
|
170
175
|
"upgrade_url": "upgradeUrl",
|
|
176
|
+
"retry_after_seconds": "retryAfterSeconds",
|
|
171
177
|
});
|
|
172
178
|
});
|
|
173
179
|
/** @internal */
|
|
@@ -186,6 +192,7 @@ export type ErrorBody$Outbound = {
|
|
|
186
192
|
limits?: Limits$Outbound | undefined;
|
|
187
193
|
upgrade_url?: string | undefined;
|
|
188
194
|
url?: string | undefined;
|
|
195
|
+
retry_after_seconds?: number | undefined;
|
|
189
196
|
};
|
|
190
197
|
|
|
191
198
|
/** @internal */
|
|
@@ -208,6 +215,7 @@ export const ErrorBody$outboundSchema: z.ZodType<
|
|
|
208
215
|
limits: z.lazy(() => Limits$outboundSchema).optional(),
|
|
209
216
|
upgradeUrl: z.string().optional(),
|
|
210
217
|
url: z.string().optional(),
|
|
218
|
+
retryAfterSeconds: z.number().int().optional(),
|
|
211
219
|
}).transform((v) => {
|
|
212
220
|
return remap$(v, {
|
|
213
221
|
minTtlSeconds: "min_ttl_seconds",
|
|
@@ -215,6 +223,7 @@ export const ErrorBody$outboundSchema: z.ZodType<
|
|
|
215
223
|
nextStep: "next_step",
|
|
216
224
|
retryIn: "retry_in",
|
|
217
225
|
upgradeUrl: "upgrade_url",
|
|
226
|
+
retryAfterSeconds: "retry_after_seconds",
|
|
218
227
|
});
|
|
219
228
|
});
|
|
220
229
|
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
|
+
import * as types from "../types/primitives.js";
|
|
11
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
12
|
+
|
|
13
|
+
export const GateUnavailableEventType = {
|
|
14
|
+
GateUnavailable: "gate.unavailable",
|
|
15
|
+
} as const;
|
|
16
|
+
export type GateUnavailableEventType = ClosedEnum<
|
|
17
|
+
typeof GateUnavailableEventType
|
|
18
|
+
>;
|
|
19
|
+
|
|
20
|
+
export const GateUnavailableEventVerdict = {
|
|
21
|
+
Unavailable: "unavailable",
|
|
22
|
+
} as const;
|
|
23
|
+
export type GateUnavailableEventVerdict = ClosedEnum<
|
|
24
|
+
typeof GateUnavailableEventVerdict
|
|
25
|
+
>;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The frozen reason. A policy refusal or a replaced check keeps `internal_error`; read `failure_code` for the cause.
|
|
29
|
+
*/
|
|
30
|
+
export const GateUnavailableEventReason = {
|
|
31
|
+
UserDenied: "user_denied",
|
|
32
|
+
DeviceLockRequired: "device_lock_required",
|
|
33
|
+
InternalError: "internal_error",
|
|
34
|
+
PlatformDeclined: "platform_declined",
|
|
35
|
+
} as const;
|
|
36
|
+
/**
|
|
37
|
+
* The frozen reason. A policy refusal or a replaced check keeps `internal_error`; read `failure_code` for the cause.
|
|
38
|
+
*/
|
|
39
|
+
export type GateUnavailableEventReason = ClosedEnum<
|
|
40
|
+
typeof GateUnavailableEventReason
|
|
41
|
+
>;
|
|
42
|
+
|
|
43
|
+
export const GateUnavailableEventEnvironment = {
|
|
44
|
+
Development: "development",
|
|
45
|
+
Production: "production",
|
|
46
|
+
} as const;
|
|
47
|
+
export type GateUnavailableEventEnvironment = ClosedEnum<
|
|
48
|
+
typeof GateUnavailableEventEnvironment
|
|
49
|
+
>;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Webhook `gate.unavailable` (delivered by Svix to your endpoint). Identity-free. Sent once per request when it ends without a pass: the person declined, the check failed or was refused, or a newer check replaced it. Not modeled as an OpenAPI `webhooks` entry, like `GateHumanVerifiedEvent`.
|
|
53
|
+
*/
|
|
54
|
+
export type GateUnavailableEvent = {
|
|
55
|
+
type: GateUnavailableEventType;
|
|
56
|
+
/**
|
|
57
|
+
* Equals request_id.
|
|
58
|
+
*/
|
|
59
|
+
eventId: string;
|
|
60
|
+
requestId: string;
|
|
61
|
+
failedAt: Date;
|
|
62
|
+
verdict: GateUnavailableEventVerdict;
|
|
63
|
+
/**
|
|
64
|
+
* The frozen reason. A policy refusal or a replaced check keeps `internal_error`; read `failure_code` for the cause.
|
|
65
|
+
*/
|
|
66
|
+
reason: GateUnavailableEventReason;
|
|
67
|
+
errorMessage?: string | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* The cause, when `reason` cannot name it. An open set: treat unknown values as unavailable. Includes `superseded` (a newer check you sent to the same person replaced this one), `already_trusted`, `rebind_requires_prior_id`, `pass_limit_reached`, `real_days_not_met`, `gate_not_open`, `signup_required`, `action_off`.
|
|
70
|
+
*/
|
|
71
|
+
failureCode?: string | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* The plain name for a refusal, beside the legacy `failure_code`, when there is one.
|
|
74
|
+
*/
|
|
75
|
+
failureName?: string | undefined;
|
|
76
|
+
environment: GateUnavailableEventEnvironment;
|
|
77
|
+
/**
|
|
78
|
+
* Omitted when unknown.
|
|
79
|
+
*/
|
|
80
|
+
product?: string | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* BotShield Actions: the act this request was for, verbatim. Present only on an action request.
|
|
83
|
+
*/
|
|
84
|
+
act?: string | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* Your own metadata from create-session / create-verification-link, BotShield's internal keys removed. Omitted when empty.
|
|
87
|
+
*/
|
|
88
|
+
metadata?: { [k: string]: any } | undefined;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/** @internal */
|
|
92
|
+
export const GateUnavailableEventType$inboundSchema: z.ZodNativeEnum<
|
|
93
|
+
typeof GateUnavailableEventType
|
|
94
|
+
> = z.nativeEnum(GateUnavailableEventType);
|
|
95
|
+
/** @internal */
|
|
96
|
+
export const GateUnavailableEventType$outboundSchema: z.ZodNativeEnum<
|
|
97
|
+
typeof GateUnavailableEventType
|
|
98
|
+
> = GateUnavailableEventType$inboundSchema;
|
|
99
|
+
|
|
100
|
+
/** @internal */
|
|
101
|
+
export const GateUnavailableEventVerdict$inboundSchema: z.ZodNativeEnum<
|
|
102
|
+
typeof GateUnavailableEventVerdict
|
|
103
|
+
> = z.nativeEnum(GateUnavailableEventVerdict);
|
|
104
|
+
/** @internal */
|
|
105
|
+
export const GateUnavailableEventVerdict$outboundSchema: z.ZodNativeEnum<
|
|
106
|
+
typeof GateUnavailableEventVerdict
|
|
107
|
+
> = GateUnavailableEventVerdict$inboundSchema;
|
|
108
|
+
|
|
109
|
+
/** @internal */
|
|
110
|
+
export const GateUnavailableEventReason$inboundSchema: z.ZodNativeEnum<
|
|
111
|
+
typeof GateUnavailableEventReason
|
|
112
|
+
> = z.nativeEnum(GateUnavailableEventReason);
|
|
113
|
+
/** @internal */
|
|
114
|
+
export const GateUnavailableEventReason$outboundSchema: z.ZodNativeEnum<
|
|
115
|
+
typeof GateUnavailableEventReason
|
|
116
|
+
> = GateUnavailableEventReason$inboundSchema;
|
|
117
|
+
|
|
118
|
+
/** @internal */
|
|
119
|
+
export const GateUnavailableEventEnvironment$inboundSchema: z.ZodNativeEnum<
|
|
120
|
+
typeof GateUnavailableEventEnvironment
|
|
121
|
+
> = z.nativeEnum(GateUnavailableEventEnvironment);
|
|
122
|
+
/** @internal */
|
|
123
|
+
export const GateUnavailableEventEnvironment$outboundSchema: z.ZodNativeEnum<
|
|
124
|
+
typeof GateUnavailableEventEnvironment
|
|
125
|
+
> = GateUnavailableEventEnvironment$inboundSchema;
|
|
126
|
+
|
|
127
|
+
/** @internal */
|
|
128
|
+
export const GateUnavailableEvent$inboundSchema: z.ZodType<
|
|
129
|
+
GateUnavailableEvent,
|
|
130
|
+
z.ZodTypeDef,
|
|
131
|
+
unknown
|
|
132
|
+
> = z.object({
|
|
133
|
+
type: GateUnavailableEventType$inboundSchema,
|
|
134
|
+
event_id: types.string(),
|
|
135
|
+
request_id: types.string(),
|
|
136
|
+
failed_at: types.date(),
|
|
137
|
+
verdict: GateUnavailableEventVerdict$inboundSchema,
|
|
138
|
+
reason: GateUnavailableEventReason$inboundSchema,
|
|
139
|
+
error_message: types.optional(types.string()),
|
|
140
|
+
failure_code: types.optional(types.string()),
|
|
141
|
+
failure_name: types.optional(types.string()),
|
|
142
|
+
environment: GateUnavailableEventEnvironment$inboundSchema,
|
|
143
|
+
product: types.optional(types.string()),
|
|
144
|
+
act: types.optional(types.string()),
|
|
145
|
+
metadata: types.optional(z.record(z.any())),
|
|
146
|
+
}).transform((v) => {
|
|
147
|
+
return remap$(v, {
|
|
148
|
+
"event_id": "eventId",
|
|
149
|
+
"request_id": "requestId",
|
|
150
|
+
"failed_at": "failedAt",
|
|
151
|
+
"error_message": "errorMessage",
|
|
152
|
+
"failure_code": "failureCode",
|
|
153
|
+
"failure_name": "failureName",
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
/** @internal */
|
|
157
|
+
export type GateUnavailableEvent$Outbound = {
|
|
158
|
+
type: string;
|
|
159
|
+
event_id: string;
|
|
160
|
+
request_id: string;
|
|
161
|
+
failed_at: string;
|
|
162
|
+
verdict: string;
|
|
163
|
+
reason: string;
|
|
164
|
+
error_message?: string | undefined;
|
|
165
|
+
failure_code?: string | undefined;
|
|
166
|
+
failure_name?: string | undefined;
|
|
167
|
+
environment: string;
|
|
168
|
+
product?: string | undefined;
|
|
169
|
+
act?: string | undefined;
|
|
170
|
+
metadata?: { [k: string]: any } | undefined;
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
/** @internal */
|
|
174
|
+
export const GateUnavailableEvent$outboundSchema: z.ZodType<
|
|
175
|
+
GateUnavailableEvent$Outbound,
|
|
176
|
+
z.ZodTypeDef,
|
|
177
|
+
GateUnavailableEvent
|
|
178
|
+
> = z.object({
|
|
179
|
+
type: GateUnavailableEventType$outboundSchema,
|
|
180
|
+
eventId: z.string(),
|
|
181
|
+
requestId: z.string(),
|
|
182
|
+
failedAt: z.date().transform(v => v.toISOString()),
|
|
183
|
+
verdict: GateUnavailableEventVerdict$outboundSchema,
|
|
184
|
+
reason: GateUnavailableEventReason$outboundSchema,
|
|
185
|
+
errorMessage: z.string().optional(),
|
|
186
|
+
failureCode: z.string().optional(),
|
|
187
|
+
failureName: z.string().optional(),
|
|
188
|
+
environment: GateUnavailableEventEnvironment$outboundSchema,
|
|
189
|
+
product: z.string().optional(),
|
|
190
|
+
act: z.string().optional(),
|
|
191
|
+
metadata: z.record(z.any()).optional(),
|
|
192
|
+
}).transform((v) => {
|
|
193
|
+
return remap$(v, {
|
|
194
|
+
eventId: "event_id",
|
|
195
|
+
requestId: "request_id",
|
|
196
|
+
failedAt: "failed_at",
|
|
197
|
+
errorMessage: "error_message",
|
|
198
|
+
failureCode: "failure_code",
|
|
199
|
+
failureName: "failure_name",
|
|
200
|
+
});
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
export function gateUnavailableEventToJSON(
|
|
204
|
+
gateUnavailableEvent: GateUnavailableEvent,
|
|
205
|
+
): string {
|
|
206
|
+
return JSON.stringify(
|
|
207
|
+
GateUnavailableEvent$outboundSchema.parse(gateUnavailableEvent),
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
export function gateUnavailableEventFromJSON(
|
|
211
|
+
jsonString: string,
|
|
212
|
+
): SafeParseResult<GateUnavailableEvent, SDKValidationError> {
|
|
213
|
+
return safeParse(
|
|
214
|
+
jsonString,
|
|
215
|
+
(x) => GateUnavailableEvent$inboundSchema.parse(JSON.parse(x)),
|
|
216
|
+
`Failed to parse 'GateUnavailableEvent' from JSON`,
|
|
217
|
+
);
|
|
218
|
+
}
|