@trash-streamers/contracts 1.1.6 → 1.1.8
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/ts/users.d.ts +42 -0
- package/dist/gen/ts/users.js +28 -0
- package/package.json +2 -2
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
export declare const protobufPackage = "users.v1";
|
|
3
|
+
export interface GetMeRequest {
|
|
4
|
+
id: string;
|
|
5
|
+
}
|
|
6
|
+
export interface GetMeResponse {
|
|
7
|
+
user: User | undefined;
|
|
8
|
+
}
|
|
9
|
+
export interface CreateUserRequest {
|
|
10
|
+
id: string;
|
|
11
|
+
}
|
|
12
|
+
export interface CreateUserResponse {
|
|
13
|
+
ok: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface PatchUserRequest {
|
|
16
|
+
userId: string;
|
|
17
|
+
name?: string | undefined;
|
|
18
|
+
avatar?: string | undefined;
|
|
19
|
+
}
|
|
20
|
+
export interface PatchUserResponse {
|
|
21
|
+
ok: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface User {
|
|
24
|
+
id: string;
|
|
25
|
+
name?: string | undefined;
|
|
26
|
+
phone?: string | undefined;
|
|
27
|
+
email?: string | undefined;
|
|
28
|
+
avatar?: string | undefined;
|
|
29
|
+
}
|
|
30
|
+
export declare const USERS_V1_PACKAGE_NAME = "users.v1";
|
|
31
|
+
export interface UsersServiceClient {
|
|
32
|
+
getMe(request: GetMeRequest): Observable<GetMeResponse>;
|
|
33
|
+
createUser(request: CreateUserRequest): Observable<CreateUserResponse>;
|
|
34
|
+
patchUser(request: PatchUserRequest): Observable<PatchUserResponse>;
|
|
35
|
+
}
|
|
36
|
+
export interface UsersServiceController {
|
|
37
|
+
getMe(request: GetMeRequest): Promise<GetMeResponse> | Observable<GetMeResponse> | GetMeResponse;
|
|
38
|
+
createUser(request: CreateUserRequest): Promise<CreateUserResponse> | Observable<CreateUserResponse> | CreateUserResponse;
|
|
39
|
+
patchUser(request: PatchUserRequest): Promise<PatchUserResponse> | Observable<PatchUserResponse> | PatchUserResponse;
|
|
40
|
+
}
|
|
41
|
+
export declare function UsersServiceControllerMethods(): (constructor: Function) => void;
|
|
42
|
+
export declare const USERS_SERVICE_NAME = "UsersService";
|
|
@@ -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.10.1
|
|
5
|
+
// protoc v6.33.2
|
|
6
|
+
// source: users.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.USERS_SERVICE_NAME = exports.USERS_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
|
+
exports.UsersServiceControllerMethods = UsersServiceControllerMethods;
|
|
10
|
+
/* eslint-disable */
|
|
11
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
12
|
+
exports.protobufPackage = "users.v1";
|
|
13
|
+
exports.USERS_V1_PACKAGE_NAME = "users.v1";
|
|
14
|
+
function UsersServiceControllerMethods() {
|
|
15
|
+
return function (constructor) {
|
|
16
|
+
const grpcMethods = ["getMe", "createUser", "patchUser"];
|
|
17
|
+
for (const method of grpcMethods) {
|
|
18
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
19
|
+
(0, microservices_1.GrpcMethod)("UsersService", 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)("UsersService", method)(constructor.prototype[method], method, descriptor);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
exports.USERS_SERVICE_NAME = "UsersService";
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trash-streamers/contracts",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.8",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "tsc -p tsconfig.build.json",
|
|
8
|
-
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./src/gen/ts --ts_proto_opt=nestJs=true,package=omit"
|
|
8
|
+
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./src/gen/ts --ts_proto_opt=nestJs=true,package=omit,useEnumValuesAsString=true"
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"dist",
|