@better-giving/fundraiser 1.0.5 → 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.
@@ -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" | "banner" | "featured" | "members" | "target">, Pick<FundInternal, "id" | "env" | "active" | "verified" | "donation_total_usd" | "approvers" | "creator"> {
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
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@better-giving/fundraiser",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "peerDependencies": {
5
+ "@better-giving/schemas": "1.0.2",
5
6
  "@better-giving/types": "1.0.1"
6
7
  },
7
8
  "devDependencies": {
@@ -18,13 +18,7 @@ export interface CloudsearchFund
18
18
  >,
19
19
  Pick<
20
20
  FundInternal,
21
- | "id"
22
- | "env"
23
- | "active"
24
- | "verified"
25
- | "donation_total_usd"
26
- | "approvers"
27
- | "creator"
21
+ "id" | "env" | "active" | "verified" | "donation_total_usd" | "creator"
28
22
  > {
29
23
  /** iso | "9999-12-31T23:59:59.000Z" year 9999 */
30
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 { Environment } from "./schema.mjs";
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
  }