@better-giving/donation 1.0.2 → 1.0.3

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/intent.d.mts CHANGED
@@ -41,14 +41,14 @@ export declare const amount: v.ObjectSchema<{
41
41
  readonly feeAllowance: v.SchemaWithPipe<[v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>]>;
42
42
  }, undefined>;
43
43
  export type Amount = v.InferOutput<typeof amount>;
44
- export declare const endowId: v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
44
+ export declare const endowId: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.TransformAction<string, number>, v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
45
45
  export declare const uuid: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.UuidAction<string, undefined>]>;
46
46
  export declare const program: v.ObjectSchema<{
47
47
  readonly id: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.UuidAction<string, undefined>]>;
48
48
  readonly name: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.NonEmptyAction<string, undefined>]>;
49
49
  }, undefined>;
50
50
  export type Program = v.InferOutput<typeof program>;
51
- export declare const recipient: v.UnionSchema<[v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.UuidAction<string, undefined>]>], undefined>;
51
+ export declare const recipient: v.UnionSchema<[v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.TransformAction<string, number>, v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.UuidAction<string, undefined>]>], undefined>;
52
52
  export type Recipient = v.InferOutput<typeof recipient>;
53
53
  export declare const tributeNotif: v.ObjectSchema<{
54
54
  readonly toEmail: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.EmailAction<string, undefined>]>;
@@ -72,7 +72,7 @@ export declare const intent: v.ObjectSchema<{
72
72
  readonly tip: v.SchemaWithPipe<[v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>]>;
73
73
  readonly feeAllowance: v.SchemaWithPipe<[v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>]>;
74
74
  }, undefined>;
75
- readonly recipient: v.UnionSchema<[v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.UuidAction<string, undefined>]>], undefined>;
75
+ readonly recipient: v.UnionSchema<[v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.TransformAction<string, number>, v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.UuidAction<string, undefined>]>], undefined>;
76
76
  readonly program: v.OptionalSchema<v.ObjectSchema<{
77
77
  readonly id: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.UuidAction<string, undefined>]>;
78
78
  readonly name: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.NonEmptyAction<string, undefined>]>;
package/dist/intent.mjs CHANGED
@@ -34,7 +34,7 @@ export const amount = v.object({
34
34
  tip: money,
35
35
  feeAllowance: money,
36
36
  });
37
- export const endowId = v.pipe(v.number(), v.integer(), v.minValue(1));
37
+ export const endowId = v.pipe(str, v.transform((x) => +x), v.number(), v.integer(), v.minValue(1));
38
38
  export const uuid = v.pipe(str, v.uuid());
39
39
  export const program = v.object({
40
40
  id: uuid,
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@better-giving/donation",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "devDependencies": {
5
5
  "@better-giving/config": "workspace:*"
6
6
  },
7
7
  "peerDependencies": {
8
- "@better-giving/types": "1.0.1",
8
+ "@better-giving/types": "1.0.2",
9
9
  "valibot": "0.42.0"
10
10
  },
11
11
  "files": [
package/src/intent.mts CHANGED
@@ -55,7 +55,13 @@ export const amount = v.object({
55
55
 
56
56
  export type Amount = v.InferOutput<typeof amount>;
57
57
 
58
- export const endowId = v.pipe(v.number(), v.integer(), v.minValue(1));
58
+ export const endowId = v.pipe(
59
+ str,
60
+ v.transform((x) => +x),
61
+ v.number(),
62
+ v.integer(),
63
+ v.minValue(1)
64
+ );
59
65
  export const uuid = v.pipe(str, v.uuid());
60
66
 
61
67
  export const program = v.object({