organization.tsx 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. openMembership: false,
  64. pendingAccessRequests: 0,
  65. quota: {
  66. accountLimit: null,
  67. maxRate: null,
  68. maxRateInterval: null,
  69. projectLimit: null,
  70. },
  71. relayPiiConfig: null,
  72. require2FA: false,
  73. safeFields: [],
  74. scrubIPAddresses: false,
  75. sensitiveFields: [],
  76. storeCrashReports: 0,
  77. trustedRelays: [],
  78. teams: [],
  79. projects: [],
  80. ...params,
  81. orgRoleList: OrgRoleListFixture(),
  82. teamRoleList: TeamRoleListFixture(),
  83. };
  84. }