@better-giving/donation 3.0.2 → 3.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 +1 -34
- package/package.json +2 -2
- package/src/donation.mts +0 -51
package/dist/donation.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ISODate } from "@better-giving/types/alias";
|
|
2
2
|
import type { ChainID, Environment } from "@better-giving/types/list";
|
|
3
3
|
import type { EmptyObject, OrStr } from "@better-giving/types/utils";
|
|
4
|
-
import type { Allocation, DonorTitle
|
|
4
|
+
import type { Allocation, DonorTitle } from "./schema.mjs";
|
|
5
5
|
export declare namespace Donation {
|
|
6
6
|
type Index = "AppUsed_Index" | "Checked-8283_Index" | "Email_Index" | "EndowmentId_Index" | "FundDeposits_Index" | "Tax-Receipt-Sent_Index" | "Network-FinalizedDate_Index" | "WalletAddress_Index" | "Referrer-FinalizedDate_index";
|
|
7
7
|
type App = "aging" | "angel-protocol" | "bg-marketplace" | "bg-widget" | "black-history-month" | "make-whole" | "mental-health" | "restore-earth" | "tester-app" | "ukraine-portal";
|
|
@@ -353,36 +353,3 @@ export declare namespace PayPalDonation {
|
|
|
353
353
|
type Intent = "CAPTURE" | "AUTHORIZE";
|
|
354
354
|
type Status = "CREATED" | "SAVED" | "APPROVED" | "VOIDED" | "COMPLETED" | "PAYER_ACTION_REQUIRED";
|
|
355
355
|
}
|
|
356
|
-
export declare namespace StripeDonation {
|
|
357
|
-
/** DEPRECATED - can be removed eventually as existing records will eventually "expire" */
|
|
358
|
-
type LegacyMetadata = {
|
|
359
|
-
/** This attr will help in identifying PaymentIntents made for one-time donations only */
|
|
360
|
-
donation_type: Extract<Frequency, "one-time">;
|
|
361
|
-
/** This attr will link the received webhook event to a donation intent */
|
|
362
|
-
intent_tx_id: string;
|
|
363
|
-
};
|
|
364
|
-
/**
|
|
365
|
-
* Stripe forces metadata to be typeof `string`
|
|
366
|
-
* @link https://docs.stripe.com/metadata/use-cases#store-structured-data
|
|
367
|
-
*/
|
|
368
|
-
type Metadata = {
|
|
369
|
-
[K in keyof OnHoldDonation.FiatDBRecord]: string;
|
|
370
|
-
} & {
|
|
371
|
-
title?: DonorTitle;
|
|
372
|
-
fullName: string;
|
|
373
|
-
ukGiftAid: string;
|
|
374
|
-
streetAddress?: string;
|
|
375
|
-
/** may be empty `''` */
|
|
376
|
-
city?: string;
|
|
377
|
-
/** optional */
|
|
378
|
-
state?: string;
|
|
379
|
-
zipCode?: string;
|
|
380
|
-
country?: string;
|
|
381
|
-
};
|
|
382
|
-
type SetupIntentMetadata = Metadata & {
|
|
383
|
-
productId: string;
|
|
384
|
-
subsQuantity: string;
|
|
385
|
-
};
|
|
386
|
-
/** BG accepted payment methods */
|
|
387
|
-
type PaymentMethods = "acss_debit" | "amazon_pay" | "bancontact" | "card" | "cashapp" | "eps" | "ideal" | "link" | "p24" | "sepa_debit" | "sofort" | "us_bank_account";
|
|
388
|
-
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-giving/donation",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
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/schemas": "2.0.
|
|
9
|
+
"@better-giving/schemas": "2.0.3",
|
|
10
10
|
"valibot": "0.42.0"
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
package/src/donation.mts
CHANGED
|
@@ -481,54 +481,3 @@ export declare namespace PayPalDonation {
|
|
|
481
481
|
| "COMPLETED"
|
|
482
482
|
| "PAYER_ACTION_REQUIRED";
|
|
483
483
|
}
|
|
484
|
-
|
|
485
|
-
export declare namespace StripeDonation {
|
|
486
|
-
/** DEPRECATED - can be removed eventually as existing records will eventually "expire" */
|
|
487
|
-
type LegacyMetadata = {
|
|
488
|
-
/** This attr will help in identifying PaymentIntents made for one-time donations only */
|
|
489
|
-
donation_type: Extract<Frequency, "one-time">;
|
|
490
|
-
/** This attr will link the received webhook event to a donation intent */
|
|
491
|
-
intent_tx_id: string;
|
|
492
|
-
};
|
|
493
|
-
|
|
494
|
-
/**
|
|
495
|
-
* Stripe forces metadata to be typeof `string`
|
|
496
|
-
* @link https://docs.stripe.com/metadata/use-cases#store-structured-data
|
|
497
|
-
*/
|
|
498
|
-
type Metadata = {
|
|
499
|
-
[K in keyof OnHoldDonation.FiatDBRecord]: string;
|
|
500
|
-
} & {
|
|
501
|
-
// KYC fields
|
|
502
|
-
title?: DonorTitle;
|
|
503
|
-
fullName: string;
|
|
504
|
-
ukGiftAid: string;
|
|
505
|
-
streetAddress?: string;
|
|
506
|
-
/** may be empty `''` */
|
|
507
|
-
city?: string;
|
|
508
|
-
/** optional */
|
|
509
|
-
state?: string;
|
|
510
|
-
zipCode?: string;
|
|
511
|
-
country?: string;
|
|
512
|
-
};
|
|
513
|
-
|
|
514
|
-
type SetupIntentMetadata = Metadata & {
|
|
515
|
-
// Subs specific fields
|
|
516
|
-
productId: string;
|
|
517
|
-
subsQuantity: string;
|
|
518
|
-
};
|
|
519
|
-
|
|
520
|
-
/** BG accepted payment methods */
|
|
521
|
-
type PaymentMethods =
|
|
522
|
-
| "acss_debit"
|
|
523
|
-
| "amazon_pay"
|
|
524
|
-
| "bancontact"
|
|
525
|
-
| "card"
|
|
526
|
-
| "cashapp"
|
|
527
|
-
| "eps"
|
|
528
|
-
| "ideal"
|
|
529
|
-
| "link"
|
|
530
|
-
| "p24"
|
|
531
|
-
| "sepa_debit"
|
|
532
|
-
| "sofort"
|
|
533
|
-
| "us_bank_account";
|
|
534
|
-
}
|