@fragno-dev/forms 0.0.3 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +159 -25
- package/dist/browser/client/react.d.ts +143 -94
- package/dist/browser/client/react.d.ts.map +1 -1
- package/dist/browser/client/react.js +105 -13
- package/dist/browser/client/react.js.map +1 -1
- package/dist/browser/client/solid.d.ts +143 -94
- package/dist/browser/client/solid.d.ts.map +1 -1
- package/dist/browser/client/solid.js +25 -11
- package/dist/browser/client/solid.js.map +1 -1
- package/dist/browser/client/svelte.d.ts +143 -94
- package/dist/browser/client/svelte.d.ts.map +1 -1
- package/dist/browser/client/svelte.js +11 -3
- package/dist/browser/client/svelte.js.map +1 -1
- package/dist/browser/client/vanilla.d.ts +142 -93
- package/dist/browser/client/vanilla.d.ts.map +1 -1
- package/dist/browser/client/vanilla.js +21 -1
- package/dist/browser/client/vanilla.js.map +1 -1
- package/dist/browser/client/vue.d.ts +73 -24
- package/dist/browser/client/vue.d.ts.map +1 -1
- package/dist/browser/client/vue.js +23 -1
- package/dist/browser/client/vue.js.map +1 -1
- package/dist/browser/index.d.ts +700 -301
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/{src-DbMX_NY6.js → src-BNcd9ogF.js} +556 -348
- package/dist/browser/src-BNcd9ogF.js.map +1 -0
- package/dist/node/index.d.ts +546 -147
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +133 -103
- package/dist/node/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +31 -52
- package/dist/browser/src-DbMX_NY6.js.map +0 -1
package/dist/browser/index.d.ts
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _fragno_dev_core25 from "@fragno-dev/core";
|
|
2
2
|
import * as _fragno_dev_core0 from "@fragno-dev/core";
|
|
3
3
|
import { FragnoRouteConfig } from "@fragno-dev/core";
|
|
4
|
-
import * as
|
|
4
|
+
import * as zod211 from "zod";
|
|
5
5
|
import { z } from "zod";
|
|
6
|
-
import * as
|
|
7
|
-
import
|
|
8
|
-
import * as
|
|
9
|
-
import * as _fragno_dev_core_api9 from "@fragno-dev/core/api";
|
|
10
|
-
import * as _standard_schema_spec15 from "@standard-schema/spec";
|
|
6
|
+
import * as zod_v4_core12 from "zod/v4/core";
|
|
7
|
+
import * as _fragno_dev_core_api4 from "@fragno-dev/core/api";
|
|
8
|
+
import * as _standard_schema_spec6 from "@standard-schema/spec";
|
|
11
9
|
import * as _fragno_dev_core_client0 from "@fragno-dev/core/client";
|
|
12
10
|
import { FragnoPublicClientConfig } from "@fragno-dev/core/client";
|
|
13
|
-
import * as
|
|
11
|
+
import * as _fragno_dev_db_schema164 from "@fragno-dev/db/schema";
|
|
14
12
|
import * as _fragno_dev_db_schema0 from "@fragno-dev/db/schema";
|
|
15
|
-
import * as
|
|
16
|
-
import * as _fragno_dev_db_query0 from "@fragno-dev/db/query";
|
|
17
|
-
import * as _fragno_dev_db42 from "@fragno-dev/db";
|
|
13
|
+
import * as _fragno_dev_db88 from "@fragno-dev/db";
|
|
18
14
|
import * as _fragno_dev_db0 from "@fragno-dev/db";
|
|
19
15
|
import { FragnoPublicConfigWithDatabase } from "@fragno-dev/db";
|
|
20
|
-
import * as
|
|
16
|
+
import * as _fragno_dev_db_fragment_definition_builder0$1 from "@fragno-dev/db/fragment-definition-builder";
|
|
21
17
|
import * as _fragno_dev_db_fragment_definition_builder0 from "@fragno-dev/db/fragment-definition-builder";
|
|
22
18
|
import { UISchemaElement } from "@jsonforms/core";
|
|
23
19
|
|
|
@@ -33,7 +29,7 @@ declare const FormStatusSchema: z.ZodEnum<{
|
|
|
33
29
|
declare const FormSchema: z.ZodObject<{
|
|
34
30
|
id: z.ZodString;
|
|
35
31
|
title: z.ZodString;
|
|
36
|
-
description: z.ZodNullable<z.ZodString
|
|
32
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
37
33
|
slug: z.ZodString;
|
|
38
34
|
status: z.ZodEnum<{
|
|
39
35
|
draft: "draft";
|
|
@@ -42,38 +38,42 @@ declare const FormSchema: z.ZodObject<{
|
|
|
42
38
|
static: "static";
|
|
43
39
|
}>;
|
|
44
40
|
dataSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
45
|
-
uiSchema: z.ZodRecord<z.ZodString, z.ZodUnknown
|
|
41
|
+
uiSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
46
42
|
version: z.ZodNumber;
|
|
47
43
|
createdAt: z.ZodDate;
|
|
48
44
|
updatedAt: z.ZodDate;
|
|
49
45
|
}, z.core.$strip>;
|
|
50
46
|
declare const NewFormSchema: z.ZodObject<{
|
|
47
|
+
title: z.ZodString;
|
|
48
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
49
|
+
slug: z.ZodString;
|
|
51
50
|
status: z.ZodEnum<{
|
|
52
51
|
draft: "draft";
|
|
53
52
|
open: "open";
|
|
54
53
|
closed: "closed";
|
|
55
54
|
static: "static";
|
|
56
55
|
}>;
|
|
57
|
-
title: z.ZodString;
|
|
58
|
-
description: z.ZodNullable<z.ZodString>;
|
|
59
|
-
slug: z.ZodString;
|
|
60
56
|
dataSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
61
|
-
uiSchema: z.ZodRecord<z.ZodString, z.ZodUnknown
|
|
57
|
+
uiSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
62
58
|
}, z.core.$strip>;
|
|
63
59
|
declare const UpdateFormSchema: z.ZodObject<{
|
|
60
|
+
title: z.ZodOptional<z.ZodString>;
|
|
61
|
+
description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
62
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
64
63
|
status: z.ZodOptional<z.ZodEnum<{
|
|
65
64
|
draft: "draft";
|
|
66
65
|
open: "open";
|
|
67
66
|
closed: "closed";
|
|
68
67
|
static: "static";
|
|
69
68
|
}>>;
|
|
70
|
-
title: z.ZodOptional<z.ZodString>;
|
|
71
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
72
|
-
slug: z.ZodOptional<z.ZodString>;
|
|
73
69
|
dataSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
74
|
-
uiSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown
|
|
70
|
+
uiSchema: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
75
71
|
}, z.core.$strip>;
|
|
76
|
-
declare const
|
|
72
|
+
declare const ResponseMetadataSchema: z.ZodObject<{
|
|
73
|
+
ip: z.ZodNullable<z.ZodUnion<readonly [z.ZodIPv4, z.ZodIPv6]>>;
|
|
74
|
+
userAgent: z.ZodNullable<z.ZodString>;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
declare const FormResponseSchema: z.ZodObject<{
|
|
77
77
|
id: z.ZodString;
|
|
78
78
|
formId: z.ZodNullable<z.ZodString>;
|
|
79
79
|
formVersion: z.ZodNumber;
|
|
@@ -82,10 +82,16 @@ declare const ResponseSchema: z.ZodObject<{
|
|
|
82
82
|
ip: z.ZodNullable<z.ZodString>;
|
|
83
83
|
userAgent: z.ZodNullable<z.ZodString>;
|
|
84
84
|
}, z.core.$strip>;
|
|
85
|
+
declare const NewFormResponseSchema: z.ZodObject<{
|
|
86
|
+
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
87
|
+
securityToken: z.ZodOptional<z.ZodString>;
|
|
88
|
+
}, z.core.$strip>;
|
|
85
89
|
type NewForm = z.infer<typeof NewFormSchema>;
|
|
86
90
|
type UpdateForm = z.infer<typeof UpdateFormSchema>;
|
|
87
91
|
type Form = z.infer<typeof FormSchema>;
|
|
88
|
-
type
|
|
92
|
+
type NewFormResponse = z.infer<typeof NewFormResponseSchema>;
|
|
93
|
+
type FormResponse = z.infer<typeof FormResponseSchema>;
|
|
94
|
+
type FormResponseMetadata = z.infer<typeof ResponseMetadataSchema>;
|
|
89
95
|
type FormStatus = z.infer<typeof FormStatusSchema>;
|
|
90
96
|
type JSONSchema = z.infer<typeof JSONSchemaSchema>;
|
|
91
97
|
type UIElementSchema = z.infer<typeof UISchemaElementSchema>;
|
|
@@ -101,7 +107,7 @@ type ValidationResult = {
|
|
|
101
107
|
error: {
|
|
102
108
|
message: string;
|
|
103
109
|
errors: Array<{
|
|
104
|
-
|
|
110
|
+
instancePath: string;
|
|
105
111
|
message: string;
|
|
106
112
|
}>;
|
|
107
113
|
};
|
|
@@ -110,12 +116,26 @@ interface SubmissionSortOptions {
|
|
|
110
116
|
field: "submittedAt";
|
|
111
117
|
order: "asc" | "desc";
|
|
112
118
|
}
|
|
113
|
-
declare const formsFragmentDef:
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
+
declare const formsFragmentDef: _fragno_dev_core25.FragmentDefinition<FormsConfig, _fragno_dev_db88.FragnoPublicConfigWithDatabase, _fragno_dev_db88.ImplicitDatabaseDependencies<_fragno_dev_db_schema164.Schema<Record<"form", _fragno_dev_db_schema164.Table<Record<"id", _fragno_dev_db_schema164.IdColumn<"varchar(128)", string | _fragno_dev_db_schema164.FragnoId | null, _fragno_dev_db_schema164.FragnoId>> & Record<"title", _fragno_dev_db_schema164.Column<"string", string, string>> & Record<"description", _fragno_dev_db_schema164.Column<"string", string | null, string | null>> & Record<"slug", _fragno_dev_db_schema164.Column<"string", string, string>> & Record<"status", _fragno_dev_db_schema164.Column<"string", string | null, string>> & Record<"dataSchema", _fragno_dev_db_schema164.Column<"json", unknown, unknown>> & Record<"uiSchema", _fragno_dev_db_schema164.Column<"json", unknown, unknown>> & Record<"version", _fragno_dev_db_schema164.Column<"integer", number | null, number>> & Record<"createdAt", _fragno_dev_db_schema164.Column<"timestamp", (Date | _fragno_dev_db88.DbNow) | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema164.Column<"timestamp", (Date | _fragno_dev_db88.DbNow) | null, Date>>, Record<string, _fragno_dev_db_schema164.AnyRelation>, Record<string, _fragno_dev_db_schema164.Index<_fragno_dev_db_schema164.AnyColumn[], readonly string[]>> & Record<"idx_form_status", _fragno_dev_db_schema164.Index<readonly [_fragno_dev_db_schema164.Column<"string", string | null, string>] & _fragno_dev_db_schema164.AnyColumn[], readonly ["status"]>> & Record<"idx_form_slug", _fragno_dev_db_schema164.Index<readonly [_fragno_dev_db_schema164.Column<"string", string, string>] & _fragno_dev_db_schema164.AnyColumn[], readonly ["slug"]>>>> & Record<"response", _fragno_dev_db_schema164.Table<Record<"id", _fragno_dev_db_schema164.IdColumn<"varchar(128)", string | _fragno_dev_db_schema164.FragnoId | null, _fragno_dev_db_schema164.FragnoId>> & Record<"formId", _fragno_dev_db_schema164.Column<"string", string, string>> & Record<"formVersion", _fragno_dev_db_schema164.Column<"integer", number, number>> & Record<"data", _fragno_dev_db_schema164.Column<"json", unknown, unknown>> & Record<"submittedAt", _fragno_dev_db_schema164.Column<"timestamp", (Date | _fragno_dev_db88.DbNow) | null, Date>> & Record<"userAgent", _fragno_dev_db_schema164.Column<"string", string | null, string | null>> & Record<"ip", _fragno_dev_db_schema164.Column<"string", string | null, string | null>>, Record<string, _fragno_dev_db_schema164.AnyRelation>, Record<string, _fragno_dev_db_schema164.Index<_fragno_dev_db_schema164.AnyColumn[], readonly string[]>> & Record<"idx_response_form", _fragno_dev_db_schema164.Index<readonly [_fragno_dev_db_schema164.Column<"string", string, string>] & _fragno_dev_db_schema164.AnyColumn[], readonly ["formId"]>> & Record<"idx_response_submitted_at", _fragno_dev_db_schema164.Index<readonly [_fragno_dev_db_schema164.Column<"timestamp", (Date | _fragno_dev_db88.DbNow) | null, Date>] & _fragno_dev_db_schema164.AnyColumn[], readonly ["submittedAt"]>>>>>>, {
|
|
120
|
+
createForm: (input: NewForm) => _fragno_dev_db88.TxResult<string, _fragno_dev_db_schema164.FragnoId>;
|
|
121
|
+
getForm: (id: string) => _fragno_dev_db88.TxResult<({
|
|
122
|
+
id: _fragno_dev_db_schema164.FragnoId;
|
|
123
|
+
title: string;
|
|
124
|
+
description: string | null;
|
|
125
|
+
slug: string;
|
|
126
|
+
status: string;
|
|
127
|
+
dataSchema: unknown;
|
|
128
|
+
uiSchema: unknown;
|
|
129
|
+
version: number;
|
|
130
|
+
createdAt: Date;
|
|
131
|
+
updatedAt: Date;
|
|
132
|
+
} & {
|
|
133
|
+
id: string;
|
|
134
|
+
status: FormStatus;
|
|
135
|
+
dataSchema: JSONSchema;
|
|
136
|
+
uiSchema: UIElementSchema;
|
|
137
|
+
}) | null, ({
|
|
138
|
+
id: _fragno_dev_db_schema164.FragnoId;
|
|
119
139
|
title: string;
|
|
120
140
|
description: string | null;
|
|
121
141
|
slug: string;
|
|
@@ -131,8 +151,24 @@ declare const formsFragmentDef: _fragno_dev_core23.FragmentDefinition<FormsConfi
|
|
|
131
151
|
dataSchema: JSONSchema;
|
|
132
152
|
uiSchema: UIElementSchema;
|
|
133
153
|
}) | null>;
|
|
134
|
-
getFormBySlug: (slug: string) =>
|
|
135
|
-
id:
|
|
154
|
+
getFormBySlug: (slug: string) => _fragno_dev_db88.TxResult<({
|
|
155
|
+
id: _fragno_dev_db_schema164.FragnoId;
|
|
156
|
+
title: string;
|
|
157
|
+
description: string | null;
|
|
158
|
+
slug: string;
|
|
159
|
+
status: string;
|
|
160
|
+
dataSchema: unknown;
|
|
161
|
+
uiSchema: unknown;
|
|
162
|
+
version: number;
|
|
163
|
+
createdAt: Date;
|
|
164
|
+
updatedAt: Date;
|
|
165
|
+
} & {
|
|
166
|
+
id: string;
|
|
167
|
+
status: FormStatus;
|
|
168
|
+
dataSchema: JSONSchema;
|
|
169
|
+
uiSchema: UIElementSchema;
|
|
170
|
+
}) | null, ({
|
|
171
|
+
id: _fragno_dev_db_schema164.FragnoId;
|
|
136
172
|
title: string;
|
|
137
173
|
description: string | null;
|
|
138
174
|
slug: string;
|
|
@@ -148,11 +184,38 @@ declare const formsFragmentDef: _fragno_dev_core23.FragmentDefinition<FormsConfi
|
|
|
148
184
|
dataSchema: JSONSchema;
|
|
149
185
|
uiSchema: UIElementSchema;
|
|
150
186
|
}) | null>;
|
|
151
|
-
updateForm: (id: string, input: UpdateForm) =>
|
|
187
|
+
updateForm: (id: string, input: UpdateForm) => _fragno_dev_db88.TxResult<{
|
|
152
188
|
success: boolean;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
|
|
189
|
+
}, [{
|
|
190
|
+
id: _fragno_dev_db_schema164.FragnoId;
|
|
191
|
+
title: string;
|
|
192
|
+
description: string | null;
|
|
193
|
+
slug: string;
|
|
194
|
+
status: string;
|
|
195
|
+
dataSchema: unknown;
|
|
196
|
+
uiSchema: unknown;
|
|
197
|
+
version: number;
|
|
198
|
+
createdAt: Date;
|
|
199
|
+
updatedAt: Date;
|
|
200
|
+
}[]]>;
|
|
201
|
+
listForms: () => _fragno_dev_db88.TxResult<({
|
|
202
|
+
id: _fragno_dev_db_schema164.FragnoId;
|
|
203
|
+
title: string;
|
|
204
|
+
description: string | null;
|
|
205
|
+
slug: string;
|
|
206
|
+
status: string;
|
|
207
|
+
dataSchema: unknown;
|
|
208
|
+
uiSchema: unknown;
|
|
209
|
+
version: number;
|
|
210
|
+
createdAt: Date;
|
|
211
|
+
updatedAt: Date;
|
|
212
|
+
} & {
|
|
213
|
+
id: string;
|
|
214
|
+
status: FormStatus;
|
|
215
|
+
dataSchema: JSONSchema;
|
|
216
|
+
uiSchema: UIElementSchema;
|
|
217
|
+
})[], ({
|
|
218
|
+
id: _fragno_dev_db_schema164.FragnoId;
|
|
156
219
|
title: string;
|
|
157
220
|
description: string | null;
|
|
158
221
|
slug: string;
|
|
@@ -168,14 +231,25 @@ declare const formsFragmentDef: _fragno_dev_core23.FragmentDefinition<FormsConfi
|
|
|
168
231
|
dataSchema: JSONSchema;
|
|
169
232
|
uiSchema: UIElementSchema;
|
|
170
233
|
})[]>;
|
|
171
|
-
deleteForm: (id: string) =>
|
|
172
|
-
validateData: (schema:
|
|
234
|
+
deleteForm: (id: string) => _fragno_dev_db88.TxResult<void, void>;
|
|
235
|
+
validateData: (schema: JSONSchema, data: Record<string, unknown>) => ValidationResult;
|
|
173
236
|
createResponse: (formId: string, formVersion: number, data: ValidatedData, metadata?: {
|
|
174
237
|
ip?: string | null;
|
|
175
238
|
userAgent?: string | null;
|
|
176
|
-
}) =>
|
|
177
|
-
getResponse: (id: string) =>
|
|
178
|
-
id:
|
|
239
|
+
}) => _fragno_dev_db88.TxResult<string, _fragno_dev_db_schema164.FragnoId>;
|
|
240
|
+
getResponse: (id: string) => _fragno_dev_db88.TxResult<({
|
|
241
|
+
id: _fragno_dev_db_schema164.FragnoId;
|
|
242
|
+
formId: string;
|
|
243
|
+
formVersion: number;
|
|
244
|
+
data: unknown;
|
|
245
|
+
submittedAt: Date;
|
|
246
|
+
userAgent: string | null;
|
|
247
|
+
ip: string | null;
|
|
248
|
+
} & {
|
|
249
|
+
id: string;
|
|
250
|
+
data: Record<string, unknown>;
|
|
251
|
+
}) | null, ({
|
|
252
|
+
id: _fragno_dev_db_schema164.FragnoId;
|
|
179
253
|
formId: string;
|
|
180
254
|
formVersion: number;
|
|
181
255
|
data: unknown;
|
|
@@ -186,8 +260,19 @@ declare const formsFragmentDef: _fragno_dev_core23.FragmentDefinition<FormsConfi
|
|
|
186
260
|
id: string;
|
|
187
261
|
data: Record<string, unknown>;
|
|
188
262
|
}) | null>;
|
|
189
|
-
listResponses: (formId: string, sort?: SubmissionSortOptions) =>
|
|
190
|
-
id:
|
|
263
|
+
listResponses: (formId: string, sort?: SubmissionSortOptions) => _fragno_dev_db88.TxResult<({
|
|
264
|
+
id: _fragno_dev_db_schema164.FragnoId;
|
|
265
|
+
formId: string;
|
|
266
|
+
formVersion: number;
|
|
267
|
+
data: unknown;
|
|
268
|
+
submittedAt: Date;
|
|
269
|
+
userAgent: string | null;
|
|
270
|
+
ip: string | null;
|
|
271
|
+
} & {
|
|
272
|
+
id: string;
|
|
273
|
+
data: Record<string, unknown>;
|
|
274
|
+
})[], ({
|
|
275
|
+
id: _fragno_dev_db_schema164.FragnoId;
|
|
191
276
|
formId: string;
|
|
192
277
|
formVersion: number;
|
|
193
278
|
data: unknown;
|
|
@@ -198,32 +283,44 @@ declare const formsFragmentDef: _fragno_dev_core23.FragmentDefinition<FormsConfi
|
|
|
198
283
|
id: string;
|
|
199
284
|
data: Record<string, unknown>;
|
|
200
285
|
})[]>;
|
|
201
|
-
deleteResponse: (id: string) =>
|
|
202
|
-
}, {}, {}, {},
|
|
203
|
-
_fragno_internal: _fragno_dev_db42.InternalFragmentInstance;
|
|
204
|
-
}>;
|
|
286
|
+
deleteResponse: (id: string) => _fragno_dev_db88.TxResult<void, void>;
|
|
287
|
+
}, {}, {}, {}, _fragno_dev_db88.DatabaseServiceContext<_fragno_dev_db88.HooksMap>, _fragno_dev_db88.DatabaseRequestContext<_fragno_dev_db88.HooksMap>, _fragno_dev_db_fragment_definition_builder0$1.DatabaseRequestStorage, []>;
|
|
205
288
|
//# sourceMappingURL=definition.d.ts.map
|
|
206
289
|
//#endregion
|
|
207
290
|
//#region src/index.d.ts
|
|
208
291
|
interface StaticForm {
|
|
209
292
|
id: string;
|
|
210
293
|
title: string;
|
|
211
|
-
description
|
|
294
|
+
description?: string;
|
|
212
295
|
slug: string;
|
|
213
296
|
dataSchema: JSONSchema;
|
|
214
|
-
uiSchema
|
|
297
|
+
uiSchema?: UISchemaElement;
|
|
215
298
|
version: number;
|
|
216
299
|
}
|
|
217
300
|
interface FormsConfig {
|
|
218
301
|
onFormCreated?: (form: Omit<Form, "version" | "createdAt" | "updatedAt">) => Promise<void>;
|
|
219
|
-
onResponseSubmitted?: (response:
|
|
302
|
+
onResponseSubmitted?: (response: FormResponse) => Promise<void>;
|
|
220
303
|
staticForms?: StaticForm[];
|
|
221
304
|
}
|
|
222
|
-
declare const routes: readonly [_fragno_dev_core0.RouteFactory<FormsConfig, {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
305
|
+
declare const routes: readonly [_fragno_dev_core0.RouteFactory<FormsConfig, _fragno_dev_db0.ImplicitDatabaseDependencies<_fragno_dev_db_schema0.Schema<Record<"form", _fragno_dev_db_schema0.Table<Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(128)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & Record<"title", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"description", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"slug", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"status", _fragno_dev_db_schema0.Column<"string", string | null, string>> & Record<"dataSchema", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"uiSchema", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"version", _fragno_dev_db_schema0.Column<"integer", number | null, number>> & Record<"createdAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>>, Record<string, _fragno_dev_db_schema0.AnyRelation>, Record<string, _fragno_dev_db_schema0.Index<_fragno_dev_db_schema0.AnyColumn[], readonly string[]>> & Record<"idx_form_status", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string | null, string>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["status"]>> & Record<"idx_form_slug", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string, string>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["slug"]>>>> & Record<"response", _fragno_dev_db_schema0.Table<Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(128)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & Record<"formId", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"formVersion", _fragno_dev_db_schema0.Column<"integer", number, number>> & Record<"data", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"submittedAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>> & Record<"userAgent", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"ip", _fragno_dev_db_schema0.Column<"string", string | null, string | null>>, Record<string, _fragno_dev_db_schema0.AnyRelation>, Record<string, _fragno_dev_db_schema0.Index<_fragno_dev_db_schema0.AnyColumn[], readonly string[]>> & Record<"idx_response_form", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string, string>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["formId"]>> & Record<"idx_response_submitted_at", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["submittedAt"]>>>>>>, _fragno_dev_core0.BoundServices<{
|
|
306
|
+
createForm: (input: NewForm) => _fragno_dev_db0.TxResult<string, _fragno_dev_db_schema0.FragnoId>;
|
|
307
|
+
getForm: (id: string) => _fragno_dev_db0.TxResult<({
|
|
308
|
+
id: _fragno_dev_db_schema0.FragnoId;
|
|
309
|
+
title: string;
|
|
310
|
+
description: string | null;
|
|
311
|
+
slug: string;
|
|
312
|
+
status: string;
|
|
313
|
+
dataSchema: unknown;
|
|
314
|
+
uiSchema: unknown;
|
|
315
|
+
version: number;
|
|
316
|
+
createdAt: Date;
|
|
317
|
+
updatedAt: Date;
|
|
318
|
+
} & {
|
|
319
|
+
id: string;
|
|
320
|
+
status: FormStatus;
|
|
321
|
+
dataSchema: JSONSchema;
|
|
322
|
+
uiSchema: UIElementSchema;
|
|
323
|
+
}) | null, ({
|
|
227
324
|
id: _fragno_dev_db_schema0.FragnoId;
|
|
228
325
|
title: string;
|
|
229
326
|
description: string | null;
|
|
@@ -240,7 +337,23 @@ declare const routes: readonly [_fragno_dev_core0.RouteFactory<FormsConfig, {
|
|
|
240
337
|
dataSchema: JSONSchema;
|
|
241
338
|
uiSchema: UIElementSchema;
|
|
242
339
|
}) | null>;
|
|
243
|
-
getFormBySlug: (slug: string) =>
|
|
340
|
+
getFormBySlug: (slug: string) => _fragno_dev_db0.TxResult<({
|
|
341
|
+
id: _fragno_dev_db_schema0.FragnoId;
|
|
342
|
+
title: string;
|
|
343
|
+
description: string | null;
|
|
344
|
+
slug: string;
|
|
345
|
+
status: string;
|
|
346
|
+
dataSchema: unknown;
|
|
347
|
+
uiSchema: unknown;
|
|
348
|
+
version: number;
|
|
349
|
+
createdAt: Date;
|
|
350
|
+
updatedAt: Date;
|
|
351
|
+
} & {
|
|
352
|
+
id: string;
|
|
353
|
+
status: FormStatus;
|
|
354
|
+
dataSchema: JSONSchema;
|
|
355
|
+
uiSchema: UIElementSchema;
|
|
356
|
+
}) | null, ({
|
|
244
357
|
id: _fragno_dev_db_schema0.FragnoId;
|
|
245
358
|
title: string;
|
|
246
359
|
description: string | null;
|
|
@@ -257,10 +370,37 @@ declare const routes: readonly [_fragno_dev_core0.RouteFactory<FormsConfig, {
|
|
|
257
370
|
dataSchema: JSONSchema;
|
|
258
371
|
uiSchema: UIElementSchema;
|
|
259
372
|
}) | null>;
|
|
260
|
-
updateForm: (id: string, input: UpdateForm) =>
|
|
373
|
+
updateForm: (id: string, input: UpdateForm) => _fragno_dev_db0.TxResult<{
|
|
261
374
|
success: boolean;
|
|
262
|
-
}
|
|
263
|
-
|
|
375
|
+
}, [{
|
|
376
|
+
id: _fragno_dev_db_schema0.FragnoId;
|
|
377
|
+
title: string;
|
|
378
|
+
description: string | null;
|
|
379
|
+
slug: string;
|
|
380
|
+
status: string;
|
|
381
|
+
dataSchema: unknown;
|
|
382
|
+
uiSchema: unknown;
|
|
383
|
+
version: number;
|
|
384
|
+
createdAt: Date;
|
|
385
|
+
updatedAt: Date;
|
|
386
|
+
}[]]>;
|
|
387
|
+
listForms: () => _fragno_dev_db0.TxResult<({
|
|
388
|
+
id: _fragno_dev_db_schema0.FragnoId;
|
|
389
|
+
title: string;
|
|
390
|
+
description: string | null;
|
|
391
|
+
slug: string;
|
|
392
|
+
status: string;
|
|
393
|
+
dataSchema: unknown;
|
|
394
|
+
uiSchema: unknown;
|
|
395
|
+
version: number;
|
|
396
|
+
createdAt: Date;
|
|
397
|
+
updatedAt: Date;
|
|
398
|
+
} & {
|
|
399
|
+
id: string;
|
|
400
|
+
status: FormStatus;
|
|
401
|
+
dataSchema: JSONSchema;
|
|
402
|
+
uiSchema: UIElementSchema;
|
|
403
|
+
})[], ({
|
|
264
404
|
id: _fragno_dev_db_schema0.FragnoId;
|
|
265
405
|
title: string;
|
|
266
406
|
description: string | null;
|
|
@@ -277,13 +417,24 @@ declare const routes: readonly [_fragno_dev_core0.RouteFactory<FormsConfig, {
|
|
|
277
417
|
dataSchema: JSONSchema;
|
|
278
418
|
uiSchema: UIElementSchema;
|
|
279
419
|
})[]>;
|
|
280
|
-
deleteForm: (id: string) =>
|
|
281
|
-
validateData: (schema:
|
|
420
|
+
deleteForm: (id: string) => _fragno_dev_db0.TxResult<void, void>;
|
|
421
|
+
validateData: (schema: JSONSchema, data: Record<string, unknown>) => ValidationResult;
|
|
282
422
|
createResponse: (formId: string, formVersion: number, data: ValidatedData, metadata?: {
|
|
283
423
|
ip?: string | null;
|
|
284
424
|
userAgent?: string | null;
|
|
285
|
-
}) =>
|
|
286
|
-
getResponse: (id: string) =>
|
|
425
|
+
}) => _fragno_dev_db0.TxResult<string, _fragno_dev_db_schema0.FragnoId>;
|
|
426
|
+
getResponse: (id: string) => _fragno_dev_db0.TxResult<({
|
|
427
|
+
id: _fragno_dev_db_schema0.FragnoId;
|
|
428
|
+
formId: string;
|
|
429
|
+
formVersion: number;
|
|
430
|
+
data: unknown;
|
|
431
|
+
submittedAt: Date;
|
|
432
|
+
userAgent: string | null;
|
|
433
|
+
ip: string | null;
|
|
434
|
+
} & {
|
|
435
|
+
id: string;
|
|
436
|
+
data: Record<string, unknown>;
|
|
437
|
+
}) | null, ({
|
|
287
438
|
id: _fragno_dev_db_schema0.FragnoId;
|
|
288
439
|
formId: string;
|
|
289
440
|
formVersion: number;
|
|
@@ -295,7 +446,18 @@ declare const routes: readonly [_fragno_dev_core0.RouteFactory<FormsConfig, {
|
|
|
295
446
|
id: string;
|
|
296
447
|
data: Record<string, unknown>;
|
|
297
448
|
}) | null>;
|
|
298
|
-
listResponses: (formId: string, sort?: SubmissionSortOptions) =>
|
|
449
|
+
listResponses: (formId: string, sort?: SubmissionSortOptions) => _fragno_dev_db0.TxResult<({
|
|
450
|
+
id: _fragno_dev_db_schema0.FragnoId;
|
|
451
|
+
formId: string;
|
|
452
|
+
formVersion: number;
|
|
453
|
+
data: unknown;
|
|
454
|
+
submittedAt: Date;
|
|
455
|
+
userAgent: string | null;
|
|
456
|
+
ip: string | null;
|
|
457
|
+
} & {
|
|
458
|
+
id: string;
|
|
459
|
+
data: Record<string, unknown>;
|
|
460
|
+
})[], ({
|
|
299
461
|
id: _fragno_dev_db_schema0.FragnoId;
|
|
300
462
|
formId: string;
|
|
301
463
|
formVersion: number;
|
|
@@ -307,31 +469,45 @@ declare const routes: readonly [_fragno_dev_core0.RouteFactory<FormsConfig, {
|
|
|
307
469
|
id: string;
|
|
308
470
|
data: Record<string, unknown>;
|
|
309
471
|
})[]>;
|
|
310
|
-
deleteResponse: (id: string) =>
|
|
311
|
-
}>, {}, readonly [_fragno_dev_core0.FragnoRouteConfig<"GET", "/:slug",
|
|
312
|
-
id:
|
|
313
|
-
title:
|
|
314
|
-
description:
|
|
315
|
-
slug:
|
|
316
|
-
status:
|
|
472
|
+
deleteResponse: (id: string) => _fragno_dev_db0.TxResult<void, void>;
|
|
473
|
+
}>, {}, readonly [_fragno_dev_core0.FragnoRouteConfig<"GET", "/:slug", _standard_schema_spec6.StandardSchemaV1<unknown, unknown> | undefined, zod211.ZodObject<{
|
|
474
|
+
id: zod211.ZodString;
|
|
475
|
+
title: zod211.ZodString;
|
|
476
|
+
description: zod211.ZodOptional<zod211.ZodNullable<zod211.ZodString>>;
|
|
477
|
+
slug: zod211.ZodString;
|
|
478
|
+
status: zod211.ZodEnum<{
|
|
317
479
|
draft: "draft";
|
|
318
480
|
open: "open";
|
|
319
481
|
closed: "closed";
|
|
320
482
|
static: "static";
|
|
321
483
|
}>;
|
|
322
|
-
dataSchema:
|
|
323
|
-
uiSchema:
|
|
324
|
-
version:
|
|
325
|
-
createdAt:
|
|
326
|
-
updatedAt:
|
|
327
|
-
},
|
|
328
|
-
data:
|
|
329
|
-
securityToken:
|
|
330
|
-
},
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
484
|
+
dataSchema: zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>;
|
|
485
|
+
uiSchema: zod211.ZodOptional<zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>>;
|
|
486
|
+
version: zod211.ZodNumber;
|
|
487
|
+
createdAt: zod211.ZodDate;
|
|
488
|
+
updatedAt: zod211.ZodDate;
|
|
489
|
+
}, zod_v4_core12.$strip>, "NOT_FOUND", string, _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/:slug/submit", zod211.ZodObject<{
|
|
490
|
+
data: zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>;
|
|
491
|
+
securityToken: zod211.ZodOptional<zod211.ZodString>;
|
|
492
|
+
}, zod_v4_core12.$strip>, zod211.ZodString, "NOT_FOUND" | "VALIDATION_ERROR" | "FORM_NOT_OPEN", string, _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>>]>, _fragno_dev_core0.RouteFactory<FormsConfig, _fragno_dev_db0.ImplicitDatabaseDependencies<_fragno_dev_db_schema0.Schema<Record<"form", _fragno_dev_db_schema0.Table<Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(128)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & Record<"title", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"description", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"slug", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"status", _fragno_dev_db_schema0.Column<"string", string | null, string>> & Record<"dataSchema", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"uiSchema", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"version", _fragno_dev_db_schema0.Column<"integer", number | null, number>> & Record<"createdAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>>, Record<string, _fragno_dev_db_schema0.AnyRelation>, Record<string, _fragno_dev_db_schema0.Index<_fragno_dev_db_schema0.AnyColumn[], readonly string[]>> & Record<"idx_form_status", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string | null, string>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["status"]>> & Record<"idx_form_slug", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string, string>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["slug"]>>>> & Record<"response", _fragno_dev_db_schema0.Table<Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(128)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & Record<"formId", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"formVersion", _fragno_dev_db_schema0.Column<"integer", number, number>> & Record<"data", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"submittedAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>> & Record<"userAgent", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"ip", _fragno_dev_db_schema0.Column<"string", string | null, string | null>>, Record<string, _fragno_dev_db_schema0.AnyRelation>, Record<string, _fragno_dev_db_schema0.Index<_fragno_dev_db_schema0.AnyColumn[], readonly string[]>> & Record<"idx_response_form", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string, string>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["formId"]>> & Record<"idx_response_submitted_at", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["submittedAt"]>>>>>>, _fragno_dev_core0.BoundServices<{
|
|
493
|
+
createForm: (input: NewForm) => _fragno_dev_db0.TxResult<string, _fragno_dev_db_schema0.FragnoId>;
|
|
494
|
+
getForm: (id: string) => _fragno_dev_db0.TxResult<({
|
|
495
|
+
id: _fragno_dev_db_schema0.FragnoId;
|
|
496
|
+
title: string;
|
|
497
|
+
description: string | null;
|
|
498
|
+
slug: string;
|
|
499
|
+
status: string;
|
|
500
|
+
dataSchema: unknown;
|
|
501
|
+
uiSchema: unknown;
|
|
502
|
+
version: number;
|
|
503
|
+
createdAt: Date;
|
|
504
|
+
updatedAt: Date;
|
|
505
|
+
} & {
|
|
506
|
+
id: string;
|
|
507
|
+
status: FormStatus;
|
|
508
|
+
dataSchema: JSONSchema;
|
|
509
|
+
uiSchema: UIElementSchema;
|
|
510
|
+
}) | null, ({
|
|
335
511
|
id: _fragno_dev_db_schema0.FragnoId;
|
|
336
512
|
title: string;
|
|
337
513
|
description: string | null;
|
|
@@ -348,7 +524,23 @@ declare const routes: readonly [_fragno_dev_core0.RouteFactory<FormsConfig, {
|
|
|
348
524
|
dataSchema: JSONSchema;
|
|
349
525
|
uiSchema: UIElementSchema;
|
|
350
526
|
}) | null>;
|
|
351
|
-
getFormBySlug: (slug: string) =>
|
|
527
|
+
getFormBySlug: (slug: string) => _fragno_dev_db0.TxResult<({
|
|
528
|
+
id: _fragno_dev_db_schema0.FragnoId;
|
|
529
|
+
title: string;
|
|
530
|
+
description: string | null;
|
|
531
|
+
slug: string;
|
|
532
|
+
status: string;
|
|
533
|
+
dataSchema: unknown;
|
|
534
|
+
uiSchema: unknown;
|
|
535
|
+
version: number;
|
|
536
|
+
createdAt: Date;
|
|
537
|
+
updatedAt: Date;
|
|
538
|
+
} & {
|
|
539
|
+
id: string;
|
|
540
|
+
status: FormStatus;
|
|
541
|
+
dataSchema: JSONSchema;
|
|
542
|
+
uiSchema: UIElementSchema;
|
|
543
|
+
}) | null, ({
|
|
352
544
|
id: _fragno_dev_db_schema0.FragnoId;
|
|
353
545
|
title: string;
|
|
354
546
|
description: string | null;
|
|
@@ -365,10 +557,37 @@ declare const routes: readonly [_fragno_dev_core0.RouteFactory<FormsConfig, {
|
|
|
365
557
|
dataSchema: JSONSchema;
|
|
366
558
|
uiSchema: UIElementSchema;
|
|
367
559
|
}) | null>;
|
|
368
|
-
updateForm: (id: string, input: UpdateForm) =>
|
|
560
|
+
updateForm: (id: string, input: UpdateForm) => _fragno_dev_db0.TxResult<{
|
|
369
561
|
success: boolean;
|
|
370
|
-
}
|
|
371
|
-
|
|
562
|
+
}, [{
|
|
563
|
+
id: _fragno_dev_db_schema0.FragnoId;
|
|
564
|
+
title: string;
|
|
565
|
+
description: string | null;
|
|
566
|
+
slug: string;
|
|
567
|
+
status: string;
|
|
568
|
+
dataSchema: unknown;
|
|
569
|
+
uiSchema: unknown;
|
|
570
|
+
version: number;
|
|
571
|
+
createdAt: Date;
|
|
572
|
+
updatedAt: Date;
|
|
573
|
+
}[]]>;
|
|
574
|
+
listForms: () => _fragno_dev_db0.TxResult<({
|
|
575
|
+
id: _fragno_dev_db_schema0.FragnoId;
|
|
576
|
+
title: string;
|
|
577
|
+
description: string | null;
|
|
578
|
+
slug: string;
|
|
579
|
+
status: string;
|
|
580
|
+
dataSchema: unknown;
|
|
581
|
+
uiSchema: unknown;
|
|
582
|
+
version: number;
|
|
583
|
+
createdAt: Date;
|
|
584
|
+
updatedAt: Date;
|
|
585
|
+
} & {
|
|
586
|
+
id: string;
|
|
587
|
+
status: FormStatus;
|
|
588
|
+
dataSchema: JSONSchema;
|
|
589
|
+
uiSchema: UIElementSchema;
|
|
590
|
+
})[], ({
|
|
372
591
|
id: _fragno_dev_db_schema0.FragnoId;
|
|
373
592
|
title: string;
|
|
374
593
|
description: string | null;
|
|
@@ -385,13 +604,24 @@ declare const routes: readonly [_fragno_dev_core0.RouteFactory<FormsConfig, {
|
|
|
385
604
|
dataSchema: JSONSchema;
|
|
386
605
|
uiSchema: UIElementSchema;
|
|
387
606
|
})[]>;
|
|
388
|
-
deleteForm: (id: string) =>
|
|
389
|
-
validateData: (schema:
|
|
607
|
+
deleteForm: (id: string) => _fragno_dev_db0.TxResult<void, void>;
|
|
608
|
+
validateData: (schema: JSONSchema, data: Record<string, unknown>) => ValidationResult;
|
|
390
609
|
createResponse: (formId: string, formVersion: number, data: ValidatedData, metadata?: {
|
|
391
610
|
ip?: string | null;
|
|
392
611
|
userAgent?: string | null;
|
|
393
|
-
}) =>
|
|
394
|
-
getResponse: (id: string) =>
|
|
612
|
+
}) => _fragno_dev_db0.TxResult<string, _fragno_dev_db_schema0.FragnoId>;
|
|
613
|
+
getResponse: (id: string) => _fragno_dev_db0.TxResult<({
|
|
614
|
+
id: _fragno_dev_db_schema0.FragnoId;
|
|
615
|
+
formId: string;
|
|
616
|
+
formVersion: number;
|
|
617
|
+
data: unknown;
|
|
618
|
+
submittedAt: Date;
|
|
619
|
+
userAgent: string | null;
|
|
620
|
+
ip: string | null;
|
|
621
|
+
} & {
|
|
622
|
+
id: string;
|
|
623
|
+
data: Record<string, unknown>;
|
|
624
|
+
}) | null, ({
|
|
395
625
|
id: _fragno_dev_db_schema0.FragnoId;
|
|
396
626
|
formId: string;
|
|
397
627
|
formVersion: number;
|
|
@@ -403,7 +633,18 @@ declare const routes: readonly [_fragno_dev_core0.RouteFactory<FormsConfig, {
|
|
|
403
633
|
id: string;
|
|
404
634
|
data: Record<string, unknown>;
|
|
405
635
|
}) | null>;
|
|
406
|
-
listResponses: (formId: string, sort?: SubmissionSortOptions) =>
|
|
636
|
+
listResponses: (formId: string, sort?: SubmissionSortOptions) => _fragno_dev_db0.TxResult<({
|
|
637
|
+
id: _fragno_dev_db_schema0.FragnoId;
|
|
638
|
+
formId: string;
|
|
639
|
+
formVersion: number;
|
|
640
|
+
data: unknown;
|
|
641
|
+
submittedAt: Date;
|
|
642
|
+
userAgent: string | null;
|
|
643
|
+
ip: string | null;
|
|
644
|
+
} & {
|
|
645
|
+
id: string;
|
|
646
|
+
data: Record<string, unknown>;
|
|
647
|
+
})[], ({
|
|
407
648
|
id: _fragno_dev_db_schema0.FragnoId;
|
|
408
649
|
formId: string;
|
|
409
650
|
formVersion: number;
|
|
@@ -415,144 +656,190 @@ declare const routes: readonly [_fragno_dev_core0.RouteFactory<FormsConfig, {
|
|
|
415
656
|
id: string;
|
|
416
657
|
data: Record<string, unknown>;
|
|
417
658
|
})[]>;
|
|
418
|
-
deleteResponse: (id: string) =>
|
|
419
|
-
}>, {}, readonly [_fragno_dev_core0.FragnoRouteConfig<"GET", "/admin/forms",
|
|
420
|
-
id:
|
|
421
|
-
title:
|
|
422
|
-
description:
|
|
423
|
-
slug:
|
|
424
|
-
status:
|
|
659
|
+
deleteResponse: (id: string) => _fragno_dev_db0.TxResult<void, void>;
|
|
660
|
+
}>, {}, readonly [_fragno_dev_core0.FragnoRouteConfig<"GET", "/admin/forms", _standard_schema_spec6.StandardSchemaV1<unknown, unknown> | undefined, zod211.ZodArray<zod211.ZodObject<{
|
|
661
|
+
id: zod211.ZodString;
|
|
662
|
+
title: zod211.ZodString;
|
|
663
|
+
description: zod211.ZodOptional<zod211.ZodNullable<zod211.ZodString>>;
|
|
664
|
+
slug: zod211.ZodString;
|
|
665
|
+
status: zod211.ZodEnum<{
|
|
425
666
|
draft: "draft";
|
|
426
667
|
open: "open";
|
|
427
668
|
closed: "closed";
|
|
428
669
|
static: "static";
|
|
429
670
|
}>;
|
|
430
|
-
dataSchema:
|
|
431
|
-
uiSchema:
|
|
432
|
-
version:
|
|
433
|
-
createdAt:
|
|
434
|
-
updatedAt:
|
|
435
|
-
},
|
|
436
|
-
|
|
671
|
+
dataSchema: zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>;
|
|
672
|
+
uiSchema: zod211.ZodOptional<zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>>;
|
|
673
|
+
version: zod211.ZodNumber;
|
|
674
|
+
createdAt: zod211.ZodDate;
|
|
675
|
+
updatedAt: zod211.ZodDate;
|
|
676
|
+
}, zod_v4_core12.$strip>>, string, string, _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/admin/forms/:id", _standard_schema_spec6.StandardSchemaV1<unknown, unknown> | undefined, zod211.ZodObject<{
|
|
677
|
+
id: zod211.ZodString;
|
|
678
|
+
title: zod211.ZodString;
|
|
679
|
+
description: zod211.ZodOptional<zod211.ZodNullable<zod211.ZodString>>;
|
|
680
|
+
slug: zod211.ZodString;
|
|
681
|
+
status: zod211.ZodEnum<{
|
|
437
682
|
draft: "draft";
|
|
438
683
|
open: "open";
|
|
439
684
|
closed: "closed";
|
|
440
685
|
static: "static";
|
|
441
686
|
}>;
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
},
|
|
448
|
-
|
|
687
|
+
dataSchema: zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>;
|
|
688
|
+
uiSchema: zod211.ZodOptional<zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>>;
|
|
689
|
+
version: zod211.ZodNumber;
|
|
690
|
+
createdAt: zod211.ZodDate;
|
|
691
|
+
updatedAt: zod211.ZodDate;
|
|
692
|
+
}, zod_v4_core12.$strip>, "NOT_FOUND", string, _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/admin/forms", zod211.ZodObject<{
|
|
693
|
+
title: zod211.ZodString;
|
|
694
|
+
description: zod211.ZodOptional<zod211.ZodNullable<zod211.ZodString>>;
|
|
695
|
+
slug: zod211.ZodString;
|
|
696
|
+
status: zod211.ZodEnum<{
|
|
697
|
+
draft: "draft";
|
|
698
|
+
open: "open";
|
|
699
|
+
closed: "closed";
|
|
700
|
+
static: "static";
|
|
701
|
+
}>;
|
|
702
|
+
dataSchema: zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>;
|
|
703
|
+
uiSchema: zod211.ZodOptional<zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>>;
|
|
704
|
+
}, zod_v4_core12.$strip>, zod211.ZodString, "CREATE_FAILED" | "INVALID_JSON_SCHEMA", string, _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"PUT", "/admin/forms/:id", zod211.ZodObject<{
|
|
705
|
+
title: zod211.ZodOptional<zod211.ZodString>;
|
|
706
|
+
description: zod211.ZodOptional<zod211.ZodOptional<zod211.ZodNullable<zod211.ZodString>>>;
|
|
707
|
+
slug: zod211.ZodOptional<zod211.ZodString>;
|
|
708
|
+
status: zod211.ZodOptional<zod211.ZodEnum<{
|
|
449
709
|
draft: "draft";
|
|
450
710
|
open: "open";
|
|
451
711
|
closed: "closed";
|
|
452
712
|
static: "static";
|
|
453
713
|
}>>;
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
description: zod293.ZodNullable<zod293.ZodString>;
|
|
480
|
-
slug: zod293.ZodString;
|
|
481
|
-
status: zod293.ZodEnum<{
|
|
714
|
+
dataSchema: zod211.ZodOptional<zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>>;
|
|
715
|
+
uiSchema: zod211.ZodOptional<zod211.ZodOptional<zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>>>;
|
|
716
|
+
}, zod_v4_core12.$strip>, _standard_schema_spec6.StandardSchemaV1<unknown, unknown> | undefined, "NOT_FOUND" | "INVALID_JSON_SCHEMA" | "STATIC_FORM_READ_ONLY", string, _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"DELETE", "/admin/forms/:id", _standard_schema_spec6.StandardSchemaV1<unknown, unknown> | undefined, _standard_schema_spec6.StandardSchemaV1<unknown, unknown> | undefined, "NOT_FOUND" | "STATIC_FORM_READ_ONLY", string, _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/admin/forms/:id/submissions", _standard_schema_spec6.StandardSchemaV1<unknown, unknown> | undefined, zod211.ZodArray<zod211.ZodObject<{
|
|
717
|
+
id: zod211.ZodString;
|
|
718
|
+
formId: zod211.ZodNullable<zod211.ZodString>;
|
|
719
|
+
formVersion: zod211.ZodNumber;
|
|
720
|
+
data: zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>;
|
|
721
|
+
submittedAt: zod211.ZodDate;
|
|
722
|
+
ip: zod211.ZodNullable<zod211.ZodString>;
|
|
723
|
+
userAgent: zod211.ZodNullable<zod211.ZodString>;
|
|
724
|
+
}, zod_v4_core12.$strip>>, string, "sortOrder", _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/admin/submissions/:id", _standard_schema_spec6.StandardSchemaV1<unknown, unknown> | undefined, zod211.ZodObject<{
|
|
725
|
+
id: zod211.ZodString;
|
|
726
|
+
formId: zod211.ZodNullable<zod211.ZodString>;
|
|
727
|
+
formVersion: zod211.ZodNumber;
|
|
728
|
+
data: zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>;
|
|
729
|
+
submittedAt: zod211.ZodDate;
|
|
730
|
+
ip: zod211.ZodNullable<zod211.ZodString>;
|
|
731
|
+
userAgent: zod211.ZodNullable<zod211.ZodString>;
|
|
732
|
+
}, zod_v4_core12.$strip>, "NOT_FOUND", string, _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"DELETE", "/admin/submissions/:id", _standard_schema_spec6.StandardSchemaV1<unknown, unknown> | undefined, _standard_schema_spec6.StandardSchemaV1<unknown, unknown> | undefined, "NOT_FOUND", string, _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>>]>];
|
|
733
|
+
declare function createFormsFragment(config: FormsConfig | undefined, options: FragnoPublicConfigWithDatabase): _fragno_dev_core0.FragnoInstantiatedFragment<readonly [_fragno_dev_core0.FragnoRouteConfig<"GET", "/:slug", _standard_schema_spec6.StandardSchemaV1<unknown, unknown> | undefined, zod211.ZodObject<{
|
|
734
|
+
id: zod211.ZodString;
|
|
735
|
+
title: zod211.ZodString;
|
|
736
|
+
description: zod211.ZodOptional<zod211.ZodNullable<zod211.ZodString>>;
|
|
737
|
+
slug: zod211.ZodString;
|
|
738
|
+
status: zod211.ZodEnum<{
|
|
482
739
|
draft: "draft";
|
|
483
740
|
open: "open";
|
|
484
741
|
closed: "closed";
|
|
485
742
|
static: "static";
|
|
486
743
|
}>;
|
|
487
|
-
dataSchema:
|
|
488
|
-
uiSchema:
|
|
489
|
-
version:
|
|
490
|
-
createdAt:
|
|
491
|
-
updatedAt:
|
|
492
|
-
},
|
|
493
|
-
data:
|
|
494
|
-
securityToken:
|
|
495
|
-
},
|
|
496
|
-
id:
|
|
497
|
-
title:
|
|
498
|
-
description:
|
|
499
|
-
slug:
|
|
500
|
-
status:
|
|
744
|
+
dataSchema: zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>;
|
|
745
|
+
uiSchema: zod211.ZodOptional<zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>>;
|
|
746
|
+
version: zod211.ZodNumber;
|
|
747
|
+
createdAt: zod211.ZodDate;
|
|
748
|
+
updatedAt: zod211.ZodDate;
|
|
749
|
+
}, zod_v4_core12.$strip>, "NOT_FOUND", string, _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/:slug/submit", zod211.ZodObject<{
|
|
750
|
+
data: zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>;
|
|
751
|
+
securityToken: zod211.ZodOptional<zod211.ZodString>;
|
|
752
|
+
}, zod_v4_core12.$strip>, zod211.ZodString, "NOT_FOUND" | "VALIDATION_ERROR" | "FORM_NOT_OPEN", string, _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/admin/forms", _standard_schema_spec6.StandardSchemaV1<unknown, unknown> | undefined, zod211.ZodArray<zod211.ZodObject<{
|
|
753
|
+
id: zod211.ZodString;
|
|
754
|
+
title: zod211.ZodString;
|
|
755
|
+
description: zod211.ZodOptional<zod211.ZodNullable<zod211.ZodString>>;
|
|
756
|
+
slug: zod211.ZodString;
|
|
757
|
+
status: zod211.ZodEnum<{
|
|
501
758
|
draft: "draft";
|
|
502
759
|
open: "open";
|
|
503
760
|
closed: "closed";
|
|
504
761
|
static: "static";
|
|
505
762
|
}>;
|
|
506
|
-
dataSchema:
|
|
507
|
-
uiSchema:
|
|
508
|
-
version:
|
|
509
|
-
createdAt:
|
|
510
|
-
updatedAt:
|
|
511
|
-
},
|
|
512
|
-
|
|
763
|
+
dataSchema: zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>;
|
|
764
|
+
uiSchema: zod211.ZodOptional<zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>>;
|
|
765
|
+
version: zod211.ZodNumber;
|
|
766
|
+
createdAt: zod211.ZodDate;
|
|
767
|
+
updatedAt: zod211.ZodDate;
|
|
768
|
+
}, zod_v4_core12.$strip>>, string, string, _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/admin/forms/:id", _standard_schema_spec6.StandardSchemaV1<unknown, unknown> | undefined, zod211.ZodObject<{
|
|
769
|
+
id: zod211.ZodString;
|
|
770
|
+
title: zod211.ZodString;
|
|
771
|
+
description: zod211.ZodOptional<zod211.ZodNullable<zod211.ZodString>>;
|
|
772
|
+
slug: zod211.ZodString;
|
|
773
|
+
status: zod211.ZodEnum<{
|
|
513
774
|
draft: "draft";
|
|
514
775
|
open: "open";
|
|
515
776
|
closed: "closed";
|
|
516
777
|
static: "static";
|
|
517
778
|
}>;
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
},
|
|
524
|
-
|
|
779
|
+
dataSchema: zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>;
|
|
780
|
+
uiSchema: zod211.ZodOptional<zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>>;
|
|
781
|
+
version: zod211.ZodNumber;
|
|
782
|
+
createdAt: zod211.ZodDate;
|
|
783
|
+
updatedAt: zod211.ZodDate;
|
|
784
|
+
}, zod_v4_core12.$strip>, "NOT_FOUND", string, _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/admin/forms", zod211.ZodObject<{
|
|
785
|
+
title: zod211.ZodString;
|
|
786
|
+
description: zod211.ZodOptional<zod211.ZodNullable<zod211.ZodString>>;
|
|
787
|
+
slug: zod211.ZodString;
|
|
788
|
+
status: zod211.ZodEnum<{
|
|
789
|
+
draft: "draft";
|
|
790
|
+
open: "open";
|
|
791
|
+
closed: "closed";
|
|
792
|
+
static: "static";
|
|
793
|
+
}>;
|
|
794
|
+
dataSchema: zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>;
|
|
795
|
+
uiSchema: zod211.ZodOptional<zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>>;
|
|
796
|
+
}, zod_v4_core12.$strip>, zod211.ZodString, "CREATE_FAILED" | "INVALID_JSON_SCHEMA", string, _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"PUT", "/admin/forms/:id", zod211.ZodObject<{
|
|
797
|
+
title: zod211.ZodOptional<zod211.ZodString>;
|
|
798
|
+
description: zod211.ZodOptional<zod211.ZodOptional<zod211.ZodNullable<zod211.ZodString>>>;
|
|
799
|
+
slug: zod211.ZodOptional<zod211.ZodString>;
|
|
800
|
+
status: zod211.ZodOptional<zod211.ZodEnum<{
|
|
525
801
|
draft: "draft";
|
|
526
802
|
open: "open";
|
|
527
803
|
closed: "closed";
|
|
528
804
|
static: "static";
|
|
529
805
|
}>>;
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
806
|
+
dataSchema: zod211.ZodOptional<zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>>;
|
|
807
|
+
uiSchema: zod211.ZodOptional<zod211.ZodOptional<zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>>>;
|
|
808
|
+
}, zod_v4_core12.$strip>, _standard_schema_spec6.StandardSchemaV1<unknown, unknown> | undefined, "NOT_FOUND" | "INVALID_JSON_SCHEMA" | "STATIC_FORM_READ_ONLY", string, _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"DELETE", "/admin/forms/:id", _standard_schema_spec6.StandardSchemaV1<unknown, unknown> | undefined, _standard_schema_spec6.StandardSchemaV1<unknown, unknown> | undefined, "NOT_FOUND" | "STATIC_FORM_READ_ONLY", string, _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/admin/forms/:id/submissions", _standard_schema_spec6.StandardSchemaV1<unknown, unknown> | undefined, zod211.ZodArray<zod211.ZodObject<{
|
|
809
|
+
id: zod211.ZodString;
|
|
810
|
+
formId: zod211.ZodNullable<zod211.ZodString>;
|
|
811
|
+
formVersion: zod211.ZodNumber;
|
|
812
|
+
data: zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>;
|
|
813
|
+
submittedAt: zod211.ZodDate;
|
|
814
|
+
ip: zod211.ZodNullable<zod211.ZodString>;
|
|
815
|
+
userAgent: zod211.ZodNullable<zod211.ZodString>;
|
|
816
|
+
}, zod_v4_core12.$strip>>, string, "sortOrder", _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/admin/submissions/:id", _standard_schema_spec6.StandardSchemaV1<unknown, unknown> | undefined, zod211.ZodObject<{
|
|
817
|
+
id: zod211.ZodString;
|
|
818
|
+
formId: zod211.ZodNullable<zod211.ZodString>;
|
|
819
|
+
formVersion: zod211.ZodNumber;
|
|
820
|
+
data: zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>;
|
|
821
|
+
submittedAt: zod211.ZodDate;
|
|
822
|
+
ip: zod211.ZodNullable<zod211.ZodString>;
|
|
823
|
+
userAgent: zod211.ZodNullable<zod211.ZodString>;
|
|
824
|
+
}, zod_v4_core12.$strip>, "NOT_FOUND", string, _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"DELETE", "/admin/submissions/:id", _standard_schema_spec6.StandardSchemaV1<unknown, unknown> | undefined, _standard_schema_spec6.StandardSchemaV1<unknown, unknown> | undefined, "NOT_FOUND", string, _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>>], _fragno_dev_db0.ImplicitDatabaseDependencies<_fragno_dev_db_schema0.Schema<Record<"form", _fragno_dev_db_schema0.Table<Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(128)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & Record<"title", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"description", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"slug", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"status", _fragno_dev_db_schema0.Column<"string", string | null, string>> & Record<"dataSchema", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"uiSchema", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"version", _fragno_dev_db_schema0.Column<"integer", number | null, number>> & Record<"createdAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>>, Record<string, _fragno_dev_db_schema0.AnyRelation>, Record<string, _fragno_dev_db_schema0.Index<_fragno_dev_db_schema0.AnyColumn[], readonly string[]>> & Record<"idx_form_status", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string | null, string>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["status"]>> & Record<"idx_form_slug", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string, string>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["slug"]>>>> & Record<"response", _fragno_dev_db_schema0.Table<Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(128)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & Record<"formId", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"formVersion", _fragno_dev_db_schema0.Column<"integer", number, number>> & Record<"data", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"submittedAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>> & Record<"userAgent", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"ip", _fragno_dev_db_schema0.Column<"string", string | null, string | null>>, Record<string, _fragno_dev_db_schema0.AnyRelation>, Record<string, _fragno_dev_db_schema0.Index<_fragno_dev_db_schema0.AnyColumn[], readonly string[]>> & Record<"idx_response_form", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string, string>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["formId"]>> & Record<"idx_response_submitted_at", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["submittedAt"]>>>>>>, _fragno_dev_core0.BoundServices<{
|
|
825
|
+
createForm: (input: NewForm) => _fragno_dev_db0.TxResult<string, _fragno_dev_db_schema0.FragnoId>;
|
|
826
|
+
getForm: (id: string) => _fragno_dev_db0.TxResult<({
|
|
827
|
+
id: _fragno_dev_db_schema0.FragnoId;
|
|
828
|
+
title: string;
|
|
829
|
+
description: string | null;
|
|
830
|
+
slug: string;
|
|
831
|
+
status: string;
|
|
832
|
+
dataSchema: unknown;
|
|
833
|
+
uiSchema: unknown;
|
|
834
|
+
version: number;
|
|
835
|
+
createdAt: Date;
|
|
836
|
+
updatedAt: Date;
|
|
837
|
+
} & {
|
|
838
|
+
id: string;
|
|
839
|
+
status: FormStatus;
|
|
840
|
+
dataSchema: JSONSchema;
|
|
841
|
+
uiSchema: UIElementSchema;
|
|
842
|
+
}) | null, ({
|
|
556
843
|
id: _fragno_dev_db_schema0.FragnoId;
|
|
557
844
|
title: string;
|
|
558
845
|
description: string | null;
|
|
@@ -569,7 +856,23 @@ declare function createFormsFragment(config: FormsConfig | undefined, options: F
|
|
|
569
856
|
dataSchema: JSONSchema;
|
|
570
857
|
uiSchema: UIElementSchema;
|
|
571
858
|
}) | null>;
|
|
572
|
-
getFormBySlug: (slug: string) =>
|
|
859
|
+
getFormBySlug: (slug: string) => _fragno_dev_db0.TxResult<({
|
|
860
|
+
id: _fragno_dev_db_schema0.FragnoId;
|
|
861
|
+
title: string;
|
|
862
|
+
description: string | null;
|
|
863
|
+
slug: string;
|
|
864
|
+
status: string;
|
|
865
|
+
dataSchema: unknown;
|
|
866
|
+
uiSchema: unknown;
|
|
867
|
+
version: number;
|
|
868
|
+
createdAt: Date;
|
|
869
|
+
updatedAt: Date;
|
|
870
|
+
} & {
|
|
871
|
+
id: string;
|
|
872
|
+
status: FormStatus;
|
|
873
|
+
dataSchema: JSONSchema;
|
|
874
|
+
uiSchema: UIElementSchema;
|
|
875
|
+
}) | null, ({
|
|
573
876
|
id: _fragno_dev_db_schema0.FragnoId;
|
|
574
877
|
title: string;
|
|
575
878
|
description: string | null;
|
|
@@ -586,10 +889,37 @@ declare function createFormsFragment(config: FormsConfig | undefined, options: F
|
|
|
586
889
|
dataSchema: JSONSchema;
|
|
587
890
|
uiSchema: UIElementSchema;
|
|
588
891
|
}) | null>;
|
|
589
|
-
updateForm: (id: string, input: UpdateForm) =>
|
|
892
|
+
updateForm: (id: string, input: UpdateForm) => _fragno_dev_db0.TxResult<{
|
|
590
893
|
success: boolean;
|
|
591
|
-
}
|
|
592
|
-
|
|
894
|
+
}, [{
|
|
895
|
+
id: _fragno_dev_db_schema0.FragnoId;
|
|
896
|
+
title: string;
|
|
897
|
+
description: string | null;
|
|
898
|
+
slug: string;
|
|
899
|
+
status: string;
|
|
900
|
+
dataSchema: unknown;
|
|
901
|
+
uiSchema: unknown;
|
|
902
|
+
version: number;
|
|
903
|
+
createdAt: Date;
|
|
904
|
+
updatedAt: Date;
|
|
905
|
+
}[]]>;
|
|
906
|
+
listForms: () => _fragno_dev_db0.TxResult<({
|
|
907
|
+
id: _fragno_dev_db_schema0.FragnoId;
|
|
908
|
+
title: string;
|
|
909
|
+
description: string | null;
|
|
910
|
+
slug: string;
|
|
911
|
+
status: string;
|
|
912
|
+
dataSchema: unknown;
|
|
913
|
+
uiSchema: unknown;
|
|
914
|
+
version: number;
|
|
915
|
+
createdAt: Date;
|
|
916
|
+
updatedAt: Date;
|
|
917
|
+
} & {
|
|
918
|
+
id: string;
|
|
919
|
+
status: FormStatus;
|
|
920
|
+
dataSchema: JSONSchema;
|
|
921
|
+
uiSchema: UIElementSchema;
|
|
922
|
+
})[], ({
|
|
593
923
|
id: _fragno_dev_db_schema0.FragnoId;
|
|
594
924
|
title: string;
|
|
595
925
|
description: string | null;
|
|
@@ -606,13 +936,24 @@ declare function createFormsFragment(config: FormsConfig | undefined, options: F
|
|
|
606
936
|
dataSchema: JSONSchema;
|
|
607
937
|
uiSchema: UIElementSchema;
|
|
608
938
|
})[]>;
|
|
609
|
-
deleteForm: (id: string) =>
|
|
610
|
-
validateData: (schema:
|
|
939
|
+
deleteForm: (id: string) => _fragno_dev_db0.TxResult<void, void>;
|
|
940
|
+
validateData: (schema: JSONSchema, data: Record<string, unknown>) => ValidationResult;
|
|
611
941
|
createResponse: (formId: string, formVersion: number, data: ValidatedData, metadata?: {
|
|
612
942
|
ip?: string | null;
|
|
613
943
|
userAgent?: string | null;
|
|
614
|
-
}) =>
|
|
615
|
-
getResponse: (id: string) =>
|
|
944
|
+
}) => _fragno_dev_db0.TxResult<string, _fragno_dev_db_schema0.FragnoId>;
|
|
945
|
+
getResponse: (id: string) => _fragno_dev_db0.TxResult<({
|
|
946
|
+
id: _fragno_dev_db_schema0.FragnoId;
|
|
947
|
+
formId: string;
|
|
948
|
+
formVersion: number;
|
|
949
|
+
data: unknown;
|
|
950
|
+
submittedAt: Date;
|
|
951
|
+
userAgent: string | null;
|
|
952
|
+
ip: string | null;
|
|
953
|
+
} & {
|
|
954
|
+
id: string;
|
|
955
|
+
data: Record<string, unknown>;
|
|
956
|
+
}) | null, ({
|
|
616
957
|
id: _fragno_dev_db_schema0.FragnoId;
|
|
617
958
|
formId: string;
|
|
618
959
|
formVersion: number;
|
|
@@ -624,7 +965,18 @@ declare function createFormsFragment(config: FormsConfig | undefined, options: F
|
|
|
624
965
|
id: string;
|
|
625
966
|
data: Record<string, unknown>;
|
|
626
967
|
}) | null>;
|
|
627
|
-
listResponses: (formId: string, sort?: SubmissionSortOptions) =>
|
|
968
|
+
listResponses: (formId: string, sort?: SubmissionSortOptions) => _fragno_dev_db0.TxResult<({
|
|
969
|
+
id: _fragno_dev_db_schema0.FragnoId;
|
|
970
|
+
formId: string;
|
|
971
|
+
formVersion: number;
|
|
972
|
+
data: unknown;
|
|
973
|
+
submittedAt: Date;
|
|
974
|
+
userAgent: string | null;
|
|
975
|
+
ip: string | null;
|
|
976
|
+
} & {
|
|
977
|
+
id: string;
|
|
978
|
+
data: Record<string, unknown>;
|
|
979
|
+
})[], ({
|
|
628
980
|
id: _fragno_dev_db_schema0.FragnoId;
|
|
629
981
|
formId: string;
|
|
630
982
|
formVersion: number;
|
|
@@ -636,132 +988,179 @@ declare function createFormsFragment(config: FormsConfig | undefined, options: F
|
|
|
636
988
|
id: string;
|
|
637
989
|
data: Record<string, unknown>;
|
|
638
990
|
})[]>;
|
|
639
|
-
deleteResponse: (id: string) =>
|
|
640
|
-
}>,
|
|
641
|
-
_fragno_internal: _fragno_dev_db0.InternalFragmentInstance;
|
|
642
|
-
}>;
|
|
991
|
+
deleteResponse: (id: string) => _fragno_dev_db0.TxResult<void, void>;
|
|
992
|
+
}>, _fragno_dev_db0.DatabaseServiceContext<_fragno_dev_db0.HooksMap>, _fragno_dev_db0.DatabaseRequestContext<_fragno_dev_db0.HooksMap>, _fragno_dev_db_fragment_definition_builder0.DatabaseRequestStorage, FragnoPublicConfigWithDatabase>;
|
|
643
993
|
declare function createFormsClients(fragnoConfig: FragnoPublicClientConfig): {
|
|
644
|
-
useForm: _fragno_dev_core_client0.FragnoClientHookData<"GET", "/:slug",
|
|
645
|
-
id:
|
|
646
|
-
title:
|
|
647
|
-
description:
|
|
648
|
-
slug:
|
|
649
|
-
status:
|
|
994
|
+
useForm: _fragno_dev_core_client0.FragnoClientHookData<"GET", "/:slug", zod211.ZodObject<{
|
|
995
|
+
id: zod211.ZodString;
|
|
996
|
+
title: zod211.ZodString;
|
|
997
|
+
description: zod211.ZodOptional<zod211.ZodNullable<zod211.ZodString>>;
|
|
998
|
+
slug: zod211.ZodString;
|
|
999
|
+
status: zod211.ZodEnum<{
|
|
1000
|
+
draft: "draft";
|
|
1001
|
+
open: "open";
|
|
1002
|
+
closed: "closed";
|
|
1003
|
+
static: "static";
|
|
1004
|
+
}>;
|
|
1005
|
+
dataSchema: zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>;
|
|
1006
|
+
uiSchema: zod211.ZodOptional<zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>>;
|
|
1007
|
+
version: zod211.ZodNumber;
|
|
1008
|
+
createdAt: zod211.ZodDate;
|
|
1009
|
+
updatedAt: zod211.ZodDate;
|
|
1010
|
+
}, zod_v4_core12.$strip>, "NOT_FOUND", string>;
|
|
1011
|
+
useSubmitForm: _fragno_dev_core_client0.FragnoClientMutatorData<_fragno_dev_core_api4.NonGetHTTPMethod, "/:slug/submit", zod211.ZodObject<{
|
|
1012
|
+
data: zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>;
|
|
1013
|
+
securityToken: zod211.ZodOptional<zod211.ZodString>;
|
|
1014
|
+
}, zod_v4_core12.$strip> | undefined, zod211.ZodString | undefined, "NOT_FOUND" | "VALIDATION_ERROR" | "FORM_NOT_OPEN", string>;
|
|
1015
|
+
useForms: _fragno_dev_core_client0.FragnoClientHookData<"GET", "/admin/forms", zod211.ZodArray<zod211.ZodObject<{
|
|
1016
|
+
id: zod211.ZodString;
|
|
1017
|
+
title: zod211.ZodString;
|
|
1018
|
+
description: zod211.ZodOptional<zod211.ZodNullable<zod211.ZodString>>;
|
|
1019
|
+
slug: zod211.ZodString;
|
|
1020
|
+
status: zod211.ZodEnum<{
|
|
650
1021
|
draft: "draft";
|
|
651
1022
|
open: "open";
|
|
652
1023
|
closed: "closed";
|
|
653
1024
|
static: "static";
|
|
654
1025
|
}>;
|
|
655
|
-
dataSchema:
|
|
656
|
-
uiSchema:
|
|
657
|
-
version:
|
|
658
|
-
createdAt:
|
|
659
|
-
updatedAt:
|
|
660
|
-
},
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
title: zod293.ZodString;
|
|
668
|
-
description: zod293.ZodNullable<zod293.ZodString>;
|
|
669
|
-
slug: zod293.ZodString;
|
|
670
|
-
status: zod293.ZodEnum<{
|
|
1026
|
+
dataSchema: zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>;
|
|
1027
|
+
uiSchema: zod211.ZodOptional<zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>>;
|
|
1028
|
+
version: zod211.ZodNumber;
|
|
1029
|
+
createdAt: zod211.ZodDate;
|
|
1030
|
+
updatedAt: zod211.ZodDate;
|
|
1031
|
+
}, zod_v4_core12.$strip>>, string, string>;
|
|
1032
|
+
useFormById: _fragno_dev_core_client0.FragnoClientHookData<"GET", "/admin/forms/:id", zod211.ZodObject<{
|
|
1033
|
+
id: zod211.ZodString;
|
|
1034
|
+
title: zod211.ZodString;
|
|
1035
|
+
description: zod211.ZodOptional<zod211.ZodNullable<zod211.ZodString>>;
|
|
1036
|
+
slug: zod211.ZodString;
|
|
1037
|
+
status: zod211.ZodEnum<{
|
|
671
1038
|
draft: "draft";
|
|
672
1039
|
open: "open";
|
|
673
1040
|
closed: "closed";
|
|
674
1041
|
static: "static";
|
|
675
1042
|
}>;
|
|
676
|
-
dataSchema:
|
|
677
|
-
uiSchema:
|
|
678
|
-
version:
|
|
679
|
-
createdAt:
|
|
680
|
-
updatedAt:
|
|
681
|
-
},
|
|
682
|
-
useCreateForm: _fragno_dev_core_client0.FragnoClientMutatorData<
|
|
683
|
-
|
|
1043
|
+
dataSchema: zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>;
|
|
1044
|
+
uiSchema: zod211.ZodOptional<zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>>;
|
|
1045
|
+
version: zod211.ZodNumber;
|
|
1046
|
+
createdAt: zod211.ZodDate;
|
|
1047
|
+
updatedAt: zod211.ZodDate;
|
|
1048
|
+
}, zod_v4_core12.$strip>, "NOT_FOUND", string>;
|
|
1049
|
+
useCreateForm: _fragno_dev_core_client0.FragnoClientMutatorData<_fragno_dev_core_api4.NonGetHTTPMethod, "/admin/forms", zod211.ZodObject<{
|
|
1050
|
+
title: zod211.ZodString;
|
|
1051
|
+
description: zod211.ZodOptional<zod211.ZodNullable<zod211.ZodString>>;
|
|
1052
|
+
slug: zod211.ZodString;
|
|
1053
|
+
status: zod211.ZodEnum<{
|
|
684
1054
|
draft: "draft";
|
|
685
1055
|
open: "open";
|
|
686
1056
|
closed: "closed";
|
|
687
1057
|
static: "static";
|
|
688
1058
|
}>;
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
description: zod293.ZodNullable<zod293.ZodString>;
|
|
698
|
-
slug: zod293.ZodString;
|
|
699
|
-
status: zod293.ZodEnum<{
|
|
1059
|
+
dataSchema: zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>;
|
|
1060
|
+
uiSchema: zod211.ZodOptional<zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>>;
|
|
1061
|
+
}, zod_v4_core12.$strip> | _standard_schema_spec6.StandardSchemaV1<unknown, unknown> | undefined, zod211.ZodString | zod211.ZodArray<zod211.ZodObject<{
|
|
1062
|
+
id: zod211.ZodString;
|
|
1063
|
+
title: zod211.ZodString;
|
|
1064
|
+
description: zod211.ZodOptional<zod211.ZodNullable<zod211.ZodString>>;
|
|
1065
|
+
slug: zod211.ZodString;
|
|
1066
|
+
status: zod211.ZodEnum<{
|
|
700
1067
|
draft: "draft";
|
|
701
1068
|
open: "open";
|
|
702
1069
|
closed: "closed";
|
|
703
1070
|
static: "static";
|
|
704
1071
|
}>;
|
|
705
|
-
dataSchema:
|
|
706
|
-
uiSchema:
|
|
707
|
-
version:
|
|
708
|
-
createdAt:
|
|
709
|
-
updatedAt:
|
|
710
|
-
},
|
|
711
|
-
useUpdateForm: _fragno_dev_core_client0.FragnoClientMutatorData<
|
|
712
|
-
|
|
1072
|
+
dataSchema: zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>;
|
|
1073
|
+
uiSchema: zod211.ZodOptional<zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>>;
|
|
1074
|
+
version: zod211.ZodNumber;
|
|
1075
|
+
createdAt: zod211.ZodDate;
|
|
1076
|
+
updatedAt: zod211.ZodDate;
|
|
1077
|
+
}, zod_v4_core12.$strip>> | undefined, string, string>;
|
|
1078
|
+
useUpdateForm: _fragno_dev_core_client0.FragnoClientMutatorData<_fragno_dev_core_api4.NonGetHTTPMethod, "/admin/forms/:id", zod211.ZodObject<{
|
|
1079
|
+
title: zod211.ZodOptional<zod211.ZodString>;
|
|
1080
|
+
description: zod211.ZodOptional<zod211.ZodOptional<zod211.ZodNullable<zod211.ZodString>>>;
|
|
1081
|
+
slug: zod211.ZodOptional<zod211.ZodString>;
|
|
1082
|
+
status: zod211.ZodOptional<zod211.ZodEnum<{
|
|
713
1083
|
draft: "draft";
|
|
714
1084
|
open: "open";
|
|
715
1085
|
closed: "closed";
|
|
716
1086
|
static: "static";
|
|
717
1087
|
}>>;
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
status:
|
|
1088
|
+
dataSchema: zod211.ZodOptional<zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>>;
|
|
1089
|
+
uiSchema: zod211.ZodOptional<zod211.ZodOptional<zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>>>;
|
|
1090
|
+
}, zod_v4_core12.$strip> | _standard_schema_spec6.StandardSchemaV1<unknown, unknown> | undefined, zod211.ZodObject<{
|
|
1091
|
+
id: zod211.ZodString;
|
|
1092
|
+
title: zod211.ZodString;
|
|
1093
|
+
description: zod211.ZodOptional<zod211.ZodNullable<zod211.ZodString>>;
|
|
1094
|
+
slug: zod211.ZodString;
|
|
1095
|
+
status: zod211.ZodEnum<{
|
|
1096
|
+
draft: "draft";
|
|
1097
|
+
open: "open";
|
|
1098
|
+
closed: "closed";
|
|
1099
|
+
static: "static";
|
|
1100
|
+
}>;
|
|
1101
|
+
dataSchema: zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>;
|
|
1102
|
+
uiSchema: zod211.ZodOptional<zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>>;
|
|
1103
|
+
version: zod211.ZodNumber;
|
|
1104
|
+
createdAt: zod211.ZodDate;
|
|
1105
|
+
updatedAt: zod211.ZodDate;
|
|
1106
|
+
}, zod_v4_core12.$strip> | _standard_schema_spec6.StandardSchemaV1<unknown, unknown> | undefined, "NOT_FOUND" | "INVALID_JSON_SCHEMA" | "STATIC_FORM_READ_ONLY", string>;
|
|
1107
|
+
useDeleteForm: _fragno_dev_core_client0.FragnoClientMutatorData<_fragno_dev_core_api4.NonGetHTTPMethod, "/admin/forms/:id", zod211.ZodObject<{
|
|
1108
|
+
title: zod211.ZodOptional<zod211.ZodString>;
|
|
1109
|
+
description: zod211.ZodOptional<zod211.ZodOptional<zod211.ZodNullable<zod211.ZodString>>>;
|
|
1110
|
+
slug: zod211.ZodOptional<zod211.ZodString>;
|
|
1111
|
+
status: zod211.ZodOptional<zod211.ZodEnum<{
|
|
726
1112
|
draft: "draft";
|
|
727
1113
|
open: "open";
|
|
728
1114
|
closed: "closed";
|
|
729
1115
|
static: "static";
|
|
730
1116
|
}>>;
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
1117
|
+
dataSchema: zod211.ZodOptional<zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>>;
|
|
1118
|
+
uiSchema: zod211.ZodOptional<zod211.ZodOptional<zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>>>;
|
|
1119
|
+
}, zod_v4_core12.$strip> | _standard_schema_spec6.StandardSchemaV1<unknown, unknown> | undefined, zod211.ZodObject<{
|
|
1120
|
+
id: zod211.ZodString;
|
|
1121
|
+
title: zod211.ZodString;
|
|
1122
|
+
description: zod211.ZodOptional<zod211.ZodNullable<zod211.ZodString>>;
|
|
1123
|
+
slug: zod211.ZodString;
|
|
1124
|
+
status: zod211.ZodEnum<{
|
|
1125
|
+
draft: "draft";
|
|
1126
|
+
open: "open";
|
|
1127
|
+
closed: "closed";
|
|
1128
|
+
static: "static";
|
|
1129
|
+
}>;
|
|
1130
|
+
dataSchema: zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>;
|
|
1131
|
+
uiSchema: zod211.ZodOptional<zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>>;
|
|
1132
|
+
version: zod211.ZodNumber;
|
|
1133
|
+
createdAt: zod211.ZodDate;
|
|
1134
|
+
updatedAt: zod211.ZodDate;
|
|
1135
|
+
}, zod_v4_core12.$strip> | _standard_schema_spec6.StandardSchemaV1<unknown, unknown> | undefined, "NOT_FOUND" | "INVALID_JSON_SCHEMA" | "STATIC_FORM_READ_ONLY", string>;
|
|
1136
|
+
useSubmissions: _fragno_dev_core_client0.FragnoClientHookData<"GET", "/admin/forms/:id/submissions", zod211.ZodArray<zod211.ZodObject<{
|
|
1137
|
+
id: zod211.ZodString;
|
|
1138
|
+
formId: zod211.ZodNullable<zod211.ZodString>;
|
|
1139
|
+
formVersion: zod211.ZodNumber;
|
|
1140
|
+
data: zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>;
|
|
1141
|
+
submittedAt: zod211.ZodDate;
|
|
1142
|
+
ip: zod211.ZodNullable<zod211.ZodString>;
|
|
1143
|
+
userAgent: zod211.ZodNullable<zod211.ZodString>;
|
|
1144
|
+
}, zod_v4_core12.$strip>>, string, "sortOrder">;
|
|
1145
|
+
useSubmission: _fragno_dev_core_client0.FragnoClientHookData<"GET", "/admin/submissions/:id", zod211.ZodObject<{
|
|
1146
|
+
id: zod211.ZodString;
|
|
1147
|
+
formId: zod211.ZodNullable<zod211.ZodString>;
|
|
1148
|
+
formVersion: zod211.ZodNumber;
|
|
1149
|
+
data: zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>;
|
|
1150
|
+
submittedAt: zod211.ZodDate;
|
|
1151
|
+
ip: zod211.ZodNullable<zod211.ZodString>;
|
|
1152
|
+
userAgent: zod211.ZodNullable<zod211.ZodString>;
|
|
1153
|
+
}, zod_v4_core12.$strip>, "NOT_FOUND", string>;
|
|
1154
|
+
useDeleteSubmission: _fragno_dev_core_client0.FragnoClientMutatorData<_fragno_dev_core_api4.NonGetHTTPMethod, "/admin/submissions/:id", _standard_schema_spec6.StandardSchemaV1<unknown, unknown> | undefined, _standard_schema_spec6.StandardSchemaV1<unknown, unknown> | zod211.ZodObject<{
|
|
1155
|
+
id: zod211.ZodString;
|
|
1156
|
+
formId: zod211.ZodNullable<zod211.ZodString>;
|
|
1157
|
+
formVersion: zod211.ZodNumber;
|
|
1158
|
+
data: zod211.ZodRecord<zod211.ZodString, zod211.ZodUnknown>;
|
|
1159
|
+
submittedAt: zod211.ZodDate;
|
|
1160
|
+
ip: zod211.ZodNullable<zod211.ZodString>;
|
|
1161
|
+
userAgent: zod211.ZodNullable<zod211.ZodString>;
|
|
1162
|
+
}, zod_v4_core12.$strip> | undefined, "NOT_FOUND", string>;
|
|
764
1163
|
};
|
|
765
1164
|
//#endregion
|
|
766
|
-
export { FormsConfig, type FragnoRouteConfig, StaticForm, type SubmissionSortOptions, createFormsClients, createFormsFragment, formsFragmentDef, routes };
|
|
1165
|
+
export { type Form, type FormResponse, type FormResponseMetadata, type FormStatus, FormsConfig, type FragnoRouteConfig, type NewForm, type NewFormResponse, StaticForm, type SubmissionSortOptions, type UpdateForm, createFormsClients, createFormsFragment, formsFragmentDef, routes };
|
|
767
1166
|
//# sourceMappingURL=index.d.ts.map
|