@nexiolab/contracts 1.0.13 → 1.0.14

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,25 @@ 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
+
42
62
  export const AUTH_V1_PACKAGE_NAME = "auth.v1";
43
63
 
44
64
  /** AuthService provides authentication related operations */
@@ -55,6 +75,14 @@ export interface AuthServiceClient {
55
75
  /** Refreshes access token */
56
76
 
57
77
  refresh(request: RefreshRequest): Observable<RefreshResponse>;
78
+
79
+ /** Initialize telegram verification */
80
+
81
+ telegramInit(request: Empty): Observable<TelegramInitResponse>;
82
+
83
+ /** Confirm telegram verification */
84
+
85
+ telegramVerify(request: TelegramVerifyRequest): Observable<TelegramVerifyResponse>;
58
86
  }
59
87
 
60
88
  /** AuthService provides authentication related operations */
@@ -71,11 +99,21 @@ export interface AuthServiceController {
71
99
  /** Refreshes access token */
72
100
 
73
101
  refresh(request: RefreshRequest): Promise<RefreshResponse> | Observable<RefreshResponse> | RefreshResponse;
102
+
103
+ /** Initialize telegram verification */
104
+
105
+ telegramInit(request: Empty): Promise<TelegramInitResponse> | Observable<TelegramInitResponse> | TelegramInitResponse;
106
+
107
+ /** Confirm telegram verification */
108
+
109
+ telegramVerify(
110
+ request: TelegramVerifyRequest,
111
+ ): Promise<TelegramVerifyResponse> | Observable<TelegramVerifyResponse> | TelegramVerifyResponse;
74
112
  }
75
113
 
76
114
  export function AuthServiceControllerMethods() {
77
115
  return function (constructor: Function) {
78
- const grpcMethods: string[] = ["sendOtp", "verifyOtp", "refresh"];
116
+ const grpcMethods: string[] = ["sendOtp", "verifyOtp", "refresh", "telegramInit", "telegramVerify"];
79
117
  for (const method of grpcMethods) {
80
118
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
81
119
  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.14",
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,21 @@ 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);
13
20
  }
14
21
 
15
22
  message SendOtpRequest {
@@ -39,4 +46,20 @@ message RefreshRequest {
39
46
  message RefreshResponse {
40
47
  string access_token = 1;
41
48
  string refresh_token = 2;
49
+ }
50
+
51
+ message TelegramInitResponse {
52
+ string url = 1;
53
+ }
54
+
55
+ message TelegramVerifyRequest {
56
+ map<string, string> query = 1;
57
+ }
58
+
59
+ message TelegramVerifyResponse {
60
+ oneof result {
61
+ string url = 1;
62
+ string access_token = 2;
63
+ string refresh_token = 3;
64
+ }
42
65
  }