@btst/stack 2.9.3 → 2.10.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/README.md +12 -0
- package/dist/packages/stack/src/plugins/blog/client/plugin.cjs +22 -11
- package/dist/packages/stack/src/plugins/blog/client/plugin.mjs +22 -11
- package/dist/packages/stack/src/plugins/cms/client/plugin.cjs +71 -39
- package/dist/packages/stack/src/plugins/cms/client/plugin.mjs +71 -39
- package/dist/packages/stack/src/plugins/comments/client/plugin.cjs +62 -2
- package/dist/packages/stack/src/plugins/comments/client/plugin.mjs +63 -3
- package/dist/packages/stack/src/plugins/comments/client/utils.cjs +2 -11
- package/dist/packages/stack/src/plugins/comments/client/utils.mjs +2 -11
- package/dist/packages/stack/src/plugins/comments/error-utils.cjs +15 -0
- package/dist/packages/stack/src/plugins/comments/error-utils.mjs +13 -0
- package/dist/packages/stack/src/plugins/form-builder/client/plugin.cjs +59 -31
- package/dist/packages/stack/src/plugins/form-builder/client/plugin.mjs +59 -31
- package/dist/packages/stack/src/plugins/ui-builder/client/plugin.cjs +52 -25
- package/dist/packages/stack/src/plugins/ui-builder/client/plugin.mjs +53 -26
- package/dist/packages/stack/src/plugins/utils.cjs +6 -0
- package/dist/packages/stack/src/plugins/utils.mjs +5 -1
- package/dist/plugins/blog/api/index.d.cts +2 -2
- package/dist/plugins/blog/api/index.d.mts +2 -2
- package/dist/plugins/blog/api/index.d.ts +2 -2
- package/dist/plugins/blog/client/hooks/index.d.cts +2 -2
- package/dist/plugins/blog/client/hooks/index.d.mts +2 -2
- package/dist/plugins/blog/client/hooks/index.d.ts +2 -2
- package/dist/plugins/blog/client/index.d.cts +2 -2
- package/dist/plugins/blog/client/index.d.mts +2 -2
- package/dist/plugins/blog/client/index.d.ts +2 -2
- package/dist/plugins/blog/query-keys.d.cts +2 -2
- package/dist/plugins/blog/query-keys.d.mts +2 -2
- package/dist/plugins/blog/query-keys.d.ts +2 -2
- package/dist/plugins/client/index.cjs +2 -0
- package/dist/plugins/client/index.d.cts +15 -1
- package/dist/plugins/client/index.d.mts +15 -1
- package/dist/plugins/client/index.d.ts +15 -1
- package/dist/plugins/client/index.mjs +1 -1
- package/dist/plugins/comments/client/index.d.cts +5 -0
- package/dist/plugins/comments/client/index.d.mts +5 -0
- package/dist/plugins/comments/client/index.d.ts +5 -0
- package/dist/plugins/comments/query-keys.cjs +4 -4
- package/dist/plugins/comments/query-keys.mjs +1 -1
- package/dist/plugins/kanban/api/index.d.cts +1 -1
- package/dist/plugins/kanban/api/index.d.mts +1 -1
- package/dist/plugins/kanban/api/index.d.ts +1 -1
- package/dist/plugins/kanban/query-keys.d.cts +1 -1
- package/dist/plugins/kanban/query-keys.d.mts +1 -1
- package/dist/plugins/kanban/query-keys.d.ts +1 -1
- package/dist/shared/{stack.IUeyQKrm.d.mts → stack.BSqJrCTM.d.cts} +5 -5
- package/dist/shared/{stack.D7HSzZdG.d.ts → stack.BXxrFL9R.d.ts} +5 -5
- package/dist/shared/{stack.6mEHS2WH.d.mts → stack.DOZ1EXjM.d.mts} +3 -3
- package/dist/shared/{stack.AJTXI7kw.d.cts → stack.DX-tQ93o.d.cts} +3 -3
- package/dist/shared/{stack.DjgpFWq3.d.cts → stack.DzOhpIYM.d.mts} +5 -5
- package/dist/shared/{stack.QYn-Px94.d.ts → stack.VF6FhyZw.d.ts} +3 -3
- package/package.json +1 -1
- package/src/__tests__/client-plugin-ssr-loaders.test.ts +329 -0
- package/src/plugins/blog/client/plugin.tsx +23 -14
- package/src/plugins/client/index.ts +2 -0
- package/src/plugins/cms/client/plugin.tsx +73 -42
- package/src/plugins/comments/client/plugin.tsx +82 -2
- package/src/plugins/comments/client/utils.ts +2 -14
- package/src/plugins/comments/error-utils.ts +17 -0
- package/src/plugins/comments/query-keys.ts +1 -1
- package/src/plugins/form-builder/client/plugin.tsx +59 -35
- package/src/plugins/ui-builder/client/plugin.tsx +57 -27
- package/src/plugins/utils.ts +18 -0
- package/dist/shared/{stack.eq5eg1yt.d.cts → stack.BOokfhZD.d.cts} +13 -13
- package/dist/shared/{stack.BQmuNl5p.d.ts → stack.BWp0hcm9.d.cts} +3 -3
- package/dist/shared/{stack.BQmuNl5p.d.cts → stack.BWp0hcm9.d.mts} +3 -3
- package/dist/shared/{stack.BQmuNl5p.d.mts → stack.BWp0hcm9.d.ts} +3 -3
- package/dist/shared/{stack.CMbX8Q5C.d.ts → stack.BvCR4-9H.d.ts} +13 -13
- package/dist/shared/{stack.Dj04W2c3.d.mts → stack.CWxAl9K3.d.mts} +13 -13
|
@@ -3,6 +3,7 @@ import { lazy } from "react";
|
|
|
3
3
|
import {
|
|
4
4
|
defineClientPlugin,
|
|
5
5
|
createApiClient,
|
|
6
|
+
isConnectionError,
|
|
6
7
|
runClientHookWithShim,
|
|
7
8
|
} from "@btst/stack/plugins/client";
|
|
8
9
|
import { createRoute } from "@btst/yar";
|
|
@@ -10,6 +11,7 @@ import type { ComponentType } from "react";
|
|
|
10
11
|
import type { QueryClient } from "@tanstack/react-query";
|
|
11
12
|
import type { CMSApiRouter } from "../../cms/api";
|
|
12
13
|
import { createCMSQueryKeys } from "../../cms/query-keys";
|
|
14
|
+
import { createSanitizedSSRLoaderError } from "../../utils";
|
|
13
15
|
import { UI_BUILDER_TYPE_SLUG } from "../schemas";
|
|
14
16
|
import type {
|
|
15
17
|
UIBuilderClientHooks,
|
|
@@ -81,6 +83,18 @@ function createPageListLoader(config: UIBuilderClientConfig) {
|
|
|
81
83
|
apiBasePath,
|
|
82
84
|
headers,
|
|
83
85
|
};
|
|
86
|
+
const client = createApiClient<CMSApiRouter>({
|
|
87
|
+
baseURL: apiBaseURL,
|
|
88
|
+
basePath: apiBasePath,
|
|
89
|
+
});
|
|
90
|
+
const queries = createCMSQueryKeys(client, headers);
|
|
91
|
+
const limit = 20;
|
|
92
|
+
const listQuery = queries.cmsContent.list({
|
|
93
|
+
typeSlug,
|
|
94
|
+
limit,
|
|
95
|
+
offset: 0,
|
|
96
|
+
});
|
|
97
|
+
const uiBuilderListQueryKey = [...listQuery.queryKey, "ui-builder"];
|
|
84
98
|
|
|
85
99
|
try {
|
|
86
100
|
// Before hook - authorization check
|
|
@@ -91,21 +105,9 @@ function createPageListLoader(config: UIBuilderClientConfig) {
|
|
|
91
105
|
);
|
|
92
106
|
}
|
|
93
107
|
|
|
94
|
-
const client = createApiClient<CMSApiRouter>({
|
|
95
|
-
baseURL: apiBaseURL,
|
|
96
|
-
basePath: apiBasePath,
|
|
97
|
-
});
|
|
98
|
-
const queries = createCMSQueryKeys(client, headers);
|
|
99
|
-
const limit = 20;
|
|
100
|
-
|
|
101
108
|
// Prefetch pages using infinite query
|
|
102
|
-
const listQuery = queries.cmsContent.list({
|
|
103
|
-
typeSlug,
|
|
104
|
-
limit,
|
|
105
|
-
offset: 0,
|
|
106
|
-
});
|
|
107
109
|
await queryClient.prefetchInfiniteQuery({
|
|
108
|
-
queryKey:
|
|
110
|
+
queryKey: uiBuilderListQueryKey,
|
|
109
111
|
queryFn: async ({ pageParam = 0 }) => {
|
|
110
112
|
const response: unknown = await client("/content/:typeSlug", {
|
|
111
113
|
method: "GET",
|
|
@@ -133,8 +135,7 @@ function createPageListLoader(config: UIBuilderClientConfig) {
|
|
|
133
135
|
|
|
134
136
|
// Check if there was an error
|
|
135
137
|
const queryState = queryClient.getQueryState([
|
|
136
|
-
...
|
|
137
|
-
"ui-builder",
|
|
138
|
+
...uiBuilderListQueryKey,
|
|
138
139
|
]);
|
|
139
140
|
if (queryState?.error && hooks?.onLoadError) {
|
|
140
141
|
const error =
|
|
@@ -145,6 +146,22 @@ function createPageListLoader(config: UIBuilderClientConfig) {
|
|
|
145
146
|
}
|
|
146
147
|
} catch (error) {
|
|
147
148
|
// Error hook - log the error but don't throw during SSR
|
|
149
|
+
if (isConnectionError(error)) {
|
|
150
|
+
console.warn(
|
|
151
|
+
"[btst/ui-builder] route.loader() failed — no server running at build time. " +
|
|
152
|
+
"Use myStack.api.uiBuilder.prefetchForRoute() for SSG data prefetching.",
|
|
153
|
+
);
|
|
154
|
+
} else {
|
|
155
|
+
const errToStore = createSanitizedSSRLoaderError();
|
|
156
|
+
await queryClient.prefetchInfiniteQuery({
|
|
157
|
+
queryKey: uiBuilderListQueryKey,
|
|
158
|
+
queryFn: () => {
|
|
159
|
+
throw errToStore;
|
|
160
|
+
},
|
|
161
|
+
initialPageParam: 0,
|
|
162
|
+
retry: false,
|
|
163
|
+
});
|
|
164
|
+
}
|
|
148
165
|
if (hooks?.onLoadError) {
|
|
149
166
|
await hooks.onLoadError(error as Error, context);
|
|
150
167
|
}
|
|
@@ -173,6 +190,14 @@ function createPageBuilderLoader(
|
|
|
173
190
|
apiBasePath,
|
|
174
191
|
headers,
|
|
175
192
|
};
|
|
193
|
+
const client = createApiClient<CMSApiRouter>({
|
|
194
|
+
baseURL: apiBaseURL,
|
|
195
|
+
basePath: apiBasePath,
|
|
196
|
+
});
|
|
197
|
+
const queries = createCMSQueryKeys(client, headers);
|
|
198
|
+
const pageQuery = id
|
|
199
|
+
? queries.cmsContent.detail(typeSlug, id)
|
|
200
|
+
: undefined;
|
|
176
201
|
|
|
177
202
|
try {
|
|
178
203
|
// Before hook - authorization check
|
|
@@ -183,17 +208,9 @@ function createPageBuilderLoader(
|
|
|
183
208
|
);
|
|
184
209
|
}
|
|
185
210
|
|
|
186
|
-
const client = createApiClient<CMSApiRouter>({
|
|
187
|
-
baseURL: apiBaseURL,
|
|
188
|
-
basePath: apiBasePath,
|
|
189
|
-
});
|
|
190
|
-
const queries = createCMSQueryKeys(client, headers);
|
|
191
|
-
|
|
192
211
|
// Prefetch page if editing
|
|
193
212
|
if (id) {
|
|
194
|
-
await queryClient.prefetchQuery(
|
|
195
|
-
queries.cmsContent.detail(typeSlug, id),
|
|
196
|
-
);
|
|
213
|
+
await queryClient.prefetchQuery(pageQuery!);
|
|
197
214
|
}
|
|
198
215
|
|
|
199
216
|
// After hook
|
|
@@ -203,9 +220,7 @@ function createPageBuilderLoader(
|
|
|
203
220
|
|
|
204
221
|
// Check if there was an error
|
|
205
222
|
if (id) {
|
|
206
|
-
const queryState = queryClient.getQueryState(
|
|
207
|
-
queries.cmsContent.detail(typeSlug, id).queryKey,
|
|
208
|
-
);
|
|
223
|
+
const queryState = queryClient.getQueryState(pageQuery!.queryKey);
|
|
209
224
|
if (queryState?.error && hooks?.onLoadError) {
|
|
210
225
|
const error =
|
|
211
226
|
queryState.error instanceof Error
|
|
@@ -216,6 +231,21 @@ function createPageBuilderLoader(
|
|
|
216
231
|
}
|
|
217
232
|
} catch (error) {
|
|
218
233
|
// Error hook - log the error but don't throw during SSR
|
|
234
|
+
if (isConnectionError(error)) {
|
|
235
|
+
console.warn(
|
|
236
|
+
"[btst/ui-builder] route.loader() failed — no server running at build time. " +
|
|
237
|
+
"Use myStack.api.uiBuilder.prefetchForRoute() for SSG data prefetching.",
|
|
238
|
+
);
|
|
239
|
+
} else if (pageQuery) {
|
|
240
|
+
const errToStore = createSanitizedSSRLoaderError();
|
|
241
|
+
await queryClient.prefetchQuery({
|
|
242
|
+
queryKey: pageQuery.queryKey,
|
|
243
|
+
queryFn: () => {
|
|
244
|
+
throw errToStore;
|
|
245
|
+
},
|
|
246
|
+
retry: false,
|
|
247
|
+
});
|
|
248
|
+
}
|
|
219
249
|
if (hooks?.onLoadError) {
|
|
220
250
|
await hooks.onLoadError(error as Error, context);
|
|
221
251
|
}
|
package/src/plugins/utils.ts
CHANGED
|
@@ -109,6 +109,24 @@ export function isConnectionError(err: unknown): boolean {
|
|
|
109
109
|
code === "ERR_CONNECTION_REFUSED"
|
|
110
110
|
);
|
|
111
111
|
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Public-safe message used when SSR loader failures are intentionally seeded
|
|
115
|
+
* into React Query so Error Boundaries can render on the client.
|
|
116
|
+
*
|
|
117
|
+
* Never include raw server error text here because dehydrated query state can
|
|
118
|
+
* be serialized into HTML.
|
|
119
|
+
*/
|
|
120
|
+
export const SSR_LOADER_ERROR_MESSAGE = "Failed to load data.";
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Creates a sanitized Error for SSR loader cache seeding.
|
|
124
|
+
*
|
|
125
|
+
* Use this instead of storing raw server errors in dehydrated query state.
|
|
126
|
+
*/
|
|
127
|
+
export function createSanitizedSSRLoaderError(): Error {
|
|
128
|
+
return new Error(SSR_LOADER_ERROR_MESSAGE);
|
|
129
|
+
}
|
|
112
130
|
import type { Router, Endpoint, Status, statusCodes } from "better-call";
|
|
113
131
|
|
|
114
132
|
interface CreateApiClientOptions {
|
|
@@ -8,11 +8,11 @@ import { QueryClient } from '@tanstack/react-query';
|
|
|
8
8
|
declare const createBoardSchema: z.ZodObject<{
|
|
9
9
|
description: z.ZodOptional<z.ZodString>;
|
|
10
10
|
name: z.ZodString;
|
|
11
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
12
|
+
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
11
13
|
slug: z.ZodOptional<z.ZodString>;
|
|
12
14
|
ownerId: z.ZodOptional<z.ZodString>;
|
|
13
15
|
organizationId: z.ZodOptional<z.ZodString>;
|
|
14
|
-
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
15
|
-
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
16
16
|
}, z.core.$strip>;
|
|
17
17
|
declare const updateBoardSchema: z.ZodObject<{
|
|
18
18
|
createdAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
@@ -26,9 +26,9 @@ declare const updateBoardSchema: z.ZodObject<{
|
|
|
26
26
|
}, z.core.$strip>;
|
|
27
27
|
declare const createColumnSchema: z.ZodObject<{
|
|
28
28
|
title: z.ZodString;
|
|
29
|
-
boardId: z.ZodString;
|
|
30
29
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
31
30
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
31
|
+
boardId: z.ZodString;
|
|
32
32
|
order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
33
33
|
}, z.core.$strip>;
|
|
34
34
|
declare const updateColumnSchema: z.ZodObject<{
|
|
@@ -331,19 +331,19 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
|
|
|
331
331
|
body: better_call.StandardSchemaV1<{
|
|
332
332
|
name: string;
|
|
333
333
|
description?: string | undefined;
|
|
334
|
+
createdAt?: unknown;
|
|
335
|
+
updatedAt?: unknown;
|
|
334
336
|
slug?: string | undefined;
|
|
335
337
|
ownerId?: string | undefined;
|
|
336
338
|
organizationId?: string | undefined;
|
|
337
|
-
createdAt?: unknown;
|
|
338
|
-
updatedAt?: unknown;
|
|
339
339
|
}, {
|
|
340
340
|
name: string;
|
|
341
341
|
description?: string | undefined;
|
|
342
|
+
createdAt?: unknown;
|
|
343
|
+
updatedAt?: unknown;
|
|
342
344
|
slug?: string | undefined;
|
|
343
345
|
ownerId?: string | undefined;
|
|
344
346
|
organizationId?: string | undefined;
|
|
345
|
-
createdAt?: unknown;
|
|
346
|
-
updatedAt?: unknown;
|
|
347
347
|
}>;
|
|
348
348
|
}, {
|
|
349
349
|
columns: ColumnWithTasks[];
|
|
@@ -361,19 +361,19 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
|
|
|
361
361
|
body: better_call.StandardSchemaV1<{
|
|
362
362
|
description?: string | undefined;
|
|
363
363
|
name?: string | undefined;
|
|
364
|
+
createdAt?: unknown;
|
|
365
|
+
updatedAt?: unknown;
|
|
364
366
|
slug?: string | undefined;
|
|
365
367
|
ownerId?: string | undefined;
|
|
366
368
|
organizationId?: string | undefined;
|
|
367
|
-
createdAt?: unknown;
|
|
368
|
-
updatedAt?: unknown;
|
|
369
369
|
}, {
|
|
370
370
|
description?: string | undefined;
|
|
371
371
|
name?: string | undefined;
|
|
372
|
+
createdAt?: unknown;
|
|
373
|
+
updatedAt?: unknown;
|
|
372
374
|
slug?: string | undefined;
|
|
373
375
|
ownerId?: string | undefined;
|
|
374
376
|
organizationId?: string | undefined;
|
|
375
|
-
createdAt?: unknown;
|
|
376
|
-
updatedAt?: unknown;
|
|
377
377
|
}>;
|
|
378
378
|
}, Board>;
|
|
379
379
|
readonly deleteBoard: better_call.StrictEndpoint<"/boards/:id", {} & {
|
|
@@ -402,15 +402,15 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
|
|
|
402
402
|
method: "PUT";
|
|
403
403
|
body: better_call.StandardSchemaV1<{
|
|
404
404
|
title?: string | undefined;
|
|
405
|
-
boardId?: string | undefined;
|
|
406
405
|
createdAt?: unknown;
|
|
407
406
|
updatedAt?: unknown;
|
|
407
|
+
boardId?: string | undefined;
|
|
408
408
|
order?: number | undefined;
|
|
409
409
|
}, {
|
|
410
410
|
title?: string | undefined;
|
|
411
|
-
boardId?: string | undefined;
|
|
412
411
|
createdAt?: unknown;
|
|
413
412
|
updatedAt?: unknown;
|
|
413
|
+
boardId?: string | undefined;
|
|
414
414
|
order?: number | undefined;
|
|
415
415
|
}>;
|
|
416
416
|
}, Column>;
|
|
@@ -42,15 +42,15 @@ declare const createPostSchema: z.ZodObject<{
|
|
|
42
42
|
name: z.ZodString;
|
|
43
43
|
slug: z.ZodString;
|
|
44
44
|
}, z.core.$strip>]>>>>;
|
|
45
|
-
title: z.ZodString;
|
|
46
45
|
slug: z.ZodOptional<z.ZodString>;
|
|
46
|
+
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
47
|
+
publishedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
47
48
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
48
49
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
49
|
-
|
|
50
|
+
title: z.ZodString;
|
|
50
51
|
content: z.ZodString;
|
|
51
52
|
excerpt: z.ZodString;
|
|
52
53
|
image: z.ZodOptional<z.ZodString>;
|
|
53
|
-
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
54
54
|
}, z.core.$strip>;
|
|
55
55
|
declare const updatePostSchema: z.ZodObject<{
|
|
56
56
|
publishedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
@@ -42,15 +42,15 @@ declare const createPostSchema: z.ZodObject<{
|
|
|
42
42
|
name: z.ZodString;
|
|
43
43
|
slug: z.ZodString;
|
|
44
44
|
}, z.core.$strip>]>>>>;
|
|
45
|
-
title: z.ZodString;
|
|
46
45
|
slug: z.ZodOptional<z.ZodString>;
|
|
46
|
+
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
47
|
+
publishedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
47
48
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
48
49
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
49
|
-
|
|
50
|
+
title: z.ZodString;
|
|
50
51
|
content: z.ZodString;
|
|
51
52
|
excerpt: z.ZodString;
|
|
52
53
|
image: z.ZodOptional<z.ZodString>;
|
|
53
|
-
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
54
54
|
}, z.core.$strip>;
|
|
55
55
|
declare const updatePostSchema: z.ZodObject<{
|
|
56
56
|
publishedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
@@ -42,15 +42,15 @@ declare const createPostSchema: z.ZodObject<{
|
|
|
42
42
|
name: z.ZodString;
|
|
43
43
|
slug: z.ZodString;
|
|
44
44
|
}, z.core.$strip>]>>>>;
|
|
45
|
-
title: z.ZodString;
|
|
46
45
|
slug: z.ZodOptional<z.ZodString>;
|
|
46
|
+
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
47
|
+
publishedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
47
48
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
48
49
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
49
|
-
|
|
50
|
+
title: z.ZodString;
|
|
50
51
|
content: z.ZodString;
|
|
51
52
|
excerpt: z.ZodString;
|
|
52
53
|
image: z.ZodOptional<z.ZodString>;
|
|
53
|
-
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
54
54
|
}, z.core.$strip>;
|
|
55
55
|
declare const updatePostSchema: z.ZodObject<{
|
|
56
56
|
publishedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
@@ -8,11 +8,11 @@ import { QueryClient } from '@tanstack/react-query';
|
|
|
8
8
|
declare const createBoardSchema: z.ZodObject<{
|
|
9
9
|
description: z.ZodOptional<z.ZodString>;
|
|
10
10
|
name: z.ZodString;
|
|
11
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
12
|
+
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
11
13
|
slug: z.ZodOptional<z.ZodString>;
|
|
12
14
|
ownerId: z.ZodOptional<z.ZodString>;
|
|
13
15
|
organizationId: z.ZodOptional<z.ZodString>;
|
|
14
|
-
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
15
|
-
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
16
16
|
}, z.core.$strip>;
|
|
17
17
|
declare const updateBoardSchema: z.ZodObject<{
|
|
18
18
|
createdAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
@@ -26,9 +26,9 @@ declare const updateBoardSchema: z.ZodObject<{
|
|
|
26
26
|
}, z.core.$strip>;
|
|
27
27
|
declare const createColumnSchema: z.ZodObject<{
|
|
28
28
|
title: z.ZodString;
|
|
29
|
-
boardId: z.ZodString;
|
|
30
29
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
31
30
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
31
|
+
boardId: z.ZodString;
|
|
32
32
|
order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
33
33
|
}, z.core.$strip>;
|
|
34
34
|
declare const updateColumnSchema: z.ZodObject<{
|
|
@@ -331,19 +331,19 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
|
|
|
331
331
|
body: better_call.StandardSchemaV1<{
|
|
332
332
|
name: string;
|
|
333
333
|
description?: string | undefined;
|
|
334
|
+
createdAt?: unknown;
|
|
335
|
+
updatedAt?: unknown;
|
|
334
336
|
slug?: string | undefined;
|
|
335
337
|
ownerId?: string | undefined;
|
|
336
338
|
organizationId?: string | undefined;
|
|
337
|
-
createdAt?: unknown;
|
|
338
|
-
updatedAt?: unknown;
|
|
339
339
|
}, {
|
|
340
340
|
name: string;
|
|
341
341
|
description?: string | undefined;
|
|
342
|
+
createdAt?: unknown;
|
|
343
|
+
updatedAt?: unknown;
|
|
342
344
|
slug?: string | undefined;
|
|
343
345
|
ownerId?: string | undefined;
|
|
344
346
|
organizationId?: string | undefined;
|
|
345
|
-
createdAt?: unknown;
|
|
346
|
-
updatedAt?: unknown;
|
|
347
347
|
}>;
|
|
348
348
|
}, {
|
|
349
349
|
columns: ColumnWithTasks[];
|
|
@@ -361,19 +361,19 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
|
|
|
361
361
|
body: better_call.StandardSchemaV1<{
|
|
362
362
|
description?: string | undefined;
|
|
363
363
|
name?: string | undefined;
|
|
364
|
+
createdAt?: unknown;
|
|
365
|
+
updatedAt?: unknown;
|
|
364
366
|
slug?: string | undefined;
|
|
365
367
|
ownerId?: string | undefined;
|
|
366
368
|
organizationId?: string | undefined;
|
|
367
|
-
createdAt?: unknown;
|
|
368
|
-
updatedAt?: unknown;
|
|
369
369
|
}, {
|
|
370
370
|
description?: string | undefined;
|
|
371
371
|
name?: string | undefined;
|
|
372
|
+
createdAt?: unknown;
|
|
373
|
+
updatedAt?: unknown;
|
|
372
374
|
slug?: string | undefined;
|
|
373
375
|
ownerId?: string | undefined;
|
|
374
376
|
organizationId?: string | undefined;
|
|
375
|
-
createdAt?: unknown;
|
|
376
|
-
updatedAt?: unknown;
|
|
377
377
|
}>;
|
|
378
378
|
}, Board>;
|
|
379
379
|
readonly deleteBoard: better_call.StrictEndpoint<"/boards/:id", {} & {
|
|
@@ -402,15 +402,15 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
|
|
|
402
402
|
method: "PUT";
|
|
403
403
|
body: better_call.StandardSchemaV1<{
|
|
404
404
|
title?: string | undefined;
|
|
405
|
-
boardId?: string | undefined;
|
|
406
405
|
createdAt?: unknown;
|
|
407
406
|
updatedAt?: unknown;
|
|
407
|
+
boardId?: string | undefined;
|
|
408
408
|
order?: number | undefined;
|
|
409
409
|
}, {
|
|
410
410
|
title?: string | undefined;
|
|
411
|
-
boardId?: string | undefined;
|
|
412
411
|
createdAt?: unknown;
|
|
413
412
|
updatedAt?: unknown;
|
|
413
|
+
boardId?: string | undefined;
|
|
414
414
|
order?: number | undefined;
|
|
415
415
|
}>;
|
|
416
416
|
}, Column>;
|
|
@@ -8,11 +8,11 @@ import { QueryClient } from '@tanstack/react-query';
|
|
|
8
8
|
declare const createBoardSchema: z.ZodObject<{
|
|
9
9
|
description: z.ZodOptional<z.ZodString>;
|
|
10
10
|
name: z.ZodString;
|
|
11
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
12
|
+
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
11
13
|
slug: z.ZodOptional<z.ZodString>;
|
|
12
14
|
ownerId: z.ZodOptional<z.ZodString>;
|
|
13
15
|
organizationId: z.ZodOptional<z.ZodString>;
|
|
14
|
-
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
15
|
-
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
16
16
|
}, z.core.$strip>;
|
|
17
17
|
declare const updateBoardSchema: z.ZodObject<{
|
|
18
18
|
createdAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
@@ -26,9 +26,9 @@ declare const updateBoardSchema: z.ZodObject<{
|
|
|
26
26
|
}, z.core.$strip>;
|
|
27
27
|
declare const createColumnSchema: z.ZodObject<{
|
|
28
28
|
title: z.ZodString;
|
|
29
|
-
boardId: z.ZodString;
|
|
30
29
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
31
30
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
31
|
+
boardId: z.ZodString;
|
|
32
32
|
order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
33
33
|
}, z.core.$strip>;
|
|
34
34
|
declare const updateColumnSchema: z.ZodObject<{
|
|
@@ -331,19 +331,19 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
|
|
|
331
331
|
body: better_call.StandardSchemaV1<{
|
|
332
332
|
name: string;
|
|
333
333
|
description?: string | undefined;
|
|
334
|
+
createdAt?: unknown;
|
|
335
|
+
updatedAt?: unknown;
|
|
334
336
|
slug?: string | undefined;
|
|
335
337
|
ownerId?: string | undefined;
|
|
336
338
|
organizationId?: string | undefined;
|
|
337
|
-
createdAt?: unknown;
|
|
338
|
-
updatedAt?: unknown;
|
|
339
339
|
}, {
|
|
340
340
|
name: string;
|
|
341
341
|
description?: string | undefined;
|
|
342
|
+
createdAt?: unknown;
|
|
343
|
+
updatedAt?: unknown;
|
|
342
344
|
slug?: string | undefined;
|
|
343
345
|
ownerId?: string | undefined;
|
|
344
346
|
organizationId?: string | undefined;
|
|
345
|
-
createdAt?: unknown;
|
|
346
|
-
updatedAt?: unknown;
|
|
347
347
|
}>;
|
|
348
348
|
}, {
|
|
349
349
|
columns: ColumnWithTasks[];
|
|
@@ -361,19 +361,19 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
|
|
|
361
361
|
body: better_call.StandardSchemaV1<{
|
|
362
362
|
description?: string | undefined;
|
|
363
363
|
name?: string | undefined;
|
|
364
|
+
createdAt?: unknown;
|
|
365
|
+
updatedAt?: unknown;
|
|
364
366
|
slug?: string | undefined;
|
|
365
367
|
ownerId?: string | undefined;
|
|
366
368
|
organizationId?: string | undefined;
|
|
367
|
-
createdAt?: unknown;
|
|
368
|
-
updatedAt?: unknown;
|
|
369
369
|
}, {
|
|
370
370
|
description?: string | undefined;
|
|
371
371
|
name?: string | undefined;
|
|
372
|
+
createdAt?: unknown;
|
|
373
|
+
updatedAt?: unknown;
|
|
372
374
|
slug?: string | undefined;
|
|
373
375
|
ownerId?: string | undefined;
|
|
374
376
|
organizationId?: string | undefined;
|
|
375
|
-
createdAt?: unknown;
|
|
376
|
-
updatedAt?: unknown;
|
|
377
377
|
}>;
|
|
378
378
|
}, Board>;
|
|
379
379
|
readonly deleteBoard: better_call.StrictEndpoint<"/boards/:id", {} & {
|
|
@@ -402,15 +402,15 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
|
|
|
402
402
|
method: "PUT";
|
|
403
403
|
body: better_call.StandardSchemaV1<{
|
|
404
404
|
title?: string | undefined;
|
|
405
|
-
boardId?: string | undefined;
|
|
406
405
|
createdAt?: unknown;
|
|
407
406
|
updatedAt?: unknown;
|
|
407
|
+
boardId?: string | undefined;
|
|
408
408
|
order?: number | undefined;
|
|
409
409
|
}, {
|
|
410
410
|
title?: string | undefined;
|
|
411
|
-
boardId?: string | undefined;
|
|
412
411
|
createdAt?: unknown;
|
|
413
412
|
updatedAt?: unknown;
|
|
413
|
+
boardId?: string | undefined;
|
|
414
414
|
order?: number | undefined;
|
|
415
415
|
}>;
|
|
416
416
|
}, Column>;
|