@better-giving/fundraiser 1.0.7 → 1.0.9
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/schema.d.mts +3 -3
- package/dist/schema.mjs +2 -2
- package/package.json +2 -2
- package/src/cloudsearch.mts +1 -0
- package/src/schema.mts +2 -2
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" | "banner" | "featured" | "members" | "target">, Pick<FundInternal, "id" | "env" | "active" | "verified" | "donation_total_usd" | "creator"> {
|
|
3
|
+
export interface CloudsearchFund extends Pick<NewFund, "name" | "description" | "logo" | "banner" | "featured" | "members" | "target" | "npoOwner">, Pick<FundInternal, "id" | "env" | "active" | "verified" | "donation_total_usd" | "creator"> {
|
|
4
4
|
/** iso | "9999-12-31T23:59:59.000Z" year 9999 */
|
|
5
5
|
expiration: string;
|
|
6
6
|
}
|
package/dist/schema.d.mts
CHANGED
|
@@ -17,7 +17,7 @@ export declare const newFund: import("valibot").ObjectSchema<{
|
|
|
17
17
|
/** `"0"` - none, {"number"} = fixed */
|
|
18
18
|
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>;
|
|
19
19
|
readonly videos: import("valibot").ArraySchema<import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").UrlAction<string, undefined>]>, undefined>;
|
|
20
|
-
readonly npoOwner: import("valibot").
|
|
20
|
+
readonly npoOwner: import("valibot").SchemaWithPipe<[import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 1, undefined>]>;
|
|
21
21
|
}, undefined>;
|
|
22
22
|
export declare const fundUpdate: Omit<Omit<import("valibot").ObjectSchema<{
|
|
23
23
|
readonly name: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").NonEmptyAction<string, "required">]>;
|
|
@@ -31,7 +31,7 @@ export declare const fundUpdate: Omit<Omit<import("valibot").ObjectSchema<{
|
|
|
31
31
|
/** `"0"` - none, {"number"} = fixed */
|
|
32
32
|
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>;
|
|
33
33
|
readonly videos: import("valibot").ArraySchema<import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").UrlAction<string, undefined>]>, undefined>;
|
|
34
|
-
readonly npoOwner: import("valibot").
|
|
34
|
+
readonly npoOwner: import("valibot").SchemaWithPipe<[import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 1, undefined>]>;
|
|
35
35
|
}, undefined>, "_types" | "_run" | "entries"> & {
|
|
36
36
|
readonly entries: Pick<{
|
|
37
37
|
readonly name: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").NonEmptyAction<string, "required">]>;
|
|
@@ -45,7 +45,7 @@ export declare const fundUpdate: Omit<Omit<import("valibot").ObjectSchema<{
|
|
|
45
45
|
/** `"0"` - none, {"number"} = fixed */
|
|
46
46
|
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>;
|
|
47
47
|
readonly videos: import("valibot").ArraySchema<import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").UrlAction<string, undefined>]>, undefined>;
|
|
48
|
-
readonly npoOwner: import("valibot").
|
|
48
|
+
readonly npoOwner: import("valibot").SchemaWithPipe<[import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 1, undefined>]>;
|
|
49
49
|
}, "name" | "description" | "banner" | "logo" | "target" | "videos" | "featured">;
|
|
50
50
|
_run(dataset: import("valibot").Dataset<unknown, never>, config: import("valibot").Config<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").ArrayIssue | 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<{
|
|
51
51
|
name: string;
|
package/dist/schema.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { url, array, boolean, integer, isoTimestamp, literal, maxLength, minValue, nonEmpty, number, object, optional, partial, pick, pipe, string, transform, trim, union, uuid,
|
|
1
|
+
import { url, array, boolean, email, integer, isoTimestamp, literal, maxLength, minValue, nonEmpty, number, object, optional, partial, pick, pipe, string, transform, trim, union, uuid, } from "valibot";
|
|
2
2
|
const str = pipe(string(), trim());
|
|
3
3
|
export const fundId = pipe(str, uuid());
|
|
4
4
|
/** when fundraiser is created in the context of an NPO, all members of that NPO can edit the fundraiser */
|
|
@@ -19,7 +19,7 @@ export const newFund = object({
|
|
|
19
19
|
pipe(string(), transform((v) => +v), number(), minValue(0), transform((v) => v.toString())),
|
|
20
20
|
]),
|
|
21
21
|
videos: array(pipe(str, url())),
|
|
22
|
-
npoOwner
|
|
22
|
+
npoOwner,
|
|
23
23
|
});
|
|
24
24
|
export const fundUpdate = partial(pick(newFund, [
|
|
25
25
|
"name",
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-giving/fundraiser",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@better-giving/schemas": "1.0.2",
|
|
6
|
-
"@better-giving/types": "1.0.
|
|
6
|
+
"@better-giving/types": "1.0.2"
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
9
|
"@better-giving/config": "workspace:*"
|
package/src/cloudsearch.mts
CHANGED
package/src/schema.mts
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
type InferOutput,
|
|
7
7
|
array,
|
|
8
8
|
boolean,
|
|
9
|
+
email,
|
|
9
10
|
integer,
|
|
10
11
|
isoTimestamp,
|
|
11
12
|
literal,
|
|
@@ -23,7 +24,6 @@ import {
|
|
|
23
24
|
trim,
|
|
24
25
|
union,
|
|
25
26
|
uuid,
|
|
26
|
-
email,
|
|
27
27
|
} from "valibot";
|
|
28
28
|
|
|
29
29
|
const str = pipe(string(), trim());
|
|
@@ -63,7 +63,7 @@ export const newFund = object({
|
|
|
63
63
|
),
|
|
64
64
|
]),
|
|
65
65
|
videos: array(pipe(str, url())),
|
|
66
|
-
npoOwner
|
|
66
|
+
npoOwner,
|
|
67
67
|
});
|
|
68
68
|
|
|
69
69
|
export const fundUpdate = partial(
|