@better-giving/donation 1.0.2 → 1.0.4
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/final-recorder.d.mts +1 -1
- package/dist/intent.d.mts +3 -3
- package/dist/intent.mjs +1 -1
- package/package.json +2 -2
- package/src/donation.mts +2 -0
- package/src/final-recorder.mts +1 -0
- package/src/intent.mts +7 -1
package/dist/donation.d.mts
CHANGED
|
@@ -102,6 +102,7 @@ export declare namespace Donation {
|
|
|
102
102
|
splitLiq: string;
|
|
103
103
|
charityName: string;
|
|
104
104
|
nonProfitMsg?: string;
|
|
105
|
+
claimed: boolean;
|
|
105
106
|
fiscalSponsored: boolean;
|
|
106
107
|
client: Client;
|
|
107
108
|
network: Environment;
|
|
@@ -272,6 +273,7 @@ export declare namespace OnHoldDonation {
|
|
|
272
273
|
/** program donation: may be empty `""`*/
|
|
273
274
|
programId?: string;
|
|
274
275
|
programName?: string;
|
|
276
|
+
claimed: boolean;
|
|
275
277
|
fiscalSponsored: boolean;
|
|
276
278
|
hideBgTip?: boolean;
|
|
277
279
|
network: Environment;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Donation } from "./donation.mjs";
|
|
2
|
-
type FinalRecord = Pick<Donation.V2DBRecord, "amount" | "appUsed" | "chainName" | "charityName" | "denomination" | "email" | "endowmentId" | "feeAllowance" | "fiatRamp" | "fiscalSponsored" | "inHonorOf" | "isRecurring" | "network" | "nonProfitMsg" | "paymentMethod" | "programId" | "programName" | "splitLiq" | "tipAmount" | "transactionDate" | "transactionId" | "usdValue">;
|
|
2
|
+
type FinalRecord = Pick<Donation.V2DBRecord, "amount" | "appUsed" | "chainName" | "charityName" | "claimed" | "denomination" | "email" | "endowmentId" | "feeAllowance" | "fiatRamp" | "fiscalSponsored" | "inHonorOf" | "isRecurring" | "network" | "nonProfitMsg" | "paymentMethod" | "programId" | "programName" | "splitLiq" | "tipAmount" | "transactionDate" | "transactionId" | "usdValue">;
|
|
3
3
|
interface SettledAmounts {
|
|
4
4
|
settledFee: number;
|
|
5
5
|
settledNet: number;
|
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.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"devDependencies": {
|
|
5
5
|
"@better-giving/config": "workspace:*"
|
|
6
6
|
},
|
|
7
7
|
"peerDependencies": {
|
|
8
|
-
"@better-giving/types": "1.0.
|
|
8
|
+
"@better-giving/types": "1.0.3",
|
|
9
9
|
"valibot": "0.42.0"
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
package/src/donation.mts
CHANGED
|
@@ -142,6 +142,7 @@ export declare namespace Donation {
|
|
|
142
142
|
|
|
143
143
|
charityName: string;
|
|
144
144
|
nonProfitMsg?: string;
|
|
145
|
+
claimed: boolean;
|
|
145
146
|
fiscalSponsored: boolean;
|
|
146
147
|
client: Client;
|
|
147
148
|
network: Environment;
|
|
@@ -376,6 +377,7 @@ export declare namespace OnHoldDonation {
|
|
|
376
377
|
/** program donation: may be empty `""`*/
|
|
377
378
|
programId?: string;
|
|
378
379
|
programName?: string;
|
|
380
|
+
claimed: boolean;
|
|
379
381
|
fiscalSponsored: boolean;
|
|
380
382
|
hideBgTip?: boolean;
|
|
381
383
|
network: Environment;
|
package/src/final-recorder.mts
CHANGED
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(
|
|
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({
|