@better-giving/donation 1.1.17 → 1.1.18

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
@@ -37,7 +37,7 @@ export declare const donor: v.ObjectSchema<{
37
37
  export type Donor = v.InferOutput<typeof donor>;
38
38
  export declare const amount: v.ObjectSchema<{
39
39
  readonly amount: v.SchemaWithPipe<[v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>]>;
40
- readonly currency: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.NonEmptyAction<string, undefined>]>;
40
+ readonly currency: v.SchemaWithPipe<[v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.NonEmptyAction<string, undefined>]>, v.ToUpperCaseAction]>;
41
41
  readonly tip: v.SchemaWithPipe<[v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>]>;
42
42
  readonly fee_allowance: v.SchemaWithPipe<[v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>]>;
43
43
  }, undefined>;
@@ -52,24 +52,24 @@ export type Program = v.InferOutput<typeof program>;
52
52
  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>;
53
53
  export type Recipient = v.InferOutput<typeof recipient>;
54
54
  export declare const tribute_notif: v.ObjectSchema<{
55
- readonly toEmail: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.EmailAction<string, undefined>]>;
56
- readonly toFullName: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.NonEmptyAction<string, undefined>]>;
57
- readonly fromMsg: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.MaxLengthAction<string, 250, undefined>]>;
55
+ readonly to_email: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.EmailAction<string, undefined>]>;
56
+ readonly to_fullname: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.NonEmptyAction<string, undefined>]>;
57
+ readonly from_msg: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.MaxLengthAction<string, 250, undefined>]>;
58
58
  }, undefined>;
59
59
  export type TributeNotif = v.InferOutput<typeof tribute_notif>;
60
60
  export declare const tribute: v.ObjectSchema<{
61
- readonly fullName: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.NonEmptyAction<string, undefined>]>;
61
+ readonly full_name: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.NonEmptyAction<string, undefined>]>;
62
62
  readonly notif: v.OptionalSchema<v.ObjectSchema<{
63
- readonly toEmail: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.EmailAction<string, undefined>]>;
64
- readonly toFullName: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.NonEmptyAction<string, undefined>]>;
65
- readonly fromMsg: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.MaxLengthAction<string, 250, undefined>]>;
63
+ readonly to_email: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.EmailAction<string, undefined>]>;
64
+ readonly to_fullname: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.NonEmptyAction<string, undefined>]>;
65
+ readonly from_msg: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.MaxLengthAction<string, 250, undefined>]>;
66
66
  }, undefined>, never>;
67
67
  }, undefined>;
68
68
  export type Tribute = v.InferOutput<typeof tribute>;
69
69
  export declare const intent: v.ObjectSchema<{
70
70
  readonly amount: v.ObjectSchema<{
71
71
  readonly amount: v.SchemaWithPipe<[v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>]>;
72
- readonly currency: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.NonEmptyAction<string, undefined>]>;
72
+ readonly currency: v.SchemaWithPipe<[v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.NonEmptyAction<string, undefined>]>, v.ToUpperCaseAction]>;
73
73
  readonly tip: v.SchemaWithPipe<[v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>]>;
74
74
  readonly fee_allowance: v.SchemaWithPipe<[v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>]>;
75
75
  }, undefined>;
@@ -98,17 +98,17 @@ export declare const intent: v.ObjectSchema<{
98
98
  readonly donor_public: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
99
99
  readonly source: v.PicklistSchema<readonly ["bg-marketplace", "bg-widget", "tester-app"], undefined>;
100
100
  readonly tribute: v.OptionalSchema<v.ObjectSchema<{
101
- readonly fullName: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.NonEmptyAction<string, undefined>]>;
101
+ readonly full_name: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.NonEmptyAction<string, undefined>]>;
102
102
  readonly notif: v.OptionalSchema<v.ObjectSchema<{
103
- readonly toEmail: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.EmailAction<string, undefined>]>;
104
- readonly toFullName: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.NonEmptyAction<string, undefined>]>;
105
- readonly fromMsg: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.MaxLengthAction<string, 250, undefined>]>;
103
+ readonly to_email: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.EmailAction<string, undefined>]>;
104
+ readonly to_fullname: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.NonEmptyAction<string, undefined>]>;
105
+ readonly from_msg: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.MaxLengthAction<string, 250, undefined>]>;
106
106
  }, undefined>, never>;
107
107
  }, undefined>, never>;
108
108
  readonly frequency: v.PicklistSchema<readonly ["one-time", "recurring"], undefined>;
109
109
  /** chain name, etc. */
110
- readonly viaName: v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>;
110
+ readonly via_name: v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>;
111
111
  /** chain id, workflow-session-id, etc. */
112
- readonly viaId: v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>;
112
+ readonly via_id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>;
113
113
  }, undefined>;
114
114
  export type DonationIntent = v.InferOutput<typeof intent>;
package/dist/intent.mjs CHANGED
@@ -31,7 +31,7 @@ export const donor = v.object({
31
31
  const money = v.pipe(v.number(), v.minValue(0));
32
32
  export const amount = v.object({
33
33
  amount: money,
34
- currency: required_str,
34
+ currency: v.pipe(required_str, v.toUpperCase()),
35
35
  tip: money,
36
36
  fee_allowance: money,
37
37
  });
@@ -43,12 +43,12 @@ export const program = v.object({
43
43
  });
44
44
  export const recipient = v.union([endow_id, uuid]);
45
45
  export const tribute_notif = v.object({
46
- toEmail: v.pipe(str, v.email()),
47
- toFullName: v.pipe(str, v.nonEmpty()),
48
- fromMsg: v.pipe(str, v.maxLength(250)),
46
+ to_email: v.pipe(str, v.email()),
47
+ to_fullname: v.pipe(str, v.nonEmpty()),
48
+ from_msg: v.pipe(str, v.maxLength(250)),
49
49
  });
50
50
  export const tribute = v.object({
51
- fullName: required_str,
51
+ full_name: required_str,
52
52
  notif: v.optional(tribute_notif),
53
53
  });
54
54
  export const intent = v.object({
@@ -62,7 +62,7 @@ export const intent = v.object({
62
62
  tribute: v.optional(tribute),
63
63
  frequency,
64
64
  /** chain name, etc. */
65
- viaName: str,
65
+ via_name: str,
66
66
  /** chain id, workflow-session-id, etc. */
67
- viaId: str,
67
+ via_id: str,
68
68
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-giving/donation",
3
- "version": "1.1.17",
3
+ "version": "1.1.18",
4
4
  "devDependencies": {
5
5
  "@better-giving/config": "1.1.2"
6
6
  },
package/src/intent.mts CHANGED
@@ -49,7 +49,7 @@ const money = v.pipe(v.number(), v.minValue(0));
49
49
 
50
50
  export const amount = v.object({
51
51
  amount: money,
52
- currency: required_str,
52
+ currency: v.pipe(required_str, v.toUpperCase()),
53
53
  tip: money,
54
54
  fee_allowance: money,
55
55
  });
@@ -77,15 +77,15 @@ export const recipient = v.union([endow_id, uuid]);
77
77
  export type Recipient = v.InferOutput<typeof recipient>;
78
78
 
79
79
  export const tribute_notif = v.object({
80
- toEmail: v.pipe(str, v.email()),
81
- toFullName: v.pipe(str, v.nonEmpty()),
82
- fromMsg: v.pipe(str, v.maxLength(250)),
80
+ to_email: v.pipe(str, v.email()),
81
+ to_fullname: v.pipe(str, v.nonEmpty()),
82
+ from_msg: v.pipe(str, v.maxLength(250)),
83
83
  });
84
84
 
85
85
  export type TributeNotif = v.InferOutput<typeof tribute_notif>;
86
86
 
87
87
  export const tribute = v.object({
88
- fullName: required_str,
88
+ full_name: required_str,
89
89
  notif: v.optional(tribute_notif),
90
90
  });
91
91
 
@@ -102,9 +102,9 @@ export const intent = v.object({
102
102
  tribute: v.optional(tribute),
103
103
  frequency,
104
104
  /** chain name, etc. */
105
- viaName: str,
105
+ via_name: str,
106
106
  /** chain id, workflow-session-id, etc. */
107
- viaId: str,
107
+ via_id: str,
108
108
  });
109
109
 
110
110
  export type DonationIntent = v.InferOutput<typeof intent>;