coconut-open-api-js
Version:
Coconut Calendar JS Open API SDK
74 lines (73 loc) • 2.38 kB
TypeScript
import { ModelInterface } from '../index';
import { AnswerModel } from './answer';
import Model from './model';
import { ResponseModel } from './response';
export interface AttendeeModel extends ModelInterface {
alias(alias: string | number): this;
answers(answers: AnswerModel | AnswerModel[]): this;
as(identifier: number): this;
located(details: LocatableDetailParameters): this;
messagable(messageable: boolean): this;
named(first: string, last: string): this;
provided(notes: string): this;
reachable(details: ReachableDetailParameters): this;
speaks(language: string): this;
transform(): object;
}
export interface AttendeeAttributes {
attributes?: object;
id?: number;
type: string;
}
export interface AttendeeParameters {
alias?: string | number;
address?: string;
answers?: AnswerModel[] | [];
cell_phone?: string;
city?: string;
country?: string;
email: string | null;
first_name: string | null;
identifier: number | null;
last_name: string | null;
language?: string;
messagable?: boolean;
notes?: string;
phone?: string;
postcode?: string;
recaptcha_token?: string | null;
region?: string;
responses?: ResponseModel[] | [];
timezone?: string;
work_phone?: string;
}
export interface LocatableDetailParameters {
address?: string;
city?: string;
country?: string;
postcode?: string;
region?: string;
timezone?: string;
}
export interface ReachableDetailParameters {
cell_phone?: string;
email: string;
phone?: string;
work_phone?: string;
}
export default class Attendee extends Model implements AttendeeModel {
protected attributes: AttendeeParameters;
constructor();
alias(alias: string | number): this;
answers(answers: AnswerModel | AnswerModel[]): this;
as(identifier: number): this;
located(details: LocatableDetailParameters): this;
messagable(messageable?: boolean): this;
named(first: string, last: string): this;
provided(notes: string): this;
reachable(details: ReachableDetailParameters): this;
responses(responses: ResponseModel | ResponseModel[]): this;
speaks(language: string): this;
transform(): object;
protected parameters(): AttendeeAttributes;
}