123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- import type {AvailableNotificationAction} from 'sentry/types/notificationActions';
- export function AvailableNotificationActionsFixture(
- params: AvailableNotificationAction[] = []
- ): {actions: AvailableNotificationAction[]} {
- 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',
- },
- ],
- },
- {
- action: {
- triggerType: 'spike-protection',
- serviceType: 'opsgenie',
- targetType: 'specific',
- integrationId: 3,
- integrationName: 'sentry-enterprise',
- targetIdentifier: '1-opsgenie-test-team-2',
- targetDisplay: 'opsgenie-test-team-2',
- },
- requires: [
- {
- name: 'projects',
- description: 'Project slugs which will receive the action',
- },
- ],
- },
- {
- action: {
- triggerType: 'spike-protection',
- serviceType: 'opsgenie',
- targetType: 'specific',
- integrationId: 3,
- integrationName: 'sentry-enterprise',
- targetIdentifier: '1-opsgenie-test-team',
- targetDisplay: 'opsgenie-test-team',
- },
- requires: [
- {
- name: 'projects',
- description: 'Project slugs which will receive the action',
- },
- ],
- },
- ...params,
- ],
- };
- }
|