feat: workspace level share settings (#14201)

fix #13698
This commit is contained in:
DarkSky
2026-01-03 01:13:27 +08:00
committed by GitHub
parent 60de882a30
commit 9a7f8e7d4d
36 changed files with 560 additions and 34 deletions
+30
View File
@@ -71,6 +71,7 @@ export interface AdminUpdateWorkspaceInput {
avatarKey?: InputMaybe<Scalars['String']['input']>;
enableAi?: InputMaybe<Scalars['Boolean']['input']>;
enableDocEmbedding?: InputMaybe<Scalars['Boolean']['input']>;
enableSharing?: InputMaybe<Scalars['Boolean']['input']>;
enableUrlPreview?: InputMaybe<Scalars['Boolean']['input']>;
features?: InputMaybe<Array<FeatureType>>;
id: Scalars['String']['input'];
@@ -86,6 +87,7 @@ export interface AdminWorkspace {
createdAt: Scalars['DateTime']['output'];
enableAi: Scalars['Boolean']['output'];
enableDocEmbedding: Scalars['Boolean']['output'];
enableSharing: Scalars['Boolean']['output'];
enableUrlPreview: Scalars['Boolean']['output'];
features: Array<FeatureType>;
id: Scalars['String']['output'];
@@ -1411,10 +1413,15 @@ export interface ListUserInput {
}
export interface ListWorkspaceInput {
enableAi?: InputMaybe<Scalars['Boolean']['input']>;
enableDocEmbedding?: InputMaybe<Scalars['Boolean']['input']>;
enableSharing?: InputMaybe<Scalars['Boolean']['input']>;
enableUrlPreview?: InputMaybe<Scalars['Boolean']['input']>;
features?: InputMaybe<Array<FeatureType>>;
first?: Scalars['Int']['input'];
keyword?: InputMaybe<Scalars['String']['input']>;
orderBy?: InputMaybe<AdminWorkspaceSort>;
public?: InputMaybe<Scalars['Boolean']['input']>;
skip?: Scalars['Int']['input'];
}
@@ -2881,6 +2888,8 @@ export interface UpdateWorkspaceInput {
enableAi?: InputMaybe<Scalars['Boolean']['input']>;
/** Enable doc embedding */
enableDocEmbedding?: InputMaybe<Scalars['Boolean']['input']>;
/** Enable workspace sharing */
enableSharing?: InputMaybe<Scalars['Boolean']['input']>;
/** Enable url previous when sharing */
enableUrlPreview?: InputMaybe<Scalars['Boolean']['input']>;
id: Scalars['ID']['input'];
@@ -3115,6 +3124,8 @@ export interface WorkspaceType {
enableAi: Scalars['Boolean']['output'];
/** Enable doc embedding */
enableDocEmbedding: Scalars['Boolean']['output'];
/** Enable workspace sharing */
enableSharing: Scalars['Boolean']['output'];
/** Enable url previous when sharing */
enableUrlPreview: Scalars['Boolean']['output'];
histories: Array<DocHistoryType>;
@@ -3332,6 +3343,7 @@ export type AdminUpdateWorkspaceMutation = {
name: string | null;
avatarKey: string | null;
enableAi: boolean;
enableSharing: boolean;
enableUrlPreview: boolean;
enableDocEmbedding: boolean;
features: Array<FeatureType>;
@@ -3368,6 +3380,7 @@ export type AdminWorkspaceQuery = {
name: string | null;
avatarKey: string | null;
enableAi: boolean;
enableSharing: boolean;
enableUrlPreview: boolean;
enableDocEmbedding: boolean;
features: Array<FeatureType>;
@@ -3416,6 +3429,7 @@ export type AdminWorkspacesQuery = {
name: string | null;
avatarKey: string | null;
enableAi: boolean;
enableSharing: boolean;
enableUrlPreview: boolean;
enableDocEmbedding: boolean;
features: Array<FeatureType>;
@@ -6534,6 +6548,7 @@ export type GetWorkspaceConfigQuery = {
workspace: {
__typename?: 'WorkspaceType';
enableAi: boolean;
enableSharing: boolean;
enableUrlPreview: boolean;
enableDocEmbedding: boolean;
inviteLink: {
@@ -6564,6 +6579,16 @@ export type SetEnableDocEmbeddingMutation = {
updateWorkspace: { __typename?: 'WorkspaceType'; id: string };
};
export type SetEnableSharingMutationVariables = Exact<{
id: Scalars['ID']['input'];
enableSharing: Scalars['Boolean']['input'];
}>;
export type SetEnableSharingMutation = {
__typename?: 'Mutation';
updateWorkspace: { __typename?: 'WorkspaceType'; id: string };
};
export type SetEnableUrlPreviewMutationVariables = Exact<{
id: Scalars['ID']['input'];
enableUrlPreview: Scalars['Boolean']['input'];
@@ -7587,6 +7612,11 @@ export type Mutations =
variables: SetEnableDocEmbeddingMutationVariables;
response: SetEnableDocEmbeddingMutation;
}
| {
name: 'setEnableSharingMutation';
variables: SetEnableSharingMutationVariables;
response: SetEnableSharingMutation;
}
| {
name: 'setEnableUrlPreviewMutation';
variables: SetEnableUrlPreviewMutationVariables;