botshield-sdk 4.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/bin/mcp-server.js +385 -14
- package/bin/mcp-server.js.map +22 -18
- 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/recovery-exchange.d.ts +18 -0
- package/dist/commonjs/funcs/recovery-exchange.d.ts.map +1 -0
- package/dist/commonjs/funcs/recovery-exchange.js +123 -0
- package/dist/commonjs/funcs/recovery-exchange.js.map +1 -0
- package/dist/commonjs/funcs/recovery-other-route.d.ts +18 -0
- package/dist/commonjs/funcs/recovery-other-route.d.ts.map +1 -0
- package/dist/commonjs/funcs/recovery-other-route.js +123 -0
- package/dist/commonjs/funcs/recovery-other-route.js.map +1 -0
- package/dist/commonjs/funcs/sign-in-confirm.d.ts +18 -0
- package/dist/commonjs/funcs/sign-in-confirm.d.ts.map +1 -0
- package/dist/commonjs/funcs/sign-in-confirm.js +123 -0
- package/dist/commonjs/funcs/sign-in-confirm.js.map +1 -0
- package/dist/commonjs/funcs/sign-in-request.d.ts +18 -0
- package/dist/commonjs/funcs/sign-in-request.d.ts.map +1 -0
- package/dist/commonjs/funcs/sign-in-request.js +123 -0
- package/dist/commonjs/funcs/sign-in-request.js.map +1 -0
- package/dist/commonjs/funcs/verification-get-status.d.ts +1 -1
- package/dist/commonjs/funcs/verification-get-status.js +2 -1
- package/dist/commonjs/funcs/verification-get-status.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/models/bot-shield-action.d.ts +36 -0
- package/dist/commonjs/models/bot-shield-action.d.ts.map +1 -1
- package/dist/commonjs/models/bot-shield-action.js +28 -1
- package/dist/commonjs/models/bot-shield-action.js.map +1 -1
- package/dist/commonjs/models/error-body.d.ts +1 -1
- package/dist/commonjs/models/operations/gates-api-actions-create.d.ts +1 -1
- package/dist/commonjs/models/operations/gates-api-actions-list.d.ts +1 -1
- package/dist/commonjs/models/operations/gates-api-actions-request.d.ts +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 +1 -1
- package/dist/commonjs/models/operations/index.d.ts +4 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +4 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/recovery-exchange.d.ts +114 -0
- package/dist/commonjs/models/operations/recovery-exchange.d.ts.map +1 -0
- package/dist/commonjs/models/operations/recovery-exchange.js +164 -0
- package/dist/commonjs/models/operations/recovery-exchange.js.map +1 -0
- package/dist/commonjs/models/operations/recovery-other-route.d.ts +86 -0
- package/dist/commonjs/models/operations/recovery-other-route.d.ts.map +1 -0
- package/dist/commonjs/models/operations/recovery-other-route.js +145 -0
- package/dist/commonjs/models/operations/recovery-other-route.js.map +1 -0
- package/dist/commonjs/models/operations/sdk-create-verification-link.d.ts +6 -1
- package/dist/commonjs/models/operations/sdk-create-verification-link.d.ts.map +1 -1
- package/dist/commonjs/models/operations/sdk-create-verification-link.js +4 -0
- package/dist/commonjs/models/operations/sdk-create-verification-link.js.map +1 -1
- package/dist/commonjs/models/operations/sdk-send-by-number.d.ts +1 -1
- package/dist/commonjs/models/operations/sdk-verify-token.d.ts +15 -0
- package/dist/commonjs/models/operations/sdk-verify-token.d.ts.map +1 -1
- package/dist/commonjs/models/operations/sdk-verify-token.js +10 -0
- package/dist/commonjs/models/operations/sdk-verify-token.js.map +1 -1
- package/dist/commonjs/models/operations/signin-confirm.d.ts +148 -0
- package/dist/commonjs/models/operations/signin-confirm.d.ts.map +1 -0
- package/dist/commonjs/models/operations/signin-confirm.js +202 -0
- package/dist/commonjs/models/operations/signin-confirm.js.map +1 -0
- package/dist/commonjs/models/operations/signin-request.d.ts +115 -0
- package/dist/commonjs/models/operations/signin-request.d.ts.map +1 -0
- package/dist/commonjs/models/operations/signin-request.js +174 -0
- package/dist/commonjs/models/operations/signin-request.js.map +1 -0
- package/dist/commonjs/models/operations/verification-get-status.d.ts +5 -0
- package/dist/commonjs/models/operations/verification-get-status.d.ts.map +1 -1
- package/dist/commonjs/models/operations/verification-get-status.js +4 -0
- package/dist/commonjs/models/operations/verification-get-status.js.map +1 -1
- package/dist/commonjs/sdk/census.d.ts +1 -1
- package/dist/commonjs/sdk/census.js +1 -1
- package/dist/commonjs/sdk/recovery.d.ts +19 -0
- package/dist/commonjs/sdk/recovery.d.ts.map +1 -0
- package/dist/commonjs/sdk/recovery.js +32 -0
- package/dist/commonjs/sdk/recovery.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +6 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +10 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/commonjs/sdk/sign-in.d.ts +19 -0
- package/dist/commonjs/sdk/sign-in.d.ts.map +1 -0
- package/dist/commonjs/sdk/sign-in.js +32 -0
- package/dist/commonjs/sdk/sign-in.js.map +1 -0
- package/dist/commonjs/sdk/verification.d.ts +1 -1
- package/dist/commonjs/sdk/verification.js +1 -1
- package/dist/esm/funcs/census-verify-token.d.ts +1 -1
- package/dist/esm/funcs/census-verify-token.js +1 -1
- package/dist/esm/funcs/recovery-exchange.d.ts +18 -0
- package/dist/esm/funcs/recovery-exchange.d.ts.map +1 -0
- package/dist/esm/funcs/recovery-exchange.js +87 -0
- package/dist/esm/funcs/recovery-exchange.js.map +1 -0
- package/dist/esm/funcs/recovery-other-route.d.ts +18 -0
- package/dist/esm/funcs/recovery-other-route.d.ts.map +1 -0
- package/dist/esm/funcs/recovery-other-route.js +87 -0
- package/dist/esm/funcs/recovery-other-route.js.map +1 -0
- package/dist/esm/funcs/sign-in-confirm.d.ts +18 -0
- package/dist/esm/funcs/sign-in-confirm.d.ts.map +1 -0
- package/dist/esm/funcs/sign-in-confirm.js +87 -0
- package/dist/esm/funcs/sign-in-confirm.js.map +1 -0
- package/dist/esm/funcs/sign-in-request.d.ts +18 -0
- package/dist/esm/funcs/sign-in-request.d.ts.map +1 -0
- package/dist/esm/funcs/sign-in-request.js +87 -0
- package/dist/esm/funcs/sign-in-request.js.map +1 -0
- package/dist/esm/funcs/verification-get-status.d.ts +1 -1
- package/dist/esm/funcs/verification-get-status.js +3 -2
- package/dist/esm/funcs/verification-get-status.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/models/bot-shield-action.d.ts +36 -0
- package/dist/esm/models/bot-shield-action.d.ts.map +1 -1
- package/dist/esm/models/bot-shield-action.js +27 -0
- package/dist/esm/models/bot-shield-action.js.map +1 -1
- package/dist/esm/models/error-body.d.ts +1 -1
- package/dist/esm/models/operations/gates-api-actions-create.d.ts +1 -1
- package/dist/esm/models/operations/gates-api-actions-list.d.ts +1 -1
- package/dist/esm/models/operations/gates-api-actions-request.d.ts +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 +1 -1
- package/dist/esm/models/operations/index.d.ts +4 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +4 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/recovery-exchange.d.ts +114 -0
- package/dist/esm/models/operations/recovery-exchange.d.ts.map +1 -0
- package/dist/esm/models/operations/recovery-exchange.js +118 -0
- package/dist/esm/models/operations/recovery-exchange.js.map +1 -0
- package/dist/esm/models/operations/recovery-other-route.d.ts +86 -0
- package/dist/esm/models/operations/recovery-other-route.d.ts.map +1 -0
- package/dist/esm/models/operations/recovery-other-route.js +99 -0
- package/dist/esm/models/operations/recovery-other-route.js.map +1 -0
- package/dist/esm/models/operations/sdk-create-verification-link.d.ts +6 -1
- package/dist/esm/models/operations/sdk-create-verification-link.d.ts.map +1 -1
- package/dist/esm/models/operations/sdk-create-verification-link.js +4 -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 +1 -1
- package/dist/esm/models/operations/sdk-verify-token.d.ts +15 -0
- package/dist/esm/models/operations/sdk-verify-token.d.ts.map +1 -1
- package/dist/esm/models/operations/sdk-verify-token.js +10 -0
- package/dist/esm/models/operations/sdk-verify-token.js.map +1 -1
- package/dist/esm/models/operations/signin-confirm.d.ts +148 -0
- package/dist/esm/models/operations/signin-confirm.d.ts.map +1 -0
- package/dist/esm/models/operations/signin-confirm.js +156 -0
- package/dist/esm/models/operations/signin-confirm.js.map +1 -0
- package/dist/esm/models/operations/signin-request.d.ts +115 -0
- package/dist/esm/models/operations/signin-request.d.ts.map +1 -0
- package/dist/esm/models/operations/signin-request.js +128 -0
- package/dist/esm/models/operations/signin-request.js.map +1 -0
- package/dist/esm/models/operations/verification-get-status.d.ts +5 -0
- package/dist/esm/models/operations/verification-get-status.d.ts.map +1 -1
- package/dist/esm/models/operations/verification-get-status.js +4 -0
- package/dist/esm/models/operations/verification-get-status.js.map +1 -1
- package/dist/esm/sdk/census.d.ts +1 -1
- package/dist/esm/sdk/census.js +1 -1
- package/dist/esm/sdk/recovery.d.ts +19 -0
- package/dist/esm/sdk/recovery.d.ts.map +1 -0
- package/dist/esm/sdk/recovery.js +28 -0
- package/dist/esm/sdk/recovery.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +6 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +10 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/dist/esm/sdk/sign-in.d.ts +19 -0
- package/dist/esm/sdk/sign-in.d.ts.map +1 -0
- package/dist/esm/sdk/sign-in.js +28 -0
- package/dist/esm/sdk/sign-in.js.map +1 -0
- package/dist/esm/sdk/verification.d.ts +1 -1
- package/dist/esm/sdk/verification.js +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/census-verify-token.ts +1 -1
- package/src/funcs/recovery-exchange.ts +184 -0
- package/src/funcs/recovery-other-route.ts +184 -0
- package/src/funcs/sign-in-confirm.ts +184 -0
- package/src/funcs/sign-in-request.ts +184 -0
- package/src/funcs/verification-get-status.ts +7 -2
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/bot-shield-action.ts +61 -0
- package/src/models/error-body.ts +1 -1
- package/src/models/operations/gates-api-actions-create.ts +1 -1
- package/src/models/operations/gates-api-actions-list.ts +1 -1
- package/src/models/operations/gates-api-actions-request.ts +1 -1
- package/src/models/operations/gates-api-actions-set-state.ts +1 -1
- package/src/models/operations/gates-api-actions-update.ts +1 -1
- package/src/models/operations/index.ts +4 -0
- package/src/models/operations/recovery-exchange.ts +308 -0
- package/src/models/operations/recovery-other-route.ts +262 -0
- package/src/models/operations/sdk-create-verification-link.ts +10 -1
- package/src/models/operations/sdk-send-by-number.ts +1 -1
- package/src/models/operations/sdk-verify-token.ts +25 -0
- package/src/models/operations/signin-confirm.ts +383 -0
- package/src/models/operations/signin-request.ts +319 -0
- package/src/models/operations/verification-get-status.ts +9 -0
- package/src/sdk/census.ts +1 -1
- package/src/sdk/recovery.ts +49 -0
- package/src/sdk/sdk.ts +12 -0
- package/src/sdk/sign-in.ts +49 -0
- package/src/sdk/verification.ts +1 -1
|
@@ -0,0 +1,308 @@
|
|
|
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 RecoveryExchangeSecurity = {
|
|
15
|
+
apiKeyAuth: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type RecoveryExchangeRequest = {
|
|
19
|
+
/**
|
|
20
|
+
* The `botshield_recovery_code` your landing page received. Works once, for 2 minutes.
|
|
21
|
+
*/
|
|
22
|
+
code: string;
|
|
23
|
+
/**
|
|
24
|
+
* The secret your page set in this browser before the tap (its SHA-256, base64url, was the button's challenge).
|
|
25
|
+
*/
|
|
26
|
+
secret: string;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const RecoveryExchangeAct = {
|
|
30
|
+
Recovery: "recovery",
|
|
31
|
+
} as const;
|
|
32
|
+
export type RecoveryExchangeAct = ClosedEnum<typeof RecoveryExchangeAct>;
|
|
33
|
+
|
|
34
|
+
export type RecoveryExchangeDataData = {
|
|
35
|
+
/**
|
|
36
|
+
* Always true: this is a recovery.
|
|
37
|
+
*/
|
|
38
|
+
recovery: boolean;
|
|
39
|
+
act: RecoveryExchangeAct;
|
|
40
|
+
/**
|
|
41
|
+
* The Recovery Action's key.
|
|
42
|
+
*/
|
|
43
|
+
action: string;
|
|
44
|
+
/**
|
|
45
|
+
* The account's per-company handle (`OP_…`), as `account.secured` gave it.
|
|
46
|
+
*/
|
|
47
|
+
handle: string;
|
|
48
|
+
recoveryId: string;
|
|
49
|
+
recoveredAt: Date;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export type RecoveryExchangeData = {
|
|
53
|
+
data?: RecoveryExchangeDataData | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Handler error. Arrives inside `data.error` with HTTP 200. Check for it before reading the result.
|
|
56
|
+
*/
|
|
57
|
+
error?: models.ErrorBody | undefined;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The recovery. NOTE: handler errors also arrive here (HTTP 200) as data.error — codes: `invalid_key` (401 — missing, malformed or inactive key; a site key `pk_…` is refused), `org_not_found` (404), `recovery_code_invalid` (400 — unknown, used, expired, another company's, or the secret did not match; the code is destroyed either way).
|
|
62
|
+
*/
|
|
63
|
+
export type RecoveryExchangeResponse = {
|
|
64
|
+
data: RecoveryExchangeData;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/** @internal */
|
|
68
|
+
export const RecoveryExchangeSecurity$inboundSchema: z.ZodType<
|
|
69
|
+
RecoveryExchangeSecurity,
|
|
70
|
+
z.ZodTypeDef,
|
|
71
|
+
unknown
|
|
72
|
+
> = z.object({
|
|
73
|
+
ApiKeyAuth: types.string(),
|
|
74
|
+
}).transform((v) => {
|
|
75
|
+
return remap$(v, {
|
|
76
|
+
"ApiKeyAuth": "apiKeyAuth",
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
/** @internal */
|
|
80
|
+
export type RecoveryExchangeSecurity$Outbound = {
|
|
81
|
+
ApiKeyAuth: string;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/** @internal */
|
|
85
|
+
export const RecoveryExchangeSecurity$outboundSchema: z.ZodType<
|
|
86
|
+
RecoveryExchangeSecurity$Outbound,
|
|
87
|
+
z.ZodTypeDef,
|
|
88
|
+
RecoveryExchangeSecurity
|
|
89
|
+
> = z.object({
|
|
90
|
+
apiKeyAuth: z.string(),
|
|
91
|
+
}).transform((v) => {
|
|
92
|
+
return remap$(v, {
|
|
93
|
+
apiKeyAuth: "ApiKeyAuth",
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
export function recoveryExchangeSecurityToJSON(
|
|
98
|
+
recoveryExchangeSecurity: RecoveryExchangeSecurity,
|
|
99
|
+
): string {
|
|
100
|
+
return JSON.stringify(
|
|
101
|
+
RecoveryExchangeSecurity$outboundSchema.parse(recoveryExchangeSecurity),
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
export function recoveryExchangeSecurityFromJSON(
|
|
105
|
+
jsonString: string,
|
|
106
|
+
): SafeParseResult<RecoveryExchangeSecurity, SDKValidationError> {
|
|
107
|
+
return safeParse(
|
|
108
|
+
jsonString,
|
|
109
|
+
(x) => RecoveryExchangeSecurity$inboundSchema.parse(JSON.parse(x)),
|
|
110
|
+
`Failed to parse 'RecoveryExchangeSecurity' from JSON`,
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** @internal */
|
|
115
|
+
export const RecoveryExchangeRequest$inboundSchema: z.ZodType<
|
|
116
|
+
RecoveryExchangeRequest,
|
|
117
|
+
z.ZodTypeDef,
|
|
118
|
+
unknown
|
|
119
|
+
> = z.object({
|
|
120
|
+
code: types.string(),
|
|
121
|
+
secret: types.string(),
|
|
122
|
+
});
|
|
123
|
+
/** @internal */
|
|
124
|
+
export type RecoveryExchangeRequest$Outbound = {
|
|
125
|
+
code: string;
|
|
126
|
+
secret: string;
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
/** @internal */
|
|
130
|
+
export const RecoveryExchangeRequest$outboundSchema: z.ZodType<
|
|
131
|
+
RecoveryExchangeRequest$Outbound,
|
|
132
|
+
z.ZodTypeDef,
|
|
133
|
+
RecoveryExchangeRequest
|
|
134
|
+
> = z.object({
|
|
135
|
+
code: z.string(),
|
|
136
|
+
secret: z.string(),
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
export function recoveryExchangeRequestToJSON(
|
|
140
|
+
recoveryExchangeRequest: RecoveryExchangeRequest,
|
|
141
|
+
): string {
|
|
142
|
+
return JSON.stringify(
|
|
143
|
+
RecoveryExchangeRequest$outboundSchema.parse(recoveryExchangeRequest),
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
export function recoveryExchangeRequestFromJSON(
|
|
147
|
+
jsonString: string,
|
|
148
|
+
): SafeParseResult<RecoveryExchangeRequest, SDKValidationError> {
|
|
149
|
+
return safeParse(
|
|
150
|
+
jsonString,
|
|
151
|
+
(x) => RecoveryExchangeRequest$inboundSchema.parse(JSON.parse(x)),
|
|
152
|
+
`Failed to parse 'RecoveryExchangeRequest' from JSON`,
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/** @internal */
|
|
157
|
+
export const RecoveryExchangeAct$inboundSchema: z.ZodNativeEnum<
|
|
158
|
+
typeof RecoveryExchangeAct
|
|
159
|
+
> = z.nativeEnum(RecoveryExchangeAct);
|
|
160
|
+
/** @internal */
|
|
161
|
+
export const RecoveryExchangeAct$outboundSchema: z.ZodNativeEnum<
|
|
162
|
+
typeof RecoveryExchangeAct
|
|
163
|
+
> = RecoveryExchangeAct$inboundSchema;
|
|
164
|
+
|
|
165
|
+
/** @internal */
|
|
166
|
+
export const RecoveryExchangeDataData$inboundSchema: z.ZodType<
|
|
167
|
+
RecoveryExchangeDataData,
|
|
168
|
+
z.ZodTypeDef,
|
|
169
|
+
unknown
|
|
170
|
+
> = z.object({
|
|
171
|
+
recovery: types.boolean(),
|
|
172
|
+
act: RecoveryExchangeAct$inboundSchema,
|
|
173
|
+
action: types.string(),
|
|
174
|
+
handle: types.string(),
|
|
175
|
+
recovery_id: types.string(),
|
|
176
|
+
recovered_at: types.date(),
|
|
177
|
+
}).transform((v) => {
|
|
178
|
+
return remap$(v, {
|
|
179
|
+
"recovery_id": "recoveryId",
|
|
180
|
+
"recovered_at": "recoveredAt",
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
/** @internal */
|
|
184
|
+
export type RecoveryExchangeDataData$Outbound = {
|
|
185
|
+
recovery: boolean;
|
|
186
|
+
act: string;
|
|
187
|
+
action: string;
|
|
188
|
+
handle: string;
|
|
189
|
+
recovery_id: string;
|
|
190
|
+
recovered_at: string;
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
/** @internal */
|
|
194
|
+
export const RecoveryExchangeDataData$outboundSchema: z.ZodType<
|
|
195
|
+
RecoveryExchangeDataData$Outbound,
|
|
196
|
+
z.ZodTypeDef,
|
|
197
|
+
RecoveryExchangeDataData
|
|
198
|
+
> = z.object({
|
|
199
|
+
recovery: z.boolean(),
|
|
200
|
+
act: RecoveryExchangeAct$outboundSchema,
|
|
201
|
+
action: z.string(),
|
|
202
|
+
handle: z.string(),
|
|
203
|
+
recoveryId: z.string(),
|
|
204
|
+
recoveredAt: z.date().transform(v => v.toISOString()),
|
|
205
|
+
}).transform((v) => {
|
|
206
|
+
return remap$(v, {
|
|
207
|
+
recoveryId: "recovery_id",
|
|
208
|
+
recoveredAt: "recovered_at",
|
|
209
|
+
});
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
export function recoveryExchangeDataDataToJSON(
|
|
213
|
+
recoveryExchangeDataData: RecoveryExchangeDataData,
|
|
214
|
+
): string {
|
|
215
|
+
return JSON.stringify(
|
|
216
|
+
RecoveryExchangeDataData$outboundSchema.parse(recoveryExchangeDataData),
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
export function recoveryExchangeDataDataFromJSON(
|
|
220
|
+
jsonString: string,
|
|
221
|
+
): SafeParseResult<RecoveryExchangeDataData, SDKValidationError> {
|
|
222
|
+
return safeParse(
|
|
223
|
+
jsonString,
|
|
224
|
+
(x) => RecoveryExchangeDataData$inboundSchema.parse(JSON.parse(x)),
|
|
225
|
+
`Failed to parse 'RecoveryExchangeDataData' from JSON`,
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/** @internal */
|
|
230
|
+
export const RecoveryExchangeData$inboundSchema: z.ZodType<
|
|
231
|
+
RecoveryExchangeData,
|
|
232
|
+
z.ZodTypeDef,
|
|
233
|
+
unknown
|
|
234
|
+
> = z.object({
|
|
235
|
+
data: types.optional(z.lazy(() => RecoveryExchangeDataData$inboundSchema)),
|
|
236
|
+
error: types.optional(models.ErrorBody$inboundSchema),
|
|
237
|
+
});
|
|
238
|
+
/** @internal */
|
|
239
|
+
export type RecoveryExchangeData$Outbound = {
|
|
240
|
+
data?: RecoveryExchangeDataData$Outbound | undefined;
|
|
241
|
+
error?: models.ErrorBody$Outbound | undefined;
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
/** @internal */
|
|
245
|
+
export const RecoveryExchangeData$outboundSchema: z.ZodType<
|
|
246
|
+
RecoveryExchangeData$Outbound,
|
|
247
|
+
z.ZodTypeDef,
|
|
248
|
+
RecoveryExchangeData
|
|
249
|
+
> = z.object({
|
|
250
|
+
data: z.lazy(() => RecoveryExchangeDataData$outboundSchema).optional(),
|
|
251
|
+
error: models.ErrorBody$outboundSchema.optional(),
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
export function recoveryExchangeDataToJSON(
|
|
255
|
+
recoveryExchangeData: RecoveryExchangeData,
|
|
256
|
+
): string {
|
|
257
|
+
return JSON.stringify(
|
|
258
|
+
RecoveryExchangeData$outboundSchema.parse(recoveryExchangeData),
|
|
259
|
+
);
|
|
260
|
+
}
|
|
261
|
+
export function recoveryExchangeDataFromJSON(
|
|
262
|
+
jsonString: string,
|
|
263
|
+
): SafeParseResult<RecoveryExchangeData, SDKValidationError> {
|
|
264
|
+
return safeParse(
|
|
265
|
+
jsonString,
|
|
266
|
+
(x) => RecoveryExchangeData$inboundSchema.parse(JSON.parse(x)),
|
|
267
|
+
`Failed to parse 'RecoveryExchangeData' from JSON`,
|
|
268
|
+
);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/** @internal */
|
|
272
|
+
export const RecoveryExchangeResponse$inboundSchema: z.ZodType<
|
|
273
|
+
RecoveryExchangeResponse,
|
|
274
|
+
z.ZodTypeDef,
|
|
275
|
+
unknown
|
|
276
|
+
> = z.object({
|
|
277
|
+
data: z.lazy(() => RecoveryExchangeData$inboundSchema),
|
|
278
|
+
});
|
|
279
|
+
/** @internal */
|
|
280
|
+
export type RecoveryExchangeResponse$Outbound = {
|
|
281
|
+
data: RecoveryExchangeData$Outbound;
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
/** @internal */
|
|
285
|
+
export const RecoveryExchangeResponse$outboundSchema: z.ZodType<
|
|
286
|
+
RecoveryExchangeResponse$Outbound,
|
|
287
|
+
z.ZodTypeDef,
|
|
288
|
+
RecoveryExchangeResponse
|
|
289
|
+
> = z.object({
|
|
290
|
+
data: z.lazy(() => RecoveryExchangeData$outboundSchema),
|
|
291
|
+
});
|
|
292
|
+
|
|
293
|
+
export function recoveryExchangeResponseToJSON(
|
|
294
|
+
recoveryExchangeResponse: RecoveryExchangeResponse,
|
|
295
|
+
): string {
|
|
296
|
+
return JSON.stringify(
|
|
297
|
+
RecoveryExchangeResponse$outboundSchema.parse(recoveryExchangeResponse),
|
|
298
|
+
);
|
|
299
|
+
}
|
|
300
|
+
export function recoveryExchangeResponseFromJSON(
|
|
301
|
+
jsonString: string,
|
|
302
|
+
): SafeParseResult<RecoveryExchangeResponse, SDKValidationError> {
|
|
303
|
+
return safeParse(
|
|
304
|
+
jsonString,
|
|
305
|
+
(x) => RecoveryExchangeResponse$inboundSchema.parse(JSON.parse(x)),
|
|
306
|
+
`Failed to parse 'RecoveryExchangeResponse' from JSON`,
|
|
307
|
+
);
|
|
308
|
+
}
|
|
@@ -0,0 +1,262 @@
|
|
|
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 RecoveryOtherRouteSecurity = {
|
|
14
|
+
apiKeyAuth: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type RecoveryOtherRouteRequest = {
|
|
18
|
+
/**
|
|
19
|
+
* The account's handle (`OP_…`), as BotShield gave it to you.
|
|
20
|
+
*/
|
|
21
|
+
handle: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type RecoveryOtherRouteDataData = {
|
|
25
|
+
received: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* When your other route may take effect: the person has until then to say it was not them.
|
|
28
|
+
*/
|
|
29
|
+
worksFrom: Date;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type RecoveryOtherRouteData = {
|
|
33
|
+
data?: RecoveryOtherRouteDataData | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Handler error. Arrives inside `data.error` with HTTP 200. Check for it before reading the result.
|
|
36
|
+
*/
|
|
37
|
+
error?: models.ErrorBody | undefined;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Received. NOTE: handler errors also arrive here (HTTP 200) as data.error — codes: `invalid_key` (401 — missing, malformed or inactive key; a site key `pk_…` is refused), `org_not_found` (404), `handle_invalid` (400), `unavailable` (503).
|
|
42
|
+
*/
|
|
43
|
+
export type RecoveryOtherRouteResponse = {
|
|
44
|
+
data: RecoveryOtherRouteData;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const RecoveryOtherRouteSecurity$inboundSchema: z.ZodType<
|
|
49
|
+
RecoveryOtherRouteSecurity,
|
|
50
|
+
z.ZodTypeDef,
|
|
51
|
+
unknown
|
|
52
|
+
> = z.object({
|
|
53
|
+
ApiKeyAuth: types.string(),
|
|
54
|
+
}).transform((v) => {
|
|
55
|
+
return remap$(v, {
|
|
56
|
+
"ApiKeyAuth": "apiKeyAuth",
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
/** @internal */
|
|
60
|
+
export type RecoveryOtherRouteSecurity$Outbound = {
|
|
61
|
+
ApiKeyAuth: string;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/** @internal */
|
|
65
|
+
export const RecoveryOtherRouteSecurity$outboundSchema: z.ZodType<
|
|
66
|
+
RecoveryOtherRouteSecurity$Outbound,
|
|
67
|
+
z.ZodTypeDef,
|
|
68
|
+
RecoveryOtherRouteSecurity
|
|
69
|
+
> = z.object({
|
|
70
|
+
apiKeyAuth: z.string(),
|
|
71
|
+
}).transform((v) => {
|
|
72
|
+
return remap$(v, {
|
|
73
|
+
apiKeyAuth: "ApiKeyAuth",
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
export function recoveryOtherRouteSecurityToJSON(
|
|
78
|
+
recoveryOtherRouteSecurity: RecoveryOtherRouteSecurity,
|
|
79
|
+
): string {
|
|
80
|
+
return JSON.stringify(
|
|
81
|
+
RecoveryOtherRouteSecurity$outboundSchema.parse(recoveryOtherRouteSecurity),
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
export function recoveryOtherRouteSecurityFromJSON(
|
|
85
|
+
jsonString: string,
|
|
86
|
+
): SafeParseResult<RecoveryOtherRouteSecurity, SDKValidationError> {
|
|
87
|
+
return safeParse(
|
|
88
|
+
jsonString,
|
|
89
|
+
(x) => RecoveryOtherRouteSecurity$inboundSchema.parse(JSON.parse(x)),
|
|
90
|
+
`Failed to parse 'RecoveryOtherRouteSecurity' from JSON`,
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** @internal */
|
|
95
|
+
export const RecoveryOtherRouteRequest$inboundSchema: z.ZodType<
|
|
96
|
+
RecoveryOtherRouteRequest,
|
|
97
|
+
z.ZodTypeDef,
|
|
98
|
+
unknown
|
|
99
|
+
> = z.object({
|
|
100
|
+
handle: types.string(),
|
|
101
|
+
});
|
|
102
|
+
/** @internal */
|
|
103
|
+
export type RecoveryOtherRouteRequest$Outbound = {
|
|
104
|
+
handle: string;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
/** @internal */
|
|
108
|
+
export const RecoveryOtherRouteRequest$outboundSchema: z.ZodType<
|
|
109
|
+
RecoveryOtherRouteRequest$Outbound,
|
|
110
|
+
z.ZodTypeDef,
|
|
111
|
+
RecoveryOtherRouteRequest
|
|
112
|
+
> = z.object({
|
|
113
|
+
handle: z.string(),
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
export function recoveryOtherRouteRequestToJSON(
|
|
117
|
+
recoveryOtherRouteRequest: RecoveryOtherRouteRequest,
|
|
118
|
+
): string {
|
|
119
|
+
return JSON.stringify(
|
|
120
|
+
RecoveryOtherRouteRequest$outboundSchema.parse(recoveryOtherRouteRequest),
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
export function recoveryOtherRouteRequestFromJSON(
|
|
124
|
+
jsonString: string,
|
|
125
|
+
): SafeParseResult<RecoveryOtherRouteRequest, SDKValidationError> {
|
|
126
|
+
return safeParse(
|
|
127
|
+
jsonString,
|
|
128
|
+
(x) => RecoveryOtherRouteRequest$inboundSchema.parse(JSON.parse(x)),
|
|
129
|
+
`Failed to parse 'RecoveryOtherRouteRequest' from JSON`,
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/** @internal */
|
|
134
|
+
export const RecoveryOtherRouteDataData$inboundSchema: z.ZodType<
|
|
135
|
+
RecoveryOtherRouteDataData,
|
|
136
|
+
z.ZodTypeDef,
|
|
137
|
+
unknown
|
|
138
|
+
> = z.object({
|
|
139
|
+
received: types.boolean(),
|
|
140
|
+
works_from: types.date(),
|
|
141
|
+
}).transform((v) => {
|
|
142
|
+
return remap$(v, {
|
|
143
|
+
"works_from": "worksFrom",
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
/** @internal */
|
|
147
|
+
export type RecoveryOtherRouteDataData$Outbound = {
|
|
148
|
+
received: boolean;
|
|
149
|
+
works_from: string;
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
/** @internal */
|
|
153
|
+
export const RecoveryOtherRouteDataData$outboundSchema: z.ZodType<
|
|
154
|
+
RecoveryOtherRouteDataData$Outbound,
|
|
155
|
+
z.ZodTypeDef,
|
|
156
|
+
RecoveryOtherRouteDataData
|
|
157
|
+
> = z.object({
|
|
158
|
+
received: z.boolean(),
|
|
159
|
+
worksFrom: z.date().transform(v => v.toISOString()),
|
|
160
|
+
}).transform((v) => {
|
|
161
|
+
return remap$(v, {
|
|
162
|
+
worksFrom: "works_from",
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
export function recoveryOtherRouteDataDataToJSON(
|
|
167
|
+
recoveryOtherRouteDataData: RecoveryOtherRouteDataData,
|
|
168
|
+
): string {
|
|
169
|
+
return JSON.stringify(
|
|
170
|
+
RecoveryOtherRouteDataData$outboundSchema.parse(recoveryOtherRouteDataData),
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
export function recoveryOtherRouteDataDataFromJSON(
|
|
174
|
+
jsonString: string,
|
|
175
|
+
): SafeParseResult<RecoveryOtherRouteDataData, SDKValidationError> {
|
|
176
|
+
return safeParse(
|
|
177
|
+
jsonString,
|
|
178
|
+
(x) => RecoveryOtherRouteDataData$inboundSchema.parse(JSON.parse(x)),
|
|
179
|
+
`Failed to parse 'RecoveryOtherRouteDataData' from JSON`,
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/** @internal */
|
|
184
|
+
export const RecoveryOtherRouteData$inboundSchema: z.ZodType<
|
|
185
|
+
RecoveryOtherRouteData,
|
|
186
|
+
z.ZodTypeDef,
|
|
187
|
+
unknown
|
|
188
|
+
> = z.object({
|
|
189
|
+
data: types.optional(z.lazy(() => RecoveryOtherRouteDataData$inboundSchema)),
|
|
190
|
+
error: types.optional(models.ErrorBody$inboundSchema),
|
|
191
|
+
});
|
|
192
|
+
/** @internal */
|
|
193
|
+
export type RecoveryOtherRouteData$Outbound = {
|
|
194
|
+
data?: RecoveryOtherRouteDataData$Outbound | undefined;
|
|
195
|
+
error?: models.ErrorBody$Outbound | undefined;
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
/** @internal */
|
|
199
|
+
export const RecoveryOtherRouteData$outboundSchema: z.ZodType<
|
|
200
|
+
RecoveryOtherRouteData$Outbound,
|
|
201
|
+
z.ZodTypeDef,
|
|
202
|
+
RecoveryOtherRouteData
|
|
203
|
+
> = z.object({
|
|
204
|
+
data: z.lazy(() => RecoveryOtherRouteDataData$outboundSchema).optional(),
|
|
205
|
+
error: models.ErrorBody$outboundSchema.optional(),
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
export function recoveryOtherRouteDataToJSON(
|
|
209
|
+
recoveryOtherRouteData: RecoveryOtherRouteData,
|
|
210
|
+
): string {
|
|
211
|
+
return JSON.stringify(
|
|
212
|
+
RecoveryOtherRouteData$outboundSchema.parse(recoveryOtherRouteData),
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
export function recoveryOtherRouteDataFromJSON(
|
|
216
|
+
jsonString: string,
|
|
217
|
+
): SafeParseResult<RecoveryOtherRouteData, SDKValidationError> {
|
|
218
|
+
return safeParse(
|
|
219
|
+
jsonString,
|
|
220
|
+
(x) => RecoveryOtherRouteData$inboundSchema.parse(JSON.parse(x)),
|
|
221
|
+
`Failed to parse 'RecoveryOtherRouteData' from JSON`,
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/** @internal */
|
|
226
|
+
export const RecoveryOtherRouteResponse$inboundSchema: z.ZodType<
|
|
227
|
+
RecoveryOtherRouteResponse,
|
|
228
|
+
z.ZodTypeDef,
|
|
229
|
+
unknown
|
|
230
|
+
> = z.object({
|
|
231
|
+
data: z.lazy(() => RecoveryOtherRouteData$inboundSchema),
|
|
232
|
+
});
|
|
233
|
+
/** @internal */
|
|
234
|
+
export type RecoveryOtherRouteResponse$Outbound = {
|
|
235
|
+
data: RecoveryOtherRouteData$Outbound;
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
/** @internal */
|
|
239
|
+
export const RecoveryOtherRouteResponse$outboundSchema: z.ZodType<
|
|
240
|
+
RecoveryOtherRouteResponse$Outbound,
|
|
241
|
+
z.ZodTypeDef,
|
|
242
|
+
RecoveryOtherRouteResponse
|
|
243
|
+
> = z.object({
|
|
244
|
+
data: z.lazy(() => RecoveryOtherRouteData$outboundSchema),
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
export function recoveryOtherRouteResponseToJSON(
|
|
248
|
+
recoveryOtherRouteResponse: RecoveryOtherRouteResponse,
|
|
249
|
+
): string {
|
|
250
|
+
return JSON.stringify(
|
|
251
|
+
RecoveryOtherRouteResponse$outboundSchema.parse(recoveryOtherRouteResponse),
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
export function recoveryOtherRouteResponseFromJSON(
|
|
255
|
+
jsonString: string,
|
|
256
|
+
): SafeParseResult<RecoveryOtherRouteResponse, SDKValidationError> {
|
|
257
|
+
return safeParse(
|
|
258
|
+
jsonString,
|
|
259
|
+
(x) => RecoveryOtherRouteResponse$inboundSchema.parse(JSON.parse(x)),
|
|
260
|
+
`Failed to parse 'RecoveryOtherRouteResponse' from JSON`,
|
|
261
|
+
);
|
|
262
|
+
}
|
|
@@ -191,6 +191,10 @@ export type SDKCreateVerificationLinkNotarizeFallbackReason = OpenEnum<
|
|
|
191
191
|
|
|
192
192
|
export type SDKCreateVerificationLinkDataData = {
|
|
193
193
|
requestId: string;
|
|
194
|
+
/**
|
|
195
|
+
* 4.0: only on a request started with your site key (`pk_…`, a page's grant). The one secret that reads this request's answer: send it as `X-BotShield-Request-Secret` to verification/status, which returns the finished tokens only with it. Returned once, here; BotShield keeps only its hash. A request your server started with its secret key has none (its tokens go to that key).
|
|
196
|
+
*/
|
|
197
|
+
readSecret?: string | undefined;
|
|
194
198
|
deepLink: string;
|
|
195
199
|
webUrl: string;
|
|
196
200
|
/**
|
|
@@ -258,7 +262,7 @@ export type SDKCreateVerificationLinkData = {
|
|
|
258
262
|
};
|
|
259
263
|
|
|
260
264
|
/**
|
|
261
|
-
* Verification link created. NOTE: handler errors also arrive here (HTTP 200) as data.error — codes for this operation: 400 (partner not found / gate not active), 401, 403 (gate not in the token allowlist), 409 (pending request already exists — call revoke-verification). BotShield Actions and linking codes (`data.error.code`): `act_label_without_act` (400), `act_label_has_link` (400 — `act_label` may not contain a link, a domain or a URI scheme), `action_not_a_gate` (400), `action_invalid` (400 — act malformed), `action_not_found` (400 — no action with that key here), `action_off` (409), `action_requires_user_ref` (400), `link_requires_user_ref` (400 — the gate's policy is `link: required` and no partner_user_ref was sent), `account_reconfirm_required` (409 — the customer changed their phone number without approval from another phone; only the link ceremony (`notarize`) can be started for this partner_user_ref until they confirm the account again from your signed-in page). A development key over its limit: `RATE_LIMITED`.
|
|
265
|
+
* Verification link created. NOTE: handler errors also arrive here (HTTP 200) as data.error — codes for this operation: 400 (partner not found / gate not active), 401, 403 (gate not in the token allowlist), 409 (pending request already exists — call revoke-verification). BotShield Actions and linking codes (`data.error.code`): `act_label_without_act` (400), `act_label_has_link` (400 — `act_label` may not contain a link, a domain or a URI scheme), `action_not_a_gate` (400), `action_invalid` (400 — act malformed), `action_not_found` (400 — no action with that key here), `action_off` (409), `action_requires_user_ref` (400), `link_requires_user_ref` (400 — the gate's policy is `link: required` and no partner_user_ref was sent), `account_reconfirm_required` (409 — the customer changed their phone number without approval from another phone; only the link ceremony (`notarize`) can be started for this partner_user_ref until they confirm the account again from your signed-in page). A development key over its limit: `RATE_LIMITED`. 4.0: `link_requires_server_session` (403 — a request on a site-key grant that would write a NEW link: a `notarize` ceremony, or an `act` on an account not linked here yet; open the session from your server with your secret key, naming the signed-in customer), `account_override_refused` (403 — `partner_user_ref` names a different account from the one the session names), `action_is_recovery` / `action_is_signin` (400 — that `act` is your Recovery Action or your Sign-on Action, which no request starts), and 503 when BotShield could not tell whether the account is already linked (nothing was written; retry).
|
|
262
266
|
*/
|
|
263
267
|
export type SDKCreateVerificationLinkResponse = {
|
|
264
268
|
data: SDKCreateVerificationLinkData;
|
|
@@ -579,6 +583,7 @@ export const SDKCreateVerificationLinkDataData$inboundSchema: z.ZodType<
|
|
|
579
583
|
unknown
|
|
580
584
|
> = z.object({
|
|
581
585
|
request_id: types.string(),
|
|
586
|
+
read_secret: types.optional(types.string()),
|
|
582
587
|
deep_link: types.string(),
|
|
583
588
|
web_url: types.string(),
|
|
584
589
|
qr_code_url: types.string(),
|
|
@@ -607,6 +612,7 @@ export const SDKCreateVerificationLinkDataData$inboundSchema: z.ZodType<
|
|
|
607
612
|
}).transform((v) => {
|
|
608
613
|
return remap$(v, {
|
|
609
614
|
"request_id": "requestId",
|
|
615
|
+
"read_secret": "readSecret",
|
|
610
616
|
"deep_link": "deepLink",
|
|
611
617
|
"web_url": "webUrl",
|
|
612
618
|
"qr_code_url": "qrCodeUrl",
|
|
@@ -623,6 +629,7 @@ export const SDKCreateVerificationLinkDataData$inboundSchema: z.ZodType<
|
|
|
623
629
|
/** @internal */
|
|
624
630
|
export type SDKCreateVerificationLinkDataData$Outbound = {
|
|
625
631
|
request_id: string;
|
|
632
|
+
read_secret?: string | undefined;
|
|
626
633
|
deep_link: string;
|
|
627
634
|
web_url: string;
|
|
628
635
|
qr_code_url: string;
|
|
@@ -649,6 +656,7 @@ export const SDKCreateVerificationLinkDataData$outboundSchema: z.ZodType<
|
|
|
649
656
|
SDKCreateVerificationLinkDataData
|
|
650
657
|
> = z.object({
|
|
651
658
|
requestId: z.string(),
|
|
659
|
+
readSecret: z.string().optional(),
|
|
652
660
|
deepLink: z.string(),
|
|
653
661
|
webUrl: z.string(),
|
|
654
662
|
qrCodeUrl: z.string(),
|
|
@@ -672,6 +680,7 @@ export const SDKCreateVerificationLinkDataData$outboundSchema: z.ZodType<
|
|
|
672
680
|
}).transform((v) => {
|
|
673
681
|
return remap$(v, {
|
|
674
682
|
requestId: "request_id",
|
|
683
|
+
readSecret: "read_secret",
|
|
675
684
|
deepLink: "deep_link",
|
|
676
685
|
webUrl: "web_url",
|
|
677
686
|
qrCodeUrl: "qr_code_url",
|
|
@@ -57,7 +57,7 @@ export type SDKSendByNumberData = {
|
|
|
57
57
|
};
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
|
-
* Result. NOTE: handler errors arrive here (HTTP 200) as data.error — codes: secret_key_required · invalid_key · phone_invalid · action_invalid · action_not_found · action_off · act_label_has_link · org_not_verified · send_rate_limited · unanswered_limit_reached · unavailable.
|
|
60
|
+
* Result. NOTE: handler errors arrive here (HTTP 200) as data.error — codes: secret_key_required · invalid_key · phone_invalid · action_invalid · action_not_found · action_off · act_label_has_link · org_not_verified · send_rate_limited · unanswered_limit_reached · unavailable. 4.0: action_is_recovery · action_is_signin (400 — your Recovery Action and Sign-on Action are never sent).
|
|
61
61
|
*/
|
|
62
62
|
export type SDKSendByNumberResponse = {
|
|
63
63
|
data?: SDKSendByNumberData | undefined;
|