@arbiwallet/contracts 1.0.32 → 1.0.34
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 +20 -0
- package/gen/user.ts +24 -0
- package/package.json +1 -1
- package/proto/kyc.proto +9 -0
- package/proto/user.proto +23 -0
package/gen/kyc.ts
CHANGED
|
@@ -57,6 +57,14 @@ export interface GetVerificationStatusResponse {
|
|
|
57
57
|
updatedAtMs: number;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
export interface GetVerificationStatusesBatchRequest {
|
|
61
|
+
userIds: string[];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface GetVerificationStatusesBatchResponse {
|
|
65
|
+
users: GetVerificationStatusResponse[];
|
|
66
|
+
}
|
|
67
|
+
|
|
60
68
|
export interface ApplySumsubWebhookRequest {
|
|
61
69
|
payloadDigest: string;
|
|
62
70
|
payloadDigestAlg: string;
|
|
@@ -99,6 +107,10 @@ export interface KycVerificationClient {
|
|
|
99
107
|
|
|
100
108
|
getVerificationStatus(request: GetVerificationStatusRequest): Observable<GetVerificationStatusResponse>;
|
|
101
109
|
|
|
110
|
+
getVerificationStatusesBatch(
|
|
111
|
+
request: GetVerificationStatusesBatchRequest,
|
|
112
|
+
): Observable<GetVerificationStatusesBatchResponse>;
|
|
113
|
+
|
|
102
114
|
applySumsubWebhook(request: ApplySumsubWebhookRequest): Observable<ApplySumsubWebhookResponse>;
|
|
103
115
|
|
|
104
116
|
getApplicantFullData(request: GetApplicantFullDataRequest): Observable<GetApplicantFullDataResponse>;
|
|
@@ -117,6 +129,13 @@ export interface KycVerificationController {
|
|
|
117
129
|
request: GetVerificationStatusRequest,
|
|
118
130
|
): Promise<GetVerificationStatusResponse> | Observable<GetVerificationStatusResponse> | GetVerificationStatusResponse;
|
|
119
131
|
|
|
132
|
+
getVerificationStatusesBatch(
|
|
133
|
+
request: GetVerificationStatusesBatchRequest,
|
|
134
|
+
):
|
|
135
|
+
| Promise<GetVerificationStatusesBatchResponse>
|
|
136
|
+
| Observable<GetVerificationStatusesBatchResponse>
|
|
137
|
+
| GetVerificationStatusesBatchResponse;
|
|
138
|
+
|
|
120
139
|
applySumsubWebhook(
|
|
121
140
|
request: ApplySumsubWebhookRequest,
|
|
122
141
|
): Promise<ApplySumsubWebhookResponse> | Observable<ApplySumsubWebhookResponse> | ApplySumsubWebhookResponse;
|
|
@@ -132,6 +151,7 @@ export function KycVerificationControllerMethods() {
|
|
|
132
151
|
"startVerification",
|
|
133
152
|
"refreshAccessToken",
|
|
134
153
|
"getVerificationStatus",
|
|
154
|
+
"getVerificationStatusesBatch",
|
|
135
155
|
"applySumsubWebhook",
|
|
136
156
|
"getApplicantFullData",
|
|
137
157
|
];
|
package/gen/user.ts
CHANGED
|
@@ -16,6 +16,17 @@ export enum UserStatus {
|
|
|
16
16
|
UNRECOGNIZED = -1,
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
export enum UserKycStatus {
|
|
20
|
+
UNVERIFIED = 0,
|
|
21
|
+
NOT_STARTED = 1,
|
|
22
|
+
IN_PROGRESS = 2,
|
|
23
|
+
PENDING_REVIEW = 3,
|
|
24
|
+
APPROVED = 4,
|
|
25
|
+
RETRY_REQUIRED = 5,
|
|
26
|
+
REJECTED = 6,
|
|
27
|
+
UNRECOGNIZED = -1,
|
|
28
|
+
}
|
|
29
|
+
|
|
19
30
|
export enum UserSortBy {
|
|
20
31
|
CREATED_AT = 0,
|
|
21
32
|
STATUS = 1,
|
|
@@ -49,6 +60,8 @@ export interface UserResponse {
|
|
|
49
60
|
createdAt: string;
|
|
50
61
|
updatedAt: string;
|
|
51
62
|
balances: UserBalance[];
|
|
63
|
+
kycStatus: UserKycStatus;
|
|
64
|
+
kyc: UserKycInfo | undefined;
|
|
52
65
|
}
|
|
53
66
|
|
|
54
67
|
export interface UpdateUserRequest {
|
|
@@ -100,6 +113,17 @@ export interface UserBalance {
|
|
|
100
113
|
total: string;
|
|
101
114
|
}
|
|
102
115
|
|
|
116
|
+
export interface UserKycInfo {
|
|
117
|
+
userId: string;
|
|
118
|
+
applicantId: string;
|
|
119
|
+
kycStatus: UserKycStatus;
|
|
120
|
+
reviewAnswer: string;
|
|
121
|
+
rejectionLabels: string[];
|
|
122
|
+
moderationComment: string;
|
|
123
|
+
createdAtMs: number;
|
|
124
|
+
updatedAtMs: number;
|
|
125
|
+
}
|
|
126
|
+
|
|
103
127
|
export const USER_PACKAGE_NAME = "user";
|
|
104
128
|
|
|
105
129
|
export interface UserServiceClient {
|
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.34",
|
|
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
|
@@ -6,6 +6,7 @@ service KycVerification {
|
|
|
6
6
|
rpc StartVerification (StartVerificationRequest) returns (StartVerificationResponse);
|
|
7
7
|
rpc RefreshAccessToken (RefreshAccessTokenRequest) returns (RefreshAccessTokenResponse);
|
|
8
8
|
rpc GetVerificationStatus (GetVerificationStatusRequest) returns (GetVerificationStatusResponse);
|
|
9
|
+
rpc GetVerificationStatusesBatch (GetVerificationStatusesBatchRequest) returns (GetVerificationStatusesBatchResponse);
|
|
9
10
|
rpc ApplySumsubWebhook (ApplySumsubWebhookRequest) returns (ApplySumsubWebhookResponse);
|
|
10
11
|
rpc GetApplicantFullData (GetApplicantFullDataRequest) returns (GetApplicantFullDataResponse);
|
|
11
12
|
}
|
|
@@ -58,6 +59,14 @@ message GetVerificationStatusResponse {
|
|
|
58
59
|
int64 updated_at_ms = 9;
|
|
59
60
|
}
|
|
60
61
|
|
|
62
|
+
message GetVerificationStatusesBatchRequest {
|
|
63
|
+
repeated string user_ids = 1;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
message GetVerificationStatusesBatchResponse {
|
|
67
|
+
repeated GetVerificationStatusResponse users = 1;
|
|
68
|
+
}
|
|
69
|
+
|
|
61
70
|
message ApplySumsubWebhookRequest {
|
|
62
71
|
string payloadDigest = 1;
|
|
63
72
|
string payloadDigestAlg = 2;
|
package/proto/user.proto
CHANGED
|
@@ -15,6 +15,16 @@ enum UserStatus {
|
|
|
15
15
|
BANNED = 1;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
enum UserKycStatus {
|
|
19
|
+
UNVERIFIED = 0;
|
|
20
|
+
NOT_STARTED = 1;
|
|
21
|
+
IN_PROGRESS = 2;
|
|
22
|
+
PENDING_REVIEW = 3;
|
|
23
|
+
APPROVED = 4;
|
|
24
|
+
RETRY_REQUIRED = 5;
|
|
25
|
+
REJECTED = 6;
|
|
26
|
+
}
|
|
27
|
+
|
|
18
28
|
message GetUserRequest {
|
|
19
29
|
int32 id = 1;
|
|
20
30
|
}
|
|
@@ -35,6 +45,8 @@ message UserResponse {
|
|
|
35
45
|
string created_at = 11;
|
|
36
46
|
string updated_at = 12;
|
|
37
47
|
repeated UserBalance balances = 15;
|
|
48
|
+
UserKycStatus kyc_status = 16;
|
|
49
|
+
UserKycInfo kyc = 17;
|
|
38
50
|
}
|
|
39
51
|
|
|
40
52
|
message UpdateUserRequest {
|
|
@@ -96,3 +108,14 @@ message UserBalance {
|
|
|
96
108
|
string reserved = 4;
|
|
97
109
|
string total = 5;
|
|
98
110
|
}
|
|
111
|
+
|
|
112
|
+
message UserKycInfo {
|
|
113
|
+
string user_id = 1;
|
|
114
|
+
string applicant_id = 2;
|
|
115
|
+
UserKycStatus kyc_status = 3;
|
|
116
|
+
string review_answer = 4;
|
|
117
|
+
repeated string rejection_labels = 5;
|
|
118
|
+
string moderation_comment = 6;
|
|
119
|
+
int64 created_at_ms = 7;
|
|
120
|
+
int64 updated_at_ms = 8;
|
|
121
|
+
}
|