@btst/stack 2.11.8 → 2.12.1

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.
Files changed (80) hide show
  1. package/dist/packages/stack/src/plugins/cms/api/plugin.cjs +14 -11
  2. package/dist/packages/stack/src/plugins/cms/api/plugin.mjs +14 -11
  3. package/dist/packages/stack/src/plugins/cms/client/components/forms/relation-field.cjs +87 -15
  4. package/dist/packages/stack/src/plugins/cms/client/components/forms/relation-field.mjs +87 -15
  5. package/dist/packages/stack/src/plugins/cms/schemas.cjs +11 -6
  6. package/dist/packages/stack/src/plugins/cms/schemas.mjs +10 -6
  7. package/dist/packages/stack/src/plugins/comments/api/query-key-defs.cjs +2 -1
  8. package/dist/packages/stack/src/plugins/comments/api/query-key-defs.mjs +2 -1
  9. package/dist/packages/stack/src/plugins/comments/client/components/comment-thread.cjs +6 -2
  10. package/dist/packages/stack/src/plugins/comments/client/components/comment-thread.mjs +6 -2
  11. package/dist/packages/stack/src/plugins/comments/client/hooks/use-comments.cjs +5 -3
  12. package/dist/packages/stack/src/plugins/comments/client/hooks/use-comments.mjs +5 -3
  13. package/dist/packages/ui/src/components/auto-form/fields/array.cjs +181 -4
  14. package/dist/packages/ui/src/components/auto-form/fields/array.mjs +184 -7
  15. package/dist/packages/ui/src/components/auto-form/index.cjs +16 -1
  16. package/dist/packages/ui/src/components/auto-form/index.mjs +17 -2
  17. package/dist/plugins/cms/api/index.cjs +2 -0
  18. package/dist/plugins/cms/api/index.d.cts +3 -2
  19. package/dist/plugins/cms/api/index.d.mts +3 -2
  20. package/dist/plugins/cms/api/index.d.ts +3 -2
  21. package/dist/plugins/cms/api/index.mjs +1 -0
  22. package/dist/plugins/cms/client/hooks/index.d.cts +1 -1
  23. package/dist/plugins/cms/client/hooks/index.d.mts +1 -1
  24. package/dist/plugins/cms/client/hooks/index.d.ts +1 -1
  25. package/dist/plugins/cms/query-keys.d.cts +398 -7
  26. package/dist/plugins/cms/query-keys.d.mts +398 -7
  27. package/dist/plugins/cms/query-keys.d.ts +398 -7
  28. package/dist/plugins/comments/api/index.d.cts +4 -4
  29. package/dist/plugins/comments/api/index.d.mts +4 -4
  30. package/dist/plugins/comments/api/index.d.ts +4 -4
  31. package/dist/plugins/comments/client/components/index.d.cts +11 -0
  32. package/dist/plugins/comments/client/components/index.d.mts +11 -0
  33. package/dist/plugins/comments/client/components/index.d.ts +11 -0
  34. package/dist/plugins/comments/client/hooks/index.d.cts +17 -1
  35. package/dist/plugins/comments/client/hooks/index.d.mts +17 -1
  36. package/dist/plugins/comments/client/hooks/index.d.ts +17 -1
  37. package/dist/plugins/comments/client/index.d.cts +9 -0
  38. package/dist/plugins/comments/client/index.d.mts +9 -0
  39. package/dist/plugins/comments/client/index.d.ts +9 -0
  40. package/dist/plugins/comments/query-keys.cjs +1 -0
  41. package/dist/plugins/comments/query-keys.d.cts +3 -2
  42. package/dist/plugins/comments/query-keys.d.mts +3 -2
  43. package/dist/plugins/comments/query-keys.d.ts +3 -2
  44. package/dist/plugins/comments/query-keys.mjs +1 -0
  45. package/dist/plugins/kanban/api/index.d.cts +1 -1
  46. package/dist/plugins/kanban/api/index.d.mts +1 -1
  47. package/dist/plugins/kanban/api/index.d.ts +1 -1
  48. package/dist/plugins/kanban/query-keys.d.cts +1 -1
  49. package/dist/plugins/kanban/query-keys.d.mts +1 -1
  50. package/dist/plugins/kanban/query-keys.d.ts +1 -1
  51. package/dist/plugins/ui-builder/index.d.cts +1 -1
  52. package/dist/plugins/ui-builder/index.d.mts +1 -1
  53. package/dist/plugins/ui-builder/index.d.ts +1 -1
  54. package/dist/shared/{stack.CJE9sAjV.d.ts → stack.Bq3kiUaM.d.ts} +1 -1
  55. package/dist/shared/{stack.C-b3Sn8j.d.cts → stack.C7KNNiJm.d.cts} +3 -1
  56. package/dist/shared/{stack.C-b3Sn8j.d.mts → stack.C7KNNiJm.d.mts} +3 -1
  57. package/dist/shared/{stack.C-b3Sn8j.d.ts → stack.C7KNNiJm.d.ts} +3 -1
  58. package/dist/shared/{stack.Dcz6636A.d.mts → stack.CCncwK6g.d.cts} +1 -1
  59. package/dist/shared/{stack.CmHRdhl8.d.cts → stack.CO1g47IS.d.mts} +1 -1
  60. package/dist/shared/{stack.B8QD11QU.d.cts → stack.DFtpFS00.d.cts} +10 -0
  61. package/dist/shared/{stack.B8QD11QU.d.mts → stack.DFtpFS00.d.mts} +10 -0
  62. package/dist/shared/{stack.B8QD11QU.d.ts → stack.DFtpFS00.d.ts} +10 -0
  63. package/package.json +1 -1
  64. package/src/plugins/cms/__tests__/schema-roundtrip.test.ts +203 -0
  65. package/src/plugins/cms/api/index.ts +1 -0
  66. package/src/plugins/cms/api/plugin.ts +33 -16
  67. package/src/plugins/cms/client/components/forms/relation-field.tsx +121 -36
  68. package/src/plugins/cms/schemas.ts +26 -6
  69. package/src/plugins/cms/types.ts +10 -0
  70. package/src/plugins/comments/api/query-key-defs.ts +5 -1
  71. package/src/plugins/comments/client/components/comment-thread.tsx +15 -0
  72. package/src/plugins/comments/client/hooks/use-comments.tsx +26 -3
  73. package/src/plugins/comments/client/overrides.ts +10 -0
  74. package/src/plugins/comments/query-keys.ts +2 -0
  75. package/dist/shared/stack.DbnCLdNF.d.mts +0 -399
  76. package/dist/shared/stack.fXlShnhv.d.ts +0 -399
  77. package/dist/shared/stack.r6HohbyX.d.cts +0 -399
  78. package/dist/shared/{stack.B6S3cgwN.d.cts → stack.CuI_-z-_.d.cts} +16 -16
  79. package/dist/shared/{stack.Bzfx-_lq.d.mts → stack.D2RVkQD8.d.mts} +16 -16
  80. package/dist/shared/{stack.j5SFLC1d.d.ts → stack.DXrOtuek.d.ts} +16 -16
@@ -1,399 +0,0 @@
1
- import * as _btst_stack_plugins_api from '@btst/stack/plugins/api';
2
- import { a as SerializedContentItemWithType, S as SerializedContentType, b as ContentType, c as ContentItem, d as SerializedContentItem, e as ContentItemWithType, f as CMSBackendConfig, I as InverseRelation } from './stack.B8QD11QU.cjs';
3
- import * as better_call from 'better-call';
4
- import { z } from 'zod';
5
- import { DBAdapter } from '@btst/db';
6
- import { QueryClient } from '@tanstack/react-query';
7
-
8
- /**
9
- * Serialize a ContentType for SSR/SSG use (convert dates to strings).
10
- * Applies lazy migration for legacy schemas (version 1 → 2).
11
- */
12
- declare function serializeContentType(ct: ContentType): SerializedContentType;
13
- /**
14
- * Serialize a ContentItem for SSR/SSG use (convert dates to strings).
15
- */
16
- declare function serializeContentItem(item: ContentItem): SerializedContentItem;
17
- /**
18
- * Serialize a ContentItem with parsed data and joined ContentType.
19
- * Throws a SyntaxError if `item.data` is not valid JSON, so corrupted rows
20
- * produce a visible, debuggable error rather than silently returning null.
21
- */
22
- declare function serializeContentItemWithType(item: ContentItemWithType): SerializedContentItemWithType;
23
- /**
24
- * Retrieve all content types.
25
- * Pure DB function — no hooks, no HTTP context. Safe for SSG and server-side use.
26
- *
27
- * @remarks **Security:** Authorization hooks are NOT called. The caller is
28
- * responsible for any access-control checks before invoking this function.
29
- *
30
- * @param adapter - The database adapter
31
- */
32
- declare function getAllContentTypes(adapter: DBAdapter): Promise<SerializedContentType[]>;
33
- /**
34
- * Retrieve all content items for a given content type, with optional pagination.
35
- * Pure DB function — no hooks, no HTTP context. Safe for SSG and server-side use.
36
- *
37
- * @remarks **Security:** Authorization hooks (e.g. `onBeforeListItems`) are NOT
38
- * called. The caller is responsible for any access-control checks before
39
- * invoking this function.
40
- *
41
- * @param adapter - The database adapter
42
- * @param contentTypeSlug - The slug of the content type to query
43
- * @param params - Optional filter/pagination parameters
44
- */
45
- declare function getAllContentItems(adapter: DBAdapter, contentTypeSlug: string, params?: {
46
- slug?: string;
47
- limit?: number;
48
- offset?: number;
49
- }): Promise<{
50
- items: SerializedContentItemWithType[];
51
- total: number;
52
- limit?: number;
53
- offset?: number;
54
- }>;
55
- /**
56
- * Retrieve a single content item by its ID.
57
- * Returns null if the item is not found.
58
- * Pure DB function — no hooks, no HTTP context. Safe for SSG and server-side use.
59
- *
60
- * @remarks **Security:** Authorization hooks are NOT called. The caller is
61
- * responsible for any access-control checks before invoking this function.
62
- *
63
- * @param adapter - The database adapter
64
- * @param id - The content item ID (UUID)
65
- */
66
- declare function getContentItemById(adapter: DBAdapter, id: string): Promise<SerializedContentItemWithType | null>;
67
- /**
68
- * Retrieve a single content item by its slug within a content type.
69
- * Returns null if the content type or item is not found.
70
- * Pure DB function — no hooks, no HTTP context. Safe for SSG and server-side use.
71
- *
72
- * @remarks **Security:** Authorization hooks are NOT called. The caller is
73
- * responsible for any access-control checks before invoking this function.
74
- *
75
- * @param adapter - The database adapter
76
- * @param contentTypeSlug - The slug of the content type
77
- * @param slug - The slug of the content item
78
- */
79
- declare function getContentItemBySlug(adapter: DBAdapter, contentTypeSlug: string, slug: string): Promise<SerializedContentItemWithType | null>;
80
-
81
- /**
82
- * Input for creating a new CMS content item.
83
- */
84
- interface CreateCMSContentItemInput {
85
- /** URL-safe slug for the item */
86
- slug: string;
87
- /** Arbitrary data payload — should match the content type schema */
88
- data: Record<string, unknown>;
89
- }
90
- /**
91
- * Options for {@link createCMSContentItem}.
92
- */
93
- interface CreateCMSContentItemOptions {
94
- /**
95
- * When `true`, persist relation fields (`belongsTo`, `hasMany`,
96
- * `manyToMany`) into the `contentRelation` junction table in addition to
97
- * the item's JSON payload.
98
- *
99
- * This is what the HTTP `POST /content/:typeSlug` route does, and is
100
- * required for the admin "Related Items" panel / inverse-relation queries
101
- * to find the item.
102
- *
103
- * Seeds and other programmatic callers that want the admin UI to work
104
- * should enable this flag. Callers are still expected to pass
105
- * pre-created target IDs (`{ id }` or `[{ id }, ...]`) — inline `_new`
106
- * creation is only supported via the HTTP route.
107
- *
108
- * Defaults to `false` for backwards compatibility (a no-op for content
109
- * types without relations).
110
- */
111
- syncRelations?: boolean;
112
- }
113
- /**
114
- * Create a new content item for a content type (looked up by slug).
115
- *
116
- * Bypasses Zod schema validation and inline `_new` relation creation — the
117
- * caller is responsible for providing valid data and pre-created relation
118
- * IDs. For schema validation or inline creation of related items, use the
119
- * HTTP endpoint instead.
120
- *
121
- * Throws if the content type is not found or the slug is already taken within
122
- * that content type.
123
- *
124
- * @remarks **Security:** No authorization hooks (`onBeforeCreate`, `onAfterCreate`)
125
- * are called. The caller is responsible for any access-control checks before
126
- * invoking this function.
127
- *
128
- * @param adapter - The database adapter
129
- * @param contentTypeSlug - Slug of the target content type
130
- * @param input - Item slug and data payload
131
- * @param options - See {@link CreateCMSContentItemOptions}. Pass
132
- * `{ syncRelations: true }` to also populate the `contentRelation`
133
- * junction table for relation fields in the payload.
134
- */
135
- declare function createCMSContentItem(adapter: DBAdapter, contentTypeSlug: string, input: CreateCMSContentItemInput, options?: CreateCMSContentItemOptions): Promise<SerializedContentItem>;
136
-
137
- /**
138
- * Route keys for the CMS plugin — matches the keys returned by
139
- * `stackClient.router.getRoute(path).routeKey`.
140
- */
141
- type CMSRouteKey = "dashboard" | "contentList" | "newContent" | "editContent";
142
- interface CMSPrefetchForRoute {
143
- (key: "dashboard" | "newContent", qc: QueryClient): Promise<void>;
144
- (key: "contentList", qc: QueryClient, params: {
145
- typeSlug: string;
146
- }): Promise<void>;
147
- (key: "editContent", qc: QueryClient, params: {
148
- typeSlug: string;
149
- id: string;
150
- }): Promise<void>;
151
- }
152
- /**
153
- * CMS backend plugin
154
- * Provides API endpoints for managing content types and content items
155
- *
156
- * @param config - Configuration with content types and optional hooks
157
- */
158
- declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugins_api.BackendPlugin<{
159
- listContentTypes: better_call.StrictEndpoint<"/content-types", {} & {
160
- method: "GET";
161
- }, {
162
- itemCount: number;
163
- createdAt: string;
164
- updatedAt: string;
165
- name: string;
166
- id: string;
167
- slug: string;
168
- description?: string | undefined;
169
- jsonSchema: string;
170
- fieldConfig?: string | undefined;
171
- autoFormVersion?: number | undefined;
172
- }[]>;
173
- getContentTypeBySlug: better_call.StrictEndpoint<"/content-types/:slug", {
174
- params: z.ZodObject<{
175
- slug: z.ZodString;
176
- }, z.core.$strip>;
177
- } & {
178
- method: "GET";
179
- }, SerializedContentType>;
180
- listContentItems: better_call.StrictEndpoint<"/content/:typeSlug", {
181
- params: z.ZodObject<{
182
- typeSlug: z.ZodString;
183
- }, z.core.$strip>;
184
- } & {
185
- method: "GET";
186
- } & {
187
- query: better_call.StandardSchemaV1<{
188
- slug?: string | undefined;
189
- limit?: unknown;
190
- offset?: unknown;
191
- }, {
192
- slug?: string | undefined;
193
- limit?: unknown;
194
- offset?: unknown;
195
- }>;
196
- }, {
197
- items: SerializedContentItemWithType[];
198
- total: number;
199
- limit?: number;
200
- offset?: number;
201
- }>;
202
- getContentItem: better_call.StrictEndpoint<"/content/:typeSlug/:id", {
203
- params: z.ZodObject<{
204
- typeSlug: z.ZodString;
205
- id: z.ZodString;
206
- }, z.core.$strip>;
207
- } & {
208
- method: "GET";
209
- }, SerializedContentItemWithType<Record<string, unknown>>>;
210
- createContentItem: better_call.StrictEndpoint<"/content/:typeSlug", {
211
- params: z.ZodObject<{
212
- typeSlug: z.ZodString;
213
- }, z.core.$strip>;
214
- } & {
215
- method: "POST";
216
- body: better_call.StandardSchemaV1<{
217
- slug: string;
218
- data: {
219
- [x: string]: unknown;
220
- };
221
- }, {
222
- slug: string;
223
- data: {
224
- [x: string]: unknown;
225
- };
226
- }>;
227
- }, {
228
- parsedData: Record<string, unknown>;
229
- createdAt: string;
230
- updatedAt: string;
231
- id: string;
232
- slug: string;
233
- contentTypeId: string;
234
- data: string;
235
- authorId?: string | undefined;
236
- }>;
237
- updateContentItem: better_call.StrictEndpoint<"/content/:typeSlug/:id", {
238
- params: z.ZodObject<{
239
- typeSlug: z.ZodString;
240
- id: z.ZodString;
241
- }, z.core.$strip>;
242
- } & {
243
- method: "PUT";
244
- body: better_call.StandardSchemaV1<{
245
- slug?: string | undefined;
246
- data?: {
247
- [x: string]: unknown;
248
- } | undefined;
249
- }, {
250
- slug?: string | undefined;
251
- data?: {
252
- [x: string]: unknown;
253
- } | undefined;
254
- }>;
255
- }, SerializedContentItemWithType<Record<string, unknown>>>;
256
- deleteContentItem: better_call.StrictEndpoint<"/content/:typeSlug/:id", {
257
- params: z.ZodObject<{
258
- typeSlug: z.ZodString;
259
- id: z.ZodString;
260
- }, z.core.$strip>;
261
- } & {
262
- method: "DELETE";
263
- body: better_call.StandardSchemaV1<unknown, unknown>;
264
- }, {
265
- success: boolean;
266
- }>;
267
- getContentItemPopulated: better_call.StrictEndpoint<"/content/:typeSlug/:id/populated", {
268
- params: z.ZodObject<{
269
- typeSlug: z.ZodString;
270
- id: z.ZodString;
271
- }, z.core.$strip>;
272
- } & {
273
- method: "GET";
274
- }, {
275
- _relations: Record<string, SerializedContentItemWithType<Record<string, unknown>>[]>;
276
- parsedData: Record<string, unknown>;
277
- contentType?: SerializedContentType;
278
- createdAt: string;
279
- updatedAt: string;
280
- id: string;
281
- slug: string;
282
- contentTypeId: string;
283
- data: string;
284
- authorId?: string | undefined;
285
- }>;
286
- listContentByRelation: better_call.StrictEndpoint<"/content/:typeSlug/by-relation", {
287
- params: z.ZodObject<{
288
- typeSlug: z.ZodString;
289
- }, z.core.$strip>;
290
- } & {
291
- method: "GET";
292
- } & {
293
- query: better_call.StandardSchemaV1<{
294
- field: string;
295
- targetId: string;
296
- limit?: unknown;
297
- offset?: unknown;
298
- }, {
299
- field: string;
300
- targetId: string;
301
- limit?: unknown;
302
- offset?: unknown;
303
- }>;
304
- }, {
305
- items: SerializedContentItemWithType<Record<string, unknown>>[];
306
- total: number;
307
- limit: number;
308
- offset: number;
309
- }>;
310
- getInverseRelations: better_call.StrictEndpoint<"/content-types/:slug/inverse-relations", {
311
- params: z.ZodObject<{
312
- slug: z.ZodString;
313
- }, z.core.$strip>;
314
- } & {
315
- method: "GET";
316
- } & {
317
- query: better_call.StandardSchemaV1<{
318
- itemId?: string | undefined;
319
- }, {
320
- itemId?: string | undefined;
321
- }>;
322
- }, {
323
- inverseRelations: InverseRelation[];
324
- }>;
325
- listInverseRelationItems: better_call.StrictEndpoint<"/content-types/:slug/inverse-relations/:sourceType", {
326
- params: z.ZodObject<{
327
- slug: z.ZodString;
328
- sourceType: z.ZodString;
329
- }, z.core.$strip>;
330
- } & {
331
- method: "GET";
332
- } & {
333
- query: better_call.StandardSchemaV1<{
334
- itemId: string;
335
- fieldName: string;
336
- limit?: unknown;
337
- offset?: unknown;
338
- }, {
339
- itemId: string;
340
- fieldName: string;
341
- limit?: unknown;
342
- offset?: unknown;
343
- }>;
344
- }, {
345
- items: SerializedContentItemWithType<Record<string, unknown>>[];
346
- total: number;
347
- limit: number;
348
- offset: number;
349
- }>;
350
- }, {
351
- getAllContentTypes: () => Promise<SerializedContentType[]>;
352
- getAllContentItems: (contentTypeSlug: string, params?: Parameters<typeof getAllContentItems>[2]) => Promise<{
353
- items: SerializedContentItemWithType[];
354
- total: number;
355
- limit?: number;
356
- offset?: number;
357
- }>;
358
- getContentItemBySlug: (contentTypeSlug: string, slug: string) => Promise<SerializedContentItemWithType<Record<string, unknown>> | null>;
359
- getContentItemById: (id: string) => Promise<SerializedContentItemWithType<Record<string, unknown>> | null>;
360
- prefetchForRoute: CMSPrefetchForRoute;
361
- createContentItem: (typeSlug: string, input: Parameters<typeof createCMSContentItem>[2], options?: Parameters<typeof createCMSContentItem>[3]) => Promise<SerializedContentItem>;
362
- }>;
363
- type CMSApiRouter = ReturnType<ReturnType<typeof cmsBackendPlugin>["routes"]>;
364
-
365
- /**
366
- * Internal query key constants for the CMS plugin.
367
- * Shared between query-keys.ts (HTTP path) and prefetchForRoute (DB path)
368
- * to prevent key drift between SSR loaders and SSG prefetching.
369
- */
370
- interface ContentListDiscriminator {
371
- typeSlug: string;
372
- limit: number;
373
- offset: number;
374
- }
375
- /** Full query key builders — use these with queryClient.setQueryData() */
376
- declare const CMS_QUERY_KEYS: {
377
- /**
378
- * Key for the cmsTypes.list() query.
379
- * Full key: ["cmsTypes", "list", "list"]
380
- */
381
- typesList: () => readonly ["cmsTypes", "list", "list"];
382
- /**
383
- * Key for the cmsContent.list({ typeSlug, limit, offset }) query.
384
- * Full key: ["cmsContent", "list", { typeSlug, limit, offset }]
385
- */
386
- contentList: (params: {
387
- typeSlug: string;
388
- limit?: number;
389
- offset?: number;
390
- }) => readonly ["cmsContent", "list", ContentListDiscriminator];
391
- /**
392
- * Key for the cmsContent.detail(typeSlug, id) query.
393
- * Full key: ["cmsContent", "detail", typeSlug, id]
394
- */
395
- contentDetail: (typeSlug: string, id: string) => readonly ["cmsContent", "detail", string, string];
396
- };
397
-
398
- export { cmsBackendPlugin as c, getAllContentItems as d, getContentItemBySlug as e, getContentItemById as f, getAllContentTypes as g, serializeContentItem as h, serializeContentItemWithType as i, createCMSContentItem as j, CMS_QUERY_KEYS as m, serializeContentType as s };
399
- export type { CMSApiRouter as C, ContentListDiscriminator as a, CMSRouteKey as b, CreateCMSContentItemInput as k, CreateCMSContentItemOptions as l };
@@ -6,13 +6,13 @@ import * as better_call from 'better-call';
6
6
  import { QueryClient } from '@tanstack/react-query';
7
7
 
8
8
  declare const createBoardSchema: z.ZodObject<{
9
- description: z.ZodOptional<z.ZodString>;
10
9
  slug: z.ZodOptional<z.ZodString>;
11
10
  ownerId: z.ZodOptional<z.ZodString>;
12
11
  organizationId: z.ZodOptional<z.ZodString>;
13
12
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
14
13
  updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
15
14
  name: z.ZodString;
15
+ description: z.ZodOptional<z.ZodString>;
16
16
  }, z.core.$strip>;
17
17
  declare const updateBoardSchema: z.ZodObject<{
18
18
  createdAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
@@ -25,9 +25,9 @@ declare const updateBoardSchema: z.ZodObject<{
25
25
  id: z.ZodNonOptional<z.ZodOptional<z.ZodString>>;
26
26
  }, z.core.$strip>;
27
27
  declare const createColumnSchema: z.ZodObject<{
28
- title: z.ZodString;
29
28
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
30
29
  updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
30
+ title: z.ZodString;
31
31
  order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
32
32
  boardId: z.ZodString;
33
33
  }, z.core.$strip>;
@@ -40,10 +40,10 @@ declare const updateColumnSchema: z.ZodObject<{
40
40
  id: z.ZodNonOptional<z.ZodOptional<z.ZodString>>;
41
41
  }, z.core.$strip>;
42
42
  declare const createTaskSchema: z.ZodObject<{
43
- title: z.ZodString;
44
- description: z.ZodOptional<z.ZodString>;
45
43
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
46
44
  updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
45
+ description: z.ZodOptional<z.ZodString>;
46
+ title: z.ZodString;
47
47
  order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
48
48
  completedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
49
49
  priority: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
@@ -330,20 +330,20 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
330
330
  method: "POST";
331
331
  body: better_call.StandardSchemaV1<{
332
332
  name: string;
333
- description?: string | undefined;
334
333
  slug?: string | undefined;
335
334
  ownerId?: string | undefined;
336
335
  organizationId?: string | undefined;
337
336
  createdAt?: unknown;
338
337
  updatedAt?: unknown;
338
+ description?: string | undefined;
339
339
  }, {
340
340
  name: string;
341
- description?: string | undefined;
342
341
  slug?: string | undefined;
343
342
  ownerId?: string | undefined;
344
343
  organizationId?: string | undefined;
345
344
  createdAt?: unknown;
346
345
  updatedAt?: unknown;
346
+ description?: string | undefined;
347
347
  }>;
348
348
  }, {
349
349
  columns: ColumnWithTasks[];
@@ -359,21 +359,21 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
359
359
  readonly updateBoard: better_call.StrictEndpoint<"/boards/:id", {} & {
360
360
  method: "PUT";
361
361
  body: better_call.StandardSchemaV1<{
362
- description?: string | undefined;
363
362
  slug?: string | undefined;
364
363
  ownerId?: string | undefined;
365
364
  organizationId?: string | undefined;
366
365
  createdAt?: unknown;
367
366
  updatedAt?: unknown;
368
367
  name?: string | undefined;
369
- }, {
370
368
  description?: string | undefined;
369
+ }, {
371
370
  slug?: string | undefined;
372
371
  ownerId?: string | undefined;
373
372
  organizationId?: string | undefined;
374
373
  createdAt?: unknown;
375
374
  updatedAt?: unknown;
376
375
  name?: string | undefined;
376
+ description?: string | undefined;
377
377
  }>;
378
378
  }, Board>;
379
379
  readonly deleteBoard: better_call.StrictEndpoint<"/boards/:id", {} & {
@@ -401,15 +401,15 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
401
401
  readonly updateColumn: better_call.StrictEndpoint<"/columns/:id", {} & {
402
402
  method: "PUT";
403
403
  body: better_call.StandardSchemaV1<{
404
- title?: string | undefined;
405
404
  createdAt?: unknown;
406
405
  updatedAt?: unknown;
406
+ title?: string | undefined;
407
407
  order?: number | undefined;
408
408
  boardId?: string | undefined;
409
409
  }, {
410
- title?: string | undefined;
411
410
  createdAt?: unknown;
412
411
  updatedAt?: unknown;
412
+ title?: string | undefined;
413
413
  order?: number | undefined;
414
414
  boardId?: string | undefined;
415
415
  }>;
@@ -437,9 +437,9 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
437
437
  body: better_call.StandardSchemaV1<{
438
438
  title: string;
439
439
  columnId: string;
440
- description?: string | undefined;
441
440
  createdAt?: unknown;
442
441
  updatedAt?: unknown;
442
+ description?: string | undefined;
443
443
  order?: number | undefined;
444
444
  completedAt?: unknown;
445
445
  priority?: "LOW" | "MEDIUM" | "HIGH" | "URGENT" | undefined;
@@ -448,9 +448,9 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
448
448
  }, {
449
449
  title: string;
450
450
  columnId: string;
451
- description?: string | undefined;
452
451
  createdAt?: unknown;
453
452
  updatedAt?: unknown;
453
+ description?: string | undefined;
454
454
  order?: number | undefined;
455
455
  completedAt?: unknown;
456
456
  priority?: "LOW" | "MEDIUM" | "HIGH" | "URGENT" | undefined;
@@ -461,10 +461,10 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
461
461
  readonly updateTask: better_call.StrictEndpoint<"/tasks/:id", {} & {
462
462
  method: "PUT";
463
463
  body: better_call.StandardSchemaV1<{
464
- title?: string | undefined;
465
- description?: string | undefined;
466
464
  createdAt?: unknown;
467
465
  updatedAt?: unknown;
466
+ description?: string | undefined;
467
+ title?: string | undefined;
468
468
  order?: number | undefined;
469
469
  completedAt?: unknown;
470
470
  priority?: "LOW" | "MEDIUM" | "HIGH" | "URGENT" | undefined;
@@ -472,10 +472,10 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
472
472
  assigneeId?: string | null | undefined;
473
473
  isArchived?: boolean | undefined;
474
474
  }, {
475
- title?: string | undefined;
476
- description?: string | undefined;
477
475
  createdAt?: unknown;
478
476
  updatedAt?: unknown;
477
+ description?: string | undefined;
478
+ title?: string | undefined;
479
479
  order?: number | undefined;
480
480
  completedAt?: unknown;
481
481
  priority?: "LOW" | "MEDIUM" | "HIGH" | "URGENT" | undefined;
@@ -6,13 +6,13 @@ import * as better_call from 'better-call';
6
6
  import { QueryClient } from '@tanstack/react-query';
7
7
 
8
8
  declare const createBoardSchema: z.ZodObject<{
9
- description: z.ZodOptional<z.ZodString>;
10
9
  slug: z.ZodOptional<z.ZodString>;
11
10
  ownerId: z.ZodOptional<z.ZodString>;
12
11
  organizationId: z.ZodOptional<z.ZodString>;
13
12
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
14
13
  updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
15
14
  name: z.ZodString;
15
+ description: z.ZodOptional<z.ZodString>;
16
16
  }, z.core.$strip>;
17
17
  declare const updateBoardSchema: z.ZodObject<{
18
18
  createdAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
@@ -25,9 +25,9 @@ declare const updateBoardSchema: z.ZodObject<{
25
25
  id: z.ZodNonOptional<z.ZodOptional<z.ZodString>>;
26
26
  }, z.core.$strip>;
27
27
  declare const createColumnSchema: z.ZodObject<{
28
- title: z.ZodString;
29
28
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
30
29
  updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
30
+ title: z.ZodString;
31
31
  order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
32
32
  boardId: z.ZodString;
33
33
  }, z.core.$strip>;
@@ -40,10 +40,10 @@ declare const updateColumnSchema: z.ZodObject<{
40
40
  id: z.ZodNonOptional<z.ZodOptional<z.ZodString>>;
41
41
  }, z.core.$strip>;
42
42
  declare const createTaskSchema: z.ZodObject<{
43
- title: z.ZodString;
44
- description: z.ZodOptional<z.ZodString>;
45
43
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
46
44
  updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
45
+ description: z.ZodOptional<z.ZodString>;
46
+ title: z.ZodString;
47
47
  order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
48
48
  completedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
49
49
  priority: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
@@ -330,20 +330,20 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
330
330
  method: "POST";
331
331
  body: better_call.StandardSchemaV1<{
332
332
  name: string;
333
- description?: string | undefined;
334
333
  slug?: string | undefined;
335
334
  ownerId?: string | undefined;
336
335
  organizationId?: string | undefined;
337
336
  createdAt?: unknown;
338
337
  updatedAt?: unknown;
338
+ description?: string | undefined;
339
339
  }, {
340
340
  name: string;
341
- description?: string | undefined;
342
341
  slug?: string | undefined;
343
342
  ownerId?: string | undefined;
344
343
  organizationId?: string | undefined;
345
344
  createdAt?: unknown;
346
345
  updatedAt?: unknown;
346
+ description?: string | undefined;
347
347
  }>;
348
348
  }, {
349
349
  columns: ColumnWithTasks[];
@@ -359,21 +359,21 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
359
359
  readonly updateBoard: better_call.StrictEndpoint<"/boards/:id", {} & {
360
360
  method: "PUT";
361
361
  body: better_call.StandardSchemaV1<{
362
- description?: string | undefined;
363
362
  slug?: string | undefined;
364
363
  ownerId?: string | undefined;
365
364
  organizationId?: string | undefined;
366
365
  createdAt?: unknown;
367
366
  updatedAt?: unknown;
368
367
  name?: string | undefined;
369
- }, {
370
368
  description?: string | undefined;
369
+ }, {
371
370
  slug?: string | undefined;
372
371
  ownerId?: string | undefined;
373
372
  organizationId?: string | undefined;
374
373
  createdAt?: unknown;
375
374
  updatedAt?: unknown;
376
375
  name?: string | undefined;
376
+ description?: string | undefined;
377
377
  }>;
378
378
  }, Board>;
379
379
  readonly deleteBoard: better_call.StrictEndpoint<"/boards/:id", {} & {
@@ -401,15 +401,15 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
401
401
  readonly updateColumn: better_call.StrictEndpoint<"/columns/:id", {} & {
402
402
  method: "PUT";
403
403
  body: better_call.StandardSchemaV1<{
404
- title?: string | undefined;
405
404
  createdAt?: unknown;
406
405
  updatedAt?: unknown;
406
+ title?: string | undefined;
407
407
  order?: number | undefined;
408
408
  boardId?: string | undefined;
409
409
  }, {
410
- title?: string | undefined;
411
410
  createdAt?: unknown;
412
411
  updatedAt?: unknown;
412
+ title?: string | undefined;
413
413
  order?: number | undefined;
414
414
  boardId?: string | undefined;
415
415
  }>;
@@ -437,9 +437,9 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
437
437
  body: better_call.StandardSchemaV1<{
438
438
  title: string;
439
439
  columnId: string;
440
- description?: string | undefined;
441
440
  createdAt?: unknown;
442
441
  updatedAt?: unknown;
442
+ description?: string | undefined;
443
443
  order?: number | undefined;
444
444
  completedAt?: unknown;
445
445
  priority?: "LOW" | "MEDIUM" | "HIGH" | "URGENT" | undefined;
@@ -448,9 +448,9 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
448
448
  }, {
449
449
  title: string;
450
450
  columnId: string;
451
- description?: string | undefined;
452
451
  createdAt?: unknown;
453
452
  updatedAt?: unknown;
453
+ description?: string | undefined;
454
454
  order?: number | undefined;
455
455
  completedAt?: unknown;
456
456
  priority?: "LOW" | "MEDIUM" | "HIGH" | "URGENT" | undefined;
@@ -461,10 +461,10 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
461
461
  readonly updateTask: better_call.StrictEndpoint<"/tasks/:id", {} & {
462
462
  method: "PUT";
463
463
  body: better_call.StandardSchemaV1<{
464
- title?: string | undefined;
465
- description?: string | undefined;
466
464
  createdAt?: unknown;
467
465
  updatedAt?: unknown;
466
+ description?: string | undefined;
467
+ title?: string | undefined;
468
468
  order?: number | undefined;
469
469
  completedAt?: unknown;
470
470
  priority?: "LOW" | "MEDIUM" | "HIGH" | "URGENT" | undefined;
@@ -472,10 +472,10 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
472
472
  assigneeId?: string | null | undefined;
473
473
  isArchived?: boolean | undefined;
474
474
  }, {
475
- title?: string | undefined;
476
- description?: string | undefined;
477
475
  createdAt?: unknown;
478
476
  updatedAt?: unknown;
477
+ description?: string | undefined;
478
+ title?: string | undefined;
479
479
  order?: number | undefined;
480
480
  completedAt?: unknown;
481
481
  priority?: "LOW" | "MEDIUM" | "HIGH" | "URGENT" | undefined;