690414:1113 Update README.md /.agents/skills, /.windsurf/workflows

This commit is contained in:
2026-04-14 11:13:42 +07:00
parent 02400fd88c
commit 6d45bdaeb5
194 changed files with 12708 additions and 8762 deletions
+5
View File
@@ -48,8 +48,13 @@ export interface Circulation {
createdByUserId: number;
submittedAt?: string;
closedAt?: string;
deadlineDate?: string; // v1.8.7: delta-05 EC-CIRC-003
createdAt: string;
updatedAt: string;
// ADR-021 / v1.8.7: Workflow context fields
workflowInstanceId?: string; // UUID ของ WorkflowInstance
workflowState?: string; // สถานะปัจจุบันใน Workflow
availableActions?: string[]; // Actions ที่ทำได้ ณ ขณะนี้
// Joined relations from API
routings?: CirculationRouting[];
correspondence?: {
+6
View File
@@ -88,6 +88,12 @@ export interface Correspondence {
codeNameTh?: string;
contract?: { publicId: string; contractName: string; contractCode: string };
};
// ADR-021: Workflow Engine fields (optional — populated when workflow is active)
workflowInstanceId?: string;
workflowState?: string;
availableActions?: string[];
priority?: import('./workflow').WorkflowPriority;
}
export interface CreateCorrespondenceDto {
@@ -61,3 +61,18 @@ export interface GetAvailableActionsDto {
/** สถานะปัจจุบัน */
currentState: string;
}
// --- ADR-021: Workflow Transition with Step Attachments ---
export interface WorkflowTransitionWithAttachmentsDto {
/** ชื่อ Action (ต้องตรงกับ DSL) เช่น APPROVE, REJECT */
action: string;
/** ความเห็นประกอบการดำเนินการ */
comment?: string;
/** ข้อมูลเพิ่มเติม */
payload?: Record<string, unknown>;
/** รายการ publicId ของไฟล์แนบประจำ Step นี้ (max 20, ADR-016 Two-Phase upload) */
attachmentPublicIds?: string[];
}
+6
View File
@@ -74,6 +74,12 @@ export interface RFA {
// Deprecated/Mapped fields
correspondenceNumber?: string; // Convenience accessor
// ADR-021: Workflow Engine fields (optional — populated when workflow is active)
workflowInstanceId?: string;
workflowState?: string;
availableActions?: string[];
priority?: import('./workflow').WorkflowPriority;
}
export interface CreateRFADto {
+5
View File
@@ -36,6 +36,10 @@ export interface Transmittal {
purpose?: TransmittalPurpose;
remarks?: string;
createdAt: string;
// ADR-021 / v1.8.7: Workflow context fields
workflowInstanceId?: string; // UUID ของ WorkflowInstance (null = Draft ยังไม่ submit)
workflowState?: string; // สถานะปัจจุบันใน Workflow เช่น IN_REVIEW, APPROVED
availableActions?: string[]; // Actions ที่ทำได้ ณ ขณะนี้ เช่น ['APPROVE', 'REJECT']
// Joined relations from API
items?: TransmittalItem[];
correspondence?: {
@@ -90,5 +94,6 @@ export interface SearchTransmittalDto {
page?: number;
limit?: number;
projectId?: number | string; // ADR-019: Accept UUID
purpose?: TransmittalPurpose; // v1.8.7: B3 purpose filter
search?: string;
}
+24
View File
@@ -1,5 +1,29 @@
export type WorkflowType = 'CORRESPONDENCE' | 'RFA' | 'DRAWING';
// ADR-021: ระดับความเร่งด่วน (แสดงด้วย Badge สี)
export type WorkflowPriority = 'URGENT' | 'HIGH' | 'MEDIUM' | 'LOW';
// ADR-021: ข้อมูลสรุปไฟล์แนบประจำ Step
export interface WorkflowAttachmentSummary {
publicId: string;
originalFilename: string;
mimeType?: string;
fileSize?: number;
}
// ADR-021: รายการประวัติการเปลี่ยนสถานะพร้อมไฟล์แนบ
export interface WorkflowHistoryItem {
id: string;
fromState: string;
toState: string;
action: string;
actionByUserId?: number;
comment?: string;
metadata?: Record<string, unknown>;
attachments?: WorkflowAttachmentSummary[];
createdAt: string;
}
export interface WorkflowStep {
publicId: string; // ADR-019: public identifier
stepId?: string; // Internal ID (excluded from API)