@better-giving/fundraiser 1.0.0-rc.6 → 1.0.0-rc.7

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/schema.d.mts CHANGED
@@ -115,11 +115,11 @@ export declare const fundUpdate: Omit<Omit<import("valibot").ObjectSchema<{
115
115
  export declare const fundsParams: import("valibot").ObjectSchema<{
116
116
  /** search text */
117
117
  readonly query: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, never>;
118
- /** comes from url: input is string */
118
+ /** input str: from url */
119
119
  readonly page: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").TransformAction<string, number>, import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 1, undefined>]>, never>;
120
120
  }, undefined>;
121
121
  export declare const fundsEndowMemberOfParams: import("valibot").ObjectSchema<{
122
- readonly npoProfileFeatured: import("valibot").BooleanSchema<undefined>;
122
+ readonly npoProfileFeatured: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").TransformAction<string, boolean>, import("valibot").BooleanSchema<undefined>]>;
123
123
  }, undefined>;
124
124
  export interface NewFund extends InferOutput<typeof newFund> {
125
125
  }
package/dist/schema.mjs CHANGED
@@ -25,7 +25,7 @@ export const fundUpdate = partial(pick(newFund, ["name", "description", "banner"
25
25
  export const fundsParams = object({
26
26
  /** search text */
27
27
  query: optional(str),
28
- /** comes from url: input is string */
28
+ /** input str: from url */
29
29
  page: optional(pipe(str, transform(x => +x), number(), integer(), minValue(1))),
30
30
  });
31
31
  export const fundsEndowMemberOfParams = object({
@@ -34,6 +34,8 @@ export const fundsEndowMemberOfParams = object({
34
34
  * and is approved:
35
35
  * either pre-approval in creation (creator has endow credential)
36
36
  * or creator has no credential but later npo approved
37
+ *
38
+ * input str: from url
37
39
  */
38
- npoProfileFeatured: boolean(),
40
+ npoProfileFeatured: pipe(str, transform(x => x === "true"), boolean()),
39
41
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-giving/fundraiser",
3
- "version": "1.0.0-rc.6",
3
+ "version": "1.0.0-rc.7",
4
4
  "peerDependencies": {
5
5
  "@better-giving/types": "1.0.0-rc.2",
6
6
  "valibot": "0.42.0"
package/src/schema.mts CHANGED
@@ -65,8 +65,16 @@ export const fundUpdate = partial(
65
65
  export const fundsParams = object({
66
66
  /** search text */
67
67
  query: optional(str),
68
- /** comes from url: input is string */
69
- page: optional(pipe(str, transform(x => +x), number(), integer(), minValue(1))),
68
+ /** input str: from url */
69
+ page: optional(
70
+ pipe(
71
+ str,
72
+ transform((x) => +x),
73
+ number(),
74
+ integer(),
75
+ minValue(1)
76
+ )
77
+ ),
70
78
  });
71
79
 
72
80
  export const fundsEndowMemberOfParams = object({
@@ -75,8 +83,14 @@ export const fundsEndowMemberOfParams = object({
75
83
  * and is approved:
76
84
  * either pre-approval in creation (creator has endow credential)
77
85
  * or creator has no credential but later npo approved
86
+ *
87
+ * input str: from url
78
88
  */
79
- npoProfileFeatured: boolean(),
89
+ npoProfileFeatured: pipe(
90
+ str,
91
+ transform((x) => x === "true"),
92
+ boolean()
93
+ ),
80
94
  });
81
95
 
82
96
  export interface NewFund extends InferOutput<typeof newFund> {}