organization.tsx 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. import {OrgRoleListFixture, TeamRoleListFixture} from 'sentry-fixture/roleList';
  2. import type {DetailedOrganization} from 'sentry/types/organization';
  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. issueAlertsThreadFlag: false,
  61. metricAlertsThreadFlag: false,
  62. isDefault: false,
  63. isDynamicallySampled: true,
  64. isEarlyAdopter: false,
  65. genAIConsent: false,
  66. openMembership: false,
  67. pendingAccessRequests: 0,
  68. quota: {
  69. accountLimit: null,
  70. maxRate: null,
  71. maxRateInterval: null,
  72. projectLimit: null,
  73. },
  74. relayPiiConfig: null,
  75. require2FA: false,
  76. safeFields: [],
  77. scrubIPAddresses: false,
  78. sensitiveFields: [],
  79. aggregatedDataConsent: false,
  80. storeCrashReports: 0,
  81. trustedRelays: [],
  82. teams: [],
  83. projects: [],
  84. ...params,
  85. orgRoleList: OrgRoleListFixture(),
  86. teamRoleList: TeamRoleListFixture(),
  87. };
  88. }