import { RedisClientType } from 'redis'; import { EnvType, IRequestExtension, IWorkspace } from '../../types'; export interface IWorkspaceApiService { fetchWorkspaceById(auth: IRequestExtension, subCheck: boolean): Promise; fetchPrivateKey(auth: IRequestExtension, accessKey: string): Promise; } export declare class WorkspaceApiService implements IWorkspaceApiService { private environment; constructor(environment: EnvType, redis_client?: RedisClientType); /** Build request headers so each request uses the current auth (avoids singleton client sending wrong user token). */ private getWorkspaceRequestHeaders; fetchWorkspaceById(auth: IRequestExtension, subCheck?: boolean): Promise; /** * Fetch the workspace private key for secrets encryption * @param auth - Request authentication details * @param accessKey - The user's access key for additional security * @returns The decrypted private key */ fetchPrivateKey(auth: IRequestExtension, accessKey: string): Promise; }