organization.tsx 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. import {OrgRoleListFixture, TeamRoleListFixture} from 'sentry-fixture/roleList';
  2. import type {DetailedOrganization} from 'sentry/types';
  3. export function OrganizationFixture(
  4. params: Partial<DetailedOrganization> = {}
  5. ): DetailedOrganization {
  6. const slug = params.slug ?? 'org-slug';
  7. return {
  8. id: '3',
  9. slug,
  10. name: 'Organization Name',
  11. links: {
  12. organizationUrl: `https://${slug}.sentry.io`,
  13. regionUrl: 'https://us.sentry.io',
  14. },
  15. access: [
  16. 'org:read',
  17. 'org:write',
  18. 'org:admin',
  19. 'org:integrations',
  20. 'project:read',
  21. 'project:write',
  22. 'project:releases',
  23. 'project:admin',
  24. 'team:read',
  25. 'team:write',
  26. 'team:admin',
  27. 'alerts:read',
  28. 'alerts:write',
  29. ],
  30. status: {
  31. id: 'active',
  32. name: 'active',
  33. },
  34. experiments: {},
  35. scrapeJavaScript: true,
  36. features: [],
  37. onboardingTasks: [],
  38. aiSuggestedSolution: false,
  39. alertsMemberWrite: false,
  40. allowJoinRequests: false,
  41. allowSharedIssues: false,
  42. attachmentsRole: '',
  43. availableRoles: [],
  44. avatar: {
  45. avatarType: 'default',
  46. avatarUuid: null,
  47. avatarUrl: null,
  48. },
  49. codecovAccess: false,
  50. dataScrubber: false,
  51. dataScrubberDefaults: false,
  52. dateCreated: new Date().toISOString(),
  53. debugFilesRole: '',
  54. defaultRole: '',
  55. enhancedPrivacy: false,
  56. eventsMemberAdmin: false,
  57. githubOpenPRBot: false,
  58. githubPRBot: false,
  59. githubNudgeInvite: false,
  60. isDefault: false,
  61. isDynamicallySampled: true,
  62. isEarlyAdopter: false,
  63. genAIConsent: false,
  64. openMembership: false,
  65. pendingAccessRequests: 0,
  66. quota: {
  67. accountLimit: null,
  68. maxRate: null,
  69. maxRateInterval: null,
  70. projectLimit: null,
  71. },
  72. relayPiiConfig: null,
  73. require2FA: false,
  74. safeFields: [],
  75. scrubIPAddresses: false,
  76. sensitiveFields: [],
  77. aggregatedDataConsent: false,
  78. storeCrashReports: 0,
  79. trustedRelays: [],
  80. teams: [],
  81. projects: [],
  82. ...params,
  83. orgRoleList: OrgRoleListFixture(),
  84. teamRoleList: TeamRoleListFixture(),
  85. };
  86. }