geniebox-shared-lib 2.5.10 → 2.5.13
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/generation.interface.d.ts +32 -0
- package/dist/generation.interface.js +170 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +17 -7
- package/dist/storage.interface.d.ts +90 -0
- package/dist/storage.interface.js +489 -9
- package/package.json +1 -1
|
@@ -74,6 +74,23 @@ export interface MCPToolSchemaResponse {
|
|
|
74
74
|
objectJson: string;
|
|
75
75
|
error: string;
|
|
76
76
|
}
|
|
77
|
+
/** Image Generation */
|
|
78
|
+
export interface GenerateImageRequest {
|
|
79
|
+
userId: string;
|
|
80
|
+
modelProvider: string;
|
|
81
|
+
modelName: string;
|
|
82
|
+
prompt: string;
|
|
83
|
+
/** Optional: context messages for edit/composite modes */
|
|
84
|
+
messagesJson: string;
|
|
85
|
+
}
|
|
86
|
+
export interface GeneratedImage {
|
|
87
|
+
url: string;
|
|
88
|
+
mimeType: string;
|
|
89
|
+
}
|
|
90
|
+
export interface GenerateImageResponse {
|
|
91
|
+
images: GeneratedImage[];
|
|
92
|
+
error: string;
|
|
93
|
+
}
|
|
77
94
|
export declare const GENERATION_PACKAGE_NAME = "generation";
|
|
78
95
|
export declare const StartChatRunRequest: MessageFns<StartChatRunRequest>;
|
|
79
96
|
export declare const StartChatRunResponse: MessageFns<StartChatRunResponse>;
|
|
@@ -85,6 +102,9 @@ export declare const AgentGenerateRequest: MessageFns<AgentGenerateRequest>;
|
|
|
85
102
|
export declare const AgentGenerateResponse: MessageFns<AgentGenerateResponse>;
|
|
86
103
|
export declare const MCPToolSchemaRequest: MessageFns<MCPToolSchemaRequest>;
|
|
87
104
|
export declare const MCPToolSchemaResponse: MessageFns<MCPToolSchemaResponse>;
|
|
105
|
+
export declare const GenerateImageRequest: MessageFns<GenerateImageRequest>;
|
|
106
|
+
export declare const GeneratedImage: MessageFns<GeneratedImage>;
|
|
107
|
+
export declare const GenerateImageResponse: MessageFns<GenerateImageResponse>;
|
|
88
108
|
export interface GenerationServiceClient {
|
|
89
109
|
startChatRun(request: StartChatRunRequest, metadata?: Metadata): Observable<StartChatRunResponse>;
|
|
90
110
|
submitToolResult(request: SubmitToolResultRequest, metadata?: Metadata): Observable<Empty>;
|
|
@@ -93,6 +113,7 @@ export interface GenerationServiceClient {
|
|
|
93
113
|
executeWorkflowLlmNode(request: WorkflowLLMNodeRequest, metadata?: Metadata): Observable<WorkflowLLMNodeResponse>;
|
|
94
114
|
generateAgent(request: AgentGenerateRequest, metadata?: Metadata): Observable<AgentGenerateResponse>;
|
|
95
115
|
generateMcpToolSchema(request: MCPToolSchemaRequest, metadata?: Metadata): Observable<MCPToolSchemaResponse>;
|
|
116
|
+
generateImage(request: GenerateImageRequest, metadata?: Metadata): Observable<GenerateImageResponse>;
|
|
96
117
|
}
|
|
97
118
|
export interface GenerationServiceController {
|
|
98
119
|
startChatRun(request: StartChatRunRequest, metadata?: Metadata): Promise<StartChatRunResponse> | Observable<StartChatRunResponse> | StartChatRunResponse;
|
|
@@ -102,6 +123,7 @@ export interface GenerationServiceController {
|
|
|
102
123
|
executeWorkflowLlmNode(request: WorkflowLLMNodeRequest, metadata?: Metadata): Promise<WorkflowLLMNodeResponse> | Observable<WorkflowLLMNodeResponse> | WorkflowLLMNodeResponse;
|
|
103
124
|
generateAgent(request: AgentGenerateRequest, metadata?: Metadata): Promise<AgentGenerateResponse> | Observable<AgentGenerateResponse> | AgentGenerateResponse;
|
|
104
125
|
generateMcpToolSchema(request: MCPToolSchemaRequest, metadata?: Metadata): Promise<MCPToolSchemaResponse> | Observable<MCPToolSchemaResponse> | MCPToolSchemaResponse;
|
|
126
|
+
generateImage(request: GenerateImageRequest, metadata?: Metadata): Promise<GenerateImageResponse> | Observable<GenerateImageResponse> | GenerateImageResponse;
|
|
105
127
|
}
|
|
106
128
|
export declare function GenerationServiceControllerMethods(): (constructor: Function) => void;
|
|
107
129
|
export declare const GENERATION_SERVICE_NAME = "GenerationService";
|
|
@@ -162,6 +184,15 @@ export declare const GenerationServiceService: {
|
|
|
162
184
|
readonly responseSerialize: (value: MCPToolSchemaResponse) => Buffer;
|
|
163
185
|
readonly responseDeserialize: (value: Buffer) => MCPToolSchemaResponse;
|
|
164
186
|
};
|
|
187
|
+
readonly generateImage: {
|
|
188
|
+
readonly path: "/generation.GenerationService/GenerateImage";
|
|
189
|
+
readonly requestStream: false;
|
|
190
|
+
readonly responseStream: false;
|
|
191
|
+
readonly requestSerialize: (value: GenerateImageRequest) => Buffer;
|
|
192
|
+
readonly requestDeserialize: (value: Buffer) => GenerateImageRequest;
|
|
193
|
+
readonly responseSerialize: (value: GenerateImageResponse) => Buffer;
|
|
194
|
+
readonly responseDeserialize: (value: Buffer) => GenerateImageResponse;
|
|
195
|
+
};
|
|
165
196
|
};
|
|
166
197
|
export interface GenerationServiceServer extends UntypedServiceImplementation {
|
|
167
198
|
startChatRun: handleUnaryCall<StartChatRunRequest, StartChatRunResponse>;
|
|
@@ -171,6 +202,7 @@ export interface GenerationServiceServer extends UntypedServiceImplementation {
|
|
|
171
202
|
executeWorkflowLlmNode: handleUnaryCall<WorkflowLLMNodeRequest, WorkflowLLMNodeResponse>;
|
|
172
203
|
generateAgent: handleUnaryCall<AgentGenerateRequest, AgentGenerateResponse>;
|
|
173
204
|
generateMcpToolSchema: handleUnaryCall<MCPToolSchemaRequest, MCPToolSchemaResponse>;
|
|
205
|
+
generateImage: handleUnaryCall<GenerateImageRequest, GenerateImageResponse>;
|
|
174
206
|
}
|
|
175
207
|
export interface MessageFns<T> {
|
|
176
208
|
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// protoc v5.28.2
|
|
6
6
|
// source: generation.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.GenerationServiceService = exports.GENERATION_SERVICE_NAME = exports.MCPToolSchemaResponse = exports.MCPToolSchemaRequest = exports.AgentGenerateResponse = exports.AgentGenerateRequest = exports.WorkflowLLMNodeResponse = exports.WorkflowLLMNodeRequest = exports.CancelRunRequest = exports.SubmitToolResultRequest = exports.StartChatRunResponse = exports.StartChatRunRequest = exports.GENERATION_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
8
|
+
exports.GenerationServiceService = exports.GENERATION_SERVICE_NAME = exports.GenerateImageResponse = exports.GeneratedImage = exports.GenerateImageRequest = exports.MCPToolSchemaResponse = exports.MCPToolSchemaRequest = exports.AgentGenerateResponse = exports.AgentGenerateRequest = exports.WorkflowLLMNodeResponse = exports.WorkflowLLMNodeRequest = exports.CancelRunRequest = exports.SubmitToolResultRequest = exports.StartChatRunResponse = exports.StartChatRunRequest = exports.GENERATION_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
9
|
exports.GenerationServiceControllerMethods = GenerationServiceControllerMethods;
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
@@ -595,6 +595,165 @@ exports.MCPToolSchemaResponse = {
|
|
|
595
595
|
return message;
|
|
596
596
|
},
|
|
597
597
|
};
|
|
598
|
+
function createBaseGenerateImageRequest() {
|
|
599
|
+
return { userId: "", modelProvider: "", modelName: "", prompt: "", messagesJson: "" };
|
|
600
|
+
}
|
|
601
|
+
exports.GenerateImageRequest = {
|
|
602
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
603
|
+
if (message.userId !== "") {
|
|
604
|
+
writer.uint32(10).string(message.userId);
|
|
605
|
+
}
|
|
606
|
+
if (message.modelProvider !== "") {
|
|
607
|
+
writer.uint32(18).string(message.modelProvider);
|
|
608
|
+
}
|
|
609
|
+
if (message.modelName !== "") {
|
|
610
|
+
writer.uint32(26).string(message.modelName);
|
|
611
|
+
}
|
|
612
|
+
if (message.prompt !== "") {
|
|
613
|
+
writer.uint32(34).string(message.prompt);
|
|
614
|
+
}
|
|
615
|
+
if (message.messagesJson !== "") {
|
|
616
|
+
writer.uint32(42).string(message.messagesJson);
|
|
617
|
+
}
|
|
618
|
+
return writer;
|
|
619
|
+
},
|
|
620
|
+
decode(input, length) {
|
|
621
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
622
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
623
|
+
const message = createBaseGenerateImageRequest();
|
|
624
|
+
while (reader.pos < end) {
|
|
625
|
+
const tag = reader.uint32();
|
|
626
|
+
switch (tag >>> 3) {
|
|
627
|
+
case 1: {
|
|
628
|
+
if (tag !== 10) {
|
|
629
|
+
break;
|
|
630
|
+
}
|
|
631
|
+
message.userId = reader.string();
|
|
632
|
+
continue;
|
|
633
|
+
}
|
|
634
|
+
case 2: {
|
|
635
|
+
if (tag !== 18) {
|
|
636
|
+
break;
|
|
637
|
+
}
|
|
638
|
+
message.modelProvider = reader.string();
|
|
639
|
+
continue;
|
|
640
|
+
}
|
|
641
|
+
case 3: {
|
|
642
|
+
if (tag !== 26) {
|
|
643
|
+
break;
|
|
644
|
+
}
|
|
645
|
+
message.modelName = reader.string();
|
|
646
|
+
continue;
|
|
647
|
+
}
|
|
648
|
+
case 4: {
|
|
649
|
+
if (tag !== 34) {
|
|
650
|
+
break;
|
|
651
|
+
}
|
|
652
|
+
message.prompt = reader.string();
|
|
653
|
+
continue;
|
|
654
|
+
}
|
|
655
|
+
case 5: {
|
|
656
|
+
if (tag !== 42) {
|
|
657
|
+
break;
|
|
658
|
+
}
|
|
659
|
+
message.messagesJson = reader.string();
|
|
660
|
+
continue;
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
664
|
+
break;
|
|
665
|
+
}
|
|
666
|
+
reader.skip(tag & 7);
|
|
667
|
+
}
|
|
668
|
+
return message;
|
|
669
|
+
},
|
|
670
|
+
};
|
|
671
|
+
function createBaseGeneratedImage() {
|
|
672
|
+
return { url: "", mimeType: "" };
|
|
673
|
+
}
|
|
674
|
+
exports.GeneratedImage = {
|
|
675
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
676
|
+
if (message.url !== "") {
|
|
677
|
+
writer.uint32(10).string(message.url);
|
|
678
|
+
}
|
|
679
|
+
if (message.mimeType !== "") {
|
|
680
|
+
writer.uint32(18).string(message.mimeType);
|
|
681
|
+
}
|
|
682
|
+
return writer;
|
|
683
|
+
},
|
|
684
|
+
decode(input, length) {
|
|
685
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
686
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
687
|
+
const message = createBaseGeneratedImage();
|
|
688
|
+
while (reader.pos < end) {
|
|
689
|
+
const tag = reader.uint32();
|
|
690
|
+
switch (tag >>> 3) {
|
|
691
|
+
case 1: {
|
|
692
|
+
if (tag !== 10) {
|
|
693
|
+
break;
|
|
694
|
+
}
|
|
695
|
+
message.url = reader.string();
|
|
696
|
+
continue;
|
|
697
|
+
}
|
|
698
|
+
case 2: {
|
|
699
|
+
if (tag !== 18) {
|
|
700
|
+
break;
|
|
701
|
+
}
|
|
702
|
+
message.mimeType = reader.string();
|
|
703
|
+
continue;
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
707
|
+
break;
|
|
708
|
+
}
|
|
709
|
+
reader.skip(tag & 7);
|
|
710
|
+
}
|
|
711
|
+
return message;
|
|
712
|
+
},
|
|
713
|
+
};
|
|
714
|
+
function createBaseGenerateImageResponse() {
|
|
715
|
+
return { images: [], error: "" };
|
|
716
|
+
}
|
|
717
|
+
exports.GenerateImageResponse = {
|
|
718
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
719
|
+
for (const v of message.images) {
|
|
720
|
+
exports.GeneratedImage.encode(v, writer.uint32(10).fork()).join();
|
|
721
|
+
}
|
|
722
|
+
if (message.error !== "") {
|
|
723
|
+
writer.uint32(18).string(message.error);
|
|
724
|
+
}
|
|
725
|
+
return writer;
|
|
726
|
+
},
|
|
727
|
+
decode(input, length) {
|
|
728
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
729
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
730
|
+
const message = createBaseGenerateImageResponse();
|
|
731
|
+
while (reader.pos < end) {
|
|
732
|
+
const tag = reader.uint32();
|
|
733
|
+
switch (tag >>> 3) {
|
|
734
|
+
case 1: {
|
|
735
|
+
if (tag !== 10) {
|
|
736
|
+
break;
|
|
737
|
+
}
|
|
738
|
+
message.images.push(exports.GeneratedImage.decode(reader, reader.uint32()));
|
|
739
|
+
continue;
|
|
740
|
+
}
|
|
741
|
+
case 2: {
|
|
742
|
+
if (tag !== 18) {
|
|
743
|
+
break;
|
|
744
|
+
}
|
|
745
|
+
message.error = reader.string();
|
|
746
|
+
continue;
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
750
|
+
break;
|
|
751
|
+
}
|
|
752
|
+
reader.skip(tag & 7);
|
|
753
|
+
}
|
|
754
|
+
return message;
|
|
755
|
+
},
|
|
756
|
+
};
|
|
598
757
|
protobufjs_1.wrappers[".google.protobuf.Struct"] = { fromObject: struct_interface_1.Struct.wrap, toObject: struct_interface_1.Struct.unwrap };
|
|
599
758
|
function GenerationServiceControllerMethods() {
|
|
600
759
|
return function (constructor) {
|
|
@@ -605,6 +764,7 @@ function GenerationServiceControllerMethods() {
|
|
|
605
764
|
"executeWorkflowLlmNode",
|
|
606
765
|
"generateAgent",
|
|
607
766
|
"generateMcpToolSchema",
|
|
767
|
+
"generateImage",
|
|
608
768
|
];
|
|
609
769
|
for (const method of grpcMethods) {
|
|
610
770
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
@@ -674,4 +834,13 @@ exports.GenerationServiceService = {
|
|
|
674
834
|
responseSerialize: (value) => Buffer.from(exports.MCPToolSchemaResponse.encode(value).finish()),
|
|
675
835
|
responseDeserialize: (value) => exports.MCPToolSchemaResponse.decode(value),
|
|
676
836
|
},
|
|
837
|
+
generateImage: {
|
|
838
|
+
path: "/generation.GenerationService/GenerateImage",
|
|
839
|
+
requestStream: false,
|
|
840
|
+
responseStream: false,
|
|
841
|
+
requestSerialize: (value) => Buffer.from(exports.GenerateImageRequest.encode(value).finish()),
|
|
842
|
+
requestDeserialize: (value) => exports.GenerateImageRequest.decode(value),
|
|
843
|
+
responseSerialize: (value) => Buffer.from(exports.GenerateImageResponse.encode(value).finish()),
|
|
844
|
+
responseDeserialize: (value) => exports.GenerateImageResponse.decode(value),
|
|
845
|
+
},
|
|
677
846
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export { MessageFns as UserMessageFns, protobufPackage as UserProtobufPackage, U
|
|
|
19
19
|
export { MessageFns as AuthMessageFns, protobufPackage as AuthProtobufPackage, LoginCredentials, RegisterCredentials, LogoutRequest, RefreshRequest, AuthResponse, RefreshTokenResponse, RecoverRequest, ResetPasswordRequest, ConfirmEmailRequest, ConfirmEmailByCodeRequest, ConfirmEmailResponse, CheckEmailVerifiedRequest, CheckEmailVerifiedResponse, ResendConfirmationCodeRequest, VerifyResetCodeRequest, LoginWithOAuthRequest, } from "./auth.interface";
|
|
20
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";
|
|
21
21
|
export { MessageFns as OpenAIMessageFns, protobufPackage as OpenAIProtobufPackage, CreateRequest as OpenAICreateRequest, CreateResponse as OpenAICreateResponse, OpenAIServiceService as OpenAIService, } from "./openai.interface";
|
|
22
|
-
export { UploadRequest, UploadResponse, DownloadRequest, DownloadResponse, DeleteRequest, DeleteResponse, StorageServiceService as StorageService, protobufPackage as
|
|
22
|
+
export { FileMetadata, UploadRequest, UploadResponse, DownloadRequest, DownloadResponse, DeleteRequest, DeleteResponse, GetMetadataRequest, GetMetadataResponse, ExistsRequest, ExistsResponse, ListFilesRequest, ListFilesResponse, StorageServiceClient, StorageServiceController, StorageServiceService as StorageService, protobufPackage as StorageProtobufPackage, } from "./storage.interface";
|
|
23
23
|
export { MessageFns as EventMessageFns, protobufPackage as EventProtobufPackage, SubscribeRequest, EventMessage, EmitToUserRequest, BroadcastRequest, EmitResponse, EventServiceService as EventService, } from "./event.interface";
|
|
24
24
|
export { MessageFns as KeysMessageFns, protobufPackage as KeysProtobufPackage, Key, CreateKeyRequest, UpdateKeyRequest, RemoveKeyRequest, GetKeyByIdRequest, KeyResponse, KeysResponse, GetKeysByUserRequest, ValidateKeyRequest, ValidateKeyResponse, GetSystemKeyRequest, KeyServiceService as KeyService, } from "./key.interface";
|
|
25
25
|
export { MessageFns as RequestMessageFns, protobufPackage as RequestProtobufPackage, CreateRequestRequest, CreateRequestResponse, GetRequestStatusRequest, RequestStatusResponse, GetRequestResultRequest, RequestResultResponse, CancelRequestRequest, CancelRequestResponse, StreamRequestRequest, RequestLog, StreamChunk, RequestServiceService as RequestService, } from "./request.interface";
|
|
@@ -30,4 +30,4 @@ export { MessageFns as WorkflowMessageFns, protobufPackage as WorkflowProtobufPa
|
|
|
30
30
|
export { MessageFns as McpMessageFns, protobufPackage as McpProtobufPackage, McpServer, McpServerCustomization, McpToolCustomization, McpOAuthSession, CreateMcpServerRequest, UpdateMcpServerRequest, GetMcpServerRequest, ListMcpServersRequest, DeleteMcpServerRequest, SetServerCustomizationRequest, SetToolCustomizationRequest, ListServerCustomizationsRequest, ListToolCustomizationsRequest, McpServerCustomizationsResponse, McpToolCustomizationsResponse, McpServersResponse, McpServiceClient, McpServiceController, McpServiceService as McpService, } from "./mcp.interface";
|
|
31
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";
|
|
32
32
|
export { MessageFns as ChatMessageFns, protobufPackage as ChatProtobufPackage, Chat, ChatMessage, CreateChatRequest, UpdateChatRequest, GetChatRequest, ListChatsRequest, DeleteChatRequest, AddMessageRequest, GetMessagesRequest, ChatsResponse, MessagesResponse, ChatServiceClient, ChatExportMessage, ChatExport, ChatExportSummary, ChatExportComment, ExportChatRequest, ExportChatResponse, GetChatExportRequest, GetChatExportCommentsRequest, DeleteChatExportRequest, ListChatExportsRequest, ChatExportsResponse, ChatExportCommentsResponse, AddChatExportCommentRequest, DeleteChatExportCommentRequest, ChatServiceController, ChatServiceService as ChatService, } from "./chat.interface";
|
|
33
|
-
export { MessageFns as GenerationMessageFns, protobufPackage as GenerationProtobufPackage, StartChatRunRequest, StartChatRunResponse, SubmitToolResultRequest, CancelRunRequest, WorkflowLLMNodeRequest, WorkflowLLMNodeResponse, AgentGenerateRequest, AgentGenerateResponse, MCPToolSchemaRequest, MCPToolSchemaResponse, GenerationServiceClient, GenerationServiceController, GenerationServiceService as GenerationService, } from "./generation.interface";
|
|
33
|
+
export { MessageFns as GenerationMessageFns, protobufPackage as GenerationProtobufPackage, StartChatRunRequest, StartChatRunResponse, SubmitToolResultRequest, CancelRunRequest, WorkflowLLMNodeRequest, WorkflowLLMNodeResponse, AgentGenerateRequest, AgentGenerateResponse, MCPToolSchemaRequest, MCPToolSchemaResponse, GenerateImageRequest, GeneratedImage, GenerateImageResponse, GenerationServiceClient, GenerationServiceController, GenerationServiceService as GenerationService, } from "./generation.interface";
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AuthProtobufPackage = exports.UserService = exports.CreateOAuthIdentityRequest = exports.FindOAuthIdentityRequest = exports.UserOAuthIdentity = exports.UserSettingsResponse = exports.CreateUserSettingsRequest = exports.UpdateUserSettingsRequest = exports.GetUserSettingsRequest = 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.CreateUserAuthentication = exports.CreateUserPersonal = exports.CreateUserRequest = exports.UserAuthentication = exports.UserInAppNotifications = exports.UserPushNotifications = exports.UserEmailNotifications = exports.UserNotificationSettings = exports.UserSettings = exports.UserPersonal = exports.User = exports.UserProtobufPackage = exports.GenerationClient = 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.
|
|
5
|
-
exports.
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
8
|
-
exports.GenerationService = exports.MCPToolSchemaResponse = exports.MCPToolSchemaRequest = exports.AgentGenerateResponse = exports.AgentGenerateRequest = exports.WorkflowLLMNodeResponse = exports.WorkflowLLMNodeRequest = exports.CancelRunRequest = exports.SubmitToolResultRequest = exports.StartChatRunResponse = exports.StartChatRunRequest = exports.GenerationProtobufPackage = exports.ChatService = exports.DeleteChatExportCommentRequest = exports.AddChatExportCommentRequest = exports.ChatExportCommentsResponse = exports.ChatExportsResponse = exports.ListChatExportsRequest = exports.DeleteChatExportRequest = exports.GetChatExportCommentsRequest = exports.GetChatExportRequest = exports.ExportChatResponse = exports.ExportChatRequest = exports.ChatExportComment = exports.ChatExportSummary = exports.ChatExport = exports.ChatExportMessage = exports.MessagesResponse = exports.ChatsResponse = exports.GetMessagesRequest = exports.AddMessageRequest = exports.DeleteChatRequest = exports.ListChatsRequest = exports.GetChatRequest = void 0;
|
|
4
|
+
exports.UploadResponse = exports.UploadRequest = exports.FileMetadata = 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 = exports.LoginWithOAuthRequest = 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 = void 0;
|
|
5
|
+
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 = exports.KeyResponse = exports.GetKeyByIdRequest = exports.RemoveKeyRequest = exports.UpdateKeyRequest = exports.CreateKeyRequest = exports.Key = exports.KeysProtobufPackage = exports.EventService = exports.EmitResponse = exports.BroadcastRequest = exports.EmitToUserRequest = exports.EventMessage = exports.SubscribeRequest = exports.EventProtobufPackage = exports.StorageProtobufPackage = exports.StorageService = exports.ListFilesResponse = exports.ListFilesRequest = exports.ExistsResponse = exports.ExistsRequest = exports.GetMetadataResponse = exports.GetMetadataRequest = exports.DeleteResponse = exports.DeleteRequest = exports.DownloadResponse = exports.DownloadRequest = void 0;
|
|
6
|
+
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 = 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.ProviderResponse = exports.ProviderError = exports.ProviderChunk = exports.ProviderUsage = void 0;
|
|
7
|
+
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 = exports.McpService = exports.McpServersResponse = exports.McpToolCustomizationsResponse = exports.McpServerCustomizationsResponse = exports.ListToolCustomizationsRequest = exports.ListServerCustomizationsRequest = 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 = void 0;
|
|
8
|
+
exports.GenerationService = exports.GenerateImageResponse = exports.GeneratedImage = exports.GenerateImageRequest = exports.MCPToolSchemaResponse = exports.MCPToolSchemaRequest = exports.AgentGenerateResponse = exports.AgentGenerateRequest = exports.WorkflowLLMNodeResponse = exports.WorkflowLLMNodeRequest = exports.CancelRunRequest = exports.SubmitToolResultRequest = exports.StartChatRunResponse = exports.StartChatRunRequest = exports.GenerationProtobufPackage = exports.ChatService = exports.DeleteChatExportCommentRequest = exports.AddChatExportCommentRequest = exports.ChatExportCommentsResponse = exports.ChatExportsResponse = exports.ListChatExportsRequest = exports.DeleteChatExportRequest = exports.GetChatExportCommentsRequest = exports.GetChatExportRequest = exports.ExportChatResponse = exports.ExportChatRequest = exports.ChatExportComment = exports.ChatExportSummary = exports.ChatExport = exports.ChatExportMessage = exports.MessagesResponse = exports.ChatsResponse = exports.GetMessagesRequest = exports.AddMessageRequest = exports.DeleteChatRequest = exports.ListChatsRequest = exports.GetChatRequest = exports.UpdateChatRequest = exports.CreateChatRequest = exports.ChatMessage = exports.Chat = exports.ChatProtobufPackage = exports.LibraryService = exports.ArchiveItemsResponse = void 0;
|
|
9
9
|
var shared_module_1 = require("./shared.module");
|
|
10
10
|
Object.defineProperty(exports, "SharedModule", { enumerable: true, get: function () { return shared_module_1.SharedModule; } });
|
|
11
11
|
var user_client_1 = require("./user.client");
|
|
@@ -138,17 +138,24 @@ Object.defineProperty(exports, "OpenAICreateRequest", { enumerable: true, get: f
|
|
|
138
138
|
Object.defineProperty(exports, "OpenAICreateResponse", { enumerable: true, get: function () { return openai_interface_1.CreateResponse; } });
|
|
139
139
|
Object.defineProperty(exports, "OpenAIService", { enumerable: true, get: function () { return openai_interface_1.OpenAIServiceService; } });
|
|
140
140
|
// ============================
|
|
141
|
-
//
|
|
141
|
+
// Storage exports
|
|
142
142
|
// ============================
|
|
143
143
|
var storage_interface_1 = require("./storage.interface");
|
|
144
|
+
Object.defineProperty(exports, "FileMetadata", { enumerable: true, get: function () { return storage_interface_1.FileMetadata; } });
|
|
144
145
|
Object.defineProperty(exports, "UploadRequest", { enumerable: true, get: function () { return storage_interface_1.UploadRequest; } });
|
|
145
146
|
Object.defineProperty(exports, "UploadResponse", { enumerable: true, get: function () { return storage_interface_1.UploadResponse; } });
|
|
146
147
|
Object.defineProperty(exports, "DownloadRequest", { enumerable: true, get: function () { return storage_interface_1.DownloadRequest; } });
|
|
147
148
|
Object.defineProperty(exports, "DownloadResponse", { enumerable: true, get: function () { return storage_interface_1.DownloadResponse; } });
|
|
148
149
|
Object.defineProperty(exports, "DeleteRequest", { enumerable: true, get: function () { return storage_interface_1.DeleteRequest; } });
|
|
149
150
|
Object.defineProperty(exports, "DeleteResponse", { enumerable: true, get: function () { return storage_interface_1.DeleteResponse; } });
|
|
151
|
+
Object.defineProperty(exports, "GetMetadataRequest", { enumerable: true, get: function () { return storage_interface_1.GetMetadataRequest; } });
|
|
152
|
+
Object.defineProperty(exports, "GetMetadataResponse", { enumerable: true, get: function () { return storage_interface_1.GetMetadataResponse; } });
|
|
153
|
+
Object.defineProperty(exports, "ExistsRequest", { enumerable: true, get: function () { return storage_interface_1.ExistsRequest; } });
|
|
154
|
+
Object.defineProperty(exports, "ExistsResponse", { enumerable: true, get: function () { return storage_interface_1.ExistsResponse; } });
|
|
155
|
+
Object.defineProperty(exports, "ListFilesRequest", { enumerable: true, get: function () { return storage_interface_1.ListFilesRequest; } });
|
|
156
|
+
Object.defineProperty(exports, "ListFilesResponse", { enumerable: true, get: function () { return storage_interface_1.ListFilesResponse; } });
|
|
150
157
|
Object.defineProperty(exports, "StorageService", { enumerable: true, get: function () { return storage_interface_1.StorageServiceService; } });
|
|
151
|
-
Object.defineProperty(exports, "
|
|
158
|
+
Object.defineProperty(exports, "StorageProtobufPackage", { enumerable: true, get: function () { return storage_interface_1.protobufPackage; } });
|
|
152
159
|
// ============================
|
|
153
160
|
// Event exports
|
|
154
161
|
// ============================
|
|
@@ -371,4 +378,7 @@ Object.defineProperty(exports, "AgentGenerateRequest", { enumerable: true, get:
|
|
|
371
378
|
Object.defineProperty(exports, "AgentGenerateResponse", { enumerable: true, get: function () { return generation_interface_1.AgentGenerateResponse; } });
|
|
372
379
|
Object.defineProperty(exports, "MCPToolSchemaRequest", { enumerable: true, get: function () { return generation_interface_1.MCPToolSchemaRequest; } });
|
|
373
380
|
Object.defineProperty(exports, "MCPToolSchemaResponse", { enumerable: true, get: function () { return generation_interface_1.MCPToolSchemaResponse; } });
|
|
381
|
+
Object.defineProperty(exports, "GenerateImageRequest", { enumerable: true, get: function () { return generation_interface_1.GenerateImageRequest; } });
|
|
382
|
+
Object.defineProperty(exports, "GeneratedImage", { enumerable: true, get: function () { return generation_interface_1.GeneratedImage; } });
|
|
383
|
+
Object.defineProperty(exports, "GenerateImageResponse", { enumerable: true, get: function () { return generation_interface_1.GenerateImageResponse; } });
|
|
374
384
|
Object.defineProperty(exports, "GenerationService", { enumerable: true, get: function () { return generation_interface_1.GenerationServiceService; } });
|
|
@@ -2,9 +2,24 @@ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
|
2
2
|
import type { handleUnaryCall, Metadata, UntypedServiceImplementation } from "@grpc/grpc-js";
|
|
3
3
|
import { Observable } from "rxjs";
|
|
4
4
|
export declare const protobufPackage = "storage";
|
|
5
|
+
export interface FileMetadata {
|
|
6
|
+
key: string;
|
|
7
|
+
filename: string;
|
|
8
|
+
contentType: string;
|
|
9
|
+
size: number;
|
|
10
|
+
uploadedAt: string;
|
|
11
|
+
customMetadata: {
|
|
12
|
+
[key: string]: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export interface FileMetadata_CustomMetadataEntry {
|
|
16
|
+
key: string;
|
|
17
|
+
value: string;
|
|
18
|
+
}
|
|
5
19
|
export interface UploadRequest {
|
|
6
20
|
filename: string;
|
|
7
21
|
content: Uint8Array;
|
|
22
|
+
contentType: string;
|
|
8
23
|
metadata: {
|
|
9
24
|
[key: string]: string;
|
|
10
25
|
};
|
|
@@ -19,33 +34,78 @@ export interface DownloadRequest {
|
|
|
19
34
|
export interface DeleteRequest {
|
|
20
35
|
fileId: string;
|
|
21
36
|
}
|
|
37
|
+
export interface GetMetadataRequest {
|
|
38
|
+
fileId: string;
|
|
39
|
+
}
|
|
40
|
+
export interface ExistsRequest {
|
|
41
|
+
fileId: string;
|
|
42
|
+
}
|
|
43
|
+
export interface ListFilesRequest {
|
|
44
|
+
filters: {
|
|
45
|
+
[key: string]: string;
|
|
46
|
+
};
|
|
47
|
+
limit: number;
|
|
48
|
+
offset: number;
|
|
49
|
+
}
|
|
50
|
+
export interface ListFilesRequest_FiltersEntry {
|
|
51
|
+
key: string;
|
|
52
|
+
value: string;
|
|
53
|
+
}
|
|
22
54
|
export interface UploadResponse {
|
|
23
55
|
fileId: string;
|
|
56
|
+
url: string;
|
|
57
|
+
metadata?: FileMetadata | undefined;
|
|
24
58
|
}
|
|
25
59
|
export interface DownloadResponse {
|
|
26
60
|
content: Uint8Array;
|
|
27
61
|
filename: string;
|
|
62
|
+
contentType: string;
|
|
28
63
|
}
|
|
29
64
|
export interface DeleteResponse {
|
|
30
65
|
success: boolean;
|
|
31
66
|
}
|
|
67
|
+
export interface GetMetadataResponse {
|
|
68
|
+
metadata?: FileMetadata | undefined;
|
|
69
|
+
}
|
|
70
|
+
export interface ExistsResponse {
|
|
71
|
+
exists: boolean;
|
|
72
|
+
}
|
|
73
|
+
export interface ListFilesResponse {
|
|
74
|
+
files: FileMetadata[];
|
|
75
|
+
total: number;
|
|
76
|
+
}
|
|
32
77
|
export declare const STORAGE_PACKAGE_NAME = "storage";
|
|
78
|
+
export declare const FileMetadata: MessageFns<FileMetadata>;
|
|
79
|
+
export declare const FileMetadata_CustomMetadataEntry: MessageFns<FileMetadata_CustomMetadataEntry>;
|
|
33
80
|
export declare const UploadRequest: MessageFns<UploadRequest>;
|
|
34
81
|
export declare const UploadRequest_MetadataEntry: MessageFns<UploadRequest_MetadataEntry>;
|
|
35
82
|
export declare const DownloadRequest: MessageFns<DownloadRequest>;
|
|
36
83
|
export declare const DeleteRequest: MessageFns<DeleteRequest>;
|
|
84
|
+
export declare const GetMetadataRequest: MessageFns<GetMetadataRequest>;
|
|
85
|
+
export declare const ExistsRequest: MessageFns<ExistsRequest>;
|
|
86
|
+
export declare const ListFilesRequest: MessageFns<ListFilesRequest>;
|
|
87
|
+
export declare const ListFilesRequest_FiltersEntry: MessageFns<ListFilesRequest_FiltersEntry>;
|
|
37
88
|
export declare const UploadResponse: MessageFns<UploadResponse>;
|
|
38
89
|
export declare const DownloadResponse: MessageFns<DownloadResponse>;
|
|
39
90
|
export declare const DeleteResponse: MessageFns<DeleteResponse>;
|
|
91
|
+
export declare const GetMetadataResponse: MessageFns<GetMetadataResponse>;
|
|
92
|
+
export declare const ExistsResponse: MessageFns<ExistsResponse>;
|
|
93
|
+
export declare const ListFilesResponse: MessageFns<ListFilesResponse>;
|
|
40
94
|
export interface StorageServiceClient {
|
|
41
95
|
upload(request: UploadRequest, metadata?: Metadata): Observable<UploadResponse>;
|
|
42
96
|
download(request: DownloadRequest, metadata?: Metadata): Observable<DownloadResponse>;
|
|
43
97
|
delete(request: DeleteRequest, metadata?: Metadata): Observable<DeleteResponse>;
|
|
98
|
+
getMetadata(request: GetMetadataRequest, metadata?: Metadata): Observable<GetMetadataResponse>;
|
|
99
|
+
exists(request: ExistsRequest, metadata?: Metadata): Observable<ExistsResponse>;
|
|
100
|
+
listFiles(request: ListFilesRequest, metadata?: Metadata): Observable<ListFilesResponse>;
|
|
44
101
|
}
|
|
45
102
|
export interface StorageServiceController {
|
|
46
103
|
upload(request: UploadRequest, metadata?: Metadata): Promise<UploadResponse> | Observable<UploadResponse> | UploadResponse;
|
|
47
104
|
download(request: DownloadRequest, metadata?: Metadata): Promise<DownloadResponse> | Observable<DownloadResponse> | DownloadResponse;
|
|
48
105
|
delete(request: DeleteRequest, metadata?: Metadata): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
|
|
106
|
+
getMetadata(request: GetMetadataRequest, metadata?: Metadata): Promise<GetMetadataResponse> | Observable<GetMetadataResponse> | GetMetadataResponse;
|
|
107
|
+
exists(request: ExistsRequest, metadata?: Metadata): Promise<ExistsResponse> | Observable<ExistsResponse> | ExistsResponse;
|
|
108
|
+
listFiles(request: ListFilesRequest, metadata?: Metadata): Promise<ListFilesResponse> | Observable<ListFilesResponse> | ListFilesResponse;
|
|
49
109
|
}
|
|
50
110
|
export declare function StorageServiceControllerMethods(): (constructor: Function) => void;
|
|
51
111
|
export declare const STORAGE_SERVICE_NAME = "StorageService";
|
|
@@ -78,11 +138,41 @@ export declare const StorageServiceService: {
|
|
|
78
138
|
readonly responseSerialize: (value: DeleteResponse) => Buffer;
|
|
79
139
|
readonly responseDeserialize: (value: Buffer) => DeleteResponse;
|
|
80
140
|
};
|
|
141
|
+
readonly getMetadata: {
|
|
142
|
+
readonly path: "/storage.StorageService/getMetadata";
|
|
143
|
+
readonly requestStream: false;
|
|
144
|
+
readonly responseStream: false;
|
|
145
|
+
readonly requestSerialize: (value: GetMetadataRequest) => Buffer;
|
|
146
|
+
readonly requestDeserialize: (value: Buffer) => GetMetadataRequest;
|
|
147
|
+
readonly responseSerialize: (value: GetMetadataResponse) => Buffer;
|
|
148
|
+
readonly responseDeserialize: (value: Buffer) => GetMetadataResponse;
|
|
149
|
+
};
|
|
150
|
+
readonly exists: {
|
|
151
|
+
readonly path: "/storage.StorageService/exists";
|
|
152
|
+
readonly requestStream: false;
|
|
153
|
+
readonly responseStream: false;
|
|
154
|
+
readonly requestSerialize: (value: ExistsRequest) => Buffer;
|
|
155
|
+
readonly requestDeserialize: (value: Buffer) => ExistsRequest;
|
|
156
|
+
readonly responseSerialize: (value: ExistsResponse) => Buffer;
|
|
157
|
+
readonly responseDeserialize: (value: Buffer) => ExistsResponse;
|
|
158
|
+
};
|
|
159
|
+
readonly listFiles: {
|
|
160
|
+
readonly path: "/storage.StorageService/listFiles";
|
|
161
|
+
readonly requestStream: false;
|
|
162
|
+
readonly responseStream: false;
|
|
163
|
+
readonly requestSerialize: (value: ListFilesRequest) => Buffer;
|
|
164
|
+
readonly requestDeserialize: (value: Buffer) => ListFilesRequest;
|
|
165
|
+
readonly responseSerialize: (value: ListFilesResponse) => Buffer;
|
|
166
|
+
readonly responseDeserialize: (value: Buffer) => ListFilesResponse;
|
|
167
|
+
};
|
|
81
168
|
};
|
|
82
169
|
export interface StorageServiceServer extends UntypedServiceImplementation {
|
|
83
170
|
upload: handleUnaryCall<UploadRequest, UploadResponse>;
|
|
84
171
|
download: handleUnaryCall<DownloadRequest, DownloadResponse>;
|
|
85
172
|
delete: handleUnaryCall<DeleteRequest, DeleteResponse>;
|
|
173
|
+
getMetadata: handleUnaryCall<GetMetadataRequest, GetMetadataResponse>;
|
|
174
|
+
exists: handleUnaryCall<ExistsRequest, ExistsResponse>;
|
|
175
|
+
listFiles: handleUnaryCall<ListFilesRequest, ListFilesResponse>;
|
|
86
176
|
}
|
|
87
177
|
export interface MessageFns<T> {
|
|
88
178
|
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
@@ -5,15 +5,144 @@
|
|
|
5
5
|
// protoc v5.28.2
|
|
6
6
|
// source: storage.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.StorageServiceService = exports.STORAGE_SERVICE_NAME = exports.DeleteResponse = exports.DownloadResponse = exports.UploadResponse = exports.DeleteRequest = exports.DownloadRequest = exports.UploadRequest_MetadataEntry = exports.UploadRequest = exports.STORAGE_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
8
|
+
exports.StorageServiceService = exports.STORAGE_SERVICE_NAME = exports.ListFilesResponse = exports.ExistsResponse = exports.GetMetadataResponse = exports.DeleteResponse = exports.DownloadResponse = exports.UploadResponse = exports.ListFilesRequest_FiltersEntry = exports.ListFilesRequest = exports.ExistsRequest = exports.GetMetadataRequest = exports.DeleteRequest = exports.DownloadRequest = exports.UploadRequest_MetadataEntry = exports.UploadRequest = exports.FileMetadata_CustomMetadataEntry = exports.FileMetadata = exports.STORAGE_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
9
|
exports.StorageServiceControllerMethods = StorageServiceControllerMethods;
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
12
12
|
const microservices_1 = require("@nestjs/microservices");
|
|
13
13
|
exports.protobufPackage = "storage";
|
|
14
14
|
exports.STORAGE_PACKAGE_NAME = "storage";
|
|
15
|
+
function createBaseFileMetadata() {
|
|
16
|
+
return { key: "", filename: "", contentType: "", size: 0, uploadedAt: "", customMetadata: {} };
|
|
17
|
+
}
|
|
18
|
+
exports.FileMetadata = {
|
|
19
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
20
|
+
if (message.key !== "") {
|
|
21
|
+
writer.uint32(10).string(message.key);
|
|
22
|
+
}
|
|
23
|
+
if (message.filename !== "") {
|
|
24
|
+
writer.uint32(18).string(message.filename);
|
|
25
|
+
}
|
|
26
|
+
if (message.contentType !== "") {
|
|
27
|
+
writer.uint32(26).string(message.contentType);
|
|
28
|
+
}
|
|
29
|
+
if (message.size !== 0) {
|
|
30
|
+
writer.uint32(32).int64(message.size);
|
|
31
|
+
}
|
|
32
|
+
if (message.uploadedAt !== "") {
|
|
33
|
+
writer.uint32(42).string(message.uploadedAt);
|
|
34
|
+
}
|
|
35
|
+
Object.entries(message.customMetadata).forEach(([key, value]) => {
|
|
36
|
+
exports.FileMetadata_CustomMetadataEntry.encode({ key: key, value }, writer.uint32(50).fork()).join();
|
|
37
|
+
});
|
|
38
|
+
return writer;
|
|
39
|
+
},
|
|
40
|
+
decode(input, length) {
|
|
41
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
42
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
43
|
+
const message = createBaseFileMetadata();
|
|
44
|
+
while (reader.pos < end) {
|
|
45
|
+
const tag = reader.uint32();
|
|
46
|
+
switch (tag >>> 3) {
|
|
47
|
+
case 1: {
|
|
48
|
+
if (tag !== 10) {
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
message.key = reader.string();
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
case 2: {
|
|
55
|
+
if (tag !== 18) {
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
message.filename = reader.string();
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
case 3: {
|
|
62
|
+
if (tag !== 26) {
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
message.contentType = reader.string();
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
case 4: {
|
|
69
|
+
if (tag !== 32) {
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
message.size = longToNumber(reader.int64());
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
case 5: {
|
|
76
|
+
if (tag !== 42) {
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
message.uploadedAt = reader.string();
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
case 6: {
|
|
83
|
+
if (tag !== 50) {
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
const entry6 = exports.FileMetadata_CustomMetadataEntry.decode(reader, reader.uint32());
|
|
87
|
+
if (entry6.value !== undefined) {
|
|
88
|
+
message.customMetadata[entry6.key] = entry6.value;
|
|
89
|
+
}
|
|
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 createBaseFileMetadata_CustomMetadataEntry() {
|
|
102
|
+
return { key: "", value: "" };
|
|
103
|
+
}
|
|
104
|
+
exports.FileMetadata_CustomMetadataEntry = {
|
|
105
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
106
|
+
if (message.key !== "") {
|
|
107
|
+
writer.uint32(10).string(message.key);
|
|
108
|
+
}
|
|
109
|
+
if (message.value !== "") {
|
|
110
|
+
writer.uint32(18).string(message.value);
|
|
111
|
+
}
|
|
112
|
+
return writer;
|
|
113
|
+
},
|
|
114
|
+
decode(input, length) {
|
|
115
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
116
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
117
|
+
const message = createBaseFileMetadata_CustomMetadataEntry();
|
|
118
|
+
while (reader.pos < end) {
|
|
119
|
+
const tag = reader.uint32();
|
|
120
|
+
switch (tag >>> 3) {
|
|
121
|
+
case 1: {
|
|
122
|
+
if (tag !== 10) {
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
message.key = reader.string();
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
case 2: {
|
|
129
|
+
if (tag !== 18) {
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
message.value = reader.string();
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
reader.skip(tag & 7);
|
|
140
|
+
}
|
|
141
|
+
return message;
|
|
142
|
+
},
|
|
143
|
+
};
|
|
15
144
|
function createBaseUploadRequest() {
|
|
16
|
-
return { filename: "", content: new Uint8Array(0), metadata: {} };
|
|
145
|
+
return { filename: "", content: new Uint8Array(0), contentType: "", metadata: {} };
|
|
17
146
|
}
|
|
18
147
|
exports.UploadRequest = {
|
|
19
148
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -23,8 +152,11 @@ exports.UploadRequest = {
|
|
|
23
152
|
if (message.content.length !== 0) {
|
|
24
153
|
writer.uint32(18).bytes(message.content);
|
|
25
154
|
}
|
|
155
|
+
if (message.contentType !== "") {
|
|
156
|
+
writer.uint32(26).string(message.contentType);
|
|
157
|
+
}
|
|
26
158
|
Object.entries(message.metadata).forEach(([key, value]) => {
|
|
27
|
-
exports.UploadRequest_MetadataEntry.encode({ key: key, value }, writer.uint32(
|
|
159
|
+
exports.UploadRequest_MetadataEntry.encode({ key: key, value }, writer.uint32(34).fork()).join();
|
|
28
160
|
});
|
|
29
161
|
return writer;
|
|
30
162
|
},
|
|
@@ -53,9 +185,16 @@ exports.UploadRequest = {
|
|
|
53
185
|
if (tag !== 26) {
|
|
54
186
|
break;
|
|
55
187
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
188
|
+
message.contentType = reader.string();
|
|
189
|
+
continue;
|
|
190
|
+
}
|
|
191
|
+
case 4: {
|
|
192
|
+
if (tag !== 34) {
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
195
|
+
const entry4 = exports.UploadRequest_MetadataEntry.decode(reader, reader.uint32());
|
|
196
|
+
if (entry4.value !== undefined) {
|
|
197
|
+
message.metadata[entry4.key] = entry4.value;
|
|
59
198
|
}
|
|
60
199
|
continue;
|
|
61
200
|
}
|
|
@@ -177,14 +316,185 @@ exports.DeleteRequest = {
|
|
|
177
316
|
return message;
|
|
178
317
|
},
|
|
179
318
|
};
|
|
180
|
-
function
|
|
319
|
+
function createBaseGetMetadataRequest() {
|
|
320
|
+
return { fileId: "" };
|
|
321
|
+
}
|
|
322
|
+
exports.GetMetadataRequest = {
|
|
323
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
324
|
+
if (message.fileId !== "") {
|
|
325
|
+
writer.uint32(10).string(message.fileId);
|
|
326
|
+
}
|
|
327
|
+
return writer;
|
|
328
|
+
},
|
|
329
|
+
decode(input, length) {
|
|
330
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
331
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
332
|
+
const message = createBaseGetMetadataRequest();
|
|
333
|
+
while (reader.pos < end) {
|
|
334
|
+
const tag = reader.uint32();
|
|
335
|
+
switch (tag >>> 3) {
|
|
336
|
+
case 1: {
|
|
337
|
+
if (tag !== 10) {
|
|
338
|
+
break;
|
|
339
|
+
}
|
|
340
|
+
message.fileId = reader.string();
|
|
341
|
+
continue;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
345
|
+
break;
|
|
346
|
+
}
|
|
347
|
+
reader.skip(tag & 7);
|
|
348
|
+
}
|
|
349
|
+
return message;
|
|
350
|
+
},
|
|
351
|
+
};
|
|
352
|
+
function createBaseExistsRequest() {
|
|
181
353
|
return { fileId: "" };
|
|
182
354
|
}
|
|
355
|
+
exports.ExistsRequest = {
|
|
356
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
357
|
+
if (message.fileId !== "") {
|
|
358
|
+
writer.uint32(10).string(message.fileId);
|
|
359
|
+
}
|
|
360
|
+
return writer;
|
|
361
|
+
},
|
|
362
|
+
decode(input, length) {
|
|
363
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
364
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
365
|
+
const message = createBaseExistsRequest();
|
|
366
|
+
while (reader.pos < end) {
|
|
367
|
+
const tag = reader.uint32();
|
|
368
|
+
switch (tag >>> 3) {
|
|
369
|
+
case 1: {
|
|
370
|
+
if (tag !== 10) {
|
|
371
|
+
break;
|
|
372
|
+
}
|
|
373
|
+
message.fileId = reader.string();
|
|
374
|
+
continue;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
378
|
+
break;
|
|
379
|
+
}
|
|
380
|
+
reader.skip(tag & 7);
|
|
381
|
+
}
|
|
382
|
+
return message;
|
|
383
|
+
},
|
|
384
|
+
};
|
|
385
|
+
function createBaseListFilesRequest() {
|
|
386
|
+
return { filters: {}, limit: 0, offset: 0 };
|
|
387
|
+
}
|
|
388
|
+
exports.ListFilesRequest = {
|
|
389
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
390
|
+
Object.entries(message.filters).forEach(([key, value]) => {
|
|
391
|
+
exports.ListFilesRequest_FiltersEntry.encode({ key: key, value }, writer.uint32(10).fork()).join();
|
|
392
|
+
});
|
|
393
|
+
if (message.limit !== 0) {
|
|
394
|
+
writer.uint32(16).int32(message.limit);
|
|
395
|
+
}
|
|
396
|
+
if (message.offset !== 0) {
|
|
397
|
+
writer.uint32(24).int32(message.offset);
|
|
398
|
+
}
|
|
399
|
+
return writer;
|
|
400
|
+
},
|
|
401
|
+
decode(input, length) {
|
|
402
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
403
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
404
|
+
const message = createBaseListFilesRequest();
|
|
405
|
+
while (reader.pos < end) {
|
|
406
|
+
const tag = reader.uint32();
|
|
407
|
+
switch (tag >>> 3) {
|
|
408
|
+
case 1: {
|
|
409
|
+
if (tag !== 10) {
|
|
410
|
+
break;
|
|
411
|
+
}
|
|
412
|
+
const entry1 = exports.ListFilesRequest_FiltersEntry.decode(reader, reader.uint32());
|
|
413
|
+
if (entry1.value !== undefined) {
|
|
414
|
+
message.filters[entry1.key] = entry1.value;
|
|
415
|
+
}
|
|
416
|
+
continue;
|
|
417
|
+
}
|
|
418
|
+
case 2: {
|
|
419
|
+
if (tag !== 16) {
|
|
420
|
+
break;
|
|
421
|
+
}
|
|
422
|
+
message.limit = reader.int32();
|
|
423
|
+
continue;
|
|
424
|
+
}
|
|
425
|
+
case 3: {
|
|
426
|
+
if (tag !== 24) {
|
|
427
|
+
break;
|
|
428
|
+
}
|
|
429
|
+
message.offset = reader.int32();
|
|
430
|
+
continue;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
434
|
+
break;
|
|
435
|
+
}
|
|
436
|
+
reader.skip(tag & 7);
|
|
437
|
+
}
|
|
438
|
+
return message;
|
|
439
|
+
},
|
|
440
|
+
};
|
|
441
|
+
function createBaseListFilesRequest_FiltersEntry() {
|
|
442
|
+
return { key: "", value: "" };
|
|
443
|
+
}
|
|
444
|
+
exports.ListFilesRequest_FiltersEntry = {
|
|
445
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
446
|
+
if (message.key !== "") {
|
|
447
|
+
writer.uint32(10).string(message.key);
|
|
448
|
+
}
|
|
449
|
+
if (message.value !== "") {
|
|
450
|
+
writer.uint32(18).string(message.value);
|
|
451
|
+
}
|
|
452
|
+
return writer;
|
|
453
|
+
},
|
|
454
|
+
decode(input, length) {
|
|
455
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
456
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
457
|
+
const message = createBaseListFilesRequest_FiltersEntry();
|
|
458
|
+
while (reader.pos < end) {
|
|
459
|
+
const tag = reader.uint32();
|
|
460
|
+
switch (tag >>> 3) {
|
|
461
|
+
case 1: {
|
|
462
|
+
if (tag !== 10) {
|
|
463
|
+
break;
|
|
464
|
+
}
|
|
465
|
+
message.key = reader.string();
|
|
466
|
+
continue;
|
|
467
|
+
}
|
|
468
|
+
case 2: {
|
|
469
|
+
if (tag !== 18) {
|
|
470
|
+
break;
|
|
471
|
+
}
|
|
472
|
+
message.value = reader.string();
|
|
473
|
+
continue;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
477
|
+
break;
|
|
478
|
+
}
|
|
479
|
+
reader.skip(tag & 7);
|
|
480
|
+
}
|
|
481
|
+
return message;
|
|
482
|
+
},
|
|
483
|
+
};
|
|
484
|
+
function createBaseUploadResponse() {
|
|
485
|
+
return { fileId: "", url: "" };
|
|
486
|
+
}
|
|
183
487
|
exports.UploadResponse = {
|
|
184
488
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
185
489
|
if (message.fileId !== "") {
|
|
186
490
|
writer.uint32(10).string(message.fileId);
|
|
187
491
|
}
|
|
492
|
+
if (message.url !== "") {
|
|
493
|
+
writer.uint32(18).string(message.url);
|
|
494
|
+
}
|
|
495
|
+
if (message.metadata !== undefined) {
|
|
496
|
+
exports.FileMetadata.encode(message.metadata, writer.uint32(26).fork()).join();
|
|
497
|
+
}
|
|
188
498
|
return writer;
|
|
189
499
|
},
|
|
190
500
|
decode(input, length) {
|
|
@@ -201,6 +511,20 @@ exports.UploadResponse = {
|
|
|
201
511
|
message.fileId = reader.string();
|
|
202
512
|
continue;
|
|
203
513
|
}
|
|
514
|
+
case 2: {
|
|
515
|
+
if (tag !== 18) {
|
|
516
|
+
break;
|
|
517
|
+
}
|
|
518
|
+
message.url = reader.string();
|
|
519
|
+
continue;
|
|
520
|
+
}
|
|
521
|
+
case 3: {
|
|
522
|
+
if (tag !== 26) {
|
|
523
|
+
break;
|
|
524
|
+
}
|
|
525
|
+
message.metadata = exports.FileMetadata.decode(reader, reader.uint32());
|
|
526
|
+
continue;
|
|
527
|
+
}
|
|
204
528
|
}
|
|
205
529
|
if ((tag & 7) === 4 || tag === 0) {
|
|
206
530
|
break;
|
|
@@ -211,7 +535,7 @@ exports.UploadResponse = {
|
|
|
211
535
|
},
|
|
212
536
|
};
|
|
213
537
|
function createBaseDownloadResponse() {
|
|
214
|
-
return { content: new Uint8Array(0), filename: "" };
|
|
538
|
+
return { content: new Uint8Array(0), filename: "", contentType: "" };
|
|
215
539
|
}
|
|
216
540
|
exports.DownloadResponse = {
|
|
217
541
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -221,6 +545,9 @@ exports.DownloadResponse = {
|
|
|
221
545
|
if (message.filename !== "") {
|
|
222
546
|
writer.uint32(18).string(message.filename);
|
|
223
547
|
}
|
|
548
|
+
if (message.contentType !== "") {
|
|
549
|
+
writer.uint32(26).string(message.contentType);
|
|
550
|
+
}
|
|
224
551
|
return writer;
|
|
225
552
|
},
|
|
226
553
|
decode(input, length) {
|
|
@@ -244,6 +571,13 @@ exports.DownloadResponse = {
|
|
|
244
571
|
message.filename = reader.string();
|
|
245
572
|
continue;
|
|
246
573
|
}
|
|
574
|
+
case 3: {
|
|
575
|
+
if (tag !== 26) {
|
|
576
|
+
break;
|
|
577
|
+
}
|
|
578
|
+
message.contentType = reader.string();
|
|
579
|
+
continue;
|
|
580
|
+
}
|
|
247
581
|
}
|
|
248
582
|
if ((tag & 7) === 4 || tag === 0) {
|
|
249
583
|
break;
|
|
@@ -286,9 +620,118 @@ exports.DeleteResponse = {
|
|
|
286
620
|
return message;
|
|
287
621
|
},
|
|
288
622
|
};
|
|
623
|
+
function createBaseGetMetadataResponse() {
|
|
624
|
+
return {};
|
|
625
|
+
}
|
|
626
|
+
exports.GetMetadataResponse = {
|
|
627
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
628
|
+
if (message.metadata !== undefined) {
|
|
629
|
+
exports.FileMetadata.encode(message.metadata, writer.uint32(10).fork()).join();
|
|
630
|
+
}
|
|
631
|
+
return writer;
|
|
632
|
+
},
|
|
633
|
+
decode(input, length) {
|
|
634
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
635
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
636
|
+
const message = createBaseGetMetadataResponse();
|
|
637
|
+
while (reader.pos < end) {
|
|
638
|
+
const tag = reader.uint32();
|
|
639
|
+
switch (tag >>> 3) {
|
|
640
|
+
case 1: {
|
|
641
|
+
if (tag !== 10) {
|
|
642
|
+
break;
|
|
643
|
+
}
|
|
644
|
+
message.metadata = exports.FileMetadata.decode(reader, reader.uint32());
|
|
645
|
+
continue;
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
649
|
+
break;
|
|
650
|
+
}
|
|
651
|
+
reader.skip(tag & 7);
|
|
652
|
+
}
|
|
653
|
+
return message;
|
|
654
|
+
},
|
|
655
|
+
};
|
|
656
|
+
function createBaseExistsResponse() {
|
|
657
|
+
return { exists: false };
|
|
658
|
+
}
|
|
659
|
+
exports.ExistsResponse = {
|
|
660
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
661
|
+
if (message.exists !== false) {
|
|
662
|
+
writer.uint32(8).bool(message.exists);
|
|
663
|
+
}
|
|
664
|
+
return writer;
|
|
665
|
+
},
|
|
666
|
+
decode(input, length) {
|
|
667
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
668
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
669
|
+
const message = createBaseExistsResponse();
|
|
670
|
+
while (reader.pos < end) {
|
|
671
|
+
const tag = reader.uint32();
|
|
672
|
+
switch (tag >>> 3) {
|
|
673
|
+
case 1: {
|
|
674
|
+
if (tag !== 8) {
|
|
675
|
+
break;
|
|
676
|
+
}
|
|
677
|
+
message.exists = reader.bool();
|
|
678
|
+
continue;
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
682
|
+
break;
|
|
683
|
+
}
|
|
684
|
+
reader.skip(tag & 7);
|
|
685
|
+
}
|
|
686
|
+
return message;
|
|
687
|
+
},
|
|
688
|
+
};
|
|
689
|
+
function createBaseListFilesResponse() {
|
|
690
|
+
return { files: [], total: 0 };
|
|
691
|
+
}
|
|
692
|
+
exports.ListFilesResponse = {
|
|
693
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
694
|
+
for (const v of message.files) {
|
|
695
|
+
exports.FileMetadata.encode(v, writer.uint32(10).fork()).join();
|
|
696
|
+
}
|
|
697
|
+
if (message.total !== 0) {
|
|
698
|
+
writer.uint32(16).int32(message.total);
|
|
699
|
+
}
|
|
700
|
+
return writer;
|
|
701
|
+
},
|
|
702
|
+
decode(input, length) {
|
|
703
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
704
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
705
|
+
const message = createBaseListFilesResponse();
|
|
706
|
+
while (reader.pos < end) {
|
|
707
|
+
const tag = reader.uint32();
|
|
708
|
+
switch (tag >>> 3) {
|
|
709
|
+
case 1: {
|
|
710
|
+
if (tag !== 10) {
|
|
711
|
+
break;
|
|
712
|
+
}
|
|
713
|
+
message.files.push(exports.FileMetadata.decode(reader, reader.uint32()));
|
|
714
|
+
continue;
|
|
715
|
+
}
|
|
716
|
+
case 2: {
|
|
717
|
+
if (tag !== 16) {
|
|
718
|
+
break;
|
|
719
|
+
}
|
|
720
|
+
message.total = reader.int32();
|
|
721
|
+
continue;
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
725
|
+
break;
|
|
726
|
+
}
|
|
727
|
+
reader.skip(tag & 7);
|
|
728
|
+
}
|
|
729
|
+
return message;
|
|
730
|
+
},
|
|
731
|
+
};
|
|
289
732
|
function StorageServiceControllerMethods() {
|
|
290
733
|
return function (constructor) {
|
|
291
|
-
const grpcMethods = ["upload", "download", "delete"];
|
|
734
|
+
const grpcMethods = ["upload", "download", "delete", "getMetadata", "exists", "listFiles"];
|
|
292
735
|
for (const method of grpcMethods) {
|
|
293
736
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
294
737
|
(0, microservices_1.GrpcMethod)("StorageService", method)(constructor.prototype[method], method, descriptor);
|
|
@@ -329,4 +772,41 @@ exports.StorageServiceService = {
|
|
|
329
772
|
responseSerialize: (value) => Buffer.from(exports.DeleteResponse.encode(value).finish()),
|
|
330
773
|
responseDeserialize: (value) => exports.DeleteResponse.decode(value),
|
|
331
774
|
},
|
|
775
|
+
getMetadata: {
|
|
776
|
+
path: "/storage.StorageService/getMetadata",
|
|
777
|
+
requestStream: false,
|
|
778
|
+
responseStream: false,
|
|
779
|
+
requestSerialize: (value) => Buffer.from(exports.GetMetadataRequest.encode(value).finish()),
|
|
780
|
+
requestDeserialize: (value) => exports.GetMetadataRequest.decode(value),
|
|
781
|
+
responseSerialize: (value) => Buffer.from(exports.GetMetadataResponse.encode(value).finish()),
|
|
782
|
+
responseDeserialize: (value) => exports.GetMetadataResponse.decode(value),
|
|
783
|
+
},
|
|
784
|
+
exists: {
|
|
785
|
+
path: "/storage.StorageService/exists",
|
|
786
|
+
requestStream: false,
|
|
787
|
+
responseStream: false,
|
|
788
|
+
requestSerialize: (value) => Buffer.from(exports.ExistsRequest.encode(value).finish()),
|
|
789
|
+
requestDeserialize: (value) => exports.ExistsRequest.decode(value),
|
|
790
|
+
responseSerialize: (value) => Buffer.from(exports.ExistsResponse.encode(value).finish()),
|
|
791
|
+
responseDeserialize: (value) => exports.ExistsResponse.decode(value),
|
|
792
|
+
},
|
|
793
|
+
listFiles: {
|
|
794
|
+
path: "/storage.StorageService/listFiles",
|
|
795
|
+
requestStream: false,
|
|
796
|
+
responseStream: false,
|
|
797
|
+
requestSerialize: (value) => Buffer.from(exports.ListFilesRequest.encode(value).finish()),
|
|
798
|
+
requestDeserialize: (value) => exports.ListFilesRequest.decode(value),
|
|
799
|
+
responseSerialize: (value) => Buffer.from(exports.ListFilesResponse.encode(value).finish()),
|
|
800
|
+
responseDeserialize: (value) => exports.ListFilesResponse.decode(value),
|
|
801
|
+
},
|
|
332
802
|
};
|
|
803
|
+
function longToNumber(int64) {
|
|
804
|
+
const num = globalThis.Number(int64.toString());
|
|
805
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
806
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
807
|
+
}
|
|
808
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
809
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
810
|
+
}
|
|
811
|
+
return num;
|
|
812
|
+
}
|