@adrekic/zod-fieldsjson 0.0.2-schema-improvements.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/conditions/base.d.ts +1 -1
- package/dist/conditions/boolean.d.ts +31 -5
- package/dist/conditions/checkbox-list.d.ts +79 -5
- package/dist/conditions/date.d.ts +115 -7
- package/dist/conditions/index.d.ts +443 -47
- package/dist/conditions/multi-select.d.ts +79 -5
- package/dist/conditions/multi-string.d.ts +79 -5
- package/dist/conditions/number.d.ts +147 -7
- package/dist/conditions/otp.d.ts +63 -5
- package/dist/conditions/pass-fail.d.ts +64 -6
- package/dist/conditions/radio.d.ts +64 -6
- package/dist/conditions/rating.d.ts +147 -7
- package/dist/conditions/scan.d.ts +63 -5
- package/dist/conditions/select.d.ts +64 -6
- package/dist/conditions/string.d.ts +63 -5
- package/dist/conditions/text.d.ts +63 -5
- package/dist/conditions/time.d.ts +115 -7
- package/dist/conditions/upload.d.ts +31 -5
- package/dist/conditions/url.d.ts +63 -5
- package/dist/elements/base.d.ts +1 -1
- package/dist/elements/index.d.ts +494 -98
- package/dist/elements/section.d.ts +912 -120
- package/dist/fields/base.d.ts +5 -5
- package/dist/fields/boolean.d.ts +1 -1
- package/dist/fields/checkbox-list.d.ts +1 -1
- package/dist/fields/date.d.ts +1 -1
- package/dist/fields/index.d.ts +25 -25
- package/dist/fields/multi-select.d.ts +1 -1
- package/dist/fields/multi-string.d.ts +3 -3
- package/dist/fields/number.d.ts +1 -1
- package/dist/fields/otp.d.ts +1 -1
- package/dist/fields/pass-fail.d.ts +1 -1
- package/dist/fields/radio.d.ts +1 -1
- package/dist/fields/rating.d.ts +1 -1
- package/dist/fields/scan.d.ts +1 -1
- package/dist/fields/select.d.ts +1 -1
- package/dist/fields/string.d.ts +3 -3
- package/dist/fields/text.d.ts +3 -3
- package/dist/fields/time.d.ts +1 -1
- package/dist/fields/upload.d.ts +3 -3
- package/dist/fields/url.d.ts +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +347 -257
- package/dist/schema.d.ts +469 -73
- package/package.json +3 -3
|
@@ -1,13 +1,39 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
export declare const JSONUploadConditionTypeSchema: z.ZodLiteral<"upload">;
|
|
3
3
|
export type JSONUploadConditionTypeSchemaType = z.infer<typeof JSONUploadConditionTypeSchema>;
|
|
4
|
-
export declare const
|
|
5
|
-
export type
|
|
6
|
-
export declare const
|
|
4
|
+
export declare const JSONUploadConditionEqualsModifierSchema: z.ZodLiteral<"equals">;
|
|
5
|
+
export type JSONUploadConditionEqualsModifierSchemaType = z.infer<typeof JSONUploadConditionEqualsModifierSchema>;
|
|
6
|
+
export declare const JSONUploadEqualsConditionSchema: z.ZodObject<{
|
|
7
|
+
id: z.ZodString;
|
|
8
|
+
type: z.ZodLiteral<"upload">;
|
|
9
|
+
field: z.ZodString;
|
|
10
|
+
value: z.ZodType<boolean, unknown, z.core.$ZodTypeInternals<boolean, unknown>>;
|
|
11
|
+
modifier: z.ZodLiteral<"equals">;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
export type JSONUploadEqualsConditionSchemaType = z.infer<typeof JSONUploadEqualsConditionSchema>;
|
|
14
|
+
export declare const JSONUploadConditionNotEqualsModifierSchema: z.ZodLiteral<"notEquals">;
|
|
15
|
+
export type JSONUploadConditionNotEqualsModifierSchemaType = z.infer<typeof JSONUploadConditionNotEqualsModifierSchema>;
|
|
16
|
+
export declare const JSONUploadNotEqualsConditionSchema: z.ZodObject<{
|
|
7
17
|
id: z.ZodString;
|
|
8
18
|
type: z.ZodLiteral<"upload">;
|
|
9
|
-
|
|
19
|
+
field: z.ZodString;
|
|
10
20
|
value: z.ZodType<boolean, unknown, z.core.$ZodTypeInternals<boolean, unknown>>;
|
|
11
|
-
modifier: z.ZodLiteral<"
|
|
21
|
+
modifier: z.ZodLiteral<"notEquals">;
|
|
12
22
|
}, z.core.$strip>;
|
|
23
|
+
export type JSONUploadNotEqualsConditionSchemaType = z.infer<typeof JSONUploadNotEqualsConditionSchema>;
|
|
24
|
+
export declare const JSONUploadConditionModifierSchema: z.ZodUnion<readonly [z.ZodLiteral<"equals">, z.ZodLiteral<"notEquals">]>;
|
|
25
|
+
export type JSONUploadConditionModifierSchemaType = z.infer<typeof JSONUploadConditionModifierSchema>;
|
|
26
|
+
export declare const JSONUploadConditionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
27
|
+
id: z.ZodString;
|
|
28
|
+
type: z.ZodLiteral<"upload">;
|
|
29
|
+
field: z.ZodString;
|
|
30
|
+
value: z.ZodType<boolean, unknown, z.core.$ZodTypeInternals<boolean, unknown>>;
|
|
31
|
+
modifier: z.ZodLiteral<"equals">;
|
|
32
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
33
|
+
id: z.ZodString;
|
|
34
|
+
type: z.ZodLiteral<"upload">;
|
|
35
|
+
field: z.ZodString;
|
|
36
|
+
value: z.ZodType<boolean, unknown, z.core.$ZodTypeInternals<boolean, unknown>>;
|
|
37
|
+
modifier: z.ZodLiteral<"notEquals">;
|
|
38
|
+
}, z.core.$strip>], "modifier">;
|
|
13
39
|
export type JSONUploadConditionSchemaType = z.infer<typeof JSONUploadConditionSchema>;
|
package/dist/conditions/url.d.ts
CHANGED
|
@@ -1,13 +1,71 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
export declare const JSONURLConditionTypeSchema: z.ZodLiteral<"url">;
|
|
3
3
|
export type JSONURLConditionTypeSchemaType = z.infer<typeof JSONURLConditionTypeSchema>;
|
|
4
|
-
export declare const
|
|
5
|
-
export type
|
|
6
|
-
export declare const
|
|
4
|
+
export declare const JSONURLConditionEqualsModifierSchema: z.ZodLiteral<"equals">;
|
|
5
|
+
export type JSONURLConditionEqualsModifierSchemaType = z.infer<typeof JSONURLConditionEqualsModifierSchema>;
|
|
6
|
+
export declare const JSONURLEqualsConditionSchema: z.ZodObject<{
|
|
7
|
+
id: z.ZodString;
|
|
8
|
+
type: z.ZodLiteral<"url">;
|
|
9
|
+
field: z.ZodString;
|
|
10
|
+
value: z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>;
|
|
11
|
+
modifier: z.ZodLiteral<"equals">;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
export type JSONURLEqualsConditionSchemaType = z.infer<typeof JSONURLEqualsConditionSchema>;
|
|
14
|
+
export declare const JSONURLConditionNotEqualsModifierSchema: z.ZodLiteral<"notEquals">;
|
|
15
|
+
export type JSONURLConditionNotEqualsModifierSchemaType = z.infer<typeof JSONURLConditionNotEqualsModifierSchema>;
|
|
16
|
+
export declare const JSONURLNotEqualsConditionSchema: z.ZodObject<{
|
|
17
|
+
id: z.ZodString;
|
|
18
|
+
type: z.ZodLiteral<"url">;
|
|
19
|
+
field: z.ZodString;
|
|
20
|
+
value: z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>;
|
|
21
|
+
modifier: z.ZodLiteral<"notEquals">;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
export type JSONURLNotEqualsConditionSchemaType = z.infer<typeof JSONURLNotEqualsConditionSchema>;
|
|
24
|
+
export declare const JSONURLConditionIncludesModifierSchema: z.ZodLiteral<"includes">;
|
|
25
|
+
export type JSONURLConditionIncludesModifierSchemaType = z.infer<typeof JSONURLConditionIncludesModifierSchema>;
|
|
26
|
+
export declare const JSONURLIncludesConditionSchema: z.ZodObject<{
|
|
27
|
+
id: z.ZodString;
|
|
28
|
+
type: z.ZodLiteral<"url">;
|
|
29
|
+
field: z.ZodString;
|
|
30
|
+
value: z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>;
|
|
31
|
+
modifier: z.ZodLiteral<"includes">;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
export type JSONURLIncludesConditionSchemaType = z.infer<typeof JSONURLIncludesConditionSchema>;
|
|
34
|
+
export declare const JSONURLConditionExcludesModifierSchema: z.ZodLiteral<"excludes">;
|
|
35
|
+
export type JSONURLConditionExcludesModifierSchemaType = z.infer<typeof JSONURLConditionExcludesModifierSchema>;
|
|
36
|
+
export declare const JSONURLExcludesConditionSchema: z.ZodObject<{
|
|
7
37
|
id: z.ZodString;
|
|
8
38
|
type: z.ZodLiteral<"url">;
|
|
9
|
-
|
|
39
|
+
field: z.ZodString;
|
|
10
40
|
value: z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>;
|
|
11
|
-
modifier: z.ZodLiteral<"
|
|
41
|
+
modifier: z.ZodLiteral<"excludes">;
|
|
12
42
|
}, z.core.$strip>;
|
|
43
|
+
export type JSONURLExcludesConditionSchemaType = z.infer<typeof JSONURLExcludesConditionSchema>;
|
|
44
|
+
export declare const JSONURLConditionModifierSchema: z.ZodUnion<readonly [z.ZodLiteral<"equals">, z.ZodLiteral<"notEquals">, z.ZodLiteral<"includes">, z.ZodLiteral<"excludes">]>;
|
|
45
|
+
export type JSONURLConditionModifierSchemaType = z.infer<typeof JSONURLConditionModifierSchema>;
|
|
46
|
+
export declare const JSONURLConditionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
47
|
+
id: z.ZodString;
|
|
48
|
+
type: z.ZodLiteral<"url">;
|
|
49
|
+
field: z.ZodString;
|
|
50
|
+
value: z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>;
|
|
51
|
+
modifier: z.ZodLiteral<"equals">;
|
|
52
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
53
|
+
id: z.ZodString;
|
|
54
|
+
type: z.ZodLiteral<"url">;
|
|
55
|
+
field: z.ZodString;
|
|
56
|
+
value: z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>;
|
|
57
|
+
modifier: z.ZodLiteral<"notEquals">;
|
|
58
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
59
|
+
id: z.ZodString;
|
|
60
|
+
type: z.ZodLiteral<"url">;
|
|
61
|
+
field: z.ZodString;
|
|
62
|
+
value: z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>;
|
|
63
|
+
modifier: z.ZodLiteral<"includes">;
|
|
64
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
65
|
+
id: z.ZodString;
|
|
66
|
+
type: z.ZodLiteral<"url">;
|
|
67
|
+
field: z.ZodString;
|
|
68
|
+
value: z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>;
|
|
69
|
+
modifier: z.ZodLiteral<"excludes">;
|
|
70
|
+
}, z.core.$strip>], "modifier">;
|
|
13
71
|
export type JSONURLConditionSchemaType = z.infer<typeof JSONURLConditionSchema>;
|
package/dist/elements/base.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
export declare const BaseJSONFieldElementSchema: <TType extends string>(typeSchema: z.ZodLiteral<TType>) => z.ZodObject<{
|
|
3
|
-
|
|
3
|
+
id: z.ZodString;
|
|
4
4
|
type: z.ZodLiteral<TType>;
|
|
5
5
|
}, z.core.$strip>;
|
|
6
6
|
export type BaseJSONFieldElementSchemaType<TType extends string> = z.infer<ReturnType<typeof BaseJSONFieldElementSchema<TType>>>;
|