import { ICustomTextFileService, ICacheTextFileService } from './textfiles'; import { IFileService } from './file-service'; import { DataProxy } from '@apollo/client/cache'; import { ApolloClient } from '@apollo/client'; import { URI } from '@vscode-alt/monaco-editor/esm/vs/base/common/uri'; import { IClientService as ICoreService } from '@workbench-stack/core'; import { IClientService } from './service'; import { INotificationService } from '@workbench-stack/core'; /** * * Context * @export * @interface MyContext */ export interface MyContext extends ClientContext, ServerContext { } export interface ClientContext { /** * Only application on the client side */ cache: DataProxy; /** * Only application on the client side */ getCacheKey: (options: { __typename: string; resource?: URI; id?: string; editorId?: string; }) => string; /** * Only applicable on the client side */ apolloClient: ApolloClient; client: ApolloClient & { container: IClientService & ICoreService; }; } export interface IDataSources { textFileCache: ICacheTextFileService; } export interface ServerContext { /** * Backend FileService */ textFileService: ICustomTextFileService; /** * Backed FileService */ fileService: IFileService; /** Backend Datasource */ dataSources: IDataSources; /** Backend NotificationService */ notificationService: INotificationService; }