geniebox-shared-lib 2.4.4 → 2.4.7

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/index.d.ts CHANGED
@@ -27,5 +27,5 @@ export { MessageFns as BillingMessageFns, protobufPackage as BillingProtobufPack
27
27
  export { MessageFns as AgentMessageFns, protobufPackage as AgentProtobufPackage, Agent, CreateAgentRequest, UpdateAgentRequest, GetAgentRequest, ListAgentsRequest, DeleteAgentRequest, AgentsResponse, AgentServiceClient, AgentServiceController, AgentServiceService as AgentService, } from "./agent.interface";
28
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";
29
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";
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";
30
+ 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
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";
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ exports.EndpointProtobufPackage = exports.VerifyResetCodeRequest = exports.Resen
4
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
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
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;
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.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 = 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");
@@ -292,6 +292,8 @@ Object.defineProperty(exports, "AddItemToArchiveRequest", { enumerable: true, ge
292
292
  Object.defineProperty(exports, "RemoveItemFromArchiveRequest", { enumerable: true, get: function () { return library_interface_1.RemoveItemFromArchiveRequest; } });
293
293
  Object.defineProperty(exports, "BookmarksResponse", { enumerable: true, get: function () { return library_interface_1.BookmarksResponse; } });
294
294
  Object.defineProperty(exports, "ArchivesResponse", { enumerable: true, get: function () { return library_interface_1.ArchivesResponse; } });
295
+ Object.defineProperty(exports, "ListArchiveItemsRequest", { enumerable: true, get: function () { return library_interface_1.ListArchiveItemsRequest; } });
296
+ Object.defineProperty(exports, "ArchiveItemsResponse", { enumerable: true, get: function () { return library_interface_1.ArchiveItemsResponse; } });
295
297
  Object.defineProperty(exports, "LibraryService", { enumerable: true, get: function () { return library_interface_1.LibraryServiceService; } });
296
298
  // ============================
297
299
  // Chat exports
@@ -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
  };
@@ -21,12 +21,12 @@ let MCPClient = MCPClient_1 = class MCPClient {
21
21
  this.logger = new common_1.Logger(MCPClient_1.name);
22
22
  }
23
23
  onModuleInit() {
24
- this.mcpClient = this.client.getService("MCPService");
25
- this.logger.log("MCPService initialized");
24
+ this.mcpClient = this.client.getService("McpService");
25
+ this.logger.log("McpService initialized");
26
26
  }
27
27
  get service() {
28
28
  if (!this.mcpClient) {
29
- throw new common_1.InternalServerErrorException("MCPService is not initialized yet");
29
+ throw new common_1.InternalServerErrorException("McpService is not initialized yet");
30
30
  }
31
31
  return this.mcpClient;
32
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geniebox-shared-lib",
3
- "version": "2.4.4",
3
+ "version": "2.4.7",
4
4
  "description": "Shared NestJS library with gRPC clients",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",