organization.ts 2.3 KB

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