@hardlydifficult/task-list 1.0.0 → 1.0.1
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 +62 -54
- package/dist/FullState.d.ts +14 -15
- package/dist/FullState.d.ts.map +1 -1
- package/dist/FullState.js +21 -22
- package/dist/FullState.js.map +1 -1
- package/dist/Project.d.ts +42 -0
- package/dist/Project.d.ts.map +1 -0
- package/dist/Project.js +65 -0
- package/dist/Project.js.map +1 -0
- package/dist/Task.d.ts +9 -8
- package/dist/Task.d.ts.map +1 -1
- package/dist/Task.js +23 -12
- package/dist/Task.js.map +1 -1
- package/dist/TaskListClient.d.ts +15 -7
- package/dist/TaskListClient.d.ts.map +1 -1
- package/dist/TaskListClient.js +11 -0
- package/dist/TaskListClient.js.map +1 -1
- package/dist/index.d.ts +9 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -10
- package/dist/index.js.map +1 -1
- package/dist/linear/LinearTaskListClient.d.ts +21 -0
- package/dist/linear/LinearTaskListClient.d.ts.map +1 -0
- package/dist/linear/LinearTaskListClient.js +184 -0
- package/dist/linear/LinearTaskListClient.js.map +1 -0
- package/dist/linear/index.d.ts +2 -0
- package/dist/linear/index.d.ts.map +1 -0
- package/dist/linear/index.js +6 -0
- package/dist/linear/index.js.map +1 -0
- package/dist/trello/TrelloTaskListClient.d.ts +4 -6
- package/dist/trello/TrelloTaskListClient.d.ts.map +1 -1
- package/dist/trello/TrelloTaskListClient.js +66 -43
- package/dist/trello/TrelloTaskListClient.js.map +1 -1
- package/dist/types.d.ts +31 -38
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/BoardState.d.ts +0 -36
- package/dist/BoardState.d.ts.map +0 -1
- package/dist/BoardState.js +0 -62
- package/dist/BoardState.js.map +0 -1
- package/dist/TaskList.d.ts +0 -20
- package/dist/TaskList.d.ts.map +0 -1
- package/dist/TaskList.js +0 -31
- package/dist/TaskList.js.map +0 -1
package/dist/types.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export interface TrelloConfig {
|
|
|
12
12
|
export interface LinearConfig {
|
|
13
13
|
type: "linear";
|
|
14
14
|
apiKey?: string;
|
|
15
|
+
teamId: string;
|
|
15
16
|
}
|
|
16
17
|
export type TaskListConfig = TrelloConfig | LinearConfig;
|
|
17
18
|
/**
|
|
@@ -19,27 +20,12 @@ export type TaskListConfig = TrelloConfig | LinearConfig;
|
|
|
19
20
|
*/
|
|
20
21
|
export type Provider = "trello" | "linear";
|
|
21
22
|
/**
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
export interface Board {
|
|
25
|
-
readonly id: string;
|
|
26
|
-
readonly name: string;
|
|
27
|
-
readonly url: string;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* A label/tag on a task
|
|
31
|
-
*/
|
|
32
|
-
export interface Label {
|
|
33
|
-
readonly id: string;
|
|
34
|
-
readonly name: string;
|
|
35
|
-
readonly color: string;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Options for creating a task (passed to TaskList.createTask)
|
|
23
|
+
* Options for creating a task (passed to Project.createTask)
|
|
39
24
|
*/
|
|
40
25
|
export interface CreateTaskOptions {
|
|
41
26
|
readonly description?: string | undefined;
|
|
42
|
-
readonly labels?: readonly
|
|
27
|
+
readonly labels?: readonly string[] | undefined;
|
|
28
|
+
readonly status?: string | undefined;
|
|
43
29
|
}
|
|
44
30
|
/**
|
|
45
31
|
* Parameters for updating a task (passed to Task.update)
|
|
@@ -47,10 +33,8 @@ export interface CreateTaskOptions {
|
|
|
47
33
|
export interface UpdateTaskParams {
|
|
48
34
|
readonly name?: string | undefined;
|
|
49
35
|
readonly description?: string | undefined;
|
|
50
|
-
readonly
|
|
51
|
-
|
|
52
|
-
} | undefined;
|
|
53
|
-
readonly labels?: readonly Label[] | undefined;
|
|
36
|
+
readonly status?: string | undefined;
|
|
37
|
+
readonly labels?: readonly string[] | undefined;
|
|
54
38
|
}
|
|
55
39
|
/**
|
|
56
40
|
* Internal raw task data returned by provider operations
|
|
@@ -60,26 +44,35 @@ export interface TaskData {
|
|
|
60
44
|
readonly id: string;
|
|
61
45
|
readonly name: string;
|
|
62
46
|
readonly description: string;
|
|
63
|
-
readonly
|
|
64
|
-
readonly
|
|
65
|
-
readonly labels: readonly
|
|
47
|
+
readonly statusId: string;
|
|
48
|
+
readonly projectId: string;
|
|
49
|
+
readonly labels: readonly {
|
|
50
|
+
readonly id: string;
|
|
51
|
+
readonly name: string;
|
|
52
|
+
}[];
|
|
66
53
|
readonly url: string;
|
|
67
54
|
}
|
|
68
55
|
/**
|
|
69
|
-
* Internal
|
|
70
|
-
* @internal
|
|
71
|
-
*/
|
|
72
|
-
export interface TaskListData {
|
|
73
|
-
readonly id: string;
|
|
74
|
-
readonly name: string;
|
|
75
|
-
readonly boardId: string;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Internal interface for provider-specific task operations
|
|
56
|
+
* Internal interface for provider-specific task operations and name resolution
|
|
79
57
|
* @internal
|
|
80
58
|
*/
|
|
81
|
-
export interface
|
|
82
|
-
createTask(
|
|
83
|
-
|
|
59
|
+
export interface TaskContext {
|
|
60
|
+
createTask(params: {
|
|
61
|
+
statusId: string;
|
|
62
|
+
projectId: string;
|
|
63
|
+
name: string;
|
|
64
|
+
description?: string;
|
|
65
|
+
labelIds?: readonly string[];
|
|
66
|
+
}): Promise<TaskData>;
|
|
67
|
+
updateTask(params: {
|
|
68
|
+
taskId: string;
|
|
69
|
+
name?: string;
|
|
70
|
+
description?: string;
|
|
71
|
+
statusId?: string;
|
|
72
|
+
labelIds?: readonly string[];
|
|
73
|
+
}): Promise<TaskData>;
|
|
74
|
+
resolveStatusId(name: string): string;
|
|
75
|
+
resolveStatusName(id: string): string;
|
|
76
|
+
resolveLabelId(name: string): string;
|
|
84
77
|
}
|
|
85
78
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG,YAAY,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE3C;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IAChD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,QAAQ,CAAC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AC;IACtC,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CACtC"}
|
package/package.json
CHANGED
package/dist/BoardState.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { Task } from "./Task.js";
|
|
2
|
-
import type { TaskList } from "./TaskList.js";
|
|
3
|
-
import type { Board, Label } from "./types.js";
|
|
4
|
-
/**
|
|
5
|
-
* Full state of a single board: board info, lists, tasks, and labels.
|
|
6
|
-
* Provides chainable finder methods that throw on not found.
|
|
7
|
-
*/
|
|
8
|
-
export declare class BoardState {
|
|
9
|
-
readonly board: Board;
|
|
10
|
-
readonly lists: readonly TaskList[];
|
|
11
|
-
readonly tasks: readonly Task[];
|
|
12
|
-
readonly labels: readonly Label[];
|
|
13
|
-
constructor(board: Board, lists: readonly TaskList[], tasks: readonly Task[], labels: readonly Label[]);
|
|
14
|
-
/**
|
|
15
|
-
* Find a list by name (case-insensitive partial match)
|
|
16
|
-
* @param name - Partial list name to search for
|
|
17
|
-
* @returns The matching TaskList
|
|
18
|
-
* @throws Error if no list matches
|
|
19
|
-
*/
|
|
20
|
-
findList(name: string): TaskList;
|
|
21
|
-
/**
|
|
22
|
-
* Find a task by ID
|
|
23
|
-
* @param taskId - Task ID to find
|
|
24
|
-
* @returns The matching Task
|
|
25
|
-
* @throws Error if no task matches
|
|
26
|
-
*/
|
|
27
|
-
findTask(taskId: string): Task;
|
|
28
|
-
/**
|
|
29
|
-
* Find a label by name (case-insensitive partial match)
|
|
30
|
-
* @param name - Partial label name to search for
|
|
31
|
-
* @returns The matching Label
|
|
32
|
-
* @throws Error if no label matches
|
|
33
|
-
*/
|
|
34
|
-
findLabel(name: string): Label;
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=BoardState.d.ts.map
|
package/dist/BoardState.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BoardState.d.ts","sourceRoot":"","sources":["../src/BoardState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAE/C;;;GAGG;AACH,qBAAa,UAAU;IACrB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,SAAS,KAAK,EAAE,CAAC;gBAGhC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,SAAS,QAAQ,EAAE,EAC1B,KAAK,EAAE,SAAS,IAAI,EAAE,EACtB,MAAM,EAAE,SAAS,KAAK,EAAE;IAQ1B;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ;IAShC;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAU9B;;;;;OAKG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK;CAU/B"}
|
package/dist/BoardState.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BoardState = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Full state of a single board: board info, lists, tasks, and labels.
|
|
6
|
-
* Provides chainable finder methods that throw on not found.
|
|
7
|
-
*/
|
|
8
|
-
class BoardState {
|
|
9
|
-
board;
|
|
10
|
-
lists;
|
|
11
|
-
tasks;
|
|
12
|
-
labels;
|
|
13
|
-
constructor(board, lists, tasks, labels) {
|
|
14
|
-
this.board = board;
|
|
15
|
-
this.lists = lists;
|
|
16
|
-
this.tasks = tasks;
|
|
17
|
-
this.labels = labels;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Find a list by name (case-insensitive partial match)
|
|
21
|
-
* @param name - Partial list name to search for
|
|
22
|
-
* @returns The matching TaskList
|
|
23
|
-
* @throws Error if no list matches
|
|
24
|
-
*/
|
|
25
|
-
findList(name) {
|
|
26
|
-
const lower = name.toLowerCase();
|
|
27
|
-
const list = this.lists.find((l) => l.name.toLowerCase().includes(lower));
|
|
28
|
-
if (!list) {
|
|
29
|
-
throw new Error(`List "${name}" not found on board "${this.board.name}"`);
|
|
30
|
-
}
|
|
31
|
-
return list;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Find a task by ID
|
|
35
|
-
* @param taskId - Task ID to find
|
|
36
|
-
* @returns The matching Task
|
|
37
|
-
* @throws Error if no task matches
|
|
38
|
-
*/
|
|
39
|
-
findTask(taskId) {
|
|
40
|
-
const task = this.tasks.find((t) => t.id === taskId);
|
|
41
|
-
if (!task) {
|
|
42
|
-
throw new Error(`Task "${taskId}" not found on board "${this.board.name}"`);
|
|
43
|
-
}
|
|
44
|
-
return task;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Find a label by name (case-insensitive partial match)
|
|
48
|
-
* @param name - Partial label name to search for
|
|
49
|
-
* @returns The matching Label
|
|
50
|
-
* @throws Error if no label matches
|
|
51
|
-
*/
|
|
52
|
-
findLabel(name) {
|
|
53
|
-
const lower = name.toLowerCase();
|
|
54
|
-
const label = this.labels.find((l) => l.name.toLowerCase().includes(lower));
|
|
55
|
-
if (!label) {
|
|
56
|
-
throw new Error(`Label "${name}" not found on board "${this.board.name}"`);
|
|
57
|
-
}
|
|
58
|
-
return label;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
exports.BoardState = BoardState;
|
|
62
|
-
//# sourceMappingURL=BoardState.js.map
|
package/dist/BoardState.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BoardState.js","sourceRoot":"","sources":["../src/BoardState.ts"],"names":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AW,EAAE,CAAC;QACjC,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;QAC5E,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CACb,UAAU,IAAI,yBAAyB,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,CAC1D,CAAC;QACJ,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAjED,gCAiEC"}
|
package/dist/TaskList.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Task } from "./Task.js";
|
|
2
|
-
import type { CreateTaskOptions, TaskListData, TaskOperations } from "./types.js";
|
|
3
|
-
/**
|
|
4
|
-
* A task list (Trello List, Linear Status) with task creation capability
|
|
5
|
-
*/
|
|
6
|
-
export declare class TaskList {
|
|
7
|
-
readonly id: string;
|
|
8
|
-
readonly name: string;
|
|
9
|
-
readonly boardId: string;
|
|
10
|
-
private readonly operations;
|
|
11
|
-
constructor(data: TaskListData, operations: TaskOperations);
|
|
12
|
-
/**
|
|
13
|
-
* Create a new task in this list
|
|
14
|
-
* @param name - Task name/title
|
|
15
|
-
* @param options - Optional description and labels
|
|
16
|
-
* @returns The created Task
|
|
17
|
-
*/
|
|
18
|
-
createTask(name: string, options?: CreateTaskOptions): Promise<Task>;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=TaskList.d.ts.map
|
package/dist/TaskList.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TaskList.d.ts","sourceRoot":"","sources":["../src/TaskList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,KAAK,EACV,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACf,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,qBAAa,QAAQ;IACnB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAiB;gBAEhC,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc;IAO1D;;;;;OAKG;IACG,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;CAS3E"}
|
package/dist/TaskList.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TaskList = void 0;
|
|
4
|
-
const Task_js_1 = require("./Task.js");
|
|
5
|
-
/**
|
|
6
|
-
* A task list (Trello List, Linear Status) with task creation capability
|
|
7
|
-
*/
|
|
8
|
-
class TaskList {
|
|
9
|
-
id;
|
|
10
|
-
name;
|
|
11
|
-
boardId;
|
|
12
|
-
operations;
|
|
13
|
-
constructor(data, operations) {
|
|
14
|
-
this.id = data.id;
|
|
15
|
-
this.name = data.name;
|
|
16
|
-
this.boardId = data.boardId;
|
|
17
|
-
this.operations = operations;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Create a new task in this list
|
|
21
|
-
* @param name - Task name/title
|
|
22
|
-
* @param options - Optional description and labels
|
|
23
|
-
* @returns The created Task
|
|
24
|
-
*/
|
|
25
|
-
async createTask(name, options) {
|
|
26
|
-
const data = await this.operations.createTask(this.id, name, options?.description, options?.labels?.map((l) => l.id));
|
|
27
|
-
return new Task_js_1.Task(data, this.operations);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.TaskList = TaskList;
|
|
31
|
-
//# sourceMappingURL=TaskList.js.map
|
package/dist/TaskList.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TaskList.js","sourceRoot":"","sources":["../src/TaskList.ts"],"names":[],"mappings":";;;AAAA,uCAAiC;AAOjC;;GAEG;AACH,MAAa,QAAQ;IACV,EAAE,CAAS;IACX,IAAI,CAAS;IACb,OAAO,CAAS;IAER,UAAU,CAAiB;IAE5C,YAAY,IAAkB,EAAE,UAA0B;QACxD,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QAClB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,UAAU,CAAC,IAAY,EAAE,OAA2B;QACxD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,UAAU,CAC3C,IAAI,CAAC,EAAE,EACP,IAAI,EACJ,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAClC,CAAC;QACF,OAAO,IAAI,cAAI,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IACzC,CAAC;CACF;AA7BD,4BA6BC"}
|