feat: add pagination support for workspace config (#11859)

fix AI-78
This commit is contained in:
darkskygit
2025-04-23 11:25:41 +00:00
parent 5397fba897
commit ddb739fa13
13 changed files with 460 additions and 113 deletions

View File

@@ -366,11 +366,19 @@ export interface CopilotSessionType {
export interface CopilotWorkspaceConfig {
__typename?: 'CopilotWorkspaceConfig';
files: Array<CopilotWorkspaceFile>;
ignoredDocs: Array<Scalars['String']['output']>;
files: PaginatedCopilotWorkspaceFileType;
ignoredDocs: PaginatedIgnoredDocsType;
workspaceId: Scalars['String']['output'];
}
export interface CopilotWorkspaceConfigFilesArgs {
pagination: PaginationInput;
}
export interface CopilotWorkspaceConfigIgnoredDocsArgs {
pagination: PaginationInput;
}
export interface CopilotWorkspaceFile {
__typename?: 'CopilotWorkspaceFile';
createdAt: Scalars['DateTime']['output'];
@@ -381,6 +389,24 @@ export interface CopilotWorkspaceFile {
workspaceId: Scalars['String']['output'];
}
export interface CopilotWorkspaceFileTypeEdge {
__typename?: 'CopilotWorkspaceFileTypeEdge';
cursor: Scalars['String']['output'];
node: CopilotWorkspaceFile;
}
export interface CopilotWorkspaceIgnoredDoc {
__typename?: 'CopilotWorkspaceIgnoredDoc';
createdAt: Scalars['DateTime']['output'];
docId: Scalars['String']['output'];
}
export interface CopilotWorkspaceIgnoredDocTypeEdge {
__typename?: 'CopilotWorkspaceIgnoredDocTypeEdge';
cursor: Scalars['String']['output'];
node: CopilotWorkspaceIgnoredDoc;
}
export interface CreateChatMessageInput {
attachments?: InputMaybe<Array<Scalars['String']['input']>>;
blobs?: InputMaybe<Array<Scalars['Upload']['input']>>;
@@ -1622,6 +1648,13 @@ export interface PageInfo {
startCursor: Maybe<Scalars['String']['output']>;
}
export interface PaginatedCopilotWorkspaceFileType {
__typename?: 'PaginatedCopilotWorkspaceFileType';
edges: Array<CopilotWorkspaceFileTypeEdge>;
pageInfo: PageInfo;
totalCount: Scalars['Int']['output'];
}
export interface PaginatedGrantedDocUserType {
__typename?: 'PaginatedGrantedDocUserType';
edges: Array<GrantedDocUserTypeEdge>;
@@ -1629,6 +1662,13 @@ export interface PaginatedGrantedDocUserType {
totalCount: Scalars['Int']['output'];
}
export interface PaginatedIgnoredDocsType {
__typename?: 'PaginatedIgnoredDocsType';
edges: Array<CopilotWorkspaceIgnoredDocTypeEdge>;
pageInfo: PageInfo;
totalCount: Scalars['Int']['output'];
}
export interface PaginatedNotificationObjectType {
__typename?: 'PaginatedNotificationObjectType';
edges: Array<NotificationObjectTypeEdge>;
@@ -3243,25 +3283,69 @@ export type RemoveWorkspaceEmbeddingFilesMutation = {
removeWorkspaceEmbeddingFiles: boolean;
};
export type GetWorkspaceEmbeddingConfigQueryVariables = Exact<{
export type GetWorkspaceEmbeddingFilesQueryVariables = Exact<{
workspaceId: Scalars['String']['input'];
pagination: PaginationInput;
}>;
export type GetWorkspaceEmbeddingConfigQuery = {
export type GetWorkspaceEmbeddingFilesQuery = {
__typename?: 'Query';
workspace: {
__typename?: 'WorkspaceType';
embedding: {
__typename?: 'CopilotWorkspaceConfig';
ignoredDocs: Array<string>;
files: Array<{
__typename?: 'CopilotWorkspaceFile';
fileId: string;
fileName: string;
mimeType: string;
size: number;
createdAt: string;
}>;
files: {
__typename?: 'PaginatedCopilotWorkspaceFileType';
totalCount: number;
pageInfo: {
__typename?: 'PageInfo';
endCursor: string | null;
hasNextPage: boolean;
};
edges: Array<{
__typename?: 'CopilotWorkspaceFileTypeEdge';
node: {
__typename?: 'CopilotWorkspaceFile';
fileId: string;
fileName: string;
mimeType: string;
size: number;
createdAt: string;
};
}>;
};
};
};
};
export type GetWorkspaceEmbeddingIgnoredDocsQueryVariables = Exact<{
workspaceId: Scalars['String']['input'];
pagination: PaginationInput;
}>;
export type GetWorkspaceEmbeddingIgnoredDocsQuery = {
__typename?: 'Query';
workspace: {
__typename?: 'WorkspaceType';
embedding: {
__typename?: 'CopilotWorkspaceConfig';
ignoredDocs: {
__typename?: 'PaginatedIgnoredDocsType';
totalCount: number;
pageInfo: {
__typename?: 'PageInfo';
endCursor: string | null;
hasNextPage: boolean;
};
edges: Array<{
__typename?: 'CopilotWorkspaceIgnoredDocTypeEdge';
node: {
__typename?: 'CopilotWorkspaceIgnoredDoc';
docId: string;
createdAt: string;
};
}>;
};
};
};
};
@@ -4540,9 +4624,14 @@ export type Queries =
response: GetCopilotSessionsQuery;
}
| {
name: 'getWorkspaceEmbeddingConfigQuery';
variables: GetWorkspaceEmbeddingConfigQueryVariables;
response: GetWorkspaceEmbeddingConfigQuery;
name: 'getWorkspaceEmbeddingFilesQuery';
variables: GetWorkspaceEmbeddingFilesQueryVariables;
response: GetWorkspaceEmbeddingFilesQuery;
}
| {
name: 'getWorkspaceEmbeddingIgnoredDocsQuery';
variables: GetWorkspaceEmbeddingIgnoredDocsQueryVariables;
response: GetWorkspaceEmbeddingIgnoredDocsQuery;
}
| {
name: 'getDocRolePermissionsQuery';