Files
Stirling-PDF/frontend/src/constants/splitConstants.ts
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
801 B
TypeScript
Raw Normal View History

export const SPLIT_METHODS = {
2025-07-16 17:53:50 +01:00
BY_PAGES: 'byPages',
2025-08-11 09:16:16 +01:00
BY_SECTIONS: 'bySections',
BY_SIZE: 'bySize',
BY_PAGE_COUNT: 'byPageCount',
BY_DOC_COUNT: 'byDocCount',
2025-07-16 17:53:50 +01:00
BY_CHAPTERS: 'byChapters'
} as const;
export const ENDPOINTS = {
[SPLIT_METHODS.BY_PAGES]: 'split-pages',
[SPLIT_METHODS.BY_SECTIONS]: 'split-pdf-by-sections',
[SPLIT_METHODS.BY_SIZE]: 'split-by-size-or-count',
[SPLIT_METHODS.BY_PAGE_COUNT]: 'split-by-size-or-count',
[SPLIT_METHODS.BY_DOC_COUNT]: 'split-by-size-or-count',
[SPLIT_METHODS.BY_CHAPTERS]: 'split-pdf-by-chapters'
2025-07-16 17:53:50 +01:00
} as const;
export type SplitMethod = typeof SPLIT_METHODS[keyof typeof SPLIT_METHODS];
export const isSplitMethod = (value: string | null): value is SplitMethod => {
return Object.values(SPLIT_METHODS).includes(value as SplitMethod);
2025-08-11 09:16:16 +01:00
}