@teacinema/contracts 1.1.1 → 1.1.3

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/dist/index.d.ts CHANGED
@@ -1,2 +1 @@
1
- export * from './events';
2
1
  export * from './proto';
package/dist/index.js CHANGED
@@ -14,5 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./events"), exports);
18
17
  __exportStar(require("./proto"), exports);
@@ -1,4 +1,3 @@
1
1
  export declare const PROTO_PATHS: {
2
2
  readonly AUTH: string;
3
- readonly ACCOUNT: string;
4
3
  };
@@ -4,5 +4,4 @@ exports.PROTO_PATHS = void 0;
4
4
  const path_1 = require("path");
5
5
  exports.PROTO_PATHS = {
6
6
  AUTH: (0, path_1.join)(__dirname, '../../proto/auth.proto'),
7
- ACCOUNT: (0, path_1.join)(__dirname, '../../proto/account.proto'),
8
7
  };
package/gen/auth.ts CHANGED
@@ -1,143 +1,63 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.8.3
4
- // protoc v3.21.12
3
+ // protoc-gen-ts_proto v2.7.7
4
+ // protoc v6.33.1
5
5
  // source: auth.proto
6
6
 
7
7
  /* eslint-disable */
8
- import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
- import { Observable } from "rxjs";
10
- import { Empty } from "./google/protobuf/empty";
8
+ import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices'
9
+ import { Observable } from 'rxjs'
11
10
 
12
- export const protobufPackage = "auth.v1";
11
+ export const protobufPackage = 'auth.v1'
13
12
 
14
13
  export interface SendOtpRequest {
15
- identifier: string;
16
- type: string;
14
+ identifier: string
15
+ type: string
17
16
  }
18
17
 
19
18
  export interface SendOtpResponse {
20
- ok: boolean;
19
+ ok: boolean
21
20
  }
22
21
 
23
- export interface VerifyOtpRequest {
24
- identifier: string;
25
- type: string;
26
- code: string;
27
- }
28
-
29
- export interface VerifyOtpResponse {
30
- accessToken: string;
31
- refreshToken: string;
32
- }
33
-
34
- export interface RefreshRequest {
35
- refreshToken: string;
36
- }
37
-
38
- export interface RefreshResponse {
39
- accessToken: string;
40
- refreshToken: string;
41
- }
42
-
43
- export interface TelegramInitResponse {
44
- url: string;
45
- }
46
-
47
- export interface TelegramVerifyRequest {
48
- query: { [key: string]: string };
49
- }
50
-
51
- export interface TelegramVerifyRequest_QueryEntry {
52
- key: string;
53
- value: string;
54
- }
55
-
56
- export interface TelegramVerifyResponse {
57
- url?: string | undefined;
58
- accessToken?: string | undefined;
59
- refreshToken?: string | undefined;
60
- }
61
-
62
- export interface TelegramCompleteRequest {
63
- sessionId: string;
64
- phone: string;
65
- }
66
-
67
- export interface TelegramCompleteResponse {
68
- sessionId: string;
69
- }
70
-
71
- export interface TelegramConsumeRequest {
72
- sessionId: string;
73
- }
74
-
75
- export interface TelegramConsumeResponse {
76
- accessToken: string;
77
- refreshToken: string;
78
- }
79
-
80
- export const AUTH_V1_PACKAGE_NAME = "auth.v1";
22
+ export const AUTH_V1_PACKAGE_NAME = 'auth.v1'
81
23
 
82
24
  export interface AuthServiceClient {
83
- sendOtp(request: SendOtpRequest): Observable<SendOtpResponse>;
84
-
85
- verifyOtp(request: VerifyOtpRequest): Observable<VerifyOtpResponse>;
86
-
87
- refresh(request: RefreshRequest): Observable<RefreshResponse>;
88
-
89
- telegramInit(request: Empty): Observable<TelegramInitResponse>;
90
-
91
- telegramVerify(request: TelegramVerifyRequest): Observable<TelegramVerifyResponse>;
92
-
93
- telegramComplete(request: TelegramCompleteRequest): Observable<TelegramCompleteResponse>;
94
-
95
- telegramConsume(request: TelegramConsumeRequest): Observable<TelegramConsumeResponse>;
25
+ sendOtp(request: SendOtpRequest): Observable<SendOtpResponse>
96
26
  }
97
27
 
98
28
  export interface AuthServiceController {
99
- sendOtp(request: SendOtpRequest): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse;
100
-
101
- verifyOtp(request: VerifyOtpRequest): Promise<VerifyOtpResponse> | Observable<VerifyOtpResponse> | VerifyOtpResponse;
102
-
103
- refresh(request: RefreshRequest): Promise<RefreshResponse> | Observable<RefreshResponse> | RefreshResponse;
104
-
105
- telegramInit(request: Empty): Promise<TelegramInitResponse> | Observable<TelegramInitResponse> | TelegramInitResponse;
106
-
107
- telegramVerify(
108
- request: TelegramVerifyRequest,
109
- ): Promise<TelegramVerifyResponse> | Observable<TelegramVerifyResponse> | TelegramVerifyResponse;
110
-
111
- telegramComplete(
112
- request: TelegramCompleteRequest,
113
- ): Promise<TelegramCompleteResponse> | Observable<TelegramCompleteResponse> | TelegramCompleteResponse;
114
-
115
- telegramConsume(
116
- request: TelegramConsumeRequest,
117
- ): Promise<TelegramConsumeResponse> | Observable<TelegramConsumeResponse> | TelegramConsumeResponse;
29
+ sendOtp(
30
+ request: SendOtpRequest
31
+ ): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse
118
32
  }
119
33
 
120
34
  export function AuthServiceControllerMethods() {
121
- return function (constructor: Function) {
122
- const grpcMethods: string[] = [
123
- "sendOtp",
124
- "verifyOtp",
125
- "refresh",
126
- "telegramInit",
127
- "telegramVerify",
128
- "telegramComplete",
129
- "telegramConsume",
130
- ];
131
- for (const method of grpcMethods) {
132
- const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
133
- GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
134
- }
135
- const grpcStreamMethods: string[] = [];
136
- for (const method of grpcStreamMethods) {
137
- const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
138
- GrpcStreamMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
139
- }
140
- };
141
- }
142
-
143
- export const AUTH_SERVICE_NAME = "AuthService";
35
+ return function (constructor: Function) {
36
+ const grpcMethods: string[] = ['sendOtp']
37
+ for (const method of grpcMethods) {
38
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(
39
+ constructor.prototype,
40
+ method
41
+ )
42
+ GrpcMethod('AuthService', method)(
43
+ constructor.prototype[method],
44
+ method,
45
+ descriptor
46
+ )
47
+ }
48
+ const grpcStreamMethods: string[] = []
49
+ for (const method of grpcStreamMethods) {
50
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(
51
+ constructor.prototype,
52
+ method
53
+ )
54
+ GrpcStreamMethod('AuthService', method)(
55
+ constructor.prototype[method],
56
+ method,
57
+ descriptor
58
+ )
59
+ }
60
+ }
61
+ }
62
+
63
+ export const AUTH_SERVICE_NAME = 'AuthService'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teacinema/contracts",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,69 +1,69 @@
1
- syntax = "proto3";
2
-
3
- package account.v1;
4
-
5
- service AccountService {
6
- rpc GetAccount (GetAccountRequest) returns (GetAccountResponse);
7
-
8
- rpc InitEmailChange (InitEmailChangeRequest) returns (InitEmailChangeResponse);
9
- rpc ConfirmEmailChange (ConfirmEmailChangeRequest) returns (ConfirmEmailChangeResponse);
10
-
11
- rpc InitPhoneChange (InitPhoneChangeRequest) returns (InitPhoneChangeResponse);
12
- rpc ConfirmPhoneChange (ConfirmPhoneChangeRequest) returns (ConfirmPhoneChangeResponse);
13
- }
14
-
15
- message GetAccountRequest {
16
- string id = 1;
17
- }
18
-
19
- message GetAccountResponse {
20
- string id = 1;
21
- string phone = 2;
22
- string email = 3;
23
- bool is_phone_verified = 4;
24
- bool is_email_verified = 5;
25
- Role role = 6;
26
- }
27
-
28
- message InitEmailChangeRequest {
29
- string email = 1;
30
- string user_id = 2;
31
- }
32
-
33
- message InitEmailChangeResponse {
34
- bool ok = 1;
35
- }
36
-
37
- message ConfirmEmailChangeRequest {
38
- string email = 1;
39
- string code = 2;
40
- string user_id = 3;
41
- }
42
-
43
- message ConfirmEmailChangeResponse {
44
- bool ok = 1;
45
- }
46
-
47
- message InitPhoneChangeRequest {
48
- string phone = 1;
49
- string user_id = 2;
50
- }
51
-
52
- message InitPhoneChangeResponse {
53
- bool ok = 1;
54
- }
55
-
56
- message ConfirmPhoneChangeRequest {
57
- string phone = 1;
58
- string code = 2;
59
- string user_id = 3;
60
- }
61
-
62
- message ConfirmPhoneChangeResponse {
63
- bool ok = 1;
64
- }
65
-
66
- enum Role {
67
- USER = 0;
68
- ADMIN = 1;
1
+ syntax = "proto3";
2
+
3
+ package account.v1;
4
+
5
+ service AccountService {
6
+ rpc GetAccount (GetAccountRequest) returns (GetAccountResponse);
7
+
8
+ rpc InitEmailChange (InitEmailChangeRequest) returns (InitEmailChangeResponse);
9
+ rpc ConfirmEmailChange (ConfirmEmailChangeRequest) returns (ConfirmEmailChangeResponse);
10
+
11
+ rpc InitPhoneChange (InitPhoneChangeRequest) returns (InitPhoneChangeResponse);
12
+ rpc ConfirmPhoneChange (ConfirmPhoneChangeRequest) returns (ConfirmPhoneChangeResponse);
13
+ }
14
+
15
+ message GetAccountRequest {
16
+ string id = 1;
17
+ }
18
+
19
+ message GetAccountResponse {
20
+ string id = 1;
21
+ string phone = 2;
22
+ string email = 3;
23
+ bool is_phone_verified = 4;
24
+ bool is_email_verified = 5;
25
+ Role role = 6;
26
+ }
27
+
28
+ message InitEmailChangeRequest {
29
+ string email = 1;
30
+ string user_id = 2;
31
+ }
32
+
33
+ message InitEmailChangeResponse {
34
+ bool ok = 1;
35
+ }
36
+
37
+ message ConfirmEmailChangeRequest {
38
+ string email = 1;
39
+ string code = 2;
40
+ string user_id = 3;
41
+ }
42
+
43
+ message ConfirmEmailChangeResponse {
44
+ bool ok = 1;
45
+ }
46
+
47
+ message InitPhoneChangeRequest {
48
+ string phone = 1;
49
+ string user_id = 2;
50
+ }
51
+
52
+ message InitPhoneChangeResponse {
53
+ bool ok = 1;
54
+ }
55
+
56
+ message ConfirmPhoneChangeRequest {
57
+ string phone = 1;
58
+ string code = 2;
59
+ string user_id = 3;
60
+ }
61
+
62
+ message ConfirmPhoneChangeResponse {
63
+ bool ok = 1;
64
+ }
65
+
66
+ enum Role {
67
+ USER = 0;
68
+ ADMIN = 1;
69
69
  }
package/proto/auth.proto CHANGED
@@ -1,79 +1,79 @@
1
- syntax = "proto3";
2
-
3
- package auth.v1;
4
-
5
- import "google/protobuf/empty.proto";
6
-
7
- service AuthService {
8
- rpc SendOtp (SendOtpRequest) returns (SendOtpResponse);
9
- rpc VerifyOtp (VerifyOtpRequest) returns (VerifyOtpResponse);
10
- rpc Refresh (RefreshRequest) returns (RefreshResponse);
11
-
12
- rpc TelegramInit (google.protobuf.Empty) returns (TelegramInitResponse);
13
- rpc TelegramVerify (TelegramVerifyRequest) returns (TelegramVerifyResponse);
14
- rpc TelegramComplete (TelegramCompleteRequest) returns (TelegramCompleteResponse);
15
- rpc TelegramConsume (TelegramConsumeRequest) returns (TelegramConsumeResponse);
16
- }
17
-
18
- message SendOtpRequest {
19
- string identifier = 1;
20
- string type = 2;
21
- }
22
-
23
- message SendOtpResponse {
24
- bool ok = 1;
25
- }
26
-
27
- message VerifyOtpRequest {
28
- string identifier = 1;
29
- string type = 2;
30
- string code = 3;
31
- }
32
-
33
- message VerifyOtpResponse {
34
- string access_token = 1;
35
- string refresh_token = 2;
36
- }
37
-
38
- message RefreshRequest {
39
- string refresh_token = 1;
40
- }
41
-
42
- message RefreshResponse {
43
- string access_token = 1;
44
- string refresh_token = 2;
45
- }
46
-
47
- message TelegramInitResponse {
48
- string url = 1;
49
- }
50
-
51
- message TelegramVerifyRequest {
52
- map<string, string> query = 1;
53
- }
54
-
55
- message TelegramVerifyResponse {
56
- oneof result {
57
- string url = 1;
58
- string access_token = 2;
59
- string refresh_token = 3;
60
- }
61
- }
62
-
63
- message TelegramCompleteRequest {
64
- string session_id = 1;
65
- string phone = 2;
66
- }
67
-
68
- message TelegramCompleteResponse {
69
- string session_id = 1;
70
- }
71
-
72
- message TelegramConsumeRequest {
73
- string session_id = 1;
74
- }
75
-
76
- message TelegramConsumeResponse {
77
- string access_token = 1;
78
- string refresh_token = 2;
1
+ syntax = "proto3";
2
+
3
+ package auth.v1;
4
+
5
+ import "google/protobuf/empty.proto";
6
+
7
+ service AuthService {
8
+ rpc SendOtp (SendOtpRequest) returns (SendOtpResponse);
9
+ rpc VerifyOtp (VerifyOtpRequest) returns (VerifyOtpResponse);
10
+ rpc Refresh (RefreshRequest) returns (RefreshResponse);
11
+
12
+ rpc TelegramInit (google.protobuf.Empty) returns (TelegramInitResponse);
13
+ rpc TelegramVerify (TelegramVerifyRequest) returns (TelegramVerifyResponse);
14
+ rpc TelegramComplete (TelegramCompleteRequest) returns (TelegramCompleteResponse);
15
+ rpc TelegramConsume (TelegramConsumeRequest) returns (TelegramConsumeResponse);
16
+ }
17
+
18
+ message SendOtpRequest {
19
+ string identifier = 1;
20
+ string type = 2;
21
+ }
22
+
23
+ message SendOtpResponse {
24
+ bool ok = 1;
25
+ }
26
+
27
+ message VerifyOtpRequest {
28
+ string identifier = 1;
29
+ string type = 2;
30
+ string code = 3;
31
+ }
32
+
33
+ message VerifyOtpResponse {
34
+ string access_token = 1;
35
+ string refresh_token = 2;
36
+ }
37
+
38
+ message RefreshRequest {
39
+ string refresh_token = 1;
40
+ }
41
+
42
+ message RefreshResponse {
43
+ string access_token = 1;
44
+ string refresh_token = 2;
45
+ }
46
+
47
+ message TelegramInitResponse {
48
+ string url = 1;
49
+ }
50
+
51
+ message TelegramVerifyRequest {
52
+ map<string, string> query = 1;
53
+ }
54
+
55
+ message TelegramVerifyResponse {
56
+ oneof result {
57
+ string url = 1;
58
+ string access_token = 2;
59
+ string refresh_token = 3;
60
+ }
61
+ }
62
+
63
+ message TelegramCompleteRequest {
64
+ string session_id = 1;
65
+ string phone = 2;
66
+ }
67
+
68
+ message TelegramCompleteResponse {
69
+ string session_id = 1;
70
+ }
71
+
72
+ message TelegramConsumeRequest {
73
+ string session_id = 1;
74
+ }
75
+
76
+ message TelegramConsumeResponse {
77
+ string access_token = 1;
78
+ string refresh_token = 2;
79
79
  }
@@ -0,0 +1,44 @@
1
+ syntax = "proto3";
2
+
3
+ package users.v1;
4
+
5
+ service UsersService {
6
+ rpc GetMe (GetMeRequest) returns (GetMeResponse);
7
+
8
+ rpc CreateUser (CreateUserRequest) returns (CreateUserResponse);
9
+ rpc PatchUser (PatchUserRequest) returns (PatchUserResponse);
10
+ }
11
+
12
+ message GetMeRequest {
13
+ string id = 1;
14
+ }
15
+
16
+ message GetMeResponse {
17
+ User user = 1;
18
+ }
19
+
20
+ message CreateUserRequest {
21
+ string id = 1;
22
+ }
23
+
24
+ message CreateUserResponse {
25
+ bool ok = 1;
26
+ }
27
+
28
+ message PatchUserRequest {
29
+ string user_id = 1;
30
+
31
+ optional string name = 2;
32
+ }
33
+
34
+ message PatchUserResponse {
35
+ bool ok = 1;
36
+ }
37
+
38
+ message User {
39
+ string id = 1;
40
+ optional string name = 2;
41
+ optional string phone = 3;
42
+ optional string email = 4;
43
+ optional string avatar = 5;
44
+ }
@@ -1,4 +0,0 @@
1
- export interface EmailChangedEvent {
2
- email: string;
3
- code: string;
4
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- export * from './email-changed.interface';
2
- export * from './phone-changed.interface';
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./email-changed.interface"), exports);
18
- __exportStar(require("./phone-changed.interface"), exports);
@@ -1,4 +0,0 @@
1
- export interface PhoneChangedEvent {
2
- phone: string;
3
- code: string;
4
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +0,0 @@
1
- export * from './otp-requested.interface';
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./otp-requested.interface"), exports);
@@ -1,5 +0,0 @@
1
- export interface OtpRequestedEvent {
2
- identifier: string;
3
- type: string;
4
- code: string;
5
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- export * from './account';
2
- export * from './auth';
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./account"), exports);
18
- __exportStar(require("./auth"), exports);
package/gen/account.ts DELETED
@@ -1,127 +0,0 @@
1
- // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
- // versions:
3
- // protoc-gen-ts_proto v2.8.3
4
- // protoc v3.21.12
5
- // source: account.proto
6
-
7
- /* eslint-disable */
8
- import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
- import { Observable } from "rxjs";
10
-
11
- export const protobufPackage = "account.v1";
12
-
13
- export enum Role {
14
- USER = 0,
15
- ADMIN = 1,
16
- UNRECOGNIZED = -1,
17
- }
18
-
19
- export interface GetAccountRequest {
20
- id: string;
21
- }
22
-
23
- export interface GetAccountResponse {
24
- id: string;
25
- phone: string;
26
- email: string;
27
- isPhoneVerified: boolean;
28
- isEmailVerified: boolean;
29
- role: Role;
30
- }
31
-
32
- export interface InitEmailChangeRequest {
33
- email: string;
34
- userId: string;
35
- }
36
-
37
- export interface InitEmailChangeResponse {
38
- ok: boolean;
39
- }
40
-
41
- export interface ConfirmEmailChangeRequest {
42
- email: string;
43
- code: string;
44
- userId: string;
45
- }
46
-
47
- export interface ConfirmEmailChangeResponse {
48
- ok: boolean;
49
- }
50
-
51
- export interface InitPhoneChangeRequest {
52
- phone: string;
53
- userId: string;
54
- }
55
-
56
- export interface InitPhoneChangeResponse {
57
- ok: boolean;
58
- }
59
-
60
- export interface ConfirmPhoneChangeRequest {
61
- phone: string;
62
- code: string;
63
- userId: string;
64
- }
65
-
66
- export interface ConfirmPhoneChangeResponse {
67
- ok: boolean;
68
- }
69
-
70
- export const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
71
-
72
- export interface AccountServiceClient {
73
- getAccount(request: GetAccountRequest): Observable<GetAccountResponse>;
74
-
75
- initEmailChange(request: InitEmailChangeRequest): Observable<InitEmailChangeResponse>;
76
-
77
- confirmEmailChange(request: ConfirmEmailChangeRequest): Observable<ConfirmEmailChangeResponse>;
78
-
79
- initPhoneChange(request: InitPhoneChangeRequest): Observable<InitPhoneChangeResponse>;
80
-
81
- confirmPhoneChange(request: ConfirmPhoneChangeRequest): Observable<ConfirmPhoneChangeResponse>;
82
- }
83
-
84
- export interface AccountServiceController {
85
- getAccount(
86
- request: GetAccountRequest,
87
- ): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
88
-
89
- initEmailChange(
90
- request: InitEmailChangeRequest,
91
- ): Promise<InitEmailChangeResponse> | Observable<InitEmailChangeResponse> | InitEmailChangeResponse;
92
-
93
- confirmEmailChange(
94
- request: ConfirmEmailChangeRequest,
95
- ): Promise<ConfirmEmailChangeResponse> | Observable<ConfirmEmailChangeResponse> | ConfirmEmailChangeResponse;
96
-
97
- initPhoneChange(
98
- request: InitPhoneChangeRequest,
99
- ): Promise<InitPhoneChangeResponse> | Observable<InitPhoneChangeResponse> | InitPhoneChangeResponse;
100
-
101
- confirmPhoneChange(
102
- request: ConfirmPhoneChangeRequest,
103
- ): Promise<ConfirmPhoneChangeResponse> | Observable<ConfirmPhoneChangeResponse> | ConfirmPhoneChangeResponse;
104
- }
105
-
106
- export function AccountServiceControllerMethods() {
107
- return function (constructor: Function) {
108
- const grpcMethods: string[] = [
109
- "getAccount",
110
- "initEmailChange",
111
- "confirmEmailChange",
112
- "initPhoneChange",
113
- "confirmPhoneChange",
114
- ];
115
- for (const method of grpcMethods) {
116
- const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
117
- GrpcMethod("AccountService", method)(constructor.prototype[method], method, descriptor);
118
- }
119
- const grpcStreamMethods: string[] = [];
120
- for (const method of grpcStreamMethods) {
121
- const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
122
- GrpcStreamMethod("AccountService", method)(constructor.prototype[method], method, descriptor);
123
- }
124
- };
125
- }
126
-
127
- export const ACCOUNT_SERVICE_NAME = "AccountService";
@@ -1,23 +0,0 @@
1
- // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
- // versions:
3
- // protoc-gen-ts_proto v2.8.3
4
- // protoc v3.21.12
5
- // source: google/protobuf/empty.proto
6
-
7
- /* eslint-disable */
8
-
9
- export const protobufPackage = "google.protobuf";
10
-
11
- /**
12
- * A generic empty message that you can re-use to avoid defining duplicated
13
- * empty messages in your APIs. A typical example is to use it as the request
14
- * or the response type of an API method. For instance:
15
- *
16
- * service Foo {
17
- * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
18
- * }
19
- */
20
- export interface Empty {
21
- }
22
-
23
- export const GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";