botshield-sdk 1.2.4 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"verification.d.ts","sourceRoot":"","sources":["../src/resources/verification.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,SAAS,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,6BAA6B,CAAC;IAI9E;;OAEG;IACH,iBAAiB,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qCAAqC,CAAC;CAG/F;AAED,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,qCAAqC;IACpD,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,qCAAqC,IAAI,qCAAqC,GACpF,CAAC;CACH"}
1
+ {"version":3,"file":"verification.d.ts","sourceRoot":"","sources":["../src/resources/verification.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;OAGG;IACH,SAAS,CACP,KAAK,EAAE,2BAA2B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,6BAA6B,CAAC;IAI5C;;;OAGG;IACH,iBAAiB,CACf,KAAK,EAAE,mCAAmC,EAC1C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,qCAAqC,CAAC;CAGrD;AAED,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,OAAO,CAAC;IAEf,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,CAAC;IAErE,SAAS,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC;IAElC,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,QAAQ,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAEtC,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,QAAQ,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;IAEjC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,qCAAqC;IACpD,IAAI,EAAE,qCAAqC,CAAC,IAAI,CAAC;CAClD;AAED,yBAAiB,qCAAqC,CAAC;IACrD,UAAiB,IAAI;QACnB;;WAEG;QACH,KAAK,EAAE,OAAO,CAAC;QAEf;;WAEG;QACH,WAAW,EAAE,OAAO,CAAC;QAErB;;WAEG;QACH,SAAS,EAAE,OAAO,CAAC;QAEnB;;WAEG;QACH,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB;CACF;AAED,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,mCAAmC;IAClD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,qCAAqC,IAAI,qCAAqC,EACnF,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,mCAAmC,IAAI,mCAAmC,GAChF,CAAC;CACH"}
@@ -8,16 +8,18 @@ const resource_1 = require("../core/resource.js");
8
8
  */
9
9
  class Verification extends resource_1.APIResource {
10
10
  /**
11
- * Check verification status
11
+ * Poll for the current status of a verification request. Returns the full
12
+ * verification event including token on completion.
12
13
  */
13
- getStatus(options) {
14
- return this._client.get('/verification/status', options);
14
+ getStatus(query, options) {
15
+ return this._client.get('/verification/status', { query, ...options });
15
16
  }
16
17
  /**
17
- * Look up user by email
18
+ * Check whether a user exists in BotShield and has a registered passkey before
19
+ * initiating verification.
18
20
  */
19
- lookupUserByEmail(options) {
20
- return this._client.get('/verification/lookup-user-by-email', options);
21
+ lookupUserByEmail(query, options) {
22
+ return this._client.get('/verification/lookup-user-by-email', { query, ...options });
21
23
  }
22
24
  }
23
25
  exports.Verification = Verification;
@@ -1 +1 @@
1
- {"version":3,"file":"verification.js","sourceRoot":"","sources":["../src/resources/verification.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C;;GAEG;AACH,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;OAEG;IACH,SAAS,CAAC,OAAwB;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED;;OAEG;IACH,iBAAiB,CAAC,OAAwB;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,oCAAoC,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;CACF;AAdD,oCAcC"}
1
+ {"version":3,"file":"verification.js","sourceRoot":"","sources":["../src/resources/verification.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C;;GAEG;AACH,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;OAGG;IACH,SAAS,CACP,KAAkC,EAClC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;OAGG;IACH,iBAAiB,CACf,KAA0C,EAC1C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,oCAAoC,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;CACF;AAtBD,oCAsBC"}
@@ -5,16 +5,18 @@ import { APIResource } from "../core/resource.mjs";
5
5
  */
6
6
  export class Verification extends APIResource {
7
7
  /**
8
- * Check verification status
8
+ * Poll for the current status of a verification request. Returns the full
9
+ * verification event including token on completion.
9
10
  */
10
- getStatus(options) {
11
- return this._client.get('/verification/status', options);
11
+ getStatus(query, options) {
12
+ return this._client.get('/verification/status', { query, ...options });
12
13
  }
13
14
  /**
14
- * Look up user by email
15
+ * Check whether a user exists in BotShield and has a registered passkey before
16
+ * initiating verification.
15
17
  */
16
- lookupUserByEmail(options) {
17
- return this._client.get('/verification/lookup-user-by-email', options);
18
+ lookupUserByEmail(query, options) {
19
+ return this._client.get('/verification/lookup-user-by-email', { query, ...options });
18
20
  }
19
21
  }
20
22
  //# sourceMappingURL=verification.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"verification.mjs","sourceRoot":"","sources":["../src/resources/verification.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,SAAS,CAAC,OAAwB;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED;;OAEG;IACH,iBAAiB,CAAC,OAAwB;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,oCAAoC,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;CACF"}
1
+ {"version":3,"file":"verification.mjs","sourceRoot":"","sources":["../src/resources/verification.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;OAGG;IACH,SAAS,CACP,KAAkC,EAClC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;OAGG;IACH,iBAAiB,CACf,KAA0C,EAC1C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,oCAAoC,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;CACF"}
package/src/client.ts CHANGED
@@ -32,11 +32,17 @@ import {
32
32
  SDKCreateVerificationLinkResponse,
33
33
  SDKLogoutParams,
34
34
  SDKLogoutResponse,
35
+ SDKRevokeVerificationParams,
36
+ SDKRevokeVerificationResponse,
37
+ SDKVerifyTokenParams,
38
+ SDKVerifyTokenResponse,
35
39
  } from './resources/sdk';
36
40
  import { UserUpdateMetadataParams, UserUpdateMetadataResponse, Users } from './resources/users';
37
41
  import {
38
42
  Verification,
43
+ VerificationGetStatusParams,
39
44
  VerificationGetStatusResponse,
45
+ VerificationLookupUserByEmailParams,
40
46
  VerificationLookupUserByEmailResponse,
41
47
  } from './resources/verification';
42
48
  import { type Fetch } from './internal/builtin-types';
@@ -810,15 +816,21 @@ export declare namespace BotShield {
810
816
  type SDKCreateSessionResponse as SDKCreateSessionResponse,
811
817
  type SDKCreateVerificationLinkResponse as SDKCreateVerificationLinkResponse,
812
818
  type SDKLogoutResponse as SDKLogoutResponse,
819
+ type SDKRevokeVerificationResponse as SDKRevokeVerificationResponse,
820
+ type SDKVerifyTokenResponse as SDKVerifyTokenResponse,
813
821
  type SDKCreateSessionParams as SDKCreateSessionParams,
814
822
  type SDKCreateVerificationLinkParams as SDKCreateVerificationLinkParams,
815
823
  type SDKLogoutParams as SDKLogoutParams,
824
+ type SDKRevokeVerificationParams as SDKRevokeVerificationParams,
825
+ type SDKVerifyTokenParams as SDKVerifyTokenParams,
816
826
  };
817
827
 
818
828
  export {
819
829
  Verification as Verification,
820
830
  type VerificationGetStatusResponse as VerificationGetStatusResponse,
821
831
  type VerificationLookupUserByEmailResponse as VerificationLookupUserByEmailResponse,
832
+ type VerificationGetStatusParams as VerificationGetStatusParams,
833
+ type VerificationLookupUserByEmailParams as VerificationLookupUserByEmailParams,
822
834
  };
823
835
 
824
836
  export {
@@ -12,13 +12,19 @@ export {
12
12
  type SDKCreateSessionResponse,
13
13
  type SDKCreateVerificationLinkResponse,
14
14
  type SDKLogoutResponse,
15
+ type SDKRevokeVerificationResponse,
16
+ type SDKVerifyTokenResponse,
15
17
  type SDKCreateSessionParams,
16
18
  type SDKCreateVerificationLinkParams,
17
19
  type SDKLogoutParams,
20
+ type SDKRevokeVerificationParams,
21
+ type SDKVerifyTokenParams,
18
22
  } from './sdk';
19
23
  export { Users, type UserUpdateMetadataResponse, type UserUpdateMetadataParams } from './users';
20
24
  export {
21
25
  Verification,
22
26
  type VerificationGetStatusResponse,
23
27
  type VerificationLookupUserByEmailResponse,
28
+ type VerificationGetStatusParams,
29
+ type VerificationLookupUserByEmailParams,
24
30
  } from './verification';
@@ -9,7 +9,7 @@ import { RequestOptions } from '../internal/request-options';
9
9
  */
10
10
  export class SDK extends APIResource {
11
11
  /**
12
- * Create a verification session
12
+ * Create an Anchor Grant Window (legacy: session token)
13
13
  */
14
14
  createSession(
15
15
  body: SDKCreateSessionParams,
@@ -19,7 +19,7 @@ export class SDK extends APIResource {
19
19
  }
20
20
 
21
21
  /**
22
- * Create a verification link
22
+ * Create a verification request (scope/action-scoped)
23
23
  */
24
24
  createVerificationLink(
25
25
  body: SDKCreateVerificationLinkParams,
@@ -29,38 +29,242 @@ export class SDK extends APIResource {
29
29
  }
30
30
 
31
31
  /**
32
- * Logout and invalidate a session token
32
+ * Revoke an Anchor Grant Window token (legacy: logout session)
33
33
  */
34
34
  logout(body: SDKLogoutParams, options?: RequestOptions): APIPromise<SDKLogoutResponse> {
35
35
  return this._client.post('/sdk/logout', { body, ...options });
36
36
  }
37
+
38
+ /**
39
+ * Soft-expires an active or pending verification for a given scope and user. Use
40
+ * this when a 409 conflict from create-verification-link indicates an existing
41
+ * pending verification is blocking a new request.
42
+ */
43
+ revokeVerification(
44
+ body: SDKRevokeVerificationParams,
45
+ options?: RequestOptions,
46
+ ): APIPromise<SDKRevokeVerificationResponse> {
47
+ return this._client.post('/sdk/revoke-verification', { body, ...options });
48
+ }
49
+
50
+ /**
51
+ * Validate a verification receipt (JWT) and return its claims
52
+ */
53
+ verifyToken(body: SDKVerifyTokenParams, options?: RequestOptions): APIPromise<SDKVerifyTokenResponse> {
54
+ return this._client.post('/sdk/verify-token', { body, ...options });
55
+ }
37
56
  }
38
57
 
39
58
  export interface SDKCreateSessionResponse {
40
- data: unknown;
59
+ data: SDKCreateSessionResponse.Data;
60
+ }
61
+
62
+ export namespace SDKCreateSessionResponse {
63
+ export interface Data {
64
+ anchor_grant_expires_at: string;
65
+
66
+ anchor_grant_expires_in_seconds: number;
67
+
68
+ /**
69
+ * Canonical grant token (Bearer bss\_\*). Not an auth session.
70
+ */
71
+ anchor_grant_token: string;
72
+
73
+ expires_at: string;
74
+
75
+ expires_in_seconds: number;
76
+
77
+ organization: Data.Organization;
78
+
79
+ /**
80
+ * Legacy alias of anchor_grant_token (kept for backward compatibility).
81
+ */
82
+ session_token: string;
83
+ }
84
+
85
+ export namespace Data {
86
+ export interface Organization {
87
+ /**
88
+ * Clerk Organization ID (partner)
89
+ */
90
+ id: string;
91
+
92
+ environment: string;
93
+ }
94
+ }
41
95
  }
42
96
 
43
97
  export interface SDKCreateVerificationLinkResponse {
44
- data: unknown;
98
+ data: SDKCreateVerificationLinkResponse.Data;
99
+ }
100
+
101
+ export namespace SDKCreateVerificationLinkResponse {
102
+ export interface Data {
103
+ deep_link: string;
104
+
105
+ expires_at: string;
106
+
107
+ organization: Data.Organization;
108
+
109
+ qr_code_url: string;
110
+
111
+ request_id: string;
112
+
113
+ web_url: string;
114
+
115
+ /**
116
+ * Auth mode used for this verification
117
+ */
118
+ auth_mode?: 'email' | 'anonymous';
119
+
120
+ /**
121
+ * Explicit action scope. Evaluated at action time.
122
+ */
123
+ scope?: string;
124
+
125
+ sdk_type?: 'signal' | 'presence';
126
+ }
127
+
128
+ export namespace Data {
129
+ export interface Organization {
130
+ id: string;
131
+ }
132
+ }
45
133
  }
46
134
 
47
135
  export interface SDKLogoutResponse {
48
- data: unknown;
136
+ success: boolean;
137
+
138
+ message?: string;
139
+
140
+ revoked_at?: string;
141
+
142
+ token_found?: boolean;
143
+ }
144
+
145
+ export interface SDKRevokeVerificationResponse {
146
+ data: SDKRevokeVerificationResponse.Data;
49
147
  }
50
148
 
51
- export interface SDKCreateSessionParams {}
149
+ export namespace SDKRevokeVerificationResponse {
150
+ export interface Data {
151
+ /**
152
+ * Number of pending verifications that were revoked
153
+ */
154
+ revoked_count: number;
155
+
156
+ success: boolean;
52
157
 
53
- export interface SDKCreateVerificationLinkParams {}
158
+ message?: string;
159
+ }
160
+ }
161
+
162
+ export interface SDKVerifyTokenResponse {
163
+ claims?: SDKVerifyTokenResponse.Claims;
164
+
165
+ reason?: string;
166
+
167
+ valid?: boolean;
168
+ }
54
169
 
55
- export interface SDKLogoutParams {}
170
+ export namespace SDKVerifyTokenResponse {
171
+ export interface Claims {
172
+ auth_mode?: 'email' | 'anonymous';
173
+
174
+ botshield_user_id?: string;
175
+
176
+ expires_at?: number;
177
+
178
+ issued_at?: number;
179
+
180
+ organization_id?: string;
181
+
182
+ partner_user_id?: string;
183
+
184
+ request_id?: string;
185
+
186
+ timestamp?: string;
187
+
188
+ user_email?: string;
189
+
190
+ verified?: boolean;
191
+ }
192
+ }
193
+
194
+ export interface SDKCreateSessionParams {
195
+ metadata?: { [key: string]: unknown };
196
+
197
+ partner_user_id?: string;
198
+ }
199
+
200
+ export interface SDKCreateVerificationLinkParams {
201
+ /**
202
+ * Returning anonymous user: pass back the botshield_user_id from a previous
203
+ * verification to skip onboarding
204
+ */
205
+ botshield_user_id?: string;
206
+
207
+ metadata?: { [key: string]: unknown };
208
+
209
+ /**
210
+ * Auth mode: email = Clerk OAuth+passkey, anonymous = direct WebAuthn (no PII)
211
+ */
212
+ mode?: 'email' | 'anonymous';
213
+
214
+ return_url?: string;
215
+
216
+ scope?: string;
217
+
218
+ sdk_type?: 'signal' | 'presence';
219
+
220
+ user_email?: string;
221
+
222
+ webhook_url?: string;
223
+ }
224
+
225
+ export interface SDKLogoutParams {
226
+ /**
227
+ * Legacy field name. Provide the anchor grant token (bss\_\*).
228
+ */
229
+ session_token: string;
230
+ }
231
+
232
+ export interface SDKRevokeVerificationParams {
233
+ /**
234
+ * The scope/action name to revoke pending verifications for
235
+ */
236
+ scope: string;
237
+
238
+ /**
239
+ * Partner user ID to match. At least one of user_email or partner_user_id is
240
+ * required.
241
+ */
242
+ partner_user_id?: string;
243
+
244
+ /**
245
+ * User email to match. At least one of user_email or partner_user_id is required.
246
+ */
247
+ user_email?: string;
248
+ }
249
+
250
+ export interface SDKVerifyTokenParams {
251
+ /**
252
+ * The JWT verification receipt to validate
253
+ */
254
+ token: string;
255
+ }
56
256
 
57
257
  export declare namespace SDK {
58
258
  export {
59
259
  type SDKCreateSessionResponse as SDKCreateSessionResponse,
60
260
  type SDKCreateVerificationLinkResponse as SDKCreateVerificationLinkResponse,
61
261
  type SDKLogoutResponse as SDKLogoutResponse,
262
+ type SDKRevokeVerificationResponse as SDKRevokeVerificationResponse,
263
+ type SDKVerifyTokenResponse as SDKVerifyTokenResponse,
62
264
  type SDKCreateSessionParams as SDKCreateSessionParams,
63
265
  type SDKCreateVerificationLinkParams as SDKCreateVerificationLinkParams,
64
266
  type SDKLogoutParams as SDKLogoutParams,
267
+ type SDKRevokeVerificationParams as SDKRevokeVerificationParams,
268
+ type SDKVerifyTokenParams as SDKVerifyTokenParams,
65
269
  };
66
270
  }
@@ -9,31 +9,117 @@ import { RequestOptions } from '../internal/request-options';
9
9
  */
10
10
  export class Verification extends APIResource {
11
11
  /**
12
- * Check verification status
12
+ * Poll for the current status of a verification request. Returns the full
13
+ * verification event including token on completion.
13
14
  */
14
- getStatus(options?: RequestOptions): APIPromise<VerificationGetStatusResponse> {
15
- return this._client.get('/verification/status', options);
15
+ getStatus(
16
+ query: VerificationGetStatusParams,
17
+ options?: RequestOptions,
18
+ ): APIPromise<VerificationGetStatusResponse> {
19
+ return this._client.get('/verification/status', { query, ...options });
16
20
  }
17
21
 
18
22
  /**
19
- * Look up user by email
23
+ * Check whether a user exists in BotShield and has a registered passkey before
24
+ * initiating verification.
20
25
  */
21
- lookupUserByEmail(options?: RequestOptions): APIPromise<VerificationLookupUserByEmailResponse> {
22
- return this._client.get('/verification/lookup-user-by-email', options);
26
+ lookupUserByEmail(
27
+ query: VerificationLookupUserByEmailParams,
28
+ options?: RequestOptions,
29
+ ): APIPromise<VerificationLookupUserByEmailResponse> {
30
+ return this._client.get('/verification/lookup-user-by-email', { query, ...options });
23
31
  }
24
32
  }
25
33
 
26
34
  export interface VerificationGetStatusResponse {
27
- data: unknown;
35
+ found: boolean;
36
+
37
+ status: 'pending' | 'completed' | 'expired' | 'failed' | 'not_found';
38
+
39
+ auth_mode?: 'email' | 'anonymous';
40
+
41
+ created_at?: string;
42
+
43
+ error_message?: string;
44
+
45
+ expires_at?: string;
46
+
47
+ metadata?: { [key: string]: unknown };
48
+
49
+ organization_id?: string;
50
+
51
+ partner_user_id?: string;
52
+
53
+ presence_address?: string;
54
+
55
+ request_id?: string;
56
+
57
+ scope?: string;
58
+
59
+ sdk_type?: 'signal' | 'presence';
60
+
61
+ /**
62
+ * Signed JWT verification receipt (present when status=completed)
63
+ */
64
+ signed_token?: string;
65
+
66
+ user_email?: string;
67
+
68
+ /**
69
+ * Legacy alias for signed_token
70
+ */
71
+ verification_token?: string;
72
+
73
+ verified_at?: string;
28
74
  }
29
75
 
30
76
  export interface VerificationLookupUserByEmailResponse {
31
- data: unknown;
77
+ data: VerificationLookupUserByEmailResponse.Data;
78
+ }
79
+
80
+ export namespace VerificationLookupUserByEmailResponse {
81
+ export interface Data {
82
+ /**
83
+ * Whether a user with this email exists in Clerk
84
+ */
85
+ found: boolean;
86
+
87
+ /**
88
+ * Whether the user has registered passkeys
89
+ */
90
+ has_passkey: boolean;
91
+
92
+ /**
93
+ * Whether the user account is active (not banned/deleted)
94
+ */
95
+ is_active: boolean;
96
+
97
+ /**
98
+ * Clerk user ID (only present if found)
99
+ */
100
+ clerk_user_id?: string;
101
+ }
102
+ }
103
+
104
+ export interface VerificationGetStatusParams {
105
+ /**
106
+ * The verification request ID from create-verification-link
107
+ */
108
+ request_id: string;
109
+ }
110
+
111
+ export interface VerificationLookupUserByEmailParams {
112
+ /**
113
+ * The user's email address
114
+ */
115
+ email: string;
32
116
  }
33
117
 
34
118
  export declare namespace Verification {
35
119
  export {
36
120
  type VerificationGetStatusResponse as VerificationGetStatusResponse,
37
121
  type VerificationLookupUserByEmailResponse as VerificationLookupUserByEmailResponse,
122
+ type VerificationGetStatusParams as VerificationGetStatusParams,
123
+ type VerificationLookupUserByEmailParams as VerificationLookupUserByEmailParams,
38
124
  };
39
125
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.2.4'; // x-release-please-version
1
+ export const VERSION = '1.3.1'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.2.4";
1
+ export declare const VERSION = "1.3.1";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.2.4";
1
+ export declare const VERSION = "1.3.1";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '1.2.4'; // x-release-please-version
4
+ exports.VERSION = '1.3.1'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '1.2.4'; // x-release-please-version
1
+ export const VERSION = '1.3.1'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map