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
|
@@ -4,11 +4,13 @@
|
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Census = void 0;
|
|
7
|
+
const census_confirm_link_js_1 = require("../funcs/census-confirm-link.js");
|
|
7
8
|
const census_create_session_js_1 = require("../funcs/census-create-session.js");
|
|
8
9
|
const census_create_verification_link_js_1 = require("../funcs/census-create-verification-link.js");
|
|
9
10
|
const census_get_partner_config_js_1 = require("../funcs/census-get-partner-config.js");
|
|
10
11
|
const census_logout_js_1 = require("../funcs/census-logout.js");
|
|
11
12
|
const census_revoke_verification_js_1 = require("../funcs/census-revoke-verification.js");
|
|
13
|
+
const census_send_by_number_js_1 = require("../funcs/census-send-by-number.js");
|
|
12
14
|
const census_store_signal_js_1 = require("../funcs/census-store-signal.js");
|
|
13
15
|
const census_validate_signal_js_1 = require("../funcs/census-validate-signal.js");
|
|
14
16
|
const census_verify_token_js_1 = require("../funcs/census-verify-token.js");
|
|
@@ -29,6 +31,8 @@ class Census extends sdks_js_1.ClientSDK {
|
|
|
29
31
|
*
|
|
30
32
|
* @remarks
|
|
31
33
|
* Creates a verification request (deep link, web URL, QR code) for a gate. Requires an anchor grant token from create-session. Returns 409 when a pending request already exists for the same gate and user.
|
|
34
|
+
*
|
|
35
|
+
* **A check sent to one person** (a request with `partner_user_ref` whose account is linked, pushed to the person's phones): one is open at a time per organization, environment and person. A newer one that is pushed replaces the open one, which ends `cancelled` with reason `superseded` (verification/status) and fires `gate.unavailable` once with `failure_code: "superseded"`. Pushes are capped per person per day (default 5 in 24 hours); over the cap the request is still created and its QR / deep link work, but nothing is pushed (`push_skipped: "daily_cap"`).
|
|
32
36
|
*/
|
|
33
37
|
async createVerificationLink(security, request, options) {
|
|
34
38
|
return (0, fp_js_1.unwrapAsync)((0, census_create_verification_link_js_1.censusCreateVerificationLink)(this, security, request, options));
|
|
@@ -37,7 +41,7 @@ class Census extends sdks_js_1.ClientSDK {
|
|
|
37
41
|
* Validate a verification token
|
|
38
42
|
*
|
|
39
43
|
* @remarks
|
|
40
|
-
* Validates a BotShield attestation JWT — the primary server-side check. Attestations are ES256-signed; the public key is published at /.well-known/jwks.json (kid in the header), so you may also verify locally with any JWT library. Claims are anonymous by construction: the token attests the event, never the person. Each attestation is for one organization (aud = its organization_id; pass `audience` to enforce it) and one check: a repeat check is refused (`valid: false`, `replayed: true`). Check it once, on your server.
|
|
44
|
+
* Validates a BotShield attestation JWT — the primary server-side check. Attestations are ES256-signed; the public key is published at /.well-known/jwks.json (kid in the header), so you may also verify locally with any JWT library. Claims are anonymous by construction: the token attests the event, never the person. Each attestation is for one organization (aud = its organization_id; pass `audience` to enforce it) and one check: a repeat check is refused (`valid: false`, `replayed: true`). Check it once, on your server. Each token names its `kind` (`verification` or `action`) and the `environment` it was issued in. A token of any other kind is refused, and when you call with your secret key (`Authorization: Bearer bs_…`) a token from the other environment is refused (a development token never passes a production check). A refused token is not spent.
|
|
41
45
|
*/
|
|
42
46
|
async verifyToken(security, request, options) {
|
|
43
47
|
return (0, fp_js_1.unwrapAsync)((0, census_verify_token_js_1.censusVerifyToken)(this, security, request, options));
|
|
@@ -84,6 +88,24 @@ class Census extends sdks_js_1.ClientSDK {
|
|
|
84
88
|
async logout(security, request, options) {
|
|
85
89
|
return (0, fp_js_1.unwrapAsync)((0, census_logout_js_1.censusLogout)(this, security, request, options));
|
|
86
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* Confirm a pending link
|
|
93
|
+
*
|
|
94
|
+
* @remarks
|
|
95
|
+
* 4.0: on a key with “Pending until your server confirms” on, a link waits after the person's tap (account.link_pending). Confirm it from your server with your SECRET key, sending the account your own session shows. The same account makes the link live (account.link_live, account.secured) and returns the finished token on this response only. Another account is refused and the waiting link is dropped. A link not confirmed within 24 hours expires. You can also confirm by passing `partner_user_ref` to sdk/verify-token with your secret key.
|
|
96
|
+
*/
|
|
97
|
+
async confirmLink(security, request, options) {
|
|
98
|
+
return (0, fp_js_1.unwrapAsync)((0, census_confirm_link_js_1.censusConfirmLink)(this, security, request, options));
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Send a request to verify by phone number
|
|
102
|
+
*
|
|
103
|
+
* @remarks
|
|
104
|
+
* 4.0: from your server, with your SECRET key, send a request to verify to the person whose BotShield ID carries this phone number. BotShield keeps none of your customer data: the number is used once and is not stored, logged or returned. The answer is the same whether or not anyone holds the number: status `sent`, the request id, its expiry and a two-digit `match_number` — show it to your customer; they pick it in the BotShield app before their passkey. Outcomes arrive as webhooks (or verification/status with this key): verified, declined, or expired. A person who has not linked your company first sees an introduction from you; your request can be answered only after they allow it. Production sends need a verified business. Limits: a cap per key per hour and on unanswered sends per company.
|
|
105
|
+
*/
|
|
106
|
+
async sendByNumber(security, request, options) {
|
|
107
|
+
return (0, fp_js_1.unwrapAsync)((0, census_send_by_number_js_1.censusSendByNumber)(this, security, request, options));
|
|
108
|
+
}
|
|
87
109
|
}
|
|
88
110
|
exports.Census = Census;
|
|
89
111
|
//# sourceMappingURL=census.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"census.js","sourceRoot":"","sources":["../../../src/sdk/census.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,gFAAwE;AACxE,oGAA2F;AAC3F,wFAA+E;AAC/E,gEAAyD;AACzD,0FAAkF;AAClF,4EAAoE;AACpE,kFAA0E;AAC1E,4EAAoE;AACpE,4CAA2D;AAE3D,0CAA6C;AAE7C,YAAoB,SAAQ,mBAAS;IACnC;;;;;OAKG;IACH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,QAAQ,EACR,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;CACF"}
|
|
@@ -22,11 +22,18 @@ export declare class GatesActions extends ClientSDK {
|
|
|
22
22
|
* Turn an action on (`live`) or `off` by its key. Off takes effect at once — new requests are refused with `action_off`, and a tap in flight fails at completion. Idempotent.
|
|
23
23
|
*/
|
|
24
24
|
setState(security: operations.GatesApiActionsSetStateSecurity, request: operations.GatesApiActionsSetStateRequest, options?: RequestOptions): Promise<operations.GatesApiActionsSetStateResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* Rename a BotShield Action, or mark it staff can send
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* Change an action's `name` (what the person reads on their card) or `staffCanSend` (your support team can send it to a customer), by its key. Send at least one.
|
|
30
|
+
*/
|
|
31
|
+
update(security: operations.GatesApiActionsUpdateSecurity, request: operations.GatesApiActionsUpdateRequest, options?: RequestOptions): Promise<operations.GatesApiActionsUpdateResponse>;
|
|
25
32
|
/**
|
|
26
33
|
* Ask a linked person to confirm an action
|
|
27
34
|
*
|
|
28
35
|
* @remarks
|
|
29
|
-
* An agent asks, a person confirms. Puts ONE BotShield Action in front of a person already linked to your company, as a card in their BotShield app naming the agent that asked. The person approves with their passkey, which signs the act itself. Collect the action token with gates-api/actions/request-status and check it with sdk/verify-token (claims.act), exactly as for a tapped action. Idempotent on (agent, request_id).
|
|
36
|
+
* An agent asks, a person confirms. Puts ONE BotShield Action in front of a person already linked to your company, as a card in their BotShield app naming the agent that asked. The person approves with their passkey, which signs the act itself. Collect the action token with gates-api/actions/request-status and check it with sdk/verify-token (claims.act), exactly as for a tapped action. Idempotent on (agent, request_id). Or address the person by `phone_number` (no link needed beforehand; see the field).
|
|
30
37
|
*/
|
|
31
38
|
request(security: operations.GatesApiActionsRequestSecurity, request: operations.GatesApiActionsRequestRequest, options?: RequestOptions): Promise<operations.GatesApiActionsRequestResponse>;
|
|
32
39
|
/**
|
|
@@ -36,5 +43,12 @@ export declare class GatesActions extends ClientSDK {
|
|
|
36
43
|
* Status of a request from gates-api/actions/request. `wait_seconds` (≤ 25) holds the call until the status changes. Once `approved`, `token` is the action token (claims.act) for `token_expires_in` seconds — check it with sdk/verify-token; it works once. After the collection window (10 minutes from the approval) the status stays `approved` with `token: null`.
|
|
37
44
|
*/
|
|
38
45
|
requestStatus(security: operations.GatesApiActionsRequestStatusSecurity, request: operations.GatesApiActionsRequestStatusRequest, options?: RequestOptions): Promise<operations.GatesApiActionsRequestStatusResponse>;
|
|
46
|
+
/**
|
|
47
|
+
* Withdraw an action request
|
|
48
|
+
*
|
|
49
|
+
* @remarks
|
|
50
|
+
* Withdraws a request you sent with actions/request while it is still waiting for the person. The card leaves their BotShield app. A request that was already answered, expired or withdrawn comes back as it stands with already_resolved true; an approval cannot be undone here. A withdrawn request is not billed.
|
|
51
|
+
*/
|
|
52
|
+
requestCancel(security: operations.GatesApiActionsRequestCancelSecurity, request: operations.GatesApiActionsRequestCancelRequest, options?: RequestOptions): Promise<operations.GatesApiActionsRequestCancelResponse>;
|
|
39
53
|
}
|
|
40
54
|
//# sourceMappingURL=gates-actions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gates-actions.d.ts","sourceRoot":"","sources":["../../../src/sdk/gates-actions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gates-actions.d.ts","sourceRoot":"","sources":["../../../src/sdk/gates-actions.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,YAAa,SAAQ,SAAS;IACzC;;;;;OAKG;IACG,MAAM,CACV,QAAQ,EAAE,UAAU,CAAC,6BAA6B,EAClD,OAAO,EAAE,UAAU,CAAC,4BAA4B,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,6BAA6B,CAAC,CAOnD;IAED;;;;;OAKG;IACG,IAAI,CACR,QAAQ,EAAE,UAAU,CAAC,2BAA2B,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,2BAA2B,CAAC,CAMjD;IAED;;;;;OAKG;IACG,QAAQ,CACZ,QAAQ,EAAE,UAAU,CAAC,+BAA+B,EACpD,OAAO,EAAE,UAAU,CAAC,8BAA8B,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,+BAA+B,CAAC,CAOrD;IAED;;;;;OAKG;IACG,MAAM,CACV,QAAQ,EAAE,UAAU,CAAC,6BAA6B,EAClD,OAAO,EAAE,UAAU,CAAC,4BAA4B,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,6BAA6B,CAAC,CAOnD;IAED;;;;;OAKG;IACG,OAAO,CACX,QAAQ,EAAE,UAAU,CAAC,8BAA8B,EACnD,OAAO,EAAE,UAAU,CAAC,6BAA6B,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAOpD;IAED;;;;;OAKG;IACG,aAAa,CACjB,QAAQ,EAAE,UAAU,CAAC,oCAAoC,EACzD,OAAO,EAAE,UAAU,CAAC,mCAAmC,EACvD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,oCAAoC,CAAC,CAO1D;IAED;;;;;OAKG;IACG,aAAa,CACjB,QAAQ,EAAE,UAAU,CAAC,oCAAoC,EACzD,OAAO,EAAE,UAAU,CAAC,mCAAmC,EACvD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,oCAAoC,CAAC,CAO1D;CACF"}
|
|
@@ -6,9 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.GatesActions = void 0;
|
|
7
7
|
const gates_actions_create_js_1 = require("../funcs/gates-actions-create.js");
|
|
8
8
|
const gates_actions_list_js_1 = require("../funcs/gates-actions-list.js");
|
|
9
|
+
const gates_actions_request_cancel_js_1 = require("../funcs/gates-actions-request-cancel.js");
|
|
9
10
|
const gates_actions_request_status_js_1 = require("../funcs/gates-actions-request-status.js");
|
|
10
11
|
const gates_actions_request_js_1 = require("../funcs/gates-actions-request.js");
|
|
11
12
|
const gates_actions_set_state_js_1 = require("../funcs/gates-actions-set-state.js");
|
|
13
|
+
const gates_actions_update_js_1 = require("../funcs/gates-actions-update.js");
|
|
12
14
|
const sdks_js_1 = require("../lib/sdks.js");
|
|
13
15
|
const fp_js_1 = require("../types/fp.js");
|
|
14
16
|
class GatesActions extends sdks_js_1.ClientSDK {
|
|
@@ -39,11 +41,20 @@ class GatesActions extends sdks_js_1.ClientSDK {
|
|
|
39
41
|
async setState(security, request, options) {
|
|
40
42
|
return (0, fp_js_1.unwrapAsync)((0, gates_actions_set_state_js_1.gatesActionsSetState)(this, security, request, options));
|
|
41
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Rename a BotShield Action, or mark it staff can send
|
|
46
|
+
*
|
|
47
|
+
* @remarks
|
|
48
|
+
* Change an action's `name` (what the person reads on their card) or `staffCanSend` (your support team can send it to a customer), by its key. Send at least one.
|
|
49
|
+
*/
|
|
50
|
+
async update(security, request, options) {
|
|
51
|
+
return (0, fp_js_1.unwrapAsync)((0, gates_actions_update_js_1.gatesActionsUpdate)(this, security, request, options));
|
|
52
|
+
}
|
|
42
53
|
/**
|
|
43
54
|
* Ask a linked person to confirm an action
|
|
44
55
|
*
|
|
45
56
|
* @remarks
|
|
46
|
-
* An agent asks, a person confirms. Puts ONE BotShield Action in front of a person already linked to your company, as a card in their BotShield app naming the agent that asked. The person approves with their passkey, which signs the act itself. Collect the action token with gates-api/actions/request-status and check it with sdk/verify-token (claims.act), exactly as for a tapped action. Idempotent on (agent, request_id).
|
|
57
|
+
* An agent asks, a person confirms. Puts ONE BotShield Action in front of a person already linked to your company, as a card in their BotShield app naming the agent that asked. The person approves with their passkey, which signs the act itself. Collect the action token with gates-api/actions/request-status and check it with sdk/verify-token (claims.act), exactly as for a tapped action. Idempotent on (agent, request_id). Or address the person by `phone_number` (no link needed beforehand; see the field).
|
|
47
58
|
*/
|
|
48
59
|
async request(security, request, options) {
|
|
49
60
|
return (0, fp_js_1.unwrapAsync)((0, gates_actions_request_js_1.gatesActionsRequest)(this, security, request, options));
|
|
@@ -57,6 +68,15 @@ class GatesActions extends sdks_js_1.ClientSDK {
|
|
|
57
68
|
async requestStatus(security, request, options) {
|
|
58
69
|
return (0, fp_js_1.unwrapAsync)((0, gates_actions_request_status_js_1.gatesActionsRequestStatus)(this, security, request, options));
|
|
59
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Withdraw an action request
|
|
73
|
+
*
|
|
74
|
+
* @remarks
|
|
75
|
+
* Withdraws a request you sent with actions/request while it is still waiting for the person. The card leaves their BotShield app. A request that was already answered, expired or withdrawn comes back as it stands with already_resolved true; an approval cannot be undone here. A withdrawn request is not billed.
|
|
76
|
+
*/
|
|
77
|
+
async requestCancel(security, request, options) {
|
|
78
|
+
return (0, fp_js_1.unwrapAsync)((0, gates_actions_request_cancel_js_1.gatesActionsRequestCancel)(this, security, request, options));
|
|
79
|
+
}
|
|
60
80
|
}
|
|
61
81
|
exports.GatesActions = GatesActions;
|
|
62
82
|
//# sourceMappingURL=gates-actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gates-actions.js","sourceRoot":"","sources":["../../../src/sdk/gates-actions.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,8EAAsE;AACtE,0EAAkE;AAClE,8FAAqF;AACrF,gFAAwE;AACxE,oFAA2E;AAC3E,4CAA2D;AAE3D,0CAA6C;AAE7C,kBAA0B,SAAQ,mBAAS;IACzC;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,QAAkD,EAClD,OAAgD,EAChD,OAAwB,EAC2B;QACnD,OAAO,IAAA,mBAAW,EAAC,IAAA,4CAAkB,EACnC,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;IAED;;;;;OAKG;IACH,KAAK,CAAC,IAAI,CACR,QAAgD,EAChD,OAAwB,EACyB;QACjD,OAAO,IAAA,mBAAW,EAAC,IAAA,wCAAgB,EACjC,IAAI,EACJ,QAAQ,EACR,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;IAED;;;;;OAKG;IACH,KAAK,CAAC,QAAQ,CACZ,QAAoD,EACpD,OAAkD,EAClD,OAAwB,EAC6B;QACrD,OAAO,IAAA,mBAAW,EAAC,IAAA,iDAAoB,EACrC,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;IAED;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CACX,QAAmD,EACnD,OAAiD,EACjD,OAAwB,EAC4B;QACpD,OAAO,IAAA,mBAAW,EAAC,IAAA,8CAAmB,EACpC,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;IAED;;;;;OAKG;IACH,KAAK,CAAC,aAAa,CACjB,QAAyD,EACzD,OAAuD,EACvD,OAAwB,EACkC;QAC1D,OAAO,IAAA,mBAAW,EAAC,IAAA,2DAAyB,EAC1C,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;CACF"}
|
|
1
|
+
{"version":3,"file":"gates-actions.js","sourceRoot":"","sources":["../../../src/sdk/gates-actions.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,8EAAsE;AACtE,0EAAkE;AAClE,8FAAqF;AACrF,8FAAqF;AACrF,gFAAwE;AACxE,oFAA2E;AAC3E,8EAAsE;AACtE,4CAA2D;AAE3D,0CAA6C;AAE7C,kBAA0B,SAAQ,mBAAS;IACzC;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,QAAkD,EAClD,OAAgD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kC;QAC1D,OAAO,IAAA,mBAAW,EAAC,IAAA,2DAAyB,EAC1C,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;CACF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
2
|
+
import * as operations from "../models/operations/index.js";
|
|
3
|
+
export declare class InlinePasskey extends ClientSDK {
|
|
4
|
+
/**
|
|
5
|
+
* Start the inline passkey for one request
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* Partner inline lane, step 1. Returns WebAuthn request options whose `allowCredentials` are the passkeys of the ONE BotShield ID this request is for (the id it was issued for, else the active link for its `partner_user_ref`), or the app fallback. Public — no API key; the request_id is the credential. Works for gate requests and BotShield Action requests (`act`); refuses an Age Gate.
|
|
9
|
+
*
|
|
10
|
+
* Wire: HTTP 200 with the result at `data.data`; a refusal at `data.error`.
|
|
11
|
+
*/
|
|
12
|
+
getOptions(request: operations.RequestPasskeyOptionsRequest, options?: RequestOptions): Promise<operations.RequestPasskeyOptionsResponse>;
|
|
13
|
+
/**
|
|
14
|
+
* Finish the inline passkey for one request
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* Partner inline lane, step 2. Verifies the assertion against the challenge bound to THIS request and its one BotShield ID (user verification required), then runs the same completion as the BotShield app (token minted, partner webhook, gate / act events). Returns `{ outcome, code? }` only. The challenge is single use and is burned on every path.
|
|
18
|
+
*
|
|
19
|
+
* Wire: HTTP 200 with the result at `data.data`; a refusal at `data.error`.
|
|
20
|
+
*/
|
|
21
|
+
complete(request: operations.RequestPasskeyCompleteRequest, options?: RequestOptions): Promise<operations.RequestPasskeyCompleteResponse>;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=inline-passkey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-passkey.d.ts","sourceRoot":"","sources":["../../../src/sdk/inline-passkey.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,aAAc,SAAQ,SAAS;IAC1C;;;;;;;OAOG;IACG,UAAU,CACd,OAAO,EAAE,UAAU,CAAC,4BAA4B,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,6BAA6B,CAAC,CAMnD;IAED;;;;;;;OAOG;IACG,QAAQ,CACZ,OAAO,EAAE,UAAU,CAAC,6BAA6B,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAMpD;CACF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.InlinePasskey = void 0;
|
|
7
|
+
const inline_passkey_complete_js_1 = require("../funcs/inline-passkey-complete.js");
|
|
8
|
+
const inline_passkey_get_options_js_1 = require("../funcs/inline-passkey-get-options.js");
|
|
9
|
+
const sdks_js_1 = require("../lib/sdks.js");
|
|
10
|
+
const fp_js_1 = require("../types/fp.js");
|
|
11
|
+
class InlinePasskey extends sdks_js_1.ClientSDK {
|
|
12
|
+
/**
|
|
13
|
+
* Start the inline passkey for one request
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* Partner inline lane, step 1. Returns WebAuthn request options whose `allowCredentials` are the passkeys of the ONE BotShield ID this request is for (the id it was issued for, else the active link for its `partner_user_ref`), or the app fallback. Public — no API key; the request_id is the credential. Works for gate requests and BotShield Action requests (`act`); refuses an Age Gate.
|
|
17
|
+
*
|
|
18
|
+
* Wire: HTTP 200 with the result at `data.data`; a refusal at `data.error`.
|
|
19
|
+
*/
|
|
20
|
+
async getOptions(request, options) {
|
|
21
|
+
return (0, fp_js_1.unwrapAsync)((0, inline_passkey_get_options_js_1.inlinePasskeyGetOptions)(this, request, options));
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Finish the inline passkey for one request
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* Partner inline lane, step 2. Verifies the assertion against the challenge bound to THIS request and its one BotShield ID (user verification required), then runs the same completion as the BotShield app (token minted, partner webhook, gate / act events). Returns `{ outcome, code? }` only. The challenge is single use and is burned on every path.
|
|
28
|
+
*
|
|
29
|
+
* Wire: HTTP 200 with the result at `data.data`; a refusal at `data.error`.
|
|
30
|
+
*/
|
|
31
|
+
async complete(request, options) {
|
|
32
|
+
return (0, fp_js_1.unwrapAsync)((0, inline_passkey_complete_js_1.inlinePasskeyComplete)(this, request, options));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.InlinePasskey = InlinePasskey;
|
|
36
|
+
//# sourceMappingURL=inline-passkey.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-passkey.js","sourceRoot":"","sources":["../../../src/sdk/inline-passkey.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,oFAA4E;AAC5E,0FAAiF;AACjF,4CAA2D;AAE3D,0CAA6C;AAE7C,mBAA2B,SAAQ,mBAAS;IAC1C;;;;;;;OAOG;IACH,KAAK,CAAC,UAAU,CACd,OAAgD,EAChD,OAAwB,EAC2B;QACnD,OAAO,IAAA,mBAAW,EAAC,IAAA,uDAAuB,EACxC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,QAAQ,CACZ,OAAiD,EACjD,OAAwB,EAC4B;QACpD,OAAO,IAAA,mBAAW,EAAC,IAAA,kDAAqB,EACtC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;CACF"}
|
|
@@ -2,18 +2,21 @@ import { ClientSDK } from "../lib/sdks.js";
|
|
|
2
2
|
import { Actions } from "./actions.js";
|
|
3
3
|
import { Census } from "./census.js";
|
|
4
4
|
import { Gates } from "./gates.js";
|
|
5
|
+
import { InlinePasskey } from "./inline-passkey.js";
|
|
5
6
|
import { SecuredAccounts } from "./secured-accounts.js";
|
|
6
7
|
import { Verification } from "./verification.js";
|
|
7
8
|
export declare class BotShield extends ClientSDK {
|
|
8
9
|
private _census?;
|
|
9
10
|
get census(): Census;
|
|
10
|
-
private _verification?;
|
|
11
|
-
get verification(): Verification;
|
|
12
11
|
private _actions?;
|
|
13
12
|
get actions(): Actions;
|
|
13
|
+
private _verification?;
|
|
14
|
+
get verification(): Verification;
|
|
14
15
|
private _securedAccounts?;
|
|
15
16
|
get securedAccounts(): SecuredAccounts;
|
|
16
17
|
private _gates?;
|
|
17
18
|
get gates(): Gates;
|
|
19
|
+
private _inlinePasskey?;
|
|
20
|
+
get inlinePasskey(): InlinePasskey;
|
|
18
21
|
}
|
|
19
22
|
//# sourceMappingURL=sdk.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/sdk/sdk.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,qBAAa,SAAU,SAAQ,SAAS;IACtC,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/sdk/sdk.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,qBAAa,SAAU,SAAQ,SAAS;IACtC,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,OAAO,CAAC,QAAQ,CAAC,CAAU;IAC3B,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,OAAO,CAAC,aAAa,CAAC,CAAe;IACrC,IAAI,YAAY,IAAI,YAAY,CAE/B;IAED,OAAO,CAAC,gBAAgB,CAAC,CAAkB;IAC3C,IAAI,eAAe,IAAI,eAAe,CAErC;IAED,OAAO,CAAC,MAAM,CAAC,CAAQ;IACvB,IAAI,KAAK,IAAI,KAAK,CAEjB;IAED,OAAO,CAAC,cAAc,CAAC,CAAgB;IACvC,IAAI,aAAa,IAAI,aAAa,CAEjC;CACF"}
|
package/dist/commonjs/sdk/sdk.js
CHANGED
|
@@ -8,6 +8,7 @@ const sdks_js_1 = require("../lib/sdks.js");
|
|
|
8
8
|
const actions_js_1 = require("./actions.js");
|
|
9
9
|
const census_js_1 = require("./census.js");
|
|
10
10
|
const gates_js_1 = require("./gates.js");
|
|
11
|
+
const inline_passkey_js_1 = require("./inline-passkey.js");
|
|
11
12
|
const secured_accounts_js_1 = require("./secured-accounts.js");
|
|
12
13
|
const verification_js_1 = require("./verification.js");
|
|
13
14
|
class BotShield extends sdks_js_1.ClientSDK {
|
|
@@ -15,14 +16,14 @@ class BotShield extends sdks_js_1.ClientSDK {
|
|
|
15
16
|
get census() {
|
|
16
17
|
return (this._census ?? (this._census = new census_js_1.Census(this._options)));
|
|
17
18
|
}
|
|
18
|
-
_verification;
|
|
19
|
-
get verification() {
|
|
20
|
-
return (this._verification ?? (this._verification = new verification_js_1.Verification(this._options)));
|
|
21
|
-
}
|
|
22
19
|
_actions;
|
|
23
20
|
get actions() {
|
|
24
21
|
return (this._actions ?? (this._actions = new actions_js_1.Actions(this._options)));
|
|
25
22
|
}
|
|
23
|
+
_verification;
|
|
24
|
+
get verification() {
|
|
25
|
+
return (this._verification ?? (this._verification = new verification_js_1.Verification(this._options)));
|
|
26
|
+
}
|
|
26
27
|
_securedAccounts;
|
|
27
28
|
get securedAccounts() {
|
|
28
29
|
return (this._securedAccounts ?? (this._securedAccounts = new secured_accounts_js_1.SecuredAccounts(this._options)));
|
|
@@ -31,6 +32,10 @@ class BotShield extends sdks_js_1.ClientSDK {
|
|
|
31
32
|
get gates() {
|
|
32
33
|
return (this._gates ?? (this._gates = new gates_js_1.Gates(this._options)));
|
|
33
34
|
}
|
|
35
|
+
_inlinePasskey;
|
|
36
|
+
get inlinePasskey() {
|
|
37
|
+
return (this._inlinePasskey ?? (this._inlinePasskey = new inline_passkey_js_1.InlinePasskey(this._options)));
|
|
38
|
+
}
|
|
34
39
|
}
|
|
35
40
|
exports.BotShield = BotShield;
|
|
36
41
|
//# sourceMappingURL=sdk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../../../src/sdk/sdk.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,4CAA2C;AAC3C,6CAAuC;AACvC,2CAAqC;AACrC,yCAAmC;AACnC,+DAAwD;AACxD,uDAAiD;AAEjD,eAAuB,SAAQ,mBAAS;IAC9B,OAAO,CAAU;IACzB,IAAI,MAAM,GAAW;QACnB,OAAO,CAAC,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AC,EAAC,CAAC;IAAA,CACnD;IAEO,cAAc,CAAiB;IACvC,IAAI,aAAa,GAAkB;QACjC,OAAO,CAAC,IAAI,CAAC,cAAc,KAAnB,IAAI,CAAC,cAAc,GAAK,IAAI,iCAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAAA,CACnE;CACF"}
|
|
@@ -5,7 +5,7 @@ export declare class Verification extends ClientSDK {
|
|
|
5
5
|
* Check verification status
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
|
-
* Poll a verification request. Carries the signed attestation on completion and NO identity — no user_email, partner_user_id, auth_mode, or botshield_user_id ever cross this boundary.
|
|
8
|
+
* Poll a verification request. Carries the signed attestation on completion and NO identity — no user_email, partner_user_id, auth_mode, or botshield_user_id ever cross this boundary. Called without a key, it is rate-limited per client address (a page polling every 2 seconds stays well inside it); over the limit the call is refused with HTTP 403 and `errors[0].code = "RATE_LIMITED"`.
|
|
9
9
|
*/
|
|
10
10
|
getStatus(security: operations.VerificationGetStatusSecurity, request: operations.VerificationGetStatusRequest, options?: RequestOptions): Promise<operations.VerificationGetStatusResponse>;
|
|
11
11
|
}
|
|
@@ -12,7 +12,7 @@ class Verification extends sdks_js_1.ClientSDK {
|
|
|
12
12
|
* Check verification status
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Poll a verification request. Carries the signed attestation on completion and NO identity — no user_email, partner_user_id, auth_mode, or botshield_user_id ever cross this boundary.
|
|
15
|
+
* Poll a verification request. Carries the signed attestation on completion and NO identity — no user_email, partner_user_id, auth_mode, or botshield_user_id ever cross this boundary. Called without a key, it is rate-limited per client address (a page polling every 2 seconds stays well inside it); over the limit the call is refused with HTTP 403 and `errors[0].code = "RATE_LIMITED"`.
|
|
16
16
|
*/
|
|
17
17
|
async getStatus(security, request, options) {
|
|
18
18
|
return (0, fp_js_1.unwrapAsync)((0, verification_get_status_js_1.verificationGetStatus)(this, security, request, options));
|
|
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
|
|
|
12
12
|
* Propose an action for human confirmation
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Queue a human-presence-gated action for a BotShield user. The user receives the card in the BotShield app (Agents Ask), confirms or denies with their passkey, and BotShield delivers a signed Proof of Resolution JWT to your registered callback URL (or poll check-status). Identify the user by opaque_id — the pairwise id from the bind ceremony. Authentication: agent key (bs_agent_<name>__<secret>) in the Authorization header.
|
|
15
|
+
* Queue a human-presence-gated action for a BotShield user. The user receives the card in the BotShield app (Agents Ask), confirms or denies with their passkey, and BotShield delivers a signed Proof of Resolution JWT to your registered callback URL (or poll check-status). Identify the user by opaque_id — the pairwise id from the bind ceremony. Authentication: agent key (bs_agent_<name>__<secret>) in the Authorization header. Or address the person by `phone_number` (no link needed beforehand; see the field).
|
|
16
16
|
*/
|
|
17
17
|
export declare function actionsProposeAction(client: BotShieldCore, request: operations.ActionsProposeRequest, options?: RequestOptions): APIPromise<Result<operations.ActionsProposeResponse, errors.InvalidInputError | errors.ErrorResponse | BotShieldError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
18
|
//# sourceMappingURL=actions-propose-action.d.ts.map
|
|
@@ -15,7 +15,7 @@ import { APIPromise } from "../types/async.js";
|
|
|
15
15
|
* Propose an action for human confirmation
|
|
16
16
|
*
|
|
17
17
|
* @remarks
|
|
18
|
-
* Queue a human-presence-gated action for a BotShield user. The user receives the card in the BotShield app (Agents Ask), confirms or denies with their passkey, and BotShield delivers a signed Proof of Resolution JWT to your registered callback URL (or poll check-status). Identify the user by opaque_id — the pairwise id from the bind ceremony. Authentication: agent key (bs_agent_<name>__<secret>) in the Authorization header.
|
|
18
|
+
* Queue a human-presence-gated action for a BotShield user. The user receives the card in the BotShield app (Agents Ask), confirms or denies with their passkey, and BotShield delivers a signed Proof of Resolution JWT to your registered callback URL (or poll check-status). Identify the user by opaque_id — the pairwise id from the bind ceremony. Authentication: agent key (bs_agent_<name>__<secret>) in the Authorization header. Or address the person by `phone_number` (no link needed beforehand; see the field).
|
|
19
19
|
*/
|
|
20
20
|
export function actionsProposeAction(client, request, options) {
|
|
21
21
|
return new APIPromise($do(client, request, options));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BotShieldCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { BotShieldError } from "../models/errors/bot-shield-error.js";
|
|
4
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/http-client-errors.js";
|
|
5
|
+
import * as errors from "../models/errors/index.js";
|
|
6
|
+
import { ResponseValidationError } from "../models/errors/response-validation-error.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
|
|
8
|
+
import * as operations from "../models/operations/index.js";
|
|
9
|
+
import { APIPromise } from "../types/async.js";
|
|
10
|
+
import { Result } from "../types/fp.js";
|
|
11
|
+
/**
|
|
12
|
+
* Check a Proof of Resolution (works once)
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* An approved ask mints a proof that the agent reads with agentlink/check-status. Send it here before acting on it. The first check answers valid true with what was approved; every later check answers valid false with replayed true. Checking the signature yourself against the public keys shows the proof is real, not that it is unused. Call with the agent's own key (for a proof minted for that agent) or the company's secret key (for a proof minted for one of its agents).
|
|
16
|
+
*/
|
|
17
|
+
export declare function actionsVerifyResolution(client: BotShieldCore, security: operations.SDKVerifyResolutionSecurity, request: operations.SDKVerifyResolutionRequest, options?: RequestOptions): APIPromise<Result<operations.SDKVerifyResolutionResponse, errors.InvalidInputError | errors.ErrorResponse | BotShieldError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
|
+
//# sourceMappingURL=actions-verify-resolution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions-verify-resolution.d.ts","sourceRoot":"","sources":["../../../src/funcs/actions-verify-resolution.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAM3C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,UAAU,CAAC,2BAA2B,EAChD,OAAO,EAAE,UAAU,CAAC,0BAA0B,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,2BAA2B,EACpC,MAAM,CAAC,iBAAiB,GACxB,MAAM,CAAC,aAAa,GACpB,cAAc,GACd,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAOA"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import { encodeJSON } from "../lib/encodings.js";
|
|
5
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
6
|
+
import * as M from "../lib/matchers.js";
|
|
7
|
+
import { compactMap } from "../lib/primitives.js";
|
|
8
|
+
import { safeParse } from "../lib/schemas.js";
|
|
9
|
+
import { resolveSecurity } from "../lib/security.js";
|
|
10
|
+
import { pathToFunc } from "../lib/url.js";
|
|
11
|
+
import * as errors from "../models/errors/index.js";
|
|
12
|
+
import * as operations from "../models/operations/index.js";
|
|
13
|
+
import { APIPromise } from "../types/async.js";
|
|
14
|
+
/**
|
|
15
|
+
* Check a Proof of Resolution (works once)
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* An approved ask mints a proof that the agent reads with agentlink/check-status. Send it here before acting on it. The first check answers valid true with what was approved; every later check answers valid false with replayed true. Checking the signature yourself against the public keys shows the proof is real, not that it is unused. Call with the agent's own key (for a proof minted for that agent) or the company's secret key (for a proof minted for one of its agents).
|
|
19
|
+
*/
|
|
20
|
+
export function actionsVerifyResolution(client, security, request, options) {
|
|
21
|
+
return new APIPromise($do(client, security, request, options));
|
|
22
|
+
}
|
|
23
|
+
async function $do(client, security, request, options) {
|
|
24
|
+
const parsed = safeParse(request, (value) => operations.SDKVerifyResolutionRequest$outboundSchema.parse(value), "Input validation failed");
|
|
25
|
+
if (!parsed.ok) {
|
|
26
|
+
return [parsed, { status: "invalid" }];
|
|
27
|
+
}
|
|
28
|
+
const payload = parsed.value;
|
|
29
|
+
const body = encodeJSON("body", payload, { explode: true });
|
|
30
|
+
const path = pathToFunc("/sdk/verify-resolution")();
|
|
31
|
+
const headers = new Headers(compactMap({
|
|
32
|
+
"Content-Type": "application/json",
|
|
33
|
+
Accept: "application/json",
|
|
34
|
+
}));
|
|
35
|
+
const requestSecurity = resolveSecurity([
|
|
36
|
+
{
|
|
37
|
+
fieldName: "Authorization",
|
|
38
|
+
type: "apiKey:header",
|
|
39
|
+
value: security?.agentKeyAuth,
|
|
40
|
+
},
|
|
41
|
+
], [
|
|
42
|
+
{
|
|
43
|
+
fieldName: "Authorization",
|
|
44
|
+
type: "apiKey:header",
|
|
45
|
+
value: security?.apiKeyAuth,
|
|
46
|
+
},
|
|
47
|
+
]);
|
|
48
|
+
const context = {
|
|
49
|
+
options: client._options,
|
|
50
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
51
|
+
operationID: "SdkVerifyResolution",
|
|
52
|
+
oAuth2Scopes: null,
|
|
53
|
+
resolvedSecurity: requestSecurity,
|
|
54
|
+
securitySource: security,
|
|
55
|
+
retryConfig: options?.retries
|
|
56
|
+
|| client._options.retryConfig
|
|
57
|
+
|| { strategy: "none" },
|
|
58
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
59
|
+
};
|
|
60
|
+
const requestRes = client._createRequest(context, {
|
|
61
|
+
security: requestSecurity,
|
|
62
|
+
method: "POST",
|
|
63
|
+
baseURL: options?.serverURL,
|
|
64
|
+
path: path,
|
|
65
|
+
headers: headers,
|
|
66
|
+
body: body,
|
|
67
|
+
userAgent: client._options.userAgent,
|
|
68
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
69
|
+
}, options);
|
|
70
|
+
if (!requestRes.ok) {
|
|
71
|
+
return [requestRes, { status: "invalid" }];
|
|
72
|
+
}
|
|
73
|
+
const req = requestRes.value;
|
|
74
|
+
const doResult = await client._do(req, {
|
|
75
|
+
context,
|
|
76
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
77
|
+
retryConfig: context.retryConfig,
|
|
78
|
+
retryCodes: context.retryCodes,
|
|
79
|
+
});
|
|
80
|
+
if (!doResult.ok) {
|
|
81
|
+
return [doResult, { status: "request-error", request: req }];
|
|
82
|
+
}
|
|
83
|
+
const response = doResult.value;
|
|
84
|
+
const responseFields = {
|
|
85
|
+
HttpMeta: { Response: response, Request: req },
|
|
86
|
+
};
|
|
87
|
+
const [result] = await M.match(M.json(200, operations.SDKVerifyResolutionResponse$inboundSchema), M.jsonErr(400, errors.InvalidInputError$inboundSchema), M.jsonErr(500, errors.ErrorResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
88
|
+
if (!result.ok) {
|
|
89
|
+
return [result, { status: "complete", request: req, response }];
|
|
90
|
+
}
|
|
91
|
+
return [result, { status: "complete", request: req, response }];
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=actions-verify-resolution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions-verify-resolution.js","sourceRoot":"","sources":["../../../src/funcs/actions-verify-resolution.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAS3C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AAGpD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGxD;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CACrC,MAAqB,EACrB,QAAgD,EAChD,OAA8C,EAC9C,OAAwB,EAexB;IACA,OAAO,IAAI,UAAU,CAAC,GAAG,CACvB,MAAM,EACN,QAAQ,EACR,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AAAA,CACJ;AAED,KAAK,UAAU,GAAG,CAChB,MAAqB,EACrB,QAAgD,EAChD,OAA8C,EAC9C,OAAwB,EAkBxB;IACA,MAAM,MAAM,GAAG,SAAS,CACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CACR,UA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AC/C,CAAC;IAEF,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAa5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,yCAAyC,CAAC,EACjE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,+BAA+B,CAAC,EACtD,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,2BAA2B,CAAC,EAClD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAAA,CACjE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BotShieldCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { BotShieldError } from "../models/errors/bot-shield-error.js";
|
|
4
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/http-client-errors.js";
|
|
5
|
+
import { ResponseValidationError } from "../models/errors/response-validation-error.js";
|
|
6
|
+
import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
|
|
7
|
+
import * as operations from "../models/operations/index.js";
|
|
8
|
+
import { APIPromise } from "../types/async.js";
|
|
9
|
+
import { Result } from "../types/fp.js";
|
|
10
|
+
/**
|
|
11
|
+
* Confirm a pending link
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* 4.0: on a key with “Pending until your server confirms” on, a link waits after the person's tap (account.link_pending). Confirm it from your server with your SECRET key, sending the account your own session shows. The same account makes the link live (account.link_live, account.secured) and returns the finished token on this response only. Another account is refused and the waiting link is dropped. A link not confirmed within 24 hours expires. You can also confirm by passing `partner_user_ref` to sdk/verify-token with your secret key.
|
|
15
|
+
*/
|
|
16
|
+
export declare function censusConfirmLink(client: BotShieldCore, security: operations.SDKConfirmLinkSecurity, request: operations.SDKConfirmLinkRequest, options?: RequestOptions): APIPromise<Result<operations.SDKConfirmLinkResponse, BotShieldError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
17
|
+
//# sourceMappingURL=census-confirm-link.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"census-confirm-link.d.ts","sourceRoot":"","sources":["../../../src/funcs/census-confirm-link.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAM3C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,UAAU,CAAC,sBAAsB,EAC3C,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,sBAAsB,EAC/B,cAAc,GACd,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAOA"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import { encodeJSON } from "../lib/encodings.js";
|
|
5
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
6
|
+
import * as M from "../lib/matchers.js";
|
|
7
|
+
import { compactMap } from "../lib/primitives.js";
|
|
8
|
+
import { safeParse } from "../lib/schemas.js";
|
|
9
|
+
import { resolveSecurity } from "../lib/security.js";
|
|
10
|
+
import { pathToFunc } from "../lib/url.js";
|
|
11
|
+
import * as operations from "../models/operations/index.js";
|
|
12
|
+
import { APIPromise } from "../types/async.js";
|
|
13
|
+
/**
|
|
14
|
+
* Confirm a pending link
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* 4.0: on a key with “Pending until your server confirms” on, a link waits after the person's tap (account.link_pending). Confirm it from your server with your SECRET key, sending the account your own session shows. The same account makes the link live (account.link_live, account.secured) and returns the finished token on this response only. Another account is refused and the waiting link is dropped. A link not confirmed within 24 hours expires. You can also confirm by passing `partner_user_ref` to sdk/verify-token with your secret key.
|
|
18
|
+
*/
|
|
19
|
+
export function censusConfirmLink(client, security, request, options) {
|
|
20
|
+
return new APIPromise($do(client, security, request, options));
|
|
21
|
+
}
|
|
22
|
+
async function $do(client, security, request, options) {
|
|
23
|
+
const parsed = safeParse(request, (value) => operations.SDKConfirmLinkRequest$outboundSchema.parse(value), "Input validation failed");
|
|
24
|
+
if (!parsed.ok) {
|
|
25
|
+
return [parsed, { status: "invalid" }];
|
|
26
|
+
}
|
|
27
|
+
const payload = parsed.value;
|
|
28
|
+
const body = encodeJSON("body", payload, { explode: true });
|
|
29
|
+
const path = pathToFunc("/sdk/confirm-link")();
|
|
30
|
+
const headers = new Headers(compactMap({
|
|
31
|
+
"Content-Type": "application/json",
|
|
32
|
+
Accept: "application/json",
|
|
33
|
+
}));
|
|
34
|
+
const requestSecurity = resolveSecurity([
|
|
35
|
+
{
|
|
36
|
+
fieldName: "Authorization",
|
|
37
|
+
type: "apiKey:header",
|
|
38
|
+
value: security?.apiKeyAuth,
|
|
39
|
+
},
|
|
40
|
+
]);
|
|
41
|
+
const context = {
|
|
42
|
+
options: client._options,
|
|
43
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
44
|
+
operationID: "SdkConfirmLink",
|
|
45
|
+
oAuth2Scopes: null,
|
|
46
|
+
resolvedSecurity: requestSecurity,
|
|
47
|
+
securitySource: security,
|
|
48
|
+
retryConfig: options?.retries
|
|
49
|
+
|| client._options.retryConfig
|
|
50
|
+
|| { strategy: "none" },
|
|
51
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
52
|
+
};
|
|
53
|
+
const requestRes = client._createRequest(context, {
|
|
54
|
+
security: requestSecurity,
|
|
55
|
+
method: "POST",
|
|
56
|
+
baseURL: options?.serverURL,
|
|
57
|
+
path: path,
|
|
58
|
+
headers: headers,
|
|
59
|
+
body: body,
|
|
60
|
+
userAgent: client._options.userAgent,
|
|
61
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
62
|
+
}, options);
|
|
63
|
+
if (!requestRes.ok) {
|
|
64
|
+
return [requestRes, { status: "invalid" }];
|
|
65
|
+
}
|
|
66
|
+
const req = requestRes.value;
|
|
67
|
+
const doResult = await client._do(req, {
|
|
68
|
+
context,
|
|
69
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
70
|
+
retryConfig: context.retryConfig,
|
|
71
|
+
retryCodes: context.retryCodes,
|
|
72
|
+
});
|
|
73
|
+
if (!doResult.ok) {
|
|
74
|
+
return [doResult, { status: "request-error", request: req }];
|
|
75
|
+
}
|
|
76
|
+
const response = doResult.value;
|
|
77
|
+
const [result] = await M.match(M.json(200, operations.SDKConfirmLinkResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req);
|
|
78
|
+
if (!result.ok) {
|
|
79
|
+
return [result, { status: "complete", request: req, response }];
|
|
80
|
+
}
|
|
81
|
+
return [result, { status: "complete", request: req, response }];
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=census-confirm-link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"census-confirm-link.js","sourceRoot":"","sources":["../../../src/funcs/census-confirm-link.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAW3C,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGxD;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAC/B,MAAqB,EACrB,QAA2C,EAC3C,OAAyC,EACzC,OAAwB,EAaxB;IACA,OAAO,IAAI,UAAU,CAAC,GAAG,CACvB,MAAM,EACN,QAAQ,EACR,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AAAA,CACJ;AAED,KAAK,UAAU,GAAG,CAChB,MAAqB,EACrB,QAA2C,EAC3C,OAAyC,E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