@clxmedia/cliq-project 1.0.11

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2019 John Biundo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ <h1 align="center"></h1>
2
+
3
+ <h3 align="center">CLiQ Project</h3>
@@ -0,0 +1,4 @@
1
+ import type { CLiQTaskNotificationType } from "./types/project.types";
2
+ export declare const constants: {
3
+ readonly CLiQTaskNotificationTypeFriendly: Record<CLiQTaskNotificationType, string>;
4
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.constants = void 0;
4
+ exports.constants = {
5
+ CLiQTaskNotificationTypeFriendly: {
6
+ default: "Default",
7
+ initial_notify: "Initial Notify",
8
+ first_reminder: "First Reminder",
9
+ second_reminder: "Second Reminder",
10
+ third_reminder: "Third Reminder",
11
+ final_reminder: "Final Reminder",
12
+ alert: "Alert",
13
+ },
14
+ };
@@ -0,0 +1,15 @@
1
+ import type { CLiQProjectFlow, CLiQProjectFlowTemplate, CLiQTaskItemStat } from "./types/project.types";
2
+ export declare class FlowEngine {
3
+ private flows;
4
+ private tasks;
5
+ constructor(flows: CLiQProjectFlow[], tasks: CLiQTaskItemStat[]);
6
+ static extractAllTaskSlugs(flows: CLiQProjectFlowTemplate[]): string[];
7
+ getFlows(): CLiQProjectFlow[];
8
+ getFlowByGuid(guid: string): CLiQProjectFlow | undefined;
9
+ getActivatedFlows(): CLiQProjectFlow[];
10
+ isTaskChainCompleted: (task: CLiQTaskItemStat) => boolean;
11
+ isTaskReady: (task: CLiQTaskItemStat) => boolean;
12
+ getTasksReadyToInitialize(): number[];
13
+ getActiveFlowMemberTasks(): number[];
14
+ getUnlockableTasks(): number[];
15
+ }
@@ -0,0 +1,113 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FlowEngine = void 0;
4
+ class FlowEngine {
5
+ constructor(flows, tasks) {
6
+ this.flows = [];
7
+ this.tasks = [];
8
+ this.isTaskChainCompleted = (task) => {
9
+ for (const flow of this.getActivatedFlows()) {
10
+ for (const dep of flow.dependencies) {
11
+ if (dep.dependent_task_id === task.id) {
12
+ const prereqTask = this.tasks.find((task) => task.id === dep.prerequisite_task_id);
13
+ const requiresCompletion = dep.requires_prerequisite_completion;
14
+ if (requiresCompletion &&
15
+ (!prereqTask || prereqTask.status !== "closed")) {
16
+ return false;
17
+ }
18
+ if ((prereqTask === null || prereqTask === void 0 ? void 0 : prereqTask.status) === "provisional") {
19
+ return false;
20
+ }
21
+ if (prereqTask && !this.isTaskChainCompleted(prereqTask))
22
+ return false;
23
+ }
24
+ }
25
+ }
26
+ return true;
27
+ };
28
+ this.isTaskReady = (task) => {
29
+ if ((task === null || task === void 0 ? void 0 : task.status) !== "pending")
30
+ return false;
31
+ return this.isTaskChainCompleted(task);
32
+ };
33
+ this.flows = flows;
34
+ this.tasks = tasks;
35
+ }
36
+ static extractAllTaskSlugs(flows) {
37
+ if (!flows || flows.length === 0)
38
+ return [];
39
+ const taskSlugs = new Set();
40
+ for (const flow of flows) {
41
+ for (const dep of flow.dependencies) {
42
+ taskSlugs.add(dep.dependent_task.task_template_slug);
43
+ taskSlugs.add(dep.prerequisite_task.task_template_slug);
44
+ }
45
+ }
46
+ return Array.from(taskSlugs);
47
+ }
48
+ getFlows() {
49
+ return this.flows;
50
+ }
51
+ getFlowByGuid(guid) {
52
+ return this.flows.find((flow) => flow.guid === guid);
53
+ }
54
+ getActivatedFlows() {
55
+ return this.flows.filter((flow) => {
56
+ if (!flow.activated_by_task_id)
57
+ return true;
58
+ const task = this.tasks.find((task) => task.id === flow.activated_by_task_id);
59
+ if (!task)
60
+ return true;
61
+ return task.status === "closed";
62
+ });
63
+ }
64
+ getTasksReadyToInitialize() {
65
+ const taskIds = new Set();
66
+ for (const flow of this.flows) {
67
+ for (const dep of flow.dependencies) {
68
+ const tasks = this.tasks.filter((task) => [dep.dependent_task_id, dep.prerequisite_task_id].includes(task.id) && task.status === "provisional");
69
+ for (const t of tasks) {
70
+ taskIds.add(t.id);
71
+ }
72
+ }
73
+ }
74
+ return Array.from(taskIds);
75
+ }
76
+ getActiveFlowMemberTasks() {
77
+ const taskIds = new Set();
78
+ for (const flow of this.flows.filter((f) => f.initialized_at)) {
79
+ for (const dep of flow.dependencies) {
80
+ const tasks = this.tasks.filter((task) => [dep.dependent_task_id, dep.prerequisite_task_id].includes(task.id));
81
+ for (const t of tasks) {
82
+ taskIds.add(t.id);
83
+ }
84
+ }
85
+ }
86
+ return Array.from(taskIds);
87
+ }
88
+ getUnlockableTasks() {
89
+ const unlockableTasks = new Set();
90
+ const activatedFlows = this.getActivatedFlows();
91
+ const tasks = this.tasks;
92
+ for (const flow of activatedFlows) {
93
+ for (const dep of flow.dependencies) {
94
+ const task = tasks.find((task) => task.id === dep.dependent_task_id);
95
+ if (task && this.isTaskReady(task)) {
96
+ unlockableTasks.add(dep.dependent_task_id);
97
+ }
98
+ }
99
+ const allDependentIds = new Set(flow.dependencies.map((d) => d.dependent_task_id));
100
+ const startingPrereqIds = flow.dependencies
101
+ .filter((d) => !allDependentIds.has(d.prerequisite_task_id))
102
+ .map((d) => d.prerequisite_task_id);
103
+ for (const prereqId of startingPrereqIds) {
104
+ const prereqTask = tasks.find((task) => task.id === prereqId);
105
+ if (prereqTask && this.isTaskReady(prereqTask)) {
106
+ unlockableTasks.add(prereqId);
107
+ }
108
+ }
109
+ }
110
+ return Array.from(unlockableTasks);
111
+ }
112
+ }
113
+ exports.FlowEngine = FlowEngine;
@@ -0,0 +1,3 @@
1
+ export { FlowEngine } from "./flow-engine";
2
+ export { constants } from "./constants";
3
+ export type * from "./types/project.types";
package/dist/index.js ADDED
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.constants = exports.FlowEngine = void 0;
4
+ var flow_engine_1 = require("./flow-engine");
5
+ Object.defineProperty(exports, "FlowEngine", { enumerable: true, get: function () { return flow_engine_1.FlowEngine; } });
6
+ var constants_1 = require("./constants");
7
+ Object.defineProperty(exports, "constants", { enumerable: true, get: function () { return constants_1.constants; } });
@@ -0,0 +1,427 @@
1
+ import type { CLiQUserLocator, CLiQUserLocatorSlug } from "@clxmedia/types/core/auth";
2
+ import type { CLXFormRuleSet } from "@clxmedia/types/core/clxforms";
3
+ import type { EnterpriseEventSlugs } from "@clxmedia/types/core/events";
4
+ export type CLiQTaskTemplate = {
5
+ slug: string;
6
+ name: string;
7
+ default_assignment: CLiQUserLocator | null;
8
+ description: string | null;
9
+ instructions: string | null;
10
+ _count: {
11
+ checklist_items: number;
12
+ project_task_templates: number;
13
+ };
14
+ checklist_items: CLiQTaskChecklistItemTemplate[];
15
+ project_task_templates: {
16
+ project_step_template: {
17
+ project_template_slug: string;
18
+ };
19
+ }[];
20
+ };
21
+ export type CLiQSortDirection = "asc" | "desc";
22
+ export type ISODateString = `${number}-${number}-${number}`;
23
+ export type CLiQProjectActionType = "create" | "activate" | "notify" | "complete" | "archive";
24
+ export type CLiQRuleConditionAction = "initialize" | "delete" | "require" | "unrequire";
25
+ export type CLiQTaskTargetType = "none" | "snapshot" | "access_request" | "form_collab";
26
+ export type CLiQTaskActionType = "complete" | "create" | "activate" | "notify" | "assign" | "comment" | "start" | "skip" | "reject" | "verify" | "close";
27
+ export type CLiQTaskHistoryArchive = {
28
+ id: number;
29
+ action_type: CLiQTaskActionType;
30
+ action_by_user: string;
31
+ description?: string;
32
+ action_slug?: string;
33
+ created_at: Date;
34
+ };
35
+ export type CLiQTaskArchive = {
36
+ id: number;
37
+ slug: string;
38
+ master_id: number;
39
+ name: string;
40
+ created_at: Date;
41
+ is_required: boolean;
42
+ activated_at: Date;
43
+ closed_at: Date;
44
+ resolution: string;
45
+ history: CLiQTaskHistoryArchive[];
46
+ };
47
+ export type CLiQTaskFilter = {
48
+ cliq_user_locator_slug?: CLiQUserLocatorSlug;
49
+ my_tasks?: boolean;
50
+ master_id?: number;
51
+ include_closed?: boolean;
52
+ slug?: string;
53
+ take?: number;
54
+ skip?: number;
55
+ sort_by?: string;
56
+ sort_direction?: CLiQSortDirection;
57
+ };
58
+ export type PagedResult<T> = {
59
+ items: T[];
60
+ total: number;
61
+ take: number;
62
+ skip: number;
63
+ };
64
+ export type CLiQUserInstance = {
65
+ id: number;
66
+ email: string;
67
+ name: string;
68
+ };
69
+ export type CLiQProjectDetails = {
70
+ implementation_specialist?: CLiQUserInstance;
71
+ client_service_analyst?: CLiQUserInstance;
72
+ };
73
+ export type CLiQTaskFlowDependency = {
74
+ guid: string;
75
+ prerequisite_task_id: number;
76
+ dependent_task_id: number;
77
+ requires_prerequisite_completion: boolean;
78
+ flow_guid: string;
79
+ };
80
+ export type CLiQProjectFlow = {
81
+ name: string;
82
+ guid: string;
83
+ initialized_at: Date | null;
84
+ project_id: number;
85
+ rule_triggers: CLiQRuleTrigger[];
86
+ activated_by_task_id: number | null;
87
+ restart_task_id: number | null;
88
+ restart_label?: string;
89
+ dependencies: CLiQTaskFlowDependency[];
90
+ };
91
+ export type CLiQProjectInstance = {
92
+ id: number;
93
+ master_id: number;
94
+ name: string;
95
+ slug: string;
96
+ details?: CLiQProjectDetails;
97
+ created_at: Date;
98
+ updated_at: Date;
99
+ archived_at: Date | null;
100
+ steps: CLiQProjectStepInstance[];
101
+ flows?: CLiQProjectFlow[];
102
+ };
103
+ export type CLiQProjectMetaData = {
104
+ reminders?: ProjectReminderScheduleConfig;
105
+ notifications?: ProjectNotificationConfig[];
106
+ };
107
+ export type CLiQProjectStepInstance = {
108
+ id: number;
109
+ project_id: number;
110
+ name: string;
111
+ status: CLiQTaskStatus;
112
+ project_tasks: CLiQTask[];
113
+ };
114
+ export type CLiQTaskChecklistItemTemplate = {
115
+ id: number | null;
116
+ task_slug: string;
117
+ description: string;
118
+ required: boolean;
119
+ order_num: number | null;
120
+ };
121
+ export type CLiQTaskChecklistItem = {
122
+ id: number;
123
+ task_slug: string;
124
+ description: string;
125
+ required: boolean;
126
+ order_num: number;
127
+ created_at: Date;
128
+ };
129
+ export type TimeDelay = {
130
+ unit: "seconds" | "minutes" | "hours" | "days" | "business_days";
131
+ value: number;
132
+ } | "immediately";
133
+ export type ProjectReminderScheduleEntry = {
134
+ reminder_type: string;
135
+ delay: TimeDelay;
136
+ recipients: ProjectReminderRecipients;
137
+ };
138
+ export type Origin = {
139
+ type: "task" | "project_step" | "project";
140
+ id: number;
141
+ name: string;
142
+ entity: {
143
+ master_id: number;
144
+ name: string;
145
+ };
146
+ resource?: {
147
+ label: string;
148
+ path: string;
149
+ };
150
+ };
151
+ export type TaskNotificationRecipientLocator = CLiQUserLocator | {
152
+ type: "current_assignee";
153
+ };
154
+ export type TaskNotificationRecipients = {
155
+ to: TaskNotificationRecipientLocator | TaskNotificationRecipientLocator[];
156
+ cc?: TaskNotificationRecipientLocator | TaskNotificationRecipientLocator[];
157
+ bcc?: TaskNotificationRecipientLocator | TaskNotificationRecipientLocator[];
158
+ };
159
+ export type ProjectNotificationRecipients = {
160
+ to: CLiQUserLocator | CLiQUserLocator[];
161
+ cc?: CLiQUserLocator | CLiQUserLocator[];
162
+ bcc?: CLiQUserLocator | CLiQUserLocator[];
163
+ };
164
+ export type TaskNotificationConfig = {
165
+ onAction: CLiQTaskActionType;
166
+ templateSlug: string;
167
+ recipients: TaskNotificationRecipients;
168
+ repeatable: boolean;
169
+ };
170
+ export type ProjectNotificationConfig = {
171
+ onAction: CLiQProjectActionType;
172
+ templateSlug: string;
173
+ recipients: ProjectNotificationRecipients;
174
+ repeatable: boolean;
175
+ };
176
+ export type ProjectNotificationConfigs = {
177
+ configs: ProjectNotificationConfig[];
178
+ };
179
+ export type ProjectReminderRecipients = {
180
+ to: CLiQUserLocator | CLiQUserLocator[];
181
+ cc?: CLiQUserLocator | CLiQUserLocator[];
182
+ bcc?: CLiQUserLocator | CLiQUserLocator[];
183
+ };
184
+ export type TaskReminderRecipients = {
185
+ to: TaskNotificationRecipientLocator | TaskNotificationRecipientLocator[];
186
+ cc?: TaskNotificationRecipientLocator | TaskNotificationRecipientLocator[];
187
+ bcc?: TaskNotificationRecipientLocator | TaskNotificationRecipientLocator[];
188
+ };
189
+ export type ReminderRecipients = TaskReminderRecipients | ProjectReminderRecipients;
190
+ type OriginLocatorBase = {
191
+ type?: string;
192
+ origin_time: number;
193
+ id: number;
194
+ };
195
+ export type TaskOriginLocator = OriginLocatorBase & {
196
+ type: "task";
197
+ };
198
+ export type ProjectOriginLocator = OriginLocatorBase & {
199
+ type: "project_step" | "project";
200
+ };
201
+ export type OriginLocator = TaskOriginLocator | ProjectOriginLocator;
202
+ export type TaskReminderScheduleEntry = {
203
+ reminder_type: CLiQTaskNotificationType;
204
+ delay: TimeDelay;
205
+ recipients: TaskReminderRecipients;
206
+ };
207
+ export type ReminderScheduleEntry = TaskReminderScheduleEntry | ProjectReminderScheduleEntry;
208
+ export type TaskReminderConfig = {
209
+ origin_status: CLiQTaskActionType;
210
+ template_slug: string;
211
+ schedule: TaskReminderScheduleEntry[];
212
+ };
213
+ export type TaskActivateReminderConfig = TaskReminderConfig & {
214
+ origin_status: "create";
215
+ target_status: "activate";
216
+ };
217
+ export type TaskCompleteReminderConfig = TaskReminderConfig & {
218
+ origin_status: "activate";
219
+ target_status: "complete";
220
+ };
221
+ export type TaskReminderScheduleConfig = {
222
+ activate?: TaskActivateReminderConfig;
223
+ complete?: TaskCompleteReminderConfig;
224
+ };
225
+ export type TaskReminderConfigTypes = TaskActivateReminderConfig | TaskCompleteReminderConfig;
226
+ export type ProjectReminderConfigTypes = ProjectActivateReminderConfig | ProjectCompleteReminderConfig;
227
+ export type ProjectActivateReminderConfig = ProjectReminderConfig & {
228
+ origin_status: "create";
229
+ target_status: "activate";
230
+ };
231
+ export type ProjectCompleteReminderConfig = ProjectReminderConfig & {
232
+ origin_status: "activate";
233
+ target_status: "complete";
234
+ };
235
+ export type ProjectReminderScheduleConfig = {
236
+ activate?: ProjectActivateReminderConfig;
237
+ complete?: ProjectCompleteReminderConfig;
238
+ };
239
+ export type ProjectReminderConfig = {
240
+ origin_status: CLiQProjectActionType;
241
+ template_slug: string;
242
+ schedule: ProjectReminderScheduleEntry[];
243
+ };
244
+ export type CLiQProjectTemplate = {
245
+ name: string;
246
+ slug: string;
247
+ allow_multiple: boolean;
248
+ notifications?: ProjectNotificationConfig[];
249
+ reminders?: ProjectReminderScheduleConfig;
250
+ steps: CLiQProjectStepTemplate[];
251
+ flows: CLiQProjectFlowTemplate[];
252
+ };
253
+ export type CLiQProjectStepTemplate = {
254
+ name: string;
255
+ slug: string;
256
+ notifications?: ProjectNotificationConfig[];
257
+ reminders?: ProjectReminderScheduleConfig;
258
+ tasks: CLiQProjectTaskTemplate[];
259
+ defaultComplete?: boolean;
260
+ order_num: number;
261
+ };
262
+ export type CLiQTaskTriggerConstraint = "event_user_to_onboarding_recipient_match" | "project_id_match";
263
+ export type CLiQTaskTriggerConfig = {
264
+ constraints: CLiQTaskTriggerConstraint[];
265
+ };
266
+ export type CLiQEventTrigger = {
267
+ id: number;
268
+ trigger_action: CLiQTaskActionType;
269
+ trigger_event_slug: EnterpriseEventSlugs;
270
+ trigger_config: CLiQTaskTriggerConfig;
271
+ };
272
+ export type CLiQRuleTrigger = {
273
+ id: number;
274
+ trigger_action: CLiQRuleConditionAction;
275
+ trigger_ruleset: CLXFormRuleSet;
276
+ };
277
+ export type CLiQProjectTaskTemplateThin = {
278
+ guid: string;
279
+ name: string;
280
+ task_template_slug: string;
281
+ };
282
+ export type CLiQTaskItemStat = {
283
+ id: number;
284
+ name: string;
285
+ slug: string;
286
+ status: CLiQTaskStatus;
287
+ };
288
+ export type CLiQProjectTaskTemplate = CLiQProjectTaskTemplateThin & {
289
+ required: boolean;
290
+ notifications?: TaskNotificationConfig[];
291
+ reminders?: TaskReminderScheduleConfig;
292
+ default_assignment?: CLiQUserLocator;
293
+ order_num: number;
294
+ event_triggers?: CLiQEventTrigger[];
295
+ rule_triggers?: CLiQRuleTrigger[];
296
+ checklist?: CLiQTaskChecklistItemTemplate[];
297
+ };
298
+ export type CLiQProjectFlowTemplate = {
299
+ name: string;
300
+ guid: string;
301
+ project_template_slug: string;
302
+ activated_by_task_guid?: string;
303
+ restart_task_guid?: string;
304
+ restart_label?: string;
305
+ rule_triggers?: CLiQRuleTrigger[];
306
+ dependencies: CLiQTaskFlowDependencyTemplate[];
307
+ };
308
+ export type CLiQTaskFlowDependencyTemplate = {
309
+ guid: string;
310
+ prerequisite_task: CLiQProjectTaskTemplateThin;
311
+ dependent_task: CLiQProjectTaskTemplateThin;
312
+ requires_prerequisite_completion: boolean;
313
+ };
314
+ export type CLiQProjectConfig = {
315
+ name: string;
316
+ slug: string;
317
+ notifications: ProjectNotificationConfig[];
318
+ reminders: ProjectReminderScheduleConfig;
319
+ steps: {
320
+ name: string;
321
+ slug: string;
322
+ notifications: ProjectNotificationConfig[];
323
+ reminders: ProjectReminderScheduleConfig;
324
+ order_num: number;
325
+ tasks: {
326
+ guid: string;
327
+ provisional: boolean;
328
+ name: string;
329
+ task_template_slug: string;
330
+ required: boolean;
331
+ default_assignment: CLiQUserLocator;
332
+ notifications: TaskNotificationConfig[];
333
+ reminders: TaskReminderScheduleConfig;
334
+ rule_triggers: CLiQRuleTrigger[];
335
+ event_triggers: CLiQEventTrigger[];
336
+ order_num: number;
337
+ }[];
338
+ }[];
339
+ };
340
+ export type CLiQTaskResolution = "done" | "skipped" | "none" | "wont_do";
341
+ export type CLiQTaskBase = {
342
+ id: number;
343
+ master_id: number;
344
+ name: string;
345
+ slug: string;
346
+ is_required: boolean;
347
+ initialized_at: Date | null;
348
+ created_at: Date;
349
+ activated_at: Date | null;
350
+ closed_at: Date | null;
351
+ resolution: CLiQTaskResolution;
352
+ };
353
+ export type CLiQTaskTag = {
354
+ id: number;
355
+ task_id: number;
356
+ name: string;
357
+ added_by_user_id?: number;
358
+ comment?: string;
359
+ created_at: Date;
360
+ };
361
+ export type CLiQTaskMetaData = {
362
+ resource?: {
363
+ path: string;
364
+ label: string;
365
+ };
366
+ reminders?: TaskReminderScheduleConfig;
367
+ notifications?: TaskNotificationConfig[];
368
+ };
369
+ export type CLiQTaskStatus = "provisional" | "pending" | "open" | "closed";
370
+ export type CLiQTaskTarget = {
371
+ type: CLiQTaskTargetType;
372
+ id: number | null;
373
+ };
374
+ export type CLiQTask = CLiQTaskBase & {
375
+ id: number;
376
+ is_required: boolean;
377
+ conditions: CLXFormRuleSet | null;
378
+ project_step_id?: number;
379
+ internal_only: boolean;
380
+ meta_data?: CLiQTaskMetaData;
381
+ description?: string;
382
+ instructions?: string;
383
+ due_at: Date | null;
384
+ updated_at?: Date;
385
+ entity_name: string;
386
+ assignment: CLiQUserLocator | null;
387
+ priority: number;
388
+ responsibility: "internal" | "external";
389
+ status: CLiQTaskStatus;
390
+ target: CLiQTaskTarget;
391
+ tags: CLiQTaskTag[];
392
+ };
393
+ export type CLiQTaskHistoryEntry = {
394
+ id: number;
395
+ description: string;
396
+ created_at: Date;
397
+ deleted_at: Date | null;
398
+ action_type: CLiQTaskActionType;
399
+ action_slug: string | null;
400
+ action_by_user: {
401
+ id: number;
402
+ email: string;
403
+ };
404
+ };
405
+ export type TaskChecklistItem = {
406
+ id: number;
407
+ task_id: number;
408
+ description: string;
409
+ required: boolean;
410
+ completed_by: number | null;
411
+ order_num: number;
412
+ };
413
+ export type CLiQTaskWithHistory = CLiQTask & {
414
+ history: CLiQTaskHistoryEntry[];
415
+ checklist?: TaskChecklistItem[];
416
+ project_step?: {
417
+ id: number;
418
+ name: string;
419
+ project: {
420
+ id: number;
421
+ name: string;
422
+ slug: string;
423
+ };
424
+ };
425
+ };
426
+ export type CLiQTaskNotificationType = "default" | "initial_notify" | "first_reminder" | "second_reminder" | "third_reminder" | "final_reminder" | "alert";
427
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@clxmedia/cliq-project",
3
+ "version": "1.0.11",
4
+ "description": "CLiQ Projects",
5
+ "author": "Brandon Thompson <brandont@clxmedia.com>",
6
+ "license": "MIT",
7
+ "readmeFilename": "README.md",
8
+ "main": "dist/index.js",
9
+ "types": "dist/index.d.ts",
10
+ "files": [
11
+ "dist/**/*",
12
+ "*.md"
13
+ ],
14
+ "exports": {
15
+ ".": {
16
+ "import": "./dist/index.js",
17
+ "require": "./dist/index.js"
18
+ },
19
+ "./constants": "./dist/constants.js",
20
+ "./flow-engine": "./dist/flow-engine.js"
21
+ },
22
+ "scripts": {
23
+ "start:dev": "tsc -w",
24
+ "build": "rm -Rf dist && tsc",
25
+ "prepare": "npm run build",
26
+ "format": "prettier --write \"src/**/*.ts\"",
27
+ "lint": "tslint -p tsconfig.json -c tslint.json",
28
+ "test": "vitest run",
29
+ "test:watch": "vitest",
30
+ "test:cov": "vitest run --coverage"
31
+ },
32
+ "publishConfig": {
33
+ "access": "public"
34
+ },
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "https://github.com/adsupnow/xperience-library/cliq-project"
38
+ },
39
+ "bugs": "https://github.com/adsupnow/xperience-library/cliq-project/issues",
40
+ "dependencies": {
41
+ "@clxmedia/types": "1.2.0"
42
+ },
43
+ "devDependencies": {
44
+ "@types/node": "^24.3.3",
45
+ "@vitest/coverage-v8": "3.2.4",
46
+ "nock": "13.5.4",
47
+ "tslint": "6.1.3",
48
+ "typescript": "^5.2.2",
49
+ "vitest": "3.2.4"
50
+ }
51
+ }