mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 01:26:37 +08:00
c53457691d
#### PR Dependency Tree * **PR #14996** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Admin mutations to grant/revoke commercial entitlements. * New Doc comment-update permission. * Realtime user/workspace quota-state endpoints and live-update rooms. * **Bug Fixes** * More accurate readable-doc filtering and permission evaluation. * **Refactor** * Workspace feature management moved to entitlement-based model; permission and quota pipelines redesigned. * Admin workspace UI now edits flags only (feature toggles removed). * **Tests** * Extensive new and updated tests for permissions, entitlements, quota, projection, and backfills. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/toeverything/AFFiNE/pull/14996?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
70 lines
1.9 KiB
TypeScript
70 lines
1.9 KiB
TypeScript
import './config';
|
|
|
|
import { Module } from '@nestjs/common';
|
|
|
|
import { ServerConfigModule } from '../../core';
|
|
import { EntitlementModule } from '../../core/entitlement';
|
|
import { FeatureModule } from '../../core/features';
|
|
import { MailModule } from '../../core/mail';
|
|
import { PermissionModule } from '../../core/permission';
|
|
import { QuotaModule } from '../../core/quota';
|
|
import { UserModule } from '../../core/user';
|
|
import { WorkspaceModule } from '../../core/workspaces';
|
|
import { StripeWebhookController } from './controller';
|
|
import { SubscriptionCronJobs } from './cron';
|
|
import { PaymentEventHandlers } from './event';
|
|
import { LicenseController } from './license/controller';
|
|
import {
|
|
SelfhostTeamSubscriptionManager,
|
|
UserSubscriptionManager,
|
|
WorkspaceSubscriptionManager,
|
|
} from './manager';
|
|
import {
|
|
SubscriptionResolver,
|
|
UserSubscriptionResolver,
|
|
WorkspaceSubscriptionResolver,
|
|
} from './resolver';
|
|
import {
|
|
RevenueCatService,
|
|
RevenueCatWebhookController,
|
|
RevenueCatWebhookHandler,
|
|
} from './revenuecat';
|
|
import { SubscriptionService } from './service';
|
|
import { StripeFactory, StripeProvider } from './stripe';
|
|
import { StripeWebhook } from './webhook';
|
|
|
|
@Module({
|
|
imports: [
|
|
FeatureModule,
|
|
QuotaModule,
|
|
UserModule,
|
|
PermissionModule,
|
|
WorkspaceModule,
|
|
MailModule,
|
|
ServerConfigModule,
|
|
EntitlementModule,
|
|
],
|
|
providers: [
|
|
StripeFactory,
|
|
StripeProvider,
|
|
RevenueCatService,
|
|
SubscriptionService,
|
|
SubscriptionResolver,
|
|
UserSubscriptionResolver,
|
|
StripeWebhook,
|
|
RevenueCatWebhookHandler,
|
|
UserSubscriptionManager,
|
|
WorkspaceSubscriptionManager,
|
|
SelfhostTeamSubscriptionManager,
|
|
SubscriptionCronJobs,
|
|
WorkspaceSubscriptionResolver,
|
|
PaymentEventHandlers,
|
|
],
|
|
controllers: [
|
|
StripeWebhookController,
|
|
LicenseController,
|
|
RevenueCatWebhookController,
|
|
],
|
|
})
|
|
export class PaymentModule {}
|