@scalekit-sdk/node 2.1.2 → 2.1.4
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/README.md +47 -11
- package/buf.gen.yaml +3 -0
- package/lib/core.js +1 -1
- package/lib/permission.d.ts +68 -0
- package/lib/permission.js +131 -0
- package/lib/permission.js.map +1 -0
- package/lib/pkg/grpc/scalekit/v1/auditlogs/auditlogs_connect.d.ts +19 -0
- package/lib/pkg/grpc/scalekit/v1/auditlogs/auditlogs_connect.js +27 -0
- package/lib/pkg/grpc/scalekit/v1/auditlogs/auditlogs_connect.js.map +1 -0
- package/lib/pkg/grpc/scalekit/v1/auditlogs/auditlogs_pb.d.ts +154 -0
- package/lib/pkg/grpc/scalekit/v1/auditlogs/auditlogs_pb.js +226 -0
- package/lib/pkg/grpc/scalekit/v1/auditlogs/auditlogs_pb.js.map +1 -0
- package/lib/pkg/grpc/scalekit/v1/commons/commons_pb.d.ts +2 -2
- package/lib/pkg/grpc/scalekit/v1/commons/commons_pb.js +1 -1
- package/lib/pkg/grpc/scalekit/v1/commons/commons_pb.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/connections/connections_pb.d.ts +16 -0
- package/lib/pkg/grpc/scalekit/v1/connections/connections_pb.js +4 -0
- package/lib/pkg/grpc/scalekit/v1/connections/connections_pb.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/domains/domains_pb.d.ts +0 -8
- package/lib/pkg/grpc/scalekit/v1/domains/domains_pb.js +0 -6
- package/lib/pkg/grpc/scalekit/v1/domains/domains_pb.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/roles/roles_connect.d.ts +250 -0
- package/lib/pkg/grpc/scalekit/v1/roles/roles_connect.js +258 -0
- package/lib/pkg/grpc/scalekit/v1/roles/roles_connect.js.map +1 -0
- package/lib/pkg/grpc/scalekit/v1/roles/roles_pb.d.ts +1157 -0
- package/lib/pkg/grpc/scalekit/v1/roles/roles_pb.js +1799 -0
- package/lib/pkg/grpc/scalekit/v1/roles/roles_pb.js.map +1 -0
- package/lib/pkg/grpc/scalekit/v1/sessions/sessions_connect.d.ts +46 -0
- package/lib/pkg/grpc/scalekit/v1/sessions/sessions_connect.js +54 -0
- package/lib/pkg/grpc/scalekit/v1/sessions/sessions_connect.js.map +1 -0
- package/lib/pkg/grpc/scalekit/v1/sessions/sessions_pb.d.ts +377 -0
- package/lib/pkg/grpc/scalekit/v1/sessions/sessions_pb.js +513 -0
- package/lib/pkg/grpc/scalekit/v1/sessions/sessions_pb.js.map +1 -0
- package/lib/pkg/grpc/scalekit/v1/users/users_pb.d.ts +2 -2
- package/lib/pkg/grpc/scalekit/v1/users/users_pb.js +1 -1
- package/lib/pkg/grpc/scalekit/v1/users/users_pb.js.map +1 -1
- package/lib/role.d.ts +104 -0
- package/lib/role.js +205 -0
- package/lib/role.js.map +1 -0
- package/lib/scalekit.d.ts +6 -0
- package/lib/scalekit.js +6 -0
- package/lib/scalekit.js.map +1 -1
- package/lib/session.d.ts +48 -0
- package/lib/session.js +101 -0
- package/lib/session.js.map +1 -0
- package/package.json +1 -1
- package/src/core.ts +1 -1
- package/src/permission.ts +164 -0
- package/src/pkg/grpc/scalekit/v1/auditlogs/auditlogs_connect.ts +26 -0
- package/src/pkg/grpc/scalekit/v1/auditlogs/auditlogs_pb.ts +282 -0
- package/src/pkg/grpc/scalekit/v1/commons/commons_pb.ts +3 -3
- package/src/pkg/grpc/scalekit/v1/connections/connections_pb.ts +24 -0
- package/src/pkg/grpc/scalekit/v1/domains/domains_pb.ts +0 -12
- package/src/pkg/grpc/scalekit/v1/roles/roles_connect.ts +257 -0
- package/src/pkg/grpc/scalekit/v1/roles/roles_pb.ts +2357 -0
- package/src/pkg/grpc/scalekit/v1/sessions/sessions_connect.ts +53 -0
- package/src/pkg/grpc/scalekit/v1/sessions/sessions_pb.ts +697 -0
- package/src/pkg/grpc/scalekit/v1/users/users_pb.ts +3 -3
- package/src/role.ts +261 -0
- package/src/scalekit.ts +18 -0
- package/src/session.ts +134 -0
- package/tests/permission.test.ts +399 -0
- package/tests/role.test.ts +323 -0
- package/tests/utils/test-data.ts +168 -1
package/README.md
CHANGED
|
@@ -9,10 +9,33 @@
|
|
|
9
9
|
|
|
10
10
|
# Official Node.js SDK
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
[](https://www.npmjs.com/package/@scalekit-sdk/node)
|
|
13
|
+
[](https://opensource.org/licenses/MIT)
|
|
14
|
+
[](https://www.npmjs.com/package/@scalekit-sdk/node)
|
|
15
|
+
|
|
16
|
+
<a href="https://scalekit.com" target="_blank" rel="noopener noreferrer">Scalekit</a> is the **auth stack for AI apps** - from human authentication to agent authorization. Build secure AI products faster with authentication for humans (SSO, passwordless, full-stack auth) and agents (MCP/APIs, delegated actions), all unified on one platform. This Node.js SDK enables both traditional B2B authentication and cutting-edge agentic workflows.
|
|
17
|
+
|
|
18
|
+
## 🤖 Agent-First Features
|
|
19
|
+
|
|
20
|
+
- **🔐 Agent Identity**: Agents as first-class actors with human ownership and org context
|
|
21
|
+
- **🎯 MCP-Native OAuth 2.1**: Purpose-built for Model Context Protocol with DCR/PKCE support
|
|
22
|
+
- **⏰ Ephemeral Credentials**: Time-bound, task-based authorization (minutes, not days)
|
|
23
|
+
- **🔒 Token Vault**: Per-user, per-tool token storage with rotation and progressive consent
|
|
24
|
+
- **👥 Human-in-the-Loop**: Step-up authentication when risk crosses thresholds
|
|
25
|
+
- **📊 Immutable Audit**: Track which user initiated, which agent acted, what resource was accessed
|
|
26
|
+
|
|
27
|
+
## 👨💼 Human Authentication
|
|
28
|
+
|
|
29
|
+
- **🔐 Enterprise SSO**: Support for SAML and OIDC protocols
|
|
30
|
+
- **👥 SCIM Provisioning**: Automated user provisioning and deprovisioning
|
|
31
|
+
- **🚀 Passwordless Authentication**: Magic links, OTP, and modern auth flows
|
|
32
|
+
- **🏢 Multi-tenant Architecture**: Organization-level authentication policies
|
|
33
|
+
- **📱 Social Logins**: Support for popular social identity providers
|
|
34
|
+
- **🛡️ Full-Stack Auth**: Complete IdP-of-record solution for B2B SaaS
|
|
35
|
+
- **🔷 TypeScript Support**: Full TypeScript definitions included
|
|
13
36
|
|
|
14
37
|
<div>
|
|
15
|
-
📚 <a target="_blank" href="https://docs.scalekit.com">Documentation</a>
|
|
38
|
+
📚 <a target="_blank" href="https://docs.scalekit.com">Documentation</a> • 🚀 <a target="_blank" href="https://docs.scalekit.com/sso/quickstart/">SSO Quickstart</a> • 💻 <a target="_blank" href="https://docs.scalekit.com/apis">API Reference</a>
|
|
16
39
|
</div>
|
|
17
40
|
<hr />
|
|
18
41
|
|
|
@@ -139,21 +162,34 @@ app.listen(3000, () => {
|
|
|
139
162
|
});
|
|
140
163
|
```
|
|
141
164
|
|
|
142
|
-
## Example Apps
|
|
165
|
+
## 📱 Example Apps
|
|
143
166
|
|
|
144
|
-
|
|
167
|
+
Explore fully functional sample applications built with popular Node.js frameworks and the Scalekit SDK:
|
|
145
168
|
|
|
146
|
-
|
|
147
|
-
|
|
169
|
+
| Framework | Repository | Description |
|
|
170
|
+
|-----------|------------|-------------|
|
|
171
|
+
| **Express.js** | [scalekit-express-example](https://github.com/scalekit-developers/scalekit-express-example) | Basic Express.js server implementation |
|
|
172
|
+
| **Next.js** | [scalekit-nextjs-demo](https://github.com/scalekit-developers/scalekit-nextjs-demo) | Modern React/Next.js application |
|
|
148
173
|
|
|
149
|
-
##
|
|
174
|
+
## 🔗 Helpful Links
|
|
150
175
|
|
|
151
|
-
|
|
176
|
+
### 📖 Quickstart Guides
|
|
177
|
+
- [**SSO Integration**](https://docs.scalekit.com/sso/quickstart/) - Implement enterprise Single Sign-on
|
|
178
|
+
- [**Full Stack Auth**](https://docs.scalekit.com/fsa/quickstart/) - Complete authentication solution
|
|
179
|
+
- [**Passwordless Auth**](https://docs.scalekit.com/passwordless/quickstart/) - Modern authentication flows
|
|
180
|
+
- [**Social Logins**](https://docs.scalekit.com/social-logins/quickstart/) - Popular social identity providers
|
|
181
|
+
- [**Machine-to-Machine**](https://docs.scalekit.com/m2m/quickstart/) - API authentication
|
|
152
182
|
|
|
153
|
-
|
|
183
|
+
### 📚 Documentation & Reference
|
|
184
|
+
- [**API Reference**](https://docs.scalekit.com/apis) - Complete API documentation
|
|
185
|
+
- [**Developer Kit**](https://docs.scalekit.com/dev-kit/) - Tools and utilities
|
|
186
|
+
- [**API Authentication Guide**](https://docs.scalekit.com/guides/authenticate-scalekit-api/) - Secure API access
|
|
154
187
|
|
|
155
|
-
|
|
156
|
-
-
|
|
188
|
+
### 🛠️ Additional Resources
|
|
189
|
+
- [**Setup Guide**](https://docs.scalekit.com/guides/setup-scalekit/) - Initial platform configuration
|
|
190
|
+
- [**Code Examples**](https://docs.scalekit.com/directory/code-examples/) - Ready-to-use code snippets
|
|
191
|
+
- [**Admin Portal Guide**](https://docs.scalekit.com/directory/guides/admin-portal/) - Administrative interface
|
|
192
|
+
- [**Launch Checklist**](https://docs.scalekit.com/directory/guides/launch-checklist/) - Pre-production checklist
|
|
157
193
|
|
|
158
194
|
## License
|
|
159
195
|
|
package/buf.gen.yaml
CHANGED
package/lib/core.js
CHANGED
|
@@ -57,7 +57,7 @@ class CoreClient {
|
|
|
57
57
|
this.clientSecret = clientSecret;
|
|
58
58
|
this.keys = [];
|
|
59
59
|
this.accessToken = null;
|
|
60
|
-
this.sdkVersion = `Scalekit-Node/2.1.
|
|
60
|
+
this.sdkVersion = `Scalekit-Node/2.1.4`;
|
|
61
61
|
this.apiVersion = "20250830";
|
|
62
62
|
this.userAgent = `${this.sdkVersion} Node/${process.version} (${process.platform}; ${os_1.default.arch()})`;
|
|
63
63
|
this.axios = axios_1.default.create({ baseURL: envUrl });
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Empty } from '@bufbuild/protobuf';
|
|
2
|
+
import GrpcConnect from './connect';
|
|
3
|
+
import CoreClient from './core';
|
|
4
|
+
import { CreatePermissionResponse, GetPermissionResponse, UpdatePermissionResponse, ListPermissionsResponse, ListRolePermissionsResponse, AddPermissionsToRoleResponse, ListEffectiveRolePermissionsResponse, CreatePermission } from './pkg/grpc/scalekit/v1/roles/roles_pb';
|
|
5
|
+
export default class PermissionClient {
|
|
6
|
+
private readonly grpcConnect;
|
|
7
|
+
private readonly coreClient;
|
|
8
|
+
private client;
|
|
9
|
+
constructor(grpcConnect: GrpcConnect, coreClient: CoreClient);
|
|
10
|
+
/**
|
|
11
|
+
* Create a new permission
|
|
12
|
+
* @param {CreatePermission} permission The permission creation object
|
|
13
|
+
* @returns {Promise<CreatePermissionResponse>} The created permission
|
|
14
|
+
*/
|
|
15
|
+
createPermission(permission: CreatePermission): Promise<CreatePermissionResponse>;
|
|
16
|
+
/**
|
|
17
|
+
* Get permission by name
|
|
18
|
+
* @param {string} permissionName The permission name
|
|
19
|
+
* @returns {Promise<GetPermissionResponse>} The permission details
|
|
20
|
+
*/
|
|
21
|
+
getPermission(permissionName: string): Promise<GetPermissionResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* List all permissions
|
|
24
|
+
* @param {string} [pageToken] Token for pagination
|
|
25
|
+
* @param {number} [pageSize] Number of permissions per page
|
|
26
|
+
* @returns {Promise<ListPermissionsResponse>} List of permissions
|
|
27
|
+
*/
|
|
28
|
+
listPermissions(pageToken?: string, pageSize?: number): Promise<ListPermissionsResponse>;
|
|
29
|
+
/**
|
|
30
|
+
* Update an existing permission by name
|
|
31
|
+
* @param {string} permissionName The permission name to update
|
|
32
|
+
* @param {CreatePermission} permission The permission update object
|
|
33
|
+
* @returns {Promise<UpdatePermissionResponse>} The updated permission
|
|
34
|
+
*/
|
|
35
|
+
updatePermission(permissionName: string, permission: CreatePermission): Promise<UpdatePermissionResponse>;
|
|
36
|
+
/**
|
|
37
|
+
* Delete permission by name
|
|
38
|
+
* @param {string} permissionName The permission name to be deleted
|
|
39
|
+
* @returns {Promise<Empty>} Empty response
|
|
40
|
+
*/
|
|
41
|
+
deletePermission(permissionName: string): Promise<Empty>;
|
|
42
|
+
/**
|
|
43
|
+
* List all permissions associated with a role
|
|
44
|
+
* @param {string} roleName The role name to get permissions for
|
|
45
|
+
* @returns {Promise<ListRolePermissionsResponse>} List of role permissions
|
|
46
|
+
*/
|
|
47
|
+
listRolePermissions(roleName: string): Promise<ListRolePermissionsResponse>;
|
|
48
|
+
/**
|
|
49
|
+
* Add permissions to a role
|
|
50
|
+
* @param {string} roleName The role name to add permissions to
|
|
51
|
+
* @param {string[]} permissionNames List of permission names to add
|
|
52
|
+
* @returns {Promise<AddPermissionsToRoleResponse>} The response after adding permissions
|
|
53
|
+
*/
|
|
54
|
+
addPermissionsToRole(roleName: string, permissionNames: string[]): Promise<AddPermissionsToRoleResponse>;
|
|
55
|
+
/**
|
|
56
|
+
* Remove a permission from a role
|
|
57
|
+
* @param {string} roleName The role name to remove permission from
|
|
58
|
+
* @param {string} permissionName The permission name to remove
|
|
59
|
+
* @returns {Promise<Empty>} Empty response
|
|
60
|
+
*/
|
|
61
|
+
removePermissionFromRole(roleName: string, permissionName: string): Promise<Empty>;
|
|
62
|
+
/**
|
|
63
|
+
* List all effective permissions for a role (including inherited permissions)
|
|
64
|
+
* @param {string} roleName The role name to get effective permissions for
|
|
65
|
+
* @returns {Promise<ListEffectiveRolePermissionsResponse>} List of effective role permissions
|
|
66
|
+
*/
|
|
67
|
+
listEffectiveRolePermissions(roleName: string): Promise<ListEffectiveRolePermissionsResponse>;
|
|
68
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const roles_connect_1 = require("./pkg/grpc/scalekit/v1/roles/roles_connect");
|
|
13
|
+
class PermissionClient {
|
|
14
|
+
constructor(grpcConnect, coreClient) {
|
|
15
|
+
this.grpcConnect = grpcConnect;
|
|
16
|
+
this.coreClient = coreClient;
|
|
17
|
+
this.client = this.grpcConnect.createClient(roles_connect_1.RolesService);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Create a new permission
|
|
21
|
+
* @param {CreatePermission} permission The permission creation object
|
|
22
|
+
* @returns {Promise<CreatePermissionResponse>} The created permission
|
|
23
|
+
*/
|
|
24
|
+
createPermission(permission) {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
return this.coreClient.connectExec(this.client.createPermission, { permission });
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Get permission by name
|
|
31
|
+
* @param {string} permissionName The permission name
|
|
32
|
+
* @returns {Promise<GetPermissionResponse>} The permission details
|
|
33
|
+
*/
|
|
34
|
+
getPermission(permissionName) {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
return this.coreClient.connectExec(this.client.getPermission, { permissionName });
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* List all permissions
|
|
41
|
+
* @param {string} [pageToken] Token for pagination
|
|
42
|
+
* @param {number} [pageSize] Number of permissions per page
|
|
43
|
+
* @returns {Promise<ListPermissionsResponse>} List of permissions
|
|
44
|
+
*/
|
|
45
|
+
listPermissions(pageToken, pageSize) {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
const request = {};
|
|
48
|
+
if (pageToken) {
|
|
49
|
+
request.pageToken = pageToken;
|
|
50
|
+
}
|
|
51
|
+
if (pageSize) {
|
|
52
|
+
request.pageSize = pageSize;
|
|
53
|
+
}
|
|
54
|
+
return this.coreClient.connectExec(this.client.listPermissions, request);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Update an existing permission by name
|
|
59
|
+
* @param {string} permissionName The permission name to update
|
|
60
|
+
* @param {CreatePermission} permission The permission update object
|
|
61
|
+
* @returns {Promise<UpdatePermissionResponse>} The updated permission
|
|
62
|
+
*/
|
|
63
|
+
updatePermission(permissionName, permission) {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
return this.coreClient.connectExec(this.client.updatePermission, {
|
|
66
|
+
permissionName,
|
|
67
|
+
permission
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Delete permission by name
|
|
73
|
+
* @param {string} permissionName The permission name to be deleted
|
|
74
|
+
* @returns {Promise<Empty>} Empty response
|
|
75
|
+
*/
|
|
76
|
+
deletePermission(permissionName) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
return this.coreClient.connectExec(this.client.deletePermission, { permissionName });
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* List all permissions associated with a role
|
|
83
|
+
* @param {string} roleName The role name to get permissions for
|
|
84
|
+
* @returns {Promise<ListRolePermissionsResponse>} List of role permissions
|
|
85
|
+
*/
|
|
86
|
+
listRolePermissions(roleName) {
|
|
87
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
88
|
+
return this.coreClient.connectExec(this.client.listRolePermissions, { roleName });
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Add permissions to a role
|
|
93
|
+
* @param {string} roleName The role name to add permissions to
|
|
94
|
+
* @param {string[]} permissionNames List of permission names to add
|
|
95
|
+
* @returns {Promise<AddPermissionsToRoleResponse>} The response after adding permissions
|
|
96
|
+
*/
|
|
97
|
+
addPermissionsToRole(roleName, permissionNames) {
|
|
98
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
return this.coreClient.connectExec(this.client.addPermissionsToRole, {
|
|
100
|
+
roleName,
|
|
101
|
+
permissionNames
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Remove a permission from a role
|
|
107
|
+
* @param {string} roleName The role name to remove permission from
|
|
108
|
+
* @param {string} permissionName The permission name to remove
|
|
109
|
+
* @returns {Promise<Empty>} Empty response
|
|
110
|
+
*/
|
|
111
|
+
removePermissionFromRole(roleName, permissionName) {
|
|
112
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
113
|
+
return this.coreClient.connectExec(this.client.removePermissionFromRole, {
|
|
114
|
+
roleName,
|
|
115
|
+
permissionName
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* List all effective permissions for a role (including inherited permissions)
|
|
121
|
+
* @param {string} roleName The role name to get effective permissions for
|
|
122
|
+
* @returns {Promise<ListEffectiveRolePermissionsResponse>} List of effective role permissions
|
|
123
|
+
*/
|
|
124
|
+
listEffectiveRolePermissions(roleName) {
|
|
125
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
126
|
+
return this.coreClient.connectExec(this.client.listEffectiveRolePermissions, { roleName });
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
exports.default = PermissionClient;
|
|
131
|
+
//# sourceMappingURL=permission.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permission.js","sourceRoot":"","sources":["../src/permission.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,8EAA0E;AAqB1E,MAAqB,gBAAgB;IAGnC,YACmB,WAAwB,EACxB,UAAsB;QADtB,gBAAW,GAAX,WAAW,CAAa;QACxB,eAAU,GAAV,UAAU,CAAY;QAEvC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,4BAAY,CAAC,CAAC;IAC5D,CAAC;IAED;;;;OAIG;IACG,gBAAgB,CAAC,UAA4B;;YACjD,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAChC,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAC5B,EAAE,UAAU,EAAE,CACf,CAAC;QACJ,CAAC;KAAA;IAED;;;;OAIG;IACG,aAAa,CAAC,cAAsB;;YACxC,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAChC,IAAI,CAAC,MAAM,CAAC,aAAa,EACzB,EAAE,cAAc,EAAE,CACnB,CAAC;QACJ,CAAC;KAAA;IAED;;;;;OAKG;IACG,eAAe,CAAC,SAAkB,EAAE,QAAiB;;YACzD,MAAM,OAAO,GAA2C,EAAE,CAAC;YAC3D,IAAI,SAAS,EAAE,CAAC;gBACd,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;YAChC,CAAC;YACD,IAAI,QAAQ,EAAE,CAAC;gBACb,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAChC,IAAI,CAAC,MAAM,CAAC,eAAe,EAC3B,OAAO,CACR,CAAC;QACJ,CAAC;KAAA;IAED;;;;;OAKG;IACG,gBAAgB,CAAC,cAAsB,EAAE,UAA4B;;YACzE,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAChC,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAC5B;gBACE,cAAc;gBACd,UAAU;aACX,CACF,CAAC;QACJ,CAAC;KAAA;IAED;;;;OAIG;IACG,gBAAgB,CAAC,cAAsB;;YAC3C,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAChC,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAC5B,EAAE,cAAc,EAAE,CACnB,CAAC;QACJ,CAAC;KAAA;IAED;;;;OAIG;IACG,mBAAmB,CAAC,QAAgB;;YACxC,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAChC,IAAI,CAAC,MAAM,CAAC,mBAAmB,EAC/B,EAAE,QAAQ,EAAE,CACb,CAAC;QACJ,CAAC;KAAA;IAED;;;;;OAKG;IACG,oBAAoB,CAAC,QAAgB,EAAE,eAAyB;;YACpE,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAChC,IAAI,CAAC,MAAM,CAAC,oBAAoB,EAChC;gBACE,QAAQ;gBACR,eAAe;aAChB,CACF,CAAC;QACJ,CAAC;KAAA;IAED;;;;;OAKG;IACG,wBAAwB,CAAC,QAAgB,EAAE,cAAsB;;YACrE,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAChC,IAAI,CAAC,MAAM,CAAC,wBAAwB,EACpC;gBACE,QAAQ;gBACR,cAAc;aACf,CACF,CAAC;QACJ,CAAC;KAAA;IAED;;;;OAIG;IACG,4BAA4B,CAAC,QAAgB;;YACjD,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAChC,IAAI,CAAC,MAAM,CAAC,4BAA4B,EACxC,EAAE,QAAQ,EAAE,CACb,CAAC;QACJ,CAAC;KAAA;CACF;AA1ID,mCA0IC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ListAuthLogRequest, ListAuthLogResponse } from "./auditlogs_pb.js";
|
|
2
|
+
import { MethodKind } from "@bufbuild/protobuf";
|
|
3
|
+
/**
|
|
4
|
+
* @generated from service scalekit.v1.auditlogs.AuditLogsService
|
|
5
|
+
*/
|
|
6
|
+
export declare const AuditLogsService: {
|
|
7
|
+
readonly typeName: "scalekit.v1.auditlogs.AuditLogsService";
|
|
8
|
+
readonly methods: {
|
|
9
|
+
/**
|
|
10
|
+
* @generated from rpc scalekit.v1.auditlogs.AuditLogsService.ListAuthRequests
|
|
11
|
+
*/
|
|
12
|
+
readonly listAuthRequests: {
|
|
13
|
+
readonly name: "ListAuthRequests";
|
|
14
|
+
readonly I: typeof ListAuthLogRequest;
|
|
15
|
+
readonly O: typeof ListAuthLogResponse;
|
|
16
|
+
readonly kind: MethodKind.Unary;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts"
|
|
3
|
+
// @generated from file scalekit/v1/auditlogs/auditlogs.proto (package scalekit.v1.auditlogs, syntax proto3)
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
// @ts-nocheck
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.AuditLogsService = void 0;
|
|
8
|
+
const auditlogs_pb_js_1 = require("./auditlogs_pb.js");
|
|
9
|
+
const protobuf_1 = require("@bufbuild/protobuf");
|
|
10
|
+
/**
|
|
11
|
+
* @generated from service scalekit.v1.auditlogs.AuditLogsService
|
|
12
|
+
*/
|
|
13
|
+
exports.AuditLogsService = {
|
|
14
|
+
typeName: "scalekit.v1.auditlogs.AuditLogsService",
|
|
15
|
+
methods: {
|
|
16
|
+
/**
|
|
17
|
+
* @generated from rpc scalekit.v1.auditlogs.AuditLogsService.ListAuthRequests
|
|
18
|
+
*/
|
|
19
|
+
listAuthRequests: {
|
|
20
|
+
name: "ListAuthRequests",
|
|
21
|
+
I: auditlogs_pb_js_1.ListAuthLogRequest,
|
|
22
|
+
O: auditlogs_pb_js_1.ListAuthLogResponse,
|
|
23
|
+
kind: protobuf_1.MethodKind.Unary,
|
|
24
|
+
},
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=auditlogs_connect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auditlogs_connect.js","sourceRoot":"","sources":["../../../../../../src/pkg/grpc/scalekit/v1/auditlogs/auditlogs_connect.ts"],"names":[],"mappings":";AAAA,wEAAwE;AACxE,4GAA4G;AAC5G,oBAAoB;AACpB,cAAc;;;AAEd,uDAA4E;AAC5E,iDAAgD;AAEhD;;GAEG;AACU,QAAA,gBAAgB,GAAG;IAC9B,QAAQ,EAAE,wCAAwC;IAClD,OAAO,EAAE;QACP;;WAEG;QACH,gBAAgB,EAAE;YAChB,IAAI,EAAE,kBAAkB;YACxB,CAAC,EAAE,oCAAkB;YACrB,CAAC,EAAE,qCAAmB;YACtB,IAAI,EAAE,qBAAU,CAAC,KAAK;SACvB;KACF;CACO,CAAC"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
|
|
2
|
+
import { Message, proto3, Timestamp } from "@bufbuild/protobuf";
|
|
3
|
+
/**
|
|
4
|
+
* @generated from message scalekit.v1.auditlogs.ListAuthLogRequest
|
|
5
|
+
*/
|
|
6
|
+
export declare class ListAuthLogRequest extends Message<ListAuthLogRequest> {
|
|
7
|
+
/**
|
|
8
|
+
* @generated from field: uint32 page_size = 1;
|
|
9
|
+
*/
|
|
10
|
+
pageSize: number;
|
|
11
|
+
/**
|
|
12
|
+
* @generated from field: string page_token = 2;
|
|
13
|
+
*/
|
|
14
|
+
pageToken: string;
|
|
15
|
+
/**
|
|
16
|
+
* @generated from field: string email = 3;
|
|
17
|
+
*/
|
|
18
|
+
email: string;
|
|
19
|
+
/**
|
|
20
|
+
* @generated from field: repeated string status = 4;
|
|
21
|
+
*/
|
|
22
|
+
status: string[];
|
|
23
|
+
/**
|
|
24
|
+
* @generated from field: google.protobuf.Timestamp start_time = 5;
|
|
25
|
+
*/
|
|
26
|
+
startTime?: Timestamp;
|
|
27
|
+
/**
|
|
28
|
+
* @generated from field: google.protobuf.Timestamp end_time = 6;
|
|
29
|
+
*/
|
|
30
|
+
endTime?: Timestamp;
|
|
31
|
+
constructor(data?: PartialMessage<ListAuthLogRequest>);
|
|
32
|
+
static readonly runtime: typeof proto3;
|
|
33
|
+
static readonly typeName = "scalekit.v1.auditlogs.ListAuthLogRequest";
|
|
34
|
+
static readonly fields: FieldList;
|
|
35
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListAuthLogRequest;
|
|
36
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListAuthLogRequest;
|
|
37
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListAuthLogRequest;
|
|
38
|
+
static equals(a: ListAuthLogRequest | PlainMessage<ListAuthLogRequest> | undefined, b: ListAuthLogRequest | PlainMessage<ListAuthLogRequest> | undefined): boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* @generated from message scalekit.v1.auditlogs.ListAuthLogResponse
|
|
42
|
+
*/
|
|
43
|
+
export declare class ListAuthLogResponse extends Message<ListAuthLogResponse> {
|
|
44
|
+
/**
|
|
45
|
+
* @generated from field: string next_page_token = 1;
|
|
46
|
+
*/
|
|
47
|
+
nextPageToken: string;
|
|
48
|
+
/**
|
|
49
|
+
* @generated from field: string prev_page_token = 2;
|
|
50
|
+
*/
|
|
51
|
+
prevPageToken: string;
|
|
52
|
+
/**
|
|
53
|
+
* @generated from field: uint32 total_size = 3;
|
|
54
|
+
*/
|
|
55
|
+
totalSize: number;
|
|
56
|
+
/**
|
|
57
|
+
* @generated from field: repeated scalekit.v1.auditlogs.AuthLogRequest authRequests = 4;
|
|
58
|
+
*/
|
|
59
|
+
authRequests: AuthLogRequest[];
|
|
60
|
+
constructor(data?: PartialMessage<ListAuthLogResponse>);
|
|
61
|
+
static readonly runtime: typeof proto3;
|
|
62
|
+
static readonly typeName = "scalekit.v1.auditlogs.ListAuthLogResponse";
|
|
63
|
+
static readonly fields: FieldList;
|
|
64
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListAuthLogResponse;
|
|
65
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListAuthLogResponse;
|
|
66
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListAuthLogResponse;
|
|
67
|
+
static equals(a: ListAuthLogResponse | PlainMessage<ListAuthLogResponse> | undefined, b: ListAuthLogResponse | PlainMessage<ListAuthLogResponse> | undefined): boolean;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* @generated from message scalekit.v1.auditlogs.AuthLogRequest
|
|
71
|
+
*/
|
|
72
|
+
export declare class AuthLogRequest extends Message<AuthLogRequest> {
|
|
73
|
+
/**
|
|
74
|
+
* @generated from field: string organization_id = 1;
|
|
75
|
+
*/
|
|
76
|
+
organizationId: string;
|
|
77
|
+
/**
|
|
78
|
+
* @generated from field: string environment_id = 2;
|
|
79
|
+
*/
|
|
80
|
+
environmentId: string;
|
|
81
|
+
/**
|
|
82
|
+
* @generated from field: string connection_id = 3;
|
|
83
|
+
*/
|
|
84
|
+
connectionId: string;
|
|
85
|
+
/**
|
|
86
|
+
* @generated from field: string auth_request_id = 4;
|
|
87
|
+
*/
|
|
88
|
+
authRequestId: string;
|
|
89
|
+
/**
|
|
90
|
+
* @generated from field: string email = 5;
|
|
91
|
+
*/
|
|
92
|
+
email: string;
|
|
93
|
+
/**
|
|
94
|
+
* @generated from field: string connection_type = 6;
|
|
95
|
+
*/
|
|
96
|
+
connectionType: string;
|
|
97
|
+
/**
|
|
98
|
+
* @generated from field: string connection_provider = 7;
|
|
99
|
+
*/
|
|
100
|
+
connectionProvider: string;
|
|
101
|
+
/**
|
|
102
|
+
* @generated from field: string status = 8;
|
|
103
|
+
*/
|
|
104
|
+
status: string;
|
|
105
|
+
/**
|
|
106
|
+
* @generated from field: google.protobuf.Timestamp timestamp = 9;
|
|
107
|
+
*/
|
|
108
|
+
timestamp?: Timestamp;
|
|
109
|
+
/**
|
|
110
|
+
* @generated from field: repeated scalekit.v1.auditlogs.ConnectionDetails connection_details = 10;
|
|
111
|
+
*/
|
|
112
|
+
connectionDetails: ConnectionDetails[];
|
|
113
|
+
/**
|
|
114
|
+
* @generated from field: string workflow = 11;
|
|
115
|
+
*/
|
|
116
|
+
workflow: string;
|
|
117
|
+
constructor(data?: PartialMessage<AuthLogRequest>);
|
|
118
|
+
static readonly runtime: typeof proto3;
|
|
119
|
+
static readonly typeName = "scalekit.v1.auditlogs.AuthLogRequest";
|
|
120
|
+
static readonly fields: FieldList;
|
|
121
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AuthLogRequest;
|
|
122
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AuthLogRequest;
|
|
123
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AuthLogRequest;
|
|
124
|
+
static equals(a: AuthLogRequest | PlainMessage<AuthLogRequest> | undefined, b: AuthLogRequest | PlainMessage<AuthLogRequest> | undefined): boolean;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* @generated from message scalekit.v1.auditlogs.ConnectionDetails
|
|
128
|
+
*/
|
|
129
|
+
export declare class ConnectionDetails extends Message<ConnectionDetails> {
|
|
130
|
+
/**
|
|
131
|
+
* @generated from field: string connection_id = 1;
|
|
132
|
+
*/
|
|
133
|
+
connectionId: string;
|
|
134
|
+
/**
|
|
135
|
+
* @generated from field: string organization_id = 2;
|
|
136
|
+
*/
|
|
137
|
+
organizationId: string;
|
|
138
|
+
/**
|
|
139
|
+
* @generated from field: string connection_type = 3;
|
|
140
|
+
*/
|
|
141
|
+
connectionType: string;
|
|
142
|
+
/**
|
|
143
|
+
* @generated from field: string connection_provider = 4;
|
|
144
|
+
*/
|
|
145
|
+
connectionProvider: string;
|
|
146
|
+
constructor(data?: PartialMessage<ConnectionDetails>);
|
|
147
|
+
static readonly runtime: typeof proto3;
|
|
148
|
+
static readonly typeName = "scalekit.v1.auditlogs.ConnectionDetails";
|
|
149
|
+
static readonly fields: FieldList;
|
|
150
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ConnectionDetails;
|
|
151
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ConnectionDetails;
|
|
152
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ConnectionDetails;
|
|
153
|
+
static equals(a: ConnectionDetails | PlainMessage<ConnectionDetails> | undefined, b: ConnectionDetails | PlainMessage<ConnectionDetails> | undefined): boolean;
|
|
154
|
+
}
|