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
|
@@ -0,0 +1,281 @@
|
|
|
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 { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as types from "../../types/primitives.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
11
|
+
import * as models from "../index.js";
|
|
12
|
+
|
|
13
|
+
export type GatesApiActionsUpdateSecurity = {
|
|
14
|
+
gatesKeyAuth: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type GatesApiActionsUpdateRequest = {
|
|
18
|
+
/**
|
|
19
|
+
* The action's key (input is lower-cased).
|
|
20
|
+
*/
|
|
21
|
+
actKey: string;
|
|
22
|
+
/**
|
|
23
|
+
* Shown to the person on their card.
|
|
24
|
+
*/
|
|
25
|
+
name?: string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Your support team can send this to a customer. Its name is what the customer reads.
|
|
28
|
+
*/
|
|
29
|
+
staffCanSend?: boolean | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* 4.0 VH-31: high-value. It starts only from your customer's signed-in session (your server naming the account by your own reference). It is refused by phone number and for staff sends (`action_requires_signed_in`).
|
|
32
|
+
*/
|
|
33
|
+
highValue?: boolean | undefined;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export type GatesApiActionsUpdateDataData = {
|
|
37
|
+
/**
|
|
38
|
+
* 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.
|
|
39
|
+
*/
|
|
40
|
+
action: models.BotShieldAction;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export type GatesApiActionsUpdateData = {
|
|
44
|
+
data?: GatesApiActionsUpdateDataData | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Gates API handler error. Arrives inside `data.error` with HTTP 200 — check for it before reading the result.
|
|
47
|
+
*/
|
|
48
|
+
error?: models.GatesApiError | undefined;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* The action. NOTE: handler errors also arrive here (HTTP 200) as data.error — codes: `invalid_key` (401 — missing, malformed or inactive key), `gates_scope_required` (403 — the key lacks Gates API access), `org_not_found` (404), `nothing_to_change` (400), `action_not_found` (404), `not_migrated` (503), `internal` (500).
|
|
53
|
+
*/
|
|
54
|
+
export type GatesApiActionsUpdateResponse = {
|
|
55
|
+
data: GatesApiActionsUpdateData;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export const GatesApiActionsUpdateSecurity$inboundSchema: z.ZodType<
|
|
60
|
+
GatesApiActionsUpdateSecurity,
|
|
61
|
+
z.ZodTypeDef,
|
|
62
|
+
unknown
|
|
63
|
+
> = z.object({
|
|
64
|
+
GatesKeyAuth: types.string(),
|
|
65
|
+
}).transform((v) => {
|
|
66
|
+
return remap$(v, {
|
|
67
|
+
"GatesKeyAuth": "gatesKeyAuth",
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
/** @internal */
|
|
71
|
+
export type GatesApiActionsUpdateSecurity$Outbound = {
|
|
72
|
+
GatesKeyAuth: string;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/** @internal */
|
|
76
|
+
export const GatesApiActionsUpdateSecurity$outboundSchema: z.ZodType<
|
|
77
|
+
GatesApiActionsUpdateSecurity$Outbound,
|
|
78
|
+
z.ZodTypeDef,
|
|
79
|
+
GatesApiActionsUpdateSecurity
|
|
80
|
+
> = z.object({
|
|
81
|
+
gatesKeyAuth: z.string(),
|
|
82
|
+
}).transform((v) => {
|
|
83
|
+
return remap$(v, {
|
|
84
|
+
gatesKeyAuth: "GatesKeyAuth",
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
export function gatesApiActionsUpdateSecurityToJSON(
|
|
89
|
+
gatesApiActionsUpdateSecurity: GatesApiActionsUpdateSecurity,
|
|
90
|
+
): string {
|
|
91
|
+
return JSON.stringify(
|
|
92
|
+
GatesApiActionsUpdateSecurity$outboundSchema.parse(
|
|
93
|
+
gatesApiActionsUpdateSecurity,
|
|
94
|
+
),
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
export function gatesApiActionsUpdateSecurityFromJSON(
|
|
98
|
+
jsonString: string,
|
|
99
|
+
): SafeParseResult<GatesApiActionsUpdateSecurity, SDKValidationError> {
|
|
100
|
+
return safeParse(
|
|
101
|
+
jsonString,
|
|
102
|
+
(x) => GatesApiActionsUpdateSecurity$inboundSchema.parse(JSON.parse(x)),
|
|
103
|
+
`Failed to parse 'GatesApiActionsUpdateSecurity' from JSON`,
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** @internal */
|
|
108
|
+
export const GatesApiActionsUpdateRequest$inboundSchema: z.ZodType<
|
|
109
|
+
GatesApiActionsUpdateRequest,
|
|
110
|
+
z.ZodTypeDef,
|
|
111
|
+
unknown
|
|
112
|
+
> = z.object({
|
|
113
|
+
actKey: types.string(),
|
|
114
|
+
name: types.optional(types.string()),
|
|
115
|
+
staffCanSend: types.optional(types.boolean()),
|
|
116
|
+
highValue: types.optional(types.boolean()),
|
|
117
|
+
});
|
|
118
|
+
/** @internal */
|
|
119
|
+
export type GatesApiActionsUpdateRequest$Outbound = {
|
|
120
|
+
actKey: string;
|
|
121
|
+
name?: string | undefined;
|
|
122
|
+
staffCanSend?: boolean | undefined;
|
|
123
|
+
highValue?: boolean | undefined;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
/** @internal */
|
|
127
|
+
export const GatesApiActionsUpdateRequest$outboundSchema: z.ZodType<
|
|
128
|
+
GatesApiActionsUpdateRequest$Outbound,
|
|
129
|
+
z.ZodTypeDef,
|
|
130
|
+
GatesApiActionsUpdateRequest
|
|
131
|
+
> = z.object({
|
|
132
|
+
actKey: z.string(),
|
|
133
|
+
name: z.string().optional(),
|
|
134
|
+
staffCanSend: z.boolean().optional(),
|
|
135
|
+
highValue: z.boolean().optional(),
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
export function gatesApiActionsUpdateRequestToJSON(
|
|
139
|
+
gatesApiActionsUpdateRequest: GatesApiActionsUpdateRequest,
|
|
140
|
+
): string {
|
|
141
|
+
return JSON.stringify(
|
|
142
|
+
GatesApiActionsUpdateRequest$outboundSchema.parse(
|
|
143
|
+
gatesApiActionsUpdateRequest,
|
|
144
|
+
),
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
export function gatesApiActionsUpdateRequestFromJSON(
|
|
148
|
+
jsonString: string,
|
|
149
|
+
): SafeParseResult<GatesApiActionsUpdateRequest, SDKValidationError> {
|
|
150
|
+
return safeParse(
|
|
151
|
+
jsonString,
|
|
152
|
+
(x) => GatesApiActionsUpdateRequest$inboundSchema.parse(JSON.parse(x)),
|
|
153
|
+
`Failed to parse 'GatesApiActionsUpdateRequest' from JSON`,
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/** @internal */
|
|
158
|
+
export const GatesApiActionsUpdateDataData$inboundSchema: z.ZodType<
|
|
159
|
+
GatesApiActionsUpdateDataData,
|
|
160
|
+
z.ZodTypeDef,
|
|
161
|
+
unknown
|
|
162
|
+
> = z.object({
|
|
163
|
+
action: models.BotShieldAction$inboundSchema,
|
|
164
|
+
});
|
|
165
|
+
/** @internal */
|
|
166
|
+
export type GatesApiActionsUpdateDataData$Outbound = {
|
|
167
|
+
action: models.BotShieldAction$Outbound;
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
/** @internal */
|
|
171
|
+
export const GatesApiActionsUpdateDataData$outboundSchema: z.ZodType<
|
|
172
|
+
GatesApiActionsUpdateDataData$Outbound,
|
|
173
|
+
z.ZodTypeDef,
|
|
174
|
+
GatesApiActionsUpdateDataData
|
|
175
|
+
> = z.object({
|
|
176
|
+
action: models.BotShieldAction$outboundSchema,
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
export function gatesApiActionsUpdateDataDataToJSON(
|
|
180
|
+
gatesApiActionsUpdateDataData: GatesApiActionsUpdateDataData,
|
|
181
|
+
): string {
|
|
182
|
+
return JSON.stringify(
|
|
183
|
+
GatesApiActionsUpdateDataData$outboundSchema.parse(
|
|
184
|
+
gatesApiActionsUpdateDataData,
|
|
185
|
+
),
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
export function gatesApiActionsUpdateDataDataFromJSON(
|
|
189
|
+
jsonString: string,
|
|
190
|
+
): SafeParseResult<GatesApiActionsUpdateDataData, SDKValidationError> {
|
|
191
|
+
return safeParse(
|
|
192
|
+
jsonString,
|
|
193
|
+
(x) => GatesApiActionsUpdateDataData$inboundSchema.parse(JSON.parse(x)),
|
|
194
|
+
`Failed to parse 'GatesApiActionsUpdateDataData' from JSON`,
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/** @internal */
|
|
199
|
+
export const GatesApiActionsUpdateData$inboundSchema: z.ZodType<
|
|
200
|
+
GatesApiActionsUpdateData,
|
|
201
|
+
z.ZodTypeDef,
|
|
202
|
+
unknown
|
|
203
|
+
> = z.object({
|
|
204
|
+
data: types.optional(
|
|
205
|
+
z.lazy(() => GatesApiActionsUpdateDataData$inboundSchema),
|
|
206
|
+
),
|
|
207
|
+
error: types.optional(models.GatesApiError$inboundSchema),
|
|
208
|
+
});
|
|
209
|
+
/** @internal */
|
|
210
|
+
export type GatesApiActionsUpdateData$Outbound = {
|
|
211
|
+
data?: GatesApiActionsUpdateDataData$Outbound | undefined;
|
|
212
|
+
error?: models.GatesApiError$Outbound | undefined;
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
/** @internal */
|
|
216
|
+
export const GatesApiActionsUpdateData$outboundSchema: z.ZodType<
|
|
217
|
+
GatesApiActionsUpdateData$Outbound,
|
|
218
|
+
z.ZodTypeDef,
|
|
219
|
+
GatesApiActionsUpdateData
|
|
220
|
+
> = z.object({
|
|
221
|
+
data: z.lazy(() => GatesApiActionsUpdateDataData$outboundSchema).optional(),
|
|
222
|
+
error: models.GatesApiError$outboundSchema.optional(),
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
export function gatesApiActionsUpdateDataToJSON(
|
|
226
|
+
gatesApiActionsUpdateData: GatesApiActionsUpdateData,
|
|
227
|
+
): string {
|
|
228
|
+
return JSON.stringify(
|
|
229
|
+
GatesApiActionsUpdateData$outboundSchema.parse(gatesApiActionsUpdateData),
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
export function gatesApiActionsUpdateDataFromJSON(
|
|
233
|
+
jsonString: string,
|
|
234
|
+
): SafeParseResult<GatesApiActionsUpdateData, SDKValidationError> {
|
|
235
|
+
return safeParse(
|
|
236
|
+
jsonString,
|
|
237
|
+
(x) => GatesApiActionsUpdateData$inboundSchema.parse(JSON.parse(x)),
|
|
238
|
+
`Failed to parse 'GatesApiActionsUpdateData' from JSON`,
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/** @internal */
|
|
243
|
+
export const GatesApiActionsUpdateResponse$inboundSchema: z.ZodType<
|
|
244
|
+
GatesApiActionsUpdateResponse,
|
|
245
|
+
z.ZodTypeDef,
|
|
246
|
+
unknown
|
|
247
|
+
> = z.object({
|
|
248
|
+
data: z.lazy(() => GatesApiActionsUpdateData$inboundSchema),
|
|
249
|
+
});
|
|
250
|
+
/** @internal */
|
|
251
|
+
export type GatesApiActionsUpdateResponse$Outbound = {
|
|
252
|
+
data: GatesApiActionsUpdateData$Outbound;
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
/** @internal */
|
|
256
|
+
export const GatesApiActionsUpdateResponse$outboundSchema: z.ZodType<
|
|
257
|
+
GatesApiActionsUpdateResponse$Outbound,
|
|
258
|
+
z.ZodTypeDef,
|
|
259
|
+
GatesApiActionsUpdateResponse
|
|
260
|
+
> = z.object({
|
|
261
|
+
data: z.lazy(() => GatesApiActionsUpdateData$outboundSchema),
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
export function gatesApiActionsUpdateResponseToJSON(
|
|
265
|
+
gatesApiActionsUpdateResponse: GatesApiActionsUpdateResponse,
|
|
266
|
+
): string {
|
|
267
|
+
return JSON.stringify(
|
|
268
|
+
GatesApiActionsUpdateResponse$outboundSchema.parse(
|
|
269
|
+
gatesApiActionsUpdateResponse,
|
|
270
|
+
),
|
|
271
|
+
);
|
|
272
|
+
}
|
|
273
|
+
export function gatesApiActionsUpdateResponseFromJSON(
|
|
274
|
+
jsonString: string,
|
|
275
|
+
): SafeParseResult<GatesApiActionsUpdateResponse, SDKValidationError> {
|
|
276
|
+
return safeParse(
|
|
277
|
+
jsonString,
|
|
278
|
+
(x) => GatesApiActionsUpdateResponse$inboundSchema.parse(JSON.parse(x)),
|
|
279
|
+
`Failed to parse 'GatesApiActionsUpdateResponse' from JSON`,
|
|
280
|
+
);
|
|
281
|
+
}
|
|
@@ -7,9 +7,11 @@ export * from "./actions-check-status.js";
|
|
|
7
7
|
export * from "./actions-propose.js";
|
|
8
8
|
export * from "./gates-api-actions-create.js";
|
|
9
9
|
export * from "./gates-api-actions-list.js";
|
|
10
|
+
export * from "./gates-api-actions-request-cancel.js";
|
|
10
11
|
export * from "./gates-api-actions-request-status.js";
|
|
11
12
|
export * from "./gates-api-actions-request.js";
|
|
12
13
|
export * from "./gates-api-actions-set-state.js";
|
|
14
|
+
export * from "./gates-api-actions-update.js";
|
|
13
15
|
export * from "./gates-api-activate.js";
|
|
14
16
|
export * from "./gates-api-cancel.js";
|
|
15
17
|
export * from "./gates-api-close.js";
|
|
@@ -17,13 +19,18 @@ export * from "./gates-api-create.js";
|
|
|
17
19
|
export * from "./gates-api-extend.js";
|
|
18
20
|
export * from "./gates-api-get.js";
|
|
19
21
|
export * from "./gates-api-list.js";
|
|
22
|
+
export * from "./request-passkey-complete.js";
|
|
23
|
+
export * from "./request-passkey-options.js";
|
|
24
|
+
export * from "./sdk-confirm-link.js";
|
|
20
25
|
export * from "./sdk-create-session.js";
|
|
21
26
|
export * from "./sdk-create-verification-link.js";
|
|
22
27
|
export * from "./sdk-get-partner-config.js";
|
|
23
28
|
export * from "./sdk-logout.js";
|
|
24
29
|
export * from "./sdk-revoke-verification.js";
|
|
30
|
+
export * from "./sdk-send-by-number.js";
|
|
25
31
|
export * from "./sdk-store-signal.js";
|
|
26
32
|
export * from "./sdk-validate-signal.js";
|
|
33
|
+
export * from "./sdk-verify-resolution.js";
|
|
27
34
|
export * from "./sdk-verify-token.js";
|
|
28
35
|
export * from "./secured-accounts-list.js";
|
|
29
36
|
export * from "./secured-accounts-revoke.js";
|
|
@@ -0,0 +1,272 @@
|
|
|
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 * as openEnums from "../../types/enums.js";
|
|
9
|
+
import { OpenEnum } from "../../types/enums.js";
|
|
10
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
11
|
+
import * as types from "../../types/primitives.js";
|
|
12
|
+
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
13
|
+
import * as models from "../index.js";
|
|
14
|
+
|
|
15
|
+
export type RequestPasskeyCompleteRequest = {
|
|
16
|
+
requestId: string;
|
|
17
|
+
/**
|
|
18
|
+
* From passkey-options.
|
|
19
|
+
*/
|
|
20
|
+
challengeId: string;
|
|
21
|
+
/**
|
|
22
|
+
* WebAuthn AuthenticationResponseJSON (base64url strings) — the result of navigator.credentials.get(), serialized (e.g. PublicKeyCredential.toJSON() or @simplewebauthn/browser startAuthentication()).
|
|
23
|
+
*/
|
|
24
|
+
response: models.InlinePasskeyAssertion;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* `verified`: done. `wrong_identity`: the passkey used belongs to a different BotShield ID than the one this request is for (no code). `expired`: the challenge or the request expired — call passkey-options again (or create a new request). `failed`: see `code`.
|
|
29
|
+
*/
|
|
30
|
+
export const RequestPasskeyCompleteOutcome = {
|
|
31
|
+
Verified: "verified",
|
|
32
|
+
WrongIdentity: "wrong_identity",
|
|
33
|
+
Expired: "expired",
|
|
34
|
+
Failed: "failed",
|
|
35
|
+
} as const;
|
|
36
|
+
/**
|
|
37
|
+
* `verified`: done. `wrong_identity`: the passkey used belongs to a different BotShield ID than the one this request is for (no code). `expired`: the challenge or the request expired — call passkey-options again (or create a new request). `failed`: see `code`.
|
|
38
|
+
*/
|
|
39
|
+
export type RequestPasskeyCompleteOutcome = OpenEnum<
|
|
40
|
+
typeof RequestPasskeyCompleteOutcome
|
|
41
|
+
>;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The outcome only — no session, no BotShield ID, no token. On `verified` the completion has already run exactly as in the app (token minted, webhook sent — including `act` on an action request); collect the result as you already do.
|
|
45
|
+
*/
|
|
46
|
+
export type RequestPasskeyCompleteDataData = {
|
|
47
|
+
/**
|
|
48
|
+
* `verified`: done. `wrong_identity`: the passkey used belongs to a different BotShield ID than the one this request is for (no code). `expired`: the challenge or the request expired — call passkey-options again (or create a new request). `failed`: see `code`.
|
|
49
|
+
*/
|
|
50
|
+
outcome: RequestPasskeyCompleteOutcome;
|
|
51
|
+
/**
|
|
52
|
+
* A non-identifying reason you may branch on. Lane codes: `challenge_expired` (expired — unknown, used or stale challenge_id), `request_expired` (expired), `unknown_request`, `request_closed`, `link_changed` (the request no longer resolves to the person the challenge was issued for), `assertion_invalid`, `user_not_verified` (UV is required), `completion_failed`. Completion refusals (same as the app ceremony): `ceremony_user_mismatch` (the passkey answer names a different BotShield ID than the request; the request stays open), `already_trusted`, `rebind_requires_prior_id`, `gate_not_open`, `link_requires_user_ref`, `signup_required`, `real_days_not_met`, `pass_limit_reached`, `action_off` (the BotShield Action was turned off), `action_requires_user_ref`. Treat unknown codes as `failed`.
|
|
53
|
+
*/
|
|
54
|
+
code?: string | undefined;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export type RequestPasskeyCompleteData = {
|
|
58
|
+
/**
|
|
59
|
+
* The outcome only — no session, no BotShield ID, no token. On `verified` the completion has already run exactly as in the app (token minted, webhook sent — including `act` on an action request); collect the result as you already do.
|
|
60
|
+
*/
|
|
61
|
+
data?: RequestPasskeyCompleteDataData | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Handler error. Arrives inside `data.error` with HTTP 200. Check for it before reading the result.
|
|
64
|
+
*/
|
|
65
|
+
error?: models.ErrorBody | undefined;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The outcome at `data.data`. Handler errors arrive here too (HTTP 200) as `data.error`: `inline_not_for_age_gate` (400): the request is an Age Gate. This lane is for one named account; send the person to `data.error.url` (the app hand-off), where the age assertion is read.
|
|
70
|
+
*/
|
|
71
|
+
export type RequestPasskeyCompleteResponse = {
|
|
72
|
+
data: RequestPasskeyCompleteData;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/** @internal */
|
|
76
|
+
export const RequestPasskeyCompleteRequest$inboundSchema: z.ZodType<
|
|
77
|
+
RequestPasskeyCompleteRequest,
|
|
78
|
+
z.ZodTypeDef,
|
|
79
|
+
unknown
|
|
80
|
+
> = z.object({
|
|
81
|
+
request_id: types.string(),
|
|
82
|
+
challenge_id: types.string(),
|
|
83
|
+
response: models.InlinePasskeyAssertion$inboundSchema,
|
|
84
|
+
}).transform((v) => {
|
|
85
|
+
return remap$(v, {
|
|
86
|
+
"request_id": "requestId",
|
|
87
|
+
"challenge_id": "challengeId",
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
/** @internal */
|
|
91
|
+
export type RequestPasskeyCompleteRequest$Outbound = {
|
|
92
|
+
request_id: string;
|
|
93
|
+
challenge_id: string;
|
|
94
|
+
response: models.InlinePasskeyAssertion$Outbound;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
/** @internal */
|
|
98
|
+
export const RequestPasskeyCompleteRequest$outboundSchema: z.ZodType<
|
|
99
|
+
RequestPasskeyCompleteRequest$Outbound,
|
|
100
|
+
z.ZodTypeDef,
|
|
101
|
+
RequestPasskeyCompleteRequest
|
|
102
|
+
> = z.object({
|
|
103
|
+
requestId: z.string(),
|
|
104
|
+
challengeId: z.string(),
|
|
105
|
+
response: models.InlinePasskeyAssertion$outboundSchema,
|
|
106
|
+
}).transform((v) => {
|
|
107
|
+
return remap$(v, {
|
|
108
|
+
requestId: "request_id",
|
|
109
|
+
challengeId: "challenge_id",
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
export function requestPasskeyCompleteRequestToJSON(
|
|
114
|
+
requestPasskeyCompleteRequest: RequestPasskeyCompleteRequest,
|
|
115
|
+
): string {
|
|
116
|
+
return JSON.stringify(
|
|
117
|
+
RequestPasskeyCompleteRequest$outboundSchema.parse(
|
|
118
|
+
requestPasskeyCompleteRequest,
|
|
119
|
+
),
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
export function requestPasskeyCompleteRequestFromJSON(
|
|
123
|
+
jsonString: string,
|
|
124
|
+
): SafeParseResult<RequestPasskeyCompleteRequest, SDKValidationError> {
|
|
125
|
+
return safeParse(
|
|
126
|
+
jsonString,
|
|
127
|
+
(x) => RequestPasskeyCompleteRequest$inboundSchema.parse(JSON.parse(x)),
|
|
128
|
+
`Failed to parse 'RequestPasskeyCompleteRequest' from JSON`,
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** @internal */
|
|
133
|
+
export const RequestPasskeyCompleteOutcome$inboundSchema: z.ZodType<
|
|
134
|
+
RequestPasskeyCompleteOutcome,
|
|
135
|
+
z.ZodTypeDef,
|
|
136
|
+
unknown
|
|
137
|
+
> = openEnums.inboundSchema(RequestPasskeyCompleteOutcome);
|
|
138
|
+
/** @internal */
|
|
139
|
+
export const RequestPasskeyCompleteOutcome$outboundSchema: z.ZodType<
|
|
140
|
+
string,
|
|
141
|
+
z.ZodTypeDef,
|
|
142
|
+
RequestPasskeyCompleteOutcome
|
|
143
|
+
> = openEnums.outboundSchema(RequestPasskeyCompleteOutcome);
|
|
144
|
+
|
|
145
|
+
/** @internal */
|
|
146
|
+
export const RequestPasskeyCompleteDataData$inboundSchema: z.ZodType<
|
|
147
|
+
RequestPasskeyCompleteDataData,
|
|
148
|
+
z.ZodTypeDef,
|
|
149
|
+
unknown
|
|
150
|
+
> = z.object({
|
|
151
|
+
outcome: RequestPasskeyCompleteOutcome$inboundSchema,
|
|
152
|
+
code: types.optional(types.string()),
|
|
153
|
+
});
|
|
154
|
+
/** @internal */
|
|
155
|
+
export type RequestPasskeyCompleteDataData$Outbound = {
|
|
156
|
+
outcome: string;
|
|
157
|
+
code?: string | undefined;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
/** @internal */
|
|
161
|
+
export const RequestPasskeyCompleteDataData$outboundSchema: z.ZodType<
|
|
162
|
+
RequestPasskeyCompleteDataData$Outbound,
|
|
163
|
+
z.ZodTypeDef,
|
|
164
|
+
RequestPasskeyCompleteDataData
|
|
165
|
+
> = z.object({
|
|
166
|
+
outcome: RequestPasskeyCompleteOutcome$outboundSchema,
|
|
167
|
+
code: z.string().optional(),
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
export function requestPasskeyCompleteDataDataToJSON(
|
|
171
|
+
requestPasskeyCompleteDataData: RequestPasskeyCompleteDataData,
|
|
172
|
+
): string {
|
|
173
|
+
return JSON.stringify(
|
|
174
|
+
RequestPasskeyCompleteDataData$outboundSchema.parse(
|
|
175
|
+
requestPasskeyCompleteDataData,
|
|
176
|
+
),
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
export function requestPasskeyCompleteDataDataFromJSON(
|
|
180
|
+
jsonString: string,
|
|
181
|
+
): SafeParseResult<RequestPasskeyCompleteDataData, SDKValidationError> {
|
|
182
|
+
return safeParse(
|
|
183
|
+
jsonString,
|
|
184
|
+
(x) => RequestPasskeyCompleteDataData$inboundSchema.parse(JSON.parse(x)),
|
|
185
|
+
`Failed to parse 'RequestPasskeyCompleteDataData' from JSON`,
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/** @internal */
|
|
190
|
+
export const RequestPasskeyCompleteData$inboundSchema: z.ZodType<
|
|
191
|
+
RequestPasskeyCompleteData,
|
|
192
|
+
z.ZodTypeDef,
|
|
193
|
+
unknown
|
|
194
|
+
> = z.object({
|
|
195
|
+
data: types.optional(
|
|
196
|
+
z.lazy(() => RequestPasskeyCompleteDataData$inboundSchema),
|
|
197
|
+
),
|
|
198
|
+
error: types.optional(models.ErrorBody$inboundSchema),
|
|
199
|
+
});
|
|
200
|
+
/** @internal */
|
|
201
|
+
export type RequestPasskeyCompleteData$Outbound = {
|
|
202
|
+
data?: RequestPasskeyCompleteDataData$Outbound | undefined;
|
|
203
|
+
error?: models.ErrorBody$Outbound | undefined;
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
/** @internal */
|
|
207
|
+
export const RequestPasskeyCompleteData$outboundSchema: z.ZodType<
|
|
208
|
+
RequestPasskeyCompleteData$Outbound,
|
|
209
|
+
z.ZodTypeDef,
|
|
210
|
+
RequestPasskeyCompleteData
|
|
211
|
+
> = z.object({
|
|
212
|
+
data: z.lazy(() => RequestPasskeyCompleteDataData$outboundSchema).optional(),
|
|
213
|
+
error: models.ErrorBody$outboundSchema.optional(),
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
export function requestPasskeyCompleteDataToJSON(
|
|
217
|
+
requestPasskeyCompleteData: RequestPasskeyCompleteData,
|
|
218
|
+
): string {
|
|
219
|
+
return JSON.stringify(
|
|
220
|
+
RequestPasskeyCompleteData$outboundSchema.parse(requestPasskeyCompleteData),
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
export function requestPasskeyCompleteDataFromJSON(
|
|
224
|
+
jsonString: string,
|
|
225
|
+
): SafeParseResult<RequestPasskeyCompleteData, SDKValidationError> {
|
|
226
|
+
return safeParse(
|
|
227
|
+
jsonString,
|
|
228
|
+
(x) => RequestPasskeyCompleteData$inboundSchema.parse(JSON.parse(x)),
|
|
229
|
+
`Failed to parse 'RequestPasskeyCompleteData' from JSON`,
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/** @internal */
|
|
234
|
+
export const RequestPasskeyCompleteResponse$inboundSchema: z.ZodType<
|
|
235
|
+
RequestPasskeyCompleteResponse,
|
|
236
|
+
z.ZodTypeDef,
|
|
237
|
+
unknown
|
|
238
|
+
> = z.object({
|
|
239
|
+
data: z.lazy(() => RequestPasskeyCompleteData$inboundSchema),
|
|
240
|
+
});
|
|
241
|
+
/** @internal */
|
|
242
|
+
export type RequestPasskeyCompleteResponse$Outbound = {
|
|
243
|
+
data: RequestPasskeyCompleteData$Outbound;
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
/** @internal */
|
|
247
|
+
export const RequestPasskeyCompleteResponse$outboundSchema: z.ZodType<
|
|
248
|
+
RequestPasskeyCompleteResponse$Outbound,
|
|
249
|
+
z.ZodTypeDef,
|
|
250
|
+
RequestPasskeyCompleteResponse
|
|
251
|
+
> = z.object({
|
|
252
|
+
data: z.lazy(() => RequestPasskeyCompleteData$outboundSchema),
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
export function requestPasskeyCompleteResponseToJSON(
|
|
256
|
+
requestPasskeyCompleteResponse: RequestPasskeyCompleteResponse,
|
|
257
|
+
): string {
|
|
258
|
+
return JSON.stringify(
|
|
259
|
+
RequestPasskeyCompleteResponse$outboundSchema.parse(
|
|
260
|
+
requestPasskeyCompleteResponse,
|
|
261
|
+
),
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
export function requestPasskeyCompleteResponseFromJSON(
|
|
265
|
+
jsonString: string,
|
|
266
|
+
): SafeParseResult<RequestPasskeyCompleteResponse, SDKValidationError> {
|
|
267
|
+
return safeParse(
|
|
268
|
+
jsonString,
|
|
269
|
+
(x) => RequestPasskeyCompleteResponse$inboundSchema.parse(JSON.parse(x)),
|
|
270
|
+
`Failed to parse 'RequestPasskeyCompleteResponse' from JSON`,
|
|
271
|
+
);
|
|
272
|
+
}
|