@btst/stack 2.2.0 → 2.4.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/client/components/compose.cjs +1 -2
- package/dist/packages/stack/src/client/components/compose.mjs +1 -2
- package/dist/packages/stack/src/plugins/ai-chat/api/page-tools.cjs +71 -0
- package/dist/packages/stack/src/plugins/ai-chat/api/page-tools.mjs +68 -0
- package/dist/packages/stack/src/plugins/ai-chat/api/plugin.cjs +54 -7
- package/dist/packages/stack/src/plugins/ai-chat/api/plugin.mjs +54 -7
- package/dist/packages/stack/src/plugins/ai-chat/client/components/chat-input.cjs +2 -2
- package/dist/packages/stack/src/plugins/ai-chat/client/components/chat-input.mjs +2 -2
- package/dist/packages/stack/src/plugins/ai-chat/client/components/chat-interface.cjs +89 -22
- package/dist/packages/stack/src/plugins/ai-chat/client/components/chat-interface.mjs +90 -23
- package/dist/packages/stack/src/plugins/ai-chat/client/components/chat-layout.cjs +110 -33
- package/dist/packages/stack/src/plugins/ai-chat/client/components/chat-layout.mjs +112 -35
- package/dist/packages/stack/src/plugins/ai-chat/client/components/chat-sidebar.cjs +1 -1
- package/dist/packages/stack/src/plugins/ai-chat/client/components/chat-sidebar.mjs +1 -1
- package/dist/packages/stack/src/plugins/ai-chat/schemas.cjs +17 -1
- package/dist/packages/stack/src/plugins/ai-chat/schemas.mjs +17 -1
- 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/components/forms/post-forms.cjs +15 -2
- package/dist/packages/stack/src/plugins/blog/client/components/forms/post-forms.mjs +16 -3
- package/dist/packages/stack/src/plugins/blog/client/components/pages/edit-post-page.internal.cjs +24 -1
- package/dist/packages/stack/src/plugins/blog/client/components/pages/edit-post-page.internal.mjs +24 -1
- package/dist/packages/stack/src/plugins/blog/client/components/pages/fill-blog-form-handler.cjs +26 -0
- package/dist/packages/stack/src/plugins/blog/client/components/pages/fill-blog-form-handler.mjs +24 -0
- package/dist/packages/stack/src/plugins/blog/client/components/pages/new-post-page.internal.cjs +30 -1
- package/dist/packages/stack/src/plugins/blog/client/components/pages/new-post-page.internal.mjs +30 -1
- package/dist/packages/stack/src/plugins/blog/client/components/pages/post-page.internal.cjs +18 -0
- package/dist/packages/stack/src/plugins/blog/client/components/pages/post-page.internal.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/mutations.cjs +48 -0
- package/dist/packages/stack/src/plugins/cms/api/mutations.mjs +46 -0
- package/dist/packages/stack/src/plugins/cms/api/plugin.cjs +75 -0
- package/dist/packages/stack/src/plugins/cms/api/plugin.mjs +76 -1
- 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/mutations.cjs +91 -0
- package/dist/packages/stack/src/plugins/kanban/api/mutations.mjs +87 -0
- package/dist/packages/stack/src/plugins/kanban/api/plugin.cjs +34 -1
- package/dist/packages/stack/src/plugins/kanban/api/plugin.mjs +34 -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/hooks/kanban-hooks.cjs +7 -3
- package/dist/packages/stack/src/plugins/kanban/client/hooks/kanban-hooks.mjs +7 -3
- 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/ui-builder/client/components/pages/page-builder-page.internal.cjs +89 -0
- package/dist/packages/stack/src/plugins/ui-builder/client/components/pages/page-builder-page.internal.mjs +89 -0
- 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.d.cts +1 -1
- package/dist/plugins/ai-chat/api/index.d.mts +1 -1
- package/dist/plugins/ai-chat/api/index.d.ts +1 -1
- package/dist/plugins/ai-chat/client/components/index.d.cts +1 -1
- package/dist/plugins/ai-chat/client/components/index.d.mts +1 -1
- package/dist/plugins/ai-chat/client/components/index.d.ts +1 -1
- package/dist/plugins/ai-chat/client/context/page-ai-context.cjs +92 -0
- package/dist/plugins/ai-chat/client/context/page-ai-context.d.cts +84 -0
- package/dist/plugins/ai-chat/client/context/page-ai-context.d.mts +84 -0
- package/dist/plugins/ai-chat/client/context/page-ai-context.d.ts +84 -0
- package/dist/plugins/ai-chat/client/context/page-ai-context.mjs +88 -0
- package/dist/plugins/ai-chat/client/hooks/index.d.cts +1 -1
- package/dist/plugins/ai-chat/client/hooks/index.d.mts +1 -1
- package/dist/plugins/ai-chat/client/hooks/index.d.ts +1 -1
- package/dist/plugins/ai-chat/client/index.d.cts +2 -2
- package/dist/plugins/ai-chat/client/index.d.mts +2 -2
- package/dist/plugins/ai-chat/client/index.d.ts +2 -2
- package/dist/plugins/ai-chat/query-keys.d.cts +1 -1
- package/dist/plugins/ai-chat/query-keys.d.mts +1 -1
- package/dist/plugins/ai-chat/query-keys.d.ts +1 -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 +3 -3
- package/dist/plugins/blog/client/hooks/index.d.mts +3 -3
- package/dist/plugins/blog/client/hooks/index.d.ts +3 -3
- 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 +8 -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 +3 -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 +10 -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 +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 +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.B7ONvlD_.d.mts +293 -0
- package/dist/shared/{stack.BeSm90va.d.ts → stack.BEn34wW6.d.ts} +60 -2
- package/dist/shared/stack.BUkC2EsZ.d.cts +327 -0
- package/dist/shared/{stack.DaOcgmrM.d.ts → stack.BV9hnvu4.d.cts} +31 -7
- package/dist/shared/{stack.DaOcgmrM.d.cts → stack.BV9hnvu4.d.mts} +31 -7
- package/dist/shared/{stack.DaOcgmrM.d.mts → stack.BV9hnvu4.d.ts} +31 -7
- package/dist/shared/stack.BepFXT3w.d.mts +500 -0
- package/dist/shared/stack.CL8ts1Mu.d.ts +419 -0
- package/dist/shared/{stack.CXjzTMsb.d.cts → stack.CVDTkMoO.d.cts} +7 -1
- package/dist/shared/{stack.CXjzTMsb.d.mts → stack.CVDTkMoO.d.mts} +7 -1
- package/dist/shared/{stack.CXjzTMsb.d.ts → stack.CVDTkMoO.d.ts} +7 -1
- package/dist/shared/stack.CczspVn2.d.mts +327 -0
- package/dist/shared/stack.CgWzG5jH.d.ts +500 -0
- package/dist/shared/stack.D3GB6wKv.d.cts +500 -0
- package/dist/shared/stack.DASmUVjX.d.ts +327 -0
- package/dist/shared/{stack.QD1y_7NY.d.cts → stack.DJaKVY7v.d.cts} +1 -1
- package/dist/shared/{stack.QD1y_7NY.d.mts → stack.DJaKVY7v.d.mts} +1 -1
- package/dist/shared/{stack.QD1y_7NY.d.ts → stack.DJaKVY7v.d.ts} +1 -1
- package/dist/shared/{stack.Dg09R0oB.d.mts → stack.DTDxgFj8.d.mts} +60 -2
- package/dist/shared/{stack.CMh_EdxW.d.cts → stack.DWoCZff7.d.cts} +60 -2
- package/dist/shared/{stack.CIrIsc-A.d.cts → stack.DdI5W6MB.d.cts} +7 -1
- package/dist/shared/{stack.CIrIsc-A.d.mts → stack.DdI5W6MB.d.mts} +7 -1
- package/dist/shared/{stack.CIrIsc-A.d.ts → stack.DdI5W6MB.d.ts} +7 -1
- package/dist/shared/stack.Dk5r4W1F.d.mts +419 -0
- package/dist/shared/stack.Kq2-QzOC.d.ts +293 -0
- package/dist/shared/stack.heOA9gzA.d.cts +419 -0
- package/dist/shared/stack.kcdnD4gA.d.cts +293 -0
- package/package.json +16 -3
- package/src/client/components/compose.tsx +7 -4
- package/src/plugins/ai-chat/api/page-tools.ts +111 -0
- package/src/plugins/ai-chat/api/plugin.ts +180 -9
- package/src/plugins/ai-chat/client/components/chat-input.tsx +2 -2
- package/src/plugins/ai-chat/client/components/chat-interface.tsx +154 -58
- package/src/plugins/ai-chat/client/components/chat-layout.tsx +166 -32
- package/src/plugins/ai-chat/client/components/chat-sidebar.tsx +1 -1
- package/src/plugins/ai-chat/client/context/page-ai-context.tsx +240 -0
- package/src/plugins/ai-chat/schemas.ts +16 -0
- 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/components/forms/post-forms.tsx +29 -2
- package/src/plugins/blog/client/components/pages/edit-post-page.internal.tsx +28 -0
- package/src/plugins/blog/client/components/pages/fill-blog-form-handler.ts +38 -0
- package/src/plugins/blog/client/components/pages/new-post-page.internal.tsx +33 -1
- package/src/plugins/blog/client/components/pages/post-page.internal.tsx +20 -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 +14 -1
- package/src/plugins/cms/api/mutations.ts +84 -0
- package/src/plugins/cms/api/plugin.ts +114 -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 +9 -0
- package/src/plugins/kanban/api/mutations.ts +169 -0
- package/src/plugins/kanban/api/plugin.ts +61 -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/hooks/kanban-hooks.tsx +4 -0
- package/src/plugins/kanban/client/plugin.tsx +13 -0
- package/src/plugins/kanban/query-keys.ts +2 -9
- package/src/plugins/ui-builder/client/components/pages/page-builder-page.internal.tsx +132 -0
- package/src/plugins/utils.ts +19 -0
- package/dist/shared/{stack.BkYlUT_8.d.cts → stack.BQmuNl5p.d.cts} +6 -6
- package/dist/shared/{stack.BkYlUT_8.d.mts → stack.BQmuNl5p.d.mts} +6 -6
- package/dist/shared/{stack.BkYlUT_8.d.ts → stack.BQmuNl5p.d.ts} +6 -6
|
@@ -0,0 +1,500 @@
|
|
|
1
|
+
import * as _btst_stack_plugins_api from '@btst/stack/plugins/api';
|
|
2
|
+
import * as better_call from 'better-call';
|
|
3
|
+
import { Adapter } from '@btst/db';
|
|
4
|
+
import { B as BoardWithColumns, P as Priority, T as Task, d as Board, e as Column, C as ColumnWithTasks } from './stack.DJaKVY7v.js';
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
7
|
+
|
|
8
|
+
declare const createBoardSchema: z.ZodObject<{
|
|
9
|
+
description: z.ZodOptional<z.ZodString>;
|
|
10
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
11
|
+
ownerId: z.ZodOptional<z.ZodString>;
|
|
12
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
13
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
14
|
+
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
15
|
+
name: z.ZodString;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
declare const updateBoardSchema: z.ZodObject<{
|
|
18
|
+
createdAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
19
|
+
updatedAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
20
|
+
name: z.ZodOptional<z.ZodString>;
|
|
21
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
22
|
+
description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
23
|
+
ownerId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
24
|
+
organizationId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
25
|
+
id: z.ZodNonOptional<z.ZodOptional<z.ZodString>>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
declare const createColumnSchema: z.ZodObject<{
|
|
28
|
+
title: z.ZodString;
|
|
29
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
30
|
+
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
31
|
+
order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
32
|
+
boardId: z.ZodString;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
declare const updateColumnSchema: z.ZodObject<{
|
|
35
|
+
createdAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
36
|
+
updatedAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
37
|
+
title: z.ZodOptional<z.ZodString>;
|
|
38
|
+
order: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
|
|
39
|
+
boardId: z.ZodOptional<z.ZodString>;
|
|
40
|
+
id: z.ZodNonOptional<z.ZodOptional<z.ZodString>>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
declare const createTaskSchema: z.ZodObject<{
|
|
43
|
+
title: z.ZodString;
|
|
44
|
+
description: z.ZodOptional<z.ZodString>;
|
|
45
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
46
|
+
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
47
|
+
order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
48
|
+
completedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
49
|
+
priority: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
50
|
+
LOW: "LOW";
|
|
51
|
+
MEDIUM: "MEDIUM";
|
|
52
|
+
HIGH: "HIGH";
|
|
53
|
+
URGENT: "URGENT";
|
|
54
|
+
}>>>;
|
|
55
|
+
columnId: z.ZodString;
|
|
56
|
+
assigneeId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
57
|
+
isArchived: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
declare const updateTaskSchema: z.ZodObject<{
|
|
60
|
+
completedAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
61
|
+
createdAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
62
|
+
updatedAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
63
|
+
title: z.ZodOptional<z.ZodString>;
|
|
64
|
+
description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
65
|
+
priority: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
66
|
+
LOW: "LOW";
|
|
67
|
+
MEDIUM: "MEDIUM";
|
|
68
|
+
HIGH: "HIGH";
|
|
69
|
+
URGENT: "URGENT";
|
|
70
|
+
}>>>>;
|
|
71
|
+
order: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
|
|
72
|
+
columnId: z.ZodOptional<z.ZodString>;
|
|
73
|
+
assigneeId: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
74
|
+
isArchived: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
75
|
+
id: z.ZodNonOptional<z.ZodOptional<z.ZodString>>;
|
|
76
|
+
}, z.core.$strip>;
|
|
77
|
+
declare const BoardListQuerySchema: z.ZodObject<{
|
|
78
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
79
|
+
ownerId: z.ZodOptional<z.ZodString>;
|
|
80
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
81
|
+
offset: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
82
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
83
|
+
}, z.core.$strip>;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Paginated result returned by {@link getAllBoards}.
|
|
87
|
+
*/
|
|
88
|
+
interface BoardListResult {
|
|
89
|
+
items: BoardWithColumns[];
|
|
90
|
+
total: number;
|
|
91
|
+
limit?: number;
|
|
92
|
+
offset?: number;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Retrieve all boards matching optional filter criteria, with columns and tasks.
|
|
96
|
+
* Pure DB function - no hooks, no HTTP context. Safe for SSG and server-side use.
|
|
97
|
+
*
|
|
98
|
+
* @param adapter - The database adapter
|
|
99
|
+
* @param params - Optional filter/pagination parameters (same shape as the list API query)
|
|
100
|
+
*/
|
|
101
|
+
declare function getAllBoards(adapter: Adapter, params?: z.infer<typeof BoardListQuerySchema>): Promise<BoardListResult>;
|
|
102
|
+
/**
|
|
103
|
+
* Retrieve a single board by its ID, with all columns and tasks.
|
|
104
|
+
* Returns null if the board is not found.
|
|
105
|
+
* Pure DB function - no hooks, no HTTP context. Safe for SSG and server-side use.
|
|
106
|
+
*
|
|
107
|
+
* @param adapter - The database adapter
|
|
108
|
+
* @param id - The board ID
|
|
109
|
+
*/
|
|
110
|
+
declare function getBoardById(adapter: Adapter, id: string): Promise<BoardWithColumns | null>;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Input for creating a new Kanban task.
|
|
114
|
+
*/
|
|
115
|
+
interface CreateKanbanTaskInput {
|
|
116
|
+
title: string;
|
|
117
|
+
columnId: string;
|
|
118
|
+
description?: string;
|
|
119
|
+
priority?: Priority;
|
|
120
|
+
assigneeId?: string;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Create a new task in a Kanban column.
|
|
124
|
+
* Computes the next order value from existing tasks in the column.
|
|
125
|
+
*
|
|
126
|
+
* @remarks **Security:** No authorization hooks (onBeforeCreateTask) are called.
|
|
127
|
+
* The caller is responsible for any access-control checks before invoking this
|
|
128
|
+
* function.
|
|
129
|
+
*
|
|
130
|
+
* @param adapter - The database adapter
|
|
131
|
+
* @param input - Task creation input
|
|
132
|
+
*/
|
|
133
|
+
declare function createKanbanTask(adapter: Adapter, input: CreateKanbanTaskInput): Promise<Task>;
|
|
134
|
+
/**
|
|
135
|
+
* Find a board by slug, or create it with the given name and custom column titles.
|
|
136
|
+
*
|
|
137
|
+
* Concurrency-safe at two levels:
|
|
138
|
+
* - **Same process**: concurrent calls with the same slug share a single in-flight
|
|
139
|
+
* Promise (via `_pendingBoardCreations`), so only one DB write is attempted.
|
|
140
|
+
* - **Cross-instance**: the DB `unique` constraint on `slug` causes the losing
|
|
141
|
+
* write to throw; the catch block re-fetches and returns the winner's board.
|
|
142
|
+
*
|
|
143
|
+
* @remarks **Security:** No authorization hooks are called. The caller is
|
|
144
|
+
* responsible for any access-control checks before invoking this function.
|
|
145
|
+
*
|
|
146
|
+
* @param adapter - The database adapter
|
|
147
|
+
* @param slug - Unique URL-safe slug for the board
|
|
148
|
+
* @param name - Display name for the board (used only on creation)
|
|
149
|
+
* @param columnTitles - Ordered list of column names to create (used only on creation)
|
|
150
|
+
*/
|
|
151
|
+
declare function findOrCreateKanbanBoard(adapter: Adapter, slug: string, name: string, columnTitles: string[]): Promise<Board>;
|
|
152
|
+
/**
|
|
153
|
+
* Retrieve all columns for a given board, sorted by order.
|
|
154
|
+
* Co-located with mutations because it is primarily used alongside
|
|
155
|
+
* {@link createKanbanTask} to resolve column IDs before task creation.
|
|
156
|
+
*
|
|
157
|
+
* @remarks **Security:** No authorization hooks are called.
|
|
158
|
+
*
|
|
159
|
+
* @param adapter - The database adapter
|
|
160
|
+
* @param boardId - The board ID
|
|
161
|
+
*/
|
|
162
|
+
declare function getKanbanColumnsByBoardId(adapter: Adapter, boardId: string): Promise<Column[]>;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Route keys for the Kanban plugin — matches the keys returned by
|
|
166
|
+
* `stackClient.router.getRoute(path).routeKey`.
|
|
167
|
+
*/
|
|
168
|
+
type KanbanRouteKey = "boards" | "newBoard" | "board";
|
|
169
|
+
interface KanbanPrefetchForRoute {
|
|
170
|
+
(key: "boards" | "newBoard", qc: QueryClient): Promise<void>;
|
|
171
|
+
(key: "board", qc: QueryClient, params: {
|
|
172
|
+
boardId: string;
|
|
173
|
+
}): Promise<void>;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Context passed to kanban API hooks
|
|
177
|
+
*/
|
|
178
|
+
interface KanbanApiContext<TBody = unknown, TParams = unknown, TQuery = unknown> {
|
|
179
|
+
body?: TBody;
|
|
180
|
+
params?: TParams;
|
|
181
|
+
query?: TQuery;
|
|
182
|
+
request?: Request;
|
|
183
|
+
headers?: Headers;
|
|
184
|
+
[key: string]: unknown;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Configuration hooks for kanban backend plugin
|
|
188
|
+
* All hooks are optional and allow consumers to customize behavior
|
|
189
|
+
*/
|
|
190
|
+
interface KanbanBackendHooks {
|
|
191
|
+
/**
|
|
192
|
+
* Called before listing boards. Return false to deny access.
|
|
193
|
+
*/
|
|
194
|
+
onBeforeListBoards?: (filter: z.infer<typeof BoardListQuerySchema>, context: KanbanApiContext) => Promise<boolean> | boolean;
|
|
195
|
+
/**
|
|
196
|
+
* Called before creating a board. Return false to deny access.
|
|
197
|
+
*/
|
|
198
|
+
onBeforeCreateBoard?: (data: z.infer<typeof createBoardSchema>, context: KanbanApiContext) => Promise<boolean> | boolean;
|
|
199
|
+
/**
|
|
200
|
+
* Called before reading a single board. Return false to deny access.
|
|
201
|
+
*/
|
|
202
|
+
onBeforeReadBoard?: (boardId: string, context: KanbanApiContext) => Promise<boolean> | boolean;
|
|
203
|
+
/**
|
|
204
|
+
* Called before updating a board. Return false to deny access.
|
|
205
|
+
*/
|
|
206
|
+
onBeforeUpdateBoard?: (boardId: string, data: z.infer<typeof updateBoardSchema>, context: KanbanApiContext) => Promise<boolean> | boolean;
|
|
207
|
+
/**
|
|
208
|
+
* Called before deleting a board. Return false to deny access.
|
|
209
|
+
*/
|
|
210
|
+
onBeforeDeleteBoard?: (boardId: string, context: KanbanApiContext) => Promise<boolean> | boolean;
|
|
211
|
+
/**
|
|
212
|
+
* Called after boards are listed successfully.
|
|
213
|
+
* Receives the items array (same shape as `board[]`) for consistency
|
|
214
|
+
* with analogous hooks in other plugins (e.g. `onPostsRead`).
|
|
215
|
+
*/
|
|
216
|
+
onBoardsRead?: (boards: BoardWithColumns[], filter: z.infer<typeof BoardListQuerySchema>, context: KanbanApiContext) => Promise<void> | void;
|
|
217
|
+
/**
|
|
218
|
+
* Called after a single board is read successfully
|
|
219
|
+
*/
|
|
220
|
+
onBoardRead?: (board: Board, context: KanbanApiContext) => Promise<void> | void;
|
|
221
|
+
/**
|
|
222
|
+
* Called after a board is created successfully
|
|
223
|
+
*/
|
|
224
|
+
onBoardCreated?: (board: Board, context: KanbanApiContext) => Promise<void> | void;
|
|
225
|
+
/**
|
|
226
|
+
* Called after a board is updated successfully
|
|
227
|
+
*/
|
|
228
|
+
onBoardUpdated?: (board: Board, context: KanbanApiContext) => Promise<void> | void;
|
|
229
|
+
/**
|
|
230
|
+
* Called after a board is deleted successfully
|
|
231
|
+
*/
|
|
232
|
+
onBoardDeleted?: (boardId: string, context: KanbanApiContext) => Promise<void> | void;
|
|
233
|
+
/**
|
|
234
|
+
* Called when listing boards fails
|
|
235
|
+
*/
|
|
236
|
+
onListBoardsError?: (error: Error, context: KanbanApiContext) => Promise<void> | void;
|
|
237
|
+
/**
|
|
238
|
+
* Called when reading a single board fails
|
|
239
|
+
*/
|
|
240
|
+
onReadBoardError?: (error: Error, context: KanbanApiContext) => Promise<void> | void;
|
|
241
|
+
/**
|
|
242
|
+
* Called when creating a board fails
|
|
243
|
+
*/
|
|
244
|
+
onCreateBoardError?: (error: Error, context: KanbanApiContext) => Promise<void> | void;
|
|
245
|
+
/**
|
|
246
|
+
* Called when updating a board fails
|
|
247
|
+
*/
|
|
248
|
+
onUpdateBoardError?: (error: Error, context: KanbanApiContext) => Promise<void> | void;
|
|
249
|
+
/**
|
|
250
|
+
* Called when deleting a board fails
|
|
251
|
+
*/
|
|
252
|
+
onDeleteBoardError?: (error: Error, context: KanbanApiContext) => Promise<void> | void;
|
|
253
|
+
/**
|
|
254
|
+
* Called before creating a column. Return false to deny access.
|
|
255
|
+
*/
|
|
256
|
+
onBeforeCreateColumn?: (data: z.infer<typeof createColumnSchema>, context: KanbanApiContext) => Promise<boolean> | boolean;
|
|
257
|
+
/**
|
|
258
|
+
* Called before updating a column. Return false to deny access.
|
|
259
|
+
*/
|
|
260
|
+
onBeforeUpdateColumn?: (columnId: string, data: z.infer<typeof updateColumnSchema>, context: KanbanApiContext) => Promise<boolean> | boolean;
|
|
261
|
+
/**
|
|
262
|
+
* Called before deleting a column. Return false to deny access.
|
|
263
|
+
*/
|
|
264
|
+
onBeforeDeleteColumn?: (columnId: string, context: KanbanApiContext) => Promise<boolean> | boolean;
|
|
265
|
+
/**
|
|
266
|
+
* Called after a column is created successfully
|
|
267
|
+
*/
|
|
268
|
+
onColumnCreated?: (column: Column, context: KanbanApiContext) => Promise<void> | void;
|
|
269
|
+
/**
|
|
270
|
+
* Called after a column is updated successfully
|
|
271
|
+
*/
|
|
272
|
+
onColumnUpdated?: (column: Column, context: KanbanApiContext) => Promise<void> | void;
|
|
273
|
+
/**
|
|
274
|
+
* Called after a column is deleted successfully
|
|
275
|
+
*/
|
|
276
|
+
onColumnDeleted?: (columnId: string, context: KanbanApiContext) => Promise<void> | void;
|
|
277
|
+
/**
|
|
278
|
+
* Called before creating a task. Return false to deny access.
|
|
279
|
+
*/
|
|
280
|
+
onBeforeCreateTask?: (data: z.infer<typeof createTaskSchema>, context: KanbanApiContext) => Promise<boolean> | boolean;
|
|
281
|
+
/**
|
|
282
|
+
* Called before updating a task. Return false to deny access.
|
|
283
|
+
*/
|
|
284
|
+
onBeforeUpdateTask?: (taskId: string, data: z.infer<typeof updateTaskSchema>, context: KanbanApiContext) => Promise<boolean> | boolean;
|
|
285
|
+
/**
|
|
286
|
+
* Called before deleting a task. Return false to deny access.
|
|
287
|
+
*/
|
|
288
|
+
onBeforeDeleteTask?: (taskId: string, context: KanbanApiContext) => Promise<boolean> | boolean;
|
|
289
|
+
/**
|
|
290
|
+
* Called after a task is created successfully
|
|
291
|
+
*/
|
|
292
|
+
onTaskCreated?: (task: Task, context: KanbanApiContext) => Promise<void> | void;
|
|
293
|
+
/**
|
|
294
|
+
* Called after a task is updated successfully
|
|
295
|
+
*/
|
|
296
|
+
onTaskUpdated?: (task: Task, context: KanbanApiContext) => Promise<void> | void;
|
|
297
|
+
/**
|
|
298
|
+
* Called after a task is deleted successfully
|
|
299
|
+
*/
|
|
300
|
+
onTaskDeleted?: (taskId: string, context: KanbanApiContext) => Promise<void> | void;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Kanban backend plugin
|
|
304
|
+
* Provides API endpoints for managing kanban boards, columns, and tasks
|
|
305
|
+
*
|
|
306
|
+
* @param hooks - Optional configuration hooks for customizing plugin behavior
|
|
307
|
+
*/
|
|
308
|
+
declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_plugins_api.BackendPlugin<{
|
|
309
|
+
readonly listBoards: better_call.StrictEndpoint<"/boards", {
|
|
310
|
+
method: "GET";
|
|
311
|
+
query: z.ZodObject<{
|
|
312
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
313
|
+
ownerId: z.ZodOptional<z.ZodString>;
|
|
314
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
315
|
+
offset: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
316
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
317
|
+
}, z.core.$strip>;
|
|
318
|
+
}, BoardListResult>;
|
|
319
|
+
readonly getBoard: better_call.StrictEndpoint<"/boards/:id", {
|
|
320
|
+
method: "GET";
|
|
321
|
+
}, BoardWithColumns>;
|
|
322
|
+
readonly createBoard: better_call.StrictEndpoint<"/boards", {
|
|
323
|
+
method: "POST";
|
|
324
|
+
body: z.ZodObject<{
|
|
325
|
+
description: z.ZodOptional<z.ZodString>;
|
|
326
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
327
|
+
ownerId: z.ZodOptional<z.ZodString>;
|
|
328
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
329
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
330
|
+
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
331
|
+
name: z.ZodString;
|
|
332
|
+
}, z.core.$strip>;
|
|
333
|
+
}, {
|
|
334
|
+
columns: ColumnWithTasks[];
|
|
335
|
+
id: string;
|
|
336
|
+
name: string;
|
|
337
|
+
slug: string;
|
|
338
|
+
description?: string;
|
|
339
|
+
ownerId?: string;
|
|
340
|
+
organizationId?: string;
|
|
341
|
+
createdAt: Date;
|
|
342
|
+
updatedAt: Date;
|
|
343
|
+
}>;
|
|
344
|
+
readonly updateBoard: better_call.StrictEndpoint<"/boards/:id", {
|
|
345
|
+
method: "PUT";
|
|
346
|
+
body: z.ZodObject<{
|
|
347
|
+
description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
348
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
349
|
+
ownerId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
350
|
+
organizationId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
351
|
+
createdAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
352
|
+
updatedAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
353
|
+
name: z.ZodOptional<z.ZodString>;
|
|
354
|
+
}, z.core.$strip>;
|
|
355
|
+
}, Board>;
|
|
356
|
+
readonly deleteBoard: better_call.StrictEndpoint<"/boards/:id", {
|
|
357
|
+
method: "DELETE";
|
|
358
|
+
}, {
|
|
359
|
+
success: boolean;
|
|
360
|
+
}>;
|
|
361
|
+
readonly createColumn: better_call.StrictEndpoint<"/columns", {
|
|
362
|
+
method: "POST";
|
|
363
|
+
body: z.ZodObject<{
|
|
364
|
+
title: z.ZodString;
|
|
365
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
366
|
+
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
367
|
+
order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
368
|
+
boardId: z.ZodString;
|
|
369
|
+
}, z.core.$strip>;
|
|
370
|
+
}, Column>;
|
|
371
|
+
readonly updateColumn: better_call.StrictEndpoint<"/columns/:id", {
|
|
372
|
+
method: "PUT";
|
|
373
|
+
body: z.ZodObject<{
|
|
374
|
+
title: z.ZodOptional<z.ZodString>;
|
|
375
|
+
createdAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
376
|
+
updatedAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
377
|
+
order: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
|
|
378
|
+
boardId: z.ZodOptional<z.ZodString>;
|
|
379
|
+
}, z.core.$strip>;
|
|
380
|
+
}, Column>;
|
|
381
|
+
readonly deleteColumn: better_call.StrictEndpoint<"/columns/:id", {
|
|
382
|
+
method: "DELETE";
|
|
383
|
+
}, {
|
|
384
|
+
success: boolean;
|
|
385
|
+
}>;
|
|
386
|
+
readonly reorderColumns: better_call.StrictEndpoint<"/columns/reorder", {
|
|
387
|
+
method: "POST";
|
|
388
|
+
body: z.ZodObject<{
|
|
389
|
+
boardId: z.ZodString;
|
|
390
|
+
columnIds: z.ZodArray<z.ZodString>;
|
|
391
|
+
}, z.core.$strip>;
|
|
392
|
+
}, {
|
|
393
|
+
success: boolean;
|
|
394
|
+
}>;
|
|
395
|
+
readonly createTask: better_call.StrictEndpoint<"/tasks", {
|
|
396
|
+
method: "POST";
|
|
397
|
+
body: z.ZodObject<{
|
|
398
|
+
title: z.ZodString;
|
|
399
|
+
description: z.ZodOptional<z.ZodString>;
|
|
400
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
401
|
+
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
402
|
+
order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
403
|
+
completedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
404
|
+
priority: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
405
|
+
LOW: "LOW";
|
|
406
|
+
MEDIUM: "MEDIUM";
|
|
407
|
+
HIGH: "HIGH";
|
|
408
|
+
URGENT: "URGENT";
|
|
409
|
+
}>>>;
|
|
410
|
+
columnId: z.ZodString;
|
|
411
|
+
assigneeId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
412
|
+
isArchived: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
413
|
+
}, z.core.$strip>;
|
|
414
|
+
}, Task>;
|
|
415
|
+
readonly updateTask: better_call.StrictEndpoint<"/tasks/:id", {
|
|
416
|
+
method: "PUT";
|
|
417
|
+
body: z.ZodObject<{
|
|
418
|
+
title: z.ZodOptional<z.ZodString>;
|
|
419
|
+
description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
420
|
+
createdAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
421
|
+
updatedAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
422
|
+
order: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
|
|
423
|
+
completedAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
424
|
+
priority: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
425
|
+
LOW: "LOW";
|
|
426
|
+
MEDIUM: "MEDIUM";
|
|
427
|
+
HIGH: "HIGH";
|
|
428
|
+
URGENT: "URGENT";
|
|
429
|
+
}>>>>;
|
|
430
|
+
columnId: z.ZodOptional<z.ZodString>;
|
|
431
|
+
assigneeId: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
432
|
+
isArchived: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
433
|
+
}, z.core.$strip>;
|
|
434
|
+
}, Task>;
|
|
435
|
+
readonly deleteTask: better_call.StrictEndpoint<"/tasks/:id", {
|
|
436
|
+
method: "DELETE";
|
|
437
|
+
}, {
|
|
438
|
+
success: boolean;
|
|
439
|
+
}>;
|
|
440
|
+
readonly moveTask: better_call.StrictEndpoint<"/tasks/move", {
|
|
441
|
+
method: "POST";
|
|
442
|
+
body: z.ZodObject<{
|
|
443
|
+
taskId: z.ZodString;
|
|
444
|
+
targetColumnId: z.ZodString;
|
|
445
|
+
targetOrder: z.ZodNumber;
|
|
446
|
+
}, z.core.$strip>;
|
|
447
|
+
}, Task>;
|
|
448
|
+
readonly reorderTasks: better_call.StrictEndpoint<"/tasks/reorder", {
|
|
449
|
+
method: "POST";
|
|
450
|
+
body: z.ZodObject<{
|
|
451
|
+
columnId: z.ZodString;
|
|
452
|
+
taskIds: z.ZodArray<z.ZodString>;
|
|
453
|
+
}, z.core.$strip>;
|
|
454
|
+
}, {
|
|
455
|
+
success: boolean;
|
|
456
|
+
}>;
|
|
457
|
+
}, {
|
|
458
|
+
getAllBoards: (params?: Parameters<typeof getAllBoards>[1]) => Promise<BoardListResult>;
|
|
459
|
+
getBoardById: (id: string) => Promise<BoardWithColumns | null>;
|
|
460
|
+
prefetchForRoute: KanbanPrefetchForRoute;
|
|
461
|
+
createTask: (input: Parameters<typeof createKanbanTask>[1]) => Promise<Task>;
|
|
462
|
+
findOrCreateBoard: (slug: string, name: string, columnTitles: string[]) => Promise<Board>;
|
|
463
|
+
getColumnsByBoardId: (boardId: string) => Promise<Column[]>;
|
|
464
|
+
}>;
|
|
465
|
+
type KanbanApiRouter = ReturnType<ReturnType<typeof kanbanBackendPlugin>["routes"]>;
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* Internal query key constants for the Kanban plugin.
|
|
469
|
+
* Shared between query-keys.ts (HTTP path) and prefetchForRoute (DB path)
|
|
470
|
+
* to prevent key drift between SSR loaders and SSG prefetching.
|
|
471
|
+
*/
|
|
472
|
+
interface BoardsListDiscriminator {
|
|
473
|
+
slug: string | undefined;
|
|
474
|
+
ownerId: string | undefined;
|
|
475
|
+
organizationId: string | undefined;
|
|
476
|
+
limit: number;
|
|
477
|
+
offset: number;
|
|
478
|
+
}
|
|
479
|
+
/** Full query key builders — use these with queryClient.setQueryData() */
|
|
480
|
+
declare const KANBAN_QUERY_KEYS: {
|
|
481
|
+
/**
|
|
482
|
+
* Key for boards.list(params) query.
|
|
483
|
+
* Full key: ["boards", "list", { slug, ownerId, organizationId, limit, offset }]
|
|
484
|
+
*/
|
|
485
|
+
boardsList: (params?: {
|
|
486
|
+
slug?: string;
|
|
487
|
+
ownerId?: string;
|
|
488
|
+
organizationId?: string;
|
|
489
|
+
limit?: number;
|
|
490
|
+
offset?: number;
|
|
491
|
+
}) => readonly ["boards", "list", BoardsListDiscriminator];
|
|
492
|
+
/**
|
|
493
|
+
* Key for boards.detail(boardId) query.
|
|
494
|
+
* Full key: ["boards", "detail", boardId]
|
|
495
|
+
*/
|
|
496
|
+
boardDetail: (boardId: string) => readonly ["boards", "detail", string];
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
export { getBoardById as d, createKanbanTask as e, findOrCreateKanbanBoard as f, getAllBoards as g, getKanbanColumnsByBoardId as h, KANBAN_QUERY_KEYS as i, kanbanBackendPlugin as k };
|
|
500
|
+
export type { BoardListResult as B, CreateKanbanTaskInput as C, KanbanApiRouter as K, KanbanRouteKey as a, KanbanApiContext as b, KanbanBackendHooks as c, BoardsListDiscriminator as j };
|