Files
speckle-server/packages/shared/src/limit/domain.ts
T
Alessandro Magionami 0c18acc452 Alessandro/web 2945 comments hide body (#4385)
* chore(core): move limits logic into shared

* feat(comments): limit text and rawText for comments

* chore(core): removed test moved to shared

* chore(comments): generate gql types

* feat(comments): rework comment history limits

* chore(comments): fix tests

* chore(shared): add dayjs as dependency

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2025-04-15 10:44:12 +02:00

14 lines
435 B
TypeScript

export type HistoryLimit = { value: number; unit: 'day' | 'week' | 'month' }
export type HistoryLimits = Record<HistoryLimitTypes, HistoryLimit | null>
export const HistoryLimitTypes = {
versionsHistory: 'versionsHistory',
commentHistory: 'commentHistory'
} as const
export type HistoryLimitTypes =
(typeof HistoryLimitTypes)[keyof typeof HistoryLimitTypes]
export type GetHistoryLimits = () => Promise<HistoryLimits | null>