Files
twenty/packages/twenty-front/src/modules/auth/states/currentWorkspaceState.ts
T
Félix Malfait 4485e8e3db Update enums to be all caps (#12372)
- Make custom domain public (remove from lab)
- Use ALL_CAPS definition for enums
2025-05-29 14:08:36 +02:00

34 lines
814 B
TypeScript

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