diff options
author | 2021-01-04 02:25:55 +0300 | |
---|---|---|
committer | 2021-01-04 04:02:21 +0300 | |
commit | ce316baf3c5615122e3ab41ceedbc78137e86b48 (patch) | |
tree | 393091f55f93fc04b7f5d96f2e21665177187d1c /src/api | |
parent | Merge pull request #73 from python-discord/renovate/html-webpack-plugin-4.x (diff) |
Updates Models
Changes the models to match the backend.
Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/forms.ts | 9 | ||||
-rw-r--r-- | src/api/question.ts | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/api/forms.ts b/src/api/forms.ts index aec4b99..3869838 100644 --- a/src/api/forms.ts +++ b/src/api/forms.ts @@ -6,17 +6,24 @@ export enum FormFeatures { RequiresLogin = "REQUIRES_LOGIN", Open = "OPEN", CollectEmail = "COLLECT_EMAIL", - DisableAntispam = "DISABLE_ANTISPAM" + DisableAntispam = "DISABLE_ANTISPAM", + WEBHOOK_ENABLED = "WEBHOOK_ENABLED" } export interface Form { id: string, features: Array<FormFeatures>, + webhook: WebHook | null, questions: Array<Question>, name: string, description: string } +export interface WebHook { + url: string, + message: string | null +} + export async function getForms(): Promise<Form[]> { const resp = await ApiClient.get("forms/discoverable"); return resp.data; diff --git a/src/api/question.ts b/src/api/question.ts index 18951b9..9824b60 100644 --- a/src/api/question.ts +++ b/src/api/question.ts @@ -13,6 +13,6 @@ export interface Question { id: string, name: string, type: QuestionType, - data: { [key: string]: any }, + data: { [key: string]: string | string[] }, required: boolean } |