organization.tsx 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. githubNudgeInvite: false,
  57. isDefault: false,
  58. isDynamicallySampled: true,
  59. isEarlyAdopter: false,
  60. openMembership: false,
  61. pendingAccessRequests: 0,
  62. quota: {
  63. accountLimit: null,
  64. maxRate: null,
  65. maxRateInterval: null,
  66. projectLimit: null,
  67. },
  68. relayPiiConfig: null,
  69. require2FA: false,
  70. safeFields: [],
  71. scrubIPAddresses: false,
  72. sensitiveFields: [],
  73. storeCrashReports: 0,
  74. trustedRelays: [],
  75. ...params,
  76. orgRoleList: OrgRoleList(),
  77. teamRoleList: TeamRoleList(),
  78. };
  79. }