refactor(auth): add workspaces selection (#12098)

This commit is contained in:
Antoine Moreaux
2025-06-13 16:17:35 +02:00
committed by GitHub
parent 836e2f792c
commit b1af98f93d
162 changed files with 3542 additions and 1340 deletions

View File

@ -1,15 +1,17 @@
import { User } from 'src/engine/core-modules/user/user.entity';
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
import { ApiKeyWorkspaceEntity } from 'src/modules/api-key/standard-objects/api-key.workspace-entity';
import { AuthProviderEnum } from 'src/engine/core-modules/workspace/types/workspace.type';
declare module 'express-serve-static-core' {
interface Request {
user?: User | null;
apiKey?: ApiKeyWorkspaceEntity | null;
workspace: Workspace;
workspaceId: string;
workspace?: Workspace;
workspaceId?: string;
workspaceMetadataVersion?: number;
workspaceMemberId?: string;
userWorkspaceId?: string;
authProvider?: AuthProviderEnum | null;
}
}

View File

@ -22,6 +22,7 @@ declare global {
const MEMBER_ACCESS_TOKEN: string;
const GUEST_ACCESS_TOKEN: string;
const API_KEY_ACCESS_TOKEN: string;
const WORKSPACE_AGNOSTIC_TOKEN: string;
}
export {};