@btst/stack 4.1.1 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/packages/stack/src/plugins/ai-chat/api/operations.cjs +15 -9
- package/dist/packages/stack/src/plugins/ai-chat/api/operations.mjs +16 -10
- package/dist/packages/stack/src/plugins/ai-chat/api/page-tools.cjs +28 -0
- package/dist/packages/stack/src/plugins/ai-chat/api/page-tools.mjs +29 -2
- package/dist/packages/stack/src/plugins/ai-chat/api/plugin.cjs +5 -0
- package/dist/packages/stack/src/plugins/ai-chat/api/plugin.mjs +5 -0
- package/dist/packages/stack/src/plugins/ai-chat/client/components/chat-interface.cjs +91 -8
- package/dist/packages/stack/src/plugins/ai-chat/client/components/chat-interface.mjs +91 -8
- package/dist/packages/stack/src/plugins/ai-chat/client/components/chat-layout.cjs +76 -3
- package/dist/packages/stack/src/plugins/ai-chat/client/components/chat-layout.mjs +80 -7
- package/dist/packages/stack/src/plugins/ai-chat/client/components/tool-call-display.cjs +17 -0
- package/dist/packages/stack/src/plugins/ai-chat/client/components/tool-call-display.mjs +18 -1
- package/dist/packages/stack/src/plugins/ai-chat/client/context/chat-analytics.cjs +42 -0
- package/dist/packages/stack/src/plugins/ai-chat/client/context/chat-analytics.mjs +39 -0
- package/dist/packages/stack/src/plugins/ai-chat/client/plugin.cjs +2 -1
- package/dist/packages/stack/src/plugins/ai-chat/client/plugin.mjs +2 -1
- package/dist/plugins/ai-chat/api/index.d.cts +2 -2
- package/dist/plugins/ai-chat/api/index.d.mts +2 -2
- package/dist/plugins/ai-chat/api/index.d.ts +2 -2
- package/dist/plugins/ai-chat/client/components/index.d.cts +2 -1
- package/dist/plugins/ai-chat/client/components/index.d.mts +2 -1
- package/dist/plugins/ai-chat/client/components/index.d.ts +2 -1
- package/dist/plugins/ai-chat/client/context/page-ai-context.cjs +4 -0
- package/dist/plugins/ai-chat/client/context/page-ai-context.d.cts +6 -2
- package/dist/plugins/ai-chat/client/context/page-ai-context.d.mts +6 -2
- package/dist/plugins/ai-chat/client/context/page-ai-context.d.ts +6 -2
- package/dist/plugins/ai-chat/client/context/page-ai-context.mjs +4 -1
- package/dist/plugins/ai-chat/client/hooks/index.d.cts +2 -2
- package/dist/plugins/ai-chat/client/hooks/index.d.mts +2 -2
- package/dist/plugins/ai-chat/client/hooks/index.d.ts +2 -2
- package/dist/plugins/ai-chat/client/index.d.cts +7 -3
- package/dist/plugins/ai-chat/client/index.d.mts +7 -3
- package/dist/plugins/ai-chat/client/index.d.ts +7 -3
- package/dist/plugins/ai-chat/query-keys.d.cts +1 -1
- package/dist/plugins/ai-chat/query-keys.d.mts +1 -1
- package/dist/plugins/ai-chat/query-keys.d.ts +1 -1
- package/dist/plugins/blog/api/index.d.cts +1 -1
- package/dist/plugins/blog/api/index.d.mts +1 -1
- package/dist/plugins/blog/api/index.d.ts +1 -1
- package/dist/plugins/blog/query-keys.d.cts +1 -1
- package/dist/plugins/blog/query-keys.d.mts +1 -1
- package/dist/plugins/blog/query-keys.d.ts +1 -1
- package/dist/plugins/cms/api/index.d.cts +1 -1
- package/dist/plugins/cms/api/index.d.mts +1 -1
- package/dist/plugins/cms/api/index.d.ts +1 -1
- package/dist/plugins/cms/query-keys.d.cts +1 -1
- package/dist/plugins/cms/query-keys.d.mts +1 -1
- package/dist/plugins/cms/query-keys.d.ts +1 -1
- package/dist/plugins/form-builder/api/index.d.cts +1 -1
- package/dist/plugins/form-builder/api/index.d.mts +1 -1
- package/dist/plugins/form-builder/api/index.d.ts +1 -1
- package/dist/plugins/form-builder/client/hooks/index.d.cts +1 -1
- package/dist/plugins/form-builder/client/hooks/index.d.mts +1 -1
- package/dist/plugins/form-builder/client/hooks/index.d.ts +1 -1
- package/dist/plugins/form-builder/query-keys.d.cts +1 -1
- package/dist/plugins/form-builder/query-keys.d.mts +1 -1
- package/dist/plugins/form-builder/query-keys.d.ts +1 -1
- package/dist/plugins/ui-builder/client/hooks/index.d.cts +1 -1
- package/dist/plugins/ui-builder/client/hooks/index.d.mts +1 -1
- package/dist/plugins/ui-builder/client/hooks/index.d.ts +1 -1
- package/dist/plugins/ui-builder/client/index.d.cts +1 -1
- package/dist/plugins/ui-builder/client/index.d.mts +1 -1
- package/dist/plugins/ui-builder/client/index.d.ts +1 -1
- package/dist/plugins/ui-builder/query-keys.d.cts +1 -1
- package/dist/plugins/ui-builder/query-keys.d.mts +1 -1
- package/dist/plugins/ui-builder/query-keys.d.ts +1 -1
- package/dist/shared/{stack.B5yPgHsp.d.mts → stack.B7Mj74BQ.d.mts} +18 -2
- package/dist/shared/{stack.rVF0f509.d.mts → stack.C-eQN_Jt.d.ts} +60 -4
- package/dist/shared/{stack.rVF0f509.d.ts → stack.C5FZr-jJ.d.mts} +60 -4
- package/dist/shared/{stack.3Sr6qRtT.d.ts → stack.DBH1Bjko.d.ts} +18 -2
- package/dist/shared/{stack.C4oVW2qK.d.cts → stack.Dgt3MCtW.d.cts} +18 -2
- package/dist/shared/{stack.rVF0f509.d.cts → stack.xAiy2VtO.d.cts} +60 -4
- package/package.json +1 -1
- package/src/plugins/ai-chat/__tests__/authorization.test.ts +106 -1
- package/src/plugins/ai-chat/__tests__/classnames-overrides.test.tsx +4 -1
- package/src/plugins/ai-chat/__tests__/page-content.test.ts +177 -0
- package/src/plugins/ai-chat/__tests__/page-widget.test.tsx +573 -0
- package/src/plugins/ai-chat/api/operations.ts +29 -13
- package/src/plugins/ai-chat/api/page-tools.ts +56 -2
- package/src/plugins/ai-chat/api/plugin.ts +13 -0
- package/src/plugins/ai-chat/client/analytics.ts +35 -0
- package/src/plugins/ai-chat/client/components/chat-interface.tsx +113 -10
- package/src/plugins/ai-chat/client/components/chat-layout.tsx +118 -7
- package/src/plugins/ai-chat/client/components/tool-call-display.tsx +29 -1
- package/src/plugins/ai-chat/client/context/chat-analytics.tsx +46 -0
- package/src/plugins/ai-chat/client/context/page-ai-context.tsx +9 -1
- package/src/plugins/ai-chat/client/index.ts +2 -0
- package/src/plugins/ai-chat/client/localization/index.ts +8 -0
- package/src/plugins/ai-chat/client/overrides.ts +5 -0
- package/src/plugins/ai-chat/client/plugin.tsx +3 -0
- package/dist/shared/{stack.lsbdKRj7.d.mts → stack.B8PG21zX.d.mts} +16 -16
- package/dist/shared/{stack.BuxUQqL8.d.ts → stack.CGmh-Lpe.d.ts} +12 -12
- package/dist/shared/{stack.BggTHKlo.d.mts → stack.CTneIW0u.d.mts} +2 -2
- package/dist/shared/{stack.CtrnoQgH.d.cts → stack.Ce6V7eDj.d.cts} +2 -2
- package/dist/shared/{stack.BMlTZnZp.d.ts → stack.CyalJ0j6.d.ts} +16 -16
- package/dist/shared/{stack.lPKwd_v0.d.ts → stack.D5b9l24t.d.ts} +2 -2
- package/dist/shared/{stack.BV0uNV4f.d.cts → stack.D6Pg-ufX.d.cts} +16 -16
- package/dist/shared/{stack.Egr3RWhA.d.mts → stack.Doy2_wgl.d.mts} +12 -12
- package/dist/shared/{stack.CX83YNuS.d.cts → stack.zch70Loj.d.cts} +12 -12
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { createContext, useCallback, useContext, useRef } from "react";
|
|
4
|
+
import { usePluginOverrides, useStack } from "@btst/stack/context";
|
|
5
|
+
import { usePageAIContext } from "./page-ai-context";
|
|
6
|
+
import { resolveAiChatMode, type AiChatPluginOverrides } from "../overrides";
|
|
7
|
+
import type { AiChatAnalyticsEvent } from "../analytics";
|
|
8
|
+
|
|
9
|
+
export const ChatAnalyticsPageKey = createContext<string | undefined>(
|
|
10
|
+
undefined,
|
|
11
|
+
);
|
|
12
|
+
type EventDetails<T> = T extends unknown
|
|
13
|
+
? Omit<T, "pageKey" | "routeName" | "mode">
|
|
14
|
+
: never;
|
|
15
|
+
|
|
16
|
+
export function useChatAnalytics() {
|
|
17
|
+
const { onAnalyticsEvent } = usePluginOverrides<
|
|
18
|
+
AiChatPluginOverrides,
|
|
19
|
+
Partial<AiChatPluginOverrides>
|
|
20
|
+
>("aiChat", {});
|
|
21
|
+
const { plugins } = useStack();
|
|
22
|
+
const pageKey = useContext(ChatAnalyticsPageKey);
|
|
23
|
+
const routeName = usePageAIContext()?.routeName;
|
|
24
|
+
const latest = useRef({
|
|
25
|
+
onAnalyticsEvent,
|
|
26
|
+
pageKey,
|
|
27
|
+
routeName,
|
|
28
|
+
mode: resolveAiChatMode(plugins?.aiChat?.config),
|
|
29
|
+
});
|
|
30
|
+
latest.current = {
|
|
31
|
+
onAnalyticsEvent,
|
|
32
|
+
pageKey,
|
|
33
|
+
routeName,
|
|
34
|
+
mode: resolveAiChatMode(plugins?.aiChat?.config),
|
|
35
|
+
};
|
|
36
|
+
return useCallback((event: EventDetails<AiChatAnalyticsEvent>) => {
|
|
37
|
+
const { onAnalyticsEvent: callback, ...context } = latest.current;
|
|
38
|
+
try {
|
|
39
|
+
void Promise.resolve(callback?.({ ...context, ...event })).catch(
|
|
40
|
+
() => {},
|
|
41
|
+
);
|
|
42
|
+
} catch {
|
|
43
|
+
// Optional instrumentation must never interrupt chat interactions.
|
|
44
|
+
}
|
|
45
|
+
}, []);
|
|
46
|
+
}
|
|
@@ -33,7 +33,8 @@ export interface PageAIContextConfig {
|
|
|
33
33
|
/**
|
|
34
34
|
* Human-readable description of the current page and its content.
|
|
35
35
|
* Injected into the AI system prompt so it understands what the user is looking at.
|
|
36
|
-
*
|
|
36
|
+
* Limited to 16,000 characters server-side. For longer content, pass a page
|
|
37
|
+
* path and configure the backend pageContent resolver.
|
|
37
38
|
*/
|
|
38
39
|
pageDescription: string;
|
|
39
40
|
|
|
@@ -74,6 +75,11 @@ const PageAIAPIContext = createContext<PageAIAPIContextValue | null>(null);
|
|
|
74
75
|
*/
|
|
75
76
|
const PageAIVersionContext = createContext<number>(0);
|
|
76
77
|
|
|
78
|
+
/** Instance-local context used by ChatLayout; undefined inherits page registrations. */
|
|
79
|
+
export const PageAIContextScope = createContext<
|
|
80
|
+
PageAIContextConfig | null | undefined
|
|
81
|
+
>(undefined);
|
|
82
|
+
|
|
77
83
|
/**
|
|
78
84
|
* Provider that enables route-aware AI context across the app.
|
|
79
85
|
*
|
|
@@ -235,6 +241,8 @@ export function usePageAIContext(): PageAIContextConfig | null {
|
|
|
235
241
|
// registers or unregisters context, then read the latest active config.
|
|
236
242
|
useContext(PageAIVersionContext);
|
|
237
243
|
const ctx = useContext(PageAIAPIContext);
|
|
244
|
+
const scoped = useContext(PageAIContextScope);
|
|
245
|
+
if (scoped !== undefined) return scoped;
|
|
238
246
|
if (!ctx) return null;
|
|
239
247
|
return ctx.getActive();
|
|
240
248
|
}
|
|
@@ -87,6 +87,10 @@ export interface AiChatLocalization {
|
|
|
87
87
|
A11Y_CLEAR_CHAT: string;
|
|
88
88
|
A11Y_CLOSE_CHAT: string;
|
|
89
89
|
A11Y_OPEN_CHAT: string;
|
|
90
|
+
A11Y_DISMISS_CHAT_TIP: string;
|
|
91
|
+
PAGE_CONTENT_READING: string;
|
|
92
|
+
PAGE_CONTENT_READ: string;
|
|
93
|
+
PAGE_CONTENT_ERROR: string;
|
|
90
94
|
A11Y_OPEN_MENU: string;
|
|
91
95
|
A11Y_CLOSE_SIDEBAR: string;
|
|
92
96
|
A11Y_OPEN_SIDEBAR: string;
|
|
@@ -191,6 +195,10 @@ export const AI_CHAT_LOCALIZATION: AiChatLocalization = {
|
|
|
191
195
|
A11Y_CLEAR_CHAT: "Clear chat",
|
|
192
196
|
A11Y_CLOSE_CHAT: "Close chat",
|
|
193
197
|
A11Y_OPEN_CHAT: "Open chat",
|
|
198
|
+
A11Y_DISMISS_CHAT_TIP: "Dismiss chat tip",
|
|
199
|
+
PAGE_CONTENT_READING: "Reading page content…",
|
|
200
|
+
PAGE_CONTENT_READ: "Read page content",
|
|
201
|
+
PAGE_CONTENT_ERROR: "Unable to read this page.",
|
|
194
202
|
A11Y_OPEN_MENU: "Open menu",
|
|
195
203
|
A11Y_CLOSE_SIDEBAR: "Close sidebar",
|
|
196
204
|
A11Y_OPEN_SIDEBAR: "Open sidebar",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AiChatAnalyticsEvent } from "./analytics";
|
|
1
2
|
import type { ComponentType } from "react";
|
|
2
3
|
import { normalizePath } from "@btst/stack/client";
|
|
3
4
|
import type { AiChatLocalization } from "./localization";
|
|
@@ -13,6 +14,8 @@ export type AiChatMode = "authenticated" | "public";
|
|
|
13
14
|
export interface AiChatProviderConfig {
|
|
14
15
|
/** Conversation behavior selected by `aiChatClientPlugin()`. */
|
|
15
16
|
readonly mode: AiChatMode;
|
|
17
|
+
/** Whether built-in page reader permission checks and status UI are enabled. */
|
|
18
|
+
readonly pageContent?: boolean;
|
|
16
19
|
}
|
|
17
20
|
|
|
18
21
|
/** Resolve the registered AI Chat client factory mode. */
|
|
@@ -143,6 +146,8 @@ export interface RouteContext {
|
|
|
143
146
|
* plugin-specific components and behavior.
|
|
144
147
|
*/
|
|
145
148
|
export interface AiChatPluginOverrides {
|
|
149
|
+
/** Optional content-free usage telemetry. Exceptions and rejections are isolated from chat. */
|
|
150
|
+
onAnalyticsEvent?: (event: AiChatAnalyticsEvent) => void | Promise<void>;
|
|
146
151
|
/**
|
|
147
152
|
* Function used to upload a file and return its URL.
|
|
148
153
|
* Called for images, PDFs, text files, and other supported file types.
|
|
@@ -67,6 +67,8 @@ export interface AiChatClientConfig {
|
|
|
67
67
|
* @default 'authenticated'
|
|
68
68
|
*/
|
|
69
69
|
mode?: AiChatMode;
|
|
70
|
+
/** Enable built-in readPage permission checks and compact status alongside backend pageContent. */
|
|
71
|
+
pageContent?: boolean;
|
|
70
72
|
|
|
71
73
|
/** Optional SEO configuration for meta tags */
|
|
72
74
|
seo?: {
|
|
@@ -560,6 +562,7 @@ export const aiChatClientPlugin = (config: AiChatClientConfig = {}) =>
|
|
|
560
562
|
id: "aiChat",
|
|
561
563
|
providerConfig: {
|
|
562
564
|
mode: config.mode ?? "authenticated",
|
|
565
|
+
...(config.pageContent ? { pageContent: true } : {}),
|
|
563
566
|
} satisfies AiChatProviderConfig,
|
|
564
567
|
resolve: (runtime) => resolveAiChatClientPlugin({ ...config, runtime }),
|
|
565
568
|
});
|
|
@@ -95,8 +95,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
95
95
|
readonly id: string;
|
|
96
96
|
readonly slug: string;
|
|
97
97
|
readonly contentTypeId: string;
|
|
98
|
-
readonly data: string;
|
|
99
98
|
readonly authorId?: string | undefined;
|
|
99
|
+
readonly data: string;
|
|
100
100
|
}[];
|
|
101
101
|
readonly total: number;
|
|
102
102
|
}>;
|
|
@@ -128,8 +128,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
128
128
|
readonly id: string;
|
|
129
129
|
readonly slug: string;
|
|
130
130
|
readonly contentTypeId: string;
|
|
131
|
-
readonly data: string;
|
|
132
131
|
readonly authorId?: string | undefined;
|
|
132
|
+
readonly data: string;
|
|
133
133
|
}>;
|
|
134
134
|
readonly createContentItem: better_call.StrictEndpoint<"/content/:typeSlug", {
|
|
135
135
|
params: z.ZodObject<{
|
|
@@ -165,8 +165,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
165
165
|
readonly id: string;
|
|
166
166
|
readonly slug: string;
|
|
167
167
|
readonly contentTypeId: string;
|
|
168
|
-
readonly data: string;
|
|
169
168
|
readonly authorId?: string | undefined;
|
|
169
|
+
readonly data: string;
|
|
170
170
|
}>;
|
|
171
171
|
readonly updateContentItem: better_call.StrictEndpoint<"/content/:typeSlug/:id", {
|
|
172
172
|
params: z.ZodObject<{
|
|
@@ -203,8 +203,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
203
203
|
readonly id: string;
|
|
204
204
|
readonly slug: string;
|
|
205
205
|
readonly contentTypeId: string;
|
|
206
|
-
readonly data: string;
|
|
207
206
|
readonly authorId?: string | undefined;
|
|
207
|
+
readonly data: string;
|
|
208
208
|
}>;
|
|
209
209
|
readonly deleteContentItem: better_call.StrictEndpoint<"/content/:typeSlug/:id", {
|
|
210
210
|
params: z.ZodObject<{
|
|
@@ -248,8 +248,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
248
248
|
readonly id: string;
|
|
249
249
|
readonly slug: string;
|
|
250
250
|
readonly contentTypeId: string;
|
|
251
|
-
readonly data: string;
|
|
252
251
|
readonly authorId?: string | undefined;
|
|
252
|
+
readonly data: string;
|
|
253
253
|
}[];
|
|
254
254
|
};
|
|
255
255
|
readonly contentType?: {
|
|
@@ -271,8 +271,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
271
271
|
readonly id: string;
|
|
272
272
|
readonly slug: string;
|
|
273
273
|
readonly contentTypeId: string;
|
|
274
|
-
readonly data: string;
|
|
275
274
|
readonly authorId?: string | undefined;
|
|
275
|
+
readonly data: string;
|
|
276
276
|
}>;
|
|
277
277
|
readonly listContentByRelation: better_call.StrictEndpoint<"/content/:typeSlug/by-relation", {
|
|
278
278
|
params: z.ZodObject<{
|
|
@@ -314,8 +314,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
314
314
|
readonly id: string;
|
|
315
315
|
readonly slug: string;
|
|
316
316
|
readonly contentTypeId: string;
|
|
317
|
-
readonly data: string;
|
|
318
317
|
readonly authorId?: string | undefined;
|
|
318
|
+
readonly data: string;
|
|
319
319
|
}[];
|
|
320
320
|
readonly total: number;
|
|
321
321
|
readonly limit: number;
|
|
@@ -383,8 +383,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
383
383
|
readonly id: string;
|
|
384
384
|
readonly slug: string;
|
|
385
385
|
readonly contentTypeId: string;
|
|
386
|
-
readonly data: string;
|
|
387
386
|
readonly authorId?: string | undefined;
|
|
387
|
+
readonly data: string;
|
|
388
388
|
}[];
|
|
389
389
|
readonly total: number;
|
|
390
390
|
readonly limit: number;
|
|
@@ -459,8 +459,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
459
459
|
id: string;
|
|
460
460
|
slug: string;
|
|
461
461
|
contentTypeId: string;
|
|
462
|
-
data: string;
|
|
463
462
|
authorId?: string | undefined;
|
|
463
|
+
data: string;
|
|
464
464
|
}[];
|
|
465
465
|
total: number;
|
|
466
466
|
}, false>;
|
|
@@ -493,8 +493,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
493
493
|
id: string;
|
|
494
494
|
slug: string;
|
|
495
495
|
contentTypeId: string;
|
|
496
|
-
data: string;
|
|
497
496
|
authorId?: string | undefined;
|
|
497
|
+
data: string;
|
|
498
498
|
}, false>;
|
|
499
499
|
readonly createContentItem: _btst_stack_plugins_api.Operation<z.ZodObject<{
|
|
500
500
|
typeSlug: z.ZodString;
|
|
@@ -522,8 +522,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
522
522
|
id: string;
|
|
523
523
|
slug: string;
|
|
524
524
|
contentTypeId: string;
|
|
525
|
-
data: string;
|
|
526
525
|
authorId?: string | undefined;
|
|
526
|
+
data: string;
|
|
527
527
|
}, false>;
|
|
528
528
|
readonly updateContentItem: _btst_stack_plugins_api.Operation<z.ZodObject<{
|
|
529
529
|
typeSlug: z.ZodString;
|
|
@@ -554,8 +554,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
554
554
|
id: string;
|
|
555
555
|
slug: string;
|
|
556
556
|
contentTypeId: string;
|
|
557
|
-
data: string;
|
|
558
557
|
authorId?: string | undefined;
|
|
558
|
+
data: string;
|
|
559
559
|
}, false>;
|
|
560
560
|
readonly deleteContentItem: _btst_stack_plugins_api.Operation<z.ZodObject<{
|
|
561
561
|
typeSlug: z.ZodString;
|
|
@@ -598,8 +598,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
598
598
|
id: string;
|
|
599
599
|
slug: string;
|
|
600
600
|
contentTypeId: string;
|
|
601
|
-
data: string;
|
|
602
601
|
authorId?: string | undefined;
|
|
602
|
+
data: string;
|
|
603
603
|
}[];
|
|
604
604
|
};
|
|
605
605
|
contentType?: {
|
|
@@ -619,8 +619,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
619
619
|
id: string;
|
|
620
620
|
slug: string;
|
|
621
621
|
contentTypeId: string;
|
|
622
|
-
data: string;
|
|
623
622
|
authorId?: string | undefined;
|
|
623
|
+
data: string;
|
|
624
624
|
}, false>;
|
|
625
625
|
readonly listContentByRelation: _btst_stack_plugins_api.Operation<z.ZodObject<{
|
|
626
626
|
typeSlug: z.ZodString;
|
|
@@ -657,8 +657,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
657
657
|
id: string;
|
|
658
658
|
slug: string;
|
|
659
659
|
contentTypeId: string;
|
|
660
|
-
data: string;
|
|
661
660
|
authorId?: string | undefined;
|
|
661
|
+
data: string;
|
|
662
662
|
}[];
|
|
663
663
|
total: number;
|
|
664
664
|
limit: number;
|
|
@@ -715,8 +715,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
715
715
|
id: string;
|
|
716
716
|
slug: string;
|
|
717
717
|
contentTypeId: string;
|
|
718
|
-
data: string;
|
|
719
718
|
authorId?: string | undefined;
|
|
719
|
+
data: string;
|
|
720
720
|
}[];
|
|
721
721
|
total: number;
|
|
722
722
|
limit: number;
|
|
@@ -127,11 +127,11 @@ declare const formBuilderBackendPlugin: (config?: FormBuilderBackendConfig) => _
|
|
|
127
127
|
readonly status: Form["status"];
|
|
128
128
|
readonly createdAt: string;
|
|
129
129
|
readonly updatedAt: string;
|
|
130
|
-
readonly schema: string;
|
|
131
130
|
readonly id: string;
|
|
131
|
+
readonly name: string;
|
|
132
|
+
readonly schema: string;
|
|
132
133
|
readonly description?: string | undefined;
|
|
133
134
|
readonly slug: string;
|
|
134
|
-
readonly name: string;
|
|
135
135
|
readonly successMessage?: string | undefined;
|
|
136
136
|
readonly redirectUrl?: string | undefined;
|
|
137
137
|
readonly createdBy?: string | undefined;
|
|
@@ -151,11 +151,11 @@ declare const formBuilderBackendPlugin: (config?: FormBuilderBackendConfig) => _
|
|
|
151
151
|
readonly status: Form["status"];
|
|
152
152
|
readonly createdAt: string;
|
|
153
153
|
readonly updatedAt: string;
|
|
154
|
-
readonly schema: string;
|
|
155
154
|
readonly id: string;
|
|
155
|
+
readonly name: string;
|
|
156
|
+
readonly schema: string;
|
|
156
157
|
readonly description?: string | undefined;
|
|
157
158
|
readonly slug: string;
|
|
158
|
-
readonly name: string;
|
|
159
159
|
readonly successMessage?: string | undefined;
|
|
160
160
|
readonly redirectUrl?: string | undefined;
|
|
161
161
|
readonly createdBy?: string | undefined;
|
|
@@ -171,11 +171,11 @@ declare const formBuilderBackendPlugin: (config?: FormBuilderBackendConfig) => _
|
|
|
171
171
|
readonly status: Form["status"];
|
|
172
172
|
readonly createdAt: string;
|
|
173
173
|
readonly updatedAt: string;
|
|
174
|
-
readonly schema: string;
|
|
175
174
|
readonly id: string;
|
|
175
|
+
readonly name: string;
|
|
176
|
+
readonly schema: string;
|
|
176
177
|
readonly description?: string | undefined;
|
|
177
178
|
readonly slug: string;
|
|
178
|
-
readonly name: string;
|
|
179
179
|
readonly successMessage?: string | undefined;
|
|
180
180
|
readonly redirectUrl?: string | undefined;
|
|
181
181
|
readonly createdBy?: string | undefined;
|
|
@@ -191,11 +191,11 @@ declare const formBuilderBackendPlugin: (config?: FormBuilderBackendConfig) => _
|
|
|
191
191
|
readonly status: Form["status"];
|
|
192
192
|
readonly createdAt: string;
|
|
193
193
|
readonly updatedAt: string;
|
|
194
|
-
readonly schema: string;
|
|
195
194
|
readonly id: string;
|
|
195
|
+
readonly name: string;
|
|
196
|
+
readonly schema: string;
|
|
196
197
|
readonly description?: string | undefined;
|
|
197
198
|
readonly slug: string;
|
|
198
|
-
readonly name: string;
|
|
199
199
|
readonly successMessage?: string | undefined;
|
|
200
200
|
readonly redirectUrl?: string | undefined;
|
|
201
201
|
readonly createdBy?: string | undefined;
|
|
@@ -225,11 +225,11 @@ declare const formBuilderBackendPlugin: (config?: FormBuilderBackendConfig) => _
|
|
|
225
225
|
readonly status: Form["status"];
|
|
226
226
|
readonly createdAt: string;
|
|
227
227
|
readonly updatedAt: string;
|
|
228
|
-
readonly schema: string;
|
|
229
228
|
readonly id: string;
|
|
229
|
+
readonly name: string;
|
|
230
|
+
readonly schema: string;
|
|
230
231
|
readonly description?: string | undefined;
|
|
231
232
|
readonly slug: string;
|
|
232
|
-
readonly name: string;
|
|
233
233
|
readonly successMessage?: string | undefined;
|
|
234
234
|
readonly redirectUrl?: string | undefined;
|
|
235
235
|
readonly createdBy?: string | undefined;
|
|
@@ -259,11 +259,11 @@ declare const formBuilderBackendPlugin: (config?: FormBuilderBackendConfig) => _
|
|
|
259
259
|
readonly status: Form["status"];
|
|
260
260
|
readonly createdAt: string;
|
|
261
261
|
readonly updatedAt: string;
|
|
262
|
-
readonly schema: string;
|
|
263
262
|
readonly id: string;
|
|
263
|
+
readonly name: string;
|
|
264
|
+
readonly schema: string;
|
|
264
265
|
readonly description?: string | undefined;
|
|
265
266
|
readonly slug: string;
|
|
266
|
-
readonly name: string;
|
|
267
267
|
readonly successMessage?: string | undefined;
|
|
268
268
|
readonly redirectUrl?: string | undefined;
|
|
269
269
|
readonly createdBy?: string | undefined;
|
|
@@ -900,8 +900,8 @@ declare const blogResources: {
|
|
|
900
900
|
method: "POST";
|
|
901
901
|
input: (vars: PostCreateInput) => {
|
|
902
902
|
body: {
|
|
903
|
-
published: boolean;
|
|
904
903
|
title: string;
|
|
904
|
+
published: boolean;
|
|
905
905
|
content: string;
|
|
906
906
|
excerpt: string;
|
|
907
907
|
tags: ({
|
|
@@ -1072,8 +1072,8 @@ declare function createBlogQueryKeys(client: ReturnType<typeof createApiClient<B
|
|
|
1072
1072
|
method: "POST";
|
|
1073
1073
|
input: (vars: PostCreateInput) => {
|
|
1074
1074
|
body: {
|
|
1075
|
-
published: boolean;
|
|
1076
1075
|
title: string;
|
|
1076
|
+
published: boolean;
|
|
1077
1077
|
content: string;
|
|
1078
1078
|
excerpt: string;
|
|
1079
1079
|
tags: ({
|
|
@@ -900,8 +900,8 @@ declare const blogResources: {
|
|
|
900
900
|
method: "POST";
|
|
901
901
|
input: (vars: PostCreateInput) => {
|
|
902
902
|
body: {
|
|
903
|
-
published: boolean;
|
|
904
903
|
title: string;
|
|
904
|
+
published: boolean;
|
|
905
905
|
content: string;
|
|
906
906
|
excerpt: string;
|
|
907
907
|
tags: ({
|
|
@@ -1072,8 +1072,8 @@ declare function createBlogQueryKeys(client: ReturnType<typeof createApiClient<B
|
|
|
1072
1072
|
method: "POST";
|
|
1073
1073
|
input: (vars: PostCreateInput) => {
|
|
1074
1074
|
body: {
|
|
1075
|
-
published: boolean;
|
|
1076
1075
|
title: string;
|
|
1076
|
+
published: boolean;
|
|
1077
1077
|
content: string;
|
|
1078
1078
|
excerpt: string;
|
|
1079
1079
|
tags: ({
|
|
@@ -95,8 +95,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
95
95
|
readonly id: string;
|
|
96
96
|
readonly slug: string;
|
|
97
97
|
readonly contentTypeId: string;
|
|
98
|
-
readonly data: string;
|
|
99
98
|
readonly authorId?: string | undefined;
|
|
99
|
+
readonly data: string;
|
|
100
100
|
}[];
|
|
101
101
|
readonly total: number;
|
|
102
102
|
}>;
|
|
@@ -128,8 +128,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
128
128
|
readonly id: string;
|
|
129
129
|
readonly slug: string;
|
|
130
130
|
readonly contentTypeId: string;
|
|
131
|
-
readonly data: string;
|
|
132
131
|
readonly authorId?: string | undefined;
|
|
132
|
+
readonly data: string;
|
|
133
133
|
}>;
|
|
134
134
|
readonly createContentItem: better_call.StrictEndpoint<"/content/:typeSlug", {
|
|
135
135
|
params: z.ZodObject<{
|
|
@@ -165,8 +165,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
165
165
|
readonly id: string;
|
|
166
166
|
readonly slug: string;
|
|
167
167
|
readonly contentTypeId: string;
|
|
168
|
-
readonly data: string;
|
|
169
168
|
readonly authorId?: string | undefined;
|
|
169
|
+
readonly data: string;
|
|
170
170
|
}>;
|
|
171
171
|
readonly updateContentItem: better_call.StrictEndpoint<"/content/:typeSlug/:id", {
|
|
172
172
|
params: z.ZodObject<{
|
|
@@ -203,8 +203,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
203
203
|
readonly id: string;
|
|
204
204
|
readonly slug: string;
|
|
205
205
|
readonly contentTypeId: string;
|
|
206
|
-
readonly data: string;
|
|
207
206
|
readonly authorId?: string | undefined;
|
|
207
|
+
readonly data: string;
|
|
208
208
|
}>;
|
|
209
209
|
readonly deleteContentItem: better_call.StrictEndpoint<"/content/:typeSlug/:id", {
|
|
210
210
|
params: z.ZodObject<{
|
|
@@ -248,8 +248,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
248
248
|
readonly id: string;
|
|
249
249
|
readonly slug: string;
|
|
250
250
|
readonly contentTypeId: string;
|
|
251
|
-
readonly data: string;
|
|
252
251
|
readonly authorId?: string | undefined;
|
|
252
|
+
readonly data: string;
|
|
253
253
|
}[];
|
|
254
254
|
};
|
|
255
255
|
readonly contentType?: {
|
|
@@ -271,8 +271,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
271
271
|
readonly id: string;
|
|
272
272
|
readonly slug: string;
|
|
273
273
|
readonly contentTypeId: string;
|
|
274
|
-
readonly data: string;
|
|
275
274
|
readonly authorId?: string | undefined;
|
|
275
|
+
readonly data: string;
|
|
276
276
|
}>;
|
|
277
277
|
readonly listContentByRelation: better_call.StrictEndpoint<"/content/:typeSlug/by-relation", {
|
|
278
278
|
params: z.ZodObject<{
|
|
@@ -314,8 +314,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
314
314
|
readonly id: string;
|
|
315
315
|
readonly slug: string;
|
|
316
316
|
readonly contentTypeId: string;
|
|
317
|
-
readonly data: string;
|
|
318
317
|
readonly authorId?: string | undefined;
|
|
318
|
+
readonly data: string;
|
|
319
319
|
}[];
|
|
320
320
|
readonly total: number;
|
|
321
321
|
readonly limit: number;
|
|
@@ -383,8 +383,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
383
383
|
readonly id: string;
|
|
384
384
|
readonly slug: string;
|
|
385
385
|
readonly contentTypeId: string;
|
|
386
|
-
readonly data: string;
|
|
387
386
|
readonly authorId?: string | undefined;
|
|
387
|
+
readonly data: string;
|
|
388
388
|
}[];
|
|
389
389
|
readonly total: number;
|
|
390
390
|
readonly limit: number;
|
|
@@ -459,8 +459,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
459
459
|
id: string;
|
|
460
460
|
slug: string;
|
|
461
461
|
contentTypeId: string;
|
|
462
|
-
data: string;
|
|
463
462
|
authorId?: string | undefined;
|
|
463
|
+
data: string;
|
|
464
464
|
}[];
|
|
465
465
|
total: number;
|
|
466
466
|
}, false>;
|
|
@@ -493,8 +493,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
493
493
|
id: string;
|
|
494
494
|
slug: string;
|
|
495
495
|
contentTypeId: string;
|
|
496
|
-
data: string;
|
|
497
496
|
authorId?: string | undefined;
|
|
497
|
+
data: string;
|
|
498
498
|
}, false>;
|
|
499
499
|
readonly createContentItem: _btst_stack_plugins_api.Operation<z.ZodObject<{
|
|
500
500
|
typeSlug: z.ZodString;
|
|
@@ -522,8 +522,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
522
522
|
id: string;
|
|
523
523
|
slug: string;
|
|
524
524
|
contentTypeId: string;
|
|
525
|
-
data: string;
|
|
526
525
|
authorId?: string | undefined;
|
|
526
|
+
data: string;
|
|
527
527
|
}, false>;
|
|
528
528
|
readonly updateContentItem: _btst_stack_plugins_api.Operation<z.ZodObject<{
|
|
529
529
|
typeSlug: z.ZodString;
|
|
@@ -554,8 +554,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
554
554
|
id: string;
|
|
555
555
|
slug: string;
|
|
556
556
|
contentTypeId: string;
|
|
557
|
-
data: string;
|
|
558
557
|
authorId?: string | undefined;
|
|
558
|
+
data: string;
|
|
559
559
|
}, false>;
|
|
560
560
|
readonly deleteContentItem: _btst_stack_plugins_api.Operation<z.ZodObject<{
|
|
561
561
|
typeSlug: z.ZodString;
|
|
@@ -598,8 +598,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
598
598
|
id: string;
|
|
599
599
|
slug: string;
|
|
600
600
|
contentTypeId: string;
|
|
601
|
-
data: string;
|
|
602
601
|
authorId?: string | undefined;
|
|
602
|
+
data: string;
|
|
603
603
|
}[];
|
|
604
604
|
};
|
|
605
605
|
contentType?: {
|
|
@@ -619,8 +619,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
619
619
|
id: string;
|
|
620
620
|
slug: string;
|
|
621
621
|
contentTypeId: string;
|
|
622
|
-
data: string;
|
|
623
622
|
authorId?: string | undefined;
|
|
623
|
+
data: string;
|
|
624
624
|
}, false>;
|
|
625
625
|
readonly listContentByRelation: _btst_stack_plugins_api.Operation<z.ZodObject<{
|
|
626
626
|
typeSlug: z.ZodString;
|
|
@@ -657,8 +657,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
657
657
|
id: string;
|
|
658
658
|
slug: string;
|
|
659
659
|
contentTypeId: string;
|
|
660
|
-
data: string;
|
|
661
660
|
authorId?: string | undefined;
|
|
661
|
+
data: string;
|
|
662
662
|
}[];
|
|
663
663
|
total: number;
|
|
664
664
|
limit: number;
|
|
@@ -715,8 +715,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
715
715
|
id: string;
|
|
716
716
|
slug: string;
|
|
717
717
|
contentTypeId: string;
|
|
718
|
-
data: string;
|
|
719
718
|
authorId?: string | undefined;
|
|
719
|
+
data: string;
|
|
720
720
|
}[];
|
|
721
721
|
total: number;
|
|
722
722
|
limit: number;
|
|
@@ -900,8 +900,8 @@ declare const blogResources: {
|
|
|
900
900
|
method: "POST";
|
|
901
901
|
input: (vars: PostCreateInput) => {
|
|
902
902
|
body: {
|
|
903
|
-
published: boolean;
|
|
904
903
|
title: string;
|
|
904
|
+
published: boolean;
|
|
905
905
|
content: string;
|
|
906
906
|
excerpt: string;
|
|
907
907
|
tags: ({
|
|
@@ -1072,8 +1072,8 @@ declare function createBlogQueryKeys(client: ReturnType<typeof createApiClient<B
|
|
|
1072
1072
|
method: "POST";
|
|
1073
1073
|
input: (vars: PostCreateInput) => {
|
|
1074
1074
|
body: {
|
|
1075
|
-
published: boolean;
|
|
1076
1075
|
title: string;
|
|
1076
|
+
published: boolean;
|
|
1077
1077
|
content: string;
|
|
1078
1078
|
excerpt: string;
|
|
1079
1079
|
tags: ({
|