mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
feat: add editor record (#7938)
fix CLOUD-58, CLOUD-61, CLOUD-62, PD-1607, PD-1608
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
query getWorkspacePageMetaById($id: String!, $pageId: String!) {
|
||||
workspace(id: $id) {
|
||||
pageMeta(pageId: $pageId) {
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy {
|
||||
name
|
||||
avatarUrl
|
||||
}
|
||||
updatedBy {
|
||||
name
|
||||
avatarUrl
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,10 @@ query listHistory(
|
||||
histories(guid: $pageDocId, take: $take, before: $before) {
|
||||
id
|
||||
timestamp
|
||||
editor {
|
||||
name
|
||||
avatarUrl
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -610,6 +610,30 @@ query getWorkspaceFeatures($workspaceId: String!) {
|
||||
}`,
|
||||
};
|
||||
|
||||
export const getWorkspacePageMetaByIdQuery = {
|
||||
id: 'getWorkspacePageMetaByIdQuery' as const,
|
||||
operationName: 'getWorkspacePageMetaById',
|
||||
definitionName: 'workspace',
|
||||
containsFile: false,
|
||||
query: `
|
||||
query getWorkspacePageMetaById($id: String!, $pageId: String!) {
|
||||
workspace(id: $id) {
|
||||
pageMeta(pageId: $pageId) {
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy {
|
||||
name
|
||||
avatarUrl
|
||||
}
|
||||
updatedBy {
|
||||
name
|
||||
avatarUrl
|
||||
}
|
||||
}
|
||||
}
|
||||
}`,
|
||||
};
|
||||
|
||||
export const getWorkspacePublicByIdQuery = {
|
||||
id: 'getWorkspacePublicByIdQuery' as const,
|
||||
operationName: 'getWorkspacePublicById',
|
||||
@@ -696,6 +720,10 @@ query listHistory($workspaceId: String!, $pageDocId: String!, $take: Int, $befor
|
||||
histories(guid: $pageDocId, take: $take, before: $before) {
|
||||
id
|
||||
timestamp
|
||||
editor {
|
||||
name
|
||||
avatarUrl
|
||||
}
|
||||
}
|
||||
}
|
||||
}`,
|
||||
|
||||
@@ -238,6 +238,7 @@ export interface DocHistoryNotFoundDataType {
|
||||
|
||||
export interface DocHistoryType {
|
||||
__typename?: 'DocHistoryType';
|
||||
editor: Maybe<EditorType>;
|
||||
id: Scalars['String']['output'];
|
||||
timestamp: Scalars['DateTime']['output'];
|
||||
workspaceId: Scalars['String']['output'];
|
||||
@@ -249,6 +250,12 @@ export interface DocNotFoundDataType {
|
||||
spaceId: Scalars['String']['output'];
|
||||
}
|
||||
|
||||
export interface EditorType {
|
||||
__typename?: 'EditorType';
|
||||
avatarUrl: Maybe<Scalars['String']['output']>;
|
||||
name: Scalars['String']['output'];
|
||||
}
|
||||
|
||||
export type ErrorDataUnion =
|
||||
| AlreadyInSpaceDataType
|
||||
| BlobNotFoundDataType
|
||||
@@ -1189,6 +1196,14 @@ export interface WorkspacePage {
|
||||
workspaceId: Scalars['String']['output'];
|
||||
}
|
||||
|
||||
export interface WorkspacePageMeta {
|
||||
__typename?: 'WorkspacePageMeta';
|
||||
createdAt: Scalars['DateTime']['output'];
|
||||
createdBy: Maybe<EditorType>;
|
||||
updatedAt: Scalars['DateTime']['output'];
|
||||
updatedBy: Maybe<EditorType>;
|
||||
}
|
||||
|
||||
export interface WorkspaceType {
|
||||
__typename?: 'WorkspaceType';
|
||||
/** Available features of workspace */
|
||||
@@ -1211,6 +1226,8 @@ export interface WorkspaceType {
|
||||
members: Array<InviteUserType>;
|
||||
/** Owner of workspace */
|
||||
owner: UserType;
|
||||
/** Cloud page metadata of workspace */
|
||||
pageMeta: WorkspacePageMeta;
|
||||
/** Permission of current signed in user in workspace */
|
||||
permission: Permission;
|
||||
/** is Public workspace */
|
||||
@@ -1239,6 +1256,10 @@ export interface WorkspaceTypeMembersArgs {
|
||||
take: InputMaybe<Scalars['Int']['input']>;
|
||||
}
|
||||
|
||||
export interface WorkspaceTypePageMetaArgs {
|
||||
pageId: Scalars['String']['input'];
|
||||
}
|
||||
|
||||
export interface WorkspaceTypePublicPageArgs {
|
||||
pageId: Scalars['String']['input'];
|
||||
}
|
||||
@@ -1787,6 +1808,33 @@ export type GetWorkspaceFeaturesQuery = {
|
||||
workspace: { __typename?: 'WorkspaceType'; features: Array<FeatureType> };
|
||||
};
|
||||
|
||||
export type GetWorkspacePageMetaByIdQueryVariables = Exact<{
|
||||
id: Scalars['String']['input'];
|
||||
pageId: Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type GetWorkspacePageMetaByIdQuery = {
|
||||
__typename?: 'Query';
|
||||
workspace: {
|
||||
__typename?: 'WorkspaceType';
|
||||
pageMeta: {
|
||||
__typename?: 'WorkspacePageMeta';
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
createdBy: {
|
||||
__typename?: 'EditorType';
|
||||
name: string;
|
||||
avatarUrl: string | null;
|
||||
} | null;
|
||||
updatedBy: {
|
||||
__typename?: 'EditorType';
|
||||
name: string;
|
||||
avatarUrl: string | null;
|
||||
} | null;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
export type GetWorkspacePublicByIdQueryVariables = Exact<{
|
||||
id: Scalars['String']['input'];
|
||||
}>;
|
||||
@@ -1865,6 +1913,11 @@ export type ListHistoryQuery = {
|
||||
__typename?: 'DocHistoryType';
|
||||
id: string;
|
||||
timestamp: string;
|
||||
editor: {
|
||||
__typename?: 'EditorType';
|
||||
name: string;
|
||||
avatarUrl: string | null;
|
||||
} | null;
|
||||
}>;
|
||||
};
|
||||
};
|
||||
@@ -2487,6 +2540,11 @@ export type Queries =
|
||||
variables: GetWorkspaceFeaturesQueryVariables;
|
||||
response: GetWorkspaceFeaturesQuery;
|
||||
}
|
||||
| {
|
||||
name: 'getWorkspacePageMetaByIdQuery';
|
||||
variables: GetWorkspacePageMetaByIdQueryVariables;
|
||||
response: GetWorkspacePageMetaByIdQuery;
|
||||
}
|
||||
| {
|
||||
name: 'getWorkspacePublicByIdQuery';
|
||||
variables: GetWorkspacePublicByIdQueryVariables;
|
||||
|
||||
Reference in New Issue
Block a user