botshield-sdk 2.2.0 → 2.3.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 +45 -7
- package/bin/mcp-server.js +1643 -120
- package/bin/mcp-server.js.map +40 -17
- 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-create.d.ts +18 -0
- package/dist/commonjs/funcs/gates-actions-create.d.ts.map +1 -0
- package/dist/commonjs/funcs/gates-actions-create.js +123 -0
- package/dist/commonjs/funcs/gates-actions-create.js.map +1 -0
- package/dist/commonjs/funcs/gates-actions-list.d.ts +18 -0
- package/dist/commonjs/funcs/gates-actions-list.d.ts.map +1 -0
- package/dist/commonjs/funcs/gates-actions-list.js +113 -0
- package/dist/commonjs/funcs/gates-actions-list.js.map +1 -0
- package/dist/commonjs/funcs/gates-actions-request-status.d.ts +18 -0
- package/dist/commonjs/funcs/gates-actions-request-status.d.ts.map +1 -0
- package/dist/commonjs/funcs/gates-actions-request-status.js +127 -0
- package/dist/commonjs/funcs/gates-actions-request-status.js.map +1 -0
- package/dist/commonjs/funcs/gates-actions-request.d.ts +18 -0
- package/dist/commonjs/funcs/gates-actions-request.d.ts.map +1 -0
- package/dist/commonjs/funcs/gates-actions-request.js +123 -0
- package/dist/commonjs/funcs/gates-actions-request.js.map +1 -0
- package/dist/commonjs/funcs/gates-actions-set-state.d.ts +18 -0
- package/dist/commonjs/funcs/gates-actions-set-state.d.ts.map +1 -0
- package/dist/commonjs/funcs/gates-actions-set-state.js +123 -0
- package/dist/commonjs/funcs/gates-actions-set-state.js.map +1 -0
- package/dist/commonjs/funcs/gates-activate.d.ts +18 -0
- package/dist/commonjs/funcs/gates-activate.d.ts.map +1 -0
- package/dist/commonjs/funcs/gates-activate.js +123 -0
- package/dist/commonjs/funcs/gates-activate.js.map +1 -0
- package/dist/commonjs/funcs/gates-cancel.d.ts +18 -0
- package/dist/commonjs/funcs/gates-cancel.d.ts.map +1 -0
- package/dist/commonjs/funcs/gates-cancel.js +123 -0
- package/dist/commonjs/funcs/gates-cancel.js.map +1 -0
- package/dist/commonjs/funcs/gates-close.d.ts +18 -0
- package/dist/commonjs/funcs/gates-close.d.ts.map +1 -0
- package/dist/commonjs/funcs/gates-close.js +123 -0
- package/dist/commonjs/funcs/gates-close.js.map +1 -0
- package/dist/commonjs/funcs/gates-create.d.ts +18 -0
- package/dist/commonjs/funcs/gates-create.d.ts.map +1 -0
- package/dist/commonjs/funcs/gates-create.js +123 -0
- package/dist/commonjs/funcs/gates-create.js.map +1 -0
- package/dist/commonjs/funcs/gates-extend.d.ts +18 -0
- package/dist/commonjs/funcs/gates-extend.d.ts.map +1 -0
- package/dist/commonjs/funcs/gates-extend.js +123 -0
- package/dist/commonjs/funcs/gates-extend.js.map +1 -0
- package/dist/commonjs/funcs/gates-get.d.ts +18 -0
- package/dist/commonjs/funcs/gates-get.d.ts.map +1 -0
- package/dist/commonjs/funcs/gates-get.js +126 -0
- package/dist/commonjs/funcs/gates-get.js.map +1 -0
- package/dist/commonjs/funcs/gates-list.d.ts +18 -0
- package/dist/commonjs/funcs/gates-list.d.ts.map +1 -0
- package/dist/commonjs/funcs/gates-list.js +126 -0
- package/dist/commonjs/funcs/gates-list.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/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 +71 -0
- package/dist/commonjs/models/bot-shield-action.d.ts.map +1 -0
- package/dist/commonjs/models/bot-shield-action.js +108 -0
- package/dist/commonjs/models/bot-shield-action.js.map +1 -0
- 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 +2 -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-policy-doc.d.ts +126 -0
- package/dist/commonjs/models/gate-policy-doc.d.ts.map +1 -0
- package/dist/commonjs/models/gate-policy-doc.js +125 -0
- package/dist/commonjs/models/gate-policy-doc.js.map +1 -0
- package/dist/commonjs/models/gate-schedule.d.ts +28 -0
- package/dist/commonjs/models/gate-schedule.d.ts.map +1 -0
- package/dist/commonjs/models/gate-schedule.js +61 -0
- package/dist/commonjs/models/gate-schedule.js.map +1 -0
- package/dist/commonjs/models/gate.d.ts +215 -0
- package/dist/commonjs/models/gate.d.ts.map +1 -0
- package/dist/commonjs/models/gate.js +236 -0
- package/dist/commonjs/models/gate.js.map +1 -0
- package/dist/commonjs/models/gates-api-error.d.ts +24 -0
- package/dist/commonjs/models/gates-api-error.d.ts.map +1 -0
- package/dist/commonjs/models/gates-api-error.js +63 -0
- package/dist/commonjs/models/gates-api-error.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +9 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +9 -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 +8 -8
- package/dist/commonjs/models/operations/actions-propose.d.ts.map +1 -1
- package/dist/commonjs/models/operations/actions-propose.js +11 -12
- package/dist/commonjs/models/operations/actions-propose.js.map +1 -1
- package/dist/commonjs/models/operations/gates-api-actions-create.d.ts +94 -0
- package/dist/commonjs/models/operations/gates-api-actions-create.d.ts.map +1 -0
- package/dist/commonjs/models/operations/gates-api-actions-create.js +139 -0
- package/dist/commonjs/models/operations/gates-api-actions-create.js.map +1 -0
- package/dist/commonjs/models/operations/gates-api-actions-list.d.ts +65 -0
- package/dist/commonjs/models/operations/gates-api-actions-list.d.ts.map +1 -0
- package/dist/commonjs/models/operations/gates-api-actions-list.js +119 -0
- package/dist/commonjs/models/operations/gates-api-actions-list.js.map +1 -0
- package/dist/commonjs/models/operations/gates-api-actions-request-status.d.ts +114 -0
- package/dist/commonjs/models/operations/gates-api-actions-request-status.d.ts.map +1 -0
- package/dist/commonjs/models/operations/gates-api-actions-request-status.js +186 -0
- package/dist/commonjs/models/operations/gates-api-actions-request-status.js.map +1 -0
- package/dist/commonjs/models/operations/gates-api-actions-request.d.ts +128 -0
- package/dist/commonjs/models/operations/gates-api-actions-request.d.ts.map +1 -0
- package/dist/commonjs/models/operations/gates-api-actions-request.js +189 -0
- package/dist/commonjs/models/operations/gates-api-actions-request.js.map +1 -0
- package/dist/commonjs/models/operations/gates-api-actions-set-state.d.ts +96 -0
- package/dist/commonjs/models/operations/gates-api-actions-set-state.d.ts.map +1 -0
- package/dist/commonjs/models/operations/gates-api-actions-set-state.js +145 -0
- package/dist/commonjs/models/operations/gates-api-actions-set-state.js.map +1 -0
- package/dist/commonjs/models/operations/gates-api-activate.d.ts +84 -0
- package/dist/commonjs/models/operations/gates-api-activate.d.ts.map +1 -0
- package/dist/commonjs/models/operations/gates-api-activate.js +135 -0
- package/dist/commonjs/models/operations/gates-api-activate.js.map +1 -0
- package/dist/commonjs/models/operations/gates-api-cancel.d.ts +84 -0
- package/dist/commonjs/models/operations/gates-api-cancel.d.ts.map +1 -0
- package/dist/commonjs/models/operations/gates-api-cancel.js +135 -0
- package/dist/commonjs/models/operations/gates-api-cancel.js.map +1 -0
- package/dist/commonjs/models/operations/gates-api-close.d.ts +89 -0
- package/dist/commonjs/models/operations/gates-api-close.d.ts.map +1 -0
- package/dist/commonjs/models/operations/gates-api-close.js +145 -0
- package/dist/commonjs/models/operations/gates-api-close.js.map +1 -0
- package/dist/commonjs/models/operations/gates-api-create.d.ts +173 -0
- package/dist/commonjs/models/operations/gates-api-create.d.ts.map +1 -0
- package/dist/commonjs/models/operations/gates-api-create.js +198 -0
- package/dist/commonjs/models/operations/gates-api-create.js.map +1 -0
- package/dist/commonjs/models/operations/gates-api-extend.d.ts +99 -0
- package/dist/commonjs/models/operations/gates-api-extend.d.ts.map +1 -0
- package/dist/commonjs/models/operations/gates-api-extend.js +141 -0
- package/dist/commonjs/models/operations/gates-api-extend.js.map +1 -0
- package/dist/commonjs/models/operations/gates-api-get.d.ts +84 -0
- package/dist/commonjs/models/operations/gates-api-get.d.ts.map +1 -0
- package/dist/commonjs/models/operations/gates-api-get.js +135 -0
- package/dist/commonjs/models/operations/gates-api-get.js.map +1 -0
- package/dist/commonjs/models/operations/gates-api-list.d.ts +81 -0
- package/dist/commonjs/models/operations/gates-api-list.d.ts.map +1 -0
- package/dist/commonjs/models/operations/gates-api-list.js +135 -0
- package/dist/commonjs/models/operations/gates-api-list.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +14 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +14 -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-create-verification-link.d.ts +22 -12
- package/dist/commonjs/models/operations/sdk-create-verification-link.d.ts.map +1 -1
- package/dist/commonjs/models/operations/sdk-create-verification-link.js +17 -11
- package/dist/commonjs/models/operations/sdk-create-verification-link.js.map +1 -1
- package/dist/commonjs/models/operations/sdk-verify-token.d.ts +6 -6
- package/dist/commonjs/models/operations/sdk-verify-token.d.ts.map +1 -1
- package/dist/commonjs/models/operations/sdk-verify-token.js +2 -4
- package/dist/commonjs/models/operations/sdk-verify-token.js.map +1 -1
- package/dist/commonjs/models/operations/secured-accounts-status.d.ts +5 -5
- package/dist/commonjs/models/operations/secured-accounts-status.d.ts.map +1 -1
- package/dist/commonjs/models/operations/secured-accounts-status.js +6 -6
- package/dist/commonjs/models/operations/secured-accounts-status.js.map +1 -1
- package/dist/commonjs/models/operations/verification-get-status.d.ts +181 -13
- package/dist/commonjs/models/operations/verification-get-status.d.ts.map +1 -1
- package/dist/commonjs/models/operations/verification-get-status.js +159 -12
- package/dist/commonjs/models/operations/verification-get-status.js.map +1 -1
- package/dist/commonjs/models/passes-per-person.d.ts +34 -0
- package/dist/commonjs/models/passes-per-person.d.ts.map +1 -0
- package/dist/commonjs/models/passes-per-person.js +72 -0
- package/dist/commonjs/models/passes-per-person.js.map +1 -0
- package/dist/commonjs/sdk/census.d.ts +1 -1
- package/dist/commonjs/sdk/census.js +1 -1
- package/dist/commonjs/sdk/gates-actions.d.ts +40 -0
- package/dist/commonjs/sdk/gates-actions.d.ts.map +1 -0
- package/dist/commonjs/sdk/gates-actions.js +62 -0
- package/dist/commonjs/sdk/gates-actions.js.map +1 -0
- package/dist/commonjs/sdk/gates.d.ts +57 -0
- package/dist/commonjs/sdk/gates.d.ts.map +1 -0
- package/dist/commonjs/sdk/gates.js +87 -0
- package/dist/commonjs/sdk/gates.js.map +1 -0
- 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 +6 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +10 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- 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-create.d.ts +18 -0
- package/dist/esm/funcs/gates-actions-create.d.ts.map +1 -0
- package/dist/esm/funcs/gates-actions-create.js +87 -0
- package/dist/esm/funcs/gates-actions-create.js.map +1 -0
- package/dist/esm/funcs/gates-actions-list.d.ts +18 -0
- package/dist/esm/funcs/gates-actions-list.d.ts.map +1 -0
- package/dist/esm/funcs/gates-actions-list.js +77 -0
- package/dist/esm/funcs/gates-actions-list.js.map +1 -0
- package/dist/esm/funcs/gates-actions-request-status.d.ts +18 -0
- package/dist/esm/funcs/gates-actions-request-status.d.ts.map +1 -0
- package/dist/esm/funcs/gates-actions-request-status.js +91 -0
- package/dist/esm/funcs/gates-actions-request-status.js.map +1 -0
- package/dist/esm/funcs/gates-actions-request.d.ts +18 -0
- package/dist/esm/funcs/gates-actions-request.d.ts.map +1 -0
- package/dist/esm/funcs/gates-actions-request.js +87 -0
- package/dist/esm/funcs/gates-actions-request.js.map +1 -0
- package/dist/esm/funcs/gates-actions-set-state.d.ts +18 -0
- package/dist/esm/funcs/gates-actions-set-state.d.ts.map +1 -0
- package/dist/esm/funcs/gates-actions-set-state.js +87 -0
- package/dist/esm/funcs/gates-actions-set-state.js.map +1 -0
- package/dist/esm/funcs/gates-activate.d.ts +18 -0
- package/dist/esm/funcs/gates-activate.d.ts.map +1 -0
- package/dist/esm/funcs/gates-activate.js +87 -0
- package/dist/esm/funcs/gates-activate.js.map +1 -0
- package/dist/esm/funcs/gates-cancel.d.ts +18 -0
- package/dist/esm/funcs/gates-cancel.d.ts.map +1 -0
- package/dist/esm/funcs/gates-cancel.js +87 -0
- package/dist/esm/funcs/gates-cancel.js.map +1 -0
- package/dist/esm/funcs/gates-close.d.ts +18 -0
- package/dist/esm/funcs/gates-close.d.ts.map +1 -0
- package/dist/esm/funcs/gates-close.js +87 -0
- package/dist/esm/funcs/gates-close.js.map +1 -0
- package/dist/esm/funcs/gates-create.d.ts +18 -0
- package/dist/esm/funcs/gates-create.d.ts.map +1 -0
- package/dist/esm/funcs/gates-create.js +87 -0
- package/dist/esm/funcs/gates-create.js.map +1 -0
- package/dist/esm/funcs/gates-extend.d.ts +18 -0
- package/dist/esm/funcs/gates-extend.d.ts.map +1 -0
- package/dist/esm/funcs/gates-extend.js +87 -0
- package/dist/esm/funcs/gates-extend.js.map +1 -0
- package/dist/esm/funcs/gates-get.d.ts +18 -0
- package/dist/esm/funcs/gates-get.d.ts.map +1 -0
- package/dist/esm/funcs/gates-get.js +90 -0
- package/dist/esm/funcs/gates-get.js.map +1 -0
- package/dist/esm/funcs/gates-list.d.ts +18 -0
- package/dist/esm/funcs/gates-list.d.ts.map +1 -0
- package/dist/esm/funcs/gates-list.js +90 -0
- package/dist/esm/funcs/gates-list.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/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 +71 -0
- package/dist/esm/models/bot-shield-action.d.ts.map +1 -0
- package/dist/esm/models/bot-shield-action.js +70 -0
- package/dist/esm/models/bot-shield-action.js.map +1 -0
- 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 +2 -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-policy-doc.d.ts +126 -0
- package/dist/esm/models/gate-policy-doc.d.ts.map +1 -0
- package/dist/esm/models/gate-policy-doc.js +87 -0
- package/dist/esm/models/gate-policy-doc.js.map +1 -0
- package/dist/esm/models/gate-schedule.d.ts +28 -0
- package/dist/esm/models/gate-schedule.d.ts.map +1 -0
- package/dist/esm/models/gate-schedule.js +23 -0
- package/dist/esm/models/gate-schedule.js.map +1 -0
- package/dist/esm/models/gate.d.ts +215 -0
- package/dist/esm/models/gate.d.ts.map +1 -0
- package/dist/esm/models/gate.js +194 -0
- package/dist/esm/models/gate.js.map +1 -0
- package/dist/esm/models/gates-api-error.d.ts +24 -0
- package/dist/esm/models/gates-api-error.d.ts.map +1 -0
- package/dist/esm/models/gates-api-error.js +25 -0
- package/dist/esm/models/gates-api-error.js.map +1 -0
- package/dist/esm/models/index.d.ts +9 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +9 -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 +8 -8
- package/dist/esm/models/operations/actions-propose.d.ts.map +1 -1
- package/dist/esm/models/operations/actions-propose.js +8 -9
- package/dist/esm/models/operations/actions-propose.js.map +1 -1
- package/dist/esm/models/operations/gates-api-actions-create.d.ts +94 -0
- package/dist/esm/models/operations/gates-api-actions-create.d.ts.map +1 -0
- package/dist/esm/models/operations/gates-api-actions-create.js +93 -0
- package/dist/esm/models/operations/gates-api-actions-create.js.map +1 -0
- package/dist/esm/models/operations/gates-api-actions-list.d.ts +65 -0
- package/dist/esm/models/operations/gates-api-actions-list.d.ts.map +1 -0
- package/dist/esm/models/operations/gates-api-actions-list.js +75 -0
- package/dist/esm/models/operations/gates-api-actions-list.js.map +1 -0
- package/dist/esm/models/operations/gates-api-actions-request-status.d.ts +114 -0
- package/dist/esm/models/operations/gates-api-actions-request-status.d.ts.map +1 -0
- package/dist/esm/models/operations/gates-api-actions-request-status.js +140 -0
- package/dist/esm/models/operations/gates-api-actions-request-status.js.map +1 -0
- package/dist/esm/models/operations/gates-api-actions-request.d.ts +128 -0
- package/dist/esm/models/operations/gates-api-actions-request.d.ts.map +1 -0
- package/dist/esm/models/operations/gates-api-actions-request.js +143 -0
- package/dist/esm/models/operations/gates-api-actions-request.js.map +1 -0
- package/dist/esm/models/operations/gates-api-actions-set-state.d.ts +96 -0
- package/dist/esm/models/operations/gates-api-actions-set-state.d.ts.map +1 -0
- package/dist/esm/models/operations/gates-api-actions-set-state.js +99 -0
- package/dist/esm/models/operations/gates-api-actions-set-state.js.map +1 -0
- package/dist/esm/models/operations/gates-api-activate.d.ts +84 -0
- package/dist/esm/models/operations/gates-api-activate.d.ts.map +1 -0
- package/dist/esm/models/operations/gates-api-activate.js +89 -0
- package/dist/esm/models/operations/gates-api-activate.js.map +1 -0
- package/dist/esm/models/operations/gates-api-cancel.d.ts +84 -0
- package/dist/esm/models/operations/gates-api-cancel.d.ts.map +1 -0
- package/dist/esm/models/operations/gates-api-cancel.js +89 -0
- package/dist/esm/models/operations/gates-api-cancel.js.map +1 -0
- package/dist/esm/models/operations/gates-api-close.d.ts +89 -0
- package/dist/esm/models/operations/gates-api-close.d.ts.map +1 -0
- package/dist/esm/models/operations/gates-api-close.js +99 -0
- package/dist/esm/models/operations/gates-api-close.js.map +1 -0
- package/dist/esm/models/operations/gates-api-create.d.ts +173 -0
- package/dist/esm/models/operations/gates-api-create.d.ts.map +1 -0
- package/dist/esm/models/operations/gates-api-create.js +152 -0
- package/dist/esm/models/operations/gates-api-create.js.map +1 -0
- package/dist/esm/models/operations/gates-api-extend.d.ts +99 -0
- package/dist/esm/models/operations/gates-api-extend.d.ts.map +1 -0
- package/dist/esm/models/operations/gates-api-extend.js +95 -0
- package/dist/esm/models/operations/gates-api-extend.js.map +1 -0
- package/dist/esm/models/operations/gates-api-get.d.ts +84 -0
- package/dist/esm/models/operations/gates-api-get.d.ts.map +1 -0
- package/dist/esm/models/operations/gates-api-get.js +89 -0
- package/dist/esm/models/operations/gates-api-get.js.map +1 -0
- package/dist/esm/models/operations/gates-api-list.d.ts +81 -0
- package/dist/esm/models/operations/gates-api-list.d.ts.map +1 -0
- package/dist/esm/models/operations/gates-api-list.js +89 -0
- package/dist/esm/models/operations/gates-api-list.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +14 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +14 -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-create-verification-link.d.ts +22 -12
- package/dist/esm/models/operations/sdk-create-verification-link.d.ts.map +1 -1
- package/dist/esm/models/operations/sdk-create-verification-link.js +16 -10
- package/dist/esm/models/operations/sdk-create-verification-link.js.map +1 -1
- package/dist/esm/models/operations/sdk-verify-token.d.ts +6 -6
- package/dist/esm/models/operations/sdk-verify-token.d.ts.map +1 -1
- package/dist/esm/models/operations/sdk-verify-token.js +2 -4
- package/dist/esm/models/operations/sdk-verify-token.js.map +1 -1
- package/dist/esm/models/operations/secured-accounts-status.d.ts +5 -5
- package/dist/esm/models/operations/secured-accounts-status.d.ts.map +1 -1
- package/dist/esm/models/operations/secured-accounts-status.js +5 -5
- package/dist/esm/models/operations/secured-accounts-status.js.map +1 -1
- package/dist/esm/models/operations/verification-get-status.d.ts +181 -13
- package/dist/esm/models/operations/verification-get-status.d.ts.map +1 -1
- package/dist/esm/models/operations/verification-get-status.js +154 -11
- package/dist/esm/models/operations/verification-get-status.js.map +1 -1
- package/dist/esm/models/passes-per-person.d.ts +34 -0
- package/dist/esm/models/passes-per-person.d.ts.map +1 -0
- package/dist/esm/models/passes-per-person.js +34 -0
- package/dist/esm/models/passes-per-person.js.map +1 -0
- package/dist/esm/sdk/census.d.ts +1 -1
- package/dist/esm/sdk/census.js +1 -1
- package/dist/esm/sdk/gates-actions.d.ts +40 -0
- package/dist/esm/sdk/gates-actions.d.ts.map +1 -0
- package/dist/esm/sdk/gates-actions.js +58 -0
- package/dist/esm/sdk/gates-actions.js.map +1 -0
- package/dist/esm/sdk/gates.d.ts +57 -0
- package/dist/esm/sdk/gates.d.ts.map +1 -0
- package/dist/esm/sdk/gates.js +83 -0
- package/dist/esm/sdk/gates.js.map +1 -0
- 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 +6 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +10 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/census-verify-token.ts +1 -1
- package/src/funcs/gates-actions-create.ts +185 -0
- package/src/funcs/gates-actions-list.ts +166 -0
- package/src/funcs/gates-actions-request-status.ts +192 -0
- package/src/funcs/gates-actions-request.ts +185 -0
- package/src/funcs/gates-actions-set-state.ts +185 -0
- package/src/funcs/gates-activate.ts +184 -0
- package/src/funcs/gates-cancel.ts +184 -0
- package/src/funcs/gates-close.ts +184 -0
- package/src/funcs/gates-create.ts +184 -0
- package/src/funcs/gates-extend.ts +184 -0
- package/src/funcs/gates-get.ts +188 -0
- package/src/funcs/gates-list.ts +189 -0
- package/src/funcs/inline-passkey-complete.ts +172 -0
- package/src/funcs/inline-passkey-get-options.ts +172 -0
- 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 +156 -0
- package/src/models/error-body.ts +8 -1
- package/src/models/gate-human-verified-event.ts +181 -0
- package/src/models/gate-policy-doc.ts +202 -0
- package/src/models/gate-schedule.ts +61 -0
- package/src/models/gate.ts +424 -0
- package/src/models/gates-api-error.ts +59 -0
- package/src/models/index.ts +9 -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 +34 -27
- package/src/models/operations/gates-api-actions-create.ts +274 -0
- package/src/models/operations/gates-api-actions-list.ts +207 -0
- package/src/models/operations/gates-api-actions-request-status.ts +348 -0
- package/src/models/operations/gates-api-actions-request.ts +359 -0
- package/src/models/operations/gates-api-actions-set-state.ts +284 -0
- package/src/models/operations/gates-api-activate.ts +250 -0
- package/src/models/operations/gates-api-cancel.ts +250 -0
- package/src/models/operations/gates-api-close.ts +265 -0
- package/src/models/operations/gates-api-create.ts +387 -0
- package/src/models/operations/gates-api-extend.ts +271 -0
- package/src/models/operations/gates-api-get.ts +248 -0
- package/src/models/operations/gates-api-list.ts +247 -0
- package/src/models/operations/index.ts +14 -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-create-verification-link.ts +46 -24
- package/src/models/operations/sdk-verify-token.ts +8 -10
- package/src/models/operations/secured-accounts-status.ts +17 -9
- package/src/models/operations/verification-get-status.ts +352 -20
- package/src/models/passes-per-person.ts +74 -0
- package/src/sdk/census.ts +1 -1
- package/src/sdk/gates-actions.ts +107 -0
- package/src/sdk/gates.ts +155 -0
- package/src/sdk/inline-passkey.ts +49 -0
- package/src/sdk/sdk.ts +12 -0
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import * as openEnums from "../types/enums.js";
|
|
9
|
+
import { OpenEnum } from "../types/enums.js";
|
|
10
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
11
|
+
import * as types from "../types/primitives.js";
|
|
12
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
13
|
+
import {
|
|
14
|
+
PassesPerPerson,
|
|
15
|
+
PassesPerPerson$inboundSchema,
|
|
16
|
+
PassesPerPerson$Outbound,
|
|
17
|
+
PassesPerPerson$outboundSchema,
|
|
18
|
+
} from "./passes-per-person.js";
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* `draft` until activated; `closed` once closed (a closed gate cannot be reopened).
|
|
22
|
+
*/
|
|
23
|
+
export const Status = {
|
|
24
|
+
Draft: "draft",
|
|
25
|
+
Active: "active",
|
|
26
|
+
Closed: "closed",
|
|
27
|
+
} as const;
|
|
28
|
+
/**
|
|
29
|
+
* `draft` until activated; `closed` once closed (a closed gate cannot be reopened).
|
|
30
|
+
*/
|
|
31
|
+
export type Status = OpenEnum<typeof Status>;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Where an active gate is in its schedule. Null unless `status` is `active`.
|
|
35
|
+
*/
|
|
36
|
+
export const GateState = {
|
|
37
|
+
Scheduled: "scheduled",
|
|
38
|
+
Open: "open",
|
|
39
|
+
Closed: "closed",
|
|
40
|
+
} as const;
|
|
41
|
+
/**
|
|
42
|
+
* Where an active gate is in its schedule. Null unless `status` is `active`.
|
|
43
|
+
*/
|
|
44
|
+
export type GateState = OpenEnum<typeof GateState>;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The key's environment.
|
|
48
|
+
*/
|
|
49
|
+
export const GateEnvironment = {
|
|
50
|
+
Development: "development",
|
|
51
|
+
Production: "production",
|
|
52
|
+
} as const;
|
|
53
|
+
/**
|
|
54
|
+
* The key's environment.
|
|
55
|
+
*/
|
|
56
|
+
export type GateEnvironment = OpenEnum<typeof GateEnvironment>;
|
|
57
|
+
|
|
58
|
+
export const GatePreset = {
|
|
59
|
+
Presale: "presale",
|
|
60
|
+
Promo: "promo",
|
|
61
|
+
Drop: "drop",
|
|
62
|
+
Vote: "vote",
|
|
63
|
+
Reservation: "reservation",
|
|
64
|
+
Claim: "claim",
|
|
65
|
+
} as const;
|
|
66
|
+
export type GatePreset = OpenEnum<typeof GatePreset>;
|
|
67
|
+
|
|
68
|
+
export const GateType = {
|
|
69
|
+
Human: "human",
|
|
70
|
+
Age: "age",
|
|
71
|
+
} as const;
|
|
72
|
+
export type GateType = OpenEnum<typeof GateType>;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Age Gate only; null on a Human Gate.
|
|
76
|
+
*/
|
|
77
|
+
export const AgeThreshold = {
|
|
78
|
+
Thirteen: 13,
|
|
79
|
+
Eighteen: 18,
|
|
80
|
+
TwentyOne: 21,
|
|
81
|
+
} as const;
|
|
82
|
+
/**
|
|
83
|
+
* Age Gate only; null on a Human Gate.
|
|
84
|
+
*/
|
|
85
|
+
export type AgeThreshold = OpenEnum<typeof AgeThreshold>;
|
|
86
|
+
|
|
87
|
+
export const GateLink = {
|
|
88
|
+
Required: "required",
|
|
89
|
+
Optional: "optional",
|
|
90
|
+
Never: "never",
|
|
91
|
+
} as const;
|
|
92
|
+
export type GateLink = OpenEnum<typeof GateLink>;
|
|
93
|
+
|
|
94
|
+
export type Schedule = {
|
|
95
|
+
opensAt: Date | null;
|
|
96
|
+
closesAt: Date | null;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* The effective policy (base → org → gate). Null if none could be loaded.
|
|
101
|
+
*/
|
|
102
|
+
export type Policy = {
|
|
103
|
+
preset: GatePreset | null;
|
|
104
|
+
gateType: GateType;
|
|
105
|
+
/**
|
|
106
|
+
* Age Gate only; null on a Human Gate.
|
|
107
|
+
*/
|
|
108
|
+
ageThreshold: AgeThreshold | null;
|
|
109
|
+
signedUp: boolean;
|
|
110
|
+
link: GateLink;
|
|
111
|
+
/**
|
|
112
|
+
* Null = as often as they like.
|
|
113
|
+
*/
|
|
114
|
+
passesPerPerson: PassesPerPerson | null;
|
|
115
|
+
realDaysAtLeast: number;
|
|
116
|
+
schedule: Schedule;
|
|
117
|
+
/**
|
|
118
|
+
* The human-readable policy readback the Console shows.
|
|
119
|
+
*/
|
|
120
|
+
line: string;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* A gate as the Gates API returns it — your own facts about the gate, never anything about people.
|
|
125
|
+
*/
|
|
126
|
+
export type Gate = {
|
|
127
|
+
/**
|
|
128
|
+
* The gate key — what `create-verification-link` sends as `gate`.
|
|
129
|
+
*/
|
|
130
|
+
key: string;
|
|
131
|
+
name: string;
|
|
132
|
+
/**
|
|
133
|
+
* The gate's line to people on the arrival card.
|
|
134
|
+
*/
|
|
135
|
+
message: string | null;
|
|
136
|
+
/**
|
|
137
|
+
* `draft` until activated; `closed` once closed (a closed gate cannot be reopened).
|
|
138
|
+
*/
|
|
139
|
+
status: Status;
|
|
140
|
+
/**
|
|
141
|
+
* Where an active gate is in its schedule. Null unless `status` is `active`.
|
|
142
|
+
*/
|
|
143
|
+
state: GateState | null;
|
|
144
|
+
/**
|
|
145
|
+
* The key's environment.
|
|
146
|
+
*/
|
|
147
|
+
environment: GateEnvironment;
|
|
148
|
+
/**
|
|
149
|
+
* Where the gate sends a person after they pass.
|
|
150
|
+
*/
|
|
151
|
+
destinationUrl: string | null;
|
|
152
|
+
/**
|
|
153
|
+
* The effective policy (base → org → gate). Null if none could be loaded.
|
|
154
|
+
*/
|
|
155
|
+
policy: Policy | null;
|
|
156
|
+
placedAt: Date;
|
|
157
|
+
/**
|
|
158
|
+
* true when an API key (not the Console) placed the gate.
|
|
159
|
+
*/
|
|
160
|
+
placedByApi: boolean;
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
/** @internal */
|
|
164
|
+
export const Status$inboundSchema: z.ZodType<Status, z.ZodTypeDef, unknown> =
|
|
165
|
+
openEnums.inboundSchema(Status);
|
|
166
|
+
/** @internal */
|
|
167
|
+
export const Status$outboundSchema: z.ZodType<string, z.ZodTypeDef, Status> =
|
|
168
|
+
openEnums.outboundSchema(Status);
|
|
169
|
+
|
|
170
|
+
/** @internal */
|
|
171
|
+
export const GateState$inboundSchema: z.ZodType<
|
|
172
|
+
GateState,
|
|
173
|
+
z.ZodTypeDef,
|
|
174
|
+
unknown
|
|
175
|
+
> = openEnums.inboundSchema(GateState);
|
|
176
|
+
/** @internal */
|
|
177
|
+
export const GateState$outboundSchema: z.ZodType<
|
|
178
|
+
string,
|
|
179
|
+
z.ZodTypeDef,
|
|
180
|
+
GateState
|
|
181
|
+
> = openEnums.outboundSchema(GateState);
|
|
182
|
+
|
|
183
|
+
/** @internal */
|
|
184
|
+
export const GateEnvironment$inboundSchema: z.ZodType<
|
|
185
|
+
GateEnvironment,
|
|
186
|
+
z.ZodTypeDef,
|
|
187
|
+
unknown
|
|
188
|
+
> = openEnums.inboundSchema(GateEnvironment);
|
|
189
|
+
/** @internal */
|
|
190
|
+
export const GateEnvironment$outboundSchema: z.ZodType<
|
|
191
|
+
string,
|
|
192
|
+
z.ZodTypeDef,
|
|
193
|
+
GateEnvironment
|
|
194
|
+
> = openEnums.outboundSchema(GateEnvironment);
|
|
195
|
+
|
|
196
|
+
/** @internal */
|
|
197
|
+
export const GatePreset$inboundSchema: z.ZodType<
|
|
198
|
+
GatePreset,
|
|
199
|
+
z.ZodTypeDef,
|
|
200
|
+
unknown
|
|
201
|
+
> = openEnums.inboundSchema(GatePreset);
|
|
202
|
+
/** @internal */
|
|
203
|
+
export const GatePreset$outboundSchema: z.ZodType<
|
|
204
|
+
string,
|
|
205
|
+
z.ZodTypeDef,
|
|
206
|
+
GatePreset
|
|
207
|
+
> = openEnums.outboundSchema(GatePreset);
|
|
208
|
+
|
|
209
|
+
/** @internal */
|
|
210
|
+
export const GateType$inboundSchema: z.ZodType<
|
|
211
|
+
GateType,
|
|
212
|
+
z.ZodTypeDef,
|
|
213
|
+
unknown
|
|
214
|
+
> = openEnums.inboundSchema(GateType);
|
|
215
|
+
/** @internal */
|
|
216
|
+
export const GateType$outboundSchema: z.ZodType<
|
|
217
|
+
string,
|
|
218
|
+
z.ZodTypeDef,
|
|
219
|
+
GateType
|
|
220
|
+
> = openEnums.outboundSchema(GateType);
|
|
221
|
+
|
|
222
|
+
/** @internal */
|
|
223
|
+
export const AgeThreshold$inboundSchema: z.ZodType<
|
|
224
|
+
AgeThreshold,
|
|
225
|
+
z.ZodTypeDef,
|
|
226
|
+
unknown
|
|
227
|
+
> = openEnums.inboundSchemaInt(AgeThreshold);
|
|
228
|
+
/** @internal */
|
|
229
|
+
export const AgeThreshold$outboundSchema: z.ZodType<
|
|
230
|
+
number,
|
|
231
|
+
z.ZodTypeDef,
|
|
232
|
+
AgeThreshold
|
|
233
|
+
> = openEnums.outboundSchemaInt(AgeThreshold);
|
|
234
|
+
|
|
235
|
+
/** @internal */
|
|
236
|
+
export const GateLink$inboundSchema: z.ZodType<
|
|
237
|
+
GateLink,
|
|
238
|
+
z.ZodTypeDef,
|
|
239
|
+
unknown
|
|
240
|
+
> = openEnums.inboundSchema(GateLink);
|
|
241
|
+
/** @internal */
|
|
242
|
+
export const GateLink$outboundSchema: z.ZodType<
|
|
243
|
+
string,
|
|
244
|
+
z.ZodTypeDef,
|
|
245
|
+
GateLink
|
|
246
|
+
> = openEnums.outboundSchema(GateLink);
|
|
247
|
+
|
|
248
|
+
/** @internal */
|
|
249
|
+
export const Schedule$inboundSchema: z.ZodType<
|
|
250
|
+
Schedule,
|
|
251
|
+
z.ZodTypeDef,
|
|
252
|
+
unknown
|
|
253
|
+
> = z.object({
|
|
254
|
+
opensAt: types.nullable(types.date()),
|
|
255
|
+
closesAt: types.nullable(types.date()),
|
|
256
|
+
});
|
|
257
|
+
/** @internal */
|
|
258
|
+
export type Schedule$Outbound = {
|
|
259
|
+
opensAt: string | null;
|
|
260
|
+
closesAt: string | null;
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
/** @internal */
|
|
264
|
+
export const Schedule$outboundSchema: z.ZodType<
|
|
265
|
+
Schedule$Outbound,
|
|
266
|
+
z.ZodTypeDef,
|
|
267
|
+
Schedule
|
|
268
|
+
> = z.object({
|
|
269
|
+
opensAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
270
|
+
closesAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
export function scheduleToJSON(schedule: Schedule): string {
|
|
274
|
+
return JSON.stringify(Schedule$outboundSchema.parse(schedule));
|
|
275
|
+
}
|
|
276
|
+
export function scheduleFromJSON(
|
|
277
|
+
jsonString: string,
|
|
278
|
+
): SafeParseResult<Schedule, SDKValidationError> {
|
|
279
|
+
return safeParse(
|
|
280
|
+
jsonString,
|
|
281
|
+
(x) => Schedule$inboundSchema.parse(JSON.parse(x)),
|
|
282
|
+
`Failed to parse 'Schedule' from JSON`,
|
|
283
|
+
);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/** @internal */
|
|
287
|
+
export const Policy$inboundSchema: z.ZodType<Policy, z.ZodTypeDef, unknown> = z
|
|
288
|
+
.object({
|
|
289
|
+
preset: types.nullable(GatePreset$inboundSchema),
|
|
290
|
+
gate_type: GateType$inboundSchema,
|
|
291
|
+
age_threshold: types.nullable(AgeThreshold$inboundSchema),
|
|
292
|
+
signed_up: types.boolean(),
|
|
293
|
+
link: GateLink$inboundSchema,
|
|
294
|
+
passes_per_person: types.nullable(PassesPerPerson$inboundSchema),
|
|
295
|
+
real_days_at_least: types.number(),
|
|
296
|
+
schedule: z.lazy(() => Schedule$inboundSchema),
|
|
297
|
+
line: types.string(),
|
|
298
|
+
}).transform((v) => {
|
|
299
|
+
return remap$(v, {
|
|
300
|
+
"gate_type": "gateType",
|
|
301
|
+
"age_threshold": "ageThreshold",
|
|
302
|
+
"signed_up": "signedUp",
|
|
303
|
+
"passes_per_person": "passesPerPerson",
|
|
304
|
+
"real_days_at_least": "realDaysAtLeast",
|
|
305
|
+
});
|
|
306
|
+
});
|
|
307
|
+
/** @internal */
|
|
308
|
+
export type Policy$Outbound = {
|
|
309
|
+
preset: string | null;
|
|
310
|
+
gate_type: string;
|
|
311
|
+
age_threshold: number | null;
|
|
312
|
+
signed_up: boolean;
|
|
313
|
+
link: string;
|
|
314
|
+
passes_per_person: PassesPerPerson$Outbound | null;
|
|
315
|
+
real_days_at_least: number;
|
|
316
|
+
schedule: Schedule$Outbound;
|
|
317
|
+
line: string;
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
/** @internal */
|
|
321
|
+
export const Policy$outboundSchema: z.ZodType<
|
|
322
|
+
Policy$Outbound,
|
|
323
|
+
z.ZodTypeDef,
|
|
324
|
+
Policy
|
|
325
|
+
> = z.object({
|
|
326
|
+
preset: z.nullable(GatePreset$outboundSchema),
|
|
327
|
+
gateType: GateType$outboundSchema,
|
|
328
|
+
ageThreshold: z.nullable(AgeThreshold$outboundSchema),
|
|
329
|
+
signedUp: z.boolean(),
|
|
330
|
+
link: GateLink$outboundSchema,
|
|
331
|
+
passesPerPerson: z.nullable(PassesPerPerson$outboundSchema),
|
|
332
|
+
realDaysAtLeast: z.number().int(),
|
|
333
|
+
schedule: z.lazy(() => Schedule$outboundSchema),
|
|
334
|
+
line: z.string(),
|
|
335
|
+
}).transform((v) => {
|
|
336
|
+
return remap$(v, {
|
|
337
|
+
gateType: "gate_type",
|
|
338
|
+
ageThreshold: "age_threshold",
|
|
339
|
+
signedUp: "signed_up",
|
|
340
|
+
passesPerPerson: "passes_per_person",
|
|
341
|
+
realDaysAtLeast: "real_days_at_least",
|
|
342
|
+
});
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
export function policyToJSON(policy: Policy): string {
|
|
346
|
+
return JSON.stringify(Policy$outboundSchema.parse(policy));
|
|
347
|
+
}
|
|
348
|
+
export function policyFromJSON(
|
|
349
|
+
jsonString: string,
|
|
350
|
+
): SafeParseResult<Policy, SDKValidationError> {
|
|
351
|
+
return safeParse(
|
|
352
|
+
jsonString,
|
|
353
|
+
(x) => Policy$inboundSchema.parse(JSON.parse(x)),
|
|
354
|
+
`Failed to parse 'Policy' from JSON`,
|
|
355
|
+
);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/** @internal */
|
|
359
|
+
export const Gate$inboundSchema: z.ZodType<Gate, z.ZodTypeDef, unknown> = z
|
|
360
|
+
.object({
|
|
361
|
+
key: types.string(),
|
|
362
|
+
name: types.string(),
|
|
363
|
+
message: types.nullable(types.string()),
|
|
364
|
+
status: Status$inboundSchema,
|
|
365
|
+
state: types.nullable(GateState$inboundSchema),
|
|
366
|
+
environment: GateEnvironment$inboundSchema,
|
|
367
|
+
destination_url: types.nullable(types.string()),
|
|
368
|
+
policy: types.nullable(z.lazy(() => Policy$inboundSchema)),
|
|
369
|
+
placed_at: types.date(),
|
|
370
|
+
placed_by_api: types.boolean(),
|
|
371
|
+
}).transform((v) => {
|
|
372
|
+
return remap$(v, {
|
|
373
|
+
"destination_url": "destinationUrl",
|
|
374
|
+
"placed_at": "placedAt",
|
|
375
|
+
"placed_by_api": "placedByApi",
|
|
376
|
+
});
|
|
377
|
+
});
|
|
378
|
+
/** @internal */
|
|
379
|
+
export type Gate$Outbound = {
|
|
380
|
+
key: string;
|
|
381
|
+
name: string;
|
|
382
|
+
message: string | null;
|
|
383
|
+
status: string;
|
|
384
|
+
state: string | null;
|
|
385
|
+
environment: string;
|
|
386
|
+
destination_url: string | null;
|
|
387
|
+
policy: Policy$Outbound | null;
|
|
388
|
+
placed_at: string;
|
|
389
|
+
placed_by_api: boolean;
|
|
390
|
+
};
|
|
391
|
+
|
|
392
|
+
/** @internal */
|
|
393
|
+
export const Gate$outboundSchema: z.ZodType<Gate$Outbound, z.ZodTypeDef, Gate> =
|
|
394
|
+
z.object({
|
|
395
|
+
key: z.string(),
|
|
396
|
+
name: z.string(),
|
|
397
|
+
message: z.nullable(z.string()),
|
|
398
|
+
status: Status$outboundSchema,
|
|
399
|
+
state: z.nullable(GateState$outboundSchema),
|
|
400
|
+
environment: GateEnvironment$outboundSchema,
|
|
401
|
+
destinationUrl: z.nullable(z.string()),
|
|
402
|
+
policy: z.nullable(z.lazy(() => Policy$outboundSchema)),
|
|
403
|
+
placedAt: z.date().transform(v => v.toISOString()),
|
|
404
|
+
placedByApi: z.boolean(),
|
|
405
|
+
}).transform((v) => {
|
|
406
|
+
return remap$(v, {
|
|
407
|
+
destinationUrl: "destination_url",
|
|
408
|
+
placedAt: "placed_at",
|
|
409
|
+
placedByApi: "placed_by_api",
|
|
410
|
+
});
|
|
411
|
+
});
|
|
412
|
+
|
|
413
|
+
export function gateToJSON(gate: Gate): string {
|
|
414
|
+
return JSON.stringify(Gate$outboundSchema.parse(gate));
|
|
415
|
+
}
|
|
416
|
+
export function gateFromJSON(
|
|
417
|
+
jsonString: string,
|
|
418
|
+
): SafeParseResult<Gate, SDKValidationError> {
|
|
419
|
+
return safeParse(
|
|
420
|
+
jsonString,
|
|
421
|
+
(x) => Gate$inboundSchema.parse(JSON.parse(x)),
|
|
422
|
+
`Failed to parse 'Gate' from JSON`,
|
|
423
|
+
);
|
|
424
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import * as types from "../types/primitives.js";
|
|
9
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Gates API handler error. Arrives inside `data.error` with HTTP 200 — check for it before reading the result.
|
|
13
|
+
*/
|
|
14
|
+
export type GatesApiError = {
|
|
15
|
+
message: string;
|
|
16
|
+
statusCode: number;
|
|
17
|
+
code: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const GatesApiError$inboundSchema: z.ZodType<
|
|
22
|
+
GatesApiError,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
unknown
|
|
25
|
+
> = z.object({
|
|
26
|
+
message: types.string(),
|
|
27
|
+
statusCode: types.number(),
|
|
28
|
+
code: types.string(),
|
|
29
|
+
});
|
|
30
|
+
/** @internal */
|
|
31
|
+
export type GatesApiError$Outbound = {
|
|
32
|
+
message: string;
|
|
33
|
+
statusCode: number;
|
|
34
|
+
code: string;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const GatesApiError$outboundSchema: z.ZodType<
|
|
39
|
+
GatesApiError$Outbound,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
GatesApiError
|
|
42
|
+
> = z.object({
|
|
43
|
+
message: z.string(),
|
|
44
|
+
statusCode: z.number().int(),
|
|
45
|
+
code: z.string(),
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
export function gatesApiErrorToJSON(gatesApiError: GatesApiError): string {
|
|
49
|
+
return JSON.stringify(GatesApiError$outboundSchema.parse(gatesApiError));
|
|
50
|
+
}
|
|
51
|
+
export function gatesApiErrorFromJSON(
|
|
52
|
+
jsonString: string,
|
|
53
|
+
): SafeParseResult<GatesApiError, SDKValidationError> {
|
|
54
|
+
return safeParse(
|
|
55
|
+
jsonString,
|
|
56
|
+
(x) => GatesApiError$inboundSchema.parse(JSON.parse(x)),
|
|
57
|
+
`Failed to parse 'GatesApiError' from JSON`,
|
|
58
|
+
);
|
|
59
|
+
}
|
package/src/models/index.ts
CHANGED
|
@@ -2,7 +2,16 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
export * from "./bot-shield-action.js";
|
|
5
6
|
export * from "./error-body.js";
|
|
6
7
|
export * from "./error-response.js";
|
|
8
|
+
export * from "./gate-human-verified-event.js";
|
|
9
|
+
export * from "./gate-policy-doc.js";
|
|
10
|
+
export * from "./gate-schedule.js";
|
|
11
|
+
export * from "./gate.js";
|
|
12
|
+
export * from "./gates-api-error.js";
|
|
13
|
+
export * from "./inline-passkey-assertion.js";
|
|
14
|
+
export * from "./inline-passkey-request-options.js";
|
|
7
15
|
export * from "./invalid-input-error.js";
|
|
16
|
+
export * from "./passes-per-person.js";
|
|
8
17
|
export * from "./security.js";
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
+
import * as types from "../types/primitives.js";
|
|
10
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
11
|
+
|
|
12
|
+
export const InlinePasskeyAssertionType = {
|
|
13
|
+
PublicKey: "public-key",
|
|
14
|
+
} as const;
|
|
15
|
+
export type InlinePasskeyAssertionType = ClosedEnum<
|
|
16
|
+
typeof InlinePasskeyAssertionType
|
|
17
|
+
>;
|
|
18
|
+
|
|
19
|
+
export type ResponseT = {
|
|
20
|
+
clientDataJSON: string;
|
|
21
|
+
authenticatorData: string;
|
|
22
|
+
signature: string;
|
|
23
|
+
userHandle?: string | undefined;
|
|
24
|
+
[additionalProperties: string]: unknown;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* WebAuthn AuthenticationResponseJSON (base64url strings) — the result of navigator.credentials.get(), serialized (e.g. PublicKeyCredential.toJSON() or @simplewebauthn/browser startAuthentication()).
|
|
29
|
+
*/
|
|
30
|
+
export type InlinePasskeyAssertion = {
|
|
31
|
+
id: string;
|
|
32
|
+
rawId: string;
|
|
33
|
+
type: InlinePasskeyAssertionType;
|
|
34
|
+
authenticatorAttachment?: string | undefined;
|
|
35
|
+
clientExtensionResults?: { [k: string]: any } | undefined;
|
|
36
|
+
response: ResponseT;
|
|
37
|
+
[additionalProperties: string]: unknown;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const InlinePasskeyAssertionType$inboundSchema: z.ZodNativeEnum<
|
|
42
|
+
typeof InlinePasskeyAssertionType
|
|
43
|
+
> = z.nativeEnum(InlinePasskeyAssertionType);
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const InlinePasskeyAssertionType$outboundSchema: z.ZodNativeEnum<
|
|
46
|
+
typeof InlinePasskeyAssertionType
|
|
47
|
+
> = InlinePasskeyAssertionType$inboundSchema;
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const ResponseT$inboundSchema: z.ZodType<
|
|
51
|
+
ResponseT,
|
|
52
|
+
z.ZodTypeDef,
|
|
53
|
+
unknown
|
|
54
|
+
> = z.object({
|
|
55
|
+
clientDataJSON: types.string(),
|
|
56
|
+
authenticatorData: types.string(),
|
|
57
|
+
signature: types.string(),
|
|
58
|
+
userHandle: types.optional(types.string()),
|
|
59
|
+
}).catchall(z.any());
|
|
60
|
+
/** @internal */
|
|
61
|
+
export type ResponseT$Outbound = {
|
|
62
|
+
clientDataJSON: string;
|
|
63
|
+
authenticatorData: string;
|
|
64
|
+
signature: string;
|
|
65
|
+
userHandle?: string | undefined;
|
|
66
|
+
[additionalProperties: string]: unknown;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/** @internal */
|
|
70
|
+
export const ResponseT$outboundSchema: z.ZodType<
|
|
71
|
+
ResponseT$Outbound,
|
|
72
|
+
z.ZodTypeDef,
|
|
73
|
+
ResponseT
|
|
74
|
+
> = z.object({
|
|
75
|
+
clientDataJSON: z.string(),
|
|
76
|
+
authenticatorData: z.string(),
|
|
77
|
+
signature: z.string(),
|
|
78
|
+
userHandle: z.string().optional(),
|
|
79
|
+
}).catchall(z.any());
|
|
80
|
+
|
|
81
|
+
export function responseToJSON(responseT: ResponseT): string {
|
|
82
|
+
return JSON.stringify(ResponseT$outboundSchema.parse(responseT));
|
|
83
|
+
}
|
|
84
|
+
export function responseFromJSON(
|
|
85
|
+
jsonString: string,
|
|
86
|
+
): SafeParseResult<ResponseT, SDKValidationError> {
|
|
87
|
+
return safeParse(
|
|
88
|
+
jsonString,
|
|
89
|
+
(x) => ResponseT$inboundSchema.parse(JSON.parse(x)),
|
|
90
|
+
`Failed to parse 'ResponseT' from JSON`,
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** @internal */
|
|
95
|
+
export const InlinePasskeyAssertion$inboundSchema: z.ZodType<
|
|
96
|
+
InlinePasskeyAssertion,
|
|
97
|
+
z.ZodTypeDef,
|
|
98
|
+
unknown
|
|
99
|
+
> = z.object({
|
|
100
|
+
id: types.string(),
|
|
101
|
+
rawId: types.string(),
|
|
102
|
+
type: InlinePasskeyAssertionType$inboundSchema,
|
|
103
|
+
authenticatorAttachment: types.optional(types.string()),
|
|
104
|
+
clientExtensionResults: types.optional(z.record(z.any())),
|
|
105
|
+
response: z.lazy(() => ResponseT$inboundSchema),
|
|
106
|
+
}).catchall(z.any());
|
|
107
|
+
/** @internal */
|
|
108
|
+
export type InlinePasskeyAssertion$Outbound = {
|
|
109
|
+
id: string;
|
|
110
|
+
rawId: string;
|
|
111
|
+
type: string;
|
|
112
|
+
authenticatorAttachment?: string | undefined;
|
|
113
|
+
clientExtensionResults?: { [k: string]: any } | undefined;
|
|
114
|
+
response: ResponseT$Outbound;
|
|
115
|
+
[additionalProperties: string]: unknown;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
/** @internal */
|
|
119
|
+
export const InlinePasskeyAssertion$outboundSchema: z.ZodType<
|
|
120
|
+
InlinePasskeyAssertion$Outbound,
|
|
121
|
+
z.ZodTypeDef,
|
|
122
|
+
InlinePasskeyAssertion
|
|
123
|
+
> = z.object({
|
|
124
|
+
id: z.string(),
|
|
125
|
+
rawId: z.string(),
|
|
126
|
+
type: InlinePasskeyAssertionType$outboundSchema,
|
|
127
|
+
authenticatorAttachment: z.string().optional(),
|
|
128
|
+
clientExtensionResults: z.record(z.any()).optional(),
|
|
129
|
+
response: z.lazy(() => ResponseT$outboundSchema),
|
|
130
|
+
}).catchall(z.any());
|
|
131
|
+
|
|
132
|
+
export function inlinePasskeyAssertionToJSON(
|
|
133
|
+
inlinePasskeyAssertion: InlinePasskeyAssertion,
|
|
134
|
+
): string {
|
|
135
|
+
return JSON.stringify(
|
|
136
|
+
InlinePasskeyAssertion$outboundSchema.parse(inlinePasskeyAssertion),
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
export function inlinePasskeyAssertionFromJSON(
|
|
140
|
+
jsonString: string,
|
|
141
|
+
): SafeParseResult<InlinePasskeyAssertion, SDKValidationError> {
|
|
142
|
+
return safeParse(
|
|
143
|
+
jsonString,
|
|
144
|
+
(x) => InlinePasskeyAssertion$inboundSchema.parse(JSON.parse(x)),
|
|
145
|
+
`Failed to parse 'InlinePasskeyAssertion' from JSON`,
|
|
146
|
+
);
|
|
147
|
+
}
|