mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
feat: add workspace feature tests (#5501)
This commit is contained in:
@@ -113,9 +113,17 @@ export class FeatureManagementService implements OnModuleInit {
|
||||
return features.map(feature => feature.feature.name);
|
||||
}
|
||||
|
||||
async hasWorkspaceFeature(workspaceId: string, feature: FeatureType) {
|
||||
return this.feature.hasWorkspaceFeature(workspaceId, feature);
|
||||
}
|
||||
|
||||
async removeWorkspaceFeature(workspaceId: string, feature: FeatureType) {
|
||||
return this.feature
|
||||
.removeWorkspaceFeature(workspaceId, feature)
|
||||
.then(c => c > 0);
|
||||
}
|
||||
|
||||
async listFeatureWorkspaces(feature: FeatureType) {
|
||||
return this.feature.listFeatureWorkspaces(feature);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,81 +72,6 @@ type RemoveAvatar {
|
||||
success: Boolean!
|
||||
}
|
||||
|
||||
type TokenType {
|
||||
token: String!
|
||||
refresh: String!
|
||||
sessionToken: String
|
||||
}
|
||||
|
||||
type SubscriptionPrice {
|
||||
type: String!
|
||||
plan: SubscriptionPlan!
|
||||
currency: String!
|
||||
amount: Int!
|
||||
yearlyAmount: Int!
|
||||
}
|
||||
|
||||
enum SubscriptionPlan {
|
||||
Free
|
||||
Pro
|
||||
Team
|
||||
Enterprise
|
||||
SelfHosted
|
||||
}
|
||||
|
||||
type UserSubscription {
|
||||
id: String!
|
||||
plan: SubscriptionPlan!
|
||||
recurring: SubscriptionRecurring!
|
||||
status: SubscriptionStatus!
|
||||
start: DateTime!
|
||||
end: DateTime!
|
||||
trialStart: DateTime
|
||||
trialEnd: DateTime
|
||||
nextBillAt: DateTime
|
||||
canceledAt: DateTime
|
||||
createdAt: DateTime!
|
||||
updatedAt: DateTime!
|
||||
}
|
||||
|
||||
enum SubscriptionRecurring {
|
||||
Monthly
|
||||
Yearly
|
||||
}
|
||||
|
||||
enum SubscriptionStatus {
|
||||
Active
|
||||
PastDue
|
||||
Unpaid
|
||||
Canceled
|
||||
Incomplete
|
||||
Paused
|
||||
IncompleteExpired
|
||||
Trialing
|
||||
}
|
||||
|
||||
type UserInvoice {
|
||||
id: String!
|
||||
plan: SubscriptionPlan!
|
||||
recurring: SubscriptionRecurring!
|
||||
currency: String!
|
||||
amount: Int!
|
||||
status: InvoiceStatus!
|
||||
reason: String!
|
||||
lastPaymentError: String
|
||||
link: String
|
||||
createdAt: DateTime!
|
||||
updatedAt: DateTime!
|
||||
}
|
||||
|
||||
enum InvoiceStatus {
|
||||
Draft
|
||||
Open
|
||||
Void
|
||||
Paid
|
||||
Uncollectible
|
||||
}
|
||||
|
||||
type InviteUserType {
|
||||
"""User name"""
|
||||
name: String
|
||||
@@ -242,6 +167,81 @@ type InvitationType {
|
||||
invitee: UserType!
|
||||
}
|
||||
|
||||
type TokenType {
|
||||
token: String!
|
||||
refresh: String!
|
||||
sessionToken: String
|
||||
}
|
||||
|
||||
type SubscriptionPrice {
|
||||
type: String!
|
||||
plan: SubscriptionPlan!
|
||||
currency: String!
|
||||
amount: Int!
|
||||
yearlyAmount: Int!
|
||||
}
|
||||
|
||||
enum SubscriptionPlan {
|
||||
Free
|
||||
Pro
|
||||
Team
|
||||
Enterprise
|
||||
SelfHosted
|
||||
}
|
||||
|
||||
type UserSubscription {
|
||||
id: String!
|
||||
plan: SubscriptionPlan!
|
||||
recurring: SubscriptionRecurring!
|
||||
status: SubscriptionStatus!
|
||||
start: DateTime!
|
||||
end: DateTime!
|
||||
trialStart: DateTime
|
||||
trialEnd: DateTime
|
||||
nextBillAt: DateTime
|
||||
canceledAt: DateTime
|
||||
createdAt: DateTime!
|
||||
updatedAt: DateTime!
|
||||
}
|
||||
|
||||
enum SubscriptionRecurring {
|
||||
Monthly
|
||||
Yearly
|
||||
}
|
||||
|
||||
enum SubscriptionStatus {
|
||||
Active
|
||||
PastDue
|
||||
Unpaid
|
||||
Canceled
|
||||
Incomplete
|
||||
Paused
|
||||
IncompleteExpired
|
||||
Trialing
|
||||
}
|
||||
|
||||
type UserInvoice {
|
||||
id: String!
|
||||
plan: SubscriptionPlan!
|
||||
recurring: SubscriptionRecurring!
|
||||
currency: String!
|
||||
amount: Int!
|
||||
status: InvoiceStatus!
|
||||
reason: String!
|
||||
lastPaymentError: String
|
||||
link: String
|
||||
createdAt: DateTime!
|
||||
updatedAt: DateTime!
|
||||
}
|
||||
|
||||
enum InvoiceStatus {
|
||||
Draft
|
||||
Open
|
||||
Void
|
||||
Paid
|
||||
Uncollectible
|
||||
}
|
||||
|
||||
type DocHistoryType {
|
||||
workspaceId: String!
|
||||
id: String!
|
||||
|
||||
Reference in New Issue
Block a user