import {AbstractCall, BaseRequestPayload, BaseResponsePayload} from "../../src/AbstractCall"; import {Service} from "../../src/Service"; export class PollCall extends AbstractCall{ getRequestName(): string { return PollCall.NAME; } getService(): Service { return Service.TEST; } } export module PollCall { export const NAME = "SAVE_POLL_CALL"; export interface Timeslot { start_date: Date; end_date: Date; } export interface Timeslot2 { start_date: Date; end_date: Date; } export interface Participant { id: string; timeslots: Timeslot2[]; } export interface RequestModel extends BaseRequestPayload{ creator: string; id: string; title: string; start_date_poll: Date; end_date_poll: Date; exposing: boolean; location: string; timeslot_min_duration: number; password: string; salt: string; theme: string; color_header: string; color_background: string; logo: string; displayed_dates: any[]; timeslots: {stard_date:Date,end_date:Date}[]; participants: {id:string,timeslots:{stard_date:Date,end_date:Date}[]}[]; } export interface ResponseModel extends BaseResponsePayload{ data:{id:string} } }