@better-giving/fundraiser 3.0.28 → 3.0.30
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/db.d.mts +5 -1
- package/dist/schema.d.mts +96 -14
- package/dist/schema.mjs +5 -6
- package/package.json +2 -2
- package/src/schema.mts +19 -14
package/dist/db.d.mts
CHANGED
|
@@ -14,11 +14,15 @@ export declare class FundDb extends Db {
|
|
|
14
14
|
banner: string;
|
|
15
15
|
logo: string;
|
|
16
16
|
members: number[];
|
|
17
|
-
target: string;
|
|
18
17
|
videos: string[];
|
|
19
18
|
featured: boolean;
|
|
19
|
+
target: string;
|
|
20
20
|
npo_owner: number;
|
|
21
21
|
expiration?: string | undefined;
|
|
22
|
+
increments?: {
|
|
23
|
+
value: string;
|
|
24
|
+
label: string;
|
|
25
|
+
}[] | undefined;
|
|
22
26
|
slug?: string | undefined;
|
|
23
27
|
id: string;
|
|
24
28
|
env: import("@better-giving/schemas").Environment;
|
package/dist/schema.d.mts
CHANGED
|
@@ -19,6 +19,16 @@ export declare const fund_new: import("valibot").ObjectSchema<{
|
|
|
19
19
|
/** `"0"` - none, {"number"} = fixed */
|
|
20
20
|
readonly target: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"smart", undefined>, import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TransformAction<string, number>, import("valibot").NumberSchema<undefined>, import("valibot").MinValueAction<number, 0, undefined>, import("valibot").TransformAction<number, string>]>], undefined>;
|
|
21
21
|
readonly videos: import("valibot").ArraySchema<import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<"required">, import("valibot").TrimAction]>, import("valibot").UrlAction<string, undefined>]>, undefined>;
|
|
22
|
+
readonly increments: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
23
|
+
readonly value: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<"required">, import("valibot").TrimAction]>, import("valibot").NonEmptyAction<string, "required">]>, import("valibot").TransformAction<string, number>, import("valibot").SchemaWithPipe<[import("valibot").NumberSchema<undefined>, import("valibot").MinValueAction<number, 0, "must be > 0">]>, import("valibot").TransformAction<number, string>]>, import("valibot").TransformAction<string, string>]>;
|
|
24
|
+
readonly label: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<"required">, import("valibot").TrimAction]>, import("valibot").MaxLengthAction<string, 60, ({ requirement: r }: import("valibot").MaxLengthIssue<string, 60>) => string>]>;
|
|
25
|
+
}, undefined>, undefined>, import("valibot").MaxLengthAction<{
|
|
26
|
+
value: string;
|
|
27
|
+
label: string;
|
|
28
|
+
}[], 4, ({ requirement }: import("valibot").MaxLengthIssue<{
|
|
29
|
+
value: string;
|
|
30
|
+
label: string;
|
|
31
|
+
}[], 4>) => string>]>, never>;
|
|
22
32
|
readonly npo_owner: import("valibot").SchemaWithPipe<[import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 0, undefined>]>;
|
|
23
33
|
readonly slug: import("valibot").OptionalSchema<import("valibot").LazySchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<"required">, import("valibot").TrimAction]> | import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<"required">, import("valibot").TrimAction]>, import("valibot").MaxLengthAction<string, 30, ({ requirement: r }: import("valibot").MaxLengthIssue<string, 30>) => string>, import("valibot").RegexAction<string, "should not be an id">, import("valibot").RegexAction<string, "allowed: numbers | letters | - | . | _ | ~">, import("valibot").ExcludesAction<string, "..", "should not contain double periods">, import("valibot").CustomSchema<string, "should not start with dot">, import("valibot").CustomSchema<string, "should not end with dot">]>>, never>;
|
|
24
34
|
}, undefined>;
|
|
@@ -34,6 +44,16 @@ export declare const fund_update: Omit<Omit<import("valibot").ObjectSchema<{
|
|
|
34
44
|
/** `"0"` - none, {"number"} = fixed */
|
|
35
45
|
readonly target: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"smart", undefined>, import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TransformAction<string, number>, import("valibot").NumberSchema<undefined>, import("valibot").MinValueAction<number, 0, undefined>, import("valibot").TransformAction<number, string>]>], undefined>;
|
|
36
46
|
readonly videos: import("valibot").ArraySchema<import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<"required">, import("valibot").TrimAction]>, import("valibot").UrlAction<string, undefined>]>, undefined>;
|
|
47
|
+
readonly increments: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
48
|
+
readonly value: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<"required">, import("valibot").TrimAction]>, import("valibot").NonEmptyAction<string, "required">]>, import("valibot").TransformAction<string, number>, import("valibot").SchemaWithPipe<[import("valibot").NumberSchema<undefined>, import("valibot").MinValueAction<number, 0, "must be > 0">]>, import("valibot").TransformAction<number, string>]>, import("valibot").TransformAction<string, string>]>;
|
|
49
|
+
readonly label: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<"required">, import("valibot").TrimAction]>, import("valibot").MaxLengthAction<string, 60, ({ requirement: r }: import("valibot").MaxLengthIssue<string, 60>) => string>]>;
|
|
50
|
+
}, undefined>, undefined>, import("valibot").MaxLengthAction<{
|
|
51
|
+
value: string;
|
|
52
|
+
label: string;
|
|
53
|
+
}[], 4, ({ requirement }: import("valibot").MaxLengthIssue<{
|
|
54
|
+
value: string;
|
|
55
|
+
label: string;
|
|
56
|
+
}[], 4>) => string>]>, never>;
|
|
37
57
|
readonly npo_owner: import("valibot").SchemaWithPipe<[import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 0, undefined>]>;
|
|
38
58
|
readonly slug: import("valibot").OptionalSchema<import("valibot").LazySchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<"required">, import("valibot").TrimAction]> | import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<"required">, import("valibot").TrimAction]>, import("valibot").MaxLengthAction<string, 30, ({ requirement: r }: import("valibot").MaxLengthIssue<string, 30>) => string>, import("valibot").RegexAction<string, "should not be an id">, import("valibot").RegexAction<string, "allowed: numbers | letters | - | . | _ | ~">, import("valibot").ExcludesAction<string, "..", "should not contain double periods">, import("valibot").CustomSchema<string, "should not start with dot">, import("valibot").CustomSchema<string, "should not end with dot">]>>, never>;
|
|
39
59
|
}, undefined>, "_types" | "_run" | "entries"> & {
|
|
@@ -49,28 +69,52 @@ export declare const fund_update: Omit<Omit<import("valibot").ObjectSchema<{
|
|
|
49
69
|
/** `"0"` - none, {"number"} = fixed */
|
|
50
70
|
readonly target: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"smart", undefined>, import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TransformAction<string, number>, import("valibot").NumberSchema<undefined>, import("valibot").MinValueAction<number, 0, undefined>, import("valibot").TransformAction<number, string>]>], undefined>;
|
|
51
71
|
readonly videos: import("valibot").ArraySchema<import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<"required">, import("valibot").TrimAction]>, import("valibot").UrlAction<string, undefined>]>, undefined>;
|
|
72
|
+
readonly increments: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
73
|
+
readonly value: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<"required">, import("valibot").TrimAction]>, import("valibot").NonEmptyAction<string, "required">]>, import("valibot").TransformAction<string, number>, import("valibot").SchemaWithPipe<[import("valibot").NumberSchema<undefined>, import("valibot").MinValueAction<number, 0, "must be > 0">]>, import("valibot").TransformAction<number, string>]>, import("valibot").TransformAction<string, string>]>;
|
|
74
|
+
readonly label: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<"required">, import("valibot").TrimAction]>, import("valibot").MaxLengthAction<string, 60, ({ requirement: r }: import("valibot").MaxLengthIssue<string, 60>) => string>]>;
|
|
75
|
+
}, undefined>, undefined>, import("valibot").MaxLengthAction<{
|
|
76
|
+
value: string;
|
|
77
|
+
label: string;
|
|
78
|
+
}[], 4, ({ requirement }: import("valibot").MaxLengthIssue<{
|
|
79
|
+
value: string;
|
|
80
|
+
label: string;
|
|
81
|
+
}[], 4>) => string>]>, never>;
|
|
52
82
|
readonly npo_owner: import("valibot").SchemaWithPipe<[import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 0, undefined>]>;
|
|
53
83
|
readonly slug: import("valibot").OptionalSchema<import("valibot").LazySchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<"required">, import("valibot").TrimAction]> | import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<"required">, import("valibot").TrimAction]>, import("valibot").MaxLengthAction<string, 30, ({ requirement: r }: import("valibot").MaxLengthIssue<string, 30>) => string>, import("valibot").RegexAction<string, "should not be an id">, import("valibot").RegexAction<string, "allowed: numbers | letters | - | . | _ | ~">, import("valibot").ExcludesAction<string, "..", "should not contain double periods">, import("valibot").CustomSchema<string, "should not start with dot">, import("valibot").CustomSchema<string, "should not end with dot">]>>, never>;
|
|
54
|
-
}, "name" | "description" | "banner" | "logo" | "
|
|
55
|
-
_run(dataset: import("valibot").Dataset<unknown, never>, config: import("valibot").Config<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").ArrayIssue | import("valibot").BooleanIssue | import("valibot").LiteralIssue | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").LiteralIssue> | import("valibot").
|
|
84
|
+
}, "name" | "description" | "banner" | "logo" | "videos" | "increments" | "slug" | "featured" | "target">;
|
|
85
|
+
_run(dataset: import("valibot").Dataset<unknown, never>, config: import("valibot").Config<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").ArrayIssue | import("valibot").BooleanIssue | import("valibot").LiteralIssue | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").LiteralIssue> | import("valibot").ObjectIssue | import("valibot").MaxLengthIssue<string, 60> | import("valibot").MaxLengthIssue<{
|
|
86
|
+
value: string;
|
|
87
|
+
label: string;
|
|
88
|
+
}[], 4> | import("valibot").CustomIssue | import("valibot").MaxLengthIssue<string, 30> | import("valibot").RegexIssue<string> | import("valibot").ExcludesIssue<string, "..">>): import("valibot").Dataset<{
|
|
56
89
|
name: string;
|
|
57
90
|
description: string;
|
|
58
91
|
banner: string;
|
|
59
92
|
logo: string;
|
|
60
|
-
target: string;
|
|
61
93
|
videos: string[];
|
|
62
94
|
featured: boolean;
|
|
95
|
+
target: string;
|
|
96
|
+
increments?: {
|
|
97
|
+
value: string;
|
|
98
|
+
label: string;
|
|
99
|
+
}[] | undefined;
|
|
63
100
|
slug?: string | undefined;
|
|
64
|
-
}, import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").ArrayIssue | import("valibot").BooleanIssue | import("valibot").LiteralIssue | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").LiteralIssue> | import("valibot").
|
|
101
|
+
}, import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").ArrayIssue | import("valibot").BooleanIssue | import("valibot").LiteralIssue | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").LiteralIssue> | import("valibot").ObjectIssue | import("valibot").MaxLengthIssue<string, 60> | import("valibot").MaxLengthIssue<{
|
|
102
|
+
value: string;
|
|
103
|
+
label: string;
|
|
104
|
+
}[], 4> | import("valibot").CustomIssue | import("valibot").MaxLengthIssue<string, 30> | import("valibot").RegexIssue<string> | import("valibot").ExcludesIssue<string, "..">>;
|
|
65
105
|
readonly _types?: {
|
|
66
106
|
readonly input: {
|
|
67
107
|
name: string;
|
|
68
108
|
description: string;
|
|
69
109
|
banner: string;
|
|
70
110
|
logo: string;
|
|
71
|
-
target: string;
|
|
72
111
|
videos: string[];
|
|
73
112
|
featured: boolean;
|
|
113
|
+
target: string;
|
|
114
|
+
increments?: {
|
|
115
|
+
value: string;
|
|
116
|
+
label: string;
|
|
117
|
+
}[] | undefined;
|
|
74
118
|
slug?: string | undefined;
|
|
75
119
|
};
|
|
76
120
|
readonly output: {
|
|
@@ -78,12 +122,19 @@ export declare const fund_update: Omit<Omit<import("valibot").ObjectSchema<{
|
|
|
78
122
|
description: string;
|
|
79
123
|
banner: string;
|
|
80
124
|
logo: string;
|
|
81
|
-
target: string;
|
|
82
125
|
videos: string[];
|
|
83
126
|
featured: boolean;
|
|
127
|
+
target: string;
|
|
128
|
+
increments?: {
|
|
129
|
+
value: string;
|
|
130
|
+
label: string;
|
|
131
|
+
}[] | undefined;
|
|
84
132
|
slug?: string | undefined;
|
|
85
133
|
};
|
|
86
|
-
readonly issue: import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").ArrayIssue | import("valibot").BooleanIssue | import("valibot").LiteralIssue | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").LiteralIssue> | import("valibot").
|
|
134
|
+
readonly issue: import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").ArrayIssue | import("valibot").BooleanIssue | import("valibot").LiteralIssue | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").LiteralIssue> | import("valibot").ObjectIssue | import("valibot").MaxLengthIssue<string, 60> | import("valibot").MaxLengthIssue<{
|
|
135
|
+
value: string;
|
|
136
|
+
label: string;
|
|
137
|
+
}[], 4> | import("valibot").CustomIssue | import("valibot").MaxLengthIssue<string, 30> | import("valibot").RegexIssue<string> | import("valibot").ExcludesIssue<string, "..">;
|
|
87
138
|
} | undefined;
|
|
88
139
|
}, "_types" | "_run" | "entries"> & {
|
|
89
140
|
readonly entries: {
|
|
@@ -91,43 +142,74 @@ export declare const fund_update: Omit<Omit<import("valibot").ObjectSchema<{
|
|
|
91
142
|
readonly description: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<"required">, import("valibot").TrimAction]>, import("valibot").NonEmptyAction<string, "required">]>, never>;
|
|
92
143
|
readonly banner: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<"required">, import("valibot").TrimAction]>, import("valibot").UrlAction<string, undefined>]>, never>;
|
|
93
144
|
readonly logo: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<"required">, import("valibot").TrimAction]>, import("valibot").UrlAction<string, undefined>]>, never>;
|
|
94
|
-
readonly target: import("valibot").OptionalSchema<import("valibot").UnionSchema<[import("valibot").LiteralSchema<"smart", undefined>, import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TransformAction<string, number>, import("valibot").NumberSchema<undefined>, import("valibot").MinValueAction<number, 0, undefined>, import("valibot").TransformAction<number, string>]>], undefined>, never>;
|
|
95
145
|
readonly videos: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<"required">, import("valibot").TrimAction]>, import("valibot").UrlAction<string, undefined>]>, undefined>, never>;
|
|
146
|
+
readonly increments: import("valibot").OptionalSchema<import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
147
|
+
readonly value: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<"required">, import("valibot").TrimAction]>, import("valibot").NonEmptyAction<string, "required">]>, import("valibot").TransformAction<string, number>, import("valibot").SchemaWithPipe<[import("valibot").NumberSchema<undefined>, import("valibot").MinValueAction<number, 0, "must be > 0">]>, import("valibot").TransformAction<number, string>]>, import("valibot").TransformAction<string, string>]>;
|
|
148
|
+
readonly label: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<"required">, import("valibot").TrimAction]>, import("valibot").MaxLengthAction<string, 60, ({ requirement: r }: import("valibot").MaxLengthIssue<string, 60>) => string>]>;
|
|
149
|
+
}, undefined>, undefined>, import("valibot").MaxLengthAction<{
|
|
150
|
+
value: string;
|
|
151
|
+
label: string;
|
|
152
|
+
}[], 4, ({ requirement }: import("valibot").MaxLengthIssue<{
|
|
153
|
+
value: string;
|
|
154
|
+
label: string;
|
|
155
|
+
}[], 4>) => string>]>, never>, never>;
|
|
96
156
|
readonly slug: import("valibot").OptionalSchema<import("valibot").OptionalSchema<import("valibot").LazySchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<"required">, import("valibot").TrimAction]> | import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<"required">, import("valibot").TrimAction]>, import("valibot").MaxLengthAction<string, 30, ({ requirement: r }: import("valibot").MaxLengthIssue<string, 30>) => string>, import("valibot").RegexAction<string, "should not be an id">, import("valibot").RegexAction<string, "allowed: numbers | letters | - | . | _ | ~">, import("valibot").ExcludesAction<string, "..", "should not contain double periods">, import("valibot").CustomSchema<string, "should not start with dot">, import("valibot").CustomSchema<string, "should not end with dot">]>>, never>, never>;
|
|
97
157
|
readonly featured: import("valibot").OptionalSchema<import("valibot").BooleanSchema<undefined>, never>;
|
|
158
|
+
readonly target: import("valibot").OptionalSchema<import("valibot").UnionSchema<[import("valibot").LiteralSchema<"smart", undefined>, import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TransformAction<string, number>, import("valibot").NumberSchema<undefined>, import("valibot").MinValueAction<number, 0, undefined>, import("valibot").TransformAction<number, string>]>], undefined>, never>;
|
|
98
159
|
};
|
|
99
|
-
_run(dataset: import("valibot").Dataset<unknown, never>, config: import("valibot").Config<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").ArrayIssue | import("valibot").BooleanIssue | import("valibot").LiteralIssue | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").LiteralIssue> | import("valibot").
|
|
160
|
+
_run(dataset: import("valibot").Dataset<unknown, never>, config: import("valibot").Config<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").ArrayIssue | import("valibot").BooleanIssue | import("valibot").LiteralIssue | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").LiteralIssue> | import("valibot").ObjectIssue | import("valibot").MaxLengthIssue<string, 60> | import("valibot").MaxLengthIssue<{
|
|
161
|
+
value: string;
|
|
162
|
+
label: string;
|
|
163
|
+
}[], 4> | import("valibot").CustomIssue | import("valibot").MaxLengthIssue<string, 30> | import("valibot").RegexIssue<string> | import("valibot").ExcludesIssue<string, "..">>): import("valibot").Dataset<{
|
|
100
164
|
name?: string | undefined;
|
|
101
165
|
description?: string | undefined;
|
|
102
166
|
banner?: string | undefined;
|
|
103
167
|
logo?: string | undefined;
|
|
104
|
-
target?: string | undefined;
|
|
105
168
|
videos?: string[] | undefined;
|
|
169
|
+
increments?: {
|
|
170
|
+
value: string;
|
|
171
|
+
label: string;
|
|
172
|
+
}[] | undefined;
|
|
106
173
|
slug?: string | undefined;
|
|
107
174
|
featured?: boolean | undefined;
|
|
108
|
-
|
|
175
|
+
target?: string | undefined;
|
|
176
|
+
}, import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").ArrayIssue | import("valibot").BooleanIssue | import("valibot").LiteralIssue | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").LiteralIssue> | import("valibot").ObjectIssue | import("valibot").MaxLengthIssue<string, 60> | import("valibot").MaxLengthIssue<{
|
|
177
|
+
value: string;
|
|
178
|
+
label: string;
|
|
179
|
+
}[], 4> | import("valibot").CustomIssue | import("valibot").MaxLengthIssue<string, 30> | import("valibot").RegexIssue<string> | import("valibot").ExcludesIssue<string, "..">>;
|
|
109
180
|
readonly _types?: {
|
|
110
181
|
readonly input: {
|
|
111
182
|
name?: string | undefined;
|
|
112
183
|
description?: string | undefined;
|
|
113
184
|
banner?: string | undefined;
|
|
114
185
|
logo?: string | undefined;
|
|
115
|
-
target?: string | undefined;
|
|
116
186
|
videos?: string[] | undefined;
|
|
187
|
+
increments?: {
|
|
188
|
+
value: string;
|
|
189
|
+
label: string;
|
|
190
|
+
}[] | undefined;
|
|
117
191
|
slug?: string | undefined;
|
|
118
192
|
featured?: boolean | undefined;
|
|
193
|
+
target?: string | undefined;
|
|
119
194
|
};
|
|
120
195
|
readonly output: {
|
|
121
196
|
name?: string | undefined;
|
|
122
197
|
description?: string | undefined;
|
|
123
198
|
banner?: string | undefined;
|
|
124
199
|
logo?: string | undefined;
|
|
125
|
-
target?: string | undefined;
|
|
126
200
|
videos?: string[] | undefined;
|
|
201
|
+
increments?: {
|
|
202
|
+
value: string;
|
|
203
|
+
label: string;
|
|
204
|
+
}[] | undefined;
|
|
127
205
|
slug?: string | undefined;
|
|
128
206
|
featured?: boolean | undefined;
|
|
207
|
+
target?: string | undefined;
|
|
129
208
|
};
|
|
130
|
-
readonly issue: import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").ArrayIssue | import("valibot").BooleanIssue | import("valibot").LiteralIssue | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").LiteralIssue> | import("valibot").
|
|
209
|
+
readonly issue: import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").ArrayIssue | import("valibot").BooleanIssue | import("valibot").LiteralIssue | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").LiteralIssue> | import("valibot").ObjectIssue | import("valibot").MaxLengthIssue<string, 60> | import("valibot").MaxLengthIssue<{
|
|
210
|
+
value: string;
|
|
211
|
+
label: string;
|
|
212
|
+
}[], 4> | import("valibot").CustomIssue | import("valibot").MaxLengthIssue<string, 30> | import("valibot").RegexIssue<string> | import("valibot").ExcludesIssue<string, "..">;
|
|
131
213
|
} | undefined;
|
|
132
214
|
};
|
|
133
215
|
export declare const funds_search: import("valibot").ObjectSchema<{
|
package/dist/schema.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $, $int_gte1, slug } from "@better-giving/schemas";
|
|
2
|
-
import { url, array, boolean, integer, isoTimestamp,
|
|
1
|
+
import { $, $int_gte1, increment, MAX_NUM_INCREMENTS, slug, target, } from "@better-giving/schemas";
|
|
2
|
+
import { url, array, boolean, integer, isoTimestamp, maxLength, minValue, nonEmpty, number, object, optional, partial, pick, pipe, transform, uuid, } from "valibot";
|
|
3
3
|
export { slug } from "@better-giving/schemas";
|
|
4
4
|
export const fund_id = pipe($, uuid());
|
|
5
5
|
/**
|
|
@@ -18,11 +18,9 @@ export const fund_new = object({
|
|
|
18
18
|
expiration: optional(pipe($, isoTimestamp("invalid date"), minValue(new Date().toISOString()) //created each parsing
|
|
19
19
|
)),
|
|
20
20
|
/** `"0"` - none, {"number"} = fixed */
|
|
21
|
-
target:
|
|
22
|
-
literal("smart"),
|
|
23
|
-
pipe(string(), transform((v) => +v), number(), minValue(0), transform((v) => v.toString())),
|
|
24
|
-
]),
|
|
21
|
+
target: target,
|
|
25
22
|
videos: array(pipe($, url())),
|
|
23
|
+
increments: optional(pipe(array(increment), maxLength(MAX_NUM_INCREMENTS, ({ requirement }) => `cannot have more than ${requirement} increments`))),
|
|
26
24
|
npo_owner,
|
|
27
25
|
slug: optional(slug),
|
|
28
26
|
});
|
|
@@ -35,6 +33,7 @@ export const fund_update = partial(pick(fund_new, [
|
|
|
35
33
|
"target",
|
|
36
34
|
"videos",
|
|
37
35
|
"slug",
|
|
36
|
+
"increments",
|
|
38
37
|
]));
|
|
39
38
|
export const funds_search = object({
|
|
40
39
|
/** search text */
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-giving/fundraiser",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.30",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"valibot": "0.42.0",
|
|
6
|
-
"@better-giving/schemas": "2.0.
|
|
6
|
+
"@better-giving/schemas": "2.0.4",
|
|
7
7
|
"@better-giving/types": "1.1.8",
|
|
8
8
|
"@better-giving/db": "2.0.6",
|
|
9
9
|
"@aws-sdk/lib-dynamodb": "3.485.0"
|
package/src/schema.mts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
$,
|
|
3
|
+
$int_gte1,
|
|
4
|
+
increment,
|
|
5
|
+
MAX_NUM_INCREMENTS,
|
|
6
|
+
slug,
|
|
7
|
+
target,
|
|
8
|
+
} from "@better-giving/schemas";
|
|
2
9
|
import {
|
|
3
10
|
url,
|
|
4
11
|
type InferOutput,
|
|
@@ -6,7 +13,6 @@ import {
|
|
|
6
13
|
boolean,
|
|
7
14
|
integer,
|
|
8
15
|
isoTimestamp,
|
|
9
|
-
literal,
|
|
10
16
|
maxLength,
|
|
11
17
|
minValue,
|
|
12
18
|
nonEmpty,
|
|
@@ -16,9 +22,7 @@ import {
|
|
|
16
22
|
partial,
|
|
17
23
|
pick,
|
|
18
24
|
pipe,
|
|
19
|
-
string,
|
|
20
25
|
transform,
|
|
21
|
-
union,
|
|
22
26
|
uuid,
|
|
23
27
|
} from "valibot";
|
|
24
28
|
|
|
@@ -52,17 +56,17 @@ export const fund_new = object({
|
|
|
52
56
|
)
|
|
53
57
|
),
|
|
54
58
|
/** `"0"` - none, {"number"} = fixed */
|
|
55
|
-
target:
|
|
56
|
-
literal("smart"),
|
|
57
|
-
pipe(
|
|
58
|
-
string(),
|
|
59
|
-
transform((v) => +v),
|
|
60
|
-
number(),
|
|
61
|
-
minValue(0),
|
|
62
|
-
transform((v) => v.toString())
|
|
63
|
-
),
|
|
64
|
-
]),
|
|
59
|
+
target: target,
|
|
65
60
|
videos: array(pipe($, url())),
|
|
61
|
+
increments: optional(
|
|
62
|
+
pipe(
|
|
63
|
+
array(increment),
|
|
64
|
+
maxLength(
|
|
65
|
+
MAX_NUM_INCREMENTS,
|
|
66
|
+
({ requirement }) => `cannot have more than ${requirement} increments`
|
|
67
|
+
)
|
|
68
|
+
)
|
|
69
|
+
),
|
|
66
70
|
npo_owner,
|
|
67
71
|
slug: optional(slug),
|
|
68
72
|
});
|
|
@@ -77,6 +81,7 @@ export const fund_update = partial(
|
|
|
77
81
|
"target",
|
|
78
82
|
"videos",
|
|
79
83
|
"slug",
|
|
84
|
+
"increments",
|
|
80
85
|
])
|
|
81
86
|
);
|
|
82
87
|
|