availableNotificationActions.js 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. export function AvailableNotificationActions(params = []) {
  2. return {
  3. actions: [
  4. {
  5. action: {
  6. triggerType: 'spike-protection',
  7. serviceType: 'sentry_notification',
  8. targetType: 'specific',
  9. targetIdentifier: 'default',
  10. targetDisplay: 'default',
  11. },
  12. requires: [
  13. {
  14. name: 'projects',
  15. description: 'Project slugs which will receive the action',
  16. },
  17. ],
  18. },
  19. {
  20. action: {
  21. triggerType: 'spike-protection',
  22. serviceType: 'slack',
  23. targetType: 'specific',
  24. integrationId: 1,
  25. integrationName: 'sentry-ecosystem',
  26. },
  27. requires: [
  28. {
  29. name: 'projects',
  30. description: 'Project slugs which will receive the action',
  31. },
  32. {
  33. name: 'targetIdentifier',
  34. description: "Slack channel ID (e.g. 'C123ABC45DE')",
  35. },
  36. {
  37. name: 'targetDisplay',
  38. description: 'Slack channel name (e.g #sentry-spike-protection)',
  39. },
  40. ],
  41. },
  42. {
  43. action: {
  44. triggerType: 'spike-protection',
  45. serviceType: 'slack',
  46. targetType: 'specific',
  47. integrationId: 5,
  48. integrationName: 'sentry-enterprise',
  49. },
  50. requires: [
  51. {
  52. name: 'projects',
  53. description: 'Project slugs which will receive the action',
  54. },
  55. {
  56. name: 'targetIdentifier',
  57. description: "Slack channel ID (e.g. 'C123ABC45DE')",
  58. },
  59. {
  60. name: 'targetDisplay',
  61. description: 'Slack channel name (e.g #sentry-spike-protection)',
  62. },
  63. ],
  64. },
  65. {
  66. action: {
  67. triggerType: 'spike-protection',
  68. serviceType: 'pagerduty',
  69. targetType: 'specific',
  70. integrationId: 2,
  71. integrationName: 'sentry-enterprise',
  72. targetIdentifier: 3,
  73. targetDisplay: 'Default Service',
  74. },
  75. requires: [
  76. {
  77. name: 'projects',
  78. description: 'Project slugs which will receive the action',
  79. },
  80. ],
  81. },
  82. {
  83. action: {
  84. triggerType: 'spike-protection',
  85. serviceType: 'pagerduty',
  86. targetType: 'specific',
  87. integrationId: 2,
  88. integrationName: 'sentry-enterprise',
  89. targetIdentifier: 2,
  90. targetDisplay: 'Test 2',
  91. },
  92. requires: [
  93. {
  94. name: 'projects',
  95. description: 'Project slugs which will receive the action',
  96. },
  97. ],
  98. },
  99. {
  100. action: {
  101. triggerType: 'spike-protection',
  102. serviceType: 'pagerduty',
  103. targetType: 'specific',
  104. integrationId: 2,
  105. integrationName: 'sentry-enterprise',
  106. targetIdentifier: 1,
  107. targetDisplay: 'Test 1',
  108. },
  109. requires: [
  110. {
  111. name: 'projects',
  112. description: 'Project slugs which will receive the action',
  113. },
  114. ],
  115. },
  116. ...params,
  117. ],
  118. };
  119. }