organization.ts 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. import {OrgRoleListFixture, TeamRoleListFixture} from 'sentry-fixture/roleList';
  2. import type {Organization} from 'sentry/types/organization';
  3. export function OrganizationFixture( params: Partial<Organization> = {}): Organization {
  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. allowMemberProjectCreation: false,
  40. allowSharedIssues: false,
  41. attachmentsRole: '',
  42. availableRoles: [],
  43. avatar: {
  44. avatarType: 'default',
  45. avatarUuid: null,
  46. avatarUrl: 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. issueAlertsThreadFlag: false,
  60. metricAlertsThreadFlag: false,
  61. isDefault: false,
  62. isDynamicallySampled: true,
  63. isEarlyAdopter: false,
  64. genAIConsent: false,
  65. openMembership: false,
  66. pendingAccessRequests: 0,
  67. quota: {
  68. accountLimit: null,
  69. maxRate: null,
  70. maxRateInterval: null,
  71. projectLimit: null,
  72. },
  73. relayPiiConfig: null,
  74. require2FA: false,
  75. requiresSso: false,
  76. safeFields: [],
  77. scrubIPAddresses: false,
  78. sensitiveFields: [],
  79. aggregatedDataConsent: false,
  80. storeCrashReports: 0,
  81. trustedRelays: [],
  82. ...params,
  83. orgRoleList: OrgRoleListFixture(),
  84. teamRoleList: TeamRoleListFixture(),
  85. };
  86. }