geniebox-shared-lib 2.4.6 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,12 @@
1
+ import { OnModuleInit } from "@nestjs/common";
2
+ import { ClientGrpc } from "@nestjs/microservices";
3
+ import { GenerationRuntimeServiceClient } from "./generation_runtime.interface";
4
+ export declare class GenerationRuntimeClient implements OnModuleInit {
5
+ private readonly client;
6
+ private readonly logger;
7
+ private generationRuntimeClient?;
8
+ constructor(client: ClientGrpc);
9
+ onModuleInit(): void;
10
+ get service(): GenerationRuntimeServiceClient;
11
+ isReady(): boolean;
12
+ }
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ var GenerationRuntimeClient_1;
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.GenerationRuntimeClient = void 0;
17
+ const common_1 = require("@nestjs/common");
18
+ let GenerationRuntimeClient = GenerationRuntimeClient_1 = class GenerationRuntimeClient {
19
+ constructor(client) {
20
+ this.client = client;
21
+ this.logger = new common_1.Logger(GenerationRuntimeClient_1.name);
22
+ }
23
+ onModuleInit() {
24
+ this.generationRuntimeClient =
25
+ this.client.getService("GenerationRuntimeService");
26
+ this.logger.log("GenerationRuntimeServiceClient initialized");
27
+ }
28
+ get service() {
29
+ if (!this.generationRuntimeClient) {
30
+ throw new common_1.InternalServerErrorException("GenerationRuntimeService is not initialized yet");
31
+ }
32
+ return this.generationRuntimeClient;
33
+ }
34
+ isReady() {
35
+ return !!this.generationRuntimeClient;
36
+ }
37
+ };
38
+ exports.GenerationRuntimeClient = GenerationRuntimeClient;
39
+ exports.GenerationRuntimeClient = GenerationRuntimeClient = GenerationRuntimeClient_1 = __decorate([
40
+ (0, common_1.Injectable)(),
41
+ __param(0, (0, common_1.Inject)("GENERATION_RUNTIME_PACKAGE")),
42
+ __metadata("design:paramtypes", [Object])
43
+ ], GenerationRuntimeClient);
@@ -0,0 +1,83 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import type { handleUnaryCall, Metadata, UntypedServiceImplementation } from "@grpc/grpc-js";
3
+ import { Observable } from "rxjs";
4
+ import { Empty } from "./google/protobuf/empty.interface";
5
+ export declare const protobufPackage = "generation_runtime";
6
+ export interface StartChatRunRequest {
7
+ chatId: string;
8
+ userId: string;
9
+ payload?: {
10
+ [key: string]: any;
11
+ } | undefined;
12
+ idempotencyKey: string;
13
+ }
14
+ export interface StartChatRunResponse {
15
+ runId: string;
16
+ status: string;
17
+ }
18
+ export interface SubmitToolResultRequest {
19
+ runId: string;
20
+ toolCallId: string;
21
+ payload?: {
22
+ [key: string]: any;
23
+ } | undefined;
24
+ }
25
+ export interface CancelRunRequest {
26
+ runId: string;
27
+ }
28
+ export declare const GENERATION_RUNTIME_PACKAGE_NAME = "generation_runtime";
29
+ export declare const StartChatRunRequest: MessageFns<StartChatRunRequest>;
30
+ export declare const StartChatRunResponse: MessageFns<StartChatRunResponse>;
31
+ export declare const SubmitToolResultRequest: MessageFns<SubmitToolResultRequest>;
32
+ export declare const CancelRunRequest: MessageFns<CancelRunRequest>;
33
+ export interface GenerationRuntimeServiceClient {
34
+ startChatRun(request: StartChatRunRequest, metadata?: Metadata): Observable<StartChatRunResponse>;
35
+ submitToolResult(request: SubmitToolResultRequest, metadata?: Metadata): Observable<Empty>;
36
+ cancelRun(request: CancelRunRequest, metadata?: Metadata): Observable<Empty>;
37
+ }
38
+ export interface GenerationRuntimeServiceController {
39
+ startChatRun(request: StartChatRunRequest, metadata?: Metadata): Promise<StartChatRunResponse> | Observable<StartChatRunResponse> | StartChatRunResponse;
40
+ submitToolResult(request: SubmitToolResultRequest, metadata?: Metadata): void;
41
+ cancelRun(request: CancelRunRequest, metadata?: Metadata): void;
42
+ }
43
+ export declare function GenerationRuntimeServiceControllerMethods(): (constructor: Function) => void;
44
+ export declare const GENERATION_RUNTIME_SERVICE_NAME = "GenerationRuntimeService";
45
+ export type GenerationRuntimeServiceService = typeof GenerationRuntimeServiceService;
46
+ export declare const GenerationRuntimeServiceService: {
47
+ readonly startChatRun: {
48
+ readonly path: "/generation_runtime.GenerationRuntimeService/StartChatRun";
49
+ readonly requestStream: false;
50
+ readonly responseStream: false;
51
+ readonly requestSerialize: (value: StartChatRunRequest) => Buffer;
52
+ readonly requestDeserialize: (value: Buffer) => StartChatRunRequest;
53
+ readonly responseSerialize: (value: StartChatRunResponse) => Buffer;
54
+ readonly responseDeserialize: (value: Buffer) => StartChatRunResponse;
55
+ };
56
+ readonly submitToolResult: {
57
+ readonly path: "/generation_runtime.GenerationRuntimeService/SubmitToolResult";
58
+ readonly requestStream: false;
59
+ readonly responseStream: false;
60
+ readonly requestSerialize: (value: SubmitToolResultRequest) => Buffer;
61
+ readonly requestDeserialize: (value: Buffer) => SubmitToolResultRequest;
62
+ readonly responseSerialize: (value: Empty) => Buffer;
63
+ readonly responseDeserialize: (value: Buffer) => Empty;
64
+ };
65
+ readonly cancelRun: {
66
+ readonly path: "/generation_runtime.GenerationRuntimeService/CancelRun";
67
+ readonly requestStream: false;
68
+ readonly responseStream: false;
69
+ readonly requestSerialize: (value: CancelRunRequest) => Buffer;
70
+ readonly requestDeserialize: (value: Buffer) => CancelRunRequest;
71
+ readonly responseSerialize: (value: Empty) => Buffer;
72
+ readonly responseDeserialize: (value: Buffer) => Empty;
73
+ };
74
+ };
75
+ export interface GenerationRuntimeServiceServer extends UntypedServiceImplementation {
76
+ startChatRun: handleUnaryCall<StartChatRunRequest, StartChatRunResponse>;
77
+ submitToolResult: handleUnaryCall<SubmitToolResultRequest, Empty>;
78
+ cancelRun: handleUnaryCall<CancelRunRequest, Empty>;
79
+ }
80
+ export interface MessageFns<T> {
81
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
82
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
83
+ }
@@ -0,0 +1,254 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.7.7
5
+ // protoc v5.28.2
6
+ // source: generation_runtime.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.GenerationRuntimeServiceService = exports.GENERATION_RUNTIME_SERVICE_NAME = exports.CancelRunRequest = exports.SubmitToolResultRequest = exports.StartChatRunResponse = exports.StartChatRunRequest = exports.GENERATION_RUNTIME_PACKAGE_NAME = exports.protobufPackage = void 0;
9
+ exports.GenerationRuntimeServiceControllerMethods = GenerationRuntimeServiceControllerMethods;
10
+ /* eslint-disable */
11
+ const wire_1 = require("@bufbuild/protobuf/wire");
12
+ const microservices_1 = require("@nestjs/microservices");
13
+ const protobufjs_1 = require("protobufjs");
14
+ const empty_interface_1 = require("./google/protobuf/empty.interface");
15
+ const struct_interface_1 = require("./google/protobuf/struct.interface");
16
+ exports.protobufPackage = "generation_runtime";
17
+ exports.GENERATION_RUNTIME_PACKAGE_NAME = "generation_runtime";
18
+ function createBaseStartChatRunRequest() {
19
+ return { chatId: "", userId: "", idempotencyKey: "" };
20
+ }
21
+ exports.StartChatRunRequest = {
22
+ encode(message, writer = new wire_1.BinaryWriter()) {
23
+ if (message.chatId !== "") {
24
+ writer.uint32(10).string(message.chatId);
25
+ }
26
+ if (message.userId !== "") {
27
+ writer.uint32(18).string(message.userId);
28
+ }
29
+ if (message.payload !== undefined) {
30
+ struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.payload), writer.uint32(26).fork()).join();
31
+ }
32
+ if (message.idempotencyKey !== "") {
33
+ writer.uint32(34).string(message.idempotencyKey);
34
+ }
35
+ return writer;
36
+ },
37
+ decode(input, length) {
38
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
39
+ const end = length === undefined ? reader.len : reader.pos + length;
40
+ const message = createBaseStartChatRunRequest();
41
+ while (reader.pos < end) {
42
+ const tag = reader.uint32();
43
+ switch (tag >>> 3) {
44
+ case 1: {
45
+ if (tag !== 10) {
46
+ break;
47
+ }
48
+ message.chatId = reader.string();
49
+ continue;
50
+ }
51
+ case 2: {
52
+ if (tag !== 18) {
53
+ break;
54
+ }
55
+ message.userId = reader.string();
56
+ continue;
57
+ }
58
+ case 3: {
59
+ if (tag !== 26) {
60
+ break;
61
+ }
62
+ message.payload = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
63
+ continue;
64
+ }
65
+ case 4: {
66
+ if (tag !== 34) {
67
+ break;
68
+ }
69
+ message.idempotencyKey = reader.string();
70
+ continue;
71
+ }
72
+ }
73
+ if ((tag & 7) === 4 || tag === 0) {
74
+ break;
75
+ }
76
+ reader.skip(tag & 7);
77
+ }
78
+ return message;
79
+ },
80
+ };
81
+ function createBaseStartChatRunResponse() {
82
+ return { runId: "", status: "" };
83
+ }
84
+ exports.StartChatRunResponse = {
85
+ encode(message, writer = new wire_1.BinaryWriter()) {
86
+ if (message.runId !== "") {
87
+ writer.uint32(10).string(message.runId);
88
+ }
89
+ if (message.status !== "") {
90
+ writer.uint32(18).string(message.status);
91
+ }
92
+ return writer;
93
+ },
94
+ decode(input, length) {
95
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
96
+ const end = length === undefined ? reader.len : reader.pos + length;
97
+ const message = createBaseStartChatRunResponse();
98
+ while (reader.pos < end) {
99
+ const tag = reader.uint32();
100
+ switch (tag >>> 3) {
101
+ case 1: {
102
+ if (tag !== 10) {
103
+ break;
104
+ }
105
+ message.runId = reader.string();
106
+ continue;
107
+ }
108
+ case 2: {
109
+ if (tag !== 18) {
110
+ break;
111
+ }
112
+ message.status = reader.string();
113
+ continue;
114
+ }
115
+ }
116
+ if ((tag & 7) === 4 || tag === 0) {
117
+ break;
118
+ }
119
+ reader.skip(tag & 7);
120
+ }
121
+ return message;
122
+ },
123
+ };
124
+ function createBaseSubmitToolResultRequest() {
125
+ return { runId: "", toolCallId: "" };
126
+ }
127
+ exports.SubmitToolResultRequest = {
128
+ encode(message, writer = new wire_1.BinaryWriter()) {
129
+ if (message.runId !== "") {
130
+ writer.uint32(10).string(message.runId);
131
+ }
132
+ if (message.toolCallId !== "") {
133
+ writer.uint32(18).string(message.toolCallId);
134
+ }
135
+ if (message.payload !== undefined) {
136
+ struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.payload), writer.uint32(26).fork()).join();
137
+ }
138
+ return writer;
139
+ },
140
+ decode(input, length) {
141
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
142
+ const end = length === undefined ? reader.len : reader.pos + length;
143
+ const message = createBaseSubmitToolResultRequest();
144
+ while (reader.pos < end) {
145
+ const tag = reader.uint32();
146
+ switch (tag >>> 3) {
147
+ case 1: {
148
+ if (tag !== 10) {
149
+ break;
150
+ }
151
+ message.runId = reader.string();
152
+ continue;
153
+ }
154
+ case 2: {
155
+ if (tag !== 18) {
156
+ break;
157
+ }
158
+ message.toolCallId = reader.string();
159
+ continue;
160
+ }
161
+ case 3: {
162
+ if (tag !== 26) {
163
+ break;
164
+ }
165
+ message.payload = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
166
+ continue;
167
+ }
168
+ }
169
+ if ((tag & 7) === 4 || tag === 0) {
170
+ break;
171
+ }
172
+ reader.skip(tag & 7);
173
+ }
174
+ return message;
175
+ },
176
+ };
177
+ function createBaseCancelRunRequest() {
178
+ return { runId: "" };
179
+ }
180
+ exports.CancelRunRequest = {
181
+ encode(message, writer = new wire_1.BinaryWriter()) {
182
+ if (message.runId !== "") {
183
+ writer.uint32(10).string(message.runId);
184
+ }
185
+ return writer;
186
+ },
187
+ decode(input, length) {
188
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
189
+ const end = length === undefined ? reader.len : reader.pos + length;
190
+ const message = createBaseCancelRunRequest();
191
+ while (reader.pos < end) {
192
+ const tag = reader.uint32();
193
+ switch (tag >>> 3) {
194
+ case 1: {
195
+ if (tag !== 10) {
196
+ break;
197
+ }
198
+ message.runId = reader.string();
199
+ continue;
200
+ }
201
+ }
202
+ if ((tag & 7) === 4 || tag === 0) {
203
+ break;
204
+ }
205
+ reader.skip(tag & 7);
206
+ }
207
+ return message;
208
+ },
209
+ };
210
+ protobufjs_1.wrappers[".google.protobuf.Struct"] = { fromObject: struct_interface_1.Struct.wrap, toObject: struct_interface_1.Struct.unwrap };
211
+ function GenerationRuntimeServiceControllerMethods() {
212
+ return function (constructor) {
213
+ const grpcMethods = ["startChatRun", "submitToolResult", "cancelRun"];
214
+ for (const method of grpcMethods) {
215
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
216
+ (0, microservices_1.GrpcMethod)("GenerationRuntimeService", method)(constructor.prototype[method], method, descriptor);
217
+ }
218
+ const grpcStreamMethods = [];
219
+ for (const method of grpcStreamMethods) {
220
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
221
+ (0, microservices_1.GrpcStreamMethod)("GenerationRuntimeService", method)(constructor.prototype[method], method, descriptor);
222
+ }
223
+ };
224
+ }
225
+ exports.GENERATION_RUNTIME_SERVICE_NAME = "GenerationRuntimeService";
226
+ exports.GenerationRuntimeServiceService = {
227
+ startChatRun: {
228
+ path: "/generation_runtime.GenerationRuntimeService/StartChatRun",
229
+ requestStream: false,
230
+ responseStream: false,
231
+ requestSerialize: (value) => Buffer.from(exports.StartChatRunRequest.encode(value).finish()),
232
+ requestDeserialize: (value) => exports.StartChatRunRequest.decode(value),
233
+ responseSerialize: (value) => Buffer.from(exports.StartChatRunResponse.encode(value).finish()),
234
+ responseDeserialize: (value) => exports.StartChatRunResponse.decode(value),
235
+ },
236
+ submitToolResult: {
237
+ path: "/generation_runtime.GenerationRuntimeService/SubmitToolResult",
238
+ requestStream: false,
239
+ responseStream: false,
240
+ requestSerialize: (value) => Buffer.from(exports.SubmitToolResultRequest.encode(value).finish()),
241
+ requestDeserialize: (value) => exports.SubmitToolResultRequest.decode(value),
242
+ responseSerialize: (value) => Buffer.from(empty_interface_1.Empty.encode(value).finish()),
243
+ responseDeserialize: (value) => empty_interface_1.Empty.decode(value),
244
+ },
245
+ cancelRun: {
246
+ path: "/generation_runtime.GenerationRuntimeService/CancelRun",
247
+ requestStream: false,
248
+ responseStream: false,
249
+ requestSerialize: (value) => Buffer.from(exports.CancelRunRequest.encode(value).finish()),
250
+ requestDeserialize: (value) => exports.CancelRunRequest.decode(value),
251
+ responseSerialize: (value) => Buffer.from(empty_interface_1.Empty.encode(value).finish()),
252
+ responseDeserialize: (value) => empty_interface_1.Empty.decode(value),
253
+ },
254
+ };
package/dist/index.d.ts CHANGED
@@ -14,6 +14,7 @@ export { MCPClient } from "./mcp.client";
14
14
  export { WorkflowClient } from "./workflow.client";
15
15
  export { LibraryClient } from "./library.client";
16
16
  export { ChatClient } from "./chat.client";
17
+ export { GenerationRuntimeClient } from "./generation_runtime.client";
17
18
  export { MessageFns as UserMessageFns, protobufPackage as UserProtobufPackage, User, CreateUserRequest, CreateUserPersonal, UpdateUserRequest, FindOneRequest, UserResponse, UsersResponse, FindByEmailRequest, FindByPhoneRequest, UpdateUserPersonal, UpdatePasswordRequest, UpdateEmailVerificationRequest, ResetPasswordData, GetEmailVerificationStatusRequest, EmailVerificationStatusResponse, UserServiceService as UserService, } from "./user.interface";
18
19
  export { MessageFns as AuthMessageFns, protobufPackage as AuthProtobufPackage, LoginCredentials, RegisterCredentials, LogoutRequest, RefreshRequest, AuthResponse, RefreshTokenResponse, RecoverRequest, ResetPasswordRequest, ConfirmEmailRequest, ConfirmEmailByCodeRequest, ConfirmEmailResponse, CheckEmailVerifiedRequest, CheckEmailVerifiedResponse, ResendConfirmationCodeRequest, VerifyResetCodeRequest, } from "./auth.interface";
19
20
  export { MessageFns as EndpointMessageFns, protobufPackage as EndpointProtobufPackage, ENDPOINT_PACKAGE_NAME, ENDPOINT_SERVICE_NAME, Provider as EndpointProvider, Model as EndpointModel, Pricing as EndpointPricing, EndpointConfig, EndpointRequest, ProvidersRequest, ProvidersResponse, ModelsRequest, ModelsResponse, PricingRequest, PricingResponse, ValidateEndpointRequest, ValidateEndpointResponse, CreateEndpointRequest, UpdateEndpointRequest, GetEndpointByIdRequest, ListEndpointsRequest, DeleteEndpointRequest, CreateEndpointResponse, UpdateEndpointResponse, GetEndpointByIdResponse, ListEndpointsResponse, DeleteEndpointResponse, EndpointServiceClient, EndpointServiceController, EndpointServiceService as EndpointService, } from "./endpoint.interface";
@@ -27,5 +28,6 @@ export { MessageFns as BillingMessageFns, protobufPackage as BillingProtobufPack
27
28
  export { MessageFns as AgentMessageFns, protobufPackage as AgentProtobufPackage, Agent, CreateAgentRequest, UpdateAgentRequest, GetAgentRequest, ListAgentsRequest, DeleteAgentRequest, AgentsResponse, AgentServiceClient, AgentServiceController, AgentServiceService as AgentService, } from "./agent.interface";
28
29
  export { MessageFns as WorkflowMessageFns, protobufPackage as WorkflowProtobufPackage, Workflow, WorkflowNode, WorkflowEdge, FullWorkflow, CreateWorkflowRequest, UpdateWorkflowRequest, GetWorkflowRequest, ListWorkflowsRequest, DeleteWorkflowRequest, CreateNodeRequest, UpdateNodeRequest, DeleteNodeRequest, CreateEdgeRequest, DeleteEdgeRequest, WorkflowsResponse, WorkflowServiceClient, WorkflowServiceController, WorkflowServiceService as WorkflowService, } from "./workflow.interface";
29
30
  export { MessageFns as McpMessageFns, protobufPackage as McpProtobufPackage, McpServer, McpServerCustomization, McpToolCustomization, McpOAuthSession, CreateMcpServerRequest, UpdateMcpServerRequest, GetMcpServerRequest, ListMcpServersRequest, DeleteMcpServerRequest, SetServerCustomizationRequest, SetToolCustomizationRequest, McpServersResponse, McpServiceClient, McpServiceController, McpServiceService as McpService, } from "./mcp.interface";
30
- export { MessageFns as LibraryMessageFns, protobufPackage as LibraryProtobufPackage, Bookmark, Archive, ArchiveItem, CreateBookmarkRequest, DeleteBookmarkRequest, ListBookmarksRequest, CreateArchiveRequest, UpdateArchiveRequest, DeleteArchiveRequest, ListArchivesRequest, AddItemToArchiveRequest, RemoveItemFromArchiveRequest, BookmarksResponse, ArchivesResponse, LibraryServiceClient, LibraryServiceController, LibraryServiceService as LibraryService, } from "./library.interface";
31
+ export { MessageFns as LibraryMessageFns, protobufPackage as LibraryProtobufPackage, Bookmark, Archive, ArchiveItem, CreateBookmarkRequest, DeleteBookmarkRequest, ListBookmarksRequest, CreateArchiveRequest, UpdateArchiveRequest, DeleteArchiveRequest, ListArchivesRequest, AddItemToArchiveRequest, RemoveItemFromArchiveRequest, BookmarksResponse, ArchivesResponse, ListArchiveItemsRequest, ArchiveItemsResponse, LibraryServiceClient, LibraryServiceController, LibraryServiceService as LibraryService, } from "./library.interface";
31
32
  export { MessageFns as ChatMessageFns, protobufPackage as ChatProtobufPackage, Chat, ChatMessage, CreateChatRequest, GetChatRequest, ListChatsRequest, DeleteChatRequest, AddMessageRequest, GetMessagesRequest, ChatsResponse, MessagesResponse, ChatServiceClient, ChatServiceController, ChatServiceService as ChatService, } from "./chat.interface";
33
+ export { MessageFns as GenerationRuntimeMessageFns, protobufPackage as GenerationRuntimeProtobufPackage, StartChatRunRequest, StartChatRunResponse, SubmitToolResultRequest, CancelRunRequest, GenerationRuntimeServiceClient, GenerationRuntimeServiceController, GenerationRuntimeServiceService as GenerationRuntimeService, } from "./generation_runtime.interface";
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EndpointProtobufPackage = exports.VerifyResetCodeRequest = exports.ResendConfirmationCodeRequest = exports.CheckEmailVerifiedResponse = exports.CheckEmailVerifiedRequest = exports.ConfirmEmailResponse = exports.ConfirmEmailByCodeRequest = exports.ConfirmEmailRequest = exports.ResetPasswordRequest = exports.RecoverRequest = exports.RefreshTokenResponse = exports.AuthResponse = exports.RefreshRequest = exports.LogoutRequest = exports.RegisterCredentials = exports.LoginCredentials = exports.AuthProtobufPackage = exports.UserService = exports.EmailVerificationStatusResponse = exports.GetEmailVerificationStatusRequest = exports.ResetPasswordData = exports.UpdateEmailVerificationRequest = exports.UpdatePasswordRequest = exports.UpdateUserPersonal = exports.FindByPhoneRequest = exports.FindByEmailRequest = exports.UsersResponse = exports.UserResponse = exports.FindOneRequest = exports.UpdateUserRequest = exports.CreateUserPersonal = exports.CreateUserRequest = exports.User = exports.UserProtobufPackage = exports.ChatClient = exports.LibraryClient = exports.WorkflowClient = exports.MCPClient = exports.AgentClient = exports.BillingClient = exports.ResponseClient = exports.RequestClient = exports.KeyClient = exports.EventClient = exports.StorageClient = exports.OpenAIClient = exports.EndpointClient = exports.AuthClient = exports.UsersClient = exports.SharedModule = void 0;
4
- exports.KeysResponse = exports.KeyResponse = exports.GetKeyByIdRequest = exports.RemoveKeyRequest = exports.UpdateKeyRequest = exports.CreateKeyRequest = exports.Key = exports.KeysProtobufPackage = exports.EventService = exports.EventMessage = exports.SubscribeRequest = exports.EventProtobufPackage = exports.FileProtobufPackage = exports.StorageService = exports.DeleteResponse = exports.DeleteRequest = exports.DownloadResponse = exports.DownloadRequest = exports.UploadResponse = exports.UploadRequest = exports.OpenAIService = exports.OpenAICreateResponse = exports.OpenAICreateRequest = exports.OpenAIProtobufPackage = exports.EndpointService = exports.DeleteEndpointResponse = exports.ListEndpointsResponse = exports.GetEndpointByIdResponse = exports.UpdateEndpointResponse = exports.CreateEndpointResponse = exports.DeleteEndpointRequest = exports.ListEndpointsRequest = exports.GetEndpointByIdRequest = exports.UpdateEndpointRequest = exports.CreateEndpointRequest = exports.ValidateEndpointResponse = exports.ValidateEndpointRequest = exports.PricingResponse = exports.PricingRequest = exports.ModelsResponse = exports.ModelsRequest = exports.ProvidersResponse = exports.ProvidersRequest = exports.EndpointRequest = exports.EndpointConfig = exports.EndpointPricing = exports.EndpointModel = exports.EndpointProvider = exports.ENDPOINT_SERVICE_NAME = exports.ENDPOINT_PACKAGE_NAME = void 0;
5
- exports.GetUsageByUserResponse = exports.GetUsageByUserRequest = exports.GetUsageByKeyResponse = exports.GetUsageByKeyRequest = exports.GetUsageStatsResponse = exports.GetUsageStatsRequest = exports.RecordUsageResponse = exports.RecordUsageRequest = exports.GetTransactionResponse = exports.GetTransactionRequest = exports.GetTransactionsResponse = exports.GetTransactionsRequest = exports.CreateTransactionResponse = exports.CreateTransactionRequest = exports.DepositResponse = exports.DepositRequest = exports.ChargeResponse = exports.ChargeRequest = exports.GetBalanceResponse = exports.GetBalanceRequest = exports.Payment = exports.UsageStats = exports.Usage = exports.Transaction = exports.Balance = exports.BillingProtobufPackage = exports.ResponseService = exports.StreamUpdate = exports.StreamUpdatesRequest = exports.ProcessResponseResponse = exports.ProcessResponseRequest = exports.ResponseProtobufPackage = exports.RequestService = exports.StreamChunk = exports.RequestLog = exports.StreamRequestRequest = exports.CancelRequestResponse = exports.CancelRequestRequest = exports.RequestResultResponse = exports.GetRequestResultRequest = exports.RequestStatusResponse = exports.GetRequestStatusRequest = exports.CreateRequestResponse = exports.CreateRequestRequest = exports.RequestProtobufPackage = exports.KeyService = exports.GetSystemKeyRequest = exports.ValidateKeyResponse = exports.ValidateKeyRequest = exports.GetKeysByUserRequest = void 0;
6
- exports.LibraryProtobufPackage = exports.McpService = exports.McpServersResponse = exports.SetToolCustomizationRequest = exports.SetServerCustomizationRequest = exports.DeleteMcpServerRequest = exports.ListMcpServersRequest = exports.GetMcpServerRequest = exports.UpdateMcpServerRequest = exports.CreateMcpServerRequest = exports.McpOAuthSession = exports.McpToolCustomization = exports.McpServerCustomization = exports.McpServer = exports.McpProtobufPackage = exports.WorkflowService = exports.WorkflowsResponse = exports.DeleteEdgeRequest = exports.CreateEdgeRequest = exports.DeleteNodeRequest = exports.UpdateNodeRequest = exports.CreateNodeRequest = exports.DeleteWorkflowRequest = exports.ListWorkflowsRequest = exports.GetWorkflowRequest = exports.UpdateWorkflowRequest = exports.CreateWorkflowRequest = exports.FullWorkflow = exports.WorkflowEdge = exports.WorkflowNode = exports.Workflow = exports.WorkflowProtobufPackage = exports.AgentService = exports.AgentsResponse = exports.DeleteAgentRequest = exports.ListAgentsRequest = exports.GetAgentRequest = exports.UpdateAgentRequest = exports.CreateAgentRequest = exports.Agent = exports.AgentProtobufPackage = exports.BillingService = exports.ProcessWebhookResponse = exports.ProcessWebhookRequest = exports.GetPaymentsByUserResponse = exports.GetPaymentsByUserRequest = exports.GetPaymentResponse = exports.GetPaymentRequest = exports.CreatePaymentResponse = exports.CreatePaymentRequest = void 0;
7
- exports.ChatService = exports.MessagesResponse = exports.ChatsResponse = exports.GetMessagesRequest = exports.AddMessageRequest = exports.DeleteChatRequest = exports.ListChatsRequest = exports.GetChatRequest = exports.CreateChatRequest = exports.ChatMessage = exports.Chat = exports.ChatProtobufPackage = exports.LibraryService = exports.ArchivesResponse = exports.BookmarksResponse = exports.RemoveItemFromArchiveRequest = exports.AddItemToArchiveRequest = exports.ListArchivesRequest = exports.DeleteArchiveRequest = exports.UpdateArchiveRequest = exports.CreateArchiveRequest = exports.ListBookmarksRequest = exports.DeleteBookmarkRequest = exports.CreateBookmarkRequest = exports.ArchiveItem = exports.Archive = exports.Bookmark = void 0;
3
+ exports.VerifyResetCodeRequest = exports.ResendConfirmationCodeRequest = exports.CheckEmailVerifiedResponse = exports.CheckEmailVerifiedRequest = exports.ConfirmEmailResponse = exports.ConfirmEmailByCodeRequest = exports.ConfirmEmailRequest = exports.ResetPasswordRequest = exports.RecoverRequest = exports.RefreshTokenResponse = exports.AuthResponse = exports.RefreshRequest = exports.LogoutRequest = exports.RegisterCredentials = exports.LoginCredentials = exports.AuthProtobufPackage = exports.UserService = exports.EmailVerificationStatusResponse = exports.GetEmailVerificationStatusRequest = exports.ResetPasswordData = exports.UpdateEmailVerificationRequest = exports.UpdatePasswordRequest = exports.UpdateUserPersonal = exports.FindByPhoneRequest = exports.FindByEmailRequest = exports.UsersResponse = exports.UserResponse = exports.FindOneRequest = exports.UpdateUserRequest = exports.CreateUserPersonal = exports.CreateUserRequest = exports.User = exports.UserProtobufPackage = exports.GenerationRuntimeClient = exports.ChatClient = exports.LibraryClient = exports.WorkflowClient = exports.MCPClient = exports.AgentClient = exports.BillingClient = exports.ResponseClient = exports.RequestClient = exports.KeyClient = exports.EventClient = exports.StorageClient = exports.OpenAIClient = exports.EndpointClient = exports.AuthClient = exports.UsersClient = exports.SharedModule = void 0;
4
+ exports.KeyResponse = exports.GetKeyByIdRequest = exports.RemoveKeyRequest = exports.UpdateKeyRequest = exports.CreateKeyRequest = exports.Key = exports.KeysProtobufPackage = exports.EventService = exports.EventMessage = exports.SubscribeRequest = exports.EventProtobufPackage = exports.FileProtobufPackage = exports.StorageService = exports.DeleteResponse = exports.DeleteRequest = exports.DownloadResponse = exports.DownloadRequest = exports.UploadResponse = exports.UploadRequest = exports.OpenAIService = exports.OpenAICreateResponse = exports.OpenAICreateRequest = exports.OpenAIProtobufPackage = exports.EndpointService = exports.DeleteEndpointResponse = exports.ListEndpointsResponse = exports.GetEndpointByIdResponse = exports.UpdateEndpointResponse = exports.CreateEndpointResponse = exports.DeleteEndpointRequest = exports.ListEndpointsRequest = exports.GetEndpointByIdRequest = exports.UpdateEndpointRequest = exports.CreateEndpointRequest = exports.ValidateEndpointResponse = exports.ValidateEndpointRequest = exports.PricingResponse = exports.PricingRequest = exports.ModelsResponse = exports.ModelsRequest = exports.ProvidersResponse = exports.ProvidersRequest = exports.EndpointRequest = exports.EndpointConfig = exports.EndpointPricing = exports.EndpointModel = exports.EndpointProvider = exports.ENDPOINT_SERVICE_NAME = exports.ENDPOINT_PACKAGE_NAME = exports.EndpointProtobufPackage = void 0;
5
+ exports.GetUsageByUserRequest = exports.GetUsageByKeyResponse = exports.GetUsageByKeyRequest = exports.GetUsageStatsResponse = exports.GetUsageStatsRequest = exports.RecordUsageResponse = exports.RecordUsageRequest = exports.GetTransactionResponse = exports.GetTransactionRequest = exports.GetTransactionsResponse = exports.GetTransactionsRequest = exports.CreateTransactionResponse = exports.CreateTransactionRequest = exports.DepositResponse = exports.DepositRequest = exports.ChargeResponse = exports.ChargeRequest = exports.GetBalanceResponse = exports.GetBalanceRequest = exports.Payment = exports.UsageStats = exports.Usage = exports.Transaction = exports.Balance = exports.BillingProtobufPackage = exports.ResponseService = exports.StreamUpdate = exports.StreamUpdatesRequest = exports.ProcessResponseResponse = exports.ProcessResponseRequest = exports.ResponseProtobufPackage = exports.RequestService = exports.StreamChunk = exports.RequestLog = exports.StreamRequestRequest = exports.CancelRequestResponse = exports.CancelRequestRequest = exports.RequestResultResponse = exports.GetRequestResultRequest = exports.RequestStatusResponse = exports.GetRequestStatusRequest = exports.CreateRequestResponse = exports.CreateRequestRequest = exports.RequestProtobufPackage = exports.KeyService = exports.GetSystemKeyRequest = exports.ValidateKeyResponse = exports.ValidateKeyRequest = exports.GetKeysByUserRequest = exports.KeysResponse = void 0;
6
+ exports.McpService = exports.McpServersResponse = exports.SetToolCustomizationRequest = exports.SetServerCustomizationRequest = exports.DeleteMcpServerRequest = exports.ListMcpServersRequest = exports.GetMcpServerRequest = exports.UpdateMcpServerRequest = exports.CreateMcpServerRequest = exports.McpOAuthSession = exports.McpToolCustomization = exports.McpServerCustomization = exports.McpServer = exports.McpProtobufPackage = exports.WorkflowService = exports.WorkflowsResponse = exports.DeleteEdgeRequest = exports.CreateEdgeRequest = exports.DeleteNodeRequest = exports.UpdateNodeRequest = exports.CreateNodeRequest = exports.DeleteWorkflowRequest = exports.ListWorkflowsRequest = exports.GetWorkflowRequest = exports.UpdateWorkflowRequest = exports.CreateWorkflowRequest = exports.FullWorkflow = exports.WorkflowEdge = exports.WorkflowNode = exports.Workflow = exports.WorkflowProtobufPackage = exports.AgentService = exports.AgentsResponse = exports.DeleteAgentRequest = exports.ListAgentsRequest = exports.GetAgentRequest = exports.UpdateAgentRequest = exports.CreateAgentRequest = exports.Agent = exports.AgentProtobufPackage = exports.BillingService = exports.ProcessWebhookResponse = exports.ProcessWebhookRequest = exports.GetPaymentsByUserResponse = exports.GetPaymentsByUserRequest = exports.GetPaymentResponse = exports.GetPaymentRequest = exports.CreatePaymentResponse = exports.CreatePaymentRequest = exports.GetUsageByUserResponse = void 0;
7
+ exports.GenerationRuntimeService = exports.CancelRunRequest = exports.SubmitToolResultRequest = exports.StartChatRunResponse = exports.StartChatRunRequest = exports.GenerationRuntimeProtobufPackage = exports.ChatService = exports.MessagesResponse = exports.ChatsResponse = exports.GetMessagesRequest = exports.AddMessageRequest = exports.DeleteChatRequest = exports.ListChatsRequest = exports.GetChatRequest = exports.CreateChatRequest = exports.ChatMessage = exports.Chat = exports.ChatProtobufPackage = exports.LibraryService = exports.ArchiveItemsResponse = exports.ListArchiveItemsRequest = exports.ArchivesResponse = exports.BookmarksResponse = exports.RemoveItemFromArchiveRequest = exports.AddItemToArchiveRequest = exports.ListArchivesRequest = exports.DeleteArchiveRequest = exports.UpdateArchiveRequest = exports.CreateArchiveRequest = exports.ListBookmarksRequest = exports.DeleteBookmarkRequest = exports.CreateBookmarkRequest = exports.ArchiveItem = exports.Archive = exports.Bookmark = exports.LibraryProtobufPackage = void 0;
8
8
  var shared_module_1 = require("./shared.module");
9
9
  Object.defineProperty(exports, "SharedModule", { enumerable: true, get: function () { return shared_module_1.SharedModule; } });
10
10
  var user_client_1 = require("./user.client");
@@ -37,6 +37,8 @@ var library_client_1 = require("./library.client");
37
37
  Object.defineProperty(exports, "LibraryClient", { enumerable: true, get: function () { return library_client_1.LibraryClient; } });
38
38
  var chat_client_1 = require("./chat.client");
39
39
  Object.defineProperty(exports, "ChatClient", { enumerable: true, get: function () { return chat_client_1.ChatClient; } });
40
+ var generation_runtime_client_1 = require("./generation_runtime.client");
41
+ Object.defineProperty(exports, "GenerationRuntimeClient", { enumerable: true, get: function () { return generation_runtime_client_1.GenerationRuntimeClient; } });
40
42
  // ============================
41
43
  // User exports
42
44
  // ============================
@@ -292,6 +294,8 @@ Object.defineProperty(exports, "AddItemToArchiveRequest", { enumerable: true, ge
292
294
  Object.defineProperty(exports, "RemoveItemFromArchiveRequest", { enumerable: true, get: function () { return library_interface_1.RemoveItemFromArchiveRequest; } });
293
295
  Object.defineProperty(exports, "BookmarksResponse", { enumerable: true, get: function () { return library_interface_1.BookmarksResponse; } });
294
296
  Object.defineProperty(exports, "ArchivesResponse", { enumerable: true, get: function () { return library_interface_1.ArchivesResponse; } });
297
+ Object.defineProperty(exports, "ListArchiveItemsRequest", { enumerable: true, get: function () { return library_interface_1.ListArchiveItemsRequest; } });
298
+ Object.defineProperty(exports, "ArchiveItemsResponse", { enumerable: true, get: function () { return library_interface_1.ArchiveItemsResponse; } });
295
299
  Object.defineProperty(exports, "LibraryService", { enumerable: true, get: function () { return library_interface_1.LibraryServiceService; } });
296
300
  // ============================
297
301
  // Chat exports
@@ -309,3 +313,13 @@ Object.defineProperty(exports, "GetMessagesRequest", { enumerable: true, get: fu
309
313
  Object.defineProperty(exports, "ChatsResponse", { enumerable: true, get: function () { return chat_interface_1.ChatsResponse; } });
310
314
  Object.defineProperty(exports, "MessagesResponse", { enumerable: true, get: function () { return chat_interface_1.MessagesResponse; } });
311
315
  Object.defineProperty(exports, "ChatService", { enumerable: true, get: function () { return chat_interface_1.ChatServiceService; } });
316
+ // ============================
317
+ // Generation Runtime exports
318
+ // ============================
319
+ var generation_runtime_interface_1 = require("./generation_runtime.interface");
320
+ Object.defineProperty(exports, "GenerationRuntimeProtobufPackage", { enumerable: true, get: function () { return generation_runtime_interface_1.protobufPackage; } });
321
+ Object.defineProperty(exports, "StartChatRunRequest", { enumerable: true, get: function () { return generation_runtime_interface_1.StartChatRunRequest; } });
322
+ Object.defineProperty(exports, "StartChatRunResponse", { enumerable: true, get: function () { return generation_runtime_interface_1.StartChatRunResponse; } });
323
+ Object.defineProperty(exports, "SubmitToolResultRequest", { enumerable: true, get: function () { return generation_runtime_interface_1.SubmitToolResultRequest; } });
324
+ Object.defineProperty(exports, "CancelRunRequest", { enumerable: true, get: function () { return generation_runtime_interface_1.CancelRunRequest; } });
325
+ Object.defineProperty(exports, "GenerationRuntimeService", { enumerable: true, get: function () { return generation_runtime_interface_1.GenerationRuntimeServiceService; } });
@@ -75,6 +75,12 @@ export interface RemoveItemFromArchiveRequest {
75
75
  archiveId: string;
76
76
  itemId: string;
77
77
  }
78
+ export interface ListArchiveItemsRequest {
79
+ userId: string;
80
+ archiveId: string;
81
+ limit: number;
82
+ offset: number;
83
+ }
78
84
  export interface BookmarksResponse {
79
85
  bookmarks: Bookmark[];
80
86
  total: number;
@@ -83,6 +89,10 @@ export interface ArchivesResponse {
83
89
  archives: Archive[];
84
90
  total: number;
85
91
  }
92
+ export interface ArchiveItemsResponse {
93
+ items: ArchiveItem[];
94
+ total: number;
95
+ }
86
96
  export declare const LIBRARY_PACKAGE_NAME = "library";
87
97
  export declare const Bookmark: MessageFns<Bookmark>;
88
98
  export declare const Archive: MessageFns<Archive>;
@@ -96,8 +106,10 @@ export declare const DeleteArchiveRequest: MessageFns<DeleteArchiveRequest>;
96
106
  export declare const ListArchivesRequest: MessageFns<ListArchivesRequest>;
97
107
  export declare const AddItemToArchiveRequest: MessageFns<AddItemToArchiveRequest>;
98
108
  export declare const RemoveItemFromArchiveRequest: MessageFns<RemoveItemFromArchiveRequest>;
109
+ export declare const ListArchiveItemsRequest: MessageFns<ListArchiveItemsRequest>;
99
110
  export declare const BookmarksResponse: MessageFns<BookmarksResponse>;
100
111
  export declare const ArchivesResponse: MessageFns<ArchivesResponse>;
112
+ export declare const ArchiveItemsResponse: MessageFns<ArchiveItemsResponse>;
101
113
  export interface LibraryServiceClient {
102
114
  /** Bookmarks */
103
115
  createBookmark(request: CreateBookmarkRequest, metadata?: Metadata): Observable<Bookmark>;
@@ -111,6 +123,7 @@ export interface LibraryServiceClient {
111
123
  /** Archive Items */
112
124
  addItemToArchive(request: AddItemToArchiveRequest, metadata?: Metadata): Observable<ArchiveItem>;
113
125
  removeItemFromArchive(request: RemoveItemFromArchiveRequest, metadata?: Metadata): Observable<Empty>;
126
+ listArchiveItems(request: ListArchiveItemsRequest, metadata?: Metadata): Observable<ArchiveItemsResponse>;
114
127
  }
115
128
  export interface LibraryServiceController {
116
129
  /** Bookmarks */
@@ -125,6 +138,7 @@ export interface LibraryServiceController {
125
138
  /** Archive Items */
126
139
  addItemToArchive(request: AddItemToArchiveRequest, metadata?: Metadata): Promise<ArchiveItem> | Observable<ArchiveItem> | ArchiveItem;
127
140
  removeItemFromArchive(request: RemoveItemFromArchiveRequest, metadata?: Metadata): void;
141
+ listArchiveItems(request: ListArchiveItemsRequest, metadata?: Metadata): Promise<ArchiveItemsResponse> | Observable<ArchiveItemsResponse> | ArchiveItemsResponse;
128
142
  }
129
143
  export declare function LibraryServiceControllerMethods(): (constructor: Function) => void;
130
144
  export declare const LIBRARY_SERVICE_NAME = "LibraryService";
@@ -214,6 +228,15 @@ export declare const LibraryServiceService: {
214
228
  readonly responseSerialize: (value: Empty) => Buffer;
215
229
  readonly responseDeserialize: (value: Buffer) => Empty;
216
230
  };
231
+ readonly listArchiveItems: {
232
+ readonly path: "/library.LibraryService/listArchiveItems";
233
+ readonly requestStream: false;
234
+ readonly responseStream: false;
235
+ readonly requestSerialize: (value: ListArchiveItemsRequest) => Buffer;
236
+ readonly requestDeserialize: (value: Buffer) => ListArchiveItemsRequest;
237
+ readonly responseSerialize: (value: ArchiveItemsResponse) => Buffer;
238
+ readonly responseDeserialize: (value: Buffer) => ArchiveItemsResponse;
239
+ };
217
240
  };
218
241
  export interface LibraryServiceServer extends UntypedServiceImplementation {
219
242
  /** Bookmarks */
@@ -228,6 +251,7 @@ export interface LibraryServiceServer extends UntypedServiceImplementation {
228
251
  /** Archive Items */
229
252
  addItemToArchive: handleUnaryCall<AddItemToArchiveRequest, ArchiveItem>;
230
253
  removeItemFromArchive: handleUnaryCall<RemoveItemFromArchiveRequest, Empty>;
254
+ listArchiveItems: handleUnaryCall<ListArchiveItemsRequest, ArchiveItemsResponse>;
231
255
  }
232
256
  export interface MessageFns<T> {
233
257
  encode(message: T, writer?: BinaryWriter): BinaryWriter;
@@ -5,7 +5,7 @@
5
5
  // protoc v5.28.2
6
6
  // source: library.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.LibraryServiceService = exports.LIBRARY_SERVICE_NAME = exports.ArchivesResponse = exports.BookmarksResponse = exports.RemoveItemFromArchiveRequest = exports.AddItemToArchiveRequest = exports.ListArchivesRequest = exports.DeleteArchiveRequest = exports.UpdateArchiveRequest = exports.CreateArchiveRequest = exports.ListBookmarksRequest = exports.DeleteBookmarkRequest = exports.CreateBookmarkRequest = exports.ArchiveItem = exports.Archive = exports.Bookmark = exports.LIBRARY_PACKAGE_NAME = exports.protobufPackage = void 0;
8
+ exports.LibraryServiceService = exports.LIBRARY_SERVICE_NAME = exports.ArchiveItemsResponse = exports.ArchivesResponse = exports.BookmarksResponse = exports.ListArchiveItemsRequest = exports.RemoveItemFromArchiveRequest = exports.AddItemToArchiveRequest = exports.ListArchivesRequest = exports.DeleteArchiveRequest = exports.UpdateArchiveRequest = exports.CreateArchiveRequest = exports.ListBookmarksRequest = exports.DeleteBookmarkRequest = exports.CreateBookmarkRequest = exports.ArchiveItem = exports.Archive = exports.Bookmark = exports.LIBRARY_PACKAGE_NAME = exports.protobufPackage = void 0;
9
9
  exports.LibraryServiceControllerMethods = LibraryServiceControllerMethods;
10
10
  /* eslint-disable */
11
11
  const wire_1 = require("@bufbuild/protobuf/wire");
@@ -739,6 +739,69 @@ exports.RemoveItemFromArchiveRequest = {
739
739
  return message;
740
740
  },
741
741
  };
742
+ function createBaseListArchiveItemsRequest() {
743
+ return { userId: "", archiveId: "", limit: 0, offset: 0 };
744
+ }
745
+ exports.ListArchiveItemsRequest = {
746
+ encode(message, writer = new wire_1.BinaryWriter()) {
747
+ if (message.userId !== "") {
748
+ writer.uint32(10).string(message.userId);
749
+ }
750
+ if (message.archiveId !== "") {
751
+ writer.uint32(18).string(message.archiveId);
752
+ }
753
+ if (message.limit !== 0) {
754
+ writer.uint32(24).int32(message.limit);
755
+ }
756
+ if (message.offset !== 0) {
757
+ writer.uint32(32).int32(message.offset);
758
+ }
759
+ return writer;
760
+ },
761
+ decode(input, length) {
762
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
763
+ const end = length === undefined ? reader.len : reader.pos + length;
764
+ const message = createBaseListArchiveItemsRequest();
765
+ while (reader.pos < end) {
766
+ const tag = reader.uint32();
767
+ switch (tag >>> 3) {
768
+ case 1: {
769
+ if (tag !== 10) {
770
+ break;
771
+ }
772
+ message.userId = reader.string();
773
+ continue;
774
+ }
775
+ case 2: {
776
+ if (tag !== 18) {
777
+ break;
778
+ }
779
+ message.archiveId = reader.string();
780
+ continue;
781
+ }
782
+ case 3: {
783
+ if (tag !== 24) {
784
+ break;
785
+ }
786
+ message.limit = reader.int32();
787
+ continue;
788
+ }
789
+ case 4: {
790
+ if (tag !== 32) {
791
+ break;
792
+ }
793
+ message.offset = reader.int32();
794
+ continue;
795
+ }
796
+ }
797
+ if ((tag & 7) === 4 || tag === 0) {
798
+ break;
799
+ }
800
+ reader.skip(tag & 7);
801
+ }
802
+ return message;
803
+ },
804
+ };
742
805
  function createBaseBookmarksResponse() {
743
806
  return { bookmarks: [], total: 0 };
744
807
  }
@@ -825,6 +888,49 @@ exports.ArchivesResponse = {
825
888
  return message;
826
889
  },
827
890
  };
891
+ function createBaseArchiveItemsResponse() {
892
+ return { items: [], total: 0 };
893
+ }
894
+ exports.ArchiveItemsResponse = {
895
+ encode(message, writer = new wire_1.BinaryWriter()) {
896
+ for (const v of message.items) {
897
+ exports.ArchiveItem.encode(v, writer.uint32(10).fork()).join();
898
+ }
899
+ if (message.total !== 0) {
900
+ writer.uint32(16).int32(message.total);
901
+ }
902
+ return writer;
903
+ },
904
+ decode(input, length) {
905
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
906
+ const end = length === undefined ? reader.len : reader.pos + length;
907
+ const message = createBaseArchiveItemsResponse();
908
+ while (reader.pos < end) {
909
+ const tag = reader.uint32();
910
+ switch (tag >>> 3) {
911
+ case 1: {
912
+ if (tag !== 10) {
913
+ break;
914
+ }
915
+ message.items.push(exports.ArchiveItem.decode(reader, reader.uint32()));
916
+ continue;
917
+ }
918
+ case 2: {
919
+ if (tag !== 16) {
920
+ break;
921
+ }
922
+ message.total = reader.int32();
923
+ continue;
924
+ }
925
+ }
926
+ if ((tag & 7) === 4 || tag === 0) {
927
+ break;
928
+ }
929
+ reader.skip(tag & 7);
930
+ }
931
+ return message;
932
+ },
933
+ };
828
934
  function LibraryServiceControllerMethods() {
829
935
  return function (constructor) {
830
936
  const grpcMethods = [
@@ -837,6 +943,7 @@ function LibraryServiceControllerMethods() {
837
943
  "listArchives",
838
944
  "addItemToArchive",
839
945
  "removeItemFromArchive",
946
+ "listArchiveItems",
840
947
  ];
841
948
  for (const method of grpcMethods) {
842
949
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
@@ -935,4 +1042,13 @@ exports.LibraryServiceService = {
935
1042
  responseSerialize: (value) => Buffer.from(empty_interface_1.Empty.encode(value).finish()),
936
1043
  responseDeserialize: (value) => empty_interface_1.Empty.decode(value),
937
1044
  },
1045
+ listArchiveItems: {
1046
+ path: "/library.LibraryService/listArchiveItems",
1047
+ requestStream: false,
1048
+ responseStream: false,
1049
+ requestSerialize: (value) => Buffer.from(exports.ListArchiveItemsRequest.encode(value).finish()),
1050
+ requestDeserialize: (value) => exports.ListArchiveItemsRequest.decode(value),
1051
+ responseSerialize: (value) => Buffer.from(exports.ArchiveItemsResponse.encode(value).finish()),
1052
+ responseDeserialize: (value) => exports.ArchiveItemsResponse.decode(value),
1053
+ },
938
1054
  };
@@ -64,6 +64,10 @@ export interface SharedModuleOptions {
64
64
  protoPath: string;
65
65
  url: string;
66
66
  };
67
+ generationRuntime?: {
68
+ protoPath: string;
69
+ url: string;
70
+ };
67
71
  }
68
72
  export declare class SharedModule {
69
73
  private static readonly logger;
@@ -26,6 +26,7 @@ const mcp_client_1 = require("./mcp.client");
26
26
  const library_client_1 = require("./library.client");
27
27
  const workflow_client_1 = require("./workflow.client");
28
28
  const chat_client_1 = require("./chat.client");
29
+ const generation_runtime_client_1 = require("./generation_runtime.client");
29
30
  let SharedModule = SharedModule_1 = class SharedModule {
30
31
  static forRoot(options = {}) {
31
32
  const clients = [];
@@ -480,6 +481,36 @@ let SharedModule = SharedModule_1 = class SharedModule {
480
481
  else {
481
482
  providers.push({ provide: chat_client_1.ChatClient, useValue: null });
482
483
  }
484
+ // GENERATION_RUNTIME
485
+ if (options.generationRuntime) {
486
+ clients.push({
487
+ name: "GENERATION_RUNTIME_PACKAGE",
488
+ transport: microservices_1.Transport.GRPC,
489
+ options: {
490
+ package: "chat",
491
+ protoPath: (0, path_1.resolve)(process.cwd(), options.generationRuntime.protoPath),
492
+ url: options.generationRuntime.url,
493
+ },
494
+ });
495
+ providers.push({
496
+ provide: generation_runtime_client_1.GenerationRuntimeClient,
497
+ useFactory: (client) => {
498
+ const svc = new generation_runtime_client_1.GenerationRuntimeClient(client);
499
+ try {
500
+ svc.onModuleInit();
501
+ SharedModule_1.logger.log("GenerationRuntimeClient initialized successfully");
502
+ }
503
+ catch (err) {
504
+ SharedModule_1.logger.error("GenerationRuntimeClient initialization failed", err);
505
+ }
506
+ return svc;
507
+ },
508
+ inject: ["GENERATION_RUNTIME_PACKAGE"],
509
+ });
510
+ }
511
+ else {
512
+ providers.push({ provide: generation_runtime_client_1.GenerationRuntimeClient, useValue: null });
513
+ }
483
514
  return {
484
515
  module: SharedModule_1,
485
516
  imports: clients.length ? [microservices_1.ClientsModule.register(clients)] : [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geniebox-shared-lib",
3
- "version": "2.4.6",
3
+ "version": "2.5.0",
4
4
  "description": "Shared NestJS library with gRPC clients",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",