/// import { Entity, RawEntity } from '../core/models'; import * as moment from 'moment'; import { Vote } from '../vote/vote.model'; import { Comment } from '../comment/comment.model'; import Moment = moment.Moment; export declare type ItemStatus = 'CITIZEN_PROPOSAL' | 'ON_AGENDA'; export declare type ItemOutcome = { result: string; votes: { yes: number; no: number; }; }; export declare type AgendaInfo = { groupId: string; meetingId: string; itemNumber: number; feedbackDeadline: Moment | string | any; closedSession: boolean; outcome?: ItemOutcome; }; export declare type RawAgendaInfo = { [P in 'groupId' | 'meetingId' | 'itemNumber' | 'closedSession']: AgendaInfo[P]; } & { feedbackDeadline: string; outcome?: ItemOutcome; }; export declare type ItemStatsAdt = { comments: { pro: number; con: number; neutral: number; }; votes: { yes: number; no: number; }; }; export interface Item extends Entity { text: string; resourceLinks: { url: string; }[]; activity?: ItemStatsAdt; onAgendas: { [id: string]: AgendaInfo; }; } export declare type RawItem = RawEntity & { [P in 'text' | 'resourceLinks']: Item[P]; } & { resourceLinks: string[]; activity?: ItemStatsAdt; } & { posted: string; onAgendas: { [id: string]: RawAgendaInfo; }; }; export declare type ItemWithComments = Item & { comments: Comment[]; }; export declare type ItemWithVotes = Item & { votes: Vote[]; }; export declare const parseItem: (it: RawItem | any) => Item; export declare const itemsEqual: (x: Item, y: Item) => boolean; export declare function mergeItems(prev: Item, next: Item): Item;