@codingfactory/task-engine-client 0.1.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/README.md +53 -0
- package/dist/components/dashboard/MyStatsWidget.vue.d.ts +10 -0
- package/dist/components/dashboard/MyTasksToday.vue.d.ts +10 -0
- package/dist/components/dashboard/OverdueTracker.vue.d.ts +10 -0
- package/dist/components/dashboard/TaskDashboard.vue.d.ts +20 -0
- package/dist/components/dashboard/TaskHealthAlerts.vue.d.ts +18 -0
- package/dist/components/dashboard/TeamActivityFeed.vue.d.ts +11 -0
- package/dist/components/dashboard/UpcomingThisWeek.vue.d.ts +10 -0
- package/dist/components/dashboard/WidgetGrid.vue.d.ts +25 -0
- package/dist/components/index.d.ts +29 -0
- package/dist/components/list/TaskBoardView.vue.d.ts +21 -0
- package/dist/components/list/TaskBulkActionBar.vue.d.ts +20 -0
- package/dist/components/list/TaskCalendarView.vue.d.ts +11 -0
- package/dist/components/list/TaskFilterBar.vue.d.ts +15 -0
- package/dist/components/list/TaskListView.vue.d.ts +39 -0
- package/dist/components/list/TaskSavedFilterTabs.vue.d.ts +13 -0
- package/dist/components/recurrence/RecurringTemplateForm.vue.d.ts +17 -0
- package/dist/components/recurrence/RecurringTemplateList.vue.d.ts +25 -0
- package/dist/components/shared/TaskEntityWidget.vue.d.ts +20 -0
- package/dist/components/shared/TaskNotificationToast.vue.d.ts +16 -0
- package/dist/components/shared/TaskPriorityIcon.vue.d.ts +7 -0
- package/dist/components/shared/TaskQuickCreate.vue.d.ts +17 -0
- package/dist/components/task/EscalationActions.vue.d.ts +22 -0
- package/dist/components/task/EscalationBadge.vue.d.ts +9 -0
- package/dist/components/task/TaskCard.vue.d.ts +14 -0
- package/dist/components/task/TaskChecklist.vue.d.ts +17 -0
- package/dist/components/task/TaskComments.vue.d.ts +17 -0
- package/dist/components/task/TaskDetail.vue.d.ts +47 -0
- package/dist/components/task/TaskForm.vue.d.ts +21 -0
- package/dist/components/task/TaskStatusBadge.vue.d.ts +6 -0
- package/dist/components/task/TaskTimeline.vue.d.ts +11 -0
- package/dist/composables/index.d.ts +7 -0
- package/dist/composables/useTaskDashboard.d.ts +504 -0
- package/dist/composables/useTaskDetail.d.ts +207 -0
- package/dist/composables/useTaskFilters.d.ts +38 -0
- package/dist/composables/useTaskNotificationFeed.d.ts +47 -0
- package/dist/composables/useTaskPresence.d.ts +22 -0
- package/dist/composables/useTaskSavedFilters.d.ts +47 -0
- package/dist/composables/useTaskWebSocket.d.ts +31 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5163 -0
- package/dist/services/index.d.ts +1 -0
- package/dist/services/taskApi.d.ts +12 -0
- package/dist/stores/index.d.ts +2 -0
- package/dist/stores/taskListStore.d.ts +179 -0
- package/dist/stores/taskStore.d.ts +2294 -0
- package/dist/task-engine-client.css +1 -0
- package/dist/types/index.d.ts +700 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/recurrence.d.ts +25 -0
- package/dist/utils/taskDisplay.d.ts +14 -0
- package/package.json +74 -0
|
@@ -0,0 +1,700 @@
|
|
|
1
|
+
export type TaskStatus = 'draft' | 'open' | 'in_progress' | 'blocked' | 'under_review' | 'complete' | 'cancelled';
|
|
2
|
+
export type TaskPriority = 'none' | 'low' | 'medium' | 'high' | 'urgent' | 'critical';
|
|
3
|
+
export type TaskRelationType = 'blocks' | 'blocked_by' | 'parent_of' | 'subtask_of' | 'related_to';
|
|
4
|
+
export type TaskSource = 'manual' | 'template' | 'recurrence' | 'workflow' | 'ai' | 'ticket' | 'import' | 'email';
|
|
5
|
+
export type TaskListViewMode = 'list' | 'board' | 'calendar';
|
|
6
|
+
export type EscalationTier = 'reminder' | 'warning' | 'due_now' | 'overdue' | 'escalated' | 'critical';
|
|
7
|
+
export type EscalationEventType = 'tier_fired' | 'acknowledged' | 'snoozed' | 'suppressed' | 'resolved' | 'rerouted';
|
|
8
|
+
export interface UserSummary {
|
|
9
|
+
id: string | number;
|
|
10
|
+
name: string;
|
|
11
|
+
avatar_url?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface TaskTag {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
color: string | null;
|
|
17
|
+
created_at?: string;
|
|
18
|
+
updated_at?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface TaskChecklistProgress {
|
|
21
|
+
completed: number;
|
|
22
|
+
total: number;
|
|
23
|
+
}
|
|
24
|
+
export interface TaskChecklistItem {
|
|
25
|
+
id: string;
|
|
26
|
+
task_id?: string;
|
|
27
|
+
title: string;
|
|
28
|
+
is_completed: boolean;
|
|
29
|
+
completed_at: string | null;
|
|
30
|
+
completed_by: UserSummary | null;
|
|
31
|
+
position: number;
|
|
32
|
+
template_item_id?: string | null;
|
|
33
|
+
}
|
|
34
|
+
export interface TaskSummary {
|
|
35
|
+
id: string;
|
|
36
|
+
display_number_formatted: string;
|
|
37
|
+
title: string;
|
|
38
|
+
status: TaskStatus;
|
|
39
|
+
priority: TaskPriority;
|
|
40
|
+
}
|
|
41
|
+
export interface TaskRelation {
|
|
42
|
+
id: string;
|
|
43
|
+
type: TaskRelationType;
|
|
44
|
+
related_task: TaskSummary | null;
|
|
45
|
+
created_at?: string | null;
|
|
46
|
+
}
|
|
47
|
+
export interface TaskComment {
|
|
48
|
+
id: string;
|
|
49
|
+
task_id?: string;
|
|
50
|
+
author: UserSummary;
|
|
51
|
+
content: string;
|
|
52
|
+
visibility: 'team' | 'private';
|
|
53
|
+
metadata?: Record<string, unknown> | null;
|
|
54
|
+
created_at: string;
|
|
55
|
+
updated_at?: string | null;
|
|
56
|
+
}
|
|
57
|
+
export interface TaskCompletionRules {
|
|
58
|
+
checklist_complete?: boolean;
|
|
59
|
+
comment_required?: boolean;
|
|
60
|
+
attachment_required?: boolean;
|
|
61
|
+
subtasks_complete?: boolean;
|
|
62
|
+
custom_field_required?: string[];
|
|
63
|
+
}
|
|
64
|
+
export interface TaskActivityLog {
|
|
65
|
+
id: string;
|
|
66
|
+
task_id?: string;
|
|
67
|
+
user: UserSummary | null;
|
|
68
|
+
action: string;
|
|
69
|
+
description: string | null;
|
|
70
|
+
changes: Record<string, unknown> | null;
|
|
71
|
+
metadata: Record<string, unknown> | null;
|
|
72
|
+
created_at: string | null;
|
|
73
|
+
}
|
|
74
|
+
export interface EscalationPolicyTier {
|
|
75
|
+
name: EscalationTier;
|
|
76
|
+
label: string;
|
|
77
|
+
offset_hours: number;
|
|
78
|
+
visual: string;
|
|
79
|
+
channels: string[];
|
|
80
|
+
target: 'assignee' | 'team_lead' | 'manager' | 'owner';
|
|
81
|
+
cooldown_hours: number;
|
|
82
|
+
color: string;
|
|
83
|
+
}
|
|
84
|
+
export interface EscalationPolicy {
|
|
85
|
+
id: string;
|
|
86
|
+
tenant_id: string;
|
|
87
|
+
profile_key: string | null;
|
|
88
|
+
name: string;
|
|
89
|
+
description: string | null;
|
|
90
|
+
is_default: boolean;
|
|
91
|
+
tiers: EscalationPolicyTier[];
|
|
92
|
+
business_hours_only: boolean;
|
|
93
|
+
quiet_hours_start: string | null;
|
|
94
|
+
quiet_hours_end: string | null;
|
|
95
|
+
timezone: string;
|
|
96
|
+
created_at: string | null;
|
|
97
|
+
updated_at: string | null;
|
|
98
|
+
}
|
|
99
|
+
export interface EscalationEvent {
|
|
100
|
+
id: string;
|
|
101
|
+
tenant_id: string;
|
|
102
|
+
task_id: string;
|
|
103
|
+
policy_id: string | null;
|
|
104
|
+
tier_name: EscalationTier | null;
|
|
105
|
+
tier_label: string | null;
|
|
106
|
+
event_type: EscalationEventType;
|
|
107
|
+
target_user_id: string | null;
|
|
108
|
+
target_role: string | null;
|
|
109
|
+
target_user: UserSummary | null;
|
|
110
|
+
channels_used: string[];
|
|
111
|
+
acknowledged_at: string | null;
|
|
112
|
+
acknowledged_by: string | null;
|
|
113
|
+
acknowledged_by_user: UserSummary | null;
|
|
114
|
+
snoozed_until: string | null;
|
|
115
|
+
snooze_reason: string | null;
|
|
116
|
+
blocker_task_id: string | null;
|
|
117
|
+
blocker_task: TaskSummary | null;
|
|
118
|
+
metadata: Record<string, unknown> | null;
|
|
119
|
+
created_at: string | null;
|
|
120
|
+
}
|
|
121
|
+
export interface Task {
|
|
122
|
+
id: string;
|
|
123
|
+
tenant_id: string;
|
|
124
|
+
display_number: number;
|
|
125
|
+
display_number_formatted: string;
|
|
126
|
+
title: string;
|
|
127
|
+
description: string | null;
|
|
128
|
+
status: TaskStatus;
|
|
129
|
+
priority: TaskPriority;
|
|
130
|
+
taskable_type: string | null;
|
|
131
|
+
taskable_id: string | null;
|
|
132
|
+
created_by: UserSummary | null;
|
|
133
|
+
primary_assignee: UserSummary | null;
|
|
134
|
+
due_at: string | null;
|
|
135
|
+
completed_at: string | null;
|
|
136
|
+
completed_by: UserSummary | null;
|
|
137
|
+
source: TaskSource;
|
|
138
|
+
source_id: string | null;
|
|
139
|
+
template_item_id?: string | null;
|
|
140
|
+
escalation_policy_id: string | null;
|
|
141
|
+
current_escalation_tier: EscalationTier | null;
|
|
142
|
+
current_escalation_label: string | null;
|
|
143
|
+
next_escalation_at: string | null;
|
|
144
|
+
escalation_acknowledged_at: string | null;
|
|
145
|
+
escalation_snoozed_until: string | null;
|
|
146
|
+
comment_count?: number | null;
|
|
147
|
+
checklist_total?: number | null;
|
|
148
|
+
checklist_completed?: number | null;
|
|
149
|
+
blocker_count?: number | null;
|
|
150
|
+
open_blocker_count?: number | null;
|
|
151
|
+
has_unresolved_blockers?: boolean | null;
|
|
152
|
+
subtask_count?: number | null;
|
|
153
|
+
completed_subtask_count?: number | null;
|
|
154
|
+
completion_rules?: TaskCompletionRules | null;
|
|
155
|
+
tags: TaskTag[];
|
|
156
|
+
checklist_progress: TaskChecklistProgress;
|
|
157
|
+
is_overdue: boolean;
|
|
158
|
+
is_complete: boolean;
|
|
159
|
+
progress_percentage: number;
|
|
160
|
+
metadata?: Record<string, unknown> | null;
|
|
161
|
+
created_at: string;
|
|
162
|
+
updated_at: string;
|
|
163
|
+
}
|
|
164
|
+
export interface TaskDetail extends Task {
|
|
165
|
+
comments: TaskComment[];
|
|
166
|
+
checklist_items: TaskChecklistItem[];
|
|
167
|
+
watchers: UserSummary[];
|
|
168
|
+
relations: TaskRelation[];
|
|
169
|
+
activity_logs: TaskActivityLog[];
|
|
170
|
+
escalation_policy: EscalationPolicy | null;
|
|
171
|
+
escalation_events: EscalationEvent[];
|
|
172
|
+
}
|
|
173
|
+
export interface TaskRealtimeTaskSummary {
|
|
174
|
+
id: string;
|
|
175
|
+
display_number: string | number;
|
|
176
|
+
display_number_formatted: string;
|
|
177
|
+
title: string;
|
|
178
|
+
status: TaskStatus;
|
|
179
|
+
priority: TaskPriority;
|
|
180
|
+
assignee_id: string | null;
|
|
181
|
+
taskable_type: string | null;
|
|
182
|
+
taskable_id: string | null;
|
|
183
|
+
created_by: UserSummary | null;
|
|
184
|
+
primary_assignee: UserSummary | null;
|
|
185
|
+
completed_by: UserSummary | null;
|
|
186
|
+
due_at: string | null;
|
|
187
|
+
current_escalation_tier: EscalationTier | null;
|
|
188
|
+
next_escalation_at: string | null;
|
|
189
|
+
escalation_acknowledged_at: string | null;
|
|
190
|
+
escalation_snoozed_until: string | null;
|
|
191
|
+
}
|
|
192
|
+
export interface TaskRealtimeChange {
|
|
193
|
+
old: unknown;
|
|
194
|
+
new: unknown;
|
|
195
|
+
}
|
|
196
|
+
export interface TaskCreatedBroadcastPayload extends TaskRealtimeTaskSummary {
|
|
197
|
+
}
|
|
198
|
+
export interface TaskUpdatedBroadcastPayload {
|
|
199
|
+
task: TaskRealtimeTaskSummary;
|
|
200
|
+
changes: Record<string, TaskRealtimeChange | unknown>;
|
|
201
|
+
}
|
|
202
|
+
export interface TaskStatusChangedBroadcastPayload {
|
|
203
|
+
task: TaskRealtimeTaskSummary;
|
|
204
|
+
old_status: TaskStatus;
|
|
205
|
+
new_status: TaskStatus;
|
|
206
|
+
}
|
|
207
|
+
export interface TaskAssignedBroadcastPayload {
|
|
208
|
+
task: TaskRealtimeTaskSummary;
|
|
209
|
+
new_assignee_id: string | null;
|
|
210
|
+
old_assignee_id: string | null;
|
|
211
|
+
assigned_by: UserSummary | null;
|
|
212
|
+
}
|
|
213
|
+
export interface TaskCompletedBroadcastPayload {
|
|
214
|
+
task: TaskRealtimeTaskSummary;
|
|
215
|
+
completed_by: UserSummary | null;
|
|
216
|
+
}
|
|
217
|
+
export interface TaskCommentBroadcastPayload {
|
|
218
|
+
id: string;
|
|
219
|
+
author: UserSummary | null;
|
|
220
|
+
author_id: string | null;
|
|
221
|
+
visibility: 'team' | 'private';
|
|
222
|
+
preview: string;
|
|
223
|
+
created_at: string | null;
|
|
224
|
+
}
|
|
225
|
+
export interface TaskCommentAddedBroadcastPayload {
|
|
226
|
+
task: TaskRealtimeTaskSummary;
|
|
227
|
+
comment: TaskCommentBroadcastPayload;
|
|
228
|
+
}
|
|
229
|
+
export interface TaskChecklistItemBroadcastPayload {
|
|
230
|
+
id: string;
|
|
231
|
+
title: string;
|
|
232
|
+
is_completed: boolean;
|
|
233
|
+
completed_at: string | null;
|
|
234
|
+
completed_by: UserSummary | null;
|
|
235
|
+
position: number;
|
|
236
|
+
}
|
|
237
|
+
export interface TaskChecklistToggledBroadcastPayload {
|
|
238
|
+
task: TaskRealtimeTaskSummary;
|
|
239
|
+
item: TaskChecklistItemBroadcastPayload;
|
|
240
|
+
progress: TaskChecklistProgress;
|
|
241
|
+
}
|
|
242
|
+
export type TaskRealtimeEventName = 'task.created' | 'task.updated' | 'task.status_changed' | 'task.assigned' | 'task.completed' | 'task.comment_added' | 'task.checklist_toggled';
|
|
243
|
+
export type TaskNotificationToastKind = 'assignment' | 'update' | 'comment' | 'completion' | 'overdue';
|
|
244
|
+
export type TaskNotificationToastTone = 'info' | 'success' | 'warning';
|
|
245
|
+
export interface TaskNotificationToastItem {
|
|
246
|
+
id: string;
|
|
247
|
+
kind: TaskNotificationToastKind;
|
|
248
|
+
title: string;
|
|
249
|
+
body: string;
|
|
250
|
+
taskId: string;
|
|
251
|
+
taskNumber: string;
|
|
252
|
+
tone: TaskNotificationToastTone;
|
|
253
|
+
duration: number;
|
|
254
|
+
url: string | null;
|
|
255
|
+
created_at: string;
|
|
256
|
+
}
|
|
257
|
+
export interface TaskPresenceViewer {
|
|
258
|
+
id: string;
|
|
259
|
+
name: string;
|
|
260
|
+
}
|
|
261
|
+
export interface TaskTemplateItem {
|
|
262
|
+
id: string;
|
|
263
|
+
template_id?: string;
|
|
264
|
+
parent_item_id?: string | null;
|
|
265
|
+
type: 'checklist' | 'subtask';
|
|
266
|
+
title: string;
|
|
267
|
+
description: string | null;
|
|
268
|
+
default_priority: TaskPriority | null;
|
|
269
|
+
due_offset_hours: number | null;
|
|
270
|
+
position: number;
|
|
271
|
+
metadata?: Record<string, unknown> | null;
|
|
272
|
+
children: TaskTemplateItem[];
|
|
273
|
+
}
|
|
274
|
+
export interface TaskTemplate {
|
|
275
|
+
id: string;
|
|
276
|
+
name: string;
|
|
277
|
+
description: string | null;
|
|
278
|
+
default_title: string;
|
|
279
|
+
default_description?: string | null;
|
|
280
|
+
default_priority: TaskPriority;
|
|
281
|
+
default_status?: TaskStatus;
|
|
282
|
+
due_offset_hours: number | null;
|
|
283
|
+
items_count: number;
|
|
284
|
+
items?: TaskTemplateItem[];
|
|
285
|
+
is_active: boolean;
|
|
286
|
+
default_assignee_role?: string | null;
|
|
287
|
+
applicable_types?: string[] | null;
|
|
288
|
+
tags?: string[];
|
|
289
|
+
position?: number;
|
|
290
|
+
metadata?: Record<string, unknown> | null;
|
|
291
|
+
}
|
|
292
|
+
export interface RecurringTemplateLinkedTemplate {
|
|
293
|
+
id: string;
|
|
294
|
+
name: string;
|
|
295
|
+
}
|
|
296
|
+
export interface RecurringTemplateHistoryEntry {
|
|
297
|
+
id: string;
|
|
298
|
+
recurring_template_id: string;
|
|
299
|
+
task_id: string;
|
|
300
|
+
occurrence_date: string;
|
|
301
|
+
generated_at: string;
|
|
302
|
+
created_at: string | null;
|
|
303
|
+
task: TaskSummary | null;
|
|
304
|
+
}
|
|
305
|
+
export interface RecurringTemplate {
|
|
306
|
+
id: string;
|
|
307
|
+
tenant_id: string;
|
|
308
|
+
task_template_id: string | null;
|
|
309
|
+
task_template: RecurringTemplateLinkedTemplate | null;
|
|
310
|
+
title: string | null;
|
|
311
|
+
description: string | null;
|
|
312
|
+
rrule: string;
|
|
313
|
+
rrule_human: string;
|
|
314
|
+
timezone: string;
|
|
315
|
+
taskable_type: string | null;
|
|
316
|
+
taskable_id: string | null;
|
|
317
|
+
primary_assignee_id: string | null;
|
|
318
|
+
priority: TaskPriority;
|
|
319
|
+
priority_label?: string | null;
|
|
320
|
+
due_offset_hours: number | null;
|
|
321
|
+
tags: string[];
|
|
322
|
+
is_active: boolean;
|
|
323
|
+
skip_holidays: boolean;
|
|
324
|
+
business_hours_only: boolean;
|
|
325
|
+
chain_mode: boolean;
|
|
326
|
+
last_generated_at: string | null;
|
|
327
|
+
next_occurrence_at: string | null;
|
|
328
|
+
metadata: Record<string, unknown> | null;
|
|
329
|
+
created_by: string | number | null;
|
|
330
|
+
created_at: string | null;
|
|
331
|
+
updated_at: string | null;
|
|
332
|
+
deleted_at: string | null;
|
|
333
|
+
history: RecurringTemplateHistoryEntry[];
|
|
334
|
+
}
|
|
335
|
+
export interface TaskFilters {
|
|
336
|
+
status?: TaskStatus | TaskStatus[];
|
|
337
|
+
priority?: TaskPriority | TaskPriority[];
|
|
338
|
+
assignee?: string;
|
|
339
|
+
assignee_id?: string;
|
|
340
|
+
created_by?: string;
|
|
341
|
+
watching?: boolean;
|
|
342
|
+
tag?: string;
|
|
343
|
+
overdue?: boolean;
|
|
344
|
+
due_before?: string;
|
|
345
|
+
due_after?: string;
|
|
346
|
+
search?: string;
|
|
347
|
+
taskable_type?: string;
|
|
348
|
+
taskable_id?: string;
|
|
349
|
+
sort?: string;
|
|
350
|
+
page?: number;
|
|
351
|
+
per_page?: number;
|
|
352
|
+
}
|
|
353
|
+
export interface TaskSavedFilter {
|
|
354
|
+
id: string;
|
|
355
|
+
tenant_id: string;
|
|
356
|
+
user_id: string;
|
|
357
|
+
name: string;
|
|
358
|
+
filters: TaskFilters;
|
|
359
|
+
is_default: boolean;
|
|
360
|
+
is_shared: boolean;
|
|
361
|
+
position: number;
|
|
362
|
+
created_at: string | null;
|
|
363
|
+
updated_at: string | null;
|
|
364
|
+
}
|
|
365
|
+
export type TaskDashboardScope = 'personal' | 'team';
|
|
366
|
+
export type TaskDashboardHealthStatus = 'healthy' | 'attention_needed' | 'at_risk' | 'critical';
|
|
367
|
+
export type TaskDashboardWidgetId = 'my-tasks-today' | 'upcoming-this-week' | 'overdue-tracker' | 'team-activity-feed' | 'my-stats' | 'task-health-alerts';
|
|
368
|
+
export interface TaskDashboardWidgetLayout {
|
|
369
|
+
id: TaskDashboardWidgetId | string;
|
|
370
|
+
x: number;
|
|
371
|
+
y: number;
|
|
372
|
+
w: number;
|
|
373
|
+
h: number;
|
|
374
|
+
visible: boolean;
|
|
375
|
+
settings?: Record<string, unknown>;
|
|
376
|
+
}
|
|
377
|
+
export interface TaskDashboardLayout {
|
|
378
|
+
widgets: TaskDashboardWidgetLayout[];
|
|
379
|
+
}
|
|
380
|
+
export interface TaskDashboardConfig {
|
|
381
|
+
id: string;
|
|
382
|
+
tenant_id: string;
|
|
383
|
+
user_id: string;
|
|
384
|
+
layout: TaskDashboardLayout;
|
|
385
|
+
preferences: Record<string, unknown>;
|
|
386
|
+
created_at: string | null;
|
|
387
|
+
updated_at: string | null;
|
|
388
|
+
}
|
|
389
|
+
export interface DashboardTaskItem {
|
|
390
|
+
id: string;
|
|
391
|
+
display_number_formatted: string;
|
|
392
|
+
title: string;
|
|
393
|
+
description: string | null;
|
|
394
|
+
status: TaskStatus;
|
|
395
|
+
priority: TaskPriority;
|
|
396
|
+
due_at: string | null;
|
|
397
|
+
is_overdue: boolean;
|
|
398
|
+
primary_assignee: UserSummary | null;
|
|
399
|
+
created_by: UserSummary | null;
|
|
400
|
+
completed_by: UserSummary | null;
|
|
401
|
+
current_escalation_tier: EscalationTier | null;
|
|
402
|
+
current_escalation_label: string | null;
|
|
403
|
+
comment_count: number;
|
|
404
|
+
checklist_total: number;
|
|
405
|
+
checklist_completed: number;
|
|
406
|
+
subtask_count: number;
|
|
407
|
+
progress_percentage: number;
|
|
408
|
+
created_at: string | null;
|
|
409
|
+
updated_at: string | null;
|
|
410
|
+
}
|
|
411
|
+
export interface TaskDashboardActivityItem {
|
|
412
|
+
id: string;
|
|
413
|
+
action: string;
|
|
414
|
+
description: string | null;
|
|
415
|
+
changes: Record<string, unknown> | null;
|
|
416
|
+
metadata: Record<string, unknown> | null;
|
|
417
|
+
created_at: string | null;
|
|
418
|
+
user: UserSummary | null;
|
|
419
|
+
task: TaskSummary | null;
|
|
420
|
+
}
|
|
421
|
+
export interface TaskDashboardTaskListWidget {
|
|
422
|
+
items: DashboardTaskItem[];
|
|
423
|
+
summary: Record<string, boolean | number | string | null>;
|
|
424
|
+
}
|
|
425
|
+
export interface TaskDashboardUpcomingDay {
|
|
426
|
+
date: string;
|
|
427
|
+
label: string;
|
|
428
|
+
weekday: string;
|
|
429
|
+
is_today: boolean;
|
|
430
|
+
tasks: DashboardTaskItem[];
|
|
431
|
+
}
|
|
432
|
+
export interface TaskDashboardUpcomingWidget {
|
|
433
|
+
days: TaskDashboardUpcomingDay[];
|
|
434
|
+
summary: Record<string, boolean | number | string | null>;
|
|
435
|
+
}
|
|
436
|
+
export interface TaskDashboardHealthIssue {
|
|
437
|
+
type: 'stale' | 'unassigned' | 'blocked_too_long' | 'overdue' | 'orphaned_subtask' | 'no_due_date';
|
|
438
|
+
label: string;
|
|
439
|
+
message: string;
|
|
440
|
+
suggested_actions: string[];
|
|
441
|
+
}
|
|
442
|
+
export interface TaskDashboardHealthAlert {
|
|
443
|
+
task: DashboardTaskItem;
|
|
444
|
+
health_status: TaskDashboardHealthStatus;
|
|
445
|
+
health_score: number;
|
|
446
|
+
issues: TaskDashboardHealthIssue[];
|
|
447
|
+
}
|
|
448
|
+
export interface TaskDashboardHealthWidget {
|
|
449
|
+
items: TaskDashboardHealthAlert[];
|
|
450
|
+
summary: Record<string, boolean | number | string | null>;
|
|
451
|
+
}
|
|
452
|
+
export interface TaskDashboardActivityWidget {
|
|
453
|
+
items: TaskDashboardActivityItem[];
|
|
454
|
+
summary: Record<string, boolean | number | string | null>;
|
|
455
|
+
}
|
|
456
|
+
export type TaskDashboardStatsPeriod = 'week' | 'month';
|
|
457
|
+
export interface TaskDashboardStatsSnapshot {
|
|
458
|
+
tasks_completed: number;
|
|
459
|
+
tasks_created: number;
|
|
460
|
+
on_time_percentage: number;
|
|
461
|
+
avg_cycle_hours: number;
|
|
462
|
+
streak_days?: number;
|
|
463
|
+
}
|
|
464
|
+
export interface TaskDashboardStats {
|
|
465
|
+
period: TaskDashboardStatsPeriod;
|
|
466
|
+
current: TaskDashboardStatsSnapshot;
|
|
467
|
+
previous: TaskDashboardStatsSnapshot;
|
|
468
|
+
trends: Record<'tasks_completed' | 'tasks_created' | 'on_time_percentage' | 'avg_cycle_hours', 'up' | 'down' | 'flat'>;
|
|
469
|
+
}
|
|
470
|
+
export interface TaskDashboardData {
|
|
471
|
+
scope: TaskDashboardScope;
|
|
472
|
+
config: TaskDashboardConfig;
|
|
473
|
+
widgets: {
|
|
474
|
+
my_tasks_today: TaskDashboardTaskListWidget;
|
|
475
|
+
upcoming_this_week: TaskDashboardUpcomingWidget;
|
|
476
|
+
overdue: TaskDashboardTaskListWidget;
|
|
477
|
+
activity: TaskDashboardActivityWidget;
|
|
478
|
+
my_stats: TaskDashboardStats;
|
|
479
|
+
health_alerts: TaskDashboardHealthWidget;
|
|
480
|
+
};
|
|
481
|
+
meta: {
|
|
482
|
+
generated_at: string;
|
|
483
|
+
can_view_analytics: boolean;
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
export interface TaskCompletionRateAnalyticsPoint {
|
|
487
|
+
bucket: string;
|
|
488
|
+
completed: number;
|
|
489
|
+
created: number;
|
|
490
|
+
completion_rate: number;
|
|
491
|
+
}
|
|
492
|
+
export interface TaskCompletionRateAnalytics {
|
|
493
|
+
period: 'daily' | 'weekly' | 'monthly';
|
|
494
|
+
from: string;
|
|
495
|
+
to: string;
|
|
496
|
+
series: TaskCompletionRateAnalyticsPoint[];
|
|
497
|
+
}
|
|
498
|
+
export interface TaskCycleTimeAnalyticsPoint {
|
|
499
|
+
priority: TaskPriority;
|
|
500
|
+
completed_count: number;
|
|
501
|
+
avg_cycle_hours: number;
|
|
502
|
+
}
|
|
503
|
+
export interface TaskCycleTimeAnalytics {
|
|
504
|
+
period: string;
|
|
505
|
+
from: string;
|
|
506
|
+
to: string;
|
|
507
|
+
priorities: TaskCycleTimeAnalyticsPoint[];
|
|
508
|
+
}
|
|
509
|
+
export interface TaskVelocityAnalyticsUser {
|
|
510
|
+
user_id: string;
|
|
511
|
+
user_name: string;
|
|
512
|
+
completed_count: number;
|
|
513
|
+
}
|
|
514
|
+
export interface TaskVelocityAnalytics {
|
|
515
|
+
period: string;
|
|
516
|
+
from: string;
|
|
517
|
+
to: string;
|
|
518
|
+
users: TaskVelocityAnalyticsUser[];
|
|
519
|
+
}
|
|
520
|
+
export interface TaskOverdueRateAnalytics {
|
|
521
|
+
period: string;
|
|
522
|
+
from: string;
|
|
523
|
+
to: string;
|
|
524
|
+
total_tasks: number;
|
|
525
|
+
overdue_tasks: number;
|
|
526
|
+
overdue_rate: number;
|
|
527
|
+
}
|
|
528
|
+
export interface TaskTemplateUsageAnalyticsItem {
|
|
529
|
+
template_id: string;
|
|
530
|
+
template_name: string;
|
|
531
|
+
instantiated_count: number;
|
|
532
|
+
completed_count: number;
|
|
533
|
+
completion_rate: number;
|
|
534
|
+
}
|
|
535
|
+
export interface TaskTemplateUsageAnalytics {
|
|
536
|
+
templates: TaskTemplateUsageAnalyticsItem[];
|
|
537
|
+
}
|
|
538
|
+
export interface TaskAnalyticsQuery {
|
|
539
|
+
period?: 'daily' | 'weekly' | 'monthly' | 'week' | 'month';
|
|
540
|
+
from?: string;
|
|
541
|
+
to?: string;
|
|
542
|
+
}
|
|
543
|
+
export type TaskBulkAction = 'assign' | 'set_status' | 'set_priority' | 'add_tag' | 'remove_tag' | 'complete' | 'cancel' | 'delete';
|
|
544
|
+
export interface TaskBulkActionFailure {
|
|
545
|
+
id: string;
|
|
546
|
+
reason: string;
|
|
547
|
+
}
|
|
548
|
+
export interface TaskBulkActionResult {
|
|
549
|
+
success: string[];
|
|
550
|
+
failed: TaskBulkActionFailure[];
|
|
551
|
+
}
|
|
552
|
+
export interface PaginationMeta {
|
|
553
|
+
current_page: number;
|
|
554
|
+
last_page: number;
|
|
555
|
+
per_page: number;
|
|
556
|
+
total: number;
|
|
557
|
+
}
|
|
558
|
+
export interface PaginatedResponse<T> {
|
|
559
|
+
data: T[];
|
|
560
|
+
meta: PaginationMeta;
|
|
561
|
+
}
|
|
562
|
+
export interface EntityTaskSummary {
|
|
563
|
+
total: number;
|
|
564
|
+
open: number;
|
|
565
|
+
overdue: number;
|
|
566
|
+
completed: number;
|
|
567
|
+
recent_tasks: TaskSummary[];
|
|
568
|
+
}
|
|
569
|
+
export interface TaskMutationPayload {
|
|
570
|
+
title: string;
|
|
571
|
+
description?: string | null;
|
|
572
|
+
status?: TaskStatus;
|
|
573
|
+
priority?: TaskPriority;
|
|
574
|
+
taskable_type?: string | null;
|
|
575
|
+
taskable_id?: string | null;
|
|
576
|
+
primary_assignee_id?: string | null;
|
|
577
|
+
due_at?: string | null;
|
|
578
|
+
source?: TaskSource;
|
|
579
|
+
source_id?: string | null;
|
|
580
|
+
tags?: string[];
|
|
581
|
+
watcher_ids?: string[];
|
|
582
|
+
checklist_items?: Array<Pick<TaskChecklistItem, 'title' | 'position'>>;
|
|
583
|
+
metadata?: Record<string, unknown> | null;
|
|
584
|
+
completion_rules?: TaskCompletionRules | null;
|
|
585
|
+
}
|
|
586
|
+
export interface TaskUpdatePayload extends Partial<TaskMutationPayload> {
|
|
587
|
+
}
|
|
588
|
+
export interface TaskCommentPayload {
|
|
589
|
+
content: string;
|
|
590
|
+
visibility?: 'team' | 'private';
|
|
591
|
+
}
|
|
592
|
+
export interface TaskEscalationSnoozePayload {
|
|
593
|
+
hours: number;
|
|
594
|
+
reason: string;
|
|
595
|
+
}
|
|
596
|
+
export interface TemplateInstantiationPayload {
|
|
597
|
+
taskable_type?: string | null;
|
|
598
|
+
taskable_id?: string | null;
|
|
599
|
+
primary_assignee_id?: string | null;
|
|
600
|
+
due_at?: string | null;
|
|
601
|
+
title_override?: string | null;
|
|
602
|
+
title_placeholders?: Record<string, string> | null;
|
|
603
|
+
idempotency_key?: string | null;
|
|
604
|
+
metadata?: Record<string, unknown> | null;
|
|
605
|
+
}
|
|
606
|
+
export interface RecurringTemplateFilters {
|
|
607
|
+
search?: string;
|
|
608
|
+
include_inactive?: boolean;
|
|
609
|
+
page?: number;
|
|
610
|
+
per_page?: number;
|
|
611
|
+
}
|
|
612
|
+
export interface RecurringTemplateMutationPayload {
|
|
613
|
+
task_template_id?: string | null;
|
|
614
|
+
title?: string | null;
|
|
615
|
+
description?: string | null;
|
|
616
|
+
rrule: string;
|
|
617
|
+
timezone?: string | null;
|
|
618
|
+
taskable_type?: string | null;
|
|
619
|
+
taskable_id?: string | null;
|
|
620
|
+
primary_assignee_id?: string | null;
|
|
621
|
+
priority?: TaskPriority | null;
|
|
622
|
+
due_offset_hours?: number | null;
|
|
623
|
+
tags?: string[];
|
|
624
|
+
is_active?: boolean;
|
|
625
|
+
skip_holidays?: boolean;
|
|
626
|
+
business_hours_only?: boolean;
|
|
627
|
+
chain_mode?: boolean;
|
|
628
|
+
metadata?: Record<string, unknown> | null;
|
|
629
|
+
}
|
|
630
|
+
export interface RecurringTemplateUpdatePayload extends Partial<RecurringTemplateMutationPayload> {
|
|
631
|
+
}
|
|
632
|
+
export interface TaskApiClient {
|
|
633
|
+
list(filters?: TaskFilters): Promise<PaginatedResponse<Task>>;
|
|
634
|
+
get(id: string): Promise<TaskDetail>;
|
|
635
|
+
create(data: TaskMutationPayload): Promise<TaskDetail>;
|
|
636
|
+
update(id: string, data: TaskUpdatePayload): Promise<TaskDetail>;
|
|
637
|
+
delete(id: string): Promise<void>;
|
|
638
|
+
complete(id: string, note?: string): Promise<TaskDetail>;
|
|
639
|
+
reopen(id: string): Promise<TaskDetail>;
|
|
640
|
+
cancel(id: string): Promise<TaskDetail>;
|
|
641
|
+
assign(id: string, userId: string): Promise<TaskDetail>;
|
|
642
|
+
reassign(id: string, userId: string): Promise<TaskDetail>;
|
|
643
|
+
addWatcher(id: string, userId: string): Promise<TaskDetail>;
|
|
644
|
+
removeWatcher(id: string, userId: string): Promise<TaskDetail>;
|
|
645
|
+
listComments(taskId: string): Promise<TaskComment[]>;
|
|
646
|
+
addComment(taskId: string, data: TaskCommentPayload): Promise<TaskComment>;
|
|
647
|
+
acknowledgeEscalation(taskId: string): Promise<TaskDetail>;
|
|
648
|
+
snoozeEscalation(taskId: string, data: TaskEscalationSnoozePayload): Promise<TaskDetail>;
|
|
649
|
+
escalationHistory(taskId: string, params?: {
|
|
650
|
+
page?: number;
|
|
651
|
+
per_page?: number;
|
|
652
|
+
}): Promise<PaginatedResponse<EscalationEvent>>;
|
|
653
|
+
addChecklistItem(taskId: string, title: string): Promise<TaskChecklistItem>;
|
|
654
|
+
toggleChecklistItem(taskId: string, itemId: string): Promise<TaskChecklistItem>;
|
|
655
|
+
removeChecklistItem(taskId: string, itemId: string): Promise<void>;
|
|
656
|
+
listRelations(taskId: string): Promise<TaskRelation[]>;
|
|
657
|
+
addRelation(taskId: string, data: {
|
|
658
|
+
target_task_id: string;
|
|
659
|
+
type: TaskRelationType;
|
|
660
|
+
}): Promise<TaskRelation>;
|
|
661
|
+
listTags(): Promise<TaskTag[]>;
|
|
662
|
+
addTagToTask(taskId: string, tagId: string): Promise<TaskDetail>;
|
|
663
|
+
listSavedFilters(): Promise<TaskSavedFilter[]>;
|
|
664
|
+
createSavedFilter(data: Omit<TaskSavedFilter, 'id' | 'tenant_id' | 'user_id' | 'created_at' | 'updated_at'>): Promise<TaskSavedFilter>;
|
|
665
|
+
updateSavedFilter(id: string, data: Partial<Omit<TaskSavedFilter, 'id' | 'tenant_id' | 'user_id' | 'created_at' | 'updated_at'>>): Promise<TaskSavedFilter>;
|
|
666
|
+
deleteSavedFilter(id: string): Promise<void>;
|
|
667
|
+
bulkAction(taskIds: string[], action: TaskBulkAction, params?: Record<string, unknown>): Promise<TaskBulkActionResult>;
|
|
668
|
+
listTemplates(params?: {
|
|
669
|
+
applicable_type?: string;
|
|
670
|
+
}): Promise<PaginatedResponse<TaskTemplate>>;
|
|
671
|
+
instantiateTemplate(templateId: string, data: TemplateInstantiationPayload): Promise<TaskDetail>;
|
|
672
|
+
listRecurring(params?: RecurringTemplateFilters): Promise<PaginatedResponse<RecurringTemplate>>;
|
|
673
|
+
getRecurring(id: string): Promise<RecurringTemplate>;
|
|
674
|
+
createRecurring(data: RecurringTemplateMutationPayload): Promise<RecurringTemplate>;
|
|
675
|
+
updateRecurring(id: string, data: RecurringTemplateUpdatePayload): Promise<RecurringTemplate>;
|
|
676
|
+
deleteRecurring(id: string): Promise<void>;
|
|
677
|
+
pauseRecurring(id: string): Promise<RecurringTemplate>;
|
|
678
|
+
resumeRecurring(id: string): Promise<RecurringTemplate>;
|
|
679
|
+
recurringHistory(id: string, params?: Pick<RecurringTemplateFilters, 'page' | 'per_page'>): Promise<PaginatedResponse<RecurringTemplateHistoryEntry>>;
|
|
680
|
+
generateRecurring(id: string): Promise<TaskDetail>;
|
|
681
|
+
entityTasks(type: string, id: string, filters?: TaskFilters): Promise<PaginatedResponse<Task>>;
|
|
682
|
+
entitySummary(type: string, id: string): Promise<EntityTaskSummary>;
|
|
683
|
+
getDashboard(period?: TaskDashboardStatsPeriod): Promise<TaskDashboardData>;
|
|
684
|
+
getDashboardConfig(): Promise<TaskDashboardConfig>;
|
|
685
|
+
updateDashboardConfig(data: {
|
|
686
|
+
layout: TaskDashboardLayout;
|
|
687
|
+
preferences?: Record<string, unknown>;
|
|
688
|
+
}): Promise<TaskDashboardConfig>;
|
|
689
|
+
getDashboardMyTasksToday(): Promise<TaskDashboardTaskListWidget>;
|
|
690
|
+
getDashboardUpcoming(): Promise<TaskDashboardUpcomingWidget>;
|
|
691
|
+
getDashboardOverdue(): Promise<TaskDashboardTaskListWidget>;
|
|
692
|
+
getDashboardActivity(): Promise<TaskDashboardActivityWidget>;
|
|
693
|
+
getDashboardStats(period?: TaskDashboardStatsPeriod): Promise<TaskDashboardStats>;
|
|
694
|
+
getDashboardHealthAlerts(): Promise<TaskDashboardHealthWidget>;
|
|
695
|
+
getAnalyticsCompletionRate(params?: TaskAnalyticsQuery): Promise<TaskCompletionRateAnalytics>;
|
|
696
|
+
getAnalyticsCycleTime(params?: Pick<TaskAnalyticsQuery, 'period'>): Promise<TaskCycleTimeAnalytics>;
|
|
697
|
+
getAnalyticsVelocity(params?: Pick<TaskAnalyticsQuery, 'period'>): Promise<TaskVelocityAnalytics>;
|
|
698
|
+
getAnalyticsOverdueRate(params?: Pick<TaskAnalyticsQuery, 'period'>): Promise<TaskOverdueRateAnalytics>;
|
|
699
|
+
getAnalyticsTemplateUsage(): Promise<TaskTemplateUsageAnalytics>;
|
|
700
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { escalationTierLabel, activityLabel, canTaskMoveToStatus, canTransitionTaskStatus, formatTaskDate, formatTaskDateTime, formatRelativeTime, taskPriorityColor, taskPriorityClass, taskPriorityLabel, taskPrioritySymbol, taskStatusClass, taskStatusLabel, } from './taskDisplay';
|
|
2
|
+
export { buildDailyRRule, buildMonthlyByDayOfMonthRRule, buildMonthlyByWeekdayRRule, buildWeeklyRRule, COMMON_TIMEZONES, describeRRule, parseRRule, WEEKDAY_OPTIONS, } from './recurrence';
|
|
3
|
+
export type { MonthlyRecurrenceMode, ParsedRRule, RecurrenceBuilderMode, WeekdayCode, } from './recurrence';
|