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. alertsMemberWrite: false,
  37. allowJoinRequests: false,
  38. allowMemberInvite: true,
  39. allowMemberProjectCreation: false,
  40. allowSuperuserAccess: false,
  41. allowSharedIssues: false,
  42. attachmentsRole: 'member',
  43. availableRoles: [],
  44. avatar: {
  45. avatarType: 'default',
  46. avatarUuid: null,
  47. avatarUrl: null,
  48. },
  49. codecovAccess: false,
  50. dataScrubber: false,
  51. dataScrubberDefaults: false,
  52. dateCreated: new Date().toISOString(),
  53. debugFilesRole: '',
  54. defaultRole: '',
  55. enhancedPrivacy: false,
  56. eventsMemberAdmin: false,
  57. genAIConsent: false,
  58. githubNudgeInvite: false,
  59. githubOpenPRBot: false,
  60. githubPRBot: false,
  61. hideAiFeatures: false,
  62. isDefault: false,
  63. isDynamicallySampled: true,
  64. isEarlyAdopter: false,
  65. issueAlertsThreadFlag: false,
  66. metricAlertsThreadFlag: 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. }