feat: add workspace experimental features api (#5525)

This commit is contained in:
DarkSky
2024-01-06 11:04:49 +00:00
parent 9650a5a6a1
commit 443908da22
10 changed files with 259 additions and 59 deletions
+15 -1
View File
@@ -131,6 +131,9 @@ type WorkspaceType {
"""Owner of workspace"""
owner: UserType!
"""Available features of workspace"""
availableFeatures: [FeatureType!]!
"""Enabled features of workspace"""
features: [FeatureType!]!
@@ -299,11 +302,21 @@ type Query {
currentUser: UserType
"""Get user by email"""
user(email: String!): UserType
user(email: String!): UserOrLimitedUser
earlyAccessUsers: [UserType!]!
prices: [SubscriptionPrice!]!
}
union UserOrLimitedUser = UserType | LimitedUserType
type LimitedUserType {
"""User email"""
email: String!
"""User password has been set"""
hasPassword: Boolean
}
type Mutation {
signUp(name: String!, email: String!, password: String!): UserType!
signIn(email: String!, password: String!): UserType!
@@ -326,6 +339,7 @@ type Mutation {
leaveWorkspace(workspaceId: String!, workspaceName: String!, sendLeaveMail: Boolean): Boolean!
addWorkspaceFeature(workspaceId: String!, feature: FeatureType!): Int!
removeWorkspaceFeature(workspaceId: String!, feature: FeatureType!): Int!
setWorkspaceExperimentalFeature(workspaceId: String!, feature: FeatureType!, enable: Boolean!): 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")