@nexiolab/contracts 1.0.13 → 1.0.15

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/account.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.0
3
+ // protoc-gen-ts_proto v2.11.1
4
4
  // protoc v3.21.12
5
5
  // source: account.proto
6
6
 
package/gen/auth.ts CHANGED
@@ -1,12 +1,13 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.0
3
+ // protoc-gen-ts_proto v2.11.1
4
4
  // protoc v3.21.12
5
5
  // source: auth.proto
6
6
 
7
7
  /* eslint-disable */
8
8
  import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
9
  import { Observable } from "rxjs";
10
+ import { Empty } from "./google/protobuf/empty";
10
11
 
11
12
  export const protobufPackage = "auth.v1";
12
13
 
@@ -39,6 +40,43 @@ export interface RefreshResponse {
39
40
  refreshToken: string;
40
41
  }
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
+
42
80
  export const AUTH_V1_PACKAGE_NAME = "auth.v1";
43
81
 
44
82
  /** AuthService provides authentication related operations */
@@ -55,6 +93,22 @@ export interface AuthServiceClient {
55
93
  /** Refreshes access token */
56
94
 
57
95
  refresh(request: RefreshRequest): Observable<RefreshResponse>;
96
+
97
+ /** Initialize telegram verification */
98
+
99
+ telegramInit(request: Empty): Observable<TelegramInitResponse>;
100
+
101
+ /** Confirm telegram verification */
102
+
103
+ telegramVerify(request: TelegramVerifyRequest): Observable<TelegramVerifyResponse>;
104
+
105
+ /** Complete telegram verification */
106
+
107
+ telegramComplete(request: TelegramCompleteRequest): Observable<TelegramCompleteResponse>;
108
+
109
+ /** Consume tokens after complete */
110
+
111
+ telegramConsume(request: TelegramConsumeRequest): Observable<TelegramConsumeResponse>;
58
112
  }
59
113
 
60
114
  /** AuthService provides authentication related operations */
@@ -71,11 +125,41 @@ export interface AuthServiceController {
71
125
  /** Refreshes access token */
72
126
 
73
127
  refresh(request: RefreshRequest): Promise<RefreshResponse> | Observable<RefreshResponse> | RefreshResponse;
128
+
129
+ /** Initialize telegram verification */
130
+
131
+ telegramInit(request: Empty): Promise<TelegramInitResponse> | Observable<TelegramInitResponse> | TelegramInitResponse;
132
+
133
+ /** Confirm telegram verification */
134
+
135
+ telegramVerify(
136
+ request: TelegramVerifyRequest,
137
+ ): Promise<TelegramVerifyResponse> | Observable<TelegramVerifyResponse> | TelegramVerifyResponse;
138
+
139
+ /** Complete telegram verification */
140
+
141
+ telegramComplete(
142
+ request: TelegramCompleteRequest,
143
+ ): Promise<TelegramCompleteResponse> | Observable<TelegramCompleteResponse> | TelegramCompleteResponse;
144
+
145
+ /** Consume tokens after complete */
146
+
147
+ telegramConsume(
148
+ request: TelegramConsumeRequest,
149
+ ): Promise<TelegramConsumeResponse> | Observable<TelegramConsumeResponse> | TelegramConsumeResponse;
74
150
  }
75
151
 
76
152
  export function AuthServiceControllerMethods() {
77
153
  return function (constructor: Function) {
78
- const grpcMethods: string[] = ["sendOtp", "verifyOtp", "refresh"];
154
+ const grpcMethods: string[] = [
155
+ "sendOtp",
156
+ "verifyOtp",
157
+ "refresh",
158
+ "telegramInit",
159
+ "telegramVerify",
160
+ "telegramComplete",
161
+ "telegramConsume",
162
+ ];
79
163
  for (const method of grpcMethods) {
80
164
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
81
165
  GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
package/gen/example.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.0
3
+ // protoc-gen-ts_proto v2.11.1
4
4
  // protoc v3.21.12
5
5
  // source: example.proto
6
6
 
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.0
3
+ // protoc-gen-ts_proto v2.11.1
4
4
  // protoc v3.21.12
5
5
  // source: google/protobuf/any.proto
6
6
 
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.0
3
+ // protoc-gen-ts_proto v2.11.1
4
4
  // protoc v3.21.12
5
5
  // source: google/protobuf/duration.proto
6
6
 
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.0
3
+ // protoc-gen-ts_proto v2.11.1
4
4
  // protoc v3.21.12
5
5
  // source: google/protobuf/empty.proto
6
6
 
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.0
3
+ // protoc-gen-ts_proto v2.11.1
4
4
  // protoc v3.21.12
5
5
  // source: google/protobuf/struct.proto
6
6
 
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.0
3
+ // protoc-gen-ts_proto v2.11.1
4
4
  // protoc v3.21.12
5
5
  // source: google/protobuf/timestamp.proto
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexiolab/contracts",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
package/proto/auth.proto CHANGED
@@ -2,14 +2,25 @@ syntax="proto3";
2
2
 
3
3
  package auth.v1;
4
4
 
5
+ import "google/protobuf/empty.proto";
6
+
5
7
  // AuthService provides authentication related operations
6
8
  service AuthService {
7
9
  // SendOtp sends an OTP to the user
8
10
  rpc SendOtp (SendOtpRequest) returns (SendOtpResponse);
9
- //Verifies otp code from user
11
+ // Verifies otp code from user
10
12
  rpc VerifyOtp(VerifyOtpRequest) returns (VerifyOtpResponse);
11
- //Refreshes access token
12
- rpc Refresh(RefreshRequest) returns (RefreshResponse);
13
+ // Refreshes access token
14
+ rpc Refresh (RefreshRequest) returns (RefreshResponse);
15
+
16
+ // Initialize telegram verification
17
+ rpc TelegramInit (google.protobuf.Empty) returns (TelegramInitResponse);
18
+ // Confirm telegram verification
19
+ rpc TelegramVerify (TelegramVerifyRequest) returns (TelegramVerifyResponse);
20
+ // Complete telegram verification
21
+ rpc TelegramComplete (TelegramCompleteRequest) returns (TelegramCompleteResponse);
22
+ // Consume tokens after complete
23
+ rpc TelegramConsume (TelegramConsumeRequest) returns (TelegramConsumeResponse);
13
24
  }
14
25
 
15
26
  message SendOtpRequest {
@@ -39,4 +50,38 @@ message RefreshRequest {
39
50
  message RefreshResponse {
40
51
  string access_token = 1;
41
52
  string refresh_token = 2;
53
+ }
54
+
55
+ message TelegramInitResponse {
56
+ string url = 1;
57
+ }
58
+
59
+ message TelegramVerifyRequest {
60
+ map<string, string> query = 1;
61
+ }
62
+
63
+ message TelegramVerifyResponse {
64
+ oneof result {
65
+ string url = 1;
66
+ string access_token = 2;
67
+ string refresh_token = 3;
68
+ }
69
+ }
70
+
71
+ message TelegramCompleteRequest {
72
+ string session_id = 1;
73
+ string phone = 2;
74
+ }
75
+
76
+ message TelegramCompleteResponse {
77
+ string session_id = 1;
78
+ }
79
+
80
+ message TelegramConsumeRequest {
81
+ string session_id = 1;
82
+ }
83
+
84
+ message TelegramConsumeResponse {
85
+ string access_token = 1;
86
+ string refresh_token = 2;
42
87
  }