organization.tsx 1.9 KB

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