@better-giving/fundraiser 1.0.2 → 1.0.4
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/cloudsearch.d.mts +1 -1
- package/dist/index.d.mts +2 -1
- package/dist/schema.d.mts +17 -7
- package/dist/schema.mjs +10 -1
- package/package.json +1 -1
- package/src/cloudsearch.mts +7 -1
- package/src/index.mts +2 -1
- package/src/schema.mts +10 -1
package/dist/cloudsearch.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ToDoc, ToHitFields, ToUpdate } from "@better-giving/types/cloudsearch";
|
|
2
2
|
import type { FundInternal, NewFund } from "./schema.mjs";
|
|
3
|
-
export interface CloudsearchFund extends Pick<NewFund, "name" | "description" | "logo" | "featured" | "members" | "target">, Pick<FundInternal, "id" | "env" | "active" | "verified" | "donation_total_usd" | "approvers"> {
|
|
3
|
+
export interface CloudsearchFund extends Pick<NewFund, "name" | "description" | "logo" | "featured" | "members" | "target">, Pick<FundInternal, "id" | "env" | "active" | "verified" | "donation_total_usd" | "approvers" | "creator"> {
|
|
4
4
|
/** iso | "9999-12-31T23:59:59.000Z" year 9999 */
|
|
5
5
|
expiration: string;
|
|
6
6
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -5,7 +5,8 @@ export type { FundItem };
|
|
|
5
5
|
export interface FundMember {
|
|
6
6
|
id: number;
|
|
7
7
|
name: string;
|
|
8
|
-
|
|
8
|
+
logo: string | undefined;
|
|
9
|
+
banner: string | undefined;
|
|
9
10
|
}
|
|
10
11
|
export interface SingleFund extends Omit<NewFund, "members">, FundInternal {
|
|
11
12
|
members: FundMember[];
|
package/dist/schema.d.mts
CHANGED
|
@@ -13,6 +13,7 @@ export declare const newFund: import("valibot").ObjectSchema<{
|
|
|
13
13
|
readonly expiration: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").IsoTimestampAction<string, "invalid date">, import("valibot").MinValueAction<string, string, undefined>]>, never>;
|
|
14
14
|
/** `"0"` - none, {"number"} = fixed */
|
|
15
15
|
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>;
|
|
16
|
+
readonly videos: import("valibot").ArraySchema<import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").UrlAction<string, undefined>]>, undefined>;
|
|
16
17
|
}, undefined>;
|
|
17
18
|
export declare const fundUpdate: Omit<Omit<import("valibot").ObjectSchema<{
|
|
18
19
|
readonly name: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").NonEmptyAction<string, "required">]>;
|
|
@@ -25,6 +26,7 @@ export declare const fundUpdate: Omit<Omit<import("valibot").ObjectSchema<{
|
|
|
25
26
|
readonly expiration: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").IsoTimestampAction<string, "invalid date">, import("valibot").MinValueAction<string, string, undefined>]>, never>;
|
|
26
27
|
/** `"0"` - none, {"number"} = fixed */
|
|
27
28
|
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>;
|
|
29
|
+
readonly videos: import("valibot").ArraySchema<import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").UrlAction<string, undefined>]>, undefined>;
|
|
28
30
|
}, undefined>, "_types" | "_run" | "entries"> & {
|
|
29
31
|
readonly entries: Pick<{
|
|
30
32
|
readonly name: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").NonEmptyAction<string, "required">]>;
|
|
@@ -37,15 +39,17 @@ export declare const fundUpdate: Omit<Omit<import("valibot").ObjectSchema<{
|
|
|
37
39
|
readonly expiration: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").IsoTimestampAction<string, "invalid date">, import("valibot").MinValueAction<string, string, undefined>]>, never>;
|
|
38
40
|
/** `"0"` - none, {"number"} = fixed */
|
|
39
41
|
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>;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
readonly videos: import("valibot").ArraySchema<import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").UrlAction<string, undefined>]>, undefined>;
|
|
43
|
+
}, "name" | "description" | "banner" | "logo" | "target" | "videos" | "featured">;
|
|
44
|
+
_run(dataset: import("valibot").Dataset<unknown, never>, config: import("valibot").Config<import("valibot").StringIssue | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").ArrayIssue | import("valibot").NumberIssue | import("valibot").BooleanIssue | import("valibot").LiteralIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").LiteralIssue | import("valibot").MinValueIssue<number, 0>> | import("valibot").ObjectIssue>): import("valibot").Dataset<{
|
|
42
45
|
name: string;
|
|
43
46
|
description: string;
|
|
44
47
|
banner: string;
|
|
45
48
|
logo: string;
|
|
46
49
|
target: string;
|
|
50
|
+
videos: string[];
|
|
47
51
|
featured: boolean;
|
|
48
|
-
}, import("valibot").StringIssue | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").NumberIssue | import("valibot").BooleanIssue | import("valibot").LiteralIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").LiteralIssue | import("valibot").MinValueIssue<number, 0>> | import("valibot").ObjectIssue>;
|
|
52
|
+
}, import("valibot").StringIssue | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").ArrayIssue | import("valibot").NumberIssue | import("valibot").BooleanIssue | import("valibot").LiteralIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").LiteralIssue | import("valibot").MinValueIssue<number, 0>> | import("valibot").ObjectIssue>;
|
|
49
53
|
readonly _types?: {
|
|
50
54
|
readonly input: {
|
|
51
55
|
name: string;
|
|
@@ -53,6 +57,7 @@ export declare const fundUpdate: Omit<Omit<import("valibot").ObjectSchema<{
|
|
|
53
57
|
banner: string;
|
|
54
58
|
logo: string;
|
|
55
59
|
target: string;
|
|
60
|
+
videos: string[];
|
|
56
61
|
featured: boolean;
|
|
57
62
|
};
|
|
58
63
|
readonly output: {
|
|
@@ -61,9 +66,10 @@ export declare const fundUpdate: Omit<Omit<import("valibot").ObjectSchema<{
|
|
|
61
66
|
banner: string;
|
|
62
67
|
logo: string;
|
|
63
68
|
target: string;
|
|
69
|
+
videos: string[];
|
|
64
70
|
featured: boolean;
|
|
65
71
|
};
|
|
66
|
-
readonly issue: import("valibot").StringIssue | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").NumberIssue | import("valibot").BooleanIssue | import("valibot").LiteralIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").LiteralIssue | import("valibot").MinValueIssue<number, 0>> | import("valibot").ObjectIssue;
|
|
72
|
+
readonly issue: import("valibot").StringIssue | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").ArrayIssue | import("valibot").NumberIssue | import("valibot").BooleanIssue | import("valibot").LiteralIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").LiteralIssue | import("valibot").MinValueIssue<number, 0>> | import("valibot").ObjectIssue;
|
|
67
73
|
} | undefined;
|
|
68
74
|
}, "_types" | "_run" | "entries"> & {
|
|
69
75
|
readonly entries: {
|
|
@@ -72,16 +78,18 @@ export declare const fundUpdate: Omit<Omit<import("valibot").ObjectSchema<{
|
|
|
72
78
|
readonly banner: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").UrlAction<string, undefined>]>, never>;
|
|
73
79
|
readonly logo: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").UrlAction<string, undefined>]>, never>;
|
|
74
80
|
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>;
|
|
81
|
+
readonly videos: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").UrlAction<string, undefined>]>, undefined>, never>;
|
|
75
82
|
readonly featured: import("valibot").OptionalSchema<import("valibot").BooleanSchema<undefined>, never>;
|
|
76
83
|
};
|
|
77
|
-
_run(dataset: import("valibot").Dataset<unknown, never>, config: import("valibot").Config<import("valibot").StringIssue | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").NumberIssue | import("valibot").BooleanIssue | import("valibot").LiteralIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").LiteralIssue | import("valibot").MinValueIssue<number, 0>> | import("valibot").ObjectIssue>): import("valibot").Dataset<{
|
|
84
|
+
_run(dataset: import("valibot").Dataset<unknown, never>, config: import("valibot").Config<import("valibot").StringIssue | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").ArrayIssue | import("valibot").NumberIssue | import("valibot").BooleanIssue | import("valibot").LiteralIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").LiteralIssue | import("valibot").MinValueIssue<number, 0>> | import("valibot").ObjectIssue>): import("valibot").Dataset<{
|
|
78
85
|
name?: string | undefined;
|
|
79
86
|
description?: string | undefined;
|
|
80
87
|
banner?: string | undefined;
|
|
81
88
|
logo?: string | undefined;
|
|
82
89
|
target?: string | undefined;
|
|
90
|
+
videos?: string[] | undefined;
|
|
83
91
|
featured?: boolean | undefined;
|
|
84
|
-
}, import("valibot").StringIssue | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").NumberIssue | import("valibot").BooleanIssue | import("valibot").LiteralIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").LiteralIssue | import("valibot").MinValueIssue<number, 0>> | import("valibot").ObjectIssue>;
|
|
92
|
+
}, import("valibot").StringIssue | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").ArrayIssue | import("valibot").NumberIssue | import("valibot").BooleanIssue | import("valibot").LiteralIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").LiteralIssue | import("valibot").MinValueIssue<number, 0>> | import("valibot").ObjectIssue>;
|
|
85
93
|
readonly _types?: {
|
|
86
94
|
readonly input: {
|
|
87
95
|
name?: string | undefined;
|
|
@@ -89,6 +97,7 @@ export declare const fundUpdate: Omit<Omit<import("valibot").ObjectSchema<{
|
|
|
89
97
|
banner?: string | undefined;
|
|
90
98
|
logo?: string | undefined;
|
|
91
99
|
target?: string | undefined;
|
|
100
|
+
videos?: string[] | undefined;
|
|
92
101
|
featured?: boolean | undefined;
|
|
93
102
|
};
|
|
94
103
|
readonly output: {
|
|
@@ -97,9 +106,10 @@ export declare const fundUpdate: Omit<Omit<import("valibot").ObjectSchema<{
|
|
|
97
106
|
banner?: string | undefined;
|
|
98
107
|
logo?: string | undefined;
|
|
99
108
|
target?: string | undefined;
|
|
109
|
+
videos?: string[] | undefined;
|
|
100
110
|
featured?: boolean | undefined;
|
|
101
111
|
};
|
|
102
|
-
readonly issue: import("valibot").StringIssue | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").NumberIssue | import("valibot").BooleanIssue | import("valibot").LiteralIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").LiteralIssue | import("valibot").MinValueIssue<number, 0>> | import("valibot").ObjectIssue;
|
|
112
|
+
readonly issue: import("valibot").StringIssue | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").ArrayIssue | import("valibot").NumberIssue | import("valibot").BooleanIssue | import("valibot").LiteralIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").LiteralIssue | import("valibot").MinValueIssue<number, 0>> | import("valibot").ObjectIssue;
|
|
103
113
|
} | undefined;
|
|
104
114
|
};
|
|
105
115
|
export declare const fundsParams: import("valibot").ObjectSchema<{
|
package/dist/schema.mjs
CHANGED
|
@@ -16,8 +16,17 @@ export const newFund = object({
|
|
|
16
16
|
literal("smart"),
|
|
17
17
|
pipe(string(), transform((v) => +v), number(), minValue(0), transform((v) => v.toString())),
|
|
18
18
|
]),
|
|
19
|
+
videos: array(pipe(str, url())),
|
|
19
20
|
});
|
|
20
|
-
export const fundUpdate = partial(pick(newFund, [
|
|
21
|
+
export const fundUpdate = partial(pick(newFund, [
|
|
22
|
+
"name",
|
|
23
|
+
"description",
|
|
24
|
+
"banner",
|
|
25
|
+
"logo",
|
|
26
|
+
"featured",
|
|
27
|
+
"target",
|
|
28
|
+
"videos",
|
|
29
|
+
]));
|
|
21
30
|
export const fundsParams = object({
|
|
22
31
|
/** search text */
|
|
23
32
|
query: optional(str),
|
package/package.json
CHANGED
package/src/cloudsearch.mts
CHANGED
|
@@ -12,7 +12,13 @@ export interface CloudsearchFund
|
|
|
12
12
|
>,
|
|
13
13
|
Pick<
|
|
14
14
|
FundInternal,
|
|
15
|
-
|
|
15
|
+
| "id"
|
|
16
|
+
| "env"
|
|
17
|
+
| "active"
|
|
18
|
+
| "verified"
|
|
19
|
+
| "donation_total_usd"
|
|
20
|
+
| "approvers"
|
|
21
|
+
| "creator"
|
|
16
22
|
> {
|
|
17
23
|
/** iso | "9999-12-31T23:59:59.000Z" year 9999 */
|
|
18
24
|
expiration: string;
|
package/src/index.mts
CHANGED
package/src/schema.mts
CHANGED
|
@@ -58,10 +58,19 @@ export const newFund = object({
|
|
|
58
58
|
transform((v) => v.toString())
|
|
59
59
|
),
|
|
60
60
|
]),
|
|
61
|
+
videos: array(pipe(str, url())),
|
|
61
62
|
});
|
|
62
63
|
|
|
63
64
|
export const fundUpdate = partial(
|
|
64
|
-
pick(newFund, [
|
|
65
|
+
pick(newFund, [
|
|
66
|
+
"name",
|
|
67
|
+
"description",
|
|
68
|
+
"banner",
|
|
69
|
+
"logo",
|
|
70
|
+
"featured",
|
|
71
|
+
"target",
|
|
72
|
+
"videos",
|
|
73
|
+
])
|
|
65
74
|
);
|
|
66
75
|
|
|
67
76
|
export const fundsParams = object({
|