@cinema-mc/contacts 1.0.0 → 1.0.2

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/auth.ts CHANGED
@@ -19,6 +19,17 @@ export interface SendOtpResponse {
19
19
  ok: boolean;
20
20
  }
21
21
 
22
+ export interface VerifyOtpRequest {
23
+ identifier: string;
24
+ type: string;
25
+ code: string;
26
+ }
27
+
28
+ export interface VerifyOtpResponse {
29
+ accessToken: string;
30
+ refreshToken: string;
31
+ }
32
+
22
33
  export const AUTH_V1_PACKAGE_NAME = "auth.v1";
23
34
 
24
35
  /** Authorization service */
@@ -27,6 +38,10 @@ export interface AuthServiceClient {
27
38
  /** Sends an OTP (One-Time Password) to the specified identifier */
28
39
 
29
40
  sendOtp(request: SendOtpRequest): Observable<SendOtpResponse>;
41
+
42
+ /** VerifyOtp */
43
+
44
+ verifyOtp(request: VerifyOtpRequest): Observable<VerifyOtpResponse>;
30
45
  }
31
46
 
32
47
  /** Authorization service */
@@ -35,11 +50,15 @@ export interface AuthServiceController {
35
50
  /** Sends an OTP (One-Time Password) to the specified identifier */
36
51
 
37
52
  sendOtp(request: SendOtpRequest): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse;
53
+
54
+ /** VerifyOtp */
55
+
56
+ verifyOtp(request: VerifyOtpRequest): Promise<VerifyOtpResponse> | Observable<VerifyOtpResponse> | VerifyOtpResponse;
38
57
  }
39
58
 
40
59
  export function AuthServiceControllerMethods() {
41
60
  return function (constructor: Function) {
42
- const grpcMethods: string[] = ["sendOtp"];
61
+ const grpcMethods: string[] = ["sendOtp", "verifyOtp"];
43
62
  for (const method of grpcMethods) {
44
63
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
45
64
  GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
package/package.json CHANGED
@@ -1,9 +1,11 @@
1
1
  {
2
2
  "name": "@cinema-mc/contacts",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Protobuf definitions and generated code for contacts service",
5
- "main": "index.js",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
6
7
  "scripts": {
8
+ "build": "tsc -p tsconfig.build.json",
7
9
  "generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
8
10
  },
9
11
  "files": [
@@ -17,5 +19,9 @@
17
19
  "@nestjs/microservices": "^11.1.11",
18
20
  "rxjs": "^7.8.2",
19
21
  "ts-proto": "^2.10.1"
22
+ },
23
+ "devDependencies": {
24
+ "@types/node": "^25.0.8",
25
+ "typescript": "^5.9.3"
20
26
  }
21
27
  }
package/proto/auth.proto CHANGED
@@ -6,6 +6,8 @@ package auth.v1;
6
6
  service AuthService {
7
7
  // Sends an OTP (One-Time Password) to the specified identifier
8
8
  rpc SendOtp (SendOtpRequest) returns (SendOtpResponse);
9
+ //VerifyOtp
10
+ rpc VerifyOtp (VerifyOtpRequest) returns (VerifyOtpResponse);
9
11
  }
10
12
 
11
13
  message SendOtpRequest {
@@ -15,4 +17,15 @@ message SendOtpRequest {
15
17
 
16
18
  message SendOtpResponse {
17
19
  bool ok = 1;
20
+ }
21
+
22
+ message VerifyOtpRequest {
23
+ string identifier = 1;
24
+ string type = 2;
25
+ string code = 3;
26
+ }
27
+
28
+ message VerifyOtpResponse {
29
+ string access_token = 1;
30
+ string refresh_token = 2;
18
31
  }