coconut-open-api-js
Version:
Coconut Calendar JS Open API SDK
46 lines (45 loc) • 1.52 kB
TypeScript
import { ModelInterface } from '../index';
import { AnswerModel } from './answer';
import Model from './model';
export interface ClientModel extends ModelInterface {
alias(alias: string | number): this;
answers(answers: AnswerModel | AnswerModel[]): 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 ClientAttributes {
attributes?: object;
type: string;
}
export interface ClientParameters {
alias?: string | number;
first_name: string | null;
last_name: string | null;
notes?: string;
lang?: string;
cell_phone?: string;
email: string | null;
answers?: AnswerModel[] | [];
receive_sms: boolean;
}
export interface ReachableDetailParameters {
cell_phone?: string;
email: string;
}
export default class Client extends Model implements ClientModel {
protected attributes: ClientParameters;
constructor();
alias(alias: string | number): this;
answers(answers: AnswerModel | AnswerModel[]): 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;
protected parameters(): ClientAttributes;
}