feat: doc status & share status (#14426)

#### PR Dependency Tree


* **PR #14426** 👈

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 dashboard: view workspace analytics (storage, sync activity, top
shared links) with charts and configurable windows.
* Document analytics tab: see total/unique/guest views and trends over
selectable time windows.
* Last-accessed members: view who last accessed a document, with
pagination.
* Shared links analytics: browse and paginate all shared links with
view/unique/guest metrics and share URLs.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
DarkSky
2026-02-13 01:01:29 +08:00
committed by GitHub
parent b46bf91575
commit b4be9118ad
44 changed files with 5701 additions and 86 deletions
@@ -59,11 +59,13 @@ export const CheckoutParams = z.object({
});
export abstract class SubscriptionManager {
protected readonly scheduleManager = new ScheduleManager(this.stripeProvider);
protected readonly scheduleManager: ScheduleManager;
constructor(
protected readonly stripeProvider: StripeFactory,
protected readonly db: PrismaClient
) {}
) {
this.scheduleManager = new ScheduleManager(this.stripeProvider);
}
get stripe() {
return this.stripeProvider.stripe;
@@ -75,7 +75,7 @@ export { CheckoutParams };
@Injectable()
export class SubscriptionService {
private readonly logger = new Logger(SubscriptionService.name);
private readonly scheduleManager = new ScheduleManager(this.stripeProvider);
private readonly scheduleManager: ScheduleManager;
constructor(
private readonly stripeProvider: StripeFactory,
@@ -85,7 +85,9 @@ export class SubscriptionService {
private readonly userManager: UserSubscriptionManager,
private readonly workspaceManager: WorkspaceSubscriptionManager,
private readonly selfhostManager: SelfhostTeamSubscriptionManager
) {}
) {
this.scheduleManager = new ScheduleManager(this.stripeProvider);
}
get stripe() {
return this.stripeProvider.stripe;
@@ -5,12 +5,14 @@ import { fixUrl, OriginRules } from './utils';
@Injectable()
export class WorkerService {
allowedOrigins: OriginRules = [...this.url.allowedOrigins];
allowedOrigins: OriginRules;
constructor(
private readonly config: Config,
private readonly url: URLHelper
) {}
) {
this.allowedOrigins = [...this.url.allowedOrigins];
}
@OnEvent('config.init')
onConfigInit() {