@better-giving/donation 1.1.4 → 1.1.5
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-message.d.mts +30 -0
- package/dist/donation-message.mjs +1 -0
- package/dist/donation.d.mts +2 -0
- package/dist/intent.d.mts +2 -0
- package/dist/intent.mjs +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ISODate } from "@better-giving/types/alias";
|
|
2
|
+
import type { Environment } from "@better-giving/types/list";
|
|
3
|
+
export declare namespace GSI1 {
|
|
4
|
+
type Name = "donor-gsi";
|
|
5
|
+
interface Key {
|
|
6
|
+
/** `Donor#{donor_id}#{env}` */
|
|
7
|
+
gsi1PK: `Donor#${string}#${Environment}`;
|
|
8
|
+
gsi1SK: ISODate;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export declare namespace DonationMessage {
|
|
12
|
+
interface PrimaryKey {
|
|
13
|
+
/** `Recipient#{recipient_id}#{env}` */
|
|
14
|
+
PK: `Recipient#${string}#${Environment}`;
|
|
15
|
+
SK: ISODate;
|
|
16
|
+
}
|
|
17
|
+
interface NonKeyAttributes {
|
|
18
|
+
/** USD amount at the time of donation */
|
|
19
|
+
amount: number;
|
|
20
|
+
donation_id: string;
|
|
21
|
+
donor_id: string;
|
|
22
|
+
donor_message: string;
|
|
23
|
+
donor_name: string;
|
|
24
|
+
env: Environment;
|
|
25
|
+
/** Endow or fund ID */
|
|
26
|
+
recipient_id: string;
|
|
27
|
+
}
|
|
28
|
+
interface DBRecord extends PrimaryKey, NonKeyAttributes, GSI1.Key {
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/donation.d.mts
CHANGED
|
@@ -292,6 +292,8 @@ export declare namespace OnHoldDonation {
|
|
|
292
292
|
inHonorOf?: string;
|
|
293
293
|
/** only allowed if honoree is provided */
|
|
294
294
|
tributeNotif?: Donation.TributeNotif;
|
|
295
|
+
donor_message?: string;
|
|
296
|
+
donor_public?: boolean;
|
|
295
297
|
} & (ApesAttributes | EmptyObject) & (Donation.WithKYC | Donation.WithoutKYC);
|
|
296
298
|
type CryptoDBRecord = PrimaryKey & NonKeyAttributes & CryptoAttributes & Donation.EmailIndexKey;
|
|
297
299
|
type FiatDBRecord = PrimaryKey & Required<Donation.FiatRamp_IndexKey> & NonKeyAttributes & FiatAttributes & Required<Donation.EmailIndexKey>;
|
package/dist/intent.d.mts
CHANGED
|
@@ -92,6 +92,8 @@ export declare const intent: v.ObjectSchema<{
|
|
|
92
92
|
readonly ukGiftAid: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
93
93
|
}, undefined>, never>;
|
|
94
94
|
}, undefined>;
|
|
95
|
+
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>;
|
|
96
|
+
readonly donor_public: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
95
97
|
readonly source: v.PicklistSchema<readonly ["bg-marketplace", "bg-widget", "tester-app"], undefined>;
|
|
96
98
|
readonly tribute: v.OptionalSchema<v.ObjectSchema<{
|
|
97
99
|
readonly fullName: v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.NonEmptyAction<string, undefined>]>;
|
package/dist/intent.mjs
CHANGED
|
@@ -55,6 +55,8 @@ export const intent = v.object({
|
|
|
55
55
|
recipient,
|
|
56
56
|
program: v.optional(program),
|
|
57
57
|
donor,
|
|
58
|
+
donor_message: v.optional(v.pipe(requiredStr, v.maxLength(500))),
|
|
59
|
+
donor_public: v.optional(v.boolean()),
|
|
58
60
|
source: donationSource,
|
|
59
61
|
tribute: v.optional(tribute),
|
|
60
62
|
frequency,
|