@better-giving/donation 3.0.19 → 3.0.20

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.
@@ -1,7 +1,7 @@
1
1
  import { type QueryCommandInput } from "@aws-sdk/lib-dynamodb";
2
2
  import { Db, type TxType } from "@better-giving/db";
3
3
  import type { IPageKeyed } from "@better-giving/types/api";
4
- import type { IDonationFinal, IDonationFinalAttr, TExplicit } from "./interfaces.mjs";
4
+ import type { IDonationFinal, IDonationFinalAttr } from "./interfaces.mjs";
5
5
  import type { IDonationsSearch, IPageOpts } from "./schema.mjs";
6
6
  export declare class DonationsDb extends Db {
7
7
  static readonly gsi_referrer$settled_date = "Referrer-FinalizedDate_Index";
@@ -12,7 +12,7 @@ export declare class DonationsDb extends Db {
12
12
  transactionId: string;
13
13
  };
14
14
  item(id: string): Promise<IDonationFinal | undefined>;
15
- put_txi(data: TExplicit<IDonationFinalAttr>): TxType["Put"];
15
+ put_txi(data: IDonationFinalAttr): TxType["Put"];
16
16
  referred_by_q(referrer: string, opts?: IPageOpts): QueryCommandInput;
17
17
  referred_by(referrer: string, opts?: IPageOpts): Promise<IPageKeyed<IDonationFinal>>;
18
18
  list_to_npo(npo: number, opts?: IDonationsSearch & {
@@ -154,9 +154,6 @@ export interface IDonationFinalAttrLegacy {
154
154
  /** @deprecated */
155
155
  walletAddress?: string;
156
156
  }
157
- export type TExplicit<T> = {
158
- [K in keyof T]-?: T[K];
159
- };
160
157
  export interface IDonationFinalAttr {
161
158
  transactionId: string;
162
159
  /** iso */
@@ -1,6 +1,6 @@
1
1
  import { Db, type TxType } from "@better-giving/db";
2
2
  import type { IPageKeyed } from "@better-giving/types/api";
3
- import type { IDonationOnHold, IDonationOnHoldAttr, TExplicit } from "./interfaces.mjs";
3
+ import type { IDonationOnHold, IDonationOnHoldAttr } from "./interfaces.mjs";
4
4
  import type { IDonationsSearch } from "./schema.mjs";
5
5
  export declare class OnHoldDonationsDb extends Db {
6
6
  static readonly gsi_email$tx_date = "email-tx_date-gsi";
@@ -8,10 +8,10 @@ export declare class OnHoldDonationsDb extends Db {
8
8
  key(id: string): {
9
9
  transactionId: string;
10
10
  };
11
- put(data: TExplicit<IDonationOnHoldAttr>): Promise<import("@aws-sdk/lib-dynamodb").PutCommandOutput>;
11
+ put(data: IDonationOnHoldAttr): Promise<import("@aws-sdk/lib-dynamodb").PutCommandOutput>;
12
12
  update(id: string, data: Partial<Omit<IDonationOnHoldAttr, "transactionId">>): Promise<IDonationOnHold>;
13
13
  item(id: string): Promise<IDonationOnHold | undefined>;
14
- put_txi(data: TExplicit<IDonationOnHoldAttr>): Promise<import("@aws-sdk/lib-dynamodb").PutCommandOutput>;
14
+ put_txi(data: IDonationOnHoldAttr): Promise<import("@aws-sdk/lib-dynamodb").PutCommandOutput>;
15
15
  del_txi(id: string): TxType["Delete"];
16
16
  del(id: string): Promise<import("@aws-sdk/lib-dynamodb").DeleteCommandOutput>;
17
17
  list_by_email(email: string, opts?: IDonationsSearch): Promise<IPageKeyed<IDonationOnHold>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-giving/donation",
3
- "version": "3.0.19",
3
+ "version": "3.0.20",
4
4
  "devDependencies": {
5
5
  "@better-giving/config": "1.1.2"
6
6
  },
@@ -6,11 +6,7 @@ import {
6
6
  } from "@aws-sdk/lib-dynamodb";
7
7
  import { Db, type TxType } from "@better-giving/db";
8
8
  import type { IPageKeyed } from "@better-giving/types/api";
9
- import type {
10
- IDonationFinal,
11
- IDonationFinalAttr,
12
- TExplicit,
13
- } from "./interfaces.mjs";
9
+ import type { IDonationFinal, IDonationFinalAttr } from "./interfaces.mjs";
14
10
  import type { IDonationsSearch, IPageOpts } from "./schema.mjs";
15
11
 
16
12
  type K = keyof IDonationFinalAttr;
@@ -39,7 +35,7 @@ export class DonationsDb extends Db {
39
35
  return this.client.send(cmd).then((r) => r.Item as any);
40
36
  }
41
37
 
42
- put_txi(data: TExplicit<IDonationFinalAttr>): TxType["Put"] {
38
+ put_txi(data: IDonationFinalAttr): TxType["Put"] {
43
39
  return {
44
40
  TableName: this.table,
45
41
  Item: data,
@@ -173,8 +173,6 @@ export interface IDonationFinalAttrLegacy {
173
173
  walletAddress?: string;
174
174
  }
175
175
 
176
- export type TExplicit<T> = { [K in keyof T]-?: T[K] };
177
-
178
176
  export interface IDonationFinalAttr {
179
177
  transactionId: string;
180
178
  /** iso */
package/src/onhold-db.mts CHANGED
@@ -7,11 +7,7 @@ import {
7
7
  } from "@aws-sdk/lib-dynamodb";
8
8
  import { Db, type TxType, UpdateBuilder } from "@better-giving/db";
9
9
  import type { IPageKeyed } from "@better-giving/types/api";
10
- import type {
11
- IDonationOnHold,
12
- IDonationOnHoldAttr,
13
- TExplicit,
14
- } from "./interfaces.mjs";
10
+ import type { IDonationOnHold, IDonationOnHoldAttr } from "./interfaces.mjs";
15
11
  import type { IDonationsSearch } from "./schema.mjs";
16
12
 
17
13
  type K = keyof IDonationOnHoldAttr;
@@ -32,7 +28,7 @@ export class OnHoldDonationsDb extends Db {
32
28
  >;
33
29
  }
34
30
 
35
- async put(data: TExplicit<IDonationOnHoldAttr>) {
31
+ async put(data: IDonationOnHoldAttr) {
36
32
  const cmd = new PutCommand({
37
33
  TableName: this.table,
38
34
  Item: data,
@@ -65,7 +61,7 @@ export class OnHoldDonationsDb extends Db {
65
61
  return this.client.send(cmd).then((r) => r.Item as any);
66
62
  }
67
63
 
68
- put_txi(data: TExplicit<IDonationOnHoldAttr>) {
64
+ put_txi(data: IDonationOnHoldAttr) {
69
65
  const cmd = new PutCommand({
70
66
  TableName: this.table,
71
67
  Item: data,