mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-18 10:36:22 +08:00
feat: add workspace level feature apis (#5503)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
query getWorkspaceFeatures($workspaceId: String!) {
|
||||
workspace(id: $workspaceId) {
|
||||
features
|
||||
}
|
||||
}
|
||||
@@ -383,6 +383,19 @@ query getWorkspacePublicPages($workspaceId: String!) {
|
||||
}`,
|
||||
};
|
||||
|
||||
export const getWorkspaceFeaturesQuery = {
|
||||
id: 'getWorkspaceFeaturesQuery' as const,
|
||||
operationName: 'getWorkspaceFeatures',
|
||||
definitionName: 'workspace',
|
||||
containsFile: false,
|
||||
query: `
|
||||
query getWorkspaceFeatures($workspaceId: String!) {
|
||||
workspace(id: $workspaceId) {
|
||||
features
|
||||
}
|
||||
}`,
|
||||
};
|
||||
|
||||
export const getWorkspaceQuery = {
|
||||
id: 'getWorkspaceQuery' as const,
|
||||
operationName: 'getWorkspace',
|
||||
@@ -760,6 +773,48 @@ mutation uploadAvatar($avatar: Upload!) {
|
||||
}`,
|
||||
};
|
||||
|
||||
export const addWorkspaceFeatureMutation = {
|
||||
id: 'addWorkspaceFeatureMutation' as const,
|
||||
operationName: 'addWorkspaceFeature',
|
||||
definitionName: 'addWorkspaceFeature',
|
||||
containsFile: false,
|
||||
query: `
|
||||
mutation addWorkspaceFeature($workspaceId: String!, $feature: FeatureType!) {
|
||||
addWorkspaceFeature(workspaceId: $workspaceId, feature: $feature)
|
||||
}`,
|
||||
};
|
||||
|
||||
export const listWorkspaceFeaturesQuery = {
|
||||
id: 'listWorkspaceFeaturesQuery' as const,
|
||||
operationName: 'listWorkspaceFeatures',
|
||||
definitionName: 'listWorkspaceFeatures',
|
||||
containsFile: false,
|
||||
query: `
|
||||
query listWorkspaceFeatures($feature: FeatureType!) {
|
||||
listWorkspaceFeatures(feature: $feature) {
|
||||
id
|
||||
public
|
||||
createdAt
|
||||
memberCount
|
||||
owner {
|
||||
id
|
||||
}
|
||||
features
|
||||
}
|
||||
}`,
|
||||
};
|
||||
|
||||
export const removeWorkspaceFeatureMutation = {
|
||||
id: 'removeWorkspaceFeatureMutation' as const,
|
||||
operationName: 'removeWorkspaceFeature',
|
||||
definitionName: 'removeWorkspaceFeature',
|
||||
containsFile: false,
|
||||
query: `
|
||||
mutation removeWorkspaceFeature($workspaceId: String!, $feature: FeatureType!) {
|
||||
removeWorkspaceFeature(workspaceId: $workspaceId, feature: $feature)
|
||||
}`,
|
||||
};
|
||||
|
||||
export const inviteByEmailMutation = {
|
||||
id: 'inviteByEmailMutation' as const,
|
||||
operationName: 'inviteByEmail',
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
mutation addWorkspaceFeature($workspaceId: String!, $feature: FeatureType!) {
|
||||
addWorkspaceFeature(workspaceId: $workspaceId, feature: $feature)
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
query listWorkspaceFeatures($feature: FeatureType!) {
|
||||
listWorkspaceFeatures(feature: $feature) {
|
||||
id
|
||||
public
|
||||
createdAt
|
||||
memberCount
|
||||
owner {
|
||||
id
|
||||
}
|
||||
features
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
mutation removeWorkspaceFeature($workspaceId: String!, $feature: FeatureType!) {
|
||||
removeWorkspaceFeature(workspaceId: $workspaceId, feature: $feature)
|
||||
}
|
||||
Reference in New Issue
Block a user