@better-giving/endowment 4.0.32 → 4.0.34
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/dist/schema.d.mts +1 -0
- package/dist/schema.mjs +1 -0
- package/package.json +1 -1
- package/src/db.mts +0 -9
- package/src/schema.mts +1 -0
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/dist/schema.d.mts
CHANGED
|
@@ -848,6 +848,7 @@ export declare const npos_search: v.ObjectSchema<{
|
|
|
848
848
|
readonly kyc_only: v.OptionalSchema<v.SchemaWithPipe<[v.SchemaWithPipe<[v.LazySchema<v.SchemaWithPipe<[v.StringSchema<"required">, v.TrimAction]> | v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<"required">, v.TrimAction]>, v.RegexAction<string, "invalid csv">]>>, v.TransformAction<string, string[]>, v.FilterItemsAction<string[]>]>, v.MapItemsAction<string[], boolean>, v.ArraySchema<v.BooleanSchema<undefined>, undefined>]>, never>;
|
|
849
849
|
readonly fund_opt_in: v.OptionalSchema<v.SchemaWithPipe<[v.SchemaWithPipe<[v.LazySchema<v.SchemaWithPipe<[v.StringSchema<"required">, v.TrimAction]> | v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<"required">, v.TrimAction]>, v.RegexAction<string, "invalid csv">]>>, v.TransformAction<string, string[]>, v.FilterItemsAction<string[]>]>, v.MapItemsAction<string[], boolean>, v.ArraySchema<v.BooleanSchema<undefined>, undefined>]>, never>;
|
|
850
850
|
readonly claimed: v.OptionalSchema<v.SchemaWithPipe<[v.SchemaWithPipe<[v.LazySchema<v.SchemaWithPipe<[v.StringSchema<"required">, v.TrimAction]> | v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<"required">, v.TrimAction]>, v.RegexAction<string, "invalid csv">]>>, v.TransformAction<string, string[]>, v.FilterItemsAction<string[]>]>, v.MapItemsAction<string[], boolean>, v.ArraySchema<v.BooleanSchema<undefined>, undefined>]>, never>;
|
|
851
|
+
readonly published: v.OptionalSchema<v.SchemaWithPipe<[v.SchemaWithPipe<[v.LazySchema<v.SchemaWithPipe<[v.StringSchema<"required">, v.TrimAction]> | v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<"required">, v.TrimAction]>, v.RegexAction<string, "invalid csv">]>>, v.TransformAction<string, string[]>, v.FilterItemsAction<string[]>]>, v.MapItemsAction<string[], boolean>, v.ArraySchema<v.BooleanSchema<undefined>, undefined>]>, never>;
|
|
851
852
|
readonly countries: v.OptionalSchema<v.SchemaWithPipe<[v.SchemaWithPipe<[v.LazySchema<v.SchemaWithPipe<[v.StringSchema<"required">, v.TrimAction]> | v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<"required">, v.TrimAction]>, v.RegexAction<string, "invalid csv">]>>, v.TransformAction<string, string[]>, v.FilterItemsAction<string[]>]>, v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<"required">, v.TrimAction]>, undefined>]>, never>;
|
|
852
853
|
readonly fields: v.OptionalSchema<v.SchemaWithPipe<[v.SchemaWithPipe<[v.LazySchema<v.SchemaWithPipe<[v.StringSchema<"required">, v.TrimAction]> | v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<"required">, v.TrimAction]>, v.RegexAction<string, "invalid csv">]>>, v.TransformAction<string, string[]>, v.FilterItemsAction<string[]>]>, v.ArraySchema<v.PicklistSchema<["tagline", "card_img", "active_in_countries", "sdgs", "published", "fund_opt_in", "target", "id", "env", "registration_number", "name", "endow_designation", "hq_country", "claimed", "kyc_donors_only", "contributions_total", "contributions_count"], undefined>, undefined>]>, never>;
|
|
853
854
|
}, undefined>;
|
package/dist/schema.mjs
CHANGED
|
@@ -152,6 +152,7 @@ export const npos_search = v.object({
|
|
|
152
152
|
kyc_only: v.optional(bool_csv),
|
|
153
153
|
fund_opt_in: v.optional(bool_csv),
|
|
154
154
|
claimed: v.optional(bool_csv),
|
|
155
|
+
published: v.optional(bool_csv),
|
|
155
156
|
countries: v.optional(v.pipe(csv_strs, v.array($))),
|
|
156
157
|
fields: v.optional(v.pipe(csv_strs, v.array(npo_item_fields))),
|
|
157
158
|
});
|
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;
|
package/src/schema.mts
CHANGED
|
@@ -267,6 +267,7 @@ export const npos_search = v.object({
|
|
|
267
267
|
kyc_only: v.optional(bool_csv),
|
|
268
268
|
fund_opt_in: v.optional(bool_csv),
|
|
269
269
|
claimed: v.optional(bool_csv),
|
|
270
|
+
published: v.optional(bool_csv),
|
|
270
271
|
countries: v.optional(v.pipe(csv_strs, v.array($))),
|
|
271
272
|
fields: v.optional(v.pipe(csv_strs, v.array(npo_item_fields))),
|
|
272
273
|
});
|