botshield-sdk 2.0.2 → 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/README.md +10 -43
- package/bin/mcp-server.js +263 -500
- 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 +1 -67
- package/dist/commonjs/funcs/census-verify-token.js.map +1 -1
- package/dist/commonjs/funcs/verification-get-status.js +0 -66
- 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 +0 -77
- 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 +0 -88
- package/dist/commonjs/mcp-server/cli/start/command.js.map +1 -1
- package/dist/commonjs/mcp-server/cli/start/impl.d.ts +0 -11
- package/dist/commonjs/mcp-server/cli/start/impl.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/cli/start/impl.js +0 -22
- 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.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools/actions-cancel-action.js +1 -17
- package/dist/commonjs/mcp-server/tools/actions-cancel-action.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/actions-check-action-status.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools/actions-check-action-status.js +1 -17
- package/dist/commonjs/mcp-server/tools/actions-check-action-status.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/actions-propose-action.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools/actions-propose-action.js +1 -17
- 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 +78 -23
- package/dist/commonjs/models/operations/sdk-verify-token.d.ts.map +1 -1
- package/dist/commonjs/models/operations/sdk-verify-token.js +51 -23
- package/dist/commonjs/models/operations/sdk-verify-token.js.map +1 -1
- package/dist/commonjs/models/operations/verification-get-status.d.ts +47 -26
- package/dist/commonjs/models/operations/verification-get-status.d.ts.map +1 -1
- package/dist/commonjs/models/operations/verification-get-status.js +30 -24
- package/dist/commonjs/models/operations/verification-get-status.js.map +1 -1
- package/dist/commonjs/models/security.d.ts +0 -22
- package/dist/commonjs/models/security.d.ts.map +1 -1
- package/dist/commonjs/models/security.js +0 -22
- 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 +1 -67
- package/dist/esm/funcs/census-verify-token.js.map +1 -1
- package/dist/esm/funcs/verification-get-status.js +0 -66
- 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 +0 -77
- 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 +0 -88
- package/dist/esm/mcp-server/cli/start/command.js.map +1 -1
- package/dist/esm/mcp-server/cli/start/impl.d.ts +0 -11
- package/dist/esm/mcp-server/cli/start/impl.d.ts.map +1 -1
- package/dist/esm/mcp-server/cli/start/impl.js +0 -22
- 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.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools/actions-cancel-action.js +1 -17
- package/dist/esm/mcp-server/tools/actions-cancel-action.js.map +1 -1
- package/dist/esm/mcp-server/tools/actions-check-action-status.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools/actions-check-action-status.js +1 -17
- package/dist/esm/mcp-server/tools/actions-check-action-status.js.map +1 -1
- package/dist/esm/mcp-server/tools/actions-propose-action.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools/actions-propose-action.js +1 -17
- 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 +78 -23
- package/dist/esm/models/operations/sdk-verify-token.d.ts.map +1 -1
- package/dist/esm/models/operations/sdk-verify-token.js +50 -22
- package/dist/esm/models/operations/sdk-verify-token.js.map +1 -1
- package/dist/esm/models/operations/verification-get-status.d.ts +47 -26
- package/dist/esm/models/operations/verification-get-status.d.ts.map +1 -1
- package/dist/esm/models/operations/verification-get-status.js +29 -23
- package/dist/esm/models/operations/verification-get-status.js.map +1 -1
- package/dist/esm/models/security.d.ts +0 -22
- package/dist/esm/models/security.d.ts.map +1 -1
- package/dist/esm/models/security.js +0 -22
- 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 +1 -1
- package/src/funcs/census-verify-token.ts +1 -78
- package/src/funcs/verification-get-status.ts +0 -77
- package/src/lib/config.ts +2 -2
- package/src/lib/security.ts +0 -77
- package/src/mcp-server/cli/start/command.ts +0 -88
- package/src/mcp-server/cli/start/impl.ts +0 -33
- 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 -17
- package/src/mcp-server/tools/actions-check-action-status.ts +1 -17
- package/src/mcp-server/tools/actions-propose-action.ts +1 -17
- 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 +119 -45
- package/src/models/operations/verification-get-status.ts +73 -48
- package/src/models/security.ts +0 -44
- 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 -210
- package/dist/commonjs/funcs/census-get-partner-config.js.map +0 -1
- package/dist/commonjs/models/operations/sdk-get-partner-config.d.ts +0 -152
- 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 -205
- 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 -174
- package/dist/esm/funcs/census-get-partner-config.js.map +0 -1
- package/dist/esm/models/operations/sdk-get-partner-config.d.ts +0 -152
- 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 -157
- package/dist/esm/models/operations/sdk-get-partner-config.js.map +0 -1
- package/src/funcs/census-get-partner-config.ts +0 -287
- package/src/models/operations/sdk-get-partner-config.ts +0 -397
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import * as openEnums from "../../types/enums.js";
|
|
9
|
+
import { OpenEnum } from "../../types/enums.js";
|
|
8
10
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
11
|
import * as types from "../../types/primitives.js";
|
|
10
12
|
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
@@ -15,17 +17,6 @@ export type SDKVerifyTokenSecurity = {
|
|
|
15
17
|
apiKeyAuth1?: string | undefined;
|
|
16
18
|
apiKeyAuth2?: string | undefined;
|
|
17
19
|
apiKeyAuth3?: string | undefined;
|
|
18
|
-
apiKeyAuth4?: string | undefined;
|
|
19
|
-
apiKeyAuth5?: string | undefined;
|
|
20
|
-
apiKeyAuth6?: string | undefined;
|
|
21
|
-
apiKeyAuth7?: string | undefined;
|
|
22
|
-
apiKeyAuth8?: string | undefined;
|
|
23
|
-
apiKeyAuth9?: string | undefined;
|
|
24
|
-
apiKeyAuth10?: string | undefined;
|
|
25
|
-
apiKeyAuth11?: string | undefined;
|
|
26
|
-
apiKeyAuth12?: string | undefined;
|
|
27
|
-
apiKeyAuth13?: string | undefined;
|
|
28
|
-
apiKeyAuth14?: string | undefined;
|
|
29
20
|
};
|
|
30
21
|
|
|
31
22
|
export type SDKVerifyTokenRequest = {
|
|
@@ -33,8 +24,25 @@ export type SDKVerifyTokenRequest = {
|
|
|
33
24
|
* JWT verification receipt
|
|
34
25
|
*/
|
|
35
26
|
token: string;
|
|
27
|
+
/**
|
|
28
|
+
* Your organization id (the organization_id shown in Console settings). When given, a token issued for any other organization is rejected.
|
|
29
|
+
*/
|
|
30
|
+
audience?: string | undefined;
|
|
36
31
|
};
|
|
37
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Age Gate only, positive-only.
|
|
35
|
+
*/
|
|
36
|
+
export const AgeOver = {
|
|
37
|
+
Thirteen: 13,
|
|
38
|
+
Eighteen: 18,
|
|
39
|
+
TwentyOne: 21,
|
|
40
|
+
} as const;
|
|
41
|
+
/**
|
|
42
|
+
* Age Gate only, positive-only.
|
|
43
|
+
*/
|
|
44
|
+
export type AgeOver = OpenEnum<typeof AgeOver>;
|
|
45
|
+
|
|
38
46
|
export type Claims = {
|
|
39
47
|
requestId?: string | undefined;
|
|
40
48
|
verified?: boolean | undefined;
|
|
@@ -43,8 +51,40 @@ export type Claims = {
|
|
|
43
51
|
nonce?: string | undefined;
|
|
44
52
|
issuedAt?: number | undefined;
|
|
45
53
|
expiresAt?: number | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Age Gate only, positive-only.
|
|
56
|
+
*/
|
|
57
|
+
ageOver?: AgeOver | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* GA 3.0 Secured Accounts: an active binding exists for (your platform, platform-user-ref). Always present; false on a plain Verify Human and on tokens minted before GA 3.0.
|
|
60
|
+
*/
|
|
61
|
+
trusted?: boolean | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* GA 3.0: present only when trusted. Equals the binding's linked_at.
|
|
64
|
+
*/
|
|
65
|
+
trustedSince?: Date | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* GA 3.0: present only when trusted. The pass that minted this token.
|
|
68
|
+
*/
|
|
69
|
+
lastPassAt?: Date | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* The organization the token was issued for (the JWT aud claim).
|
|
72
|
+
*/
|
|
73
|
+
audience?: string | null | undefined;
|
|
46
74
|
};
|
|
47
75
|
|
|
76
|
+
/**
|
|
77
|
+
* Present when `valid` is true. `pass` when the token records a verified human.
|
|
78
|
+
*/
|
|
79
|
+
export const SDKVerifyTokenVerdict = {
|
|
80
|
+
Pass: "pass",
|
|
81
|
+
Unavailable: "unavailable",
|
|
82
|
+
} as const;
|
|
83
|
+
/**
|
|
84
|
+
* Present when `valid` is true. `pass` when the token records a verified human.
|
|
85
|
+
*/
|
|
86
|
+
export type SDKVerifyTokenVerdict = OpenEnum<typeof SDKVerifyTokenVerdict>;
|
|
87
|
+
|
|
48
88
|
export type SDKVerifyTokenDataData = {
|
|
49
89
|
valid: boolean;
|
|
50
90
|
/**
|
|
@@ -56,12 +96,24 @@ export type SDKVerifyTokenDataData = {
|
|
|
56
96
|
*/
|
|
57
97
|
expiredAt?: Date | null | undefined;
|
|
58
98
|
claims?: Claims | null | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* true when this token was already checked once. From 2026-11-15 a second check returns valid: false (single use).
|
|
101
|
+
*/
|
|
102
|
+
replayed?: boolean | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* When repeat checks start failing (present when replayed is true).
|
|
105
|
+
*/
|
|
106
|
+
strictSingleUseFrom?: Date | undefined;
|
|
107
|
+
/**
|
|
108
|
+
* Present when `valid` is true. `pass` when the token records a verified human.
|
|
109
|
+
*/
|
|
110
|
+
verdict?: SDKVerifyTokenVerdict | undefined;
|
|
59
111
|
};
|
|
60
112
|
|
|
61
113
|
export type SDKVerifyTokenData = {
|
|
62
114
|
data?: SDKVerifyTokenDataData | undefined;
|
|
63
115
|
/**
|
|
64
|
-
* Handler error. Arrives inside data.error with HTTP 200
|
|
116
|
+
* Handler error. Arrives inside `data.error` with HTTP 200. Check for it before reading the result.
|
|
65
117
|
*/
|
|
66
118
|
error?: models.ErrorBody | undefined;
|
|
67
119
|
};
|
|
@@ -83,17 +135,6 @@ export const SDKVerifyTokenSecurity$inboundSchema: z.ZodType<
|
|
|
83
135
|
apiKeyAuth1: types.optional(types.string()),
|
|
84
136
|
apiKeyAuth2: types.optional(types.string()),
|
|
85
137
|
apiKeyAuth3: types.optional(types.string()),
|
|
86
|
-
apiKeyAuth4: types.optional(types.string()),
|
|
87
|
-
apiKeyAuth5: types.optional(types.string()),
|
|
88
|
-
apiKeyAuth6: types.optional(types.string()),
|
|
89
|
-
apiKeyAuth7: types.optional(types.string()),
|
|
90
|
-
apiKeyAuth8: types.optional(types.string()),
|
|
91
|
-
apiKeyAuth9: types.optional(types.string()),
|
|
92
|
-
apiKeyAuth10: types.optional(types.string()),
|
|
93
|
-
apiKeyAuth11: types.optional(types.string()),
|
|
94
|
-
apiKeyAuth12: types.optional(types.string()),
|
|
95
|
-
apiKeyAuth13: types.optional(types.string()),
|
|
96
|
-
apiKeyAuth14: types.optional(types.string()),
|
|
97
138
|
});
|
|
98
139
|
/** @internal */
|
|
99
140
|
export type SDKVerifyTokenSecurity$Outbound = {
|
|
@@ -101,17 +142,6 @@ export type SDKVerifyTokenSecurity$Outbound = {
|
|
|
101
142
|
apiKeyAuth1?: string | undefined;
|
|
102
143
|
apiKeyAuth2?: string | undefined;
|
|
103
144
|
apiKeyAuth3?: string | undefined;
|
|
104
|
-
apiKeyAuth4?: string | undefined;
|
|
105
|
-
apiKeyAuth5?: string | undefined;
|
|
106
|
-
apiKeyAuth6?: string | undefined;
|
|
107
|
-
apiKeyAuth7?: string | undefined;
|
|
108
|
-
apiKeyAuth8?: string | undefined;
|
|
109
|
-
apiKeyAuth9?: string | undefined;
|
|
110
|
-
apiKeyAuth10?: string | undefined;
|
|
111
|
-
apiKeyAuth11?: string | undefined;
|
|
112
|
-
apiKeyAuth12?: string | undefined;
|
|
113
|
-
apiKeyAuth13?: string | undefined;
|
|
114
|
-
apiKeyAuth14?: string | undefined;
|
|
115
145
|
};
|
|
116
146
|
|
|
117
147
|
/** @internal */
|
|
@@ -124,17 +154,6 @@ export const SDKVerifyTokenSecurity$outboundSchema: z.ZodType<
|
|
|
124
154
|
apiKeyAuth1: z.string().optional(),
|
|
125
155
|
apiKeyAuth2: z.string().optional(),
|
|
126
156
|
apiKeyAuth3: z.string().optional(),
|
|
127
|
-
apiKeyAuth4: z.string().optional(),
|
|
128
|
-
apiKeyAuth5: z.string().optional(),
|
|
129
|
-
apiKeyAuth6: z.string().optional(),
|
|
130
|
-
apiKeyAuth7: z.string().optional(),
|
|
131
|
-
apiKeyAuth8: z.string().optional(),
|
|
132
|
-
apiKeyAuth9: z.string().optional(),
|
|
133
|
-
apiKeyAuth10: z.string().optional(),
|
|
134
|
-
apiKeyAuth11: z.string().optional(),
|
|
135
|
-
apiKeyAuth12: z.string().optional(),
|
|
136
|
-
apiKeyAuth13: z.string().optional(),
|
|
137
|
-
apiKeyAuth14: z.string().optional(),
|
|
138
157
|
});
|
|
139
158
|
|
|
140
159
|
export function sdkVerifyTokenSecurityToJSON(
|
|
@@ -161,10 +180,12 @@ export const SDKVerifyTokenRequest$inboundSchema: z.ZodType<
|
|
|
161
180
|
unknown
|
|
162
181
|
> = z.object({
|
|
163
182
|
token: types.string(),
|
|
183
|
+
audience: types.optional(types.string()),
|
|
164
184
|
});
|
|
165
185
|
/** @internal */
|
|
166
186
|
export type SDKVerifyTokenRequest$Outbound = {
|
|
167
187
|
token: string;
|
|
188
|
+
audience?: string | undefined;
|
|
168
189
|
};
|
|
169
190
|
|
|
170
191
|
/** @internal */
|
|
@@ -174,6 +195,7 @@ export const SDKVerifyTokenRequest$outboundSchema: z.ZodType<
|
|
|
174
195
|
SDKVerifyTokenRequest
|
|
175
196
|
> = z.object({
|
|
176
197
|
token: z.string(),
|
|
198
|
+
audience: z.string().optional(),
|
|
177
199
|
});
|
|
178
200
|
|
|
179
201
|
export function sdkVerifyTokenRequestToJSON(
|
|
@@ -193,6 +215,13 @@ export function sdkVerifyTokenRequestFromJSON(
|
|
|
193
215
|
);
|
|
194
216
|
}
|
|
195
217
|
|
|
218
|
+
/** @internal */
|
|
219
|
+
export const AgeOver$inboundSchema: z.ZodType<AgeOver, z.ZodTypeDef, unknown> =
|
|
220
|
+
openEnums.inboundSchemaInt(AgeOver);
|
|
221
|
+
/** @internal */
|
|
222
|
+
export const AgeOver$outboundSchema: z.ZodType<number, z.ZodTypeDef, AgeOver> =
|
|
223
|
+
openEnums.outboundSchemaInt(AgeOver);
|
|
224
|
+
|
|
196
225
|
/** @internal */
|
|
197
226
|
export const Claims$inboundSchema: z.ZodType<Claims, z.ZodTypeDef, unknown> = z
|
|
198
227
|
.object({
|
|
@@ -203,12 +232,20 @@ export const Claims$inboundSchema: z.ZodType<Claims, z.ZodTypeDef, unknown> = z
|
|
|
203
232
|
nonce: types.optional(types.string()),
|
|
204
233
|
issued_at: types.optional(types.number()),
|
|
205
234
|
expires_at: types.optional(types.number()),
|
|
235
|
+
age_over: types.optional(AgeOver$inboundSchema),
|
|
236
|
+
trusted: types.optional(types.boolean()),
|
|
237
|
+
trusted_since: types.optional(types.date()),
|
|
238
|
+
last_pass_at: types.optional(types.date()),
|
|
239
|
+
audience: z.nullable(types.string()).optional(),
|
|
206
240
|
}).transform((v) => {
|
|
207
241
|
return remap$(v, {
|
|
208
242
|
"request_id": "requestId",
|
|
209
243
|
"organization_id": "organizationId",
|
|
210
244
|
"issued_at": "issuedAt",
|
|
211
245
|
"expires_at": "expiresAt",
|
|
246
|
+
"age_over": "ageOver",
|
|
247
|
+
"trusted_since": "trustedSince",
|
|
248
|
+
"last_pass_at": "lastPassAt",
|
|
212
249
|
});
|
|
213
250
|
});
|
|
214
251
|
/** @internal */
|
|
@@ -220,6 +257,11 @@ export type Claims$Outbound = {
|
|
|
220
257
|
nonce?: string | undefined;
|
|
221
258
|
issued_at?: number | undefined;
|
|
222
259
|
expires_at?: number | undefined;
|
|
260
|
+
age_over?: number | undefined;
|
|
261
|
+
trusted?: boolean | undefined;
|
|
262
|
+
trusted_since?: string | undefined;
|
|
263
|
+
last_pass_at?: string | undefined;
|
|
264
|
+
audience?: string | null | undefined;
|
|
223
265
|
};
|
|
224
266
|
|
|
225
267
|
/** @internal */
|
|
@@ -235,12 +277,20 @@ export const Claims$outboundSchema: z.ZodType<
|
|
|
235
277
|
nonce: z.string().optional(),
|
|
236
278
|
issuedAt: z.number().optional(),
|
|
237
279
|
expiresAt: z.number().optional(),
|
|
280
|
+
ageOver: AgeOver$outboundSchema.optional(),
|
|
281
|
+
trusted: z.boolean().optional(),
|
|
282
|
+
trustedSince: z.date().transform(v => v.toISOString()).optional(),
|
|
283
|
+
lastPassAt: z.date().transform(v => v.toISOString()).optional(),
|
|
284
|
+
audience: z.nullable(z.string()).optional(),
|
|
238
285
|
}).transform((v) => {
|
|
239
286
|
return remap$(v, {
|
|
240
287
|
requestId: "request_id",
|
|
241
288
|
organizationId: "organization_id",
|
|
242
289
|
issuedAt: "issued_at",
|
|
243
290
|
expiresAt: "expires_at",
|
|
291
|
+
ageOver: "age_over",
|
|
292
|
+
trustedSince: "trusted_since",
|
|
293
|
+
lastPassAt: "last_pass_at",
|
|
244
294
|
});
|
|
245
295
|
});
|
|
246
296
|
|
|
@@ -257,6 +307,19 @@ export function claimsFromJSON(
|
|
|
257
307
|
);
|
|
258
308
|
}
|
|
259
309
|
|
|
310
|
+
/** @internal */
|
|
311
|
+
export const SDKVerifyTokenVerdict$inboundSchema: z.ZodType<
|
|
312
|
+
SDKVerifyTokenVerdict,
|
|
313
|
+
z.ZodTypeDef,
|
|
314
|
+
unknown
|
|
315
|
+
> = openEnums.inboundSchema(SDKVerifyTokenVerdict);
|
|
316
|
+
/** @internal */
|
|
317
|
+
export const SDKVerifyTokenVerdict$outboundSchema: z.ZodType<
|
|
318
|
+
string,
|
|
319
|
+
z.ZodTypeDef,
|
|
320
|
+
SDKVerifyTokenVerdict
|
|
321
|
+
> = openEnums.outboundSchema(SDKVerifyTokenVerdict);
|
|
322
|
+
|
|
260
323
|
/** @internal */
|
|
261
324
|
export const SDKVerifyTokenDataData$inboundSchema: z.ZodType<
|
|
262
325
|
SDKVerifyTokenDataData,
|
|
@@ -267,9 +330,13 @@ export const SDKVerifyTokenDataData$inboundSchema: z.ZodType<
|
|
|
267
330
|
reason: types.optional(types.string()),
|
|
268
331
|
expired_at: z.nullable(types.date()).optional(),
|
|
269
332
|
claims: z.nullable(z.lazy(() => Claims$inboundSchema)).optional(),
|
|
333
|
+
replayed: types.optional(types.boolean()),
|
|
334
|
+
strict_single_use_from: types.optional(types.date()),
|
|
335
|
+
verdict: types.optional(SDKVerifyTokenVerdict$inboundSchema),
|
|
270
336
|
}).transform((v) => {
|
|
271
337
|
return remap$(v, {
|
|
272
338
|
"expired_at": "expiredAt",
|
|
339
|
+
"strict_single_use_from": "strictSingleUseFrom",
|
|
273
340
|
});
|
|
274
341
|
});
|
|
275
342
|
/** @internal */
|
|
@@ -278,6 +345,9 @@ export type SDKVerifyTokenDataData$Outbound = {
|
|
|
278
345
|
reason?: string | undefined;
|
|
279
346
|
expired_at?: string | null | undefined;
|
|
280
347
|
claims?: Claims$Outbound | null | undefined;
|
|
348
|
+
replayed?: boolean | undefined;
|
|
349
|
+
strict_single_use_from?: string | undefined;
|
|
350
|
+
verdict?: string | undefined;
|
|
281
351
|
};
|
|
282
352
|
|
|
283
353
|
/** @internal */
|
|
@@ -290,9 +360,13 @@ export const SDKVerifyTokenDataData$outboundSchema: z.ZodType<
|
|
|
290
360
|
reason: z.string().optional(),
|
|
291
361
|
expiredAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
292
362
|
claims: z.nullable(z.lazy(() => Claims$outboundSchema)).optional(),
|
|
363
|
+
replayed: z.boolean().optional(),
|
|
364
|
+
strictSingleUseFrom: z.date().transform(v => v.toISOString()).optional(),
|
|
365
|
+
verdict: SDKVerifyTokenVerdict$outboundSchema.optional(),
|
|
293
366
|
}).transform((v) => {
|
|
294
367
|
return remap$(v, {
|
|
295
368
|
expiredAt: "expired_at",
|
|
369
|
+
strictSingleUseFrom: "strict_single_use_from",
|
|
296
370
|
});
|
|
297
371
|
});
|
|
298
372
|
|
|
@@ -17,17 +17,6 @@ export type VerificationGetStatusSecurity = {
|
|
|
17
17
|
apiKeyAuth1?: string | undefined;
|
|
18
18
|
apiKeyAuth2?: string | undefined;
|
|
19
19
|
apiKeyAuth3?: string | undefined;
|
|
20
|
-
apiKeyAuth4?: string | undefined;
|
|
21
|
-
apiKeyAuth5?: string | undefined;
|
|
22
|
-
apiKeyAuth6?: string | undefined;
|
|
23
|
-
apiKeyAuth7?: string | undefined;
|
|
24
|
-
apiKeyAuth8?: string | undefined;
|
|
25
|
-
apiKeyAuth9?: string | undefined;
|
|
26
|
-
apiKeyAuth10?: string | undefined;
|
|
27
|
-
apiKeyAuth11?: string | undefined;
|
|
28
|
-
apiKeyAuth12?: string | undefined;
|
|
29
|
-
apiKeyAuth13?: string | undefined;
|
|
30
|
-
apiKeyAuth14?: string | undefined;
|
|
31
20
|
};
|
|
32
21
|
|
|
33
22
|
export type VerificationGetStatusRequest = {
|
|
@@ -35,7 +24,7 @@ export type VerificationGetStatusRequest = {
|
|
|
35
24
|
};
|
|
36
25
|
|
|
37
26
|
/**
|
|
38
|
-
* `pass` is a
|
|
27
|
+
* `pass` is legacy: a success recorded without a new confirmation on the phone. Gates always ask in 3.3, so new requests end `completed`. A `pass` record expires 60 seconds after the check, after which this endpoint reports `expired`.
|
|
39
28
|
*/
|
|
40
29
|
export const VerificationGetStatusStatus = {
|
|
41
30
|
Pending: "pending",
|
|
@@ -47,7 +36,7 @@ export const VerificationGetStatusStatus = {
|
|
|
47
36
|
Error: "error",
|
|
48
37
|
} as const;
|
|
49
38
|
/**
|
|
50
|
-
* `pass` is a
|
|
39
|
+
* `pass` is legacy: a success recorded without a new confirmation on the phone. Gates always ask in 3.3, so new requests end `completed`. A `pass` record expires 60 seconds after the check, after which this endpoint reports `expired`.
|
|
51
40
|
*/
|
|
52
41
|
export type VerificationGetStatusStatus = OpenEnum<
|
|
53
42
|
typeof VerificationGetStatusStatus
|
|
@@ -72,10 +61,27 @@ export type Metadata = {
|
|
|
72
61
|
parentRequestId?: string | null | undefined;
|
|
73
62
|
};
|
|
74
63
|
|
|
64
|
+
/**
|
|
65
|
+
* Why a request ended `failed`. Null while pending and on success. `already_trusted`: this BotShield ID already secures another account on your platform. `rebind_requires_prior_id`: this account is already secured by another BotShield ID. `pass_limit_reached`: the person has used the passes the gate allows. `real_days_not_met`: the BotShield ID has not yet proved a person on as many days as the gate asks. `unavailable`: the standard Unavailable result.
|
|
66
|
+
*/
|
|
67
|
+
export const VerificationGetStatusReason = {
|
|
68
|
+
AlreadyTrusted: "already_trusted",
|
|
69
|
+
RebindRequiresPriorId: "rebind_requires_prior_id",
|
|
70
|
+
PassLimitReached: "pass_limit_reached",
|
|
71
|
+
RealDaysNotMet: "real_days_not_met",
|
|
72
|
+
Unavailable: "unavailable",
|
|
73
|
+
} as const;
|
|
74
|
+
/**
|
|
75
|
+
* Why a request ended `failed`. Null while pending and on success. `already_trusted`: this BotShield ID already secures another account on your platform. `rebind_requires_prior_id`: this account is already secured by another BotShield ID. `pass_limit_reached`: the person has used the passes the gate allows. `real_days_not_met`: the BotShield ID has not yet proved a person on as many days as the gate asks. `unavailable`: the standard Unavailable result.
|
|
76
|
+
*/
|
|
77
|
+
export type VerificationGetStatusReason = OpenEnum<
|
|
78
|
+
typeof VerificationGetStatusReason
|
|
79
|
+
>;
|
|
80
|
+
|
|
75
81
|
export type VerificationGetStatusData = {
|
|
76
82
|
found?: boolean | undefined;
|
|
77
83
|
/**
|
|
78
|
-
* `pass` is a
|
|
84
|
+
* `pass` is legacy: a success recorded without a new confirmation on the phone. Gates always ask in 3.3, so new requests end `completed`. A `pass` record expires 60 seconds after the check, after which this endpoint reports `expired`.
|
|
79
85
|
*/
|
|
80
86
|
status?: VerificationGetStatusStatus | undefined;
|
|
81
87
|
requestId?: string | undefined;
|
|
@@ -101,9 +107,29 @@ export type VerificationGetStatusData = {
|
|
|
101
107
|
*/
|
|
102
108
|
message?: string | undefined;
|
|
103
109
|
/**
|
|
104
|
-
* Handler error. Arrives inside data.error with HTTP 200
|
|
110
|
+
* Handler error. Arrives inside `data.error` with HTTP 200. Check for it before reading the result.
|
|
105
111
|
*/
|
|
106
112
|
error?: models.ErrorBody | undefined;
|
|
113
|
+
/**
|
|
114
|
+
* Why a request ended `failed`. Null while pending and on success. `already_trusted`: this BotShield ID already secures another account on your platform. `rebind_requires_prior_id`: this account is already secured by another BotShield ID. `pass_limit_reached`: the person has used the passes the gate allows. `real_days_not_met`: the BotShield ID has not yet proved a person on as many days as the gate asks. `unavailable`: the standard Unavailable result.
|
|
115
|
+
*/
|
|
116
|
+
reason?: VerificationGetStatusReason | null | undefined;
|
|
117
|
+
/**
|
|
118
|
+
* GA 3.0: on a completed ceremony, whether an active Secured Account binding exists for (your platform, platform-user-ref). Null until completed.
|
|
119
|
+
*/
|
|
120
|
+
trusted?: boolean | null | undefined;
|
|
121
|
+
/**
|
|
122
|
+
* GA 3.0: on a completed ceremony, whether THIS ceremony created the binding. Null until completed.
|
|
123
|
+
*/
|
|
124
|
+
firstTime?: boolean | null | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* GA 3.0: this request was minted as a notarize ceremony.
|
|
127
|
+
*/
|
|
128
|
+
notarize?: boolean | undefined;
|
|
129
|
+
/**
|
|
130
|
+
* Your organization's public display name, as the BotShield app shows it to the person.
|
|
131
|
+
*/
|
|
132
|
+
organizationName?: string | null | undefined;
|
|
107
133
|
};
|
|
108
134
|
|
|
109
135
|
/**
|
|
@@ -123,17 +149,6 @@ export const VerificationGetStatusSecurity$inboundSchema: z.ZodType<
|
|
|
123
149
|
apiKeyAuth1: types.optional(types.string()),
|
|
124
150
|
apiKeyAuth2: types.optional(types.string()),
|
|
125
151
|
apiKeyAuth3: types.optional(types.string()),
|
|
126
|
-
apiKeyAuth4: types.optional(types.string()),
|
|
127
|
-
apiKeyAuth5: types.optional(types.string()),
|
|
128
|
-
apiKeyAuth6: types.optional(types.string()),
|
|
129
|
-
apiKeyAuth7: types.optional(types.string()),
|
|
130
|
-
apiKeyAuth8: types.optional(types.string()),
|
|
131
|
-
apiKeyAuth9: types.optional(types.string()),
|
|
132
|
-
apiKeyAuth10: types.optional(types.string()),
|
|
133
|
-
apiKeyAuth11: types.optional(types.string()),
|
|
134
|
-
apiKeyAuth12: types.optional(types.string()),
|
|
135
|
-
apiKeyAuth13: types.optional(types.string()),
|
|
136
|
-
apiKeyAuth14: types.optional(types.string()),
|
|
137
152
|
});
|
|
138
153
|
/** @internal */
|
|
139
154
|
export type VerificationGetStatusSecurity$Outbound = {
|
|
@@ -141,17 +156,6 @@ export type VerificationGetStatusSecurity$Outbound = {
|
|
|
141
156
|
apiKeyAuth1?: string | undefined;
|
|
142
157
|
apiKeyAuth2?: string | undefined;
|
|
143
158
|
apiKeyAuth3?: string | undefined;
|
|
144
|
-
apiKeyAuth4?: string | undefined;
|
|
145
|
-
apiKeyAuth5?: string | undefined;
|
|
146
|
-
apiKeyAuth6?: string | undefined;
|
|
147
|
-
apiKeyAuth7?: string | undefined;
|
|
148
|
-
apiKeyAuth8?: string | undefined;
|
|
149
|
-
apiKeyAuth9?: string | undefined;
|
|
150
|
-
apiKeyAuth10?: string | undefined;
|
|
151
|
-
apiKeyAuth11?: string | undefined;
|
|
152
|
-
apiKeyAuth12?: string | undefined;
|
|
153
|
-
apiKeyAuth13?: string | undefined;
|
|
154
|
-
apiKeyAuth14?: string | undefined;
|
|
155
159
|
};
|
|
156
160
|
|
|
157
161
|
/** @internal */
|
|
@@ -164,17 +168,6 @@ export const VerificationGetStatusSecurity$outboundSchema: z.ZodType<
|
|
|
164
168
|
apiKeyAuth1: z.string().optional(),
|
|
165
169
|
apiKeyAuth2: z.string().optional(),
|
|
166
170
|
apiKeyAuth3: z.string().optional(),
|
|
167
|
-
apiKeyAuth4: z.string().optional(),
|
|
168
|
-
apiKeyAuth5: z.string().optional(),
|
|
169
|
-
apiKeyAuth6: z.string().optional(),
|
|
170
|
-
apiKeyAuth7: z.string().optional(),
|
|
171
|
-
apiKeyAuth8: z.string().optional(),
|
|
172
|
-
apiKeyAuth9: z.string().optional(),
|
|
173
|
-
apiKeyAuth10: z.string().optional(),
|
|
174
|
-
apiKeyAuth11: z.string().optional(),
|
|
175
|
-
apiKeyAuth12: z.string().optional(),
|
|
176
|
-
apiKeyAuth13: z.string().optional(),
|
|
177
|
-
apiKeyAuth14: z.string().optional(),
|
|
178
171
|
});
|
|
179
172
|
|
|
180
173
|
export function verificationGetStatusSecurityToJSON(
|
|
@@ -330,6 +323,19 @@ export function metadataFromJSON(
|
|
|
330
323
|
);
|
|
331
324
|
}
|
|
332
325
|
|
|
326
|
+
/** @internal */
|
|
327
|
+
export const VerificationGetStatusReason$inboundSchema: z.ZodType<
|
|
328
|
+
VerificationGetStatusReason,
|
|
329
|
+
z.ZodTypeDef,
|
|
330
|
+
unknown
|
|
331
|
+
> = openEnums.inboundSchema(VerificationGetStatusReason);
|
|
332
|
+
/** @internal */
|
|
333
|
+
export const VerificationGetStatusReason$outboundSchema: z.ZodType<
|
|
334
|
+
string,
|
|
335
|
+
z.ZodTypeDef,
|
|
336
|
+
VerificationGetStatusReason
|
|
337
|
+
> = openEnums.outboundSchema(VerificationGetStatusReason);
|
|
338
|
+
|
|
333
339
|
/** @internal */
|
|
334
340
|
export const VerificationGetStatusData$inboundSchema: z.ZodType<
|
|
335
341
|
VerificationGetStatusData,
|
|
@@ -352,6 +358,11 @@ export const VerificationGetStatusData$inboundSchema: z.ZodType<
|
|
|
352
358
|
metadata: z.nullable(z.lazy(() => Metadata$inboundSchema)).optional(),
|
|
353
359
|
message: types.optional(types.string()),
|
|
354
360
|
error: types.optional(models.ErrorBody$inboundSchema),
|
|
361
|
+
reason: z.nullable(VerificationGetStatusReason$inboundSchema).optional(),
|
|
362
|
+
trusted: z.nullable(types.boolean()).optional(),
|
|
363
|
+
first_time: z.nullable(types.boolean()).optional(),
|
|
364
|
+
notarize: types.optional(types.boolean()),
|
|
365
|
+
organization_name: z.nullable(types.string()).optional(),
|
|
355
366
|
}).transform((v) => {
|
|
356
367
|
return remap$(v, {
|
|
357
368
|
"request_id": "requestId",
|
|
@@ -364,6 +375,8 @@ export const VerificationGetStatusData$inboundSchema: z.ZodType<
|
|
|
364
375
|
"error_message": "errorMessage",
|
|
365
376
|
"sdk_type": "sdkType",
|
|
366
377
|
"presence_address": "presenceAddress",
|
|
378
|
+
"first_time": "firstTime",
|
|
379
|
+
"organization_name": "organizationName",
|
|
367
380
|
});
|
|
368
381
|
});
|
|
369
382
|
/** @internal */
|
|
@@ -384,6 +397,11 @@ export type VerificationGetStatusData$Outbound = {
|
|
|
384
397
|
metadata?: Metadata$Outbound | null | undefined;
|
|
385
398
|
message?: string | undefined;
|
|
386
399
|
error?: models.ErrorBody$Outbound | undefined;
|
|
400
|
+
reason?: string | null | undefined;
|
|
401
|
+
trusted?: boolean | null | undefined;
|
|
402
|
+
first_time?: boolean | null | undefined;
|
|
403
|
+
notarize?: boolean | undefined;
|
|
404
|
+
organization_name?: string | null | undefined;
|
|
387
405
|
};
|
|
388
406
|
|
|
389
407
|
/** @internal */
|
|
@@ -408,6 +426,11 @@ export const VerificationGetStatusData$outboundSchema: z.ZodType<
|
|
|
408
426
|
metadata: z.nullable(z.lazy(() => Metadata$outboundSchema)).optional(),
|
|
409
427
|
message: z.string().optional(),
|
|
410
428
|
error: models.ErrorBody$outboundSchema.optional(),
|
|
429
|
+
reason: z.nullable(VerificationGetStatusReason$outboundSchema).optional(),
|
|
430
|
+
trusted: z.nullable(z.boolean()).optional(),
|
|
431
|
+
firstTime: z.nullable(z.boolean()).optional(),
|
|
432
|
+
notarize: z.boolean().optional(),
|
|
433
|
+
organizationName: z.nullable(z.string()).optional(),
|
|
411
434
|
}).transform((v) => {
|
|
412
435
|
return remap$(v, {
|
|
413
436
|
requestId: "request_id",
|
|
@@ -420,6 +443,8 @@ export const VerificationGetStatusData$outboundSchema: z.ZodType<
|
|
|
420
443
|
errorMessage: "error_message",
|
|
421
444
|
sdkType: "sdk_type",
|
|
422
445
|
presenceAddress: "presence_address",
|
|
446
|
+
firstTime: "first_time",
|
|
447
|
+
organizationName: "organization_name",
|
|
423
448
|
});
|
|
424
449
|
});
|
|
425
450
|
|
package/src/models/security.ts
CHANGED
|
@@ -13,17 +13,6 @@ export type Security = {
|
|
|
13
13
|
agentKeyAuth1?: string | undefined;
|
|
14
14
|
agentKeyAuth2?: string | undefined;
|
|
15
15
|
agentKeyAuth3?: string | undefined;
|
|
16
|
-
agentKeyAuth4?: string | undefined;
|
|
17
|
-
agentKeyAuth5?: string | undefined;
|
|
18
|
-
agentKeyAuth6?: string | undefined;
|
|
19
|
-
agentKeyAuth7?: string | undefined;
|
|
20
|
-
agentKeyAuth8?: string | undefined;
|
|
21
|
-
agentKeyAuth9?: string | undefined;
|
|
22
|
-
agentKeyAuth10?: string | undefined;
|
|
23
|
-
agentKeyAuth11?: string | undefined;
|
|
24
|
-
agentKeyAuth12?: string | undefined;
|
|
25
|
-
agentKeyAuth13?: string | undefined;
|
|
26
|
-
agentKeyAuth14?: string | undefined;
|
|
27
16
|
};
|
|
28
17
|
|
|
29
18
|
/** @internal */
|
|
@@ -36,17 +25,6 @@ export const Security$inboundSchema: z.ZodType<
|
|
|
36
25
|
agentKeyAuth1: types.optional(types.string()),
|
|
37
26
|
agentKeyAuth2: types.optional(types.string()),
|
|
38
27
|
agentKeyAuth3: types.optional(types.string()),
|
|
39
|
-
agentKeyAuth4: types.optional(types.string()),
|
|
40
|
-
agentKeyAuth5: types.optional(types.string()),
|
|
41
|
-
agentKeyAuth6: types.optional(types.string()),
|
|
42
|
-
agentKeyAuth7: types.optional(types.string()),
|
|
43
|
-
agentKeyAuth8: types.optional(types.string()),
|
|
44
|
-
agentKeyAuth9: types.optional(types.string()),
|
|
45
|
-
agentKeyAuth10: types.optional(types.string()),
|
|
46
|
-
agentKeyAuth11: types.optional(types.string()),
|
|
47
|
-
agentKeyAuth12: types.optional(types.string()),
|
|
48
|
-
agentKeyAuth13: types.optional(types.string()),
|
|
49
|
-
agentKeyAuth14: types.optional(types.string()),
|
|
50
28
|
});
|
|
51
29
|
/** @internal */
|
|
52
30
|
export type Security$Outbound = {
|
|
@@ -54,17 +32,6 @@ export type Security$Outbound = {
|
|
|
54
32
|
agentKeyAuth1?: string | undefined;
|
|
55
33
|
agentKeyAuth2?: string | undefined;
|
|
56
34
|
agentKeyAuth3?: string | undefined;
|
|
57
|
-
agentKeyAuth4?: string | undefined;
|
|
58
|
-
agentKeyAuth5?: string | undefined;
|
|
59
|
-
agentKeyAuth6?: string | undefined;
|
|
60
|
-
agentKeyAuth7?: string | undefined;
|
|
61
|
-
agentKeyAuth8?: string | undefined;
|
|
62
|
-
agentKeyAuth9?: string | undefined;
|
|
63
|
-
agentKeyAuth10?: string | undefined;
|
|
64
|
-
agentKeyAuth11?: string | undefined;
|
|
65
|
-
agentKeyAuth12?: string | undefined;
|
|
66
|
-
agentKeyAuth13?: string | undefined;
|
|
67
|
-
agentKeyAuth14?: string | undefined;
|
|
68
35
|
};
|
|
69
36
|
|
|
70
37
|
/** @internal */
|
|
@@ -77,17 +44,6 @@ export const Security$outboundSchema: z.ZodType<
|
|
|
77
44
|
agentKeyAuth1: z.string().optional(),
|
|
78
45
|
agentKeyAuth2: z.string().optional(),
|
|
79
46
|
agentKeyAuth3: z.string().optional(),
|
|
80
|
-
agentKeyAuth4: z.string().optional(),
|
|
81
|
-
agentKeyAuth5: z.string().optional(),
|
|
82
|
-
agentKeyAuth6: z.string().optional(),
|
|
83
|
-
agentKeyAuth7: z.string().optional(),
|
|
84
|
-
agentKeyAuth8: z.string().optional(),
|
|
85
|
-
agentKeyAuth9: z.string().optional(),
|
|
86
|
-
agentKeyAuth10: z.string().optional(),
|
|
87
|
-
agentKeyAuth11: z.string().optional(),
|
|
88
|
-
agentKeyAuth12: z.string().optional(),
|
|
89
|
-
agentKeyAuth13: z.string().optional(),
|
|
90
|
-
agentKeyAuth14: z.string().optional(),
|
|
91
47
|
});
|
|
92
48
|
|
|
93
49
|
export function securityToJSON(security: Security): string {
|
package/src/sdk/census.ts
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
import { censusCreateSession } from "../funcs/census-create-session.js";
|
|
6
6
|
import { censusCreateVerificationLink } from "../funcs/census-create-verification-link.js";
|
|
7
|
-
import { censusGetPartnerConfig } from "../funcs/census-get-partner-config.js";
|
|
8
7
|
import { censusLogout } from "../funcs/census-logout.js";
|
|
9
8
|
import { censusRevokeVerification } from "../funcs/census-revoke-verification.js";
|
|
10
9
|
import { censusStoreSignal } from "../funcs/census-store-signal.js";
|
|
@@ -57,7 +56,7 @@ export class Census extends ClientSDK {
|
|
|
57
56
|
* Validate a verification token
|
|
58
57
|
*
|
|
59
58
|
* @remarks
|
|
60
|
-
* Validates a BotShield attestation JWT — the primary server-side check. Attestations are ES256-signed; the public key is published at /.well-known/jwks.json (kid in the header), so you may also verify locally with any JWT library. Claims are anonymous by construction: the token attests the event, never the person.
|
|
59
|
+
* Validates a BotShield attestation JWT — the primary server-side check. Attestations are ES256-signed; the public key is published at /.well-known/jwks.json (kid in the header), so you may also verify locally with any JWT library. Claims are anonymous by construction: the token attests the event, never the person. Each attestation is for one organization (aud = its organization_id; pass `audience` to enforce it) and one check: a repeat check is flagged `replayed` and refused from 2026-11-15.
|
|
61
60
|
*/
|
|
62
61
|
async verifyToken(
|
|
63
62
|
security: operations.SDKVerifyTokenSecurity,
|
|
@@ -106,25 +105,6 @@ export class Census extends ClientSDK {
|
|
|
106
105
|
));
|
|
107
106
|
}
|
|
108
107
|
|
|
109
|
-
/**
|
|
110
|
-
* Get partner configuration
|
|
111
|
-
*
|
|
112
|
-
* @remarks
|
|
113
|
-
* Returns enabled integrations (Turnstile, etc.) for a site key. Public config only — secret keys never exposed.
|
|
114
|
-
*/
|
|
115
|
-
async getPartnerConfig(
|
|
116
|
-
security: operations.SDKGetPartnerConfigSecurity,
|
|
117
|
-
request: operations.SDKGetPartnerConfigRequest,
|
|
118
|
-
options?: RequestOptions,
|
|
119
|
-
): Promise<operations.SDKGetPartnerConfigResponse> {
|
|
120
|
-
return unwrapAsync(censusGetPartnerConfig(
|
|
121
|
-
this,
|
|
122
|
-
security,
|
|
123
|
-
request,
|
|
124
|
-
options,
|
|
125
|
-
));
|
|
126
|
-
}
|
|
127
|
-
|
|
128
108
|
/**
|
|
129
109
|
* Revoke a pending verification
|
|
130
110
|
*
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { BotShieldCore } from "../core.js";
|
|
2
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
-
import { BotShieldError } from "../models/errors/bot-shield-error.js";
|
|
4
|
-
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/http-client-errors.js";
|
|
5
|
-
import * as errors from "../models/errors/index.js";
|
|
6
|
-
import { ResponseValidationError } from "../models/errors/response-validation-error.js";
|
|
7
|
-
import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
|
|
8
|
-
import * as operations from "../models/operations/index.js";
|
|
9
|
-
import { APIPromise } from "../types/async.js";
|
|
10
|
-
import { Result } from "../types/fp.js";
|
|
11
|
-
/**
|
|
12
|
-
* Get partner configuration
|
|
13
|
-
*
|
|
14
|
-
* @remarks
|
|
15
|
-
* Returns enabled integrations (Turnstile, etc.) for a site key. Public config only — secret keys never exposed.
|
|
16
|
-
*/
|
|
17
|
-
export declare function censusGetPartnerConfig(client: BotShieldCore, security: operations.SDKGetPartnerConfigSecurity, request: operations.SDKGetPartnerConfigRequest, options?: RequestOptions): APIPromise<Result<operations.SDKGetPartnerConfigResponse, errors.InvalidInputError | errors.ErrorResponse | BotShieldError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
|
-
//# sourceMappingURL=census-get-partner-config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"census-get-partner-config.d.ts","sourceRoot":"","sources":["../../../src/funcs/census-get-partner-config.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAM3C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,UAAU,CAAC,2BAA2B,EAChD,OAAO,EAAE,UAAU,CAAC,0BAA0B,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,2BAA2B,EACpC,MAAM,CAAC,iBAAiB,GACxB,MAAM,CAAC,aAAa,GACpB,cAAc,GACd,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAOA"}
|