@gastroly.io/contracts 1.0.4 → 1.0.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/generated/auth.ts CHANGED
@@ -10,9 +10,16 @@ import { Observable } from "rxjs";
10
10
 
11
11
  export const protobufPackage = "auth.v1";
12
12
 
13
+ export enum AuthType {
14
+ AUTH_TYPE_UNSPECIFIED = 0,
15
+ AUTH_TYPE_PHONE = 1,
16
+ AUTH_TYPE_EMAIL = 2,
17
+ UNRECOGNIZED = -1,
18
+ }
19
+
13
20
  export interface SendOtpRequest {
14
21
  identifier: string;
15
- type: string;
22
+ type: AuthType;
16
23
  }
17
24
 
18
25
  export interface SendOtpResponse {
@@ -21,7 +28,7 @@ export interface SendOtpResponse {
21
28
 
22
29
  export interface VerifyOtpRequest {
23
30
  identifier: string;
24
- type: string;
31
+ type: AuthType;
25
32
  code: string;
26
33
  }
27
34
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gastroly.io/contracts",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Protobuf definition and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
package/proto/auth.proto CHANGED
@@ -2,6 +2,12 @@ syntax = "proto3";
2
2
 
3
3
  package auth.v1;
4
4
 
5
+ enum AuthType {
6
+ AUTH_TYPE_UNSPECIFIED = 0;
7
+ AUTH_TYPE_PHONE = 1;
8
+ AUTH_TYPE_EMAIL = 2;
9
+ }
10
+
5
11
  service AuthService {
6
12
  rpc SendOtp(SendOtpRequest) returns (SendOtpResponse);
7
13
  rpc VerifyOtp (VerifyOtpRequest) returns (VerifyOtpResponse);
@@ -10,7 +16,7 @@ service AuthService {
10
16
 
11
17
  message SendOtpRequest {
12
18
  string identifier = 1;
13
- string type = 2;
19
+ AuthType type = 2;
14
20
  }
15
21
 
16
22
  message SendOtpResponse {
@@ -19,7 +25,7 @@ message SendOtpResponse {
19
25
 
20
26
  message VerifyOtpRequest {
21
27
  string identifier = 1;
22
- string type = 2;
28
+ AuthType type = 2;
23
29
  string code = 3;
24
30
  }
25
31