UNPKG

my-test123

Version:
60 lines (59 loc) 1.54 kB
import { User } from 'ngx-login-client'; import { UserUI, UserMapper } from './user'; import { Mapper, MapTree, modelService } from './common.model'; export declare class Comment extends modelService { attributes: CommentAttributes; relationships: { 'creator': { data: { id: string; type: string; }; }; }; links: CommentLink; relationalData?: RelationalData; } export declare class CommentLink { self: string; } export declare class CommentAttributes { body: string; 'body.rendered': string; 'markup': string; 'created-at': string; } export declare class Comments { data: Comment[]; } export declare class CommentPost { data: Comment; } export declare class RelationalData { creator?: User; } export interface CommentUI { id: string; body: string; markup: string; createdAt: string; creator: UserUI; bodyRendered: string; selfLink: string; } export interface CommentService extends Comment { } export declare class CommentMapper implements Mapper<CommentService, CommentUI> { private userMapper; constructor(userMapper: UserMapper); serviceToUiMapTree: MapTree; uiToServiceMapTree: MapTree; toUIModel(arg: CommentService): CommentUI; toServiceModel(arg: CommentUI): CommentService; } export declare class CommentCreatorResolver { private comment; constructor(comment: CommentUI); resolveCreator(creators: UserUI[]): void; getComment(): CommentUI; }