botshield-sdk 1.3.1 → 1.4.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.
- package/CHANGELOG.md +34 -0
- package/README.md +15 -0
- package/client.d.mts +4 -28
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -28
- package/client.d.ts.map +1 -1
- package/client.js +2 -26
- package/client.js.map +1 -1
- package/client.mjs +2 -26
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +1 -5
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -5
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -9
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +0 -4
- package/resources/index.mjs.map +1 -1
- package/resources/sdk.d.mts +123 -46
- package/resources/sdk.d.mts.map +1 -1
- package/resources/sdk.d.ts +123 -46
- package/resources/sdk.d.ts.map +1 -1
- package/resources/sdk.js +33 -8
- package/resources/sdk.js.map +1 -1
- package/resources/sdk.mjs +33 -8
- package/resources/sdk.mjs.map +1 -1
- package/resources/verification.d.mts +13 -33
- package/resources/verification.d.mts.map +1 -1
- package/resources/verification.d.ts +13 -33
- package/resources/verification.d.ts.map +1 -1
- package/resources/verification.js +4 -5
- package/resources/verification.js.map +1 -1
- package/resources/verification.mjs +4 -5
- package/resources/verification.mjs.map +1 -1
- package/src/client.ts +14 -54
- package/src/resources/index.ts +6 -8
- package/src/resources/sdk.ts +181 -48
- package/src/resources/verification.ts +19 -37
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/devices.d.mts +0 -21
- package/resources/devices.d.mts.map +0 -1
- package/resources/devices.d.ts +0 -21
- package/resources/devices.d.ts.map +0 -1
- package/resources/devices.js +0 -18
- package/resources/devices.js.map +0 -1
- package/resources/devices.mjs +0 -14
- package/resources/devices.mjs.map +0 -1
- package/resources/organizations.d.mts +0 -21
- package/resources/organizations.d.mts.map +0 -1
- package/resources/organizations.d.ts +0 -21
- package/resources/organizations.d.ts.map +0 -1
- package/resources/organizations.js +0 -18
- package/resources/organizations.js.map +0 -1
- package/resources/organizations.mjs +0 -14
- package/resources/organizations.mjs.map +0 -1
- package/resources/pass.d.mts +0 -21
- package/resources/pass.d.mts.map +0 -1
- package/resources/pass.d.ts +0 -21
- package/resources/pass.d.ts.map +0 -1
- package/resources/pass.js +0 -18
- package/resources/pass.js.map +0 -1
- package/resources/pass.mjs +0 -14
- package/resources/pass.mjs.map +0 -1
- package/resources/users.d.mts +0 -21
- package/resources/users.d.mts.map +0 -1
- package/resources/users.d.ts +0 -21
- package/resources/users.d.ts.map +0 -1
- package/resources/users.js +0 -18
- package/resources/users.js.map +0 -1
- package/resources/users.mjs +0 -14
- package/resources/users.mjs.map +0 -1
- package/src/resources/devices.ts +0 -27
- package/src/resources/organizations.ts +0 -33
- package/src/resources/pass.ts +0 -27
- package/src/resources/users.ts +0 -33
package/src/resources/sdk.ts
CHANGED
|
@@ -5,11 +5,12 @@ import { APIPromise } from '../core/api-promise';
|
|
|
5
5
|
import { RequestOptions } from '../internal/request-options';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* SDK
|
|
8
|
+
* Core SDK operations — session management, verification, token validation, and Signal Pixel scoring
|
|
9
9
|
*/
|
|
10
10
|
export class SDK extends APIResource {
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Creates a short-lived anchor grant token (5 minutes) from an API token or site
|
|
13
|
+
* key. Use this to get a token before creating verification links.
|
|
13
14
|
*/
|
|
14
15
|
createSession(
|
|
15
16
|
body: SDKCreateSessionParams,
|
|
@@ -19,7 +20,8 @@ export class SDK extends APIResource {
|
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
/**
|
|
22
|
-
*
|
|
23
|
+
* Creates a verification request with deep link, web URL, and QR code. Requires an
|
|
24
|
+
* anchor grant token from create-session.
|
|
23
25
|
*/
|
|
24
26
|
createVerificationLink(
|
|
25
27
|
body: SDKCreateVerificationLinkParams,
|
|
@@ -29,16 +31,26 @@ export class SDK extends APIResource {
|
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
/**
|
|
32
|
-
*
|
|
34
|
+
* Returns enabled integrations (Turnstile, etc.) for a site key. Public config
|
|
35
|
+
* only — secret keys never exposed.
|
|
36
|
+
*/
|
|
37
|
+
getPartnerConfig(
|
|
38
|
+
query: SDKGetPartnerConfigParams,
|
|
39
|
+
options?: RequestOptions,
|
|
40
|
+
): APIPromise<SDKGetPartnerConfigResponse> {
|
|
41
|
+
return this._client.get('/sdk/partner-config', { query, ...options });
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Revoke an Anchor Grant Window token
|
|
33
46
|
*/
|
|
34
47
|
logout(body: SDKLogoutParams, options?: RequestOptions): APIPromise<SDKLogoutResponse> {
|
|
35
48
|
return this._client.post('/sdk/logout', { body, ...options });
|
|
36
49
|
}
|
|
37
50
|
|
|
38
51
|
/**
|
|
39
|
-
* Soft-expires
|
|
40
|
-
*
|
|
41
|
-
* pending verification is blocking a new request.
|
|
52
|
+
* Soft-expires a pending verification for a scope and user. Use when
|
|
53
|
+
* create-verification-link returns 409.
|
|
42
54
|
*/
|
|
43
55
|
revokeVerification(
|
|
44
56
|
body: SDKRevokeVerificationParams,
|
|
@@ -48,7 +60,29 @@ export class SDK extends APIResource {
|
|
|
48
60
|
}
|
|
49
61
|
|
|
50
62
|
/**
|
|
51
|
-
*
|
|
63
|
+
* Stores a behavioral fingerprint score server-side and returns an opaque
|
|
64
|
+
* signal*token (bs_sig*...). The client-side score can be spoofed — the
|
|
65
|
+
* signal_token maps to the real score in BotShield's database.
|
|
66
|
+
*/
|
|
67
|
+
storeSignal(body: SDKStoreSignalParams, options?: RequestOptions): APIPromise<SDKStoreSignalResponse> {
|
|
68
|
+
return this._client.post('/sdk/store-signal', { body, ...options });
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Validates a signal_token and returns the real server-side bot score. One-time
|
|
73
|
+
* use, 10-minute expiry. This is the tamper-proof check.
|
|
74
|
+
*/
|
|
75
|
+
validateSignal(
|
|
76
|
+
body: SDKValidateSignalParams,
|
|
77
|
+
options?: RequestOptions,
|
|
78
|
+
): APIPromise<SDKValidateSignalResponse> {
|
|
79
|
+
return this._client.post('/sdk/validate-signal', { body, ...options });
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Validates a signed JWT verification receipt. This is the primary server-side
|
|
84
|
+
* check. Optionally include signal_token for combined confidence scoring with
|
|
85
|
+
* Signal Pixel + Turnstile + passkey results.
|
|
52
86
|
*/
|
|
53
87
|
verifyToken(body: SDKVerifyTokenParams, options?: RequestOptions): APIPromise<SDKVerifyTokenResponse> {
|
|
54
88
|
return this._client.post('/sdk/verify-token', { body, ...options });
|
|
@@ -66,7 +100,7 @@ export namespace SDKCreateSessionResponse {
|
|
|
66
100
|
anchor_grant_expires_in_seconds: number;
|
|
67
101
|
|
|
68
102
|
/**
|
|
69
|
-
* Canonical grant token (Bearer bss\_\*)
|
|
103
|
+
* Canonical grant token (Bearer bss\_\*)
|
|
70
104
|
*/
|
|
71
105
|
anchor_grant_token: string;
|
|
72
106
|
|
|
@@ -77,16 +111,13 @@ export namespace SDKCreateSessionResponse {
|
|
|
77
111
|
organization: Data.Organization;
|
|
78
112
|
|
|
79
113
|
/**
|
|
80
|
-
* Legacy alias
|
|
114
|
+
* Legacy alias (backward compatibility)
|
|
81
115
|
*/
|
|
82
116
|
session_token: string;
|
|
83
117
|
}
|
|
84
118
|
|
|
85
119
|
export namespace Data {
|
|
86
120
|
export interface Organization {
|
|
87
|
-
/**
|
|
88
|
-
* Clerk Organization ID (partner)
|
|
89
|
-
*/
|
|
90
121
|
id: string;
|
|
91
122
|
|
|
92
123
|
environment: string;
|
|
@@ -104,22 +135,16 @@ export namespace SDKCreateVerificationLinkResponse {
|
|
|
104
135
|
|
|
105
136
|
expires_at: string;
|
|
106
137
|
|
|
107
|
-
organization: Data.Organization;
|
|
108
|
-
|
|
109
138
|
qr_code_url: string;
|
|
110
139
|
|
|
111
140
|
request_id: string;
|
|
112
141
|
|
|
113
142
|
web_url: string;
|
|
114
143
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
auth_mode?: 'email' | 'anonymous';
|
|
144
|
+
auth_mode?: 'linked-account' | 'private';
|
|
145
|
+
|
|
146
|
+
organization?: Data.Organization;
|
|
119
147
|
|
|
120
|
-
/**
|
|
121
|
-
* Explicit action scope. Evaluated at action time.
|
|
122
|
-
*/
|
|
123
148
|
scope?: string;
|
|
124
149
|
|
|
125
150
|
sdk_type?: 'signal' | 'presence';
|
|
@@ -127,18 +152,34 @@ export namespace SDKCreateVerificationLinkResponse {
|
|
|
127
152
|
|
|
128
153
|
export namespace Data {
|
|
129
154
|
export interface Organization {
|
|
130
|
-
id
|
|
155
|
+
id?: string;
|
|
131
156
|
}
|
|
132
157
|
}
|
|
133
158
|
}
|
|
134
159
|
|
|
135
|
-
export interface
|
|
136
|
-
|
|
160
|
+
export interface SDKGetPartnerConfigResponse {
|
|
161
|
+
environment?: 'test' | 'live';
|
|
162
|
+
|
|
163
|
+
integrations?: { [key: string]: SDKGetPartnerConfigResponse.Integrations };
|
|
164
|
+
}
|
|
137
165
|
|
|
166
|
+
export namespace SDKGetPartnerConfigResponse {
|
|
167
|
+
export interface Integrations {
|
|
168
|
+
config?: unknown;
|
|
169
|
+
|
|
170
|
+
enabled?: boolean;
|
|
171
|
+
|
|
172
|
+
site_key?: string;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export interface SDKLogoutResponse {
|
|
138
177
|
message?: string;
|
|
139
178
|
|
|
140
179
|
revoked_at?: string;
|
|
141
180
|
|
|
181
|
+
success?: boolean;
|
|
182
|
+
|
|
142
183
|
token_found?: boolean;
|
|
143
184
|
}
|
|
144
185
|
|
|
@@ -148,28 +189,61 @@ export interface SDKRevokeVerificationResponse {
|
|
|
148
189
|
|
|
149
190
|
export namespace SDKRevokeVerificationResponse {
|
|
150
191
|
export interface Data {
|
|
151
|
-
|
|
152
|
-
* Number of pending verifications that were revoked
|
|
153
|
-
*/
|
|
154
|
-
revoked_count: number;
|
|
192
|
+
message?: string;
|
|
155
193
|
|
|
156
|
-
|
|
194
|
+
revoked_count?: number;
|
|
157
195
|
|
|
158
|
-
|
|
196
|
+
success?: boolean;
|
|
159
197
|
}
|
|
160
198
|
}
|
|
161
199
|
|
|
200
|
+
export interface SDKStoreSignalResponse {
|
|
201
|
+
expires_at?: string;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Opaque tamper-proof token (bs*sig*...)
|
|
205
|
+
*/
|
|
206
|
+
signal_token?: string;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export interface SDKValidateSignalResponse {
|
|
210
|
+
client_score?: number;
|
|
211
|
+
|
|
212
|
+
country?: string;
|
|
213
|
+
|
|
214
|
+
created_at?: string;
|
|
215
|
+
|
|
216
|
+
edge_score?: number;
|
|
217
|
+
|
|
218
|
+
fp_hash?: string;
|
|
219
|
+
|
|
220
|
+
reason?: string;
|
|
221
|
+
|
|
222
|
+
score?: number;
|
|
223
|
+
|
|
224
|
+
site_key?: string;
|
|
225
|
+
|
|
226
|
+
valid?: boolean;
|
|
227
|
+
}
|
|
228
|
+
|
|
162
229
|
export interface SDKVerifyTokenResponse {
|
|
163
230
|
claims?: SDKVerifyTokenResponse.Claims;
|
|
164
231
|
|
|
232
|
+
/**
|
|
233
|
+
* Combined confidence (passkey + signals + integrations)
|
|
234
|
+
*/
|
|
235
|
+
confidence?: number;
|
|
236
|
+
|
|
165
237
|
reason?: string;
|
|
166
238
|
|
|
239
|
+
signals?: SDKVerifyTokenResponse.Signals;
|
|
240
|
+
|
|
167
241
|
valid?: boolean;
|
|
168
242
|
}
|
|
169
243
|
|
|
170
244
|
export namespace SDKVerifyTokenResponse {
|
|
171
245
|
export interface Claims {
|
|
172
|
-
auth_mode?: '
|
|
246
|
+
auth_mode?: 'linked-account' | 'private';
|
|
173
247
|
|
|
174
248
|
botshield_user_id?: string;
|
|
175
249
|
|
|
@@ -189,27 +263,50 @@ export namespace SDKVerifyTokenResponse {
|
|
|
189
263
|
|
|
190
264
|
verified?: boolean;
|
|
191
265
|
}
|
|
266
|
+
|
|
267
|
+
export interface Signals {
|
|
268
|
+
/**
|
|
269
|
+
* Signal Pixel score (0-100)
|
|
270
|
+
*/
|
|
271
|
+
botshield_score?: number;
|
|
272
|
+
|
|
273
|
+
passkey?: Signals.Passkey;
|
|
274
|
+
|
|
275
|
+
turnstile?: Signals.Turnstile;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export namespace Signals {
|
|
279
|
+
export interface Passkey {
|
|
280
|
+
verified?: boolean;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
export interface Turnstile {
|
|
284
|
+
success?: boolean;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
192
287
|
}
|
|
193
288
|
|
|
194
289
|
export interface SDKCreateSessionParams {
|
|
195
290
|
metadata?: { [key: string]: unknown };
|
|
196
291
|
|
|
292
|
+
/**
|
|
293
|
+
* Your internal user identifier for correlation
|
|
294
|
+
*/
|
|
197
295
|
partner_user_id?: string;
|
|
198
296
|
}
|
|
199
297
|
|
|
200
298
|
export interface SDKCreateVerificationLinkParams {
|
|
201
299
|
/**
|
|
202
|
-
* Returning
|
|
203
|
-
* verification to skip onboarding
|
|
300
|
+
* Returning user ID to skip onboarding
|
|
204
301
|
*/
|
|
205
302
|
botshield_user_id?: string;
|
|
206
303
|
|
|
207
304
|
metadata?: { [key: string]: unknown };
|
|
208
305
|
|
|
209
306
|
/**
|
|
210
|
-
*
|
|
307
|
+
* linked-account = OAuth+passkey, private = direct WebAuthn (no PII)
|
|
211
308
|
*/
|
|
212
|
-
mode?: '
|
|
309
|
+
mode?: 'linked-account' | 'private';
|
|
213
310
|
|
|
214
311
|
return_url?: string;
|
|
215
312
|
|
|
@@ -217,54 +314,90 @@ export interface SDKCreateVerificationLinkParams {
|
|
|
217
314
|
|
|
218
315
|
sdk_type?: 'signal' | 'presence';
|
|
219
316
|
|
|
317
|
+
/**
|
|
318
|
+
* Tamper-proof Signal Pixel token (bs*sig*...) for server-side score correlation
|
|
319
|
+
*/
|
|
320
|
+
signal_token?: string;
|
|
321
|
+
|
|
220
322
|
user_email?: string;
|
|
221
323
|
|
|
222
324
|
webhook_url?: string;
|
|
223
325
|
}
|
|
224
326
|
|
|
327
|
+
export interface SDKGetPartnerConfigParams {
|
|
328
|
+
site_key: string;
|
|
329
|
+
}
|
|
330
|
+
|
|
225
331
|
export interface SDKLogoutParams {
|
|
226
332
|
/**
|
|
227
|
-
*
|
|
333
|
+
* The anchor grant token (bss\_\*) to revoke
|
|
228
334
|
*/
|
|
229
335
|
session_token: string;
|
|
230
336
|
}
|
|
231
337
|
|
|
232
338
|
export interface SDKRevokeVerificationParams {
|
|
233
|
-
/**
|
|
234
|
-
* The scope/action name to revoke pending verifications for
|
|
235
|
-
*/
|
|
236
339
|
scope: string;
|
|
237
340
|
|
|
238
|
-
/**
|
|
239
|
-
* Partner user ID to match. At least one of user_email or partner_user_id is
|
|
240
|
-
* required.
|
|
241
|
-
*/
|
|
242
341
|
partner_user_id?: string;
|
|
243
342
|
|
|
244
|
-
/**
|
|
245
|
-
* User email to match. At least one of user_email or partner_user_id is required.
|
|
246
|
-
*/
|
|
247
343
|
user_email?: string;
|
|
248
344
|
}
|
|
249
345
|
|
|
346
|
+
export interface SDKStoreSignalParams {
|
|
347
|
+
score: number;
|
|
348
|
+
|
|
349
|
+
site_key: string;
|
|
350
|
+
|
|
351
|
+
client_score?: number;
|
|
352
|
+
|
|
353
|
+
country?: string;
|
|
354
|
+
|
|
355
|
+
edge_score?: number;
|
|
356
|
+
|
|
357
|
+
fp_hash?: string;
|
|
358
|
+
|
|
359
|
+
ip_hash?: string;
|
|
360
|
+
|
|
361
|
+
signals?: unknown;
|
|
362
|
+
|
|
363
|
+
ua_hash?: string;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
export interface SDKValidateSignalParams {
|
|
367
|
+
signal_token: string;
|
|
368
|
+
|
|
369
|
+
verification_event_id?: string;
|
|
370
|
+
}
|
|
371
|
+
|
|
250
372
|
export interface SDKVerifyTokenParams {
|
|
251
373
|
/**
|
|
252
|
-
*
|
|
374
|
+
* JWT verification receipt
|
|
253
375
|
*/
|
|
254
376
|
token: string;
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Optional Signal Pixel token for combined confidence
|
|
380
|
+
*/
|
|
381
|
+
signal_token?: string;
|
|
255
382
|
}
|
|
256
383
|
|
|
257
384
|
export declare namespace SDK {
|
|
258
385
|
export {
|
|
259
386
|
type SDKCreateSessionResponse as SDKCreateSessionResponse,
|
|
260
387
|
type SDKCreateVerificationLinkResponse as SDKCreateVerificationLinkResponse,
|
|
388
|
+
type SDKGetPartnerConfigResponse as SDKGetPartnerConfigResponse,
|
|
261
389
|
type SDKLogoutResponse as SDKLogoutResponse,
|
|
262
390
|
type SDKRevokeVerificationResponse as SDKRevokeVerificationResponse,
|
|
391
|
+
type SDKStoreSignalResponse as SDKStoreSignalResponse,
|
|
392
|
+
type SDKValidateSignalResponse as SDKValidateSignalResponse,
|
|
263
393
|
type SDKVerifyTokenResponse as SDKVerifyTokenResponse,
|
|
264
394
|
type SDKCreateSessionParams as SDKCreateSessionParams,
|
|
265
395
|
type SDKCreateVerificationLinkParams as SDKCreateVerificationLinkParams,
|
|
396
|
+
type SDKGetPartnerConfigParams as SDKGetPartnerConfigParams,
|
|
266
397
|
type SDKLogoutParams as SDKLogoutParams,
|
|
267
398
|
type SDKRevokeVerificationParams as SDKRevokeVerificationParams,
|
|
399
|
+
type SDKStoreSignalParams as SDKStoreSignalParams,
|
|
400
|
+
type SDKValidateSignalParams as SDKValidateSignalParams,
|
|
268
401
|
type SDKVerifyTokenParams as SDKVerifyTokenParams,
|
|
269
402
|
};
|
|
270
403
|
}
|
|
@@ -5,12 +5,11 @@ import { APIPromise } from '../core/api-promise';
|
|
|
5
5
|
import { RequestOptions } from '../internal/request-options';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* Verification status and lookup
|
|
8
|
+
* Verification status checking and user lookup
|
|
9
9
|
*/
|
|
10
10
|
export class Verification extends APIResource {
|
|
11
11
|
/**
|
|
12
|
-
* Poll for
|
|
13
|
-
* verification event including token on completion.
|
|
12
|
+
* Poll for verification request status. Returns signed token on completion.
|
|
14
13
|
*/
|
|
15
14
|
getStatus(
|
|
16
15
|
query: VerificationGetStatusParams,
|
|
@@ -20,8 +19,8 @@ export class Verification extends APIResource {
|
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
/**
|
|
23
|
-
* Check whether a user exists
|
|
24
|
-
*
|
|
22
|
+
* Check whether a user exists and has a registered passkey before initiating
|
|
23
|
+
* verification.
|
|
25
24
|
*/
|
|
26
25
|
lookupUserByEmail(
|
|
27
26
|
query: VerificationLookupUserByEmailParams,
|
|
@@ -32,11 +31,9 @@ export class Verification extends APIResource {
|
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
export interface VerificationGetStatusResponse {
|
|
35
|
-
|
|
34
|
+
auth_mode?: 'linked-account' | 'private';
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
auth_mode?: 'email' | 'anonymous';
|
|
36
|
+
confidence?: number;
|
|
40
37
|
|
|
41
38
|
created_at?: string;
|
|
42
39
|
|
|
@@ -44,6 +41,8 @@ export interface VerificationGetStatusResponse {
|
|
|
44
41
|
|
|
45
42
|
expires_at?: string;
|
|
46
43
|
|
|
44
|
+
found?: boolean;
|
|
45
|
+
|
|
47
46
|
metadata?: { [key: string]: unknown };
|
|
48
47
|
|
|
49
48
|
organization_id?: string;
|
|
@@ -58,15 +57,16 @@ export interface VerificationGetStatusResponse {
|
|
|
58
57
|
|
|
59
58
|
sdk_type?: 'signal' | 'presence';
|
|
60
59
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
*/
|
|
60
|
+
signal_score?: number;
|
|
61
|
+
|
|
64
62
|
signed_token?: string;
|
|
65
63
|
|
|
64
|
+
status?: 'pending' | 'completed' | 'expired' | 'failed' | 'not_found';
|
|
65
|
+
|
|
66
66
|
user_email?: string;
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
|
-
* Legacy alias
|
|
69
|
+
* Legacy alias
|
|
70
70
|
*/
|
|
71
71
|
verification_token?: string;
|
|
72
72
|
|
|
@@ -79,39 +79,21 @@ export interface VerificationLookupUserByEmailResponse {
|
|
|
79
79
|
|
|
80
80
|
export namespace VerificationLookupUserByEmailResponse {
|
|
81
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
82
|
clerk_user_id?: string;
|
|
83
|
+
|
|
84
|
+
found?: boolean;
|
|
85
|
+
|
|
86
|
+
has_passkey?: boolean;
|
|
87
|
+
|
|
88
|
+
is_active?: boolean;
|
|
101
89
|
}
|
|
102
90
|
}
|
|
103
91
|
|
|
104
92
|
export interface VerificationGetStatusParams {
|
|
105
|
-
/**
|
|
106
|
-
* The verification request ID from create-verification-link
|
|
107
|
-
*/
|
|
108
93
|
request_id: string;
|
|
109
94
|
}
|
|
110
95
|
|
|
111
96
|
export interface VerificationLookupUserByEmailParams {
|
|
112
|
-
/**
|
|
113
|
-
* The user's email address
|
|
114
|
-
*/
|
|
115
97
|
email: string;
|
|
116
98
|
}
|
|
117
99
|
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.4.1'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.4.1";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.4.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.4.1'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/resources/devices.d.mts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../core/resource.mjs";
|
|
2
|
-
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
-
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
-
/**
|
|
5
|
-
* Device management
|
|
6
|
-
*/
|
|
7
|
-
export declare class Devices extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Remove device and associated passkeys
|
|
10
|
-
*/
|
|
11
|
-
remove(body: DeviceRemoveParams, options?: RequestOptions): APIPromise<DeviceRemoveResponse>;
|
|
12
|
-
}
|
|
13
|
-
export interface DeviceRemoveResponse {
|
|
14
|
-
data: unknown;
|
|
15
|
-
}
|
|
16
|
-
export interface DeviceRemoveParams {
|
|
17
|
-
}
|
|
18
|
-
export declare namespace Devices {
|
|
19
|
-
export { type DeviceRemoveResponse as DeviceRemoveResponse, type DeviceRemoveParams as DeviceRemoveParams };
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=devices.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"devices.d.mts","sourceRoot":"","sources":["../src/resources/devices.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;CAG7F;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;CAAG;AAEtC,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EAAE,KAAK,oBAAoB,IAAI,oBAAoB,EAAE,KAAK,kBAAkB,IAAI,kBAAkB,EAAE,CAAC;CAC7G"}
|
package/resources/devices.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../core/resource.js";
|
|
2
|
-
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
-
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
-
/**
|
|
5
|
-
* Device management
|
|
6
|
-
*/
|
|
7
|
-
export declare class Devices extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Remove device and associated passkeys
|
|
10
|
-
*/
|
|
11
|
-
remove(body: DeviceRemoveParams, options?: RequestOptions): APIPromise<DeviceRemoveResponse>;
|
|
12
|
-
}
|
|
13
|
-
export interface DeviceRemoveResponse {
|
|
14
|
-
data: unknown;
|
|
15
|
-
}
|
|
16
|
-
export interface DeviceRemoveParams {
|
|
17
|
-
}
|
|
18
|
-
export declare namespace Devices {
|
|
19
|
-
export { type DeviceRemoveResponse as DeviceRemoveResponse, type DeviceRemoveParams as DeviceRemoveParams };
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=devices.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"devices.d.ts","sourceRoot":"","sources":["../src/resources/devices.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;CAG7F;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;CAAG;AAEtC,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EAAE,KAAK,oBAAoB,IAAI,oBAAoB,EAAE,KAAK,kBAAkB,IAAI,kBAAkB,EAAE,CAAC;CAC7G"}
|
package/resources/devices.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Devices = void 0;
|
|
5
|
-
const resource_1 = require("../core/resource.js");
|
|
6
|
-
/**
|
|
7
|
-
* Device management
|
|
8
|
-
*/
|
|
9
|
-
class Devices extends resource_1.APIResource {
|
|
10
|
-
/**
|
|
11
|
-
* Remove device and associated passkeys
|
|
12
|
-
*/
|
|
13
|
-
remove(body, options) {
|
|
14
|
-
return this._client.post('/devices/remove', { body, ...options });
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.Devices = Devices;
|
|
18
|
-
//# sourceMappingURL=devices.js.map
|
package/resources/devices.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"devices.js","sourceRoot":"","sources":["../src/resources/devices.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C;;GAEG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAwB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;CACF;AAPD,0BAOC"}
|
package/resources/devices.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../core/resource.mjs";
|
|
3
|
-
/**
|
|
4
|
-
* Device management
|
|
5
|
-
*/
|
|
6
|
-
export class Devices extends APIResource {
|
|
7
|
-
/**
|
|
8
|
-
* Remove device and associated passkeys
|
|
9
|
-
*/
|
|
10
|
-
remove(body, options) {
|
|
11
|
-
return this._client.post('/devices/remove', { body, ...options });
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=devices.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"devices.mjs","sourceRoot":"","sources":["../src/resources/devices.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAwB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;CACF"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../core/resource.mjs";
|
|
2
|
-
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
-
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
-
/**
|
|
5
|
-
* SDK integration endpoints
|
|
6
|
-
*/
|
|
7
|
-
export declare class Organizations extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* POST /organizations/add-member
|
|
10
|
-
*/
|
|
11
|
-
addMember(body: OrganizationAddMemberParams, options?: RequestOptions): APIPromise<OrganizationAddMemberResponse>;
|
|
12
|
-
}
|
|
13
|
-
export interface OrganizationAddMemberResponse {
|
|
14
|
-
data: unknown;
|
|
15
|
-
}
|
|
16
|
-
export interface OrganizationAddMemberParams {
|
|
17
|
-
}
|
|
18
|
-
export declare namespace Organizations {
|
|
19
|
-
export { type OrganizationAddMemberResponse as OrganizationAddMemberResponse, type OrganizationAddMemberParams as OrganizationAddMemberParams, };
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=organizations.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.d.mts","sourceRoot":"","sources":["../src/resources/organizations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB;;GAEG;AACH,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;OAEG;IACH,SAAS,CACP,IAAI,EAAE,2BAA2B,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,6BAA6B,CAAC;CAG7C;AAED,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,2BAA2B;CAAG;AAE/C,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,2BAA2B,IAAI,2BAA2B,GAChE,CAAC;CACH"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../core/resource.js";
|
|
2
|
-
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
-
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
-
/**
|
|
5
|
-
* SDK integration endpoints
|
|
6
|
-
*/
|
|
7
|
-
export declare class Organizations extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* POST /organizations/add-member
|
|
10
|
-
*/
|
|
11
|
-
addMember(body: OrganizationAddMemberParams, options?: RequestOptions): APIPromise<OrganizationAddMemberResponse>;
|
|
12
|
-
}
|
|
13
|
-
export interface OrganizationAddMemberResponse {
|
|
14
|
-
data: unknown;
|
|
15
|
-
}
|
|
16
|
-
export interface OrganizationAddMemberParams {
|
|
17
|
-
}
|
|
18
|
-
export declare namespace Organizations {
|
|
19
|
-
export { type OrganizationAddMemberResponse as OrganizationAddMemberResponse, type OrganizationAddMemberParams as OrganizationAddMemberParams, };
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=organizations.d.ts.map
|