botshield-sdk 2.0.1 → 2.1.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/LICENSE +21 -0
- package/README.md +41 -8
- package/bin/mcp-server.js +309 -173
- package/bin/mcp-server.js.map +27 -28
- package/dist/commonjs/funcs/census-verify-token.d.ts +1 -1
- package/dist/commonjs/funcs/census-verify-token.js +13 -1
- package/dist/commonjs/funcs/census-verify-token.js.map +1 -1
- package/dist/commonjs/funcs/verification-get-status.js +12 -0
- 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/lib/security.d.ts.map +1 -1
- package/dist/commonjs/lib/security.js +14 -0
- package/dist/commonjs/lib/security.js.map +1 -1
- package/dist/commonjs/mcp-server/cli/start/command.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/cli/start/command.js +16 -0
- package/dist/commonjs/mcp-server/cli/start/command.js.map +1 -1
- package/dist/commonjs/mcp-server/cli/start/impl.d.ts +2 -0
- package/dist/commonjs/mcp-server/cli/start/impl.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/cli/start/impl.js +4 -0
- package/dist/commonjs/mcp-server/cli/start/impl.js.map +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/mcp-server/tools/actions-cancel-action.js +1 -1
- package/dist/commonjs/mcp-server/tools/actions-cancel-action.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/actions-check-action-status.js +1 -1
- package/dist/commonjs/mcp-server/tools/actions-check-action-status.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/actions-propose-action.js +1 -1
- package/dist/commonjs/mcp-server/tools/actions-propose-action.js.map +1 -1
- package/dist/commonjs/models/error-body.d.ts +43 -8
- package/dist/commonjs/models/error-body.d.ts.map +1 -1
- package/dist/commonjs/models/error-body.js +51 -1
- package/dist/commonjs/models/error-body.js.map +1 -1
- package/dist/commonjs/models/operations/actions-cancel.d.ts +1 -1
- package/dist/commonjs/models/operations/actions-check-status.d.ts +6 -6
- package/dist/commonjs/models/operations/actions-check-status.d.ts.map +1 -1
- package/dist/commonjs/models/operations/actions-check-status.js +6 -6
- package/dist/commonjs/models/operations/actions-check-status.js.map +1 -1
- package/dist/commonjs/models/operations/actions-propose.d.ts +1 -1
- package/dist/commonjs/models/operations/index.d.ts +0 -1
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +0 -1
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/sdk-create-session.d.ts +49 -15
- package/dist/commonjs/models/operations/sdk-create-session.d.ts.map +1 -1
- package/dist/commonjs/models/operations/sdk-create-session.js +37 -16
- package/dist/commonjs/models/operations/sdk-create-session.js.map +1 -1
- package/dist/commonjs/models/operations/sdk-create-verification-link.d.ts +96 -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 +58 -1
- package/dist/commonjs/models/operations/sdk-create-verification-link.js.map +1 -1
- package/dist/commonjs/models/operations/sdk-logout.d.ts +1 -1
- package/dist/commonjs/models/operations/sdk-revoke-verification.d.ts +14 -4
- package/dist/commonjs/models/operations/sdk-revoke-verification.d.ts.map +1 -1
- package/dist/commonjs/models/operations/sdk-revoke-verification.js +4 -2
- package/dist/commonjs/models/operations/sdk-revoke-verification.js.map +1 -1
- package/dist/commonjs/models/operations/sdk-store-signal.d.ts +1 -1
- package/dist/commonjs/models/operations/sdk-validate-signal.d.ts +6 -6
- package/dist/commonjs/models/operations/sdk-validate-signal.d.ts.map +1 -1
- package/dist/commonjs/models/operations/sdk-validate-signal.js +6 -6
- package/dist/commonjs/models/operations/sdk-validate-signal.js.map +1 -1
- package/dist/commonjs/models/operations/sdk-verify-token.d.ts +82 -1
- package/dist/commonjs/models/operations/sdk-verify-token.d.ts.map +1 -1
- package/dist/commonjs/models/operations/sdk-verify-token.js +55 -1
- package/dist/commonjs/models/operations/sdk-verify-token.js.map +1 -1
- package/dist/commonjs/models/operations/verification-get-status.d.ts +51 -4
- package/dist/commonjs/models/operations/verification-get-status.d.ts.map +1 -1
- package/dist/commonjs/models/operations/verification-get-status.js +34 -2
- package/dist/commonjs/models/operations/verification-get-status.js.map +1 -1
- package/dist/commonjs/models/security.d.ts +4 -0
- package/dist/commonjs/models/security.d.ts.map +1 -1
- package/dist/commonjs/models/security.js +4 -0
- package/dist/commonjs/models/security.js.map +1 -1
- package/dist/commonjs/sdk/census.d.ts +1 -8
- package/dist/commonjs/sdk/census.d.ts.map +1 -1
- package/dist/commonjs/sdk/census.js +1 -11
- package/dist/commonjs/sdk/census.js.map +1 -1
- package/dist/esm/funcs/census-verify-token.d.ts +1 -1
- package/dist/esm/funcs/census-verify-token.js +13 -1
- package/dist/esm/funcs/census-verify-token.js.map +1 -1
- package/dist/esm/funcs/verification-get-status.js +12 -0
- 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/lib/security.d.ts.map +1 -1
- package/dist/esm/lib/security.js +14 -0
- package/dist/esm/lib/security.js.map +1 -1
- package/dist/esm/mcp-server/cli/start/command.d.ts.map +1 -1
- package/dist/esm/mcp-server/cli/start/command.js +16 -0
- package/dist/esm/mcp-server/cli/start/command.js.map +1 -1
- package/dist/esm/mcp-server/cli/start/impl.d.ts +2 -0
- package/dist/esm/mcp-server/cli/start/impl.d.ts.map +1 -1
- package/dist/esm/mcp-server/cli/start/impl.js +4 -0
- package/dist/esm/mcp-server/cli/start/impl.js.map +1 -1
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/mcp-server/tools/actions-cancel-action.js +1 -1
- package/dist/esm/mcp-server/tools/actions-cancel-action.js.map +1 -1
- package/dist/esm/mcp-server/tools/actions-check-action-status.js +1 -1
- package/dist/esm/mcp-server/tools/actions-check-action-status.js.map +1 -1
- package/dist/esm/mcp-server/tools/actions-propose-action.js +1 -1
- package/dist/esm/mcp-server/tools/actions-propose-action.js.map +1 -1
- package/dist/esm/models/error-body.d.ts +43 -8
- package/dist/esm/models/error-body.d.ts.map +1 -1
- package/dist/esm/models/error-body.js +48 -0
- package/dist/esm/models/error-body.js.map +1 -1
- package/dist/esm/models/operations/actions-cancel.d.ts +1 -1
- package/dist/esm/models/operations/actions-check-status.d.ts +6 -6
- package/dist/esm/models/operations/actions-check-status.d.ts.map +1 -1
- package/dist/esm/models/operations/actions-check-status.js +5 -5
- package/dist/esm/models/operations/actions-check-status.js.map +1 -1
- package/dist/esm/models/operations/actions-propose.d.ts +1 -1
- package/dist/esm/models/operations/index.d.ts +0 -1
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +0 -1
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/sdk-create-session.d.ts +49 -15
- package/dist/esm/models/operations/sdk-create-session.d.ts.map +1 -1
- package/dist/esm/models/operations/sdk-create-session.js +34 -13
- package/dist/esm/models/operations/sdk-create-session.js.map +1 -1
- package/dist/esm/models/operations/sdk-create-verification-link.d.ts +96 -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 +57 -0
- package/dist/esm/models/operations/sdk-create-verification-link.js.map +1 -1
- package/dist/esm/models/operations/sdk-logout.d.ts +1 -1
- package/dist/esm/models/operations/sdk-revoke-verification.d.ts +14 -4
- package/dist/esm/models/operations/sdk-revoke-verification.d.ts.map +1 -1
- package/dist/esm/models/operations/sdk-revoke-verification.js +4 -2
- package/dist/esm/models/operations/sdk-revoke-verification.js.map +1 -1
- package/dist/esm/models/operations/sdk-store-signal.d.ts +1 -1
- package/dist/esm/models/operations/sdk-validate-signal.d.ts +6 -6
- package/dist/esm/models/operations/sdk-validate-signal.d.ts.map +1 -1
- package/dist/esm/models/operations/sdk-validate-signal.js +5 -5
- package/dist/esm/models/operations/sdk-validate-signal.js.map +1 -1
- package/dist/esm/models/operations/sdk-verify-token.d.ts +82 -1
- package/dist/esm/models/operations/sdk-verify-token.d.ts.map +1 -1
- package/dist/esm/models/operations/sdk-verify-token.js +54 -0
- package/dist/esm/models/operations/sdk-verify-token.js.map +1 -1
- package/dist/esm/models/operations/verification-get-status.d.ts +51 -4
- package/dist/esm/models/operations/verification-get-status.d.ts.map +1 -1
- package/dist/esm/models/operations/verification-get-status.js +33 -1
- package/dist/esm/models/operations/verification-get-status.js.map +1 -1
- package/dist/esm/models/security.d.ts +4 -0
- package/dist/esm/models/security.d.ts.map +1 -1
- package/dist/esm/models/security.js +4 -0
- package/dist/esm/models/security.js.map +1 -1
- package/dist/esm/sdk/census.d.ts +1 -8
- package/dist/esm/sdk/census.d.ts.map +1 -1
- package/dist/esm/sdk/census.js +1 -11
- package/dist/esm/sdk/census.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +16 -1
- package/src/funcs/census-verify-token.ts +15 -1
- package/src/funcs/verification-get-status.ts +14 -0
- package/src/lib/config.ts +2 -2
- package/src/lib/security.ts +14 -0
- package/src/mcp-server/cli/start/command.ts +16 -0
- package/src/mcp-server/cli/start/impl.ts +6 -0
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/mcp-server/tools/actions-cancel-action.ts +1 -1
- package/src/mcp-server/tools/actions-check-action-status.ts +1 -1
- package/src/mcp-server/tools/actions-propose-action.ts +1 -1
- package/src/models/error-body.ts +95 -8
- package/src/models/operations/actions-cancel.ts +1 -1
- package/src/models/operations/actions-check-status.ts +18 -10
- package/src/models/operations/actions-propose.ts +1 -1
- package/src/models/operations/index.ts +0 -1
- package/src/models/operations/sdk-create-session.ts +89 -33
- package/src/models/operations/sdk-create-verification-link.ts +157 -2
- package/src/models/operations/sdk-logout.ts +1 -1
- package/src/models/operations/sdk-revoke-verification.ts +18 -6
- package/src/models/operations/sdk-store-signal.ts +1 -1
- package/src/models/operations/sdk-validate-signal.ts +16 -10
- package/src/models/operations/sdk-verify-token.ts +127 -1
- package/src/models/operations/verification-get-status.ts +81 -4
- package/src/models/security.ts +8 -0
- package/src/sdk/census.ts +1 -21
- package/dist/commonjs/funcs/census-get-partner-config.d.ts +0 -18
- package/dist/commonjs/funcs/census-get-partner-config.d.ts.map +0 -1
- package/dist/commonjs/funcs/census-get-partner-config.js +0 -132
- package/dist/commonjs/funcs/census-get-partner-config.js.map +0 -1
- package/dist/commonjs/models/operations/sdk-get-partner-config.d.ts +0 -126
- package/dist/commonjs/models/operations/sdk-get-partner-config.d.ts.map +0 -1
- package/dist/commonjs/models/operations/sdk-get-partner-config.js +0 -179
- package/dist/commonjs/models/operations/sdk-get-partner-config.js.map +0 -1
- package/dist/esm/funcs/census-get-partner-config.d.ts +0 -18
- package/dist/esm/funcs/census-get-partner-config.d.ts.map +0 -1
- package/dist/esm/funcs/census-get-partner-config.js +0 -96
- package/dist/esm/funcs/census-get-partner-config.js.map +0 -1
- package/dist/esm/models/operations/sdk-get-partner-config.d.ts +0 -126
- package/dist/esm/models/operations/sdk-get-partner-config.d.ts.map +0 -1
- package/dist/esm/models/operations/sdk-get-partner-config.js +0 -131
- package/dist/esm/models/operations/sdk-get-partner-config.js.map +0 -1
- package/src/funcs/census-get-partner-config.ts +0 -196
- package/src/models/operations/sdk-get-partner-config.ts +0 -345
|
@@ -57,7 +57,9 @@ export type SDKCreateVerificationLinkRequest = {
|
|
|
57
57
|
*/
|
|
58
58
|
webhookUrl?: string | undefined;
|
|
59
59
|
/**
|
|
60
|
-
* The gate this request runs (the gate's action name, as listed in the Console under BotShield Gate).
|
|
60
|
+
* The gate this request runs (the gate's action name, as listed in the Console under BotShield Gate). **Deprecated (alias window, sunset 2027-01-15):** use `gate`. Accepted through the window; responses carry both. https://docs.botshield.ai/changelog/alias-window
|
|
61
|
+
*
|
|
62
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
61
63
|
*/
|
|
62
64
|
scope?: string | undefined;
|
|
63
65
|
sdkType?: SDKTypeRequest | undefined;
|
|
@@ -82,6 +84,14 @@ export type SDKCreateVerificationLinkRequest = {
|
|
|
82
84
|
*/
|
|
83
85
|
parentRequestId?: string | undefined;
|
|
84
86
|
metadata?: { [k: string]: any } | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* GA 3.0: run this ceremony as a notarize ceremony. The gate's Console switch (notarize_enabled) is the authority: the ceremony runs only when the switch is on. `true` with the switch off falls back to a plain verification with notarize_fallback_reason = notarize_not_enabled. `false` opts this placement out. Absent → inherited from the grant window, else offered when the switch is on. Requires partner_user_ref; never on an Age Gate. verification/complete writes the Secured Account binding in the same transaction as the completion.
|
|
89
|
+
*/
|
|
90
|
+
notarize?: boolean | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* The gate this request runs (the gate's action name, as listed in the Console under BotShield Gate).
|
|
93
|
+
*/
|
|
94
|
+
gate?: string | undefined;
|
|
85
95
|
};
|
|
86
96
|
|
|
87
97
|
export const SDKCreateVerificationLinkSDKTypeResponse = {
|
|
@@ -102,6 +112,46 @@ export type SDKCreateVerificationLinkOrganization = {
|
|
|
102
112
|
id?: string | undefined;
|
|
103
113
|
};
|
|
104
114
|
|
|
115
|
+
/**
|
|
116
|
+
* The gate's type. An Age Gate never notarizes (widget suppresses the chip).
|
|
117
|
+
*/
|
|
118
|
+
export const GateType = {
|
|
119
|
+
Human: "human",
|
|
120
|
+
Age: "age",
|
|
121
|
+
} as const;
|
|
122
|
+
/**
|
|
123
|
+
* The gate's type. An Age Gate never notarizes (widget suppresses the chip).
|
|
124
|
+
*/
|
|
125
|
+
export type GateType = OpenEnum<typeof GateType>;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Age Gate only.
|
|
129
|
+
*/
|
|
130
|
+
export const AgeThreshold = {
|
|
131
|
+
Thirteen: 13,
|
|
132
|
+
Eighteen: 18,
|
|
133
|
+
TwentyOne: 21,
|
|
134
|
+
} as const;
|
|
135
|
+
/**
|
|
136
|
+
* Age Gate only.
|
|
137
|
+
*/
|
|
138
|
+
export type AgeThreshold = OpenEnum<typeof AgeThreshold>;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* GA 3.0: present when notarize was requested but could not be applied. notarize_not_enabled = the gate's Console switch is off; the switch is the authority and the request field cannot turn the offer on.
|
|
142
|
+
*/
|
|
143
|
+
export const SDKCreateVerificationLinkNotarizeFallbackReason = {
|
|
144
|
+
NotarizeNotEnabled: "notarize_not_enabled",
|
|
145
|
+
NotarizeRequiresUserRef: "notarize_requires_user_ref",
|
|
146
|
+
AgeGate: "age_gate",
|
|
147
|
+
} as const;
|
|
148
|
+
/**
|
|
149
|
+
* GA 3.0: present when notarize was requested but could not be applied. notarize_not_enabled = the gate's Console switch is off; the switch is the authority and the request field cannot turn the offer on.
|
|
150
|
+
*/
|
|
151
|
+
export type SDKCreateVerificationLinkNotarizeFallbackReason = OpenEnum<
|
|
152
|
+
typeof SDKCreateVerificationLinkNotarizeFallbackReason
|
|
153
|
+
>;
|
|
154
|
+
|
|
105
155
|
export type SDKCreateVerificationLinkDataData = {
|
|
106
156
|
requestId: string;
|
|
107
157
|
deepLink: string;
|
|
@@ -115,18 +165,49 @@ export type SDKCreateVerificationLinkDataData = {
|
|
|
115
165
|
expiresAt: Date;
|
|
116
166
|
sdkType?: SDKCreateVerificationLinkSDKTypeResponse | undefined;
|
|
117
167
|
authMode?: AuthMode | undefined;
|
|
168
|
+
/**
|
|
169
|
+
* Deprecated alias of `gate` — present through the alias window (sunset 2027-01-15).
|
|
170
|
+
*
|
|
171
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
172
|
+
*/
|
|
118
173
|
scope?: string | undefined;
|
|
119
174
|
organization?: SDKCreateVerificationLinkOrganization | undefined;
|
|
120
175
|
/**
|
|
121
176
|
* Number of the user's registered devices the request was pushed to (0 when the user is unknown or has no devices).
|
|
122
177
|
*/
|
|
123
178
|
pushedToDevices: number;
|
|
179
|
+
/**
|
|
180
|
+
* The gate's type. An Age Gate never notarizes (widget suppresses the chip).
|
|
181
|
+
*/
|
|
182
|
+
gateType?: GateType | undefined;
|
|
183
|
+
/**
|
|
184
|
+
* Age Gate only.
|
|
185
|
+
*/
|
|
186
|
+
ageThreshold?: AgeThreshold | undefined;
|
|
187
|
+
/**
|
|
188
|
+
* GA 3.0 Secured Accounts: true when an active Secured Account binding exists for (your platform, platform-user-ref). The widget skips the "Link BotShield ID" chip when true.
|
|
189
|
+
*/
|
|
190
|
+
trusted?: boolean | undefined;
|
|
191
|
+
/**
|
|
192
|
+
* GA 3.0: this ceremony will write a Secured Account binding.
|
|
193
|
+
*/
|
|
194
|
+
notarize?: boolean | undefined;
|
|
195
|
+
/**
|
|
196
|
+
* GA 3.0: present when notarize was requested but could not be applied. notarize_not_enabled = the gate's Console switch is off; the switch is the authority and the request field cannot turn the offer on.
|
|
197
|
+
*/
|
|
198
|
+
notarizeFallbackReason?:
|
|
199
|
+
| SDKCreateVerificationLinkNotarizeFallbackReason
|
|
200
|
+
| undefined;
|
|
201
|
+
/**
|
|
202
|
+
* The gate (canonical since 3.0).
|
|
203
|
+
*/
|
|
204
|
+
gate?: string | undefined;
|
|
124
205
|
};
|
|
125
206
|
|
|
126
207
|
export type SDKCreateVerificationLinkData = {
|
|
127
208
|
data?: SDKCreateVerificationLinkDataData | undefined;
|
|
128
209
|
/**
|
|
129
|
-
* Handler error. Arrives inside data.error with HTTP 200
|
|
210
|
+
* Handler error. Arrives inside `data.error` with HTTP 200. Check for it before reading the result.
|
|
130
211
|
*/
|
|
131
212
|
error?: models.ErrorBody | undefined;
|
|
132
213
|
};
|
|
@@ -221,6 +302,8 @@ export const SDKCreateVerificationLinkRequest$inboundSchema: z.ZodType<
|
|
|
221
302
|
link_on_verify: types.boolean().default(true),
|
|
222
303
|
parent_request_id: types.optional(types.string()),
|
|
223
304
|
metadata: types.optional(z.record(z.any())),
|
|
305
|
+
notarize: types.optional(types.boolean()),
|
|
306
|
+
gate: types.optional(types.string()),
|
|
224
307
|
}).transform((v) => {
|
|
225
308
|
return remap$(v, {
|
|
226
309
|
"user_email": "userEmail",
|
|
@@ -246,6 +329,8 @@ export type SDKCreateVerificationLinkRequest$Outbound = {
|
|
|
246
329
|
link_on_verify: boolean;
|
|
247
330
|
parent_request_id?: string | undefined;
|
|
248
331
|
metadata?: { [k: string]: any } | undefined;
|
|
332
|
+
notarize?: boolean | undefined;
|
|
333
|
+
gate?: string | undefined;
|
|
249
334
|
};
|
|
250
335
|
|
|
251
336
|
/** @internal */
|
|
@@ -265,6 +350,8 @@ export const SDKCreateVerificationLinkRequest$outboundSchema: z.ZodType<
|
|
|
265
350
|
linkOnVerify: z.boolean().default(true),
|
|
266
351
|
parentRequestId: z.string().optional(),
|
|
267
352
|
metadata: z.record(z.any()).optional(),
|
|
353
|
+
notarize: z.boolean().optional(),
|
|
354
|
+
gate: z.string().optional(),
|
|
268
355
|
}).transform((v) => {
|
|
269
356
|
return remap$(v, {
|
|
270
357
|
userEmail: "user_email",
|
|
@@ -365,6 +452,47 @@ export function sdkCreateVerificationLinkOrganizationFromJSON(
|
|
|
365
452
|
);
|
|
366
453
|
}
|
|
367
454
|
|
|
455
|
+
/** @internal */
|
|
456
|
+
export const GateType$inboundSchema: z.ZodType<
|
|
457
|
+
GateType,
|
|
458
|
+
z.ZodTypeDef,
|
|
459
|
+
unknown
|
|
460
|
+
> = openEnums.inboundSchema(GateType);
|
|
461
|
+
/** @internal */
|
|
462
|
+
export const GateType$outboundSchema: z.ZodType<
|
|
463
|
+
string,
|
|
464
|
+
z.ZodTypeDef,
|
|
465
|
+
GateType
|
|
466
|
+
> = openEnums.outboundSchema(GateType);
|
|
467
|
+
|
|
468
|
+
/** @internal */
|
|
469
|
+
export const AgeThreshold$inboundSchema: z.ZodType<
|
|
470
|
+
AgeThreshold,
|
|
471
|
+
z.ZodTypeDef,
|
|
472
|
+
unknown
|
|
473
|
+
> = openEnums.inboundSchemaInt(AgeThreshold);
|
|
474
|
+
/** @internal */
|
|
475
|
+
export const AgeThreshold$outboundSchema: z.ZodType<
|
|
476
|
+
number,
|
|
477
|
+
z.ZodTypeDef,
|
|
478
|
+
AgeThreshold
|
|
479
|
+
> = openEnums.outboundSchemaInt(AgeThreshold);
|
|
480
|
+
|
|
481
|
+
/** @internal */
|
|
482
|
+
export const SDKCreateVerificationLinkNotarizeFallbackReason$inboundSchema:
|
|
483
|
+
z.ZodType<
|
|
484
|
+
SDKCreateVerificationLinkNotarizeFallbackReason,
|
|
485
|
+
z.ZodTypeDef,
|
|
486
|
+
unknown
|
|
487
|
+
> = openEnums.inboundSchema(SDKCreateVerificationLinkNotarizeFallbackReason);
|
|
488
|
+
/** @internal */
|
|
489
|
+
export const SDKCreateVerificationLinkNotarizeFallbackReason$outboundSchema:
|
|
490
|
+
z.ZodType<
|
|
491
|
+
string,
|
|
492
|
+
z.ZodTypeDef,
|
|
493
|
+
SDKCreateVerificationLinkNotarizeFallbackReason
|
|
494
|
+
> = openEnums.outboundSchema(SDKCreateVerificationLinkNotarizeFallbackReason);
|
|
495
|
+
|
|
368
496
|
/** @internal */
|
|
369
497
|
export const SDKCreateVerificationLinkDataData$inboundSchema: z.ZodType<
|
|
370
498
|
SDKCreateVerificationLinkDataData,
|
|
@@ -385,6 +513,14 @@ export const SDKCreateVerificationLinkDataData$inboundSchema: z.ZodType<
|
|
|
385
513
|
z.lazy(() => SDKCreateVerificationLinkOrganization$inboundSchema),
|
|
386
514
|
),
|
|
387
515
|
pushed_to_devices: types.number(),
|
|
516
|
+
gate_type: types.optional(GateType$inboundSchema),
|
|
517
|
+
age_threshold: types.optional(AgeThreshold$inboundSchema),
|
|
518
|
+
trusted: types.optional(types.boolean()),
|
|
519
|
+
notarize: types.optional(types.boolean()),
|
|
520
|
+
notarize_fallback_reason: types.optional(
|
|
521
|
+
SDKCreateVerificationLinkNotarizeFallbackReason$inboundSchema,
|
|
522
|
+
),
|
|
523
|
+
gate: types.optional(types.string()),
|
|
388
524
|
}).transform((v) => {
|
|
389
525
|
return remap$(v, {
|
|
390
526
|
"request_id": "requestId",
|
|
@@ -395,6 +531,9 @@ export const SDKCreateVerificationLinkDataData$inboundSchema: z.ZodType<
|
|
|
395
531
|
"sdk_type": "sdkType",
|
|
396
532
|
"auth_mode": "authMode",
|
|
397
533
|
"pushed_to_devices": "pushedToDevices",
|
|
534
|
+
"gate_type": "gateType",
|
|
535
|
+
"age_threshold": "ageThreshold",
|
|
536
|
+
"notarize_fallback_reason": "notarizeFallbackReason",
|
|
398
537
|
});
|
|
399
538
|
});
|
|
400
539
|
/** @internal */
|
|
@@ -409,6 +548,12 @@ export type SDKCreateVerificationLinkDataData$Outbound = {
|
|
|
409
548
|
scope?: string | undefined;
|
|
410
549
|
organization?: SDKCreateVerificationLinkOrganization$Outbound | undefined;
|
|
411
550
|
pushed_to_devices: number;
|
|
551
|
+
gate_type?: string | undefined;
|
|
552
|
+
age_threshold?: number | undefined;
|
|
553
|
+
trusted?: boolean | undefined;
|
|
554
|
+
notarize?: boolean | undefined;
|
|
555
|
+
notarize_fallback_reason?: string | undefined;
|
|
556
|
+
gate?: string | undefined;
|
|
412
557
|
};
|
|
413
558
|
|
|
414
559
|
/** @internal */
|
|
@@ -429,6 +574,13 @@ export const SDKCreateVerificationLinkDataData$outboundSchema: z.ZodType<
|
|
|
429
574
|
SDKCreateVerificationLinkOrganization$outboundSchema
|
|
430
575
|
).optional(),
|
|
431
576
|
pushedToDevices: z.number().int(),
|
|
577
|
+
gateType: GateType$outboundSchema.optional(),
|
|
578
|
+
ageThreshold: AgeThreshold$outboundSchema.optional(),
|
|
579
|
+
trusted: z.boolean().optional(),
|
|
580
|
+
notarize: z.boolean().optional(),
|
|
581
|
+
notarizeFallbackReason:
|
|
582
|
+
SDKCreateVerificationLinkNotarizeFallbackReason$outboundSchema.optional(),
|
|
583
|
+
gate: z.string().optional(),
|
|
432
584
|
}).transform((v) => {
|
|
433
585
|
return remap$(v, {
|
|
434
586
|
requestId: "request_id",
|
|
@@ -439,6 +591,9 @@ export const SDKCreateVerificationLinkDataData$outboundSchema: z.ZodType<
|
|
|
439
591
|
sdkType: "sdk_type",
|
|
440
592
|
authMode: "auth_mode",
|
|
441
593
|
pushedToDevices: "pushed_to_devices",
|
|
594
|
+
gateType: "gate_type",
|
|
595
|
+
ageThreshold: "age_threshold",
|
|
596
|
+
notarizeFallbackReason: "notarize_fallback_reason",
|
|
442
597
|
});
|
|
443
598
|
});
|
|
444
599
|
|
|
@@ -27,7 +27,7 @@ export type SDKLogoutData = {
|
|
|
27
27
|
tokenFound?: boolean | undefined;
|
|
28
28
|
revokedAt?: Date | undefined;
|
|
29
29
|
/**
|
|
30
|
-
* Handler error. Arrives inside data.error with HTTP 200
|
|
30
|
+
* Handler error. Arrives inside `data.error` with HTTP 200. Check for it before reading the result.
|
|
31
31
|
*/
|
|
32
32
|
error?: models.ErrorBody | undefined;
|
|
33
33
|
};
|
|
@@ -14,11 +14,16 @@ export type SDKRevokeVerificationSecurity = {
|
|
|
14
14
|
apiKeyAuth: string;
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* One of `gate` (canonical) or `scope` (deprecated alias) is required.
|
|
19
|
+
*/
|
|
17
20
|
export type SDKRevokeVerificationRequest = {
|
|
18
21
|
/**
|
|
19
|
-
* The gate's action name.
|
|
22
|
+
* The gate's action name. **Deprecated (alias window, sunset 2027-01-15):** use `gate`. Accepted through the window; responses carry both. https://docs.botshield.ai/changelog/alias-window
|
|
23
|
+
*
|
|
24
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
20
25
|
*/
|
|
21
|
-
scope
|
|
26
|
+
scope?: string | undefined;
|
|
22
27
|
/**
|
|
23
28
|
* **Deprecated.** Use `partner_user_id` to identify whose verification to revoke.
|
|
24
29
|
*
|
|
@@ -29,6 +34,10 @@ export type SDKRevokeVerificationRequest = {
|
|
|
29
34
|
*/
|
|
30
35
|
userEmail?: string | undefined;
|
|
31
36
|
partnerUserId?: string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* The gate's action name.
|
|
39
|
+
*/
|
|
40
|
+
gate?: string | undefined;
|
|
32
41
|
};
|
|
33
42
|
|
|
34
43
|
export type SDKRevokeVerificationDataData = {
|
|
@@ -40,7 +49,7 @@ export type SDKRevokeVerificationDataData = {
|
|
|
40
49
|
export type SDKRevokeVerificationData = {
|
|
41
50
|
data?: SDKRevokeVerificationDataData | undefined;
|
|
42
51
|
/**
|
|
43
|
-
* Handler error. Arrives inside data.error with HTTP 200
|
|
52
|
+
* Handler error. Arrives inside `data.error` with HTTP 200. Check for it before reading the result.
|
|
44
53
|
*/
|
|
45
54
|
error?: models.ErrorBody | undefined;
|
|
46
55
|
};
|
|
@@ -107,9 +116,10 @@ export const SDKRevokeVerificationRequest$inboundSchema: z.ZodType<
|
|
|
107
116
|
z.ZodTypeDef,
|
|
108
117
|
unknown
|
|
109
118
|
> = z.object({
|
|
110
|
-
scope: types.string(),
|
|
119
|
+
scope: types.optional(types.string()),
|
|
111
120
|
user_email: types.optional(types.string()),
|
|
112
121
|
partner_user_id: types.optional(types.string()),
|
|
122
|
+
gate: types.optional(types.string()),
|
|
113
123
|
}).transform((v) => {
|
|
114
124
|
return remap$(v, {
|
|
115
125
|
"user_email": "userEmail",
|
|
@@ -118,9 +128,10 @@ export const SDKRevokeVerificationRequest$inboundSchema: z.ZodType<
|
|
|
118
128
|
});
|
|
119
129
|
/** @internal */
|
|
120
130
|
export type SDKRevokeVerificationRequest$Outbound = {
|
|
121
|
-
scope
|
|
131
|
+
scope?: string | undefined;
|
|
122
132
|
user_email?: string | undefined;
|
|
123
133
|
partner_user_id?: string | undefined;
|
|
134
|
+
gate?: string | undefined;
|
|
124
135
|
};
|
|
125
136
|
|
|
126
137
|
/** @internal */
|
|
@@ -129,9 +140,10 @@ export const SDKRevokeVerificationRequest$outboundSchema: z.ZodType<
|
|
|
129
140
|
z.ZodTypeDef,
|
|
130
141
|
SDKRevokeVerificationRequest
|
|
131
142
|
> = z.object({
|
|
132
|
-
scope: z.string(),
|
|
143
|
+
scope: z.string().optional(),
|
|
133
144
|
userEmail: z.string().optional(),
|
|
134
145
|
partnerUserId: z.string().optional(),
|
|
146
|
+
gate: z.string().optional(),
|
|
135
147
|
}).transform((v) => {
|
|
136
148
|
return remap$(v, {
|
|
137
149
|
userEmail: "user_email",
|
|
@@ -36,7 +36,7 @@ export type SDKStoreSignalDataData = {
|
|
|
36
36
|
export type SDKStoreSignalData = {
|
|
37
37
|
data?: SDKStoreSignalDataData | undefined;
|
|
38
38
|
/**
|
|
39
|
-
* Handler error. Arrives inside data.error with HTTP 200
|
|
39
|
+
* Handler error. Arrives inside `data.error` with HTTP 200. Check for it before reading the result.
|
|
40
40
|
*/
|
|
41
41
|
error?: models.ErrorBody | undefined;
|
|
42
42
|
};
|
|
@@ -20,7 +20,7 @@ export type SDKValidateSignalRequest = {
|
|
|
20
20
|
/**
|
|
21
21
|
* Present when valid is false.
|
|
22
22
|
*/
|
|
23
|
-
export const
|
|
23
|
+
export const SDKValidateSignalReason = {
|
|
24
24
|
InvalidSignalToken: "invalid_signal_token",
|
|
25
25
|
SignalTokenExpired: "signal_token_expired",
|
|
26
26
|
SignalTokenAlreadyUsed: "signal_token_already_used",
|
|
@@ -28,14 +28,14 @@ export const Reason = {
|
|
|
28
28
|
/**
|
|
29
29
|
* Present when valid is false.
|
|
30
30
|
*/
|
|
31
|
-
export type
|
|
31
|
+
export type SDKValidateSignalReason = OpenEnum<typeof SDKValidateSignalReason>;
|
|
32
32
|
|
|
33
33
|
export type SDKValidateSignalDataData = {
|
|
34
34
|
valid: boolean;
|
|
35
35
|
/**
|
|
36
36
|
* Present when valid is false.
|
|
37
37
|
*/
|
|
38
|
-
reason?:
|
|
38
|
+
reason?: SDKValidateSignalReason | undefined;
|
|
39
39
|
score?: number | undefined;
|
|
40
40
|
edgeScore?: number | undefined;
|
|
41
41
|
clientScore?: number | undefined;
|
|
@@ -47,7 +47,7 @@ export type SDKValidateSignalDataData = {
|
|
|
47
47
|
export type SDKValidateSignalData = {
|
|
48
48
|
data?: SDKValidateSignalDataData | undefined;
|
|
49
49
|
/**
|
|
50
|
-
* Handler error. Arrives inside data.error with HTTP 200
|
|
50
|
+
* Handler error. Arrives inside `data.error` with HTTP 200. Check for it before reading the result.
|
|
51
51
|
*/
|
|
52
52
|
error?: models.ErrorBody | undefined;
|
|
53
53
|
};
|
|
@@ -112,11 +112,17 @@ export function sdkValidateSignalRequestFromJSON(
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
/** @internal */
|
|
115
|
-
export const
|
|
116
|
-
|
|
115
|
+
export const SDKValidateSignalReason$inboundSchema: z.ZodType<
|
|
116
|
+
SDKValidateSignalReason,
|
|
117
|
+
z.ZodTypeDef,
|
|
118
|
+
unknown
|
|
119
|
+
> = openEnums.inboundSchema(SDKValidateSignalReason);
|
|
117
120
|
/** @internal */
|
|
118
|
-
export const
|
|
119
|
-
|
|
121
|
+
export const SDKValidateSignalReason$outboundSchema: z.ZodType<
|
|
122
|
+
string,
|
|
123
|
+
z.ZodTypeDef,
|
|
124
|
+
SDKValidateSignalReason
|
|
125
|
+
> = openEnums.outboundSchema(SDKValidateSignalReason);
|
|
120
126
|
|
|
121
127
|
/** @internal */
|
|
122
128
|
export const SDKValidateSignalDataData$inboundSchema: z.ZodType<
|
|
@@ -125,7 +131,7 @@ export const SDKValidateSignalDataData$inboundSchema: z.ZodType<
|
|
|
125
131
|
unknown
|
|
126
132
|
> = z.object({
|
|
127
133
|
valid: types.boolean(),
|
|
128
|
-
reason: types.optional(
|
|
134
|
+
reason: types.optional(SDKValidateSignalReason$inboundSchema),
|
|
129
135
|
score: types.optional(types.number()),
|
|
130
136
|
edge_score: types.optional(types.number()),
|
|
131
137
|
client_score: types.optional(types.number()),
|
|
@@ -159,7 +165,7 @@ export const SDKValidateSignalDataData$outboundSchema: z.ZodType<
|
|
|
159
165
|
SDKValidateSignalDataData
|
|
160
166
|
> = z.object({
|
|
161
167
|
valid: z.boolean(),
|
|
162
|
-
reason:
|
|
168
|
+
reason: SDKValidateSignalReason$outboundSchema.optional(),
|
|
163
169
|
score: z.number().int().optional(),
|
|
164
170
|
edgeScore: z.number().int().optional(),
|
|
165
171
|
clientScore: z.number().int().optional(),
|