@scalekit-sdk/node 2.2.0 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{reference.md → REFERENCE.md} +530 -77
- package/lib/core.js +1 -1
- package/package.json +9 -3
- package/.github/dependabot.yml +0 -10
- package/.nvmrc +0 -1
- package/buf.gen.yaml +0 -20
- package/jest.config.js +0 -15
- package/src/auth.ts +0 -99
- package/src/connect.ts +0 -32
- package/src/connection.ts +0 -267
- package/src/constants/user.ts +0 -22
- package/src/core.ts +0 -139
- package/src/directory.ts +0 -431
- package/src/domain.ts +0 -273
- package/src/errors/base-exception.ts +0 -263
- package/src/errors/index.ts +0 -3
- package/src/errors/specific-exceptions.ts +0 -88
- package/src/index.ts +0 -10
- package/src/organization.ts +0 -571
- package/src/passwordless.ts +0 -139
- package/src/permission.ts +0 -310
- package/src/pkg/grpc/buf/validate/validate_pb.ts +0 -28
- package/src/pkg/grpc/google/api/annotations_pb.ts +0 -28
- package/src/pkg/grpc/google/api/field_behavior_pb.ts +0 -28
- package/src/pkg/grpc/google/api/visibility_pb.ts +0 -28
- package/src/pkg/grpc/protoc-gen-openapiv2/options/annotations_pb.ts +0 -28
- package/src/pkg/grpc/scalekit/v1/auditlogs/auditlogs_pb.ts +0 -257
- package/src/pkg/grpc/scalekit/v1/auth/auth_pb.ts +0 -836
- package/src/pkg/grpc/scalekit/v1/auth/passwordless_pb.ts +0 -264
- package/src/pkg/grpc/scalekit/v1/auth/webauthn_pb.ts +0 -794
- package/src/pkg/grpc/scalekit/v1/commons/commons_pb.ts +0 -452
- package/src/pkg/grpc/scalekit/v1/connections/connections_pb.ts +0 -2645
- package/src/pkg/grpc/scalekit/v1/directories/directories_pb.ts +0 -1393
- package/src/pkg/grpc/scalekit/v1/domains/domains_pb.ts +0 -599
- package/src/pkg/grpc/scalekit/v1/errdetails/errdetails_pb.ts +0 -311
- package/src/pkg/grpc/scalekit/v1/options/options_pb.ts +0 -200
- package/src/pkg/grpc/scalekit/v1/organizations/organizations_pb.ts +0 -1141
- package/src/pkg/grpc/scalekit/v1/roles/roles_pb.ts +0 -1491
- package/src/pkg/grpc/scalekit/v1/sessions/sessions_pb.ts +0 -497
- package/src/pkg/grpc/scalekit/v1/users/users_pb.ts +0 -1404
- package/src/role.ts +0 -463
- package/src/scalekit.ts +0 -800
- package/src/session.ts +0 -323
- package/src/types/auth.ts +0 -73
- package/src/types/organization.ts +0 -12
- package/src/types/scalekit.ts +0 -50
- package/src/types/user.ts +0 -21
- package/src/user.ts +0 -829
- package/src/webauthn.ts +0 -99
- package/tests/README.md +0 -25
- package/tests/connection.test.ts +0 -42
- package/tests/directory.test.ts +0 -46
- package/tests/domain.test.ts +0 -293
- package/tests/organization.test.ts +0 -81
- package/tests/passwordless.test.ts +0 -108
- package/tests/permission.test.ts +0 -399
- package/tests/role.test.ts +0 -323
- package/tests/scalekit.test.ts +0 -104
- package/tests/setup.ts +0 -34
- package/tests/users.test.ts +0 -168
- package/tests/utils/test-data.ts +0 -490
- 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<AuthenticationResponse></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<AuthenticationResponse></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<IdpInitiatedLoginClaims></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<IdpInitiatedLoginClaims></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<boolean></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<boolean></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
|
|
428
|
+
<details>
|
|
429
|
+
<summary><code>client.validateAccessToken(token, options?) -> Promise<boolean></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<RefreshTokenResponse></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<T></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<GetConnectionResponse></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<ListConnectionsResponse></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<ListConnectionsResponse></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<MessageShape<typeof EmptySchema>></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<MessageShape<typeof EmptySchema>></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<CreateDomainResponse></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<GetDomainResponse></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<ListDomainsResponse></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<MessageShape<typeof EmptySchema>></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<CreateOrganizationResponse></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<CreateOrganizationResponse></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<ListOrganizationsResponse></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<ListOrganizationsResponse></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<GetOrganizationResponse></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<GetOrganizationResponse></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<GetOrganizationResponse></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<GetOrganizationResponse></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<UpdateOrganizationResponse></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<UpdateOrganizationResponse></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<UpdateOrganizationResponse></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<UpdateOrganizationResponse></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<Empty></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<Empty></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<Link></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<Link></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<GetOrganizationResponse></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<GetOrganizationResponse></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<OrganizationUserManagementSettings | undefined></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<OrganizationUserManagementSettings | undefined></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<GetConnectionResponse></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<GetConnectionResponse></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<ListConnectionsResponse></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<ListConnectionsResponse></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<ListConnectionsResponse></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<ListConnectionsResponse></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<ToggleConnectionResponse></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<ToggleConnectionResponse></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<ToggleConnectionResponse></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<ToggleConnectionResponse></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<CreateUserAndMembershipResponse></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<CreateUserAndMembershipResponse></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<GetUserResponse></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<GetUserResponse></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<ListUsersResponse></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<ListUsersResponse></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<UpdateUserResponse></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<UpdateUserResponse></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<Empty></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<Empty></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<CreateMembershipResponse></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<CreateMembershipResponse></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<Empty></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<Empty></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<UpdateMembershipResponse></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<UpdateMembershipResponse></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<ListOrganizationUsersResponse></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<ListOrganizationUsersResponse></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<ResendInviteResponse></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<ResendInviteResponse></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<CreateDomainResponse></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<CreateDomainResponse></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<GetDomainResponse></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<GetDomainResponse></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<ListDomainResponse></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<ListDomainResponse></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<Empty></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<Empty></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<ListDirectoriesResponse></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<ListDirectoriesResponse></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<GetDirectoryResponse></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<GetDirectoryResponse></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<Directory></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<Directory></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<ListDirectoryUsersResponse></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<ListDirectoryUsersResponse></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<ListDirectoryGroupsResponse></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<ListDirectoryGroupsResponse></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<ToggleDirectoryResponse></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<ToggleDirectoryResponse></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<ToggleDirectoryResponse></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<ToggleDirectoryResponse></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<SessionDetails></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<SessionDetails></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<UserSessionDetails></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<UserSessionDetails></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<RevokeSessionResponse></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<RevokeSessionResponse></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<RevokeAllUserSessionsResponse></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<RevokeAllUserSessionsResponse></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<CreateRoleResponse></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<CreateRoleResponse></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<GetRoleResponse></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<GetRoleResponse></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<ListRolesResponse></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<ListRolesResponse></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<UpdateRoleResponse></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<UpdateRoleResponse></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<Empty></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<Empty></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<GetRoleUsersCountResponse></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<GetRoleUsersCountResponse></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<CreateOrganizationRoleResponse></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<CreateOrganizationRoleResponse></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<GetOrganizationRoleResponse></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<GetOrganizationRoleResponse></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<ListOrganizationRolesResponse></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<ListOrganizationRolesResponse></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<UpdateOrganizationRoleResponse></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<UpdateOrganizationRoleResponse></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<Empty></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<Empty></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<GetOrganizationRoleUsersCountResponse></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<GetOrganizationRoleUsersCountResponse></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<UpdateDefaultOrganizationRolesResponse></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<UpdateDefaultOrganizationRolesResponse></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<Empty></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<Empty></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<CreatePermissionResponse></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<CreatePermissionResponse></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<GetPermissionResponse></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<GetPermissionResponse></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<ListPermissionsResponse></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<ListPermissionsResponse></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<UpdatePermissionResponse></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<UpdatePermissionResponse></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<Empty></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<Empty></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<ListRolePermissionsResponse></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<ListRolePermissionsResponse></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<AddPermissionsToRoleResponse></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<AddPermissionsToRoleResponse></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<Empty></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<Empty></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<ListEffectiveRolePermissionsResponse></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<ListEffectiveRolePermissionsResponse></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<SendPasswordlessResponse></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<SendPasswordlessResponse></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<VerifyPasswordLessResponse></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<VerifyPasswordLessResponse></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<SendPasswordlessResponse></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<SendPasswordlessResponse></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<ListCredentialsResponse></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<ListCredentialsResponse></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<UpdateCredentialResponse></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<UpdateCredentialResponse></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<DeleteCredentialResponse></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<DeleteCredentialResponse></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<Empty></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<Empty></code></summary>
|
|
5114
5567
|
<dl>
|
|
5115
5568
|
<dd>
|
|
5116
5569
|
|