mirror of
https://github.com/docmost/docmost.git
synced 2026-08-28 17:27:06 +08:00
22 lines
494 B
TypeScript
22 lines
494 B
TypeScript
import { Injectable } from '@nestjs/common';
|
|
|
|
export type PageViewPayload = {
|
|
pageId: string;
|
|
workspaceId?: string;
|
|
spaceId?: string;
|
|
shareId?: string;
|
|
userId?: string | null;
|
|
visitorId?: string;
|
|
};
|
|
|
|
export const PAGE_VIEW_SERVICE = Symbol('PAGE_VIEW_SERVICE');
|
|
|
|
export interface IPageViewService {
|
|
track(payload: PageViewPayload): void | Promise<void>;
|
|
}
|
|
|
|
@Injectable()
|
|
export class NoopPageViewService implements IPageViewService {
|
|
track(_payload: PageViewPayload): void {}
|
|
}
|