mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
feat(server): docs pagination (#12086)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added paginated document listing for workspaces, allowing users to browse documents with pagination controls. - Enhanced document details to display creation and update timestamps, as well as information about the creator and last updater. - **Bug Fixes** - Updated deprecation notice for workspace document metadata fields to guide users to the latest recommended field. - **Tests** - Added new tests to verify document info retrieval and pagination functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -532,15 +532,23 @@ export enum DocRole {
|
||||
|
||||
export interface DocType {
|
||||
__typename?: 'DocType';
|
||||
createdAt: Maybe<Scalars['DateTime']['output']>;
|
||||
/** Doc create user */
|
||||
createdBy: Maybe<PublicUserType>;
|
||||
creatorId: Maybe<Scalars['String']['output']>;
|
||||
defaultRole: DocRole;
|
||||
/** paginated doc granted users list */
|
||||
grantedUsersList: PaginatedGrantedDocUserType;
|
||||
id: Scalars['String']['output'];
|
||||
/** Doc last updated user */
|
||||
lastUpdatedBy: Maybe<PublicUserType>;
|
||||
lastUpdaterId: Maybe<Scalars['String']['output']>;
|
||||
/** Doc metadata */
|
||||
meta: WorkspaceDocMeta;
|
||||
mode: PublicDocMode;
|
||||
permissions: DocPermissions;
|
||||
public: Scalars['Boolean']['output'];
|
||||
updatedAt: Maybe<Scalars['DateTime']['output']>;
|
||||
workspaceId: Scalars['String']['output'];
|
||||
}
|
||||
|
||||
@@ -548,6 +556,12 @@ export interface DocTypeGrantedUsersListArgs {
|
||||
pagination: PaginationInput;
|
||||
}
|
||||
|
||||
export interface DocTypeEdge {
|
||||
__typename?: 'DocTypeEdge';
|
||||
cursor: Scalars['String']['output'];
|
||||
node: DocType;
|
||||
}
|
||||
|
||||
export interface DocUpdateBlockedDataType {
|
||||
__typename?: 'DocUpdateBlockedDataType';
|
||||
docId: Scalars['String']['output'];
|
||||
@@ -1680,6 +1694,13 @@ export interface PaginatedCopilotWorkspaceFileType {
|
||||
totalCount: Scalars['Int']['output'];
|
||||
}
|
||||
|
||||
export interface PaginatedDocType {
|
||||
__typename?: 'PaginatedDocType';
|
||||
edges: Array<DocTypeEdge>;
|
||||
pageInfo: PageInfo;
|
||||
totalCount: Scalars['Int']['output'];
|
||||
}
|
||||
|
||||
export interface PaginatedGrantedDocUserType {
|
||||
__typename?: 'PaginatedGrantedDocUserType';
|
||||
edges: Array<GrantedDocUserTypeEdge>;
|
||||
@@ -2346,6 +2367,7 @@ export interface WorkspaceType {
|
||||
createdAt: Scalars['DateTime']['output'];
|
||||
/** Get get with given id */
|
||||
doc: DocType;
|
||||
docs: PaginatedDocType;
|
||||
embedding: CopilotWorkspaceConfig;
|
||||
/** Enable AI */
|
||||
enableAi: Scalars['Boolean']['output'];
|
||||
@@ -2372,7 +2394,7 @@ export interface WorkspaceType {
|
||||
owner: UserType;
|
||||
/**
|
||||
* Cloud page metadata of workspace
|
||||
* @deprecated use [WorkspaceType.doc.meta] instead
|
||||
* @deprecated use [WorkspaceType.doc] instead
|
||||
*/
|
||||
pageMeta: WorkspaceDocMeta;
|
||||
/** map of action permissions */
|
||||
@@ -2402,6 +2424,10 @@ export interface WorkspaceTypeDocArgs {
|
||||
docId: Scalars['String']['input'];
|
||||
}
|
||||
|
||||
export interface WorkspaceTypeDocsArgs {
|
||||
pagination: PaginationInput;
|
||||
}
|
||||
|
||||
export interface WorkspaceTypeHistoriesArgs {
|
||||
before?: InputMaybe<Scalars['DateTime']['input']>;
|
||||
guid: Scalars['String']['input'];
|
||||
|
||||
Reference in New Issue
Block a user