@ciganov/contracts 1.1.21 → 1.1.23
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/gen/media.d.ts +27 -0
- package/dist/gen/media.js +1 -1
- package/dist/gen/odd.d.ts +5 -0
- package/dist/gen/odd.js +1 -0
- package/dist/proto/contracts/media.proto +31 -0
- package/dist/proto/contracts/odd.proto +5 -0
- package/package.json +1 -1
package/dist/gen/media.d.ts
CHANGED
|
@@ -9,12 +9,39 @@ export interface UploadAvatarRequest {
|
|
|
9
9
|
export interface UploadAvatarResponse {
|
|
10
10
|
fileId: string;
|
|
11
11
|
}
|
|
12
|
+
export interface DeleteAvatarRequest {
|
|
13
|
+
userId: string;
|
|
14
|
+
}
|
|
15
|
+
export interface DeleteAvatarResponse {
|
|
16
|
+
ok: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface UploadFileRequest {
|
|
19
|
+
file: Uint8Array;
|
|
20
|
+
filename: string;
|
|
21
|
+
contentType: string;
|
|
22
|
+
category: string;
|
|
23
|
+
}
|
|
24
|
+
export interface UploadFileResponse {
|
|
25
|
+
fileId: string;
|
|
26
|
+
}
|
|
27
|
+
export interface GetFileRequest {
|
|
28
|
+
fileId: string;
|
|
29
|
+
}
|
|
30
|
+
export interface GetFileResponse {
|
|
31
|
+
url: string;
|
|
32
|
+
}
|
|
12
33
|
export declare const MEDIA_V1_PACKAGE_NAME = "media.v1";
|
|
13
34
|
export interface MediaServiceClient {
|
|
14
35
|
uploadAvatar(request: UploadAvatarRequest): Observable<UploadAvatarResponse>;
|
|
36
|
+
deleteAvatar(request: DeleteAvatarRequest): Observable<DeleteAvatarResponse>;
|
|
37
|
+
uploadFile(request: UploadFileRequest): Observable<UploadFileResponse>;
|
|
38
|
+
getFile(request: GetFileRequest): Observable<GetFileResponse>;
|
|
15
39
|
}
|
|
16
40
|
export interface MediaServiceController {
|
|
17
41
|
uploadAvatar(request: UploadAvatarRequest): Promise<UploadAvatarResponse> | Observable<UploadAvatarResponse> | UploadAvatarResponse;
|
|
42
|
+
deleteAvatar(request: DeleteAvatarRequest): Promise<DeleteAvatarResponse> | Observable<DeleteAvatarResponse> | DeleteAvatarResponse;
|
|
43
|
+
uploadFile(request: UploadFileRequest): Promise<UploadFileResponse> | Observable<UploadFileResponse> | UploadFileResponse;
|
|
44
|
+
getFile(request: GetFileRequest): Promise<GetFileResponse> | Observable<GetFileResponse> | GetFileResponse;
|
|
18
45
|
}
|
|
19
46
|
export declare function MediaServiceControllerMethods(): (constructor: Function) => void;
|
|
20
47
|
export declare const MEDIA_SERVICE_NAME = "MediaService";
|
package/dist/gen/media.js
CHANGED
|
@@ -13,7 +13,7 @@ exports.protobufPackage = "media.v1";
|
|
|
13
13
|
exports.MEDIA_V1_PACKAGE_NAME = "media.v1";
|
|
14
14
|
function MediaServiceControllerMethods() {
|
|
15
15
|
return function (constructor) {
|
|
16
|
-
const grpcMethods = ["uploadAvatar"];
|
|
16
|
+
const grpcMethods = ["uploadAvatar", "deleteAvatar", "uploadFile", "getFile"];
|
|
17
17
|
for (const method of grpcMethods) {
|
|
18
18
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
19
19
|
(0, microservices_1.GrpcMethod)("MediaService", method)(constructor.prototype[method], method, descriptor);
|
package/dist/gen/odd.d.ts
CHANGED
|
@@ -13,6 +13,9 @@ export declare enum EventStatus {
|
|
|
13
13
|
export interface GetRandomEventsRequest {
|
|
14
14
|
randomCount: number;
|
|
15
15
|
}
|
|
16
|
+
export interface GetEventsResponse {
|
|
17
|
+
events: Event[];
|
|
18
|
+
}
|
|
16
19
|
export interface GetRandomEventsResponse {
|
|
17
20
|
events: Event[];
|
|
18
21
|
}
|
|
@@ -123,6 +126,7 @@ export interface OddServiceClient {
|
|
|
123
126
|
getCategories(request: Empty): Observable<GetCategoriesResponse>;
|
|
124
127
|
createEvent(request: CreateEventRequest): Observable<CreateEventResponse>;
|
|
125
128
|
getEvent(request: GetEventRequest): Observable<GetEventResponse>;
|
|
129
|
+
getEvents(request: Empty): Observable<GetEventsResponse>;
|
|
126
130
|
getEventsByCategory(request: GetEventsByCategoryRequest): Observable<GetEventsByCategoryResponse>;
|
|
127
131
|
switchEventLiveState(request: SwitchEventLiveStateRequest): Observable<SwitchEventLiveStateResponse>;
|
|
128
132
|
createOutcome(request: CreateOutcomeRequest): Observable<CreateOutcomeResponse>;
|
|
@@ -137,6 +141,7 @@ export interface OddServiceController {
|
|
|
137
141
|
getCategories(request: Empty): Promise<GetCategoriesResponse> | Observable<GetCategoriesResponse> | GetCategoriesResponse;
|
|
138
142
|
createEvent(request: CreateEventRequest): Promise<CreateEventResponse> | Observable<CreateEventResponse> | CreateEventResponse;
|
|
139
143
|
getEvent(request: GetEventRequest): Promise<GetEventResponse> | Observable<GetEventResponse> | GetEventResponse;
|
|
144
|
+
getEvents(request: Empty): Promise<GetEventsResponse> | Observable<GetEventsResponse> | GetEventsResponse;
|
|
140
145
|
getEventsByCategory(request: GetEventsByCategoryRequest): Promise<GetEventsByCategoryResponse> | Observable<GetEventsByCategoryResponse> | GetEventsByCategoryResponse;
|
|
141
146
|
switchEventLiveState(request: SwitchEventLiveStateRequest): Promise<SwitchEventLiveStateResponse> | Observable<SwitchEventLiveStateResponse> | SwitchEventLiveStateResponse;
|
|
142
147
|
createOutcome(request: CreateOutcomeRequest): Promise<CreateOutcomeResponse> | Observable<CreateOutcomeResponse> | CreateOutcomeResponse;
|
package/dist/gen/odd.js
CHANGED
|
@@ -6,6 +6,10 @@ option go_package = "github.com/ciganov-net/backend-media-service/gen/media";
|
|
|
6
6
|
|
|
7
7
|
service MediaService {
|
|
8
8
|
rpc UploadAvatar(UploadAvatarRequest) returns (UploadAvatarResponse);
|
|
9
|
+
rpc DeleteAvatar(DeleteAvatarRequest) returns (DeleteAvatarResponse);
|
|
10
|
+
|
|
11
|
+
rpc UploadFile(UploadFileRequest) returns (UploadFileResponse);
|
|
12
|
+
rpc GetFile(GetFileRequest) returns (GetFileResponse);
|
|
9
13
|
}
|
|
10
14
|
|
|
11
15
|
message UploadAvatarRequest {
|
|
@@ -17,4 +21,31 @@ message UploadAvatarRequest {
|
|
|
17
21
|
|
|
18
22
|
message UploadAvatarResponse {
|
|
19
23
|
string file_id = 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
message DeleteAvatarRequest {
|
|
27
|
+
string user_id = 1;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
message DeleteAvatarResponse {
|
|
31
|
+
bool ok = 1;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
message UploadFileRequest {
|
|
35
|
+
bytes file = 1;
|
|
36
|
+
string filename = 2;
|
|
37
|
+
string content_type = 3;
|
|
38
|
+
string category = 4;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
message UploadFileResponse {
|
|
42
|
+
string file_id = 1;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
message GetFileRequest {
|
|
46
|
+
string file_id = 1;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
message GetFileResponse {
|
|
50
|
+
string url = 1;
|
|
20
51
|
}
|
|
@@ -11,6 +11,7 @@ service OddService {
|
|
|
11
11
|
rpc GetCategories(google.protobuf.Empty) returns (GetCategoriesResponse);
|
|
12
12
|
rpc CreateEvent(CreateEventRequest) returns (CreateEventResponse);
|
|
13
13
|
rpc GetEvent(GetEventRequest) returns (GetEventResponse);
|
|
14
|
+
rpc GetEvents(google.protobuf.Empty) returns (GetEventsResponse);
|
|
14
15
|
rpc GetEventsByCategory(GetEventsByCategoryRequest) returns (GetEventsByCategoryResponse);
|
|
15
16
|
rpc SwitchEventLiveState(SwitchEventLiveStateRequest) returns (SwitchEventLiveStateResponse);
|
|
16
17
|
rpc CreateOutcome(CreateOutcomeRequest) returns (CreateOutcomeResponse);
|
|
@@ -24,6 +25,10 @@ message GetRandomEventsRequest {
|
|
|
24
25
|
int32 randomCount = 1;
|
|
25
26
|
}
|
|
26
27
|
|
|
28
|
+
message GetEventsResponse {
|
|
29
|
+
repeated Event events = 1;
|
|
30
|
+
}
|
|
31
|
+
|
|
27
32
|
message GetRandomEventsResponse {
|
|
28
33
|
repeated Event events = 1;
|
|
29
34
|
}
|