feat: add template descriptor and index — WorkflowDefinition export

This commit is contained in:
jiayiyan
2026-05-18 15:55:58 +08:00
parent e2cd1d1ae5
commit 259deac52e
2 changed files with 38 additions and 0 deletions
@@ -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,
});
}
+27
View File
@@ -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<DocumentEditorMeta> = {
description: DOCUMENT_EDITOR_DESCRIPTION,
roles: documentEditorRoles,
table: documentEditorTable,
};