@bit-ui-libs/common
Version:
This library was generated with [Nx](https://nx.dev).
163 lines (144 loc) • 3.58 kB
text/typescript
import { FileFormatEnum, PagedRequest, RelationTypeEnum, StepEnum } from '../common';
import { BaseAddress } from '../users';
import { CategoryStatusEnum } from './constants';
import { SellingMethodEnum } from './enums';
import { AssetStatus, ChainTypeEnum, CustomerAsset } from './interfaces';
export type GetAssetsRequest = PagedRequest<{
ownerId?: string;
typeId?: string;
orgId?: string;
appName?: string[] | string;
name?: string;
status?: AssetStatus;
eventIdRef?: string;
isMinted?: boolean;
isListed?: boolean;
isVerifiedByWitness?: boolean;
isVerifiedByOfficial?: boolean;
sellingMethod?: SellingMethodEnum;
isFavorite?: boolean;
}>;
export type GetPublicAssetsRequest = PagedRequest<{
ownerId?: string;
typeId?: string;
orgId?: string;
appName?: string;
name?: string;
status?: AssetStatus;
eventIdRef?: string;
isMinted?: boolean;
isVerifiedByWitness?: boolean;
isVerifiedByOfficial?: boolean;
sellingMethod?: SellingMethodEnum;
}>;
export interface GetAssetsRes {
assets: CustomerAsset[];
page: number;
totalPages: number;
}
export type GetAssetGroupsRes = {
[assetGroupName: string]: CustomerAsset[];
}[];
export interface ShareAssetReq {
to: {
email: string;
name: string;
}[];
}
export const chainServiceStatuses = ['INFO', 'PHOTO', 'OFFICIALS', 'QRCODE', 'RFID', 'WITNESS', 'MINTED'] as const;
export type GetAssetGroupsResponse = {
[assetGroupName: string]: CustomerAsset[];
}[];
export interface ShareAssetRequest {
to: { email: string; name: string }[];
}
export interface CategoriesRequest {
parentId?: string;
parentIds?: string[];
appName?: string;
name?: string;
isActive?: boolean;
state?: CategoryStatusEnum;
vdtType?: ChainTypeEnum;
}
export interface SearchAssetTypesRequest {
categoryId?: string;
name?: string;
isActive?: boolean;
state?: CategoryStatusEnum;
vdtType?: ChainTypeEnum;
}
export type GetActiveAssetTemplateRequest = {
typeId: string;
step: StepEnum;
};
export type GetAssetWitnessesRequest = PagedRequest<{
userId?: string;
assetId?: string;
}>;
export type GetPublicWitnessesRequest = PagedRequest<{
eventId?: string;
relationType?: RelationTypeEnum;
}>;
export interface AddReferenceVdtRequest {
serviceId?: string;
assetId: string;
qrCodeRefId: string;
vdtType: ChainTypeEnum;
bitSysId: string;
relationType: RelationTypeEnum;
data?: { title: string };
}
export interface AddReferenceVdtResponse {
assetId: string;
qrCodeRefId: string;
vdtType: ChainTypeEnum;
bitSysId: string;
relationType: RelationTypeEnum;
createdAt: string;
data: { title: string };
}
export interface CreateListingRequest {
id: string;
sellingMethod: SellingMethodEnum;
price: number;
startAt?: string;
endAt?: string;
description: string;
isFreeShipping: boolean;
shippingDetail?: {
shipFrom: BaseAddress & {
phone: string;
};
weight: number;
length: number;
width: number;
height: number;
handlingFee: number;
unitOfMeasurement: string;
packagingType: string;
};
revenue: number;
}
export interface CreateListingResponse {
id: string;
assetId: string;
sellerId: string;
sellerWallet: string;
listingType: string;
plstform: string;
chainName: string;
tokenId: string;
tokenContract: string;
startDate: string;
endDate: string;
}
export interface ListFinalWithTypes {
appName: string;
$resolveImages?: boolean;
}
export interface CollectionReport {
fileFormat: FileFormatEnum;
url: string;
fileName: string;
}