botshield-sdk 2.3.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -2
- package/bin/mcp-server.js +753 -47
- package/bin/mcp-server.js.map +30 -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/verification-get-status.d.ts +1 -1
- package/dist/commonjs/funcs/verification-get-status.js +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 +10 -0
- package/dist/commonjs/models/bot-shield-action.d.ts.map +1 -1
- package/dist/commonjs/models/bot-shield-action.js +8 -0
- package/dist/commonjs/models/bot-shield-action.js.map +1 -1
- package/dist/commonjs/models/error-body.d.ts +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 +5 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +5 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- 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 +43 -2
- package/dist/commonjs/models/operations/sdk-create-verification-link.d.ts.map +1 -1
- package/dist/commonjs/models/operations/sdk-create-verification-link.js +30 -1
- package/dist/commonjs/models/operations/sdk-create-verification-link.js.map +1 -1
- package/dist/commonjs/models/operations/sdk-send-by-number.d.ts +124 -0
- package/dist/commonjs/models/operations/sdk-send-by-number.d.ts.map +1 -0
- package/dist/commonjs/models/operations/sdk-send-by-number.js +203 -0
- package/dist/commonjs/models/operations/sdk-send-by-number.js.map +1 -0
- package/dist/commonjs/models/operations/sdk-verify-resolution.d.ts +125 -0
- package/dist/commonjs/models/operations/sdk-verify-resolution.d.ts.map +1 -0
- package/dist/commonjs/models/operations/sdk-verify-resolution.js +182 -0
- package/dist/commonjs/models/operations/sdk-verify-resolution.js.map +1 -0
- package/dist/commonjs/models/operations/sdk-verify-token.d.ts +95 -1
- package/dist/commonjs/models/operations/sdk-verify-token.d.ts.map +1 -1
- package/dist/commonjs/models/operations/sdk-verify-token.js +86 -1
- package/dist/commonjs/models/operations/sdk-verify-token.js.map +1 -1
- package/dist/commonjs/models/operations/verification-get-status.d.ts +40 -5
- package/dist/commonjs/models/operations/verification-get-status.d.ts.map +1 -1
- package/dist/commonjs/models/operations/verification-get-status.js +33 -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/sdk.d.ts +2 -2
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -4
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/commonjs/sdk/verification.d.ts +1 -1
- package/dist/commonjs/sdk/verification.js +1 -1
- package/dist/esm/funcs/actions-propose-action.d.ts +1 -1
- package/dist/esm/funcs/actions-propose-action.js +1 -1
- package/dist/esm/funcs/actions-verify-resolution.d.ts +18 -0
- package/dist/esm/funcs/actions-verify-resolution.d.ts.map +1 -0
- package/dist/esm/funcs/actions-verify-resolution.js +93 -0
- package/dist/esm/funcs/actions-verify-resolution.js.map +1 -0
- package/dist/esm/funcs/census-confirm-link.d.ts +17 -0
- package/dist/esm/funcs/census-confirm-link.d.ts.map +1 -0
- package/dist/esm/funcs/census-confirm-link.js +83 -0
- package/dist/esm/funcs/census-confirm-link.js.map +1 -0
- package/dist/esm/funcs/census-create-verification-link.d.ts +2 -0
- package/dist/esm/funcs/census-create-verification-link.d.ts.map +1 -1
- package/dist/esm/funcs/census-create-verification-link.js +2 -0
- package/dist/esm/funcs/census-create-verification-link.js.map +1 -1
- package/dist/esm/funcs/census-send-by-number.d.ts +18 -0
- package/dist/esm/funcs/census-send-by-number.d.ts.map +1 -0
- package/dist/esm/funcs/census-send-by-number.js +87 -0
- package/dist/esm/funcs/census-send-by-number.js.map +1 -0
- package/dist/esm/funcs/census-verify-token.d.ts +1 -1
- package/dist/esm/funcs/census-verify-token.js +1 -1
- package/dist/esm/funcs/gates-actions-request-cancel.d.ts +18 -0
- package/dist/esm/funcs/gates-actions-request-cancel.d.ts.map +1 -0
- package/dist/esm/funcs/gates-actions-request-cancel.js +87 -0
- package/dist/esm/funcs/gates-actions-request-cancel.js.map +1 -0
- package/dist/esm/funcs/gates-actions-request-status.js +1 -0
- package/dist/esm/funcs/gates-actions-request-status.js.map +1 -1
- package/dist/esm/funcs/gates-actions-request.d.ts +1 -1
- package/dist/esm/funcs/gates-actions-request.js +1 -1
- package/dist/esm/funcs/gates-actions-update.d.ts +18 -0
- package/dist/esm/funcs/gates-actions-update.d.ts.map +1 -0
- package/dist/esm/funcs/gates-actions-update.js +87 -0
- package/dist/esm/funcs/gates-actions-update.js.map +1 -0
- package/dist/esm/funcs/verification-get-status.d.ts +1 -1
- package/dist/esm/funcs/verification-get-status.js +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 +10 -0
- package/dist/esm/models/bot-shield-action.d.ts.map +1 -1
- package/dist/esm/models/bot-shield-action.js +8 -0
- package/dist/esm/models/bot-shield-action.js.map +1 -1
- package/dist/esm/models/error-body.d.ts +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 +5 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +5 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- 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 +43 -2
- package/dist/esm/models/operations/sdk-create-verification-link.d.ts.map +1 -1
- package/dist/esm/models/operations/sdk-create-verification-link.js +29 -0
- package/dist/esm/models/operations/sdk-create-verification-link.js.map +1 -1
- package/dist/esm/models/operations/sdk-send-by-number.d.ts +124 -0
- package/dist/esm/models/operations/sdk-send-by-number.d.ts.map +1 -0
- package/dist/esm/models/operations/sdk-send-by-number.js +155 -0
- package/dist/esm/models/operations/sdk-send-by-number.js.map +1 -0
- package/dist/esm/models/operations/sdk-verify-resolution.d.ts +125 -0
- package/dist/esm/models/operations/sdk-verify-resolution.d.ts.map +1 -0
- package/dist/esm/models/operations/sdk-verify-resolution.js +136 -0
- package/dist/esm/models/operations/sdk-verify-resolution.js.map +1 -0
- package/dist/esm/models/operations/sdk-verify-token.d.ts +95 -1
- package/dist/esm/models/operations/sdk-verify-token.d.ts.map +1 -1
- package/dist/esm/models/operations/sdk-verify-token.js +83 -0
- package/dist/esm/models/operations/sdk-verify-token.js.map +1 -1
- package/dist/esm/models/operations/verification-get-status.d.ts +40 -5
- package/dist/esm/models/operations/verification-get-status.d.ts.map +1 -1
- package/dist/esm/models/operations/verification-get-status.js +32 -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/sdk.d.ts +2 -2
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -4
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/dist/esm/sdk/verification.d.ts +1 -1
- package/dist/esm/sdk/verification.js +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/actions-propose-action.ts +1 -1
- package/src/funcs/actions-verify-resolution.ts +192 -0
- package/src/funcs/census-confirm-link.ts +171 -0
- package/src/funcs/census-create-verification-link.ts +2 -0
- package/src/funcs/census-send-by-number.ts +180 -0
- package/src/funcs/census-verify-token.ts +1 -1
- package/src/funcs/gates-actions-request-cancel.ts +187 -0
- package/src/funcs/gates-actions-request-status.ts +1 -0
- package/src/funcs/gates-actions-request.ts +1 -1
- package/src/funcs/gates-actions-update.ts +185 -0
- package/src/funcs/verification-get-status.ts +1 -1
- 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 +18 -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 +5 -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 +69 -2
- package/src/models/operations/sdk-send-by-number.ts +372 -0
- package/src/models/operations/sdk-verify-resolution.ts +341 -0
- package/src/models/operations/sdk-verify-token.ts +189 -1
- package/src/models/operations/verification-get-status.ts +67 -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/sdk.ts +5 -5
- package/src/sdk/verification.ts +1 -1
|
@@ -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
|
+
}
|
|
@@ -26,6 +26,10 @@ export type SDKVerifyTokenRequest = {
|
|
|
26
26
|
* Your organization id (the organization_id shown in Console settings). When given, a token issued for any other organization is rejected.
|
|
27
27
|
*/
|
|
28
28
|
audience?: string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* 4.0: with your secret key, on a token whose link is pending, this confirms the link (same as sdk/confirm-link). The answer's `link` says whether it went live.
|
|
31
|
+
*/
|
|
32
|
+
partnerUserRef?: string | undefined;
|
|
29
33
|
};
|
|
30
34
|
|
|
31
35
|
/**
|
|
@@ -41,6 +45,32 @@ export const AgeOver = {
|
|
|
41
45
|
*/
|
|
42
46
|
export type AgeOver = OpenEnum<typeof AgeOver>;
|
|
43
47
|
|
|
48
|
+
/**
|
|
49
|
+
* `verification`: a person passed a check or a link. `action`: a person confirmed a BotShield Action. Null on a token issued before 4.0.
|
|
50
|
+
*/
|
|
51
|
+
export const Kind = {
|
|
52
|
+
Verification: "verification",
|
|
53
|
+
Action: "action",
|
|
54
|
+
} as const;
|
|
55
|
+
/**
|
|
56
|
+
* `verification`: a person passed a check or a link. `action`: a person confirmed a BotShield Action. Null on a token issued before 4.0.
|
|
57
|
+
*/
|
|
58
|
+
export type Kind = OpenEnum<typeof Kind>;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The environment of the key that started the request. Null on a token issued before 4.0, or when it was not known.
|
|
62
|
+
*/
|
|
63
|
+
export const SDKVerifyTokenEnvironment = {
|
|
64
|
+
Development: "development",
|
|
65
|
+
Production: "production",
|
|
66
|
+
} as const;
|
|
67
|
+
/**
|
|
68
|
+
* The environment of the key that started the request. Null on a token issued before 4.0, or when it was not known.
|
|
69
|
+
*/
|
|
70
|
+
export type SDKVerifyTokenEnvironment = OpenEnum<
|
|
71
|
+
typeof SDKVerifyTokenEnvironment
|
|
72
|
+
>;
|
|
73
|
+
|
|
44
74
|
export type Claims = {
|
|
45
75
|
requestId?: string | undefined;
|
|
46
76
|
verified?: boolean | undefined;
|
|
@@ -73,6 +103,18 @@ export type Claims = {
|
|
|
73
103
|
* BotShield Actions: the `act` this tap was for, echoed verbatim (your own string, e.g. `dibs:listing_4417`). Present only on tokens minted for an action.
|
|
74
104
|
*/
|
|
75
105
|
act?: string | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* `verification`: a person passed a check or a link. `action`: a person confirmed a BotShield Action. Null on a token issued before 4.0.
|
|
108
|
+
*/
|
|
109
|
+
kind?: Kind | null | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* The environment of the key that started the request. Null on a token issued before 4.0, or when it was not known.
|
|
112
|
+
*/
|
|
113
|
+
environment?: SDKVerifyTokenEnvironment | null | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* 4.0: where the link stood for this token: `pending`, `live`, `expired` or `refused`. Absent on a plain check.
|
|
116
|
+
*/
|
|
117
|
+
linkState?: string | undefined;
|
|
76
118
|
};
|
|
77
119
|
|
|
78
120
|
/**
|
|
@@ -87,10 +129,32 @@ export const SDKVerifyTokenVerdict = {
|
|
|
87
129
|
*/
|
|
88
130
|
export type SDKVerifyTokenVerdict = OpenEnum<typeof SDKVerifyTokenVerdict>;
|
|
89
131
|
|
|
132
|
+
export const SDKVerifyTokenState = {
|
|
133
|
+
Pending: "pending",
|
|
134
|
+
Live: "live",
|
|
135
|
+
NotLive: "not_live",
|
|
136
|
+
} as const;
|
|
137
|
+
export type SDKVerifyTokenState = OpenEnum<typeof SDKVerifyTokenState>;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* 4.0: present only on a token whose link waited for your server. `pending`: not confirmed (send your secret key and `partner_user_ref`, or call sdk/confirm-link). `live` with `confirmed: true`: this check confirmed it. `not_live`: the confirm was refused (`code`).
|
|
141
|
+
*/
|
|
142
|
+
export type SDKVerifyTokenLink = {
|
|
143
|
+
state?: SDKVerifyTokenState | undefined;
|
|
144
|
+
confirmed?: boolean | undefined;
|
|
145
|
+
handle?: string | undefined;
|
|
146
|
+
firstTime?: boolean | undefined;
|
|
147
|
+
/**
|
|
148
|
+
* `link_pending`, or the confirm refusal code (as sdk/confirm-link).
|
|
149
|
+
*/
|
|
150
|
+
code?: string | undefined;
|
|
151
|
+
message?: string | undefined;
|
|
152
|
+
};
|
|
153
|
+
|
|
90
154
|
export type SDKVerifyTokenDataData = {
|
|
91
155
|
valid: boolean;
|
|
92
156
|
/**
|
|
93
|
-
* Present when valid is false.
|
|
157
|
+
* Present when valid is false. A plain line, not a code. Includes: `Invalid token — not a BotShield verification token` (a token of another kind), `Invalid token — unknown environment`, and `Token was issued in the development environment; this key is production.` (or the reverse).
|
|
94
158
|
*/
|
|
95
159
|
reason?: string | undefined;
|
|
96
160
|
/**
|
|
@@ -106,6 +170,10 @@ export type SDKVerifyTokenDataData = {
|
|
|
106
170
|
* Present when `valid` is true. `pass` when the token records a verified human.
|
|
107
171
|
*/
|
|
108
172
|
verdict?: SDKVerifyTokenVerdict | undefined;
|
|
173
|
+
/**
|
|
174
|
+
* 4.0: present only on a token whose link waited for your server. `pending`: not confirmed (send your secret key and `partner_user_ref`, or call sdk/confirm-link). `live` with `confirmed: true`: this check confirmed it. `not_live`: the confirm was refused (`code`).
|
|
175
|
+
*/
|
|
176
|
+
link?: SDKVerifyTokenLink | undefined;
|
|
109
177
|
};
|
|
110
178
|
|
|
111
179
|
export type SDKVerifyTokenData = {
|
|
@@ -173,11 +241,17 @@ export const SDKVerifyTokenRequest$inboundSchema: z.ZodType<
|
|
|
173
241
|
> = z.object({
|
|
174
242
|
token: types.string(),
|
|
175
243
|
audience: types.optional(types.string()),
|
|
244
|
+
partner_user_ref: types.optional(types.string()),
|
|
245
|
+
}).transform((v) => {
|
|
246
|
+
return remap$(v, {
|
|
247
|
+
"partner_user_ref": "partnerUserRef",
|
|
248
|
+
});
|
|
176
249
|
});
|
|
177
250
|
/** @internal */
|
|
178
251
|
export type SDKVerifyTokenRequest$Outbound = {
|
|
179
252
|
token: string;
|
|
180
253
|
audience?: string | undefined;
|
|
254
|
+
partner_user_ref?: string | undefined;
|
|
181
255
|
};
|
|
182
256
|
|
|
183
257
|
/** @internal */
|
|
@@ -188,6 +262,11 @@ export const SDKVerifyTokenRequest$outboundSchema: z.ZodType<
|
|
|
188
262
|
> = z.object({
|
|
189
263
|
token: z.string(),
|
|
190
264
|
audience: z.string().optional(),
|
|
265
|
+
partnerUserRef: z.string().optional(),
|
|
266
|
+
}).transform((v) => {
|
|
267
|
+
return remap$(v, {
|
|
268
|
+
partnerUserRef: "partner_user_ref",
|
|
269
|
+
});
|
|
191
270
|
});
|
|
192
271
|
|
|
193
272
|
export function sdkVerifyTokenRequestToJSON(
|
|
@@ -214,6 +293,26 @@ export const AgeOver$inboundSchema: z.ZodType<AgeOver, z.ZodTypeDef, unknown> =
|
|
|
214
293
|
export const AgeOver$outboundSchema: z.ZodType<number, z.ZodTypeDef, AgeOver> =
|
|
215
294
|
openEnums.outboundSchemaInt(AgeOver);
|
|
216
295
|
|
|
296
|
+
/** @internal */
|
|
297
|
+
export const Kind$inboundSchema: z.ZodType<Kind, z.ZodTypeDef, unknown> =
|
|
298
|
+
openEnums.inboundSchema(Kind);
|
|
299
|
+
/** @internal */
|
|
300
|
+
export const Kind$outboundSchema: z.ZodType<string, z.ZodTypeDef, Kind> =
|
|
301
|
+
openEnums.outboundSchema(Kind);
|
|
302
|
+
|
|
303
|
+
/** @internal */
|
|
304
|
+
export const SDKVerifyTokenEnvironment$inboundSchema: z.ZodType<
|
|
305
|
+
SDKVerifyTokenEnvironment,
|
|
306
|
+
z.ZodTypeDef,
|
|
307
|
+
unknown
|
|
308
|
+
> = openEnums.inboundSchema(SDKVerifyTokenEnvironment);
|
|
309
|
+
/** @internal */
|
|
310
|
+
export const SDKVerifyTokenEnvironment$outboundSchema: z.ZodType<
|
|
311
|
+
string,
|
|
312
|
+
z.ZodTypeDef,
|
|
313
|
+
SDKVerifyTokenEnvironment
|
|
314
|
+
> = openEnums.outboundSchema(SDKVerifyTokenEnvironment);
|
|
315
|
+
|
|
217
316
|
/** @internal */
|
|
218
317
|
export const Claims$inboundSchema: z.ZodType<Claims, z.ZodTypeDef, unknown> = z
|
|
219
318
|
.object({
|
|
@@ -230,6 +329,9 @@ export const Claims$inboundSchema: z.ZodType<Claims, z.ZodTypeDef, unknown> = z
|
|
|
230
329
|
last_pass_at: types.optional(types.date()),
|
|
231
330
|
audience: z.nullable(types.string()).optional(),
|
|
232
331
|
act: types.optional(types.string()),
|
|
332
|
+
kind: z.nullable(Kind$inboundSchema).optional(),
|
|
333
|
+
environment: z.nullable(SDKVerifyTokenEnvironment$inboundSchema).optional(),
|
|
334
|
+
link_state: types.optional(types.string()),
|
|
233
335
|
}).transform((v) => {
|
|
234
336
|
return remap$(v, {
|
|
235
337
|
"request_id": "requestId",
|
|
@@ -239,6 +341,7 @@ export const Claims$inboundSchema: z.ZodType<Claims, z.ZodTypeDef, unknown> = z
|
|
|
239
341
|
"age_over": "ageOver",
|
|
240
342
|
"trusted_since": "trustedSince",
|
|
241
343
|
"last_pass_at": "lastPassAt",
|
|
344
|
+
"link_state": "linkState",
|
|
242
345
|
});
|
|
243
346
|
});
|
|
244
347
|
/** @internal */
|
|
@@ -256,6 +359,9 @@ export type Claims$Outbound = {
|
|
|
256
359
|
last_pass_at?: string | undefined;
|
|
257
360
|
audience?: string | null | undefined;
|
|
258
361
|
act?: string | undefined;
|
|
362
|
+
kind?: string | null | undefined;
|
|
363
|
+
environment?: string | null | undefined;
|
|
364
|
+
link_state?: string | undefined;
|
|
259
365
|
};
|
|
260
366
|
|
|
261
367
|
/** @internal */
|
|
@@ -277,6 +383,9 @@ export const Claims$outboundSchema: z.ZodType<
|
|
|
277
383
|
lastPassAt: z.date().transform(v => v.toISOString()).optional(),
|
|
278
384
|
audience: z.nullable(z.string()).optional(),
|
|
279
385
|
act: z.string().optional(),
|
|
386
|
+
kind: z.nullable(Kind$outboundSchema).optional(),
|
|
387
|
+
environment: z.nullable(SDKVerifyTokenEnvironment$outboundSchema).optional(),
|
|
388
|
+
linkState: z.string().optional(),
|
|
280
389
|
}).transform((v) => {
|
|
281
390
|
return remap$(v, {
|
|
282
391
|
requestId: "request_id",
|
|
@@ -286,6 +395,7 @@ export const Claims$outboundSchema: z.ZodType<
|
|
|
286
395
|
ageOver: "age_over",
|
|
287
396
|
trustedSince: "trusted_since",
|
|
288
397
|
lastPassAt: "last_pass_at",
|
|
398
|
+
linkState: "link_state",
|
|
289
399
|
});
|
|
290
400
|
});
|
|
291
401
|
|
|
@@ -315,6 +425,81 @@ export const SDKVerifyTokenVerdict$outboundSchema: z.ZodType<
|
|
|
315
425
|
SDKVerifyTokenVerdict
|
|
316
426
|
> = openEnums.outboundSchema(SDKVerifyTokenVerdict);
|
|
317
427
|
|
|
428
|
+
/** @internal */
|
|
429
|
+
export const SDKVerifyTokenState$inboundSchema: z.ZodType<
|
|
430
|
+
SDKVerifyTokenState,
|
|
431
|
+
z.ZodTypeDef,
|
|
432
|
+
unknown
|
|
433
|
+
> = openEnums.inboundSchema(SDKVerifyTokenState);
|
|
434
|
+
/** @internal */
|
|
435
|
+
export const SDKVerifyTokenState$outboundSchema: z.ZodType<
|
|
436
|
+
string,
|
|
437
|
+
z.ZodTypeDef,
|
|
438
|
+
SDKVerifyTokenState
|
|
439
|
+
> = openEnums.outboundSchema(SDKVerifyTokenState);
|
|
440
|
+
|
|
441
|
+
/** @internal */
|
|
442
|
+
export const SDKVerifyTokenLink$inboundSchema: z.ZodType<
|
|
443
|
+
SDKVerifyTokenLink,
|
|
444
|
+
z.ZodTypeDef,
|
|
445
|
+
unknown
|
|
446
|
+
> = z.object({
|
|
447
|
+
state: types.optional(SDKVerifyTokenState$inboundSchema),
|
|
448
|
+
confirmed: types.optional(types.boolean()),
|
|
449
|
+
handle: types.optional(types.string()),
|
|
450
|
+
first_time: types.optional(types.boolean()),
|
|
451
|
+
code: types.optional(types.string()),
|
|
452
|
+
message: types.optional(types.string()),
|
|
453
|
+
}).transform((v) => {
|
|
454
|
+
return remap$(v, {
|
|
455
|
+
"first_time": "firstTime",
|
|
456
|
+
});
|
|
457
|
+
});
|
|
458
|
+
/** @internal */
|
|
459
|
+
export type SDKVerifyTokenLink$Outbound = {
|
|
460
|
+
state?: string | undefined;
|
|
461
|
+
confirmed?: boolean | undefined;
|
|
462
|
+
handle?: string | undefined;
|
|
463
|
+
first_time?: boolean | undefined;
|
|
464
|
+
code?: string | undefined;
|
|
465
|
+
message?: string | undefined;
|
|
466
|
+
};
|
|
467
|
+
|
|
468
|
+
/** @internal */
|
|
469
|
+
export const SDKVerifyTokenLink$outboundSchema: z.ZodType<
|
|
470
|
+
SDKVerifyTokenLink$Outbound,
|
|
471
|
+
z.ZodTypeDef,
|
|
472
|
+
SDKVerifyTokenLink
|
|
473
|
+
> = z.object({
|
|
474
|
+
state: SDKVerifyTokenState$outboundSchema.optional(),
|
|
475
|
+
confirmed: z.boolean().optional(),
|
|
476
|
+
handle: z.string().optional(),
|
|
477
|
+
firstTime: z.boolean().optional(),
|
|
478
|
+
code: z.string().optional(),
|
|
479
|
+
message: z.string().optional(),
|
|
480
|
+
}).transform((v) => {
|
|
481
|
+
return remap$(v, {
|
|
482
|
+
firstTime: "first_time",
|
|
483
|
+
});
|
|
484
|
+
});
|
|
485
|
+
|
|
486
|
+
export function sdkVerifyTokenLinkToJSON(
|
|
487
|
+
sdkVerifyTokenLink: SDKVerifyTokenLink,
|
|
488
|
+
): string {
|
|
489
|
+
return JSON.stringify(
|
|
490
|
+
SDKVerifyTokenLink$outboundSchema.parse(sdkVerifyTokenLink),
|
|
491
|
+
);
|
|
492
|
+
}
|
|
493
|
+
export function sdkVerifyTokenLinkFromJSON(
|
|
494
|
+
jsonString: string,
|
|
495
|
+
): SafeParseResult<SDKVerifyTokenLink, SDKValidationError> {
|
|
496
|
+
return safeParse(
|
|
497
|
+
jsonString,
|
|
498
|
+
(x) => SDKVerifyTokenLink$inboundSchema.parse(JSON.parse(x)),
|
|
499
|
+
`Failed to parse 'SDKVerifyTokenLink' from JSON`,
|
|
500
|
+
);
|
|
501
|
+
}
|
|
502
|
+
|
|
318
503
|
/** @internal */
|
|
319
504
|
export const SDKVerifyTokenDataData$inboundSchema: z.ZodType<
|
|
320
505
|
SDKVerifyTokenDataData,
|
|
@@ -327,6 +512,7 @@ export const SDKVerifyTokenDataData$inboundSchema: z.ZodType<
|
|
|
327
512
|
claims: z.nullable(z.lazy(() => Claims$inboundSchema)).optional(),
|
|
328
513
|
replayed: types.optional(types.boolean()),
|
|
329
514
|
verdict: types.optional(SDKVerifyTokenVerdict$inboundSchema),
|
|
515
|
+
link: types.optional(z.lazy(() => SDKVerifyTokenLink$inboundSchema)),
|
|
330
516
|
}).transform((v) => {
|
|
331
517
|
return remap$(v, {
|
|
332
518
|
"expired_at": "expiredAt",
|
|
@@ -340,6 +526,7 @@ export type SDKVerifyTokenDataData$Outbound = {
|
|
|
340
526
|
claims?: Claims$Outbound | null | undefined;
|
|
341
527
|
replayed?: boolean | undefined;
|
|
342
528
|
verdict?: string | undefined;
|
|
529
|
+
link?: SDKVerifyTokenLink$Outbound | undefined;
|
|
343
530
|
};
|
|
344
531
|
|
|
345
532
|
/** @internal */
|
|
@@ -354,6 +541,7 @@ export const SDKVerifyTokenDataData$outboundSchema: z.ZodType<
|
|
|
354
541
|
claims: z.nullable(z.lazy(() => Claims$outboundSchema)).optional(),
|
|
355
542
|
replayed: z.boolean().optional(),
|
|
356
543
|
verdict: SDKVerifyTokenVerdict$outboundSchema.optional(),
|
|
544
|
+
link: z.lazy(() => SDKVerifyTokenLink$outboundSchema).optional(),
|
|
357
545
|
}).transform((v) => {
|
|
358
546
|
return remap$(v, {
|
|
359
547
|
expiredAt: "expired_at",
|