mirror of
https://github.com/outline/outline.git
synced 2026-11-20 21:23:06 +03:00
* chore: Move shared/types.ts to shared/types/index.ts * chore: Split shared/types into domain files shared/types/index.ts re-exports every file, so imports from @shared/types do not change. No definitions are changed. * docs: Add JSDoc to all exports in shared/types
68 lines
1.8 KiB
TypeScript
68 lines
1.8 KiB
TypeScript
/** Content types that a single document can be exported as. */
|
|
export enum ExportContentType {
|
|
Markdown = "text/markdown",
|
|
Html = "text/html",
|
|
TextBundle = "application/x-textbundle",
|
|
Pdf = "application/pdf",
|
|
}
|
|
|
|
/** File formats supported by bulk imports and exports. */
|
|
export enum FileOperationFormat {
|
|
JSON = "json",
|
|
MarkdownZip = "outline-markdown",
|
|
OKFZip = "okf",
|
|
HTMLZip = "html",
|
|
TextBundleZip = "textbundle",
|
|
PDF = "pdf",
|
|
Notion = "notion",
|
|
}
|
|
|
|
/** The direction of a file operation. */
|
|
export enum FileOperationType {
|
|
Import = "import",
|
|
Export = "export",
|
|
}
|
|
|
|
/** The lifecycle states of a file operation. */
|
|
export enum FileOperationState {
|
|
Creating = "creating",
|
|
Uploading = "uploading",
|
|
Complete = "complete",
|
|
Error = "error",
|
|
Expired = "expired",
|
|
}
|
|
|
|
/** The lifecycle states of an import. */
|
|
export enum ImportState {
|
|
Created = "created",
|
|
InProgress = "in_progress",
|
|
Processed = "processed",
|
|
Completed = "completed",
|
|
Errored = "errored",
|
|
Canceled = "canceled",
|
|
}
|
|
|
|
/** The lifecycle states of a single import task. */
|
|
export enum ImportTaskState {
|
|
Created = "created",
|
|
InProgress = "in_progress",
|
|
Completed = "completed",
|
|
Errored = "errored",
|
|
Canceled = "canceled",
|
|
}
|
|
|
|
/**
|
|
* Classifies the work an `ImportTask` row represents. Set when the task is
|
|
* created and used by `APIImportTask` to dispatch to the right handler.
|
|
*
|
|
* - `Bootstrap` runs once per import on a worker that owns the source
|
|
* artifact (e.g. extracts a zip, discovers structure, schedules child
|
|
* tasks). Subclasses without a bootstrap step never produce these.
|
|
* - `Page` is the per-document work that the bootstrap (or `ImportsProcessor`
|
|
* for sources without a bootstrap, like Notion) fans out into.
|
|
*/
|
|
export enum ImportTaskPhase {
|
|
Bootstrap = "bootstrap",
|
|
Page = "page",
|
|
}
|