@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.
Files changed (53) hide show
  1. package/README.md +53 -0
  2. package/dist/components/dashboard/MyStatsWidget.vue.d.ts +10 -0
  3. package/dist/components/dashboard/MyTasksToday.vue.d.ts +10 -0
  4. package/dist/components/dashboard/OverdueTracker.vue.d.ts +10 -0
  5. package/dist/components/dashboard/TaskDashboard.vue.d.ts +20 -0
  6. package/dist/components/dashboard/TaskHealthAlerts.vue.d.ts +18 -0
  7. package/dist/components/dashboard/TeamActivityFeed.vue.d.ts +11 -0
  8. package/dist/components/dashboard/UpcomingThisWeek.vue.d.ts +10 -0
  9. package/dist/components/dashboard/WidgetGrid.vue.d.ts +25 -0
  10. package/dist/components/index.d.ts +29 -0
  11. package/dist/components/list/TaskBoardView.vue.d.ts +21 -0
  12. package/dist/components/list/TaskBulkActionBar.vue.d.ts +20 -0
  13. package/dist/components/list/TaskCalendarView.vue.d.ts +11 -0
  14. package/dist/components/list/TaskFilterBar.vue.d.ts +15 -0
  15. package/dist/components/list/TaskListView.vue.d.ts +39 -0
  16. package/dist/components/list/TaskSavedFilterTabs.vue.d.ts +13 -0
  17. package/dist/components/recurrence/RecurringTemplateForm.vue.d.ts +17 -0
  18. package/dist/components/recurrence/RecurringTemplateList.vue.d.ts +25 -0
  19. package/dist/components/shared/TaskEntityWidget.vue.d.ts +20 -0
  20. package/dist/components/shared/TaskNotificationToast.vue.d.ts +16 -0
  21. package/dist/components/shared/TaskPriorityIcon.vue.d.ts +7 -0
  22. package/dist/components/shared/TaskQuickCreate.vue.d.ts +17 -0
  23. package/dist/components/task/EscalationActions.vue.d.ts +22 -0
  24. package/dist/components/task/EscalationBadge.vue.d.ts +9 -0
  25. package/dist/components/task/TaskCard.vue.d.ts +14 -0
  26. package/dist/components/task/TaskChecklist.vue.d.ts +17 -0
  27. package/dist/components/task/TaskComments.vue.d.ts +17 -0
  28. package/dist/components/task/TaskDetail.vue.d.ts +47 -0
  29. package/dist/components/task/TaskForm.vue.d.ts +21 -0
  30. package/dist/components/task/TaskStatusBadge.vue.d.ts +6 -0
  31. package/dist/components/task/TaskTimeline.vue.d.ts +11 -0
  32. package/dist/composables/index.d.ts +7 -0
  33. package/dist/composables/useTaskDashboard.d.ts +504 -0
  34. package/dist/composables/useTaskDetail.d.ts +207 -0
  35. package/dist/composables/useTaskFilters.d.ts +38 -0
  36. package/dist/composables/useTaskNotificationFeed.d.ts +47 -0
  37. package/dist/composables/useTaskPresence.d.ts +22 -0
  38. package/dist/composables/useTaskSavedFilters.d.ts +47 -0
  39. package/dist/composables/useTaskWebSocket.d.ts +31 -0
  40. package/dist/index.cjs +1 -0
  41. package/dist/index.d.ts +5 -0
  42. package/dist/index.js +5163 -0
  43. package/dist/services/index.d.ts +1 -0
  44. package/dist/services/taskApi.d.ts +12 -0
  45. package/dist/stores/index.d.ts +2 -0
  46. package/dist/stores/taskListStore.d.ts +179 -0
  47. package/dist/stores/taskStore.d.ts +2294 -0
  48. package/dist/task-engine-client.css +1 -0
  49. package/dist/types/index.d.ts +700 -0
  50. package/dist/utils/index.d.ts +3 -0
  51. package/dist/utils/recurrence.d.ts +25 -0
  52. package/dist/utils/taskDisplay.d.ts +14 -0
  53. package/package.json +74 -0
@@ -0,0 +1,207 @@
1
+ import { type MaybeRefOrGetter } from 'vue';
2
+ import type { TaskCommentPayload, TaskDetail, TaskEscalationSnoozePayload } from '@/types';
3
+ export declare function useTaskDetail(taskId?: MaybeRefOrGetter<string | null | undefined>): {
4
+ task: import("vue").ComputedRef<{
5
+ comments: {
6
+ id: string;
7
+ task_id?: string;
8
+ author: {
9
+ id: string | number;
10
+ name: string;
11
+ avatar_url?: string;
12
+ };
13
+ content: string;
14
+ visibility: "team" | "private";
15
+ metadata?: Record<string, unknown> | null;
16
+ created_at: string;
17
+ updated_at?: string | null;
18
+ }[];
19
+ checklist_items: {
20
+ id: string;
21
+ task_id?: string;
22
+ title: string;
23
+ is_completed: boolean;
24
+ completed_at: string | null;
25
+ completed_by: {
26
+ id: string | number;
27
+ name: string;
28
+ avatar_url?: string;
29
+ } | null;
30
+ position: number;
31
+ template_item_id?: string | null;
32
+ }[];
33
+ watchers: {
34
+ id: string | number;
35
+ name: string;
36
+ avatar_url?: string;
37
+ }[];
38
+ relations: {
39
+ id: string;
40
+ type: import("@/types").TaskRelationType;
41
+ related_task: {
42
+ id: string;
43
+ display_number_formatted: string;
44
+ title: string;
45
+ status: import("@/types").TaskStatus;
46
+ priority: import("@/types").TaskPriority;
47
+ } | null;
48
+ created_at?: string | null;
49
+ }[];
50
+ activity_logs: {
51
+ id: string;
52
+ task_id?: string;
53
+ user: {
54
+ id: string | number;
55
+ name: string;
56
+ avatar_url?: string;
57
+ } | null;
58
+ action: string;
59
+ description: string | null;
60
+ changes: Record<string, unknown> | null;
61
+ metadata: Record<string, unknown> | null;
62
+ created_at: string | null;
63
+ }[];
64
+ escalation_policy: {
65
+ id: string;
66
+ tenant_id: string;
67
+ profile_key: string | null;
68
+ name: string;
69
+ description: string | null;
70
+ is_default: boolean;
71
+ tiers: {
72
+ name: import("@/types").EscalationTier;
73
+ label: string;
74
+ offset_hours: number;
75
+ visual: string;
76
+ channels: string[];
77
+ target: "assignee" | "team_lead" | "manager" | "owner";
78
+ cooldown_hours: number;
79
+ color: string;
80
+ }[];
81
+ business_hours_only: boolean;
82
+ quiet_hours_start: string | null;
83
+ quiet_hours_end: string | null;
84
+ timezone: string;
85
+ created_at: string | null;
86
+ updated_at: string | null;
87
+ } | null;
88
+ escalation_events: {
89
+ id: string;
90
+ tenant_id: string;
91
+ task_id: string;
92
+ policy_id: string | null;
93
+ tier_name: import("@/types").EscalationTier | null;
94
+ tier_label: string | null;
95
+ event_type: import("@/types").EscalationEventType;
96
+ target_user_id: string | null;
97
+ target_role: string | null;
98
+ target_user: {
99
+ id: string | number;
100
+ name: string;
101
+ avatar_url?: string;
102
+ } | null;
103
+ channels_used: string[];
104
+ acknowledged_at: string | null;
105
+ acknowledged_by: string | null;
106
+ acknowledged_by_user: {
107
+ id: string | number;
108
+ name: string;
109
+ avatar_url?: string;
110
+ } | null;
111
+ snoozed_until: string | null;
112
+ snooze_reason: string | null;
113
+ blocker_task_id: string | null;
114
+ blocker_task: {
115
+ id: string;
116
+ display_number_formatted: string;
117
+ title: string;
118
+ status: import("@/types").TaskStatus;
119
+ priority: import("@/types").TaskPriority;
120
+ } | null;
121
+ metadata: Record<string, unknown> | null;
122
+ created_at: string | null;
123
+ }[];
124
+ id: string;
125
+ tenant_id: string;
126
+ display_number: number;
127
+ display_number_formatted: string;
128
+ title: string;
129
+ description: string | null;
130
+ status: import("@/types").TaskStatus;
131
+ priority: import("@/types").TaskPriority;
132
+ taskable_type: string | null;
133
+ taskable_id: string | null;
134
+ created_by: {
135
+ id: string | number;
136
+ name: string;
137
+ avatar_url?: string;
138
+ } | null;
139
+ primary_assignee: {
140
+ id: string | number;
141
+ name: string;
142
+ avatar_url?: string;
143
+ } | null;
144
+ due_at: string | null;
145
+ completed_at: string | null;
146
+ completed_by: {
147
+ id: string | number;
148
+ name: string;
149
+ avatar_url?: string;
150
+ } | null;
151
+ source: import("@/types").TaskSource;
152
+ source_id: string | null;
153
+ template_item_id?: string | null;
154
+ escalation_policy_id: string | null;
155
+ current_escalation_tier: import("@/types").EscalationTier | null;
156
+ current_escalation_label: string | null;
157
+ next_escalation_at: string | null;
158
+ escalation_acknowledged_at: string | null;
159
+ escalation_snoozed_until: string | null;
160
+ comment_count?: number | null;
161
+ checklist_total?: number | null;
162
+ checklist_completed?: number | null;
163
+ blocker_count?: number | null;
164
+ open_blocker_count?: number | null;
165
+ has_unresolved_blockers?: boolean | null;
166
+ subtask_count?: number | null;
167
+ completed_subtask_count?: number | null;
168
+ completion_rules?: {
169
+ checklist_complete?: boolean;
170
+ comment_required?: boolean;
171
+ attachment_required?: boolean;
172
+ subtasks_complete?: boolean;
173
+ custom_field_required?: string[];
174
+ } | null;
175
+ tags: {
176
+ id: string;
177
+ name: string;
178
+ color: string | null;
179
+ created_at?: string;
180
+ updated_at?: string;
181
+ }[];
182
+ checklist_progress: {
183
+ completed: number;
184
+ total: number;
185
+ };
186
+ is_overdue: boolean;
187
+ is_complete: boolean;
188
+ progress_percentage: number;
189
+ metadata?: Record<string, unknown> | null;
190
+ created_at: string;
191
+ updated_at: string;
192
+ } | null>;
193
+ loading: import("vue").ComputedRef<boolean>;
194
+ error: import("vue").ComputedRef<string | null>;
195
+ loadTask: (id?: string | null) => Promise<TaskDetail | null>;
196
+ addComment: (payload: TaskCommentPayload) => Promise<TaskDetail | null>;
197
+ acknowledgeEscalation: () => Promise<TaskDetail | null>;
198
+ snoozeEscalation: (payload: TaskEscalationSnoozePayload) => Promise<TaskDetail | null>;
199
+ addChecklistItem: (title: string) => Promise<TaskDetail | null>;
200
+ toggleChecklistItem: (itemId: string) => Promise<TaskDetail | null>;
201
+ removeChecklistItem: (itemId: string) => Promise<TaskDetail | null>;
202
+ completeTask: (id: string, note?: string) => Promise<TaskDetail>;
203
+ reopenTask: (id: string) => Promise<TaskDetail>;
204
+ cancelTask: (id: string) => Promise<TaskDetail>;
205
+ updateTask: (id: string, payload: import("@/types").TaskUpdatePayload) => Promise<TaskDetail>;
206
+ deleteTask: (id: string) => Promise<void>;
207
+ };
@@ -0,0 +1,38 @@
1
+ import type { TaskFilters } from '@/types';
2
+ export declare function useTaskFilters(): {
3
+ filters: import("vue").ComputedRef<{
4
+ status?: import("@/types").TaskStatus | import("@/types").TaskStatus[];
5
+ priority?: import("@/types").TaskPriority | import("@/types").TaskPriority[];
6
+ assignee?: string;
7
+ assignee_id?: string;
8
+ created_by?: string;
9
+ watching?: boolean;
10
+ tag?: string;
11
+ overdue?: boolean;
12
+ due_before?: string;
13
+ due_after?: string;
14
+ search?: string;
15
+ taskable_type?: string;
16
+ taskable_id?: string;
17
+ sort?: string;
18
+ page?: number;
19
+ per_page?: number;
20
+ }>;
21
+ pagination: import("vue").ComputedRef<{
22
+ current_page: number;
23
+ last_page: number;
24
+ per_page: number;
25
+ total: number;
26
+ }>;
27
+ view: import("vue").ComputedRef<import("@/types").TaskListViewMode>;
28
+ activeSavedFilterId: import("vue").ComputedRef<string | null>;
29
+ activeFilterCount: import("vue").ComputedRef<number>;
30
+ setFilter: <K extends keyof TaskFilters>(key: K, value: TaskFilters[K]) => void;
31
+ setFilters: (value: Partial<TaskFilters>) => void;
32
+ setSort: (sort: string) => void;
33
+ setView: (value: import("@/types").TaskListViewMode) => void;
34
+ setActiveSavedFilter: (id: string | null) => void;
35
+ clearFilters: () => void;
36
+ nextPage: () => void;
37
+ previousPage: () => void;
38
+ };
@@ -0,0 +1,47 @@
1
+ import type { TaskNotificationToastItem, TaskNotificationToastKind, TaskNotificationToastTone } from '@/types';
2
+ export interface PushTaskNotificationToastInput {
3
+ id?: string;
4
+ kind: TaskNotificationToastKind;
5
+ title: string;
6
+ body: string;
7
+ taskId: string;
8
+ taskNumber: string;
9
+ tone?: TaskNotificationToastTone;
10
+ duration?: number;
11
+ url?: string | null;
12
+ created_at?: string;
13
+ }
14
+ declare function dismissTaskNotificationToast(id: string): void;
15
+ declare function pushTaskNotificationToast(input: PushTaskNotificationToastInput): TaskNotificationToastItem;
16
+ declare function clearTaskNotificationFeed(): void;
17
+ export declare function resetTaskNotificationFeed(): void;
18
+ export declare function useTaskNotificationFeed(): {
19
+ notifications: Readonly<import("vue").Ref<readonly {
20
+ readonly id: string;
21
+ readonly kind: TaskNotificationToastKind;
22
+ readonly title: string;
23
+ readonly body: string;
24
+ readonly taskId: string;
25
+ readonly taskNumber: string;
26
+ readonly tone: TaskNotificationToastTone;
27
+ readonly duration: number;
28
+ readonly url: string | null;
29
+ readonly created_at: string;
30
+ }[], readonly {
31
+ readonly id: string;
32
+ readonly kind: TaskNotificationToastKind;
33
+ readonly title: string;
34
+ readonly body: string;
35
+ readonly taskId: string;
36
+ readonly taskNumber: string;
37
+ readonly tone: TaskNotificationToastTone;
38
+ readonly duration: number;
39
+ readonly url: string | null;
40
+ readonly created_at: string;
41
+ }[]>>;
42
+ hasNotifications: import("vue").ComputedRef<boolean>;
43
+ pushTaskNotificationToast: typeof pushTaskNotificationToast;
44
+ dismissTaskNotificationToast: typeof dismissTaskNotificationToast;
45
+ clearTaskNotificationFeed: typeof clearTaskNotificationFeed;
46
+ };
47
+ export {};
@@ -0,0 +1,22 @@
1
+ import { type ComputedRef, type MaybeRefOrGetter, type Ref } from 'vue';
2
+ import type { TaskPresenceViewer } from '@/types';
3
+ export interface TaskPresenceChannelLike {
4
+ here: (callback: (users: unknown[]) => void) => TaskPresenceChannelLike;
5
+ joining: (callback: (user: unknown) => void) => TaskPresenceChannelLike;
6
+ leaving: (callback: (user: unknown) => void) => TaskPresenceChannelLike;
7
+ }
8
+ export interface TaskPresenceEchoLike {
9
+ join: (channel: string) => TaskPresenceChannelLike;
10
+ leave: (channel: string) => void;
11
+ }
12
+ export interface UseTaskPresenceOptions {
13
+ echo?: TaskPresenceEchoLike | (() => TaskPresenceEchoLike | null | undefined) | null;
14
+ autoConnect?: boolean;
15
+ }
16
+ export interface UseTaskPresenceReturn {
17
+ viewers: Ref<TaskPresenceViewer[]>;
18
+ isConnected: ComputedRef<boolean>;
19
+ connect: () => void;
20
+ disconnect: () => void;
21
+ }
22
+ export declare function useTaskPresence(taskId: MaybeRefOrGetter<string | number | null | undefined>, options?: UseTaskPresenceOptions): UseTaskPresenceReturn;
@@ -0,0 +1,47 @@
1
+ import type { TaskFilters, TaskSavedFilter } from '@/types';
2
+ interface SaveCurrentFilterOptions {
3
+ name: string;
4
+ is_default?: boolean;
5
+ is_shared?: boolean;
6
+ position?: number;
7
+ }
8
+ export declare function useTaskSavedFilters(): {
9
+ savedFilters: import("vue").ComputedRef<{
10
+ id: string;
11
+ tenant_id: string;
12
+ user_id: string;
13
+ name: string;
14
+ filters: {
15
+ status?: import("@/types").TaskStatus | import("@/types").TaskStatus[];
16
+ priority?: import("@/types").TaskPriority | import("@/types").TaskPriority[];
17
+ assignee?: string;
18
+ assignee_id?: string;
19
+ created_by?: string;
20
+ watching?: boolean;
21
+ tag?: string;
22
+ overdue?: boolean;
23
+ due_before?: string;
24
+ due_after?: string;
25
+ search?: string;
26
+ taskable_type?: string;
27
+ taskable_id?: string;
28
+ sort?: string;
29
+ page?: number;
30
+ per_page?: number;
31
+ };
32
+ is_default: boolean;
33
+ is_shared: boolean;
34
+ position: number;
35
+ created_at: string | null;
36
+ updated_at: string | null;
37
+ }[]>;
38
+ loading: import("vue").ComputedRef<boolean>;
39
+ error: import("vue").ComputedRef<string | null>;
40
+ activeSavedFilterId: import("vue").ComputedRef<string | null>;
41
+ loadSavedFilters: () => Promise<TaskSavedFilter[]>;
42
+ applySavedFilter: (filter: TaskSavedFilter) => TaskFilters;
43
+ saveCurrentFilter: (options: SaveCurrentFilterOptions) => Promise<TaskSavedFilter>;
44
+ updateSavedFilter: (id: string, data: Partial<Omit<TaskSavedFilter, "id" | "tenant_id" | "user_id" | "created_at" | "updated_at">>) => Promise<TaskSavedFilter>;
45
+ deleteSavedFilter: (id: string) => Promise<void>;
46
+ };
47
+ export {};
@@ -0,0 +1,31 @@
1
+ import { type ComputedRef, type MaybeRefOrGetter, type Ref } from 'vue';
2
+ import type { TaskAssignedBroadcastPayload, TaskChecklistToggledBroadcastPayload, TaskCommentAddedBroadcastPayload, TaskCompletedBroadcastPayload, TaskCreatedBroadcastPayload, TaskNotificationToastItem, TaskRealtimeEventName, TaskStatusChangedBroadcastPayload, TaskUpdatedBroadcastPayload } from '@/types';
3
+ export interface TaskEchoPrivateChannelLike {
4
+ listen: (event: string, callback: (payload: unknown) => void) => TaskEchoPrivateChannelLike;
5
+ }
6
+ export interface TaskEchoLike {
7
+ private: (channel: string) => TaskEchoPrivateChannelLike;
8
+ leave: (channel: string) => void;
9
+ }
10
+ export interface UseTaskWebSocketEntityTarget {
11
+ type: string;
12
+ id: string | number;
13
+ }
14
+ export interface UseTaskWebSocketOptions {
15
+ echo?: TaskEchoLike | (() => TaskEchoLike | null | undefined) | null | undefined;
16
+ entity?: MaybeRefOrGetter<UseTaskWebSocketEntityTarget | null | undefined>;
17
+ teamIds?: MaybeRefOrGetter<Array<string | number> | null | undefined>;
18
+ autoConnect?: boolean;
19
+ onToast?: (toast: TaskNotificationToastItem) => void;
20
+ onConnectionChange?: (connected: boolean) => void;
21
+ onEvent?: (event: TaskRealtimeEventName, payload: TaskRealtimeEventPayload) => void;
22
+ }
23
+ export interface UseTaskWebSocketReturn {
24
+ isConnected: ComputedRef<boolean>;
25
+ activeChannels: Ref<string[]>;
26
+ connect: () => void;
27
+ disconnect: () => void;
28
+ reconnect: () => void;
29
+ }
30
+ export type TaskRealtimeEventPayload = TaskCreatedBroadcastPayload | TaskUpdatedBroadcastPayload | TaskStatusChangedBroadcastPayload | TaskAssignedBroadcastPayload | TaskCompletedBroadcastPayload | TaskCommentAddedBroadcastPayload | TaskChecklistToggledBroadcastPayload;
31
+ export declare function useTaskWebSocket(userId: MaybeRefOrGetter<string | number | null | undefined>, options?: UseTaskWebSocketOptions): UseTaskWebSocketReturn;