UNPKG

fabric8-planner

Version:
99 lines (98 loc) 2.83 kB
import { Store } from '@ngrx/store'; import { Observable } from 'rxjs'; import { IterationService as Service } from './../services/iteration.service'; import { AppState } from './../states/app.state'; import { Mapper, MapTree, modelService, modelUI } from './common.model'; export declare class IterationModel extends modelService { attributes?: IterationAttributes; links?: IterationLinks; relationships?: IterationRelations; hasChildren?: boolean; children?: IterationModel[]; } export declare class IterationAttributes { user_active?: boolean; active_status?: boolean; endAt?: string; startAt?: string; name: string; state: string; description?: string; parent_path: string; resolved_parent_path?: string; } export declare class IterationLinks { self: string; } export declare class IterationRelations { parent?: { data: { id: string; type: string; }; links: { self: string; }; }; space: { data: { id: string; type: string; }; links?: { self: string; }; }; workitems: { links: { related: string; }; meta: { closed: number; total: number; }; }; } export interface IterationService extends IterationModel { } export interface IterationUI extends modelUI { parentPath: string; resolvedParentPath: string; userActive: boolean; isActive: boolean; startAt: string; endAt: string; description: string; state: string; link: string; workItemTotalCount: number; workItemClosedCount: number; children: IterationUI[]; hasChildren?: boolean; parentId?: string; selected: boolean; showChildren: boolean; } export declare class IterationMapper implements Mapper<IterationModel, IterationUI> { serviceToUiMapTree: MapTree; uiToServiceMapTree: MapTree; toUIModel(arg: IterationService): IterationUI; toServiceModel(arg: IterationUI): IterationService; } export declare class IterationQuery { private store; private iterationService; private plannerSelector; private iterationSelector; private iterationSource; constructor(store: Store<AppState>, iterationService: Service); getIterations(): Observable<IterationUI[]>; getIterationObservableById(id: string): Observable<IterationUI>; getSelectedIteration(): Observable<IterationUI>; getIterationsWithChildren(): Observable<IterationUI[]>; getIterationForTree(): Observable<IterationUI[]>; getActiveIterations(): Observable<IterationUI[]>; deselectAllIteration(): void; readonly getIterationIds: Observable<string[]>; readonly getIterationNames: Observable<string[]>; }