botshield-sdk 1.0.0 → 1.2.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 (72) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +15 -41
  3. package/client.d.mts +10 -4
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +10 -4
  6. package/client.d.ts.map +1 -1
  7. package/client.js +6 -0
  8. package/client.js.map +1 -1
  9. package/client.mjs +6 -0
  10. package/client.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/devices.d.mts +1 -12
  13. package/resources/devices.d.mts.map +1 -1
  14. package/resources/devices.d.ts +1 -12
  15. package/resources/devices.d.ts.map +1 -1
  16. package/resources/index.d.mts +4 -2
  17. package/resources/index.d.mts.map +1 -1
  18. package/resources/index.d.ts +4 -2
  19. package/resources/index.d.ts.map +1 -1
  20. package/resources/index.js +5 -1
  21. package/resources/index.js.map +1 -1
  22. package/resources/index.mjs +2 -0
  23. package/resources/index.mjs.map +1 -1
  24. package/resources/organizations.d.mts +18 -0
  25. package/resources/organizations.d.mts.map +1 -0
  26. package/resources/organizations.d.ts +18 -0
  27. package/resources/organizations.d.ts.map +1 -0
  28. package/resources/organizations.js +15 -0
  29. package/resources/organizations.js.map +1 -0
  30. package/resources/organizations.mjs +11 -0
  31. package/resources/organizations.mjs.map +1 -0
  32. package/resources/pass.d.mts +1 -22
  33. package/resources/pass.d.mts.map +1 -1
  34. package/resources/pass.d.ts +1 -22
  35. package/resources/pass.d.ts.map +1 -1
  36. package/resources/sdk.d.mts +11 -122
  37. package/resources/sdk.d.mts.map +1 -1
  38. package/resources/sdk.d.ts +11 -122
  39. package/resources/sdk.d.ts.map +1 -1
  40. package/resources/sdk.js +6 -0
  41. package/resources/sdk.js.map +1 -1
  42. package/resources/sdk.mjs +6 -0
  43. package/resources/sdk.mjs.map +1 -1
  44. package/resources/users.d.mts +18 -0
  45. package/resources/users.d.mts.map +1 -0
  46. package/resources/users.d.ts +18 -0
  47. package/resources/users.d.ts.map +1 -0
  48. package/resources/users.js +15 -0
  49. package/resources/users.js.map +1 -0
  50. package/resources/users.mjs +11 -0
  51. package/resources/users.mjs.map +1 -0
  52. package/resources/verification.d.mts +5 -73
  53. package/resources/verification.d.mts.map +1 -1
  54. package/resources/verification.d.ts +5 -73
  55. package/resources/verification.d.ts.map +1 -1
  56. package/resources/verification.js +4 -4
  57. package/resources/verification.js.map +1 -1
  58. package/resources/verification.mjs +4 -4
  59. package/resources/verification.mjs.map +1 -1
  60. package/src/client.ts +26 -4
  61. package/src/resources/devices.ts +2 -17
  62. package/src/resources/index.ts +8 -2
  63. package/src/resources/organizations.ts +30 -0
  64. package/src/resources/pass.ts +2 -28
  65. package/src/resources/sdk.ts +16 -143
  66. package/src/resources/users.ts +30 -0
  67. package/src/resources/verification.ts +6 -105
  68. package/src/version.ts +1 -1
  69. package/version.d.mts +1 -1
  70. package/version.d.ts +1 -1
  71. package/version.js +1 -1
  72. package/version.mjs +1 -1
@@ -5,87 +5,19 @@ export declare class Verification extends APIResource {
5
5
  /**
6
6
  * Check verification status
7
7
  */
8
- getStatus(query: VerificationGetStatusParams, options?: RequestOptions): APIPromise<VerificationGetStatusResponse>;
8
+ getStatus(options?: RequestOptions): APIPromise<VerificationGetStatusResponse>;
9
9
  /**
10
10
  * Look up user by email
11
11
  */
12
- lookupUserByEmail(query: VerificationLookupUserByEmailParams, options?: RequestOptions): APIPromise<VerificationLookupUserByEmailResponse>;
12
+ lookupUserByEmail(options?: RequestOptions): APIPromise<VerificationLookupUserByEmailResponse>;
13
13
  }
14
14
  export interface VerificationGetStatusResponse {
15
- data: VerificationGetStatusResponse.UnionMember0 | VerificationGetStatusResponse.UnionMember1;
16
- }
17
- export declare namespace VerificationGetStatusResponse {
18
- interface UnionMember0 {
19
- created_at: string;
20
- expires_at: string;
21
- found: true;
22
- organization_id: string;
23
- request_id: string;
24
- /**
25
- * Verification status
26
- */
27
- status: 'pending' | 'verified' | 'failed' | 'expired' | 'cancelled';
28
- error_message?: string | null;
29
- metadata?: {
30
- [key: string]: unknown;
31
- } | null;
32
- partner_user_id?: string | null;
33
- user_email?: string | null;
34
- verified_at?: string | null;
35
- }
36
- interface UnionMember1 {
37
- found: false;
38
- /**
39
- * Error message
40
- */
41
- message: string;
42
- status: 'error';
43
- }
15
+ data: unknown;
44
16
  }
45
17
  export interface VerificationLookupUserByEmailResponse {
46
- data: VerificationLookupUserByEmailResponse.UnionMember0 | VerificationLookupUserByEmailResponse.UnionMember1;
47
- }
48
- export declare namespace VerificationLookupUserByEmailResponse {
49
- interface UnionMember0 {
50
- /**
51
- * Clerk user ID
52
- */
53
- clerk_user_id: string;
54
- /**
55
- * User found
56
- */
57
- found: true;
58
- /**
59
- * Whether user has registered passkey
60
- */
61
- has_passkey: boolean;
62
- /**
63
- * Whether user account is active
64
- */
65
- is_active: boolean;
66
- }
67
- interface UnionMember1 {
68
- /**
69
- * User not found
70
- */
71
- found: false;
72
- has_passkey: false;
73
- is_active: false;
74
- }
75
- }
76
- export interface VerificationGetStatusParams {
77
- /**
78
- * Verification request ID
79
- */
80
- request_id: string;
81
- }
82
- export interface VerificationLookupUserByEmailParams {
83
- /**
84
- * Email address to look up
85
- */
86
- email: string;
18
+ data: unknown;
87
19
  }
88
20
  export declare namespace Verification {
89
- export { type VerificationGetStatusResponse as VerificationGetStatusResponse, type VerificationLookupUserByEmailResponse as VerificationLookupUserByEmailResponse, type VerificationGetStatusParams as VerificationGetStatusParams, type VerificationLookupUserByEmailParams as VerificationLookupUserByEmailParams, };
21
+ export { type VerificationGetStatusResponse as VerificationGetStatusResponse, type VerificationLookupUserByEmailResponse as VerificationLookupUserByEmailResponse, };
90
22
  }
91
23
  //# sourceMappingURL=verification.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"verification.d.mts","sourceRoot":"","sources":["../src/resources/verification.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EA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AAiB,qCAAqC,CAAC;IACrD,UAAiB,YAAY;QAC3B;;WAEG;QACH,aAAa,EAAE,MAAM,CAAC;QAEtB;;WAEG;QACH,KAAK,EAAE,IAAI,CAAC;QAEZ;;WAEG;QACH,WAAW,EAAE,OAAO,CAAC;QAErB;;WAEG;QACH,SAAS,EAAE,OAAO,CAAC;KACpB;IAED,UAAiB,YAAY;QAC3B;;WAEG;QACH,KAAK,EAAE,KAAK,CAAC;QAEb,WAAW,EAAE,KAAK,CAAC;QAEnB,SAAS,EAAE,KAAK,CAAC;KAClB;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"}
1
+ {"version":3,"file":"verification.d.mts","sourceRoot":"","sources":["../src/resources/verification.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,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"}
@@ -5,87 +5,19 @@ export declare class Verification extends APIResource {
5
5
  /**
6
6
  * Check verification status
7
7
  */
8
- getStatus(query: VerificationGetStatusParams, options?: RequestOptions): APIPromise<VerificationGetStatusResponse>;
8
+ getStatus(options?: RequestOptions): APIPromise<VerificationGetStatusResponse>;
9
9
  /**
10
10
  * Look up user by email
11
11
  */
12
- lookupUserByEmail(query: VerificationLookupUserByEmailParams, options?: RequestOptions): APIPromise<VerificationLookupUserByEmailResponse>;
12
+ lookupUserByEmail(options?: RequestOptions): APIPromise<VerificationLookupUserByEmailResponse>;
13
13
  }
14
14
  export interface VerificationGetStatusResponse {
15
- data: VerificationGetStatusResponse.UnionMember0 | VerificationGetStatusResponse.UnionMember1;
16
- }
17
- export declare namespace VerificationGetStatusResponse {
18
- interface UnionMember0 {
19
- created_at: string;
20
- expires_at: string;
21
- found: true;
22
- organization_id: string;
23
- request_id: string;
24
- /**
25
- * Verification status
26
- */
27
- status: 'pending' | 'verified' | 'failed' | 'expired' | 'cancelled';
28
- error_message?: string | null;
29
- metadata?: {
30
- [key: string]: unknown;
31
- } | null;
32
- partner_user_id?: string | null;
33
- user_email?: string | null;
34
- verified_at?: string | null;
35
- }
36
- interface UnionMember1 {
37
- found: false;
38
- /**
39
- * Error message
40
- */
41
- message: string;
42
- status: 'error';
43
- }
15
+ data: unknown;
44
16
  }
45
17
  export interface VerificationLookupUserByEmailResponse {
46
- data: VerificationLookupUserByEmailResponse.UnionMember0 | VerificationLookupUserByEmailResponse.UnionMember1;
47
- }
48
- export declare namespace VerificationLookupUserByEmailResponse {
49
- interface UnionMember0 {
50
- /**
51
- * Clerk user ID
52
- */
53
- clerk_user_id: string;
54
- /**
55
- * User found
56
- */
57
- found: true;
58
- /**
59
- * Whether user has registered passkey
60
- */
61
- has_passkey: boolean;
62
- /**
63
- * Whether user account is active
64
- */
65
- is_active: boolean;
66
- }
67
- interface UnionMember1 {
68
- /**
69
- * User not found
70
- */
71
- found: false;
72
- has_passkey: false;
73
- is_active: false;
74
- }
75
- }
76
- export interface VerificationGetStatusParams {
77
- /**
78
- * Verification request ID
79
- */
80
- request_id: string;
81
- }
82
- export interface VerificationLookupUserByEmailParams {
83
- /**
84
- * Email address to look up
85
- */
86
- email: string;
18
+ data: unknown;
87
19
  }
88
20
  export declare namespace Verification {
89
- export { type VerificationGetStatusResponse as VerificationGetStatusResponse, type VerificationLookupUserByEmailResponse as VerificationLookupUserByEmailResponse, type VerificationGetStatusParams as VerificationGetStatusParams, type VerificationLookupUserByEmailParams as VerificationLookupUserByEmailParams, };
21
+ export { type VerificationGetStatusResponse as VerificationGetStatusResponse, type VerificationLookupUserByEmailResponse as VerificationLookupUserByEmailResponse, };
90
22
  }
91
23
  //# sourceMappingURL=verification.d.ts.map
@@ -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,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,SAAS,CACP,KAAK,EAAE,2BAA2B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,6BAA6B,CAAC;IAI5C;;OAEG;IACH,iBAAiB,CACf,KAAK,EAAE,mCAAmC,EAC1C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,qCAAqC,CAAC;CAGrD;AAED,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,6BAA6B,CAAC,YAAY,GAAG,6BAA6B,CAAC,YAAY,CAAC;CAC/F;AAED,yBAAiB,6BAA6B,CAAC;IAC7C,UAAiB,YAAY;QAC3B,UAAU,EAAE,MAAM,CAAC;QAEnB,UAAU,EAAE,MAAM,CAAC;QAEnB,KAAK,EAAE,IAAI,CA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AY,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"}
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,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"}
@@ -7,14 +7,14 @@ class Verification extends resource_1.APIResource {
7
7
  /**
8
8
  * Check verification status
9
9
  */
10
- getStatus(query, options) {
11
- return this._client.get('/verification/status', { query, ...options });
10
+ getStatus(options) {
11
+ return this._client.get('/verification/status', options);
12
12
  }
13
13
  /**
14
14
  * Look up user by email
15
15
  */
16
- lookupUserByEmail(query, options) {
17
- return this._client.get('/verification/lookup-user-by-email', { query, ...options });
16
+ lookupUserByEmail(options) {
17
+ return this._client.get('/verification/lookup-user-by-email', options);
18
18
  }
19
19
  }
20
20
  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,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;OAEG;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;;OAEG;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;AApBD,oCAoBC"}
1
+ {"version":3,"file":"verification.js","sourceRoot":"","sources":["../src/resources/verification.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,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"}
@@ -4,14 +4,14 @@ export class Verification extends APIResource {
4
4
  /**
5
5
  * Check verification status
6
6
  */
7
- getStatus(query, options) {
8
- return this._client.get('/verification/status', { query, ...options });
7
+ getStatus(options) {
8
+ return this._client.get('/verification/status', options);
9
9
  }
10
10
  /**
11
11
  * Look up user by email
12
12
  */
13
- lookupUserByEmail(query, options) {
14
- return this._client.get('/verification/lookup-user-by-email', { query, ...options });
13
+ lookupUserByEmail(options) {
14
+ return this._client.get('/verification/lookup-user-by-email', options);
15
15
  }
16
16
  }
17
17
  //# 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,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;OAEG;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;;OAEG;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"}
1
+ {"version":3,"file":"verification.mjs","sourceRoot":"","sources":["../src/resources/verification.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,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"}
package/src/client.ts CHANGED
@@ -17,6 +17,11 @@ import * as Uploads from './core/uploads';
17
17
  import * as API from './resources/index';
18
18
  import { APIPromise } from './core/api-promise';
19
19
  import { DeviceRemoveParams, DeviceRemoveResponse, Devices } from './resources/devices';
20
+ import {
21
+ OrganizationAddMemberParams,
22
+ OrganizationAddMemberResponse,
23
+ Organizations,
24
+ } from './resources/organizations';
20
25
  import { Pass, PassCreateParams, PassCreateResponse } from './resources/pass';
21
26
  import {
22
27
  SDK,
@@ -24,12 +29,13 @@ import {
24
29
  SDKCreateSessionResponse,
25
30
  SDKCreateVerificationLinkParams,
26
31
  SDKCreateVerificationLinkResponse,
32
+ SDKLogoutParams,
33
+ SDKLogoutResponse,
27
34
  } from './resources/sdk';
35
+ import { UserUpdateMetadataParams, UserUpdateMetadataResponse, Users } from './resources/users';
28
36
  import {
29
37
  Verification,
30
- VerificationGetStatusParams,
31
38
  VerificationGetStatusResponse,
32
- VerificationLookupUserByEmailParams,
33
39
  VerificationLookupUserByEmailResponse,
34
40
  } from './resources/verification';
35
41
  import { type Fetch } from './internal/builtin-types';
@@ -762,13 +768,17 @@ export class BotShield {
762
768
  sdk: API.SDK = new API.SDK(this);
763
769
  verification: API.Verification = new API.Verification(this);
764
770
  pass: API.Pass = new API.Pass(this);
771
+ users: API.Users = new API.Users(this);
765
772
  devices: API.Devices = new API.Devices(this);
773
+ organizations: API.Organizations = new API.Organizations(this);
766
774
  }
767
775
 
768
776
  BotShield.SDK = SDK;
769
777
  BotShield.Verification = Verification;
770
778
  BotShield.Pass = Pass;
779
+ BotShield.Users = Users;
771
780
  BotShield.Devices = Devices;
781
+ BotShield.Organizations = Organizations;
772
782
 
773
783
  export declare namespace BotShield {
774
784
  export type RequestOptions = Opts.RequestOptions;
@@ -777,16 +787,16 @@ export declare namespace BotShield {
777
787
  SDK as SDK,
778
788
  type SDKCreateSessionResponse as SDKCreateSessionResponse,
779
789
  type SDKCreateVerificationLinkResponse as SDKCreateVerificationLinkResponse,
790
+ type SDKLogoutResponse as SDKLogoutResponse,
780
791
  type SDKCreateSessionParams as SDKCreateSessionParams,
781
792
  type SDKCreateVerificationLinkParams as SDKCreateVerificationLinkParams,
793
+ type SDKLogoutParams as SDKLogoutParams,
782
794
  };
783
795
 
784
796
  export {
785
797
  Verification as Verification,
786
798
  type VerificationGetStatusResponse as VerificationGetStatusResponse,
787
799
  type VerificationLookupUserByEmailResponse as VerificationLookupUserByEmailResponse,
788
- type VerificationGetStatusParams as VerificationGetStatusParams,
789
- type VerificationLookupUserByEmailParams as VerificationLookupUserByEmailParams,
790
800
  };
791
801
 
792
802
  export {
@@ -795,9 +805,21 @@ export declare namespace BotShield {
795
805
  type PassCreateParams as PassCreateParams,
796
806
  };
797
807
 
808
+ export {
809
+ Users as Users,
810
+ type UserUpdateMetadataResponse as UserUpdateMetadataResponse,
811
+ type UserUpdateMetadataParams as UserUpdateMetadataParams,
812
+ };
813
+
798
814
  export {
799
815
  Devices as Devices,
800
816
  type DeviceRemoveResponse as DeviceRemoveResponse,
801
817
  type DeviceRemoveParams as DeviceRemoveParams,
802
818
  };
819
+
820
+ export {
821
+ Organizations as Organizations,
822
+ type OrganizationAddMemberResponse as OrganizationAddMemberResponse,
823
+ type OrganizationAddMemberParams as OrganizationAddMemberParams,
824
+ };
803
825
  }
@@ -14,25 +14,10 @@ export class Devices extends APIResource {
14
14
  }
15
15
 
16
16
  export interface DeviceRemoveResponse {
17
- data: DeviceRemoveResponse.Data;
17
+ data: unknown;
18
18
  }
19
19
 
20
- export namespace DeviceRemoveResponse {
21
- export interface Data {
22
- message: string;
23
-
24
- passkeys_deleted: number;
25
-
26
- success: boolean;
27
- }
28
- }
29
-
30
- export interface DeviceRemoveParams {
31
- /**
32
- * Clerk user ID
33
- */
34
- clerk_user_id: string;
35
- }
20
+ export interface DeviceRemoveParams {}
36
21
 
37
22
  export declare namespace Devices {
38
23
  export { type DeviceRemoveResponse as DeviceRemoveResponse, type DeviceRemoveParams as DeviceRemoveParams };
@@ -1,18 +1,24 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  export { Devices, type DeviceRemoveResponse, type DeviceRemoveParams } from './devices';
4
+ export {
5
+ Organizations,
6
+ type OrganizationAddMemberResponse,
7
+ type OrganizationAddMemberParams,
8
+ } from './organizations';
4
9
  export { Pass, type PassCreateResponse, type PassCreateParams } from './pass';
5
10
  export {
6
11
  SDK,
7
12
  type SDKCreateSessionResponse,
8
13
  type SDKCreateVerificationLinkResponse,
14
+ type SDKLogoutResponse,
9
15
  type SDKCreateSessionParams,
10
16
  type SDKCreateVerificationLinkParams,
17
+ type SDKLogoutParams,
11
18
  } from './sdk';
19
+ export { Users, type UserUpdateMetadataResponse, type UserUpdateMetadataParams } from './users';
12
20
  export {
13
21
  Verification,
14
22
  type VerificationGetStatusResponse,
15
23
  type VerificationLookupUserByEmailResponse,
16
- type VerificationGetStatusParams,
17
- type VerificationLookupUserByEmailParams,
18
24
  } from './verification';
@@ -0,0 +1,30 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
6
+
7
+ export class Organizations extends APIResource {
8
+ /**
9
+ * POST /organizations/add-member
10
+ */
11
+ addMember(
12
+ body: OrganizationAddMemberParams,
13
+ options?: RequestOptions,
14
+ ): APIPromise<OrganizationAddMemberResponse> {
15
+ return this._client.post('/organizations/add-member', { body, ...options });
16
+ }
17
+ }
18
+
19
+ export interface OrganizationAddMemberResponse {
20
+ data: unknown;
21
+ }
22
+
23
+ export interface OrganizationAddMemberParams {}
24
+
25
+ export declare namespace Organizations {
26
+ export {
27
+ type OrganizationAddMemberResponse as OrganizationAddMemberResponse,
28
+ type OrganizationAddMemberParams as OrganizationAddMemberParams,
29
+ };
30
+ }
@@ -14,36 +14,10 @@ export class Pass extends APIResource {
14
14
  }
15
15
 
16
16
  export interface PassCreateResponse {
17
- data: PassCreateResponse.BotshieldUserID | PassCreateResponse.Error;
17
+ data: unknown;
18
18
  }
19
19
 
20
- export namespace PassCreateResponse {
21
- export interface BotshieldUserID {
22
- /**
23
- * Anonymous BotShield user ID
24
- */
25
- botshield_user_id: string;
26
- }
27
-
28
- export interface Error {
29
- error: Error.Error;
30
- }
31
-
32
- export namespace Error {
33
- export interface Error {
34
- message: string;
35
-
36
- statusCode: number;
37
- }
38
- }
39
- }
40
-
41
- export interface PassCreateParams {
42
- /**
43
- * Organization ID (optional)
44
- */
45
- organization_id?: string;
46
- }
20
+ export interface PassCreateParams {}
47
21
 
48
22
  export declare namespace Pass {
49
23
  export { type PassCreateResponse as PassCreateResponse, type PassCreateParams as PassCreateParams };
@@ -24,167 +24,40 @@ export class SDK extends APIResource {
24
24
  ): APIPromise<SDKCreateVerificationLinkResponse> {
25
25
  return this._client.post('/sdk/create-verification-link', { body, ...options });
26
26
  }
27
- }
28
-
29
- export interface SDKCreateSessionResponse {
30
- data: SDKCreateSessionResponse.Data | SDKCreateSessionResponse.Error;
31
- }
32
-
33
- export namespace SDKCreateSessionResponse {
34
- export interface Data {
35
- data: Data.Data;
36
- }
37
-
38
- export namespace Data {
39
- export interface Data {
40
- /**
41
- * ISO 8601 expiration timestamp
42
- */
43
- expires_at: string;
44
-
45
- /**
46
- * Seconds until expiration
47
- */
48
- expires_in_seconds: number;
49
-
50
- organization: Data.Organization;
51
-
52
- /**
53
- * Session token for verification
54
- */
55
- session_token: string;
56
- }
57
-
58
- export namespace Data {
59
- export interface Organization {
60
- /**
61
- * Organization ID
62
- */
63
- id: string;
64
-
65
- /**
66
- * Environment
67
- */
68
- environment: 'development' | 'production';
69
- }
70
- }
71
- }
72
-
73
- export interface Error {
74
- error: Error.Error;
75
- }
76
27
 
77
- export namespace Error {
78
- export interface Error {
79
- /**
80
- * Error message
81
- */
82
- message: string;
83
-
84
- statusCode: number;
85
- }
28
+ /**
29
+ * Logout and invalidate a session token
30
+ */
31
+ logout(body: SDKLogoutParams, options?: RequestOptions): APIPromise<SDKLogoutResponse> {
32
+ return this._client.post('/sdk/logout', { body, ...options });
86
33
  }
87
34
  }
88
35
 
89
- export interface SDKCreateVerificationLinkResponse {
90
- data: SDKCreateVerificationLinkResponse.Data | SDKCreateVerificationLinkResponse.Error;
36
+ export interface SDKCreateSessionResponse {
37
+ data: unknown;
91
38
  }
92
39
 
93
- export namespace SDKCreateVerificationLinkResponse {
94
- export interface Data {
95
- data: Data.Data;
96
- }
97
-
98
- export namespace Data {
99
- export interface Data {
100
- /**
101
- * Deep link for mobile app
102
- */
103
- deep_link: string;
104
-
105
- /**
106
- * ISO 8601 expiration timestamp
107
- */
108
- expires_at: string;
109
-
110
- organization: Data.Organization;
111
-
112
- /**
113
- * QR code image URL
114
- */
115
- qr_code_url: string;
116
-
117
- /**
118
- * Unique verification request ID
119
- */
120
- request_id: string;
121
-
122
- /**
123
- * Web URL for verification
124
- */
125
- web_url: string;
126
- }
127
-
128
- export namespace Data {
129
- export interface Organization {
130
- /**
131
- * Organization ID
132
- */
133
- id: string;
134
- }
135
- }
136
- }
137
-
138
- export interface Error {
139
- error: Error.Error;
140
- }
141
-
142
- export namespace Error {
143
- export interface Error {
144
- /**
145
- * Error message
146
- */
147
- message: string;
148
-
149
- statusCode: number;
150
- }
151
- }
40
+ export interface SDKCreateVerificationLinkResponse {
41
+ data: unknown;
152
42
  }
153
43
 
154
- export interface SDKCreateSessionParams {
155
- /**
156
- * Custom metadata to attach to session
157
- */
158
- metadata?: { [key: string]: unknown };
159
-
160
- /**
161
- * Partner's user identifier
162
- */
163
- partner_user_id?: string;
44
+ export interface SDKLogoutResponse {
45
+ data: unknown;
164
46
  }
165
47
 
166
- export interface SDKCreateVerificationLinkParams {
167
- /**
168
- * Custom metadata
169
- */
170
- metadata?: { [key: string]: unknown };
48
+ export interface SDKCreateSessionParams {}
171
49
 
172
- /**
173
- * URL to return to after verification
174
- */
175
- return_url?: string;
50
+ export interface SDKCreateVerificationLinkParams {}
176
51
 
177
- /**
178
- * User's email address (optional, for tracking)
179
- */
180
- user_email?: string;
181
- }
52
+ export interface SDKLogoutParams {}
182
53
 
183
54
  export declare namespace SDK {
184
55
  export {
185
56
  type SDKCreateSessionResponse as SDKCreateSessionResponse,
186
57
  type SDKCreateVerificationLinkResponse as SDKCreateVerificationLinkResponse,
58
+ type SDKLogoutResponse as SDKLogoutResponse,
187
59
  type SDKCreateSessionParams as SDKCreateSessionParams,
188
60
  type SDKCreateVerificationLinkParams as SDKCreateVerificationLinkParams,
61
+ type SDKLogoutParams as SDKLogoutParams,
189
62
  };
190
63
  }
@@ -0,0 +1,30 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
6
+
7
+ export class Users extends APIResource {
8
+ /**
9
+ * POST /users/update-metadata
10
+ */
11
+ updateMetadata(
12
+ body: UserUpdateMetadataParams,
13
+ options?: RequestOptions,
14
+ ): APIPromise<UserUpdateMetadataResponse> {
15
+ return this._client.post('/users/update-metadata', { body, ...options });
16
+ }
17
+ }
18
+
19
+ export interface UserUpdateMetadataResponse {
20
+ data: unknown;
21
+ }
22
+
23
+ export interface UserUpdateMetadataParams {}
24
+
25
+ export declare namespace Users {
26
+ export {
27
+ type UserUpdateMetadataResponse as UserUpdateMetadataResponse,
28
+ type UserUpdateMetadataParams as UserUpdateMetadataParams,
29
+ };
30
+ }