@holo-js/forms 0.1.4 → 0.1.6

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.
@@ -0,0 +1,59 @@
1
+ import {
2
+ FormContractError
3
+ } from "./chunk-OFPH5LBY.mjs";
4
+
5
+ // src/security-shared.ts
6
+ function isMissingOptionalPackageError(error) {
7
+ if (!(error instanceof Error)) {
8
+ return false;
9
+ }
10
+ return [
11
+ /Cannot find package ['"]?@holo-js\/security['"]?/,
12
+ /Cannot find module ['"]?@holo-js\/security['"]?/,
13
+ /Failed to resolve module specifier ['"]?@holo-js\/security['"]?/,
14
+ /Failed to load url ['"]?@holo-js\/security['"]?/,
15
+ /Could not resolve ['"]?@holo-js\/security['"]?/
16
+ ].some((pattern) => pattern.test(error.message));
17
+ }
18
+ function createMissingSecurityPackageError() {
19
+ return new FormContractError(
20
+ "[@holo-js/forms] Security-aware form options require the optional @holo-js/security package to be installed."
21
+ );
22
+ }
23
+ function parseCookieHeader(header) {
24
+ const decodeCookiePart = (value) => {
25
+ try {
26
+ return decodeURIComponent(value);
27
+ } catch {
28
+ return void 0;
29
+ }
30
+ };
31
+ return Object.freeze(Object.fromEntries(
32
+ header.split(";").map((segment) => segment.trim()).filter(Boolean).map((segment) => {
33
+ const separator = segment.indexOf("=");
34
+ if (separator <= 0) {
35
+ return void 0;
36
+ }
37
+ const key = decodeCookiePart(segment.slice(0, separator));
38
+ const value = decodeCookiePart(segment.slice(separator + 1));
39
+ if (!key || typeof value === "undefined") {
40
+ return void 0;
41
+ }
42
+ return [
43
+ key,
44
+ value
45
+ ];
46
+ }).filter((entry) => !!entry)
47
+ ));
48
+ }
49
+ function isRootSecurityError(error) {
50
+ const candidate = error;
51
+ return error instanceof Error && typeof candidate?.status === "number" && (candidate.status === 419 || candidate.status === 429);
52
+ }
53
+
54
+ export {
55
+ isMissingOptionalPackageError,
56
+ createMissingSecurityPackageError,
57
+ parseCookieHeader,
58
+ isRootSecurityError
59
+ };
@@ -0,0 +1,40 @@
1
+ // src/schema.ts
2
+ import {
3
+ defineSchema,
4
+ isValidationSchema
5
+ } from "@holo-js/validation";
6
+ import {
7
+ createErrorBag,
8
+ DEFAULT_VALIDATION_BAG,
9
+ defineSchema as defineSchema2,
10
+ field,
11
+ isValidationException,
12
+ parse,
13
+ safeParse,
14
+ ValidationException,
15
+ validationInternals
16
+ } from "@holo-js/validation";
17
+ function schema(shapeOrSchema) {
18
+ const base = isValidationSchema(shapeOrSchema) ? shapeOrSchema : defineSchema(shapeOrSchema);
19
+ return Object.freeze({
20
+ ...base,
21
+ mode: "form"
22
+ });
23
+ }
24
+ function isFormSchema(value) {
25
+ return isValidationSchema(value) && value.mode === "form";
26
+ }
27
+
28
+ export {
29
+ schema,
30
+ isFormSchema,
31
+ createErrorBag,
32
+ DEFAULT_VALIDATION_BAG,
33
+ defineSchema2 as defineSchema,
34
+ field,
35
+ isValidationException,
36
+ parse,
37
+ safeParse,
38
+ ValidationException,
39
+ validationInternals
40
+ };
@@ -0,0 +1,11 @@
1
+ // src/errors.ts
2
+ var FormContractError = class extends Error {
3
+ constructor(message) {
4
+ super(message);
5
+ this.name = "FormContractError";
6
+ }
7
+ };
8
+
9
+ export {
10
+ FormContractError
11
+ };
@@ -0,0 +1,162 @@
1
+ import {
2
+ FormContractError
3
+ } from "./chunk-OFPH5LBY.mjs";
4
+
5
+ // src/failure.ts
6
+ function normalizeStatus(value, fallback) {
7
+ if (typeof value === "undefined") {
8
+ return fallback;
9
+ }
10
+ if (!Number.isInteger(value) || value < 100) {
11
+ throw new FormContractError("HTTP status codes must be integers greater than or equal to 100.");
12
+ }
13
+ return value;
14
+ }
15
+ function normalizeFailureInput(input, fallbackStatus) {
16
+ if (typeof input === "number") {
17
+ return {
18
+ status: normalizeStatus(input, fallbackStatus)
19
+ };
20
+ }
21
+ return {
22
+ status: normalizeStatus(input?.status, fallbackStatus),
23
+ errors: input?.errors
24
+ };
25
+ }
26
+ function normalizeFailureErrors(fallback, override) {
27
+ if (!override) {
28
+ return fallback;
29
+ }
30
+ const normalized = { ...fallback };
31
+ for (const [field, messages] of Object.entries(override)) {
32
+ if (typeof messages !== "undefined") {
33
+ normalized[field] = messages;
34
+ }
35
+ }
36
+ return normalized;
37
+ }
38
+
39
+ // src/sensitiveInput.ts
40
+ var DEFAULT_DONT_FLASH_FIELDS = Object.freeze([
41
+ "confirm_password",
42
+ "confirmPassword",
43
+ "current_password",
44
+ "currentPassword",
45
+ "new_password",
46
+ "newPassword",
47
+ "password",
48
+ "password_confirmation",
49
+ "passwordConfirmation"
50
+ ]);
51
+ var DEFAULT_DONT_FLASH_FIELD_SET = new Set(DEFAULT_DONT_FLASH_FIELDS);
52
+ function isPlainObject(value) {
53
+ return !!value && typeof value === "object" && !Array.isArray(value) && !(value instanceof Date) && !(value instanceof Blob);
54
+ }
55
+ function isFieldDefinition(value) {
56
+ return isPlainObject(value) && typeof value.kind === "string" && Array.isArray(value.rules);
57
+ }
58
+ function isSchemaField(value) {
59
+ return isPlainObject(value) && value.kind === "field" && isFieldDefinition(value.definition);
60
+ }
61
+ function collectSensitivePathsFromFields(fields, prefix = "", output = []) {
62
+ for (const [key, value] of Object.entries(fields)) {
63
+ const path = prefix ? `${prefix}.${key}` : key;
64
+ if (DEFAULT_DONT_FLASH_FIELD_SET.has(key)) {
65
+ output.push(path);
66
+ }
67
+ if (isSchemaField(value)) {
68
+ if (value.definition.sensitive === true || value.definition.kind === "file") {
69
+ output.push(path);
70
+ }
71
+ continue;
72
+ }
73
+ if (isPlainObject(value)) {
74
+ collectSensitivePathsFromFields(value, path, output);
75
+ }
76
+ }
77
+ return output;
78
+ }
79
+ function collectSensitivePaths(schemaDefinition) {
80
+ if (!schemaDefinition) {
81
+ return [];
82
+ }
83
+ return collectSensitivePathsFromFields(schemaDefinition.fields);
84
+ }
85
+ function deletePath(root, path) {
86
+ const parts = path.split(".").filter(Boolean);
87
+ const leaf = parts.at(-1);
88
+ if (!leaf) {
89
+ return;
90
+ }
91
+ let cursor = root;
92
+ for (const part of parts.slice(0, -1)) {
93
+ if (!isPlainObject(cursor)) {
94
+ return;
95
+ }
96
+ cursor = cursor[part];
97
+ }
98
+ if (isPlainObject(cursor)) {
99
+ delete cursor[leaf];
100
+ }
101
+ }
102
+ function clearPath(root, path) {
103
+ const parts = path.split(".").filter(Boolean);
104
+ const leaf = parts.at(-1);
105
+ if (!leaf) {
106
+ return;
107
+ }
108
+ let cursor = root;
109
+ for (const part of parts.slice(0, -1)) {
110
+ if (!isPlainObject(cursor)) {
111
+ return;
112
+ }
113
+ cursor = cursor[part];
114
+ }
115
+ if (isPlainObject(cursor) && leaf in cursor) {
116
+ cursor[leaf] = "";
117
+ }
118
+ }
119
+ function sanitizePlainObject(values, sensitivePaths) {
120
+ if (!isPlainObject(values)) {
121
+ return values;
122
+ }
123
+ const output = structuredClone(values);
124
+ for (const field of DEFAULT_DONT_FLASH_FIELD_SET) {
125
+ delete output[field];
126
+ }
127
+ for (const path of sensitivePaths) {
128
+ deletePath(output, path);
129
+ }
130
+ return output;
131
+ }
132
+ function sanitizeFlashedInput(values, schemaDefinition) {
133
+ return sanitizePlainObject(values, collectSensitivePaths(schemaDefinition));
134
+ }
135
+ function clearSensitiveInputValues(values, schemaDefinition) {
136
+ if (!isPlainObject(values)) {
137
+ return values;
138
+ }
139
+ const mutableValues = values;
140
+ for (const field of DEFAULT_DONT_FLASH_FIELD_SET) {
141
+ if (field in mutableValues) {
142
+ mutableValues[field] = "";
143
+ }
144
+ }
145
+ for (const path of collectSensitivePaths(schemaDefinition)) {
146
+ clearPath(mutableValues, path);
147
+ }
148
+ return values;
149
+ }
150
+ var sensitiveInputInternals = {
151
+ collectSensitivePaths,
152
+ DEFAULT_DONT_FLASH_FIELDS
153
+ };
154
+
155
+ export {
156
+ normalizeStatus,
157
+ normalizeFailureInput,
158
+ normalizeFailureErrors,
159
+ sanitizeFlashedInput,
160
+ clearSensitiveInputValues,
161
+ sensitiveInputInternals
162
+ };
@@ -0,0 +1,131 @@
1
+ import { ValidationSchema, SchemaInputShape, ValidationErrorBag, InferSchemaData, FormLikeValidationInput } from '@holo-js/validation';
2
+ import { FormSchema } from './schema.js';
3
+
4
+ type FormFailureErrors = Readonly<Partial<Record<string, readonly string[]>>>;
5
+ interface FormFailureOptions {
6
+ readonly status?: number;
7
+ readonly errors?: FormFailureErrors;
8
+ }
9
+ type FormFailureInput = number | FormFailureOptions | undefined;
10
+ declare function normalizeStatus(value: number | undefined, fallback: number): number;
11
+
12
+ type SensitiveSchema = Pick<ValidationSchema<SchemaInputShape>, 'fields'>;
13
+ declare function collectSensitivePaths(schemaDefinition: SensitiveSchema | undefined): readonly string[];
14
+ declare function sanitizeFlashedInput<TData>(values: Partial<TData> | TData, schemaDefinition?: SensitiveSchema): Partial<TData> | TData;
15
+ declare const sensitiveInputInternals: {
16
+ collectSensitivePaths: typeof collectSensitivePaths;
17
+ DEFAULT_DONT_FLASH_FIELDS: readonly string[];
18
+ };
19
+
20
+ interface FormFailurePayload<TData> {
21
+ readonly ok: false;
22
+ readonly status: number;
23
+ readonly valid: false;
24
+ readonly values: Partial<TData>;
25
+ readonly errors: Record<string, readonly string[]>;
26
+ readonly retryAfterSeconds?: number;
27
+ readonly retryAt?: string;
28
+ }
29
+ interface FormSuccessPayload<TPayload = undefined> {
30
+ readonly ok: true;
31
+ readonly status: number;
32
+ readonly data: TPayload;
33
+ }
34
+ interface SerializedFormSubmission<TData> {
35
+ readonly ok?: false;
36
+ readonly valid: boolean;
37
+ readonly submitted: true;
38
+ readonly values: Partial<TData> | TData;
39
+ readonly errors: Record<string, readonly string[]>;
40
+ }
41
+ interface FormSecurityOptions {
42
+ readonly throttle?: string;
43
+ readonly bag?: string;
44
+ }
45
+ type RequestLikeHeaders = Headers | ReadonlyArray<readonly [string, string]> | Record<string, string | readonly string[] | undefined> | {
46
+ readonly get?: (name: string) => string | null | undefined;
47
+ readonly forEach?: (callback: (value: string, key: string) => void) => void;
48
+ readonly entries?: () => Iterable<readonly [string, string]>;
49
+ };
50
+ interface StructuredRequestLikeObject {
51
+ readonly method?: string;
52
+ readonly path?: string;
53
+ readonly url?: string | URL;
54
+ readonly headers?: RequestLikeHeaders;
55
+ readonly body?: unknown;
56
+ }
57
+ interface FormFailureMetadata {
58
+ readonly retryAfterSeconds?: number;
59
+ readonly retryAt?: string;
60
+ }
61
+ interface FormRequestLikeInput {
62
+ readonly method?: string;
63
+ readonly path?: string;
64
+ readonly url?: string | URL;
65
+ readonly headers?: RequestLikeHeaders;
66
+ readonly body?: unknown;
67
+ readonly req?: Request | {
68
+ readonly method?: string;
69
+ readonly url?: string;
70
+ readonly headers?: RequestLikeHeaders;
71
+ readonly body?: unknown;
72
+ };
73
+ readonly node?: {
74
+ readonly req?: {
75
+ readonly method?: string;
76
+ readonly url?: string;
77
+ readonly headers?: RequestLikeHeaders;
78
+ readonly body?: unknown;
79
+ };
80
+ };
81
+ readonly web?: {
82
+ readonly request?: Request | StructuredRequestLikeObject;
83
+ };
84
+ }
85
+ interface FormSubmissionSuccess<TData> {
86
+ readonly valid: true;
87
+ readonly submitted: true;
88
+ readonly data: TData;
89
+ readonly values: TData;
90
+ readonly errors: ValidationErrorBag<TData>;
91
+ serialize(): SerializedFormSubmission<TData>;
92
+ success(): FormSuccessPayload<undefined>;
93
+ success<TPayload>(payload: TPayload, status?: number): FormSuccessPayload<TPayload>;
94
+ fail(): FormFailurePayload<TData>;
95
+ fail(status?: number): FormFailurePayload<TData>;
96
+ fail(options: FormFailureOptions): FormFailurePayload<TData>;
97
+ }
98
+ interface FormSubmissionFailure<TData> {
99
+ readonly valid: false;
100
+ readonly submitted: true;
101
+ readonly data?: undefined;
102
+ readonly values: Partial<TData>;
103
+ readonly errors: ValidationErrorBag<TData>;
104
+ serialize(): SerializedFormSubmission<TData>;
105
+ success(): FormSuccessPayload<undefined>;
106
+ success<TPayload>(payload: TPayload, status?: number): FormSuccessPayload<TPayload>;
107
+ fail(): FormFailurePayload<TData>;
108
+ fail(status?: number): FormFailurePayload<TData>;
109
+ fail(options: FormFailureOptions): FormFailurePayload<TData>;
110
+ }
111
+ type FormSubmissionResult<TData> = FormSubmissionSuccess<TData> | FormSubmissionFailure<TData>;
112
+ declare function serializeSubmissionState<TData>(valid: boolean, values: Partial<TData> | TData, errors: ValidationErrorBag<TData>, schemaDefinition?: FormSchema): SerializedFormSubmission<TData>;
113
+ declare function createSubmission<TData>(valid: boolean, values: Partial<TData> | TData, errors: ValidationErrorBag<TData>, failureStatus?: number, schemaDefinition?: FormSchema, failureMetadata?: FormFailureMetadata): FormSubmissionResult<TData>;
114
+ declare function createSuccessfulSubmission<TShape extends SchemaInputShape>(schemaDefinition: FormSchema<TShape>, data: InferSchemaData<TShape>): FormSubmissionSuccess<InferSchemaData<TShape>>;
115
+ declare function createFailedSubmission<TShape extends SchemaInputShape>(schemaDefinition: FormSchema<TShape>, values: Partial<InferSchemaData<TShape>>, flattenedErrors: Record<string, readonly string[]>, status?: number, failureMetadata?: FormFailureMetadata): FormSubmissionFailure<InferSchemaData<TShape>>;
116
+ declare function isRequestLikeHeaders(value: unknown): value is RequestLikeHeaders;
117
+ declare function normalizeRequestHeaders(input: unknown): Headers;
118
+ declare function normalizeRequestLikeInput(input: FormLikeValidationInput | FormRequestLikeInput | null | undefined): Request | undefined;
119
+ declare function safeParse<TShape extends SchemaInputShape>(input: FormLikeValidationInput | FormRequestLikeInput, schemaDefinition: FormSchema<TShape>, options?: FormSecurityOptions): Promise<FormSubmissionResult<InferSchemaData<TShape>>>;
120
+ declare function validate<TShape extends SchemaInputShape>(input: FormLikeValidationInput | FormRequestLikeInput, schemaDefinition: FormSchema<TShape>, options?: FormSecurityOptions): Promise<InferSchemaData<TShape>>;
121
+ declare const formsInternals: {
122
+ createSubmission: typeof createSubmission;
123
+ isRequestLikeHeaders: typeof isRequestLikeHeaders;
124
+ normalizeRequestLikeInput: typeof normalizeRequestLikeInput;
125
+ normalizeStatus: typeof normalizeStatus;
126
+ normalizeRequestHeaders: typeof normalizeRequestHeaders;
127
+ sanitizeFlashedInput: typeof sanitizeFlashedInput;
128
+ serializeSubmissionState: typeof serializeSubmissionState;
129
+ };
130
+
131
+ export { type FormFailureErrors as F, type SerializedFormSubmission as S, type FormFailureInput as a, type FormFailureOptions as b, type FormFailurePayload as c, type FormRequestLikeInput as d, type FormSecurityOptions as e, type FormSubmissionFailure as f, type FormSubmissionResult as g, type FormSubmissionSuccess as h, type FormSuccessPayload as i, createFailedSubmission as j, createSuccessfulSubmission as k, formsInternals as l, sanitizeFlashedInput as m, sensitiveInputInternals as n, safeParse as s, validate as v };
package/dist/index.d.ts CHANGED
@@ -1,102 +1,9 @@
1
- import { SchemaInputShape, ValidationSchema, InferSchemaData, ValidationErrorBag, FormLikeValidationInput } from '@holo-js/validation';
2
- export { ErrorTree, ErrorTreeNode, FieldDefinition, FieldRule, InferSchemaData, StandardSchemaV1, StandardSchemaV1Issue, StandardSchemaV1Props, StandardSchemaV1Result, ValidationErrorBag, ValidationFailure, ValidationResult, ValidationSchema, ValidationSuccess, WebFileLike, createErrorBag, defineSchema, field, parse, safeParse } from '@holo-js/validation';
1
+ export { F as FormFailureErrors, a as FormFailureInput, b as FormFailureOptions, c as FormFailurePayload, d as FormRequestLikeInput, e as FormSecurityOptions, f as FormSubmissionFailure, g as FormSubmissionResult, h as FormSubmissionSuccess, i as FormSuccessPayload, S as SerializedFormSubmission, j as createFailedSubmission, k as createSuccessfulSubmission, l as formsInternals, s as safeParse, m as sanitizeFlashedInput, n as sensitiveInputInternals, v as validate } from './contracts-D1dERmQn.js';
2
+ export { FormSchema, InferFormData, isFormSchema, schema } from './schema.js';
3
+ export { DEFAULT_VALIDATION_BAG, ErrorTree, ErrorTreeNode, FieldDefinition, FieldRule, InferSchemaData, SerializedValidationException, StandardSchemaV1, StandardSchemaV1Issue, StandardSchemaV1Props, StandardSchemaV1Result, ValidationErrorBag, ValidationException, ValidationExceptionOptions, ValidationFailure, ValidationResult, ValidationSchema, ValidationSuccess, WebFileLike, createErrorBag, defineSchema, field, isValidationException, parse } from '@holo-js/validation';
3
4
 
4
- interface FormSchema<TShape extends SchemaInputShape = SchemaInputShape> extends ValidationSchema<TShape> {
5
- readonly mode: 'form';
6
- readonly fields: ValidationSchema<TShape>['fields'];
7
- readonly $values?: Partial<InferSchemaData<TShape>>;
8
- }
9
- interface FormFailurePayload<TData> {
10
- readonly ok: false;
11
- readonly status: number;
12
- readonly valid: false;
13
- readonly values: Partial<TData>;
14
- readonly errors: Record<string, readonly string[]>;
15
- }
16
- interface FormSuccessPayload<TPayload = undefined> {
17
- readonly ok: true;
18
- readonly status: number;
19
- readonly data: TPayload;
20
- }
21
- interface SerializedFormSubmission<TData> {
22
- readonly valid: boolean;
23
- readonly submitted: true;
24
- readonly values: Partial<TData> | TData;
25
- readonly errors: Record<string, readonly string[]>;
26
- }
27
- interface FormSecurityOptions {
28
- readonly csrf?: boolean;
29
- readonly throttle?: string;
30
- }
31
- type RequestLikeHeaders = Headers | ReadonlyArray<readonly [string, string]> | Record<string, string | readonly string[] | undefined>;
32
- interface FormRequestLikeInput {
33
- readonly method?: string;
34
- readonly path?: string;
35
- readonly url?: string | URL;
36
- readonly headers?: RequestLikeHeaders;
37
- readonly body?: unknown;
38
- readonly req?: Request | {
39
- readonly method?: string;
40
- readonly url?: string;
41
- readonly headers?: RequestLikeHeaders;
42
- readonly body?: unknown;
43
- };
44
- readonly node?: {
45
- readonly req?: {
46
- readonly method?: string;
47
- readonly url?: string;
48
- readonly headers?: RequestLikeHeaders;
49
- readonly body?: unknown;
50
- };
51
- };
52
- readonly web?: {
53
- readonly request?: Request;
54
- };
55
- }
56
- interface FormSubmissionSuccess<TData> {
57
- readonly valid: true;
58
- readonly submitted: true;
59
- readonly data: TData;
60
- readonly values: TData;
61
- readonly errors: ValidationErrorBag<TData>;
62
- serialize(): SerializedFormSubmission<TData>;
63
- success(): FormSuccessPayload<undefined>;
64
- success<TPayload>(payload: TPayload, status?: number): FormSuccessPayload<TPayload>;
65
- fail(status?: number): FormFailurePayload<TData>;
66
- }
67
- interface FormSubmissionFailure<TData> {
68
- readonly valid: false;
69
- readonly submitted: true;
70
- readonly data?: undefined;
71
- readonly values: Partial<TData>;
72
- readonly errors: ValidationErrorBag<TData>;
73
- serialize(): SerializedFormSubmission<TData>;
74
- success(): FormSuccessPayload<undefined>;
75
- success<TPayload>(payload: TPayload, status?: number): FormSuccessPayload<TPayload>;
76
- fail(status?: number): FormFailurePayload<TData>;
77
- }
78
- type FormSubmissionResult<TData> = FormSubmissionSuccess<TData> | FormSubmissionFailure<TData>;
79
5
  declare class FormContractError extends Error {
80
6
  constructor(message: string);
81
7
  }
82
- declare function schema<TShape extends SchemaInputShape>(shapeOrSchema: TShape | ValidationSchema<TShape>): FormSchema<TShape>;
83
- declare function isFormSchema(value: unknown): value is FormSchema;
84
- declare function normalizeStatus(value: number | undefined, fallback: number): number;
85
- declare function serializeSubmissionState<TData>(valid: boolean, values: Partial<TData> | TData, errors: ValidationErrorBag<TData>): SerializedFormSubmission<TData>;
86
- declare function createSubmission<TData>(valid: boolean, values: Partial<TData> | TData, errors: ValidationErrorBag<TData>, failureStatus?: number): FormSubmissionResult<TData>;
87
- declare function createSuccessfulSubmission<TShape extends SchemaInputShape>(schemaDefinition: FormSchema<TShape>, data: InferSchemaData<TShape>): FormSubmissionSuccess<InferSchemaData<TShape>>;
88
- declare function createFailedSubmission<TShape extends SchemaInputShape>(schemaDefinition: FormSchema<TShape>, values: Partial<InferSchemaData<TShape>>, flattenedErrors: Record<string, readonly string[]>, status?: number): FormSubmissionFailure<InferSchemaData<TShape>>;
89
- declare function isRequestLikeHeaders(value: unknown): value is RequestLikeHeaders;
90
- declare function normalizeRequestHeaders(input: unknown): Headers;
91
- declare function normalizeRequestLikeInput(input: FormLikeValidationInput | FormRequestLikeInput | null | undefined): Request | undefined;
92
- declare function validate<TShape extends SchemaInputShape>(input: FormLikeValidationInput | FormRequestLikeInput, schemaDefinition: FormSchema<TShape>, options?: FormSecurityOptions): Promise<FormSubmissionResult<InferSchemaData<TShape>>>;
93
- declare const formsInternals: {
94
- createSubmission: typeof createSubmission;
95
- isRequestLikeHeaders: typeof isRequestLikeHeaders;
96
- normalizeRequestLikeInput: typeof normalizeRequestLikeInput;
97
- normalizeStatus: typeof normalizeStatus;
98
- normalizeRequestHeaders: typeof normalizeRequestHeaders;
99
- serializeSubmissionState: typeof serializeSubmissionState;
100
- };
101
8
 
102
- export { FormContractError, type FormFailurePayload, type FormRequestLikeInput, type FormSchema, type FormSecurityOptions, type FormSubmissionFailure, type FormSubmissionResult, type FormSubmissionSuccess, type FormSuccessPayload, type SerializedFormSubmission, createFailedSubmission, createSuccessfulSubmission, formsInternals, isFormSchema, schema, validate };
9
+ export { FormContractError };