1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- import {OrgRoleListFixture, TeamRoleListFixture} from 'sentry-fixture/roleList';
- import type {Organization} from 'sentry/types/organization';
- export function OrganizationFixture( params: Partial<Organization> = {}): Organization {
- const slug = params.slug ?? 'org-slug';
- return {
- id: '3',
- slug,
- name: 'Organization Name',
- links: {
- organizationUrl: `https://${slug}.sentry.io`,
- regionUrl: 'https://us.sentry.io',
- },
- access: [
- 'org:read',
- 'org:write',
- 'org:admin',
- 'org:integrations',
- 'project:read',
- 'project:write',
- 'project:releases',
- 'project:admin',
- 'team:read',
- 'team:write',
- 'team:admin',
- 'alerts:read',
- 'alerts:write',
- ],
- status: {
- id: 'active',
- name: 'active',
- },
- experiments: {},
- scrapeJavaScript: true,
- features: [],
- onboardingTasks: [],
- aiSuggestedSolution: false,
- alertsMemberWrite: false,
- allowJoinRequests: false,
- allowMemberInvite: true,
- allowMemberProjectCreation: false,
- allowSuperuserAccess: false,
- allowSharedIssues: false,
- attachmentsRole: 'member',
- availableRoles: [],
- avatar: {
- avatarType: 'default',
- avatarUuid: null,
- avatarUrl: null,
- },
- codecovAccess: false,
- dataScrubber: false,
- dataScrubberDefaults: false,
- dateCreated: new Date().toISOString(),
- debugFilesRole: '',
- defaultRole: '',
- enhancedPrivacy: false,
- eventsMemberAdmin: false,
- githubOpenPRBot: false,
- githubPRBot: false,
- githubNudgeInvite: false,
- issueAlertsThreadFlag: false,
- metricAlertsThreadFlag: false,
- isDefault: false,
- isDynamicallySampled: true,
- isEarlyAdopter: false,
- genAIConsent: false,
- openMembership: false,
- pendingAccessRequests: 0,
- targetSampleRate: 1.0,
- quota: {
- accountLimit: null,
- maxRate: null,
- maxRateInterval: null,
- projectLimit: null,
- },
- relayPiiConfig: null,
- require2FA: false,
- requiresSso: false,
- safeFields: [],
- samplingMode: 'organization',
- scrubIPAddresses: false,
- sensitiveFields: [],
- aggregatedDataConsent: false,
- storeCrashReports: 0,
- trustedRelays: [],
- ...params,
- orgRoleList: OrgRoleListFixture(),
- teamRoleList: TeamRoleListFixture(),
- };
- }
|