@btst/stack 2.9.1 → 2.9.3

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 (61) hide show
  1. package/dist/packages/stack/src/plugins/media/api/plugin.cjs +1 -1
  2. package/dist/packages/stack/src/plugins/media/api/plugin.mjs +1 -1
  3. package/dist/packages/stack/src/plugins/media/db.cjs +10 -2
  4. package/dist/packages/stack/src/plugins/media/db.mjs +10 -2
  5. package/dist/plugins/blog/api/index.d.cts +2 -2
  6. package/dist/plugins/blog/api/index.d.mts +2 -2
  7. package/dist/plugins/blog/api/index.d.ts +2 -2
  8. package/dist/plugins/blog/client/hooks/index.d.cts +2 -2
  9. package/dist/plugins/blog/client/hooks/index.d.mts +2 -2
  10. package/dist/plugins/blog/client/hooks/index.d.ts +2 -2
  11. package/dist/plugins/blog/client/index.d.cts +2 -2
  12. package/dist/plugins/blog/client/index.d.mts +2 -2
  13. package/dist/plugins/blog/client/index.d.ts +2 -2
  14. package/dist/plugins/blog/query-keys.d.cts +2 -2
  15. package/dist/plugins/blog/query-keys.d.mts +2 -2
  16. package/dist/plugins/blog/query-keys.d.ts +2 -2
  17. package/dist/plugins/kanban/api/index.d.cts +1 -1
  18. package/dist/plugins/kanban/api/index.d.mts +1 -1
  19. package/dist/plugins/kanban/api/index.d.ts +1 -1
  20. package/dist/plugins/kanban/query-keys.d.cts +1 -1
  21. package/dist/plugins/kanban/query-keys.d.mts +1 -1
  22. package/dist/plugins/kanban/query-keys.d.ts +1 -1
  23. package/dist/plugins/media/api/adapters/s3.d.cts +1 -1
  24. package/dist/plugins/media/api/adapters/s3.d.mts +1 -1
  25. package/dist/plugins/media/api/adapters/s3.d.ts +1 -1
  26. package/dist/plugins/media/api/adapters/vercel-blob.cjs +1 -2
  27. package/dist/plugins/media/api/adapters/vercel-blob.d.cts +1 -1
  28. package/dist/plugins/media/api/adapters/vercel-blob.d.mts +1 -1
  29. package/dist/plugins/media/api/adapters/vercel-blob.d.ts +1 -1
  30. package/dist/plugins/media/api/adapters/vercel-blob.mjs +1 -2
  31. package/dist/plugins/media/api/index.d.cts +3 -3
  32. package/dist/plugins/media/api/index.d.mts +3 -3
  33. package/dist/plugins/media/api/index.d.ts +3 -3
  34. package/dist/plugins/media/query-keys.d.cts +2 -2
  35. package/dist/plugins/media/query-keys.d.mts +2 -2
  36. package/dist/plugins/media/query-keys.d.ts +2 -2
  37. package/dist/shared/{stack.DX-tQ93o.d.cts → stack.6mEHS2WH.d.mts} +3 -3
  38. package/dist/shared/{stack.DOZ1EXjM.d.mts → stack.AJTXI7kw.d.cts} +3 -3
  39. package/dist/shared/{stack.CI8iRKKi.d.cts → stack.BinHXe1r.d.cts} +1 -1
  40. package/dist/shared/{stack.DJDjdG64.d.ts → stack.BjN_-cxo.d.ts} +1 -1
  41. package/dist/shared/{stack.BXxrFL9R.d.ts → stack.D7HSzZdG.d.ts} +5 -5
  42. package/dist/shared/{stack.BttDsJJn.d.mts → stack.DO6vOGQG.d.cts} +26 -1
  43. package/dist/shared/{stack.BttDsJJn.d.cts → stack.DO6vOGQG.d.mts} +26 -1
  44. package/dist/shared/{stack.BttDsJJn.d.ts → stack.DO6vOGQG.d.ts} +26 -1
  45. package/dist/shared/{stack.FgBVDSPi.d.mts → stack.DYrJsJ7x.d.mts} +1 -1
  46. package/dist/shared/{stack.DzOhpIYM.d.mts → stack.DjgpFWq3.d.cts} +5 -5
  47. package/dist/shared/{stack.BSqJrCTM.d.cts → stack.IUeyQKrm.d.mts} +5 -5
  48. package/dist/shared/{stack.VF6FhyZw.d.ts → stack.QYn-Px94.d.ts} +3 -3
  49. package/package.json +1 -1
  50. package/src/plugins/media/__tests__/plugin.test.ts +4 -4
  51. package/src/plugins/media/__tests__/storage-adapters.test.ts +50 -6
  52. package/src/plugins/media/api/adapters/vercel-blob.ts +4 -4
  53. package/src/plugins/media/api/plugin.ts +1 -1
  54. package/src/plugins/media/api/storage-adapter.ts +32 -0
  55. package/src/plugins/media/db.ts +8 -0
  56. package/dist/shared/{stack.BWp0hcm9.d.ts → stack.BQmuNl5p.d.cts} +3 -3
  57. package/dist/shared/{stack.BWp0hcm9.d.cts → stack.BQmuNl5p.d.mts} +3 -3
  58. package/dist/shared/{stack.BWp0hcm9.d.mts → stack.BQmuNl5p.d.ts} +3 -3
  59. package/dist/shared/{stack.j5SFLC1d.d.ts → stack.CMbX8Q5C.d.ts} +6 -6
  60. package/dist/shared/{stack.Bzfx-_lq.d.mts → stack.Dj04W2c3.d.mts} +6 -6
  61. package/dist/shared/{stack.B6S3cgwN.d.cts → stack.eq5eg1yt.d.cts} +6 -6
@@ -472,7 +472,7 @@ const mediaBackendPlugin = (config) => api.defineBackendPlugin({
472
472
  message: "Request object is not available"
473
473
  });
474
474
  }
475
- return storageAdapter$1.handleRequest(ctx.request, {
475
+ return storageAdapter$1.handleRequest(ctx.request, ctx.body, {
476
476
  onBeforeGenerateToken: async (pathname, clientPayload) => {
477
477
  const filename = pathname.split("/").pop() ?? pathname;
478
478
  let parsed = {};
@@ -470,7 +470,7 @@ const mediaBackendPlugin = (config) => defineBackendPlugin({
470
470
  message: "Request object is not available"
471
471
  });
472
472
  }
473
- return storageAdapter.handleRequest(ctx.request, {
473
+ return storageAdapter.handleRequest(ctx.request, ctx.body, {
474
474
  onBeforeGenerateToken: async (pathname, clientPayload) => {
475
475
  const filename = pathname.split("/").pop() ?? pathname;
476
476
  let parsed = {};
@@ -28,7 +28,11 @@ const mediaSchema = db.createDbPlugin("media", {
28
28
  },
29
29
  folderId: {
30
30
  type: "string",
31
- required: false
31
+ required: false,
32
+ references: {
33
+ model: "mediaFolder",
34
+ field: "id"
35
+ }
32
36
  },
33
37
  alt: {
34
38
  type: "string",
@@ -49,7 +53,11 @@ const mediaSchema = db.createDbPlugin("media", {
49
53
  },
50
54
  parentId: {
51
55
  type: "string",
52
- required: false
56
+ required: false,
57
+ references: {
58
+ model: "mediaFolder",
59
+ field: "id"
60
+ }
53
61
  },
54
62
  createdAt: {
55
63
  type: "date",
@@ -26,7 +26,11 @@ const mediaSchema = createDbPlugin("media", {
26
26
  },
27
27
  folderId: {
28
28
  type: "string",
29
- required: false
29
+ required: false,
30
+ references: {
31
+ model: "mediaFolder",
32
+ field: "id"
33
+ }
30
34
  },
31
35
  alt: {
32
36
  type: "string",
@@ -47,7 +51,11 @@ const mediaSchema = createDbPlugin("media", {
47
51
  },
48
52
  parentId: {
49
53
  type: "string",
50
- required: false
54
+ required: false,
55
+ references: {
56
+ model: "mediaFolder",
57
+ field: "id"
58
+ }
51
59
  },
52
60
  createdAt: {
53
61
  type: "date",
@@ -1,5 +1,5 @@
1
- export { B as BLOG_QUERY_KEYS, h as BlogApiContext, k as BlogApiRouter, i as BlogBackendHooks, e as BlogRouteKey, N as NextPreviousPostsQuerySchema, P as PostListParams, f as PostListQuerySchema, c as PostListResult, j as blogBackendPlugin, d as createBlogQueryKeys, g as getAllPosts, b as getAllTags, a as getPostBySlug } from '../../../shared/stack.BSqJrCTM.cjs';
2
- import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../../shared/stack.BWp0hcm9.cjs';
1
+ export { B as BLOG_QUERY_KEYS, h as BlogApiContext, k as BlogApiRouter, i as BlogBackendHooks, e as BlogRouteKey, N as NextPreviousPostsQuerySchema, P as PostListParams, f as PostListQuerySchema, c as PostListResult, j as blogBackendPlugin, d as createBlogQueryKeys, g as getAllPosts, b as getAllTags, a as getPostBySlug } from '../../../shared/stack.DjgpFWq3.cjs';
2
+ import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../../shared/stack.BQmuNl5p.cjs';
3
3
  import '@tanstack/react-query';
4
4
  import '@btst/stack/plugins/client';
5
5
  import '@btst/stack/plugins/api';
@@ -1,5 +1,5 @@
1
- export { B as BLOG_QUERY_KEYS, h as BlogApiContext, k as BlogApiRouter, i as BlogBackendHooks, e as BlogRouteKey, N as NextPreviousPostsQuerySchema, P as PostListParams, f as PostListQuerySchema, c as PostListResult, j as blogBackendPlugin, d as createBlogQueryKeys, g as getAllPosts, b as getAllTags, a as getPostBySlug } from '../../../shared/stack.DzOhpIYM.mjs';
2
- import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../../shared/stack.BWp0hcm9.mjs';
1
+ export { B as BLOG_QUERY_KEYS, h as BlogApiContext, k as BlogApiRouter, i as BlogBackendHooks, e as BlogRouteKey, N as NextPreviousPostsQuerySchema, P as PostListParams, f as PostListQuerySchema, c as PostListResult, j as blogBackendPlugin, d as createBlogQueryKeys, g as getAllPosts, b as getAllTags, a as getPostBySlug } from '../../../shared/stack.IUeyQKrm.mjs';
2
+ import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../../shared/stack.BQmuNl5p.mjs';
3
3
  import '@tanstack/react-query';
4
4
  import '@btst/stack/plugins/client';
5
5
  import '@btst/stack/plugins/api';
@@ -1,5 +1,5 @@
1
- export { B as BLOG_QUERY_KEYS, h as BlogApiContext, k as BlogApiRouter, i as BlogBackendHooks, e as BlogRouteKey, N as NextPreviousPostsQuerySchema, P as PostListParams, f as PostListQuerySchema, c as PostListResult, j as blogBackendPlugin, d as createBlogQueryKeys, g as getAllPosts, b as getAllTags, a as getPostBySlug } from '../../../shared/stack.BXxrFL9R.js';
2
- import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../../shared/stack.BWp0hcm9.js';
1
+ export { B as BLOG_QUERY_KEYS, h as BlogApiContext, k as BlogApiRouter, i as BlogBackendHooks, e as BlogRouteKey, N as NextPreviousPostsQuerySchema, P as PostListParams, f as PostListQuerySchema, c as PostListResult, j as blogBackendPlugin, d as createBlogQueryKeys, g as getAllPosts, b as getAllTags, a as getPostBySlug } from '../../../shared/stack.D7HSzZdG.js';
2
+ import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../../shared/stack.BQmuNl5p.js';
3
3
  import '@tanstack/react-query';
4
4
  import '@btst/stack/plugins/client';
5
5
  import '@btst/stack/plugins/api';
@@ -1,6 +1,6 @@
1
- export { P as PostCreateInput, e as PostUpdateInput, o as UseNextPreviousPostsOptions, p as UseNextPreviousPostsResult, d as UsePostResult, b as UsePostSearchOptions, c as UsePostSearchResult, U as UsePostsOptions, a as UsePostsResult, r as UseRecentPostsOptions, s as UseRecentPostsResult, k as useCreatePost, m as useDeletePost, q as useNextPreviousPosts, g as usePost, n as usePostSearch, u as usePosts, t as useRecentPosts, h as useSuspensePost, f as useSuspensePosts, j as useSuspenseTags, i as useTags, l as useUpdatePost } from '../../../../shared/stack.DX-tQ93o.cjs';
1
+ export { P as PostCreateInput, e as PostUpdateInput, o as UseNextPreviousPostsOptions, p as UseNextPreviousPostsResult, d as UsePostResult, b as UsePostSearchOptions, c as UsePostSearchResult, U as UsePostsOptions, a as UsePostsResult, r as UseRecentPostsOptions, s as UseRecentPostsResult, k as useCreatePost, m as useDeletePost, q as useNextPreviousPosts, g as usePost, n as usePostSearch, u as usePosts, t as useRecentPosts, h as useSuspensePost, f as useSuspensePosts, j as useSuspenseTags, i as useTags, l as useUpdatePost } from '../../../../shared/stack.AJTXI7kw.cjs';
2
2
  import '@tanstack/react-query';
3
- import '../../../../shared/stack.BWp0hcm9.cjs';
3
+ import '../../../../shared/stack.BQmuNl5p.cjs';
4
4
  import 'zod';
5
5
 
6
6
  declare function useDebounce<T>(value: T, delay?: number): T;
@@ -1,6 +1,6 @@
1
- export { P as PostCreateInput, e as PostUpdateInput, o as UseNextPreviousPostsOptions, p as UseNextPreviousPostsResult, d as UsePostResult, b as UsePostSearchOptions, c as UsePostSearchResult, U as UsePostsOptions, a as UsePostsResult, r as UseRecentPostsOptions, s as UseRecentPostsResult, k as useCreatePost, m as useDeletePost, q as useNextPreviousPosts, g as usePost, n as usePostSearch, u as usePosts, t as useRecentPosts, h as useSuspensePost, f as useSuspensePosts, j as useSuspenseTags, i as useTags, l as useUpdatePost } from '../../../../shared/stack.DOZ1EXjM.mjs';
1
+ export { P as PostCreateInput, e as PostUpdateInput, o as UseNextPreviousPostsOptions, p as UseNextPreviousPostsResult, d as UsePostResult, b as UsePostSearchOptions, c as UsePostSearchResult, U as UsePostsOptions, a as UsePostsResult, r as UseRecentPostsOptions, s as UseRecentPostsResult, k as useCreatePost, m as useDeletePost, q as useNextPreviousPosts, g as usePost, n as usePostSearch, u as usePosts, t as useRecentPosts, h as useSuspensePost, f as useSuspensePosts, j as useSuspenseTags, i as useTags, l as useUpdatePost } from '../../../../shared/stack.6mEHS2WH.mjs';
2
2
  import '@tanstack/react-query';
3
- import '../../../../shared/stack.BWp0hcm9.mjs';
3
+ import '../../../../shared/stack.BQmuNl5p.mjs';
4
4
  import 'zod';
5
5
 
6
6
  declare function useDebounce<T>(value: T, delay?: number): T;
@@ -1,6 +1,6 @@
1
- export { P as PostCreateInput, e as PostUpdateInput, o as UseNextPreviousPostsOptions, p as UseNextPreviousPostsResult, d as UsePostResult, b as UsePostSearchOptions, c as UsePostSearchResult, U as UsePostsOptions, a as UsePostsResult, r as UseRecentPostsOptions, s as UseRecentPostsResult, k as useCreatePost, m as useDeletePost, q as useNextPreviousPosts, g as usePost, n as usePostSearch, u as usePosts, t as useRecentPosts, h as useSuspensePost, f as useSuspensePosts, j as useSuspenseTags, i as useTags, l as useUpdatePost } from '../../../../shared/stack.VF6FhyZw.js';
1
+ export { P as PostCreateInput, e as PostUpdateInput, o as UseNextPreviousPostsOptions, p as UseNextPreviousPostsResult, d as UsePostResult, b as UsePostSearchOptions, c as UsePostSearchResult, U as UsePostsOptions, a as UsePostsResult, r as UseRecentPostsOptions, s as UseRecentPostsResult, k as useCreatePost, m as useDeletePost, q as useNextPreviousPosts, g as usePost, n as usePostSearch, u as usePosts, t as useRecentPosts, h as useSuspensePost, f as useSuspensePosts, j as useSuspenseTags, i as useTags, l as useUpdatePost } from '../../../../shared/stack.QYn-Px94.js';
2
2
  import '@tanstack/react-query';
3
- import '../../../../shared/stack.BWp0hcm9.js';
3
+ import '../../../../shared/stack.BQmuNl5p.js';
4
4
  import 'zod';
5
5
 
6
6
  declare function useDebounce<T>(value: T, delay?: number): T;
@@ -2,8 +2,8 @@ import * as _btst_stack_plugins_client from '@btst/stack/plugins/client';
2
2
  import * as _btst_yar from '@btst/yar';
3
3
  import { ComponentType, ReactNode } from 'react';
4
4
  import { QueryClient } from '@tanstack/react-query';
5
- import { P as Post, S as SerializedPost } from '../../../shared/stack.BWp0hcm9.cjs';
6
- export { U as UsePostsOptions, a as UsePostsResult } from '../../../shared/stack.DX-tQ93o.cjs';
5
+ import { P as Post, S as SerializedPost } from '../../../shared/stack.BQmuNl5p.cjs';
6
+ export { U as UsePostsOptions, a as UsePostsResult } from '../../../shared/stack.AJTXI7kw.cjs';
7
7
  import 'zod';
8
8
 
9
9
  /**
@@ -2,8 +2,8 @@ import * as _btst_stack_plugins_client from '@btst/stack/plugins/client';
2
2
  import * as _btst_yar from '@btst/yar';
3
3
  import { ComponentType, ReactNode } from 'react';
4
4
  import { QueryClient } from '@tanstack/react-query';
5
- import { P as Post, S as SerializedPost } from '../../../shared/stack.BWp0hcm9.mjs';
6
- export { U as UsePostsOptions, a as UsePostsResult } from '../../../shared/stack.DOZ1EXjM.mjs';
5
+ import { P as Post, S as SerializedPost } from '../../../shared/stack.BQmuNl5p.mjs';
6
+ export { U as UsePostsOptions, a as UsePostsResult } from '../../../shared/stack.6mEHS2WH.mjs';
7
7
  import 'zod';
8
8
 
9
9
  /**
@@ -2,8 +2,8 @@ import * as _btst_stack_plugins_client from '@btst/stack/plugins/client';
2
2
  import * as _btst_yar from '@btst/yar';
3
3
  import { ComponentType, ReactNode } from 'react';
4
4
  import { QueryClient } from '@tanstack/react-query';
5
- import { P as Post, S as SerializedPost } from '../../../shared/stack.BWp0hcm9.js';
6
- export { U as UsePostsOptions, a as UsePostsResult } from '../../../shared/stack.VF6FhyZw.js';
5
+ import { P as Post, S as SerializedPost } from '../../../shared/stack.BQmuNl5p.js';
6
+ export { U as UsePostsOptions, a as UsePostsResult } from '../../../shared/stack.QYn-Px94.js';
7
7
  import 'zod';
8
8
 
9
9
  /**
@@ -1,7 +1,7 @@
1
1
  import '@tanstack/react-query';
2
- export { d as createBlogQueryKeys } from '../../shared/stack.BSqJrCTM.cjs';
2
+ export { d as createBlogQueryKeys } from '../../shared/stack.DjgpFWq3.cjs';
3
3
  import '@btst/stack/plugins/client';
4
- import '../../shared/stack.BWp0hcm9.cjs';
4
+ import '../../shared/stack.BQmuNl5p.cjs';
5
5
  import '@btst/stack/plugins/api';
6
6
  import '@btst/db';
7
7
  import 'better-call';
@@ -1,7 +1,7 @@
1
1
  import '@tanstack/react-query';
2
- export { d as createBlogQueryKeys } from '../../shared/stack.DzOhpIYM.mjs';
2
+ export { d as createBlogQueryKeys } from '../../shared/stack.IUeyQKrm.mjs';
3
3
  import '@btst/stack/plugins/client';
4
- import '../../shared/stack.BWp0hcm9.mjs';
4
+ import '../../shared/stack.BQmuNl5p.mjs';
5
5
  import '@btst/stack/plugins/api';
6
6
  import '@btst/db';
7
7
  import 'better-call';
@@ -1,7 +1,7 @@
1
1
  import '@tanstack/react-query';
2
- export { d as createBlogQueryKeys } from '../../shared/stack.BXxrFL9R.js';
2
+ export { d as createBlogQueryKeys } from '../../shared/stack.D7HSzZdG.js';
3
3
  import '@btst/stack/plugins/client';
4
- import '../../shared/stack.BWp0hcm9.js';
4
+ import '../../shared/stack.BQmuNl5p.js';
5
5
  import '@btst/stack/plugins/api';
6
6
  import '@btst/db';
7
7
  import 'better-call';
@@ -1,4 +1,4 @@
1
- export { B as BoardListResult, C as CreateKanbanTaskInput, i as KANBAN_QUERY_KEYS, b as KanbanApiContext, K as KanbanApiRouter, c as KanbanBackendHooks, a as KanbanRouteKey, e as createKanbanTask, f as findOrCreateKanbanBoard, g as getAllBoards, d as getBoardById, h as getKanbanColumnsByBoardId, k as kanbanBackendPlugin } from '../../../shared/stack.B6S3cgwN.cjs';
1
+ export { B as BoardListResult, C as CreateKanbanTaskInput, i as KANBAN_QUERY_KEYS, b as KanbanApiContext, K as KanbanApiRouter, c as KanbanBackendHooks, a as KanbanRouteKey, e as createKanbanTask, f as findOrCreateKanbanBoard, g as getAllBoards, d as getBoardById, h as getKanbanColumnsByBoardId, k as kanbanBackendPlugin } from '../../../shared/stack.eq5eg1yt.cjs';
2
2
  import { B as BoardWithColumns, S as SerializedBoardWithColumns, C as ColumnWithTasks, a as SerializedColumn, T as Task, b as SerializedTask } from '../../../shared/stack.DJaKVY7v.cjs';
3
3
  import '@btst/stack/plugins/api';
4
4
  import '@btst/db';
@@ -1,4 +1,4 @@
1
- export { B as BoardListResult, C as CreateKanbanTaskInput, i as KANBAN_QUERY_KEYS, b as KanbanApiContext, K as KanbanApiRouter, c as KanbanBackendHooks, a as KanbanRouteKey, e as createKanbanTask, f as findOrCreateKanbanBoard, g as getAllBoards, d as getBoardById, h as getKanbanColumnsByBoardId, k as kanbanBackendPlugin } from '../../../shared/stack.Bzfx-_lq.mjs';
1
+ export { B as BoardListResult, C as CreateKanbanTaskInput, i as KANBAN_QUERY_KEYS, b as KanbanApiContext, K as KanbanApiRouter, c as KanbanBackendHooks, a as KanbanRouteKey, e as createKanbanTask, f as findOrCreateKanbanBoard, g as getAllBoards, d as getBoardById, h as getKanbanColumnsByBoardId, k as kanbanBackendPlugin } from '../../../shared/stack.Dj04W2c3.mjs';
2
2
  import { B as BoardWithColumns, S as SerializedBoardWithColumns, C as ColumnWithTasks, a as SerializedColumn, T as Task, b as SerializedTask } from '../../../shared/stack.DJaKVY7v.mjs';
3
3
  import '@btst/stack/plugins/api';
4
4
  import '@btst/db';
@@ -1,4 +1,4 @@
1
- export { B as BoardListResult, C as CreateKanbanTaskInput, i as KANBAN_QUERY_KEYS, b as KanbanApiContext, K as KanbanApiRouter, c as KanbanBackendHooks, a as KanbanRouteKey, e as createKanbanTask, f as findOrCreateKanbanBoard, g as getAllBoards, d as getBoardById, h as getKanbanColumnsByBoardId, k as kanbanBackendPlugin } from '../../../shared/stack.j5SFLC1d.js';
1
+ export { B as BoardListResult, C as CreateKanbanTaskInput, i as KANBAN_QUERY_KEYS, b as KanbanApiContext, K as KanbanApiRouter, c as KanbanBackendHooks, a as KanbanRouteKey, e as createKanbanTask, f as findOrCreateKanbanBoard, g as getAllBoards, d as getBoardById, h as getKanbanColumnsByBoardId, k as kanbanBackendPlugin } from '../../../shared/stack.CMbX8Q5C.js';
2
2
  import { B as BoardWithColumns, S as SerializedBoardWithColumns, C as ColumnWithTasks, a as SerializedColumn, T as Task, b as SerializedTask } from '../../../shared/stack.DJaKVY7v.js';
3
3
  import '@btst/stack/plugins/api';
4
4
  import '@btst/db';
@@ -1,5 +1,5 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { K as KanbanApiRouter, j as BoardsListDiscriminator } from '../../shared/stack.B6S3cgwN.cjs';
2
+ import { K as KanbanApiRouter, j as BoardsListDiscriminator } from '../../shared/stack.eq5eg1yt.cjs';
3
3
  import { createApiClient } from '@btst/stack/plugins/client';
4
4
  import { S as SerializedBoardWithColumns } from '../../shared/stack.DJaKVY7v.cjs';
5
5
  import '@btst/stack/plugins/api';
@@ -1,5 +1,5 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { K as KanbanApiRouter, j as BoardsListDiscriminator } from '../../shared/stack.Bzfx-_lq.mjs';
2
+ import { K as KanbanApiRouter, j as BoardsListDiscriminator } from '../../shared/stack.Dj04W2c3.mjs';
3
3
  import { createApiClient } from '@btst/stack/plugins/client';
4
4
  import { S as SerializedBoardWithColumns } from '../../shared/stack.DJaKVY7v.mjs';
5
5
  import '@btst/stack/plugins/api';
@@ -1,5 +1,5 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { K as KanbanApiRouter, j as BoardsListDiscriminator } from '../../shared/stack.j5SFLC1d.js';
2
+ import { K as KanbanApiRouter, j as BoardsListDiscriminator } from '../../shared/stack.CMbX8Q5C.js';
3
3
  import { createApiClient } from '@btst/stack/plugins/client';
4
4
  import { S as SerializedBoardWithColumns } from '../../shared/stack.DJaKVY7v.js';
5
5
  import '@btst/stack/plugins/api';
@@ -1,4 +1,4 @@
1
- import { S as S3StorageAdapter } from '../../../../shared/stack.BttDsJJn.cjs';
1
+ import { S as S3StorageAdapter } from '../../../../shared/stack.DO6vOGQG.cjs';
2
2
 
3
3
  interface S3StorageAdapterOptions {
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { S as S3StorageAdapter } from '../../../../shared/stack.BttDsJJn.mjs';
1
+ import { S as S3StorageAdapter } from '../../../../shared/stack.DO6vOGQG.mjs';
2
2
 
3
3
  interface S3StorageAdapterOptions {
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { S as S3StorageAdapter } from '../../../../shared/stack.BttDsJJn.js';
1
+ import { S as S3StorageAdapter } from '../../../../shared/stack.DO6vOGQG.js';
2
2
 
3
3
  interface S3StorageAdapterOptions {
4
4
  /**
@@ -4,7 +4,7 @@ function vercelBlobAdapter(options = {}) {
4
4
  return {
5
5
  type: "vercel-blob",
6
6
  urlHostnameSuffix: ".public.blob.vercel-storage.com",
7
- async handleRequest(request, callbacks) {
7
+ async handleRequest(request, body, callbacks) {
8
8
  let handleUpload;
9
9
  try {
10
10
  const vercelBlobClient = (
@@ -17,7 +17,6 @@ function vercelBlobAdapter(options = {}) {
17
17
  "[@btst/stack] Vercel Blob adapter requires '@vercel/blob' with 'handleUpload' exported from '@vercel/blob/client'. Run: npm install @vercel/blob"
18
18
  );
19
19
  }
20
- const body = await request.json();
21
20
  return handleUpload({
22
21
  body,
23
22
  request,
@@ -1,4 +1,4 @@
1
- import { V as VercelBlobStorageAdapter } from '../../../../shared/stack.BttDsJJn.cjs';
1
+ import { V as VercelBlobStorageAdapter } from '../../../../shared/stack.DO6vOGQG.cjs';
2
2
 
3
3
  interface VercelBlobStorageAdapterOptions {
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { V as VercelBlobStorageAdapter } from '../../../../shared/stack.BttDsJJn.mjs';
1
+ import { V as VercelBlobStorageAdapter } from '../../../../shared/stack.DO6vOGQG.mjs';
2
2
 
3
3
  interface VercelBlobStorageAdapterOptions {
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { V as VercelBlobStorageAdapter } from '../../../../shared/stack.BttDsJJn.js';
1
+ import { V as VercelBlobStorageAdapter } from '../../../../shared/stack.DO6vOGQG.js';
2
2
 
3
3
  interface VercelBlobStorageAdapterOptions {
4
4
  /**
@@ -2,7 +2,7 @@ function vercelBlobAdapter(options = {}) {
2
2
  return {
3
3
  type: "vercel-blob",
4
4
  urlHostnameSuffix: ".public.blob.vercel-storage.com",
5
- async handleRequest(request, callbacks) {
5
+ async handleRequest(request, body, callbacks) {
6
6
  let handleUpload;
7
7
  try {
8
8
  const vercelBlobClient = (
@@ -15,7 +15,6 @@ function vercelBlobAdapter(options = {}) {
15
15
  "[@btst/stack] Vercel Blob adapter requires '@vercel/blob' with 'handleUpload' exported from '@vercel/blob/client'. Run: npm install @vercel/blob"
16
16
  );
17
17
  }
18
- const body = await request.json();
19
18
  return handleUpload({
20
19
  body,
21
20
  request,
@@ -1,9 +1,9 @@
1
- export { a as MEDIA_QUERY_KEYS, c as MediaApiContext, M as MediaApiRouter, e as MediaBackendConfig, d as MediaBackendHooks, b as assetListDiscriminator, m as mediaBackendPlugin } from '../../../shared/stack.CI8iRKKi.cjs';
1
+ export { a as MEDIA_QUERY_KEYS, c as MediaApiContext, M as MediaApiRouter, e as MediaBackendConfig, d as MediaBackendHooks, b as assetListDiscriminator, m as mediaBackendPlugin } from '../../../shared/stack.BinHXe1r.cjs';
2
2
  export { A as AssetListParams, c as AssetListResult, F as FolderListParams, g as getAssetById, b as getFolderById, l as listAssets, a as listFolders } from '../../../shared/stack.CAni8dnD.cjs';
3
3
  import { DBAdapter } from '@btst/db';
4
4
  import { A as Asset, F as Folder, S as SerializedAsset, a as SerializedFolder } from '../../../shared/stack.CLcnSF_b.cjs';
5
- import { D as DirectStorageAdapter } from '../../../shared/stack.BttDsJJn.cjs';
6
- export { S as S3StorageAdapter, b as S3UploadToken, a as StorageAdapter, U as UploadOptions, c as VercelBlobHandlerCallbacks, V as VercelBlobStorageAdapter } from '../../../shared/stack.BttDsJJn.cjs';
5
+ import { D as DirectStorageAdapter } from '../../../shared/stack.DO6vOGQG.cjs';
6
+ export { S as S3StorageAdapter, b as S3UploadToken, a as StorageAdapter, U as UploadOptions, c as VercelBlobHandlerCallbacks, V as VercelBlobStorageAdapter } from '../../../shared/stack.DO6vOGQG.cjs';
7
7
  import '@btst/stack/plugins/api';
8
8
  import 'better-call';
9
9
  import 'zod';
@@ -1,9 +1,9 @@
1
- export { a as MEDIA_QUERY_KEYS, c as MediaApiContext, M as MediaApiRouter, e as MediaBackendConfig, d as MediaBackendHooks, b as assetListDiscriminator, m as mediaBackendPlugin } from '../../../shared/stack.FgBVDSPi.mjs';
1
+ export { a as MEDIA_QUERY_KEYS, c as MediaApiContext, M as MediaApiRouter, e as MediaBackendConfig, d as MediaBackendHooks, b as assetListDiscriminator, m as mediaBackendPlugin } from '../../../shared/stack.DYrJsJ7x.mjs';
2
2
  export { A as AssetListParams, c as AssetListResult, F as FolderListParams, g as getAssetById, b as getFolderById, l as listAssets, a as listFolders } from '../../../shared/stack.C7vfOBmO.mjs';
3
3
  import { DBAdapter } from '@btst/db';
4
4
  import { A as Asset, F as Folder, S as SerializedAsset, a as SerializedFolder } from '../../../shared/stack.CLcnSF_b.mjs';
5
- import { D as DirectStorageAdapter } from '../../../shared/stack.BttDsJJn.mjs';
6
- export { S as S3StorageAdapter, b as S3UploadToken, a as StorageAdapter, U as UploadOptions, c as VercelBlobHandlerCallbacks, V as VercelBlobStorageAdapter } from '../../../shared/stack.BttDsJJn.mjs';
5
+ import { D as DirectStorageAdapter } from '../../../shared/stack.DO6vOGQG.mjs';
6
+ export { S as S3StorageAdapter, b as S3UploadToken, a as StorageAdapter, U as UploadOptions, c as VercelBlobHandlerCallbacks, V as VercelBlobStorageAdapter } from '../../../shared/stack.DO6vOGQG.mjs';
7
7
  import '@btst/stack/plugins/api';
8
8
  import 'better-call';
9
9
  import 'zod';
@@ -1,9 +1,9 @@
1
- export { a as MEDIA_QUERY_KEYS, c as MediaApiContext, M as MediaApiRouter, e as MediaBackendConfig, d as MediaBackendHooks, b as assetListDiscriminator, m as mediaBackendPlugin } from '../../../shared/stack.DJDjdG64.js';
1
+ export { a as MEDIA_QUERY_KEYS, c as MediaApiContext, M as MediaApiRouter, e as MediaBackendConfig, d as MediaBackendHooks, b as assetListDiscriminator, m as mediaBackendPlugin } from '../../../shared/stack.BjN_-cxo.js';
2
2
  export { A as AssetListParams, c as AssetListResult, F as FolderListParams, g as getAssetById, b as getFolderById, l as listAssets, a as listFolders } from '../../../shared/stack.CYSwntXC.js';
3
3
  import { DBAdapter } from '@btst/db';
4
4
  import { A as Asset, F as Folder, S as SerializedAsset, a as SerializedFolder } from '../../../shared/stack.CLcnSF_b.js';
5
- import { D as DirectStorageAdapter } from '../../../shared/stack.BttDsJJn.js';
6
- export { S as S3StorageAdapter, b as S3UploadToken, a as StorageAdapter, U as UploadOptions, c as VercelBlobHandlerCallbacks, V as VercelBlobStorageAdapter } from '../../../shared/stack.BttDsJJn.js';
5
+ import { D as DirectStorageAdapter } from '../../../shared/stack.DO6vOGQG.js';
6
+ export { S as S3StorageAdapter, b as S3UploadToken, a as StorageAdapter, U as UploadOptions, c as VercelBlobHandlerCallbacks, V as VercelBlobStorageAdapter } from '../../../shared/stack.DO6vOGQG.js';
7
7
  import '@btst/stack/plugins/api';
8
8
  import 'better-call';
9
9
  import 'zod';
@@ -1,10 +1,10 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { M as MediaApiRouter, A as AssetListDiscriminator } from '../../shared/stack.CI8iRKKi.cjs';
2
+ import { M as MediaApiRouter, A as AssetListDiscriminator } from '../../shared/stack.BinHXe1r.cjs';
3
3
  import { createApiClient } from '@btst/stack/plugins/client';
4
4
  import { S as SerializedAsset, a as SerializedFolder } from '../../shared/stack.CLcnSF_b.cjs';
5
5
  import { A as AssetListParams } from '../../shared/stack.CAni8dnD.cjs';
6
6
  import '@btst/stack/plugins/api';
7
- import '../../shared/stack.BttDsJJn.cjs';
7
+ import '../../shared/stack.DO6vOGQG.cjs';
8
8
  import 'better-call';
9
9
  import 'zod';
10
10
  import '@btst/db';
@@ -1,10 +1,10 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { M as MediaApiRouter, A as AssetListDiscriminator } from '../../shared/stack.FgBVDSPi.mjs';
2
+ import { M as MediaApiRouter, A as AssetListDiscriminator } from '../../shared/stack.DYrJsJ7x.mjs';
3
3
  import { createApiClient } from '@btst/stack/plugins/client';
4
4
  import { S as SerializedAsset, a as SerializedFolder } from '../../shared/stack.CLcnSF_b.mjs';
5
5
  import { A as AssetListParams } from '../../shared/stack.C7vfOBmO.mjs';
6
6
  import '@btst/stack/plugins/api';
7
- import '../../shared/stack.BttDsJJn.mjs';
7
+ import '../../shared/stack.DO6vOGQG.mjs';
8
8
  import 'better-call';
9
9
  import 'zod';
10
10
  import '@btst/db';
@@ -1,10 +1,10 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { M as MediaApiRouter, A as AssetListDiscriminator } from '../../shared/stack.DJDjdG64.js';
2
+ import { M as MediaApiRouter, A as AssetListDiscriminator } from '../../shared/stack.BjN_-cxo.js';
3
3
  import { createApiClient } from '@btst/stack/plugins/client';
4
4
  import { S as SerializedAsset, a as SerializedFolder } from '../../shared/stack.CLcnSF_b.js';
5
5
  import { A as AssetListParams } from '../../shared/stack.CYSwntXC.js';
6
6
  import '@btst/stack/plugins/api';
7
- import '../../shared/stack.BttDsJJn.js';
7
+ import '../../shared/stack.DO6vOGQG.js';
8
8
  import 'better-call';
9
9
  import 'zod';
10
10
  import '@btst/db';
@@ -1,5 +1,5 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { S as SerializedPost, c as createPostSchema, u as updatePostSchema, a as SerializedTag } from './stack.BWp0hcm9.cjs';
2
+ import { S as SerializedPost, c as createPostSchema, u as updatePostSchema, a as SerializedTag } from './stack.BQmuNl5p.mjs';
3
3
  import { z } from 'zod';
4
4
 
5
5
  /**
@@ -135,14 +135,14 @@ declare function useCreatePost(): _tanstack_react_query.UseMutationResult<Serial
135
135
  name: string;
136
136
  slug: string;
137
137
  })[];
138
- published: boolean;
139
138
  title: string;
140
139
  content: string;
141
140
  excerpt: string;
141
+ published: boolean;
142
142
  slug?: string | undefined;
143
- publishedAt?: Date | undefined;
144
143
  createdAt?: Date | undefined;
145
144
  updatedAt?: Date | undefined;
145
+ publishedAt?: Date | undefined;
146
146
  image?: string | undefined;
147
147
  }, unknown>;
148
148
  /** Update an existing post by id */
@@ -1,5 +1,5 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { S as SerializedPost, c as createPostSchema, u as updatePostSchema, a as SerializedTag } from './stack.BWp0hcm9.mjs';
2
+ import { S as SerializedPost, c as createPostSchema, u as updatePostSchema, a as SerializedTag } from './stack.BQmuNl5p.cjs';
3
3
  import { z } from 'zod';
4
4
 
5
5
  /**
@@ -135,14 +135,14 @@ declare function useCreatePost(): _tanstack_react_query.UseMutationResult<Serial
135
135
  name: string;
136
136
  slug: string;
137
137
  })[];
138
- published: boolean;
139
138
  title: string;
140
139
  content: string;
141
140
  excerpt: string;
141
+ published: boolean;
142
142
  slug?: string | undefined;
143
- publishedAt?: Date | undefined;
144
143
  createdAt?: Date | undefined;
145
144
  updatedAt?: Date | undefined;
145
+ publishedAt?: Date | undefined;
146
146
  image?: string | undefined;
147
147
  }, unknown>;
148
148
  /** Update an existing post by id */
@@ -1,5 +1,5 @@
1
1
  import * as _btst_stack_plugins_api from '@btst/stack/plugins/api';
2
- import { a as StorageAdapter, b as S3UploadToken } from './stack.BttDsJJn.cjs';
2
+ import { a as StorageAdapter, b as S3UploadToken } from './stack.DO6vOGQG.cjs';
3
3
  import { c as AssetListResult, l as listAssets, a as listFolders, A as AssetListParams } from './stack.CAni8dnD.cjs';
4
4
  import * as better_call from 'better-call';
5
5
  import { z } from 'zod';
@@ -1,5 +1,5 @@
1
1
  import * as _btst_stack_plugins_api from '@btst/stack/plugins/api';
2
- import { a as StorageAdapter, b as S3UploadToken } from './stack.BttDsJJn.js';
2
+ import { a as StorageAdapter, b as S3UploadToken } from './stack.DO6vOGQG.js';
3
3
  import { c as AssetListResult, l as listAssets, a as listFolders, A as AssetListParams } from './stack.CYSwntXC.js';
4
4
  import * as better_call from 'better-call';
5
5
  import { z } from 'zod';
@@ -1,7 +1,7 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
2
  import { QueryClient } from '@tanstack/react-query';
3
3
  import { createApiClient } from '@btst/stack/plugins/client';
4
- import { P as Post, T as Tag, c as createPostSchema, u as updatePostSchema, S as SerializedPost, a as SerializedTag } from './stack.BWp0hcm9.js';
4
+ import { P as Post, T as Tag, c as createPostSchema, u as updatePostSchema, S as SerializedPost, a as SerializedTag } from './stack.BQmuNl5p.js';
5
5
  import * as _btst_stack_plugins_api from '@btst/stack/plugins/api';
6
6
  import { DBAdapter } from '@btst/db';
7
7
  import * as better_call from 'better-call';
@@ -244,11 +244,11 @@ declare const blogBackendPlugin: (hooks?: BlogBackendHooks) => _btst_stack_plugi
244
244
  slug: string;
245
245
  })[] | undefined;
246
246
  slug?: string | undefined;
247
- published?: boolean | undefined;
248
- publishedAt?: unknown;
249
247
  createdAt?: unknown;
250
248
  updatedAt?: unknown;
249
+ publishedAt?: unknown;
251
250
  image?: string | undefined;
251
+ published?: boolean | undefined;
252
252
  }, {
253
253
  title: string;
254
254
  content: string;
@@ -261,11 +261,11 @@ declare const blogBackendPlugin: (hooks?: BlogBackendHooks) => _btst_stack_plugi
261
261
  slug: string;
262
262
  })[] | undefined;
263
263
  slug?: string | undefined;
264
- published?: boolean | undefined;
265
- publishedAt?: unknown;
266
264
  createdAt?: unknown;
267
265
  updatedAt?: unknown;
266
+ publishedAt?: unknown;
268
267
  image?: string | undefined;
268
+ published?: boolean | undefined;
269
269
  }>;
270
270
  }, Post>;
271
271
  readonly updatePost: better_call.StrictEndpoint<"/posts/:id", {} & {
@@ -69,6 +69,31 @@ interface VercelBlobTokenOptions {
69
69
  allowedContentTypes?: string[];
70
70
  maximumSizeInBytes?: number;
71
71
  }
72
+ /**
73
+ * Minimal blob metadata sent back by Vercel Blob's upload completion callback.
74
+ * Keep this intentionally small so BTST does not hard-depend on a specific SDK type.
75
+ */
76
+ interface VercelBlobCallbackBlob {
77
+ url: string;
78
+ pathname: string;
79
+ [key: string]: unknown;
80
+ }
81
+ interface VercelBlobGenerateClientTokenBody {
82
+ type: "blob.generate-client-token";
83
+ payload: {
84
+ pathname: string;
85
+ multipart: boolean;
86
+ clientPayload: string | null;
87
+ };
88
+ }
89
+ interface VercelBlobUploadCompletedBody {
90
+ type: "blob.upload-completed";
91
+ payload: {
92
+ blob: VercelBlobCallbackBlob;
93
+ tokenPayload?: string | null;
94
+ };
95
+ }
96
+ type VercelBlobHandleUploadBody = VercelBlobGenerateClientTokenBody | VercelBlobUploadCompletedBody;
72
97
  /**
73
98
  * Callbacks provided to the Vercel Blob adapter when handling a request.
74
99
  */
@@ -98,7 +123,7 @@ interface VercelBlobStorageAdapter {
98
123
  * Vercel Blob's upload-completion webhook. Returns a JSON-serialisable object
99
124
  * that should be sent back as the response body.
100
125
  */
101
- handleRequest(request: Request, callbacks: VercelBlobHandlerCallbacks): Promise<unknown>;
126
+ handleRequest(request: Request, body: VercelBlobHandleUploadBody, callbacks: VercelBlobHandlerCallbacks): Promise<unknown>;
102
127
  /**
103
128
  * Remove the stored blob given its public URL.
104
129
  */
@@ -69,6 +69,31 @@ interface VercelBlobTokenOptions {
69
69
  allowedContentTypes?: string[];
70
70
  maximumSizeInBytes?: number;
71
71
  }
72
+ /**
73
+ * Minimal blob metadata sent back by Vercel Blob's upload completion callback.
74
+ * Keep this intentionally small so BTST does not hard-depend on a specific SDK type.
75
+ */
76
+ interface VercelBlobCallbackBlob {
77
+ url: string;
78
+ pathname: string;
79
+ [key: string]: unknown;
80
+ }
81
+ interface VercelBlobGenerateClientTokenBody {
82
+ type: "blob.generate-client-token";
83
+ payload: {
84
+ pathname: string;
85
+ multipart: boolean;
86
+ clientPayload: string | null;
87
+ };
88
+ }
89
+ interface VercelBlobUploadCompletedBody {
90
+ type: "blob.upload-completed";
91
+ payload: {
92
+ blob: VercelBlobCallbackBlob;
93
+ tokenPayload?: string | null;
94
+ };
95
+ }
96
+ type VercelBlobHandleUploadBody = VercelBlobGenerateClientTokenBody | VercelBlobUploadCompletedBody;
72
97
  /**
73
98
  * Callbacks provided to the Vercel Blob adapter when handling a request.
74
99
  */
@@ -98,7 +123,7 @@ interface VercelBlobStorageAdapter {
98
123
  * Vercel Blob's upload-completion webhook. Returns a JSON-serialisable object
99
124
  * that should be sent back as the response body.
100
125
  */
101
- handleRequest(request: Request, callbacks: VercelBlobHandlerCallbacks): Promise<unknown>;
126
+ handleRequest(request: Request, body: VercelBlobHandleUploadBody, callbacks: VercelBlobHandlerCallbacks): Promise<unknown>;
102
127
  /**
103
128
  * Remove the stored blob given its public URL.
104
129
  */