0c18acc452
* 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>
14 lines
435 B
TypeScript
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>
|