@vsniksnet/contracts 1.2.4 → 1.2.5

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/gen/media.ts CHANGED
@@ -10,14 +10,13 @@ import { Observable } from "rxjs";
10
10
 
11
11
  export const protobufPackage = "media.v1";
12
12
 
13
- export interface UploadRequest {
13
+ export interface UploadAvatarRequest {
14
14
  fileName: string;
15
15
  contentType: string;
16
16
  data: Uint8Array;
17
- folder?: string | undefined;
18
17
  }
19
18
 
20
- export interface UploadResponse {
19
+ export interface UploadAvatarResponse {
21
20
  path: string;
22
21
  }
23
22
 
@@ -26,22 +25,24 @@ export const MEDIA_V1_PACKAGE_NAME = "media.v1";
26
25
  /** Media service */
27
26
 
28
27
  export interface MediaServiceClient {
29
- /** Upload media file */
28
+ /** Upload avatar file */
30
29
 
31
- upload(request: UploadRequest): Observable<UploadResponse>;
30
+ uploadAvatar(request: UploadAvatarRequest): Observable<UploadAvatarResponse>;
32
31
  }
33
32
 
34
33
  /** Media service */
35
34
 
36
35
  export interface MediaServiceController {
37
- /** Upload media file */
36
+ /** Upload avatar file */
38
37
 
39
- upload(request: UploadRequest): Promise<UploadResponse> | Observable<UploadResponse> | UploadResponse;
38
+ uploadAvatar(
39
+ request: UploadAvatarRequest,
40
+ ): Promise<UploadAvatarResponse> | Observable<UploadAvatarResponse> | UploadAvatarResponse;
40
41
  }
41
42
 
42
43
  export function MediaServiceControllerMethods() {
43
44
  return function (constructor: Function) {
44
- const grpcMethods: string[] = ["upload"];
45
+ const grpcMethods: string[] = ["uploadAvatar"];
45
46
  for (const method of grpcMethods) {
46
47
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
47
48
  GrpcMethod("MediaService", method)(constructor.prototype[method], method, descriptor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vsniksnet/contracts",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "Protobuf definitions and generated typescript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
package/proto/media.proto CHANGED
@@ -4,17 +4,16 @@ package media.v1;
4
4
 
5
5
  /* Media service */
6
6
  service MediaService {
7
- /* Upload media file */
8
- rpc Upload (UploadRequest) returns (UploadResponse);
7
+ /* Upload avatar file */
8
+ rpc UploadAvatar (UploadAvatarRequest) returns (UploadAvatarResponse);
9
9
  }
10
10
 
11
- message UploadRequest {
11
+ message UploadAvatarRequest {
12
12
  string file_name = 1;
13
13
  string content_type = 2;
14
14
  bytes data = 3;
15
- optional string folder = 4;
16
15
  }
17
16
 
18
- message UploadResponse {
17
+ message UploadAvatarResponse {
19
18
  string path = 1;
20
19
  }