mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
refactor(server): separate page visibility from workspace permission (#4836)
This commit is contained in:
@@ -184,11 +184,14 @@ type WorkspaceType {
|
||||
"""member count of workspace"""
|
||||
memberCount: Int!
|
||||
|
||||
"""Shared pages of workspace"""
|
||||
sharedPages: [String!]!
|
||||
|
||||
"""Owner of workspace"""
|
||||
owner: UserType!
|
||||
|
||||
"""Shared pages of workspace"""
|
||||
sharedPages: [String!]! @deprecated(reason: "use WorkspaceType.publicPages")
|
||||
|
||||
"""Public pages of a workspace"""
|
||||
publicPages: [WorkspacePage!]!
|
||||
}
|
||||
|
||||
type InvitationWorkspaceType {
|
||||
@@ -216,6 +219,19 @@ type InvitationType {
|
||||
invitee: UserType!
|
||||
}
|
||||
|
||||
type WorkspacePage {
|
||||
id: String!
|
||||
workspaceId: String!
|
||||
mode: PublicPageMode!
|
||||
public: Boolean!
|
||||
}
|
||||
|
||||
"""The mode which the public page default in"""
|
||||
enum PublicPageMode {
|
||||
Page
|
||||
Edgeless
|
||||
}
|
||||
|
||||
type Query {
|
||||
"""Get is owner of workspace"""
|
||||
isOwner(workspaceId: String!): Boolean!
|
||||
@@ -265,12 +281,13 @@ type Mutation {
|
||||
invite(workspaceId: String!, email: String!, permission: Permission!, sendInviteMail: Boolean): String!
|
||||
revoke(workspaceId: String!, userId: String!): Boolean!
|
||||
acceptInviteById(workspaceId: String!, inviteId: String!, sendAcceptMail: Boolean): Boolean!
|
||||
acceptInvite(workspaceId: String!): Boolean!
|
||||
leaveWorkspace(workspaceId: String!, workspaceName: String!, sendLeaveMail: Boolean): Boolean!
|
||||
sharePage(workspaceId: String!, pageId: String!): Boolean!
|
||||
revokePage(workspaceId: String!, pageId: String!): Boolean!
|
||||
setBlob(workspaceId: String!, blob: Upload!): String!
|
||||
deleteBlob(workspaceId: String!, hash: String!): Boolean!
|
||||
sharePage(workspaceId: String!, pageId: String!): Boolean! @deprecated(reason: "renamed to publicPage")
|
||||
publishPage(workspaceId: String!, pageId: String!, mode: PublicPageMode = Page): WorkspacePage!
|
||||
revokePage(workspaceId: String!, pageId: String!): Boolean! @deprecated(reason: "use revokePublicPage")
|
||||
revokePublicPage(workspaceId: String!, pageId: String!): WorkspacePage!
|
||||
|
||||
"""Upload user avatar"""
|
||||
uploadAvatar(avatar: Upload!): UserType!
|
||||
|
||||
Reference in New Issue
Block a user