organization.ts 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. allowSharedIssues: false,
  40. attachmentsRole: '',
  41. availableRoles: [],
  42. avatar: {
  43. avatarType: 'default',
  44. avatarUuid: null,
  45. avatarUrl: null,
  46. },
  47. codecovAccess: false,
  48. dataScrubber: false,
  49. dataScrubberDefaults: false,
  50. dateCreated: new Date().toISOString(),
  51. debugFilesRole: '',
  52. defaultRole: '',
  53. enhancedPrivacy: false,
  54. eventsMemberAdmin: false,
  55. githubOpenPRBot: false,
  56. githubPRBot: false,
  57. githubNudgeInvite: false,
  58. issueAlertsThreadFlag: false,
  59. metricAlertsThreadFlag: false,
  60. isDefault: false,
  61. isDynamicallySampled: true,
  62. isEarlyAdopter: false,
  63. genAIConsent: false,
  64. openMembership: false,
  65. pendingAccessRequests: 0,
  66. quota: {
  67. accountLimit: null,
  68. maxRate: null,
  69. maxRateInterval: null,
  70. projectLimit: null,
  71. },
  72. relayPiiConfig: null,
  73. require2FA: false,
  74. safeFields: [],
  75. scrubIPAddresses: false,
  76. sensitiveFields: [],
  77. aggregatedDataConsent: false,
  78. storeCrashReports: 0,
  79. trustedRelays: [],
  80. ...params,
  81. orgRoleList: OrgRoleListFixture(),
  82. teamRoleList: TeamRoleListFixture(),
  83. };
  84. }