@better-giving/endowment 1.0.23 → 1.0.25
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/index.d.mts +1 -1
- package/dist/schema.d.mts +2 -2
- package/package.json +4 -6
- package/src/index.mts +6 -5
- package/src/schema.mts +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Endow as NEndow, Media, Program as NProgram } from "./db.mjs";
|
|
2
2
|
import type { Milestone } from "./schema.mjs";
|
|
3
|
-
export type { Allocation, DonateMethodId, EndowDesignation,
|
|
3
|
+
export type { Allocation, DonateMethodId, EndowDesignation, EndowFields, EndowQueryParams, EndowUpdate, Environment, Increment, MediaQueryParams, MediaQueryParamsObj, MediaType, MediaUpdate, Milestone, MilestoneUpdate, NewMilestone, NewProgram, ProgramUpdate, SocialMediaURLs, UnSdgNum, } from "./schema.mjs";
|
|
4
4
|
export type { CloudsearchEndow as EndowItem, CloudsearchEndowsQueryParams as EndowsQueryParams, } from "./cloudsearch.mjs";
|
|
5
5
|
export type Endow = Pick<NEndow.DbRecord, "id" | "slug" | "active_in_countries" | "endow_designation" | "fiscal_sponsored" | "hide_bg_tip" | "hq_country" | "image" | "card_img" | "kyc_donors_only" | "logo" | "name" | "overview" | "published" | "registration_number" | "sdgs" | "social_media_urls" | "street_address" | "tagline" | "url" | "claimed" | "progDonationsAllowed" | "donateMethods" | "allocation" | "increments" | "receiptMsg">;
|
|
6
6
|
export type Program = Omit<NProgram.DbRecord, "PK" | "SK"> & {
|
package/dist/schema.d.mts
CHANGED
|
@@ -551,12 +551,12 @@ export declare const endowUpdate: Omit<Omit<import("valibot").ObjectSchema<{
|
|
|
551
551
|
export declare const endowFields: import("valibot").PicklistSchema<["url", "slug", "name", "overview", "tagline", "image", "logo", "card_img", "hq_country", "active_in_countries", "street_address", "sdgs", "receiptMsg", "hide_bg_tip", "published", "progDonationsAllowed", "allocation", "donateMethods", "increments", "fund_opt_in", "id", "env", "registration_number", "endow_designation", "social_media_urls", "claimed", "kyc_donors_only"], undefined>;
|
|
552
552
|
export type Endowment = InferOutput<typeof endowment>;
|
|
553
553
|
export type EndowUpdate = InferOutput<typeof endowUpdate>;
|
|
554
|
-
export type
|
|
554
|
+
export type EndowFields = InferOutput<typeof endowFields>;
|
|
555
555
|
/** for ein path, only fields in reg-num/env gsi is available */
|
|
556
556
|
export declare const endowQueryParams: import("valibot").ObjectSchema<{
|
|
557
557
|
readonly fields: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").LazySchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]> | import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").RegexAction<string, "invalid csv">]>>, import("valibot").TransformAction<string, string[]>, import("valibot").FilterItemsAction<string[]>]>, import("valibot").ArraySchema<import("valibot").PicklistSchema<["url", "slug", "name", "overview", "tagline", "image", "logo", "card_img", "hq_country", "active_in_countries", "street_address", "sdgs", "receiptMsg", "hide_bg_tip", "published", "progDonationsAllowed", "allocation", "donateMethods", "increments", "fund_opt_in", "id", "env", "registration_number", "endow_designation", "social_media_urls", "claimed", "kyc_donors_only"], undefined>, undefined>]>, never>;
|
|
558
558
|
}, undefined>;
|
|
559
|
-
export type
|
|
559
|
+
export type EndowQueryParams = InferInput<typeof endowQueryParams>;
|
|
560
560
|
export declare const programId: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").UuidAction<string, undefined>]>;
|
|
561
561
|
export type ProgramId = InferOutput<typeof programId>;
|
|
562
562
|
export declare const milestoneId: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").UuidAction<string, undefined>]>;
|
package/package.json
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-giving/endowment",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.25",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@better-giving/schemas": "1.0.1",
|
|
6
|
-
"@better-giving/types": "1.0.1"
|
|
6
|
+
"@better-giving/types": "1.0.1",
|
|
7
|
+
"valibot": "0.42.0"
|
|
7
8
|
},
|
|
8
9
|
"devDependencies": {
|
|
9
10
|
"@better-giving/config": "workspace:*"
|
|
10
11
|
},
|
|
11
|
-
"files": [
|
|
12
|
-
"src",
|
|
13
|
-
"dist"
|
|
14
|
-
],
|
|
12
|
+
"files": ["src", "dist"],
|
|
15
13
|
"exports": {
|
|
16
14
|
".": "./dist/index.mjs",
|
|
17
15
|
"./schema": "./dist/schema.mjs",
|
package/src/index.mts
CHANGED
|
@@ -4,10 +4,15 @@ export type {
|
|
|
4
4
|
Allocation,
|
|
5
5
|
DonateMethodId,
|
|
6
6
|
EndowDesignation,
|
|
7
|
-
|
|
7
|
+
EndowFields,
|
|
8
|
+
EndowQueryParams,
|
|
8
9
|
EndowUpdate,
|
|
9
10
|
Environment,
|
|
10
11
|
Increment,
|
|
12
|
+
MediaQueryParams,
|
|
13
|
+
MediaQueryParamsObj,
|
|
14
|
+
MediaType,
|
|
15
|
+
MediaUpdate,
|
|
11
16
|
Milestone,
|
|
12
17
|
MilestoneUpdate,
|
|
13
18
|
NewMilestone,
|
|
@@ -15,10 +20,6 @@ export type {
|
|
|
15
20
|
ProgramUpdate,
|
|
16
21
|
SocialMediaURLs,
|
|
17
22
|
UnSdgNum,
|
|
18
|
-
MediaQueryParams,
|
|
19
|
-
MediaQueryParamsObj,
|
|
20
|
-
MediaType,
|
|
21
|
-
MediaUpdate,
|
|
22
23
|
} from "./schema.mjs";
|
|
23
24
|
export type {
|
|
24
25
|
CloudsearchEndow as EndowItem,
|
package/src/schema.mts
CHANGED
|
@@ -200,14 +200,14 @@ export const endowUpdate = partial(
|
|
|
200
200
|
export const endowFields = keyof(endowment);
|
|
201
201
|
export type Endowment = InferOutput<typeof endowment>;
|
|
202
202
|
export type EndowUpdate = InferOutput<typeof endowUpdate>;
|
|
203
|
-
export type
|
|
203
|
+
export type EndowFields = InferOutput<typeof endowFields>;
|
|
204
204
|
|
|
205
205
|
/** for ein path, only fields in reg-num/env gsi is available */
|
|
206
206
|
export const endowQueryParams = object({
|
|
207
207
|
fields: optional(pipe(csvStrs, array(endowFields))),
|
|
208
208
|
});
|
|
209
209
|
|
|
210
|
-
export type
|
|
210
|
+
export type EndowQueryParams = InferInput<typeof endowQueryParams>;
|
|
211
211
|
|
|
212
212
|
const amnt = pipe(number(), minValue(0));
|
|
213
213
|
export const programId = pipe(str, uuid());
|