src/user/user.interface.ts
Properties |
| currentRequest |
currentRequest:
|
Type : AccessRequestDetails
|
import { Wallet } from "ethers";
import { LeanDocument, ObjectId } from "mongoose";
import type { IFile, ICmsField, UserJwtPayload } from "src/common/interfaces";
import { EndUserRoles } from "src/common/interfaces";
import type { UpdateUserDto } from "./dto/update-user.dto";
import type { SubscribeUserDto } from "./dto/subscribe-user.dto";
import type { UserDocument } from "./schemas/user.schema";
import type { OnChainFieldDTO } from "src/shared/dto/on-chain-field.dto";
import type { RequestAccessStatusDto } from "./dto/updateAccess-request.dto";
import type { AccessRequestDetails } from "./entities/access-request.entity";
import { FundDocument } from "src/security/schemas/fund.schema";
export interface IUser {
_id: string;
email: string;
subscribedFunds: string[];
subscribedBonds: string[];
name: string;
legalDocuments: IFile;
endUserRole: EndUserRoles;
onboardByEmail: string;
cmsFields: ICmsField[];
wallets: Wallet[];
}
export interface IUpdateUser {
id: string;
updateUserDto: UpdateUserDto;
userJwtPayload: UserJwtPayload;
}
export interface ISubscribeUser extends SubscribeUserDto {
userId: string;
userJwt: UserJwtPayload;
}
export interface IBlacklistUser {
id: string;
userRole: EndUserRoles.investor | EndUserRoles.dealer;
isBlackListed: boolean;
dealerAddress?: string;
}
export interface IAddedWallet {
id: string;
walletLabel: string;
}
export interface IDealerIsAllowed {
dealerEmail: string;
investorId: string;
fundId?: string;
}
export interface UserWithOnChainFields extends LeanDocument<UserDocument> {
onChainFields?: OnChainFieldDTO[];
}
export interface IUserOnChainDataField {
userId: string;
fieldName: string;
fieldType: string;
fieldValue: string;
}
export interface ISetUsersInstrumentBalance {
tokenAddress: string;
users: UserDocument[];
unconfirmedRedemptionAmountById: Record<string, string>;
}
export interface IUpdateAccessRequest extends RequestAccessStatusDto {
currentRequest: AccessRequestDetails;
}
export interface IGetFundSubscriptionDetails {
fundId: string;
userId: string;
}
export interface IMatchQuery {
fundId: {
$in: ObjectId[];
};
userId?: {
$in: ObjectId[];
};
}
export interface IGetRequestsByFundsId {
_id: ObjectId;
user: LeanDocument<UserDocument>;
fund: LeanDocument<FundDocument>;
accessRequests: AccessRequestDetails[];
}
export interface IGetInvestorBalanceByInstrument {
investor: LeanDocument<UserDocument>;
instrumentId: string;
}