| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- export const SocketEventName = {
- // Update descendantCount
- UpdateDescCount: 'UpdateDescCount',
- // Public migration
- PMStarted: 'PublicMigrationStarted',
- PMMigrating: 'PublicMigrationMigrating',
- PMErrorCount: 'PublicMigrationErrorCount',
- PMEnded: 'PublicMigrationEnded',
- // Page migration
- PageMigrationSuccess: 'PageMigrationSuccess',
- PageMigrationError: 'PageMigrationError',
- // Elasticsearch
- AddPageProgress: 'addPageProgress',
- FinishAddPage: 'finishAddPage',
- RebuildingFailed: 'rebuildingFailed',
- // External user group sync
- GroupSyncProgress: 'groupSyncProgress',
- FinishGroupSync: 'finishGroupSync',
- // Page Operation
- PageCreated: 'page:create',
- PageUpdated: 'page:update',
- PageDeleted: 'page:delete',
- // Hackmd
- EditingWithHackmd: 'page:editingWithHackmd',
- } as const;
- export type SocketEventName = typeof SocketEventName[keyof typeof SocketEventName];
- type PageId = string;
- type DescendantCount = number;
- /**
- * Data of updateDescCount when used through socket.io. Convert to UpdateDescCountData type when use with swr cache.
- */
- export type UpdateDescCountRawData = Record<PageId, DescendantCount>;
- export type UpdateDescCountData = Map<PageId, DescendantCount>;
- export type PMStartedData = { total: number };
- export type PMMigratingData = { count: number };
- export type PMErrorCountData = { skip: number };
- export type PMEndedData = { isSucceeded: boolean };
- export type PageMigrationErrorData = { paths: string[] }
|