@twilio/flex-ui
Version:
Twilio Flex UI
128 lines (127 loc) • 3.24 kB
TypeScript
type AnswerType = "select" | "fiveStars";
export interface IAnswer {
id: string;
name: string;
description: string;
score: number;
sort?: number;
}
export interface IQuestion {
id: string;
name: string;
sort: number;
answers_type: AnswerType;
NA: boolean;
answers: Array<IAnswer>;
description?: string;
}
export interface IQuestionCategory {
id: string;
name: string;
description: string;
sort: number;
metrics: Array<IQuestion>;
}
export interface IQuestionnaire {
id: string;
name: string;
description: string;
categories: Array<IQuestionCategory>;
}
export interface IQuestionnairesResponse {
account_id: string;
questionnaires: Array<IQuestionnaire>;
}
export interface ICommentCategory {
name: string;
default: boolean;
id: string;
sort: number;
}
export interface AnswerSet {
name: string;
id: string;
sort: number;
type: string;
category_id: string;
answers: Array<any>;
}
export interface IAssessmentSettings {
account_id: string;
comments: {
categories: Array<ICommentCategory>;
};
NA: {
name: string;
description: string;
score: number;
id: string;
};
answer_sets: Array<AnswerSet>;
answer_set_categories: Array<any>;
}
export interface IAssessment {
account_id?: string;
agent_id?: string;
answer_id?: string;
answer_text?: string;
assessment_id?: string;
category_id?: string;
category_name?: string;
external_id?: string;
metric_id?: string;
metric_name?: string;
offset?: number;
questionnaire_id?: string;
questionnaire_name?: string;
rejection?: null;
report?: boolean;
review?: string;
score_max?: number;
score_min?: number;
score_pct?: number;
score?: number;
segment_id?: string;
timestamp_updated?: number;
timestamp?: number;
type?: string;
user_email?: string;
user_id?: string;
user_name?: string;
weight?: number;
}
export interface IComment {
account_id?: string;
agent_id?: string;
assessment_id?: string;
category_id?: string;
category_name?: string;
comment?: string;
external_id?: string;
offset?: number;
rejection?: null;
report?: boolean;
review?: string;
segment_id?: string;
timestamp_updated?: number;
timestamp?: number;
type?: string;
user_email?: string;
user_id?: string;
user_name?: string;
weight?: number;
}
export interface IAssessmentResponse {
assessments: Array<IAssessment>;
}
export interface ICommentsResponse {
comments: Array<IComment>;
}
export declare const QUESTIONNAIRES_UPDATE = "FLEX_INSIGHTS_QUESTIONNAIRES_UPDATE";
export declare const ASSESSMENTS_UPDATE = "FLEX_INSIGHTS_ASSESSMENTS_UPDATE";
export declare const ASSESSMENTS_ADD = "FLEX_INSIGHTS_ASSESSMENTS_ADD";
export declare const ASSESSMENTS_REMOVE = "FLEX_INSIGHTS_ASSESSMENTS_REMOVE";
export declare const COMMENTS_UPDATE = "FLEX_INSIGHTS_COMMENTS_UPDATE";
export declare const COMMENTS_ADD = "FLEX_INSIGHTS_COMMENTS_ADD";
export declare const ASSESSMENTS_SETTINGS_UPDATE = "FLEX_INSIGHTS_ASSESSMENTS_SETTINGS_UPDATE";
export {};