botshield-sdk 1.2.3 → 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.
- package/CHANGELOG.md +38 -0
- package/README.md +47 -13
- package/client.d.mts +23 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +23 -5
- package/client.d.ts.map +1 -1
- package/client.js +26 -17
- package/client.js.map +1 -1
- package/client.mjs +26 -17
- package/client.mjs.map +1 -1
- package/internal/utils/query.d.mts +5 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +5 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +23 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +20 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils.d.mts +1 -0
- package/internal/utils.d.ts +1 -0
- package/internal/utils.js +1 -0
- package/internal/utils.js.map +1 -1
- package/internal/utils.mjs +1 -0
- package/package.json +7 -1
- package/resources/devices.d.mts +3 -0
- package/resources/devices.d.mts.map +1 -1
- package/resources/devices.d.ts +3 -0
- package/resources/devices.d.ts.map +1 -1
- package/resources/devices.js +3 -0
- package/resources/devices.js.map +1 -1
- package/resources/devices.mjs +3 -0
- package/resources/devices.mjs.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/organizations.d.mts +3 -0
- package/resources/organizations.d.mts.map +1 -1
- package/resources/organizations.d.ts +3 -0
- package/resources/organizations.d.ts.map +1 -1
- package/resources/organizations.js +3 -0
- package/resources/organizations.js.map +1 -1
- package/resources/organizations.mjs +3 -0
- package/resources/organizations.mjs.map +1 -1
- package/resources/pass.d.mts +3 -0
- package/resources/pass.d.mts.map +1 -1
- package/resources/pass.d.ts +3 -0
- package/resources/pass.d.ts.map +1 -1
- package/resources/pass.js +3 -0
- package/resources/pass.js.map +1 -1
- package/resources/pass.mjs +3 -0
- package/resources/pass.mjs.map +1 -1
- package/resources/sdk.d.mts +151 -7
- package/resources/sdk.d.mts.map +1 -1
- package/resources/sdk.d.ts +151 -7
- package/resources/sdk.d.ts.map +1 -1
- package/resources/sdk.js +20 -3
- package/resources/sdk.js.map +1 -1
- package/resources/sdk.mjs +20 -3
- package/resources/sdk.mjs.map +1 -1
- package/resources/users.d.mts +3 -0
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +3 -0
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +3 -0
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +3 -0
- package/resources/users.mjs.map +1 -1
- package/resources/verification.d.mts +68 -7
- package/resources/verification.d.mts.map +1 -1
- package/resources/verification.d.ts +68 -7
- package/resources/verification.d.ts.map +1 -1
- package/resources/verification.js +11 -6
- package/resources/verification.js.map +1 -1
- package/resources/verification.mjs +11 -6
- package/resources/verification.mjs.map +1 -1
- package/src/client.ts +41 -22
- package/src/internal/utils/query.ts +23 -0
- package/src/internal/utils.ts +1 -0
- package/src/resources/devices.ts +3 -0
- package/src/resources/index.ts +6 -0
- package/src/resources/organizations.ts +3 -0
- package/src/resources/pass.ts +3 -0
- package/src/resources/sdk.ts +216 -9
- package/src/resources/users.ts +3 -0
- package/src/resources/verification.ts +97 -8
- 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/src/resources/users.ts
CHANGED
|
@@ -4,6 +4,9 @@ import { APIResource } from '../core/resource';
|
|
|
4
4
|
import { APIPromise } from '../core/api-promise';
|
|
5
5
|
import { RequestOptions } from '../internal/request-options';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* SDK integration endpoints
|
|
9
|
+
*/
|
|
7
10
|
export class Users extends APIResource {
|
|
8
11
|
/**
|
|
9
12
|
* POST /users/update-metadata
|
|
@@ -4,33 +4,122 @@ import { APIResource } from '../core/resource';
|
|
|
4
4
|
import { APIPromise } from '../core/api-promise';
|
|
5
5
|
import { RequestOptions } from '../internal/request-options';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Verification status and lookup
|
|
9
|
+
*/
|
|
7
10
|
export class Verification extends APIResource {
|
|
8
11
|
/**
|
|
9
|
-
*
|
|
12
|
+
* Poll for the current status of a verification request. Returns the full
|
|
13
|
+
* verification event including token on completion.
|
|
10
14
|
*/
|
|
11
|
-
getStatus(
|
|
12
|
-
|
|
15
|
+
getStatus(
|
|
16
|
+
query: VerificationGetStatusParams,
|
|
17
|
+
options?: RequestOptions,
|
|
18
|
+
): APIPromise<VerificationGetStatusResponse> {
|
|
19
|
+
return this._client.get('/verification/status', { query, ...options });
|
|
13
20
|
}
|
|
14
21
|
|
|
15
22
|
/**
|
|
16
|
-
*
|
|
23
|
+
* Check whether a user exists in BotShield and has a registered passkey before
|
|
24
|
+
* initiating verification.
|
|
17
25
|
*/
|
|
18
|
-
lookupUserByEmail(
|
|
19
|
-
|
|
26
|
+
lookupUserByEmail(
|
|
27
|
+
query: VerificationLookupUserByEmailParams,
|
|
28
|
+
options?: RequestOptions,
|
|
29
|
+
): APIPromise<VerificationLookupUserByEmailResponse> {
|
|
30
|
+
return this._client.get('/verification/lookup-user-by-email', { query, ...options });
|
|
20
31
|
}
|
|
21
32
|
}
|
|
22
33
|
|
|
23
34
|
export interface VerificationGetStatusResponse {
|
|
24
|
-
|
|
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;
|
|
25
74
|
}
|
|
26
75
|
|
|
27
76
|
export interface VerificationLookupUserByEmailResponse {
|
|
28
|
-
data:
|
|
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;
|
|
29
116
|
}
|
|
30
117
|
|
|
31
118
|
export declare namespace Verification {
|
|
32
119
|
export {
|
|
33
120
|
type VerificationGetStatusResponse as VerificationGetStatusResponse,
|
|
34
121
|
type VerificationLookupUserByEmailResponse as VerificationLookupUserByEmailResponse,
|
|
122
|
+
type VerificationGetStatusParams as VerificationGetStatusParams,
|
|
123
|
+
type VerificationLookupUserByEmailParams as VerificationLookupUserByEmailParams,
|
|
35
124
|
};
|
|
36
125
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
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.
|
|
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.
|
|
1
|
+
export declare const VERSION = "1.3.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.3.1'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|