@btst/stack 1.5.2 → 1.6.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.
Files changed (201) hide show
  1. package/dist/node_modules/.pnpm/@dnd-kit_accessibility@3.1.1_react@19.2.0/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.cjs +68 -0
  2. package/dist/node_modules/.pnpm/@dnd-kit_accessibility@3.1.1_react@19.2.0/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.mjs +60 -0
  3. package/dist/node_modules/.pnpm/@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@dnd-kit/core/dist/core.esm.cjs +3937 -0
  4. package/dist/node_modules/.pnpm/@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@dnd-kit/core/dist/core.esm.mjs +3907 -0
  5. package/dist/node_modules/.pnpm/@dnd-kit_modifiers@9.0.0_@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0__react@19.2.0/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.cjs +30 -0
  6. package/dist/node_modules/.pnpm/@dnd-kit_modifiers@9.0.0_@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0__react@19.2.0/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.mjs +28 -0
  7. package/dist/node_modules/.pnpm/@dnd-kit_sortable@10.0.0_@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0__react@19.2.0/node_modules/@dnd-kit/sortable/dist/sortable.esm.cjs +675 -0
  8. package/dist/node_modules/.pnpm/@dnd-kit_sortable@10.0.0_@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0__react@19.2.0/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs +661 -0
  9. package/dist/node_modules/.pnpm/@dnd-kit_utilities@3.2.2_react@19.2.0/node_modules/@dnd-kit/utilities/dist/utilities.esm.cjs +358 -0
  10. package/dist/node_modules/.pnpm/@dnd-kit_utilities@3.2.2_react@19.2.0/node_modules/@dnd-kit/utilities/dist/utilities.esm.mjs +332 -0
  11. package/dist/node_modules/.pnpm/@radix-ui_react-tabs@1.1.13_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@1_865f042350eb43f3338b0fffb33f6246/node_modules/@radix-ui/react-tabs/dist/index.cjs +211 -0
  12. package/dist/node_modules/.pnpm/@radix-ui_react-tabs@1.1.13_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@1_865f042350eb43f3338b0fffb33f6246/node_modules/@radix-ui/react-tabs/dist/index.mjs +188 -0
  13. package/dist/packages/better-stack/src/plugins/cms/api/plugin.cjs +3 -2
  14. package/dist/packages/better-stack/src/plugins/cms/api/plugin.mjs +3 -2
  15. package/dist/packages/better-stack/src/plugins/cms/client/components/forms/content-form.cjs +15 -15
  16. package/dist/packages/better-stack/src/plugins/cms/client/components/forms/content-form.mjs +16 -16
  17. package/dist/packages/better-stack/src/plugins/form-builder/api/plugin.cjs +588 -0
  18. package/dist/packages/better-stack/src/plugins/form-builder/api/plugin.mjs +586 -0
  19. package/dist/packages/better-stack/src/plugins/form-builder/client/components/forms/form-renderer.cjs +131 -0
  20. package/dist/packages/better-stack/src/plugins/form-builder/client/components/forms/form-renderer.mjs +129 -0
  21. package/dist/packages/better-stack/src/plugins/form-builder/client/components/loading/form-builder-skeleton.cjs +32 -0
  22. package/dist/packages/better-stack/src/plugins/form-builder/client/components/loading/form-builder-skeleton.mjs +30 -0
  23. package/dist/packages/better-stack/src/plugins/form-builder/client/components/loading/form-list-skeleton.cjs +21 -0
  24. package/dist/packages/better-stack/src/plugins/form-builder/client/components/loading/form-list-skeleton.mjs +19 -0
  25. package/dist/packages/better-stack/src/plugins/form-builder/client/components/loading/submissions-skeleton.cjs +34 -0
  26. package/dist/packages/better-stack/src/plugins/form-builder/client/components/loading/submissions-skeleton.mjs +32 -0
  27. package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/404-page.cjs +20 -0
  28. package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/404-page.mjs +18 -0
  29. package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-builder-page.cjs +19 -0
  30. package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-builder-page.internal.cjs +186 -0
  31. package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-builder-page.internal.mjs +184 -0
  32. package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-builder-page.mjs +17 -0
  33. package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-list-page.cjs +19 -0
  34. package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-list-page.internal.cjs +165 -0
  35. package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-list-page.internal.mjs +163 -0
  36. package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-list-page.mjs +17 -0
  37. package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/submissions-page.cjs +19 -0
  38. package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/submissions-page.internal.cjs +177 -0
  39. package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/submissions-page.internal.mjs +175 -0
  40. package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/submissions-page.mjs +17 -0
  41. package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/default-error.cjs +17 -0
  42. package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/default-error.mjs +15 -0
  43. package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/empty-state.cjs +16 -0
  44. package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/empty-state.mjs +14 -0
  45. package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/page-wrapper.cjs +27 -0
  46. package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/page-wrapper.mjs +25 -0
  47. package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/pagination.cjs +39 -0
  48. package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/pagination.mjs +37 -0
  49. package/dist/packages/better-stack/src/plugins/form-builder/client/hooks/form-builder-hooks.cjs +551 -0
  50. package/dist/packages/better-stack/src/plugins/form-builder/client/hooks/form-builder-hooks.mjs +537 -0
  51. package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-common.cjs +36 -0
  52. package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-common.mjs +34 -0
  53. package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-editor.cjs +19 -0
  54. package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-editor.mjs +17 -0
  55. package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-list.cjs +21 -0
  56. package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-list.mjs +19 -0
  57. package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-submissions.cjs +19 -0
  58. package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-submissions.mjs +17 -0
  59. package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-toasts.cjs +14 -0
  60. package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-toasts.mjs +12 -0
  61. package/dist/packages/better-stack/src/plugins/form-builder/client/localization/index.cjs +17 -0
  62. package/dist/packages/better-stack/src/plugins/form-builder/client/localization/index.mjs +15 -0
  63. package/dist/packages/better-stack/src/plugins/form-builder/client/plugin.cjs +278 -0
  64. package/dist/packages/better-stack/src/plugins/form-builder/client/plugin.mjs +276 -0
  65. package/dist/packages/better-stack/src/plugins/form-builder/db.cjs +99 -0
  66. package/dist/packages/better-stack/src/plugins/form-builder/db.mjs +97 -0
  67. package/dist/packages/better-stack/src/plugins/form-builder/schemas.cjs +82 -0
  68. package/dist/packages/better-stack/src/plugins/form-builder/schemas.mjs +74 -0
  69. package/dist/packages/better-stack/src/plugins/form-builder/utils.cjs +37 -0
  70. package/dist/packages/better-stack/src/plugins/form-builder/utils.mjs +29 -0
  71. package/dist/packages/ui/src/components/auto-form/index.cjs +2 -12
  72. package/dist/packages/ui/src/components/auto-form/index.mjs +2 -9
  73. package/dist/packages/ui/src/components/auto-form/stepped-auto-form.cjs +377 -0
  74. package/dist/packages/ui/src/components/auto-form/stepped-auto-form.mjs +368 -0
  75. package/dist/packages/ui/src/components/auto-form/utils.cjs +1 -56
  76. package/dist/packages/ui/src/components/auto-form/utils.mjs +2 -56
  77. package/dist/packages/ui/src/components/form-builder/canvas.cjs +111 -0
  78. package/dist/packages/ui/src/components/form-builder/canvas.mjs +109 -0
  79. package/dist/packages/ui/src/components/form-builder/components/index.cjs +570 -0
  80. package/dist/packages/ui/src/components/form-builder/components/index.mjs +553 -0
  81. package/dist/packages/ui/src/components/form-builder/edit-field-dialog.cjs +131 -0
  82. package/dist/packages/ui/src/components/form-builder/edit-field-dialog.mjs +129 -0
  83. package/dist/packages/ui/src/components/form-builder/form-preview.cjs +73 -0
  84. package/dist/packages/ui/src/components/form-builder/form-preview.mjs +71 -0
  85. package/dist/packages/ui/src/components/form-builder/index.cjs +353 -0
  86. package/dist/packages/ui/src/components/form-builder/index.mjs +344 -0
  87. package/dist/packages/ui/src/components/form-builder/nested-field-editor-dialog.cjs +263 -0
  88. package/dist/packages/ui/src/components/form-builder/nested-field-editor-dialog.mjs +261 -0
  89. package/dist/packages/ui/src/components/form-builder/palette.cjs +52 -0
  90. package/dist/packages/ui/src/components/form-builder/palette.mjs +49 -0
  91. package/dist/packages/ui/src/components/form-builder/schema-utils.cjs +120 -0
  92. package/dist/packages/ui/src/components/form-builder/schema-utils.mjs +114 -0
  93. package/dist/packages/ui/src/components/form-builder/sortable-field.cjs +151 -0
  94. package/dist/packages/ui/src/components/form-builder/sortable-field.mjs +148 -0
  95. package/dist/packages/ui/src/components/form-builder/step-tabs.cjs +180 -0
  96. package/dist/packages/ui/src/components/form-builder/step-tabs.mjs +178 -0
  97. package/dist/packages/ui/src/components/form-builder/types.cjs +7 -0
  98. package/dist/packages/ui/src/components/form-builder/types.mjs +5 -0
  99. package/dist/packages/ui/src/components/form-builder/validation-schemas.cjs +67 -0
  100. package/dist/packages/ui/src/components/form-builder/validation-schemas.mjs +56 -0
  101. package/dist/packages/ui/src/components/tabs.cjs +70 -0
  102. package/dist/packages/ui/src/components/tabs.mjs +65 -0
  103. package/dist/packages/ui/src/lib/schema-converter.cjs +130 -0
  104. package/dist/packages/ui/src/lib/schema-converter.mjs +124 -0
  105. package/dist/plugins/blog/api/index.d.cts +1 -1
  106. package/dist/plugins/blog/api/index.d.mts +1 -1
  107. package/dist/plugins/blog/api/index.d.ts +1 -1
  108. package/dist/plugins/blog/client/hooks/index.d.cts +2 -2
  109. package/dist/plugins/blog/client/hooks/index.d.mts +2 -2
  110. package/dist/plugins/blog/client/hooks/index.d.ts +2 -2
  111. package/dist/plugins/blog/client/index.d.cts +1 -1
  112. package/dist/plugins/blog/client/index.d.mts +1 -1
  113. package/dist/plugins/blog/client/index.d.ts +1 -1
  114. package/dist/plugins/blog/query-keys.d.cts +2 -2
  115. package/dist/plugins/blog/query-keys.d.mts +2 -2
  116. package/dist/plugins/blog/query-keys.d.ts +2 -2
  117. package/dist/plugins/cms/client/index.cjs +6 -0
  118. package/dist/plugins/cms/client/index.d.cts +6 -113
  119. package/dist/plugins/cms/client/index.d.mts +6 -113
  120. package/dist/plugins/cms/client/index.d.ts +6 -113
  121. package/dist/plugins/cms/client/index.mjs +1 -0
  122. package/dist/plugins/form-builder/api/index.cjs +7 -0
  123. package/dist/plugins/form-builder/api/index.d.cts +141 -0
  124. package/dist/plugins/form-builder/api/index.d.mts +141 -0
  125. package/dist/plugins/form-builder/api/index.d.ts +141 -0
  126. package/dist/plugins/form-builder/api/index.mjs +1 -0
  127. package/dist/plugins/form-builder/client/components/index.cjs +29 -0
  128. package/dist/plugins/form-builder/client/components/index.d.cts +93 -0
  129. package/dist/plugins/form-builder/client/components/index.d.mts +93 -0
  130. package/dist/plugins/form-builder/client/components/index.d.ts +93 -0
  131. package/dist/plugins/form-builder/client/components/index.mjs +18 -0
  132. package/dist/plugins/form-builder/client/hooks/index.cjs +19 -0
  133. package/dist/plugins/form-builder/client/hooks/index.d.cts +154 -0
  134. package/dist/plugins/form-builder/client/hooks/index.d.mts +154 -0
  135. package/dist/plugins/form-builder/client/hooks/index.d.ts +154 -0
  136. package/dist/plugins/form-builder/client/hooks/index.mjs +1 -0
  137. package/dist/plugins/form-builder/client/index.cjs +13 -0
  138. package/dist/plugins/form-builder/client/index.d.cts +381 -0
  139. package/dist/plugins/form-builder/client/index.d.mts +381 -0
  140. package/dist/plugins/form-builder/client/index.d.ts +381 -0
  141. package/dist/plugins/form-builder/client/index.mjs +2 -0
  142. package/dist/plugins/form-builder/client.css +3 -0
  143. package/dist/plugins/form-builder/query-keys.cjs +143 -0
  144. package/dist/plugins/form-builder/query-keys.d.cts +74 -0
  145. package/dist/plugins/form-builder/query-keys.d.mts +74 -0
  146. package/dist/plugins/form-builder/query-keys.d.ts +74 -0
  147. package/dist/plugins/form-builder/query-keys.mjs +141 -0
  148. package/dist/plugins/form-builder/style.css +19 -0
  149. package/dist/shared/stack.AX5nZ6A3.d.cts +86 -0
  150. package/dist/shared/stack.AX5nZ6A3.d.mts +86 -0
  151. package/dist/shared/stack.AX5nZ6A3.d.ts +86 -0
  152. package/dist/shared/stack.BIh2AXaW.d.cts +123 -0
  153. package/dist/shared/stack.BIh2AXaW.d.mts +123 -0
  154. package/dist/shared/stack.BIh2AXaW.d.ts +123 -0
  155. package/dist/shared/stack.DzH_wcvr.d.cts +195 -0
  156. package/dist/shared/stack.DzH_wcvr.d.mts +195 -0
  157. package/dist/shared/stack.DzH_wcvr.d.ts +195 -0
  158. package/package.json +54 -1
  159. package/src/plugins/cms/api/plugin.ts +9 -4
  160. package/src/plugins/cms/client/components/forms/content-form.tsx +23 -25
  161. package/src/plugins/cms/client/index.ts +11 -0
  162. package/src/plugins/form-builder/api/index.ts +1 -0
  163. package/src/plugins/form-builder/api/plugin.ts +776 -0
  164. package/src/plugins/form-builder/client/components/forms/form-renderer.tsx +253 -0
  165. package/src/plugins/form-builder/client/components/index.tsx +24 -0
  166. package/src/plugins/form-builder/client/components/loading/form-builder-skeleton.tsx +42 -0
  167. package/src/plugins/form-builder/client/components/loading/form-list-skeleton.tsx +25 -0
  168. package/src/plugins/form-builder/client/components/loading/index.tsx +3 -0
  169. package/src/plugins/form-builder/client/components/loading/submissions-skeleton.tsx +40 -0
  170. package/src/plugins/form-builder/client/components/pages/404-page.tsx +28 -0
  171. package/src/plugins/form-builder/client/components/pages/form-builder-page.internal.tsx +253 -0
  172. package/src/plugins/form-builder/client/components/pages/form-builder-page.tsx +26 -0
  173. package/src/plugins/form-builder/client/components/pages/form-list-page.internal.tsx +231 -0
  174. package/src/plugins/form-builder/client/components/pages/form-list-page.tsx +22 -0
  175. package/src/plugins/form-builder/client/components/pages/submissions-page.internal.tsx +268 -0
  176. package/src/plugins/form-builder/client/components/pages/submissions-page.tsx +26 -0
  177. package/src/plugins/form-builder/client/components/shared/default-error.tsx +30 -0
  178. package/src/plugins/form-builder/client/components/shared/empty-state.tsx +26 -0
  179. package/src/plugins/form-builder/client/components/shared/page-wrapper.tsx +32 -0
  180. package/src/plugins/form-builder/client/components/shared/pagination.tsx +52 -0
  181. package/src/plugins/form-builder/client/hooks/form-builder-hooks.tsx +799 -0
  182. package/src/plugins/form-builder/client/hooks/index.tsx +1 -0
  183. package/src/plugins/form-builder/client/index.ts +22 -0
  184. package/src/plugins/form-builder/client/localization/form-builder-common.ts +36 -0
  185. package/src/plugins/form-builder/client/localization/form-builder-editor.ts +18 -0
  186. package/src/plugins/form-builder/client/localization/form-builder-list.ts +17 -0
  187. package/src/plugins/form-builder/client/localization/form-builder-submissions.ts +17 -0
  188. package/src/plugins/form-builder/client/localization/form-builder-toasts.ts +10 -0
  189. package/src/plugins/form-builder/client/localization/index.ts +15 -0
  190. package/src/plugins/form-builder/client/overrides.ts +146 -0
  191. package/src/plugins/form-builder/client/plugin.tsx +488 -0
  192. package/src/plugins/form-builder/client.css +3 -0
  193. package/src/plugins/form-builder/db.ts +99 -0
  194. package/src/plugins/form-builder/query-keys.ts +198 -0
  195. package/src/plugins/form-builder/schemas.ts +122 -0
  196. package/src/plugins/form-builder/style.css +19 -0
  197. package/src/plugins/form-builder/types.ts +317 -0
  198. package/src/plugins/form-builder/utils.ts +63 -0
  199. package/dist/shared/{stack.DLhzx1-D.d.cts → stack.CcI4sYJP.d.cts} +1 -1
  200. package/dist/shared/{stack.DLhzx1-D.d.mts → stack.CcI4sYJP.d.mts} +1 -1
  201. package/dist/shared/{stack.DLhzx1-D.d.ts → stack.CcI4sYJP.d.ts} +1 -1
@@ -1,7 +1,7 @@
1
1
  import * as _btst_stack_plugins_api from '@btst/stack/plugins/api';
2
2
  import * as better_call from 'better-call';
3
3
  import { z } from 'zod';
4
- import { c as createPostSchema, u as updatePostSchema, P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../shared/stack.DLhzx1-D.js';
4
+ import { c as createPostSchema, u as updatePostSchema, P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../shared/stack.CcI4sYJP.js';
5
5
  import * as _tanstack_react_query from '@tanstack/react-query';
6
6
  import { createApiClient } from '@btst/stack/plugins/client';
7
7
 
@@ -144,10 +144,10 @@ declare const blogBackendPlugin: (hooks?: BlogBackendHooks) => _btst_stack_plugi
144
144
  readonly createPost: better_call.StrictEndpoint<"/posts", {
145
145
  method: "POST";
146
146
  body: z.ZodObject<{
147
- title: z.ZodString;
148
147
  slug: z.ZodOptional<z.ZodString>;
149
148
  published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
150
149
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
150
+ title: z.ZodString;
151
151
  content: z.ZodString;
152
152
  excerpt: z.ZodString;
153
153
  image: z.ZodOptional<z.ZodString>;
@@ -1,9 +1,15 @@
1
1
  'use strict';
2
2
 
3
3
  const plugin = require('../../../packages/better-stack/src/plugins/cms/client/plugin.cjs');
4
+ const schemaConverter = require('../../../packages/ui/src/lib/schema-converter.cjs');
4
5
  const fileUpload = require('../../../packages/better-stack/src/plugins/cms/client/components/forms/file-upload.cjs');
5
6
 
6
7
 
7
8
 
8
9
  exports.cmsClientPlugin = plugin.cmsClientPlugin;
10
+ exports.formSchemaToZod = schemaConverter.formSchemaToZod;
11
+ exports.getStepGroupMap = schemaConverter.getStepGroupMap;
12
+ exports.getSteps = schemaConverter.getSteps;
13
+ exports.hasSteps = schemaConverter.hasSteps;
14
+ exports.zodToFormSchema = schemaConverter.zodToFormSchema;
9
15
  exports.CMSFileUpload = fileUpload.CMSFileUpload;
@@ -3,9 +3,11 @@ import * as react from 'react';
3
3
  import { ComponentType } from 'react';
4
4
  import * as _btst_yar from '@btst/yar';
5
5
  import { QueryClient } from '@tanstack/react-query';
6
- import { ControllerRenderProps, FieldValues } from 'react-hook-form';
7
- import * as zod from 'zod';
6
+ import { A as AutoFormInputComponentProps } from '../../../shared/stack.BIh2AXaW.cjs';
7
+ export { b as FormSchemaMetadata, F as FormStep, f as formSchemaToZod, a as getStepGroupMap, g as getSteps, h as hasSteps, z as zodToFormSchema } from '../../../shared/stack.AX5nZ6A3.cjs';
8
8
  import * as react_jsx_runtime from 'react/jsx-runtime';
9
+ import 'react-hook-form';
10
+ import 'zod';
9
11
 
10
12
  /**
11
13
  * Context passed to loader hooks
@@ -238,115 +240,6 @@ declare const CMS_LOCALIZATION: {
238
240
  };
239
241
  type CMSLocalization = typeof CMS_LOCALIZATION;
240
242
 
241
- declare function AutoFormCheckbox({ label, isRequired, field, fieldConfigItem, fieldProps, }: AutoFormInputComponentProps): react_jsx_runtime.JSX.Element;
242
-
243
- declare function AutoFormDate({ label, isRequired, field, fieldConfigItem, fieldProps, zodItem, }: AutoFormInputComponentProps): react_jsx_runtime.JSX.Element;
244
-
245
- declare function AutoFormEnum({ label, isRequired, field, fieldConfigItem, zodItem, fieldProps, }: AutoFormInputComponentProps): react_jsx_runtime.JSX.Element;
246
-
247
- declare function AutoFormInput({ label, isRequired, fieldConfigItem, fieldProps, }: AutoFormInputComponentProps): react_jsx_runtime.JSX.Element;
248
-
249
- declare function AutoFormNumber({ label, isRequired, fieldConfigItem, fieldProps, }: AutoFormInputComponentProps): react_jsx_runtime.JSX.Element;
250
-
251
- declare function AutoFormRadioGroup({ label, isRequired, field, zodItem, fieldProps, fieldConfigItem, }: AutoFormInputComponentProps): react_jsx_runtime.JSX.Element;
252
-
253
- declare function AutoFormSwitch({ label, isRequired, field, fieldConfigItem, fieldProps, }: AutoFormInputComponentProps): react_jsx_runtime.JSX.Element;
254
-
255
- declare function AutoFormTextarea({ label, isRequired, fieldConfigItem, fieldProps, }: AutoFormInputComponentProps): react_jsx_runtime.JSX.Element;
256
-
257
- declare const INPUT_COMPONENTS: {
258
- checkbox: typeof AutoFormCheckbox;
259
- date: typeof AutoFormDate;
260
- select: typeof AutoFormEnum;
261
- radio: typeof AutoFormRadioGroup;
262
- switch: typeof AutoFormSwitch;
263
- textarea: typeof AutoFormTextarea;
264
- number: typeof AutoFormNumber;
265
- fallback: typeof AutoFormInput;
266
- };
267
-
268
- /**
269
- * Common input props shared by all field types.
270
- */
271
- interface BaseInputProps {
272
- /** Whether the field is disabled */
273
- disabled?: boolean;
274
- /** Whether the field is read-only */
275
- readOnly?: boolean;
276
- /** Whether the field is required */
277
- required?: boolean;
278
- /** Whether to show the label (auto-form specific) */
279
- showLabel?: boolean;
280
- }
281
- /**
282
- * Generic input props that accept any field type.
283
- * Use this when the backing type is not known at compile time.
284
- *
285
- * This is the catch-all type used for runtime flexibility.
286
- */
287
- interface SerializableInputProps extends BaseInputProps {
288
- placeholder?: string;
289
- type?: string;
290
- defaultValue?: unknown;
291
- min?: number | string;
292
- max?: number | string;
293
- step?: number | string;
294
- minLength?: number;
295
- maxLength?: number;
296
- pattern?: string;
297
- autoComplete?: string;
298
- /** Allow additional props for extensibility */
299
- [key: string]: unknown;
300
- }
301
-
302
- /**
303
- * Input props for form fields.
304
- *
305
- * This is the runtime type that accepts any input props.
306
- * For type-safe props, use the discriminated types:
307
- * - StringInputProps for text inputs
308
- * - NumberInputProps for number inputs
309
- * - BooleanInputProps for checkboxes/switches
310
- * - DateInputProps for date pickers
311
- * - EnumInputProps for selects/radios
312
- */
313
- type FieldInputProps = SerializableInputProps & Omit<React.InputHTMLAttributes<HTMLInputElement>, keyof SerializableInputProps> & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, keyof SerializableInputProps>;
314
- /**
315
- * Configuration for a single field in AutoForm.
316
- *
317
- * Note: This type is designed to align with form-builder's FormBuilderFieldProps
318
- * so that JSON Schema properties can be easily converted to field configs.
319
- */
320
- type FieldConfigItem = {
321
- /** Description text or React node */
322
- description?: React.ReactNode;
323
- /** Input props passed to the field component */
324
- inputProps?: FieldInputProps;
325
- /** Display label */
326
- label?: string;
327
- /** Field type override - built-in type or custom component */
328
- fieldType?: keyof typeof INPUT_COMPONENTS | React.FC<AutoFormInputComponentProps>;
329
- /** Wrapper component for custom field layout */
330
- renderParent?: (props: {
331
- children: React.ReactNode;
332
- }) => React.ReactElement | null;
333
- /** Display order for field ordering */
334
- order?: number;
335
- };
336
- /**
337
- * A FormInput component can handle a specific Zod type (e.g. "ZodBoolean")
338
- */
339
- type AutoFormInputComponentProps = {
340
- zodInputProps: React.InputHTMLAttributes<HTMLInputElement>;
341
- field: ControllerRenderProps<FieldValues, any>;
342
- fieldConfigItem: FieldConfigItem;
343
- label: string;
344
- isRequired: boolean;
345
- fieldProps: any;
346
- zodItem: zod.ZodType;
347
- className?: string;
348
- };
349
-
350
243
  /**
351
244
  * Context passed to lifecycle hooks
352
245
  */
@@ -513,5 +406,5 @@ interface CMSFileUploadProps extends AutoFormInputComponentProps {
513
406
  */
514
407
  declare function CMSFileUpload({ label, isRequired, fieldConfigItem, fieldProps, field, uploadImage, }: CMSFileUploadProps): react_jsx_runtime.JSX.Element;
515
408
 
516
- export { CMSFileUpload, cmsClientPlugin };
517
- export type { AutoFormInputComponentProps, CMSClientConfig, CMSClientHooks, CMSFileUploadProps, CMSLocalization, CMSPluginOverrides, LoaderContext, RouteContext };
409
+ export { AutoFormInputComponentProps, CMSFileUpload, cmsClientPlugin };
410
+ export type { CMSClientConfig, CMSClientHooks, CMSFileUploadProps, CMSLocalization, CMSPluginOverrides, LoaderContext, RouteContext };
@@ -3,9 +3,11 @@ import * as react from 'react';
3
3
  import { ComponentType } from 'react';
4
4
  import * as _btst_yar from '@btst/yar';
5
5
  import { QueryClient } from '@tanstack/react-query';
6
- import { ControllerRenderProps, FieldValues } from 'react-hook-form';
7
- import * as zod from 'zod';
6
+ import { A as AutoFormInputComponentProps } from '../../../shared/stack.BIh2AXaW.mjs';
7
+ export { b as FormSchemaMetadata, F as FormStep, f as formSchemaToZod, a as getStepGroupMap, g as getSteps, h as hasSteps, z as zodToFormSchema } from '../../../shared/stack.AX5nZ6A3.mjs';
8
8
  import * as react_jsx_runtime from 'react/jsx-runtime';
9
+ import 'react-hook-form';
10
+ import 'zod';
9
11
 
10
12
  /**
11
13
  * Context passed to loader hooks
@@ -238,115 +240,6 @@ declare const CMS_LOCALIZATION: {
238
240
  };
239
241
  type CMSLocalization = typeof CMS_LOCALIZATION;
240
242
 
241
- declare function AutoFormCheckbox({ label, isRequired, field, fieldConfigItem, fieldProps, }: AutoFormInputComponentProps): react_jsx_runtime.JSX.Element;
242
-
243
- declare function AutoFormDate({ label, isRequired, field, fieldConfigItem, fieldProps, zodItem, }: AutoFormInputComponentProps): react_jsx_runtime.JSX.Element;
244
-
245
- declare function AutoFormEnum({ label, isRequired, field, fieldConfigItem, zodItem, fieldProps, }: AutoFormInputComponentProps): react_jsx_runtime.JSX.Element;
246
-
247
- declare function AutoFormInput({ label, isRequired, fieldConfigItem, fieldProps, }: AutoFormInputComponentProps): react_jsx_runtime.JSX.Element;
248
-
249
- declare function AutoFormNumber({ label, isRequired, fieldConfigItem, fieldProps, }: AutoFormInputComponentProps): react_jsx_runtime.JSX.Element;
250
-
251
- declare function AutoFormRadioGroup({ label, isRequired, field, zodItem, fieldProps, fieldConfigItem, }: AutoFormInputComponentProps): react_jsx_runtime.JSX.Element;
252
-
253
- declare function AutoFormSwitch({ label, isRequired, field, fieldConfigItem, fieldProps, }: AutoFormInputComponentProps): react_jsx_runtime.JSX.Element;
254
-
255
- declare function AutoFormTextarea({ label, isRequired, fieldConfigItem, fieldProps, }: AutoFormInputComponentProps): react_jsx_runtime.JSX.Element;
256
-
257
- declare const INPUT_COMPONENTS: {
258
- checkbox: typeof AutoFormCheckbox;
259
- date: typeof AutoFormDate;
260
- select: typeof AutoFormEnum;
261
- radio: typeof AutoFormRadioGroup;
262
- switch: typeof AutoFormSwitch;
263
- textarea: typeof AutoFormTextarea;
264
- number: typeof AutoFormNumber;
265
- fallback: typeof AutoFormInput;
266
- };
267
-
268
- /**
269
- * Common input props shared by all field types.
270
- */
271
- interface BaseInputProps {
272
- /** Whether the field is disabled */
273
- disabled?: boolean;
274
- /** Whether the field is read-only */
275
- readOnly?: boolean;
276
- /** Whether the field is required */
277
- required?: boolean;
278
- /** Whether to show the label (auto-form specific) */
279
- showLabel?: boolean;
280
- }
281
- /**
282
- * Generic input props that accept any field type.
283
- * Use this when the backing type is not known at compile time.
284
- *
285
- * This is the catch-all type used for runtime flexibility.
286
- */
287
- interface SerializableInputProps extends BaseInputProps {
288
- placeholder?: string;
289
- type?: string;
290
- defaultValue?: unknown;
291
- min?: number | string;
292
- max?: number | string;
293
- step?: number | string;
294
- minLength?: number;
295
- maxLength?: number;
296
- pattern?: string;
297
- autoComplete?: string;
298
- /** Allow additional props for extensibility */
299
- [key: string]: unknown;
300
- }
301
-
302
- /**
303
- * Input props for form fields.
304
- *
305
- * This is the runtime type that accepts any input props.
306
- * For type-safe props, use the discriminated types:
307
- * - StringInputProps for text inputs
308
- * - NumberInputProps for number inputs
309
- * - BooleanInputProps for checkboxes/switches
310
- * - DateInputProps for date pickers
311
- * - EnumInputProps for selects/radios
312
- */
313
- type FieldInputProps = SerializableInputProps & Omit<React.InputHTMLAttributes<HTMLInputElement>, keyof SerializableInputProps> & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, keyof SerializableInputProps>;
314
- /**
315
- * Configuration for a single field in AutoForm.
316
- *
317
- * Note: This type is designed to align with form-builder's FormBuilderFieldProps
318
- * so that JSON Schema properties can be easily converted to field configs.
319
- */
320
- type FieldConfigItem = {
321
- /** Description text or React node */
322
- description?: React.ReactNode;
323
- /** Input props passed to the field component */
324
- inputProps?: FieldInputProps;
325
- /** Display label */
326
- label?: string;
327
- /** Field type override - built-in type or custom component */
328
- fieldType?: keyof typeof INPUT_COMPONENTS | React.FC<AutoFormInputComponentProps>;
329
- /** Wrapper component for custom field layout */
330
- renderParent?: (props: {
331
- children: React.ReactNode;
332
- }) => React.ReactElement | null;
333
- /** Display order for field ordering */
334
- order?: number;
335
- };
336
- /**
337
- * A FormInput component can handle a specific Zod type (e.g. "ZodBoolean")
338
- */
339
- type AutoFormInputComponentProps = {
340
- zodInputProps: React.InputHTMLAttributes<HTMLInputElement>;
341
- field: ControllerRenderProps<FieldValues, any>;
342
- fieldConfigItem: FieldConfigItem;
343
- label: string;
344
- isRequired: boolean;
345
- fieldProps: any;
346
- zodItem: zod.ZodType;
347
- className?: string;
348
- };
349
-
350
243
  /**
351
244
  * Context passed to lifecycle hooks
352
245
  */
@@ -513,5 +406,5 @@ interface CMSFileUploadProps extends AutoFormInputComponentProps {
513
406
  */
514
407
  declare function CMSFileUpload({ label, isRequired, fieldConfigItem, fieldProps, field, uploadImage, }: CMSFileUploadProps): react_jsx_runtime.JSX.Element;
515
408
 
516
- export { CMSFileUpload, cmsClientPlugin };
517
- export type { AutoFormInputComponentProps, CMSClientConfig, CMSClientHooks, CMSFileUploadProps, CMSLocalization, CMSPluginOverrides, LoaderContext, RouteContext };
409
+ export { AutoFormInputComponentProps, CMSFileUpload, cmsClientPlugin };
410
+ export type { CMSClientConfig, CMSClientHooks, CMSFileUploadProps, CMSLocalization, CMSPluginOverrides, LoaderContext, RouteContext };
@@ -3,9 +3,11 @@ import * as react from 'react';
3
3
  import { ComponentType } from 'react';
4
4
  import * as _btst_yar from '@btst/yar';
5
5
  import { QueryClient } from '@tanstack/react-query';
6
- import { ControllerRenderProps, FieldValues } from 'react-hook-form';
7
- import * as zod from 'zod';
6
+ import { A as AutoFormInputComponentProps } from '../../../shared/stack.BIh2AXaW.js';
7
+ export { b as FormSchemaMetadata, F as FormStep, f as formSchemaToZod, a as getStepGroupMap, g as getSteps, h as hasSteps, z as zodToFormSchema } from '../../../shared/stack.AX5nZ6A3.js';
8
8
  import * as react_jsx_runtime from 'react/jsx-runtime';
9
+ import 'react-hook-form';
10
+ import 'zod';
9
11
 
10
12
  /**
11
13
  * Context passed to loader hooks
@@ -238,115 +240,6 @@ declare const CMS_LOCALIZATION: {
238
240
  };
239
241
  type CMSLocalization = typeof CMS_LOCALIZATION;
240
242
 
241
- declare function AutoFormCheckbox({ label, isRequired, field, fieldConfigItem, fieldProps, }: AutoFormInputComponentProps): react_jsx_runtime.JSX.Element;
242
-
243
- declare function AutoFormDate({ label, isRequired, field, fieldConfigItem, fieldProps, zodItem, }: AutoFormInputComponentProps): react_jsx_runtime.JSX.Element;
244
-
245
- declare function AutoFormEnum({ label, isRequired, field, fieldConfigItem, zodItem, fieldProps, }: AutoFormInputComponentProps): react_jsx_runtime.JSX.Element;
246
-
247
- declare function AutoFormInput({ label, isRequired, fieldConfigItem, fieldProps, }: AutoFormInputComponentProps): react_jsx_runtime.JSX.Element;
248
-
249
- declare function AutoFormNumber({ label, isRequired, fieldConfigItem, fieldProps, }: AutoFormInputComponentProps): react_jsx_runtime.JSX.Element;
250
-
251
- declare function AutoFormRadioGroup({ label, isRequired, field, zodItem, fieldProps, fieldConfigItem, }: AutoFormInputComponentProps): react_jsx_runtime.JSX.Element;
252
-
253
- declare function AutoFormSwitch({ label, isRequired, field, fieldConfigItem, fieldProps, }: AutoFormInputComponentProps): react_jsx_runtime.JSX.Element;
254
-
255
- declare function AutoFormTextarea({ label, isRequired, fieldConfigItem, fieldProps, }: AutoFormInputComponentProps): react_jsx_runtime.JSX.Element;
256
-
257
- declare const INPUT_COMPONENTS: {
258
- checkbox: typeof AutoFormCheckbox;
259
- date: typeof AutoFormDate;
260
- select: typeof AutoFormEnum;
261
- radio: typeof AutoFormRadioGroup;
262
- switch: typeof AutoFormSwitch;
263
- textarea: typeof AutoFormTextarea;
264
- number: typeof AutoFormNumber;
265
- fallback: typeof AutoFormInput;
266
- };
267
-
268
- /**
269
- * Common input props shared by all field types.
270
- */
271
- interface BaseInputProps {
272
- /** Whether the field is disabled */
273
- disabled?: boolean;
274
- /** Whether the field is read-only */
275
- readOnly?: boolean;
276
- /** Whether the field is required */
277
- required?: boolean;
278
- /** Whether to show the label (auto-form specific) */
279
- showLabel?: boolean;
280
- }
281
- /**
282
- * Generic input props that accept any field type.
283
- * Use this when the backing type is not known at compile time.
284
- *
285
- * This is the catch-all type used for runtime flexibility.
286
- */
287
- interface SerializableInputProps extends BaseInputProps {
288
- placeholder?: string;
289
- type?: string;
290
- defaultValue?: unknown;
291
- min?: number | string;
292
- max?: number | string;
293
- step?: number | string;
294
- minLength?: number;
295
- maxLength?: number;
296
- pattern?: string;
297
- autoComplete?: string;
298
- /** Allow additional props for extensibility */
299
- [key: string]: unknown;
300
- }
301
-
302
- /**
303
- * Input props for form fields.
304
- *
305
- * This is the runtime type that accepts any input props.
306
- * For type-safe props, use the discriminated types:
307
- * - StringInputProps for text inputs
308
- * - NumberInputProps for number inputs
309
- * - BooleanInputProps for checkboxes/switches
310
- * - DateInputProps for date pickers
311
- * - EnumInputProps for selects/radios
312
- */
313
- type FieldInputProps = SerializableInputProps & Omit<React.InputHTMLAttributes<HTMLInputElement>, keyof SerializableInputProps> & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, keyof SerializableInputProps>;
314
- /**
315
- * Configuration for a single field in AutoForm.
316
- *
317
- * Note: This type is designed to align with form-builder's FormBuilderFieldProps
318
- * so that JSON Schema properties can be easily converted to field configs.
319
- */
320
- type FieldConfigItem = {
321
- /** Description text or React node */
322
- description?: React.ReactNode;
323
- /** Input props passed to the field component */
324
- inputProps?: FieldInputProps;
325
- /** Display label */
326
- label?: string;
327
- /** Field type override - built-in type or custom component */
328
- fieldType?: keyof typeof INPUT_COMPONENTS | React.FC<AutoFormInputComponentProps>;
329
- /** Wrapper component for custom field layout */
330
- renderParent?: (props: {
331
- children: React.ReactNode;
332
- }) => React.ReactElement | null;
333
- /** Display order for field ordering */
334
- order?: number;
335
- };
336
- /**
337
- * A FormInput component can handle a specific Zod type (e.g. "ZodBoolean")
338
- */
339
- type AutoFormInputComponentProps = {
340
- zodInputProps: React.InputHTMLAttributes<HTMLInputElement>;
341
- field: ControllerRenderProps<FieldValues, any>;
342
- fieldConfigItem: FieldConfigItem;
343
- label: string;
344
- isRequired: boolean;
345
- fieldProps: any;
346
- zodItem: zod.ZodType;
347
- className?: string;
348
- };
349
-
350
243
  /**
351
244
  * Context passed to lifecycle hooks
352
245
  */
@@ -513,5 +406,5 @@ interface CMSFileUploadProps extends AutoFormInputComponentProps {
513
406
  */
514
407
  declare function CMSFileUpload({ label, isRequired, fieldConfigItem, fieldProps, field, uploadImage, }: CMSFileUploadProps): react_jsx_runtime.JSX.Element;
515
408
 
516
- export { CMSFileUpload, cmsClientPlugin };
517
- export type { AutoFormInputComponentProps, CMSClientConfig, CMSClientHooks, CMSFileUploadProps, CMSLocalization, CMSPluginOverrides, LoaderContext, RouteContext };
409
+ export { AutoFormInputComponentProps, CMSFileUpload, cmsClientPlugin };
410
+ export type { CMSClientConfig, CMSClientHooks, CMSFileUploadProps, CMSLocalization, CMSPluginOverrides, LoaderContext, RouteContext };
@@ -1,2 +1,3 @@
1
1
  export { cmsClientPlugin } from '../../../packages/better-stack/src/plugins/cms/client/plugin.mjs';
2
+ export { formSchemaToZod, getStepGroupMap, getSteps, hasSteps, zodToFormSchema } from '../../../packages/ui/src/lib/schema-converter.mjs';
2
3
  export { CMSFileUpload } from '../../../packages/better-stack/src/plugins/cms/client/components/forms/file-upload.mjs';
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ const plugin = require('../../../packages/better-stack/src/plugins/form-builder/api/plugin.cjs');
4
+
5
+
6
+
7
+ exports.formBuilderBackendPlugin = plugin.formBuilderBackendPlugin;
@@ -0,0 +1,141 @@
1
+ import * as _btst_stack_plugins_api from '@btst/stack/plugins/api';
2
+ import * as better_call from 'better-call';
3
+ import { z } from 'zod';
4
+ import { F as FormBuilderBackendConfig, S as SerializedForm, b as SerializedFormSubmissionWithData } from '../../../shared/stack.DzH_wcvr.cjs';
5
+
6
+ /**
7
+ * Form Builder backend plugin
8
+ * Provides API endpoints for managing forms and form submissions
9
+ *
10
+ * @param config - Configuration with optional hooks
11
+ */
12
+ declare const formBuilderBackendPlugin: (config?: FormBuilderBackendConfig) => _btst_stack_plugins_api.BackendPlugin<{
13
+ listForms: better_call.StrictEndpoint<"/forms", {
14
+ method: "GET";
15
+ query: z.ZodObject<{
16
+ status: z.ZodOptional<z.ZodEnum<{
17
+ active: "active";
18
+ inactive: "inactive";
19
+ archived: "archived";
20
+ }>>;
21
+ limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
22
+ offset: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
23
+ }, z.core.$strip>;
24
+ }, {
25
+ items: SerializedForm[];
26
+ total: number;
27
+ limit: number;
28
+ offset: number;
29
+ }>;
30
+ getFormBySlug: better_call.StrictEndpoint<"/forms/:slug", {
31
+ method: "GET";
32
+ params: z.ZodObject<{
33
+ slug: z.ZodString;
34
+ }, z.core.$strip>;
35
+ }, SerializedForm>;
36
+ getFormById: better_call.StrictEndpoint<"/forms/id/:id", {
37
+ method: "GET";
38
+ params: z.ZodObject<{
39
+ id: z.ZodString;
40
+ }, z.core.$strip>;
41
+ }, SerializedForm>;
42
+ createForm: better_call.StrictEndpoint<"/forms", {
43
+ method: "POST";
44
+ body: z.ZodObject<{
45
+ name: z.ZodString;
46
+ slug: z.ZodString;
47
+ description: z.ZodOptional<z.ZodString>;
48
+ schema: z.ZodString;
49
+ successMessage: z.ZodOptional<z.ZodString>;
50
+ redirectUrl: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
51
+ status: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
52
+ active: "active";
53
+ inactive: "inactive";
54
+ archived: "archived";
55
+ }>>>;
56
+ }, z.core.$strip>;
57
+ }, SerializedForm>;
58
+ updateForm: better_call.StrictEndpoint<"/forms/:id", {
59
+ method: "PUT";
60
+ params: z.ZodObject<{
61
+ id: z.ZodString;
62
+ }, z.core.$strip>;
63
+ body: z.ZodObject<{
64
+ name: z.ZodOptional<z.ZodString>;
65
+ slug: z.ZodOptional<z.ZodString>;
66
+ description: z.ZodOptional<z.ZodString>;
67
+ schema: z.ZodOptional<z.ZodString>;
68
+ successMessage: z.ZodOptional<z.ZodString>;
69
+ redirectUrl: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
70
+ status: z.ZodOptional<z.ZodEnum<{
71
+ active: "active";
72
+ inactive: "inactive";
73
+ archived: "archived";
74
+ }>>;
75
+ }, z.core.$strip>;
76
+ }, SerializedForm>;
77
+ deleteForm: better_call.StrictEndpoint<"/forms/:id", {
78
+ method: "DELETE";
79
+ params: z.ZodObject<{
80
+ id: z.ZodString;
81
+ }, z.core.$strip>;
82
+ }, {
83
+ success: boolean;
84
+ }>;
85
+ submitForm: better_call.StrictEndpoint<"/forms/:slug/submit", {
86
+ method: "POST";
87
+ params: z.ZodObject<{
88
+ slug: z.ZodString;
89
+ }, z.core.$strip>;
90
+ body: z.ZodObject<{
91
+ data: z.ZodObject<{}, z.core.$loose>;
92
+ }, z.core.$strip>;
93
+ }, {
94
+ form: {
95
+ successMessage: string | undefined;
96
+ redirectUrl: string | undefined;
97
+ };
98
+ submittedAt: string;
99
+ id: string;
100
+ data: string;
101
+ formId: string;
102
+ submittedBy?: string | undefined;
103
+ ipAddress?: string | undefined;
104
+ userAgent?: string | undefined;
105
+ }>;
106
+ listSubmissions: better_call.StrictEndpoint<"/forms/:formId/submissions", {
107
+ method: "GET";
108
+ params: z.ZodObject<{
109
+ formId: z.ZodString;
110
+ }, z.core.$strip>;
111
+ query: z.ZodObject<{
112
+ limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
113
+ offset: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
114
+ }, z.core.$strip>;
115
+ }, {
116
+ items: SerializedFormSubmissionWithData<Record<string, unknown>>[];
117
+ total: number;
118
+ limit: number;
119
+ offset: number;
120
+ }>;
121
+ getSubmission: better_call.StrictEndpoint<"/forms/:formId/submissions/:subId", {
122
+ method: "GET";
123
+ params: z.ZodObject<{
124
+ formId: z.ZodString;
125
+ subId: z.ZodString;
126
+ }, z.core.$strip>;
127
+ }, SerializedFormSubmissionWithData<Record<string, unknown>>>;
128
+ deleteSubmission: better_call.StrictEndpoint<"/forms/:formId/submissions/:subId", {
129
+ method: "DELETE";
130
+ params: z.ZodObject<{
131
+ formId: z.ZodString;
132
+ subId: z.ZodString;
133
+ }, z.core.$strip>;
134
+ }, {
135
+ success: boolean;
136
+ }>;
137
+ }>;
138
+ type FormBuilderApiRouter = ReturnType<ReturnType<typeof formBuilderBackendPlugin>["routes"]>;
139
+
140
+ export { formBuilderBackendPlugin };
141
+ export type { FormBuilderApiRouter };