@bit-ui-libs/common
Version:
This library was generated with [Nx](https://nx.dev).
83 lines (77 loc) • 2.15 kB
text/typescript
import {
ApplicationData,
AttachmentData,
AttachmentType,
DeviceData,
SubjectData,
SubjectDataReferenceItem,
WeatherData,
} from '../../common';
import { ChainTypeEnum } from './chain-type-enum';
import { AssetStatus } from './customer-base';
import { LocationAccuracy } from '../../asset/interfaces';
import { CategoryStatusEnum } from '../constants';
export interface CreateChainBaseRequest {
application: ApplicationData;
subject: SubjectData;
device: DeviceData;
weather?: WeatherData;
data: {
date: string;
// asset: ChainAssetEventData;
// service: ChainServiceEventData;
};
}
export interface ChainBaseEvent {
id: string;
application: string;
// assetType?: string;
// serviceType?: string;
device: DeviceData;
weather: WeatherData;
status: AssetStatus;
subjectType: string;
/**
* For some reason there are rare situations where this is `undefined`
*/
attachments?: AttachmentData[] | null;
eventDate?: string | null;
// Must be overriden by inheriting interfaces
data?: ChainBaseEventData;
subjectReferences: SubjectDataReferenceItem[];
}
export interface ChainBaseEventData {
// Examples of inheriting interfaces having custom properties
// assetType?: string;
assetCategory?: string[];
// assetName?: string;
// assetProperties?: AssetTypePropertyData[];
// serviceType?: string;
// serviceCategory?: string[];
// serviceName?: string;
// serviceProperties?: ServiceTypePropertyData[];
metadata?: Partial<ChainBaseEventMetadata>;
locationAccuracy?: LocationAccuracy;
}
export interface ChainBaseEventMetadata {
// assetTypeId?: string;
// serviceTypeId?: string;
qrId?: string;
timezone?: string;
nftTokenId?: string;
description?: string;
immutableTime?: string;
nftMetadataUrl?: string;
nftSmartContractAddress?: string;
immutableTransactionHash?: string;
city?: string;
state?: string;
country?: string;
platform?: string;
categoryState?: CategoryStatusEnum;
}
export interface FindMainPhotoByTypeClassOpts<TPhotos> {
photos: TPhotos[];
chainType: ChainTypeEnum;
attachmentType: AttachmentType;
}