@bit-ui-libs/common
Version:
This library was generated with [Nx](https://nx.dev).
54 lines (50 loc) • 1.29 kB
text/typescript
import { CustomerAsset, MeasurementUnitEnum, SellingMethodEnum } from '../../asset';
import { WalletPlatformEnum } from '../../common';
import { BaseAddress } from '../../users';
import { ListedStatusEnum } from '../enums';
export interface Listing {
id: string;
assetId: string;
createdBy: string;
price: number;
sellingMethod: SellingMethodEnum;
status: ListedStatusEnum;
startAt: string;
endAt: string;
concurrencyStamp: string;
isFreeShipping: boolean;
shippingDetail: {
shipFrom: BaseAddress;
weight: number;
length: number;
width: number;
height: number;
handlingFee: number;
unitOfMeasurement: MeasurementUnitEnum;
packagingType: string;
};
description: string;
}
// When coming from the search API,
// Listing has combined properties with ListingWithAsset's asset
export type ListingExtended = Omit<Listing, 'concurrencyStamp'> & ListingWithAsset['asset'];
export interface ListingWithAsset extends Listing {
asset: Pick<
CustomerAsset,
| 'id'
| 'appName'
| 'qrCodeRef'
| 'eventIdRef'
| 'name'
| 'level'
| 'ownerId'
| 'isVerifiedByWitness'
| 'isVerifiedByOfficial'
| 'orgId'
| 'typeId'
| 'createdAt'
> & {
platform: WalletPlatformEnum;
isListed: boolean;
};
}