feat(server): add administrator feature (#6995)

This commit is contained in:
forehalo
2024-05-27 11:17:21 +00:00
parent 5ba9e2e9b1
commit aff166a0ef
23 changed files with 305 additions and 293 deletions

View File

@@ -96,6 +96,7 @@ enum EarlyAccessType {
"""The type of workspace feature"""
enum FeatureType {
AIEarlyAccess
Admin
Copilot
EarlyAccess
UnlimitedCopilot
@@ -184,6 +185,7 @@ type LimitedUserType {
type Mutation {
acceptInviteById(inviteId: String!, sendAcceptMail: Boolean, workspaceId: String!): Boolean!
addAdminister(email: String!): Boolean!
addToEarlyAccess(email: String!, type: EarlyAccessType!): Int!
addWorkspaceFeature(feature: FeatureType!, workspaceId: String!): Int!
cancelSubscription(idempotencyKey: String!, plan: SubscriptionPlan = Pro): UserSubscription!
@@ -428,23 +430,6 @@ type UserInvoice {
union UserOrLimitedUser = LimitedUserType | UserType
type UserQuota {
blobLimit: SafeInt!
historyPeriod: SafeInt!
humanReadable: UserQuotaHumanReadable!
memberLimit: Int!
name: String!
storageQuota: SafeInt!
}
type UserQuotaHumanReadable {
blobLimit: String!
historyPeriod: String!
memberLimit: String!
name: String!
storageQuota: String!
}
type UserSubscription {
canceledAt: DateTime
createdAt: DateTime!
@@ -492,7 +477,6 @@ type UserType {
"""User name"""
name: String!
quota: UserQuota
subscription(plan: SubscriptionPlan = Pro): UserSubscription @deprecated(reason: "use `UserType.subscriptions`")
subscriptions: [UserSubscription!]!
token: tokenType! @deprecated(reason: "use [/api/auth/authorize]")