chore: Update notification provider to support Discord only

- Refactored notification provider tests to use Discord webhook URLs.
- Updated frontend forms and API interactions to restrict provider type to Discord.
- Modified translations to reflect the change in supported provider types.
- Enhanced UI to indicate deprecated status for non-Discord providers.
- Adjusted documentation to align with the new provider structure.
This commit is contained in:
GitHub Actions
2026-02-21 06:23:46 +00:00
parent f11cd689a5
commit 718358314f
38 changed files with 1539 additions and 440 deletions

View File

@@ -68,11 +68,11 @@ describe('notifications api', () => {
mockedClient.put.mockResolvedValue({ data: { id: 'new', name: 'Slack v2' } })
const created = await createProvider({ name: 'Slack' })
expect(mockedClient.post).toHaveBeenCalledWith('/notifications/providers', { name: 'Slack' })
expect(mockedClient.post).toHaveBeenCalledWith('/notifications/providers', { name: 'Slack', type: 'discord' })
expect(created.id).toBe('new')
const updated = await updateProvider('new', { enabled: false })
expect(mockedClient.put).toHaveBeenCalledWith('/notifications/providers/new', { enabled: false })
expect(mockedClient.put).toHaveBeenCalledWith('/notifications/providers/new', { enabled: false, type: 'discord' })
expect(updated.name).toBe('Slack v2')
await testProvider({ id: 'new', name: 'Slack', enabled: true })
@@ -80,6 +80,7 @@ describe('notifications api', () => {
id: 'new',
name: 'Slack',
enabled: true,
type: 'discord',
})
mockedClient.delete.mockResolvedValue({})
@@ -99,6 +100,7 @@ describe('notifications api', () => {
expect(mockedClient.post).toHaveBeenCalledWith('/notifications/providers/preview', {
id: 'p1',
name: 'Provider',
type: 'discord',
data: { foo: 'bar' },
})
expect(preview).toEqual({ preview: 'ok' })