немного типов из бека и после парса
This commit is contained in:
parent
a8a8a6df09
commit
cc938525ac
@ -1,5 +1,39 @@
|
|||||||
import { AnyTypedQuizQuestion } from "@model/questionTypes/shared";
|
import { AnyTypedQuizQuestion } from "@model/questionTypes/shared";
|
||||||
import { QuizConfig } from "@model/quizSettings";
|
// import { QuizConfig } from "@model/quizSettings";
|
||||||
|
|
||||||
|
export type QuizStartpageType = "standard" | "expanded" | "centered" | null;
|
||||||
|
|
||||||
|
export type QuizStartpageAlignType = "left" | "right" | "center";
|
||||||
|
|
||||||
|
export type QuizType = "quiz" | "form";
|
||||||
|
|
||||||
|
export type QuizResultsType = true | null;
|
||||||
|
|
||||||
|
export type QuizResultInfoWhen = 'before' | 'after' | 'email';
|
||||||
|
|
||||||
|
export type FCField = {
|
||||||
|
text: string
|
||||||
|
innerText: string
|
||||||
|
key: string
|
||||||
|
required: boolean
|
||||||
|
used: boolean
|
||||||
|
}
|
||||||
|
export interface GetDataResponse {
|
||||||
|
cnt: number;
|
||||||
|
settings: {
|
||||||
|
fp: boolean;
|
||||||
|
rep: boolean;
|
||||||
|
name: string;
|
||||||
|
cfg: string;
|
||||||
|
lim: number;
|
||||||
|
due: number;
|
||||||
|
delay: number;
|
||||||
|
pausable: boolean;
|
||||||
|
};
|
||||||
|
items: GetItems[];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type QuestionsStore = {
|
export type QuestionsStore = {
|
||||||
items: (AnyTypedQuizQuestion)[];
|
items: (AnyTypedQuizQuestion)[];
|
||||||
@ -9,12 +43,88 @@ export type QuestionsStore = {
|
|||||||
|
|
||||||
export interface Settings {
|
export interface Settings {
|
||||||
|
|
||||||
fp: boolean,
|
fp: boolean;
|
||||||
rep: boolean,
|
rep: boolean;
|
||||||
name: string,
|
name: string;
|
||||||
lim: number,
|
lim: number;
|
||||||
due: number,
|
due: number;
|
||||||
delay: number,
|
delay: number;
|
||||||
pausable: boolean,
|
pausable: boolean;
|
||||||
cfg: QuizConfig
|
cfg: QuizConfig
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface QuizConfig {
|
||||||
|
type: QuizType;
|
||||||
|
noStartPage: boolean;
|
||||||
|
startpageType: QuizStartpageType;
|
||||||
|
results: QuizResultsType;
|
||||||
|
haveRoot: string;
|
||||||
|
resultInfo: {
|
||||||
|
when: QuizResultInfoWhen;
|
||||||
|
share: boolean;
|
||||||
|
replay: boolean;
|
||||||
|
theme: string;
|
||||||
|
reply: string;
|
||||||
|
replname: string;
|
||||||
|
};
|
||||||
|
startpage: {
|
||||||
|
description: string;
|
||||||
|
button: string;
|
||||||
|
position: QuizStartpageAlignType;
|
||||||
|
favIcon: string | null;
|
||||||
|
logo: string | null;
|
||||||
|
originalLogo: string | null;
|
||||||
|
background: {
|
||||||
|
type: null | "image" | "video";
|
||||||
|
desktop: string | null;
|
||||||
|
originalDesktop: string | null;
|
||||||
|
mobile: string | null;
|
||||||
|
originalMobile: string | null;
|
||||||
|
video: string | null;
|
||||||
|
cycle: boolean;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
formContact: {
|
||||||
|
title: string;
|
||||||
|
desc: string;
|
||||||
|
name: FCField;
|
||||||
|
email: FCField;
|
||||||
|
phone: FCField;
|
||||||
|
text: FCField;
|
||||||
|
address: FCField;
|
||||||
|
button: string
|
||||||
|
};
|
||||||
|
info: {
|
||||||
|
phonenumber: string;
|
||||||
|
clickable: boolean;
|
||||||
|
orgname: string;
|
||||||
|
site: string;
|
||||||
|
law?: string;
|
||||||
|
};
|
||||||
|
meta: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface GetItems {
|
||||||
|
id: number;
|
||||||
|
title: string;
|
||||||
|
desc: string;
|
||||||
|
typ: string;
|
||||||
|
req: boolean;
|
||||||
|
p: number;
|
||||||
|
c: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface QuizItems {
|
||||||
|
|
||||||
|
description: string;
|
||||||
|
id: number;
|
||||||
|
page: number;
|
||||||
|
required: boolean;
|
||||||
|
title: string;
|
||||||
|
type: string;
|
||||||
|
content: QuizItemsContent
|
||||||
|
}
|
||||||
|
export interface QuizItemsContent {
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user