@vendee-cinema/contracts 1.1.3 → 1.1.4

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,38 @@ import { Empty } from "./google/protobuf/empty";
13
13
 
14
14
  export const protobufPackage = "auth.v1";
15
15
 
16
- export enum Type {
16
+ export enum ContactType {
17
17
  PHONE = "PHONE",
18
18
  EMAIL = "EMAIL",
19
19
  }
20
20
 
21
- export function typeFromJSON(object: any): Type {
21
+ export function contactTypeFromJSON(object: any): ContactType {
22
22
  switch (object) {
23
23
  case 0:
24
24
  case "PHONE":
25
- return Type.PHONE;
25
+ return ContactType.PHONE;
26
26
  case 1:
27
27
  case "EMAIL":
28
- return Type.EMAIL;
28
+ return ContactType.EMAIL;
29
29
  default:
30
- throw new globalThis.Error("Unrecognized enum value " + object + " for enum Type");
30
+ throw new globalThis.Error("Unrecognized enum value " + object + " for enum ContactType");
31
31
  }
32
32
  }
33
33
 
34
- export function typeToNumber(object: Type): number {
34
+ export function contactTypeToNumber(object: ContactType): number {
35
35
  switch (object) {
36
- case Type.PHONE:
36
+ case ContactType.PHONE:
37
37
  return 0;
38
- case Type.EMAIL:
38
+ case ContactType.EMAIL:
39
39
  return 1;
40
40
  default:
41
- throw new globalThis.Error("Unrecognized enum value " + object + " for enum Type");
41
+ throw new globalThis.Error("Unrecognized enum value " + object + " for enum ContactType");
42
42
  }
43
43
  }
44
44
 
45
45
  export interface SendOtpRequest {
46
46
  identifier: string;
47
- type: Type;
47
+ type: ContactType;
48
48
  }
49
49
 
50
50
  export interface SendOtpResponse {
@@ -53,7 +53,7 @@ export interface SendOtpResponse {
53
53
 
54
54
  export interface VerifyOtpRequest {
55
55
  identifier: string;
56
- type: Type;
56
+ type: ContactType;
57
57
  code: string;
58
58
  }
59
59
 
@@ -111,7 +111,7 @@ export interface TelegramConsumeResponse {
111
111
  export const AUTH_V1_PACKAGE_NAME = "auth.v1";
112
112
 
113
113
  function createBaseSendOtpRequest(): SendOtpRequest {
114
- return { identifier: "", type: Type.PHONE };
114
+ return { identifier: "", type: ContactType.PHONE };
115
115
  }
116
116
 
117
117
  export const SendOtpRequest: MessageFns<SendOtpRequest> = {
@@ -119,8 +119,8 @@ export const SendOtpRequest: MessageFns<SendOtpRequest> = {
119
119
  if (message.identifier !== "") {
120
120
  writer.uint32(10).string(message.identifier);
121
121
  }
122
- if (message.type !== Type.PHONE) {
123
- writer.uint32(16).int32(typeToNumber(message.type));
122
+ if (message.type !== ContactType.PHONE) {
123
+ writer.uint32(16).int32(contactTypeToNumber(message.type));
124
124
  }
125
125
  return writer;
126
126
  },
@@ -145,7 +145,7 @@ export const SendOtpRequest: MessageFns<SendOtpRequest> = {
145
145
  break;
146
146
  }
147
147
 
148
- message.type = typeFromJSON(reader.int32());
148
+ message.type = contactTypeFromJSON(reader.int32());
149
149
  continue;
150
150
  }
151
151
  }
@@ -196,7 +196,7 @@ export const SendOtpResponse: MessageFns<SendOtpResponse> = {
196
196
  };
197
197
 
198
198
  function createBaseVerifyOtpRequest(): VerifyOtpRequest {
199
- return { identifier: "", type: Type.PHONE, code: "" };
199
+ return { identifier: "", type: ContactType.PHONE, code: "" };
200
200
  }
201
201
 
202
202
  export const VerifyOtpRequest: MessageFns<VerifyOtpRequest> = {
@@ -204,8 +204,8 @@ export const VerifyOtpRequest: MessageFns<VerifyOtpRequest> = {
204
204
  if (message.identifier !== "") {
205
205
  writer.uint32(10).string(message.identifier);
206
206
  }
207
- if (message.type !== Type.PHONE) {
208
- writer.uint32(16).int32(typeToNumber(message.type));
207
+ if (message.type !== ContactType.PHONE) {
208
+ writer.uint32(16).int32(contactTypeToNumber(message.type));
209
209
  }
210
210
  if (message.code !== "") {
211
211
  writer.uint32(26).string(message.code);
@@ -233,7 +233,7 @@ export const VerifyOtpRequest: MessageFns<VerifyOtpRequest> = {
233
233
  break;
234
234
  }
235
235
 
236
- message.type = typeFromJSON(reader.int32());
236
+ message.type = contactTypeFromJSON(reader.int32());
237
237
  continue;
238
238
  }
239
239
  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.4",
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,10 +17,10 @@ service AuthService {
17
17
 
18
18
  message SendOtpRequest {
19
19
  string identifier = 1;
20
- Type type = 2;
20
+ ContactType type = 2;
21
21
  }
22
22
 
23
- enum Type {
23
+ enum ContactType {
24
24
  PHONE = 0;
25
25
  EMAIL = 1;
26
26
  }
@@ -31,7 +31,7 @@ message SendOtpResponse {
31
31
 
32
32
  message VerifyOtpRequest {
33
33
  string identifier = 1;
34
- Type type = 2;
34
+ ContactType type = 2;
35
35
  string code = 3;
36
36
  }
37
37