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,281 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as types from "../../types/primitives.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
11
|
+
import * as models from "../index.js";
|
|
12
|
+
|
|
13
|
+
export type GatesApiActionsUpdateSecurity = {
|
|
14
|
+
gatesKeyAuth: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type GatesApiActionsUpdateRequest = {
|
|
18
|
+
/**
|
|
19
|
+
* The action's key (input is lower-cased).
|
|
20
|
+
*/
|
|
21
|
+
actKey: string;
|
|
22
|
+
/**
|
|
23
|
+
* Shown to the person on their card.
|
|
24
|
+
*/
|
|
25
|
+
name?: string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Your support team can send this to a customer. Its name is what the customer reads.
|
|
28
|
+
*/
|
|
29
|
+
staffCanSend?: boolean | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* 4.0 VH-31: high-value. It starts only from your customer's signed-in session (your server naming the account by your own reference). It is refused by phone number and for staff sends (`action_requires_signed_in`).
|
|
32
|
+
*/
|
|
33
|
+
highValue?: boolean | undefined;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export type GatesApiActionsUpdateDataData = {
|
|
37
|
+
/**
|
|
38
|
+
* A BotShield Action: one act on your own surface keyed to a passkey. Not a gate — no schedule, no levers — and it always stands on a verified account, so a tap runs the linking ceremony.
|
|
39
|
+
*/
|
|
40
|
+
action: models.BotShieldAction;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export type GatesApiActionsUpdateData = {
|
|
44
|
+
data?: GatesApiActionsUpdateDataData | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Gates API handler error. Arrives inside `data.error` with HTTP 200 — check for it before reading the result.
|
|
47
|
+
*/
|
|
48
|
+
error?: models.GatesApiError | undefined;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* The action. NOTE: handler errors also arrive here (HTTP 200) as data.error — codes: `invalid_key` (401 — missing, malformed or inactive key), `gates_scope_required` (403 — the key lacks Gates API access), `org_not_found` (404), `nothing_to_change` (400), `action_not_found` (404), `not_migrated` (503), `internal` (500).
|
|
53
|
+
*/
|
|
54
|
+
export type GatesApiActionsUpdateResponse = {
|
|
55
|
+
data: GatesApiActionsUpdateData;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export const GatesApiActionsUpdateSecurity$inboundSchema: z.ZodType<
|
|
60
|
+
GatesApiActionsUpdateSecurity,
|
|
61
|
+
z.ZodTypeDef,
|
|
62
|
+
unknown
|
|
63
|
+
> = z.object({
|
|
64
|
+
GatesKeyAuth: types.string(),
|
|
65
|
+
}).transform((v) => {
|
|
66
|
+
return remap$(v, {
|
|
67
|
+
"GatesKeyAuth": "gatesKeyAuth",
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
/** @internal */
|
|
71
|
+
export type GatesApiActionsUpdateSecurity$Outbound = {
|
|
72
|
+
GatesKeyAuth: string;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/** @internal */
|
|
76
|
+
export const GatesApiActionsUpdateSecurity$outboundSchema: z.ZodType<
|
|
77
|
+
GatesApiActionsUpdateSecurity$Outbound,
|
|
78
|
+
z.ZodTypeDef,
|
|
79
|
+
GatesApiActionsUpdateSecurity
|
|
80
|
+
> = z.object({
|
|
81
|
+
gatesKeyAuth: z.string(),
|
|
82
|
+
}).transform((v) => {
|
|
83
|
+
return remap$(v, {
|
|
84
|
+
gatesKeyAuth: "GatesKeyAuth",
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
export function gatesApiActionsUpdateSecurityToJSON(
|
|
89
|
+
gatesApiActionsUpdateSecurity: GatesApiActionsUpdateSecurity,
|
|
90
|
+
): string {
|
|
91
|
+
return JSON.stringify(
|
|
92
|
+
GatesApiActionsUpdateSecurity$outboundSchema.parse(
|
|
93
|
+
gatesApiActionsUpdateSecurity,
|
|
94
|
+
),
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
export function gatesApiActionsUpdateSecurityFromJSON(
|
|
98
|
+
jsonString: string,
|
|
99
|
+
): SafeParseResult<GatesApiActionsUpdateSecurity, SDKValidationError> {
|
|
100
|
+
return safeParse(
|
|
101
|
+
jsonString,
|
|
102
|
+
(x) => GatesApiActionsUpdateSecurity$inboundSchema.parse(JSON.parse(x)),
|
|
103
|
+
`Failed to parse 'GatesApiActionsUpdateSecurity' from JSON`,
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** @internal */
|
|
108
|
+
export const GatesApiActionsUpdateRequest$inboundSchema: z.ZodType<
|
|
109
|
+
GatesApiActionsUpdateRequest,
|
|
110
|
+
z.ZodTypeDef,
|
|
111
|
+
unknown
|
|
112
|
+
> = z.object({
|
|
113
|
+
actKey: types.string(),
|
|
114
|
+
name: types.optional(types.string()),
|
|
115
|
+
staffCanSend: types.optional(types.boolean()),
|
|
116
|
+
highValue: types.optional(types.boolean()),
|
|
117
|
+
});
|
|
118
|
+
/** @internal */
|
|
119
|
+
export type GatesApiActionsUpdateRequest$Outbound = {
|
|
120
|
+
actKey: string;
|
|
121
|
+
name?: string | undefined;
|
|
122
|
+
staffCanSend?: boolean | undefined;
|
|
123
|
+
highValue?: boolean | undefined;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
/** @internal */
|
|
127
|
+
export const GatesApiActionsUpdateRequest$outboundSchema: z.ZodType<
|
|
128
|
+
GatesApiActionsUpdateRequest$Outbound,
|
|
129
|
+
z.ZodTypeDef,
|
|
130
|
+
GatesApiActionsUpdateRequest
|
|
131
|
+
> = z.object({
|
|
132
|
+
actKey: z.string(),
|
|
133
|
+
name: z.string().optional(),
|
|
134
|
+
staffCanSend: z.boolean().optional(),
|
|
135
|
+
highValue: z.boolean().optional(),
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
export function gatesApiActionsUpdateRequestToJSON(
|
|
139
|
+
gatesApiActionsUpdateRequest: GatesApiActionsUpdateRequest,
|
|
140
|
+
): string {
|
|
141
|
+
return JSON.stringify(
|
|
142
|
+
GatesApiActionsUpdateRequest$outboundSchema.parse(
|
|
143
|
+
gatesApiActionsUpdateRequest,
|
|
144
|
+
),
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
export function gatesApiActionsUpdateRequestFromJSON(
|
|
148
|
+
jsonString: string,
|
|
149
|
+
): SafeParseResult<GatesApiActionsUpdateRequest, SDKValidationError> {
|
|
150
|
+
return safeParse(
|
|
151
|
+
jsonString,
|
|
152
|
+
(x) => GatesApiActionsUpdateRequest$inboundSchema.parse(JSON.parse(x)),
|
|
153
|
+
`Failed to parse 'GatesApiActionsUpdateRequest' from JSON`,
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/** @internal */
|
|
158
|
+
export const GatesApiActionsUpdateDataData$inboundSchema: z.ZodType<
|
|
159
|
+
GatesApiActionsUpdateDataData,
|
|
160
|
+
z.ZodTypeDef,
|
|
161
|
+
unknown
|
|
162
|
+
> = z.object({
|
|
163
|
+
action: models.BotShieldAction$inboundSchema,
|
|
164
|
+
});
|
|
165
|
+
/** @internal */
|
|
166
|
+
export type GatesApiActionsUpdateDataData$Outbound = {
|
|
167
|
+
action: models.BotShieldAction$Outbound;
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
/** @internal */
|
|
171
|
+
export const GatesApiActionsUpdateDataData$outboundSchema: z.ZodType<
|
|
172
|
+
GatesApiActionsUpdateDataData$Outbound,
|
|
173
|
+
z.ZodTypeDef,
|
|
174
|
+
GatesApiActionsUpdateDataData
|
|
175
|
+
> = z.object({
|
|
176
|
+
action: models.BotShieldAction$outboundSchema,
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
export function gatesApiActionsUpdateDataDataToJSON(
|
|
180
|
+
gatesApiActionsUpdateDataData: GatesApiActionsUpdateDataData,
|
|
181
|
+
): string {
|
|
182
|
+
return JSON.stringify(
|
|
183
|
+
GatesApiActionsUpdateDataData$outboundSchema.parse(
|
|
184
|
+
gatesApiActionsUpdateDataData,
|
|
185
|
+
),
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
export function gatesApiActionsUpdateDataDataFromJSON(
|
|
189
|
+
jsonString: string,
|
|
190
|
+
): SafeParseResult<GatesApiActionsUpdateDataData, SDKValidationError> {
|
|
191
|
+
return safeParse(
|
|
192
|
+
jsonString,
|
|
193
|
+
(x) => GatesApiActionsUpdateDataData$inboundSchema.parse(JSON.parse(x)),
|
|
194
|
+
`Failed to parse 'GatesApiActionsUpdateDataData' from JSON`,
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/** @internal */
|
|
199
|
+
export const GatesApiActionsUpdateData$inboundSchema: z.ZodType<
|
|
200
|
+
GatesApiActionsUpdateData,
|
|
201
|
+
z.ZodTypeDef,
|
|
202
|
+
unknown
|
|
203
|
+
> = z.object({
|
|
204
|
+
data: types.optional(
|
|
205
|
+
z.lazy(() => GatesApiActionsUpdateDataData$inboundSchema),
|
|
206
|
+
),
|
|
207
|
+
error: types.optional(models.GatesApiError$inboundSchema),
|
|
208
|
+
});
|
|
209
|
+
/** @internal */
|
|
210
|
+
export type GatesApiActionsUpdateData$Outbound = {
|
|
211
|
+
data?: GatesApiActionsUpdateDataData$Outbound | undefined;
|
|
212
|
+
error?: models.GatesApiError$Outbound | undefined;
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
/** @internal */
|
|
216
|
+
export const GatesApiActionsUpdateData$outboundSchema: z.ZodType<
|
|
217
|
+
GatesApiActionsUpdateData$Outbound,
|
|
218
|
+
z.ZodTypeDef,
|
|
219
|
+
GatesApiActionsUpdateData
|
|
220
|
+
> = z.object({
|
|
221
|
+
data: z.lazy(() => GatesApiActionsUpdateDataData$outboundSchema).optional(),
|
|
222
|
+
error: models.GatesApiError$outboundSchema.optional(),
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
export function gatesApiActionsUpdateDataToJSON(
|
|
226
|
+
gatesApiActionsUpdateData: GatesApiActionsUpdateData,
|
|
227
|
+
): string {
|
|
228
|
+
return JSON.stringify(
|
|
229
|
+
GatesApiActionsUpdateData$outboundSchema.parse(gatesApiActionsUpdateData),
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
export function gatesApiActionsUpdateDataFromJSON(
|
|
233
|
+
jsonString: string,
|
|
234
|
+
): SafeParseResult<GatesApiActionsUpdateData, SDKValidationError> {
|
|
235
|
+
return safeParse(
|
|
236
|
+
jsonString,
|
|
237
|
+
(x) => GatesApiActionsUpdateData$inboundSchema.parse(JSON.parse(x)),
|
|
238
|
+
`Failed to parse 'GatesApiActionsUpdateData' from JSON`,
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/** @internal */
|
|
243
|
+
export const GatesApiActionsUpdateResponse$inboundSchema: z.ZodType<
|
|
244
|
+
GatesApiActionsUpdateResponse,
|
|
245
|
+
z.ZodTypeDef,
|
|
246
|
+
unknown
|
|
247
|
+
> = z.object({
|
|
248
|
+
data: z.lazy(() => GatesApiActionsUpdateData$inboundSchema),
|
|
249
|
+
});
|
|
250
|
+
/** @internal */
|
|
251
|
+
export type GatesApiActionsUpdateResponse$Outbound = {
|
|
252
|
+
data: GatesApiActionsUpdateData$Outbound;
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
/** @internal */
|
|
256
|
+
export const GatesApiActionsUpdateResponse$outboundSchema: z.ZodType<
|
|
257
|
+
GatesApiActionsUpdateResponse$Outbound,
|
|
258
|
+
z.ZodTypeDef,
|
|
259
|
+
GatesApiActionsUpdateResponse
|
|
260
|
+
> = z.object({
|
|
261
|
+
data: z.lazy(() => GatesApiActionsUpdateData$outboundSchema),
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
export function gatesApiActionsUpdateResponseToJSON(
|
|
265
|
+
gatesApiActionsUpdateResponse: GatesApiActionsUpdateResponse,
|
|
266
|
+
): string {
|
|
267
|
+
return JSON.stringify(
|
|
268
|
+
GatesApiActionsUpdateResponse$outboundSchema.parse(
|
|
269
|
+
gatesApiActionsUpdateResponse,
|
|
270
|
+
),
|
|
271
|
+
);
|
|
272
|
+
}
|
|
273
|
+
export function gatesApiActionsUpdateResponseFromJSON(
|
|
274
|
+
jsonString: string,
|
|
275
|
+
): SafeParseResult<GatesApiActionsUpdateResponse, SDKValidationError> {
|
|
276
|
+
return safeParse(
|
|
277
|
+
jsonString,
|
|
278
|
+
(x) => GatesApiActionsUpdateResponse$inboundSchema.parse(JSON.parse(x)),
|
|
279
|
+
`Failed to parse 'GatesApiActionsUpdateResponse' from JSON`,
|
|
280
|
+
);
|
|
281
|
+
}
|
|
@@ -7,9 +7,11 @@ export * from "./actions-check-status.js";
|
|
|
7
7
|
export * from "./actions-propose.js";
|
|
8
8
|
export * from "./gates-api-actions-create.js";
|
|
9
9
|
export * from "./gates-api-actions-list.js";
|
|
10
|
+
export * from "./gates-api-actions-request-cancel.js";
|
|
10
11
|
export * from "./gates-api-actions-request-status.js";
|
|
11
12
|
export * from "./gates-api-actions-request.js";
|
|
12
13
|
export * from "./gates-api-actions-set-state.js";
|
|
14
|
+
export * from "./gates-api-actions-update.js";
|
|
13
15
|
export * from "./gates-api-activate.js";
|
|
14
16
|
export * from "./gates-api-cancel.js";
|
|
15
17
|
export * from "./gates-api-close.js";
|
|
@@ -19,13 +21,16 @@ export * from "./gates-api-get.js";
|
|
|
19
21
|
export * from "./gates-api-list.js";
|
|
20
22
|
export * from "./request-passkey-complete.js";
|
|
21
23
|
export * from "./request-passkey-options.js";
|
|
24
|
+
export * from "./sdk-confirm-link.js";
|
|
22
25
|
export * from "./sdk-create-session.js";
|
|
23
26
|
export * from "./sdk-create-verification-link.js";
|
|
24
27
|
export * from "./sdk-get-partner-config.js";
|
|
25
28
|
export * from "./sdk-logout.js";
|
|
26
29
|
export * from "./sdk-revoke-verification.js";
|
|
30
|
+
export * from "./sdk-send-by-number.js";
|
|
27
31
|
export * from "./sdk-store-signal.js";
|
|
28
32
|
export * from "./sdk-validate-signal.js";
|
|
33
|
+
export * from "./sdk-verify-resolution.js";
|
|
29
34
|
export * from "./sdk-verify-token.js";
|
|
30
35
|
export * from "./secured-accounts-list.js";
|
|
31
36
|
export * from "./secured-accounts-revoke.js";
|
|
@@ -49,7 +49,7 @@ export type RequestPasskeyCompleteDataData = {
|
|
|
49
49
|
*/
|
|
50
50
|
outcome: RequestPasskeyCompleteOutcome;
|
|
51
51
|
/**
|
|
52
|
-
* A non-identifying reason you may branch on. Lane codes: `challenge_expired` (expired — unknown, used or stale challenge_id), `request_expired` (expired), `unknown_request`, `request_closed`, `link_changed` (the request no longer resolves to the person the challenge was issued for), `assertion_invalid`, `user_not_verified` (UV is required), `completion_failed`. Completion refusals (same as the app ceremony): `ceremony_user_mismatch
|
|
52
|
+
* A non-identifying reason you may branch on. Lane codes: `challenge_expired` (expired — unknown, used or stale challenge_id), `request_expired` (expired), `unknown_request`, `request_closed`, `link_changed` (the request no longer resolves to the person the challenge was issued for), `assertion_invalid`, `user_not_verified` (UV is required), `completion_failed`. Completion refusals (same as the app ceremony): `ceremony_user_mismatch` (the passkey answer names a different BotShield ID than the request; the request stays open), `already_trusted`, `rebind_requires_prior_id`, `gate_not_open`, `link_requires_user_ref`, `signup_required`, `real_days_not_met`, `pass_limit_reached`, `action_off` (the BotShield Action was turned off), `action_requires_user_ref`. Treat unknown codes as `failed`.
|
|
53
53
|
*/
|
|
54
54
|
code?: string | undefined;
|
|
55
55
|
};
|
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import * as types from "../../types/primitives.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
12
|
+
|
|
13
|
+
export type SDKConfirmLinkSecurity = {
|
|
14
|
+
apiKeyAuth: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type SDKConfirmLinkRequest = {
|
|
18
|
+
/**
|
|
19
|
+
* The request the person tapped (req_…).
|
|
20
|
+
*/
|
|
21
|
+
requestId: string;
|
|
22
|
+
/**
|
|
23
|
+
* The account your own session shows — the same id you started the link with.
|
|
24
|
+
*/
|
|
25
|
+
partnerUserRef?: string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Alias of partner_user_ref.
|
|
28
|
+
*/
|
|
29
|
+
partnerUserId?: string | undefined;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const SDKConfirmLinkState = {
|
|
33
|
+
Live: "live",
|
|
34
|
+
} as const;
|
|
35
|
+
export type SDKConfirmLinkState = ClosedEnum<typeof SDKConfirmLinkState>;
|
|
36
|
+
|
|
37
|
+
export type SDKConfirmLinkDataData = {
|
|
38
|
+
linked?: boolean | undefined;
|
|
39
|
+
state?: SDKConfirmLinkState | undefined;
|
|
40
|
+
firstTime?: boolean | undefined;
|
|
41
|
+
requestId?: string | undefined;
|
|
42
|
+
handle?: string | undefined;
|
|
43
|
+
trusted?: boolean | undefined;
|
|
44
|
+
trustedSince?: Date | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* The finished token. Single use, 2 minutes.
|
|
47
|
+
*/
|
|
48
|
+
verificationToken?: string | undefined;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export type SDKConfirmLinkError = {
|
|
52
|
+
code?: string | undefined;
|
|
53
|
+
message?: string | undefined;
|
|
54
|
+
statusCode?: number | undefined;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export type SDKConfirmLinkData = {
|
|
58
|
+
data?: SDKConfirmLinkDataData | undefined;
|
|
59
|
+
error?: SDKConfirmLinkError | undefined;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Result. NOTE: handler errors arrive here (HTTP 200) as data.error — codes: secret_key_required · invalid_key · account_required · link_not_found · environment_mismatch · link_account_mismatch · link_expired · link_refused · rebind_requires_prior_id · already_trusted · unavailable.
|
|
64
|
+
*/
|
|
65
|
+
export type SDKConfirmLinkResponse = {
|
|
66
|
+
data?: SDKConfirmLinkData | undefined;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/** @internal */
|
|
70
|
+
export const SDKConfirmLinkSecurity$inboundSchema: z.ZodType<
|
|
71
|
+
SDKConfirmLinkSecurity,
|
|
72
|
+
z.ZodTypeDef,
|
|
73
|
+
unknown
|
|
74
|
+
> = z.object({
|
|
75
|
+
ApiKeyAuth: types.string(),
|
|
76
|
+
}).transform((v) => {
|
|
77
|
+
return remap$(v, {
|
|
78
|
+
"ApiKeyAuth": "apiKeyAuth",
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
/** @internal */
|
|
82
|
+
export type SDKConfirmLinkSecurity$Outbound = {
|
|
83
|
+
ApiKeyAuth: string;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const SDKConfirmLinkSecurity$outboundSchema: z.ZodType<
|
|
88
|
+
SDKConfirmLinkSecurity$Outbound,
|
|
89
|
+
z.ZodTypeDef,
|
|
90
|
+
SDKConfirmLinkSecurity
|
|
91
|
+
> = z.object({
|
|
92
|
+
apiKeyAuth: z.string(),
|
|
93
|
+
}).transform((v) => {
|
|
94
|
+
return remap$(v, {
|
|
95
|
+
apiKeyAuth: "ApiKeyAuth",
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
export function sdkConfirmLinkSecurityToJSON(
|
|
100
|
+
sdkConfirmLinkSecurity: SDKConfirmLinkSecurity,
|
|
101
|
+
): string {
|
|
102
|
+
return JSON.stringify(
|
|
103
|
+
SDKConfirmLinkSecurity$outboundSchema.parse(sdkConfirmLinkSecurity),
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
export function sdkConfirmLinkSecurityFromJSON(
|
|
107
|
+
jsonString: string,
|
|
108
|
+
): SafeParseResult<SDKConfirmLinkSecurity, SDKValidationError> {
|
|
109
|
+
return safeParse(
|
|
110
|
+
jsonString,
|
|
111
|
+
(x) => SDKConfirmLinkSecurity$inboundSchema.parse(JSON.parse(x)),
|
|
112
|
+
`Failed to parse 'SDKConfirmLinkSecurity' from JSON`,
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/** @internal */
|
|
117
|
+
export const SDKConfirmLinkRequest$inboundSchema: z.ZodType<
|
|
118
|
+
SDKConfirmLinkRequest,
|
|
119
|
+
z.ZodTypeDef,
|
|
120
|
+
unknown
|
|
121
|
+
> = z.object({
|
|
122
|
+
request_id: types.string(),
|
|
123
|
+
partner_user_ref: types.optional(types.string()),
|
|
124
|
+
partner_user_id: types.optional(types.string()),
|
|
125
|
+
}).transform((v) => {
|
|
126
|
+
return remap$(v, {
|
|
127
|
+
"request_id": "requestId",
|
|
128
|
+
"partner_user_ref": "partnerUserRef",
|
|
129
|
+
"partner_user_id": "partnerUserId",
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
/** @internal */
|
|
133
|
+
export type SDKConfirmLinkRequest$Outbound = {
|
|
134
|
+
request_id: string;
|
|
135
|
+
partner_user_ref?: string | undefined;
|
|
136
|
+
partner_user_id?: string | undefined;
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
/** @internal */
|
|
140
|
+
export const SDKConfirmLinkRequest$outboundSchema: z.ZodType<
|
|
141
|
+
SDKConfirmLinkRequest$Outbound,
|
|
142
|
+
z.ZodTypeDef,
|
|
143
|
+
SDKConfirmLinkRequest
|
|
144
|
+
> = z.object({
|
|
145
|
+
requestId: z.string(),
|
|
146
|
+
partnerUserRef: z.string().optional(),
|
|
147
|
+
partnerUserId: z.string().optional(),
|
|
148
|
+
}).transform((v) => {
|
|
149
|
+
return remap$(v, {
|
|
150
|
+
requestId: "request_id",
|
|
151
|
+
partnerUserRef: "partner_user_ref",
|
|
152
|
+
partnerUserId: "partner_user_id",
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
export function sdkConfirmLinkRequestToJSON(
|
|
157
|
+
sdkConfirmLinkRequest: SDKConfirmLinkRequest,
|
|
158
|
+
): string {
|
|
159
|
+
return JSON.stringify(
|
|
160
|
+
SDKConfirmLinkRequest$outboundSchema.parse(sdkConfirmLinkRequest),
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
export function sdkConfirmLinkRequestFromJSON(
|
|
164
|
+
jsonString: string,
|
|
165
|
+
): SafeParseResult<SDKConfirmLinkRequest, SDKValidationError> {
|
|
166
|
+
return safeParse(
|
|
167
|
+
jsonString,
|
|
168
|
+
(x) => SDKConfirmLinkRequest$inboundSchema.parse(JSON.parse(x)),
|
|
169
|
+
`Failed to parse 'SDKConfirmLinkRequest' from JSON`,
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/** @internal */
|
|
174
|
+
export const SDKConfirmLinkState$inboundSchema: z.ZodNativeEnum<
|
|
175
|
+
typeof SDKConfirmLinkState
|
|
176
|
+
> = z.nativeEnum(SDKConfirmLinkState);
|
|
177
|
+
/** @internal */
|
|
178
|
+
export const SDKConfirmLinkState$outboundSchema: z.ZodNativeEnum<
|
|
179
|
+
typeof SDKConfirmLinkState
|
|
180
|
+
> = SDKConfirmLinkState$inboundSchema;
|
|
181
|
+
|
|
182
|
+
/** @internal */
|
|
183
|
+
export const SDKConfirmLinkDataData$inboundSchema: z.ZodType<
|
|
184
|
+
SDKConfirmLinkDataData,
|
|
185
|
+
z.ZodTypeDef,
|
|
186
|
+
unknown
|
|
187
|
+
> = z.object({
|
|
188
|
+
linked: types.optional(types.boolean()),
|
|
189
|
+
state: types.optional(SDKConfirmLinkState$inboundSchema),
|
|
190
|
+
first_time: types.optional(types.boolean()),
|
|
191
|
+
request_id: types.optional(types.string()),
|
|
192
|
+
handle: types.optional(types.string()),
|
|
193
|
+
trusted: types.optional(types.boolean()),
|
|
194
|
+
trusted_since: types.optional(types.date()),
|
|
195
|
+
verification_token: types.optional(types.string()),
|
|
196
|
+
}).transform((v) => {
|
|
197
|
+
return remap$(v, {
|
|
198
|
+
"first_time": "firstTime",
|
|
199
|
+
"request_id": "requestId",
|
|
200
|
+
"trusted_since": "trustedSince",
|
|
201
|
+
"verification_token": "verificationToken",
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
/** @internal */
|
|
205
|
+
export type SDKConfirmLinkDataData$Outbound = {
|
|
206
|
+
linked?: boolean | undefined;
|
|
207
|
+
state?: string | undefined;
|
|
208
|
+
first_time?: boolean | undefined;
|
|
209
|
+
request_id?: string | undefined;
|
|
210
|
+
handle?: string | undefined;
|
|
211
|
+
trusted?: boolean | undefined;
|
|
212
|
+
trusted_since?: string | undefined;
|
|
213
|
+
verification_token?: string | undefined;
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
/** @internal */
|
|
217
|
+
export const SDKConfirmLinkDataData$outboundSchema: z.ZodType<
|
|
218
|
+
SDKConfirmLinkDataData$Outbound,
|
|
219
|
+
z.ZodTypeDef,
|
|
220
|
+
SDKConfirmLinkDataData
|
|
221
|
+
> = z.object({
|
|
222
|
+
linked: z.boolean().optional(),
|
|
223
|
+
state: SDKConfirmLinkState$outboundSchema.optional(),
|
|
224
|
+
firstTime: z.boolean().optional(),
|
|
225
|
+
requestId: z.string().optional(),
|
|
226
|
+
handle: z.string().optional(),
|
|
227
|
+
trusted: z.boolean().optional(),
|
|
228
|
+
trustedSince: z.date().transform(v => v.toISOString()).optional(),
|
|
229
|
+
verificationToken: z.string().optional(),
|
|
230
|
+
}).transform((v) => {
|
|
231
|
+
return remap$(v, {
|
|
232
|
+
firstTime: "first_time",
|
|
233
|
+
requestId: "request_id",
|
|
234
|
+
trustedSince: "trusted_since",
|
|
235
|
+
verificationToken: "verification_token",
|
|
236
|
+
});
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
export function sdkConfirmLinkDataDataToJSON(
|
|
240
|
+
sdkConfirmLinkDataData: SDKConfirmLinkDataData,
|
|
241
|
+
): string {
|
|
242
|
+
return JSON.stringify(
|
|
243
|
+
SDKConfirmLinkDataData$outboundSchema.parse(sdkConfirmLinkDataData),
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
export function sdkConfirmLinkDataDataFromJSON(
|
|
247
|
+
jsonString: string,
|
|
248
|
+
): SafeParseResult<SDKConfirmLinkDataData, SDKValidationError> {
|
|
249
|
+
return safeParse(
|
|
250
|
+
jsonString,
|
|
251
|
+
(x) => SDKConfirmLinkDataData$inboundSchema.parse(JSON.parse(x)),
|
|
252
|
+
`Failed to parse 'SDKConfirmLinkDataData' from JSON`,
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/** @internal */
|
|
257
|
+
export const SDKConfirmLinkError$inboundSchema: z.ZodType<
|
|
258
|
+
SDKConfirmLinkError,
|
|
259
|
+
z.ZodTypeDef,
|
|
260
|
+
unknown
|
|
261
|
+
> = z.object({
|
|
262
|
+
code: types.optional(types.string()),
|
|
263
|
+
message: types.optional(types.string()),
|
|
264
|
+
statusCode: types.optional(types.number()),
|
|
265
|
+
});
|
|
266
|
+
/** @internal */
|
|
267
|
+
export type SDKConfirmLinkError$Outbound = {
|
|
268
|
+
code?: string | undefined;
|
|
269
|
+
message?: string | undefined;
|
|
270
|
+
statusCode?: number | undefined;
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
/** @internal */
|
|
274
|
+
export const SDKConfirmLinkError$outboundSchema: z.ZodType<
|
|
275
|
+
SDKConfirmLinkError$Outbound,
|
|
276
|
+
z.ZodTypeDef,
|
|
277
|
+
SDKConfirmLinkError
|
|
278
|
+
> = z.object({
|
|
279
|
+
code: z.string().optional(),
|
|
280
|
+
message: z.string().optional(),
|
|
281
|
+
statusCode: z.number().int().optional(),
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
export function sdkConfirmLinkErrorToJSON(
|
|
285
|
+
sdkConfirmLinkError: SDKConfirmLinkError,
|
|
286
|
+
): string {
|
|
287
|
+
return JSON.stringify(
|
|
288
|
+
SDKConfirmLinkError$outboundSchema.parse(sdkConfirmLinkError),
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
export function sdkConfirmLinkErrorFromJSON(
|
|
292
|
+
jsonString: string,
|
|
293
|
+
): SafeParseResult<SDKConfirmLinkError, SDKValidationError> {
|
|
294
|
+
return safeParse(
|
|
295
|
+
jsonString,
|
|
296
|
+
(x) => SDKConfirmLinkError$inboundSchema.parse(JSON.parse(x)),
|
|
297
|
+
`Failed to parse 'SDKConfirmLinkError' from JSON`,
|
|
298
|
+
);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/** @internal */
|
|
302
|
+
export const SDKConfirmLinkData$inboundSchema: z.ZodType<
|
|
303
|
+
SDKConfirmLinkData,
|
|
304
|
+
z.ZodTypeDef,
|
|
305
|
+
unknown
|
|
306
|
+
> = z.object({
|
|
307
|
+
data: types.optional(z.lazy(() => SDKConfirmLinkDataData$inboundSchema)),
|
|
308
|
+
error: types.optional(z.lazy(() => SDKConfirmLinkError$inboundSchema)),
|
|
309
|
+
});
|
|
310
|
+
/** @internal */
|
|
311
|
+
export type SDKConfirmLinkData$Outbound = {
|
|
312
|
+
data?: SDKConfirmLinkDataData$Outbound | undefined;
|
|
313
|
+
error?: SDKConfirmLinkError$Outbound | undefined;
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
/** @internal */
|
|
317
|
+
export const SDKConfirmLinkData$outboundSchema: z.ZodType<
|
|
318
|
+
SDKConfirmLinkData$Outbound,
|
|
319
|
+
z.ZodTypeDef,
|
|
320
|
+
SDKConfirmLinkData
|
|
321
|
+
> = z.object({
|
|
322
|
+
data: z.lazy(() => SDKConfirmLinkDataData$outboundSchema).optional(),
|
|
323
|
+
error: z.lazy(() => SDKConfirmLinkError$outboundSchema).optional(),
|
|
324
|
+
});
|
|
325
|
+
|
|
326
|
+
export function sdkConfirmLinkDataToJSON(
|
|
327
|
+
sdkConfirmLinkData: SDKConfirmLinkData,
|
|
328
|
+
): string {
|
|
329
|
+
return JSON.stringify(
|
|
330
|
+
SDKConfirmLinkData$outboundSchema.parse(sdkConfirmLinkData),
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
export function sdkConfirmLinkDataFromJSON(
|
|
334
|
+
jsonString: string,
|
|
335
|
+
): SafeParseResult<SDKConfirmLinkData, SDKValidationError> {
|
|
336
|
+
return safeParse(
|
|
337
|
+
jsonString,
|
|
338
|
+
(x) => SDKConfirmLinkData$inboundSchema.parse(JSON.parse(x)),
|
|
339
|
+
`Failed to parse 'SDKConfirmLinkData' from JSON`,
|
|
340
|
+
);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/** @internal */
|
|
344
|
+
export const SDKConfirmLinkResponse$inboundSchema: z.ZodType<
|
|
345
|
+
SDKConfirmLinkResponse,
|
|
346
|
+
z.ZodTypeDef,
|
|
347
|
+
unknown
|
|
348
|
+
> = z.object({
|
|
349
|
+
data: types.optional(z.lazy(() => SDKConfirmLinkData$inboundSchema)),
|
|
350
|
+
});
|
|
351
|
+
/** @internal */
|
|
352
|
+
export type SDKConfirmLinkResponse$Outbound = {
|
|
353
|
+
data?: SDKConfirmLinkData$Outbound | undefined;
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
/** @internal */
|
|
357
|
+
export const SDKConfirmLinkResponse$outboundSchema: z.ZodType<
|
|
358
|
+
SDKConfirmLinkResponse$Outbound,
|
|
359
|
+
z.ZodTypeDef,
|
|
360
|
+
SDKConfirmLinkResponse
|
|
361
|
+
> = z.object({
|
|
362
|
+
data: z.lazy(() => SDKConfirmLinkData$outboundSchema).optional(),
|
|
363
|
+
});
|
|
364
|
+
|
|
365
|
+
export function sdkConfirmLinkResponseToJSON(
|
|
366
|
+
sdkConfirmLinkResponse: SDKConfirmLinkResponse,
|
|
367
|
+
): string {
|
|
368
|
+
return JSON.stringify(
|
|
369
|
+
SDKConfirmLinkResponse$outboundSchema.parse(sdkConfirmLinkResponse),
|
|
370
|
+
);
|
|
371
|
+
}
|
|
372
|
+
export function sdkConfirmLinkResponseFromJSON(
|
|
373
|
+
jsonString: string,
|
|
374
|
+
): SafeParseResult<SDKConfirmLinkResponse, SDKValidationError> {
|
|
375
|
+
return safeParse(
|
|
376
|
+
jsonString,
|
|
377
|
+
(x) => SDKConfirmLinkResponse$inboundSchema.parse(JSON.parse(x)),
|
|
378
|
+
`Failed to parse 'SDKConfirmLinkResponse' from JSON`,
|
|
379
|
+
);
|
|
380
|
+
}
|
|
@@ -100,7 +100,7 @@ export type SDKCreateSessionData = {
|
|
|
100
100
|
};
|
|
101
101
|
|
|
102
102
|
/**
|
|
103
|
-
* Anchor grant window created. NOTE: handler errors also arrive here (HTTP 200) as data.error — codes for this operation: 401 (bad or missing credential), 403 (origin not allowed for the site key).
|
|
103
|
+
* Anchor grant window created. NOTE: handler errors also arrive here (HTTP 200) as data.error — codes for this operation: 401 (bad or missing credential), 403 (origin not allowed for the site key; also a production site key with no allowed origins, which is refused until you add your domain to the key in the Console).
|
|
104
104
|
*/
|
|
105
105
|
export type SDKCreateSessionResponse = {
|
|
106
106
|
data: SDKCreateSessionData;
|