@ciganov/contracts 1.1.11 → 1.1.12

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.
@@ -0,0 +1,19 @@
1
+ import { Observable } from "rxjs";
2
+ export declare const protobufPackage = "media.v1";
3
+ export interface UploadAvatarRequest {
4
+ file: Uint8Array;
5
+ filename: string;
6
+ contentType: string;
7
+ }
8
+ export interface UploadAvatarResponse {
9
+ url: string;
10
+ }
11
+ export declare const MEDIA_V1_PACKAGE_NAME = "media.v1";
12
+ export interface MediaServiceClient {
13
+ uploadAvatar(request: UploadAvatarRequest): Observable<UploadAvatarResponse>;
14
+ }
15
+ export interface MediaServiceController {
16
+ uploadAvatar(request: UploadAvatarRequest): Promise<UploadAvatarResponse> | Observable<UploadAvatarResponse> | UploadAvatarResponse;
17
+ }
18
+ export declare function MediaServiceControllerMethods(): (constructor: Function) => void;
19
+ export declare const MEDIA_SERVICE_NAME = "MediaService";
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.11.6
5
+ // protoc v3.21.12
6
+ // source: media.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.MEDIA_SERVICE_NAME = exports.MEDIA_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
9
+ exports.MediaServiceControllerMethods = MediaServiceControllerMethods;
10
+ /* eslint-disable */
11
+ const microservices_1 = require("@nestjs/microservices");
12
+ exports.protobufPackage = "media.v1";
13
+ exports.MEDIA_V1_PACKAGE_NAME = "media.v1";
14
+ function MediaServiceControllerMethods() {
15
+ return function (constructor) {
16
+ const grpcMethods = ["uploadAvatar"];
17
+ for (const method of grpcMethods) {
18
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
19
+ (0, microservices_1.GrpcMethod)("MediaService", method)(constructor.prototype[method], method, descriptor);
20
+ }
21
+ const grpcStreamMethods = [];
22
+ for (const method of grpcStreamMethods) {
23
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
24
+ (0, microservices_1.GrpcStreamMethod)("MediaService", method)(constructor.prototype[method], method, descriptor);
25
+ }
26
+ };
27
+ }
28
+ exports.MEDIA_SERVICE_NAME = "MediaService";
@@ -0,0 +1,17 @@
1
+ syntax = "proto3";
2
+
3
+ package media.v1;
4
+
5
+ service MediaService {
6
+ rpc UploadAvatar(UploadAvatarRequest) returns (UploadAvatarResponse);
7
+ }
8
+
9
+ message UploadAvatarRequest {
10
+ bytes file = 1;
11
+ string filename = 2;
12
+ string content_type = 3;
13
+ }
14
+
15
+ message UploadAvatarResponse {
16
+ string url = 1;
17
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ciganov/contracts",
3
- "version": "1.1.11",
3
+ "version": "1.1.12",
4
4
  "description": "Protobuf definitions and generated ts types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",