@better-giving/endowment 1.1.3 → 1.1.5

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.
@@ -8,6 +8,7 @@ export declare const cloudsearchEndowFields: import("valibot").ObjectSchema<{
8
8
  export declare const cloudsearchEndow: import("valibot").ObjectSchema<{
9
9
  readonly contributions_total: import("valibot").NumberSchema<undefined>;
10
10
  readonly contributions_count: import("valibot").NumberSchema<undefined>;
11
+ readonly id: import("valibot").SchemaWithPipe<[import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 1, undefined>]>;
11
12
  readonly name: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").NonEmptyAction<string, "required">]>;
12
13
  readonly tagline: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").MaxLengthAction<string, 140, undefined>]>, never>;
13
14
  readonly card_img: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").UrlAction<string, undefined>]>, never>;
@@ -17,14 +18,13 @@ export declare const cloudsearchEndow: import("valibot").ObjectSchema<{
17
18
  readonly published: import("valibot").OptionalSchema<import("valibot").BooleanSchema<undefined>, never>;
18
19
  readonly fund_opt_in: import("valibot").OptionalSchema<import("valibot").BooleanSchema<undefined>, never>;
19
20
  readonly target: import("valibot").OptionalSchema<import("valibot").UnionSchema<[import("valibot").LiteralSchema<"smart", undefined>, import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TransformAction<string, number>, import("valibot").NumberSchema<undefined>, import("valibot").MinValueAction<number, 0, undefined>, import("valibot").TransformAction<number, string>]>], undefined>, never>;
20
- readonly id: import("valibot").SchemaWithPipe<[import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 1, undefined>]>;
21
21
  readonly env: import("valibot").PicklistSchema<readonly ["staging", "production"], undefined>;
22
22
  readonly registration_number: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").NonEmptyAction<string, "required">, import("valibot").RegexAction<string, "must only contain letters and numbers">]>;
23
23
  readonly endow_designation: import("valibot").PicklistSchema<readonly ["Charity", "Religious Organization", "University", "Hospital", "Other"], undefined>;
24
24
  readonly claimed: import("valibot").BooleanSchema<undefined>;
25
25
  readonly kyc_donors_only: import("valibot").BooleanSchema<undefined>;
26
26
  }, undefined>;
27
- export declare const cloudSearchEndowFields: import("valibot").PicklistSchema<["name", "tagline", "card_img", "hq_country", "active_in_countries", "sdgs", "published", "fund_opt_in", "target", "id", "env", "registration_number", "endow_designation", "claimed", "kyc_donors_only", "contributions_total", "contributions_count"], undefined>;
27
+ export declare const cloudSearchEndowFields: import("valibot").PicklistSchema<["id", "name", "tagline", "card_img", "hq_country", "active_in_countries", "sdgs", "published", "fund_opt_in", "target", "env", "registration_number", "endow_designation", "claimed", "kyc_donors_only", "contributions_total", "contributions_count"], undefined>;
28
28
  export declare const endowsQueryParams: import("valibot").ObjectSchema<{
29
29
  readonly query: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, never>;
30
30
  readonly page: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TransformAction<string, number>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 1, undefined>]>, never>;
@@ -34,7 +34,7 @@ export declare const endowsQueryParams: import("valibot").ObjectSchema<{
34
34
  readonly fund_opt_in: 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").MapItemsAction<string[], boolean>, import("valibot").ArraySchema<import("valibot").BooleanSchema<undefined>, undefined>]>, never>;
35
35
  readonly claimed: 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").MapItemsAction<string[], boolean>, import("valibot").ArraySchema<import("valibot").BooleanSchema<undefined>, undefined>]>, never>;
36
36
  readonly countries: 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").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, undefined>]>, never>;
37
- 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<["name", "tagline", "card_img", "hq_country", "active_in_countries", "sdgs", "published", "fund_opt_in", "target", "id", "env", "registration_number", "endow_designation", "claimed", "kyc_donors_only", "contributions_total", "contributions_count"], undefined>, undefined>]>, never>;
37
+ 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<["id", "name", "tagline", "card_img", "hq_country", "active_in_countries", "sdgs", "published", "fund_opt_in", "target", "env", "registration_number", "endow_designation", "claimed", "kyc_donors_only", "contributions_total", "contributions_count"], undefined>, undefined>]>, never>;
38
38
  }, undefined>;
39
39
  export interface CloudsearchEndowsQueryParamsObj extends InferInput<typeof endowsQueryParams> {
40
40
  }
package/dist/schema.d.mts CHANGED
@@ -47,6 +47,10 @@ export declare const increment: import("valibot").ObjectSchema<{
47
47
  readonly value: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").NonEmptyAction<string, "required">, import("valibot").TransformAction<string, number>, import("valibot").NumberSchema<"must be a number">, import("valibot").MinValueAction<number, 0, "must be greater than 0">, import("valibot").TransformAction<number, string>]>;
48
48
  readonly label: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").MaxLengthAction<string, 60, ({ requirement: r }: import("valibot").MaxLengthIssue<string, 60>) => string>]>;
49
49
  }, undefined>;
50
+ export declare const referrer: import("valibot").ObjectSchema<{
51
+ readonly id: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").NonEmptyAction<string, "required">]>;
52
+ readonly expiry: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").IsoTimestampAction<string, undefined>]>;
53
+ }, undefined>;
50
54
  export interface Increment extends InferOutput<typeof increment> {
51
55
  }
52
56
  export declare const endowment: import("valibot").ObjectSchema<{
@@ -104,6 +108,10 @@ export declare const endowment: import("valibot").ObjectSchema<{
104
108
  readonly claimed: import("valibot").BooleanSchema<undefined>;
105
109
  readonly kyc_donors_only: import("valibot").BooleanSchema<undefined>;
106
110
  readonly fiscal_sponsored: import("valibot").BooleanSchema<undefined>;
111
+ readonly referrer: import("valibot").OptionalSchema<import("valibot").ObjectSchema<{
112
+ readonly id: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").NonEmptyAction<string, "required">]>;
113
+ readonly expiry: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").IsoTimestampAction<string, undefined>]>;
114
+ }, undefined>, never>;
107
115
  }, undefined>;
108
116
  export declare const endowUpdate: Omit<Omit<import("valibot").ObjectSchema<{
109
117
  readonly id: import("valibot").SchemaWithPipe<[import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 1, undefined>]>;
@@ -160,6 +168,10 @@ export declare const endowUpdate: Omit<Omit<import("valibot").ObjectSchema<{
160
168
  readonly claimed: import("valibot").BooleanSchema<undefined>;
161
169
  readonly kyc_donors_only: import("valibot").BooleanSchema<undefined>;
162
170
  readonly fiscal_sponsored: import("valibot").BooleanSchema<undefined>;
171
+ readonly referrer: import("valibot").OptionalSchema<import("valibot").ObjectSchema<{
172
+ readonly id: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").NonEmptyAction<string, "required">]>;
173
+ readonly expiry: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").IsoTimestampAction<string, undefined>]>;
174
+ }, undefined>, never>;
163
175
  }, undefined>, "_types" | "_run" | "entries"> & {
164
176
  readonly entries: Omit<{
165
177
  readonly id: import("valibot").SchemaWithPipe<[import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 1, undefined>]>;
@@ -216,12 +228,16 @@ export declare const endowUpdate: Omit<Omit<import("valibot").ObjectSchema<{
216
228
  readonly claimed: import("valibot").BooleanSchema<undefined>;
217
229
  readonly kyc_donors_only: import("valibot").BooleanSchema<undefined>;
218
230
  readonly fiscal_sponsored: import("valibot").BooleanSchema<undefined>;
231
+ readonly referrer: import("valibot").OptionalSchema<import("valibot").ObjectSchema<{
232
+ readonly id: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").NonEmptyAction<string, "required">]>;
233
+ readonly expiry: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").IsoTimestampAction<string, undefined>]>;
234
+ }, undefined>, never>;
219
235
  }, "id" | "env" | "claimed" | "kyc_donors_only" | "fiscal_sponsored">;
220
236
  _run(dataset: import("valibot").Dataset<unknown, never>, config: import("valibot").Config<import("valibot").StringIssue | import("valibot").RegexIssue<string> | import("valibot").NumberIssue | import("valibot").IntegerIssue<number> | import("valibot").MinValueIssue<number, 0> | import("valibot").MaxValueIssue<number, 100> | import("valibot").ObjectIssue | import("valibot").CheckIssue<{
221
237
  cash: number;
222
238
  liq: number;
223
239
  lock: number;
224
- }> | import("valibot").MaxLengthIssue<string, 30> | import("valibot").ExcludesIssue<string, ".."> | import("valibot").CustomIssue | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").StartsWithIssue<string, "https://"> | import("valibot").MaxLengthIssue<string, 60> | import("valibot").PicklistIssue | import("valibot").MaxLengthIssue<string, 140> | import("valibot").ArrayIssue | import("valibot").NonEmptyIssue<string[]> | import("valibot").MinLengthIssue<(2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17)[], 1> | import("valibot").MaxLengthIssue<string, 500> | import("valibot").BooleanIssue | import("valibot").MaxLengthIssue<{
240
+ }> | import("valibot").MaxLengthIssue<string, 30> | import("valibot").ExcludesIssue<string, ".."> | import("valibot").CustomIssue | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").StartsWithIssue<string, "https://"> | import("valibot").MaxLengthIssue<string, 60> | import("valibot").IsoTimestampIssue<string> | import("valibot").PicklistIssue | import("valibot").MaxLengthIssue<string, 140> | import("valibot").ArrayIssue | import("valibot").NonEmptyIssue<string[]> | import("valibot").MinLengthIssue<(2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17)[], 1> | import("valibot").MaxLengthIssue<string, 500> | import("valibot").BooleanIssue | import("valibot").MaxLengthIssue<{
225
241
  value: string;
226
242
  label: string;
227
243
  }[], 4> | import("valibot").LiteralIssue | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").LiteralIssue>>): import("valibot").Dataset<{
@@ -264,11 +280,15 @@ export declare const endowUpdate: Omit<Omit<import("valibot").ObjectSchema<{
264
280
  }[] | undefined;
265
281
  fund_opt_in?: boolean | undefined;
266
282
  target?: string | undefined;
283
+ referrer?: {
284
+ id: string;
285
+ expiry: string;
286
+ } | undefined;
267
287
  }, import("valibot").StringIssue | import("valibot").RegexIssue<string> | import("valibot").NumberIssue | import("valibot").IntegerIssue<number> | import("valibot").MinValueIssue<number, 0> | import("valibot").MaxValueIssue<number, 100> | import("valibot").ObjectIssue | import("valibot").CheckIssue<{
268
288
  cash: number;
269
289
  liq: number;
270
290
  lock: number;
271
- }> | import("valibot").MaxLengthIssue<string, 30> | import("valibot").ExcludesIssue<string, ".."> | import("valibot").CustomIssue | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").StartsWithIssue<string, "https://"> | import("valibot").MaxLengthIssue<string, 60> | import("valibot").PicklistIssue | import("valibot").MaxLengthIssue<string, 140> | import("valibot").ArrayIssue | import("valibot").NonEmptyIssue<string[]> | import("valibot").MinLengthIssue<(2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17)[], 1> | import("valibot").MaxLengthIssue<string, 500> | import("valibot").BooleanIssue | import("valibot").MaxLengthIssue<{
291
+ }> | import("valibot").MaxLengthIssue<string, 30> | import("valibot").ExcludesIssue<string, ".."> | import("valibot").CustomIssue | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").StartsWithIssue<string, "https://"> | import("valibot").MaxLengthIssue<string, 60> | import("valibot").IsoTimestampIssue<string> | import("valibot").PicklistIssue | import("valibot").MaxLengthIssue<string, 140> | import("valibot").ArrayIssue | import("valibot").NonEmptyIssue<string[]> | import("valibot").MinLengthIssue<(2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17)[], 1> | import("valibot").MaxLengthIssue<string, 500> | import("valibot").BooleanIssue | import("valibot").MaxLengthIssue<{
272
292
  value: string;
273
293
  label: string;
274
294
  }[], 4> | import("valibot").LiteralIssue | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").LiteralIssue>>;
@@ -313,6 +333,10 @@ export declare const endowUpdate: Omit<Omit<import("valibot").ObjectSchema<{
313
333
  }[] | undefined;
314
334
  fund_opt_in?: boolean | undefined;
315
335
  target?: string | undefined;
336
+ referrer?: {
337
+ id: string;
338
+ expiry: string;
339
+ } | undefined;
316
340
  };
317
341
  readonly output: {
318
342
  name: string;
@@ -354,12 +378,16 @@ export declare const endowUpdate: Omit<Omit<import("valibot").ObjectSchema<{
354
378
  }[] | undefined;
355
379
  fund_opt_in?: boolean | undefined;
356
380
  target?: string | undefined;
381
+ referrer?: {
382
+ id: string;
383
+ expiry: string;
384
+ } | undefined;
357
385
  };
358
386
  readonly issue: import("valibot").StringIssue | import("valibot").RegexIssue<string> | import("valibot").NumberIssue | import("valibot").IntegerIssue<number> | import("valibot").MinValueIssue<number, 0> | import("valibot").MaxValueIssue<number, 100> | import("valibot").ObjectIssue | import("valibot").CheckIssue<{
359
387
  cash: number;
360
388
  liq: number;
361
389
  lock: number;
362
- }> | import("valibot").MaxLengthIssue<string, 30> | import("valibot").ExcludesIssue<string, ".."> | import("valibot").CustomIssue | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").StartsWithIssue<string, "https://"> | import("valibot").MaxLengthIssue<string, 60> | import("valibot").PicklistIssue | import("valibot").MaxLengthIssue<string, 140> | import("valibot").ArrayIssue | import("valibot").NonEmptyIssue<string[]> | import("valibot").MinLengthIssue<(2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17)[], 1> | import("valibot").MaxLengthIssue<string, 500> | import("valibot").BooleanIssue | import("valibot").MaxLengthIssue<{
390
+ }> | import("valibot").MaxLengthIssue<string, 30> | import("valibot").ExcludesIssue<string, ".."> | import("valibot").CustomIssue | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").StartsWithIssue<string, "https://"> | import("valibot").MaxLengthIssue<string, 60> | import("valibot").IsoTimestampIssue<string> | import("valibot").PicklistIssue | import("valibot").MaxLengthIssue<string, 140> | import("valibot").ArrayIssue | import("valibot").NonEmptyIssue<string[]> | import("valibot").MinLengthIssue<(2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17)[], 1> | import("valibot").MaxLengthIssue<string, 500> | import("valibot").BooleanIssue | import("valibot").MaxLengthIssue<{
363
391
  value: string;
364
392
  label: string;
365
393
  }[], 4> | import("valibot").LiteralIssue | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").LiteralIssue>;
@@ -401,6 +429,10 @@ export declare const endowUpdate: Omit<Omit<import("valibot").ObjectSchema<{
401
429
  }[], 4, undefined>]>, never>, never>;
402
430
  readonly fund_opt_in: import("valibot").OptionalSchema<import("valibot").OptionalSchema<import("valibot").BooleanSchema<undefined>, never>, never>;
403
431
  readonly target: import("valibot").OptionalSchema<import("valibot").OptionalSchema<import("valibot").UnionSchema<[import("valibot").LiteralSchema<"smart", undefined>, import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TransformAction<string, number>, import("valibot").NumberSchema<undefined>, import("valibot").MinValueAction<number, 0, undefined>, import("valibot").TransformAction<number, string>]>], undefined>, never>, never>;
432
+ readonly referrer: import("valibot").OptionalSchema<import("valibot").OptionalSchema<import("valibot").ObjectSchema<{
433
+ readonly id: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").NonEmptyAction<string, "required">]>;
434
+ readonly expiry: import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").IsoTimestampAction<string, undefined>]>;
435
+ }, undefined>, never>, never>;
404
436
  readonly registration_number: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").NonEmptyAction<string, "required">, import("valibot").RegexAction<string, "must only contain letters and numbers">]>, never>;
405
437
  readonly endow_designation: import("valibot").OptionalSchema<import("valibot").PicklistSchema<readonly ["Charity", "Religious Organization", "University", "Hospital", "Other"], undefined>, never>;
406
438
  readonly social_media_urls: import("valibot").OptionalSchema<import("valibot").ObjectSchema<{
@@ -417,7 +449,7 @@ export declare const endowUpdate: Omit<Omit<import("valibot").ObjectSchema<{
417
449
  cash: number;
418
450
  liq: number;
419
451
  lock: number;
420
- }> | import("valibot").MaxLengthIssue<string, 30> | import("valibot").ExcludesIssue<string, ".."> | import("valibot").CustomIssue | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").StartsWithIssue<string, "https://"> | import("valibot").MaxLengthIssue<string, 60> | import("valibot").PicklistIssue | import("valibot").MaxLengthIssue<string, 140> | import("valibot").ArrayIssue | import("valibot").NonEmptyIssue<string[]> | import("valibot").MinLengthIssue<(2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17)[], 1> | import("valibot").MaxLengthIssue<string, 500> | import("valibot").BooleanIssue | import("valibot").MaxLengthIssue<{
452
+ }> | import("valibot").MaxLengthIssue<string, 30> | import("valibot").ExcludesIssue<string, ".."> | import("valibot").CustomIssue | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").StartsWithIssue<string, "https://"> | import("valibot").MaxLengthIssue<string, 60> | import("valibot").IsoTimestampIssue<string> | import("valibot").PicklistIssue | import("valibot").MaxLengthIssue<string, 140> | import("valibot").ArrayIssue | import("valibot").NonEmptyIssue<string[]> | import("valibot").MinLengthIssue<(2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17)[], 1> | import("valibot").MaxLengthIssue<string, 500> | import("valibot").BooleanIssue | import("valibot").MaxLengthIssue<{
421
453
  value: string;
422
454
  label: string;
423
455
  }[], 4> | import("valibot").LiteralIssue | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").LiteralIssue>>): import("valibot").Dataset<{
@@ -449,6 +481,10 @@ export declare const endowUpdate: Omit<Omit<import("valibot").ObjectSchema<{
449
481
  }[] | undefined;
450
482
  fund_opt_in?: boolean | undefined;
451
483
  target?: string | undefined;
484
+ referrer?: {
485
+ id: string;
486
+ expiry: string;
487
+ } | undefined;
452
488
  registration_number?: string | undefined;
453
489
  endow_designation?: "Charity" | "Religious Organization" | "University" | "Hospital" | "Other" | undefined;
454
490
  social_media_urls?: {
@@ -464,7 +500,7 @@ export declare const endowUpdate: Omit<Omit<import("valibot").ObjectSchema<{
464
500
  cash: number;
465
501
  liq: number;
466
502
  lock: number;
467
- }> | import("valibot").MaxLengthIssue<string, 30> | import("valibot").ExcludesIssue<string, ".."> | import("valibot").CustomIssue | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").StartsWithIssue<string, "https://"> | import("valibot").MaxLengthIssue<string, 60> | import("valibot").PicklistIssue | import("valibot").MaxLengthIssue<string, 140> | import("valibot").ArrayIssue | import("valibot").NonEmptyIssue<string[]> | import("valibot").MinLengthIssue<(2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17)[], 1> | import("valibot").MaxLengthIssue<string, 500> | import("valibot").BooleanIssue | import("valibot").MaxLengthIssue<{
503
+ }> | import("valibot").MaxLengthIssue<string, 30> | import("valibot").ExcludesIssue<string, ".."> | import("valibot").CustomIssue | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").StartsWithIssue<string, "https://"> | import("valibot").MaxLengthIssue<string, 60> | import("valibot").IsoTimestampIssue<string> | import("valibot").PicklistIssue | import("valibot").MaxLengthIssue<string, 140> | import("valibot").ArrayIssue | import("valibot").NonEmptyIssue<string[]> | import("valibot").MinLengthIssue<(2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17)[], 1> | import("valibot").MaxLengthIssue<string, 500> | import("valibot").BooleanIssue | import("valibot").MaxLengthIssue<{
468
504
  value: string;
469
505
  label: string;
470
506
  }[], 4> | import("valibot").LiteralIssue | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").LiteralIssue>>;
@@ -498,6 +534,10 @@ export declare const endowUpdate: Omit<Omit<import("valibot").ObjectSchema<{
498
534
  }[] | undefined;
499
535
  fund_opt_in?: boolean | undefined;
500
536
  target?: string | undefined;
537
+ referrer?: {
538
+ id: string;
539
+ expiry: string;
540
+ } | undefined;
501
541
  registration_number?: string | undefined;
502
542
  endow_designation?: "Charity" | "Religious Organization" | "University" | "Hospital" | "Other" | undefined;
503
543
  social_media_urls?: {
@@ -539,6 +579,10 @@ export declare const endowUpdate: Omit<Omit<import("valibot").ObjectSchema<{
539
579
  }[] | undefined;
540
580
  fund_opt_in?: boolean | undefined;
541
581
  target?: string | undefined;
582
+ referrer?: {
583
+ id: string;
584
+ expiry: string;
585
+ } | undefined;
542
586
  registration_number?: string | undefined;
543
587
  endow_designation?: "Charity" | "Religious Organization" | "University" | "Hospital" | "Other" | undefined;
544
588
  social_media_urls?: {
@@ -555,13 +599,13 @@ export declare const endowUpdate: Omit<Omit<import("valibot").ObjectSchema<{
555
599
  cash: number;
556
600
  liq: number;
557
601
  lock: number;
558
- }> | import("valibot").MaxLengthIssue<string, 30> | import("valibot").ExcludesIssue<string, ".."> | import("valibot").CustomIssue | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").StartsWithIssue<string, "https://"> | import("valibot").MaxLengthIssue<string, 60> | import("valibot").PicklistIssue | import("valibot").MaxLengthIssue<string, 140> | import("valibot").ArrayIssue | import("valibot").NonEmptyIssue<string[]> | import("valibot").MinLengthIssue<(2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17)[], 1> | import("valibot").MaxLengthIssue<string, 500> | import("valibot").BooleanIssue | import("valibot").MaxLengthIssue<{
602
+ }> | import("valibot").MaxLengthIssue<string, 30> | import("valibot").ExcludesIssue<string, ".."> | import("valibot").CustomIssue | import("valibot").NonEmptyIssue<string> | import("valibot").UrlIssue<string> | import("valibot").StartsWithIssue<string, "https://"> | import("valibot").MaxLengthIssue<string, 60> | import("valibot").IsoTimestampIssue<string> | import("valibot").PicklistIssue | import("valibot").MaxLengthIssue<string, 140> | import("valibot").ArrayIssue | import("valibot").NonEmptyIssue<string[]> | import("valibot").MinLengthIssue<(2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17)[], 1> | import("valibot").MaxLengthIssue<string, 500> | import("valibot").BooleanIssue | import("valibot").MaxLengthIssue<{
559
603
  value: string;
560
604
  label: string;
561
605
  }[], 4> | import("valibot").LiteralIssue | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").LiteralIssue>;
562
606
  } | undefined;
563
607
  };
564
- 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", "target", "id", "env", "registration_number", "endow_designation", "social_media_urls", "claimed", "kyc_donors_only", "fiscal_sponsored"], undefined>;
608
+ export declare const endowFields: import("valibot").PicklistSchema<["url", "id", "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", "target", "referrer", "env", "registration_number", "endow_designation", "social_media_urls", "claimed", "kyc_donors_only", "fiscal_sponsored"], undefined>;
565
609
  export interface Endowment extends InferOutput<typeof endowment> {
566
610
  }
567
611
  export interface EndowUpdate extends InferOutput<typeof endowUpdate> {
@@ -569,7 +613,7 @@ export interface EndowUpdate extends InferOutput<typeof endowUpdate> {
569
613
  export type EndowFields = InferOutput<typeof endowFields>;
570
614
  /** for ein path, only fields in reg-num/env gsi is available */
571
615
  export declare const endowQueryParams: import("valibot").ObjectSchema<{
572
- 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", "target", "id", "env", "registration_number", "endow_designation", "social_media_urls", "claimed", "kyc_donors_only", "fiscal_sponsored"], undefined>, undefined>]>, never>;
616
+ 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", "id", "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", "target", "referrer", "env", "registration_number", "endow_designation", "social_media_urls", "claimed", "kyc_donors_only", "fiscal_sponsored"], undefined>, undefined>]>, never>;
573
617
  }, undefined>;
574
618
  export interface EndowQueryParams extends InferInput<typeof endowQueryParams> {
575
619
  }
package/dist/schema.mjs CHANGED
@@ -52,6 +52,10 @@ export const increment = object({
52
52
  value: incrementVal,
53
53
  label: incrementLabel,
54
54
  });
55
+ export const referrer = object({
56
+ id: pipe(str, nonEmpty("required")),
57
+ expiry: pipe(str, isoTimestamp()),
58
+ });
55
59
  export const endowment = object({
56
60
  id: endowId,
57
61
  env,
@@ -90,6 +94,7 @@ export const endowment = object({
90
94
  claimed: boolean(),
91
95
  kyc_donors_only: boolean(),
92
96
  fiscal_sponsored: boolean(),
97
+ referrer: optional(referrer),
93
98
  });
94
99
  export const endowUpdate = partial(omit(endowment, [
95
100
  "id",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-giving/endowment",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "peerDependencies": {
5
5
  "@better-giving/schemas": "1.1.2",
6
6
  "@better-giving/types": "1.1.3",
package/src/schema.mts CHANGED
@@ -167,6 +167,11 @@ export const increment = object({
167
167
  label: incrementLabel,
168
168
  });
169
169
 
170
+ export const referrer = object({
171
+ id: pipe(str, nonEmpty("required")),
172
+ expiry: pipe(str, isoTimestamp()),
173
+ });
174
+
170
175
  export interface Increment extends InferOutput<typeof increment> {}
171
176
 
172
177
  export const endowment = object({
@@ -216,6 +221,7 @@ export const endowment = object({
216
221
  claimed: boolean(),
217
222
  kyc_donors_only: boolean(),
218
223
  fiscal_sponsored: boolean(),
224
+ referrer: optional(referrer),
219
225
  });
220
226
 
221
227
  export const endowUpdate = partial(