geniebox-shared-lib 2.5.2 → 2.5.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/dist/chat.interface.d.ts +22 -0
- package/dist/chat.interface.js +82 -2
- package/dist/generation.client.js +1 -2
- package/dist/generation.interface.d.ts +46 -447
- package/dist/generation.interface.js +69 -2081
- package/dist/index.d.ts +4 -4
- package/dist/index.js +18 -13
- package/dist/mcp.interface.d.ts +40 -0
- package/dist/mcp.interface.js +153 -1
- package/dist/shared.module.d.ts +0 -4
- package/dist/shared.module.js +12 -13
- package/package.json +2 -1
package/dist/chat.interface.d.ts
CHANGED
|
@@ -32,6 +32,15 @@ export interface CreateChatRequest {
|
|
|
32
32
|
[key: string]: any;
|
|
33
33
|
} | undefined;
|
|
34
34
|
}
|
|
35
|
+
export interface UpdateChatRequest {
|
|
36
|
+
id: string;
|
|
37
|
+
/** For authorization check */
|
|
38
|
+
userId: string;
|
|
39
|
+
title?: string | undefined;
|
|
40
|
+
metadata?: {
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
} | undefined;
|
|
43
|
+
}
|
|
35
44
|
export interface GetChatRequest {
|
|
36
45
|
id: string;
|
|
37
46
|
/** For authorization check */
|
|
@@ -77,6 +86,7 @@ export declare const CHAT_PACKAGE_NAME = "chat";
|
|
|
77
86
|
export declare const Chat: MessageFns<Chat>;
|
|
78
87
|
export declare const ChatMessage: MessageFns<ChatMessage>;
|
|
79
88
|
export declare const CreateChatRequest: MessageFns<CreateChatRequest>;
|
|
89
|
+
export declare const UpdateChatRequest: MessageFns<UpdateChatRequest>;
|
|
80
90
|
export declare const GetChatRequest: MessageFns<GetChatRequest>;
|
|
81
91
|
export declare const ListChatsRequest: MessageFns<ListChatsRequest>;
|
|
82
92
|
export declare const DeleteChatRequest: MessageFns<DeleteChatRequest>;
|
|
@@ -89,6 +99,7 @@ export interface ChatServiceClient {
|
|
|
89
99
|
getChat(request: GetChatRequest, metadata?: Metadata): Observable<Chat>;
|
|
90
100
|
listChats(request: ListChatsRequest, metadata?: Metadata): Observable<ChatsResponse>;
|
|
91
101
|
deleteChat(request: DeleteChatRequest, metadata?: Metadata): Observable<Empty>;
|
|
102
|
+
updateChat(request: UpdateChatRequest, metadata?: Metadata): Observable<Chat>;
|
|
92
103
|
addMessage(request: AddMessageRequest, metadata?: Metadata): Observable<ChatMessage>;
|
|
93
104
|
getMessages(request: GetMessagesRequest, metadata?: Metadata): Observable<MessagesResponse>;
|
|
94
105
|
}
|
|
@@ -97,6 +108,7 @@ export interface ChatServiceController {
|
|
|
97
108
|
getChat(request: GetChatRequest, metadata?: Metadata): Promise<Chat> | Observable<Chat> | Chat;
|
|
98
109
|
listChats(request: ListChatsRequest, metadata?: Metadata): Promise<ChatsResponse> | Observable<ChatsResponse> | ChatsResponse;
|
|
99
110
|
deleteChat(request: DeleteChatRequest, metadata?: Metadata): void;
|
|
111
|
+
updateChat(request: UpdateChatRequest, metadata?: Metadata): Promise<Chat> | Observable<Chat> | Chat;
|
|
100
112
|
addMessage(request: AddMessageRequest, metadata?: Metadata): Promise<ChatMessage> | Observable<ChatMessage> | ChatMessage;
|
|
101
113
|
getMessages(request: GetMessagesRequest, metadata?: Metadata): Promise<MessagesResponse> | Observable<MessagesResponse> | MessagesResponse;
|
|
102
114
|
}
|
|
@@ -140,6 +152,15 @@ export declare const ChatServiceService: {
|
|
|
140
152
|
readonly responseSerialize: (value: Empty) => Buffer;
|
|
141
153
|
readonly responseDeserialize: (value: Buffer) => Empty;
|
|
142
154
|
};
|
|
155
|
+
readonly updateChat: {
|
|
156
|
+
readonly path: "/chat.ChatService/updateChat";
|
|
157
|
+
readonly requestStream: false;
|
|
158
|
+
readonly responseStream: false;
|
|
159
|
+
readonly requestSerialize: (value: UpdateChatRequest) => Buffer;
|
|
160
|
+
readonly requestDeserialize: (value: Buffer) => UpdateChatRequest;
|
|
161
|
+
readonly responseSerialize: (value: Chat) => Buffer;
|
|
162
|
+
readonly responseDeserialize: (value: Buffer) => Chat;
|
|
163
|
+
};
|
|
143
164
|
readonly addMessage: {
|
|
144
165
|
readonly path: "/chat.ChatService/addMessage";
|
|
145
166
|
readonly requestStream: false;
|
|
@@ -164,6 +185,7 @@ export interface ChatServiceServer extends UntypedServiceImplementation {
|
|
|
164
185
|
getChat: handleUnaryCall<GetChatRequest, Chat>;
|
|
165
186
|
listChats: handleUnaryCall<ListChatsRequest, ChatsResponse>;
|
|
166
187
|
deleteChat: handleUnaryCall<DeleteChatRequest, Empty>;
|
|
188
|
+
updateChat: handleUnaryCall<UpdateChatRequest, Chat>;
|
|
167
189
|
addMessage: handleUnaryCall<AddMessageRequest, ChatMessage>;
|
|
168
190
|
getMessages: handleUnaryCall<GetMessagesRequest, MessagesResponse>;
|
|
169
191
|
}
|
package/dist/chat.interface.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// protoc v5.28.2
|
|
6
6
|
// source: chat.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.ChatServiceService = exports.CHAT_SERVICE_NAME = exports.MessagesResponse = exports.ChatsResponse = exports.GetMessagesRequest = exports.AddMessageRequest = exports.DeleteChatRequest = exports.ListChatsRequest = exports.GetChatRequest = exports.CreateChatRequest = exports.ChatMessage = exports.Chat = exports.CHAT_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
8
|
+
exports.ChatServiceService = exports.CHAT_SERVICE_NAME = exports.MessagesResponse = exports.ChatsResponse = exports.GetMessagesRequest = exports.AddMessageRequest = exports.DeleteChatRequest = exports.ListChatsRequest = exports.GetChatRequest = exports.UpdateChatRequest = exports.CreateChatRequest = exports.ChatMessage = exports.Chat = exports.CHAT_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
9
|
exports.ChatServiceControllerMethods = ChatServiceControllerMethods;
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
@@ -234,6 +234,69 @@ exports.CreateChatRequest = {
|
|
|
234
234
|
return message;
|
|
235
235
|
},
|
|
236
236
|
};
|
|
237
|
+
function createBaseUpdateChatRequest() {
|
|
238
|
+
return { id: "", userId: "" };
|
|
239
|
+
}
|
|
240
|
+
exports.UpdateChatRequest = {
|
|
241
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
242
|
+
if (message.id !== "") {
|
|
243
|
+
writer.uint32(10).string(message.id);
|
|
244
|
+
}
|
|
245
|
+
if (message.userId !== "") {
|
|
246
|
+
writer.uint32(18).string(message.userId);
|
|
247
|
+
}
|
|
248
|
+
if (message.title !== undefined) {
|
|
249
|
+
writer.uint32(26).string(message.title);
|
|
250
|
+
}
|
|
251
|
+
if (message.metadata !== undefined) {
|
|
252
|
+
struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.metadata), writer.uint32(34).fork()).join();
|
|
253
|
+
}
|
|
254
|
+
return writer;
|
|
255
|
+
},
|
|
256
|
+
decode(input, length) {
|
|
257
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
258
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
259
|
+
const message = createBaseUpdateChatRequest();
|
|
260
|
+
while (reader.pos < end) {
|
|
261
|
+
const tag = reader.uint32();
|
|
262
|
+
switch (tag >>> 3) {
|
|
263
|
+
case 1: {
|
|
264
|
+
if (tag !== 10) {
|
|
265
|
+
break;
|
|
266
|
+
}
|
|
267
|
+
message.id = reader.string();
|
|
268
|
+
continue;
|
|
269
|
+
}
|
|
270
|
+
case 2: {
|
|
271
|
+
if (tag !== 18) {
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
message.userId = reader.string();
|
|
275
|
+
continue;
|
|
276
|
+
}
|
|
277
|
+
case 3: {
|
|
278
|
+
if (tag !== 26) {
|
|
279
|
+
break;
|
|
280
|
+
}
|
|
281
|
+
message.title = reader.string();
|
|
282
|
+
continue;
|
|
283
|
+
}
|
|
284
|
+
case 4: {
|
|
285
|
+
if (tag !== 34) {
|
|
286
|
+
break;
|
|
287
|
+
}
|
|
288
|
+
message.metadata = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
|
|
289
|
+
continue;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
293
|
+
break;
|
|
294
|
+
}
|
|
295
|
+
reader.skip(tag & 7);
|
|
296
|
+
}
|
|
297
|
+
return message;
|
|
298
|
+
},
|
|
299
|
+
};
|
|
237
300
|
function createBaseGetChatRequest() {
|
|
238
301
|
return { id: "", userId: "" };
|
|
239
302
|
}
|
|
@@ -598,7 +661,15 @@ exports.MessagesResponse = {
|
|
|
598
661
|
protobufjs_1.wrappers[".google.protobuf.Struct"] = { fromObject: struct_interface_1.Struct.wrap, toObject: struct_interface_1.Struct.unwrap };
|
|
599
662
|
function ChatServiceControllerMethods() {
|
|
600
663
|
return function (constructor) {
|
|
601
|
-
const grpcMethods = [
|
|
664
|
+
const grpcMethods = [
|
|
665
|
+
"createChat",
|
|
666
|
+
"getChat",
|
|
667
|
+
"listChats",
|
|
668
|
+
"deleteChat",
|
|
669
|
+
"updateChat",
|
|
670
|
+
"addMessage",
|
|
671
|
+
"getMessages",
|
|
672
|
+
];
|
|
602
673
|
for (const method of grpcMethods) {
|
|
603
674
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
604
675
|
(0, microservices_1.GrpcMethod)("ChatService", method)(constructor.prototype[method], method, descriptor);
|
|
@@ -648,6 +719,15 @@ exports.ChatServiceService = {
|
|
|
648
719
|
responseSerialize: (value) => Buffer.from(empty_interface_1.Empty.encode(value).finish()),
|
|
649
720
|
responseDeserialize: (value) => empty_interface_1.Empty.decode(value),
|
|
650
721
|
},
|
|
722
|
+
updateChat: {
|
|
723
|
+
path: "/chat.ChatService/updateChat",
|
|
724
|
+
requestStream: false,
|
|
725
|
+
responseStream: false,
|
|
726
|
+
requestSerialize: (value) => Buffer.from(exports.UpdateChatRequest.encode(value).finish()),
|
|
727
|
+
requestDeserialize: (value) => exports.UpdateChatRequest.decode(value),
|
|
728
|
+
responseSerialize: (value) => Buffer.from(exports.Chat.encode(value).finish()),
|
|
729
|
+
responseDeserialize: (value) => exports.Chat.decode(value),
|
|
730
|
+
},
|
|
651
731
|
addMessage: {
|
|
652
732
|
path: "/chat.ChatService/addMessage",
|
|
653
733
|
requestStream: false,
|
|
@@ -21,8 +21,7 @@ let GenerationClient = GenerationClient_1 = class GenerationClient {
|
|
|
21
21
|
this.logger = new common_1.Logger(GenerationClient_1.name);
|
|
22
22
|
}
|
|
23
23
|
onModuleInit() {
|
|
24
|
-
this.generationClient =
|
|
25
|
-
this.client.getService("GenerationService");
|
|
24
|
+
this.generationClient = this.client.getService("GenerationService");
|
|
26
25
|
this.logger.log("GenerationServiceClient initialized");
|
|
27
26
|
}
|
|
28
27
|
get service() {
|