botshield-sdk 2.2.1 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -9
- package/bin/mcp-server.js +1163 -122
- package/bin/mcp-server.js.map +37 -26
- 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/inline-passkey-complete.d.ts +20 -0
- package/dist/commonjs/funcs/inline-passkey-complete.d.ts.map +1 -0
- package/dist/commonjs/funcs/inline-passkey-complete.js +116 -0
- package/dist/commonjs/funcs/inline-passkey-complete.js.map +1 -0
- package/dist/commonjs/funcs/inline-passkey-get-options.d.ts +20 -0
- package/dist/commonjs/funcs/inline-passkey-get-options.d.ts.map +1 -0
- package/dist/commonjs/funcs/inline-passkey-get-options.js +116 -0
- package/dist/commonjs/funcs/inline-passkey-get-options.js.map +1 -0
- package/dist/commonjs/funcs/verification-get-status.d.ts +1 -1
- package/dist/commonjs/funcs/verification-get-status.js +1 -1
- package/dist/commonjs/lib/config.d.ts +20 -4
- package/dist/commonjs/lib/config.d.ts.map +1 -1
- package/dist/commonjs/lib/config.js +22 -18
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/mcp-server/cli/start/command.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/cli/start/command.js +4 -3
- package/dist/commonjs/mcp-server/cli/start/command.js.map +1 -1
- package/dist/commonjs/mcp-server/cli/start/impl.d.ts +1 -1
- package/dist/commonjs/mcp-server/cli/start/impl.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/cli/start/impl.js +2 -2
- package/dist/commonjs/mcp-server/cli/start/impl.js.map +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +2 -2
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/models/bot-shield-action.d.ts +10 -0
- package/dist/commonjs/models/bot-shield-action.d.ts.map +1 -1
- package/dist/commonjs/models/bot-shield-action.js +8 -0
- package/dist/commonjs/models/bot-shield-action.js.map +1 -1
- package/dist/commonjs/models/error-body.d.ts +11 -1
- package/dist/commonjs/models/error-body.d.ts.map +1 -1
- package/dist/commonjs/models/error-body.js +6 -0
- package/dist/commonjs/models/error-body.js.map +1 -1
- package/dist/commonjs/models/gate-human-verified-event.d.ts +93 -0
- package/dist/commonjs/models/gate-human-verified-event.d.ts.map +1 -0
- package/dist/commonjs/models/gate-human-verified-event.js +119 -0
- package/dist/commonjs/models/gate-human-verified-event.js.map +1 -0
- 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 +4 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +4 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/inline-passkey-assertion.d.ts +66 -0
- package/dist/commonjs/models/inline-passkey-assertion.d.ts.map +1 -0
- package/dist/commonjs/models/inline-passkey-assertion.js +98 -0
- package/dist/commonjs/models/inline-passkey-assertion.js.map +1 -0
- package/dist/commonjs/models/inline-passkey-request-options.d.ts +78 -0
- package/dist/commonjs/models/inline-passkey-request-options.d.ts.map +1 -0
- package/dist/commonjs/models/inline-passkey-request-options.js +107 -0
- package/dist/commonjs/models/inline-passkey-request-options.js.map +1 -0
- 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 +12 -1
- 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 +7 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +7 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/request-passkey-complete.d.ts +107 -0
- package/dist/commonjs/models/operations/request-passkey-complete.d.ts.map +1 -0
- package/dist/commonjs/models/operations/request-passkey-complete.js +141 -0
- package/dist/commonjs/models/operations/request-passkey-complete.js.map +1 -0
- package/dist/commonjs/models/operations/request-passkey-options.d.ts +178 -0
- package/dist/commonjs/models/operations/request-passkey-options.d.ts.map +1 -0
- package/dist/commonjs/models/operations/request-passkey-options.js +193 -0
- package/dist/commonjs/models/operations/request-passkey-options.js.map +1 -0
- 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 +43 -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 +30 -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 +95 -1
- package/dist/commonjs/models/operations/sdk-verify-token.d.ts.map +1 -1
- package/dist/commonjs/models/operations/sdk-verify-token.js +86 -1
- package/dist/commonjs/models/operations/sdk-verify-token.js.map +1 -1
- package/dist/commonjs/models/operations/verification-get-status.d.ts +86 -24
- package/dist/commonjs/models/operations/verification-get-status.d.ts.map +1 -1
- package/dist/commonjs/models/operations/verification-get-status.js +70 -18
- 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/inline-passkey.d.ts +23 -0
- package/dist/commonjs/sdk/inline-passkey.d.ts.map +1 -0
- package/dist/commonjs/sdk/inline-passkey.js +36 -0
- package/dist/commonjs/sdk/inline-passkey.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +5 -2
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +9 -4
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- 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/inline-passkey-complete.d.ts +20 -0
- package/dist/esm/funcs/inline-passkey-complete.d.ts.map +1 -0
- package/dist/esm/funcs/inline-passkey-complete.js +80 -0
- package/dist/esm/funcs/inline-passkey-complete.js.map +1 -0
- package/dist/esm/funcs/inline-passkey-get-options.d.ts +20 -0
- package/dist/esm/funcs/inline-passkey-get-options.d.ts.map +1 -0
- package/dist/esm/funcs/inline-passkey-get-options.js +80 -0
- package/dist/esm/funcs/inline-passkey-get-options.js.map +1 -0
- package/dist/esm/funcs/verification-get-status.d.ts +1 -1
- package/dist/esm/funcs/verification-get-status.js +1 -1
- package/dist/esm/lib/config.d.ts +20 -4
- package/dist/esm/lib/config.d.ts.map +1 -1
- package/dist/esm/lib/config.js +21 -17
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/mcp-server/cli/start/command.d.ts.map +1 -1
- package/dist/esm/mcp-server/cli/start/command.js +5 -4
- package/dist/esm/mcp-server/cli/start/command.js.map +1 -1
- package/dist/esm/mcp-server/cli/start/impl.d.ts +1 -1
- package/dist/esm/mcp-server/cli/start/impl.d.ts.map +1 -1
- package/dist/esm/mcp-server/cli/start/impl.js +2 -2
- package/dist/esm/mcp-server/cli/start/impl.js.map +1 -1
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +2 -2
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/models/bot-shield-action.d.ts +10 -0
- package/dist/esm/models/bot-shield-action.d.ts.map +1 -1
- package/dist/esm/models/bot-shield-action.js +8 -0
- package/dist/esm/models/bot-shield-action.js.map +1 -1
- package/dist/esm/models/error-body.d.ts +11 -1
- package/dist/esm/models/error-body.d.ts.map +1 -1
- package/dist/esm/models/error-body.js +6 -0
- package/dist/esm/models/error-body.js.map +1 -1
- package/dist/esm/models/gate-human-verified-event.d.ts +93 -0
- package/dist/esm/models/gate-human-verified-event.d.ts.map +1 -0
- package/dist/esm/models/gate-human-verified-event.js +81 -0
- package/dist/esm/models/gate-human-verified-event.js.map +1 -0
- 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 +4 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +4 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/inline-passkey-assertion.d.ts +66 -0
- package/dist/esm/models/inline-passkey-assertion.d.ts.map +1 -0
- package/dist/esm/models/inline-passkey-assertion.js +58 -0
- package/dist/esm/models/inline-passkey-assertion.js.map +1 -0
- package/dist/esm/models/inline-passkey-request-options.d.ts +78 -0
- package/dist/esm/models/inline-passkey-request-options.d.ts.map +1 -0
- package/dist/esm/models/inline-passkey-request-options.js +67 -0
- package/dist/esm/models/inline-passkey-request-options.js.map +1 -0
- 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 +12 -1
- 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 +7 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +7 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/request-passkey-complete.d.ts +107 -0
- package/dist/esm/models/operations/request-passkey-complete.d.ts.map +1 -0
- package/dist/esm/models/operations/request-passkey-complete.js +97 -0
- package/dist/esm/models/operations/request-passkey-complete.js.map +1 -0
- package/dist/esm/models/operations/request-passkey-options.d.ts +178 -0
- package/dist/esm/models/operations/request-passkey-options.d.ts.map +1 -0
- package/dist/esm/models/operations/request-passkey-options.js +149 -0
- package/dist/esm/models/operations/request-passkey-options.js.map +1 -0
- 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 +43 -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 +29 -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 +95 -1
- package/dist/esm/models/operations/sdk-verify-token.d.ts.map +1 -1
- package/dist/esm/models/operations/sdk-verify-token.js +83 -0
- package/dist/esm/models/operations/sdk-verify-token.js.map +1 -1
- package/dist/esm/models/operations/verification-get-status.d.ts +86 -24
- package/dist/esm/models/operations/verification-get-status.d.ts.map +1 -1
- package/dist/esm/models/operations/verification-get-status.js +69 -17
- 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/inline-passkey.d.ts +23 -0
- package/dist/esm/sdk/inline-passkey.d.ts.map +1 -0
- package/dist/esm/sdk/inline-passkey.js +32 -0
- package/dist/esm/sdk/inline-passkey.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +5 -2
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +9 -4
- package/dist/esm/sdk/sdk.js.map +1 -1
- 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/inline-passkey-complete.ts +172 -0
- package/src/funcs/inline-passkey-get-options.ts +172 -0
- package/src/funcs/verification-get-status.ts +1 -1
- package/src/lib/config.ts +22 -18
- package/src/mcp-server/cli/start/command.ts +5 -4
- package/src/mcp-server/cli/start/impl.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -3
- package/src/models/bot-shield-action.ts +18 -0
- package/src/models/error-body.ts +17 -1
- package/src/models/gate-human-verified-event.ts +181 -0
- package/src/models/gate-unavailable-event.ts +218 -0
- package/src/models/gates-api-error.ts +16 -0
- package/src/models/index.ts +4 -0
- package/src/models/inline-passkey-assertion.ts +147 -0
- package/src/models/inline-passkey-request-options.ts +175 -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 +14 -1
- 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 +7 -0
- package/src/models/operations/request-passkey-complete.ts +272 -0
- package/src/models/operations/request-passkey-options.ts +372 -0
- 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 +69 -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 +189 -1
- package/src/models/operations/verification-get-status.ts +151 -38
- 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/inline-passkey.ts +49 -0
- package/src/sdk/sdk.ts +11 -5
- package/src/sdk/verification.ts +1 -1
|
@@ -55,6 +55,14 @@ export type BotShieldAction = {
|
|
|
55
55
|
environment: BotShieldActionEnvironment;
|
|
56
56
|
placedAt: Date;
|
|
57
57
|
turnedOffAt: Date | null;
|
|
58
|
+
/**
|
|
59
|
+
* Your support team can send this to a customer; its name is what the customer reads. Set with `staffCanSend` on create or update.
|
|
60
|
+
*/
|
|
61
|
+
staffCanSend?: boolean | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* 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.
|
|
64
|
+
*/
|
|
65
|
+
highValue?: boolean | undefined;
|
|
58
66
|
};
|
|
59
67
|
|
|
60
68
|
/** @internal */
|
|
@@ -97,12 +105,16 @@ export const BotShieldAction$inboundSchema: z.ZodType<
|
|
|
97
105
|
environment: BotShieldActionEnvironment$inboundSchema,
|
|
98
106
|
placed_at: types.date(),
|
|
99
107
|
turned_off_at: types.nullable(types.date()),
|
|
108
|
+
staff_can_send: types.optional(types.boolean()),
|
|
109
|
+
high_value: types.optional(types.boolean()),
|
|
100
110
|
}).transform((v) => {
|
|
101
111
|
return remap$(v, {
|
|
102
112
|
"act_key": "actKey",
|
|
103
113
|
"where_url": "whereUrl",
|
|
104
114
|
"placed_at": "placedAt",
|
|
105
115
|
"turned_off_at": "turnedOffAt",
|
|
116
|
+
"staff_can_send": "staffCanSend",
|
|
117
|
+
"high_value": "highValue",
|
|
106
118
|
});
|
|
107
119
|
});
|
|
108
120
|
/** @internal */
|
|
@@ -115,6 +127,8 @@ export type BotShieldAction$Outbound = {
|
|
|
115
127
|
environment: string;
|
|
116
128
|
placed_at: string;
|
|
117
129
|
turned_off_at: string | null;
|
|
130
|
+
staff_can_send?: boolean | undefined;
|
|
131
|
+
high_value?: boolean | undefined;
|
|
118
132
|
};
|
|
119
133
|
|
|
120
134
|
/** @internal */
|
|
@@ -131,12 +145,16 @@ export const BotShieldAction$outboundSchema: z.ZodType<
|
|
|
131
145
|
environment: BotShieldActionEnvironment$outboundSchema,
|
|
132
146
|
placedAt: z.date().transform(v => v.toISOString()),
|
|
133
147
|
turnedOffAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
148
|
+
staffCanSend: z.boolean().optional(),
|
|
149
|
+
highValue: z.boolean().optional(),
|
|
134
150
|
}).transform((v) => {
|
|
135
151
|
return remap$(v, {
|
|
136
152
|
actKey: "act_key",
|
|
137
153
|
whereUrl: "where_url",
|
|
138
154
|
placedAt: "placed_at",
|
|
139
155
|
turnedOffAt: "turned_off_at",
|
|
156
|
+
staffCanSend: "staff_can_send",
|
|
157
|
+
highValue: "high_value",
|
|
140
158
|
});
|
|
141
159
|
});
|
|
142
160
|
|
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`.
|
|
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`.
|
|
40
40
|
*/
|
|
41
41
|
code?: string | undefined;
|
|
42
42
|
minTtlSeconds?: number | undefined;
|
|
@@ -49,6 +49,14 @@ export type ErrorBody = {
|
|
|
49
49
|
retryIn?: number | undefined;
|
|
50
50
|
limits?: Limits | undefined;
|
|
51
51
|
upgradeUrl?: string | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* inline_not_for_age_gate only: the app hand-off for this request.
|
|
54
|
+
*/
|
|
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;
|
|
52
60
|
};
|
|
53
61
|
|
|
54
62
|
/** @internal */
|
|
@@ -156,6 +164,8 @@ export const ErrorBody$inboundSchema: z.ZodType<
|
|
|
156
164
|
retry_in: types.optional(types.number()),
|
|
157
165
|
limits: types.optional(z.lazy(() => Limits$inboundSchema)),
|
|
158
166
|
upgrade_url: types.optional(types.string()),
|
|
167
|
+
url: types.optional(types.string()),
|
|
168
|
+
retry_after_seconds: types.optional(types.number()),
|
|
159
169
|
}).transform((v) => {
|
|
160
170
|
return remap$(v, {
|
|
161
171
|
"min_ttl_seconds": "minTtlSeconds",
|
|
@@ -163,6 +173,7 @@ export const ErrorBody$inboundSchema: z.ZodType<
|
|
|
163
173
|
"next_step": "nextStep",
|
|
164
174
|
"retry_in": "retryIn",
|
|
165
175
|
"upgrade_url": "upgradeUrl",
|
|
176
|
+
"retry_after_seconds": "retryAfterSeconds",
|
|
166
177
|
});
|
|
167
178
|
});
|
|
168
179
|
/** @internal */
|
|
@@ -180,6 +191,8 @@ export type ErrorBody$Outbound = {
|
|
|
180
191
|
retry_in?: number | undefined;
|
|
181
192
|
limits?: Limits$Outbound | undefined;
|
|
182
193
|
upgrade_url?: string | undefined;
|
|
194
|
+
url?: string | undefined;
|
|
195
|
+
retry_after_seconds?: number | undefined;
|
|
183
196
|
};
|
|
184
197
|
|
|
185
198
|
/** @internal */
|
|
@@ -201,6 +214,8 @@ export const ErrorBody$outboundSchema: z.ZodType<
|
|
|
201
214
|
retryIn: z.number().int().optional(),
|
|
202
215
|
limits: z.lazy(() => Limits$outboundSchema).optional(),
|
|
203
216
|
upgradeUrl: z.string().optional(),
|
|
217
|
+
url: z.string().optional(),
|
|
218
|
+
retryAfterSeconds: z.number().int().optional(),
|
|
204
219
|
}).transform((v) => {
|
|
205
220
|
return remap$(v, {
|
|
206
221
|
minTtlSeconds: "min_ttl_seconds",
|
|
@@ -208,6 +223,7 @@ export const ErrorBody$outboundSchema: z.ZodType<
|
|
|
208
223
|
nextStep: "next_step",
|
|
209
224
|
retryIn: "retry_in",
|
|
210
225
|
upgradeUrl: "upgrade_url",
|
|
226
|
+
retryAfterSeconds: "retry_after_seconds",
|
|
211
227
|
});
|
|
212
228
|
});
|
|
213
229
|
|
|
@@ -0,0 +1,181 @@
|
|
|
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 GateHumanVerifiedEventType = {
|
|
14
|
+
GateHumanVerified: "gate.human_verified",
|
|
15
|
+
} as const;
|
|
16
|
+
export type GateHumanVerifiedEventType = ClosedEnum<
|
|
17
|
+
typeof GateHumanVerifiedEventType
|
|
18
|
+
>;
|
|
19
|
+
|
|
20
|
+
export const Verdict = {
|
|
21
|
+
Pass: "pass",
|
|
22
|
+
} as const;
|
|
23
|
+
export type Verdict = ClosedEnum<typeof Verdict>;
|
|
24
|
+
|
|
25
|
+
export const GateHumanVerifiedEventEnvironment = {
|
|
26
|
+
Development: "development",
|
|
27
|
+
Production: "production",
|
|
28
|
+
} as const;
|
|
29
|
+
export type GateHumanVerifiedEventEnvironment = ClosedEnum<
|
|
30
|
+
typeof GateHumanVerifiedEventEnvironment
|
|
31
|
+
>;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Webhook `gate.human_verified` (delivered by Svix to your endpoint). Identity-free. Sent once per request when a live human is proven — from the BotShield app or the inline passkey lane alike. Not modeled as an OpenAPI `webhooks` entry: the Speakeasy plan in use skips webhooks (business tier).
|
|
35
|
+
*/
|
|
36
|
+
export type GateHumanVerifiedEvent = {
|
|
37
|
+
type: GateHumanVerifiedEventType;
|
|
38
|
+
/**
|
|
39
|
+
* Equals request_id.
|
|
40
|
+
*/
|
|
41
|
+
eventId: string;
|
|
42
|
+
requestId: string;
|
|
43
|
+
verifiedAt: Date;
|
|
44
|
+
verdict: Verdict;
|
|
45
|
+
/**
|
|
46
|
+
* An active Secured Account binding exists for (your platform, partner_user_ref) after this ceremony.
|
|
47
|
+
*/
|
|
48
|
+
trusted: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* THIS ceremony created the binding.
|
|
51
|
+
*/
|
|
52
|
+
firstTime: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* The opaque per-platform handle, when the person has a Secured Account here.
|
|
55
|
+
*/
|
|
56
|
+
handle?: string | undefined;
|
|
57
|
+
environment: GateHumanVerifiedEventEnvironment;
|
|
58
|
+
/**
|
|
59
|
+
* Omitted when unknown.
|
|
60
|
+
*/
|
|
61
|
+
product?: string | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* BotShield Actions: the act this tap confirmed, verbatim — the same value as the token's `act` claim. Present only on an action request.
|
|
64
|
+
*/
|
|
65
|
+
act?: string | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Your own metadata from create-session / create-verification-link, BotShield's internal keys removed. Omitted when empty.
|
|
68
|
+
*/
|
|
69
|
+
metadata?: { [k: string]: any } | undefined;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
/** @internal */
|
|
73
|
+
export const GateHumanVerifiedEventType$inboundSchema: z.ZodNativeEnum<
|
|
74
|
+
typeof GateHumanVerifiedEventType
|
|
75
|
+
> = z.nativeEnum(GateHumanVerifiedEventType);
|
|
76
|
+
/** @internal */
|
|
77
|
+
export const GateHumanVerifiedEventType$outboundSchema: z.ZodNativeEnum<
|
|
78
|
+
typeof GateHumanVerifiedEventType
|
|
79
|
+
> = GateHumanVerifiedEventType$inboundSchema;
|
|
80
|
+
|
|
81
|
+
/** @internal */
|
|
82
|
+
export const Verdict$inboundSchema: z.ZodNativeEnum<typeof Verdict> = z
|
|
83
|
+
.nativeEnum(Verdict);
|
|
84
|
+
/** @internal */
|
|
85
|
+
export const Verdict$outboundSchema: z.ZodNativeEnum<typeof Verdict> =
|
|
86
|
+
Verdict$inboundSchema;
|
|
87
|
+
|
|
88
|
+
/** @internal */
|
|
89
|
+
export const GateHumanVerifiedEventEnvironment$inboundSchema: z.ZodNativeEnum<
|
|
90
|
+
typeof GateHumanVerifiedEventEnvironment
|
|
91
|
+
> = z.nativeEnum(GateHumanVerifiedEventEnvironment);
|
|
92
|
+
/** @internal */
|
|
93
|
+
export const GateHumanVerifiedEventEnvironment$outboundSchema: z.ZodNativeEnum<
|
|
94
|
+
typeof GateHumanVerifiedEventEnvironment
|
|
95
|
+
> = GateHumanVerifiedEventEnvironment$inboundSchema;
|
|
96
|
+
|
|
97
|
+
/** @internal */
|
|
98
|
+
export const GateHumanVerifiedEvent$inboundSchema: z.ZodType<
|
|
99
|
+
GateHumanVerifiedEvent,
|
|
100
|
+
z.ZodTypeDef,
|
|
101
|
+
unknown
|
|
102
|
+
> = z.object({
|
|
103
|
+
type: GateHumanVerifiedEventType$inboundSchema,
|
|
104
|
+
event_id: types.string(),
|
|
105
|
+
request_id: types.string(),
|
|
106
|
+
verified_at: types.date(),
|
|
107
|
+
verdict: Verdict$inboundSchema,
|
|
108
|
+
trusted: types.boolean(),
|
|
109
|
+
first_time: types.boolean(),
|
|
110
|
+
handle: types.optional(types.string()),
|
|
111
|
+
environment: GateHumanVerifiedEventEnvironment$inboundSchema,
|
|
112
|
+
product: types.optional(types.string()),
|
|
113
|
+
act: types.optional(types.string()),
|
|
114
|
+
metadata: types.optional(z.record(z.any())),
|
|
115
|
+
}).transform((v) => {
|
|
116
|
+
return remap$(v, {
|
|
117
|
+
"event_id": "eventId",
|
|
118
|
+
"request_id": "requestId",
|
|
119
|
+
"verified_at": "verifiedAt",
|
|
120
|
+
"first_time": "firstTime",
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
/** @internal */
|
|
124
|
+
export type GateHumanVerifiedEvent$Outbound = {
|
|
125
|
+
type: string;
|
|
126
|
+
event_id: string;
|
|
127
|
+
request_id: string;
|
|
128
|
+
verified_at: string;
|
|
129
|
+
verdict: string;
|
|
130
|
+
trusted: boolean;
|
|
131
|
+
first_time: boolean;
|
|
132
|
+
handle?: string | undefined;
|
|
133
|
+
environment: string;
|
|
134
|
+
product?: string | undefined;
|
|
135
|
+
act?: string | undefined;
|
|
136
|
+
metadata?: { [k: string]: any } | undefined;
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
/** @internal */
|
|
140
|
+
export const GateHumanVerifiedEvent$outboundSchema: z.ZodType<
|
|
141
|
+
GateHumanVerifiedEvent$Outbound,
|
|
142
|
+
z.ZodTypeDef,
|
|
143
|
+
GateHumanVerifiedEvent
|
|
144
|
+
> = z.object({
|
|
145
|
+
type: GateHumanVerifiedEventType$outboundSchema,
|
|
146
|
+
eventId: z.string(),
|
|
147
|
+
requestId: z.string(),
|
|
148
|
+
verifiedAt: z.date().transform(v => v.toISOString()),
|
|
149
|
+
verdict: Verdict$outboundSchema,
|
|
150
|
+
trusted: z.boolean(),
|
|
151
|
+
firstTime: z.boolean(),
|
|
152
|
+
handle: z.string().optional(),
|
|
153
|
+
environment: GateHumanVerifiedEventEnvironment$outboundSchema,
|
|
154
|
+
product: z.string().optional(),
|
|
155
|
+
act: z.string().optional(),
|
|
156
|
+
metadata: z.record(z.any()).optional(),
|
|
157
|
+
}).transform((v) => {
|
|
158
|
+
return remap$(v, {
|
|
159
|
+
eventId: "event_id",
|
|
160
|
+
requestId: "request_id",
|
|
161
|
+
verifiedAt: "verified_at",
|
|
162
|
+
firstTime: "first_time",
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
export function gateHumanVerifiedEventToJSON(
|
|
167
|
+
gateHumanVerifiedEvent: GateHumanVerifiedEvent,
|
|
168
|
+
): string {
|
|
169
|
+
return JSON.stringify(
|
|
170
|
+
GateHumanVerifiedEvent$outboundSchema.parse(gateHumanVerifiedEvent),
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
export function gateHumanVerifiedEventFromJSON(
|
|
174
|
+
jsonString: string,
|
|
175
|
+
): SafeParseResult<GateHumanVerifiedEvent, SDKValidationError> {
|
|
176
|
+
return safeParse(
|
|
177
|
+
jsonString,
|
|
178
|
+
(x) => GateHumanVerifiedEvent$inboundSchema.parse(JSON.parse(x)),
|
|
179
|
+
`Failed to parse 'GateHumanVerifiedEvent' from JSON`,
|
|
180
|
+
);
|
|
181
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
7
|
import { safeParse } from "../lib/schemas.js";
|
|
7
8
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
9
|
import * as types from "../types/primitives.js";
|
|
@@ -15,6 +16,10 @@ export type GatesApiError = {
|
|
|
15
16
|
message: string;
|
|
16
17
|
statusCode: number;
|
|
17
18
|
code: string;
|
|
19
|
+
/**
|
|
20
|
+
* On a 429 limit: seconds until a retry can succeed.
|
|
21
|
+
*/
|
|
22
|
+
retryAfterSeconds?: number | undefined;
|
|
18
23
|
};
|
|
19
24
|
|
|
20
25
|
/** @internal */
|
|
@@ -26,12 +31,18 @@ export const GatesApiError$inboundSchema: z.ZodType<
|
|
|
26
31
|
message: types.string(),
|
|
27
32
|
statusCode: types.number(),
|
|
28
33
|
code: types.string(),
|
|
34
|
+
retry_after_seconds: types.optional(types.number()),
|
|
35
|
+
}).transform((v) => {
|
|
36
|
+
return remap$(v, {
|
|
37
|
+
"retry_after_seconds": "retryAfterSeconds",
|
|
38
|
+
});
|
|
29
39
|
});
|
|
30
40
|
/** @internal */
|
|
31
41
|
export type GatesApiError$Outbound = {
|
|
32
42
|
message: string;
|
|
33
43
|
statusCode: number;
|
|
34
44
|
code: string;
|
|
45
|
+
retry_after_seconds?: number | undefined;
|
|
35
46
|
};
|
|
36
47
|
|
|
37
48
|
/** @internal */
|
|
@@ -43,6 +54,11 @@ export const GatesApiError$outboundSchema: z.ZodType<
|
|
|
43
54
|
message: z.string(),
|
|
44
55
|
statusCode: z.number().int(),
|
|
45
56
|
code: z.string(),
|
|
57
|
+
retryAfterSeconds: z.number().int().optional(),
|
|
58
|
+
}).transform((v) => {
|
|
59
|
+
return remap$(v, {
|
|
60
|
+
retryAfterSeconds: "retry_after_seconds",
|
|
61
|
+
});
|
|
46
62
|
});
|
|
47
63
|
|
|
48
64
|
export function gatesApiErrorToJSON(gatesApiError: GatesApiError): string {
|
package/src/models/index.ts
CHANGED
|
@@ -5,10 +5,14 @@
|
|
|
5
5
|
export * from "./bot-shield-action.js";
|
|
6
6
|
export * from "./error-body.js";
|
|
7
7
|
export * from "./error-response.js";
|
|
8
|
+
export * from "./gate-human-verified-event.js";
|
|
8
9
|
export * from "./gate-policy-doc.js";
|
|
9
10
|
export * from "./gate-schedule.js";
|
|
11
|
+
export * from "./gate-unavailable-event.js";
|
|
10
12
|
export * from "./gate.js";
|
|
11
13
|
export * from "./gates-api-error.js";
|
|
14
|
+
export * from "./inline-passkey-assertion.js";
|
|
15
|
+
export * from "./inline-passkey-request-options.js";
|
|
12
16
|
export * from "./invalid-input-error.js";
|
|
13
17
|
export * from "./passes-per-person.js";
|
|
14
18
|
export * from "./security.js";
|