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.
Files changed (196) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +41 -8
  3. package/bin/mcp-server.js +309 -173
  4. package/bin/mcp-server.js.map +27 -28
  5. package/dist/commonjs/funcs/census-verify-token.d.ts +1 -1
  6. package/dist/commonjs/funcs/census-verify-token.js +13 -1
  7. package/dist/commonjs/funcs/census-verify-token.js.map +1 -1
  8. package/dist/commonjs/funcs/verification-get-status.js +12 -0
  9. package/dist/commonjs/funcs/verification-get-status.js.map +1 -1
  10. package/dist/commonjs/lib/config.d.ts +2 -2
  11. package/dist/commonjs/lib/config.js +2 -2
  12. package/dist/commonjs/lib/security.d.ts.map +1 -1
  13. package/dist/commonjs/lib/security.js +14 -0
  14. package/dist/commonjs/lib/security.js.map +1 -1
  15. package/dist/commonjs/mcp-server/cli/start/command.d.ts.map +1 -1
  16. package/dist/commonjs/mcp-server/cli/start/command.js +16 -0
  17. package/dist/commonjs/mcp-server/cli/start/command.js.map +1 -1
  18. package/dist/commonjs/mcp-server/cli/start/impl.d.ts +2 -0
  19. package/dist/commonjs/mcp-server/cli/start/impl.d.ts.map +1 -1
  20. package/dist/commonjs/mcp-server/cli/start/impl.js +4 -0
  21. package/dist/commonjs/mcp-server/cli/start/impl.js.map +1 -1
  22. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  23. package/dist/commonjs/mcp-server/server.js +1 -1
  24. package/dist/commonjs/mcp-server/tools/actions-cancel-action.js +1 -1
  25. package/dist/commonjs/mcp-server/tools/actions-cancel-action.js.map +1 -1
  26. package/dist/commonjs/mcp-server/tools/actions-check-action-status.js +1 -1
  27. package/dist/commonjs/mcp-server/tools/actions-check-action-status.js.map +1 -1
  28. package/dist/commonjs/mcp-server/tools/actions-propose-action.js +1 -1
  29. package/dist/commonjs/mcp-server/tools/actions-propose-action.js.map +1 -1
  30. package/dist/commonjs/models/error-body.d.ts +43 -8
  31. package/dist/commonjs/models/error-body.d.ts.map +1 -1
  32. package/dist/commonjs/models/error-body.js +51 -1
  33. package/dist/commonjs/models/error-body.js.map +1 -1
  34. package/dist/commonjs/models/operations/actions-cancel.d.ts +1 -1
  35. package/dist/commonjs/models/operations/actions-check-status.d.ts +6 -6
  36. package/dist/commonjs/models/operations/actions-check-status.d.ts.map +1 -1
  37. package/dist/commonjs/models/operations/actions-check-status.js +6 -6
  38. package/dist/commonjs/models/operations/actions-check-status.js.map +1 -1
  39. package/dist/commonjs/models/operations/actions-propose.d.ts +1 -1
  40. package/dist/commonjs/models/operations/index.d.ts +0 -1
  41. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  42. package/dist/commonjs/models/operations/index.js +0 -1
  43. package/dist/commonjs/models/operations/index.js.map +1 -1
  44. package/dist/commonjs/models/operations/sdk-create-session.d.ts +49 -15
  45. package/dist/commonjs/models/operations/sdk-create-session.d.ts.map +1 -1
  46. package/dist/commonjs/models/operations/sdk-create-session.js +37 -16
  47. package/dist/commonjs/models/operations/sdk-create-session.js.map +1 -1
  48. package/dist/commonjs/models/operations/sdk-create-verification-link.d.ts +96 -2
  49. package/dist/commonjs/models/operations/sdk-create-verification-link.d.ts.map +1 -1
  50. package/dist/commonjs/models/operations/sdk-create-verification-link.js +58 -1
  51. package/dist/commonjs/models/operations/sdk-create-verification-link.js.map +1 -1
  52. package/dist/commonjs/models/operations/sdk-logout.d.ts +1 -1
  53. package/dist/commonjs/models/operations/sdk-revoke-verification.d.ts +14 -4
  54. package/dist/commonjs/models/operations/sdk-revoke-verification.d.ts.map +1 -1
  55. package/dist/commonjs/models/operations/sdk-revoke-verification.js +4 -2
  56. package/dist/commonjs/models/operations/sdk-revoke-verification.js.map +1 -1
  57. package/dist/commonjs/models/operations/sdk-store-signal.d.ts +1 -1
  58. package/dist/commonjs/models/operations/sdk-validate-signal.d.ts +6 -6
  59. package/dist/commonjs/models/operations/sdk-validate-signal.d.ts.map +1 -1
  60. package/dist/commonjs/models/operations/sdk-validate-signal.js +6 -6
  61. package/dist/commonjs/models/operations/sdk-validate-signal.js.map +1 -1
  62. package/dist/commonjs/models/operations/sdk-verify-token.d.ts +82 -1
  63. package/dist/commonjs/models/operations/sdk-verify-token.d.ts.map +1 -1
  64. package/dist/commonjs/models/operations/sdk-verify-token.js +55 -1
  65. package/dist/commonjs/models/operations/sdk-verify-token.js.map +1 -1
  66. package/dist/commonjs/models/operations/verification-get-status.d.ts +51 -4
  67. package/dist/commonjs/models/operations/verification-get-status.d.ts.map +1 -1
  68. package/dist/commonjs/models/operations/verification-get-status.js +34 -2
  69. package/dist/commonjs/models/operations/verification-get-status.js.map +1 -1
  70. package/dist/commonjs/models/security.d.ts +4 -0
  71. package/dist/commonjs/models/security.d.ts.map +1 -1
  72. package/dist/commonjs/models/security.js +4 -0
  73. package/dist/commonjs/models/security.js.map +1 -1
  74. package/dist/commonjs/sdk/census.d.ts +1 -8
  75. package/dist/commonjs/sdk/census.d.ts.map +1 -1
  76. package/dist/commonjs/sdk/census.js +1 -11
  77. package/dist/commonjs/sdk/census.js.map +1 -1
  78. package/dist/esm/funcs/census-verify-token.d.ts +1 -1
  79. package/dist/esm/funcs/census-verify-token.js +13 -1
  80. package/dist/esm/funcs/census-verify-token.js.map +1 -1
  81. package/dist/esm/funcs/verification-get-status.js +12 -0
  82. package/dist/esm/funcs/verification-get-status.js.map +1 -1
  83. package/dist/esm/lib/config.d.ts +2 -2
  84. package/dist/esm/lib/config.js +2 -2
  85. package/dist/esm/lib/security.d.ts.map +1 -1
  86. package/dist/esm/lib/security.js +14 -0
  87. package/dist/esm/lib/security.js.map +1 -1
  88. package/dist/esm/mcp-server/cli/start/command.d.ts.map +1 -1
  89. package/dist/esm/mcp-server/cli/start/command.js +16 -0
  90. package/dist/esm/mcp-server/cli/start/command.js.map +1 -1
  91. package/dist/esm/mcp-server/cli/start/impl.d.ts +2 -0
  92. package/dist/esm/mcp-server/cli/start/impl.d.ts.map +1 -1
  93. package/dist/esm/mcp-server/cli/start/impl.js +4 -0
  94. package/dist/esm/mcp-server/cli/start/impl.js.map +1 -1
  95. package/dist/esm/mcp-server/mcp-server.js +1 -1
  96. package/dist/esm/mcp-server/server.js +1 -1
  97. package/dist/esm/mcp-server/tools/actions-cancel-action.js +1 -1
  98. package/dist/esm/mcp-server/tools/actions-cancel-action.js.map +1 -1
  99. package/dist/esm/mcp-server/tools/actions-check-action-status.js +1 -1
  100. package/dist/esm/mcp-server/tools/actions-check-action-status.js.map +1 -1
  101. package/dist/esm/mcp-server/tools/actions-propose-action.js +1 -1
  102. package/dist/esm/mcp-server/tools/actions-propose-action.js.map +1 -1
  103. package/dist/esm/models/error-body.d.ts +43 -8
  104. package/dist/esm/models/error-body.d.ts.map +1 -1
  105. package/dist/esm/models/error-body.js +48 -0
  106. package/dist/esm/models/error-body.js.map +1 -1
  107. package/dist/esm/models/operations/actions-cancel.d.ts +1 -1
  108. package/dist/esm/models/operations/actions-check-status.d.ts +6 -6
  109. package/dist/esm/models/operations/actions-check-status.d.ts.map +1 -1
  110. package/dist/esm/models/operations/actions-check-status.js +5 -5
  111. package/dist/esm/models/operations/actions-check-status.js.map +1 -1
  112. package/dist/esm/models/operations/actions-propose.d.ts +1 -1
  113. package/dist/esm/models/operations/index.d.ts +0 -1
  114. package/dist/esm/models/operations/index.d.ts.map +1 -1
  115. package/dist/esm/models/operations/index.js +0 -1
  116. package/dist/esm/models/operations/index.js.map +1 -1
  117. package/dist/esm/models/operations/sdk-create-session.d.ts +49 -15
  118. package/dist/esm/models/operations/sdk-create-session.d.ts.map +1 -1
  119. package/dist/esm/models/operations/sdk-create-session.js +34 -13
  120. package/dist/esm/models/operations/sdk-create-session.js.map +1 -1
  121. package/dist/esm/models/operations/sdk-create-verification-link.d.ts +96 -2
  122. package/dist/esm/models/operations/sdk-create-verification-link.d.ts.map +1 -1
  123. package/dist/esm/models/operations/sdk-create-verification-link.js +57 -0
  124. package/dist/esm/models/operations/sdk-create-verification-link.js.map +1 -1
  125. package/dist/esm/models/operations/sdk-logout.d.ts +1 -1
  126. package/dist/esm/models/operations/sdk-revoke-verification.d.ts +14 -4
  127. package/dist/esm/models/operations/sdk-revoke-verification.d.ts.map +1 -1
  128. package/dist/esm/models/operations/sdk-revoke-verification.js +4 -2
  129. package/dist/esm/models/operations/sdk-revoke-verification.js.map +1 -1
  130. package/dist/esm/models/operations/sdk-store-signal.d.ts +1 -1
  131. package/dist/esm/models/operations/sdk-validate-signal.d.ts +6 -6
  132. package/dist/esm/models/operations/sdk-validate-signal.d.ts.map +1 -1
  133. package/dist/esm/models/operations/sdk-validate-signal.js +5 -5
  134. package/dist/esm/models/operations/sdk-validate-signal.js.map +1 -1
  135. package/dist/esm/models/operations/sdk-verify-token.d.ts +82 -1
  136. package/dist/esm/models/operations/sdk-verify-token.d.ts.map +1 -1
  137. package/dist/esm/models/operations/sdk-verify-token.js +54 -0
  138. package/dist/esm/models/operations/sdk-verify-token.js.map +1 -1
  139. package/dist/esm/models/operations/verification-get-status.d.ts +51 -4
  140. package/dist/esm/models/operations/verification-get-status.d.ts.map +1 -1
  141. package/dist/esm/models/operations/verification-get-status.js +33 -1
  142. package/dist/esm/models/operations/verification-get-status.js.map +1 -1
  143. package/dist/esm/models/security.d.ts +4 -0
  144. package/dist/esm/models/security.d.ts.map +1 -1
  145. package/dist/esm/models/security.js +4 -0
  146. package/dist/esm/models/security.js.map +1 -1
  147. package/dist/esm/sdk/census.d.ts +1 -8
  148. package/dist/esm/sdk/census.d.ts.map +1 -1
  149. package/dist/esm/sdk/census.js +1 -11
  150. package/dist/esm/sdk/census.js.map +1 -1
  151. package/jsr.json +1 -1
  152. package/package.json +16 -1
  153. package/src/funcs/census-verify-token.ts +15 -1
  154. package/src/funcs/verification-get-status.ts +14 -0
  155. package/src/lib/config.ts +2 -2
  156. package/src/lib/security.ts +14 -0
  157. package/src/mcp-server/cli/start/command.ts +16 -0
  158. package/src/mcp-server/cli/start/impl.ts +6 -0
  159. package/src/mcp-server/mcp-server.ts +1 -1
  160. package/src/mcp-server/server.ts +1 -1
  161. package/src/mcp-server/tools/actions-cancel-action.ts +1 -1
  162. package/src/mcp-server/tools/actions-check-action-status.ts +1 -1
  163. package/src/mcp-server/tools/actions-propose-action.ts +1 -1
  164. package/src/models/error-body.ts +95 -8
  165. package/src/models/operations/actions-cancel.ts +1 -1
  166. package/src/models/operations/actions-check-status.ts +18 -10
  167. package/src/models/operations/actions-propose.ts +1 -1
  168. package/src/models/operations/index.ts +0 -1
  169. package/src/models/operations/sdk-create-session.ts +89 -33
  170. package/src/models/operations/sdk-create-verification-link.ts +157 -2
  171. package/src/models/operations/sdk-logout.ts +1 -1
  172. package/src/models/operations/sdk-revoke-verification.ts +18 -6
  173. package/src/models/operations/sdk-store-signal.ts +1 -1
  174. package/src/models/operations/sdk-validate-signal.ts +16 -10
  175. package/src/models/operations/sdk-verify-token.ts +127 -1
  176. package/src/models/operations/verification-get-status.ts +81 -4
  177. package/src/models/security.ts +8 -0
  178. package/src/sdk/census.ts +1 -21
  179. package/dist/commonjs/funcs/census-get-partner-config.d.ts +0 -18
  180. package/dist/commonjs/funcs/census-get-partner-config.d.ts.map +0 -1
  181. package/dist/commonjs/funcs/census-get-partner-config.js +0 -132
  182. package/dist/commonjs/funcs/census-get-partner-config.js.map +0 -1
  183. package/dist/commonjs/models/operations/sdk-get-partner-config.d.ts +0 -126
  184. package/dist/commonjs/models/operations/sdk-get-partner-config.d.ts.map +0 -1
  185. package/dist/commonjs/models/operations/sdk-get-partner-config.js +0 -179
  186. package/dist/commonjs/models/operations/sdk-get-partner-config.js.map +0 -1
  187. package/dist/esm/funcs/census-get-partner-config.d.ts +0 -18
  188. package/dist/esm/funcs/census-get-partner-config.d.ts.map +0 -1
  189. package/dist/esm/funcs/census-get-partner-config.js +0 -96
  190. package/dist/esm/funcs/census-get-partner-config.js.map +0 -1
  191. package/dist/esm/models/operations/sdk-get-partner-config.d.ts +0 -126
  192. package/dist/esm/models/operations/sdk-get-partner-config.d.ts.map +0 -1
  193. package/dist/esm/models/operations/sdk-get-partner-config.js +0 -131
  194. package/dist/esm/models/operations/sdk-get-partner-config.js.map +0 -1
  195. package/src/funcs/census-get-partner-config.ts +0 -196
  196. package/src/models/operations/sdk-get-partner-config.ts +0 -345
@@ -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";
@@ -13,6 +15,8 @@ import * as models from "../index.js";
13
15
  export type SDKVerifyTokenSecurity = {
14
16
  apiKeyAuth?: string | undefined;
15
17
  apiKeyAuth1?: string | undefined;
18
+ apiKeyAuth2?: string | undefined;
19
+ apiKeyAuth3?: string | undefined;
16
20
  };
17
21
 
18
22
  export type SDKVerifyTokenRequest = {
@@ -20,8 +24,25 @@ export type SDKVerifyTokenRequest = {
20
24
  * JWT verification receipt
21
25
  */
22
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;
23
31
  };
24
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
+
25
46
  export type Claims = {
26
47
  requestId?: string | undefined;
27
48
  verified?: boolean | undefined;
@@ -30,8 +51,40 @@ export type Claims = {
30
51
  nonce?: string | undefined;
31
52
  issuedAt?: number | undefined;
32
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;
33
74
  };
34
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
+
35
88
  export type SDKVerifyTokenDataData = {
36
89
  valid: boolean;
37
90
  /**
@@ -43,12 +96,24 @@ export type SDKVerifyTokenDataData = {
43
96
  */
44
97
  expiredAt?: Date | null | undefined;
45
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;
46
111
  };
47
112
 
48
113
  export type SDKVerifyTokenData = {
49
114
  data?: SDKVerifyTokenDataData | undefined;
50
115
  /**
51
- * Handler error. Arrives inside data.error with HTTP 200 — check for it before reading the result.
116
+ * Handler error. Arrives inside `data.error` with HTTP 200. Check for it before reading the result.
52
117
  */
53
118
  error?: models.ErrorBody | undefined;
54
119
  };
@@ -68,11 +133,15 @@ export const SDKVerifyTokenSecurity$inboundSchema: z.ZodType<
68
133
  > = z.object({
69
134
  apiKeyAuth: types.optional(types.string()),
70
135
  apiKeyAuth1: types.optional(types.string()),
136
+ apiKeyAuth2: types.optional(types.string()),
137
+ apiKeyAuth3: types.optional(types.string()),
71
138
  });
72
139
  /** @internal */
73
140
  export type SDKVerifyTokenSecurity$Outbound = {
74
141
  apiKeyAuth?: string | undefined;
75
142
  apiKeyAuth1?: string | undefined;
143
+ apiKeyAuth2?: string | undefined;
144
+ apiKeyAuth3?: string | undefined;
76
145
  };
77
146
 
78
147
  /** @internal */
@@ -83,6 +152,8 @@ export const SDKVerifyTokenSecurity$outboundSchema: z.ZodType<
83
152
  > = z.object({
84
153
  apiKeyAuth: z.string().optional(),
85
154
  apiKeyAuth1: z.string().optional(),
155
+ apiKeyAuth2: z.string().optional(),
156
+ apiKeyAuth3: z.string().optional(),
86
157
  });
87
158
 
88
159
  export function sdkVerifyTokenSecurityToJSON(
@@ -109,10 +180,12 @@ export const SDKVerifyTokenRequest$inboundSchema: z.ZodType<
109
180
  unknown
110
181
  > = z.object({
111
182
  token: types.string(),
183
+ audience: types.optional(types.string()),
112
184
  });
113
185
  /** @internal */
114
186
  export type SDKVerifyTokenRequest$Outbound = {
115
187
  token: string;
188
+ audience?: string | undefined;
116
189
  };
117
190
 
118
191
  /** @internal */
@@ -122,6 +195,7 @@ export const SDKVerifyTokenRequest$outboundSchema: z.ZodType<
122
195
  SDKVerifyTokenRequest
123
196
  > = z.object({
124
197
  token: z.string(),
198
+ audience: z.string().optional(),
125
199
  });
126
200
 
127
201
  export function sdkVerifyTokenRequestToJSON(
@@ -141,6 +215,13 @@ export function sdkVerifyTokenRequestFromJSON(
141
215
  );
142
216
  }
143
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
+
144
225
  /** @internal */
145
226
  export const Claims$inboundSchema: z.ZodType<Claims, z.ZodTypeDef, unknown> = z
146
227
  .object({
@@ -151,12 +232,20 @@ export const Claims$inboundSchema: z.ZodType<Claims, z.ZodTypeDef, unknown> = z
151
232
  nonce: types.optional(types.string()),
152
233
  issued_at: types.optional(types.number()),
153
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(),
154
240
  }).transform((v) => {
155
241
  return remap$(v, {
156
242
  "request_id": "requestId",
157
243
  "organization_id": "organizationId",
158
244
  "issued_at": "issuedAt",
159
245
  "expires_at": "expiresAt",
246
+ "age_over": "ageOver",
247
+ "trusted_since": "trustedSince",
248
+ "last_pass_at": "lastPassAt",
160
249
  });
161
250
  });
162
251
  /** @internal */
@@ -168,6 +257,11 @@ export type Claims$Outbound = {
168
257
  nonce?: string | undefined;
169
258
  issued_at?: number | undefined;
170
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;
171
265
  };
172
266
 
173
267
  /** @internal */
@@ -183,12 +277,20 @@ export const Claims$outboundSchema: z.ZodType<
183
277
  nonce: z.string().optional(),
184
278
  issuedAt: z.number().optional(),
185
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(),
186
285
  }).transform((v) => {
187
286
  return remap$(v, {
188
287
  requestId: "request_id",
189
288
  organizationId: "organization_id",
190
289
  issuedAt: "issued_at",
191
290
  expiresAt: "expires_at",
291
+ ageOver: "age_over",
292
+ trustedSince: "trusted_since",
293
+ lastPassAt: "last_pass_at",
192
294
  });
193
295
  });
194
296
 
@@ -205,6 +307,19 @@ export function claimsFromJSON(
205
307
  );
206
308
  }
207
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
+
208
323
  /** @internal */
209
324
  export const SDKVerifyTokenDataData$inboundSchema: z.ZodType<
210
325
  SDKVerifyTokenDataData,
@@ -215,9 +330,13 @@ export const SDKVerifyTokenDataData$inboundSchema: z.ZodType<
215
330
  reason: types.optional(types.string()),
216
331
  expired_at: z.nullable(types.date()).optional(),
217
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),
218
336
  }).transform((v) => {
219
337
  return remap$(v, {
220
338
  "expired_at": "expiredAt",
339
+ "strict_single_use_from": "strictSingleUseFrom",
221
340
  });
222
341
  });
223
342
  /** @internal */
@@ -226,6 +345,9 @@ export type SDKVerifyTokenDataData$Outbound = {
226
345
  reason?: string | undefined;
227
346
  expired_at?: string | null | undefined;
228
347
  claims?: Claims$Outbound | null | undefined;
348
+ replayed?: boolean | undefined;
349
+ strict_single_use_from?: string | undefined;
350
+ verdict?: string | undefined;
229
351
  };
230
352
 
231
353
  /** @internal */
@@ -238,9 +360,13 @@ export const SDKVerifyTokenDataData$outboundSchema: z.ZodType<
238
360
  reason: z.string().optional(),
239
361
  expiredAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
240
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(),
241
366
  }).transform((v) => {
242
367
  return remap$(v, {
243
368
  expiredAt: "expired_at",
369
+ strictSingleUseFrom: "strict_single_use_from",
244
370
  });
245
371
  });
246
372
 
@@ -15,6 +15,8 @@ import * as models from "../index.js";
15
15
  export type VerificationGetStatusSecurity = {
16
16
  apiKeyAuth?: string | undefined;
17
17
  apiKeyAuth1?: string | undefined;
18
+ apiKeyAuth2?: string | undefined;
19
+ apiKeyAuth3?: string | undefined;
18
20
  };
19
21
 
20
22
  export type VerificationGetStatusRequest = {
@@ -22,7 +24,7 @@ export type VerificationGetStatusRequest = {
22
24
  };
23
25
 
24
26
  /**
25
- * `pass` is a Recent Presence pass: the pre-check resolved the person without a new ceremony. Its record expires 60 seconds after the check, after which this endpoint reports `expired` — it never becomes `completed`. Treat `pass` as success and read it promptly.
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`.
26
28
  */
27
29
  export const VerificationGetStatusStatus = {
28
30
  Pending: "pending",
@@ -34,7 +36,7 @@ export const VerificationGetStatusStatus = {
34
36
  Error: "error",
35
37
  } as const;
36
38
  /**
37
- * `pass` is a Recent Presence pass: the pre-check resolved the person without a new ceremony. Its record expires 60 seconds after the check, after which this endpoint reports `expired` — it never becomes `completed`. Treat `pass` as success and read it promptly.
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`.
38
40
  */
39
41
  export type VerificationGetStatusStatus = OpenEnum<
40
42
  typeof VerificationGetStatusStatus
@@ -59,10 +61,27 @@ export type Metadata = {
59
61
  parentRequestId?: string | null | undefined;
60
62
  };
61
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
+
62
81
  export type VerificationGetStatusData = {
63
82
  found?: boolean | undefined;
64
83
  /**
65
- * `pass` is a Recent Presence pass: the pre-check resolved the person without a new ceremony. Its record expires 60 seconds after the check, after which this endpoint reports `expired` — it never becomes `completed`. Treat `pass` as success and read it promptly.
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`.
66
85
  */
67
86
  status?: VerificationGetStatusStatus | undefined;
68
87
  requestId?: string | undefined;
@@ -88,9 +107,29 @@ export type VerificationGetStatusData = {
88
107
  */
89
108
  message?: string | undefined;
90
109
  /**
91
- * Handler error. Arrives inside data.error with HTTP 200 — check for it before reading the result.
110
+ * Handler error. Arrives inside `data.error` with HTTP 200. Check for it before reading the result.
92
111
  */
93
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;
94
133
  };
95
134
 
96
135
  /**
@@ -108,11 +147,15 @@ export const VerificationGetStatusSecurity$inboundSchema: z.ZodType<
108
147
  > = z.object({
109
148
  apiKeyAuth: types.optional(types.string()),
110
149
  apiKeyAuth1: types.optional(types.string()),
150
+ apiKeyAuth2: types.optional(types.string()),
151
+ apiKeyAuth3: types.optional(types.string()),
111
152
  });
112
153
  /** @internal */
113
154
  export type VerificationGetStatusSecurity$Outbound = {
114
155
  apiKeyAuth?: string | undefined;
115
156
  apiKeyAuth1?: string | undefined;
157
+ apiKeyAuth2?: string | undefined;
158
+ apiKeyAuth3?: string | undefined;
116
159
  };
117
160
 
118
161
  /** @internal */
@@ -123,6 +166,8 @@ export const VerificationGetStatusSecurity$outboundSchema: z.ZodType<
123
166
  > = z.object({
124
167
  apiKeyAuth: z.string().optional(),
125
168
  apiKeyAuth1: z.string().optional(),
169
+ apiKeyAuth2: z.string().optional(),
170
+ apiKeyAuth3: z.string().optional(),
126
171
  });
127
172
 
128
173
  export function verificationGetStatusSecurityToJSON(
@@ -278,6 +323,19 @@ export function metadataFromJSON(
278
323
  );
279
324
  }
280
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
+
281
339
  /** @internal */
282
340
  export const VerificationGetStatusData$inboundSchema: z.ZodType<
283
341
  VerificationGetStatusData,
@@ -300,6 +358,11 @@ export const VerificationGetStatusData$inboundSchema: z.ZodType<
300
358
  metadata: z.nullable(z.lazy(() => Metadata$inboundSchema)).optional(),
301
359
  message: types.optional(types.string()),
302
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(),
303
366
  }).transform((v) => {
304
367
  return remap$(v, {
305
368
  "request_id": "requestId",
@@ -312,6 +375,8 @@ export const VerificationGetStatusData$inboundSchema: z.ZodType<
312
375
  "error_message": "errorMessage",
313
376
  "sdk_type": "sdkType",
314
377
  "presence_address": "presenceAddress",
378
+ "first_time": "firstTime",
379
+ "organization_name": "organizationName",
315
380
  });
316
381
  });
317
382
  /** @internal */
@@ -332,6 +397,11 @@ export type VerificationGetStatusData$Outbound = {
332
397
  metadata?: Metadata$Outbound | null | undefined;
333
398
  message?: string | undefined;
334
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;
335
405
  };
336
406
 
337
407
  /** @internal */
@@ -356,6 +426,11 @@ export const VerificationGetStatusData$outboundSchema: z.ZodType<
356
426
  metadata: z.nullable(z.lazy(() => Metadata$outboundSchema)).optional(),
357
427
  message: z.string().optional(),
358
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(),
359
434
  }).transform((v) => {
360
435
  return remap$(v, {
361
436
  requestId: "request_id",
@@ -368,6 +443,8 @@ export const VerificationGetStatusData$outboundSchema: z.ZodType<
368
443
  errorMessage: "error_message",
369
444
  sdkType: "sdk_type",
370
445
  presenceAddress: "presence_address",
446
+ firstTime: "first_time",
447
+ organizationName: "organization_name",
371
448
  });
372
449
  });
373
450
 
@@ -11,6 +11,8 @@ import { SDKValidationError } from "./errors/sdk-validation-error.js";
11
11
  export type Security = {
12
12
  agentKeyAuth?: string | undefined;
13
13
  agentKeyAuth1?: string | undefined;
14
+ agentKeyAuth2?: string | undefined;
15
+ agentKeyAuth3?: string | undefined;
14
16
  };
15
17
 
16
18
  /** @internal */
@@ -21,11 +23,15 @@ export const Security$inboundSchema: z.ZodType<
21
23
  > = z.object({
22
24
  agentKeyAuth: types.optional(types.string()),
23
25
  agentKeyAuth1: types.optional(types.string()),
26
+ agentKeyAuth2: types.optional(types.string()),
27
+ agentKeyAuth3: types.optional(types.string()),
24
28
  });
25
29
  /** @internal */
26
30
  export type Security$Outbound = {
27
31
  agentKeyAuth?: string | undefined;
28
32
  agentKeyAuth1?: string | undefined;
33
+ agentKeyAuth2?: string | undefined;
34
+ agentKeyAuth3?: string | undefined;
29
35
  };
30
36
 
31
37
  /** @internal */
@@ -36,6 +42,8 @@ export const Security$outboundSchema: z.ZodType<
36
42
  > = z.object({
37
43
  agentKeyAuth: z.string().optional(),
38
44
  agentKeyAuth1: z.string().optional(),
45
+ agentKeyAuth2: z.string().optional(),
46
+ agentKeyAuth3: z.string().optional(),
39
47
  });
40
48
 
41
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"}