@better-giving/fundraiser 1.0.4 → 1.0.6
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/cloudsearch.d.mts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/schema.d.mts +6 -7
- package/package.json +2 -1
- package/src/cloudsearch.mts +8 -8
- package/src/index.mts +8 -1
- package/src/schema.mts +7 -7
package/dist/cloudsearch.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ToDoc, ToHitFields, ToUpdate } from "@better-giving/types/cloudsearch";
|
|
2
2
|
import type { FundInternal, NewFund } from "./schema.mjs";
|
|
3
|
-
export interface CloudsearchFund extends Pick<NewFund, "name" | "description" | "logo" | "featured" | "members" | "target">, Pick<FundInternal, "id" | "env" | "active" | "verified" | "donation_total_usd" | "
|
|
3
|
+
export interface CloudsearchFund extends Pick<NewFund, "name" | "description" | "logo" | "banner" | "featured" | "members" | "target">, Pick<FundInternal, "id" | "env" | "active" | "verified" | "donation_total_usd" | "creator"> {
|
|
4
4
|
/** iso | "9999-12-31T23:59:59.000Z" year 9999 */
|
|
5
5
|
expiration: string;
|
|
6
6
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CloudsearchFund as FundItem } from "./cloudsearch.mjs";
|
|
2
2
|
import type { FundInternal, NewFund } from "./schema.mjs";
|
|
3
|
-
export type { Environment } from "./schema.mjs";
|
|
3
|
+
export type { Environment, FundSettings, FundUpdate, FundsEndowMemberOfParams, FundsParams, NewFund, } from "./schema.mjs";
|
|
4
4
|
export type { FundItem };
|
|
5
5
|
export interface FundMember {
|
|
6
6
|
id: number;
|
package/dist/schema.d.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DonateMethodId } from "@better-giving/schemas";
|
|
1
2
|
import type { Environment } from "@better-giving/types/list";
|
|
2
3
|
export type { Environment } from "@better-giving/types/list";
|
|
3
4
|
import { type InferOutput } from "valibot";
|
|
@@ -129,6 +130,10 @@ export interface FundsParams extends InferOutput<typeof fundsParams> {
|
|
|
129
130
|
}
|
|
130
131
|
export interface FundsEndowMemberOfParams extends InferOutput<typeof fundsEndowMemberOfParams> {
|
|
131
132
|
}
|
|
133
|
+
export interface FundSettings {
|
|
134
|
+
hide_bg_tip: boolean;
|
|
135
|
+
donateMethods?: DonateMethodId[];
|
|
136
|
+
}
|
|
132
137
|
export interface FundInternal {
|
|
133
138
|
/** uuid */
|
|
134
139
|
id: string;
|
|
@@ -138,13 +143,7 @@ export interface FundInternal {
|
|
|
138
143
|
verified: boolean;
|
|
139
144
|
/** to date received: initialized to `0` */
|
|
140
145
|
donation_total_usd: number;
|
|
141
|
-
/**
|
|
142
|
-
* approving NPO ids
|
|
143
|
-
* NPOs have a whitelist of fundraisers they support. thus, appears in their NPO profile page
|
|
144
|
-
* @default - [0]
|
|
145
|
-
* */
|
|
146
|
-
approvers: number[];
|
|
147
|
-
allow_bg_tip: boolean;
|
|
148
146
|
/** user email or better giving (if creator is bg-admin) */
|
|
149
147
|
creator: string;
|
|
148
|
+
settings: FundSettings;
|
|
150
149
|
}
|
package/package.json
CHANGED
package/src/cloudsearch.mts
CHANGED
|
@@ -8,17 +8,17 @@ import type { FundInternal, NewFund } from "./schema.mjs";
|
|
|
8
8
|
export interface CloudsearchFund
|
|
9
9
|
extends Pick<
|
|
10
10
|
NewFund,
|
|
11
|
-
|
|
11
|
+
| "name"
|
|
12
|
+
| "description"
|
|
13
|
+
| "logo"
|
|
14
|
+
| "banner"
|
|
15
|
+
| "featured"
|
|
16
|
+
| "members"
|
|
17
|
+
| "target"
|
|
12
18
|
>,
|
|
13
19
|
Pick<
|
|
14
20
|
FundInternal,
|
|
15
|
-
| "
|
|
16
|
-
| "env"
|
|
17
|
-
| "active"
|
|
18
|
-
| "verified"
|
|
19
|
-
| "donation_total_usd"
|
|
20
|
-
| "approvers"
|
|
21
|
-
| "creator"
|
|
21
|
+
"id" | "env" | "active" | "verified" | "donation_total_usd" | "creator"
|
|
22
22
|
> {
|
|
23
23
|
/** iso | "9999-12-31T23:59:59.000Z" year 9999 */
|
|
24
24
|
expiration: string;
|
package/src/index.mts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import type { CloudsearchFund as FundItem } from "./cloudsearch.mjs";
|
|
2
2
|
import type { FundInternal, NewFund } from "./schema.mjs";
|
|
3
|
-
export type {
|
|
3
|
+
export type {
|
|
4
|
+
Environment,
|
|
5
|
+
FundSettings,
|
|
6
|
+
FundUpdate,
|
|
7
|
+
FundsEndowMemberOfParams,
|
|
8
|
+
FundsParams,
|
|
9
|
+
NewFund,
|
|
10
|
+
} from "./schema.mjs";
|
|
4
11
|
export type { FundItem };
|
|
5
12
|
|
|
6
13
|
export interface FundMember {
|
package/src/schema.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DonateMethodId } from "@better-giving/schemas";
|
|
1
2
|
import type { Environment } from "@better-giving/types/list";
|
|
2
3
|
export type { Environment } from "@better-giving/types/list";
|
|
3
4
|
import {
|
|
@@ -112,6 +113,11 @@ export interface FundsParams extends InferOutput<typeof fundsParams> {}
|
|
|
112
113
|
export interface FundsEndowMemberOfParams
|
|
113
114
|
extends InferOutput<typeof fundsEndowMemberOfParams> {}
|
|
114
115
|
|
|
116
|
+
export interface FundSettings {
|
|
117
|
+
hide_bg_tip: boolean;
|
|
118
|
+
donateMethods?: DonateMethodId[];
|
|
119
|
+
}
|
|
120
|
+
|
|
115
121
|
export interface FundInternal {
|
|
116
122
|
/** uuid */
|
|
117
123
|
id: string;
|
|
@@ -121,13 +127,7 @@ export interface FundInternal {
|
|
|
121
127
|
verified: boolean;
|
|
122
128
|
/** to date received: initialized to `0` */
|
|
123
129
|
donation_total_usd: number;
|
|
124
|
-
/**
|
|
125
|
-
* approving NPO ids
|
|
126
|
-
* NPOs have a whitelist of fundraisers they support. thus, appears in their NPO profile page
|
|
127
|
-
* @default - [0]
|
|
128
|
-
* */
|
|
129
|
-
approvers: number[];
|
|
130
|
-
allow_bg_tip: boolean;
|
|
131
130
|
/** user email or better giving (if creator is bg-admin) */
|
|
132
131
|
creator: string;
|
|
132
|
+
settings: FundSettings;
|
|
133
133
|
}
|