@critical-path/core 0.11.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/README.md +39 -0
- package/dist/deliverables.test.d.ts +2 -0
- package/dist/deliverables.test.d.ts.map +1 -0
- package/dist/deliverables.test.js +232 -0
- package/dist/deliverables.test.js.map +1 -0
- package/dist/domain/entities.d.ts +25 -1
- package/dist/domain/entities.d.ts.map +1 -1
- package/dist/domain/entities.js +153 -0
- package/dist/domain/entities.js.map +1 -1
- package/dist/domain/events.d.ts +31 -3
- package/dist/domain/events.d.ts.map +1 -1
- package/dist/domain/events.js.map +1 -1
- package/dist/engine/index.d.ts +9 -1
- package/dist/engine/index.d.ts.map +1 -1
- package/dist/engine/index.js +173 -2
- package/dist/engine/index.js.map +1 -1
- package/dist/index.test.js +28 -0
- package/dist/index.test.js.map +1 -1
- package/dist/store/firebase.d.ts +6 -1
- package/dist/store/firebase.d.ts.map +1 -1
- package/dist/store/firebase.js +41 -0
- package/dist/store/firebase.js.map +1 -1
- package/dist/store/index.d.ts +15 -2
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/index.js +38 -0
- package/dist/store/index.js.map +1 -1
- package/dist/store/sqlite.d.ts +7 -1
- package/dist/store/sqlite.d.ts.map +1 -1
- package/dist/store/sqlite.js +103 -6
- package/dist/store/sqlite.js.map +1 -1
- package/dist/types/index.d.ts +41 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/workflow.d.ts +2 -0
- package/dist/utils/workflow.d.ts.map +1 -1
- package/dist/utils/workflow.js +64 -0
- package/dist/utils/workflow.js.map +1 -1
- package/package.json +1 -1
- package/src/deliverables.test.ts +284 -0
- package/src/domain/entities.ts +185 -2
- package/src/domain/events.ts +28 -3
- package/src/engine/index.ts +197 -2
- package/src/index.test.ts +33 -0
- package/src/store/firebase.ts +47 -1
- package/src/store/index.ts +54 -1
- package/src/store/sqlite.ts +146 -5
- package/src/types/index.ts +60 -1
- package/src/utils/workflow.ts +77 -0
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @critical-path/core
|
|
2
2
|
|
|
3
|
+
## 0.13.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- a4a464b: Support multi-assignees and backward workflow status transitions:
|
|
8
|
+
- Add `TaskAssignee` interface (`id`, `name`, `role`, `type: 'user' | 'agent' | 'team'`, `avatarUrl`) and `assignees?: TaskAssignee[]` to `Task` entity and SQLite storage adapter.
|
|
9
|
+
- Add `getAllowedPreviousStatuses(workflow, currentStatus)` utility and `CriticalPathEngine.getAllowedPreviousTaskTransitions(taskId)` for calculating valid backward transitions.
|
|
10
|
+
- Expose `allowedPreviousStatuses` in server endpoint `GET /tasks/:taskId/transitions`.
|
|
11
|
+
- Add `getAllowedPreviousTaskTransitions(taskId)` to `CriticalPathClient` SDK.
|
|
12
|
+
|
|
13
|
+
## 0.12.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- 5a5930f: Add first-class Deliverable entity, Creative Workflow presets, and reactive UI bindings:
|
|
18
|
+
- `@critical-path/core`: Added `Deliverable` entity, `DeliverableSummary` rollup computation, `DEFAULT_CREATIVE_WORKFLOW` preset, `deliverableId` on tasks, store implementations (InMemory, SQLite, Firebase), domain events, and webhook integration.
|
|
19
|
+
- `@critical-path/server`: Added RESTful API endpoints for `/deliverables` and `/deliverables/:id/summary`.
|
|
20
|
+
- `@critical-path/client`: Added deliverable management and summary methods to `CriticalPathClient`.
|
|
21
|
+
- `@critical-path/react`: Added `useDeliverables` and `useDeliverableSummary` React hooks.
|
|
22
|
+
- `@critical-path/svelte`: Added `DeliverableState` and `createDeliverableState` Svelte 5 Runes state management.
|
|
23
|
+
|
|
3
24
|
## 0.11.0
|
|
4
25
|
|
|
5
26
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -22,6 +22,14 @@
|
|
|
22
22
|
- `FirebaseStorageAdapter`: Google Cloud Storage & Firebase Storage bucket adapter.
|
|
23
23
|
- **Threaded Conversations, Discussions & Emoji Reactions**:
|
|
24
24
|
- Nested replies (`parentId`), multi-author taxonomy (`user`, `agent`, `system`), emoji reactions (`addCommentReaction`, `removeCommentReaction`), and real-time domain event streaming (`comment.created`, `comment.updated`, `comment.deleted`, `comment.reaction.added`, `comment.reaction.removed`).
|
|
25
|
+
- **Multi-Assignee Support & Agent Collaboration**:
|
|
26
|
+
- First-class `TaskAssignee` taxonomy supporting co-assignments across users, autonomous AI agents, and teams with role metadata and custom avatar URLs.
|
|
27
|
+
- **Bidirectional Workflow Transitions**:
|
|
28
|
+
- Symmetrical transition helpers (`getAllowedNextStatuses`, `getAllowedPreviousStatuses`) and engine methods for moving tasks backwards and forwards through customized workflow states.
|
|
29
|
+
- **Creative Workflows & First-Class Deliverables**:
|
|
30
|
+
- `DeliverableEntity` aggregate with automatic delivery timestamps (`deliveredAt`) and URL registry (`outputUrls`).
|
|
31
|
+
- `DEFAULT_CREATIVE_WORKFLOW` template tailored for creative agencies and content production pipelines.
|
|
32
|
+
- Rollup calculations via `getDeliverableSummary()` delivering progress percentages, completed tasks, and total estimated/logged hours across assigned tasks.
|
|
25
33
|
|
|
26
34
|
---
|
|
27
35
|
|
|
@@ -88,6 +96,37 @@ try {
|
|
|
88
96
|
}
|
|
89
97
|
```
|
|
90
98
|
|
|
99
|
+
### 4. Tracking Creative Deliverables & Rollup Metrics
|
|
100
|
+
|
|
101
|
+
```ts
|
|
102
|
+
import { CriticalPathEngine, DEFAULT_CREATIVE_WORKFLOW } from '@critical-path/core';
|
|
103
|
+
|
|
104
|
+
const engine = new CriticalPathEngine();
|
|
105
|
+
|
|
106
|
+
// 1. Create deliverable
|
|
107
|
+
const deliverable = await engine.createDeliverable({
|
|
108
|
+
projectId: 'proj_1',
|
|
109
|
+
title: 'Brand Hero Video 30s',
|
|
110
|
+
format: 'ProRes 422HQ',
|
|
111
|
+
specs: { resolution: '3840x2160', fps: 24 }
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
// 2. Attach tasks to deliverable
|
|
115
|
+
await engine.createTask({
|
|
116
|
+
projectId: 'proj_1',
|
|
117
|
+
deliverableId: deliverable.id,
|
|
118
|
+
title: 'Storyboard & Animatic',
|
|
119
|
+
status: 'approved',
|
|
120
|
+
estimatedHours: 12,
|
|
121
|
+
loggedHours: 12,
|
|
122
|
+
progress: 100
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
// 3. Rollup metrics
|
|
126
|
+
const summary = await engine.getDeliverableSummary(deliverable.id);
|
|
127
|
+
console.log(`Progress: ${summary?.progressPercentage}%, Total tasks: ${summary?.totalTasks}`);
|
|
128
|
+
```
|
|
129
|
+
|
|
91
130
|
---
|
|
92
131
|
|
|
93
132
|
## 🔌 Creating a Custom Plugin
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deliverables.test.d.ts","sourceRoot":"","sources":["../src/deliverables.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { CriticalPathEngine, InMemoryStore, SQLiteStore, FirebaseStore, InMemoryFirestoreMock, DeliverableEntity, DEFAULT_CREATIVE_WORKFLOW, validateTransition } from './index.js';
|
|
3
|
+
describe('Deliverable Entity & Creative Workflows', () => {
|
|
4
|
+
it('creates a DeliverableEntity with defaults and emits domain event', () => {
|
|
5
|
+
const entity = DeliverableEntity.create({
|
|
6
|
+
projectId: 'proj_1',
|
|
7
|
+
title: 'Hero 30s Spot - Cutdown 16:9',
|
|
8
|
+
format: 'ProRes 422HQ',
|
|
9
|
+
specs: { resolution: '3840x2160', fps: 24 }
|
|
10
|
+
});
|
|
11
|
+
expect(entity.id).toMatch(/^deliv_/);
|
|
12
|
+
expect(entity.status).toBe('planned');
|
|
13
|
+
expect(entity.format).toBe('ProRes 422HQ');
|
|
14
|
+
expect(entity.specs).toEqual({ resolution: '3840x2160', fps: 24 });
|
|
15
|
+
expect(entity.outputUrls).toEqual([]);
|
|
16
|
+
const events = entity.getUncommittedEvents();
|
|
17
|
+
expect(events).toHaveLength(1);
|
|
18
|
+
expect(events[0].name).toBe('deliverable.created');
|
|
19
|
+
});
|
|
20
|
+
it('transitions deliverable status and auto-records deliveredAt timestamp', () => {
|
|
21
|
+
const entity = DeliverableEntity.create({
|
|
22
|
+
projectId: 'proj_1',
|
|
23
|
+
title: 'Packaging Key Visual'
|
|
24
|
+
});
|
|
25
|
+
entity.clearEvents();
|
|
26
|
+
entity.transitionTo('in_progress');
|
|
27
|
+
expect(entity.status).toBe('in_progress');
|
|
28
|
+
expect(entity.deliveredAt).toBeUndefined();
|
|
29
|
+
entity.transitionTo('delivered');
|
|
30
|
+
expect(entity.status).toBe('delivered');
|
|
31
|
+
expect(entity.deliveredAt).toBeDefined();
|
|
32
|
+
const events = entity.getUncommittedEvents();
|
|
33
|
+
expect(events.map((e) => e.name)).toContain('deliverable.status_changed');
|
|
34
|
+
});
|
|
35
|
+
it('adds output URLs without duplicates and emits deliverable.updated', () => {
|
|
36
|
+
const entity = DeliverableEntity.create({
|
|
37
|
+
projectId: 'proj_1',
|
|
38
|
+
title: 'Brand Mascot 3D Render'
|
|
39
|
+
});
|
|
40
|
+
entity.clearEvents();
|
|
41
|
+
entity.addOutputUrl('https://cdn.example.com/renders/v1.mov');
|
|
42
|
+
expect(entity.outputUrls).toContain('https://cdn.example.com/renders/v1.mov');
|
|
43
|
+
entity.addOutputUrl('https://cdn.example.com/renders/v1.mov');
|
|
44
|
+
expect(entity.outputUrls).toHaveLength(1);
|
|
45
|
+
entity.addOutputUrl('https://cdn.example.com/renders/v2.mov');
|
|
46
|
+
expect(entity.outputUrls).toHaveLength(2);
|
|
47
|
+
const events = entity.getUncommittedEvents();
|
|
48
|
+
expect(events.filter((e) => e.name === 'deliverable.updated')).toHaveLength(2);
|
|
49
|
+
});
|
|
50
|
+
it('validates DEFAULT_CREATIVE_WORKFLOW stages and transitions', () => {
|
|
51
|
+
expect(DEFAULT_CREATIVE_WORKFLOW.id).toBe('wf_creative_default');
|
|
52
|
+
const statusKeys = DEFAULT_CREATIVE_WORKFLOW.statuses.map((s) => s.key);
|
|
53
|
+
expect(statusKeys).toContain('briefing');
|
|
54
|
+
expect(statusKeys).toContain('concept');
|
|
55
|
+
expect(statusKeys).toContain('in_production');
|
|
56
|
+
expect(statusKeys).toContain('internal_review');
|
|
57
|
+
expect(statusKeys).toContain('client_review');
|
|
58
|
+
expect(statusKeys).toContain('revision_requested');
|
|
59
|
+
expect(statusKeys).toContain('approved');
|
|
60
|
+
expect(statusKeys).toContain('delivered');
|
|
61
|
+
expect(validateTransition(DEFAULT_CREATIVE_WORKFLOW, 'briefing', 'concept')).toBe(true);
|
|
62
|
+
expect(validateTransition(DEFAULT_CREATIVE_WORKFLOW, 'concept', 'in_production')).toBe(true);
|
|
63
|
+
expect(validateTransition(DEFAULT_CREATIVE_WORKFLOW, 'internal_review', 'revision_requested')).toBe(true);
|
|
64
|
+
expect(validateTransition(DEFAULT_CREATIVE_WORKFLOW, 'client_review', 'approved')).toBe(true);
|
|
65
|
+
expect(validateTransition(DEFAULT_CREATIVE_WORKFLOW, 'approved', 'delivered')).toBe(true);
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
describe('Store Adapters Deliverable CRUD', () => {
|
|
69
|
+
it('supports Deliverable CRUD in InMemoryStore', async () => {
|
|
70
|
+
const store = new InMemoryStore();
|
|
71
|
+
const created = await store.createDeliverable({
|
|
72
|
+
projectId: 'proj_1',
|
|
73
|
+
title: 'Billboard Print 600dpi',
|
|
74
|
+
format: 'TIFF'
|
|
75
|
+
});
|
|
76
|
+
expect(created.id).toBeDefined();
|
|
77
|
+
expect(created.status).toBe('planned');
|
|
78
|
+
const fetched = await store.getDeliverable(created.id);
|
|
79
|
+
expect(fetched?.title).toBe('Billboard Print 600dpi');
|
|
80
|
+
const list = await store.getDeliverables('proj_1');
|
|
81
|
+
expect(list).toHaveLength(1);
|
|
82
|
+
const updated = await store.updateDeliverable(created.id, { status: 'in_review' });
|
|
83
|
+
expect(updated?.status).toBe('in_review');
|
|
84
|
+
const deleted = await store.deleteDeliverable(created.id);
|
|
85
|
+
expect(deleted).toBe(true);
|
|
86
|
+
expect(await store.getDeliverable(created.id)).toBeNull();
|
|
87
|
+
});
|
|
88
|
+
it('supports Deliverable CRUD in SQLiteStore', async () => {
|
|
89
|
+
const store = new SQLiteStore({ filename: ':memory:' });
|
|
90
|
+
const created = await store.createDeliverable({
|
|
91
|
+
projectId: 'proj_sql',
|
|
92
|
+
title: 'Social Video 9:16',
|
|
93
|
+
format: 'MP4',
|
|
94
|
+
specs: { codec: 'h264', bitrate: '12mbps' },
|
|
95
|
+
outputUrls: ['https://storage.google.com/bucket/output.mp4']
|
|
96
|
+
});
|
|
97
|
+
expect(created.id).toBeDefined();
|
|
98
|
+
expect(created.status).toBe('planned');
|
|
99
|
+
expect(created.specs).toEqual({ codec: 'h264', bitrate: '12mbps' });
|
|
100
|
+
expect(created.outputUrls).toEqual(['https://storage.google.com/bucket/output.mp4']);
|
|
101
|
+
const fetched = await store.getDeliverable(created.id);
|
|
102
|
+
expect(fetched?.title).toBe('Social Video 9:16');
|
|
103
|
+
expect(fetched?.specs).toEqual({ codec: 'h264', bitrate: '12mbps' });
|
|
104
|
+
const list = await store.getDeliverables('proj_sql');
|
|
105
|
+
expect(list).toHaveLength(1);
|
|
106
|
+
const updated = await store.updateDeliverable(created.id, {
|
|
107
|
+
status: 'delivered',
|
|
108
|
+
deliveredAt: '2026-09-04T12:00:00Z'
|
|
109
|
+
});
|
|
110
|
+
expect(updated?.status).toBe('delivered');
|
|
111
|
+
expect(updated?.deliveredAt).toBe('2026-09-04T12:00:00Z');
|
|
112
|
+
const deleted = await store.deleteDeliverable(created.id);
|
|
113
|
+
expect(deleted).toBe(true);
|
|
114
|
+
expect(await store.getDeliverable(created.id)).toBeNull();
|
|
115
|
+
});
|
|
116
|
+
it('supports Deliverable CRUD in FirebaseStore mock', async () => {
|
|
117
|
+
const mockDb = new InMemoryFirestoreMock();
|
|
118
|
+
const store = new FirebaseStore({ db: mockDb });
|
|
119
|
+
const created = await store.createDeliverable({
|
|
120
|
+
projectId: 'proj_fb',
|
|
121
|
+
title: 'Animated Web Banner 300x250',
|
|
122
|
+
format: 'HTML5/Zip'
|
|
123
|
+
});
|
|
124
|
+
expect(created.id).toBeDefined();
|
|
125
|
+
const fetched = await store.getDeliverable(created.id);
|
|
126
|
+
expect(fetched?.title).toBe('Animated Web Banner 300x250');
|
|
127
|
+
const list = await store.getDeliverables('proj_fb');
|
|
128
|
+
expect(list).toHaveLength(1);
|
|
129
|
+
const updated = await store.updateDeliverable(created.id, { status: 'in_progress' });
|
|
130
|
+
expect(updated?.status).toBe('in_progress');
|
|
131
|
+
const deleted = await store.deleteDeliverable(created.id);
|
|
132
|
+
expect(deleted).toBe(true);
|
|
133
|
+
expect(await store.getDeliverable(created.id)).toBeNull();
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
describe('CriticalPathEngine Deliverables & Rollup Metrics', () => {
|
|
137
|
+
it('manages deliverable lifecycle, fires events and computes summary metrics', async () => {
|
|
138
|
+
const engine = new CriticalPathEngine();
|
|
139
|
+
// Setup project with creative workflow
|
|
140
|
+
const project = await engine.createProject({
|
|
141
|
+
name: 'Autumn Ad Campaign'
|
|
142
|
+
});
|
|
143
|
+
await engine.createWorkflow(DEFAULT_CREATIVE_WORKFLOW);
|
|
144
|
+
await engine.updateProject(project.id, { workflowId: DEFAULT_CREATIVE_WORKFLOW.id });
|
|
145
|
+
// Track domain events
|
|
146
|
+
const eventLog = [];
|
|
147
|
+
engine.events.subscribe('*', (evt) => {
|
|
148
|
+
eventLog.push(evt.name);
|
|
149
|
+
});
|
|
150
|
+
// 1. Create Deliverable
|
|
151
|
+
const deliverable = await engine.createDeliverable({
|
|
152
|
+
projectId: project.id,
|
|
153
|
+
title: 'Hero Commercial Cutdown (15s)',
|
|
154
|
+
format: 'ProRes QuickTime',
|
|
155
|
+
dueDate: '2026-10-01'
|
|
156
|
+
});
|
|
157
|
+
expect(deliverable.id).toBeDefined();
|
|
158
|
+
expect(eventLog).toContain('deliverable.created');
|
|
159
|
+
// 2. Create tasks assigned to this deliverable
|
|
160
|
+
const task1 = await engine.createTask({
|
|
161
|
+
projectId: project.id,
|
|
162
|
+
title: 'Storyboard 15s Cut',
|
|
163
|
+
status: 'approved',
|
|
164
|
+
estimatedHours: 8,
|
|
165
|
+
loggedHours: 8,
|
|
166
|
+
progress: 100,
|
|
167
|
+
deliverableId: deliverable.id
|
|
168
|
+
});
|
|
169
|
+
expect(task1.deliverableId).toBe(deliverable.id);
|
|
170
|
+
const task2 = await engine.createTask({
|
|
171
|
+
projectId: project.id,
|
|
172
|
+
title: 'Color Grading 15s Cut',
|
|
173
|
+
status: 'in_production',
|
|
174
|
+
estimatedHours: 12,
|
|
175
|
+
loggedHours: 6,
|
|
176
|
+
progress: 50,
|
|
177
|
+
deliverableId: deliverable.id
|
|
178
|
+
});
|
|
179
|
+
const task3 = await engine.createTask({
|
|
180
|
+
projectId: project.id,
|
|
181
|
+
title: 'Sound Design & Final Mix',
|
|
182
|
+
status: 'briefing',
|
|
183
|
+
estimatedHours: 6,
|
|
184
|
+
loggedHours: 0,
|
|
185
|
+
progress: 0,
|
|
186
|
+
deliverableId: deliverable.id
|
|
187
|
+
});
|
|
188
|
+
// 3. Compute Deliverable Summary / Rollup
|
|
189
|
+
const summary = await engine.getDeliverableSummary(deliverable.id);
|
|
190
|
+
expect(summary).not.toBeNull();
|
|
191
|
+
expect(summary.totalTasks).toBe(3);
|
|
192
|
+
expect(summary.completedTasks).toBe(1); // 'approved' has completionState 'done'
|
|
193
|
+
expect(summary.activeTasks).toBe(1); // 'in_production' has executionState 'active'
|
|
194
|
+
expect(summary.estimatedHours).toBe(26); // 8 + 12 + 6
|
|
195
|
+
expect(summary.loggedHours).toBe(14); // 8 + 6 + 0
|
|
196
|
+
expect(summary.progressPercentage).toBe(50); // (100 + 50 + 0) / 3 = 50%
|
|
197
|
+
// 4. Update Deliverable to delivered
|
|
198
|
+
const updated = await engine.updateDeliverable(deliverable.id, {
|
|
199
|
+
status: 'delivered'
|
|
200
|
+
});
|
|
201
|
+
expect(updated?.status).toBe('delivered');
|
|
202
|
+
expect(updated?.deliveredAt).toBeDefined();
|
|
203
|
+
expect(eventLog).toContain('deliverable.status_changed');
|
|
204
|
+
expect(eventLog).toContain('deliverable.updated');
|
|
205
|
+
// 5. Delete Deliverable
|
|
206
|
+
const deleted = await engine.deleteDeliverable(deliverable.id);
|
|
207
|
+
expect(deleted).toBe(true);
|
|
208
|
+
expect(eventLog).toContain('deliverable.deleted');
|
|
209
|
+
});
|
|
210
|
+
it('seeds deliverables from initialData', async () => {
|
|
211
|
+
const engine = new CriticalPathEngine({
|
|
212
|
+
initialData: {
|
|
213
|
+
projects: [{ id: 'p_init', name: 'Init Proj', key: 'INIT', createdAt: '', updatedAt: '' }],
|
|
214
|
+
deliverables: [
|
|
215
|
+
{
|
|
216
|
+
id: 'deliv_seeded',
|
|
217
|
+
projectId: 'p_init',
|
|
218
|
+
title: 'Seeded Deliverable',
|
|
219
|
+
status: 'planned',
|
|
220
|
+
createdAt: '2026-01-01',
|
|
221
|
+
updatedAt: '2026-01-01'
|
|
222
|
+
}
|
|
223
|
+
]
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
await engine.ready;
|
|
227
|
+
const deliverables = await engine.getDeliverables('p_init');
|
|
228
|
+
expect(deliverables).toHaveLength(1);
|
|
229
|
+
expect(deliverables[0].id).toBe('deliv_seeded');
|
|
230
|
+
});
|
|
231
|
+
});
|
|
232
|
+
//# sourceMappingURL=deliverables.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deliverables.test.js","sourceRoot":"","sources":["../src/deliverables.test.ts"],"names":[],"mapp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EH,MAAM,MAAM,CAAC,KAAK,CAAC;QACnB,MAAM,YAAY,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QAC5D,MAAM,CAAC,YAAY,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QACrC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Task, Project, Workflow, TimeEntry, Priority, TaskStatus, TaskTodoItem, CustomFieldDefinition, CreateTaskInput, CreateProjectInput } from '../types/index.js';
|
|
1
|
+
import type { Task, Project, Workflow, TimeEntry, Priority, TaskStatus, TaskTodoItem, CustomFieldDefinition, CreateTaskInput, CreateProjectInput, Deliverable, DeliverableStatus, CreateDeliverableInput } from '../types/index.js';
|
|
2
2
|
import type { DomainEvent } from './events.js';
|
|
3
3
|
export declare abstract class BaseEntity {
|
|
4
4
|
readonly id: string;
|
|
@@ -25,6 +25,7 @@ export declare class TaskEntity extends BaseEntity {
|
|
|
25
25
|
iterationId?: string;
|
|
26
26
|
teamId?: string;
|
|
27
27
|
containerId?: string;
|
|
28
|
+
deliverableId?: string;
|
|
28
29
|
plannedStartDate?: string;
|
|
29
30
|
actualStartDate?: string;
|
|
30
31
|
actualEndDate?: string;
|
|
@@ -83,6 +84,29 @@ export declare class ProjectEntity extends BaseEntity {
|
|
|
83
84
|
validateCustomFields(values?: Record<string, unknown>): void;
|
|
84
85
|
toPlain(): Project;
|
|
85
86
|
}
|
|
87
|
+
export declare class DeliverableEntity extends BaseEntity {
|
|
88
|
+
projectId: string;
|
|
89
|
+
title: string;
|
|
90
|
+
description?: string;
|
|
91
|
+
status: DeliverableStatus;
|
|
92
|
+
format?: string;
|
|
93
|
+
specs?: Record<string, unknown>;
|
|
94
|
+
leadId?: string;
|
|
95
|
+
reviewerId?: string;
|
|
96
|
+
dueDate?: string;
|
|
97
|
+
deliveredAt?: string;
|
|
98
|
+
outputUrls?: string[];
|
|
99
|
+
customFields?: Record<string, unknown>;
|
|
100
|
+
constructor(data: Deliverable);
|
|
101
|
+
static create(input: CreateDeliverableInput, options?: {
|
|
102
|
+
id?: string;
|
|
103
|
+
customFieldDefs?: CustomFieldDefinition[];
|
|
104
|
+
}): DeliverableEntity;
|
|
105
|
+
transitionTo(newStatus: DeliverableStatus): this;
|
|
106
|
+
addOutputUrl(url: string): this;
|
|
107
|
+
update(updates: Partial<Deliverable>, customFieldDefs?: CustomFieldDefinition[]): this;
|
|
108
|
+
toPlain(): Deliverable;
|
|
109
|
+
}
|
|
86
110
|
export declare class AttachmentValidationError extends Error {
|
|
87
111
|
constructor(message: string);
|
|
88
112
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../src/domain/entities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,qBAAqB,EACrB,eAAe,EACf,kBAAkB,
|
|
1
|
+
{"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../src/domain/entities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,qBAAqB,EACrB,eAAe,EACf,kBAAkB,EAClB,WAAW,EACX,iBAAiB,EACjB,sBAAsB,EACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,WAAW,EASZ,MAAM,aAAa,CAAC;AAMrB,8BAAsB,UAAU;IAC9B,SAAgB,EAAE,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,iBAA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AC;gBAElC,IAAI,EAAE,WAAW;WAgBf,MAAM,CAClB,KAAK,EAAE,sBAAsB,EAC7B,OAAO,CAAC,EAAE;QAAE,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,eAAe,CAAC,EAAE,qBAAqB,EAAE,CAAA;KAAE,GACnE,iBAAiB;IA+Bb,YAAY,CAAC,SAAS,EAAE,iBAAiB,GAAG,IAAI;IA8BhD,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAyB/B,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,EAAE,eAAe,CAAC,EAAE,qBAAqB,EAAE,GAAG,IAAI;IAkCtF,OAAO,IAAI,WAAW;CAmB9B;AAED,qBAAa,yBAA0B,SAAQ,KAAK;gBACtC,OAAO,EAAE,MAAM;CAI5B;AAED,wBAAgB,qBAAqB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CASxD"}
|
package/dist/domain/entities.js
CHANGED
|
@@ -40,6 +40,7 @@ export class TaskEntity extends BaseEntity {
|
|
|
40
40
|
iterationId;
|
|
41
41
|
teamId;
|
|
42
42
|
containerId;
|
|
43
|
+
deliverableId;
|
|
43
44
|
plannedStartDate;
|
|
44
45
|
actualStartDate;
|
|
45
46
|
actualEndDate;
|
|
@@ -71,6 +72,7 @@ export class TaskEntity extends BaseEntity {
|
|
|
71
72
|
this.iterationId = data.iterationId;
|
|
72
73
|
this.teamId = data.teamId;
|
|
73
74
|
this.containerId = data.containerId;
|
|
75
|
+
this.deliverableId = data.deliverableId;
|
|
74
76
|
this.plannedStartDate = data.plannedStartDate;
|
|
75
77
|
this.actualStartDate = data.actualStartDate;
|
|
76
78
|
this.actualEndDate = data.actualEndDate;
|
|
@@ -299,6 +301,7 @@ export class TaskEntity extends BaseEntity {
|
|
|
299
301
|
iterationId: this.iterationId,
|
|
300
302
|
teamId: this.teamId,
|
|
301
303
|
containerId: this.containerId,
|
|
304
|
+
deliverableId: this.deliverableId,
|
|
302
305
|
plannedStartDate: this.plannedStartDate,
|
|
303
306
|
actualStartDate: this.actualStartDate,
|
|
304
307
|
actualEndDate: this.actualEndDate,
|
|
@@ -393,6 +396,156 @@ export class ProjectEntity extends BaseEntity {
|
|
|
393
396
|
};
|
|
394
397
|
}
|
|
395
398
|
}
|
|
399
|
+
export class DeliverableEntity extends BaseEntity {
|
|
400
|
+
projectId;
|
|
401
|
+
title;
|
|
402
|
+
description;
|
|
403
|
+
status;
|
|
404
|
+
format;
|
|
405
|
+
specs;
|
|
406
|
+
leadId;
|
|
407
|
+
reviewerId;
|
|
408
|
+
dueDate;
|
|
409
|
+
deliveredAt;
|
|
410
|
+
outputUrls;
|
|
411
|
+
customFields;
|
|
412
|
+
constructor(data) {
|
|
413
|
+
super(data.id, data.createdAt, data.updatedAt);
|
|
414
|
+
this.projectId = data.projectId;
|
|
415
|
+
this.title = data.title;
|
|
416
|
+
this.description = data.description;
|
|
417
|
+
this.status = data.status;
|
|
418
|
+
this.format = data.format;
|
|
419
|
+
this.specs = data.specs ? { ...data.specs } : undefined;
|
|
420
|
+
this.leadId = data.leadId;
|
|
421
|
+
this.reviewerId = data.reviewerId;
|
|
422
|
+
this.dueDate = data.dueDate;
|
|
423
|
+
this.deliveredAt = data.deliveredAt;
|
|
424
|
+
this.outputUrls = data.outputUrls ? [...data.outputUrls] : [];
|
|
425
|
+
this.customFields = data.customFields ? { ...data.customFields } : {};
|
|
426
|
+
}
|
|
427
|
+
static create(input, options) {
|
|
428
|
+
const id = options?.id || `deliv_${Math.random().toString(36).substring(2, 9)}`;
|
|
429
|
+
const now = new Date().toISOString();
|
|
430
|
+
if (options?.customFieldDefs) {
|
|
431
|
+
validateCustomFieldValues(options.customFieldDefs, input.customFields);
|
|
432
|
+
}
|
|
433
|
+
const deliverable = new DeliverableEntity({
|
|
434
|
+
...input,
|
|
435
|
+
id,
|
|
436
|
+
createdAt: now,
|
|
437
|
+
updatedAt: now,
|
|
438
|
+
status: input.status || 'planned',
|
|
439
|
+
outputUrls: input.outputUrls ?? [],
|
|
440
|
+
customFields: input.customFields ?? {}
|
|
441
|
+
});
|
|
442
|
+
const createdEvent = {
|
|
443
|
+
id: `evt_${Math.random().toString(36).substring(2, 9)}`,
|
|
444
|
+
name: 'deliverable.created',
|
|
445
|
+
aggregateId: deliverable.id,
|
|
446
|
+
aggregateType: 'Deliverable',
|
|
447
|
+
occurredAt: now,
|
|
448
|
+
payload: { deliverable: deliverable.toPlain() }
|
|
449
|
+
};
|
|
450
|
+
deliverable.raiseEvent(createdEvent);
|
|
451
|
+
return deliverable;
|
|
452
|
+
}
|
|
453
|
+
transitionTo(newStatus) {
|
|
454
|
+
if (this.status === newStatus)
|
|
455
|
+
return this;
|
|
456
|
+
const previousStatus = this.status;
|
|
457
|
+
this.status = newStatus;
|
|
458
|
+
const now = new Date().toISOString();
|
|
459
|
+
if (newStatus === 'delivered' && !this.deliveredAt) {
|
|
460
|
+
this.deliveredAt = now;
|
|
461
|
+
}
|
|
462
|
+
this.markUpdated();
|
|
463
|
+
const event = {
|
|
464
|
+
id: `evt_${Math.random().toString(36).substring(2, 9)}`,
|
|
465
|
+
name: 'deliverable.status_changed',
|
|
466
|
+
aggregateId: this.id,
|
|
467
|
+
aggregateType: 'Deliverable',
|
|
468
|
+
occurredAt: now,
|
|
469
|
+
payload: {
|
|
470
|
+
deliverable: this.toPlain(),
|
|
471
|
+
previousStatus,
|
|
472
|
+
newStatus
|
|
473
|
+
}
|
|
474
|
+
};
|
|
475
|
+
this.raiseEvent(event);
|
|
476
|
+
return this;
|
|
477
|
+
}
|
|
478
|
+
addOutputUrl(url) {
|
|
479
|
+
if (!this.outputUrls) {
|
|
480
|
+
this.outputUrls = [];
|
|
481
|
+
}
|
|
482
|
+
if (!this.outputUrls.includes(url)) {
|
|
483
|
+
const previous = this.toPlain();
|
|
484
|
+
this.outputUrls.push(url);
|
|
485
|
+
this.markUpdated();
|
|
486
|
+
const event = {
|
|
487
|
+
id: `evt_${Math.random().toString(36).substring(2, 9)}`,
|
|
488
|
+
name: 'deliverable.updated',
|
|
489
|
+
aggregateId: this.id,
|
|
490
|
+
aggregateType: 'Deliverable',
|
|
491
|
+
occurredAt: new Date().toISOString(),
|
|
492
|
+
payload: {
|
|
493
|
+
deliverable: this.toPlain(),
|
|
494
|
+
previous
|
|
495
|
+
}
|
|
496
|
+
};
|
|
497
|
+
this.raiseEvent(event);
|
|
498
|
+
}
|
|
499
|
+
return this;
|
|
500
|
+
}
|
|
501
|
+
update(updates, customFieldDefs) {
|
|
502
|
+
const previous = this.toPlain();
|
|
503
|
+
if (updates.customFields && customFieldDefs) {
|
|
504
|
+
validateCustomFieldValues(customFieldDefs, {
|
|
505
|
+
...this.customFields,
|
|
506
|
+
...updates.customFields
|
|
507
|
+
});
|
|
508
|
+
}
|
|
509
|
+
if (updates.status && updates.status !== this.status) {
|
|
510
|
+
this.transitionTo(updates.status);
|
|
511
|
+
delete updates.status;
|
|
512
|
+
}
|
|
513
|
+
Object.assign(this, updates);
|
|
514
|
+
this.markUpdated();
|
|
515
|
+
const event = {
|
|
516
|
+
id: `evt_${Math.random().toString(36).substring(2, 9)}`,
|
|
517
|
+
name: 'deliverable.updated',
|
|
518
|
+
aggregateId: this.id,
|
|
519
|
+
aggregateType: 'Deliverable',
|
|
520
|
+
occurredAt: new Date().toISOString(),
|
|
521
|
+
payload: {
|
|
522
|
+
deliverable: this.toPlain(),
|
|
523
|
+
previous
|
|
524
|
+
}
|
|
525
|
+
};
|
|
526
|
+
this.raiseEvent(event);
|
|
527
|
+
return this;
|
|
528
|
+
}
|
|
529
|
+
toPlain() {
|
|
530
|
+
return {
|
|
531
|
+
id: this.id,
|
|
532
|
+
projectId: this.projectId,
|
|
533
|
+
title: this.title,
|
|
534
|
+
description: this.description,
|
|
535
|
+
status: this.status,
|
|
536
|
+
format: this.format,
|
|
537
|
+
specs: this.specs ? { ...this.specs } : undefined,
|
|
538
|
+
leadId: this.leadId,
|
|
539
|
+
reviewerId: this.reviewerId,
|
|
540
|
+
dueDate: this.dueDate,
|
|
541
|
+
deliveredAt: this.deliveredAt,
|
|
542
|
+
outputUrls: this.outputUrls ? [...this.outputUrls] : [],
|
|
543
|
+
customFields: this.customFields ? { ...this.customFields } : {},
|
|
544
|
+
createdAt: this.createdAt,
|
|
545
|
+
updatedAt: this.updatedAt
|
|
546
|
+
};
|
|
547
|
+
}
|
|
548
|
+
}
|
|
396
549
|
export class AttachmentValidationError extends Error {
|
|
397
550
|
constructor(message) {
|
|
398
551
|
super(message);
|