diff --git a/templates/document-editor/src/descriptor.ts b/templates/document-editor/src/descriptor.ts new file mode 100644 index 0000000..6fce9a0 --- /dev/null +++ b/templates/document-editor/src/descriptor.ts @@ -0,0 +1,11 @@ +import { buildDescriptor } from "@uncaged/workflow-register"; +import { documentEditorTable } from "./moderator.js"; +import { DOCUMENT_EDITOR_DESCRIPTION, documentEditorRoles } from "./roles.js"; + +export function buildDocumentEditorDescriptor() { + return buildDescriptor({ + description: DOCUMENT_EDITOR_DESCRIPTION, + roles: documentEditorRoles, + table: documentEditorTable, + }); +} diff --git a/templates/document-editor/src/index.ts b/templates/document-editor/src/index.ts new file mode 100644 index 0000000..4c633cf --- /dev/null +++ b/templates/document-editor/src/index.ts @@ -0,0 +1,27 @@ +import type { WorkflowDefinition } from "@uncaged/workflow-runtime"; +import { documentEditorTable } from "./moderator.js"; +import { + DOCUMENT_EDITOR_DESCRIPTION, + type DocumentEditorMeta, + documentEditorRoles, +} from "./roles.js"; + +export { buildDocumentEditorDescriptor } from "./descriptor.js"; +export { documentEditorTable } from "./moderator.js"; +export { + type DifferMeta, + differMetaSchema, + differRole, + DOCUMENT_EDITOR_DESCRIPTION, + type DocumentEditorMeta, + documentEditorRoles, + type OfficeMeta, + officeMetaSchema, + officeRole, +} from "./roles.js"; + +export const documentEditorDefinition: WorkflowDefinition = { + description: DOCUMENT_EDITOR_DESCRIPTION, + roles: documentEditorRoles, + table: documentEditorTable, +};