organization.tsx 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. import {OrgRoleList, TeamRoleList} from 'sentry-fixture/roleList';
  2. import type {DetailedOrganization} from 'sentry/types';
  3. export function Organization(
  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. },
  48. codecovAccess: false,
  49. dataScrubber: false,
  50. dataScrubberDefaults: false,
  51. dateCreated: new Date().toISOString(),
  52. debugFilesRole: '',
  53. defaultRole: '',
  54. enhancedPrivacy: false,
  55. eventsMemberAdmin: false,
  56. githubOpenPRBot: false,
  57. githubPRBot: false,
  58. githubNudgeInvite: false,
  59. isDefault: false,
  60. isDynamicallySampled: true,
  61. isEarlyAdopter: false,
  62. openMembership: false,
  63. pendingAccessRequests: 0,
  64. quota: {
  65. accountLimit: null,
  66. maxRate: null,
  67. maxRateInterval: null,
  68. projectLimit: null,
  69. },
  70. relayPiiConfig: null,
  71. require2FA: false,
  72. safeFields: [],
  73. scrubIPAddresses: false,
  74. sensitiveFields: [],
  75. storeCrashReports: 0,
  76. trustedRelays: [],
  77. teams: [],
  78. projects: [],
  79. ...params,
  80. orgRoleList: OrgRoleList(),
  81. teamRoleList: TeamRoleList(),
  82. };
  83. }