/** * module: minute 的外部所需(编码规范 §10.1)。 * 「port 声明本模块需要外界提供什么」—— 由 app 层注入,模块自己不认实现。 */ import type { StaffId } from '@contracts'; import type { Minute } from './internal/domain/minute.ts'; export type MinuteStore = { list(limit: number): Promise; get(minuteId: string): Promise; save(minute: Minute): Promise; }; /** 登记起单 —— app 注入 `process`(L7):经调用接口调起流程包,不碰流程内部 */ export type RegistrationGateway = { start(input: { processPackageId: string; subject: string; data: Record; /** 来源:登记人 */ byId: StaffId; }): Promise<{ workflowId: string; }>; }; export type MinuteDeps = { readonly store: MinuteStore; readonly registration: RegistrationGateway; readonly ids: { next(): string; }; readonly clock: { now(): Date; }; };