@better-giving/endowment 4.0.32 → 4.0.33
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/db.d.mts +1 -1
- package/dist/db.mjs +1 -9
- package/package.json +1 -1
- package/src/db.mts +0 -9
package/dist/db.d.mts
CHANGED
|
@@ -134,7 +134,7 @@ export declare class NpoDb extends Db {
|
|
|
134
134
|
npo_med_update(npo: number, prev: IMedia, update: IMediaUpdate): Promise<Record<string, any>>;
|
|
135
135
|
npo_med_delete(npo: number, mid: string): Promise<import("@aws-sdk/lib-dynamodb").DeleteCommandOutput>;
|
|
136
136
|
npo<T extends TNpoDbKeys[]>(id: string | number, fields?: T): Promise<TNpoDbProjectedTo<T> | undefined>;
|
|
137
|
-
npo_update_comps({ target, slug, social_media_urls,
|
|
137
|
+
npo_update_comps({ target, slug, social_media_urls, ...update }: INpoUpdate): UpdateComps;
|
|
138
138
|
npo_update(id: number, update: INpoUpdate): Promise<import("@aws-sdk/lib-dynamodb").UpdateCommandOutput>;
|
|
139
139
|
npo_update_txi(id: number, update: INpoUpdate): TxType["Update"];
|
|
140
140
|
prog_milestones(id: string): Promise<IMilestone[]>;
|
package/dist/db.mjs
CHANGED
|
@@ -258,20 +258,12 @@ export class NpoDb extends Db {
|
|
|
258
258
|
const { Item: i } = await this.client.send(cmd);
|
|
259
259
|
return i ? this.sans_keys(i) : undefined;
|
|
260
260
|
}
|
|
261
|
-
npo_update_comps({ target, slug, social_media_urls,
|
|
261
|
+
npo_update_comps({ target, slug, social_media_urls, ...update }) {
|
|
262
262
|
const updates = new UpdateBuilder();
|
|
263
263
|
if (slug)
|
|
264
264
|
updates.set("slug", slug);
|
|
265
265
|
if (slug === "")
|
|
266
266
|
updates.remove("slug");
|
|
267
|
-
if (increments) {
|
|
268
|
-
if (increments.length > 0) {
|
|
269
|
-
updates.set("increments", increments);
|
|
270
|
-
}
|
|
271
|
-
else {
|
|
272
|
-
updates.remove("increments");
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
267
|
if (social_media_urls) {
|
|
276
268
|
for (const [k, v] of Object.entries(social_media_urls)) {
|
|
277
269
|
if (v === undefined)
|
package/package.json
CHANGED
package/src/db.mts
CHANGED
|
@@ -346,7 +346,6 @@ export class NpoDb extends Db {
|
|
|
346
346
|
target,
|
|
347
347
|
slug,
|
|
348
348
|
social_media_urls,
|
|
349
|
-
increments,
|
|
350
349
|
...update
|
|
351
350
|
}: INpoUpdate): UpdateComps {
|
|
352
351
|
const updates = new UpdateBuilder();
|
|
@@ -354,14 +353,6 @@ export class NpoDb extends Db {
|
|
|
354
353
|
if (slug) updates.set("slug", slug);
|
|
355
354
|
if (slug === "") updates.remove("slug");
|
|
356
355
|
|
|
357
|
-
if (increments) {
|
|
358
|
-
if (increments.length > 0) {
|
|
359
|
-
updates.set("increments", increments);
|
|
360
|
-
} else {
|
|
361
|
-
updates.remove("increments");
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
|
|
365
356
|
if (social_media_urls) {
|
|
366
357
|
for (const [k, v] of Object.entries(social_media_urls)) {
|
|
367
358
|
if (v === undefined) continue;
|