organization.ts 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. githubOpenPRBot: false,
  59. githubPRBot: false,
  60. githubNudgeInvite: false,
  61. issueAlertsThreadFlag: false,
  62. metricAlertsThreadFlag: false,
  63. isDefault: false,
  64. isDynamicallySampled: true,
  65. isEarlyAdopter: false,
  66. genAIConsent: false,
  67. openMembership: false,
  68. pendingAccessRequests: 0,
  69. targetSampleRate: 1.0,
  70. quota: {
  71. accountLimit: null,
  72. maxRate: null,
  73. maxRateInterval: null,
  74. projectLimit: null,
  75. },
  76. relayPiiConfig: null,
  77. require2FA: false,
  78. requiresSso: false,
  79. safeFields: [],
  80. samplingMode: 'organization',
  81. scrubIPAddresses: false,
  82. sensitiveFields: [],
  83. aggregatedDataConsent: false,
  84. storeCrashReports: 0,
  85. trustedRelays: [],
  86. ...params,
  87. orgRoleList: OrgRoleListFixture(),
  88. teamRoleList: TeamRoleListFixture(),
  89. };
  90. }