add v5 user rest endpoints
This commit is contained in:
@@ -13,3 +13,4 @@ export * from './v5-asset';
|
||||
export * from './v5-market';
|
||||
export * from './v5-position';
|
||||
export * from './v5-trade';
|
||||
export * from './v5-user';
|
||||
|
||||
@@ -127,3 +127,10 @@ export interface WithdrawParamsV5 {
|
||||
forceChain?: number;
|
||||
accountType?: string;
|
||||
}
|
||||
|
||||
export interface CreateSubMemberParamsV5 {
|
||||
username: string;
|
||||
memberType: 1 | 6;
|
||||
switch?: 0 | 1;
|
||||
note?: string;
|
||||
}
|
||||
|
||||
21
src/types/request/v5-user.ts
Normal file
21
src/types/request/v5-user.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { PermissionsV5 } from '../v5-shared';
|
||||
|
||||
export interface CreateSubApiKeyParamsV5 {
|
||||
subuid: number;
|
||||
note?: string;
|
||||
readOnly: 0 | 1;
|
||||
ips?: string[];
|
||||
permissions: PermissionsV5;
|
||||
}
|
||||
|
||||
export interface UpdateApiKeyParamsV5 {
|
||||
readOnly?: 0 | 1;
|
||||
ips?: string[];
|
||||
permissions: PermissionsV5;
|
||||
}
|
||||
|
||||
export interface UpdateSubApiKeyUpdateParamsV5 {
|
||||
readOnly?: number;
|
||||
ips?: string[];
|
||||
permissions: PermissionsV5;
|
||||
}
|
||||
@@ -9,3 +9,4 @@ export * from './v5-asset';
|
||||
export * from './v5-market';
|
||||
export * from './v5-position';
|
||||
export * from './v5-trade';
|
||||
export * from './v5-user';
|
||||
|
||||
58
src/types/response/v5-user.ts
Normal file
58
src/types/response/v5-user.ts
Normal file
@@ -0,0 +1,58 @@
|
||||
import { PermissionsV5 } from '../v5-shared';
|
||||
|
||||
export interface CreateSubMemberResultV5 {
|
||||
uid: string;
|
||||
username: string;
|
||||
memberType: number;
|
||||
status: number;
|
||||
remark: string;
|
||||
}
|
||||
|
||||
export interface CreateSubApiKeyResultV5 {
|
||||
id: string;
|
||||
note: string;
|
||||
apiKey: string;
|
||||
readOnly: number;
|
||||
secret: string;
|
||||
permissions: PermissionsV5;
|
||||
}
|
||||
|
||||
export interface SubMemberV5 {
|
||||
uid: string;
|
||||
username: string;
|
||||
memberType: number;
|
||||
status: number;
|
||||
remark: string;
|
||||
}
|
||||
export type ApiKeyType = 1 | 2;
|
||||
|
||||
export interface ApiKeyInfoV5 {
|
||||
id: string;
|
||||
note: string;
|
||||
apiKey: string;
|
||||
readOnly: 0 | 1;
|
||||
secret: string;
|
||||
permissions: PermissionsV5;
|
||||
ips?: string[];
|
||||
type: 1 | 2;
|
||||
deadlineDay?: number;
|
||||
expiredAt?: string;
|
||||
createdAt: string;
|
||||
unified: 0 | 1;
|
||||
uta: 0 | 1;
|
||||
userID: number;
|
||||
inviterID: number;
|
||||
vipLevel?: string;
|
||||
mktMakerLevel?: string;
|
||||
affiliateID?: number;
|
||||
}
|
||||
|
||||
export interface UpdateApiKeyResultV5 {
|
||||
id: string;
|
||||
note: string;
|
||||
apiKey: string;
|
||||
readOnly: 0 | 1;
|
||||
secret: string;
|
||||
permissions: PermissionsV5;
|
||||
ips: string[];
|
||||
}
|
||||
@@ -34,6 +34,25 @@ export type TransactionTypeV5 =
|
||||
| 'CURRENCY_BUY'
|
||||
| 'CURRENCY_SELL';
|
||||
|
||||
export type PermissionTypeV5 =
|
||||
| 'ContractTrade'
|
||||
| 'Spot'
|
||||
| 'Wallet'
|
||||
| 'Options'
|
||||
| 'Derivatives'
|
||||
| 'Exchange'
|
||||
| 'NFT';
|
||||
|
||||
export interface PermissionsV5 {
|
||||
ContractTrade?: string[];
|
||||
Spot?: string[];
|
||||
Wallet?: string[];
|
||||
Options?: string[];
|
||||
Derivatives?: string[];
|
||||
Exchange?: string[];
|
||||
NFT?: string[];
|
||||
}
|
||||
|
||||
export interface CategoryCursorListV5<T extends unknown[]> {
|
||||
category: CategoryV5;
|
||||
list: T;
|
||||
|
||||
Reference in New Issue
Block a user