@better-giving/donation 4.0.0 → 5.0.1
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/interfaces.d.mts +3 -2
- package/dist/schema.d.mts +7 -7
- package/package.json +4 -4
- package/src/interfaces.mts +3 -1
package/dist/interfaces.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Environment } from "@better-giving/types/list";
|
|
2
2
|
import type { IAllocation, TDonationSource, TDonorTitle, TFrequency } from "./schema.mjs";
|
|
3
|
-
interface IReferrerCommission {
|
|
3
|
+
export interface IReferrerCommission {
|
|
4
4
|
from_tip: number;
|
|
5
5
|
from_fee: number;
|
|
6
6
|
/** exist when paid */
|
|
@@ -100,6 +100,8 @@ export interface IDonationOnHoldAttr {
|
|
|
100
100
|
/** may be empty */
|
|
101
101
|
inHonorOf?: string;
|
|
102
102
|
tributeNotif?: ITributeNotif;
|
|
103
|
+
/** e.g. crypto:tron, stripe:card */
|
|
104
|
+
via?: string;
|
|
103
105
|
}
|
|
104
106
|
export interface IDonationOnholdUpdate extends Partial<Omit<IDonationOnHoldAttr, "transactionId">> {
|
|
105
107
|
}
|
|
@@ -314,4 +316,3 @@ export interface ISubscription {
|
|
|
314
316
|
/** @link https://docs.stripe.com/billing/subscriptions/overview#payment-status */
|
|
315
317
|
status: "active" | "incomplete";
|
|
316
318
|
}
|
|
317
|
-
export {};
|
package/dist/schema.d.mts
CHANGED
|
@@ -19,21 +19,21 @@ export declare const allocation: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
19
19
|
}, "Allocation must sum to 100%">]>;
|
|
20
20
|
export type IAllocation = v.InferOutput<typeof allocation>;
|
|
21
21
|
export declare const page_opts: v.ObjectSchema<{
|
|
22
|
-
readonly limit: v.OptionalSchema<v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<"required">, v.TrimAction]>, v.TransformAction<string, number>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>]>, undefined>;
|
|
22
|
+
readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<"required">, v.TrimAction]>, v.TransformAction<string, number>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>]>, undefined>;
|
|
23
23
|
readonly next: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>, undefined>;
|
|
24
24
|
}, undefined>;
|
|
25
25
|
export interface IPageOpts extends v.InferOutput<typeof page_opts> {
|
|
26
26
|
}
|
|
27
27
|
declare const donations_search_raw: v.ObjectSchema<{
|
|
28
|
-
readonly date_start: v.OptionalSchema<v.LazySchema<v.StringSchema<undefined> | v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, "required">]> | v.SchemaWithPipe<[v.StringSchema<undefined>, v.TransformAction<string, Date>, v.DateSchema<"invalid date">, v.MaxValueAction<Date, Date, "can't be later than today">, v.TransformAction<Date, string>]>>, undefined>;
|
|
29
|
-
readonly date_end: v.OptionalSchema<v.LazySchema<v.StringSchema<undefined> | v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, "required">]> | v.SchemaWithPipe<[v.StringSchema<undefined>, v.TransformAction<string, Date>, v.DateSchema<"invalid date">, v.MaxValueAction<Date, Date, "can't be later than today">, v.TransformAction<Date, string>]>>, undefined>;
|
|
30
|
-
readonly limit: v.OptionalSchema<v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<"required">, v.TrimAction]>, v.TransformAction<string, number>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>]>, undefined>;
|
|
28
|
+
readonly date_start: v.OptionalSchema<v.LazySchema<v.StringSchema<undefined> | v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, "required">]> | v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TransformAction<string, Date>, v.DateSchema<"invalid date">, v.MaxValueAction<Date, Date, "can't be later than today">, v.TransformAction<Date, string>]>>, undefined>;
|
|
29
|
+
readonly date_end: v.OptionalSchema<v.LazySchema<v.StringSchema<undefined> | v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, "required">]> | v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TransformAction<string, Date>, v.DateSchema<"invalid date">, v.MaxValueAction<Date, Date, "can't be later than today">, v.TransformAction<Date, string>]>>, undefined>;
|
|
30
|
+
readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<"required">, v.TrimAction]>, v.TransformAction<string, number>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>]>, undefined>;
|
|
31
31
|
readonly next: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>, undefined>;
|
|
32
32
|
}, undefined>;
|
|
33
33
|
export declare const donations_search: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
34
|
-
readonly date_start: v.OptionalSchema<v.LazySchema<v.StringSchema<undefined> | v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, "required">]> | v.SchemaWithPipe<[v.StringSchema<undefined>, v.TransformAction<string, Date>, v.DateSchema<"invalid date">, v.MaxValueAction<Date, Date, "can't be later than today">, v.TransformAction<Date, string>]>>, undefined>;
|
|
35
|
-
readonly date_end: v.OptionalSchema<v.LazySchema<v.StringSchema<undefined> | v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, "required">]> | v.SchemaWithPipe<[v.StringSchema<undefined>, v.TransformAction<string, Date>, v.DateSchema<"invalid date">, v.MaxValueAction<Date, Date, "can't be later than today">, v.TransformAction<Date, string>]>>, undefined>;
|
|
36
|
-
readonly limit: v.OptionalSchema<v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<"required">, v.TrimAction]>, v.TransformAction<string, number>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>]>, undefined>;
|
|
34
|
+
readonly date_start: v.OptionalSchema<v.LazySchema<v.StringSchema<undefined> | v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, "required">]> | v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TransformAction<string, Date>, v.DateSchema<"invalid date">, v.MaxValueAction<Date, Date, "can't be later than today">, v.TransformAction<Date, string>]>>, undefined>;
|
|
35
|
+
readonly date_end: v.OptionalSchema<v.LazySchema<v.StringSchema<undefined> | v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, "required">]> | v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TransformAction<string, Date>, v.DateSchema<"invalid date">, v.MaxValueAction<Date, Date, "can't be later than today">, v.TransformAction<Date, string>]>>, undefined>;
|
|
36
|
+
readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<"required">, v.TrimAction]>, v.TransformAction<string, number>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>]>, undefined>;
|
|
37
37
|
readonly next: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.Base64Action<string, undefined>]>, undefined>;
|
|
38
38
|
}, undefined>, v.BaseValidation<{
|
|
39
39
|
date_start?: string | undefined;
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-giving/donation",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"devDependencies": {
|
|
5
5
|
"@better-giving/config": "1.1.2"
|
|
6
6
|
},
|
|
7
7
|
"peerDependencies": {
|
|
8
8
|
"@better-giving/types": "1.1.8",
|
|
9
|
-
"@better-giving/db": "2.0
|
|
10
|
-
"@better-giving/schemas": "2.
|
|
11
|
-
"@aws-sdk/lib-dynamodb": "3.
|
|
9
|
+
"@better-giving/db": "2.1.0",
|
|
10
|
+
"@better-giving/schemas": "2.2.0",
|
|
11
|
+
"@aws-sdk/lib-dynamodb": "3.957.0",
|
|
12
12
|
"valibot": "1.2.0",
|
|
13
13
|
"date-fns": "4.1.0"
|
|
14
14
|
},
|
package/src/interfaces.mts
CHANGED
|
@@ -6,7 +6,7 @@ import type {
|
|
|
6
6
|
TFrequency,
|
|
7
7
|
} from "./schema.mjs";
|
|
8
8
|
|
|
9
|
-
interface IReferrerCommission {
|
|
9
|
+
export interface IReferrerCommission {
|
|
10
10
|
from_tip: number;
|
|
11
11
|
from_fee: number;
|
|
12
12
|
/** exist when paid */
|
|
@@ -120,6 +120,8 @@ export interface IDonationOnHoldAttr {
|
|
|
120
120
|
/** may be empty */
|
|
121
121
|
inHonorOf?: string;
|
|
122
122
|
tributeNotif?: ITributeNotif;
|
|
123
|
+
/** e.g. crypto:tron, stripe:card */
|
|
124
|
+
via?:string
|
|
123
125
|
}
|
|
124
126
|
|
|
125
127
|
export interface IDonationOnholdUpdate
|