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