web-service/apps/catalog/src/interfaces/create-content-request.inte...

41 lines
973 B
TypeScript

import { AssetSource } from '../enums/asset-source.enum';
import { ContentAssetType } from '../enums/content-asset-type.enum';
import { ContentType } from '../enums/content-type.enum';
import { Currency } from '../enums/currency.enum';
import { Privacy } from '../enums/privacy.enum';
export interface ContentAssetTypeProperties {
type: ContentAssetType;
typeName?: string;
source?: AssetSource;
}
export interface CreateContentFiles {
[x: string]: ContentAssetTypeProperties;
}
export interface CreateContentPricing {
currency: Currency;
price: number;
}
export interface CreateContentRequest {
name: string;
description: string;
parentId?: number;
onsale?: boolean;
commentsEnabled?: boolean;
openSource?: boolean;
privacy: Privacy;
type: ContentType;
stock?: number;
license?: string;
files?: CreateContentFiles;
prices?: CreateContentPricing[];
}
export interface CreateContentRevisionRequest {
files?: CreateContentFiles;
}