import { Role, Workspace } from '~/generated/graphql'; import { createState } from 'twenty-ui/utilities'; export type CurrentWorkspace = Pick< Workspace, | 'id' | 'inviteHash' | 'logo' | 'displayName' | 'allowImpersonation' | 'featureFlags' | 'activationStatus' | 'billingSubscriptions' | 'currentBillingSubscription' | 'workspaceMembersCount' | 'isPublicInviteLinkEnabled' | 'isGoogleAuthEnabled' | 'isMicrosoftAuthEnabled' | 'isPasswordAuthEnabled' | 'hasValidEnterpriseKey' | 'isCustomDomainEnabled' | 'subdomain' | 'customDomain' | 'workspaceUrls' | 'metadataVersion' > & { defaultRole?: Omit | null; }; export const currentWorkspaceState = createState({ key: 'currentWorkspaceState', defaultValue: null, });