@btst/stack 2.9.1 → 2.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/packages/stack/src/plugins/media/api/plugin.cjs +1 -1
- package/dist/packages/stack/src/plugins/media/api/plugin.mjs +1 -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/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/plugins/media/api/adapters/s3.d.cts +1 -1
- package/dist/plugins/media/api/adapters/s3.d.mts +1 -1
- package/dist/plugins/media/api/adapters/s3.d.ts +1 -1
- package/dist/plugins/media/api/adapters/vercel-blob.cjs +1 -2
- package/dist/plugins/media/api/adapters/vercel-blob.d.cts +1 -1
- package/dist/plugins/media/api/adapters/vercel-blob.d.mts +1 -1
- package/dist/plugins/media/api/adapters/vercel-blob.d.ts +1 -1
- package/dist/plugins/media/api/adapters/vercel-blob.mjs +1 -2
- package/dist/plugins/media/api/index.d.cts +3 -3
- package/dist/plugins/media/api/index.d.mts +3 -3
- package/dist/plugins/media/api/index.d.ts +3 -3
- package/dist/plugins/media/query-keys.d.cts +2 -2
- package/dist/plugins/media/query-keys.d.mts +2 -2
- package/dist/plugins/media/query-keys.d.ts +2 -2
- package/dist/shared/{stack.DX-tQ93o.d.cts → stack.6mEHS2WH.d.mts} +3 -3
- package/dist/shared/{stack.DOZ1EXjM.d.mts → stack.AJTXI7kw.d.cts} +3 -3
- package/dist/shared/{stack.CI8iRKKi.d.cts → stack.BinHXe1r.d.cts} +1 -1
- package/dist/shared/{stack.DJDjdG64.d.ts → stack.BjN_-cxo.d.ts} +1 -1
- package/dist/shared/{stack.BXxrFL9R.d.ts → stack.D7HSzZdG.d.ts} +5 -5
- package/dist/shared/{stack.BttDsJJn.d.mts → stack.DO6vOGQG.d.cts} +26 -1
- package/dist/shared/{stack.BttDsJJn.d.cts → stack.DO6vOGQG.d.mts} +26 -1
- package/dist/shared/{stack.BttDsJJn.d.ts → stack.DO6vOGQG.d.ts} +26 -1
- package/dist/shared/{stack.FgBVDSPi.d.mts → stack.DYrJsJ7x.d.mts} +1 -1
- package/dist/shared/{stack.DzOhpIYM.d.mts → stack.DjgpFWq3.d.cts} +5 -5
- package/dist/shared/{stack.BSqJrCTM.d.cts → stack.IUeyQKrm.d.mts} +5 -5
- package/dist/shared/{stack.VF6FhyZw.d.ts → stack.QYn-Px94.d.ts} +3 -3
- package/package.json +1 -1
- package/src/plugins/media/__tests__/storage-adapters.test.ts +50 -6
- package/src/plugins/media/api/adapters/vercel-blob.ts +4 -4
- package/src/plugins/media/api/plugin.ts +1 -1
- package/src/plugins/media/api/storage-adapter.ts +32 -0
- package/dist/shared/{stack.BWp0hcm9.d.ts → stack.BQmuNl5p.d.cts} +3 -3
- package/dist/shared/{stack.BWp0hcm9.d.cts → stack.BQmuNl5p.d.mts} +3 -3
- package/dist/shared/{stack.BWp0hcm9.d.mts → stack.BQmuNl5p.d.ts} +3 -3
- package/dist/shared/{stack.j5SFLC1d.d.ts → stack.CMbX8Q5C.d.ts} +6 -6
- package/dist/shared/{stack.Bzfx-_lq.d.mts → stack.Dj04W2c3.d.mts} +6 -6
- 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 = {};
|
|
@@ -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.
|
|
2
|
-
import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../../shared/stack.
|
|
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.
|
|
2
|
-
import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../../shared/stack.
|
|
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.
|
|
2
|
-
import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../../shared/stack.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
6
|
-
export { U as UsePostsOptions, a as UsePostsResult } from '../../../shared/stack.
|
|
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.
|
|
6
|
-
export { U as UsePostsOptions, a as UsePostsResult } from '../../../shared/stack.
|
|
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.
|
|
6
|
-
export { U as UsePostsOptions, a as UsePostsResult } from '../../../shared/stack.
|
|
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.
|
|
2
|
+
export { d as createBlogQueryKeys } from '../../shared/stack.DjgpFWq3.cjs';
|
|
3
3
|
import '@btst/stack/plugins/client';
|
|
4
|
-
import '../../shared/stack.
|
|
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.
|
|
2
|
+
export { d as createBlogQueryKeys } from '../../shared/stack.IUeyQKrm.mjs';
|
|
3
3
|
import '@btst/stack/plugins/client';
|
|
4
|
-
import '../../shared/stack.
|
|
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.
|
|
2
|
+
export { d as createBlogQueryKeys } from '../../shared/stack.D7HSzZdG.js';
|
|
3
3
|
import '@btst/stack/plugins/client';
|
|
4
|
-
import '../../shared/stack.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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';
|
|
@@ -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,
|
|
@@ -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.
|
|
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.
|
|
6
|
-
export { S as S3StorageAdapter, b as S3UploadToken, a as StorageAdapter, U as UploadOptions, c as VercelBlobHandlerCallbacks, V as VercelBlobStorageAdapter } from '../../../shared/stack.
|
|
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.
|
|
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.
|
|
6
|
-
export { S as S3StorageAdapter, b as S3UploadToken, a as StorageAdapter, U as UploadOptions, c as VercelBlobHandlerCallbacks, V as VercelBlobStorageAdapter } from '../../../shared/stack.
|
|
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.
|
|
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.
|
|
6
|
-
export { S as S3StorageAdapter, b as S3UploadToken, a as StorageAdapter, U as UploadOptions, c as VercelBlobHandlerCallbacks, V as VercelBlobStorageAdapter } from '../../../shared/stack.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
*/
|
|
@@ -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
|
*/
|
|
@@ -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.
|
|
2
|
+
import { a as StorageAdapter, b as S3UploadToken } from './stack.DO6vOGQG.mjs';
|
|
3
3
|
import { c as AssetListResult, l as listAssets, a as listFolders, A as AssetListParams } from './stack.C7vfOBmO.mjs';
|
|
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.
|
|
4
|
+
import { P as Post, T as Tag, c as createPostSchema, u as updatePostSchema, S as SerializedPost, a as SerializedTag } from './stack.BQmuNl5p.cjs';
|
|
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", {} & {
|
|
@@ -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.
|
|
4
|
+
import { P as Post, T as Tag, c as createPostSchema, u as updatePostSchema, S as SerializedPost, a as SerializedTag } from './stack.BQmuNl5p.mjs';
|
|
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", {} & {
|
|
@@ -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.
|
|
2
|
+
import { S as SerializedPost, c as createPostSchema, u as updatePostSchema, a as SerializedTag } from './stack.BQmuNl5p.js';
|
|
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 */
|
package/package.json
CHANGED
|
@@ -2,6 +2,7 @@ import { describe, it, expect, vi, afterEach } from "vitest";
|
|
|
2
2
|
import * as fs from "node:fs/promises";
|
|
3
3
|
import * as path from "node:path";
|
|
4
4
|
import * as os from "node:os";
|
|
5
|
+
import type { VercelBlobHandleUploadBody } from "../api/storage-adapter";
|
|
5
6
|
|
|
6
7
|
// Top-level vi.mock calls are hoisted by Vitest before any imports.
|
|
7
8
|
// Factories are used so the packages do not need to be installed as devDependencies.
|
|
@@ -271,9 +272,13 @@ describe("vercelBlobAdapter", () => {
|
|
|
271
272
|
const { vercelBlobAdapter } = await import("../api/adapters/vercel-blob");
|
|
272
273
|
const adapter = vercelBlobAdapter();
|
|
273
274
|
|
|
274
|
-
const body = {
|
|
275
|
+
const body: VercelBlobHandleUploadBody = {
|
|
275
276
|
type: "blob.generate-client-token",
|
|
276
|
-
payload: {
|
|
277
|
+
payload: {
|
|
278
|
+
pathname: "photo.jpg",
|
|
279
|
+
multipart: false,
|
|
280
|
+
clientPayload: null,
|
|
281
|
+
},
|
|
277
282
|
};
|
|
278
283
|
const request = new Request("https://example.com/api/upload", {
|
|
279
284
|
method: "POST",
|
|
@@ -281,7 +286,7 @@ describe("vercelBlobAdapter", () => {
|
|
|
281
286
|
headers: { "Content-Type": "application/json" },
|
|
282
287
|
});
|
|
283
288
|
|
|
284
|
-
const result = await adapter.handleRequest(request, {});
|
|
289
|
+
const result = await adapter.handleRequest(request, body, {});
|
|
285
290
|
|
|
286
291
|
expect(mockHandleUpload).toHaveBeenCalledWith(
|
|
287
292
|
expect.objectContaining({
|
|
@@ -300,9 +305,13 @@ describe("vercelBlobAdapter", () => {
|
|
|
300
305
|
const adapter = vercelBlobAdapter();
|
|
301
306
|
|
|
302
307
|
const onBeforeGenerateToken = vi.fn().mockResolvedValue(undefined);
|
|
303
|
-
const body = {
|
|
308
|
+
const body: VercelBlobHandleUploadBody = {
|
|
304
309
|
type: "blob.generate-client-token",
|
|
305
|
-
payload: {
|
|
310
|
+
payload: {
|
|
311
|
+
pathname: "test.jpg",
|
|
312
|
+
multipart: false,
|
|
313
|
+
clientPayload: null,
|
|
314
|
+
},
|
|
306
315
|
};
|
|
307
316
|
const request = new Request("https://example.com/api/upload", {
|
|
308
317
|
method: "POST",
|
|
@@ -310,7 +319,7 @@ describe("vercelBlobAdapter", () => {
|
|
|
310
319
|
headers: { "Content-Type": "application/json" },
|
|
311
320
|
});
|
|
312
321
|
|
|
313
|
-
await adapter.handleRequest(request, { onBeforeGenerateToken });
|
|
322
|
+
await adapter.handleRequest(request, body, { onBeforeGenerateToken });
|
|
314
323
|
|
|
315
324
|
// Verify that handleUpload received an onBeforeGenerateToken callback
|
|
316
325
|
const callArgs = mockHandleUpload.mock.calls[0]![0] as Record<
|
|
@@ -325,6 +334,41 @@ describe("vercelBlobAdapter", () => {
|
|
|
325
334
|
expect(onBeforeGenerateToken).toHaveBeenCalledWith("test.jpg", null);
|
|
326
335
|
});
|
|
327
336
|
|
|
337
|
+
it("reuses the already-parsed request body without reading the request again", async () => {
|
|
338
|
+
const { vercelBlobAdapter } = await import("../api/adapters/vercel-blob");
|
|
339
|
+
const adapter = vercelBlobAdapter();
|
|
340
|
+
|
|
341
|
+
const body: VercelBlobHandleUploadBody = {
|
|
342
|
+
type: "blob.generate-client-token",
|
|
343
|
+
payload: {
|
|
344
|
+
pathname: "consumed.jpg",
|
|
345
|
+
multipart: false,
|
|
346
|
+
clientPayload: null,
|
|
347
|
+
},
|
|
348
|
+
};
|
|
349
|
+
const request = new Request("https://example.com/api/upload", {
|
|
350
|
+
method: "POST",
|
|
351
|
+
body: JSON.stringify(body),
|
|
352
|
+
headers: { "Content-Type": "application/json" },
|
|
353
|
+
});
|
|
354
|
+
|
|
355
|
+
// Simulate the BTST route layer parsing the request before the adapter runs.
|
|
356
|
+
const parsedBody = await request.json();
|
|
357
|
+
|
|
358
|
+
const result = await adapter.handleRequest(request, parsedBody, {});
|
|
359
|
+
|
|
360
|
+
expect(mockHandleUpload).toHaveBeenCalledWith(
|
|
361
|
+
expect.objectContaining({
|
|
362
|
+
body: parsedBody,
|
|
363
|
+
request,
|
|
364
|
+
}),
|
|
365
|
+
);
|
|
366
|
+
expect(result).toEqual({
|
|
367
|
+
type: "blob.generate-client-token",
|
|
368
|
+
clientToken: "tok123",
|
|
369
|
+
});
|
|
370
|
+
});
|
|
371
|
+
|
|
328
372
|
it("calls del when deleting a blob by URL", async () => {
|
|
329
373
|
const { vercelBlobAdapter } = await import("../api/adapters/vercel-blob");
|
|
330
374
|
const adapter = vercelBlobAdapter();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
VercelBlobStorageAdapter,
|
|
3
3
|
VercelBlobHandlerCallbacks,
|
|
4
|
+
VercelBlobHandleUploadBody,
|
|
4
5
|
} from "../storage-adapter";
|
|
5
6
|
|
|
6
7
|
export interface VercelBlobStorageAdapterOptions {
|
|
@@ -17,7 +18,7 @@ export interface VercelBlobStorageAdapterOptions {
|
|
|
17
18
|
* Defined inline so we do not hard-depend on a specific `@vercel/blob` release.
|
|
18
19
|
*/
|
|
19
20
|
interface HandleUploadOptions {
|
|
20
|
-
body:
|
|
21
|
+
body: VercelBlobHandleUploadBody;
|
|
21
22
|
request: Request;
|
|
22
23
|
token?: string;
|
|
23
24
|
onBeforeGenerateToken: (
|
|
@@ -73,13 +74,14 @@ export function vercelBlobAdapter(
|
|
|
73
74
|
|
|
74
75
|
async handleRequest(
|
|
75
76
|
request: Request,
|
|
77
|
+
body: VercelBlobHandleUploadBody,
|
|
76
78
|
callbacks: VercelBlobHandlerCallbacks,
|
|
77
79
|
): Promise<unknown> {
|
|
78
80
|
let handleUpload: HandleUploadFn;
|
|
79
81
|
try {
|
|
80
82
|
const vercelBlobClient =
|
|
81
83
|
/* @vite-ignore */
|
|
82
|
-
(await import("@vercel/blob/client")) as {
|
|
84
|
+
(await import("@vercel/blob/client")) as unknown as {
|
|
83
85
|
handleUpload: HandleUploadFn;
|
|
84
86
|
};
|
|
85
87
|
({ handleUpload } = vercelBlobClient);
|
|
@@ -91,8 +93,6 @@ export function vercelBlobAdapter(
|
|
|
91
93
|
);
|
|
92
94
|
}
|
|
93
95
|
|
|
94
|
-
const body = await request.json();
|
|
95
|
-
|
|
96
96
|
return handleUpload({
|
|
97
97
|
body,
|
|
98
98
|
request,
|
|
@@ -788,7 +788,7 @@ export const mediaBackendPlugin = (config: MediaBackendConfig) =>
|
|
|
788
788
|
});
|
|
789
789
|
}
|
|
790
790
|
|
|
791
|
-
return storageAdapter.handleRequest(ctx.request, {
|
|
791
|
+
return storageAdapter.handleRequest(ctx.request, ctx.body, {
|
|
792
792
|
onBeforeGenerateToken: async (pathname, clientPayload) => {
|
|
793
793
|
const filename = pathname.split("/").pop() ?? pathname;
|
|
794
794
|
let parsed: Record<string, unknown> = {};
|
|
@@ -72,6 +72,37 @@ export interface VercelBlobTokenOptions {
|
|
|
72
72
|
maximumSizeInBytes?: number;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
/**
|
|
76
|
+
* Minimal blob metadata sent back by Vercel Blob's upload completion callback.
|
|
77
|
+
* Keep this intentionally small so BTST does not hard-depend on a specific SDK type.
|
|
78
|
+
*/
|
|
79
|
+
export interface VercelBlobCallbackBlob {
|
|
80
|
+
url: string;
|
|
81
|
+
pathname: string;
|
|
82
|
+
[key: string]: unknown;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface VercelBlobGenerateClientTokenBody {
|
|
86
|
+
type: "blob.generate-client-token";
|
|
87
|
+
payload: {
|
|
88
|
+
pathname: string;
|
|
89
|
+
multipart: boolean;
|
|
90
|
+
clientPayload: string | null;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface VercelBlobUploadCompletedBody {
|
|
95
|
+
type: "blob.upload-completed";
|
|
96
|
+
payload: {
|
|
97
|
+
blob: VercelBlobCallbackBlob;
|
|
98
|
+
tokenPayload?: string | null;
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export type VercelBlobHandleUploadBody =
|
|
103
|
+
| VercelBlobGenerateClientTokenBody
|
|
104
|
+
| VercelBlobUploadCompletedBody;
|
|
105
|
+
|
|
75
106
|
/**
|
|
76
107
|
* Callbacks provided to the Vercel Blob adapter when handling a request.
|
|
77
108
|
*/
|
|
@@ -107,6 +138,7 @@ export interface VercelBlobStorageAdapter {
|
|
|
107
138
|
*/
|
|
108
139
|
handleRequest(
|
|
109
140
|
request: Request,
|
|
141
|
+
body: VercelBlobHandleUploadBody,
|
|
110
142
|
callbacks: VercelBlobHandlerCallbacks,
|
|
111
143
|
): Promise<unknown>;
|
|
112
144
|
/**
|
|
@@ -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;
|
|
45
46
|
slug: z.ZodOptional<z.ZodString>;
|
|
46
|
-
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
47
|
-
publishedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
48
47
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
49
48
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
50
|
-
|
|
49
|
+
publishedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
51
50
|
content: z.ZodString;
|
|
52
51
|
excerpt: z.ZodString;
|
|
53
52
|
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;
|
|
45
46
|
slug: z.ZodOptional<z.ZodString>;
|
|
46
|
-
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
47
|
-
publishedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
48
47
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
49
48
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
50
|
-
|
|
49
|
+
publishedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
51
50
|
content: z.ZodString;
|
|
52
51
|
excerpt: z.ZodString;
|
|
53
52
|
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;
|
|
45
46
|
slug: z.ZodOptional<z.ZodString>;
|
|
46
|
-
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
47
|
-
publishedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
48
47
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
49
48
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
50
|
-
|
|
49
|
+
publishedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
51
50
|
content: z.ZodString;
|
|
52
51
|
excerpt: z.ZodString;
|
|
53
52
|
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>>;
|
|
@@ -7,12 +7,12 @@ import { QueryClient } from '@tanstack/react-query';
|
|
|
7
7
|
|
|
8
8
|
declare const createBoardSchema: z.ZodObject<{
|
|
9
9
|
description: z.ZodOptional<z.ZodString>;
|
|
10
|
+
name: z.ZodString;
|
|
10
11
|
slug: z.ZodOptional<z.ZodString>;
|
|
11
12
|
ownerId: z.ZodOptional<z.ZodString>;
|
|
12
13
|
organizationId: z.ZodOptional<z.ZodString>;
|
|
13
14
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
14
15
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
15
|
-
name: z.ZodString;
|
|
16
16
|
}, z.core.$strip>;
|
|
17
17
|
declare const updateBoardSchema: z.ZodObject<{
|
|
18
18
|
createdAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
@@ -26,10 +26,10 @@ 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;
|
|
29
30
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
30
31
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
31
32
|
order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
32
|
-
boardId: z.ZodString;
|
|
33
33
|
}, z.core.$strip>;
|
|
34
34
|
declare const updateColumnSchema: z.ZodObject<{
|
|
35
35
|
createdAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
@@ -360,20 +360,20 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
|
|
|
360
360
|
method: "PUT";
|
|
361
361
|
body: better_call.StandardSchemaV1<{
|
|
362
362
|
description?: string | undefined;
|
|
363
|
+
name?: string | undefined;
|
|
363
364
|
slug?: string | undefined;
|
|
364
365
|
ownerId?: string | undefined;
|
|
365
366
|
organizationId?: string | undefined;
|
|
366
367
|
createdAt?: unknown;
|
|
367
368
|
updatedAt?: unknown;
|
|
368
|
-
name?: string | undefined;
|
|
369
369
|
}, {
|
|
370
370
|
description?: string | undefined;
|
|
371
|
+
name?: string | undefined;
|
|
371
372
|
slug?: string | undefined;
|
|
372
373
|
ownerId?: string | undefined;
|
|
373
374
|
organizationId?: string | undefined;
|
|
374
375
|
createdAt?: unknown;
|
|
375
376
|
updatedAt?: unknown;
|
|
376
|
-
name?: string | undefined;
|
|
377
377
|
}>;
|
|
378
378
|
}, Board>;
|
|
379
379
|
readonly deleteBoard: better_call.StrictEndpoint<"/boards/:id", {} & {
|
|
@@ -402,16 +402,16 @@ 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;
|
|
405
406
|
createdAt?: unknown;
|
|
406
407
|
updatedAt?: unknown;
|
|
407
408
|
order?: number | undefined;
|
|
408
|
-
boardId?: string | undefined;
|
|
409
409
|
}, {
|
|
410
410
|
title?: string | undefined;
|
|
411
|
+
boardId?: string | undefined;
|
|
411
412
|
createdAt?: unknown;
|
|
412
413
|
updatedAt?: unknown;
|
|
413
414
|
order?: number | undefined;
|
|
414
|
-
boardId?: string | undefined;
|
|
415
415
|
}>;
|
|
416
416
|
}, Column>;
|
|
417
417
|
readonly deleteColumn: better_call.StrictEndpoint<"/columns/:id", {} & {
|
|
@@ -7,12 +7,12 @@ import { QueryClient } from '@tanstack/react-query';
|
|
|
7
7
|
|
|
8
8
|
declare const createBoardSchema: z.ZodObject<{
|
|
9
9
|
description: z.ZodOptional<z.ZodString>;
|
|
10
|
+
name: z.ZodString;
|
|
10
11
|
slug: z.ZodOptional<z.ZodString>;
|
|
11
12
|
ownerId: z.ZodOptional<z.ZodString>;
|
|
12
13
|
organizationId: z.ZodOptional<z.ZodString>;
|
|
13
14
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
14
15
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
15
|
-
name: z.ZodString;
|
|
16
16
|
}, z.core.$strip>;
|
|
17
17
|
declare const updateBoardSchema: z.ZodObject<{
|
|
18
18
|
createdAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
@@ -26,10 +26,10 @@ 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;
|
|
29
30
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
30
31
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
31
32
|
order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
32
|
-
boardId: z.ZodString;
|
|
33
33
|
}, z.core.$strip>;
|
|
34
34
|
declare const updateColumnSchema: z.ZodObject<{
|
|
35
35
|
createdAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
@@ -360,20 +360,20 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
|
|
|
360
360
|
method: "PUT";
|
|
361
361
|
body: better_call.StandardSchemaV1<{
|
|
362
362
|
description?: string | undefined;
|
|
363
|
+
name?: string | undefined;
|
|
363
364
|
slug?: string | undefined;
|
|
364
365
|
ownerId?: string | undefined;
|
|
365
366
|
organizationId?: string | undefined;
|
|
366
367
|
createdAt?: unknown;
|
|
367
368
|
updatedAt?: unknown;
|
|
368
|
-
name?: string | undefined;
|
|
369
369
|
}, {
|
|
370
370
|
description?: string | undefined;
|
|
371
|
+
name?: string | undefined;
|
|
371
372
|
slug?: string | undefined;
|
|
372
373
|
ownerId?: string | undefined;
|
|
373
374
|
organizationId?: string | undefined;
|
|
374
375
|
createdAt?: unknown;
|
|
375
376
|
updatedAt?: unknown;
|
|
376
|
-
name?: string | undefined;
|
|
377
377
|
}>;
|
|
378
378
|
}, Board>;
|
|
379
379
|
readonly deleteBoard: better_call.StrictEndpoint<"/boards/:id", {} & {
|
|
@@ -402,16 +402,16 @@ 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;
|
|
405
406
|
createdAt?: unknown;
|
|
406
407
|
updatedAt?: unknown;
|
|
407
408
|
order?: number | undefined;
|
|
408
|
-
boardId?: string | undefined;
|
|
409
409
|
}, {
|
|
410
410
|
title?: string | undefined;
|
|
411
|
+
boardId?: string | undefined;
|
|
411
412
|
createdAt?: unknown;
|
|
412
413
|
updatedAt?: unknown;
|
|
413
414
|
order?: number | undefined;
|
|
414
|
-
boardId?: string | undefined;
|
|
415
415
|
}>;
|
|
416
416
|
}, Column>;
|
|
417
417
|
readonly deleteColumn: better_call.StrictEndpoint<"/columns/:id", {} & {
|
|
@@ -7,12 +7,12 @@ import { QueryClient } from '@tanstack/react-query';
|
|
|
7
7
|
|
|
8
8
|
declare const createBoardSchema: z.ZodObject<{
|
|
9
9
|
description: z.ZodOptional<z.ZodString>;
|
|
10
|
+
name: z.ZodString;
|
|
10
11
|
slug: z.ZodOptional<z.ZodString>;
|
|
11
12
|
ownerId: z.ZodOptional<z.ZodString>;
|
|
12
13
|
organizationId: z.ZodOptional<z.ZodString>;
|
|
13
14
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
14
15
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
15
|
-
name: z.ZodString;
|
|
16
16
|
}, z.core.$strip>;
|
|
17
17
|
declare const updateBoardSchema: z.ZodObject<{
|
|
18
18
|
createdAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
@@ -26,10 +26,10 @@ 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;
|
|
29
30
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
30
31
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
31
32
|
order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
32
|
-
boardId: z.ZodString;
|
|
33
33
|
}, z.core.$strip>;
|
|
34
34
|
declare const updateColumnSchema: z.ZodObject<{
|
|
35
35
|
createdAt: z.ZodOptional<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
@@ -360,20 +360,20 @@ declare const kanbanBackendPlugin: (hooks?: KanbanBackendHooks) => _btst_stack_p
|
|
|
360
360
|
method: "PUT";
|
|
361
361
|
body: better_call.StandardSchemaV1<{
|
|
362
362
|
description?: string | undefined;
|
|
363
|
+
name?: string | undefined;
|
|
363
364
|
slug?: string | undefined;
|
|
364
365
|
ownerId?: string | undefined;
|
|
365
366
|
organizationId?: string | undefined;
|
|
366
367
|
createdAt?: unknown;
|
|
367
368
|
updatedAt?: unknown;
|
|
368
|
-
name?: string | undefined;
|
|
369
369
|
}, {
|
|
370
370
|
description?: string | undefined;
|
|
371
|
+
name?: string | undefined;
|
|
371
372
|
slug?: string | undefined;
|
|
372
373
|
ownerId?: string | undefined;
|
|
373
374
|
organizationId?: string | undefined;
|
|
374
375
|
createdAt?: unknown;
|
|
375
376
|
updatedAt?: unknown;
|
|
376
|
-
name?: string | undefined;
|
|
377
377
|
}>;
|
|
378
378
|
}, Board>;
|
|
379
379
|
readonly deleteBoard: better_call.StrictEndpoint<"/boards/:id", {} & {
|
|
@@ -402,16 +402,16 @@ 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;
|
|
405
406
|
createdAt?: unknown;
|
|
406
407
|
updatedAt?: unknown;
|
|
407
408
|
order?: number | undefined;
|
|
408
|
-
boardId?: string | undefined;
|
|
409
409
|
}, {
|
|
410
410
|
title?: string | undefined;
|
|
411
|
+
boardId?: string | undefined;
|
|
411
412
|
createdAt?: unknown;
|
|
412
413
|
updatedAt?: unknown;
|
|
413
414
|
order?: number | undefined;
|
|
414
|
-
boardId?: string | undefined;
|
|
415
415
|
}>;
|
|
416
416
|
}, Column>;
|
|
417
417
|
readonly deleteColumn: better_call.StrictEndpoint<"/columns/:id", {} & {
|