@btst/stack 2.2.0 → 2.3.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/dist/packages/stack/src/plugins/blog/api/plugin.cjs +52 -1
- package/dist/packages/stack/src/plugins/blog/api/plugin.mjs +52 -1
- package/dist/packages/stack/src/plugins/blog/api/query-key-defs.cjs +18 -0
- package/dist/packages/stack/src/plugins/blog/api/query-key-defs.mjs +15 -0
- package/dist/packages/stack/src/plugins/blog/api/serializers.cjs +21 -0
- package/dist/packages/stack/src/plugins/blog/api/serializers.mjs +18 -0
- package/dist/packages/stack/src/plugins/blog/client/plugin.cjs +15 -0
- package/dist/packages/stack/src/plugins/blog/client/plugin.mjs +16 -1
- package/dist/packages/stack/src/plugins/cms/api/getters.cjs +10 -0
- package/dist/packages/stack/src/plugins/cms/api/getters.mjs +10 -1
- package/dist/packages/stack/src/plugins/cms/api/plugin.cjs +70 -1
- package/dist/packages/stack/src/plugins/cms/api/plugin.mjs +71 -2
- package/dist/packages/stack/src/plugins/cms/api/query-key-defs.cjs +29 -0
- package/dist/packages/stack/src/plugins/cms/api/query-key-defs.mjs +26 -0
- package/dist/packages/stack/src/plugins/cms/client/plugin.cjs +15 -0
- package/dist/packages/stack/src/plugins/cms/client/plugin.mjs +16 -1
- package/dist/packages/stack/src/plugins/form-builder/api/getters.cjs +9 -0
- package/dist/packages/stack/src/plugins/form-builder/api/getters.mjs +9 -1
- package/dist/packages/stack/src/plugins/form-builder/api/plugin.cjs +62 -1
- package/dist/packages/stack/src/plugins/form-builder/api/plugin.mjs +63 -2
- package/dist/packages/stack/src/plugins/form-builder/api/query-key-defs.cjs +37 -0
- package/dist/packages/stack/src/plugins/form-builder/api/query-key-defs.mjs +33 -0
- package/dist/packages/stack/src/plugins/form-builder/client/plugin.cjs +15 -0
- package/dist/packages/stack/src/plugins/form-builder/client/plugin.mjs +16 -1
- package/dist/packages/stack/src/plugins/kanban/api/plugin.cjs +29 -1
- package/dist/packages/stack/src/plugins/kanban/api/plugin.mjs +29 -1
- package/dist/packages/stack/src/plugins/kanban/api/query-key-defs.cjs +26 -0
- package/dist/packages/stack/src/plugins/kanban/api/query-key-defs.mjs +23 -0
- package/dist/packages/stack/src/plugins/kanban/api/serializers.cjs +30 -0
- package/dist/packages/stack/src/plugins/kanban/api/serializers.mjs +26 -0
- package/dist/packages/stack/src/plugins/kanban/client/plugin.cjs +10 -0
- package/dist/packages/stack/src/plugins/kanban/client/plugin.mjs +11 -1
- package/dist/packages/stack/src/plugins/utils.cjs +6 -0
- package/dist/packages/stack/src/plugins/utils.mjs +6 -1
- package/dist/plugins/blog/api/index.cjs +5 -0
- package/dist/plugins/blog/api/index.d.cts +19 -4
- package/dist/plugins/blog/api/index.d.mts +19 -4
- package/dist/plugins/blog/api/index.d.ts +19 -4
- package/dist/plugins/blog/api/index.mjs +2 -0
- package/dist/plugins/blog/client/hooks/index.d.cts +4 -4
- package/dist/plugins/blog/client/hooks/index.d.mts +4 -4
- package/dist/plugins/blog/client/hooks/index.d.ts +4 -4
- package/dist/plugins/blog/client/index.d.cts +1 -1
- package/dist/plugins/blog/client/index.d.mts +1 -1
- package/dist/plugins/blog/client/index.d.ts +1 -1
- package/dist/plugins/blog/query-keys.cjs +6 -5
- package/dist/plugins/blog/query-keys.d.cts +8 -387
- package/dist/plugins/blog/query-keys.d.mts +8 -387
- package/dist/plugins/blog/query-keys.d.ts +8 -387
- package/dist/plugins/blog/query-keys.mjs +6 -5
- package/dist/plugins/client/index.cjs +1 -0
- package/dist/plugins/client/index.d.cts +8 -1
- package/dist/plugins/client/index.d.mts +8 -1
- package/dist/plugins/client/index.d.ts +8 -1
- package/dist/plugins/client/index.mjs +1 -1
- package/dist/plugins/cms/api/index.cjs +6 -0
- package/dist/plugins/cms/api/index.d.cts +7 -219
- package/dist/plugins/cms/api/index.d.mts +7 -219
- package/dist/plugins/cms/api/index.d.ts +7 -219
- package/dist/plugins/cms/api/index.mjs +2 -1
- package/dist/plugins/cms/client/hooks/index.d.cts +1 -1
- package/dist/plugins/cms/client/hooks/index.d.mts +1 -1
- package/dist/plugins/cms/client/hooks/index.d.ts +1 -1
- package/dist/plugins/cms/query-keys.cjs +2 -1
- package/dist/plugins/cms/query-keys.d.cts +5 -9
- package/dist/plugins/cms/query-keys.d.mts +5 -9
- package/dist/plugins/cms/query-keys.d.ts +5 -9
- package/dist/plugins/cms/query-keys.mjs +2 -1
- package/dist/plugins/form-builder/api/index.cjs +6 -0
- package/dist/plugins/form-builder/api/index.d.cts +7 -211
- package/dist/plugins/form-builder/api/index.d.mts +7 -211
- package/dist/plugins/form-builder/api/index.d.ts +7 -211
- package/dist/plugins/form-builder/api/index.mjs +2 -1
- package/dist/plugins/form-builder/client/components/index.d.cts +1 -1
- package/dist/plugins/form-builder/client/components/index.d.mts +1 -1
- package/dist/plugins/form-builder/client/components/index.d.ts +1 -1
- package/dist/plugins/form-builder/client/hooks/index.d.cts +1 -1
- package/dist/plugins/form-builder/client/hooks/index.d.mts +1 -1
- package/dist/plugins/form-builder/client/hooks/index.d.ts +1 -1
- package/dist/plugins/form-builder/query-keys.cjs +3 -2
- package/dist/plugins/form-builder/query-keys.d.cts +6 -6
- package/dist/plugins/form-builder/query-keys.d.mts +6 -6
- package/dist/plugins/form-builder/query-keys.d.ts +6 -6
- package/dist/plugins/form-builder/query-keys.mjs +3 -2
- package/dist/plugins/kanban/api/index.cjs +6 -0
- package/dist/plugins/kanban/api/index.d.cts +17 -392
- package/dist/plugins/kanban/api/index.d.mts +17 -392
- package/dist/plugins/kanban/api/index.d.ts +17 -392
- package/dist/plugins/kanban/api/index.mjs +2 -0
- package/dist/plugins/kanban/client/components/index.d.cts +1 -1
- package/dist/plugins/kanban/client/components/index.d.mts +1 -1
- package/dist/plugins/kanban/client/components/index.d.ts +1 -1
- package/dist/plugins/kanban/client/hooks/index.d.cts +1 -1
- package/dist/plugins/kanban/client/hooks/index.d.mts +1 -1
- package/dist/plugins/kanban/client/hooks/index.d.ts +1 -1
- package/dist/plugins/kanban/client/index.d.cts +1 -1
- package/dist/plugins/kanban/client/index.d.mts +1 -1
- package/dist/plugins/kanban/client/index.d.ts +1 -1
- package/dist/plugins/kanban/query-keys.cjs +2 -9
- package/dist/plugins/kanban/query-keys.d.cts +4 -16
- package/dist/plugins/kanban/query-keys.d.mts +4 -16
- package/dist/plugins/kanban/query-keys.d.ts +4 -16
- package/dist/plugins/kanban/query-keys.mjs +2 -9
- package/dist/plugins/ui-builder/index.d.cts +1 -1
- package/dist/plugins/ui-builder/index.d.mts +1 -1
- package/dist/plugins/ui-builder/index.d.ts +1 -1
- package/dist/shared/stack.B1EeBt1b.d.ts +297 -0
- package/dist/shared/stack.BIXEI6v_.d.mts +419 -0
- package/dist/shared/stack.BKfolAyK.d.ts +419 -0
- package/dist/shared/stack.BpolpQpf.d.cts +445 -0
- package/dist/shared/stack.C5dtIncc.d.mts +293 -0
- package/dist/shared/stack.CIP6QS9l.d.ts +293 -0
- package/dist/shared/stack.CP68pFEH.d.mts +297 -0
- package/dist/shared/{stack.CXjzTMsb.d.mts → stack.CVDTkMoO.d.cts} +7 -1
- package/dist/shared/{stack.CXjzTMsb.d.ts → stack.CVDTkMoO.d.mts} +7 -1
- package/dist/shared/{stack.CXjzTMsb.d.cts → stack.CVDTkMoO.d.ts} +7 -1
- package/dist/shared/{stack.QD1y_7NY.d.mts → stack.DJaKVY7v.d.cts} +1 -1
- package/dist/shared/{stack.QD1y_7NY.d.ts → stack.DJaKVY7v.d.mts} +1 -1
- package/dist/shared/{stack.QD1y_7NY.d.cts → stack.DJaKVY7v.d.ts} +1 -1
- package/dist/shared/{stack.CIrIsc-A.d.mts → stack.DdI5W6MB.d.cts} +7 -1
- package/dist/shared/{stack.CIrIsc-A.d.ts → stack.DdI5W6MB.d.mts} +7 -1
- package/dist/shared/{stack.CIrIsc-A.d.cts → stack.DdI5W6MB.d.ts} +7 -1
- package/dist/shared/stack.Dw0Ly2TM.d.cts +293 -0
- package/dist/shared/stack.IdtKDRka.d.cts +297 -0
- package/dist/shared/stack.TIBF2AOx.d.ts +445 -0
- package/dist/shared/stack.rTy7-wQU.d.mts +445 -0
- package/dist/shared/stack.snB1EDP7.d.cts +419 -0
- package/package.json +3 -3
- package/src/plugins/blog/api/index.ts +2 -0
- package/src/plugins/blog/api/plugin.ts +85 -0
- package/src/plugins/blog/api/query-key-defs.ts +46 -0
- package/src/plugins/blog/api/serializers.ts +27 -0
- package/src/plugins/blog/client/plugin.tsx +19 -0
- package/src/plugins/blog/query-keys.ts +5 -7
- package/src/plugins/client/index.ts +1 -1
- package/src/plugins/cms/api/getters.ts +24 -0
- package/src/plugins/cms/api/index.ts +10 -1
- package/src/plugins/cms/api/plugin.ts +105 -0
- package/src/plugins/cms/api/query-key-defs.ts +53 -0
- package/src/plugins/cms/api/serializers.ts +12 -0
- package/src/plugins/cms/client/plugin.tsx +19 -0
- package/src/plugins/cms/query-keys.ts +2 -1
- package/src/plugins/form-builder/api/getters.ts +23 -0
- package/src/plugins/form-builder/api/index.ts +15 -2
- package/src/plugins/form-builder/api/plugin.ts +91 -0
- package/src/plugins/form-builder/api/query-key-defs.ts +79 -0
- package/src/plugins/form-builder/api/serializers.ts +12 -0
- package/src/plugins/form-builder/client/plugin.tsx +19 -0
- package/src/plugins/form-builder/query-keys.ts +6 -2
- package/src/plugins/kanban/api/index.ts +3 -0
- package/src/plugins/kanban/api/plugin.ts +49 -0
- package/src/plugins/kanban/api/query-key-defs.ts +54 -0
- package/src/plugins/kanban/api/serializers.ts +49 -0
- package/src/plugins/kanban/client/plugin.tsx +13 -0
- package/src/plugins/kanban/query-keys.ts +2 -9
- package/src/plugins/utils.ts +19 -0
- package/dist/shared/{stack.BkYlUT_8.d.cts → stack.CBON0dWL.d.cts} +6 -6
- package/dist/shared/{stack.BkYlUT_8.d.mts → stack.CBON0dWL.d.mts} +6 -6
- package/dist/shared/{stack.BkYlUT_8.d.ts → stack.CBON0dWL.d.ts} +6 -6
|
@@ -1,400 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
description: z.ZodOptional<z.ZodString>;
|
|
9
|
-
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
10
|
-
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
11
|
-
name: z.ZodString;
|
|
12
|
-
slug: z.ZodOptional<z.ZodString>;
|
|
13
|
-
ownerId: z.ZodOptional<z.ZodString>;
|
|
14
|
-
organizationId: z.ZodOptional<z.ZodString>;
|
|
15
|
-
}, z.core.$strip>;
|
|
16
|
-
declare const updateBoardSchema: z.ZodObject<{
|
|
17
|
-
createdAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
18
|
-
updatedAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
19
|
-
name: z.ZodOptional<z.ZodString>;
|
|
20
|
-
slug: z.ZodOptional<z.ZodString>;
|
|
21
|
-
description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
22
|
-
ownerId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
23
|
-
organizationId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
24
|
-
id: z.ZodNonOptional<z.ZodOptional<z.ZodString>>;
|
|
25
|
-
}, z.core.$strip>;
|
|
26
|
-
declare const createColumnSchema: z.ZodObject<{
|
|
27
|
-
title: z.ZodString;
|
|
28
|
-
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
29
|
-
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
30
|
-
boardId: z.ZodString;
|
|
31
|
-
order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
32
|
-
}, z.core.$strip>;
|
|
33
|
-
declare const updateColumnSchema: z.ZodObject<{
|
|
34
|
-
createdAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
35
|
-
updatedAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
36
|
-
title: z.ZodOptional<z.ZodString>;
|
|
37
|
-
order: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
|
|
38
|
-
boardId: z.ZodOptional<z.ZodString>;
|
|
39
|
-
id: z.ZodNonOptional<z.ZodOptional<z.ZodString>>;
|
|
40
|
-
}, z.core.$strip>;
|
|
41
|
-
declare const createTaskSchema: z.ZodObject<{
|
|
42
|
-
title: z.ZodString;
|
|
43
|
-
description: z.ZodOptional<z.ZodString>;
|
|
44
|
-
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
45
|
-
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
46
|
-
order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
47
|
-
completedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
48
|
-
priority: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
49
|
-
LOW: "LOW";
|
|
50
|
-
MEDIUM: "MEDIUM";
|
|
51
|
-
HIGH: "HIGH";
|
|
52
|
-
URGENT: "URGENT";
|
|
53
|
-
}>>>;
|
|
54
|
-
columnId: z.ZodString;
|
|
55
|
-
assigneeId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
56
|
-
isArchived: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
57
|
-
}, z.core.$strip>;
|
|
58
|
-
declare const updateTaskSchema: z.ZodObject<{
|
|
59
|
-
completedAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
60
|
-
createdAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
61
|
-
updatedAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
62
|
-
title: z.ZodOptional<z.ZodString>;
|
|
63
|
-
description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
64
|
-
priority: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
65
|
-
LOW: "LOW";
|
|
66
|
-
MEDIUM: "MEDIUM";
|
|
67
|
-
HIGH: "HIGH";
|
|
68
|
-
URGENT: "URGENT";
|
|
69
|
-
}>>>>;
|
|
70
|
-
order: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
|
|
71
|
-
columnId: z.ZodOptional<z.ZodString>;
|
|
72
|
-
assigneeId: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
73
|
-
isArchived: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
74
|
-
id: z.ZodNonOptional<z.ZodOptional<z.ZodString>>;
|
|
75
|
-
}, z.core.$strip>;
|
|
76
|
-
declare const BoardListQuerySchema: z.ZodObject<{
|
|
77
|
-
slug: z.ZodOptional<z.ZodString>;
|
|
78
|
-
ownerId: z.ZodOptional<z.ZodString>;
|
|
79
|
-
organizationId: z.ZodOptional<z.ZodString>;
|
|
80
|
-
offset: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
81
|
-
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
82
|
-
}, z.core.$strip>;
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Paginated result returned by {@link getAllBoards}.
|
|
86
|
-
*/
|
|
87
|
-
interface BoardListResult {
|
|
88
|
-
items: BoardWithColumns[];
|
|
89
|
-
total: number;
|
|
90
|
-
limit?: number;
|
|
91
|
-
offset?: number;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Retrieve all boards matching optional filter criteria, with columns and tasks.
|
|
95
|
-
* Pure DB function - no hooks, no HTTP context. Safe for SSG and server-side use.
|
|
96
|
-
*
|
|
97
|
-
* @param adapter - The database adapter
|
|
98
|
-
* @param params - Optional filter/pagination parameters (same shape as the list API query)
|
|
99
|
-
*/
|
|
100
|
-
declare function getAllBoards(adapter: Adapter, params?: z.infer<typeof BoardListQuerySchema>): Promise<BoardListResult>;
|
|
101
|
-
/**
|
|
102
|
-
* Retrieve a single board by its ID, with all columns and tasks.
|
|
103
|
-
* Returns null if the board is not found.
|
|
104
|
-
* Pure DB function - no hooks, no HTTP context. Safe for SSG and server-side use.
|
|
105
|
-
*
|
|
106
|
-
* @param adapter - The database adapter
|
|
107
|
-
* @param id - The board ID
|
|
108
|
-
*/
|
|
109
|
-
declare function getBoardById(adapter: Adapter, id: string): Promise<BoardWithColumns | null>;
|
|
1
|
+
export { B as BoardListResult, e as KANBAN_QUERY_KEYS, b as KanbanApiContext, K as KanbanApiRouter, c as KanbanBackendHooks, a as KanbanRouteKey, g as getAllBoards, d as getBoardById, k as kanbanBackendPlugin } from '../../../shared/stack.BpolpQpf.cjs';
|
|
2
|
+
import { B as BoardWithColumns, S as SerializedBoardWithColumns, C as ColumnWithTasks, a as SerializedColumn, T as Task, b as SerializedTask } from '../../../shared/stack.DJaKVY7v.cjs';
|
|
3
|
+
import '@btst/stack/plugins/api';
|
|
4
|
+
import 'better-call';
|
|
5
|
+
import '@btst/db';
|
|
6
|
+
import 'zod';
|
|
7
|
+
import '@tanstack/react-query';
|
|
110
8
|
|
|
111
9
|
/**
|
|
112
|
-
*
|
|
10
|
+
* Serialize a Task for SSR/SSG use (convert dates to strings).
|
|
11
|
+
* Pure function — no DB access, no hooks.
|
|
113
12
|
*/
|
|
114
|
-
|
|
115
|
-
body?: TBody;
|
|
116
|
-
params?: TParams;
|
|
117
|
-
query?: TQuery;
|
|
118
|
-
request?: Request;
|
|
119
|
-
headers?: Headers;
|
|
120
|
-
[key: string]: unknown;
|
|
121
|
-
}
|
|
13
|
+
declare function serializeTask(task: Task): SerializedTask;
|
|
122
14
|
/**
|
|
123
|
-
*
|
|
124
|
-
*
|
|
15
|
+
* Serialize a Column (with its tasks) for SSR/SSG use (convert dates to strings).
|
|
16
|
+
* Pure function — no DB access, no hooks.
|
|
125
17
|
*/
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Called before listing boards. Return false to deny access.
|
|
129
|
-
*/
|
|
130
|
-
onBeforeListBoards?: (filter: z.infer<typeof BoardListQuerySchema>, context: KanbanApiContext) => Promise<boolean> | boolean;
|
|
131
|
-
/**
|
|
132
|
-
* Called before creating a board. Return false to deny access.
|
|
133
|
-
*/
|
|
134
|
-
onBeforeCreateBoard?: (data: z.infer<typeof createBoardSchema>, context: KanbanApiContext) => Promise<boolean> | boolean;
|
|
135
|
-
/**
|
|
136
|
-
* Called before reading a single board. Return false to deny access.
|
|
137
|
-
*/
|
|
138
|
-
onBeforeReadBoard?: (boardId: string, context: KanbanApiContext) => Promise<boolean> | boolean;
|
|
139
|
-
/**
|
|
140
|
-
* Called before updating a board. Return false to deny access.
|
|
141
|
-
*/
|
|
142
|
-
onBeforeUpdateBoard?: (boardId: string, data: z.infer<typeof updateBoardSchema>, context: KanbanApiContext) => Promise<boolean> | boolean;
|
|
143
|
-
/**
|
|
144
|
-
* Called before deleting a board. Return false to deny access.
|
|
145
|
-
*/
|
|
146
|
-
onBeforeDeleteBoard?: (boardId: string, context: KanbanApiContext) => Promise<boolean> | boolean;
|
|
147
|
-
/**
|
|
148
|
-
* Called after boards are listed successfully.
|
|
149
|
-
* Receives the items array (same shape as `board[]`) for consistency
|
|
150
|
-
* with analogous hooks in other plugins (e.g. `onPostsRead`).
|
|
151
|
-
*/
|
|
152
|
-
onBoardsRead?: (boards: BoardWithColumns[], filter: z.infer<typeof BoardListQuerySchema>, context: KanbanApiContext) => Promise<void> | void;
|
|
153
|
-
/**
|
|
154
|
-
* Called after a single board is read successfully
|
|
155
|
-
*/
|
|
156
|
-
onBoardRead?: (board: Board, context: KanbanApiContext) => Promise<void> | void;
|
|
157
|
-
/**
|
|
158
|
-
* Called after a board is created successfully
|
|
159
|
-
*/
|
|
160
|
-
onBoardCreated?: (board: Board, context: KanbanApiContext) => Promise<void> | void;
|
|
161
|
-
/**
|
|
162
|
-
* Called after a board is updated successfully
|
|
163
|
-
*/
|
|
164
|
-
onBoardUpdated?: (board: Board, context: KanbanApiContext) => Promise<void> | void;
|
|
165
|
-
/**
|
|
166
|
-
* Called after a board is deleted successfully
|
|
167
|
-
*/
|
|
168
|
-
onBoardDeleted?: (boardId: string, context: KanbanApiContext) => Promise<void> | void;
|
|
169
|
-
/**
|
|
170
|
-
* Called when listing boards fails
|
|
171
|
-
*/
|
|
172
|
-
onListBoardsError?: (error: Error, context: KanbanApiContext) => Promise<void> | void;
|
|
173
|
-
/**
|
|
174
|
-
* Called when reading a single board fails
|
|
175
|
-
*/
|
|
176
|
-
onReadBoardError?: (error: Error, context: KanbanApiContext) => Promise<void> | void;
|
|
177
|
-
/**
|
|
178
|
-
* Called when creating a board fails
|
|
179
|
-
*/
|
|
180
|
-
onCreateBoardError?: (error: Error, context: KanbanApiContext) => Promise<void> | void;
|
|
181
|
-
/**
|
|
182
|
-
* Called when updating a board fails
|
|
183
|
-
*/
|
|
184
|
-
onUpdateBoardError?: (error: Error, context: KanbanApiContext) => Promise<void> | void;
|
|
185
|
-
/**
|
|
186
|
-
* Called when deleting a board fails
|
|
187
|
-
*/
|
|
188
|
-
onDeleteBoardError?: (error: Error, context: KanbanApiContext) => Promise<void> | void;
|
|
189
|
-
/**
|
|
190
|
-
* Called before creating a column. Return false to deny access.
|
|
191
|
-
*/
|
|
192
|
-
onBeforeCreateColumn?: (data: z.infer<typeof createColumnSchema>, context: KanbanApiContext) => Promise<boolean> | boolean;
|
|
193
|
-
/**
|
|
194
|
-
* Called before updating a column. Return false to deny access.
|
|
195
|
-
*/
|
|
196
|
-
onBeforeUpdateColumn?: (columnId: string, data: z.infer<typeof updateColumnSchema>, context: KanbanApiContext) => Promise<boolean> | boolean;
|
|
197
|
-
/**
|
|
198
|
-
* Called before deleting a column. Return false to deny access.
|
|
199
|
-
*/
|
|
200
|
-
onBeforeDeleteColumn?: (columnId: string, context: KanbanApiContext) => Promise<boolean> | boolean;
|
|
201
|
-
/**
|
|
202
|
-
* Called after a column is created successfully
|
|
203
|
-
*/
|
|
204
|
-
onColumnCreated?: (column: Column, context: KanbanApiContext) => Promise<void> | void;
|
|
205
|
-
/**
|
|
206
|
-
* Called after a column is updated successfully
|
|
207
|
-
*/
|
|
208
|
-
onColumnUpdated?: (column: Column, context: KanbanApiContext) => Promise<void> | void;
|
|
209
|
-
/**
|
|
210
|
-
* Called after a column is deleted successfully
|
|
211
|
-
*/
|
|
212
|
-
onColumnDeleted?: (columnId: string, context: KanbanApiContext) => Promise<void> | void;
|
|
213
|
-
/**
|
|
214
|
-
* Called before creating a task. Return false to deny access.
|
|
215
|
-
*/
|
|
216
|
-
onBeforeCreateTask?: (data: z.infer<typeof createTaskSchema>, context: KanbanApiContext) => Promise<boolean> | boolean;
|
|
217
|
-
/**
|
|
218
|
-
* Called before updating a task. Return false to deny access.
|
|
219
|
-
*/
|
|
220
|
-
onBeforeUpdateTask?: (taskId: string, data: z.infer<typeof updateTaskSchema>, context: KanbanApiContext) => Promise<boolean> | boolean;
|
|
221
|
-
/**
|
|
222
|
-
* Called before deleting a task. Return false to deny access.
|
|
223
|
-
*/
|
|
224
|
-
onBeforeDeleteTask?: (taskId: string, context: KanbanApiContext) => Promise<boolean> | boolean;
|
|
225
|
-
/**
|
|
226
|
-
* Called after a task is created successfully
|
|
227
|
-
*/
|
|
228
|
-
onTaskCreated?: (task: Task, context: KanbanApiContext) => Promise<void> | void;
|
|
229
|
-
/**
|
|
230
|
-
* Called after a task is updated successfully
|
|
231
|
-
*/
|
|
232
|
-
onTaskUpdated?: (task: Task, context: KanbanApiContext) => Promise<void> | void;
|
|
233
|
-
/**
|
|
234
|
-
* Called after a task is deleted successfully
|
|
235
|
-
*/
|
|
236
|
-
onTaskDeleted?: (taskId: string, context: KanbanApiContext) => Promise<void> | void;
|
|
237
|
-
}
|
|
18
|
+
declare function serializeColumn(col: ColumnWithTasks): SerializedColumn;
|
|
238
19
|
/**
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
* @param hooks - Optional configuration hooks for customizing plugin behavior
|
|
20
|
+
* Serialize a Board (with columns and tasks) for SSR/SSG use (convert dates to strings).
|
|
21
|
+
* Pure function — no DB access, no hooks.
|
|
243
22
|
*/
|
|
244
|
-
declare
|
|
245
|
-
readonly listBoards: better_call.StrictEndpoint<"/boards", {
|
|
246
|
-
method: "GET";
|
|
247
|
-
query: z.ZodObject<{
|
|
248
|
-
slug: z.ZodOptional<z.ZodString>;
|
|
249
|
-
ownerId: z.ZodOptional<z.ZodString>;
|
|
250
|
-
organizationId: z.ZodOptional<z.ZodString>;
|
|
251
|
-
offset: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
252
|
-
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
253
|
-
}, z.core.$strip>;
|
|
254
|
-
}, BoardListResult>;
|
|
255
|
-
readonly getBoard: better_call.StrictEndpoint<"/boards/:id", {
|
|
256
|
-
method: "GET";
|
|
257
|
-
}, BoardWithColumns>;
|
|
258
|
-
readonly createBoard: better_call.StrictEndpoint<"/boards", {
|
|
259
|
-
method: "POST";
|
|
260
|
-
body: z.ZodObject<{
|
|
261
|
-
description: z.ZodOptional<z.ZodString>;
|
|
262
|
-
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
263
|
-
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
264
|
-
name: z.ZodString;
|
|
265
|
-
slug: z.ZodOptional<z.ZodString>;
|
|
266
|
-
ownerId: z.ZodOptional<z.ZodString>;
|
|
267
|
-
organizationId: z.ZodOptional<z.ZodString>;
|
|
268
|
-
}, z.core.$strip>;
|
|
269
|
-
}, {
|
|
270
|
-
columns: ColumnWithTasks[];
|
|
271
|
-
id: string;
|
|
272
|
-
name: string;
|
|
273
|
-
slug: string;
|
|
274
|
-
description?: string;
|
|
275
|
-
ownerId?: string;
|
|
276
|
-
organizationId?: string;
|
|
277
|
-
createdAt: Date;
|
|
278
|
-
updatedAt: Date;
|
|
279
|
-
}>;
|
|
280
|
-
readonly updateBoard: better_call.StrictEndpoint<"/boards/:id", {
|
|
281
|
-
method: "PUT";
|
|
282
|
-
body: z.ZodObject<{
|
|
283
|
-
description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
284
|
-
createdAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
285
|
-
updatedAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
286
|
-
name: z.ZodOptional<z.ZodString>;
|
|
287
|
-
slug: z.ZodOptional<z.ZodString>;
|
|
288
|
-
ownerId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
289
|
-
organizationId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
290
|
-
}, z.core.$strip>;
|
|
291
|
-
}, Board>;
|
|
292
|
-
readonly deleteBoard: better_call.StrictEndpoint<"/boards/:id", {
|
|
293
|
-
method: "DELETE";
|
|
294
|
-
}, {
|
|
295
|
-
success: boolean;
|
|
296
|
-
}>;
|
|
297
|
-
readonly createColumn: better_call.StrictEndpoint<"/columns", {
|
|
298
|
-
method: "POST";
|
|
299
|
-
body: z.ZodObject<{
|
|
300
|
-
title: z.ZodString;
|
|
301
|
-
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
302
|
-
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
303
|
-
boardId: z.ZodString;
|
|
304
|
-
order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
305
|
-
}, z.core.$strip>;
|
|
306
|
-
}, Column>;
|
|
307
|
-
readonly updateColumn: better_call.StrictEndpoint<"/columns/:id", {
|
|
308
|
-
method: "PUT";
|
|
309
|
-
body: z.ZodObject<{
|
|
310
|
-
title: z.ZodOptional<z.ZodString>;
|
|
311
|
-
createdAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
312
|
-
updatedAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
313
|
-
boardId: z.ZodOptional<z.ZodString>;
|
|
314
|
-
order: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
|
|
315
|
-
}, z.core.$strip>;
|
|
316
|
-
}, Column>;
|
|
317
|
-
readonly deleteColumn: better_call.StrictEndpoint<"/columns/:id", {
|
|
318
|
-
method: "DELETE";
|
|
319
|
-
}, {
|
|
320
|
-
success: boolean;
|
|
321
|
-
}>;
|
|
322
|
-
readonly reorderColumns: better_call.StrictEndpoint<"/columns/reorder", {
|
|
323
|
-
method: "POST";
|
|
324
|
-
body: z.ZodObject<{
|
|
325
|
-
boardId: z.ZodString;
|
|
326
|
-
columnIds: z.ZodArray<z.ZodString>;
|
|
327
|
-
}, z.core.$strip>;
|
|
328
|
-
}, {
|
|
329
|
-
success: boolean;
|
|
330
|
-
}>;
|
|
331
|
-
readonly createTask: better_call.StrictEndpoint<"/tasks", {
|
|
332
|
-
method: "POST";
|
|
333
|
-
body: z.ZodObject<{
|
|
334
|
-
title: z.ZodString;
|
|
335
|
-
description: z.ZodOptional<z.ZodString>;
|
|
336
|
-
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
337
|
-
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
338
|
-
order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
339
|
-
completedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
340
|
-
priority: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
341
|
-
LOW: "LOW";
|
|
342
|
-
MEDIUM: "MEDIUM";
|
|
343
|
-
HIGH: "HIGH";
|
|
344
|
-
URGENT: "URGENT";
|
|
345
|
-
}>>>;
|
|
346
|
-
columnId: z.ZodString;
|
|
347
|
-
assigneeId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
348
|
-
isArchived: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
349
|
-
}, z.core.$strip>;
|
|
350
|
-
}, Task>;
|
|
351
|
-
readonly updateTask: better_call.StrictEndpoint<"/tasks/:id", {
|
|
352
|
-
method: "PUT";
|
|
353
|
-
body: z.ZodObject<{
|
|
354
|
-
title: z.ZodOptional<z.ZodString>;
|
|
355
|
-
description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
356
|
-
createdAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
357
|
-
updatedAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
358
|
-
order: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
|
|
359
|
-
completedAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
360
|
-
priority: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
361
|
-
LOW: "LOW";
|
|
362
|
-
MEDIUM: "MEDIUM";
|
|
363
|
-
HIGH: "HIGH";
|
|
364
|
-
URGENT: "URGENT";
|
|
365
|
-
}>>>>;
|
|
366
|
-
columnId: z.ZodOptional<z.ZodString>;
|
|
367
|
-
assigneeId: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
368
|
-
isArchived: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
369
|
-
}, z.core.$strip>;
|
|
370
|
-
}, Task>;
|
|
371
|
-
readonly deleteTask: better_call.StrictEndpoint<"/tasks/:id", {
|
|
372
|
-
method: "DELETE";
|
|
373
|
-
}, {
|
|
374
|
-
success: boolean;
|
|
375
|
-
}>;
|
|
376
|
-
readonly moveTask: better_call.StrictEndpoint<"/tasks/move", {
|
|
377
|
-
method: "POST";
|
|
378
|
-
body: z.ZodObject<{
|
|
379
|
-
taskId: z.ZodString;
|
|
380
|
-
targetColumnId: z.ZodString;
|
|
381
|
-
targetOrder: z.ZodNumber;
|
|
382
|
-
}, z.core.$strip>;
|
|
383
|
-
}, Task>;
|
|
384
|
-
readonly reorderTasks: better_call.StrictEndpoint<"/tasks/reorder", {
|
|
385
|
-
method: "POST";
|
|
386
|
-
body: z.ZodObject<{
|
|
387
|
-
columnId: z.ZodString;
|
|
388
|
-
taskIds: z.ZodArray<z.ZodString>;
|
|
389
|
-
}, z.core.$strip>;
|
|
390
|
-
}, {
|
|
391
|
-
success: boolean;
|
|
392
|
-
}>;
|
|
393
|
-
}, {
|
|
394
|
-
getAllBoards: (params?: Parameters<typeof getAllBoards>[1]) => Promise<BoardListResult>;
|
|
395
|
-
getBoardById: (id: string) => Promise<BoardWithColumns | null>;
|
|
396
|
-
}>;
|
|
397
|
-
type KanbanApiRouter = ReturnType<ReturnType<typeof kanbanBackendPlugin>["routes"]>;
|
|
23
|
+
declare function serializeBoard(board: BoardWithColumns): SerializedBoardWithColumns;
|
|
398
24
|
|
|
399
|
-
export {
|
|
400
|
-
export type { BoardListResult, KanbanApiContext, KanbanApiRouter, KanbanBackendHooks };
|
|
25
|
+
export { serializeBoard, serializeColumn, serializeTask };
|