@arbiwallet/contracts 1.0.20 → 1.0.22
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/kyc.ts +21 -12
- package/gen/user.ts +12 -1
- package/package.json +1 -1
- package/proto/kyc.proto +19 -5
- package/proto/user.proto +8 -0
package/gen/kyc.ts
CHANGED
|
@@ -67,13 +67,27 @@ export interface ApplySumsubWebhookResponse {
|
|
|
67
67
|
ok: boolean;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
export interface
|
|
70
|
+
export interface GetApplicantFullDataRequest {
|
|
71
71
|
userId: string;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
export interface
|
|
74
|
+
export interface VerifiedApplicantResource {
|
|
75
|
+
imageId: string;
|
|
76
|
+
idDocType: string;
|
|
77
|
+
fileName: string;
|
|
78
|
+
fileType: string;
|
|
79
|
+
contentType: string;
|
|
80
|
+
contentLength: number;
|
|
81
|
+
fileData: Uint8Array;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface GetApplicantFullDataResponse {
|
|
85
|
+
userId: string;
|
|
75
86
|
applicantId: string;
|
|
87
|
+
inspectionId: string;
|
|
88
|
+
applicantJson: string;
|
|
76
89
|
resourcesJson: string;
|
|
90
|
+
verifiedResources: VerifiedApplicantResource[];
|
|
77
91
|
}
|
|
78
92
|
|
|
79
93
|
export const KYC_PACKAGE_NAME = "kyc";
|
|
@@ -87,9 +101,7 @@ export interface KycVerificationClient {
|
|
|
87
101
|
|
|
88
102
|
applySumsubWebhook(request: ApplySumsubWebhookRequest): Observable<ApplySumsubWebhookResponse>;
|
|
89
103
|
|
|
90
|
-
|
|
91
|
-
request: GetVerifiedApplicantDocumentsByExternalUserIdRequest,
|
|
92
|
-
): Observable<GetVerifiedApplicantDocumentsByExternalUserIdResponse>;
|
|
104
|
+
getApplicantFullData(request: GetApplicantFullDataRequest): Observable<GetApplicantFullDataResponse>;
|
|
93
105
|
}
|
|
94
106
|
|
|
95
107
|
export interface KycVerificationController {
|
|
@@ -109,12 +121,9 @@ export interface KycVerificationController {
|
|
|
109
121
|
request: ApplySumsubWebhookRequest,
|
|
110
122
|
): Promise<ApplySumsubWebhookResponse> | Observable<ApplySumsubWebhookResponse> | ApplySumsubWebhookResponse;
|
|
111
123
|
|
|
112
|
-
|
|
113
|
-
request:
|
|
114
|
-
):
|
|
115
|
-
| Promise<GetVerifiedApplicantDocumentsByExternalUserIdResponse>
|
|
116
|
-
| Observable<GetVerifiedApplicantDocumentsByExternalUserIdResponse>
|
|
117
|
-
| GetVerifiedApplicantDocumentsByExternalUserIdResponse;
|
|
124
|
+
getApplicantFullData(
|
|
125
|
+
request: GetApplicantFullDataRequest,
|
|
126
|
+
): Promise<GetApplicantFullDataResponse> | Observable<GetApplicantFullDataResponse> | GetApplicantFullDataResponse;
|
|
118
127
|
}
|
|
119
128
|
|
|
120
129
|
export function KycVerificationControllerMethods() {
|
|
@@ -124,7 +133,7 @@ export function KycVerificationControllerMethods() {
|
|
|
124
133
|
"refreshAccessToken",
|
|
125
134
|
"getVerificationStatus",
|
|
126
135
|
"applySumsubWebhook",
|
|
127
|
-
"
|
|
136
|
+
"getApplicantFullData",
|
|
128
137
|
];
|
|
129
138
|
for (const method of grpcMethods) {
|
|
130
139
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/gen/user.ts
CHANGED
|
@@ -29,19 +29,30 @@ export interface UserResponse {
|
|
|
29
29
|
updatedAt: string;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
export interface UpdateUserRequest {
|
|
33
|
+
userId: number;
|
|
34
|
+
firstName?: string | undefined;
|
|
35
|
+
lastName?: string | undefined;
|
|
36
|
+
avatar?: string | undefined;
|
|
37
|
+
}
|
|
38
|
+
|
|
32
39
|
export const USER_PACKAGE_NAME = "user";
|
|
33
40
|
|
|
34
41
|
export interface UserServiceClient {
|
|
35
42
|
getUser(request: GetUserRequest): Observable<UserResponse>;
|
|
43
|
+
|
|
44
|
+
updateUser(request: UpdateUserRequest): Observable<UserResponse>;
|
|
36
45
|
}
|
|
37
46
|
|
|
38
47
|
export interface UserServiceController {
|
|
39
48
|
getUser(request: GetUserRequest): Promise<UserResponse> | Observable<UserResponse> | UserResponse;
|
|
49
|
+
|
|
50
|
+
updateUser(request: UpdateUserRequest): Promise<UserResponse> | Observable<UserResponse> | UserResponse;
|
|
40
51
|
}
|
|
41
52
|
|
|
42
53
|
export function UserServiceControllerMethods() {
|
|
43
54
|
return function (constructor: Function) {
|
|
44
|
-
const grpcMethods: string[] = ["getUser"];
|
|
55
|
+
const grpcMethods: string[] = ["getUser", "updateUser"];
|
|
45
56
|
for (const method of grpcMethods) {
|
|
46
57
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
47
58
|
GrpcMethod("UserService", method)(constructor.prototype[method], method, descriptor);
|
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.
|
|
4
|
+
"version": "1.0.22",
|
|
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/kyc.proto
CHANGED
|
@@ -7,7 +7,7 @@ service KycVerification {
|
|
|
7
7
|
rpc RefreshAccessToken (RefreshAccessTokenRequest) returns (RefreshAccessTokenResponse);
|
|
8
8
|
rpc GetVerificationStatus (GetVerificationStatusRequest) returns (GetVerificationStatusResponse);
|
|
9
9
|
rpc ApplySumsubWebhook (ApplySumsubWebhookRequest) returns (ApplySumsubWebhookResponse);
|
|
10
|
-
rpc
|
|
10
|
+
rpc GetApplicantFullData (GetApplicantFullDataRequest) returns (GetApplicantFullDataResponse);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
enum KycStatus {
|
|
@@ -68,11 +68,25 @@ message ApplySumsubWebhookResponse {
|
|
|
68
68
|
bool ok = 1;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
message
|
|
71
|
+
message GetApplicantFullDataRequest {
|
|
72
72
|
string user_id = 1;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
message
|
|
76
|
-
string
|
|
77
|
-
string
|
|
75
|
+
message VerifiedApplicantResource {
|
|
76
|
+
string image_id = 1;
|
|
77
|
+
string id_doc_type = 2;
|
|
78
|
+
string file_name = 3;
|
|
79
|
+
string file_type = 4;
|
|
80
|
+
string content_type = 5;
|
|
81
|
+
int64 content_length = 6;
|
|
82
|
+
bytes file_data = 7;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
message GetApplicantFullDataResponse {
|
|
86
|
+
string user_id = 1;
|
|
87
|
+
string applicant_id = 2;
|
|
88
|
+
string inspection_id = 3;
|
|
89
|
+
string applicant_json = 4;
|
|
90
|
+
string resources_json = 5;
|
|
91
|
+
repeated VerifiedApplicantResource verified_resources = 6;
|
|
78
92
|
}
|
package/proto/user.proto
CHANGED
|
@@ -3,6 +3,7 @@ package user;
|
|
|
3
3
|
|
|
4
4
|
service UserService {
|
|
5
5
|
rpc GetUser (GetUserRequest) returns (UserResponse);
|
|
6
|
+
rpc UpdateUser (UpdateUserRequest) returns (UserResponse);
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
message GetUserRequest {
|
|
@@ -23,3 +24,10 @@ message UserResponse {
|
|
|
23
24
|
string created_at = 11;
|
|
24
25
|
string updated_at = 12;
|
|
25
26
|
}
|
|
27
|
+
|
|
28
|
+
message UpdateUserRequest {
|
|
29
|
+
int32 user_id = 1;
|
|
30
|
+
optional string first_name = 2;
|
|
31
|
+
optional string last_name = 3;
|
|
32
|
+
optional string avatar = 4;
|
|
33
|
+
}
|