@arbiwallet/contracts 1.0.135 → 1.0.137

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
@@ -43,6 +43,15 @@ export interface GoogleAuthCallbackRequest {
43
43
  state: string;
44
44
  }
45
45
 
46
+ export interface ExchangeAuthCodeRequest {
47
+ code: string;
48
+ }
49
+
50
+ export interface AuthExchangeCodeResponse {
51
+ exchangeCode: string;
52
+ returnUrl?: string | undefined;
53
+ }
54
+
46
55
  export interface AppleAuthRequest {
47
56
  identityToken: string;
48
57
  }
@@ -93,7 +102,9 @@ export interface AuthServiceClient {
93
102
 
94
103
  googleAuthStart(request: GoogleAuthStartRequest): Observable<GoogleAuthStartResponse>;
95
104
 
96
- googleAuthCallback(request: GoogleAuthCallbackRequest): Observable<AuthTokensResponse>;
105
+ googleAuthCallback(request: GoogleAuthCallbackRequest): Observable<AuthExchangeCodeResponse>;
106
+
107
+ exchangeAuthCode(request: ExchangeAuthCodeRequest): Observable<AuthTokensResponse>;
97
108
 
98
109
  googleAuth(request: GoogleAuthRequest): Observable<AuthTokensResponse>;
99
110
 
@@ -125,6 +136,10 @@ export interface AuthServiceController {
125
136
 
126
137
  googleAuthCallback(
127
138
  request: GoogleAuthCallbackRequest,
139
+ ): Promise<AuthExchangeCodeResponse> | Observable<AuthExchangeCodeResponse> | AuthExchangeCodeResponse;
140
+
141
+ exchangeAuthCode(
142
+ request: ExchangeAuthCodeRequest,
128
143
  ): Promise<AuthTokensResponse> | Observable<AuthTokensResponse> | AuthTokensResponse;
129
144
 
130
145
  googleAuth(
@@ -159,6 +174,7 @@ export function AuthServiceControllerMethods() {
159
174
  "telegramLoginWidgetAuth",
160
175
  "googleAuthStart",
161
176
  "googleAuthCallback",
177
+ "exchangeAuthCode",
162
178
  "googleAuth",
163
179
  "appleAuth",
164
180
  "requestContactCode",
@@ -0,0 +1,92 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.4
4
+ // protoc v7.34.0
5
+ // source: crm_gate_pay.proto
6
+
7
+ /* eslint-disable */
8
+ import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
+ import { Observable } from "rxjs";
10
+
11
+ export const protobufPackage = "crm_gate_pay";
12
+
13
+ export interface CreatePayinRequest {
14
+ customer: string;
15
+ amount: number;
16
+ currency: string;
17
+ chain: string;
18
+ managerId: string;
19
+ managerName: string;
20
+ }
21
+
22
+ export interface CreatePayoutRequest {
23
+ customer: string;
24
+ amount: number;
25
+ currency: string;
26
+ chain: string;
27
+ address: string;
28
+ managerId: string;
29
+ managerName: string;
30
+ memo: string;
31
+ feeType: number;
32
+ }
33
+
34
+ export interface GetRowsRequest {
35
+ page: number;
36
+ limit: number;
37
+ searchWord: string;
38
+ status: string;
39
+ dateStart: string;
40
+ dateEnd: string;
41
+ }
42
+
43
+ export interface GetSumsRequest {
44
+ searchWord: string;
45
+ status: string;
46
+ dateStart: string;
47
+ dateEnd: string;
48
+ }
49
+
50
+ export interface JsonResponse {
51
+ statusCode: number;
52
+ json: string;
53
+ }
54
+
55
+ export const CRM_GATE_PAY_PACKAGE_NAME = "crm_gate_pay";
56
+
57
+ export interface CrmGatePayServiceClient {
58
+ createPayin(request: CreatePayinRequest): Observable<JsonResponse>;
59
+
60
+ createPayout(request: CreatePayoutRequest): Observable<JsonResponse>;
61
+
62
+ getRows(request: GetRowsRequest): Observable<JsonResponse>;
63
+
64
+ getSums(request: GetSumsRequest): Observable<JsonResponse>;
65
+ }
66
+
67
+ export interface CrmGatePayServiceController {
68
+ createPayin(request: CreatePayinRequest): Promise<JsonResponse> | Observable<JsonResponse> | JsonResponse;
69
+
70
+ createPayout(request: CreatePayoutRequest): Promise<JsonResponse> | Observable<JsonResponse> | JsonResponse;
71
+
72
+ getRows(request: GetRowsRequest): Promise<JsonResponse> | Observable<JsonResponse> | JsonResponse;
73
+
74
+ getSums(request: GetSumsRequest): Promise<JsonResponse> | Observable<JsonResponse> | JsonResponse;
75
+ }
76
+
77
+ export function CrmGatePayServiceControllerMethods() {
78
+ return function (constructor: Function) {
79
+ const grpcMethods: string[] = ["createPayin", "createPayout", "getRows", "getSums"];
80
+ for (const method of grpcMethods) {
81
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
82
+ GrpcMethod("CrmGatePayService", method)(constructor.prototype[method], method, descriptor);
83
+ }
84
+ const grpcStreamMethods: string[] = [];
85
+ for (const method of grpcStreamMethods) {
86
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
87
+ GrpcStreamMethod("CrmGatePayService", method)(constructor.prototype[method], method, descriptor);
88
+ }
89
+ };
90
+ }
91
+
92
+ export const CRM_GATE_PAY_SERVICE_NAME = "CrmGatePayService";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arbiwallet/contracts",
3
3
  "descriptions": "Generate and manage smart contracts for ArbiWallet",
4
- "version": "1.0.135",
4
+ "version": "1.0.137",
5
5
  "scripts": {
6
6
  "generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
7
7
  },
package/proto/auth.proto CHANGED
@@ -5,7 +5,8 @@ service AuthService {
5
5
  rpc TelegramMiniAppAuth (TelegramMiniAppAuthRequest) returns (AuthTokensResponse);
6
6
  rpc TelegramLoginWidgetAuth (TelegramLoginWidgetAuthRequest) returns (AuthTokensResponse);
7
7
  rpc GoogleAuthStart (GoogleAuthStartRequest) returns (GoogleAuthStartResponse);
8
- rpc GoogleAuthCallback (GoogleAuthCallbackRequest) returns (AuthTokensResponse);
8
+ rpc GoogleAuthCallback (GoogleAuthCallbackRequest) returns (AuthExchangeCodeResponse);
9
+ rpc ExchangeAuthCode (ExchangeAuthCodeRequest) returns (AuthTokensResponse);
9
10
  rpc GoogleAuth (GoogleAuthRequest) returns (AuthTokensResponse);
10
11
  rpc AppleAuth (AppleAuthRequest) returns (AuthTokensResponse);
11
12
  rpc RequestContactCode (ContactCodeRequest) returns (MessageResponse);
@@ -48,6 +49,15 @@ message GoogleAuthCallbackRequest {
48
49
  string state = 2;
49
50
  }
50
51
 
52
+ message ExchangeAuthCodeRequest {
53
+ string code = 1;
54
+ }
55
+
56
+ message AuthExchangeCodeResponse {
57
+ string exchange_code = 1;
58
+ optional string return_url = 2;
59
+ }
60
+
51
61
  message AppleAuthRequest {
52
62
  string identity_token = 1;
53
63
  }
@@ -0,0 +1,52 @@
1
+ syntax = "proto3";
2
+
3
+ package crm_gate_pay;
4
+
5
+ service CrmGatePayService {
6
+ rpc CreatePayin(CreatePayinRequest) returns (JsonResponse);
7
+ rpc CreatePayout(CreatePayoutRequest) returns (JsonResponse);
8
+ rpc GetRows(GetRowsRequest) returns (JsonResponse);
9
+ rpc GetSums(GetSumsRequest) returns (JsonResponse);
10
+ }
11
+
12
+ message CreatePayinRequest {
13
+ string customer = 1;
14
+ double amount = 2;
15
+ string currency = 3;
16
+ string chain = 4;
17
+ string manager_id = 5;
18
+ string manager_name = 6;
19
+ }
20
+
21
+ message CreatePayoutRequest {
22
+ string customer = 1;
23
+ double amount = 2;
24
+ string currency = 3;
25
+ string chain = 4;
26
+ string address = 5;
27
+ string manager_id = 6;
28
+ string manager_name = 7;
29
+ string memo = 8;
30
+ int32 fee_type = 9;
31
+ }
32
+
33
+ message GetRowsRequest {
34
+ int32 page = 1;
35
+ int32 limit = 2;
36
+ string search_word = 3;
37
+ string status = 4;
38
+ string date_start = 5;
39
+ string date_end = 6;
40
+ }
41
+
42
+ message GetSumsRequest {
43
+ string search_word = 1;
44
+ string status = 2;
45
+ string date_start = 3;
46
+ string date_end = 4;
47
+ }
48
+
49
+ message JsonResponse {
50
+ int32 status_code = 1;
51
+ string json = 2;
52
+ }