@btst/stack 5.0.0 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.d.cts +2 -2
- package/dist/api/index.d.mts +2 -2
- package/dist/api/index.d.ts +2 -2
- package/dist/client/index.d.cts +2 -2
- package/dist/client/index.d.mts +2 -2
- package/dist/client/index.d.ts +2 -2
- package/dist/context/index.d.cts +1 -1
- package/dist/context/index.d.mts +1 -1
- package/dist/context/index.d.ts +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/packages/stack/src/plugins/cms/api/getters.cjs +142 -6
- package/dist/packages/stack/src/plugins/cms/api/getters.mjs +139 -8
- package/dist/packages/stack/src/plugins/cms/api/operations.cjs +67 -61
- package/dist/packages/stack/src/plugins/cms/api/operations.mjs +69 -63
- package/dist/packages/stack/src/plugins/cms/api/plugin.cjs +26 -8
- package/dist/packages/stack/src/plugins/cms/api/plugin.mjs +27 -9
- package/dist/packages/stack/src/plugins/cms/api/query-key-defs.cjs +15 -1
- package/dist/packages/stack/src/plugins/cms/api/query-key-defs.mjs +14 -2
- package/dist/packages/stack/src/plugins/cms/client/hooks/cms-hooks.cjs +45 -24
- package/dist/packages/stack/src/plugins/cms/client/hooks/cms-hooks.mjs +45 -24
- package/dist/packages/stack/src/plugins/cms/schemas.cjs +22 -0
- package/dist/packages/stack/src/plugins/cms/schemas.mjs +20 -1
- package/dist/plugins/api/index.d.cts +2 -2
- package/dist/plugins/api/index.d.mts +2 -2
- package/dist/plugins/api/index.d.ts +2 -2
- package/dist/plugins/blog/api/index.d.cts +2 -2
- package/dist/plugins/blog/api/index.d.mts +2 -2
- package/dist/plugins/blog/api/index.d.ts +2 -2
- package/dist/plugins/blog/client/hooks/index.d.cts +2 -2
- package/dist/plugins/blog/client/hooks/index.d.mts +2 -2
- package/dist/plugins/blog/client/hooks/index.d.ts +2 -2
- package/dist/plugins/blog/client/index.d.cts +2 -2
- package/dist/plugins/blog/client/index.d.mts +2 -2
- package/dist/plugins/blog/client/index.d.ts +2 -2
- package/dist/plugins/blog/query-keys.d.cts +2 -2
- package/dist/plugins/blog/query-keys.d.mts +2 -2
- package/dist/plugins/blog/query-keys.d.ts +2 -2
- package/dist/plugins/client/index.d.cts +2 -2
- package/dist/plugins/client/index.d.mts +2 -2
- package/dist/plugins/client/index.d.ts +2 -2
- package/dist/plugins/cms/api/index.cjs +1 -0
- package/dist/plugins/cms/api/index.d.cts +43 -11
- package/dist/plugins/cms/api/index.d.mts +43 -11
- package/dist/plugins/cms/api/index.d.ts +43 -11
- package/dist/plugins/cms/api/index.mjs +1 -1
- package/dist/plugins/cms/client/hooks/index.d.cts +90 -45
- package/dist/plugins/cms/client/hooks/index.d.mts +90 -45
- package/dist/plugins/cms/client/hooks/index.d.ts +90 -45
- package/dist/plugins/cms/client/index.d.cts +2 -1
- package/dist/plugins/cms/client/index.d.mts +2 -1
- package/dist/plugins/cms/client/index.d.ts +2 -1
- package/dist/plugins/cms/query-keys.cjs +69 -13
- package/dist/plugins/cms/query-keys.d.cts +89 -212
- package/dist/plugins/cms/query-keys.d.mts +89 -212
- package/dist/plugins/cms/query-keys.d.ts +89 -212
- package/dist/plugins/cms/query-keys.mjs +70 -14
- package/dist/plugins/kanban/client/index.d.cts +1 -1
- package/dist/plugins/kanban/client/index.d.mts +1 -1
- package/dist/plugins/kanban/client/index.d.ts +1 -1
- package/dist/plugins/route-docs/client/index.d.cts +1 -1
- package/dist/plugins/route-docs/client/index.d.mts +1 -1
- package/dist/plugins/route-docs/client/index.d.ts +1 -1
- package/dist/plugins/ui-builder/client/hooks/index.d.cts +3 -3
- package/dist/plugins/ui-builder/client/hooks/index.d.mts +3 -3
- package/dist/plugins/ui-builder/client/hooks/index.d.ts +3 -3
- package/dist/plugins/ui-builder/client/index.d.cts +3 -3
- package/dist/plugins/ui-builder/client/index.d.mts +3 -3
- package/dist/plugins/ui-builder/client/index.d.ts +3 -3
- package/dist/plugins/ui-builder/query-keys.d.cts +4 -3
- package/dist/plugins/ui-builder/query-keys.d.mts +4 -3
- package/dist/plugins/ui-builder/query-keys.d.ts +4 -3
- package/dist/shared/{stack.DMj68qY0.d.mts → stack.B2jlVVhD.d.mts} +5 -5
- package/dist/shared/{stack.Cvnj99cs.d.ts → stack.BB9tubJJ.d.ts} +9 -3
- package/dist/shared/{stack.Bt3WG2yb.d.cts → stack.BWduIMKG.d.cts} +35 -35
- package/dist/shared/stack.Bw09Lg2z.d.ts +1420 -0
- package/dist/shared/{stack.CkEz7vSt.d.mts → stack.C2Pvl-RS.d.mts} +9 -3
- package/dist/shared/{stack.C2l2wd_X.d.ts → stack.Ch9-ppmQ.d.ts} +35 -35
- package/dist/shared/{stack.Ht8mhDj5.d.cts → stack.D17yFglU.d.cts} +5 -5
- package/dist/shared/{stack.CiD115Ov.d.mts → stack.D6fPBfYe.d.mts} +35 -35
- package/dist/shared/stack.DFGj0gb7.d.mts +1420 -0
- package/dist/shared/{stack.pi0FxoEa.d.ts → stack.Dcfg4GNN.d.ts} +5 -5
- package/dist/shared/{stack.3rxARhgS.d.cts → stack.DrB3L7Ih.d.cts} +52 -3
- package/dist/shared/{stack.3rxARhgS.d.mts → stack.DrB3L7Ih.d.mts} +52 -3
- package/dist/shared/{stack.3rxARhgS.d.ts → stack.DrB3L7Ih.d.ts} +52 -3
- package/dist/shared/stack.NNrBKBkM.d.cts +1420 -0
- package/dist/shared/{stack.mRRyZBUg.d.cts → stack.Rb87lHqK.d.cts} +9 -3
- package/package.json +1 -1
- package/src/__tests__/cms-query-keys.test.ts +57 -0
- package/src/plugins/api/index.ts +1 -0
- package/src/plugins/api/operation.ts +16 -3
- package/src/plugins/cms/__tests__/authorization.test.ts +652 -187
- package/src/plugins/cms/__tests__/client-runtime.browser.test.tsx +655 -0
- package/src/plugins/cms/__tests__/content-read.typecheck.ts +351 -0
- package/src/plugins/cms/__tests__/getters.test.ts +286 -0
- package/src/plugins/cms/api/getters.ts +270 -12
- package/src/plugins/cms/api/index.ts +10 -0
- package/src/plugins/cms/api/operations.ts +163 -75
- package/src/plugins/cms/api/plugin.ts +50 -12
- package/src/plugins/cms/api/query-key-defs.ts +29 -2
- package/src/plugins/cms/client/hooks/cms-hooks.tsx +400 -91
- package/src/plugins/cms/client/index.ts +9 -0
- package/src/plugins/cms/query-keys.ts +171 -16
- package/src/plugins/cms/schemas.ts +30 -0
- package/src/plugins/cms/types.ts +49 -2
- package/src/plugins/media/__tests__/identity-partition.test.tsx +26 -16
- package/dist/shared/stack.CAmVUwjV.d.cts +0 -764
- package/dist/shared/stack.CQK02ujt.d.ts +0 -764
- package/dist/shared/stack.D9x1fR5a.d.mts +0 -764
- package/dist/shared/{stack.CKc_Bais.d.cts → stack.Csi-4Mgz.d.cts} +7 -7
- package/dist/shared/{stack.CKc_Bais.d.mts → stack.Csi-4Mgz.d.mts} +7 -7
- package/dist/shared/{stack.CKc_Bais.d.ts → stack.Csi-4Mgz.d.ts} +7 -7
|
@@ -50,6 +50,8 @@ interface Operation<TInputSchema extends z.ZodTypeAny = z.ZodTypeAny, TPermissio
|
|
|
50
50
|
readonly permission: TPermission;
|
|
51
51
|
readonly access: OperationAccess;
|
|
52
52
|
readonly resultMode: TPassthroughResult extends true ? "passthrough" : "immutable";
|
|
53
|
+
/** Type-only result marker, preserved when an operation has a specialized call signature. */
|
|
54
|
+
readonly "~result"?: TResult;
|
|
53
55
|
}
|
|
54
56
|
/** Any plugin operation, for generic stack composition. */
|
|
55
57
|
type AnyOperation = Operation<z.ZodTypeAny, AnyPermissionDescriptor, any, false> | Operation<z.ZodTypeAny, AnyPermissionDescriptor, any, true>;
|
|
@@ -59,9 +61,13 @@ type OperationInput<TOperation extends AnyOperation> = TOperation extends Operat
|
|
|
59
61
|
type OperationTransportResult<TOperation extends AnyOperation> = TOperation extends Operation<any, any, infer TResult, infer TPassthroughResult> ? TPassthroughResult extends true ? TResult : DeepReadonly<TResult> : never;
|
|
60
62
|
/** Infer the permission request enforced by an operation. */
|
|
61
63
|
type OperationPermissionRequest<TOperation extends AnyOperation> = TOperation extends Operation<any, infer TPermission, any, any> ? PermissionRequestFor<TPermission> : never;
|
|
64
|
+
/** Input-dependent callable typing; runtime execution still uses the operation definition. */
|
|
65
|
+
interface OperationCallSignature<TCall extends (...args: any[]) => Promise<unknown>> {
|
|
66
|
+
readonly "~call": TCall;
|
|
67
|
+
}
|
|
62
68
|
/** Convert operation definitions into their bound callable application API. */
|
|
63
69
|
type OperationApi<TOperations extends OperationRecord> = {
|
|
64
|
-
[TKey in keyof TOperations]: (input: OperationInput<TOperations[TKey]>) => Promise<OperationTransportResult<TOperations[TKey]>>;
|
|
70
|
+
[TKey in keyof TOperations]: TOperations[TKey] extends OperationCallSignature<infer TCall> ? TCall : (input: OperationInput<TOperations[TKey]>) => Promise<OperationTransportResult<TOperations[TKey]>>;
|
|
65
71
|
};
|
|
66
72
|
/** One request-bound operation plus its endpoint-binding helper. */
|
|
67
73
|
type RouteOperation<TOperation extends AnyOperation> = {
|
|
@@ -609,5 +615,5 @@ type SitemapEntry = {
|
|
|
609
615
|
};
|
|
610
616
|
type Sitemap = Array<SitemapEntry>;
|
|
611
617
|
|
|
612
|
-
export { OperationHttpError as
|
|
613
|
-
export type { AnyOperation as A, BackendPlugin as B, ClientPlugin as C, DeepReadonly as D,
|
|
618
|
+
export { OperationHttpError as j, defineOperation as o, definePassthroughOperation as p };
|
|
619
|
+
export type { PluginOperations as $, AnyOperation as A, BackendPlugin as B, ClientPlugin as C, DeepReadonly as D, ClientLocationOverride as E, ClientPluginEndpointOverride as F, ClientPluginEndpointOverrides as G, ClientProviderApi as H, InfrastructureRouteDeclaration as I, ClientProviderPluginRuntime as J, ClientProviderProjection as K, ClientStack as L, ClientStackContext as M, ResolvedClientApi as N, OperationRecord as O, PluginOverrides as P, ResolvedClientStackConfig as Q, RequiredClientPluginOverrides as R, StackContext as S, SitemapEntry as T, InferredPluginOverrides as U, RegisteredClientPlugins as V, PrefixedPluginRoutes as W, BackendStackConfig as X, CompatibleStackAuth as Y, BackendStack as Z, PluginRaw as _, ComposedEndpointInventoryEntry as a, InfrastructureRouteInventory as b, Operation as c, OperationAccess as d, OperationApi as e, OperationCallSignature as f, OperationContext as g, OperationData as h, OperationErrorContext as i, OperationPermissionRequest as k, OperationResultMode as l, RouteOperation as m, RouteOperationApi as n, ClientPluginDefinition as q, ClientPluginRegistration as r, ResolvedClientPluginRuntime as s, Sitemap as t, PluginRoutes as u, ClientStackConfig as v, ResolvedClientStack as w, ClientApiConfig as x, ClientApiEndpointOverride as y, ClientLocation as z };
|
|
@@ -2,7 +2,7 @@ import * as _btst_stack_plugins_client from '@btst/stack/plugins/client';
|
|
|
2
2
|
import { createApiClient } from '@btst/stack/plugins/client';
|
|
3
3
|
import * as zod from 'zod';
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
-
import { c as createPostSchema, u as updatePostSchema } from './stack.
|
|
5
|
+
import { c as createPostSchema, u as updatePostSchema } from './stack.Csi-4Mgz.js';
|
|
6
6
|
import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from './stack.Dsatjh0B.js';
|
|
7
7
|
import * as _btst_stack_plugins_api from '@btst/stack/plugins/api';
|
|
8
8
|
import { DeepReadonly, OperationContext, OperationErrorContext } from '@btst/stack/plugins/api';
|
|
@@ -89,12 +89,6 @@ declare const NextPreviousPostsQuerySchema: z.ZodObject<{
|
|
|
89
89
|
date: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
90
90
|
}, z.core.$strip>;
|
|
91
91
|
declare const CreatePostOperationInputSchema: z.ZodObject<{
|
|
92
|
-
slug: z.ZodOptional<z.ZodString>;
|
|
93
|
-
title: z.ZodString;
|
|
94
|
-
content: z.ZodString;
|
|
95
|
-
excerpt: z.ZodString;
|
|
96
|
-
image: z.ZodOptional<z.ZodString>;
|
|
97
|
-
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
98
92
|
tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
99
93
|
name: z.ZodString;
|
|
100
94
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -102,6 +96,12 @@ declare const CreatePostOperationInputSchema: z.ZodObject<{
|
|
|
102
96
|
name: z.ZodString;
|
|
103
97
|
slug: z.ZodString;
|
|
104
98
|
}, z.core.$strip>]>>>>;
|
|
99
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
100
|
+
title: z.ZodString;
|
|
101
|
+
content: z.ZodString;
|
|
102
|
+
excerpt: z.ZodString;
|
|
103
|
+
image: z.ZodOptional<z.ZodString>;
|
|
104
|
+
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
105
105
|
publishedAt: z.ZodOptional<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>;
|
|
106
106
|
createdAt: z.ZodOptional<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>;
|
|
107
107
|
updatedAt: z.ZodOptional<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>;
|
|
@@ -109,12 +109,6 @@ declare const CreatePostOperationInputSchema: z.ZodObject<{
|
|
|
109
109
|
declare const UpdatePostOperationInputSchema: z.ZodObject<{
|
|
110
110
|
id: z.ZodString;
|
|
111
111
|
data: z.ZodObject<{
|
|
112
|
-
slug: z.ZodString;
|
|
113
|
-
title: z.ZodString;
|
|
114
|
-
content: z.ZodString;
|
|
115
|
-
excerpt: z.ZodString;
|
|
116
|
-
image: z.ZodOptional<z.ZodString>;
|
|
117
|
-
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
118
112
|
tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
119
113
|
name: z.ZodString;
|
|
120
114
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -122,6 +116,12 @@ declare const UpdatePostOperationInputSchema: z.ZodObject<{
|
|
|
122
116
|
name: z.ZodString;
|
|
123
117
|
slug: z.ZodString;
|
|
124
118
|
}, z.core.$strip>]>>>>;
|
|
119
|
+
slug: z.ZodString;
|
|
120
|
+
title: z.ZodString;
|
|
121
|
+
content: z.ZodString;
|
|
122
|
+
excerpt: z.ZodString;
|
|
123
|
+
image: z.ZodOptional<z.ZodString>;
|
|
124
|
+
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
125
125
|
publishedAt: z.ZodOptional<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>;
|
|
126
126
|
createdAt: z.ZodOptional<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>;
|
|
127
127
|
updatedAt: z.ZodOptional<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>;
|
|
@@ -386,9 +386,6 @@ declare const blogBackendPlugin: (options?: BlogBackendOptions) => _btst_stack_p
|
|
|
386
386
|
title: string;
|
|
387
387
|
content: string;
|
|
388
388
|
excerpt: string;
|
|
389
|
-
slug?: string | undefined;
|
|
390
|
-
image?: string | undefined;
|
|
391
|
-
published?: boolean | undefined;
|
|
392
389
|
tags?: ({
|
|
393
390
|
name: string;
|
|
394
391
|
} | {
|
|
@@ -396,6 +393,9 @@ declare const blogBackendPlugin: (options?: BlogBackendOptions) => _btst_stack_p
|
|
|
396
393
|
name: string;
|
|
397
394
|
slug: string;
|
|
398
395
|
})[] | undefined;
|
|
396
|
+
slug?: string | undefined;
|
|
397
|
+
image?: string | undefined;
|
|
398
|
+
published?: boolean | undefined;
|
|
399
399
|
publishedAt?: unknown;
|
|
400
400
|
createdAt?: unknown;
|
|
401
401
|
updatedAt?: unknown;
|
|
@@ -403,9 +403,6 @@ declare const blogBackendPlugin: (options?: BlogBackendOptions) => _btst_stack_p
|
|
|
403
403
|
title: string;
|
|
404
404
|
content: string;
|
|
405
405
|
excerpt: string;
|
|
406
|
-
slug?: string | undefined;
|
|
407
|
-
image?: string | undefined;
|
|
408
|
-
published?: boolean | undefined;
|
|
409
406
|
tags?: ({
|
|
410
407
|
name: string;
|
|
411
408
|
} | {
|
|
@@ -413,6 +410,9 @@ declare const blogBackendPlugin: (options?: BlogBackendOptions) => _btst_stack_p
|
|
|
413
410
|
name: string;
|
|
414
411
|
slug: string;
|
|
415
412
|
})[] | undefined;
|
|
413
|
+
slug?: string | undefined;
|
|
414
|
+
image?: string | undefined;
|
|
415
|
+
published?: boolean | undefined;
|
|
416
416
|
publishedAt?: unknown;
|
|
417
417
|
createdAt?: unknown;
|
|
418
418
|
updatedAt?: unknown;
|
|
@@ -448,8 +448,6 @@ declare const blogBackendPlugin: (options?: BlogBackendOptions) => _btst_stack_p
|
|
|
448
448
|
title: string;
|
|
449
449
|
content: string;
|
|
450
450
|
excerpt: string;
|
|
451
|
-
image?: string | undefined;
|
|
452
|
-
published?: boolean | undefined;
|
|
453
451
|
tags?: ({
|
|
454
452
|
name: string;
|
|
455
453
|
} | {
|
|
@@ -457,6 +455,8 @@ declare const blogBackendPlugin: (options?: BlogBackendOptions) => _btst_stack_p
|
|
|
457
455
|
name: string;
|
|
458
456
|
slug: string;
|
|
459
457
|
})[] | undefined;
|
|
458
|
+
image?: string | undefined;
|
|
459
|
+
published?: boolean | undefined;
|
|
460
460
|
publishedAt?: unknown;
|
|
461
461
|
createdAt?: unknown;
|
|
462
462
|
updatedAt?: unknown;
|
|
@@ -465,8 +465,6 @@ declare const blogBackendPlugin: (options?: BlogBackendOptions) => _btst_stack_p
|
|
|
465
465
|
title: string;
|
|
466
466
|
content: string;
|
|
467
467
|
excerpt: string;
|
|
468
|
-
image?: string | undefined;
|
|
469
|
-
published?: boolean | undefined;
|
|
470
468
|
tags?: ({
|
|
471
469
|
name: string;
|
|
472
470
|
} | {
|
|
@@ -474,6 +472,8 @@ declare const blogBackendPlugin: (options?: BlogBackendOptions) => _btst_stack_p
|
|
|
474
472
|
name: string;
|
|
475
473
|
slug: string;
|
|
476
474
|
})[] | undefined;
|
|
475
|
+
image?: string | undefined;
|
|
476
|
+
published?: boolean | undefined;
|
|
477
477
|
publishedAt?: unknown;
|
|
478
478
|
createdAt?: unknown;
|
|
479
479
|
updatedAt?: unknown;
|
|
@@ -627,12 +627,6 @@ declare const blogBackendPlugin: (options?: BlogBackendOptions) => _btst_stack_p
|
|
|
627
627
|
total: number;
|
|
628
628
|
}, false>;
|
|
629
629
|
readonly createPost: _btst_stack_plugins_api.Operation<zod.ZodObject<{
|
|
630
|
-
slug: zod.ZodOptional<zod.ZodString>;
|
|
631
|
-
title: zod.ZodString;
|
|
632
|
-
content: zod.ZodString;
|
|
633
|
-
excerpt: zod.ZodString;
|
|
634
|
-
image: zod.ZodOptional<zod.ZodString>;
|
|
635
|
-
published: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
|
|
636
630
|
tags: zod.ZodDefault<zod.ZodOptional<zod.ZodArray<zod.ZodUnion<readonly [zod.ZodObject<{
|
|
637
631
|
name: zod.ZodString;
|
|
638
632
|
}, zod_v4_core.$strip>, zod.ZodObject<{
|
|
@@ -640,6 +634,12 @@ declare const blogBackendPlugin: (options?: BlogBackendOptions) => _btst_stack_p
|
|
|
640
634
|
name: zod.ZodString;
|
|
641
635
|
slug: zod.ZodString;
|
|
642
636
|
}, zod_v4_core.$strip>]>>>>;
|
|
637
|
+
slug: zod.ZodOptional<zod.ZodString>;
|
|
638
|
+
title: zod.ZodString;
|
|
639
|
+
content: zod.ZodString;
|
|
640
|
+
excerpt: zod.ZodString;
|
|
641
|
+
image: zod.ZodOptional<zod.ZodString>;
|
|
642
|
+
published: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
|
|
643
643
|
publishedAt: zod.ZodOptional<zod.ZodPipe<zod.ZodCoercedDate<unknown>, zod.ZodTransform<string, Date>>>;
|
|
644
644
|
createdAt: zod.ZodOptional<zod.ZodPipe<zod.ZodCoercedDate<unknown>, zod.ZodTransform<string, Date>>>;
|
|
645
645
|
updatedAt: zod.ZodOptional<zod.ZodPipe<zod.ZodCoercedDate<unknown>, zod.ZodTransform<string, Date>>>;
|
|
@@ -673,12 +673,6 @@ declare const blogBackendPlugin: (options?: BlogBackendOptions) => _btst_stack_p
|
|
|
673
673
|
readonly updatePost: _btst_stack_plugins_api.Operation<zod.ZodObject<{
|
|
674
674
|
id: zod.ZodString;
|
|
675
675
|
data: zod.ZodObject<{
|
|
676
|
-
slug: zod.ZodString;
|
|
677
|
-
title: zod.ZodString;
|
|
678
|
-
content: zod.ZodString;
|
|
679
|
-
excerpt: zod.ZodString;
|
|
680
|
-
image: zod.ZodOptional<zod.ZodString>;
|
|
681
|
-
published: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
|
|
682
676
|
tags: zod.ZodDefault<zod.ZodOptional<zod.ZodArray<zod.ZodUnion<readonly [zod.ZodObject<{
|
|
683
677
|
name: zod.ZodString;
|
|
684
678
|
}, zod_v4_core.$strip>, zod.ZodObject<{
|
|
@@ -686,6 +680,12 @@ declare const blogBackendPlugin: (options?: BlogBackendOptions) => _btst_stack_p
|
|
|
686
680
|
name: zod.ZodString;
|
|
687
681
|
slug: zod.ZodString;
|
|
688
682
|
}, zod_v4_core.$strip>]>>>>;
|
|
683
|
+
slug: zod.ZodString;
|
|
684
|
+
title: zod.ZodString;
|
|
685
|
+
content: zod.ZodString;
|
|
686
|
+
excerpt: zod.ZodString;
|
|
687
|
+
image: zod.ZodOptional<zod.ZodString>;
|
|
688
|
+
published: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
|
|
689
689
|
publishedAt: zod.ZodOptional<zod.ZodPipe<zod.ZodCoercedDate<unknown>, zod.ZodTransform<string, Date>>>;
|
|
690
690
|
createdAt: zod.ZodOptional<zod.ZodPipe<zod.ZodCoercedDate<unknown>, zod.ZodTransform<string, Date>>>;
|
|
691
691
|
updatedAt: zod.ZodOptional<zod.ZodPipe<zod.ZodCoercedDate<unknown>, zod.ZodTransform<string, Date>>>;
|
|
@@ -2,7 +2,7 @@ import * as _tanstack_react_query from '@tanstack/react-query';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { ResourceFormConfig, ResourceFormResult } from '@btst/stack/plugins/client/hooks';
|
|
4
4
|
import { S as SerializedPost, a as SerializedTag } from './stack.Dsatjh0B.cjs';
|
|
5
|
-
import { c as createPostSchema, u as updatePostSchema } from './stack.
|
|
5
|
+
import { c as createPostSchema, u as updatePostSchema } from './stack.Csi-4Mgz.cjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Options for the usePosts hook
|
|
@@ -136,10 +136,6 @@ declare function useSuspenseTags(): {
|
|
|
136
136
|
declare function usePostForm<TValues>(config: ResourceFormConfig<TValues, SerializedPost | null, SerializedPost | null>): ResourceFormResult<TValues, SerializedPost | null, SerializedPost | null>;
|
|
137
137
|
/** Create a new post */
|
|
138
138
|
declare function useCreatePost(): _tanstack_react_query.UseMutationResult<SerializedPost | null, Error, {
|
|
139
|
-
title: string;
|
|
140
|
-
content: string;
|
|
141
|
-
excerpt: string;
|
|
142
|
-
published: boolean;
|
|
143
139
|
tags: ({
|
|
144
140
|
name: string;
|
|
145
141
|
} | {
|
|
@@ -147,6 +143,10 @@ declare function useCreatePost(): _tanstack_react_query.UseMutationResult<Serial
|
|
|
147
143
|
name: string;
|
|
148
144
|
slug: string;
|
|
149
145
|
})[];
|
|
146
|
+
title: string;
|
|
147
|
+
content: string;
|
|
148
|
+
excerpt: string;
|
|
149
|
+
published: boolean;
|
|
150
150
|
slug?: string | undefined;
|
|
151
151
|
publishedAt?: Date | undefined;
|
|
152
152
|
createdAt?: Date | undefined;
|
|
@@ -2,7 +2,7 @@ import * as _btst_stack_plugins_client from '@btst/stack/plugins/client';
|
|
|
2
2
|
import { createApiClient } from '@btst/stack/plugins/client';
|
|
3
3
|
import * as zod from 'zod';
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
-
import { c as createPostSchema, u as updatePostSchema } from './stack.
|
|
5
|
+
import { c as createPostSchema, u as updatePostSchema } from './stack.Csi-4Mgz.mjs';
|
|
6
6
|
import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from './stack.Dsatjh0B.mjs';
|
|
7
7
|
import * as _btst_stack_plugins_api from '@btst/stack/plugins/api';
|
|
8
8
|
import { DeepReadonly, OperationContext, OperationErrorContext } from '@btst/stack/plugins/api';
|
|
@@ -89,12 +89,6 @@ declare const NextPreviousPostsQuerySchema: z.ZodObject<{
|
|
|
89
89
|
date: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
90
90
|
}, z.core.$strip>;
|
|
91
91
|
declare const CreatePostOperationInputSchema: z.ZodObject<{
|
|
92
|
-
slug: z.ZodOptional<z.ZodString>;
|
|
93
|
-
title: z.ZodString;
|
|
94
|
-
content: z.ZodString;
|
|
95
|
-
excerpt: z.ZodString;
|
|
96
|
-
image: z.ZodOptional<z.ZodString>;
|
|
97
|
-
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
98
92
|
tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
99
93
|
name: z.ZodString;
|
|
100
94
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -102,6 +96,12 @@ declare const CreatePostOperationInputSchema: z.ZodObject<{
|
|
|
102
96
|
name: z.ZodString;
|
|
103
97
|
slug: z.ZodString;
|
|
104
98
|
}, z.core.$strip>]>>>>;
|
|
99
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
100
|
+
title: z.ZodString;
|
|
101
|
+
content: z.ZodString;
|
|
102
|
+
excerpt: z.ZodString;
|
|
103
|
+
image: z.ZodOptional<z.ZodString>;
|
|
104
|
+
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
105
105
|
publishedAt: z.ZodOptional<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>;
|
|
106
106
|
createdAt: z.ZodOptional<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>;
|
|
107
107
|
updatedAt: z.ZodOptional<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>;
|
|
@@ -109,12 +109,6 @@ declare const CreatePostOperationInputSchema: z.ZodObject<{
|
|
|
109
109
|
declare const UpdatePostOperationInputSchema: z.ZodObject<{
|
|
110
110
|
id: z.ZodString;
|
|
111
111
|
data: z.ZodObject<{
|
|
112
|
-
slug: z.ZodString;
|
|
113
|
-
title: z.ZodString;
|
|
114
|
-
content: z.ZodString;
|
|
115
|
-
excerpt: z.ZodString;
|
|
116
|
-
image: z.ZodOptional<z.ZodString>;
|
|
117
|
-
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
118
112
|
tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
119
113
|
name: z.ZodString;
|
|
120
114
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -122,6 +116,12 @@ declare const UpdatePostOperationInputSchema: z.ZodObject<{
|
|
|
122
116
|
name: z.ZodString;
|
|
123
117
|
slug: z.ZodString;
|
|
124
118
|
}, z.core.$strip>]>>>>;
|
|
119
|
+
slug: z.ZodString;
|
|
120
|
+
title: z.ZodString;
|
|
121
|
+
content: z.ZodString;
|
|
122
|
+
excerpt: z.ZodString;
|
|
123
|
+
image: z.ZodOptional<z.ZodString>;
|
|
124
|
+
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
125
125
|
publishedAt: z.ZodOptional<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>;
|
|
126
126
|
createdAt: z.ZodOptional<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>;
|
|
127
127
|
updatedAt: z.ZodOptional<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>;
|
|
@@ -386,9 +386,6 @@ declare const blogBackendPlugin: (options?: BlogBackendOptions) => _btst_stack_p
|
|
|
386
386
|
title: string;
|
|
387
387
|
content: string;
|
|
388
388
|
excerpt: string;
|
|
389
|
-
slug?: string | undefined;
|
|
390
|
-
image?: string | undefined;
|
|
391
|
-
published?: boolean | undefined;
|
|
392
389
|
tags?: ({
|
|
393
390
|
name: string;
|
|
394
391
|
} | {
|
|
@@ -396,6 +393,9 @@ declare const blogBackendPlugin: (options?: BlogBackendOptions) => _btst_stack_p
|
|
|
396
393
|
name: string;
|
|
397
394
|
slug: string;
|
|
398
395
|
})[] | undefined;
|
|
396
|
+
slug?: string | undefined;
|
|
397
|
+
image?: string | undefined;
|
|
398
|
+
published?: boolean | undefined;
|
|
399
399
|
publishedAt?: unknown;
|
|
400
400
|
createdAt?: unknown;
|
|
401
401
|
updatedAt?: unknown;
|
|
@@ -403,9 +403,6 @@ declare const blogBackendPlugin: (options?: BlogBackendOptions) => _btst_stack_p
|
|
|
403
403
|
title: string;
|
|
404
404
|
content: string;
|
|
405
405
|
excerpt: string;
|
|
406
|
-
slug?: string | undefined;
|
|
407
|
-
image?: string | undefined;
|
|
408
|
-
published?: boolean | undefined;
|
|
409
406
|
tags?: ({
|
|
410
407
|
name: string;
|
|
411
408
|
} | {
|
|
@@ -413,6 +410,9 @@ declare const blogBackendPlugin: (options?: BlogBackendOptions) => _btst_stack_p
|
|
|
413
410
|
name: string;
|
|
414
411
|
slug: string;
|
|
415
412
|
})[] | undefined;
|
|
413
|
+
slug?: string | undefined;
|
|
414
|
+
image?: string | undefined;
|
|
415
|
+
published?: boolean | undefined;
|
|
416
416
|
publishedAt?: unknown;
|
|
417
417
|
createdAt?: unknown;
|
|
418
418
|
updatedAt?: unknown;
|
|
@@ -448,8 +448,6 @@ declare const blogBackendPlugin: (options?: BlogBackendOptions) => _btst_stack_p
|
|
|
448
448
|
title: string;
|
|
449
449
|
content: string;
|
|
450
450
|
excerpt: string;
|
|
451
|
-
image?: string | undefined;
|
|
452
|
-
published?: boolean | undefined;
|
|
453
451
|
tags?: ({
|
|
454
452
|
name: string;
|
|
455
453
|
} | {
|
|
@@ -457,6 +455,8 @@ declare const blogBackendPlugin: (options?: BlogBackendOptions) => _btst_stack_p
|
|
|
457
455
|
name: string;
|
|
458
456
|
slug: string;
|
|
459
457
|
})[] | undefined;
|
|
458
|
+
image?: string | undefined;
|
|
459
|
+
published?: boolean | undefined;
|
|
460
460
|
publishedAt?: unknown;
|
|
461
461
|
createdAt?: unknown;
|
|
462
462
|
updatedAt?: unknown;
|
|
@@ -465,8 +465,6 @@ declare const blogBackendPlugin: (options?: BlogBackendOptions) => _btst_stack_p
|
|
|
465
465
|
title: string;
|
|
466
466
|
content: string;
|
|
467
467
|
excerpt: string;
|
|
468
|
-
image?: string | undefined;
|
|
469
|
-
published?: boolean | undefined;
|
|
470
468
|
tags?: ({
|
|
471
469
|
name: string;
|
|
472
470
|
} | {
|
|
@@ -474,6 +472,8 @@ declare const blogBackendPlugin: (options?: BlogBackendOptions) => _btst_stack_p
|
|
|
474
472
|
name: string;
|
|
475
473
|
slug: string;
|
|
476
474
|
})[] | undefined;
|
|
475
|
+
image?: string | undefined;
|
|
476
|
+
published?: boolean | undefined;
|
|
477
477
|
publishedAt?: unknown;
|
|
478
478
|
createdAt?: unknown;
|
|
479
479
|
updatedAt?: unknown;
|
|
@@ -627,12 +627,6 @@ declare const blogBackendPlugin: (options?: BlogBackendOptions) => _btst_stack_p
|
|
|
627
627
|
total: number;
|
|
628
628
|
}, false>;
|
|
629
629
|
readonly createPost: _btst_stack_plugins_api.Operation<zod.ZodObject<{
|
|
630
|
-
slug: zod.ZodOptional<zod.ZodString>;
|
|
631
|
-
title: zod.ZodString;
|
|
632
|
-
content: zod.ZodString;
|
|
633
|
-
excerpt: zod.ZodString;
|
|
634
|
-
image: zod.ZodOptional<zod.ZodString>;
|
|
635
|
-
published: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
|
|
636
630
|
tags: zod.ZodDefault<zod.ZodOptional<zod.ZodArray<zod.ZodUnion<readonly [zod.ZodObject<{
|
|
637
631
|
name: zod.ZodString;
|
|
638
632
|
}, zod_v4_core.$strip>, zod.ZodObject<{
|
|
@@ -640,6 +634,12 @@ declare const blogBackendPlugin: (options?: BlogBackendOptions) => _btst_stack_p
|
|
|
640
634
|
name: zod.ZodString;
|
|
641
635
|
slug: zod.ZodString;
|
|
642
636
|
}, zod_v4_core.$strip>]>>>>;
|
|
637
|
+
slug: zod.ZodOptional<zod.ZodString>;
|
|
638
|
+
title: zod.ZodString;
|
|
639
|
+
content: zod.ZodString;
|
|
640
|
+
excerpt: zod.ZodString;
|
|
641
|
+
image: zod.ZodOptional<zod.ZodString>;
|
|
642
|
+
published: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
|
|
643
643
|
publishedAt: zod.ZodOptional<zod.ZodPipe<zod.ZodCoercedDate<unknown>, zod.ZodTransform<string, Date>>>;
|
|
644
644
|
createdAt: zod.ZodOptional<zod.ZodPipe<zod.ZodCoercedDate<unknown>, zod.ZodTransform<string, Date>>>;
|
|
645
645
|
updatedAt: zod.ZodOptional<zod.ZodPipe<zod.ZodCoercedDate<unknown>, zod.ZodTransform<string, Date>>>;
|
|
@@ -673,12 +673,6 @@ declare const blogBackendPlugin: (options?: BlogBackendOptions) => _btst_stack_p
|
|
|
673
673
|
readonly updatePost: _btst_stack_plugins_api.Operation<zod.ZodObject<{
|
|
674
674
|
id: zod.ZodString;
|
|
675
675
|
data: zod.ZodObject<{
|
|
676
|
-
slug: zod.ZodString;
|
|
677
|
-
title: zod.ZodString;
|
|
678
|
-
content: zod.ZodString;
|
|
679
|
-
excerpt: zod.ZodString;
|
|
680
|
-
image: zod.ZodOptional<zod.ZodString>;
|
|
681
|
-
published: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
|
|
682
676
|
tags: zod.ZodDefault<zod.ZodOptional<zod.ZodArray<zod.ZodUnion<readonly [zod.ZodObject<{
|
|
683
677
|
name: zod.ZodString;
|
|
684
678
|
}, zod_v4_core.$strip>, zod.ZodObject<{
|
|
@@ -686,6 +680,12 @@ declare const blogBackendPlugin: (options?: BlogBackendOptions) => _btst_stack_p
|
|
|
686
680
|
name: zod.ZodString;
|
|
687
681
|
slug: zod.ZodString;
|
|
688
682
|
}, zod_v4_core.$strip>]>>>>;
|
|
683
|
+
slug: zod.ZodString;
|
|
684
|
+
title: zod.ZodString;
|
|
685
|
+
content: zod.ZodString;
|
|
686
|
+
excerpt: zod.ZodString;
|
|
687
|
+
image: zod.ZodOptional<zod.ZodString>;
|
|
688
|
+
published: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
|
|
689
689
|
publishedAt: zod.ZodOptional<zod.ZodPipe<zod.ZodCoercedDate<unknown>, zod.ZodTransform<string, Date>>>;
|
|
690
690
|
createdAt: zod.ZodOptional<zod.ZodPipe<zod.ZodCoercedDate<unknown>, zod.ZodTransform<string, Date>>>;
|
|
691
691
|
updatedAt: zod.ZodOptional<zod.ZodPipe<zod.ZodCoercedDate<unknown>, zod.ZodTransform<string, Date>>>;
|