@btst/stack 2.1.0 → 2.2.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 +9 -107
- package/dist/packages/stack/src/plugins/blog/api/plugin.mjs +9 -107
- package/dist/packages/stack/src/plugins/blog/client/plugin.cjs +1 -1
- package/dist/packages/stack/src/plugins/blog/client/plugin.mjs +1 -1
- package/dist/packages/stack/src/plugins/cms/api/getters.cjs +146 -0
- package/dist/packages/stack/src/plugins/cms/api/getters.mjs +138 -0
- package/dist/packages/stack/src/plugins/cms/api/plugin.cjs +560 -622
- package/dist/packages/stack/src/plugins/cms/api/plugin.mjs +559 -621
- 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/form-builder/api/getters.cjs +111 -0
- package/dist/packages/stack/src/plugins/form-builder/api/getters.mjs +104 -0
- package/dist/packages/stack/src/plugins/form-builder/api/plugin.cjs +16 -88
- package/dist/packages/stack/src/plugins/form-builder/api/plugin.mjs +12 -84
- 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/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 +9 -123
- package/dist/packages/stack/src/plugins/kanban/api/plugin.mjs +9 -123
- package/dist/packages/stack/src/plugins/kanban/client/plugin.cjs +1 -1
- package/dist/packages/stack/src/plugins/kanban/client/plugin.mjs +1 -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 +4 -0
- package/dist/plugins/blog/api/index.d.cts +3 -2
- package/dist/plugins/blog/api/index.d.mts +3 -2
- package/dist/plugins/blog/api/index.d.ts +3 -2
- package/dist/plugins/blog/api/index.mjs +1 -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 +7 -4
- package/dist/plugins/blog/query-keys.d.cts +81 -27
- package/dist/plugins/blog/query-keys.d.mts +81 -27
- package/dist/plugins/blog/query-keys.d.ts +81 -27
- package/dist/plugins/blog/query-keys.mjs +7 -4
- package/dist/plugins/client/index.d.cts +2 -2
- package/dist/plugins/client/index.d.mts +2 -2
- package/dist/plugins/client/index.d.ts +2 -2
- package/dist/plugins/cms/api/index.cjs +4 -0
- package/dist/plugins/cms/api/index.d.cts +61 -5
- package/dist/plugins/cms/api/index.d.mts +61 -5
- package/dist/plugins/cms/api/index.d.ts +61 -5
- package/dist/plugins/cms/api/index.mjs +1 -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.d.cts +2 -1
- package/dist/plugins/cms/query-keys.d.mts +2 -1
- package/dist/plugins/cms/query-keys.d.ts +2 -1
- package/dist/plugins/form-builder/api/index.cjs +4 -0
- package/dist/plugins/form-builder/api/index.d.cts +77 -7
- package/dist/plugins/form-builder/api/index.d.mts +77 -7
- package/dist/plugins/form-builder/api/index.d.ts +77 -7
- package/dist/plugins/form-builder/api/index.mjs +1 -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.d.cts +2 -1
- package/dist/plugins/form-builder/query-keys.d.mts +2 -1
- package/dist/plugins/form-builder/query-keys.d.ts +2 -1
- package/dist/plugins/kanban/api/index.cjs +3 -0
- package/dist/plugins/kanban/api/index.d.cts +40 -43
- package/dist/plugins/kanban/api/index.d.mts +40 -43
- package/dist/plugins/kanban/api/index.d.ts +40 -43
- package/dist/plugins/kanban/api/index.mjs +1 -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 +4 -3
- package/dist/plugins/kanban/query-keys.d.cts +2 -1
- package/dist/plugins/kanban/query-keys.d.mts +2 -1
- package/dist/plugins/kanban/query-keys.d.ts +2 -1
- package/dist/plugins/kanban/query-keys.mjs +4 -3
- 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.BeSm90va.d.ts +289 -0
- package/dist/shared/{stack.DzH_wcvr.d.mts → stack.CIrIsc-A.d.cts} +2 -2
- package/dist/shared/{stack.DzH_wcvr.d.ts → stack.CIrIsc-A.d.mts} +2 -2
- package/dist/shared/{stack.DzH_wcvr.d.cts → stack.CIrIsc-A.d.ts} +2 -2
- package/dist/shared/stack.CMh_EdxW.d.cts +289 -0
- package/dist/shared/{stack.BsXokfNh.d.mts → stack.CXjzTMsb.d.cts} +1 -1
- package/dist/shared/{stack.BsXokfNh.d.ts → stack.CXjzTMsb.d.mts} +1 -1
- package/dist/shared/{stack.BsXokfNh.d.cts → stack.CXjzTMsb.d.ts} +1 -1
- package/dist/shared/stack.Dg09R0oB.d.mts +289 -0
- package/dist/shared/{stack.DKDMI-QO.d.mts → stack.QD1y_7NY.d.cts} +7 -1
- package/dist/shared/{stack.DKDMI-QO.d.ts → stack.QD1y_7NY.d.mts} +7 -1
- package/dist/shared/{stack.DKDMI-QO.d.cts → stack.QD1y_7NY.d.ts} +7 -1
- package/package.json +1 -1
- 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 +7 -0
- package/src/plugins/blog/api/plugin.ts +13 -141
- package/src/plugins/blog/client/plugin.tsx +2 -1
- package/src/plugins/blog/query-keys.ts +16 -13
- package/src/plugins/cms/__tests__/getters.test.ts +206 -0
- package/src/plugins/cms/api/getters.ts +244 -0
- package/src/plugins/cms/api/index.ts +5 -0
- package/src/plugins/cms/api/plugin.ts +50 -154
- 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/types.ts +1 -1
- package/src/plugins/form-builder/__tests__/getters.test.ts +159 -0
- package/src/plugins/form-builder/api/getters.ts +203 -0
- package/src/plugins/form-builder/api/index.ts +1 -0
- package/src/plugins/form-builder/api/plugin.ts +22 -115
- package/src/plugins/form-builder/client/components/pages/submissions-page.internal.tsx +1 -1
- 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 +1 -0
- package/src/plugins/kanban/api/plugin.ts +16 -146
- package/src/plugins/kanban/client/plugin.tsx +2 -1
- package/src/plugins/kanban/query-keys.ts +8 -5
- package/src/types.ts +44 -5
- package/dist/shared/{stack.CbuN2zVV.d.cts → stack.BkYlUT_8.d.cts} +6 -6
- package/dist/shared/{stack.CbuN2zVV.d.mts → stack.BkYlUT_8.d.mts} +6 -6
- package/dist/shared/{stack.CbuN2zVV.d.ts → stack.BkYlUT_8.d.ts} +6 -6
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { createApiClient } from '@btst/stack/plugins/client';
|
|
3
|
-
import { P as PaginatedForms, S as SerializedForm, c as PaginatedFormSubmissions, b as SerializedFormSubmissionWithData } from '../../shared/stack.
|
|
3
|
+
import { P as PaginatedForms, S as SerializedForm, c as PaginatedFormSubmissions, b as SerializedFormSubmissionWithData } from '../../shared/stack.CIrIsc-A.cjs';
|
|
4
4
|
import { FormBuilderApiRouter } from './api/index.cjs';
|
|
5
5
|
import '@btst/stack/plugins/api';
|
|
6
6
|
import 'better-call';
|
|
7
7
|
import 'zod';
|
|
8
|
+
import '@btst/db';
|
|
8
9
|
|
|
9
10
|
interface FormListParams {
|
|
10
11
|
status?: "active" | "inactive" | "archived";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { createApiClient } from '@btst/stack/plugins/client';
|
|
3
|
-
import { P as PaginatedForms, S as SerializedForm, c as PaginatedFormSubmissions, b as SerializedFormSubmissionWithData } from '../../shared/stack.
|
|
3
|
+
import { P as PaginatedForms, S as SerializedForm, c as PaginatedFormSubmissions, b as SerializedFormSubmissionWithData } from '../../shared/stack.CIrIsc-A.mjs';
|
|
4
4
|
import { FormBuilderApiRouter } from './api/index.mjs';
|
|
5
5
|
import '@btst/stack/plugins/api';
|
|
6
6
|
import 'better-call';
|
|
7
7
|
import 'zod';
|
|
8
|
+
import '@btst/db';
|
|
8
9
|
|
|
9
10
|
interface FormListParams {
|
|
10
11
|
status?: "active" | "inactive" | "archived";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { createApiClient } from '@btst/stack/plugins/client';
|
|
3
|
-
import { P as PaginatedForms, S as SerializedForm, c as PaginatedFormSubmissions, b as SerializedFormSubmissionWithData } from '../../shared/stack.
|
|
3
|
+
import { P as PaginatedForms, S as SerializedForm, c as PaginatedFormSubmissions, b as SerializedFormSubmissionWithData } from '../../shared/stack.CIrIsc-A.js';
|
|
4
4
|
import { FormBuilderApiRouter } from './api/index.js';
|
|
5
5
|
import '@btst/stack/plugins/api';
|
|
6
6
|
import 'better-call';
|
|
7
7
|
import 'zod';
|
|
8
|
+
import '@btst/db';
|
|
8
9
|
|
|
9
10
|
interface FormListParams {
|
|
10
11
|
status?: "active" | "inactive" | "archived";
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const plugin = require('../../../packages/stack/src/plugins/kanban/api/plugin.cjs');
|
|
4
|
+
const getters = require('../../../packages/stack/src/plugins/kanban/api/getters.cjs');
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
exports.kanbanBackendPlugin = plugin.kanbanBackendPlugin;
|
|
9
|
+
exports.getAllBoards = getters.getAllBoards;
|
|
10
|
+
exports.getBoardById = getters.getBoardById;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as _btst_stack_plugins_api from '@btst/stack/plugins/api';
|
|
2
2
|
import * as better_call from 'better-call';
|
|
3
|
+
import { Adapter } from '@btst/db';
|
|
4
|
+
import { B as BoardWithColumns, d as Board, C as Column, T as Task, e as ColumnWithTasks } from '../../../shared/stack.QD1y_7NY.cjs';
|
|
3
5
|
import { z } from 'zod';
|
|
4
|
-
import { B as Board, C as Column, T as Task, d as ColumnWithTasks } from '../../../shared/stack.DKDMI-QO.cjs';
|
|
5
6
|
|
|
6
7
|
declare const createBoardSchema: z.ZodObject<{
|
|
7
8
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -80,6 +81,33 @@ declare const BoardListQuerySchema: z.ZodObject<{
|
|
|
80
81
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
81
82
|
}, z.core.$strip>;
|
|
82
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>;
|
|
110
|
+
|
|
83
111
|
/**
|
|
84
112
|
* Context passed to kanban API hooks
|
|
85
113
|
*/
|
|
@@ -117,9 +145,11 @@ interface KanbanBackendHooks {
|
|
|
117
145
|
*/
|
|
118
146
|
onBeforeDeleteBoard?: (boardId: string, context: KanbanApiContext) => Promise<boolean> | boolean;
|
|
119
147
|
/**
|
|
120
|
-
* Called after boards are listed successfully
|
|
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`).
|
|
121
151
|
*/
|
|
122
|
-
onBoardsRead?: (boards:
|
|
152
|
+
onBoardsRead?: (boards: BoardWithColumns[], filter: z.infer<typeof BoardListQuerySchema>, context: KanbanApiContext) => Promise<void> | void;
|
|
123
153
|
/**
|
|
124
154
|
* Called after a single board is read successfully
|
|
125
155
|
*/
|
|
@@ -221,46 +251,10 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
|
|
|
221
251
|
offset: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
222
252
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
223
253
|
}, 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
|
-
}[]>;
|
|
254
|
+
}, BoardListResult>;
|
|
243
255
|
readonly getBoard: better_call.StrictEndpoint<"/boards/:id", {
|
|
244
256
|
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
|
-
}>;
|
|
257
|
+
}, BoardWithColumns>;
|
|
264
258
|
readonly createBoard: better_call.StrictEndpoint<"/boards", {
|
|
265
259
|
method: "POST";
|
|
266
260
|
body: z.ZodObject<{
|
|
@@ -396,8 +390,11 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
|
|
|
396
390
|
}, {
|
|
397
391
|
success: boolean;
|
|
398
392
|
}>;
|
|
393
|
+
}, {
|
|
394
|
+
getAllBoards: (params?: Parameters<typeof getAllBoards>[1]) => Promise<BoardListResult>;
|
|
395
|
+
getBoardById: (id: string) => Promise<BoardWithColumns | null>;
|
|
399
396
|
}>;
|
|
400
397
|
type KanbanApiRouter = ReturnType<ReturnType<typeof kanbanBackendPlugin>["routes"]>;
|
|
401
398
|
|
|
402
|
-
export { kanbanBackendPlugin };
|
|
403
|
-
export type { KanbanApiContext, KanbanApiRouter, KanbanBackendHooks };
|
|
399
|
+
export { getAllBoards, getBoardById, kanbanBackendPlugin };
|
|
400
|
+
export type { BoardListResult, KanbanApiContext, KanbanApiRouter, KanbanBackendHooks };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as _btst_stack_plugins_api from '@btst/stack/plugins/api';
|
|
2
2
|
import * as better_call from 'better-call';
|
|
3
|
+
import { Adapter } from '@btst/db';
|
|
4
|
+
import { B as BoardWithColumns, d as Board, C as Column, T as Task, e as ColumnWithTasks } from '../../../shared/stack.QD1y_7NY.mjs';
|
|
3
5
|
import { z } from 'zod';
|
|
4
|
-
import { B as Board, C as Column, T as Task, d as ColumnWithTasks } from '../../../shared/stack.DKDMI-QO.mjs';
|
|
5
6
|
|
|
6
7
|
declare const createBoardSchema: z.ZodObject<{
|
|
7
8
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -80,6 +81,33 @@ declare const BoardListQuerySchema: z.ZodObject<{
|
|
|
80
81
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
81
82
|
}, z.core.$strip>;
|
|
82
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>;
|
|
110
|
+
|
|
83
111
|
/**
|
|
84
112
|
* Context passed to kanban API hooks
|
|
85
113
|
*/
|
|
@@ -117,9 +145,11 @@ interface KanbanBackendHooks {
|
|
|
117
145
|
*/
|
|
118
146
|
onBeforeDeleteBoard?: (boardId: string, context: KanbanApiContext) => Promise<boolean> | boolean;
|
|
119
147
|
/**
|
|
120
|
-
* Called after boards are listed successfully
|
|
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`).
|
|
121
151
|
*/
|
|
122
|
-
onBoardsRead?: (boards:
|
|
152
|
+
onBoardsRead?: (boards: BoardWithColumns[], filter: z.infer<typeof BoardListQuerySchema>, context: KanbanApiContext) => Promise<void> | void;
|
|
123
153
|
/**
|
|
124
154
|
* Called after a single board is read successfully
|
|
125
155
|
*/
|
|
@@ -221,46 +251,10 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
|
|
|
221
251
|
offset: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
222
252
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
223
253
|
}, 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
|
-
}[]>;
|
|
254
|
+
}, BoardListResult>;
|
|
243
255
|
readonly getBoard: better_call.StrictEndpoint<"/boards/:id", {
|
|
244
256
|
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
|
-
}>;
|
|
257
|
+
}, BoardWithColumns>;
|
|
264
258
|
readonly createBoard: better_call.StrictEndpoint<"/boards", {
|
|
265
259
|
method: "POST";
|
|
266
260
|
body: z.ZodObject<{
|
|
@@ -396,8 +390,11 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
|
|
|
396
390
|
}, {
|
|
397
391
|
success: boolean;
|
|
398
392
|
}>;
|
|
393
|
+
}, {
|
|
394
|
+
getAllBoards: (params?: Parameters<typeof getAllBoards>[1]) => Promise<BoardListResult>;
|
|
395
|
+
getBoardById: (id: string) => Promise<BoardWithColumns | null>;
|
|
399
396
|
}>;
|
|
400
397
|
type KanbanApiRouter = ReturnType<ReturnType<typeof kanbanBackendPlugin>["routes"]>;
|
|
401
398
|
|
|
402
|
-
export { kanbanBackendPlugin };
|
|
403
|
-
export type { KanbanApiContext, KanbanApiRouter, KanbanBackendHooks };
|
|
399
|
+
export { getAllBoards, getBoardById, kanbanBackendPlugin };
|
|
400
|
+
export type { BoardListResult, KanbanApiContext, KanbanApiRouter, KanbanBackendHooks };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as _btst_stack_plugins_api from '@btst/stack/plugins/api';
|
|
2
2
|
import * as better_call from 'better-call';
|
|
3
|
+
import { Adapter } from '@btst/db';
|
|
4
|
+
import { B as BoardWithColumns, d as Board, C as Column, T as Task, e as ColumnWithTasks } from '../../../shared/stack.QD1y_7NY.js';
|
|
3
5
|
import { z } from 'zod';
|
|
4
|
-
import { B as Board, C as Column, T as Task, d as ColumnWithTasks } from '../../../shared/stack.DKDMI-QO.js';
|
|
5
6
|
|
|
6
7
|
declare const createBoardSchema: z.ZodObject<{
|
|
7
8
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -80,6 +81,33 @@ declare const BoardListQuerySchema: z.ZodObject<{
|
|
|
80
81
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
81
82
|
}, z.core.$strip>;
|
|
82
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>;
|
|
110
|
+
|
|
83
111
|
/**
|
|
84
112
|
* Context passed to kanban API hooks
|
|
85
113
|
*/
|
|
@@ -117,9 +145,11 @@ interface KanbanBackendHooks {
|
|
|
117
145
|
*/
|
|
118
146
|
onBeforeDeleteBoard?: (boardId: string, context: KanbanApiContext) => Promise<boolean> | boolean;
|
|
119
147
|
/**
|
|
120
|
-
* Called after boards are listed successfully
|
|
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`).
|
|
121
151
|
*/
|
|
122
|
-
onBoardsRead?: (boards:
|
|
152
|
+
onBoardsRead?: (boards: BoardWithColumns[], filter: z.infer<typeof BoardListQuerySchema>, context: KanbanApiContext) => Promise<void> | void;
|
|
123
153
|
/**
|
|
124
154
|
* Called after a single board is read successfully
|
|
125
155
|
*/
|
|
@@ -221,46 +251,10 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
|
|
|
221
251
|
offset: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
222
252
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
223
253
|
}, 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
|
-
}[]>;
|
|
254
|
+
}, BoardListResult>;
|
|
243
255
|
readonly getBoard: better_call.StrictEndpoint<"/boards/:id", {
|
|
244
256
|
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
|
-
}>;
|
|
257
|
+
}, BoardWithColumns>;
|
|
264
258
|
readonly createBoard: better_call.StrictEndpoint<"/boards", {
|
|
265
259
|
method: "POST";
|
|
266
260
|
body: z.ZodObject<{
|
|
@@ -396,8 +390,11 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
|
|
|
396
390
|
}, {
|
|
397
391
|
success: boolean;
|
|
398
392
|
}>;
|
|
393
|
+
}, {
|
|
394
|
+
getAllBoards: (params?: Parameters<typeof getAllBoards>[1]) => Promise<BoardListResult>;
|
|
395
|
+
getBoardById: (id: string) => Promise<BoardWithColumns | null>;
|
|
399
396
|
}>;
|
|
400
397
|
type KanbanApiRouter = ReturnType<ReturnType<typeof kanbanBackendPlugin>["routes"]>;
|
|
401
398
|
|
|
402
|
-
export { kanbanBackendPlugin };
|
|
403
|
-
export type { KanbanApiContext, KanbanApiRouter, KanbanBackendHooks };
|
|
399
|
+
export { getAllBoards, getBoardById, kanbanBackendPlugin };
|
|
400
|
+
export type { BoardListResult, KanbanApiContext, KanbanApiRouter, KanbanBackendHooks };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
4
|
-
import { b as SerializedColumn, c as SerializedTask, a as SerializedBoard } from '../../../../shared/stack.
|
|
4
|
+
import { b as SerializedColumn, c as SerializedTask, a as SerializedBoard } from '../../../../shared/stack.QD1y_7NY.cjs';
|
|
5
5
|
|
|
6
6
|
declare function BoardsListPageComponent(): react_jsx_runtime.JSX.Element;
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
4
|
-
import { b as SerializedColumn, c as SerializedTask, a as SerializedBoard } from '../../../../shared/stack.
|
|
4
|
+
import { b as SerializedColumn, c as SerializedTask, a as SerializedBoard } from '../../../../shared/stack.QD1y_7NY.mjs';
|
|
5
5
|
|
|
6
6
|
declare function BoardsListPageComponent(): react_jsx_runtime.JSX.Element;
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
4
|
-
import { b as SerializedColumn, c as SerializedTask, a as SerializedBoard } from '../../../../shared/stack.
|
|
4
|
+
import { b as SerializedColumn, c as SerializedTask, a as SerializedBoard } from '../../../../shared/stack.QD1y_7NY.js';
|
|
5
5
|
|
|
6
6
|
declare function BoardsListPageComponent(): react_jsx_runtime.JSX.Element;
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { a as KanbanUser } from '../../../../shared/stack.FeaWkglm.cjs';
|
|
3
|
-
import { S as SerializedBoardWithColumns, a as SerializedBoard, b as SerializedColumn, c as SerializedTask, P as Priority } from '../../../../shared/stack.
|
|
3
|
+
import { S as SerializedBoardWithColumns, a as SerializedBoard, b as SerializedColumn, c as SerializedTask, P as Priority } from '../../../../shared/stack.QD1y_7NY.cjs';
|
|
4
4
|
import 'react';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { a as KanbanUser } from '../../../../shared/stack.FeaWkglm.mjs';
|
|
3
|
-
import { S as SerializedBoardWithColumns, a as SerializedBoard, b as SerializedColumn, c as SerializedTask, P as Priority } from '../../../../shared/stack.
|
|
3
|
+
import { S as SerializedBoardWithColumns, a as SerializedBoard, b as SerializedColumn, c as SerializedTask, P as Priority } from '../../../../shared/stack.QD1y_7NY.mjs';
|
|
4
4
|
import 'react';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { a as KanbanUser } from '../../../../shared/stack.FeaWkglm.js';
|
|
3
|
-
import { S as SerializedBoardWithColumns, a as SerializedBoard, b as SerializedColumn, c as SerializedTask, P as Priority } from '../../../../shared/stack.
|
|
3
|
+
import { S as SerializedBoardWithColumns, a as SerializedBoard, b as SerializedColumn, c as SerializedTask, P as Priority } from '../../../../shared/stack.QD1y_7NY.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -2,7 +2,7 @@ import * as _btst_stack_plugins_client from '@btst/stack/plugins/client';
|
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import * as _btst_yar from '@btst/yar';
|
|
4
4
|
import { QueryClient } from '@tanstack/react-query';
|
|
5
|
-
import { S as SerializedBoardWithColumns } from '../../../shared/stack.
|
|
5
|
+
import { S as SerializedBoardWithColumns } from '../../../shared/stack.QD1y_7NY.cjs';
|
|
6
6
|
export { K as KanbanPluginOverrides, a as KanbanUser } from '../../../shared/stack.FeaWkglm.cjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -2,7 +2,7 @@ import * as _btst_stack_plugins_client from '@btst/stack/plugins/client';
|
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import * as _btst_yar from '@btst/yar';
|
|
4
4
|
import { QueryClient } from '@tanstack/react-query';
|
|
5
|
-
import { S as SerializedBoardWithColumns } from '../../../shared/stack.
|
|
5
|
+
import { S as SerializedBoardWithColumns } from '../../../shared/stack.QD1y_7NY.mjs';
|
|
6
6
|
export { K as KanbanPluginOverrides, a as KanbanUser } from '../../../shared/stack.FeaWkglm.mjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -2,7 +2,7 @@ import * as _btst_stack_plugins_client from '@btst/stack/plugins/client';
|
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import * as _btst_yar from '@btst/yar';
|
|
4
4
|
import { QueryClient } from '@tanstack/react-query';
|
|
5
|
-
import { S as SerializedBoardWithColumns } from '../../../shared/stack.
|
|
5
|
+
import { S as SerializedBoardWithColumns } from '../../../shared/stack.QD1y_7NY.js';
|
|
6
6
|
export { K as KanbanPluginOverrides, a as KanbanUser } from '../../../shared/stack.FeaWkglm.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -51,7 +51,8 @@ function createBoardsQueries(client, headers) {
|
|
|
51
51
|
const errorResponse = response;
|
|
52
52
|
throw toError(errorResponse.error);
|
|
53
53
|
}
|
|
54
|
-
|
|
54
|
+
const envelope = response.data;
|
|
55
|
+
return envelope?.items ?? [];
|
|
55
56
|
} catch (error) {
|
|
56
57
|
throw error;
|
|
57
58
|
}
|
|
@@ -92,8 +93,8 @@ function createBoardsQueries(client, headers) {
|
|
|
92
93
|
const errorResponse = response;
|
|
93
94
|
throw toError(errorResponse.error);
|
|
94
95
|
}
|
|
95
|
-
const
|
|
96
|
-
return
|
|
96
|
+
const envelope = response.data;
|
|
97
|
+
return envelope?.items?.[0] ?? null;
|
|
97
98
|
} catch (error) {
|
|
98
99
|
throw error;
|
|
99
100
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { createApiClient } from '@btst/stack/plugins/client';
|
|
3
|
-
import { S as SerializedBoardWithColumns } from '../../shared/stack.
|
|
3
|
+
import { S as SerializedBoardWithColumns } from '../../shared/stack.QD1y_7NY.cjs';
|
|
4
4
|
import { KanbanApiRouter } from './api/index.cjs';
|
|
5
5
|
import '@btst/stack/plugins/api';
|
|
6
6
|
import 'better-call';
|
|
7
|
+
import '@btst/db';
|
|
7
8
|
import 'zod';
|
|
8
9
|
|
|
9
10
|
interface BoardsListParams {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { createApiClient } from '@btst/stack/plugins/client';
|
|
3
|
-
import { S as SerializedBoardWithColumns } from '../../shared/stack.
|
|
3
|
+
import { S as SerializedBoardWithColumns } from '../../shared/stack.QD1y_7NY.mjs';
|
|
4
4
|
import { KanbanApiRouter } from './api/index.mjs';
|
|
5
5
|
import '@btst/stack/plugins/api';
|
|
6
6
|
import 'better-call';
|
|
7
|
+
import '@btst/db';
|
|
7
8
|
import 'zod';
|
|
8
9
|
|
|
9
10
|
interface BoardsListParams {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { createApiClient } from '@btst/stack/plugins/client';
|
|
3
|
-
import { S as SerializedBoardWithColumns } from '../../shared/stack.
|
|
3
|
+
import { S as SerializedBoardWithColumns } from '../../shared/stack.QD1y_7NY.js';
|
|
4
4
|
import { KanbanApiRouter } from './api/index.js';
|
|
5
5
|
import '@btst/stack/plugins/api';
|
|
6
6
|
import 'better-call';
|
|
7
|
+
import '@btst/db';
|
|
7
8
|
import 'zod';
|
|
8
9
|
|
|
9
10
|
interface BoardsListParams {
|
|
@@ -49,7 +49,8 @@ function createBoardsQueries(client, headers) {
|
|
|
49
49
|
const errorResponse = response;
|
|
50
50
|
throw toError(errorResponse.error);
|
|
51
51
|
}
|
|
52
|
-
|
|
52
|
+
const envelope = response.data;
|
|
53
|
+
return envelope?.items ?? [];
|
|
53
54
|
} catch (error) {
|
|
54
55
|
throw error;
|
|
55
56
|
}
|
|
@@ -90,8 +91,8 @@ function createBoardsQueries(client, headers) {
|
|
|
90
91
|
const errorResponse = response;
|
|
91
92
|
throw toError(errorResponse.error);
|
|
92
93
|
}
|
|
93
|
-
const
|
|
94
|
-
return
|
|
94
|
+
const envelope = response.data;
|
|
95
|
+
return envelope?.items?.[0] ?? null;
|
|
95
96
|
} catch (error) {
|
|
96
97
|
throw error;
|
|
97
98
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _btst_stack_plugins_api from '@btst/stack/plugins/api';
|
|
2
2
|
import * as better_call from 'better-call';
|
|
3
|
-
import { S as StackContext } from '../../../shared/stack.
|
|
3
|
+
import { S as StackContext } from '../../../shared/stack.7n9Y_u7N.cjs';
|
|
4
4
|
import '@btst/yar';
|
|
5
5
|
import '@btst/db';
|
|
6
6
|
|
|
@@ -79,7 +79,7 @@ declare const openApiBackendPlugin: (options?: OpenAPIOptions) => _btst_stack_pl
|
|
|
79
79
|
readonly reference: better_call.StrictEndpoint<string, {
|
|
80
80
|
method: "GET";
|
|
81
81
|
}, Response>;
|
|
82
|
-
}>;
|
|
82
|
+
}, never>;
|
|
83
83
|
type OpenApiRouter = ReturnType<ReturnType<typeof openApiBackendPlugin>["routes"]>;
|
|
84
84
|
|
|
85
85
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _btst_stack_plugins_api from '@btst/stack/plugins/api';
|
|
2
2
|
import * as better_call from 'better-call';
|
|
3
|
-
import { S as StackContext } from '../../../shared/stack.
|
|
3
|
+
import { S as StackContext } from '../../../shared/stack.7n9Y_u7N.mjs';
|
|
4
4
|
import '@btst/yar';
|
|
5
5
|
import '@btst/db';
|
|
6
6
|
|
|
@@ -79,7 +79,7 @@ declare const openApiBackendPlugin: (options?: OpenAPIOptions) => _btst_stack_pl
|
|
|
79
79
|
readonly reference: better_call.StrictEndpoint<string, {
|
|
80
80
|
method: "GET";
|
|
81
81
|
}, Response>;
|
|
82
|
-
}>;
|
|
82
|
+
}, never>;
|
|
83
83
|
type OpenApiRouter = ReturnType<ReturnType<typeof openApiBackendPlugin>["routes"]>;
|
|
84
84
|
|
|
85
85
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _btst_stack_plugins_api from '@btst/stack/plugins/api';
|
|
2
2
|
import * as better_call from 'better-call';
|
|
3
|
-
import { S as StackContext } from '../../../shared/stack.
|
|
3
|
+
import { S as StackContext } from '../../../shared/stack.7n9Y_u7N.js';
|
|
4
4
|
import '@btst/yar';
|
|
5
5
|
import '@btst/db';
|
|
6
6
|
|
|
@@ -79,7 +79,7 @@ declare const openApiBackendPlugin: (options?: OpenAPIOptions) => _btst_stack_pl
|
|
|
79
79
|
readonly reference: better_call.StrictEndpoint<string, {
|
|
80
80
|
method: "GET";
|
|
81
81
|
}, Response>;
|
|
82
|
-
}>;
|
|
82
|
+
}, never>;
|
|
83
83
|
type OpenApiRouter = ReturnType<ReturnType<typeof openApiBackendPlugin>["routes"]>;
|
|
84
84
|
|
|
85
85
|
/**
|
|
@@ -2,7 +2,7 @@ import * as _btst_stack_plugins_client from '@btst/stack/plugins/client';
|
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import * as _btst_yar from '@btst/yar';
|
|
4
4
|
import { QueryClient } from '@tanstack/react-query';
|
|
5
|
-
import { a as SitemapEntry, b as ClientStackContext } from '../../../shared/stack.
|
|
5
|
+
import { a as SitemapEntry, b as ClientStackContext } from '../../../shared/stack.7n9Y_u7N.cjs';
|
|
6
6
|
import '@btst/db';
|
|
7
7
|
import 'better-call';
|
|
8
8
|
|