@better-giving/donation 3.0.12 → 3.0.13
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/onhold-db.d.mts +1 -0
- package/dist/onhold-db.mjs +8 -1
- package/package.json +1 -1
- package/src/onhold-db.mts +9 -0
package/dist/onhold-db.d.mts
CHANGED
|
@@ -13,5 +13,6 @@ export declare class OnHoldDonationsDb extends Db {
|
|
|
13
13
|
item(id: string): Promise<IDonationOnHold | undefined>;
|
|
14
14
|
put_txi(data: TExplicit<IDonationOnHoldAttr>): Promise<import("@aws-sdk/lib-dynamodb").PutCommandOutput>;
|
|
15
15
|
del_txi(id: string): TxType["Delete"];
|
|
16
|
+
del(id: string): Promise<import("@aws-sdk/lib-dynamodb").DeleteCommandOutput>;
|
|
16
17
|
list_by_email(email: string, opts?: IDonationsSearch): Promise<IPageKeyed<IDonationOnHold>>;
|
|
17
18
|
}
|
package/dist/onhold-db.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GetCommand, PutCommand, QueryCommand, UpdateCommand, } from "@aws-sdk/lib-dynamodb";
|
|
1
|
+
import { DeleteCommand, GetCommand, PutCommand, QueryCommand, UpdateCommand, } from "@aws-sdk/lib-dynamodb";
|
|
2
2
|
import { Db, UpdateBuilder } from "@better-giving/db";
|
|
3
3
|
export class OnHoldDonationsDb extends Db {
|
|
4
4
|
static table = "on_hold_donations";
|
|
@@ -44,6 +44,13 @@ export class OnHoldDonationsDb extends Db {
|
|
|
44
44
|
del_txi(id) {
|
|
45
45
|
return { TableName: OnHoldDonationsDb.table, Key: this.key(id) };
|
|
46
46
|
}
|
|
47
|
+
async del(id) {
|
|
48
|
+
const cmd = new DeleteCommand({
|
|
49
|
+
TableName: OnHoldDonationsDb.table,
|
|
50
|
+
Key: this.key(id),
|
|
51
|
+
});
|
|
52
|
+
return this.client.send(cmd);
|
|
53
|
+
}
|
|
47
54
|
async list_by_email(email, opts) {
|
|
48
55
|
/** key condition expression */
|
|
49
56
|
let kce = "#email = :email";
|
package/package.json
CHANGED
package/src/onhold-db.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
DeleteCommand,
|
|
2
3
|
GetCommand,
|
|
3
4
|
PutCommand,
|
|
4
5
|
QueryCommand,
|
|
@@ -71,6 +72,14 @@ export class OnHoldDonationsDb extends Db {
|
|
|
71
72
|
return { TableName: OnHoldDonationsDb.table, Key: this.key(id) };
|
|
72
73
|
}
|
|
73
74
|
|
|
75
|
+
async del(id: string) {
|
|
76
|
+
const cmd = new DeleteCommand({
|
|
77
|
+
TableName: OnHoldDonationsDb.table,
|
|
78
|
+
Key: this.key(id),
|
|
79
|
+
});
|
|
80
|
+
return this.client.send(cmd);
|
|
81
|
+
}
|
|
82
|
+
|
|
74
83
|
async list_by_email(
|
|
75
84
|
email: string,
|
|
76
85
|
opts?: IDonationsSearch
|