botshield-sdk 4.0.0 → 4.0.3
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 +17 -5
- package/bin/mcp-server.js +395 -22
- package/bin/mcp-server.js.map +25 -21
- package/dist/commonjs/funcs/census-confirm-link.d.ts +1 -1
- package/dist/commonjs/funcs/census-confirm-link.js +1 -1
- package/dist/commonjs/funcs/census-send-by-number.d.ts +1 -1
- package/dist/commonjs/funcs/census-send-by-number.js +1 -1
- 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 -12
- package/dist/commonjs/lib/config.d.ts.map +1 -1
- package/dist/commonjs/lib/config.js +3 -13
- package/dist/commonjs/lib/config.js.map +1 -1
- 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 +37 -1
- 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/actions-propose.d.ts +1 -1
- package/dist/commonjs/models/operations/gates-api-actions-create.d.ts +2 -2
- package/dist/commonjs/models/operations/gates-api-actions-list.d.ts +1 -1
- package/dist/commonjs/models/operations/gates-api-actions-request.d.ts +2 -2
- 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 +2 -2
- 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 +19 -4
- 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/secured-accounts-list.d.ts +5 -0
- package/dist/commonjs/models/operations/secured-accounts-list.d.ts.map +1 -1
- package/dist/commonjs/models/operations/secured-accounts-list.js +2 -0
- package/dist/commonjs/models/operations/secured-accounts-list.js.map +1 -1
- package/dist/commonjs/models/operations/secured-accounts-status.d.ts +5 -0
- package/dist/commonjs/models/operations/secured-accounts-status.d.ts.map +1 -1
- package/dist/commonjs/models/operations/secured-accounts-status.js +2 -0
- package/dist/commonjs/models/operations/secured-accounts-status.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 +10 -5
- package/dist/commonjs/models/operations/verification-get-status.d.ts.map +1 -1
- package/dist/commonjs/models/operations/verification-get-status.js +5 -1
- package/dist/commonjs/models/operations/verification-get-status.js.map +1 -1
- package/dist/commonjs/sdk/census.d.ts +3 -3
- package/dist/commonjs/sdk/census.js +3 -3
- 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-confirm-link.d.ts +1 -1
- package/dist/esm/funcs/census-confirm-link.js +1 -1
- package/dist/esm/funcs/census-send-by-number.d.ts +1 -1
- package/dist/esm/funcs/census-send-by-number.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 -12
- package/dist/esm/lib/config.d.ts.map +1 -1
- package/dist/esm/lib/config.js +2 -12
- package/dist/esm/lib/config.js.map +1 -1
- 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 +37 -1
- 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/actions-propose.d.ts +1 -1
- package/dist/esm/models/operations/gates-api-actions-create.d.ts +2 -2
- package/dist/esm/models/operations/gates-api-actions-list.d.ts +1 -1
- package/dist/esm/models/operations/gates-api-actions-request.d.ts +2 -2
- 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 +2 -2
- 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 +19 -4
- 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/secured-accounts-list.d.ts +5 -0
- package/dist/esm/models/operations/secured-accounts-list.d.ts.map +1 -1
- package/dist/esm/models/operations/secured-accounts-list.js +2 -0
- package/dist/esm/models/operations/secured-accounts-list.js.map +1 -1
- package/dist/esm/models/operations/secured-accounts-status.d.ts +5 -0
- package/dist/esm/models/operations/secured-accounts-status.d.ts.map +1 -1
- package/dist/esm/models/operations/secured-accounts-status.js +2 -0
- package/dist/esm/models/operations/secured-accounts-status.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 +10 -5
- package/dist/esm/models/operations/verification-get-status.d.ts.map +1 -1
- package/dist/esm/models/operations/verification-get-status.js +5 -1
- package/dist/esm/models/operations/verification-get-status.js.map +1 -1
- package/dist/esm/sdk/census.d.ts +3 -3
- package/dist/esm/sdk/census.js +3 -3
- 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-confirm-link.ts +1 -1
- package/src/funcs/census-send-by-number.ts +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 -12
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/bot-shield-action.ts +62 -1
- package/src/models/error-body.ts +1 -1
- package/src/models/operations/actions-propose.ts +1 -1
- package/src/models/operations/gates-api-actions-create.ts +2 -2
- package/src/models/operations/gates-api-actions-list.ts +1 -1
- package/src/models/operations/gates-api-actions-request.ts +2 -2
- package/src/models/operations/gates-api-actions-set-state.ts +1 -1
- package/src/models/operations/gates-api-actions-update.ts +2 -2
- 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 +29 -4
- package/src/models/operations/secured-accounts-list.ts +7 -0
- package/src/models/operations/secured-accounts-status.ts +7 -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 +14 -5
- package/src/sdk/census.ts +3 -3
- 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,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
|
+
* 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`. `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. 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;
|
|
@@ -27,9 +27,13 @@ export type SDKVerifyTokenRequest = {
|
|
|
27
27
|
*/
|
|
28
28
|
audience?: string | undefined;
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* 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
31
|
*/
|
|
32
32
|
partnerUserRef?: string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* The request YOUR server made for this attempt. When given, a token for any other request is refused (`valid: false`, `code: request_mismatch`) and is not spent.
|
|
35
|
+
*/
|
|
36
|
+
expectedRequestId?: string | undefined;
|
|
33
37
|
};
|
|
34
38
|
|
|
35
39
|
/**
|
|
@@ -112,7 +116,11 @@ export type Claims = {
|
|
|
112
116
|
*/
|
|
113
117
|
environment?: SDKVerifyTokenEnvironment | null | undefined;
|
|
114
118
|
/**
|
|
115
|
-
*
|
|
119
|
+
* Present for 72 hours after this verified account was recovered with Recover Account with BotShield: when it was recovered. Only when `trusted` is true.
|
|
120
|
+
*/
|
|
121
|
+
recoveredAt?: Date | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* Where the link stood for this token: `pending`, `live`, `expired` or `refused`. Absent on a plain check.
|
|
116
124
|
*/
|
|
117
125
|
linkState?: string | undefined;
|
|
118
126
|
};
|
|
@@ -137,7 +145,7 @@ export const SDKVerifyTokenState = {
|
|
|
137
145
|
export type SDKVerifyTokenState = OpenEnum<typeof SDKVerifyTokenState>;
|
|
138
146
|
|
|
139
147
|
/**
|
|
140
|
-
*
|
|
148
|
+
* 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
149
|
*/
|
|
142
150
|
export type SDKVerifyTokenLink = {
|
|
143
151
|
state?: SDKVerifyTokenState | undefined;
|
|
@@ -157,6 +165,10 @@ export type SDKVerifyTokenDataData = {
|
|
|
157
165
|
* 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).
|
|
158
166
|
*/
|
|
159
167
|
reason?: string | undefined;
|
|
168
|
+
/**
|
|
169
|
+
* On some refusals (`valid: false`), a code beside `reason`: `secret_key_required` (called without your secret key; the token was not spent), `request_mismatch` (the token is for another request than `expected_request_id`; not spent).
|
|
170
|
+
*/
|
|
171
|
+
code?: string | undefined;
|
|
160
172
|
/**
|
|
161
173
|
* Present when the token was valid but has expired.
|
|
162
174
|
*/
|
|
@@ -171,7 +183,7 @@ export type SDKVerifyTokenDataData = {
|
|
|
171
183
|
*/
|
|
172
184
|
verdict?: SDKVerifyTokenVerdict | undefined;
|
|
173
185
|
/**
|
|
174
|
-
*
|
|
186
|
+
* 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
187
|
*/
|
|
176
188
|
link?: SDKVerifyTokenLink | undefined;
|
|
177
189
|
};
|
|
@@ -242,9 +254,11 @@ export const SDKVerifyTokenRequest$inboundSchema: z.ZodType<
|
|
|
242
254
|
token: types.string(),
|
|
243
255
|
audience: types.optional(types.string()),
|
|
244
256
|
partner_user_ref: types.optional(types.string()),
|
|
257
|
+
expected_request_id: types.optional(types.string()),
|
|
245
258
|
}).transform((v) => {
|
|
246
259
|
return remap$(v, {
|
|
247
260
|
"partner_user_ref": "partnerUserRef",
|
|
261
|
+
"expected_request_id": "expectedRequestId",
|
|
248
262
|
});
|
|
249
263
|
});
|
|
250
264
|
/** @internal */
|
|
@@ -252,6 +266,7 @@ export type SDKVerifyTokenRequest$Outbound = {
|
|
|
252
266
|
token: string;
|
|
253
267
|
audience?: string | undefined;
|
|
254
268
|
partner_user_ref?: string | undefined;
|
|
269
|
+
expected_request_id?: string | undefined;
|
|
255
270
|
};
|
|
256
271
|
|
|
257
272
|
/** @internal */
|
|
@@ -263,9 +278,11 @@ export const SDKVerifyTokenRequest$outboundSchema: z.ZodType<
|
|
|
263
278
|
token: z.string(),
|
|
264
279
|
audience: z.string().optional(),
|
|
265
280
|
partnerUserRef: z.string().optional(),
|
|
281
|
+
expectedRequestId: z.string().optional(),
|
|
266
282
|
}).transform((v) => {
|
|
267
283
|
return remap$(v, {
|
|
268
284
|
partnerUserRef: "partner_user_ref",
|
|
285
|
+
expectedRequestId: "expected_request_id",
|
|
269
286
|
});
|
|
270
287
|
});
|
|
271
288
|
|
|
@@ -331,6 +348,7 @@ export const Claims$inboundSchema: z.ZodType<Claims, z.ZodTypeDef, unknown> = z
|
|
|
331
348
|
act: types.optional(types.string()),
|
|
332
349
|
kind: z.nullable(Kind$inboundSchema).optional(),
|
|
333
350
|
environment: z.nullable(SDKVerifyTokenEnvironment$inboundSchema).optional(),
|
|
351
|
+
recovered_at: types.optional(types.date()),
|
|
334
352
|
link_state: types.optional(types.string()),
|
|
335
353
|
}).transform((v) => {
|
|
336
354
|
return remap$(v, {
|
|
@@ -341,6 +359,7 @@ export const Claims$inboundSchema: z.ZodType<Claims, z.ZodTypeDef, unknown> = z
|
|
|
341
359
|
"age_over": "ageOver",
|
|
342
360
|
"trusted_since": "trustedSince",
|
|
343
361
|
"last_pass_at": "lastPassAt",
|
|
362
|
+
"recovered_at": "recoveredAt",
|
|
344
363
|
"link_state": "linkState",
|
|
345
364
|
});
|
|
346
365
|
});
|
|
@@ -361,6 +380,7 @@ export type Claims$Outbound = {
|
|
|
361
380
|
act?: string | undefined;
|
|
362
381
|
kind?: string | null | undefined;
|
|
363
382
|
environment?: string | null | undefined;
|
|
383
|
+
recovered_at?: string | undefined;
|
|
364
384
|
link_state?: string | undefined;
|
|
365
385
|
};
|
|
366
386
|
|
|
@@ -385,6 +405,7 @@ export const Claims$outboundSchema: z.ZodType<
|
|
|
385
405
|
act: z.string().optional(),
|
|
386
406
|
kind: z.nullable(Kind$outboundSchema).optional(),
|
|
387
407
|
environment: z.nullable(SDKVerifyTokenEnvironment$outboundSchema).optional(),
|
|
408
|
+
recoveredAt: z.date().transform(v => v.toISOString()).optional(),
|
|
388
409
|
linkState: z.string().optional(),
|
|
389
410
|
}).transform((v) => {
|
|
390
411
|
return remap$(v, {
|
|
@@ -395,6 +416,7 @@ export const Claims$outboundSchema: z.ZodType<
|
|
|
395
416
|
ageOver: "age_over",
|
|
396
417
|
trustedSince: "trusted_since",
|
|
397
418
|
lastPassAt: "last_pass_at",
|
|
419
|
+
recoveredAt: "recovered_at",
|
|
398
420
|
linkState: "link_state",
|
|
399
421
|
});
|
|
400
422
|
});
|
|
@@ -508,6 +530,7 @@ export const SDKVerifyTokenDataData$inboundSchema: z.ZodType<
|
|
|
508
530
|
> = z.object({
|
|
509
531
|
valid: types.boolean(),
|
|
510
532
|
reason: types.optional(types.string()),
|
|
533
|
+
code: types.optional(types.string()),
|
|
511
534
|
expired_at: z.nullable(types.date()).optional(),
|
|
512
535
|
claims: z.nullable(z.lazy(() => Claims$inboundSchema)).optional(),
|
|
513
536
|
replayed: types.optional(types.boolean()),
|
|
@@ -522,6 +545,7 @@ export const SDKVerifyTokenDataData$inboundSchema: z.ZodType<
|
|
|
522
545
|
export type SDKVerifyTokenDataData$Outbound = {
|
|
523
546
|
valid: boolean;
|
|
524
547
|
reason?: string | undefined;
|
|
548
|
+
code?: string | undefined;
|
|
525
549
|
expired_at?: string | null | undefined;
|
|
526
550
|
claims?: Claims$Outbound | null | undefined;
|
|
527
551
|
replayed?: boolean | undefined;
|
|
@@ -537,6 +561,7 @@ export const SDKVerifyTokenDataData$outboundSchema: z.ZodType<
|
|
|
537
561
|
> = z.object({
|
|
538
562
|
valid: z.boolean(),
|
|
539
563
|
reason: z.string().optional(),
|
|
564
|
+
code: z.string().optional(),
|
|
540
565
|
expiredAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
541
566
|
claims: z.nullable(z.lazy(() => Claims$outboundSchema)).optional(),
|
|
542
567
|
replayed: z.boolean().optional(),
|
|
@@ -94,6 +94,10 @@ export type Row = {
|
|
|
94
94
|
* The Link with BotShield ID surface the account was secured through; null when it was secured at a Gate.
|
|
95
95
|
*/
|
|
96
96
|
surfaceId: string | null;
|
|
97
|
+
/**
|
|
98
|
+
* True while the person's number changed without approval from another phone: this account answers nothing (refusals say account_reconfirm_required) until your signed-in link ceremony completes again. Never true for an unlinked account.
|
|
99
|
+
*/
|
|
100
|
+
paused: boolean;
|
|
97
101
|
};
|
|
98
102
|
|
|
99
103
|
/**
|
|
@@ -304,6 +308,7 @@ export const Row$inboundSchema: z.ZodType<Row, z.ZodTypeDef, unknown> = z
|
|
|
304
308
|
SecuredAccountsListUnlinkReason$inboundSchema,
|
|
305
309
|
),
|
|
306
310
|
surface_id: types.nullable(types.string()),
|
|
311
|
+
paused: types.boolean(),
|
|
307
312
|
}).transform((v) => {
|
|
308
313
|
return remap$(v, {
|
|
309
314
|
"secured_at": "securedAt",
|
|
@@ -322,6 +327,7 @@ export type Row$Outbound = {
|
|
|
322
327
|
unlinked_by: string | null;
|
|
323
328
|
unlink_reason: string | null;
|
|
324
329
|
surface_id: string | null;
|
|
330
|
+
paused: boolean;
|
|
325
331
|
};
|
|
326
332
|
|
|
327
333
|
/** @internal */
|
|
@@ -334,6 +340,7 @@ export const Row$outboundSchema: z.ZodType<Row$Outbound, z.ZodTypeDef, Row> = z
|
|
|
334
340
|
unlinkedBy: z.nullable(UnlinkedBy$outboundSchema),
|
|
335
341
|
unlinkReason: z.nullable(SecuredAccountsListUnlinkReason$outboundSchema),
|
|
336
342
|
surfaceId: z.nullable(z.string()),
|
|
343
|
+
paused: z.boolean(),
|
|
337
344
|
}).transform((v) => {
|
|
338
345
|
return remap$(v, {
|
|
339
346
|
securedAt: "secured_at",
|
|
@@ -38,6 +38,10 @@ export type SecuredAccountsStatusDataData = {
|
|
|
38
38
|
* When recent presence lapses (in the past when `stale`); null when `none`.
|
|
39
39
|
*/
|
|
40
40
|
freshUntil: Date | null;
|
|
41
|
+
/**
|
|
42
|
+
* True while the person's number changed without approval from another phone: this account answers nothing (refusals say account_reconfirm_required) until your signed-in link ceremony completes again. null when it can't be read; false when there is no live account.
|
|
43
|
+
*/
|
|
44
|
+
paused?: boolean | null | undefined;
|
|
41
45
|
};
|
|
42
46
|
|
|
43
47
|
export type SecuredAccountsStatusData = {
|
|
@@ -174,6 +178,7 @@ export const SecuredAccountsStatusDataData$inboundSchema: z.ZodType<
|
|
|
174
178
|
> = z.object({
|
|
175
179
|
state: SecuredAccountsStatusState$inboundSchema,
|
|
176
180
|
fresh_until: types.nullable(types.date()),
|
|
181
|
+
paused: z.nullable(types.boolean()).optional(),
|
|
177
182
|
}).transform((v) => {
|
|
178
183
|
return remap$(v, {
|
|
179
184
|
"fresh_until": "freshUntil",
|
|
@@ -183,6 +188,7 @@ export const SecuredAccountsStatusDataData$inboundSchema: z.ZodType<
|
|
|
183
188
|
export type SecuredAccountsStatusDataData$Outbound = {
|
|
184
189
|
state: string;
|
|
185
190
|
fresh_until: string | null;
|
|
191
|
+
paused?: boolean | null | undefined;
|
|
186
192
|
};
|
|
187
193
|
|
|
188
194
|
/** @internal */
|
|
@@ -193,6 +199,7 @@ export const SecuredAccountsStatusDataData$outboundSchema: z.ZodType<
|
|
|
193
199
|
> = z.object({
|
|
194
200
|
state: SecuredAccountsStatusState$outboundSchema,
|
|
195
201
|
freshUntil: z.nullable(z.date().transform(v => v.toISOString())),
|
|
202
|
+
paused: z.nullable(z.boolean()).optional(),
|
|
196
203
|
}).transform((v) => {
|
|
197
204
|
return remap$(v, {
|
|
198
205
|
freshUntil: "fresh_until",
|