123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- import type {AvailableNotificationAction as AvailableNotificationActionType} from 'sentry/types';
- export function AvailableNotificationActions(
- params: AvailableNotificationActionType[] = []
- ): {actions: AvailableNotificationActionType[]} {
- return {
- actions: [
- {
- action: {
- triggerType: 'spike-protection',
- serviceType: 'sentry_notification',
- targetType: 'specific',
- targetIdentifier: 'default',
- targetDisplay: 'default',
- },
- requires: [
- {
- name: 'projects',
- description: 'Project slugs which will receive the action',
- },
- ],
- },
- {
- action: {
- triggerType: 'spike-protection',
- serviceType: 'slack',
- targetType: 'specific',
- integrationId: 1,
- integrationName: 'sentry-ecosystem',
- },
- requires: [
- {
- name: 'projects',
- description: 'Project slugs which will receive the action',
- },
- {
- name: 'targetIdentifier',
- description: "Slack channel ID (e.g. 'C123ABC45DE')",
- },
- {
- name: 'targetDisplay',
- description: 'Slack channel name (e.g #sentry-spike-protection)',
- },
- ],
- },
- {
- action: {
- triggerType: 'spike-protection',
- serviceType: 'slack',
- targetType: 'specific',
- integrationId: 5,
- integrationName: 'sentry-enterprise',
- },
- requires: [
- {
- name: 'projects',
- description: 'Project slugs which will receive the action',
- },
- {
- name: 'targetIdentifier',
- description: "Slack channel ID (e.g. 'C123ABC45DE')",
- },
- {
- name: 'targetDisplay',
- description: 'Slack channel name (e.g #sentry-spike-protection)',
- },
- ],
- },
- {
- action: {
- triggerType: 'spike-protection',
- serviceType: 'pagerduty',
- targetType: 'specific',
- integrationId: 2,
- integrationName: 'sentry-enterprise',
- targetIdentifier: '3',
- targetDisplay: 'Default Service',
- },
- requires: [
- {
- name: 'projects',
- description: 'Project slugs which will receive the action',
- },
- ],
- },
- {
- action: {
- triggerType: 'spike-protection',
- serviceType: 'pagerduty',
- targetType: 'specific',
- integrationId: 2,
- integrationName: 'sentry-enterprise',
- targetIdentifier: '2',
- targetDisplay: 'Test 2',
- },
- requires: [
- {
- name: 'projects',
- description: 'Project slugs which will receive the action',
- },
- ],
- },
- {
- action: {
- triggerType: 'spike-protection',
- serviceType: 'pagerduty',
- targetType: 'specific',
- integrationId: 2,
- integrationName: 'sentry-enterprise',
- targetIdentifier: '1',
- targetDisplay: 'Test 1',
- },
- requires: [
- {
- name: 'projects',
- description: 'Project slugs which will receive the action',
- },
- ],
- },
- ...params,
- ],
- };
- }
|