@filcuk/planka-mcp 1.0.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/LICENSE +21 -0
- package/README.md +180 -0
- package/dist/client.d.ts +55 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +193 -0
- package/dist/client.js.map +1 -0
- package/dist/errors.d.ts +39 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +82 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +100 -0
- package/dist/index.js.map +1 -0
- package/dist/operations/boards.d.ts +39 -0
- package/dist/operations/boards.d.ts.map +1 -0
- package/dist/operations/boards.js +76 -0
- package/dist/operations/boards.js.map +1 -0
- package/dist/operations/cards.d.ts +35 -0
- package/dist/operations/cards.d.ts.map +1 -0
- package/dist/operations/cards.js +70 -0
- package/dist/operations/cards.js.map +1 -0
- package/dist/operations/comments.d.ts +20 -0
- package/dist/operations/comments.d.ts.map +1 -0
- package/dist/operations/comments.js +42 -0
- package/dist/operations/comments.js.map +1 -0
- package/dist/operations/labels.d.ts +32 -0
- package/dist/operations/labels.d.ts.map +1 -0
- package/dist/operations/labels.js +91 -0
- package/dist/operations/labels.js.map +1 -0
- package/dist/operations/lists.d.ts +15 -0
- package/dist/operations/lists.d.ts.map +1 -0
- package/dist/operations/lists.js +35 -0
- package/dist/operations/lists.js.map +1 -0
- package/dist/operations/projects.d.ts +23 -0
- package/dist/operations/projects.d.ts.map +1 -0
- package/dist/operations/projects.js +52 -0
- package/dist/operations/projects.js.map +1 -0
- package/dist/operations/tasks.d.ts +30 -0
- package/dist/operations/tasks.d.ts.map +1 -0
- package/dist/operations/tasks.js +102 -0
- package/dist/operations/tasks.js.map +1 -0
- package/dist/schemas/entities.d.ts +307 -0
- package/dist/schemas/entities.d.ts.map +1 -0
- package/dist/schemas/entities.js +168 -0
- package/dist/schemas/entities.js.map +1 -0
- package/dist/schemas/requests.d.ts +225 -0
- package/dist/schemas/requests.d.ts.map +1 -0
- package/dist/schemas/requests.js +87 -0
- package/dist/schemas/requests.js.map +1 -0
- package/dist/schemas/responses.d.ts +2161 -0
- package/dist/schemas/responses.d.ts.map +1 -0
- package/dist/schemas/responses.js +68 -0
- package/dist/schemas/responses.js.map +1 -0
- package/dist/tools/cards.d.ts +401 -0
- package/dist/tools/cards.d.ts.map +1 -0
- package/dist/tools/cards.js +367 -0
- package/dist/tools/cards.js.map +1 -0
- package/dist/tools/comments.d.ts +134 -0
- package/dist/tools/comments.d.ts.map +1 -0
- package/dist/tools/comments.js +109 -0
- package/dist/tools/comments.js.map +1 -0
- package/dist/tools/index.d.ts +790 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +44 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/labels.d.ts +198 -0
- package/dist/tools/labels.d.ts.map +1 -0
- package/dist/tools/labels.js +265 -0
- package/dist/tools/labels.js.map +1 -0
- package/dist/tools/lists.d.ts +117 -0
- package/dist/tools/lists.d.ts.map +1 -0
- package/dist/tools/lists.js +178 -0
- package/dist/tools/lists.js.map +1 -0
- package/dist/tools/navigation.d.ts +106 -0
- package/dist/tools/navigation.d.ts.map +1 -0
- package/dist/tools/navigation.js +151 -0
- package/dist/tools/navigation.js.map +1 -0
- package/dist/tools/tasks.d.ts +223 -0
- package/dist/tools/tasks.d.ts.map +1 -0
- package/dist/tools/tasks.js +169 -0
- package/dist/tools/tasks.js.map +1 -0
- package/package.json +53 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core entity schemas for PLANKA 2.0
|
|
3
|
+
* All types are derived from these Zod schemas.
|
|
4
|
+
*/
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
// Card type enum - required for PLANKA 2.0
|
|
7
|
+
export const CardTypeSchema = z.enum(["project", "story"]);
|
|
8
|
+
// List type enum - required for PLANKA 2.0
|
|
9
|
+
export const ListTypeSchema = z.enum(["active", "closed", "archive", "trash"]);
|
|
10
|
+
// Label colors - matches Planka server/api/models/Label.js COLORS
|
|
11
|
+
export const LabelColorSchema = z.enum([
|
|
12
|
+
"muddy-grey",
|
|
13
|
+
"autumn-leafs",
|
|
14
|
+
"morning-sky",
|
|
15
|
+
"antique-blue",
|
|
16
|
+
"egg-yellow",
|
|
17
|
+
"desert-sand",
|
|
18
|
+
"dark-granite",
|
|
19
|
+
"fresh-salad",
|
|
20
|
+
"lagoon-blue",
|
|
21
|
+
"midnight-blue",
|
|
22
|
+
"light-orange",
|
|
23
|
+
"pumpkin-orange",
|
|
24
|
+
"light-concrete",
|
|
25
|
+
"sunny-grass",
|
|
26
|
+
"navy-blue",
|
|
27
|
+
"lilac-eyes",
|
|
28
|
+
"apricot-red",
|
|
29
|
+
"orange-peel",
|
|
30
|
+
"silver-glint",
|
|
31
|
+
"bright-moss",
|
|
32
|
+
"deep-ocean",
|
|
33
|
+
"summer-sky",
|
|
34
|
+
"berry-red",
|
|
35
|
+
"light-cocoa",
|
|
36
|
+
"grey-stone",
|
|
37
|
+
"tank-green",
|
|
38
|
+
"coral-green",
|
|
39
|
+
"sugar-plum",
|
|
40
|
+
"pink-tulip",
|
|
41
|
+
"shady-rust",
|
|
42
|
+
"wet-rock",
|
|
43
|
+
"wet-moss",
|
|
44
|
+
"turquoise-sea",
|
|
45
|
+
"lavender-fields",
|
|
46
|
+
"piggy-red",
|
|
47
|
+
"light-mud",
|
|
48
|
+
"gun-metal",
|
|
49
|
+
"modern-green",
|
|
50
|
+
"french-coast",
|
|
51
|
+
"sweet-lilac",
|
|
52
|
+
"red-burgundy",
|
|
53
|
+
"pirate-gold",
|
|
54
|
+
]);
|
|
55
|
+
// User schema
|
|
56
|
+
export const UserSchema = z.object({
|
|
57
|
+
id: z.string(),
|
|
58
|
+
email: z.string().email().optional(),
|
|
59
|
+
username: z.string().optional(),
|
|
60
|
+
name: z.string(),
|
|
61
|
+
avatarUrl: z.string().nullable().optional(),
|
|
62
|
+
createdAt: z.string(),
|
|
63
|
+
updatedAt: z.string().nullable().optional(),
|
|
64
|
+
});
|
|
65
|
+
// Project schema
|
|
66
|
+
export const ProjectSchema = z.object({
|
|
67
|
+
id: z.string(),
|
|
68
|
+
name: z.string(),
|
|
69
|
+
background: z.string().nullable().optional(),
|
|
70
|
+
backgroundImage: z.string().nullable().optional(),
|
|
71
|
+
createdAt: z.string(),
|
|
72
|
+
updatedAt: z.string().nullable().optional(),
|
|
73
|
+
});
|
|
74
|
+
// Board schema
|
|
75
|
+
export const BoardSchema = z.object({
|
|
76
|
+
id: z.string(),
|
|
77
|
+
projectId: z.string(),
|
|
78
|
+
name: z.string(),
|
|
79
|
+
position: z.number(),
|
|
80
|
+
createdAt: z.string(),
|
|
81
|
+
updatedAt: z.string().nullable().optional(),
|
|
82
|
+
});
|
|
83
|
+
// List schema
|
|
84
|
+
export const ListSchema = z.object({
|
|
85
|
+
id: z.string(),
|
|
86
|
+
boardId: z.string(),
|
|
87
|
+
type: ListTypeSchema,
|
|
88
|
+
name: z.string().nullable(), // Can be null for archive/trash
|
|
89
|
+
position: z.number().nullable(),
|
|
90
|
+
color: LabelColorSchema.nullable().optional(),
|
|
91
|
+
createdAt: z.string(),
|
|
92
|
+
updatedAt: z.string().nullable().optional(),
|
|
93
|
+
});
|
|
94
|
+
// Card schema
|
|
95
|
+
export const CardSchema = z.object({
|
|
96
|
+
id: z.string(),
|
|
97
|
+
boardId: z.string(),
|
|
98
|
+
listId: z.string(),
|
|
99
|
+
creatorUserId: z.string().optional(),
|
|
100
|
+
name: z.string(),
|
|
101
|
+
description: z.string().nullable().optional(),
|
|
102
|
+
position: z.number(),
|
|
103
|
+
type: CardTypeSchema,
|
|
104
|
+
dueDate: z.string().nullable().optional(),
|
|
105
|
+
isDueDateCompleted: z.boolean().optional(),
|
|
106
|
+
isCompleted: z.boolean().optional(),
|
|
107
|
+
createdAt: z.string(),
|
|
108
|
+
updatedAt: z.string().nullable().optional(),
|
|
109
|
+
});
|
|
110
|
+
// TaskList (checklist container) schema - PLANKA 2.0
|
|
111
|
+
export const TaskListSchema = z.object({
|
|
112
|
+
id: z.string(),
|
|
113
|
+
cardId: z.string(),
|
|
114
|
+
name: z.string(),
|
|
115
|
+
position: z.number(),
|
|
116
|
+
showOnFrontOfCard: z.boolean().optional(),
|
|
117
|
+
createdAt: z.string(),
|
|
118
|
+
updatedAt: z.string().nullable().optional(),
|
|
119
|
+
});
|
|
120
|
+
// Task (checklist item) schema - PLANKA 2.0 uses taskListId instead of cardId
|
|
121
|
+
export const TaskSchema = z.object({
|
|
122
|
+
id: z.string(),
|
|
123
|
+
taskListId: z.string(),
|
|
124
|
+
name: z.string(),
|
|
125
|
+
position: z.number(),
|
|
126
|
+
isCompleted: z.boolean(),
|
|
127
|
+
assigneeUserId: z.string().nullable().optional(),
|
|
128
|
+
createdAt: z.string(),
|
|
129
|
+
updatedAt: z.string().nullable().optional(),
|
|
130
|
+
});
|
|
131
|
+
// Label schema
|
|
132
|
+
export const LabelSchema = z.object({
|
|
133
|
+
id: z.string(),
|
|
134
|
+
boardId: z.string(),
|
|
135
|
+
name: z.string().nullable(),
|
|
136
|
+
color: LabelColorSchema,
|
|
137
|
+
position: z.number(),
|
|
138
|
+
createdAt: z.string(),
|
|
139
|
+
updatedAt: z.string().nullable().optional(),
|
|
140
|
+
});
|
|
141
|
+
// Card-Label relationship (junction table)
|
|
142
|
+
export const CardLabelSchema = z.object({
|
|
143
|
+
id: z.string(),
|
|
144
|
+
cardId: z.string(),
|
|
145
|
+
labelId: z.string(),
|
|
146
|
+
createdAt: z.string(),
|
|
147
|
+
updatedAt: z.string().nullable().optional(),
|
|
148
|
+
});
|
|
149
|
+
// Comment schema
|
|
150
|
+
export const CommentSchema = z.object({
|
|
151
|
+
id: z.string(),
|
|
152
|
+
cardId: z.string(),
|
|
153
|
+
userId: z.string(),
|
|
154
|
+
text: z.string(),
|
|
155
|
+
createdAt: z.string(),
|
|
156
|
+
updatedAt: z.string().nullable().optional(),
|
|
157
|
+
});
|
|
158
|
+
// Attachment schema
|
|
159
|
+
export const AttachmentSchema = z.object({
|
|
160
|
+
id: z.string(),
|
|
161
|
+
cardId: z.string(),
|
|
162
|
+
creatorUserId: z.string().optional(),
|
|
163
|
+
name: z.string(),
|
|
164
|
+
url: z.string().optional(),
|
|
165
|
+
createdAt: z.string(),
|
|
166
|
+
updatedAt: z.string().nullable().optional(),
|
|
167
|
+
});
|
|
168
|
+
//# sourceMappingURL=entities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entities.js","sourceRoot":"","sources":["../../src/schemas/entities.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,2CAA2C;AAC3C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;AAG3D,2CAA2C;AAC3C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;AAG/E,kEAAkE;AAClE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC;IACrC,YAAY;IACZ,cAAc;IACd,aAAa;IACb,cAAc;IACd,YAAY;IACZ,aAAa;IACb,cAAc;IACd,aAAa;IACb,aAAa;IACb,eAAe;IACf,cAAc;IACd,gBAAgB;IAChB,gBAAgB;IAChB,aAAa;IACb,WAAW;IACX,YAAY;IACZ,aAAa;IACb,aAAa;IACb,cAAc;IACd,aAAa;IACb,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,aAAa;IACb,YAAY;IACZ,YAAY;IACZ,aAAa;IACb,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,UAAU;IACV,UAAU;IACV,eAAe;IACf,iBAAiB;IACjB,WAAW;IACX,WA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AAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAC5C,CAAC,CAAC"}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request body schemas for PLANKA API operations.
|
|
3
|
+
*/
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
export declare const CreateCardSchema: z.ZodObject<{
|
|
6
|
+
listId: z.ZodString;
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
description: z.ZodOptional<z.ZodString>;
|
|
9
|
+
position: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
10
|
+
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["project", "story"]>>>;
|
|
11
|
+
dueDate: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
type: "project" | "story";
|
|
14
|
+
name: string;
|
|
15
|
+
position: number;
|
|
16
|
+
listId: string;
|
|
17
|
+
description?: string | undefined;
|
|
18
|
+
dueDate?: string | undefined;
|
|
19
|
+
}, {
|
|
20
|
+
name: string;
|
|
21
|
+
listId: string;
|
|
22
|
+
type?: "project" | "story" | undefined;
|
|
23
|
+
position?: number | undefined;
|
|
24
|
+
description?: string | undefined;
|
|
25
|
+
dueDate?: string | undefined;
|
|
26
|
+
}>;
|
|
27
|
+
export type CreateCardInput = z.input<typeof CreateCardSchema>;
|
|
28
|
+
export declare const UpdateCardSchema: z.ZodObject<{
|
|
29
|
+
name: z.ZodOptional<z.ZodString>;
|
|
30
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
31
|
+
dueDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
32
|
+
isCompleted: z.ZodOptional<z.ZodBoolean>;
|
|
33
|
+
listId: z.ZodOptional<z.ZodString>;
|
|
34
|
+
boardId: z.ZodOptional<z.ZodString>;
|
|
35
|
+
position: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
name?: string | undefined;
|
|
38
|
+
position?: number | undefined;
|
|
39
|
+
boardId?: string | undefined;
|
|
40
|
+
listId?: string | undefined;
|
|
41
|
+
description?: string | null | undefined;
|
|
42
|
+
dueDate?: string | null | undefined;
|
|
43
|
+
isCompleted?: boolean | undefined;
|
|
44
|
+
}, {
|
|
45
|
+
name?: string | undefined;
|
|
46
|
+
position?: number | undefined;
|
|
47
|
+
boardId?: string | undefined;
|
|
48
|
+
listId?: string | undefined;
|
|
49
|
+
description?: string | null | undefined;
|
|
50
|
+
dueDate?: string | null | undefined;
|
|
51
|
+
isCompleted?: boolean | undefined;
|
|
52
|
+
}>;
|
|
53
|
+
export type UpdateCardInput = z.input<typeof UpdateCardSchema>;
|
|
54
|
+
export declare const MoveCardSchema: z.ZodObject<{
|
|
55
|
+
cardId: z.ZodString;
|
|
56
|
+
listId: z.ZodString;
|
|
57
|
+
position: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
58
|
+
boardId: z.ZodOptional<z.ZodString>;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
position: number;
|
|
61
|
+
listId: string;
|
|
62
|
+
cardId: string;
|
|
63
|
+
boardId?: string | undefined;
|
|
64
|
+
}, {
|
|
65
|
+
listId: string;
|
|
66
|
+
cardId: string;
|
|
67
|
+
position?: number | undefined;
|
|
68
|
+
boardId?: string | undefined;
|
|
69
|
+
}>;
|
|
70
|
+
export type MoveCardInput = z.input<typeof MoveCardSchema>;
|
|
71
|
+
export declare const CreateTaskSchema: z.ZodObject<{
|
|
72
|
+
cardId: z.ZodString;
|
|
73
|
+
name: z.ZodString;
|
|
74
|
+
position: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
75
|
+
}, "strip", z.ZodTypeAny, {
|
|
76
|
+
name: string;
|
|
77
|
+
position: number;
|
|
78
|
+
cardId: string;
|
|
79
|
+
}, {
|
|
80
|
+
name: string;
|
|
81
|
+
cardId: string;
|
|
82
|
+
position?: number | undefined;
|
|
83
|
+
}>;
|
|
84
|
+
export type CreateTaskInput = z.input<typeof CreateTaskSchema>;
|
|
85
|
+
export declare const UpdateTaskSchema: z.ZodObject<{
|
|
86
|
+
name: z.ZodOptional<z.ZodString>;
|
|
87
|
+
isCompleted: z.ZodOptional<z.ZodBoolean>;
|
|
88
|
+
position: z.ZodOptional<z.ZodNumber>;
|
|
89
|
+
}, "strip", z.ZodTypeAny, {
|
|
90
|
+
name?: string | undefined;
|
|
91
|
+
position?: number | undefined;
|
|
92
|
+
isCompleted?: boolean | undefined;
|
|
93
|
+
}, {
|
|
94
|
+
name?: string | undefined;
|
|
95
|
+
position?: number | undefined;
|
|
96
|
+
isCompleted?: boolean | undefined;
|
|
97
|
+
}>;
|
|
98
|
+
export type UpdateTaskInput = z.input<typeof UpdateTaskSchema>;
|
|
99
|
+
export declare const BatchCreateTasksSchema: z.ZodObject<{
|
|
100
|
+
cardId: z.ZodString;
|
|
101
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
102
|
+
name: z.ZodString;
|
|
103
|
+
position: z.ZodOptional<z.ZodNumber>;
|
|
104
|
+
}, "strip", z.ZodTypeAny, {
|
|
105
|
+
name: string;
|
|
106
|
+
position?: number | undefined;
|
|
107
|
+
}, {
|
|
108
|
+
name: string;
|
|
109
|
+
position?: number | undefined;
|
|
110
|
+
}>, "many">;
|
|
111
|
+
}, "strip", z.ZodTypeAny, {
|
|
112
|
+
cardId: string;
|
|
113
|
+
tasks: {
|
|
114
|
+
name: string;
|
|
115
|
+
position?: number | undefined;
|
|
116
|
+
}[];
|
|
117
|
+
}, {
|
|
118
|
+
cardId: string;
|
|
119
|
+
tasks: {
|
|
120
|
+
name: string;
|
|
121
|
+
position?: number | undefined;
|
|
122
|
+
}[];
|
|
123
|
+
}>;
|
|
124
|
+
export type BatchCreateTasksInput = z.input<typeof BatchCreateTasksSchema>;
|
|
125
|
+
export declare const CreateLabelSchema: z.ZodObject<{
|
|
126
|
+
boardId: z.ZodString;
|
|
127
|
+
name: z.ZodString;
|
|
128
|
+
color: z.ZodEnum<["muddy-grey", "autumn-leafs", "morning-sky", "antique-blue", "egg-yellow", "desert-sand", "dark-granite", "fresh-salad", "lagoon-blue", "midnight-blue", "light-orange", "pumpkin-orange", "light-concrete", "sunny-grass", "navy-blue", "lilac-eyes", "apricot-red", "orange-peel", "silver-glint", "bright-moss", "deep-ocean", "summer-sky", "berry-red", "light-cocoa", "grey-stone", "tank-green", "coral-green", "sugar-plum", "pink-tulip", "shady-rust", "wet-rock", "wet-moss", "turquoise-sea", "lavender-fields", "piggy-red", "light-mud", "gun-metal", "modern-green", "french-coast", "sweet-lilac", "red-burgundy", "pirate-gold"]>;
|
|
129
|
+
position: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
130
|
+
}, "strip", z.ZodTypeAny, {
|
|
131
|
+
name: string;
|
|
132
|
+
position: number;
|
|
133
|
+
boardId: string;
|
|
134
|
+
color: "muddy-grey" | "autumn-leafs" | "morning-sky" | "antique-blue" | "egg-yellow" | "desert-sand" | "dark-granite" | "fresh-salad" | "lagoon-blue" | "midnight-blue" | "light-orange" | "pumpkin-orange" | "light-concrete" | "sunny-grass" | "navy-blue" | "lilac-eyes" | "apricot-red" | "orange-peel" | "silver-glint" | "bright-moss" | "deep-ocean" | "summer-sky" | "berry-red" | "light-cocoa" | "grey-stone" | "tank-green" | "coral-green" | "sugar-plum" | "pink-tulip" | "shady-rust" | "wet-rock" | "wet-moss" | "turquoise-sea" | "lavender-fields" | "piggy-red" | "light-mud" | "gun-metal" | "modern-green" | "french-coast" | "sweet-lilac" | "red-burgundy" | "pirate-gold";
|
|
135
|
+
}, {
|
|
136
|
+
name: string;
|
|
137
|
+
boardId: string;
|
|
138
|
+
color: "muddy-grey" | "autumn-leafs" | "morning-sky" | "antique-blue" | "egg-yellow" | "desert-sand" | "dark-granite" | "fresh-salad" | "lagoon-blue" | "midnight-blue" | "light-orange" | "pumpkin-orange" | "light-concrete" | "sunny-grass" | "navy-blue" | "lilac-eyes" | "apricot-red" | "orange-peel" | "silver-glint" | "bright-moss" | "deep-ocean" | "summer-sky" | "berry-red" | "light-cocoa" | "grey-stone" | "tank-green" | "coral-green" | "sugar-plum" | "pink-tulip" | "shady-rust" | "wet-rock" | "wet-moss" | "turquoise-sea" | "lavender-fields" | "piggy-red" | "light-mud" | "gun-metal" | "modern-green" | "french-coast" | "sweet-lilac" | "red-burgundy" | "pirate-gold";
|
|
139
|
+
position?: number | undefined;
|
|
140
|
+
}>;
|
|
141
|
+
export type CreateLabelInput = z.input<typeof CreateLabelSchema>;
|
|
142
|
+
export declare const UpdateLabelSchema: z.ZodObject<{
|
|
143
|
+
name: z.ZodOptional<z.ZodString>;
|
|
144
|
+
color: z.ZodOptional<z.ZodEnum<["muddy-grey", "autumn-leafs", "morning-sky", "antique-blue", "egg-yellow", "desert-sand", "dark-granite", "fresh-salad", "lagoon-blue", "midnight-blue", "light-orange", "pumpkin-orange", "light-concrete", "sunny-grass", "navy-blue", "lilac-eyes", "apricot-red", "orange-peel", "silver-glint", "bright-moss", "deep-ocean", "summer-sky", "berry-red", "light-cocoa", "grey-stone", "tank-green", "coral-green", "sugar-plum", "pink-tulip", "shady-rust", "wet-rock", "wet-moss", "turquoise-sea", "lavender-fields", "piggy-red", "light-mud", "gun-metal", "modern-green", "french-coast", "sweet-lilac", "red-burgundy", "pirate-gold"]>>;
|
|
145
|
+
position: z.ZodOptional<z.ZodNumber>;
|
|
146
|
+
}, "strip", z.ZodTypeAny, {
|
|
147
|
+
name?: string | undefined;
|
|
148
|
+
position?: number | undefined;
|
|
149
|
+
color?: "muddy-grey" | "autumn-leafs" | "morning-sky" | "antique-blue" | "egg-yellow" | "desert-sand" | "dark-granite" | "fresh-salad" | "lagoon-blue" | "midnight-blue" | "light-orange" | "pumpkin-orange" | "light-concrete" | "sunny-grass" | "navy-blue" | "lilac-eyes" | "apricot-red" | "orange-peel" | "silver-glint" | "bright-moss" | "deep-ocean" | "summer-sky" | "berry-red" | "light-cocoa" | "grey-stone" | "tank-green" | "coral-green" | "sugar-plum" | "pink-tulip" | "shady-rust" | "wet-rock" | "wet-moss" | "turquoise-sea" | "lavender-fields" | "piggy-red" | "light-mud" | "gun-metal" | "modern-green" | "french-coast" | "sweet-lilac" | "red-burgundy" | "pirate-gold" | undefined;
|
|
150
|
+
}, {
|
|
151
|
+
name?: string | undefined;
|
|
152
|
+
position?: number | undefined;
|
|
153
|
+
color?: "muddy-grey" | "autumn-leafs" | "morning-sky" | "antique-blue" | "egg-yellow" | "desert-sand" | "dark-granite" | "fresh-salad" | "lagoon-blue" | "midnight-blue" | "light-orange" | "pumpkin-orange" | "light-concrete" | "sunny-grass" | "navy-blue" | "lilac-eyes" | "apricot-red" | "orange-peel" | "silver-glint" | "bright-moss" | "deep-ocean" | "summer-sky" | "berry-red" | "light-cocoa" | "grey-stone" | "tank-green" | "coral-green" | "sugar-plum" | "pink-tulip" | "shady-rust" | "wet-rock" | "wet-moss" | "turquoise-sea" | "lavender-fields" | "piggy-red" | "light-mud" | "gun-metal" | "modern-green" | "french-coast" | "sweet-lilac" | "red-burgundy" | "pirate-gold" | undefined;
|
|
154
|
+
}>;
|
|
155
|
+
export type UpdateLabelInput = z.input<typeof UpdateLabelSchema>;
|
|
156
|
+
export declare const AddLabelToCardSchema: z.ZodObject<{
|
|
157
|
+
cardId: z.ZodString;
|
|
158
|
+
labelId: z.ZodString;
|
|
159
|
+
}, "strip", z.ZodTypeAny, {
|
|
160
|
+
cardId: string;
|
|
161
|
+
labelId: string;
|
|
162
|
+
}, {
|
|
163
|
+
cardId: string;
|
|
164
|
+
labelId: string;
|
|
165
|
+
}>;
|
|
166
|
+
export type AddLabelToCardInput = z.input<typeof AddLabelToCardSchema>;
|
|
167
|
+
export declare const RemoveLabelFromCardSchema: z.ZodObject<{
|
|
168
|
+
cardId: z.ZodString;
|
|
169
|
+
labelId: z.ZodString;
|
|
170
|
+
}, "strip", z.ZodTypeAny, {
|
|
171
|
+
cardId: string;
|
|
172
|
+
labelId: string;
|
|
173
|
+
}, {
|
|
174
|
+
cardId: string;
|
|
175
|
+
labelId: string;
|
|
176
|
+
}>;
|
|
177
|
+
export type RemoveLabelFromCardInput = z.input<typeof RemoveLabelFromCardSchema>;
|
|
178
|
+
export declare const CreateCommentSchema: z.ZodObject<{
|
|
179
|
+
cardId: z.ZodString;
|
|
180
|
+
text: z.ZodString;
|
|
181
|
+
}, "strip", z.ZodTypeAny, {
|
|
182
|
+
cardId: string;
|
|
183
|
+
text: string;
|
|
184
|
+
}, {
|
|
185
|
+
cardId: string;
|
|
186
|
+
text: string;
|
|
187
|
+
}>;
|
|
188
|
+
export type CreateCommentInput = z.input<typeof CreateCommentSchema>;
|
|
189
|
+
export declare const UpdateCommentSchema: z.ZodObject<{
|
|
190
|
+
text: z.ZodString;
|
|
191
|
+
}, "strip", z.ZodTypeAny, {
|
|
192
|
+
text: string;
|
|
193
|
+
}, {
|
|
194
|
+
text: string;
|
|
195
|
+
}>;
|
|
196
|
+
export type UpdateCommentInput = z.input<typeof UpdateCommentSchema>;
|
|
197
|
+
export declare const CreateListSchema: z.ZodObject<{
|
|
198
|
+
boardId: z.ZodString;
|
|
199
|
+
name: z.ZodString;
|
|
200
|
+
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["active", "closed", "archive", "trash"]>>>;
|
|
201
|
+
position: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
202
|
+
}, "strip", z.ZodTypeAny, {
|
|
203
|
+
type: "active" | "closed" | "archive" | "trash";
|
|
204
|
+
name: string;
|
|
205
|
+
position: number;
|
|
206
|
+
boardId: string;
|
|
207
|
+
}, {
|
|
208
|
+
name: string;
|
|
209
|
+
boardId: string;
|
|
210
|
+
type?: "active" | "closed" | "archive" | "trash" | undefined;
|
|
211
|
+
position?: number | undefined;
|
|
212
|
+
}>;
|
|
213
|
+
export type CreateListInput = z.input<typeof CreateListSchema>;
|
|
214
|
+
export declare const UpdateListSchema: z.ZodObject<{
|
|
215
|
+
name: z.ZodOptional<z.ZodString>;
|
|
216
|
+
position: z.ZodOptional<z.ZodNumber>;
|
|
217
|
+
}, "strip", z.ZodTypeAny, {
|
|
218
|
+
name?: string | undefined;
|
|
219
|
+
position?: number | undefined;
|
|
220
|
+
}, {
|
|
221
|
+
name?: string | undefined;
|
|
222
|
+
position?: number | undefined;
|
|
223
|
+
}>;
|
|
224
|
+
export type UpdateListInput = z.input<typeof UpdateListSchema>;
|
|
225
|
+
//# sourceMappingURL=requests.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requests.d.ts","sourceRoot":"","sources":["../../src/schemas/requests.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;EAO3B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE/D,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;EAQ3B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE/D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;EAKzB,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,O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C,CAAC;AAGrE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;EAK3B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE/D,eAAO,MAAM,gBAAgB;;;;;;;;;EAG3B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request body schemas for PLANKA API operations.
|
|
3
|
+
*/
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { CardTypeSchema, LabelColorSchema, ListTypeSchema } from "./entities.js";
|
|
6
|
+
// Card requests
|
|
7
|
+
export const CreateCardSchema = z.object({
|
|
8
|
+
listId: z.string(),
|
|
9
|
+
name: z.string().min(1, "Card name required"),
|
|
10
|
+
description: z.string().optional(),
|
|
11
|
+
position: z.number().optional().default(65536),
|
|
12
|
+
type: CardTypeSchema.optional().default("project"), // Required for PLANKA 2.0
|
|
13
|
+
dueDate: z.string().optional(),
|
|
14
|
+
});
|
|
15
|
+
export const UpdateCardSchema = z.object({
|
|
16
|
+
name: z.string().min(1).optional(),
|
|
17
|
+
description: z.string().nullable().optional(),
|
|
18
|
+
dueDate: z.string().nullable().optional(),
|
|
19
|
+
isCompleted: z.boolean().optional(),
|
|
20
|
+
listId: z.string().optional(), // For moving cards
|
|
21
|
+
boardId: z.string().optional(), // For moving across boards
|
|
22
|
+
position: z.number().optional(),
|
|
23
|
+
});
|
|
24
|
+
export const MoveCardSchema = z.object({
|
|
25
|
+
cardId: z.string(),
|
|
26
|
+
listId: z.string(),
|
|
27
|
+
position: z.number().optional().default(65536),
|
|
28
|
+
boardId: z.string().optional(),
|
|
29
|
+
});
|
|
30
|
+
// Task requests
|
|
31
|
+
export const CreateTaskSchema = z.object({
|
|
32
|
+
cardId: z.string(),
|
|
33
|
+
name: z.string().min(1, "Task name required"),
|
|
34
|
+
position: z.number().optional().default(65536),
|
|
35
|
+
});
|
|
36
|
+
export const UpdateTaskSchema = z.object({
|
|
37
|
+
name: z.string().min(1).optional(),
|
|
38
|
+
isCompleted: z.boolean().optional(),
|
|
39
|
+
position: z.number().optional(),
|
|
40
|
+
});
|
|
41
|
+
export const BatchCreateTasksSchema = z.object({
|
|
42
|
+
cardId: z.string(),
|
|
43
|
+
tasks: z.array(z.object({
|
|
44
|
+
name: z.string().min(1),
|
|
45
|
+
position: z.number().optional(),
|
|
46
|
+
})),
|
|
47
|
+
});
|
|
48
|
+
// Label requests
|
|
49
|
+
export const CreateLabelSchema = z.object({
|
|
50
|
+
boardId: z.string(),
|
|
51
|
+
name: z.string().min(1, "Label name required"),
|
|
52
|
+
color: LabelColorSchema,
|
|
53
|
+
position: z.number().optional().default(65536),
|
|
54
|
+
});
|
|
55
|
+
export const UpdateLabelSchema = z.object({
|
|
56
|
+
name: z.string().min(1).optional(),
|
|
57
|
+
color: LabelColorSchema.optional(),
|
|
58
|
+
position: z.number().optional(),
|
|
59
|
+
});
|
|
60
|
+
export const AddLabelToCardSchema = z.object({
|
|
61
|
+
cardId: z.string(),
|
|
62
|
+
labelId: z.string(),
|
|
63
|
+
});
|
|
64
|
+
export const RemoveLabelFromCardSchema = z.object({
|
|
65
|
+
cardId: z.string(),
|
|
66
|
+
labelId: z.string(),
|
|
67
|
+
});
|
|
68
|
+
// Comment requests
|
|
69
|
+
export const CreateCommentSchema = z.object({
|
|
70
|
+
cardId: z.string(),
|
|
71
|
+
text: z.string().min(1, "Comment text required"),
|
|
72
|
+
});
|
|
73
|
+
export const UpdateCommentSchema = z.object({
|
|
74
|
+
text: z.string().min(1),
|
|
75
|
+
});
|
|
76
|
+
// List requests
|
|
77
|
+
export const CreateListSchema = z.object({
|
|
78
|
+
boardId: z.string(),
|
|
79
|
+
name: z.string().min(1, "List name required"),
|
|
80
|
+
type: ListTypeSchema.optional().default("active"), // Required for PLANKA 2.0
|
|
81
|
+
position: z.number().optional().default(65536),
|
|
82
|
+
});
|
|
83
|
+
export const UpdateListSchema = z.object({
|
|
84
|
+
name: z.string().min(1).optional(),
|
|
85
|
+
position: z.number().optional(),
|
|
86
|
+
});
|
|
87
|
+
//# sourceMappingURL=requests.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requests.js","sourceRoot":"","sources":["../../src/schemas/requests.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEjF,gBAAgB;AAChB,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,oBAAoB,CAAC;IAC7C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAC9C,IAAI,EAAE,cAAc,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,0BAA0B;IAC9E,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAClC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC7C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,E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