@better-giving/donation 1.1.17 → 1.1.19
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/donation.d.mts +2 -0
- package/dist/intent.d.mts +16 -15
- package/dist/intent.mjs +8 -7
- package/package.json +1 -1
- package/src/donation.mts +2 -0
- package/src/intent.mts +8 -7
package/dist/donation.d.mts
CHANGED
|
@@ -115,6 +115,7 @@ export declare namespace Donation {
|
|
|
115
115
|
splitLiq: string;
|
|
116
116
|
charityName: string;
|
|
117
117
|
nonProfitMsg?: string;
|
|
118
|
+
msg_to_npo?: string;
|
|
118
119
|
claimed: boolean;
|
|
119
120
|
fiscalSponsored: boolean;
|
|
120
121
|
client: Client;
|
|
@@ -268,6 +269,7 @@ export declare namespace OnHoldDonation {
|
|
|
268
269
|
/** only allowed if honoree is provided */
|
|
269
270
|
tributeNotif?: Donation.TributeNotif;
|
|
270
271
|
donor_message?: string;
|
|
272
|
+
msg_to_npo?: string;
|
|
271
273
|
donor_public?: boolean;
|
|
272
274
|
company_name?: string;
|
|
273
275
|
} & (ApesAttributes | EmptyObject) & (Donation.WithKYC | Donation.WithoutKYC);
|
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
|
|
56
|
-
readonly
|
|
57
|
-
readonly
|
|
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
|
|
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
|
|
64
|
-
readonly
|
|
65
|
-
readonly
|
|
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>;
|
|
@@ -96,19 +96,20 @@ export declare const intent: v.ObjectSchema<{
|
|
|
96
96
|
}, undefined>;
|
|
97
97
|
readonly donor_message: v.OptionalSchema<v.SchemaWithPipe<[v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.NonEmptyAction<string, undefined>]>, v.MaxLengthAction<string, 500, undefined>]>, never>;
|
|
98
98
|
readonly donor_public: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
99
|
+
readonly msg_to_npo: v.OptionalSchema<v.SchemaWithPipe<[v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.NonEmptyAction<string, undefined>]>, v.MaxLengthAction<string, 500, undefined>]>, never>;
|
|
99
100
|
readonly source: v.PicklistSchema<readonly ["bg-marketplace", "bg-widget", "tester-app"], undefined>;
|
|
100
101
|
readonly tribute: v.OptionalSchema<v.ObjectSchema<{
|
|
101
|
-
readonly
|
|
102
|
+
readonly full_name: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.NonEmptyAction<string, undefined>]>;
|
|
102
103
|
readonly notif: v.OptionalSchema<v.ObjectSchema<{
|
|
103
|
-
readonly
|
|
104
|
-
readonly
|
|
105
|
-
readonly
|
|
104
|
+
readonly to_email: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.EmailAction<string, undefined>]>;
|
|
105
|
+
readonly to_fullname: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.NonEmptyAction<string, undefined>]>;
|
|
106
|
+
readonly from_msg: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.MaxLengthAction<string, 250, undefined>]>;
|
|
106
107
|
}, undefined>, never>;
|
|
107
108
|
}, undefined>, never>;
|
|
108
109
|
readonly frequency: v.PicklistSchema<readonly ["one-time", "recurring"], undefined>;
|
|
109
110
|
/** chain name, etc. */
|
|
110
|
-
readonly
|
|
111
|
+
readonly via_name: v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>;
|
|
111
112
|
/** chain id, workflow-session-id, etc. */
|
|
112
|
-
readonly
|
|
113
|
+
readonly via_id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>;
|
|
113
114
|
}, undefined>;
|
|
114
115
|
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
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
|
|
51
|
+
full_name: required_str,
|
|
52
52
|
notif: v.optional(tribute_notif),
|
|
53
53
|
});
|
|
54
54
|
export const intent = v.object({
|
|
@@ -58,11 +58,12 @@ export const intent = v.object({
|
|
|
58
58
|
donor,
|
|
59
59
|
donor_message: v.optional(v.pipe(required_str, v.maxLength(500))),
|
|
60
60
|
donor_public: v.optional(v.boolean()),
|
|
61
|
+
msg_to_npo: v.optional(v.pipe(required_str, v.maxLength(500))),
|
|
61
62
|
source: donation_source,
|
|
62
63
|
tribute: v.optional(tribute),
|
|
63
64
|
frequency,
|
|
64
65
|
/** chain name, etc. */
|
|
65
|
-
|
|
66
|
+
via_name: str,
|
|
66
67
|
/** chain id, workflow-session-id, etc. */
|
|
67
|
-
|
|
68
|
+
via_id: str,
|
|
68
69
|
});
|
package/package.json
CHANGED
package/src/donation.mts
CHANGED
|
@@ -158,6 +158,7 @@ export declare namespace Donation {
|
|
|
158
158
|
|
|
159
159
|
charityName: string;
|
|
160
160
|
nonProfitMsg?: string;
|
|
161
|
+
msg_to_npo?: string;
|
|
161
162
|
claimed: boolean;
|
|
162
163
|
fiscalSponsored: boolean;
|
|
163
164
|
client: Client;
|
|
@@ -371,6 +372,7 @@ export declare namespace OnHoldDonation {
|
|
|
371
372
|
/** only allowed if honoree is provided */
|
|
372
373
|
tributeNotif?: Donation.TributeNotif;
|
|
373
374
|
donor_message?: string;
|
|
375
|
+
msg_to_npo?: string;
|
|
374
376
|
donor_public?: boolean;
|
|
375
377
|
company_name?: string;
|
|
376
378
|
} & (ApesAttributes | EmptyObject) &
|
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
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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
|
-
|
|
88
|
+
full_name: required_str,
|
|
89
89
|
notif: v.optional(tribute_notif),
|
|
90
90
|
});
|
|
91
91
|
|
|
@@ -98,13 +98,14 @@ export const intent = v.object({
|
|
|
98
98
|
donor,
|
|
99
99
|
donor_message: v.optional(v.pipe(required_str, v.maxLength(500))),
|
|
100
100
|
donor_public: v.optional(v.boolean()),
|
|
101
|
+
msg_to_npo: v.optional(v.pipe(required_str, v.maxLength(500))),
|
|
101
102
|
source: donation_source,
|
|
102
103
|
tribute: v.optional(tribute),
|
|
103
104
|
frequency,
|
|
104
105
|
/** chain name, etc. */
|
|
105
|
-
|
|
106
|
+
via_name: str,
|
|
106
107
|
/** chain id, workflow-session-id, etc. */
|
|
107
|
-
|
|
108
|
+
via_id: str,
|
|
108
109
|
});
|
|
109
110
|
|
|
110
111
|
export type DonationIntent = v.InferOutput<typeof intent>;
|