mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-27 02:42:25 +08:00
feat(server): add doc embedding switch for workspace (#11760)
fix AI-33
This commit is contained in:
@@ -1595,6 +1595,7 @@ export const getWorkspaceConfigQuery = {
|
||||
workspace(id: $id) {
|
||||
enableAi
|
||||
enableUrlPreview
|
||||
enableDocEmbedding
|
||||
inviteLink {
|
||||
link
|
||||
expireTime
|
||||
@@ -1613,6 +1614,16 @@ export const setEnableAiMutation = {
|
||||
}`,
|
||||
};
|
||||
|
||||
export const setEnableDocEmbeddingMutation = {
|
||||
id: 'setEnableDocEmbeddingMutation' as const,
|
||||
op: 'setEnableDocEmbedding',
|
||||
query: `mutation setEnableDocEmbedding($id: ID!, $enableDocEmbedding: Boolean!) {
|
||||
updateWorkspace(input: {id: $id, enableDocEmbedding: $enableDocEmbedding}) {
|
||||
id
|
||||
}
|
||||
}`,
|
||||
};
|
||||
|
||||
export const setEnableUrlPreviewMutation = {
|
||||
id: 'setEnableUrlPreviewMutation' as const,
|
||||
op: 'setEnableUrlPreview',
|
||||
|
||||
@@ -2,6 +2,7 @@ query getWorkspaceConfig($id: String!) {
|
||||
workspace(id: $id) {
|
||||
enableAi
|
||||
enableUrlPreview
|
||||
enableDocEmbedding
|
||||
inviteLink {
|
||||
link
|
||||
expireTime
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
mutation setEnableDocEmbedding($id: ID!, $enableDocEmbedding: Boolean!) {
|
||||
updateWorkspace(input: { id: $id, enableDocEmbedding: $enableDocEmbedding }) {
|
||||
id
|
||||
}
|
||||
}
|
||||
@@ -2006,6 +2006,8 @@ export interface UpdateUserSettingsInput {
|
||||
export interface UpdateWorkspaceInput {
|
||||
/** Enable AI */
|
||||
enableAi?: InputMaybe<Scalars['Boolean']['input']>;
|
||||
/** Enable doc embedding */
|
||||
enableDocEmbedding?: InputMaybe<Scalars['Boolean']['input']>;
|
||||
/** Enable url previous when sharing */
|
||||
enableUrlPreview?: InputMaybe<Scalars['Boolean']['input']>;
|
||||
id: Scalars['ID']['input'];
|
||||
@@ -2230,6 +2232,8 @@ export interface WorkspaceType {
|
||||
doc: DocType;
|
||||
/** Enable AI */
|
||||
enableAi: Scalars['Boolean']['output'];
|
||||
/** Enable doc embedding */
|
||||
enableDocEmbedding: Scalars['Boolean']['output'];
|
||||
/** Enable url previous when sharing */
|
||||
enableUrlPreview: Scalars['Boolean']['output'];
|
||||
histories: Array<DocHistoryType>;
|
||||
@@ -4107,6 +4111,7 @@ export type GetWorkspaceConfigQuery = {
|
||||
__typename?: 'WorkspaceType';
|
||||
enableAi: boolean;
|
||||
enableUrlPreview: boolean;
|
||||
enableDocEmbedding: boolean;
|
||||
inviteLink: {
|
||||
__typename?: 'InviteLink';
|
||||
link: string;
|
||||
@@ -4125,6 +4130,16 @@ export type SetEnableAiMutation = {
|
||||
updateWorkspace: { __typename?: 'WorkspaceType'; id: string };
|
||||
};
|
||||
|
||||
export type SetEnableDocEmbeddingMutationVariables = Exact<{
|
||||
id: Scalars['ID']['input'];
|
||||
enableDocEmbedding: Scalars['Boolean']['input'];
|
||||
}>;
|
||||
|
||||
export type SetEnableDocEmbeddingMutation = {
|
||||
__typename?: 'Mutation';
|
||||
updateWorkspace: { __typename?: 'WorkspaceType'; id: string };
|
||||
};
|
||||
|
||||
export type SetEnableUrlPreviewMutationVariables = Exact<{
|
||||
id: Scalars['ID']['input'];
|
||||
enableUrlPreview: Scalars['Boolean']['input'];
|
||||
@@ -4931,6 +4946,11 @@ export type Mutations =
|
||||
variables: SetEnableAiMutationVariables;
|
||||
response: SetEnableAiMutation;
|
||||
}
|
||||
| {
|
||||
name: 'setEnableDocEmbeddingMutation';
|
||||
variables: SetEnableDocEmbeddingMutationVariables;
|
||||
response: SetEnableDocEmbeddingMutation;
|
||||
}
|
||||
| {
|
||||
name: 'setEnableUrlPreviewMutation';
|
||||
variables: SetEnableUrlPreviewMutationVariables;
|
||||
|
||||
Reference in New Issue
Block a user