mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
feat(server): add all ignored docs endpoint (#11953)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added the ability to view a complete list of ignored documents for a workspace without pagination. - Introduced separate options to add or remove ignored documents from workspace embeddings. - Added a new query to fetch all ignored documents for a workspace, including document IDs and creation timestamps. - **Refactor** - Reorganized and clarified GraphQL mutations and queries related to managing ignored documents in workspace embeddings. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -366,6 +366,7 @@ export interface CopilotSessionType {
|
||||
|
||||
export interface CopilotWorkspaceConfig {
|
||||
__typename?: 'CopilotWorkspaceConfig';
|
||||
allIgnoredDocs: Array<CopilotWorkspaceIgnoredDoc>;
|
||||
files: PaginatedCopilotWorkspaceFileType;
|
||||
ignoredDocs: PaginatedIgnoredDocsType;
|
||||
workspaceId: Scalars['String']['output'];
|
||||
@@ -3273,16 +3274,6 @@ export type AddWorkspaceEmbeddingFilesMutation = {
|
||||
};
|
||||
};
|
||||
|
||||
export type RemoveWorkspaceEmbeddingFilesMutationVariables = Exact<{
|
||||
workspaceId: Scalars['String']['input'];
|
||||
fileId: Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type RemoveWorkspaceEmbeddingFilesMutation = {
|
||||
__typename?: 'Mutation';
|
||||
removeWorkspaceEmbeddingFiles: boolean;
|
||||
};
|
||||
|
||||
export type GetWorkspaceEmbeddingFilesQueryVariables = Exact<{
|
||||
workspaceId: Scalars['String']['input'];
|
||||
pagination: PaginationInput;
|
||||
@@ -3318,6 +3309,45 @@ export type GetWorkspaceEmbeddingFilesQuery = {
|
||||
};
|
||||
};
|
||||
|
||||
export type RemoveWorkspaceEmbeddingFilesMutationVariables = Exact<{
|
||||
workspaceId: Scalars['String']['input'];
|
||||
fileId: Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type RemoveWorkspaceEmbeddingFilesMutation = {
|
||||
__typename?: 'Mutation';
|
||||
removeWorkspaceEmbeddingFiles: boolean;
|
||||
};
|
||||
|
||||
export type AddWorkspaceEmbeddingIgnoredDocsMutationVariables = Exact<{
|
||||
workspaceId: Scalars['String']['input'];
|
||||
add: Array<Scalars['String']['input']> | Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type AddWorkspaceEmbeddingIgnoredDocsMutation = {
|
||||
__typename?: 'Mutation';
|
||||
updateWorkspaceEmbeddingIgnoredDocs: number;
|
||||
};
|
||||
|
||||
export type GetAllWorkspaceEmbeddingIgnoredDocsQueryVariables = Exact<{
|
||||
workspaceId: Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type GetAllWorkspaceEmbeddingIgnoredDocsQuery = {
|
||||
__typename?: 'Query';
|
||||
workspace: {
|
||||
__typename?: 'WorkspaceType';
|
||||
embedding: {
|
||||
__typename?: 'CopilotWorkspaceConfig';
|
||||
allIgnoredDocs: Array<{
|
||||
__typename?: 'CopilotWorkspaceIgnoredDoc';
|
||||
docId: string;
|
||||
createdAt: string;
|
||||
}>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
export type GetWorkspaceEmbeddingIgnoredDocsQueryVariables = Exact<{
|
||||
workspaceId: Scalars['String']['input'];
|
||||
pagination: PaginationInput;
|
||||
@@ -3350,17 +3380,12 @@ export type GetWorkspaceEmbeddingIgnoredDocsQuery = {
|
||||
};
|
||||
};
|
||||
|
||||
export type UpdateWorkspaceEmbeddingIgnoredDocsMutationVariables = Exact<{
|
||||
export type RemoveWorkspaceEmbeddingIgnoredDocsMutationVariables = Exact<{
|
||||
workspaceId: Scalars['String']['input'];
|
||||
add?: InputMaybe<
|
||||
Array<Scalars['String']['input']> | Scalars['String']['input']
|
||||
>;
|
||||
remove?: InputMaybe<
|
||||
Array<Scalars['String']['input']> | Scalars['String']['input']
|
||||
>;
|
||||
remove: Array<Scalars['String']['input']> | Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type UpdateWorkspaceEmbeddingIgnoredDocsMutation = {
|
||||
export type RemoveWorkspaceEmbeddingIgnoredDocsMutation = {
|
||||
__typename?: 'Mutation';
|
||||
updateWorkspaceEmbeddingIgnoredDocs: number;
|
||||
};
|
||||
@@ -4628,6 +4653,11 @@ export type Queries =
|
||||
variables: GetWorkspaceEmbeddingFilesQueryVariables;
|
||||
response: GetWorkspaceEmbeddingFilesQuery;
|
||||
}
|
||||
| {
|
||||
name: 'getAllWorkspaceEmbeddingIgnoredDocsQuery';
|
||||
variables: GetAllWorkspaceEmbeddingIgnoredDocsQueryVariables;
|
||||
response: GetAllWorkspaceEmbeddingIgnoredDocsQuery;
|
||||
}
|
||||
| {
|
||||
name: 'getWorkspaceEmbeddingIgnoredDocsQuery';
|
||||
variables: GetWorkspaceEmbeddingIgnoredDocsQueryVariables;
|
||||
@@ -5001,9 +5031,14 @@ export type Mutations =
|
||||
response: RemoveWorkspaceEmbeddingFilesMutation;
|
||||
}
|
||||
| {
|
||||
name: 'updateWorkspaceEmbeddingIgnoredDocsMutation';
|
||||
variables: UpdateWorkspaceEmbeddingIgnoredDocsMutationVariables;
|
||||
response: UpdateWorkspaceEmbeddingIgnoredDocsMutation;
|
||||
name: 'addWorkspaceEmbeddingIgnoredDocsMutation';
|
||||
variables: AddWorkspaceEmbeddingIgnoredDocsMutationVariables;
|
||||
response: AddWorkspaceEmbeddingIgnoredDocsMutation;
|
||||
}
|
||||
| {
|
||||
name: 'removeWorkspaceEmbeddingIgnoredDocsMutation';
|
||||
variables: RemoveWorkspaceEmbeddingIgnoredDocsMutationVariables;
|
||||
response: RemoveWorkspaceEmbeddingIgnoredDocsMutation;
|
||||
}
|
||||
| {
|
||||
name: 'createCheckoutSessionMutation';
|
||||
|
||||
Reference in New Issue
Block a user