@sync-chat/contracts 1.0.4 → 1.1.0

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,49 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.8
4
+ // protoc v3.21.12
5
+ // source: auth/auth.proto
6
+
7
+ /* eslint-disable */
8
+ import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
+ import { Observable } from "rxjs";
10
+
11
+ export const protobufPackage = "auth.v1";
12
+
13
+ export interface RegisterRequest {
14
+ email: string;
15
+ password: string;
16
+ userName: string;
17
+ userDesc: string;
18
+ }
19
+
20
+ export interface RegisterResponse {
21
+ message: string;
22
+ }
23
+
24
+ export const AUTH_V1_PACKAGE_NAME = "auth.v1";
25
+
26
+ export interface AuthServiceClient {
27
+ register(request: RegisterRequest): Observable<RegisterResponse>;
28
+ }
29
+
30
+ export interface AuthServiceController {
31
+ register(request: RegisterRequest): Promise<RegisterResponse> | Observable<RegisterResponse> | RegisterResponse;
32
+ }
33
+
34
+ export function AuthServiceControllerMethods() {
35
+ return function (constructor: Function) {
36
+ const grpcMethods: string[] = ["register"];
37
+ for (const method of grpcMethods) {
38
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
39
+ GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
40
+ }
41
+ const grpcStreamMethods: string[] = [];
42
+ for (const method of grpcStreamMethods) {
43
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
44
+ GrpcStreamMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
45
+ }
46
+ };
47
+ }
48
+
49
+ export const AUTH_SERVICE_NAME = "AuthService";
package/generated/auth.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.11.8
4
- // protoc v3.21.12
4
+ // protoc v7.34.1
5
5
  // source: auth.proto
6
6
 
7
7
  /* eslint-disable */
@@ -10,23 +10,23 @@ import { Observable } from "rxjs";
10
10
 
11
11
  export const protobufPackage = "auth.v1";
12
12
 
13
- export interface SendOtpRequest {
13
+ export interface SendOTPRequest {
14
14
  identifier: string;
15
15
  type: string;
16
16
  }
17
17
 
18
- export interface SendOtpResponse {
18
+ export interface SendOTPResponse {
19
19
  ok: boolean;
20
20
  }
21
21
 
22
22
  export const AUTH_V1_PACKAGE_NAME = "auth.v1";
23
23
 
24
24
  export interface AuthServiceClient {
25
- sendOtp(request: SendOtpRequest): Observable<SendOtpResponse>;
25
+ sendOtp(request: SendOTPRequest): Observable<SendOTPResponse>;
26
26
  }
27
27
 
28
28
  export interface AuthServiceController {
29
- sendOtp(request: SendOtpRequest): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse;
29
+ sendOtp(request: SendOTPRequest): Promise<SendOTPResponse> | Observable<SendOTPResponse> | SendOTPResponse;
30
30
  }
31
31
 
32
32
  export function AuthServiceControllerMethods() {
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@sync-chat/contracts",
3
- "version": "1.0.4",
3
+ "version": "1.1.0",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "scripts": {
6
- "generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./generated --ts_proto_opt=nestJs=true,package=omit"
6
+ "generate": "protoc -I ./proto ./proto/**/*.proto --ts_proto_out=./generated --ts_proto_opt=nestJs=true,package=omit"
7
7
  },
8
8
  "files": [
9
9
  "proto",
@@ -0,0 +1,17 @@
1
+ syntax = "proto3";
2
+ package auth.v1;
3
+
4
+ service AuthService {
5
+ rpc Register(RegisterRequest) returns (RegisterResponse);
6
+ }
7
+
8
+ message RegisterRequest {
9
+ string email = 1;
10
+ string password = 2;
11
+ string userName = 3;
12
+ string userDesc = 4;
13
+ }
14
+
15
+ message RegisterResponse {
16
+ string message = 1;
17
+ }
package/proto/auth.proto DELETED
@@ -1,15 +0,0 @@
1
- syntax = "proto3";
2
- package auth.v1;
3
-
4
- service AuthService {
5
- rpc SendOtp(SendOtpRequest) returns (SendOtpResponse);
6
- }
7
-
8
- message SendOtpRequest {
9
- string identifier = 1;
10
- string type = 2;
11
- }
12
-
13
- message SendOtpResponse {
14
- bool ok = 1;
15
- }