geniebox-shared-lib 2.4.2 → 2.4.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/agent.interface.d.ts +7 -0
- package/dist/agent.interface.js +40 -0
- package/dist/chat.client.d.ts +12 -0
- package/dist/chat.client.js +43 -0
- package/dist/chat.interface.d.ts +173 -0
- package/dist/chat.interface.js +669 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +21 -44
- package/dist/library.interface.d.ts +2 -0
- package/dist/library.interface.js +10 -0
- package/dist/shared.module.d.ts +4 -0
- package/dist/shared.module.js +13 -13
- package/dist/workflow.interface.d.ts +22 -0
- package/dist/workflow.interface.js +65 -1
- package/package.json +1 -1
|
@@ -0,0 +1,669 @@
|
|
|
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: chat.proto
|
|
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;
|
|
9
|
+
exports.ChatServiceControllerMethods = ChatServiceControllerMethods;
|
|
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 = "chat";
|
|
17
|
+
exports.CHAT_PACKAGE_NAME = "chat";
|
|
18
|
+
function createBaseChat() {
|
|
19
|
+
return { id: "", title: "", userId: "", createdAt: "", updatedAt: "" };
|
|
20
|
+
}
|
|
21
|
+
exports.Chat = {
|
|
22
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
23
|
+
if (message.id !== "") {
|
|
24
|
+
writer.uint32(10).string(message.id);
|
|
25
|
+
}
|
|
26
|
+
if (message.title !== "") {
|
|
27
|
+
writer.uint32(18).string(message.title);
|
|
28
|
+
}
|
|
29
|
+
if (message.userId !== "") {
|
|
30
|
+
writer.uint32(26).string(message.userId);
|
|
31
|
+
}
|
|
32
|
+
if (message.metadata !== undefined) {
|
|
33
|
+
struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.metadata), writer.uint32(34).fork()).join();
|
|
34
|
+
}
|
|
35
|
+
if (message.createdAt !== "") {
|
|
36
|
+
writer.uint32(42).string(message.createdAt);
|
|
37
|
+
}
|
|
38
|
+
if (message.updatedAt !== "") {
|
|
39
|
+
writer.uint32(50).string(message.updatedAt);
|
|
40
|
+
}
|
|
41
|
+
return writer;
|
|
42
|
+
},
|
|
43
|
+
decode(input, length) {
|
|
44
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
45
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
46
|
+
const message = createBaseChat();
|
|
47
|
+
while (reader.pos < end) {
|
|
48
|
+
const tag = reader.uint32();
|
|
49
|
+
switch (tag >>> 3) {
|
|
50
|
+
case 1: {
|
|
51
|
+
if (tag !== 10) {
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
message.id = reader.string();
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
case 2: {
|
|
58
|
+
if (tag !== 18) {
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
message.title = reader.string();
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
case 3: {
|
|
65
|
+
if (tag !== 26) {
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
message.userId = reader.string();
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
case 4: {
|
|
72
|
+
if (tag !== 34) {
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
message.metadata = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
case 5: {
|
|
79
|
+
if (tag !== 42) {
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
message.createdAt = reader.string();
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
case 6: {
|
|
86
|
+
if (tag !== 50) {
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
message.updatedAt = reader.string();
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
reader.skip(tag & 7);
|
|
97
|
+
}
|
|
98
|
+
return message;
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
function createBaseChatMessage() {
|
|
102
|
+
return { id: "", chatId: "", role: "", content: "", createdAt: "" };
|
|
103
|
+
}
|
|
104
|
+
exports.ChatMessage = {
|
|
105
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
106
|
+
if (message.id !== "") {
|
|
107
|
+
writer.uint32(10).string(message.id);
|
|
108
|
+
}
|
|
109
|
+
if (message.chatId !== "") {
|
|
110
|
+
writer.uint32(18).string(message.chatId);
|
|
111
|
+
}
|
|
112
|
+
if (message.role !== "") {
|
|
113
|
+
writer.uint32(26).string(message.role);
|
|
114
|
+
}
|
|
115
|
+
if (message.content !== "") {
|
|
116
|
+
writer.uint32(34).string(message.content);
|
|
117
|
+
}
|
|
118
|
+
if (message.metadata !== undefined) {
|
|
119
|
+
struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.metadata), writer.uint32(42).fork()).join();
|
|
120
|
+
}
|
|
121
|
+
if (message.createdAt !== "") {
|
|
122
|
+
writer.uint32(50).string(message.createdAt);
|
|
123
|
+
}
|
|
124
|
+
return writer;
|
|
125
|
+
},
|
|
126
|
+
decode(input, length) {
|
|
127
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
128
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
129
|
+
const message = createBaseChatMessage();
|
|
130
|
+
while (reader.pos < end) {
|
|
131
|
+
const tag = reader.uint32();
|
|
132
|
+
switch (tag >>> 3) {
|
|
133
|
+
case 1: {
|
|
134
|
+
if (tag !== 10) {
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
message.id = reader.string();
|
|
138
|
+
continue;
|
|
139
|
+
}
|
|
140
|
+
case 2: {
|
|
141
|
+
if (tag !== 18) {
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
message.chatId = reader.string();
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
case 3: {
|
|
148
|
+
if (tag !== 26) {
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
message.role = reader.string();
|
|
152
|
+
continue;
|
|
153
|
+
}
|
|
154
|
+
case 4: {
|
|
155
|
+
if (tag !== 34) {
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
message.content = reader.string();
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
case 5: {
|
|
162
|
+
if (tag !== 42) {
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
message.metadata = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
case 6: {
|
|
169
|
+
if (tag !== 50) {
|
|
170
|
+
break;
|
|
171
|
+
}
|
|
172
|
+
message.createdAt = reader.string();
|
|
173
|
+
continue;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
reader.skip(tag & 7);
|
|
180
|
+
}
|
|
181
|
+
return message;
|
|
182
|
+
},
|
|
183
|
+
};
|
|
184
|
+
function createBaseCreateChatRequest() {
|
|
185
|
+
return { userId: "", title: "" };
|
|
186
|
+
}
|
|
187
|
+
exports.CreateChatRequest = {
|
|
188
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
189
|
+
if (message.userId !== "") {
|
|
190
|
+
writer.uint32(10).string(message.userId);
|
|
191
|
+
}
|
|
192
|
+
if (message.title !== "") {
|
|
193
|
+
writer.uint32(18).string(message.title);
|
|
194
|
+
}
|
|
195
|
+
if (message.metadata !== undefined) {
|
|
196
|
+
struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.metadata), writer.uint32(26).fork()).join();
|
|
197
|
+
}
|
|
198
|
+
return writer;
|
|
199
|
+
},
|
|
200
|
+
decode(input, length) {
|
|
201
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
202
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
203
|
+
const message = createBaseCreateChatRequest();
|
|
204
|
+
while (reader.pos < end) {
|
|
205
|
+
const tag = reader.uint32();
|
|
206
|
+
switch (tag >>> 3) {
|
|
207
|
+
case 1: {
|
|
208
|
+
if (tag !== 10) {
|
|
209
|
+
break;
|
|
210
|
+
}
|
|
211
|
+
message.userId = reader.string();
|
|
212
|
+
continue;
|
|
213
|
+
}
|
|
214
|
+
case 2: {
|
|
215
|
+
if (tag !== 18) {
|
|
216
|
+
break;
|
|
217
|
+
}
|
|
218
|
+
message.title = reader.string();
|
|
219
|
+
continue;
|
|
220
|
+
}
|
|
221
|
+
case 3: {
|
|
222
|
+
if (tag !== 26) {
|
|
223
|
+
break;
|
|
224
|
+
}
|
|
225
|
+
message.metadata = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
|
|
226
|
+
continue;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
230
|
+
break;
|
|
231
|
+
}
|
|
232
|
+
reader.skip(tag & 7);
|
|
233
|
+
}
|
|
234
|
+
return message;
|
|
235
|
+
},
|
|
236
|
+
};
|
|
237
|
+
function createBaseGetChatRequest() {
|
|
238
|
+
return { id: "", userId: "" };
|
|
239
|
+
}
|
|
240
|
+
exports.GetChatRequest = {
|
|
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
|
+
return writer;
|
|
249
|
+
},
|
|
250
|
+
decode(input, length) {
|
|
251
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
252
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
253
|
+
const message = createBaseGetChatRequest();
|
|
254
|
+
while (reader.pos < end) {
|
|
255
|
+
const tag = reader.uint32();
|
|
256
|
+
switch (tag >>> 3) {
|
|
257
|
+
case 1: {
|
|
258
|
+
if (tag !== 10) {
|
|
259
|
+
break;
|
|
260
|
+
}
|
|
261
|
+
message.id = reader.string();
|
|
262
|
+
continue;
|
|
263
|
+
}
|
|
264
|
+
case 2: {
|
|
265
|
+
if (tag !== 18) {
|
|
266
|
+
break;
|
|
267
|
+
}
|
|
268
|
+
message.userId = reader.string();
|
|
269
|
+
continue;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
273
|
+
break;
|
|
274
|
+
}
|
|
275
|
+
reader.skip(tag & 7);
|
|
276
|
+
}
|
|
277
|
+
return message;
|
|
278
|
+
},
|
|
279
|
+
};
|
|
280
|
+
function createBaseListChatsRequest() {
|
|
281
|
+
return { userId: "", limit: 0, offset: 0 };
|
|
282
|
+
}
|
|
283
|
+
exports.ListChatsRequest = {
|
|
284
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
285
|
+
if (message.userId !== "") {
|
|
286
|
+
writer.uint32(10).string(message.userId);
|
|
287
|
+
}
|
|
288
|
+
if (message.limit !== 0) {
|
|
289
|
+
writer.uint32(16).int32(message.limit);
|
|
290
|
+
}
|
|
291
|
+
if (message.offset !== 0) {
|
|
292
|
+
writer.uint32(24).int32(message.offset);
|
|
293
|
+
}
|
|
294
|
+
return writer;
|
|
295
|
+
},
|
|
296
|
+
decode(input, length) {
|
|
297
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
298
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
299
|
+
const message = createBaseListChatsRequest();
|
|
300
|
+
while (reader.pos < end) {
|
|
301
|
+
const tag = reader.uint32();
|
|
302
|
+
switch (tag >>> 3) {
|
|
303
|
+
case 1: {
|
|
304
|
+
if (tag !== 10) {
|
|
305
|
+
break;
|
|
306
|
+
}
|
|
307
|
+
message.userId = reader.string();
|
|
308
|
+
continue;
|
|
309
|
+
}
|
|
310
|
+
case 2: {
|
|
311
|
+
if (tag !== 16) {
|
|
312
|
+
break;
|
|
313
|
+
}
|
|
314
|
+
message.limit = reader.int32();
|
|
315
|
+
continue;
|
|
316
|
+
}
|
|
317
|
+
case 3: {
|
|
318
|
+
if (tag !== 24) {
|
|
319
|
+
break;
|
|
320
|
+
}
|
|
321
|
+
message.offset = reader.int32();
|
|
322
|
+
continue;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
326
|
+
break;
|
|
327
|
+
}
|
|
328
|
+
reader.skip(tag & 7);
|
|
329
|
+
}
|
|
330
|
+
return message;
|
|
331
|
+
},
|
|
332
|
+
};
|
|
333
|
+
function createBaseDeleteChatRequest() {
|
|
334
|
+
return { id: "", userId: "" };
|
|
335
|
+
}
|
|
336
|
+
exports.DeleteChatRequest = {
|
|
337
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
338
|
+
if (message.id !== "") {
|
|
339
|
+
writer.uint32(10).string(message.id);
|
|
340
|
+
}
|
|
341
|
+
if (message.userId !== "") {
|
|
342
|
+
writer.uint32(18).string(message.userId);
|
|
343
|
+
}
|
|
344
|
+
return writer;
|
|
345
|
+
},
|
|
346
|
+
decode(input, length) {
|
|
347
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
348
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
349
|
+
const message = createBaseDeleteChatRequest();
|
|
350
|
+
while (reader.pos < end) {
|
|
351
|
+
const tag = reader.uint32();
|
|
352
|
+
switch (tag >>> 3) {
|
|
353
|
+
case 1: {
|
|
354
|
+
if (tag !== 10) {
|
|
355
|
+
break;
|
|
356
|
+
}
|
|
357
|
+
message.id = reader.string();
|
|
358
|
+
continue;
|
|
359
|
+
}
|
|
360
|
+
case 2: {
|
|
361
|
+
if (tag !== 18) {
|
|
362
|
+
break;
|
|
363
|
+
}
|
|
364
|
+
message.userId = reader.string();
|
|
365
|
+
continue;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
369
|
+
break;
|
|
370
|
+
}
|
|
371
|
+
reader.skip(tag & 7);
|
|
372
|
+
}
|
|
373
|
+
return message;
|
|
374
|
+
},
|
|
375
|
+
};
|
|
376
|
+
function createBaseAddMessageRequest() {
|
|
377
|
+
return { chatId: "", userId: "", role: "", content: "" };
|
|
378
|
+
}
|
|
379
|
+
exports.AddMessageRequest = {
|
|
380
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
381
|
+
if (message.chatId !== "") {
|
|
382
|
+
writer.uint32(10).string(message.chatId);
|
|
383
|
+
}
|
|
384
|
+
if (message.userId !== "") {
|
|
385
|
+
writer.uint32(18).string(message.userId);
|
|
386
|
+
}
|
|
387
|
+
if (message.role !== "") {
|
|
388
|
+
writer.uint32(26).string(message.role);
|
|
389
|
+
}
|
|
390
|
+
if (message.content !== "") {
|
|
391
|
+
writer.uint32(34).string(message.content);
|
|
392
|
+
}
|
|
393
|
+
if (message.metadata !== undefined) {
|
|
394
|
+
struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.metadata), writer.uint32(42).fork()).join();
|
|
395
|
+
}
|
|
396
|
+
return writer;
|
|
397
|
+
},
|
|
398
|
+
decode(input, length) {
|
|
399
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
400
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
401
|
+
const message = createBaseAddMessageRequest();
|
|
402
|
+
while (reader.pos < end) {
|
|
403
|
+
const tag = reader.uint32();
|
|
404
|
+
switch (tag >>> 3) {
|
|
405
|
+
case 1: {
|
|
406
|
+
if (tag !== 10) {
|
|
407
|
+
break;
|
|
408
|
+
}
|
|
409
|
+
message.chatId = reader.string();
|
|
410
|
+
continue;
|
|
411
|
+
}
|
|
412
|
+
case 2: {
|
|
413
|
+
if (tag !== 18) {
|
|
414
|
+
break;
|
|
415
|
+
}
|
|
416
|
+
message.userId = reader.string();
|
|
417
|
+
continue;
|
|
418
|
+
}
|
|
419
|
+
case 3: {
|
|
420
|
+
if (tag !== 26) {
|
|
421
|
+
break;
|
|
422
|
+
}
|
|
423
|
+
message.role = reader.string();
|
|
424
|
+
continue;
|
|
425
|
+
}
|
|
426
|
+
case 4: {
|
|
427
|
+
if (tag !== 34) {
|
|
428
|
+
break;
|
|
429
|
+
}
|
|
430
|
+
message.content = reader.string();
|
|
431
|
+
continue;
|
|
432
|
+
}
|
|
433
|
+
case 5: {
|
|
434
|
+
if (tag !== 42) {
|
|
435
|
+
break;
|
|
436
|
+
}
|
|
437
|
+
message.metadata = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
|
|
438
|
+
continue;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
442
|
+
break;
|
|
443
|
+
}
|
|
444
|
+
reader.skip(tag & 7);
|
|
445
|
+
}
|
|
446
|
+
return message;
|
|
447
|
+
},
|
|
448
|
+
};
|
|
449
|
+
function createBaseGetMessagesRequest() {
|
|
450
|
+
return { chatId: "", userId: "", limit: 0, offset: 0 };
|
|
451
|
+
}
|
|
452
|
+
exports.GetMessagesRequest = {
|
|
453
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
454
|
+
if (message.chatId !== "") {
|
|
455
|
+
writer.uint32(10).string(message.chatId);
|
|
456
|
+
}
|
|
457
|
+
if (message.userId !== "") {
|
|
458
|
+
writer.uint32(18).string(message.userId);
|
|
459
|
+
}
|
|
460
|
+
if (message.limit !== 0) {
|
|
461
|
+
writer.uint32(24).int32(message.limit);
|
|
462
|
+
}
|
|
463
|
+
if (message.offset !== 0) {
|
|
464
|
+
writer.uint32(32).int32(message.offset);
|
|
465
|
+
}
|
|
466
|
+
return writer;
|
|
467
|
+
},
|
|
468
|
+
decode(input, length) {
|
|
469
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
470
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
471
|
+
const message = createBaseGetMessagesRequest();
|
|
472
|
+
while (reader.pos < end) {
|
|
473
|
+
const tag = reader.uint32();
|
|
474
|
+
switch (tag >>> 3) {
|
|
475
|
+
case 1: {
|
|
476
|
+
if (tag !== 10) {
|
|
477
|
+
break;
|
|
478
|
+
}
|
|
479
|
+
message.chatId = reader.string();
|
|
480
|
+
continue;
|
|
481
|
+
}
|
|
482
|
+
case 2: {
|
|
483
|
+
if (tag !== 18) {
|
|
484
|
+
break;
|
|
485
|
+
}
|
|
486
|
+
message.userId = reader.string();
|
|
487
|
+
continue;
|
|
488
|
+
}
|
|
489
|
+
case 3: {
|
|
490
|
+
if (tag !== 24) {
|
|
491
|
+
break;
|
|
492
|
+
}
|
|
493
|
+
message.limit = reader.int32();
|
|
494
|
+
continue;
|
|
495
|
+
}
|
|
496
|
+
case 4: {
|
|
497
|
+
if (tag !== 32) {
|
|
498
|
+
break;
|
|
499
|
+
}
|
|
500
|
+
message.offset = reader.int32();
|
|
501
|
+
continue;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
505
|
+
break;
|
|
506
|
+
}
|
|
507
|
+
reader.skip(tag & 7);
|
|
508
|
+
}
|
|
509
|
+
return message;
|
|
510
|
+
},
|
|
511
|
+
};
|
|
512
|
+
function createBaseChatsResponse() {
|
|
513
|
+
return { chats: [], total: 0 };
|
|
514
|
+
}
|
|
515
|
+
exports.ChatsResponse = {
|
|
516
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
517
|
+
for (const v of message.chats) {
|
|
518
|
+
exports.Chat.encode(v, writer.uint32(10).fork()).join();
|
|
519
|
+
}
|
|
520
|
+
if (message.total !== 0) {
|
|
521
|
+
writer.uint32(16).int32(message.total);
|
|
522
|
+
}
|
|
523
|
+
return writer;
|
|
524
|
+
},
|
|
525
|
+
decode(input, length) {
|
|
526
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
527
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
528
|
+
const message = createBaseChatsResponse();
|
|
529
|
+
while (reader.pos < end) {
|
|
530
|
+
const tag = reader.uint32();
|
|
531
|
+
switch (tag >>> 3) {
|
|
532
|
+
case 1: {
|
|
533
|
+
if (tag !== 10) {
|
|
534
|
+
break;
|
|
535
|
+
}
|
|
536
|
+
message.chats.push(exports.Chat.decode(reader, reader.uint32()));
|
|
537
|
+
continue;
|
|
538
|
+
}
|
|
539
|
+
case 2: {
|
|
540
|
+
if (tag !== 16) {
|
|
541
|
+
break;
|
|
542
|
+
}
|
|
543
|
+
message.total = reader.int32();
|
|
544
|
+
continue;
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
548
|
+
break;
|
|
549
|
+
}
|
|
550
|
+
reader.skip(tag & 7);
|
|
551
|
+
}
|
|
552
|
+
return message;
|
|
553
|
+
},
|
|
554
|
+
};
|
|
555
|
+
function createBaseMessagesResponse() {
|
|
556
|
+
return { messages: [], total: 0 };
|
|
557
|
+
}
|
|
558
|
+
exports.MessagesResponse = {
|
|
559
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
560
|
+
for (const v of message.messages) {
|
|
561
|
+
exports.ChatMessage.encode(v, writer.uint32(10).fork()).join();
|
|
562
|
+
}
|
|
563
|
+
if (message.total !== 0) {
|
|
564
|
+
writer.uint32(16).int32(message.total);
|
|
565
|
+
}
|
|
566
|
+
return writer;
|
|
567
|
+
},
|
|
568
|
+
decode(input, length) {
|
|
569
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
570
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
571
|
+
const message = createBaseMessagesResponse();
|
|
572
|
+
while (reader.pos < end) {
|
|
573
|
+
const tag = reader.uint32();
|
|
574
|
+
switch (tag >>> 3) {
|
|
575
|
+
case 1: {
|
|
576
|
+
if (tag !== 10) {
|
|
577
|
+
break;
|
|
578
|
+
}
|
|
579
|
+
message.messages.push(exports.ChatMessage.decode(reader, reader.uint32()));
|
|
580
|
+
continue;
|
|
581
|
+
}
|
|
582
|
+
case 2: {
|
|
583
|
+
if (tag !== 16) {
|
|
584
|
+
break;
|
|
585
|
+
}
|
|
586
|
+
message.total = reader.int32();
|
|
587
|
+
continue;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
591
|
+
break;
|
|
592
|
+
}
|
|
593
|
+
reader.skip(tag & 7);
|
|
594
|
+
}
|
|
595
|
+
return message;
|
|
596
|
+
},
|
|
597
|
+
};
|
|
598
|
+
protobufjs_1.wrappers[".google.protobuf.Struct"] = { fromObject: struct_interface_1.Struct.wrap, toObject: struct_interface_1.Struct.unwrap };
|
|
599
|
+
function ChatServiceControllerMethods() {
|
|
600
|
+
return function (constructor) {
|
|
601
|
+
const grpcMethods = ["createChat", "getChat", "listChats", "deleteChat", "addMessage", "getMessages"];
|
|
602
|
+
for (const method of grpcMethods) {
|
|
603
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
604
|
+
(0, microservices_1.GrpcMethod)("ChatService", method)(constructor.prototype[method], method, descriptor);
|
|
605
|
+
}
|
|
606
|
+
const grpcStreamMethods = [];
|
|
607
|
+
for (const method of grpcStreamMethods) {
|
|
608
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
609
|
+
(0, microservices_1.GrpcStreamMethod)("ChatService", method)(constructor.prototype[method], method, descriptor);
|
|
610
|
+
}
|
|
611
|
+
};
|
|
612
|
+
}
|
|
613
|
+
exports.CHAT_SERVICE_NAME = "ChatService";
|
|
614
|
+
exports.ChatServiceService = {
|
|
615
|
+
createChat: {
|
|
616
|
+
path: "/chat.ChatService/createChat",
|
|
617
|
+
requestStream: false,
|
|
618
|
+
responseStream: false,
|
|
619
|
+
requestSerialize: (value) => Buffer.from(exports.CreateChatRequest.encode(value).finish()),
|
|
620
|
+
requestDeserialize: (value) => exports.CreateChatRequest.decode(value),
|
|
621
|
+
responseSerialize: (value) => Buffer.from(exports.Chat.encode(value).finish()),
|
|
622
|
+
responseDeserialize: (value) => exports.Chat.decode(value),
|
|
623
|
+
},
|
|
624
|
+
getChat: {
|
|
625
|
+
path: "/chat.ChatService/getChat",
|
|
626
|
+
requestStream: false,
|
|
627
|
+
responseStream: false,
|
|
628
|
+
requestSerialize: (value) => Buffer.from(exports.GetChatRequest.encode(value).finish()),
|
|
629
|
+
requestDeserialize: (value) => exports.GetChatRequest.decode(value),
|
|
630
|
+
responseSerialize: (value) => Buffer.from(exports.Chat.encode(value).finish()),
|
|
631
|
+
responseDeserialize: (value) => exports.Chat.decode(value),
|
|
632
|
+
},
|
|
633
|
+
listChats: {
|
|
634
|
+
path: "/chat.ChatService/listChats",
|
|
635
|
+
requestStream: false,
|
|
636
|
+
responseStream: false,
|
|
637
|
+
requestSerialize: (value) => Buffer.from(exports.ListChatsRequest.encode(value).finish()),
|
|
638
|
+
requestDeserialize: (value) => exports.ListChatsRequest.decode(value),
|
|
639
|
+
responseSerialize: (value) => Buffer.from(exports.ChatsResponse.encode(value).finish()),
|
|
640
|
+
responseDeserialize: (value) => exports.ChatsResponse.decode(value),
|
|
641
|
+
},
|
|
642
|
+
deleteChat: {
|
|
643
|
+
path: "/chat.ChatService/deleteChat",
|
|
644
|
+
requestStream: false,
|
|
645
|
+
responseStream: false,
|
|
646
|
+
requestSerialize: (value) => Buffer.from(exports.DeleteChatRequest.encode(value).finish()),
|
|
647
|
+
requestDeserialize: (value) => exports.DeleteChatRequest.decode(value),
|
|
648
|
+
responseSerialize: (value) => Buffer.from(empty_interface_1.Empty.encode(value).finish()),
|
|
649
|
+
responseDeserialize: (value) => empty_interface_1.Empty.decode(value),
|
|
650
|
+
},
|
|
651
|
+
addMessage: {
|
|
652
|
+
path: "/chat.ChatService/addMessage",
|
|
653
|
+
requestStream: false,
|
|
654
|
+
responseStream: false,
|
|
655
|
+
requestSerialize: (value) => Buffer.from(exports.AddMessageRequest.encode(value).finish()),
|
|
656
|
+
requestDeserialize: (value) => exports.AddMessageRequest.decode(value),
|
|
657
|
+
responseSerialize: (value) => Buffer.from(exports.ChatMessage.encode(value).finish()),
|
|
658
|
+
responseDeserialize: (value) => exports.ChatMessage.decode(value),
|
|
659
|
+
},
|
|
660
|
+
getMessages: {
|
|
661
|
+
path: "/chat.ChatService/getMessages",
|
|
662
|
+
requestStream: false,
|
|
663
|
+
responseStream: false,
|
|
664
|
+
requestSerialize: (value) => Buffer.from(exports.GetMessagesRequest.encode(value).finish()),
|
|
665
|
+
requestDeserialize: (value) => exports.GetMessagesRequest.decode(value),
|
|
666
|
+
responseSerialize: (value) => Buffer.from(exports.MessagesResponse.encode(value).finish()),
|
|
667
|
+
responseDeserialize: (value) => exports.MessagesResponse.decode(value),
|
|
668
|
+
},
|
|
669
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -9,11 +9,11 @@ export { KeyClient } from "./key.client";
|
|
|
9
9
|
export { RequestClient } from "./request.client";
|
|
10
10
|
export { ResponseClient } from "./response.client";
|
|
11
11
|
export { BillingClient } from "./billing.client";
|
|
12
|
-
export { GenerationClient } from "./generation.client";
|
|
13
12
|
export { AgentClient } from "./agent.client";
|
|
14
13
|
export { MCPClient } from "./mcp.client";
|
|
15
14
|
export { WorkflowClient } from "./workflow.client";
|
|
16
15
|
export { LibraryClient } from "./library.client";
|
|
16
|
+
export { ChatClient } from "./chat.client";
|
|
17
17
|
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
18
|
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
19
|
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";
|
|
@@ -24,8 +24,8 @@ export { MessageFns as KeysMessageFns, protobufPackage as KeysProtobufPackage, K
|
|
|
24
24
|
export { MessageFns as RequestMessageFns, protobufPackage as RequestProtobufPackage, CreateRequestRequest, CreateRequestResponse, GetRequestStatusRequest, RequestStatusResponse, GetRequestResultRequest, RequestResultResponse, CancelRequestRequest, CancelRequestResponse, StreamRequestRequest, RequestLog, StreamChunk, RequestServiceService as RequestService, } from "./request.interface";
|
|
25
25
|
export { MessageFns as ResponseMessageFns, protobufPackage as ResponseProtobufPackage, ProcessResponseRequest, ProcessResponseResponse, StreamUpdatesRequest, StreamUpdate, ResponseServiceService as ResponseService, } from "./response.interface";
|
|
26
26
|
export { MessageFns as BillingMessageFns, protobufPackage as BillingProtobufPackage, Balance, Transaction, Usage, UsageStats, Payment, GetBalanceRequest, GetBalanceResponse, ChargeRequest, ChargeResponse, DepositRequest, DepositResponse, CreateTransactionRequest, CreateTransactionResponse, GetTransactionsRequest, GetTransactionsResponse, GetTransactionRequest, GetTransactionResponse, RecordUsageRequest, RecordUsageResponse, GetUsageStatsRequest, GetUsageStatsResponse, GetUsageByKeyRequest, GetUsageByKeyResponse, GetUsageByUserRequest, GetUsageByUserResponse, CreatePaymentRequest, CreatePaymentResponse, GetPaymentRequest, GetPaymentResponse, GetPaymentsByUserRequest, GetPaymentsByUserResponse, ProcessWebhookRequest, ProcessWebhookResponse, BillingServiceService as BillingService, } from "./billing.interface";
|
|
27
|
-
export { MessageFns as GenerationMessageFns, protobufPackage as GenerationProtobufPackage, Conversation, Message, MessageVersion, ConversationSettings, ImageGeneration, VideoGeneration, GetConversationsRequest, ConversationsResponse, CreateConversationRequest, GetConversationRequest, ConversationResponse, UpdateConversationRequest, DeleteConversationRequest, GetMessagesRequest, MessagesResponse, CreateMessageRequest, MessageResponse, RegenerateMessageRequest, GetMessageVersionsRequest, SelectMessageVersionRequest, MessageVersionsResponse, GetSettingsRequest, UpdateSettingsRequest, SettingsResponse, GetImageGenerationsRequest, GenerateImageRequest, GetImageGenerationRequest, ImageGenerationsResponse, ImageGenerationResponse, GetVideoGenerationsRequest, GenerateVideoRequest, GetVideoGenerationRequest, VideoGenerationsResponse, VideoGenerationResponse, } from "./generation.interface";
|
|
28
27
|
export { MessageFns as AgentMessageFns, protobufPackage as AgentProtobufPackage, Agent, CreateAgentRequest, UpdateAgentRequest, GetAgentRequest, ListAgentsRequest, DeleteAgentRequest, AgentsResponse, AgentServiceClient, AgentServiceController, AgentServiceService as AgentService, } from "./agent.interface";
|
|
29
28
|
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";
|
|
30
29
|
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";
|
|
31
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 ChatMessageFns, protobufPackage as ChatProtobufPackage, Chat, ChatMessage, CreateChatRequest, GetChatRequest, ListChatsRequest, DeleteChatRequest, AddMessageRequest, GetMessagesRequest, ChatsResponse, MessagesResponse, ChatServiceClient, ChatServiceController, ChatServiceService as ChatService, } from "./chat.interface";
|