@scalekit-sdk/node 2.1.3 → 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.
@@ -0,0 +1,48 @@
1
+ import GrpcConnect from './connect';
2
+ import CoreClient from './core';
3
+ import { SessionDetails, UserSessionDetails, RevokeSessionResponse, RevokeAllUserSessionsResponse } from './pkg/grpc/scalekit/v1/sessions/sessions_pb';
4
+ export default class SessionClient {
5
+ private readonly grpcConnect;
6
+ private readonly coreClient;
7
+ private client;
8
+ constructor(grpcConnect: GrpcConnect, coreClient: CoreClient);
9
+ /**
10
+ * Get details for a specific session
11
+ * @param {string} sessionId The session id
12
+ * @returns {Promise<SessionDetails>} The session details
13
+ */
14
+ getSession(sessionId: string): Promise<SessionDetails>;
15
+ /**
16
+ * Get all session details for a user with pagination and filtering
17
+ * @param {string} userId The user id
18
+ * @param {object} options The pagination and filtering options
19
+ * @param {number} options.pageSize The page size
20
+ * @param {string} options.pageToken The page token
21
+ * @param {object} options.filter The session filter options
22
+ * @param {string[]} options.filter.status The session statuses to filter by
23
+ * @param {Date} options.filter.startTime The start time for filtering sessions
24
+ * @param {Date} options.filter.endTime The end time for filtering sessions
25
+ * @returns {Promise<UserSessionDetails>} The user session details
26
+ */
27
+ getUserSessions(userId: string, options?: {
28
+ pageSize?: number;
29
+ pageToken?: string;
30
+ filter?: {
31
+ status?: string[];
32
+ startTime?: Date;
33
+ endTime?: Date;
34
+ };
35
+ }): Promise<UserSessionDetails>;
36
+ /**
37
+ * Revoke a session for a user
38
+ * @param {string} sessionId The session id to revoke
39
+ * @returns {Promise<RevokeSessionResponse>} The response with revoked session details
40
+ */
41
+ revokeSession(sessionId: string): Promise<RevokeSessionResponse>;
42
+ /**
43
+ * Revoke all sessions for a user
44
+ * @param {string} userId The user id whose sessions should be revoked
45
+ * @returns {Promise<RevokeAllUserSessionsResponse>} The response with all revoked session details
46
+ */
47
+ revokeAllUserSessions(userId: string): Promise<RevokeAllUserSessionsResponse>;
48
+ }
package/lib/session.js ADDED
@@ -0,0 +1,101 @@
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 sessions_connect_1 = require("./pkg/grpc/scalekit/v1/sessions/sessions_connect");
13
+ const sessions_pb_1 = require("./pkg/grpc/scalekit/v1/sessions/sessions_pb");
14
+ const protobuf_1 = require("@bufbuild/protobuf");
15
+ class SessionClient {
16
+ constructor(grpcConnect, coreClient) {
17
+ this.grpcConnect = grpcConnect;
18
+ this.coreClient = coreClient;
19
+ this.client = this.grpcConnect.createClient(sessions_connect_1.SessionService);
20
+ }
21
+ /**
22
+ * Get details for a specific session
23
+ * @param {string} sessionId The session id
24
+ * @returns {Promise<SessionDetails>} The session details
25
+ */
26
+ getSession(sessionId) {
27
+ return __awaiter(this, void 0, void 0, function* () {
28
+ return this.coreClient.connectExec(this.client.getSession, {
29
+ sessionId
30
+ });
31
+ });
32
+ }
33
+ /**
34
+ * Get all session details for a user with pagination and filtering
35
+ * @param {string} userId The user id
36
+ * @param {object} options The pagination and filtering options
37
+ * @param {number} options.pageSize The page size
38
+ * @param {string} options.pageToken The page token
39
+ * @param {object} options.filter The session filter options
40
+ * @param {string[]} options.filter.status The session statuses to filter by
41
+ * @param {Date} options.filter.startTime The start time for filtering sessions
42
+ * @param {Date} options.filter.endTime The end time for filtering sessions
43
+ * @returns {Promise<UserSessionDetails>} The user session details
44
+ */
45
+ getUserSessions(userId, options) {
46
+ return __awaiter(this, void 0, void 0, function* () {
47
+ const request = {
48
+ userId
49
+ };
50
+ if ((options === null || options === void 0 ? void 0 : options.pageSize) !== undefined) {
51
+ request.pageSize = options.pageSize;
52
+ }
53
+ if (options === null || options === void 0 ? void 0 : options.pageToken) {
54
+ request.pageToken = options.pageToken;
55
+ }
56
+ if (options === null || options === void 0 ? void 0 : options.filter) {
57
+ const filter = new sessions_pb_1.UserSessionFilter();
58
+ if (options.filter.status) {
59
+ filter.status = options.filter.status;
60
+ }
61
+ if (options.filter.startTime) {
62
+ filter.startTime = protobuf_1.Timestamp.fromDate(options.filter.startTime);
63
+ }
64
+ if (options.filter.endTime) {
65
+ filter.endTime = protobuf_1.Timestamp.fromDate(options.filter.endTime);
66
+ }
67
+ request.filter = filter;
68
+ }
69
+ return this.coreClient.connectExec(this.client.getUserSessions, request);
70
+ });
71
+ }
72
+ /**
73
+ * Revoke a session for a user
74
+ * @param {string} sessionId The session id to revoke
75
+ * @returns {Promise<RevokeSessionResponse>} The response with revoked session details
76
+ */
77
+ revokeSession(sessionId) {
78
+ return __awaiter(this, void 0, void 0, function* () {
79
+ return this.coreClient.connectExec(this.client.revokeSession, {
80
+ sessionId
81
+ });
82
+ });
83
+ }
84
+ /**
85
+ * Revoke all sessions for a user
86
+ * @param {string} userId The user id whose sessions should be revoked
87
+ * @returns {Promise<RevokeAllUserSessionsResponse>} The response with all revoked session details
88
+ */
89
+ revokeAllUserSessions(userId) {
90
+ return __awaiter(this, void 0, void 0, function* () {
91
+ if (!userId) {
92
+ throw new Error('userId is required');
93
+ }
94
+ return this.coreClient.connectExec(this.client.revokeAllUserSessions, {
95
+ userId
96
+ });
97
+ });
98
+ }
99
+ }
100
+ exports.default = SessionClient;
101
+ //# sourceMappingURL=session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.js","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,uFAAkF;AAClF,6EAUqD;AACrD,iDAA+C;AAE/C,MAAqB,aAAa;IAGhC,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,iCAAc,CAAC,CAAC;IAC9D,CAAC;IAED;;;;OAIG;IACG,UAAU,CAAC,SAAiB;;YAChC,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAChC,IAAI,CAAC,MAAM,CAAC,UAAU,EACtB;gBACE,SAAS;aACV,CACF,CAAC;QACJ,CAAC;KAAA;IAED;;;;;;;;;;;OAWG;IACG,eAAe,CACnB,MAAc,EACd,OAQC;;YAED,MAAM,OAAO,GAA8C;gBACzD,MAAM;aACP,CAAC;YAEF,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,MAAK,SAAS,EAAE,CAAC;gBACpC,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;YACtC,CAAC;YAED,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,EAAE,CAAC;gBACvB,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;YACxC,CAAC;YAED,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,EAAE,CAAC;gBACpB,MAAM,MAAM,GAAG,IAAI,+BAAiB,EAAE,CAAC;gBAEvC,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;oBAC1B,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC;gBACxC,CAAC;gBAED,IAAI,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;oBAC7B,MAAM,CAAC,SAAS,GAAG,oBAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;gBAClE,CAAC;gBAED,IAAI,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;oBAC3B,MAAM,CAAC,OAAO,GAAG,oBAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBAC9D,CAAC;gBAED,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC;YAC1B,CAAC;YAED,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAChC,IAAI,CAAC,MAAM,CAAC,eAAe,EAC3B,OAAO,CACR,CAAC;QACJ,CAAC;KAAA;IAED;;;;OAIG;IACG,aAAa,CAAC,SAAiB;;YACnC,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAChC,IAAI,CAAC,MAAM,CAAC,aAAa,EACzB;gBACE,SAAS;aACV,CACF,CAAC;QACJ,CAAC;KAAA;IAED;;;;OAIG;IACG,qBAAqB,CAAC,MAAc;;YACxC,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;YACxC,CAAC;YAED,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAChC,IAAI,CAAC,MAAM,CAAC,qBAAqB,EACjC;gBACE,MAAM;aACP,CACF,CAAC;QACJ,CAAC;KAAA;CACF;AAnHD,gCAmHC"}
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.1.3",
2
+ "version": "2.1.4",
3
3
  "name": "@scalekit-sdk/node",
4
4
  "description": "Official Scalekit Node SDK",
5
5
  "main": "lib/index.js",
package/src/core.ts CHANGED
@@ -20,7 +20,7 @@ export default class CoreClient {
20
20
  public keys: JWK[] = [];
21
21
  public accessToken: string | null = null;
22
22
  public axios: Axios;
23
- public sdkVersion = `Scalekit-Node/2.1.3`;
23
+ public sdkVersion = `Scalekit-Node/2.1.4`;
24
24
  public apiVersion = "20250830";
25
25
  public userAgent = `${this.sdkVersion} Node/${process.version} (${process.platform}; ${os.arch()})`;
26
26
  constructor(
@@ -0,0 +1,26 @@
1
+ // @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts"
2
+ // @generated from file scalekit/v1/auditlogs/auditlogs.proto (package scalekit.v1.auditlogs, syntax proto3)
3
+ /* eslint-disable */
4
+ // @ts-nocheck
5
+
6
+ import { ListAuthLogRequest, ListAuthLogResponse } from "./auditlogs_pb.js";
7
+ import { MethodKind } from "@bufbuild/protobuf";
8
+
9
+ /**
10
+ * @generated from service scalekit.v1.auditlogs.AuditLogsService
11
+ */
12
+ export const AuditLogsService = {
13
+ typeName: "scalekit.v1.auditlogs.AuditLogsService",
14
+ methods: {
15
+ /**
16
+ * @generated from rpc scalekit.v1.auditlogs.AuditLogsService.ListAuthRequests
17
+ */
18
+ listAuthRequests: {
19
+ name: "ListAuthRequests",
20
+ I: ListAuthLogRequest,
21
+ O: ListAuthLogResponse,
22
+ kind: MethodKind.Unary,
23
+ },
24
+ }
25
+ } as const;
26
+
@@ -0,0 +1,282 @@
1
+ // @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
2
+ // @generated from file scalekit/v1/auditlogs/auditlogs.proto (package scalekit.v1.auditlogs, syntax proto3)
3
+ /* eslint-disable */
4
+ // @ts-nocheck
5
+
6
+ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
7
+ import { Message, proto3, Timestamp } from "@bufbuild/protobuf";
8
+
9
+ /**
10
+ * @generated from message scalekit.v1.auditlogs.ListAuthLogRequest
11
+ */
12
+ export class ListAuthLogRequest extends Message<ListAuthLogRequest> {
13
+ /**
14
+ * @generated from field: uint32 page_size = 1;
15
+ */
16
+ pageSize = 0;
17
+
18
+ /**
19
+ * @generated from field: string page_token = 2;
20
+ */
21
+ pageToken = "";
22
+
23
+ /**
24
+ * @generated from field: string email = 3;
25
+ */
26
+ email = "";
27
+
28
+ /**
29
+ * @generated from field: repeated string status = 4;
30
+ */
31
+ status: string[] = [];
32
+
33
+ /**
34
+ * @generated from field: google.protobuf.Timestamp start_time = 5;
35
+ */
36
+ startTime?: Timestamp;
37
+
38
+ /**
39
+ * @generated from field: google.protobuf.Timestamp end_time = 6;
40
+ */
41
+ endTime?: Timestamp;
42
+
43
+ constructor(data?: PartialMessage<ListAuthLogRequest>) {
44
+ super();
45
+ proto3.util.initPartial(data, this);
46
+ }
47
+
48
+ static readonly runtime: typeof proto3 = proto3;
49
+ static readonly typeName = "scalekit.v1.auditlogs.ListAuthLogRequest";
50
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
51
+ { no: 1, name: "page_size", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
52
+ { no: 2, name: "page_token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
53
+ { no: 3, name: "email", kind: "scalar", T: 9 /* ScalarType.STRING */ },
54
+ { no: 4, name: "status", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
55
+ { no: 5, name: "start_time", kind: "message", T: Timestamp },
56
+ { no: 6, name: "end_time", kind: "message", T: Timestamp },
57
+ ]);
58
+
59
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListAuthLogRequest {
60
+ return new ListAuthLogRequest().fromBinary(bytes, options);
61
+ }
62
+
63
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListAuthLogRequest {
64
+ return new ListAuthLogRequest().fromJson(jsonValue, options);
65
+ }
66
+
67
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListAuthLogRequest {
68
+ return new ListAuthLogRequest().fromJsonString(jsonString, options);
69
+ }
70
+
71
+ static equals(a: ListAuthLogRequest | PlainMessage<ListAuthLogRequest> | undefined, b: ListAuthLogRequest | PlainMessage<ListAuthLogRequest> | undefined): boolean {
72
+ return proto3.util.equals(ListAuthLogRequest, a, b);
73
+ }
74
+ }
75
+
76
+ /**
77
+ * @generated from message scalekit.v1.auditlogs.ListAuthLogResponse
78
+ */
79
+ export class ListAuthLogResponse extends Message<ListAuthLogResponse> {
80
+ /**
81
+ * @generated from field: string next_page_token = 1;
82
+ */
83
+ nextPageToken = "";
84
+
85
+ /**
86
+ * @generated from field: string prev_page_token = 2;
87
+ */
88
+ prevPageToken = "";
89
+
90
+ /**
91
+ * @generated from field: uint32 total_size = 3;
92
+ */
93
+ totalSize = 0;
94
+
95
+ /**
96
+ * @generated from field: repeated scalekit.v1.auditlogs.AuthLogRequest authRequests = 4;
97
+ */
98
+ authRequests: AuthLogRequest[] = [];
99
+
100
+ constructor(data?: PartialMessage<ListAuthLogResponse>) {
101
+ super();
102
+ proto3.util.initPartial(data, this);
103
+ }
104
+
105
+ static readonly runtime: typeof proto3 = proto3;
106
+ static readonly typeName = "scalekit.v1.auditlogs.ListAuthLogResponse";
107
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
108
+ { no: 1, name: "next_page_token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
109
+ { no: 2, name: "prev_page_token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
110
+ { no: 3, name: "total_size", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
111
+ { no: 4, name: "authRequests", kind: "message", T: AuthLogRequest, repeated: true },
112
+ ]);
113
+
114
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListAuthLogResponse {
115
+ return new ListAuthLogResponse().fromBinary(bytes, options);
116
+ }
117
+
118
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListAuthLogResponse {
119
+ return new ListAuthLogResponse().fromJson(jsonValue, options);
120
+ }
121
+
122
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListAuthLogResponse {
123
+ return new ListAuthLogResponse().fromJsonString(jsonString, options);
124
+ }
125
+
126
+ static equals(a: ListAuthLogResponse | PlainMessage<ListAuthLogResponse> | undefined, b: ListAuthLogResponse | PlainMessage<ListAuthLogResponse> | undefined): boolean {
127
+ return proto3.util.equals(ListAuthLogResponse, a, b);
128
+ }
129
+ }
130
+
131
+ /**
132
+ * @generated from message scalekit.v1.auditlogs.AuthLogRequest
133
+ */
134
+ export class AuthLogRequest extends Message<AuthLogRequest> {
135
+ /**
136
+ * @generated from field: string organization_id = 1;
137
+ */
138
+ organizationId = "";
139
+
140
+ /**
141
+ * @generated from field: string environment_id = 2;
142
+ */
143
+ environmentId = "";
144
+
145
+ /**
146
+ * @generated from field: string connection_id = 3;
147
+ */
148
+ connectionId = "";
149
+
150
+ /**
151
+ * @generated from field: string auth_request_id = 4;
152
+ */
153
+ authRequestId = "";
154
+
155
+ /**
156
+ * @generated from field: string email = 5;
157
+ */
158
+ email = "";
159
+
160
+ /**
161
+ * @generated from field: string connection_type = 6;
162
+ */
163
+ connectionType = "";
164
+
165
+ /**
166
+ * @generated from field: string connection_provider = 7;
167
+ */
168
+ connectionProvider = "";
169
+
170
+ /**
171
+ * @generated from field: string status = 8;
172
+ */
173
+ status = "";
174
+
175
+ /**
176
+ * @generated from field: google.protobuf.Timestamp timestamp = 9;
177
+ */
178
+ timestamp?: Timestamp;
179
+
180
+ /**
181
+ * @generated from field: repeated scalekit.v1.auditlogs.ConnectionDetails connection_details = 10;
182
+ */
183
+ connectionDetails: ConnectionDetails[] = [];
184
+
185
+ /**
186
+ * @generated from field: string workflow = 11;
187
+ */
188
+ workflow = "";
189
+
190
+ constructor(data?: PartialMessage<AuthLogRequest>) {
191
+ super();
192
+ proto3.util.initPartial(data, this);
193
+ }
194
+
195
+ static readonly runtime: typeof proto3 = proto3;
196
+ static readonly typeName = "scalekit.v1.auditlogs.AuthLogRequest";
197
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
198
+ { no: 1, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
199
+ { no: 2, name: "environment_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
200
+ { no: 3, name: "connection_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
201
+ { no: 4, name: "auth_request_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
202
+ { no: 5, name: "email", kind: "scalar", T: 9 /* ScalarType.STRING */ },
203
+ { no: 6, name: "connection_type", kind: "scalar", T: 9 /* ScalarType.STRING */ },
204
+ { no: 7, name: "connection_provider", kind: "scalar", T: 9 /* ScalarType.STRING */ },
205
+ { no: 8, name: "status", kind: "scalar", T: 9 /* ScalarType.STRING */ },
206
+ { no: 9, name: "timestamp", kind: "message", T: Timestamp },
207
+ { no: 10, name: "connection_details", kind: "message", T: ConnectionDetails, repeated: true },
208
+ { no: 11, name: "workflow", kind: "scalar", T: 9 /* ScalarType.STRING */ },
209
+ ]);
210
+
211
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AuthLogRequest {
212
+ return new AuthLogRequest().fromBinary(bytes, options);
213
+ }
214
+
215
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AuthLogRequest {
216
+ return new AuthLogRequest().fromJson(jsonValue, options);
217
+ }
218
+
219
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AuthLogRequest {
220
+ return new AuthLogRequest().fromJsonString(jsonString, options);
221
+ }
222
+
223
+ static equals(a: AuthLogRequest | PlainMessage<AuthLogRequest> | undefined, b: AuthLogRequest | PlainMessage<AuthLogRequest> | undefined): boolean {
224
+ return proto3.util.equals(AuthLogRequest, a, b);
225
+ }
226
+ }
227
+
228
+ /**
229
+ * @generated from message scalekit.v1.auditlogs.ConnectionDetails
230
+ */
231
+ export class ConnectionDetails extends Message<ConnectionDetails> {
232
+ /**
233
+ * @generated from field: string connection_id = 1;
234
+ */
235
+ connectionId = "";
236
+
237
+ /**
238
+ * @generated from field: string organization_id = 2;
239
+ */
240
+ organizationId = "";
241
+
242
+ /**
243
+ * @generated from field: string connection_type = 3;
244
+ */
245
+ connectionType = "";
246
+
247
+ /**
248
+ * @generated from field: string connection_provider = 4;
249
+ */
250
+ connectionProvider = "";
251
+
252
+ constructor(data?: PartialMessage<ConnectionDetails>) {
253
+ super();
254
+ proto3.util.initPartial(data, this);
255
+ }
256
+
257
+ static readonly runtime: typeof proto3 = proto3;
258
+ static readonly typeName = "scalekit.v1.auditlogs.ConnectionDetails";
259
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
260
+ { no: 1, name: "connection_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
261
+ { no: 2, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
262
+ { no: 3, name: "connection_type", kind: "scalar", T: 9 /* ScalarType.STRING */ },
263
+ { no: 4, name: "connection_provider", kind: "scalar", T: 9 /* ScalarType.STRING */ },
264
+ ]);
265
+
266
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ConnectionDetails {
267
+ return new ConnectionDetails().fromBinary(bytes, options);
268
+ }
269
+
270
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ConnectionDetails {
271
+ return new ConnectionDetails().fromJson(jsonValue, options);
272
+ }
273
+
274
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ConnectionDetails {
275
+ return new ConnectionDetails().fromJsonString(jsonString, options);
276
+ }
277
+
278
+ static equals(a: ConnectionDetails | PlainMessage<ConnectionDetails> | undefined, b: ConnectionDetails | PlainMessage<ConnectionDetails> | undefined): boolean {
279
+ return proto3.util.equals(ConnectionDetails, a, b);
280
+ }
281
+ }
282
+
@@ -0,0 +1,53 @@
1
+ // @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts"
2
+ // @generated from file scalekit/v1/sessions/sessions.proto (package scalekit.v1.sessions, syntax proto3)
3
+ /* eslint-disable */
4
+ // @ts-nocheck
5
+
6
+ import { RevokeAllUserSessionsRequest, RevokeAllUserSessionsResponse, RevokeSessionRequest, RevokeSessionResponse, SessionDetails, SessionDetailsRequest, UserSessionDetails, UserSessionDetailsRequest } from "./sessions_pb.js";
7
+ import { MethodKind } from "@bufbuild/protobuf";
8
+
9
+ /**
10
+ * @generated from service scalekit.v1.sessions.SessionService
11
+ */
12
+ export const SessionService = {
13
+ typeName: "scalekit.v1.sessions.SessionService",
14
+ methods: {
15
+ /**
16
+ * @generated from rpc scalekit.v1.sessions.SessionService.GetSession
17
+ */
18
+ getSession: {
19
+ name: "GetSession",
20
+ I: SessionDetailsRequest,
21
+ O: SessionDetails,
22
+ kind: MethodKind.Unary,
23
+ },
24
+ /**
25
+ * @generated from rpc scalekit.v1.sessions.SessionService.RevokeSession
26
+ */
27
+ revokeSession: {
28
+ name: "RevokeSession",
29
+ I: RevokeSessionRequest,
30
+ O: RevokeSessionResponse,
31
+ kind: MethodKind.Unary,
32
+ },
33
+ /**
34
+ * @generated from rpc scalekit.v1.sessions.SessionService.GetUserSessions
35
+ */
36
+ getUserSessions: {
37
+ name: "GetUserSessions",
38
+ I: UserSessionDetailsRequest,
39
+ O: UserSessionDetails,
40
+ kind: MethodKind.Unary,
41
+ },
42
+ /**
43
+ * @generated from rpc scalekit.v1.sessions.SessionService.RevokeAllUserSessions
44
+ */
45
+ revokeAllUserSessions: {
46
+ name: "RevokeAllUserSessions",
47
+ I: RevokeAllUserSessionsRequest,
48
+ O: RevokeAllUserSessionsResponse,
49
+ kind: MethodKind.Unary,
50
+ },
51
+ }
52
+ } as const;
53
+