botshield-sdk 2.3.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -2
- package/bin/mcp-server.js +1129 -52
- package/bin/mcp-server.js.map +34 -24
- package/dist/commonjs/funcs/actions-propose-action.d.ts +1 -1
- package/dist/commonjs/funcs/actions-propose-action.js +1 -1
- package/dist/commonjs/funcs/actions-verify-resolution.d.ts +18 -0
- package/dist/commonjs/funcs/actions-verify-resolution.d.ts.map +1 -0
- package/dist/commonjs/funcs/actions-verify-resolution.js +129 -0
- package/dist/commonjs/funcs/actions-verify-resolution.js.map +1 -0
- package/dist/commonjs/funcs/census-confirm-link.d.ts +17 -0
- package/dist/commonjs/funcs/census-confirm-link.d.ts.map +1 -0
- package/dist/commonjs/funcs/census-confirm-link.js +119 -0
- package/dist/commonjs/funcs/census-confirm-link.js.map +1 -0
- package/dist/commonjs/funcs/census-create-verification-link.d.ts +2 -0
- package/dist/commonjs/funcs/census-create-verification-link.d.ts.map +1 -1
- package/dist/commonjs/funcs/census-create-verification-link.js +2 -0
- package/dist/commonjs/funcs/census-create-verification-link.js.map +1 -1
- package/dist/commonjs/funcs/census-send-by-number.d.ts +18 -0
- package/dist/commonjs/funcs/census-send-by-number.d.ts.map +1 -0
- package/dist/commonjs/funcs/census-send-by-number.js +123 -0
- package/dist/commonjs/funcs/census-send-by-number.js.map +1 -0
- package/dist/commonjs/funcs/census-verify-token.d.ts +1 -1
- package/dist/commonjs/funcs/census-verify-token.js +1 -1
- package/dist/commonjs/funcs/gates-actions-request-cancel.d.ts +18 -0
- package/dist/commonjs/funcs/gates-actions-request-cancel.d.ts.map +1 -0
- package/dist/commonjs/funcs/gates-actions-request-cancel.js +123 -0
- package/dist/commonjs/funcs/gates-actions-request-cancel.js.map +1 -0
- package/dist/commonjs/funcs/gates-actions-request-status.js +1 -0
- package/dist/commonjs/funcs/gates-actions-request-status.js.map +1 -1
- package/dist/commonjs/funcs/gates-actions-request.d.ts +1 -1
- package/dist/commonjs/funcs/gates-actions-request.js +1 -1
- package/dist/commonjs/funcs/gates-actions-update.d.ts +18 -0
- package/dist/commonjs/funcs/gates-actions-update.d.ts.map +1 -0
- package/dist/commonjs/funcs/gates-actions-update.js +123 -0
- package/dist/commonjs/funcs/gates-actions-update.js.map +1 -0
- package/dist/commonjs/funcs/recovery-exchange.d.ts +18 -0
- package/dist/commonjs/funcs/recovery-exchange.d.ts.map +1 -0
- package/dist/commonjs/funcs/recovery-exchange.js +123 -0
- package/dist/commonjs/funcs/recovery-exchange.js.map +1 -0
- package/dist/commonjs/funcs/recovery-other-route.d.ts +18 -0
- package/dist/commonjs/funcs/recovery-other-route.d.ts.map +1 -0
- package/dist/commonjs/funcs/recovery-other-route.js +123 -0
- package/dist/commonjs/funcs/recovery-other-route.js.map +1 -0
- package/dist/commonjs/funcs/sign-in-confirm.d.ts +18 -0
- package/dist/commonjs/funcs/sign-in-confirm.d.ts.map +1 -0
- package/dist/commonjs/funcs/sign-in-confirm.js +123 -0
- package/dist/commonjs/funcs/sign-in-confirm.js.map +1 -0
- package/dist/commonjs/funcs/sign-in-request.d.ts +18 -0
- package/dist/commonjs/funcs/sign-in-request.d.ts.map +1 -0
- package/dist/commonjs/funcs/sign-in-request.js +123 -0
- package/dist/commonjs/funcs/sign-in-request.js.map +1 -0
- package/dist/commonjs/funcs/verification-get-status.d.ts +1 -1
- package/dist/commonjs/funcs/verification-get-status.js +2 -1
- package/dist/commonjs/funcs/verification-get-status.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/models/bot-shield-action.d.ts +46 -0
- package/dist/commonjs/models/bot-shield-action.d.ts.map +1 -1
- package/dist/commonjs/models/bot-shield-action.js +36 -1
- package/dist/commonjs/models/bot-shield-action.js.map +1 -1
- package/dist/commonjs/models/error-body.d.ts +6 -1
- package/dist/commonjs/models/error-body.d.ts.map +1 -1
- package/dist/commonjs/models/error-body.js +4 -0
- package/dist/commonjs/models/error-body.js.map +1 -1
- package/dist/commonjs/models/gate-unavailable-event.d.ts +112 -0
- package/dist/commonjs/models/gate-unavailable-event.d.ts.map +1 -0
- package/dist/commonjs/models/gate-unavailable-event.js +137 -0
- package/dist/commonjs/models/gate-unavailable-event.js.map +1 -0
- package/dist/commonjs/models/gates-api-error.d.ts +5 -0
- package/dist/commonjs/models/gates-api-error.d.ts.map +1 -1
- package/dist/commonjs/models/gates-api-error.js +11 -0
- package/dist/commonjs/models/gates-api-error.js.map +1 -1
- package/dist/commonjs/models/index.d.ts +1 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +1 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/operations/actions-propose.d.ts +21 -1
- package/dist/commonjs/models/operations/actions-propose.d.ts.map +1 -1
- package/dist/commonjs/models/operations/actions-propose.js +16 -0
- package/dist/commonjs/models/operations/actions-propose.js.map +1 -1
- package/dist/commonjs/models/operations/gates-api-actions-create.d.ts +11 -1
- package/dist/commonjs/models/operations/gates-api-actions-create.d.ts.map +1 -1
- package/dist/commonjs/models/operations/gates-api-actions-create.js +4 -0
- package/dist/commonjs/models/operations/gates-api-actions-create.js.map +1 -1
- package/dist/commonjs/models/operations/gates-api-actions-list.d.ts +1 -1
- package/dist/commonjs/models/operations/gates-api-actions-request-cancel.d.ts +113 -0
- package/dist/commonjs/models/operations/gates-api-actions-request-cancel.d.ts.map +1 -0
- package/dist/commonjs/models/operations/gates-api-actions-request-cancel.js +178 -0
- package/dist/commonjs/models/operations/gates-api-actions-request-cancel.js.map +1 -0
- package/dist/commonjs/models/operations/gates-api-actions-request-status.d.ts +5 -0
- package/dist/commonjs/models/operations/gates-api-actions-request-status.d.ts.map +1 -1
- package/dist/commonjs/models/operations/gates-api-actions-request-status.js +2 -0
- package/dist/commonjs/models/operations/gates-api-actions-request-status.js.map +1 -1
- package/dist/commonjs/models/operations/gates-api-actions-request.d.ts +34 -4
- package/dist/commonjs/models/operations/gates-api-actions-request.d.ts.map +1 -1
- package/dist/commonjs/models/operations/gates-api-actions-request.js +32 -3
- package/dist/commonjs/models/operations/gates-api-actions-request.js.map +1 -1
- package/dist/commonjs/models/operations/gates-api-actions-set-state.d.ts +1 -1
- package/dist/commonjs/models/operations/gates-api-actions-update.d.ts +99 -0
- package/dist/commonjs/models/operations/gates-api-actions-update.d.ts.map +1 -0
- package/dist/commonjs/models/operations/gates-api-actions-update.js +141 -0
- package/dist/commonjs/models/operations/gates-api-actions-update.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +9 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +9 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/recovery-exchange.d.ts +114 -0
- package/dist/commonjs/models/operations/recovery-exchange.d.ts.map +1 -0
- package/dist/commonjs/models/operations/recovery-exchange.js +164 -0
- package/dist/commonjs/models/operations/recovery-exchange.js.map +1 -0
- package/dist/commonjs/models/operations/recovery-other-route.d.ts +86 -0
- package/dist/commonjs/models/operations/recovery-other-route.d.ts.map +1 -0
- package/dist/commonjs/models/operations/recovery-other-route.js +145 -0
- package/dist/commonjs/models/operations/recovery-other-route.js.map +1 -0
- package/dist/commonjs/models/operations/request-passkey-complete.d.ts +1 -1
- package/dist/commonjs/models/operations/sdk-confirm-link.d.ts +130 -0
- package/dist/commonjs/models/operations/sdk-confirm-link.d.ts.map +1 -0
- package/dist/commonjs/models/operations/sdk-confirm-link.js +205 -0
- package/dist/commonjs/models/operations/sdk-confirm-link.js.map +1 -0
- package/dist/commonjs/models/operations/sdk-create-session.d.ts +1 -1
- package/dist/commonjs/models/operations/sdk-create-verification-link.d.ts +48 -2
- package/dist/commonjs/models/operations/sdk-create-verification-link.d.ts.map +1 -1
- package/dist/commonjs/models/operations/sdk-create-verification-link.js +34 -1
- package/dist/commonjs/models/operations/sdk-create-verification-link.js.map +1 -1
- package/dist/commonjs/models/operations/sdk-send-by-number.d.ts +124 -0
- package/dist/commonjs/models/operations/sdk-send-by-number.d.ts.map +1 -0
- package/dist/commonjs/models/operations/sdk-send-by-number.js +203 -0
- package/dist/commonjs/models/operations/sdk-send-by-number.js.map +1 -0
- package/dist/commonjs/models/operations/sdk-verify-resolution.d.ts +125 -0
- package/dist/commonjs/models/operations/sdk-verify-resolution.d.ts.map +1 -0
- package/dist/commonjs/models/operations/sdk-verify-resolution.js +182 -0
- package/dist/commonjs/models/operations/sdk-verify-resolution.js.map +1 -0
- package/dist/commonjs/models/operations/sdk-verify-token.d.ts +110 -1
- package/dist/commonjs/models/operations/sdk-verify-token.d.ts.map +1 -1
- package/dist/commonjs/models/operations/sdk-verify-token.js +96 -1
- package/dist/commonjs/models/operations/sdk-verify-token.js.map +1 -1
- package/dist/commonjs/models/operations/signin-confirm.d.ts +148 -0
- package/dist/commonjs/models/operations/signin-confirm.d.ts.map +1 -0
- package/dist/commonjs/models/operations/signin-confirm.js +202 -0
- package/dist/commonjs/models/operations/signin-confirm.js.map +1 -0
- package/dist/commonjs/models/operations/signin-request.d.ts +115 -0
- package/dist/commonjs/models/operations/signin-request.d.ts.map +1 -0
- package/dist/commonjs/models/operations/signin-request.js +174 -0
- package/dist/commonjs/models/operations/signin-request.js.map +1 -0
- package/dist/commonjs/models/operations/verification-get-status.d.ts +45 -5
- package/dist/commonjs/models/operations/verification-get-status.d.ts.map +1 -1
- package/dist/commonjs/models/operations/verification-get-status.js +37 -2
- package/dist/commonjs/models/operations/verification-get-status.js.map +1 -1
- package/dist/commonjs/models/passes-per-person.d.ts +1 -1
- package/dist/commonjs/sdk/actions.d.ts +8 -1
- package/dist/commonjs/sdk/actions.d.ts.map +1 -1
- package/dist/commonjs/sdk/actions.js +11 -1
- package/dist/commonjs/sdk/actions.js.map +1 -1
- package/dist/commonjs/sdk/census.d.ts +17 -1
- package/dist/commonjs/sdk/census.d.ts.map +1 -1
- package/dist/commonjs/sdk/census.js +23 -1
- package/dist/commonjs/sdk/census.js.map +1 -1
- package/dist/commonjs/sdk/gates-actions.d.ts +15 -1
- package/dist/commonjs/sdk/gates-actions.d.ts.map +1 -1
- package/dist/commonjs/sdk/gates-actions.js +21 -1
- package/dist/commonjs/sdk/gates-actions.js.map +1 -1
- package/dist/commonjs/sdk/recovery.d.ts +19 -0
- package/dist/commonjs/sdk/recovery.d.ts.map +1 -0
- package/dist/commonjs/sdk/recovery.js +32 -0
- package/dist/commonjs/sdk/recovery.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +8 -2
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +14 -4
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/commonjs/sdk/sign-in.d.ts +19 -0
- package/dist/commonjs/sdk/sign-in.d.ts.map +1 -0
- package/dist/commonjs/sdk/sign-in.js +32 -0
- package/dist/commonjs/sdk/sign-in.js.map +1 -0
- package/dist/commonjs/sdk/verification.d.ts +1 -1
- package/dist/commonjs/sdk/verification.js +1 -1
- package/dist/esm/funcs/actions-propose-action.d.ts +1 -1
- package/dist/esm/funcs/actions-propose-action.js +1 -1
- package/dist/esm/funcs/actions-verify-resolution.d.ts +18 -0
- package/dist/esm/funcs/actions-verify-resolution.d.ts.map +1 -0
- package/dist/esm/funcs/actions-verify-resolution.js +93 -0
- package/dist/esm/funcs/actions-verify-resolution.js.map +1 -0
- package/dist/esm/funcs/census-confirm-link.d.ts +17 -0
- package/dist/esm/funcs/census-confirm-link.d.ts.map +1 -0
- package/dist/esm/funcs/census-confirm-link.js +83 -0
- package/dist/esm/funcs/census-confirm-link.js.map +1 -0
- package/dist/esm/funcs/census-create-verification-link.d.ts +2 -0
- package/dist/esm/funcs/census-create-verification-link.d.ts.map +1 -1
- package/dist/esm/funcs/census-create-verification-link.js +2 -0
- package/dist/esm/funcs/census-create-verification-link.js.map +1 -1
- package/dist/esm/funcs/census-send-by-number.d.ts +18 -0
- package/dist/esm/funcs/census-send-by-number.d.ts.map +1 -0
- package/dist/esm/funcs/census-send-by-number.js +87 -0
- package/dist/esm/funcs/census-send-by-number.js.map +1 -0
- package/dist/esm/funcs/census-verify-token.d.ts +1 -1
- package/dist/esm/funcs/census-verify-token.js +1 -1
- package/dist/esm/funcs/gates-actions-request-cancel.d.ts +18 -0
- package/dist/esm/funcs/gates-actions-request-cancel.d.ts.map +1 -0
- package/dist/esm/funcs/gates-actions-request-cancel.js +87 -0
- package/dist/esm/funcs/gates-actions-request-cancel.js.map +1 -0
- package/dist/esm/funcs/gates-actions-request-status.js +1 -0
- package/dist/esm/funcs/gates-actions-request-status.js.map +1 -1
- package/dist/esm/funcs/gates-actions-request.d.ts +1 -1
- package/dist/esm/funcs/gates-actions-request.js +1 -1
- package/dist/esm/funcs/gates-actions-update.d.ts +18 -0
- package/dist/esm/funcs/gates-actions-update.d.ts.map +1 -0
- package/dist/esm/funcs/gates-actions-update.js +87 -0
- package/dist/esm/funcs/gates-actions-update.js.map +1 -0
- package/dist/esm/funcs/recovery-exchange.d.ts +18 -0
- package/dist/esm/funcs/recovery-exchange.d.ts.map +1 -0
- package/dist/esm/funcs/recovery-exchange.js +87 -0
- package/dist/esm/funcs/recovery-exchange.js.map +1 -0
- package/dist/esm/funcs/recovery-other-route.d.ts +18 -0
- package/dist/esm/funcs/recovery-other-route.d.ts.map +1 -0
- package/dist/esm/funcs/recovery-other-route.js +87 -0
- package/dist/esm/funcs/recovery-other-route.js.map +1 -0
- package/dist/esm/funcs/sign-in-confirm.d.ts +18 -0
- package/dist/esm/funcs/sign-in-confirm.d.ts.map +1 -0
- package/dist/esm/funcs/sign-in-confirm.js +87 -0
- package/dist/esm/funcs/sign-in-confirm.js.map +1 -0
- package/dist/esm/funcs/sign-in-request.d.ts +18 -0
- package/dist/esm/funcs/sign-in-request.d.ts.map +1 -0
- package/dist/esm/funcs/sign-in-request.js +87 -0
- package/dist/esm/funcs/sign-in-request.js.map +1 -0
- package/dist/esm/funcs/verification-get-status.d.ts +1 -1
- package/dist/esm/funcs/verification-get-status.js +3 -2
- package/dist/esm/funcs/verification-get-status.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/models/bot-shield-action.d.ts +46 -0
- package/dist/esm/models/bot-shield-action.d.ts.map +1 -1
- package/dist/esm/models/bot-shield-action.js +35 -0
- package/dist/esm/models/bot-shield-action.js.map +1 -1
- package/dist/esm/models/error-body.d.ts +6 -1
- package/dist/esm/models/error-body.d.ts.map +1 -1
- package/dist/esm/models/error-body.js +4 -0
- package/dist/esm/models/error-body.js.map +1 -1
- package/dist/esm/models/gate-unavailable-event.d.ts +112 -0
- package/dist/esm/models/gate-unavailable-event.d.ts.map +1 -0
- package/dist/esm/models/gate-unavailable-event.js +99 -0
- package/dist/esm/models/gate-unavailable-event.js.map +1 -0
- package/dist/esm/models/gates-api-error.d.ts +5 -0
- package/dist/esm/models/gates-api-error.d.ts.map +1 -1
- package/dist/esm/models/gates-api-error.js +11 -0
- package/dist/esm/models/gates-api-error.js.map +1 -1
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +1 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/operations/actions-propose.d.ts +21 -1
- package/dist/esm/models/operations/actions-propose.d.ts.map +1 -1
- package/dist/esm/models/operations/actions-propose.js +16 -0
- package/dist/esm/models/operations/actions-propose.js.map +1 -1
- package/dist/esm/models/operations/gates-api-actions-create.d.ts +11 -1
- package/dist/esm/models/operations/gates-api-actions-create.d.ts.map +1 -1
- package/dist/esm/models/operations/gates-api-actions-create.js +4 -0
- package/dist/esm/models/operations/gates-api-actions-create.js.map +1 -1
- package/dist/esm/models/operations/gates-api-actions-list.d.ts +1 -1
- package/dist/esm/models/operations/gates-api-actions-request-cancel.d.ts +113 -0
- package/dist/esm/models/operations/gates-api-actions-request-cancel.d.ts.map +1 -0
- package/dist/esm/models/operations/gates-api-actions-request-cancel.js +132 -0
- package/dist/esm/models/operations/gates-api-actions-request-cancel.js.map +1 -0
- package/dist/esm/models/operations/gates-api-actions-request-status.d.ts +5 -0
- package/dist/esm/models/operations/gates-api-actions-request-status.d.ts.map +1 -1
- package/dist/esm/models/operations/gates-api-actions-request-status.js +2 -0
- package/dist/esm/models/operations/gates-api-actions-request-status.js.map +1 -1
- package/dist/esm/models/operations/gates-api-actions-request.d.ts +34 -4
- package/dist/esm/models/operations/gates-api-actions-request.d.ts.map +1 -1
- package/dist/esm/models/operations/gates-api-actions-request.js +29 -2
- package/dist/esm/models/operations/gates-api-actions-request.js.map +1 -1
- package/dist/esm/models/operations/gates-api-actions-set-state.d.ts +1 -1
- package/dist/esm/models/operations/gates-api-actions-update.d.ts +99 -0
- package/dist/esm/models/operations/gates-api-actions-update.d.ts.map +1 -0
- package/dist/esm/models/operations/gates-api-actions-update.js +95 -0
- package/dist/esm/models/operations/gates-api-actions-update.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +9 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +9 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/recovery-exchange.d.ts +114 -0
- package/dist/esm/models/operations/recovery-exchange.d.ts.map +1 -0
- package/dist/esm/models/operations/recovery-exchange.js +118 -0
- package/dist/esm/models/operations/recovery-exchange.js.map +1 -0
- package/dist/esm/models/operations/recovery-other-route.d.ts +86 -0
- package/dist/esm/models/operations/recovery-other-route.d.ts.map +1 -0
- package/dist/esm/models/operations/recovery-other-route.js +99 -0
- package/dist/esm/models/operations/recovery-other-route.js.map +1 -0
- package/dist/esm/models/operations/request-passkey-complete.d.ts +1 -1
- package/dist/esm/models/operations/sdk-confirm-link.d.ts +130 -0
- package/dist/esm/models/operations/sdk-confirm-link.d.ts.map +1 -0
- package/dist/esm/models/operations/sdk-confirm-link.js +157 -0
- package/dist/esm/models/operations/sdk-confirm-link.js.map +1 -0
- package/dist/esm/models/operations/sdk-create-session.d.ts +1 -1
- package/dist/esm/models/operations/sdk-create-verification-link.d.ts +48 -2
- package/dist/esm/models/operations/sdk-create-verification-link.d.ts.map +1 -1
- package/dist/esm/models/operations/sdk-create-verification-link.js +33 -0
- package/dist/esm/models/operations/sdk-create-verification-link.js.map +1 -1
- package/dist/esm/models/operations/sdk-send-by-number.d.ts +124 -0
- package/dist/esm/models/operations/sdk-send-by-number.d.ts.map +1 -0
- package/dist/esm/models/operations/sdk-send-by-number.js +155 -0
- package/dist/esm/models/operations/sdk-send-by-number.js.map +1 -0
- package/dist/esm/models/operations/sdk-verify-resolution.d.ts +125 -0
- package/dist/esm/models/operations/sdk-verify-resolution.d.ts.map +1 -0
- package/dist/esm/models/operations/sdk-verify-resolution.js +136 -0
- package/dist/esm/models/operations/sdk-verify-resolution.js.map +1 -0
- package/dist/esm/models/operations/sdk-verify-token.d.ts +110 -1
- package/dist/esm/models/operations/sdk-verify-token.d.ts.map +1 -1
- package/dist/esm/models/operations/sdk-verify-token.js +93 -0
- package/dist/esm/models/operations/sdk-verify-token.js.map +1 -1
- package/dist/esm/models/operations/signin-confirm.d.ts +148 -0
- package/dist/esm/models/operations/signin-confirm.d.ts.map +1 -0
- package/dist/esm/models/operations/signin-confirm.js +156 -0
- package/dist/esm/models/operations/signin-confirm.js.map +1 -0
- package/dist/esm/models/operations/signin-request.d.ts +115 -0
- package/dist/esm/models/operations/signin-request.d.ts.map +1 -0
- package/dist/esm/models/operations/signin-request.js +128 -0
- package/dist/esm/models/operations/signin-request.js.map +1 -0
- package/dist/esm/models/operations/verification-get-status.d.ts +45 -5
- package/dist/esm/models/operations/verification-get-status.d.ts.map +1 -1
- package/dist/esm/models/operations/verification-get-status.js +36 -1
- package/dist/esm/models/operations/verification-get-status.js.map +1 -1
- package/dist/esm/models/passes-per-person.d.ts +1 -1
- package/dist/esm/sdk/actions.d.ts +8 -1
- package/dist/esm/sdk/actions.d.ts.map +1 -1
- package/dist/esm/sdk/actions.js +11 -1
- package/dist/esm/sdk/actions.js.map +1 -1
- package/dist/esm/sdk/census.d.ts +17 -1
- package/dist/esm/sdk/census.d.ts.map +1 -1
- package/dist/esm/sdk/census.js +23 -1
- package/dist/esm/sdk/census.js.map +1 -1
- package/dist/esm/sdk/gates-actions.d.ts +15 -1
- package/dist/esm/sdk/gates-actions.d.ts.map +1 -1
- package/dist/esm/sdk/gates-actions.js +21 -1
- package/dist/esm/sdk/gates-actions.js.map +1 -1
- package/dist/esm/sdk/recovery.d.ts +19 -0
- package/dist/esm/sdk/recovery.d.ts.map +1 -0
- package/dist/esm/sdk/recovery.js +28 -0
- package/dist/esm/sdk/recovery.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +8 -2
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +14 -4
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/dist/esm/sdk/sign-in.d.ts +19 -0
- package/dist/esm/sdk/sign-in.d.ts.map +1 -0
- package/dist/esm/sdk/sign-in.js +28 -0
- package/dist/esm/sdk/sign-in.js.map +1 -0
- package/dist/esm/sdk/verification.d.ts +1 -1
- package/dist/esm/sdk/verification.js +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/actions-propose-action.ts +1 -1
- package/src/funcs/actions-verify-resolution.ts +192 -0
- package/src/funcs/census-confirm-link.ts +171 -0
- package/src/funcs/census-create-verification-link.ts +2 -0
- package/src/funcs/census-send-by-number.ts +180 -0
- package/src/funcs/census-verify-token.ts +1 -1
- package/src/funcs/gates-actions-request-cancel.ts +187 -0
- package/src/funcs/gates-actions-request-status.ts +1 -0
- package/src/funcs/gates-actions-request.ts +1 -1
- package/src/funcs/gates-actions-update.ts +185 -0
- package/src/funcs/recovery-exchange.ts +184 -0
- package/src/funcs/recovery-other-route.ts +184 -0
- package/src/funcs/sign-in-confirm.ts +184 -0
- package/src/funcs/sign-in-request.ts +184 -0
- package/src/funcs/verification-get-status.ts +7 -2
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/bot-shield-action.ts +79 -0
- package/src/models/error-body.ts +10 -1
- package/src/models/gate-unavailable-event.ts +218 -0
- package/src/models/gates-api-error.ts +16 -0
- package/src/models/index.ts +1 -0
- package/src/models/operations/actions-propose.ts +37 -1
- package/src/models/operations/gates-api-actions-create.ts +15 -1
- package/src/models/operations/gates-api-actions-list.ts +1 -1
- package/src/models/operations/gates-api-actions-request-cancel.ts +339 -0
- package/src/models/operations/gates-api-actions-request-status.ts +7 -0
- package/src/models/operations/gates-api-actions-request.ts +83 -6
- package/src/models/operations/gates-api-actions-set-state.ts +1 -1
- package/src/models/operations/gates-api-actions-update.ts +281 -0
- package/src/models/operations/index.ts +9 -0
- package/src/models/operations/recovery-exchange.ts +308 -0
- package/src/models/operations/recovery-other-route.ts +262 -0
- package/src/models/operations/request-passkey-complete.ts +1 -1
- package/src/models/operations/sdk-confirm-link.ts +380 -0
- package/src/models/operations/sdk-create-session.ts +1 -1
- package/src/models/operations/sdk-create-verification-link.ts +78 -2
- package/src/models/operations/sdk-send-by-number.ts +372 -0
- package/src/models/operations/sdk-verify-resolution.ts +341 -0
- package/src/models/operations/sdk-verify-token.ts +214 -1
- package/src/models/operations/signin-confirm.ts +383 -0
- package/src/models/operations/signin-request.ts +319 -0
- package/src/models/operations/verification-get-status.ts +76 -5
- package/src/models/passes-per-person.ts +1 -1
- package/src/sdk/actions.ts +21 -1
- package/src/sdk/census.ts +43 -1
- package/src/sdk/gates-actions.ts +41 -1
- package/src/sdk/recovery.ts +49 -0
- package/src/sdk/sdk.ts +17 -5
- package/src/sdk/sign-in.ts +49 -0
- package/src/sdk/verification.ts +1 -1
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import * as types from "../../types/primitives.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
12
|
+
|
|
13
|
+
export type SDKSendByNumberSecurity = {
|
|
14
|
+
apiKeyAuth: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type SDKSendByNumberRequest = {
|
|
18
|
+
/**
|
|
19
|
+
* The customer's mobile number (E.164, or a 10-digit US number). Used for one lookup, then dropped.
|
|
20
|
+
*/
|
|
21
|
+
phoneNumber: string;
|
|
22
|
+
/**
|
|
23
|
+
* A live BotShield Action key. Its name is the reason the person reads.
|
|
24
|
+
*/
|
|
25
|
+
act: string;
|
|
26
|
+
/**
|
|
27
|
+
* Your own line on the card. No links.
|
|
28
|
+
*/
|
|
29
|
+
actLabel?: string | undefined;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const SDKSendByNumberStatus = {
|
|
33
|
+
Sent: "sent",
|
|
34
|
+
} as const;
|
|
35
|
+
export type SDKSendByNumberStatus = ClosedEnum<typeof SDKSendByNumberStatus>;
|
|
36
|
+
|
|
37
|
+
export type SDKSendByNumberDataData = {
|
|
38
|
+
status?: SDKSendByNumberStatus | undefined;
|
|
39
|
+
requestId?: string | undefined;
|
|
40
|
+
expiresAt?: Date | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Show this to your customer; they pick it in the app.
|
|
43
|
+
*/
|
|
44
|
+
matchNumber?: number | undefined;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export type SDKSendByNumberError = {
|
|
48
|
+
code?: string | undefined;
|
|
49
|
+
message?: string | undefined;
|
|
50
|
+
statusCode?: number | undefined;
|
|
51
|
+
retryAfterSeconds?: number | undefined;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export type SDKSendByNumberData = {
|
|
55
|
+
data?: SDKSendByNumberDataData | undefined;
|
|
56
|
+
error?: SDKSendByNumberError | undefined;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Result. NOTE: handler errors arrive here (HTTP 200) as data.error — codes: secret_key_required · invalid_key · phone_invalid · action_invalid · action_not_found · action_off · act_label_has_link · org_not_verified · send_rate_limited · unanswered_limit_reached · unavailable. 4.0: action_is_recovery · action_is_signin (400 — your Recovery Action and Sign-on Action are never sent).
|
|
61
|
+
*/
|
|
62
|
+
export type SDKSendByNumberResponse = {
|
|
63
|
+
data?: SDKSendByNumberData | undefined;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/** @internal */
|
|
67
|
+
export const SDKSendByNumberSecurity$inboundSchema: z.ZodType<
|
|
68
|
+
SDKSendByNumberSecurity,
|
|
69
|
+
z.ZodTypeDef,
|
|
70
|
+
unknown
|
|
71
|
+
> = z.object({
|
|
72
|
+
ApiKeyAuth: types.string(),
|
|
73
|
+
}).transform((v) => {
|
|
74
|
+
return remap$(v, {
|
|
75
|
+
"ApiKeyAuth": "apiKeyAuth",
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
/** @internal */
|
|
79
|
+
export type SDKSendByNumberSecurity$Outbound = {
|
|
80
|
+
ApiKeyAuth: string;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
/** @internal */
|
|
84
|
+
export const SDKSendByNumberSecurity$outboundSchema: z.ZodType<
|
|
85
|
+
SDKSendByNumberSecurity$Outbound,
|
|
86
|
+
z.ZodTypeDef,
|
|
87
|
+
SDKSendByNumberSecurity
|
|
88
|
+
> = z.object({
|
|
89
|
+
apiKeyAuth: z.string(),
|
|
90
|
+
}).transform((v) => {
|
|
91
|
+
return remap$(v, {
|
|
92
|
+
apiKeyAuth: "ApiKeyAuth",
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
export function sdkSendByNumberSecurityToJSON(
|
|
97
|
+
sdkSendByNumberSecurity: SDKSendByNumberSecurity,
|
|
98
|
+
): string {
|
|
99
|
+
return JSON.stringify(
|
|
100
|
+
SDKSendByNumberSecurity$outboundSchema.parse(sdkSendByNumberSecurity),
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
export function sdkSendByNumberSecurityFromJSON(
|
|
104
|
+
jsonString: string,
|
|
105
|
+
): SafeParseResult<SDKSendByNumberSecurity, SDKValidationError> {
|
|
106
|
+
return safeParse(
|
|
107
|
+
jsonString,
|
|
108
|
+
(x) => SDKSendByNumberSecurity$inboundSchema.parse(JSON.parse(x)),
|
|
109
|
+
`Failed to parse 'SDKSendByNumberSecurity' from JSON`,
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/** @internal */
|
|
114
|
+
export const SDKSendByNumberRequest$inboundSchema: z.ZodType<
|
|
115
|
+
SDKSendByNumberRequest,
|
|
116
|
+
z.ZodTypeDef,
|
|
117
|
+
unknown
|
|
118
|
+
> = z.object({
|
|
119
|
+
phone_number: types.string(),
|
|
120
|
+
act: types.string(),
|
|
121
|
+
act_label: types.optional(types.string()),
|
|
122
|
+
}).transform((v) => {
|
|
123
|
+
return remap$(v, {
|
|
124
|
+
"phone_number": "phoneNumber",
|
|
125
|
+
"act_label": "actLabel",
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
/** @internal */
|
|
129
|
+
export type SDKSendByNumberRequest$Outbound = {
|
|
130
|
+
phone_number: string;
|
|
131
|
+
act: string;
|
|
132
|
+
act_label?: string | undefined;
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
/** @internal */
|
|
136
|
+
export const SDKSendByNumberRequest$outboundSchema: z.ZodType<
|
|
137
|
+
SDKSendByNumberRequest$Outbound,
|
|
138
|
+
z.ZodTypeDef,
|
|
139
|
+
SDKSendByNumberRequest
|
|
140
|
+
> = z.object({
|
|
141
|
+
phoneNumber: z.string(),
|
|
142
|
+
act: z.string(),
|
|
143
|
+
actLabel: z.string().optional(),
|
|
144
|
+
}).transform((v) => {
|
|
145
|
+
return remap$(v, {
|
|
146
|
+
phoneNumber: "phone_number",
|
|
147
|
+
actLabel: "act_label",
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
export function sdkSendByNumberRequestToJSON(
|
|
152
|
+
sdkSendByNumberRequest: SDKSendByNumberRequest,
|
|
153
|
+
): string {
|
|
154
|
+
return JSON.stringify(
|
|
155
|
+
SDKSendByNumberRequest$outboundSchema.parse(sdkSendByNumberRequest),
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
export function sdkSendByNumberRequestFromJSON(
|
|
159
|
+
jsonString: string,
|
|
160
|
+
): SafeParseResult<SDKSendByNumberRequest, SDKValidationError> {
|
|
161
|
+
return safeParse(
|
|
162
|
+
jsonString,
|
|
163
|
+
(x) => SDKSendByNumberRequest$inboundSchema.parse(JSON.parse(x)),
|
|
164
|
+
`Failed to parse 'SDKSendByNumberRequest' from JSON`,
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/** @internal */
|
|
169
|
+
export const SDKSendByNumberStatus$inboundSchema: z.ZodNativeEnum<
|
|
170
|
+
typeof SDKSendByNumberStatus
|
|
171
|
+
> = z.nativeEnum(SDKSendByNumberStatus);
|
|
172
|
+
/** @internal */
|
|
173
|
+
export const SDKSendByNumberStatus$outboundSchema: z.ZodNativeEnum<
|
|
174
|
+
typeof SDKSendByNumberStatus
|
|
175
|
+
> = SDKSendByNumberStatus$inboundSchema;
|
|
176
|
+
|
|
177
|
+
/** @internal */
|
|
178
|
+
export const SDKSendByNumberDataData$inboundSchema: z.ZodType<
|
|
179
|
+
SDKSendByNumberDataData,
|
|
180
|
+
z.ZodTypeDef,
|
|
181
|
+
unknown
|
|
182
|
+
> = z.object({
|
|
183
|
+
status: types.optional(SDKSendByNumberStatus$inboundSchema),
|
|
184
|
+
request_id: types.optional(types.string()),
|
|
185
|
+
expires_at: types.optional(types.date()),
|
|
186
|
+
match_number: types.optional(types.number()),
|
|
187
|
+
}).transform((v) => {
|
|
188
|
+
return remap$(v, {
|
|
189
|
+
"request_id": "requestId",
|
|
190
|
+
"expires_at": "expiresAt",
|
|
191
|
+
"match_number": "matchNumber",
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
/** @internal */
|
|
195
|
+
export type SDKSendByNumberDataData$Outbound = {
|
|
196
|
+
status?: string | undefined;
|
|
197
|
+
request_id?: string | undefined;
|
|
198
|
+
expires_at?: string | undefined;
|
|
199
|
+
match_number?: number | undefined;
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
/** @internal */
|
|
203
|
+
export const SDKSendByNumberDataData$outboundSchema: z.ZodType<
|
|
204
|
+
SDKSendByNumberDataData$Outbound,
|
|
205
|
+
z.ZodTypeDef,
|
|
206
|
+
SDKSendByNumberDataData
|
|
207
|
+
> = z.object({
|
|
208
|
+
status: SDKSendByNumberStatus$outboundSchema.optional(),
|
|
209
|
+
requestId: z.string().optional(),
|
|
210
|
+
expiresAt: z.date().transform(v => v.toISOString()).optional(),
|
|
211
|
+
matchNumber: z.number().int().optional(),
|
|
212
|
+
}).transform((v) => {
|
|
213
|
+
return remap$(v, {
|
|
214
|
+
requestId: "request_id",
|
|
215
|
+
expiresAt: "expires_at",
|
|
216
|
+
matchNumber: "match_number",
|
|
217
|
+
});
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
export function sdkSendByNumberDataDataToJSON(
|
|
221
|
+
sdkSendByNumberDataData: SDKSendByNumberDataData,
|
|
222
|
+
): string {
|
|
223
|
+
return JSON.stringify(
|
|
224
|
+
SDKSendByNumberDataData$outboundSchema.parse(sdkSendByNumberDataData),
|
|
225
|
+
);
|
|
226
|
+
}
|
|
227
|
+
export function sdkSendByNumberDataDataFromJSON(
|
|
228
|
+
jsonString: string,
|
|
229
|
+
): SafeParseResult<SDKSendByNumberDataData, SDKValidationError> {
|
|
230
|
+
return safeParse(
|
|
231
|
+
jsonString,
|
|
232
|
+
(x) => SDKSendByNumberDataData$inboundSchema.parse(JSON.parse(x)),
|
|
233
|
+
`Failed to parse 'SDKSendByNumberDataData' from JSON`,
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/** @internal */
|
|
238
|
+
export const SDKSendByNumberError$inboundSchema: z.ZodType<
|
|
239
|
+
SDKSendByNumberError,
|
|
240
|
+
z.ZodTypeDef,
|
|
241
|
+
unknown
|
|
242
|
+
> = z.object({
|
|
243
|
+
code: types.optional(types.string()),
|
|
244
|
+
message: types.optional(types.string()),
|
|
245
|
+
statusCode: types.optional(types.number()),
|
|
246
|
+
retry_after_seconds: types.optional(types.number()),
|
|
247
|
+
}).transform((v) => {
|
|
248
|
+
return remap$(v, {
|
|
249
|
+
"retry_after_seconds": "retryAfterSeconds",
|
|
250
|
+
});
|
|
251
|
+
});
|
|
252
|
+
/** @internal */
|
|
253
|
+
export type SDKSendByNumberError$Outbound = {
|
|
254
|
+
code?: string | undefined;
|
|
255
|
+
message?: string | undefined;
|
|
256
|
+
statusCode?: number | undefined;
|
|
257
|
+
retry_after_seconds?: number | undefined;
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
/** @internal */
|
|
261
|
+
export const SDKSendByNumberError$outboundSchema: z.ZodType<
|
|
262
|
+
SDKSendByNumberError$Outbound,
|
|
263
|
+
z.ZodTypeDef,
|
|
264
|
+
SDKSendByNumberError
|
|
265
|
+
> = z.object({
|
|
266
|
+
code: z.string().optional(),
|
|
267
|
+
message: z.string().optional(),
|
|
268
|
+
statusCode: z.number().int().optional(),
|
|
269
|
+
retryAfterSeconds: z.number().int().optional(),
|
|
270
|
+
}).transform((v) => {
|
|
271
|
+
return remap$(v, {
|
|
272
|
+
retryAfterSeconds: "retry_after_seconds",
|
|
273
|
+
});
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
export function sdkSendByNumberErrorToJSON(
|
|
277
|
+
sdkSendByNumberError: SDKSendByNumberError,
|
|
278
|
+
): string {
|
|
279
|
+
return JSON.stringify(
|
|
280
|
+
SDKSendByNumberError$outboundSchema.parse(sdkSendByNumberError),
|
|
281
|
+
);
|
|
282
|
+
}
|
|
283
|
+
export function sdkSendByNumberErrorFromJSON(
|
|
284
|
+
jsonString: string,
|
|
285
|
+
): SafeParseResult<SDKSendByNumberError, SDKValidationError> {
|
|
286
|
+
return safeParse(
|
|
287
|
+
jsonString,
|
|
288
|
+
(x) => SDKSendByNumberError$inboundSchema.parse(JSON.parse(x)),
|
|
289
|
+
`Failed to parse 'SDKSendByNumberError' from JSON`,
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/** @internal */
|
|
294
|
+
export const SDKSendByNumberData$inboundSchema: z.ZodType<
|
|
295
|
+
SDKSendByNumberData,
|
|
296
|
+
z.ZodTypeDef,
|
|
297
|
+
unknown
|
|
298
|
+
> = z.object({
|
|
299
|
+
data: types.optional(z.lazy(() => SDKSendByNumberDataData$inboundSchema)),
|
|
300
|
+
error: types.optional(z.lazy(() => SDKSendByNumberError$inboundSchema)),
|
|
301
|
+
});
|
|
302
|
+
/** @internal */
|
|
303
|
+
export type SDKSendByNumberData$Outbound = {
|
|
304
|
+
data?: SDKSendByNumberDataData$Outbound | undefined;
|
|
305
|
+
error?: SDKSendByNumberError$Outbound | undefined;
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
/** @internal */
|
|
309
|
+
export const SDKSendByNumberData$outboundSchema: z.ZodType<
|
|
310
|
+
SDKSendByNumberData$Outbound,
|
|
311
|
+
z.ZodTypeDef,
|
|
312
|
+
SDKSendByNumberData
|
|
313
|
+
> = z.object({
|
|
314
|
+
data: z.lazy(() => SDKSendByNumberDataData$outboundSchema).optional(),
|
|
315
|
+
error: z.lazy(() => SDKSendByNumberError$outboundSchema).optional(),
|
|
316
|
+
});
|
|
317
|
+
|
|
318
|
+
export function sdkSendByNumberDataToJSON(
|
|
319
|
+
sdkSendByNumberData: SDKSendByNumberData,
|
|
320
|
+
): string {
|
|
321
|
+
return JSON.stringify(
|
|
322
|
+
SDKSendByNumberData$outboundSchema.parse(sdkSendByNumberData),
|
|
323
|
+
);
|
|
324
|
+
}
|
|
325
|
+
export function sdkSendByNumberDataFromJSON(
|
|
326
|
+
jsonString: string,
|
|
327
|
+
): SafeParseResult<SDKSendByNumberData, SDKValidationError> {
|
|
328
|
+
return safeParse(
|
|
329
|
+
jsonString,
|
|
330
|
+
(x) => SDKSendByNumberData$inboundSchema.parse(JSON.parse(x)),
|
|
331
|
+
`Failed to parse 'SDKSendByNumberData' from JSON`,
|
|
332
|
+
);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/** @internal */
|
|
336
|
+
export const SDKSendByNumberResponse$inboundSchema: z.ZodType<
|
|
337
|
+
SDKSendByNumberResponse,
|
|
338
|
+
z.ZodTypeDef,
|
|
339
|
+
unknown
|
|
340
|
+
> = z.object({
|
|
341
|
+
data: types.optional(z.lazy(() => SDKSendByNumberData$inboundSchema)),
|
|
342
|
+
});
|
|
343
|
+
/** @internal */
|
|
344
|
+
export type SDKSendByNumberResponse$Outbound = {
|
|
345
|
+
data?: SDKSendByNumberData$Outbound | undefined;
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
/** @internal */
|
|
349
|
+
export const SDKSendByNumberResponse$outboundSchema: z.ZodType<
|
|
350
|
+
SDKSendByNumberResponse$Outbound,
|
|
351
|
+
z.ZodTypeDef,
|
|
352
|
+
SDKSendByNumberResponse
|
|
353
|
+
> = z.object({
|
|
354
|
+
data: z.lazy(() => SDKSendByNumberData$outboundSchema).optional(),
|
|
355
|
+
});
|
|
356
|
+
|
|
357
|
+
export function sdkSendByNumberResponseToJSON(
|
|
358
|
+
sdkSendByNumberResponse: SDKSendByNumberResponse,
|
|
359
|
+
): string {
|
|
360
|
+
return JSON.stringify(
|
|
361
|
+
SDKSendByNumberResponse$outboundSchema.parse(sdkSendByNumberResponse),
|
|
362
|
+
);
|
|
363
|
+
}
|
|
364
|
+
export function sdkSendByNumberResponseFromJSON(
|
|
365
|
+
jsonString: string,
|
|
366
|
+
): SafeParseResult<SDKSendByNumberResponse, SDKValidationError> {
|
|
367
|
+
return safeParse(
|
|
368
|
+
jsonString,
|
|
369
|
+
(x) => SDKSendByNumberResponse$inboundSchema.parse(JSON.parse(x)),
|
|
370
|
+
`Failed to parse 'SDKSendByNumberResponse' from JSON`,
|
|
371
|
+
);
|
|
372
|
+
}
|
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import * as types from "../../types/primitives.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
12
|
+
import * as models from "../index.js";
|
|
13
|
+
|
|
14
|
+
export type SDKVerifyResolutionSecurity = {
|
|
15
|
+
agentKeyAuth?: string | undefined;
|
|
16
|
+
apiKeyAuth?: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type SDKVerifyResolutionRequest = {
|
|
20
|
+
/**
|
|
21
|
+
* The proof, as you received it.
|
|
22
|
+
*/
|
|
23
|
+
token: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const SDKVerifyResolutionVerdict = {
|
|
27
|
+
Approve: "approve",
|
|
28
|
+
} as const;
|
|
29
|
+
export type SDKVerifyResolutionVerdict = ClosedEnum<
|
|
30
|
+
typeof SDKVerifyResolutionVerdict
|
|
31
|
+
>;
|
|
32
|
+
|
|
33
|
+
export type SDKVerifyResolutionDataData = {
|
|
34
|
+
valid: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* True when the proof was already checked once.
|
|
37
|
+
*/
|
|
38
|
+
replayed?: boolean | undefined;
|
|
39
|
+
reason?: string | undefined;
|
|
40
|
+
requestId?: string | undefined;
|
|
41
|
+
verdict?: SDKVerifyResolutionVerdict | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* What the person approved, as it was signed.
|
|
44
|
+
*/
|
|
45
|
+
action?: { [k: string]: any } | undefined;
|
|
46
|
+
agentId?: string | undefined;
|
|
47
|
+
approvedAt?: Date | undefined;
|
|
48
|
+
expiresAt?: Date | undefined;
|
|
49
|
+
ceremonyId?: string | null | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* How the person confirmed: passkey or session.
|
|
52
|
+
*/
|
|
53
|
+
method?: string | null | undefined;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export type SDKVerifyResolutionData = {
|
|
57
|
+
data?: SDKVerifyResolutionDataData | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Gates API handler error. Arrives inside `data.error` with HTTP 200 — check for it before reading the result.
|
|
60
|
+
*/
|
|
61
|
+
error?: models.GatesApiError | undefined;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* The answer. A refused check has valid false and a reason; it does not spend the proof. Errors arrive as data.error — code: `invalid_key` (401).
|
|
66
|
+
*/
|
|
67
|
+
export type SDKVerifyResolutionResponse = {
|
|
68
|
+
data: SDKVerifyResolutionData;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
/** @internal */
|
|
72
|
+
export const SDKVerifyResolutionSecurity$inboundSchema: z.ZodType<
|
|
73
|
+
SDKVerifyResolutionSecurity,
|
|
74
|
+
z.ZodTypeDef,
|
|
75
|
+
unknown
|
|
76
|
+
> = z.object({
|
|
77
|
+
AgentKeyAuth: types.optional(types.string()),
|
|
78
|
+
ApiKeyAuth: types.optional(types.string()),
|
|
79
|
+
}).transform((v) => {
|
|
80
|
+
return remap$(v, {
|
|
81
|
+
"AgentKeyAuth": "agentKeyAuth",
|
|
82
|
+
"ApiKeyAuth": "apiKeyAuth",
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
/** @internal */
|
|
86
|
+
export type SDKVerifyResolutionSecurity$Outbound = {
|
|
87
|
+
AgentKeyAuth?: string | undefined;
|
|
88
|
+
ApiKeyAuth?: string | undefined;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/** @internal */
|
|
92
|
+
export const SDKVerifyResolutionSecurity$outboundSchema: z.ZodType<
|
|
93
|
+
SDKVerifyResolutionSecurity$Outbound,
|
|
94
|
+
z.ZodTypeDef,
|
|
95
|
+
SDKVerifyResolutionSecurity
|
|
96
|
+
> = z.object({
|
|
97
|
+
agentKeyAuth: z.string().optional(),
|
|
98
|
+
apiKeyAuth: z.string().optional(),
|
|
99
|
+
}).transform((v) => {
|
|
100
|
+
return remap$(v, {
|
|
101
|
+
agentKeyAuth: "AgentKeyAuth",
|
|
102
|
+
apiKeyAuth: "ApiKeyAuth",
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
export function sdkVerifyResolutionSecurityToJSON(
|
|
107
|
+
sdkVerifyResolutionSecurity: SDKVerifyResolutionSecurity,
|
|
108
|
+
): string {
|
|
109
|
+
return JSON.stringify(
|
|
110
|
+
SDKVerifyResolutionSecurity$outboundSchema.parse(
|
|
111
|
+
sdkVerifyResolutionSecurity,
|
|
112
|
+
),
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
export function sdkVerifyResolutionSecurityFromJSON(
|
|
116
|
+
jsonString: string,
|
|
117
|
+
): SafeParseResult<SDKVerifyResolutionSecurity, SDKValidationError> {
|
|
118
|
+
return safeParse(
|
|
119
|
+
jsonString,
|
|
120
|
+
(x) => SDKVerifyResolutionSecurity$inboundSchema.parse(JSON.parse(x)),
|
|
121
|
+
`Failed to parse 'SDKVerifyResolutionSecurity' from JSON`,
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/** @internal */
|
|
126
|
+
export const SDKVerifyResolutionRequest$inboundSchema: z.ZodType<
|
|
127
|
+
SDKVerifyResolutionRequest,
|
|
128
|
+
z.ZodTypeDef,
|
|
129
|
+
unknown
|
|
130
|
+
> = z.object({
|
|
131
|
+
token: types.string(),
|
|
132
|
+
});
|
|
133
|
+
/** @internal */
|
|
134
|
+
export type SDKVerifyResolutionRequest$Outbound = {
|
|
135
|
+
token: string;
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
/** @internal */
|
|
139
|
+
export const SDKVerifyResolutionRequest$outboundSchema: z.ZodType<
|
|
140
|
+
SDKVerifyResolutionRequest$Outbound,
|
|
141
|
+
z.ZodTypeDef,
|
|
142
|
+
SDKVerifyResolutionRequest
|
|
143
|
+
> = z.object({
|
|
144
|
+
token: z.string(),
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
export function sdkVerifyResolutionRequestToJSON(
|
|
148
|
+
sdkVerifyResolutionRequest: SDKVerifyResolutionRequest,
|
|
149
|
+
): string {
|
|
150
|
+
return JSON.stringify(
|
|
151
|
+
SDKVerifyResolutionRequest$outboundSchema.parse(sdkVerifyResolutionRequest),
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
export function sdkVerifyResolutionRequestFromJSON(
|
|
155
|
+
jsonString: string,
|
|
156
|
+
): SafeParseResult<SDKVerifyResolutionRequest, SDKValidationError> {
|
|
157
|
+
return safeParse(
|
|
158
|
+
jsonString,
|
|
159
|
+
(x) => SDKVerifyResolutionRequest$inboundSchema.parse(JSON.parse(x)),
|
|
160
|
+
`Failed to parse 'SDKVerifyResolutionRequest' from JSON`,
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/** @internal */
|
|
165
|
+
export const SDKVerifyResolutionVerdict$inboundSchema: z.ZodNativeEnum<
|
|
166
|
+
typeof SDKVerifyResolutionVerdict
|
|
167
|
+
> = z.nativeEnum(SDKVerifyResolutionVerdict);
|
|
168
|
+
/** @internal */
|
|
169
|
+
export const SDKVerifyResolutionVerdict$outboundSchema: z.ZodNativeEnum<
|
|
170
|
+
typeof SDKVerifyResolutionVerdict
|
|
171
|
+
> = SDKVerifyResolutionVerdict$inboundSchema;
|
|
172
|
+
|
|
173
|
+
/** @internal */
|
|
174
|
+
export const SDKVerifyResolutionDataData$inboundSchema: z.ZodType<
|
|
175
|
+
SDKVerifyResolutionDataData,
|
|
176
|
+
z.ZodTypeDef,
|
|
177
|
+
unknown
|
|
178
|
+
> = z.object({
|
|
179
|
+
valid: types.boolean(),
|
|
180
|
+
replayed: types.optional(types.boolean()),
|
|
181
|
+
reason: types.optional(types.string()),
|
|
182
|
+
request_id: types.optional(types.string()),
|
|
183
|
+
verdict: types.optional(SDKVerifyResolutionVerdict$inboundSchema),
|
|
184
|
+
action: types.optional(z.record(z.any())),
|
|
185
|
+
agent_id: types.optional(types.string()),
|
|
186
|
+
approved_at: types.optional(types.date()),
|
|
187
|
+
expires_at: types.optional(types.date()),
|
|
188
|
+
ceremony_id: z.nullable(types.string()).optional(),
|
|
189
|
+
method: z.nullable(types.string()).optional(),
|
|
190
|
+
}).transform((v) => {
|
|
191
|
+
return remap$(v, {
|
|
192
|
+
"request_id": "requestId",
|
|
193
|
+
"agent_id": "agentId",
|
|
194
|
+
"approved_at": "approvedAt",
|
|
195
|
+
"expires_at": "expiresAt",
|
|
196
|
+
"ceremony_id": "ceremonyId",
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
/** @internal */
|
|
200
|
+
export type SDKVerifyResolutionDataData$Outbound = {
|
|
201
|
+
valid: boolean;
|
|
202
|
+
replayed?: boolean | undefined;
|
|
203
|
+
reason?: string | undefined;
|
|
204
|
+
request_id?: string | undefined;
|
|
205
|
+
verdict?: string | undefined;
|
|
206
|
+
action?: { [k: string]: any } | undefined;
|
|
207
|
+
agent_id?: string | undefined;
|
|
208
|
+
approved_at?: string | undefined;
|
|
209
|
+
expires_at?: string | undefined;
|
|
210
|
+
ceremony_id?: string | null | undefined;
|
|
211
|
+
method?: string | null | undefined;
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
/** @internal */
|
|
215
|
+
export const SDKVerifyResolutionDataData$outboundSchema: z.ZodType<
|
|
216
|
+
SDKVerifyResolutionDataData$Outbound,
|
|
217
|
+
z.ZodTypeDef,
|
|
218
|
+
SDKVerifyResolutionDataData
|
|
219
|
+
> = z.object({
|
|
220
|
+
valid: z.boolean(),
|
|
221
|
+
replayed: z.boolean().optional(),
|
|
222
|
+
reason: z.string().optional(),
|
|
223
|
+
requestId: z.string().optional(),
|
|
224
|
+
verdict: SDKVerifyResolutionVerdict$outboundSchema.optional(),
|
|
225
|
+
action: z.record(z.any()).optional(),
|
|
226
|
+
agentId: z.string().optional(),
|
|
227
|
+
approvedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
228
|
+
expiresAt: z.date().transform(v => v.toISOString()).optional(),
|
|
229
|
+
ceremonyId: z.nullable(z.string()).optional(),
|
|
230
|
+
method: z.nullable(z.string()).optional(),
|
|
231
|
+
}).transform((v) => {
|
|
232
|
+
return remap$(v, {
|
|
233
|
+
requestId: "request_id",
|
|
234
|
+
agentId: "agent_id",
|
|
235
|
+
approvedAt: "approved_at",
|
|
236
|
+
expiresAt: "expires_at",
|
|
237
|
+
ceremonyId: "ceremony_id",
|
|
238
|
+
});
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
export function sdkVerifyResolutionDataDataToJSON(
|
|
242
|
+
sdkVerifyResolutionDataData: SDKVerifyResolutionDataData,
|
|
243
|
+
): string {
|
|
244
|
+
return JSON.stringify(
|
|
245
|
+
SDKVerifyResolutionDataData$outboundSchema.parse(
|
|
246
|
+
sdkVerifyResolutionDataData,
|
|
247
|
+
),
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
export function sdkVerifyResolutionDataDataFromJSON(
|
|
251
|
+
jsonString: string,
|
|
252
|
+
): SafeParseResult<SDKVerifyResolutionDataData, SDKValidationError> {
|
|
253
|
+
return safeParse(
|
|
254
|
+
jsonString,
|
|
255
|
+
(x) => SDKVerifyResolutionDataData$inboundSchema.parse(JSON.parse(x)),
|
|
256
|
+
`Failed to parse 'SDKVerifyResolutionDataData' from JSON`,
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/** @internal */
|
|
261
|
+
export const SDKVerifyResolutionData$inboundSchema: z.ZodType<
|
|
262
|
+
SDKVerifyResolutionData,
|
|
263
|
+
z.ZodTypeDef,
|
|
264
|
+
unknown
|
|
265
|
+
> = z.object({
|
|
266
|
+
data: types.optional(z.lazy(() => SDKVerifyResolutionDataData$inboundSchema)),
|
|
267
|
+
error: types.optional(models.GatesApiError$inboundSchema),
|
|
268
|
+
});
|
|
269
|
+
/** @internal */
|
|
270
|
+
export type SDKVerifyResolutionData$Outbound = {
|
|
271
|
+
data?: SDKVerifyResolutionDataData$Outbound | undefined;
|
|
272
|
+
error?: models.GatesApiError$Outbound | undefined;
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
/** @internal */
|
|
276
|
+
export const SDKVerifyResolutionData$outboundSchema: z.ZodType<
|
|
277
|
+
SDKVerifyResolutionData$Outbound,
|
|
278
|
+
z.ZodTypeDef,
|
|
279
|
+
SDKVerifyResolutionData
|
|
280
|
+
> = z.object({
|
|
281
|
+
data: z.lazy(() => SDKVerifyResolutionDataData$outboundSchema).optional(),
|
|
282
|
+
error: models.GatesApiError$outboundSchema.optional(),
|
|
283
|
+
});
|
|
284
|
+
|
|
285
|
+
export function sdkVerifyResolutionDataToJSON(
|
|
286
|
+
sdkVerifyResolutionData: SDKVerifyResolutionData,
|
|
287
|
+
): string {
|
|
288
|
+
return JSON.stringify(
|
|
289
|
+
SDKVerifyResolutionData$outboundSchema.parse(sdkVerifyResolutionData),
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
export function sdkVerifyResolutionDataFromJSON(
|
|
293
|
+
jsonString: string,
|
|
294
|
+
): SafeParseResult<SDKVerifyResolutionData, SDKValidationError> {
|
|
295
|
+
return safeParse(
|
|
296
|
+
jsonString,
|
|
297
|
+
(x) => SDKVerifyResolutionData$inboundSchema.parse(JSON.parse(x)),
|
|
298
|
+
`Failed to parse 'SDKVerifyResolutionData' from JSON`,
|
|
299
|
+
);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/** @internal */
|
|
303
|
+
export const SDKVerifyResolutionResponse$inboundSchema: z.ZodType<
|
|
304
|
+
SDKVerifyResolutionResponse,
|
|
305
|
+
z.ZodTypeDef,
|
|
306
|
+
unknown
|
|
307
|
+
> = z.object({
|
|
308
|
+
data: z.lazy(() => SDKVerifyResolutionData$inboundSchema),
|
|
309
|
+
});
|
|
310
|
+
/** @internal */
|
|
311
|
+
export type SDKVerifyResolutionResponse$Outbound = {
|
|
312
|
+
data: SDKVerifyResolutionData$Outbound;
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
/** @internal */
|
|
316
|
+
export const SDKVerifyResolutionResponse$outboundSchema: z.ZodType<
|
|
317
|
+
SDKVerifyResolutionResponse$Outbound,
|
|
318
|
+
z.ZodTypeDef,
|
|
319
|
+
SDKVerifyResolutionResponse
|
|
320
|
+
> = z.object({
|
|
321
|
+
data: z.lazy(() => SDKVerifyResolutionData$outboundSchema),
|
|
322
|
+
});
|
|
323
|
+
|
|
324
|
+
export function sdkVerifyResolutionResponseToJSON(
|
|
325
|
+
sdkVerifyResolutionResponse: SDKVerifyResolutionResponse,
|
|
326
|
+
): string {
|
|
327
|
+
return JSON.stringify(
|
|
328
|
+
SDKVerifyResolutionResponse$outboundSchema.parse(
|
|
329
|
+
sdkVerifyResolutionResponse,
|
|
330
|
+
),
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
export function sdkVerifyResolutionResponseFromJSON(
|
|
334
|
+
jsonString: string,
|
|
335
|
+
): SafeParseResult<SDKVerifyResolutionResponse, SDKValidationError> {
|
|
336
|
+
return safeParse(
|
|
337
|
+
jsonString,
|
|
338
|
+
(x) => SDKVerifyResolutionResponse$inboundSchema.parse(JSON.parse(x)),
|
|
339
|
+
`Failed to parse 'SDKVerifyResolutionResponse' from JSON`,
|
|
340
|
+
);
|
|
341
|
+
}
|