@vendee-cinema/contracts 1.1.3 → 1.1.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/gen/auth.ts CHANGED
@@ -13,38 +13,9 @@ import { Empty } from "./google/protobuf/empty";
13
13
 
14
14
  export const protobufPackage = "auth.v1";
15
15
 
16
- export enum Type {
17
- PHONE = "PHONE",
18
- EMAIL = "EMAIL",
19
- }
20
-
21
- export function typeFromJSON(object: any): Type {
22
- switch (object) {
23
- case 0:
24
- case "PHONE":
25
- return Type.PHONE;
26
- case 1:
27
- case "EMAIL":
28
- return Type.EMAIL;
29
- default:
30
- throw new globalThis.Error("Unrecognized enum value " + object + " for enum Type");
31
- }
32
- }
33
-
34
- export function typeToNumber(object: Type): number {
35
- switch (object) {
36
- case Type.PHONE:
37
- return 0;
38
- case Type.EMAIL:
39
- return 1;
40
- default:
41
- throw new globalThis.Error("Unrecognized enum value " + object + " for enum Type");
42
- }
43
- }
44
-
45
16
  export interface SendOtpRequest {
46
17
  identifier: string;
47
- type: Type;
18
+ type: string;
48
19
  }
49
20
 
50
21
  export interface SendOtpResponse {
@@ -53,7 +24,7 @@ export interface SendOtpResponse {
53
24
 
54
25
  export interface VerifyOtpRequest {
55
26
  identifier: string;
56
- type: Type;
27
+ type: string;
57
28
  code: string;
58
29
  }
59
30
 
@@ -111,7 +82,7 @@ export interface TelegramConsumeResponse {
111
82
  export const AUTH_V1_PACKAGE_NAME = "auth.v1";
112
83
 
113
84
  function createBaseSendOtpRequest(): SendOtpRequest {
114
- return { identifier: "", type: Type.PHONE };
85
+ return { identifier: "", type: "" };
115
86
  }
116
87
 
117
88
  export const SendOtpRequest: MessageFns<SendOtpRequest> = {
@@ -119,8 +90,8 @@ export const SendOtpRequest: MessageFns<SendOtpRequest> = {
119
90
  if (message.identifier !== "") {
120
91
  writer.uint32(10).string(message.identifier);
121
92
  }
122
- if (message.type !== Type.PHONE) {
123
- writer.uint32(16).int32(typeToNumber(message.type));
93
+ if (message.type !== "") {
94
+ writer.uint32(18).string(message.type);
124
95
  }
125
96
  return writer;
126
97
  },
@@ -141,11 +112,11 @@ export const SendOtpRequest: MessageFns<SendOtpRequest> = {
141
112
  continue;
142
113
  }
143
114
  case 2: {
144
- if (tag !== 16) {
115
+ if (tag !== 18) {
145
116
  break;
146
117
  }
147
118
 
148
- message.type = typeFromJSON(reader.int32());
119
+ message.type = reader.string();
149
120
  continue;
150
121
  }
151
122
  }
@@ -196,7 +167,7 @@ export const SendOtpResponse: MessageFns<SendOtpResponse> = {
196
167
  };
197
168
 
198
169
  function createBaseVerifyOtpRequest(): VerifyOtpRequest {
199
- return { identifier: "", type: Type.PHONE, code: "" };
170
+ return { identifier: "", type: "", code: "" };
200
171
  }
201
172
 
202
173
  export const VerifyOtpRequest: MessageFns<VerifyOtpRequest> = {
@@ -204,8 +175,8 @@ export const VerifyOtpRequest: MessageFns<VerifyOtpRequest> = {
204
175
  if (message.identifier !== "") {
205
176
  writer.uint32(10).string(message.identifier);
206
177
  }
207
- if (message.type !== Type.PHONE) {
208
- writer.uint32(16).int32(typeToNumber(message.type));
178
+ if (message.type !== "") {
179
+ writer.uint32(18).string(message.type);
209
180
  }
210
181
  if (message.code !== "") {
211
182
  writer.uint32(26).string(message.code);
@@ -229,11 +200,11 @@ export const VerifyOtpRequest: MessageFns<VerifyOtpRequest> = {
229
200
  continue;
230
201
  }
231
202
  case 2: {
232
- if (tag !== 16) {
203
+ if (tag !== 18) {
233
204
  break;
234
205
  }
235
206
 
236
- message.type = typeFromJSON(reader.int32());
207
+ message.type = reader.string();
237
208
  continue;
238
209
  }
239
210
  case 3: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vendee-cinema/contracts",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -23,7 +23,6 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "@nestjs/microservices": "^11.1.16",
26
- "@vendee-cinema/contracts": "^1.1.2",
27
26
  "rxjs": "^7.8.2",
28
27
  "ts-proto": "^2.11.4"
29
28
  },
package/proto/auth.proto CHANGED
@@ -17,12 +17,7 @@ service AuthService {
17
17
 
18
18
  message SendOtpRequest {
19
19
  string identifier = 1;
20
- Type type = 2;
21
- }
22
-
23
- enum Type {
24
- PHONE = 0;
25
- EMAIL = 1;
20
+ string type = 2;
26
21
  }
27
22
 
28
23
  message SendOtpResponse {
@@ -31,7 +26,7 @@ message SendOtpResponse {
31
26
 
32
27
  message VerifyOtpRequest {
33
28
  string identifier = 1;
34
- Type type = 2;
29
+ string type = 2;
35
30
  string code = 3;
36
31
  }
37
32