feat(frontend): add telegram integration (#491)

* feat(frontend): add telegram notification agent

* feat(telegram): add i18n keys for telegram

* style(telegram): change message formatting in notification

* feat(telegram): add short tutorial for telegram setup

* feat(telegram): add i18n keys for telegram tutorial

* style(telegram): correct grammar in infobox

Co-authored-by: sct <ryan@sct.dev>

* fix(telegram): redo i18n extraction

Co-authored-by: Jakob Ankarhem <jakob.ankarhem@jetshop.se>
Co-authored-by: sct <ryan@sct.dev>
This commit is contained in:
Jakob Ankarhem
2020-12-26 16:02:00 +01:00
committed by GitHub
parent 7434a26f76
commit c8d4d674f4
12 changed files with 517 additions and 3 deletions

View File

@@ -855,6 +855,22 @@ components:
properties:
webhookUrl:
type: string
TelegramSettings:
type: object
properties:
enabled:
type: boolean
example: false
types:
type: number
example: 2
options:
type: object
properties:
botAPI:
type: string
chatId:
type: string
NotificationEmailSettings:
type: object
properties:
@@ -1635,6 +1651,52 @@ paths:
responses:
'204':
description: Test notification attempted
/settings/notifications/telegram:
get:
summary: Return current telegram notification settings
description: Returns current telegram notification settings in JSON format
tags:
- settings
responses:
'200':
description: Returned telegram settings
content:
application/json:
schema:
$ref: '#/components/schemas/TelegramSettings'
post:
summary: Update telegram notification settings
description: Update current telegram notification settings with provided values
tags:
- settings
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TelegramSettings'
responses:
'200':
description: 'Values were sucessfully updated'
content:
application/json:
schema:
$ref: '#/components/schemas/TelegramSettings'
/settings/notifications/telegram/test:
post:
summary: Test the provided telegram settings
description: Sends a test notification to the telegram agent
tags:
- settings
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TelegramSettings'
responses:
'204':
description: Test notification attempted
/settings/notifications/slack:
get:
summary: Return current slack notification settings