@scalekit-sdk/node 2.2.0-beta.1 → 2.2.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.
Files changed (226) hide show
  1. package/README.md +5 -5
  2. package/{reference.md → REFERENCE.md} +530 -748
  3. package/lib/auth.d.ts +9 -6
  4. package/lib/auth.js +4 -20
  5. package/lib/auth.js.map +1 -1
  6. package/lib/connect.d.ts +3 -3
  7. package/lib/connect.js +1 -2
  8. package/lib/connect.js.map +1 -1
  9. package/lib/connection.d.ts +2 -2
  10. package/lib/connection.js +4 -4
  11. package/lib/connection.js.map +1 -1
  12. package/lib/core.js +2 -2
  13. package/lib/core.js.map +1 -1
  14. package/lib/directory.d.ts +2 -2
  15. package/lib/directory.js +7 -7
  16. package/lib/directory.js.map +1 -1
  17. package/lib/domain.d.ts +6 -5
  18. package/lib/domain.js +4 -5
  19. package/lib/domain.js.map +1 -1
  20. package/lib/errors/base-exception.d.ts +1 -1
  21. package/lib/errors/base-exception.js +1 -1
  22. package/lib/errors/base-exception.js.map +1 -1
  23. package/lib/organization.d.ts +10 -9
  24. package/lib/organization.js +11 -9
  25. package/lib/organization.js.map +1 -1
  26. package/lib/passwordless.d.ts +2 -2
  27. package/lib/passwordless.js +8 -7
  28. package/lib/passwordless.js.map +1 -1
  29. package/lib/permission.d.ts +6 -5
  30. package/lib/permission.js +10 -11
  31. package/lib/permission.js.map +1 -1
  32. package/lib/pkg/grpc/buf/validate/validate_pb.d.ts +7 -0
  33. package/lib/pkg/grpc/buf/validate/validate_pb.js +25 -0
  34. package/lib/pkg/grpc/buf/validate/validate_pb.js.map +1 -0
  35. package/lib/pkg/grpc/google/api/annotations_pb.d.ts +7 -0
  36. package/lib/pkg/grpc/google/api/annotations_pb.js +25 -0
  37. package/lib/pkg/grpc/google/api/annotations_pb.js.map +1 -0
  38. package/lib/pkg/grpc/google/api/field_behavior_pb.d.ts +7 -0
  39. package/lib/pkg/grpc/google/api/field_behavior_pb.js +25 -0
  40. package/lib/pkg/grpc/google/api/field_behavior_pb.js.map +1 -0
  41. package/lib/pkg/grpc/google/api/visibility_pb.d.ts +7 -0
  42. package/lib/pkg/grpc/google/api/visibility_pb.js +25 -0
  43. package/lib/pkg/grpc/google/api/visibility_pb.js.map +1 -0
  44. package/lib/pkg/grpc/protoc-gen-openapiv2/options/annotations_pb.d.ts +7 -0
  45. package/lib/pkg/grpc/protoc-gen-openapiv2/options/annotations_pb.js +25 -0
  46. package/lib/pkg/grpc/protoc-gen-openapiv2/options/annotations_pb.js.map +1 -0
  47. package/lib/pkg/grpc/scalekit/v1/auditlogs/auditlogs_pb.d.ts +48 -42
  48. package/lib/pkg/grpc/scalekit/v1/auditlogs/auditlogs_pb.js +27 -263
  49. package/lib/pkg/grpc/scalekit/v1/auditlogs/auditlogs_pb.js.map +1 -1
  50. package/lib/pkg/grpc/scalekit/v1/auth/auth_pb.d.ts +371 -325
  51. package/lib/pkg/grpc/scalekit/v1/auth/auth_pb.js +132 -835
  52. package/lib/pkg/grpc/scalekit/v1/auth/auth_pb.js.map +1 -1
  53. package/lib/pkg/grpc/scalekit/v1/auth/passwordless_pb.d.ts +113 -87
  54. package/lib/pkg/grpc/scalekit/v1/auth/passwordless_pb.js +45 -201
  55. package/lib/pkg/grpc/scalekit/v1/auth/passwordless_pb.js.map +1 -1
  56. package/lib/pkg/grpc/scalekit/v1/auth/webauthn_pb.d.ts +262 -265
  57. package/lib/pkg/grpc/scalekit/v1/auth/webauthn_pb.js +92 -938
  58. package/lib/pkg/grpc/scalekit/v1/auth/webauthn_pb.js.map +1 -1
  59. package/lib/pkg/grpc/scalekit/v1/commons/commons_pb.d.ts +162 -157
  60. package/lib/pkg/grpc/scalekit/v1/commons/commons_pb.js +42 -313
  61. package/lib/pkg/grpc/scalekit/v1/commons/commons_pb.js.map +1 -1
  62. package/lib/pkg/grpc/scalekit/v1/connections/connections_pb.d.ts +1488 -1459
  63. package/lib/pkg/grpc/scalekit/v1/connections/connections_pb.js +353 -2362
  64. package/lib/pkg/grpc/scalekit/v1/connections/connections_pb.js.map +1 -1
  65. package/lib/pkg/grpc/scalekit/v1/directories/directories_pb.d.ts +520 -483
  66. package/lib/pkg/grpc/scalekit/v1/directories/directories_pb.js +224 -1555
  67. package/lib/pkg/grpc/scalekit/v1/directories/directories_pb.js.map +1 -1
  68. package/lib/pkg/grpc/scalekit/v1/domains/domains_pb.d.ts +219 -191
  69. package/lib/pkg/grpc/scalekit/v1/domains/domains_pb.js +96 -553
  70. package/lib/pkg/grpc/scalekit/v1/domains/domains_pb.js.map +1 -1
  71. package/lib/pkg/grpc/scalekit/v1/errdetails/errdetails_pb.d.ts +76 -102
  72. package/lib/pkg/grpc/scalekit/v1/errdetails/errdetails_pb.js +37 -393
  73. package/lib/pkg/grpc/scalekit/v1/errdetails/errdetails_pb.js.map +1 -1
  74. package/lib/pkg/grpc/scalekit/v1/options/options_pb.d.ts +36 -26
  75. package/lib/pkg/grpc/scalekit/v1/options/options_pb.js +20 -69
  76. package/lib/pkg/grpc/scalekit/v1/options/options_pb.js.map +1 -1
  77. package/lib/pkg/grpc/scalekit/v1/organizations/organizations_pb.d.ts +447 -400
  78. package/lib/pkg/grpc/scalekit/v1/organizations/organizations_pb.js +163 -1238
  79. package/lib/pkg/grpc/scalekit/v1/organizations/organizations_pb.js.map +1 -1
  80. package/lib/pkg/grpc/scalekit/v1/roles/roles_pb.d.ts +622 -556
  81. package/lib/pkg/grpc/scalekit/v1/roles/roles_pb.js +201 -1718
  82. package/lib/pkg/grpc/scalekit/v1/roles/roles_pb.js.map +1 -1
  83. package/lib/pkg/grpc/scalekit/v1/sessions/sessions_pb.d.ts +135 -132
  84. package/lib/pkg/grpc/scalekit/v1/sessions/sessions_pb.js +55 -518
  85. package/lib/pkg/grpc/scalekit/v1/sessions/sessions_pb.js.map +1 -1
  86. package/lib/pkg/grpc/scalekit/v1/users/users_pb.d.ts +445 -413
  87. package/lib/pkg/grpc/scalekit/v1/users/users_pb.js +142 -1490
  88. package/lib/pkg/grpc/scalekit/v1/users/users_pb.js.map +1 -1
  89. package/lib/role.d.ts +8 -7
  90. package/lib/role.js +14 -14
  91. package/lib/role.js.map +1 -1
  92. package/lib/scalekit.d.ts +0 -4
  93. package/lib/scalekit.js +0 -4
  94. package/lib/scalekit.js.map +1 -1
  95. package/lib/session.js +15 -24
  96. package/lib/session.js.map +1 -1
  97. package/lib/user.d.ts +6 -5
  98. package/lib/user.js +17 -20
  99. package/lib/user.js.map +1 -1
  100. package/lib/webauthn.js +6 -5
  101. package/lib/webauthn.js.map +1 -1
  102. package/package.json +12 -10
  103. package/.github/dependabot.yml +0 -10
  104. package/.nvmrc +0 -1
  105. package/buf.gen.yaml +0 -24
  106. package/jest.config.js +0 -15
  107. package/lib/connected-accounts.d.ts +0 -119
  108. package/lib/connected-accounts.js +0 -241
  109. package/lib/connected-accounts.js.map +0 -1
  110. package/lib/pkg/grpc/scalekit/v1/auditlogs/auditlogs_connect.d.ts +0 -19
  111. package/lib/pkg/grpc/scalekit/v1/auditlogs/auditlogs_connect.js +0 -27
  112. package/lib/pkg/grpc/scalekit/v1/auditlogs/auditlogs_connect.js.map +0 -1
  113. package/lib/pkg/grpc/scalekit/v1/auth/auth_connect.d.ts +0 -118
  114. package/lib/pkg/grpc/scalekit/v1/auth/auth_connect.js +0 -126
  115. package/lib/pkg/grpc/scalekit/v1/auth/auth_connect.js.map +0 -1
  116. package/lib/pkg/grpc/scalekit/v1/auth/passwordless_connect.d.ts +0 -37
  117. package/lib/pkg/grpc/scalekit/v1/auth/passwordless_connect.js +0 -45
  118. package/lib/pkg/grpc/scalekit/v1/auth/passwordless_connect.js.map +0 -1
  119. package/lib/pkg/grpc/scalekit/v1/auth/webauthn_connect.d.ts +0 -82
  120. package/lib/pkg/grpc/scalekit/v1/auth/webauthn_connect.js +0 -90
  121. package/lib/pkg/grpc/scalekit/v1/auth/webauthn_connect.js.map +0 -1
  122. package/lib/pkg/grpc/scalekit/v1/connected_accounts/connected_accounts_connect.d.ts +0 -87
  123. package/lib/pkg/grpc/scalekit/v1/connected_accounts/connected_accounts_connect.js +0 -95
  124. package/lib/pkg/grpc/scalekit/v1/connected_accounts/connected_accounts_connect.js.map +0 -1
  125. package/lib/pkg/grpc/scalekit/v1/connected_accounts/connected_accounts_pb.d.ts +0 -718
  126. package/lib/pkg/grpc/scalekit/v1/connected_accounts/connected_accounts_pb.js +0 -893
  127. package/lib/pkg/grpc/scalekit/v1/connected_accounts/connected_accounts_pb.js.map +0 -1
  128. package/lib/pkg/grpc/scalekit/v1/connections/connections_connect.d.ts +0 -172
  129. package/lib/pkg/grpc/scalekit/v1/connections/connections_connect.js +0 -180
  130. package/lib/pkg/grpc/scalekit/v1/connections/connections_connect.js.map +0 -1
  131. package/lib/pkg/grpc/scalekit/v1/directories/directories_connect.d.ts +0 -154
  132. package/lib/pkg/grpc/scalekit/v1/directories/directories_connect.js +0 -162
  133. package/lib/pkg/grpc/scalekit/v1/directories/directories_connect.js.map +0 -1
  134. package/lib/pkg/grpc/scalekit/v1/domains/domains_connect.d.ts +0 -73
  135. package/lib/pkg/grpc/scalekit/v1/domains/domains_connect.js +0 -81
  136. package/lib/pkg/grpc/scalekit/v1/domains/domains_connect.js.map +0 -1
  137. package/lib/pkg/grpc/scalekit/v1/organizations/organizations_connect.d.ts +0 -171
  138. package/lib/pkg/grpc/scalekit/v1/organizations/organizations_connect.js +0 -179
  139. package/lib/pkg/grpc/scalekit/v1/organizations/organizations_connect.js.map +0 -1
  140. package/lib/pkg/grpc/scalekit/v1/roles/roles_connect.d.ts +0 -250
  141. package/lib/pkg/grpc/scalekit/v1/roles/roles_connect.js +0 -258
  142. package/lib/pkg/grpc/scalekit/v1/roles/roles_connect.js.map +0 -1
  143. package/lib/pkg/grpc/scalekit/v1/sessions/sessions_connect.d.ts +0 -46
  144. package/lib/pkg/grpc/scalekit/v1/sessions/sessions_connect.js +0 -54
  145. package/lib/pkg/grpc/scalekit/v1/sessions/sessions_connect.js.map +0 -1
  146. package/lib/pkg/grpc/scalekit/v1/tools/tools_connect.d.ts +0 -75
  147. package/lib/pkg/grpc/scalekit/v1/tools/tools_connect.js +0 -83
  148. package/lib/pkg/grpc/scalekit/v1/tools/tools_connect.js.map +0 -1
  149. package/lib/pkg/grpc/scalekit/v1/tools/tools_pb.d.ts +0 -431
  150. package/lib/pkg/grpc/scalekit/v1/tools/tools_pb.js +0 -627
  151. package/lib/pkg/grpc/scalekit/v1/tools/tools_pb.js.map +0 -1
  152. package/lib/pkg/grpc/scalekit/v1/users/users_connect.d.ts +0 -173
  153. package/lib/pkg/grpc/scalekit/v1/users/users_connect.js +0 -181
  154. package/lib/pkg/grpc/scalekit/v1/users/users_connect.js.map +0 -1
  155. package/lib/tools.d.ts +0 -75
  156. package/lib/tools.js +0 -127
  157. package/lib/tools.js.map +0 -1
  158. package/src/auth.ts +0 -99
  159. package/src/connect.ts +0 -33
  160. package/src/connected-accounts.ts +0 -358
  161. package/src/connection.ts +0 -267
  162. package/src/constants/user.ts +0 -22
  163. package/src/core.ts +0 -139
  164. package/src/directory.ts +0 -431
  165. package/src/domain.ts +0 -272
  166. package/src/errors/base-exception.ts +0 -262
  167. package/src/errors/index.ts +0 -3
  168. package/src/errors/specific-exceptions.ts +0 -88
  169. package/src/index.ts +0 -10
  170. package/src/organization.ts +0 -568
  171. package/src/passwordless.ts +0 -138
  172. package/src/permission.ts +0 -310
  173. package/src/pkg/grpc/scalekit/v1/auditlogs/auditlogs_connect.ts +0 -26
  174. package/src/pkg/grpc/scalekit/v1/auditlogs/auditlogs_pb.ts +0 -342
  175. package/src/pkg/grpc/scalekit/v1/auth/auth_connect.ts +0 -125
  176. package/src/pkg/grpc/scalekit/v1/auth/auth_pb.ts +0 -1213
  177. package/src/pkg/grpc/scalekit/v1/auth/passwordless_connect.ts +0 -44
  178. package/src/pkg/grpc/scalekit/v1/auth/passwordless_pb.ts +0 -336
  179. package/src/pkg/grpc/scalekit/v1/auth/webauthn_connect.ts +0 -89
  180. package/src/pkg/grpc/scalekit/v1/auth/webauthn_pb.ts +0 -1263
  181. package/src/pkg/grpc/scalekit/v1/commons/commons_pb.ts +0 -573
  182. package/src/pkg/grpc/scalekit/v1/connected_accounts/connected_accounts_connect.ts +0 -94
  183. package/src/pkg/grpc/scalekit/v1/connected_accounts/connected_accounts_pb.ts +0 -1294
  184. package/src/pkg/grpc/scalekit/v1/connections/connections_connect.ts +0 -179
  185. package/src/pkg/grpc/scalekit/v1/connections/connections_pb.ts +0 -3846
  186. package/src/pkg/grpc/scalekit/v1/directories/directories_connect.ts +0 -161
  187. package/src/pkg/grpc/scalekit/v1/directories/directories_pb.ts +0 -2119
  188. package/src/pkg/grpc/scalekit/v1/domains/domains_connect.ts +0 -80
  189. package/src/pkg/grpc/scalekit/v1/domains/domains_pb.ts +0 -855
  190. package/src/pkg/grpc/scalekit/v1/errdetails/errdetails_pb.ts +0 -524
  191. package/src/pkg/grpc/scalekit/v1/options/options_pb.ts +0 -230
  192. package/src/pkg/grpc/scalekit/v1/organizations/organizations_connect.ts +0 -178
  193. package/src/pkg/grpc/scalekit/v1/organizations/organizations_pb.ts +0 -1766
  194. package/src/pkg/grpc/scalekit/v1/roles/roles_connect.ts +0 -257
  195. package/src/pkg/grpc/scalekit/v1/roles/roles_pb.ts +0 -2395
  196. package/src/pkg/grpc/scalekit/v1/sessions/sessions_connect.ts +0 -53
  197. package/src/pkg/grpc/scalekit/v1/sessions/sessions_pb.ts +0 -749
  198. package/src/pkg/grpc/scalekit/v1/tools/tools_connect.ts +0 -82
  199. package/src/pkg/grpc/scalekit/v1/tools/tools_pb.ts +0 -847
  200. package/src/pkg/grpc/scalekit/v1/users/users_connect.ts +0 -180
  201. package/src/pkg/grpc/scalekit/v1/users/users_pb.ts +0 -2151
  202. package/src/role.ts +0 -461
  203. package/src/scalekit.ts +0 -809
  204. package/src/session.ts +0 -337
  205. package/src/tools.ts +0 -166
  206. package/src/types/auth.ts +0 -73
  207. package/src/types/organization.ts +0 -12
  208. package/src/types/scalekit.ts +0 -50
  209. package/src/types/user.ts +0 -21
  210. package/src/user.ts +0 -825
  211. package/src/webauthn.ts +0 -98
  212. package/tests/README.md +0 -25
  213. package/tests/connected-accounts.test.ts +0 -472
  214. package/tests/connection.test.ts +0 -42
  215. package/tests/directory.test.ts +0 -46
  216. package/tests/domain.test.ts +0 -293
  217. package/tests/organization.test.ts +0 -81
  218. package/tests/passwordless.test.ts +0 -108
  219. package/tests/permission.test.ts +0 -399
  220. package/tests/role.test.ts +0 -323
  221. package/tests/scalekit.test.ts +0 -104
  222. package/tests/setup.ts +0 -34
  223. package/tests/tools.test.ts +0 -239
  224. package/tests/users.test.ts +0 -168
  225. package/tests/utils/test-data.ts +0 -481
  226. package/tsconfig.json +0 -19
@@ -1,6 +1,56 @@
1
+ ## Table of Contents
2
+
3
+ - [Getting Started](#getting-started)
4
+ - [ScalekitClient](#scalekitclient)
5
+ - [Organizations](#organizations)
6
+ - [Connections](#connections)
7
+ - [Domains](#domains)
8
+ - [Directories](#directories)
9
+ - [Users & Memberships](#users--memberships)
10
+ - [Sessions](#sessions)
11
+ - [Roles](#roles)
12
+ - [Permissions](#permissions)
13
+ - [Passwordless](#passwordless)
14
+ - [Auth](#auth)
15
+ - [WebAuthn](#webauthn)
16
+ - [Error Handling](#error-handling)
17
+ - [Type Definitions](#type-definitions)
18
+
19
+ ## Getting Started
20
+
21
+ <details>
22
+ <summary><code>new ScalekitClient(envUrl, clientId, clientSecret)</code></summary>
23
+
24
+ #### 📝 Description
25
+ Initialize the Scalekit client to interact with all Scalekit API endpoints. This is the primary entry point for authentication services including SSO, SCIM, user management, roles, permissions, and passwordless authentication.
26
+
27
+ Find your Environment URL, Client ID, and Client Secret in Scalekit Dashboard → Developers (Settings) → API Credentials.
28
+
29
+ #### 🔌 Usage
30
+ ```typescript
31
+ import { ScalekitClient } from '@scalekit-sdk/node';
32
+
33
+ const scalekitClient = new ScalekitClient(
34
+ process.env.SCALEKIT_ENV_URL!,
35
+ process.env.SCALEKIT_CLIENT_ID!,
36
+ process.env.SCALEKIT_CLIENT_SECRET!
37
+ );
38
+ ```
39
+
40
+ #### ⚙️ Parameters
41
+ | Parameter | Type | Required | Description |
42
+ |-----------|------|----------|-------------|
43
+ | envUrl | `string` | Yes | The Scalekit environment URL (e.g., "https://yourorg.scalekit.com" or your configured custom domain like "https://auth.yourapp.ai") |
44
+ | clientId | `string` | Yes | Your Scalekit client ID from the Scalekit Dashboard |
45
+ | clientSecret | `string` | Yes | Your Scalekit client secret from the Scalekit Dashboard |
46
+
47
+ **Source**: [src/scalekit.ts](https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/scalekit.ts)
48
+
49
+ </details>
50
+
1
51
  ## ScalekitClient
2
52
 
3
- <details><summary><code>client.<a href="/src/scalekit.ts">getAuthorizationUrl</a>(redirectUri, options?) -> string</code></summary>
53
+ <details><summary><code>client.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/scalekit.ts">getAuthorizationUrl</a>(redirectUri, options?) -> string</code></summary>
4
54
  <dl>
5
55
  <dd>
6
56
 
@@ -83,7 +133,7 @@ const authUrl = scalekitClient.getAuthorizationUrl(
83
133
  </dl>
84
134
  </details>
85
135
 
86
- <details><summary><code>client.<a href="/src/scalekit.ts">authenticateWithCode</a>(code, redirectUri, options?) -> Promise&lt;AuthenticationResponse&gt;</code></summary>
136
+ <details><summary><code>client.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/scalekit.ts">authenticateWithCode</a>(code, redirectUri, options?) -> Promise&lt;AuthenticationResponse&gt;</code></summary>
87
137
  <dl>
88
138
  <dd>
89
139
 
@@ -168,7 +218,7 @@ app.get('/auth/callback', async (req, res) => {
168
218
  </dl>
169
219
  </details>
170
220
 
171
- <details><summary><code>client.<a href="/src/scalekit.ts">getIdpInitiatedLoginClaims</a>(idpInitiatedLoginToken, options?) -> Promise&lt;IdpInitiatedLoginClaims&gt;</code></summary>
221
+ <details><summary><code>client.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/scalekit.ts">getIdpInitiatedLoginClaims</a>(idpInitiatedLoginToken, options?) -> Promise&lt;IdpInitiatedLoginClaims&gt;</code></summary>
172
222
  <dl>
173
223
  <dd>
174
224
 
@@ -250,7 +300,7 @@ app.get('/auth/callback', async (req, res) => {
250
300
  </dl>
251
301
  </details>
252
302
 
253
- <details><summary><code>client.<a href="/src/scalekit.ts">validateAccessToken</a>(token, options?) -> Promise&lt;boolean&gt;</code></summary>
303
+ <details><summary><code>client.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/scalekit.ts">validateAccessToken</a>(token, options?) -> Promise&lt;boolean&gt;</code></summary>
254
304
  <dl>
255
305
  <dd>
256
306
 
@@ -315,7 +365,7 @@ if (isValid) {
315
365
  </dl>
316
366
  </details>
317
367
 
318
- <details><summary><code>client.<a href="/src/scalekit.ts">getLogoutUrl</a>(options?) -> string</code></summary>
368
+ <details><summary><code>client.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/scalekit.ts">getLogoutUrl</a>(options?) -> string</code></summary>
319
369
  <dl>
320
370
  <dd>
321
371
 
@@ -375,7 +425,129 @@ const logoutUrl = scalekitClient.getLogoutUrl({
375
425
  </dl>
376
426
  </details>
377
427
 
378
- <details><summary><code>client.<a href="/src/scalekit.ts">verifyWebhookPayload</a>(secret, headers, payload) -> boolean</code></summary>
428
+ <details>
429
+ <summary><code>client.validateAccessToken(token, options?) -> Promise&lt;boolean&gt;</code></summary>
430
+
431
+ #### 📝 Description
432
+ Validate an access token to ensure it's authentic and hasn't expired. This method performs signature verification and checks token validity against Scalekit's public keys.
433
+
434
+ #### 🔌 Usage
435
+ ```typescript
436
+ const isValid = await scalekitClient.validateAccessToken(accessToken);
437
+ ```
438
+
439
+ #### ⚙️ Parameters
440
+ | Parameter | Type | Required | Description |
441
+ |-----------|------|----------|-------------|
442
+ | token | `string` | Yes | The access token to validate |
443
+ | options | `TokenValidationOptions` | No | Optional validation options |
444
+
445
+ **Returns**: `Promise<boolean>` - True if the token is valid, false otherwise.
446
+
447
+ **Source**: [src/scalekit.ts](https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/scalekit.ts)
448
+
449
+ </details>
450
+
451
+ <details>
452
+ <summary><code>client.getLogoutUrl(options?) -> string</code></summary>
453
+
454
+ #### 📝 Description
455
+ Generate the OAuth 2.0 logout URL to end the user's session and redirect them after logout.
456
+
457
+ #### 🔌 Usage
458
+ ```typescript
459
+ const logoutUrl = scalekitClient.getLogoutUrl({
460
+ postLogoutRedirectUri: 'https://example.com',
461
+ state: 'some-state'
462
+ });
463
+ // Redirect user to logoutUrl
464
+ ```
465
+
466
+ #### ⚙️ Parameters
467
+ | Parameter | Type | Required | Description |
468
+ |-----------|------|----------|-------------|
469
+ | options | `LogoutUrlOptions` | No | Optional logout options |
470
+
471
+ **Returns**: `string` - The complete logout URL.
472
+
473
+ **Source**: [src/scalekit.ts](https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/scalekit.ts)
474
+
475
+ </details>
476
+
477
+ <details>
478
+ <summary><code>client.refreshAccessToken(refreshToken) -> Promise&lt;RefreshTokenResponse&gt;</code></summary>
479
+
480
+ #### 📝 Description
481
+ Refresh an expired access token using a valid refresh token. This exchanges the refresh token for a new access token and optionally a new refresh token.
482
+
483
+ #### 🔌 Usage
484
+ ```typescript
485
+ const result = await scalekitClient.refreshAccessToken(oldRefreshToken);
486
+ // Store the new tokens
487
+ await storeTokens(userId, {
488
+ accessToken: result.accessToken,
489
+ refreshToken: result.refreshToken
490
+ });
491
+ ```
492
+
493
+ #### ⚙️ Parameters
494
+ | Parameter | Type | Required | Description |
495
+ |-----------|------|----------|-------------|
496
+ | refreshToken | `string` | Yes | The refresh token to use for obtaining new tokens |
497
+
498
+ **Returns**: `Promise<RefreshTokenResponse>` - Object containing new access token and optionally new refresh token.
499
+
500
+ **Source**: [src/scalekit.ts](https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/scalekit.ts)
501
+
502
+ </details>
503
+
504
+ <details>
505
+ <summary><code>client.validateToken(token, options?) -> Promise&lt;T&gt;</code></summary>
506
+
507
+ #### 📝 Description
508
+ Decode and validate a JWT token, returning the payload. This method verifies the token's signature and claims.
509
+
510
+ #### 🔌 Usage
511
+ ```typescript
512
+ const payload = await scalekitClient.validateToken(accessToken);
513
+ ```
514
+
515
+ #### ⚙️ Parameters
516
+ | Parameter | Type | Required | Description |
517
+ |-----------|------|----------|-------------|
518
+ | token | `string` | Yes | The JWT token to validate |
519
+ | options | `TokenValidationOptions` | No | Optional validation options |
520
+
521
+ **Returns**: `Promise<T>` - The decoded token payload.
522
+
523
+ **Source**: [src/scalekit.ts](https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/scalekit.ts)
524
+
525
+ </details>
526
+
527
+ <details>
528
+ <summary><code>client.verifyScopes(token, requiredScopes) -> boolean</code></summary>
529
+
530
+ #### 📝 Description
531
+ Verify that a token contains all required scopes. This checks if the token's scope claim includes the specified scopes.
532
+
533
+ #### 🔌 Usage
534
+ ```typescript
535
+ const hasScopes = scalekitClient.verifyScopes(accessToken, ['read:user', 'write:user']);
536
+ ```
537
+
538
+ #### ⚙️ Parameters
539
+ | Parameter | Type | Required | Description |
540
+ |-----------|------|----------|-------------|
541
+ | token | `string` | Yes | The JWT token to check |
542
+ | requiredScopes | `string[]` | Yes | Array of required scopes |
543
+
544
+ **Returns**: `boolean` - True if the token has all required scopes.
545
+
546
+ **Source**: [src/scalekit.ts](https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/scalekit.ts)
547
+
548
+ </details>
549
+
550
+ <details><summary><code>client.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/scalekit.ts">verifyWebhookPayload</a>(secret, headers, payload) -> boolean</code></summary>
379
551
  <dl>
380
552
  <dd>
381
553
 
@@ -468,7 +640,7 @@ app.post('/webhooks/scalekit', express.raw({ type: 'application/json' }), (req,
468
640
  </dl>
469
641
  </details>
470
642
 
471
- <details><summary><code>client.<a href="/src/scalekit.ts">verifyInterceptorPayload</a>(secret, headers, payload) -> boolean</code></summary>
643
+ <details><summary><code>client.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/scalekit.ts">verifyInterceptorPayload</a>(secret, headers, payload) -> boolean</code></summary>
472
644
  <dl>
473
645
  <dd>
474
646
 
@@ -540,9 +712,290 @@ const isValid = scalekitClient.verifyInterceptorPayload(secret, headers, payload
540
712
  </dl>
541
713
  </details>
542
714
 
715
+ ## Connections
716
+
717
+ <details>
718
+ <summary><strong>Connections</strong> - Manage SSO connections and identity providers</summary>
719
+
720
+ Access via `scalekitClient.connection`.
721
+
722
+ <details>
723
+ <summary><code>connection.getConnection(id) -> Promise&lt;GetConnectionResponse&gt;</code></summary>
724
+
725
+ #### 📝 Description
726
+ Retrieves a specific SSO connection by ID.
727
+
728
+ #### 🔌 Usage
729
+ ```typescript
730
+ const connection = await scalekitClient.connection.getConnection('conn_123');
731
+ ```
732
+
733
+ #### ⚙️ Parameters
734
+ | Parameter | Type | Required | Description |
735
+ |-----------|------|----------|-------------|
736
+ | id | `string` | Yes | Connection ID |
737
+
738
+ **Returns**: `Promise<GetConnectionResponse>` - Connection details.
739
+
740
+ **Source**: [src/connection.ts](https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/connection.ts)
741
+
742
+ </details>
743
+
744
+ <details>
745
+ <summary><code>connection.listConnections(options?) -> Promise&lt;ListConnectionsResponse&gt;</code></summary>
746
+
747
+ #### 📝 Description
748
+ Lists all SSO connections with pagination.
749
+
750
+ #### 🔌 Usage
751
+ ```typescript
752
+ const response = await scalekitClient.connection.listConnections({ pageSize: 10 });
753
+ ```
754
+
755
+ #### ⚙️ Parameters
756
+ | Parameter | Type | Required | Description |
757
+ |-----------|------|----------|-------------|
758
+ | options | `{ pageSize?: number; pageToken?: string }` | No | Pagination options |
759
+
760
+ **Returns**: `Promise<ListConnectionsResponse>` - Paginated connections.
761
+
762
+ **Source**: [src/connection.ts](https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/connection.ts)
763
+
764
+ </details>
765
+
766
+ <details>
767
+ <summary><code>connection.listConnectionsByDomain(domain, options?) -> Promise&lt;ListConnectionsResponse&gt;</code></summary>
768
+
769
+ #### 📝 Description
770
+ Lists connections filtered by domain.
771
+
772
+ #### 🔌 Usage
773
+ ```typescript
774
+ const response = await scalekitClient.connection.listConnectionsByDomain('example.com');
775
+ ```
776
+
777
+ #### ⚙️ Parameters
778
+ | Parameter | Type | Required | Description |
779
+ |-----------|------|----------|-------------|
780
+ | domain | `string` | Yes | Domain to filter by |
781
+ | options | `{ pageSize?: number; pageToken?: string }` | No | Pagination options |
782
+
783
+ **Returns**: `Promise<ListConnectionsResponse>` - Filtered connections.
784
+
785
+ **Source**: [src/connection.ts](https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/connection.ts)
786
+
787
+ </details>
788
+
789
+ <details>
790
+ <summary><code>connection.enableConnection(connectionId) -> Promise&lt;MessageShape&lt;typeof EmptySchema&gt;&gt;</code></summary>
791
+
792
+ #### 📝 Description
793
+ Enables an SSO connection.
794
+
795
+ #### 🔌 Usage
796
+ ```typescript
797
+ await scalekitClient.connection.enableConnection('conn_123');
798
+ ```
799
+
800
+ #### ⚙️ Parameters
801
+ | Parameter | Type | Required | Description |
802
+ |-----------|------|----------|-------------|
803
+ | connectionId | `string` | Yes | Connection ID |
804
+
805
+ **Returns**: `Promise<MessageShape<typeof EmptySchema>>` - Empty on success.
806
+
807
+ **Source**: [src/connection.ts](https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/connection.ts)
808
+
809
+ </details>
810
+
811
+ <details>
812
+ <summary><code>connection.disableConnection(connectionId) -> Promise&lt;MessageShape&lt;typeof EmptySchema&gt;&gt;</code></summary>
813
+
814
+ #### 📝 Description
815
+ Disables an SSO connection.
816
+
817
+ #### 🔌 Usage
818
+ ```typescript
819
+ await scalekitClient.connection.disableConnection('conn_123');
820
+ ```
821
+
822
+ #### ⚙️ Parameters
823
+ | Parameter | Type | Required | Description |
824
+ |-----------|------|----------|-------------|
825
+ | connectionId | `string` | Yes | Connection ID |
826
+
827
+ **Returns**: `Promise<MessageShape<typeof EmptySchema>>` - Empty on success.
828
+
829
+ **Source**: [src/connection.ts](https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/connection.ts)
830
+
831
+ </details>
832
+
833
+ </details>
834
+
835
+ ## Domains
836
+
837
+ <details>
838
+ <summary><strong>Domains</strong> - Manage verified domains for organizations</summary>
839
+
840
+ Access via `scalekitClient.domain`.
841
+
842
+ <details>
843
+ <summary><code>domain.createDomain(domain) -> Promise&lt;CreateDomainResponse&gt;</code></summary>
844
+
845
+ #### 📝 Description
846
+ Creates and verifies a new domain for an organization.
847
+
848
+ #### 🔌 Usage
849
+ ```typescript
850
+ const response = await scalekitClient.domain.createDomain('example.com');
851
+ ```
852
+
853
+ #### ⚙️ Parameters
854
+ | Parameter | Type | Required | Description |
855
+ |-----------|------|----------|-------------|
856
+ | domain | `string` | Yes | Domain name to create |
857
+
858
+ **Returns**: `Promise<CreateDomainResponse>` - Created domain.
859
+
860
+ **Source**: [src/domain.ts](https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/domain.ts)
861
+
862
+ </details>
863
+
864
+ <details>
865
+ <summary><code>domain.getDomain(domain) -> Promise&lt;GetDomainResponse&gt;</code></summary>
866
+
867
+ #### 📝 Description
868
+ Retrieves domain information.
869
+
870
+ #### 🔌 Usage
871
+ ```typescript
872
+ const response = await scalekitClient.domain.getDomain('example.com');
873
+ ```
874
+
875
+ #### ⚙️ Parameters
876
+ | Parameter | Type | Required | Description |
877
+ |-----------|------|----------|-------------|
878
+ | domain | `string` | Yes | Domain name |
879
+
880
+ **Returns**: `Promise<GetDomainResponse>` - Domain details.
881
+
882
+ **Source**: [src/domain.ts](https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/domain.ts)
883
+
884
+ </details>
885
+
886
+ <details>
887
+ <summary><code>domain.listDomains(options?) -> Promise&lt;ListDomainsResponse&gt;</code></summary>
888
+
889
+ #### 📝 Description
890
+ Lists all domains with pagination.
891
+
892
+ #### 🔌 Usage
893
+ ```typescript
894
+ const response = await scalekitClient.domain.listDomains({ pageSize: 10 });
895
+ ```
896
+
897
+ #### ⚙️ Parameters
898
+ | Parameter | Type | Required | Description |
899
+ |-----------|------|----------|-------------|
900
+ | options | `{ pageSize?: number; pageToken?: string }` | No | Pagination options |
901
+
902
+ **Returns**: `Promise<ListDomainsResponse>` - Paginated domains.
903
+
904
+ **Source**: [src/domain.ts](https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/domain.ts)
905
+
906
+ </details>
907
+
908
+ <details>
909
+ <summary><code>domain.deleteDomain(domain) -> Promise&lt;MessageShape&lt;typeof EmptySchema&gt;&gt;</code></summary>
910
+
911
+ #### 📝 Description
912
+ Deletes a domain.
913
+
914
+ #### 🔌 Usage
915
+ ```typescript
916
+ await scalekitClient.domain.deleteDomain('example.com');
917
+ ```
918
+
919
+ #### ⚙️ Parameters
920
+ | Parameter | Type | Required | Description |
921
+ |-----------|------|----------|-------------|
922
+ | domain | `string` | Yes | Domain name to delete |
923
+
924
+ **Returns**: `Promise<MessageShape<typeof EmptySchema>>` - Empty on success.
925
+
926
+ **Source**: [src/domain.ts](https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/domain.ts)
927
+
928
+ </details>
929
+
930
+ </details>
931
+
932
+ ## Error Handling
933
+
934
+ ### Exception Hierarchy
935
+
936
+ Scalekit SDK uses a typed exception hierarchy rooted at `ScalekitException`:
937
+
938
+ - `ScalekitException` (base)
939
+ - `ScalekitValidateTokenFailureException` - Token validation failures
940
+ - `ScalekitServerException` - HTTP errors (400-599)
941
+ - Specific subclasses for each status code (400, 401, 403, 404, 409, 422, 429, 500, 502, 503, 504)
942
+ - `WebhookVerificationError` - Webhook signature verification failures
943
+
944
+ ### Usage Example
945
+
946
+ ```typescript
947
+ import { ScalekitServerException } from '@scalekit-sdk/node';
948
+
949
+ try {
950
+ const result = await scalekitClient.organization.getOrganization('invalid_id');
951
+ } catch (error) {
952
+ if (error instanceof ScalekitServerException) {
953
+ console.log('HTTP Status:', error.httpStatus);
954
+ console.log('Error Code:', error.errorCode);
955
+ console.log('Message:', error.message);
956
+ }
957
+ }
958
+ ```
959
+
960
+ ### ScalekitServerException Properties
961
+
962
+ - `grpcStatus`: gRPC status code
963
+ - `httpStatus`: HTTP status code (e.g., 404)
964
+ - `errorCode`: Scalekit error code
965
+ - `message`: Error message
966
+ - `errDetails`: Additional error details
967
+ - `unpackedDetails`: Unpacked protobuf details
968
+
969
+ ## Type Definitions
970
+
971
+ ### Authentication Types
972
+
973
+ - `AuthorizationUrlOptions`: Options for generating auth URLs
974
+ - `AuthenticationOptions`: Options for authentication
975
+ - `AuthenticationResponse`: Response from authentication
976
+ - `TokenValidationOptions`: Options for token validation
977
+ - `LogoutUrlOptions`: Options for logout URLs
978
+ - `RefreshTokenResponse`: Response from token refresh
979
+
980
+ ### User Types
981
+
982
+ - `User`: User object
983
+ - `Identity`: User identity
984
+ - `IdpInitiatedLoginClaims`: Claims from IdP-initiated login
985
+
986
+ ### Organization Types
987
+
988
+ - `CreateUserRequest`: Request to create user
989
+ - `UpdateUserRequest`: Request to update user
990
+ - `OrganizationSettings`: Organization settings
991
+
992
+ ### Grant Types
993
+
994
+ - `GrantType`: OAuth grant types
995
+
543
996
  ## Organizations
544
997
 
545
- <details><summary><code>client.organization.<a href="/src/organization.ts">createOrganization</a>(name, options?) -> Promise&lt;CreateOrganizationResponse&gt;</code></summary>
998
+ <details><summary><code>client.organization.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/organization.ts">createOrganization</a>(name, options?) -> Promise&lt;CreateOrganizationResponse&gt;</code></summary>
546
999
  <dl>
547
1000
  <dd>
548
1001
 
@@ -612,7 +1065,7 @@ console.log('Organization ID:', org.organization.id);
612
1065
  </dl>
613
1066
  </details>
614
1067
 
615
- <details><summary><code>client.organization.<a href="/src/organization.ts">listOrganization</a>(options?) -> Promise&lt;ListOrganizationsResponse&gt;</code></summary>
1068
+ <details><summary><code>client.organization.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/organization.ts">listOrganization</a>(options?) -> Promise&lt;ListOrganizationsResponse&gt;</code></summary>
616
1069
  <dl>
617
1070
  <dd>
618
1071
 
@@ -675,7 +1128,7 @@ console.log('Total:', response.totalSize);
675
1128
  </dl>
676
1129
  </details>
677
1130
 
678
- <details><summary><code>client.organization.<a href="/src/organization.ts">getOrganization</a>(id) -> Promise&lt;GetOrganizationResponse&gt;</code></summary>
1131
+ <details><summary><code>client.organization.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/organization.ts">getOrganization</a>(id) -> Promise&lt;GetOrganizationResponse&gt;</code></summary>
679
1132
  <dl>
680
1133
  <dd>
681
1134
 
@@ -735,7 +1188,7 @@ console.log('External ID:', org.externalId);
735
1188
  </dl>
736
1189
  </details>
737
1190
 
738
- <details><summary><code>client.organization.<a href="/src/organization.ts">getOrganizationByExternalId</a>(externalId) -> Promise&lt;GetOrganizationResponse&gt;</code></summary>
1191
+ <details><summary><code>client.organization.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/organization.ts">getOrganizationByExternalId</a>(externalId) -> Promise&lt;GetOrganizationResponse&gt;</code></summary>
739
1192
  <dl>
740
1193
  <dd>
741
1194
 
@@ -795,7 +1248,7 @@ console.log('Organization:', org.displayName);
795
1248
  </dl>
796
1249
  </details>
797
1250
 
798
- <details><summary><code>client.organization.<a href="/src/organization.ts">updateOrganization</a>(id, organization) -> Promise&lt;UpdateOrganizationResponse&gt;</code></summary>
1251
+ <details><summary><code>client.organization.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/organization.ts">updateOrganization</a>(id, organization) -> Promise&lt;UpdateOrganizationResponse&gt;</code></summary>
799
1252
  <dl>
800
1253
  <dd>
801
1254
 
@@ -865,7 +1318,7 @@ const response = await scalekitClient.organization.updateOrganization('org_12345
865
1318
  </dl>
866
1319
  </details>
867
1320
 
868
- <details><summary><code>client.organization.<a href="/src/organization.ts">updateOrganizationByExternalId</a>(externalId, organization) -> Promise&lt;UpdateOrganizationResponse&gt;</code></summary>
1321
+ <details><summary><code>client.organization.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/organization.ts">updateOrganizationByExternalId</a>(externalId, organization) -> Promise&lt;UpdateOrganizationResponse&gt;</code></summary>
869
1322
  <dl>
870
1323
  <dd>
871
1324
 
@@ -932,7 +1385,7 @@ const response = await scalekitClient.organization.updateOrganizationByExternalI
932
1385
  </dl>
933
1386
  </details>
934
1387
 
935
- <details><summary><code>client.organization.<a href="/src/organization.ts">deleteOrganization</a>(organizationId) -> Promise&lt;Empty&gt;</code></summary>
1388
+ <details><summary><code>client.organization.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/organization.ts">deleteOrganization</a>(organizationId) -> Promise&lt;Empty&gt;</code></summary>
936
1389
  <dl>
937
1390
  <dd>
938
1391
 
@@ -989,7 +1442,7 @@ console.log('Organization deleted successfully');
989
1442
  </dl>
990
1443
  </details>
991
1444
 
992
- <details><summary><code>client.organization.<a href="/src/organization.ts">generatePortalLink</a>(organizationId) -> Promise&lt;Link&gt;</code></summary>
1445
+ <details><summary><code>client.organization.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/organization.ts">generatePortalLink</a>(organizationId) -> Promise&lt;Link&gt;</code></summary>
993
1446
  <dl>
994
1447
  <dd>
995
1448
 
@@ -1051,7 +1504,7 @@ app.get('/admin/sso-settings', async (req, res) => {
1051
1504
  </dl>
1052
1505
  </details>
1053
1506
 
1054
- <details><summary><code>client.organization.<a href="/src/organization.ts">updateOrganizationSettings</a>(organizationId, settings) -> Promise&lt;GetOrganizationResponse&gt;</code></summary>
1507
+ <details><summary><code>client.organization.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/organization.ts">updateOrganizationSettings</a>(organizationId, settings) -> Promise&lt;GetOrganizationResponse&gt;</code></summary>
1055
1508
  <dl>
1056
1509
  <dd>
1057
1510
 
@@ -1120,7 +1573,7 @@ const response = await scalekitClient.organization.updateOrganizationSettings('o
1120
1573
  </dl>
1121
1574
  </details>
1122
1575
 
1123
- <details><summary><code>client.organization.<a href="/src/organization.ts">upsertUserManagementSettings</a>(organizationId, settings) -> Promise&lt;OrganizationUserManagementSettings | undefined&gt;</code></summary>
1576
+ <details><summary><code>client.organization.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/organization.ts">upsertUserManagementSettings</a>(organizationId, settings) -> Promise&lt;OrganizationUserManagementSettings | undefined&gt;</code></summary>
1124
1577
  <dl>
1125
1578
  <dd>
1126
1579
 
@@ -1191,7 +1644,7 @@ console.log('Max users allowed:', settings?.maxAllowedUsers);
1191
1644
 
1192
1645
  ## Connections
1193
1646
 
1194
- <details><summary><code>client.connection.<a href="/src/connection.ts">getConnection</a>(organizationId, id) -> Promise&lt;GetConnectionResponse&gt;</code></summary>
1647
+ <details><summary><code>client.connection.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/connection.ts">getConnection</a>(organizationId, id) -> Promise&lt;GetConnectionResponse&gt;</code></summary>
1195
1648
  <dl>
1196
1649
  <dd>
1197
1650
 
@@ -1263,7 +1716,7 @@ console.log('Status:', conn.enabled ? 'Enabled' : 'Disabled');
1263
1716
  </dl>
1264
1717
  </details>
1265
1718
 
1266
- <details><summary><code>client.connection.<a href="/src/connection.ts">listConnectionsByDomain</a>(domain) -> Promise&lt;ListConnectionsResponse&gt;</code></summary>
1719
+ <details><summary><code>client.connection.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/connection.ts">listConnectionsByDomain</a>(domain) -> Promise&lt;ListConnectionsResponse&gt;</code></summary>
1267
1720
  <dl>
1268
1721
  <dd>
1269
1722
 
@@ -1325,7 +1778,7 @@ if (response.connections.length > 0) {
1325
1778
  </dl>
1326
1779
  </details>
1327
1780
 
1328
- <details><summary><code>client.connection.<a href="/src/connection.ts">listConnections</a>(organizationId) -> Promise&lt;ListConnectionsResponse&gt;</code></summary>
1781
+ <details><summary><code>client.connection.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/connection.ts">listConnections</a>(organizationId) -> Promise&lt;ListConnectionsResponse&gt;</code></summary>
1329
1782
  <dl>
1330
1783
  <dd>
1331
1784
 
@@ -1386,7 +1839,7 @@ response.connections.forEach(conn => {
1386
1839
  </dl>
1387
1840
  </details>
1388
1841
 
1389
- <details><summary><code>client.connection.<a href="/src/connection.ts">enableConnection</a>(organizationId, id) -> Promise&lt;ToggleConnectionResponse&gt;</code></summary>
1842
+ <details><summary><code>client.connection.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/connection.ts">enableConnection</a>(organizationId, id) -> Promise&lt;ToggleConnectionResponse&gt;</code></summary>
1390
1843
  <dl>
1391
1844
  <dd>
1392
1845
 
@@ -1455,7 +1908,7 @@ console.log('Connection enabled:', response.connection.enabled);
1455
1908
  </dl>
1456
1909
  </details>
1457
1910
 
1458
- <details><summary><code>client.connection.<a href="/src/connection.ts">disableConnection</a>(organizationId, id) -> Promise&lt;ToggleConnectionResponse&gt;</code></summary>
1911
+ <details><summary><code>client.connection.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/connection.ts">disableConnection</a>(organizationId, id) -> Promise&lt;ToggleConnectionResponse&gt;</code></summary>
1459
1912
  <dl>
1460
1913
  <dd>
1461
1914
 
@@ -1526,7 +1979,7 @@ console.log('Connection disabled:', !response.connection.enabled);
1526
1979
 
1527
1980
  ## Users
1528
1981
 
1529
- <details><summary><code>client.user.<a href="/src/user.ts">createUserAndMembership</a>(organizationId, options) -> Promise&lt;CreateUserAndMembershipResponse&gt;</code></summary>
1982
+ <details><summary><code>client.user.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/user.ts">createUserAndMembership</a>(organizationId, options) -> Promise&lt;CreateUserAndMembershipResponse&gt;</code></summary>
1530
1983
  <dl>
1531
1984
  <dd>
1532
1985
 
@@ -1609,7 +2062,7 @@ console.log('User created:', response.user.id);
1609
2062
  </dl>
1610
2063
  </details>
1611
2064
 
1612
- <details><summary><code>client.user.<a href="/src/user.ts">getUser</a>(userId) -> Promise&lt;GetUserResponse&gt;</code></summary>
2065
+ <details><summary><code>client.user.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/user.ts">getUser</a>(userId) -> Promise&lt;GetUserResponse&gt;</code></summary>
1613
2066
  <dl>
1614
2067
  <dd>
1615
2068
 
@@ -1670,7 +2123,7 @@ console.log('Organizations:', user.memberships?.length);
1670
2123
  </dl>
1671
2124
  </details>
1672
2125
 
1673
- <details><summary><code>client.user.<a href="/src/user.ts">listUsers</a>(options?) -> Promise&lt;ListUsersResponse&gt;</code></summary>
2126
+ <details><summary><code>client.user.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/user.ts">listUsers</a>(options?) -> Promise&lt;ListUsersResponse&gt;</code></summary>
1674
2127
  <dl>
1675
2128
  <dd>
1676
2129
 
@@ -1733,7 +2186,7 @@ console.log('Total users:', response.totalSize);
1733
2186
  </dl>
1734
2187
  </details>
1735
2188
 
1736
- <details><summary><code>client.user.<a href="/src/user.ts">updateUser</a>(userId, options) -> Promise&lt;UpdateUserResponse&gt;</code></summary>
2189
+ <details><summary><code>client.user.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/user.ts">updateUser</a>(userId, options) -> Promise&lt;UpdateUserResponse&gt;</code></summary>
1737
2190
  <dl>
1738
2191
  <dd>
1739
2192
 
@@ -1806,7 +2259,7 @@ const response = await scalekitClient.user.updateUser('usr_123456', {
1806
2259
  </dl>
1807
2260
  </details>
1808
2261
 
1809
- <details><summary><code>client.user.<a href="/src/user.ts">deleteUser</a>(userId) -> Promise&lt;Empty&gt;</code></summary>
2262
+ <details><summary><code>client.user.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/user.ts">deleteUser</a>(userId) -> Promise&lt;Empty&gt;</code></summary>
1810
2263
  <dl>
1811
2264
  <dd>
1812
2265
 
@@ -1863,7 +2316,7 @@ console.log('User deleted successfully');
1863
2316
  </dl>
1864
2317
  </details>
1865
2318
 
1866
- <details><summary><code>client.user.<a href="/src/user.ts">createMembership</a>(organizationId, userId, options?) -> Promise&lt;CreateMembershipResponse&gt;</code></summary>
2319
+ <details><summary><code>client.user.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/user.ts">createMembership</a>(organizationId, userId, options?) -> Promise&lt;CreateMembershipResponse&gt;</code></summary>
1867
2320
  <dl>
1868
2321
  <dd>
1869
2322
 
@@ -1945,7 +2398,7 @@ const response = await scalekitClient.user.createMembership(
1945
2398
  </dl>
1946
2399
  </details>
1947
2400
 
1948
- <details><summary><code>client.user.<a href="/src/user.ts">deleteMembership</a>(organizationId, userId) -> Promise&lt;Empty&gt;</code></summary>
2401
+ <details><summary><code>client.user.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/user.ts">deleteMembership</a>(organizationId, userId) -> Promise&lt;Empty&gt;</code></summary>
1949
2402
  <dl>
1950
2403
  <dd>
1951
2404
 
@@ -2010,7 +2463,7 @@ console.log('User removed from organization');
2010
2463
  </dl>
2011
2464
  </details>
2012
2465
 
2013
- <details><summary><code>client.user.<a href="/src/user.ts">updateMembership</a>(organizationId, userId, options?) -> Promise&lt;UpdateMembershipResponse&gt;</code></summary>
2466
+ <details><summary><code>client.user.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/user.ts">updateMembership</a>(organizationId, userId, options?) -> Promise&lt;UpdateMembershipResponse&gt;</code></summary>
2014
2467
  <dl>
2015
2468
  <dd>
2016
2469
 
@@ -2088,7 +2541,7 @@ const response = await scalekitClient.user.updateMembership(
2088
2541
  </dl>
2089
2542
  </details>
2090
2543
 
2091
- <details><summary><code>client.user.<a href="/src/user.ts">listOrganizationUsers</a>(organizationId, options?) -> Promise&lt;ListOrganizationUsersResponse&gt;</code></summary>
2544
+ <details><summary><code>client.user.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/user.ts">listOrganizationUsers</a>(organizationId, options?) -> Promise&lt;ListOrganizationUsersResponse&gt;</code></summary>
2092
2545
  <dl>
2093
2546
  <dd>
2094
2547
 
@@ -2159,7 +2612,7 @@ console.log('Total members:', response.totalSize);
2159
2612
  </dl>
2160
2613
  </details>
2161
2614
 
2162
- <details><summary><code>client.user.<a href="/src/user.ts">resendInvite</a>(organizationId, userId) -> Promise&lt;ResendInviteResponse&gt;</code></summary>
2615
+ <details><summary><code>client.user.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/user.ts">resendInvite</a>(organizationId, userId) -> Promise&lt;ResendInviteResponse&gt;</code></summary>
2163
2616
  <dl>
2164
2617
  <dd>
2165
2618
 
@@ -2226,7 +2679,7 @@ console.log('Invitation resent:', response.invite);
2226
2679
 
2227
2680
  ## Domains
2228
2681
 
2229
- <details><summary><code>client.domain.<a href="/src/domain.ts">createDomain</a>(organizationId, name, options?) -> Promise&lt;CreateDomainResponse&gt;</code></summary>
2682
+ <details><summary><code>client.domain.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/domain.ts">createDomain</a>(organizationId, name, options?) -> Promise&lt;CreateDomainResponse&gt;</code></summary>
2230
2683
  <dl>
2231
2684
  <dd>
2232
2685
 
@@ -2309,7 +2762,7 @@ console.log('Domain created:', response.domain.id);
2309
2762
  </dl>
2310
2763
  </details>
2311
2764
 
2312
- <details><summary><code>client.domain.<a href="/src/domain.ts">getDomain</a>(organizationId, domainId) -> Promise&lt;GetDomainResponse&gt;</code></summary>
2765
+ <details><summary><code>client.domain.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/domain.ts">getDomain</a>(organizationId, domainId) -> Promise&lt;GetDomainResponse&gt;</code></summary>
2313
2766
  <dl>
2314
2767
  <dd>
2315
2768
 
@@ -2380,7 +2833,7 @@ console.log('Verified:', response.domain.verificationStatus);
2380
2833
  </dl>
2381
2834
  </details>
2382
2835
 
2383
- <details><summary><code>client.domain.<a href="/src/domain.ts">listDomains</a>(organizationId, options?) -> Promise&lt;ListDomainResponse&gt;</code></summary>
2836
+ <details><summary><code>client.domain.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/domain.ts">listDomains</a>(organizationId, options?) -> Promise&lt;ListDomainResponse&gt;</code></summary>
2384
2837
  <dl>
2385
2838
  <dd>
2386
2839
 
@@ -2450,7 +2903,7 @@ response.domains.forEach(domain => {
2450
2903
  </dl>
2451
2904
  </details>
2452
2905
 
2453
- <details><summary><code>client.domain.<a href="/src/domain.ts">deleteDomain</a>(organizationId, domainId) -> Promise&lt;Empty&gt;</code></summary>
2906
+ <details><summary><code>client.domain.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/domain.ts">deleteDomain</a>(organizationId, domainId) -> Promise&lt;Empty&gt;</code></summary>
2454
2907
  <dl>
2455
2908
  <dd>
2456
2909
 
@@ -2517,7 +2970,7 @@ console.log('Domain deleted successfully');
2517
2970
 
2518
2971
  ## Directories
2519
2972
 
2520
- <details><summary><code>client.directory.<a href="/src/directory.ts">listDirectories</a>(organizationId) -> Promise&lt;ListDirectoriesResponse&gt;</code></summary>
2973
+ <details><summary><code>client.directory.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/directory.ts">listDirectories</a>(organizationId) -> Promise&lt;ListDirectoriesResponse&gt;</code></summary>
2521
2974
  <dl>
2522
2975
  <dd>
2523
2976
 
@@ -2579,7 +3032,7 @@ response.directories.forEach(dir => {
2579
3032
  </dl>
2580
3033
  </details>
2581
3034
 
2582
- <details><summary><code>client.directory.<a href="/src/directory.ts">getDirectory</a>(organizationId, directoryId) -> Promise&lt;GetDirectoryResponse&gt;</code></summary>
3035
+ <details><summary><code>client.directory.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/directory.ts">getDirectory</a>(organizationId, directoryId) -> Promise&lt;GetDirectoryResponse&gt;</code></summary>
2583
3036
  <dl>
2584
3037
  <dd>
2585
3038
 
@@ -2651,7 +3104,7 @@ console.log('Users:', dir.userCount);
2651
3104
  </dl>
2652
3105
  </details>
2653
3106
 
2654
- <details><summary><code>client.directory.<a href="/src/directory.ts">getPrimaryDirectoryByOrganizationId</a>(organizationId) -> Promise&lt;Directory&gt;</code></summary>
3107
+ <details><summary><code>client.directory.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/directory.ts">getPrimaryDirectoryByOrganizationId</a>(organizationId) -> Promise&lt;Directory&gt;</code></summary>
2655
3108
  <dl>
2656
3109
  <dd>
2657
3110
 
@@ -2710,7 +3163,7 @@ console.log('Users:', directory.userCount);
2710
3163
  </dl>
2711
3164
  </details>
2712
3165
 
2713
- <details><summary><code>client.directory.<a href="/src/directory.ts">listDirectoryUsers</a>(organizationId, directoryId, options?) -> Promise&lt;ListDirectoryUsersResponse&gt;</code></summary>
3166
+ <details><summary><code>client.directory.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/directory.ts">listDirectoryUsers</a>(organizationId, directoryId, options?) -> Promise&lt;ListDirectoryUsersResponse&gt;</code></summary>
2714
3167
  <dl>
2715
3168
  <dd>
2716
3169
 
@@ -2793,7 +3246,7 @@ console.log(`Found ${response.totalSize} users`);
2793
3246
  </dl>
2794
3247
  </details>
2795
3248
 
2796
- <details><summary><code>client.directory.<a href="/src/directory.ts">listDirectoryGroups</a>(organizationId, directoryId, options?) -> Promise&lt;ListDirectoryGroupsResponse&gt;</code></summary>
3249
+ <details><summary><code>client.directory.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/directory.ts">listDirectoryGroups</a>(organizationId, directoryId, options?) -> Promise&lt;ListDirectoryGroupsResponse&gt;</code></summary>
2797
3250
  <dl>
2798
3251
  <dd>
2799
3252
 
@@ -2875,7 +3328,7 @@ console.log(`Found ${response.totalSize} groups`);
2875
3328
  </dl>
2876
3329
  </details>
2877
3330
 
2878
- <details><summary><code>client.directory.<a href="/src/directory.ts">enableDirectory</a>(organizationId, directoryId) -> Promise&lt;ToggleDirectoryResponse&gt;</code></summary>
3331
+ <details><summary><code>client.directory.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/directory.ts">enableDirectory</a>(organizationId, directoryId) -> Promise&lt;ToggleDirectoryResponse&gt;</code></summary>
2879
3332
  <dl>
2880
3333
  <dd>
2881
3334
 
@@ -2944,7 +3397,7 @@ console.log('Directory enabled:', response.directory.enabled);
2944
3397
  </dl>
2945
3398
  </details>
2946
3399
 
2947
- <details><summary><code>client.directory.<a href="/src/directory.ts">disableDirectory</a>(organizationId, directoryId) -> Promise&lt;ToggleDirectoryResponse&gt;</code></summary>
3400
+ <details><summary><code>client.directory.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/directory.ts">disableDirectory</a>(organizationId, directoryId) -> Promise&lt;ToggleDirectoryResponse&gt;</code></summary>
2948
3401
  <dl>
2949
3402
  <dd>
2950
3403
 
@@ -3015,7 +3468,7 @@ console.log('Directory disabled:', !response.directory.enabled);
3015
3468
 
3016
3469
  ## Sessions
3017
3470
 
3018
- <details><summary><code>client.session.<a href="/src/session.ts">getSession</a>(sessionId) -> Promise&lt;SessionDetails&gt;</code></summary>
3471
+ <details><summary><code>client.session.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/session.ts">getSession</a>(sessionId) -> Promise&lt;SessionDetails&gt;</code></summary>
3019
3472
  <dl>
3020
3473
  <dd>
3021
3474
 
@@ -3076,7 +3529,7 @@ console.log('Location:', session.geoLocation);
3076
3529
  </dl>
3077
3530
  </details>
3078
3531
 
3079
- <details><summary><code>client.session.<a href="/src/session.ts">getUserSessions</a>(userId, options?) -> Promise&lt;UserSessionDetails&gt;</code></summary>
3532
+ <details><summary><code>client.session.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/session.ts">getUserSessions</a>(userId, options?) -> Promise&lt;UserSessionDetails&gt;</code></summary>
3080
3533
  <dl>
3081
3534
  <dd>
3082
3535
 
@@ -3151,7 +3604,7 @@ console.log(`User has ${response.totalSize} active sessions`);
3151
3604
  </dl>
3152
3605
  </details>
3153
3606
 
3154
- <details><summary><code>client.session.<a href="/src/session.ts">revokeSession</a>(sessionId) -> Promise&lt;RevokeSessionResponse&gt;</code></summary>
3607
+ <details><summary><code>client.session.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/session.ts">revokeSession</a>(sessionId) -> Promise&lt;RevokeSessionResponse&gt;</code></summary>
3155
3608
  <dl>
3156
3609
  <dd>
3157
3610
 
@@ -3208,7 +3661,7 @@ console.log('Session revoked at:', response.revokedAt);
3208
3661
  </dl>
3209
3662
  </details>
3210
3663
 
3211
- <details><summary><code>client.session.<a href="/src/session.ts">revokeAllUserSessions</a>(userId) -> Promise&lt;RevokeAllUserSessionsResponse&gt;</code></summary>
3664
+ <details><summary><code>client.session.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/session.ts">revokeAllUserSessions</a>(userId) -> Promise&lt;RevokeAllUserSessionsResponse&gt;</code></summary>
3212
3665
  <dl>
3213
3666
  <dd>
3214
3667
 
@@ -3268,7 +3721,7 @@ console.log(`Revoked ${response.totalCount} sessions`);
3268
3721
 
3269
3722
  ## Roles
3270
3723
 
3271
- <details><summary><code>client.role.<a href="/src/role.ts">createRole</a>(role) -> Promise&lt;CreateRoleResponse&gt;</code></summary>
3724
+ <details><summary><code>client.role.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/role.ts">createRole</a>(role) -> Promise&lt;CreateRoleResponse&gt;</code></summary>
3272
3725
  <dl>
3273
3726
  <dd>
3274
3727
 
@@ -3334,7 +3787,7 @@ const response = await scalekitClient.role.createRole({
3334
3787
  </dl>
3335
3788
  </details>
3336
3789
 
3337
- <details><summary><code>client.role.<a href="/src/role.ts">getRole</a>(roleName) -> Promise&lt;GetRoleResponse&gt;</code></summary>
3790
+ <details><summary><code>client.role.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/role.ts">getRole</a>(roleName) -> Promise&lt;GetRoleResponse&gt;</code></summary>
3338
3791
  <dl>
3339
3792
  <dd>
3340
3793
 
@@ -3390,7 +3843,7 @@ console.log('Permissions:', response.role.permissions);
3390
3843
  </dl>
3391
3844
  </details>
3392
3845
 
3393
- <details><summary><code>client.role.<a href="/src/role.ts">listRoles</a>() -> Promise&lt;ListRolesResponse&gt;</code></summary>
3846
+ <details><summary><code>client.role.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/role.ts">listRoles</a>() -> Promise&lt;ListRolesResponse&gt;</code></summary>
3394
3847
  <dl>
3395
3848
  <dd>
3396
3849
 
@@ -3447,7 +3900,7 @@ None
3447
3900
  </dl>
3448
3901
  </details>
3449
3902
 
3450
- <details><summary><code>client.role.<a href="/src/role.ts">updateRole</a>(roleName, role) -> Promise&lt;UpdateRoleResponse&gt;</code></summary>
3903
+ <details><summary><code>client.role.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/role.ts">updateRole</a>(roleName, role) -> Promise&lt;UpdateRoleResponse&gt;</code></summary>
3451
3904
  <dl>
3452
3905
  <dd>
3453
3906
 
@@ -3514,7 +3967,7 @@ await scalekitClient.role.updateRole('content_editor', {
3514
3967
  </dl>
3515
3968
  </details>
3516
3969
 
3517
- <details><summary><code>client.role.<a href="/src/role.ts">deleteRole</a>(roleName, reassignRoleName?) -> Promise&lt;Empty&gt;</code></summary>
3970
+ <details><summary><code>client.role.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/role.ts">deleteRole</a>(roleName, reassignRoleName?) -> Promise&lt;Empty&gt;</code></summary>
3518
3971
  <dl>
3519
3972
  <dd>
3520
3973
 
@@ -3578,7 +4031,7 @@ await scalekitClient.role.deleteRole('old_role', 'new_role');
3578
4031
  </dl>
3579
4032
  </details>
3580
4033
 
3581
- <details><summary><code>client.role.<a href="/src/role.ts">getRoleUsersCount</a>(roleName) -> Promise&lt;GetRoleUsersCountResponse&gt;</code></summary>
4034
+ <details><summary><code>client.role.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/role.ts">getRoleUsersCount</a>(roleName) -> Promise&lt;GetRoleUsersCountResponse&gt;</code></summary>
3582
4035
  <dl>
3583
4036
  <dd>
3584
4037
 
@@ -3635,7 +4088,7 @@ console.log(`${response.count} users have admin role`);
3635
4088
  </dl>
3636
4089
  </details>
3637
4090
 
3638
- <details><summary><code>client.role.<a href="/src/role.ts">createOrganizationRole</a>(orgId, role) -> Promise&lt;CreateOrganizationRoleResponse&gt;</code></summary>
4091
+ <details><summary><code>client.role.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/role.ts">createOrganizationRole</a>(orgId, role) -> Promise&lt;CreateOrganizationRoleResponse&gt;</code></summary>
3639
4092
  <dl>
3640
4093
  <dd>
3641
4094
 
@@ -3704,7 +4157,7 @@ await scalekitClient.role.createOrganizationRole('org_123456', {
3704
4157
  </dl>
3705
4158
  </details>
3706
4159
 
3707
- <details><summary><code>client.role.<a href="/src/role.ts">getOrganizationRole</a>(orgId, roleName) -> Promise&lt;GetOrganizationRoleResponse&gt;</code></summary>
4160
+ <details><summary><code>client.role.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/role.ts">getOrganizationRole</a>(orgId, roleName) -> Promise&lt;GetOrganizationRoleResponse&gt;</code></summary>
3708
4161
  <dl>
3709
4162
  <dd>
3710
4163
 
@@ -3771,7 +4224,7 @@ console.log('Permissions:', response.role.permissions);
3771
4224
  </dl>
3772
4225
  </details>
3773
4226
 
3774
- <details><summary><code>client.role.<a href="/src/role.ts">listOrganizationRoles</a>(orgId) -> Promise&lt;ListOrganizationRolesResponse&gt;</code></summary>
4227
+ <details><summary><code>client.role.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/role.ts">listOrganizationRoles</a>(orgId) -> Promise&lt;ListOrganizationRolesResponse&gt;</code></summary>
3775
4228
  <dl>
3776
4229
  <dd>
3777
4230
 
@@ -3830,7 +4283,7 @@ response.roles.forEach(role => {
3830
4283
  </dl>
3831
4284
  </details>
3832
4285
 
3833
- <details><summary><code>client.role.<a href="/src/role.ts">updateOrganizationRole</a>(orgId, roleName, role) -> Promise&lt;UpdateOrganizationRoleResponse&gt;</code></summary>
4286
+ <details><summary><code>client.role.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/role.ts">updateOrganizationRole</a>(orgId, roleName, role) -> Promise&lt;UpdateOrganizationRoleResponse&gt;</code></summary>
3834
4287
  <dl>
3835
4288
  <dd>
3836
4289
 
@@ -3904,7 +4357,7 @@ await scalekitClient.role.updateOrganizationRole('org_123456', 'department_lead'
3904
4357
  </dl>
3905
4358
  </details>
3906
4359
 
3907
- <details><summary><code>client.role.<a href="/src/role.ts">deleteOrganizationRole</a>(orgId, roleName, reassignRoleName?) -> Promise&lt;Empty&gt;</code></summary>
4360
+ <details><summary><code>client.role.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/role.ts">deleteOrganizationRole</a>(orgId, roleName, reassignRoleName?) -> Promise&lt;Empty&gt;</code></summary>
3908
4361
  <dl>
3909
4362
  <dd>
3910
4363
 
@@ -3980,7 +4433,7 @@ await scalekitClient.role.deleteOrganizationRole(
3980
4433
  </dl>
3981
4434
  </details>
3982
4435
 
3983
- <details><summary><code>client.role.<a href="/src/role.ts">getOrganizationRoleUsersCount</a>(orgId, roleName) -> Promise&lt;GetOrganizationRoleUsersCountResponse&gt;</code></summary>
4436
+ <details><summary><code>client.role.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/role.ts">getOrganizationRoleUsersCount</a>(orgId, roleName) -> Promise&lt;GetOrganizationRoleUsersCountResponse&gt;</code></summary>
3984
4437
  <dl>
3985
4438
  <dd>
3986
4439
 
@@ -4047,7 +4500,7 @@ console.log(`${response.count} admins in this organization`);
4047
4500
  </dl>
4048
4501
  </details>
4049
4502
 
4050
- <details><summary><code>client.role.<a href="/src/role.ts">updateDefaultOrganizationRoles</a>(orgId, defaultMemberRole) -> Promise&lt;UpdateDefaultOrganizationRolesResponse&gt;</code></summary>
4503
+ <details><summary><code>client.role.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/role.ts">updateDefaultOrganizationRoles</a>(orgId, defaultMemberRole) -> Promise&lt;UpdateDefaultOrganizationRolesResponse&gt;</code></summary>
4051
4504
  <dl>
4052
4505
  <dd>
4053
4506
 
@@ -4111,7 +4564,7 @@ await scalekitClient.role.updateDefaultOrganizationRoles('org_123456', 'member')
4111
4564
  </dl>
4112
4565
  </details>
4113
4566
 
4114
- <details><summary><code>client.role.<a href="/src/role.ts">deleteOrganizationRoleBase</a>(orgId, roleName) -> Promise&lt;Empty&gt;</code></summary>
4567
+ <details><summary><code>client.role.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/role.ts">deleteOrganizationRoleBase</a>(orgId, roleName) -> Promise&lt;Empty&gt;</code></summary>
4115
4568
  <dl>
4116
4569
  <dd>
4117
4570
 
@@ -4177,7 +4630,7 @@ await scalekitClient.role.deleteOrganizationRoleBase('org_123456', 'custom_role'
4177
4630
 
4178
4631
  ## Permissions
4179
4632
 
4180
- <details><summary><code>client.permission.<a href="/src/permission.ts">createPermission</a>(permission) -> Promise&lt;CreatePermissionResponse&gt;</code></summary>
4633
+ <details><summary><code>client.permission.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/permission.ts">createPermission</a>(permission) -> Promise&lt;CreatePermissionResponse&gt;</code></summary>
4181
4634
  <dl>
4182
4635
  <dd>
4183
4636
 
@@ -4238,7 +4691,7 @@ await scalekitClient.permission.createPermission({
4238
4691
  </dl>
4239
4692
  </details>
4240
4693
 
4241
- <details><summary><code>client.permission.<a href="/src/permission.ts">getPermission</a>(permissionName) -> Promise&lt;GetPermissionResponse&gt;</code></summary>
4694
+ <details><summary><code>client.permission.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/permission.ts">getPermission</a>(permissionName) -> Promise&lt;GetPermissionResponse&gt;</code></summary>
4242
4695
  <dl>
4243
4696
  <dd>
4244
4697
 
@@ -4293,7 +4746,7 @@ console.log('Description:', response.permission.description);
4293
4746
  </dl>
4294
4747
  </details>
4295
4748
 
4296
- <details><summary><code>client.permission.<a href="/src/permission.ts">listPermissions</a>(pageToken?, pageSize?) -> Promise&lt;ListPermissionsResponse&gt;</code></summary>
4749
+ <details><summary><code>client.permission.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/permission.ts">listPermissions</a>(pageToken?, pageSize?) -> Promise&lt;ListPermissionsResponse&gt;</code></summary>
4297
4750
  <dl>
4298
4751
  <dd>
4299
4752
 
@@ -4360,7 +4813,7 @@ response.permissions.forEach(perm => {
4360
4813
  </dl>
4361
4814
  </details>
4362
4815
 
4363
- <details><summary><code>client.permission.<a href="/src/permission.ts">updatePermission</a>(permissionName, permission) -> Promise&lt;UpdatePermissionResponse&gt;</code></summary>
4816
+ <details><summary><code>client.permission.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/permission.ts">updatePermission</a>(permissionName, permission) -> Promise&lt;UpdatePermissionResponse&gt;</code></summary>
4364
4817
  <dl>
4365
4818
  <dd>
4366
4819
 
@@ -4427,7 +4880,7 @@ await scalekitClient.permission.updatePermission('read:invoices', {
4427
4880
  </dl>
4428
4881
  </details>
4429
4882
 
4430
- <details><summary><code>client.permission.<a href="/src/permission.ts">deletePermission</a>(permissionName) -> Promise&lt;Empty&gt;</code></summary>
4883
+ <details><summary><code>client.permission.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/permission.ts">deletePermission</a>(permissionName) -> Promise&lt;Empty&gt;</code></summary>
4431
4884
  <dl>
4432
4885
  <dd>
4433
4886
 
@@ -4483,7 +4936,7 @@ await scalekitClient.permission.deletePermission('deprecated:feature');
4483
4936
  </dl>
4484
4937
  </details>
4485
4938
 
4486
- <details><summary><code>client.permission.<a href="/src/permission.ts">listRolePermissions</a>(roleName) -> Promise&lt;ListRolePermissionsResponse&gt;</code></summary>
4939
+ <details><summary><code>client.permission.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/permission.ts">listRolePermissions</a>(roleName) -> Promise&lt;ListRolePermissionsResponse&gt;</code></summary>
4487
4940
  <dl>
4488
4941
  <dd>
4489
4942
 
@@ -4540,7 +4993,7 @@ console.log('Direct permissions:', response.permissions);
4540
4993
  </dl>
4541
4994
  </details>
4542
4995
 
4543
- <details><summary><code>client.permission.<a href="/src/permission.ts">addPermissionsToRole</a>(roleName, permissionNames) -> Promise&lt;AddPermissionsToRoleResponse&gt;</code></summary>
4996
+ <details><summary><code>client.permission.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/permission.ts">addPermissionsToRole</a>(roleName, permissionNames) -> Promise&lt;AddPermissionsToRoleResponse&gt;</code></summary>
4544
4997
  <dl>
4545
4998
  <dd>
4546
4999
 
@@ -4608,7 +5061,7 @@ await scalekitClient.permission.addPermissionsToRole('editor', [
4608
5061
  </dl>
4609
5062
  </details>
4610
5063
 
4611
- <details><summary><code>client.permission.<a href="/src/permission.ts">removePermissionFromRole</a>(roleName, permissionName) -> Promise&lt;Empty&gt;</code></summary>
5064
+ <details><summary><code>client.permission.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/permission.ts">removePermissionFromRole</a>(roleName, permissionName) -> Promise&lt;Empty&gt;</code></summary>
4612
5065
  <dl>
4613
5066
  <dd>
4614
5067
 
@@ -4672,7 +5125,7 @@ await scalekitClient.permission.removePermissionFromRole('editor', 'delete:docum
4672
5125
  </dl>
4673
5126
  </details>
4674
5127
 
4675
- <details><summary><code>client.permission.<a href="/src/permission.ts">listEffectiveRolePermissions</a>(roleName) -> Promise&lt;ListEffectiveRolePermissionsResponse&gt;</code></summary>
5128
+ <details><summary><code>client.permission.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/permission.ts">listEffectiveRolePermissions</a>(roleName) -> Promise&lt;ListEffectiveRolePermissionsResponse&gt;</code></summary>
4676
5129
  <dl>
4677
5130
  <dd>
4678
5131
 
@@ -4732,7 +5185,7 @@ console.log('Total effective permissions:', response.permissions.length);
4732
5185
 
4733
5186
  ## Passwordless
4734
5187
 
4735
- <details><summary><code>client.passwordless.<a href="/src/passwordless.ts">sendPasswordlessEmail</a>(email, options?) -> Promise&lt;SendPasswordlessResponse&gt;</code></summary>
5188
+ <details><summary><code>client.passwordless.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/passwordless.ts">sendPasswordlessEmail</a>(email, options?) -> Promise&lt;SendPasswordlessResponse&gt;</code></summary>
4736
5189
  <dl>
4737
5190
  <dd>
4738
5191
 
@@ -4808,7 +5261,7 @@ console.log('Auth Request ID:', response.authRequestId);
4808
5261
  </dl>
4809
5262
  </details>
4810
5263
 
4811
- <details><summary><code>client.passwordless.<a href="/src/passwordless.ts">verifyPasswordlessEmail</a>(credential, authRequestId?) -> Promise&lt;VerifyPasswordLessResponse&gt;</code></summary>
5264
+ <details><summary><code>client.passwordless.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/passwordless.ts">verifyPasswordlessEmail</a>(credential, authRequestId?) -> Promise&lt;VerifyPasswordLessResponse&gt;</code></summary>
4812
5265
  <dl>
4813
5266
  <dd>
4814
5267
 
@@ -4877,7 +5330,7 @@ console.log('Email:', response.email);
4877
5330
  </dl>
4878
5331
  </details>
4879
5332
 
4880
- <details><summary><code>client.passwordless.<a href="/src/passwordless.ts">resendPasswordlessEmail</a>(authRequestId) -> Promise&lt;SendPasswordlessResponse&gt;</code></summary>
5333
+ <details><summary><code>client.passwordless.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/passwordless.ts">resendPasswordlessEmail</a>(authRequestId) -> Promise&lt;SendPasswordlessResponse&gt;</code></summary>
4881
5334
  <dl>
4882
5335
  <dd>
4883
5336
 
@@ -4933,7 +5386,7 @@ const response = await scalekitClient.passwordless.resendPasswordlessEmail('auth
4933
5386
 
4934
5387
  ## WebAuthn
4935
5388
 
4936
- <details><summary><code>client.webauthn.<a href="/src/webauthn.ts">listCredentials</a>(userId) -> Promise&lt;ListCredentialsResponse&gt;</code></summary>
5389
+ <details><summary><code>client.webauthn.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/webauthn.ts">listCredentials</a>(userId) -> Promise&lt;ListCredentialsResponse&gt;</code></summary>
4937
5390
  <dl>
4938
5391
  <dd>
4939
5392
 
@@ -4988,7 +5441,7 @@ console.log('Credentials:', response.credentials);
4988
5441
  </dl>
4989
5442
  </details>
4990
5443
 
4991
- <details><summary><code>client.webauthn.<a href="/src/webauthn.ts">updateCredential</a>(credentialId, displayName) -> Promise&lt;UpdateCredentialResponse&gt;</code></summary>
5444
+ <details><summary><code>client.webauthn.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/webauthn.ts">updateCredential</a>(credentialId, displayName) -> Promise&lt;UpdateCredentialResponse&gt;</code></summary>
4992
5445
  <dl>
4993
5446
  <dd>
4994
5447
 
@@ -5053,7 +5506,7 @@ const response = await scalekitClient.webauthn.updateCredential(
5053
5506
  </dl>
5054
5507
  </details>
5055
5508
 
5056
- <details><summary><code>client.webauthn.<a href="/src/webauthn.ts">deleteCredential</a>(credentialId) -> Promise&lt;DeleteCredentialResponse&gt;</code></summary>
5509
+ <details><summary><code>client.webauthn.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/webauthn.ts">deleteCredential</a>(credentialId) -> Promise&lt;DeleteCredentialResponse&gt;</code></summary>
5057
5510
  <dl>
5058
5511
  <dd>
5059
5512
 
@@ -5110,7 +5563,7 @@ console.log('Deleted:', response.success);
5110
5563
 
5111
5564
  ## Auth
5112
5565
 
5113
- <details><summary><code>client.auth.<a href="/src/auth.ts">updateLoginUserDetails</a>(connectionId, loginRequestId, user) -> Promise&lt;Empty&gt;</code></summary>
5566
+ <details><summary><code>client.auth.<a href="https://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/auth.ts">updateLoginUserDetails</a>(connectionId, loginRequestId, user) -> Promise&lt;Empty&gt;</code></summary>
5114
5567
  <dl>
5115
5568
  <dd>
5116
5569
 
@@ -5187,677 +5640,6 @@ await scalekitClient.auth.updateLoginUserDetails(
5187
5640
  </dl>
5188
5641
 
5189
5642
 
5190
- </dd>
5191
- </dl>
5192
- </details>
5193
-
5194
- ## Tools
5195
-
5196
- <details><summary><code>client.tools.<a href="/src/tools.ts">listTools</a>(options?) -> Promise&lt;ListToolsResponse&gt;</code></summary>
5197
- <dl>
5198
- <dd>
5199
-
5200
- #### 📝 Description
5201
-
5202
- <dl>
5203
- <dd>
5204
-
5205
- <dl>
5206
- <dd>
5207
-
5208
- Lists tools available in your workspace with optional filtering and pagination. Use filter to narrow by provider, identifier, or tool names. Use summary filter to return only tool names.
5209
- </dd>
5210
- </dl>
5211
- </dd>
5212
- </dl>
5213
-
5214
- #### 🔌 Usage
5215
-
5216
- <dl>
5217
- <dd>
5218
-
5219
- <dl>
5220
- <dd>
5221
-
5222
- ```typescript
5223
- // List all tools
5224
- const response = await scalekitClient.tools.listTools();
5225
-
5226
- // List tools with filter and pagination
5227
- const filtered = await scalekitClient.tools.listTools({
5228
- filter: { provider: 'GOOGLE', toolName: ['gmail_send_email'] },
5229
- pageSize: 20,
5230
- pageToken: response.nextPageToken,
5231
- });
5232
-
5233
- // List only tool names (summary mode)
5234
- const names = await scalekitClient.tools.listTools({
5235
- filter: { summary: true },
5236
- });
5237
- ```
5238
- </dd>
5239
- </dl>
5240
- </dd>
5241
- </dl>
5242
-
5243
- #### ⚙️ Parameters
5244
-
5245
- <dl>
5246
- <dd>
5247
-
5248
- <dl>
5249
- <dd>
5250
-
5251
- **options:** `object` (optional)
5252
- - `filter?: object` - Filter by provider, identifier, toolName, summary
5253
- - `pageSize?: number` - Maximum number of tools per page
5254
- - `pageToken?: string` - Token from a previous response for pagination
5255
-
5256
- </dd>
5257
- </dl>
5258
- </dd>
5259
- </dl>
5260
-
5261
-
5262
- </dd>
5263
- </dl>
5264
- </details>
5265
-
5266
- <details><summary><code>client.tools.<a href="/src/tools.ts">listScopedTools</a>(identifier, options) -> Promise&lt;ListScopedToolsResponse&gt;</code></summary>
5267
- <dl>
5268
- <dd>
5269
-
5270
- #### 📝 Description
5271
-
5272
- <dl>
5273
- <dd>
5274
-
5275
- <dl>
5276
- <dd>
5277
-
5278
- Lists tools scoped to a specific connected account identifier. The filter is required by the API: you must pass a filter object with at least one non-empty array among `providers`, `toolNames`, or `connectionNames`. Empty arrays or omitting the filter will result in an error.
5279
- </dd>
5280
- </dl>
5281
- </dd>
5282
- </dl>
5283
-
5284
- #### 🔌 Usage
5285
-
5286
- <dl>
5287
- <dd>
5288
-
5289
- <dl>
5290
- <dd>
5291
-
5292
- ```typescript
5293
- // List scoped tools (filter is required; at least one of providers, toolNames, or connectionNames must be a non-empty array)
5294
- const response = await scalekitClient.tools.listScopedTools('user@example.com', {
5295
- filter: {
5296
- providers: ['GOOGLE'],
5297
- toolNames: ['gmail_send_email'],
5298
- },
5299
- pageSize: 10,
5300
- });
5301
-
5302
- // Paginate scoped tools
5303
- const nextPage = await scalekitClient.tools.listScopedTools('user@example.com', {
5304
- filter: { providers: ['GOOGLE'] },
5305
- pageSize: 10,
5306
- pageToken: response.nextPageToken,
5307
- });
5308
- ```
5309
- </dd>
5310
- </dl>
5311
- </dd>
5312
- </dl>
5313
-
5314
- #### ⚙️ Parameters
5315
-
5316
- <dl>
5317
- <dd>
5318
-
5319
- <dl>
5320
- <dd>
5321
-
5322
- **identifier:** `string` - Connected account identifier (e.g., email or workspace ID) to scope the tools list
5323
-
5324
- </dd>
5325
- </dl>
5326
-
5327
- <dl>
5328
- <dd>
5329
-
5330
- **options:** `object` - Required. Must include a filter (required by the API).
5331
- - `filter:` `object` - Required by the API. Must contain at least one non-empty array: `providers`, `toolNames`, or `connectionNames`. Example: `{ providers: ['GOOGLE'] }` or `{ toolNames: ['gmail_send_email'] }`.
5332
- - `pageSize?:` `number` - Maximum number of tools per page
5333
- - `pageToken?:` `string` - Token from a previous response for pagination
5334
-
5335
- </dd>
5336
- </dl>
5337
- </dd>
5338
- </dl>
5339
-
5340
-
5341
- </dd>
5342
- </dl>
5343
- </details>
5344
-
5345
- <details><summary><code>client.tools.<a href="/src/tools.ts">executeTool</a>(params) -> Promise&lt;ExecuteToolResponse&gt;</code></summary>
5346
- <dl>
5347
- <dd>
5348
-
5349
- #### 📝 Description
5350
-
5351
- <dl>
5352
- <dd>
5353
-
5354
- <dl>
5355
- <dd>
5356
-
5357
- Executes a tool using credentials from a connected account. Identify the connected account either by connectedAccountId or by the combination of identifier, connector, and optional organizationId/userId.
5358
- </dd>
5359
- </dl>
5360
- </dd>
5361
- </dl>
5362
-
5363
- #### 🔌 Usage
5364
-
5365
- <dl>
5366
- <dd>
5367
-
5368
- <dl>
5369
- <dd>
5370
-
5371
- ```typescript
5372
- // Execute with connected account ID
5373
- const result = await scalekitClient.tools.executeTool({
5374
- toolName: 'gmail_send_email',
5375
- connectedAccountId: 'ca_123',
5376
- params: {
5377
- to: 'user@example.com',
5378
- subject: 'Hello',
5379
- body: 'Hello World',
5380
- },
5381
- });
5382
-
5383
- // Execute with identifier and connector
5384
- const result2 = await scalekitClient.tools.executeTool({
5385
- toolName: 'gmail_send_email',
5386
- identifier: 'user@example.com',
5387
- connector: 'google_workspace',
5388
- organizationId: 'org_123',
5389
- params: { to: 'user@example.com', subject: 'Test', body: 'Body' },
5390
- });
5391
- ```
5392
- </dd>
5393
- </dl>
5394
- </dd>
5395
- </dl>
5396
-
5397
- #### ⚙️ Parameters
5398
-
5399
- <dl>
5400
- <dd>
5401
-
5402
- <dl>
5403
- <dd>
5404
-
5405
- **params:** `object`
5406
- - `toolName:` `string` - Name of the tool to execute
5407
- - `identifier?:` `string` - Connected account identifier (e.g., email, workspace ID)
5408
- - `params?:` `Record<string, unknown>` - JSON parameters for the tool
5409
- - `connectedAccountId?:` `string` - Direct ID of the connected account (ca_...)
5410
- - `connector?:` `string` - Connector/provider name when using identifier-based lookup
5411
- - `organizationId?:` `string` - Organization ID to scope the lookup
5412
- - `userId?:` `string` - User ID to scope the lookup
5413
-
5414
- </dd>
5415
- </dl>
5416
- </dd>
5417
- </dl>
5418
-
5419
-
5420
- </dd>
5421
- </dl>
5422
- </details>
5423
-
5424
- ## Connected Accounts
5425
-
5426
- <details><summary><code>client.connectedAccounts.<a href="/src/connected-accounts.ts">listConnectedAccounts</a>(options?) -> Promise&lt;ListConnectedAccountsResponse&gt;</code></summary>
5427
- <dl>
5428
- <dd>
5429
-
5430
- #### 📝 Description
5431
-
5432
- <dl>
5433
- <dd>
5434
-
5435
- <dl>
5436
- <dd>
5437
-
5438
- Lists connected accounts with optional filters (organization, user, connector, identifier, provider, query) and pagination.
5439
- </dd>
5440
- </dl>
5441
- </dd>
5442
- </dl>
5443
-
5444
- #### 🔌 Usage
5445
-
5446
- <dl>
5447
- <dd>
5448
-
5449
- <dl>
5450
- <dd>
5451
-
5452
- ```typescript
5453
- // List all connected accounts
5454
- const response = await scalekitClient.connectedAccounts.listConnectedAccounts();
5455
-
5456
- // List with filters and pagination
5457
- const filtered = await scalekitClient.connectedAccounts.listConnectedAccounts({
5458
- organizationId: 'org_123',
5459
- connector: 'notion',
5460
- pageSize: 10,
5461
- pageToken: response.nextPageToken,
5462
- });
5463
-
5464
- // Search by query
5465
- const search = await scalekitClient.connectedAccounts.listConnectedAccounts({
5466
- query: 'google',
5467
- });
5468
- ```
5469
- </dd>
5470
- </dl>
5471
- </dd>
5472
- </dl>
5473
-
5474
- #### ⚙️ Parameters
5475
-
5476
- <dl>
5477
- <dd>
5478
-
5479
- <dl>
5480
- <dd>
5481
-
5482
- **options:** `object` (optional)
5483
- - `organizationId?: string` - Filter by organization ID
5484
- - `userId?: string` - Filter by user ID
5485
- - `connector?: string` - Filter by connector (e.g., notion, slack)
5486
- - `identifier?: string` - Filter by account identifier
5487
- - `provider?: string` - Filter by provider (e.g., google)
5488
- - `pageSize?: number` - Results per page
5489
- - `pageToken?: string` - Pagination token
5490
- - `query?: string` - Text search query
5491
-
5492
- </dd>
5493
- </dl>
5494
- </dd>
5495
- </dl>
5496
-
5497
-
5498
- </dd>
5499
- </dl>
5500
- </details>
5501
-
5502
- <details><summary><code>client.connectedAccounts.<a href="/src/connected-accounts.ts">createConnectedAccount</a>(params) -> Promise&lt;CreateConnectedAccountResponse&gt;</code></summary>
5503
- <dl>
5504
- <dd>
5505
-
5506
- #### 📝 Description
5507
-
5508
- <dl>
5509
- <dd>
5510
-
5511
- <dl>
5512
- <dd>
5513
-
5514
- Creates a new connected account with OAuth or static auth details. Optionally scope to an organization or user.
5515
- </dd>
5516
- </dl>
5517
- </dd>
5518
- </dl>
5519
-
5520
- #### 🔌 Usage
5521
-
5522
- <dl>
5523
- <dd>
5524
-
5525
- <dl>
5526
- <dd>
5527
-
5528
- ```typescript
5529
- import {
5530
- CreateConnectedAccount,
5531
- AuthorizationDetails,
5532
- OauthToken,
5533
- } from '@scalekit-sdk/node';
5534
-
5535
- const oauthToken = new OauthToken({
5536
- accessToken: 'ya29.xxx',
5537
- refreshToken: '1//xxx',
5538
- scopes: ['read', 'write'],
5539
- });
5540
- const authDetails = new AuthorizationDetails({
5541
- details: { case: 'oauthToken', value: oauthToken },
5542
- });
5543
- const connectedAccount = new CreateConnectedAccount({
5544
- authorizationDetails: authDetails,
5545
- });
5546
-
5547
- const response = await scalekitClient.connectedAccounts.createConnectedAccount({
5548
- connector: 'notion',
5549
- identifier: 'workspace_123',
5550
- connectedAccount,
5551
- organizationId: 'org_123',
5552
- });
5553
- ```
5554
- </dd>
5555
- </dl>
5556
- </dd>
5557
- </dl>
5558
-
5559
- #### ⚙️ Parameters
5560
-
5561
- <dl>
5562
- <dd>
5563
-
5564
- <dl>
5565
- <dd>
5566
-
5567
- **params:** `object`
5568
- - `connector:` `string` - Connector identifier (e.g., notion, gmail)
5569
- - `identifier:` `string` - Unique identifier for the account in the third-party service
5570
- - `connectedAccount:` `CreateConnectedAccount` - Auth details (e.g., OAuth tokens)
5571
- - `organizationId?:` `string` - Scope to organization
5572
- - `userId?:` `string` - Scope to user
5573
-
5574
- </dd>
5575
- </dl>
5576
- </dd>
5577
- </dl>
5578
-
5579
-
5580
- </dd>
5581
- </dl>
5582
- </details>
5583
-
5584
- <details><summary><code>client.connectedAccounts.<a href="/src/connected-accounts.ts">updateConnectedAccount</a>(params) -> Promise&lt;UpdateConnectedAccountResponse&gt;</code></summary>
5585
- <dl>
5586
- <dd>
5587
-
5588
- #### 📝 Description
5589
-
5590
- <dl>
5591
- <dd>
5592
-
5593
- <dl>
5594
- <dd>
5595
-
5596
- Updates an existing connected account. Target by connector + identifier, or by connectedAccountId.
5597
- </dd>
5598
- </dl>
5599
- </dd>
5600
- </dl>
5601
-
5602
- #### 🔌 Usage
5603
-
5604
- <dl>
5605
- <dd>
5606
-
5607
- <dl>
5608
- <dd>
5609
-
5610
- ```typescript
5611
- const updatedAuth = new AuthorizationDetails({
5612
- details: {
5613
- case: 'oauthToken',
5614
- value: new OauthToken({
5615
- accessToken: 'new_access_token',
5616
- refreshToken: 'new_refresh_token',
5617
- scopes: ['read', 'write', 'admin'],
5618
- }),
5619
- },
5620
- });
5621
- const updatePayload = new UpdateConnectedAccount({
5622
- authorizationDetails: updatedAuth,
5623
- });
5624
-
5625
- await scalekitClient.connectedAccounts.updateConnectedAccount({
5626
- connector: 'notion',
5627
- identifier: 'workspace_123',
5628
- connectedAccount: updatePayload,
5629
- connectedAccountId: 'ca_123', // optional; or use connector + identifier
5630
- });
5631
- ```
5632
- </dd>
5633
- </dl>
5634
- </dd>
5635
- </dl>
5636
-
5637
- #### ⚙️ Parameters
5638
-
5639
- <dl>
5640
- <dd>
5641
-
5642
- <dl>
5643
- <dd>
5644
-
5645
- **params:** `object`
5646
- - `connector:` `string` - Connector identifier
5647
- - `identifier:` `string` - Account identifier
5648
- - `connectedAccount:` `UpdateConnectedAccount` - Updated auth/config
5649
- - `organizationId?:` `string` - Organization scope
5650
- - `userId?:` `string` - User scope
5651
- - `connectedAccountId?:` `string` - Target by account ID (ca_...)
5652
-
5653
- </dd>
5654
- </dl>
5655
- </dd>
5656
- </dl>
5657
-
5658
-
5659
- </dd>
5660
- </dl>
5661
- </details>
5662
-
5663
- <details><summary><code>client.connectedAccounts.<a href="/src/connected-accounts.ts">deleteConnectedAccount</a>(params) -> Promise&lt;DeleteConnectedAccountResponse&gt;</code></summary>
5664
- <dl>
5665
- <dd>
5666
-
5667
- #### 📝 Description
5668
-
5669
- <dl>
5670
- <dd>
5671
-
5672
- <dl>
5673
- <dd>
5674
-
5675
- Deletes a connected account and revokes its credentials. Target by connector + identifier, or by connectedAccountId.
5676
- </dd>
5677
- </dl>
5678
- </dd>
5679
- </dl>
5680
-
5681
- #### 🔌 Usage
5682
-
5683
- <dl>
5684
- <dd>
5685
-
5686
- <dl>
5687
- <dd>
5688
-
5689
- ```typescript
5690
- await scalekitClient.connectedAccounts.deleteConnectedAccount({
5691
- connector: 'notion',
5692
- identifier: 'workspace_123',
5693
- organizationId: 'org_123',
5694
- });
5695
-
5696
- // Or by account ID
5697
- await scalekitClient.connectedAccounts.deleteConnectedAccount({
5698
- connector: 'notion',
5699
- identifier: 'workspace_123',
5700
- connectedAccountId: 'ca_123',
5701
- });
5702
- ```
5703
- </dd>
5704
- </dl>
5705
- </dd>
5706
- </dl>
5707
-
5708
- #### ⚙️ Parameters
5709
-
5710
- <dl>
5711
- <dd>
5712
-
5713
- <dl>
5714
- <dd>
5715
-
5716
- **params:** `object`
5717
- - `connector:` `string` - Connector identifier
5718
- - `identifier:` `string` - Account identifier
5719
- - `organizationId?:` `string` - Organization scope
5720
- - `userId?:` `string` - User scope
5721
- - `connectedAccountId?:` `string` - Target by account ID (ca_...)
5722
-
5723
- </dd>
5724
- </dl>
5725
- </dd>
5726
- </dl>
5727
-
5728
-
5729
- </dd>
5730
- </dl>
5731
- </details>
5732
-
5733
- <details><summary><code>client.connectedAccounts.<a href="/src/connected-accounts.ts">getMagicLinkForConnectedAccount</a>(params) -> Promise&lt;GetMagicLinkForConnectedAccountResponse&gt;</code></summary>
5734
- <dl>
5735
- <dd>
5736
-
5737
- #### 📝 Description
5738
-
5739
- <dl>
5740
- <dd>
5741
-
5742
- <dl>
5743
- <dd>
5744
-
5745
- Generates a time-limited magic link for connecting or re-authorizing a third-party account (OAuth flow).
5746
- </dd>
5747
- </dl>
5748
- </dd>
5749
- </dl>
5750
-
5751
- #### 🔌 Usage
5752
-
5753
- <dl>
5754
- <dd>
5755
-
5756
- <dl>
5757
- <dd>
5758
-
5759
- ```typescript
5760
- const response = await scalekitClient.connectedAccounts.getMagicLinkForConnectedAccount({
5761
- connector: 'notion',
5762
- identifier: 'workspace_123',
5763
- organizationId: 'org_123',
5764
- });
5765
-
5766
- // Redirect user to response.link; link expires at response.expiry
5767
- console.log(response.link, response.expiry);
5768
- ```
5769
- </dd>
5770
- </dl>
5771
- </dd>
5772
- </dl>
5773
-
5774
- #### ⚙️ Parameters
5775
-
5776
- <dl>
5777
- <dd>
5778
-
5779
- <dl>
5780
- <dd>
5781
-
5782
- **params:** `object`
5783
- - `connector:` `string` - Connector identifier
5784
- - `identifier:` `string` - Account identifier
5785
- - `organizationId?:` `string` - Organization scope
5786
- - `userId?:` `string` - User scope
5787
- - `connectedAccountId?:` `string` - Target by account ID (ca_...)
5788
-
5789
- </dd>
5790
- </dl>
5791
- </dd>
5792
- </dl>
5793
-
5794
-
5795
- </dd>
5796
- </dl>
5797
- </details>
5798
-
5799
- <details><summary><code>client.connectedAccounts.<a href="/src/connected-accounts.ts">getConnectedAccountByIdentifier</a>(params) -> Promise&lt;GetConnectedAccountByIdentifierResponse&gt;</code></summary>
5800
- <dl>
5801
- <dd>
5802
-
5803
- #### 📝 Description
5804
-
5805
- <dl>
5806
- <dd>
5807
-
5808
- <dl>
5809
- <dd>
5810
-
5811
- Retrieves full authentication details for a connected account (including tokens). Returns sensitive data; protect access appropriately.
5812
- </dd>
5813
- </dl>
5814
- </dd>
5815
- </dl>
5816
-
5817
- #### 🔌 Usage
5818
-
5819
- <dl>
5820
- <dd>
5821
-
5822
- <dl>
5823
- <dd>
5824
-
5825
- ```typescript
5826
- const response = await scalekitClient.connectedAccounts.getConnectedAccountByIdentifier({
5827
- connector: 'notion',
5828
- identifier: 'workspace_123',
5829
- organizationId: 'org_123',
5830
- });
5831
-
5832
- const account = response.connectedAccount;
5833
- // account.authorizationDetails, account.id, etc.
5834
- ```
5835
- </dd>
5836
- </dl>
5837
- </dd>
5838
- </dl>
5839
-
5840
- #### ⚙️ Parameters
5841
-
5842
- <dl>
5843
- <dd>
5844
-
5845
- <dl>
5846
- <dd>
5847
-
5848
- **params:** `object`
5849
- - `connector:` `string` - Connector identifier
5850
- - `identifier:` `string` - Account identifier
5851
- - `organizationId?:` `string` - Organization scope
5852
- - `userId?:` `string` - User scope
5853
- - `connectedAccountId?:` `string` - Target by account ID (ca_...)
5854
-
5855
- </dd>
5856
- </dl>
5857
- </dd>
5858
- </dl>
5859
-
5860
-
5861
5643
  </dd>
5862
5644
  </dl>
5863
5645
  </details>