@better-giving/endowment 1.1.4 → 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,7 +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>;
107
- readonly referrer: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").NonEmptyAction<string, "required">]>, never>;
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>;
108
115
  }, undefined>;
109
116
  export declare const endowUpdate: Omit<Omit<import("valibot").ObjectSchema<{
110
117
  readonly id: import("valibot").SchemaWithPipe<[import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 1, undefined>]>;
@@ -161,7 +168,10 @@ export declare const endowUpdate: Omit<Omit<import("valibot").ObjectSchema<{
161
168
  readonly claimed: import("valibot").BooleanSchema<undefined>;
162
169
  readonly kyc_donors_only: import("valibot").BooleanSchema<undefined>;
163
170
  readonly fiscal_sponsored: import("valibot").BooleanSchema<undefined>;
164
- readonly referrer: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").NonEmptyAction<string, "required">]>, never>;
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>;
165
175
  }, undefined>, "_types" | "_run" | "entries"> & {
166
176
  readonly entries: Omit<{
167
177
  readonly id: import("valibot").SchemaWithPipe<[import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 1, undefined>]>;
@@ -218,13 +228,16 @@ export declare const endowUpdate: Omit<Omit<import("valibot").ObjectSchema<{
218
228
  readonly claimed: import("valibot").BooleanSchema<undefined>;
219
229
  readonly kyc_donors_only: import("valibot").BooleanSchema<undefined>;
220
230
  readonly fiscal_sponsored: import("valibot").BooleanSchema<undefined>;
221
- readonly referrer: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").NonEmptyAction<string, "required">]>, never>;
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>;
222
235
  }, "id" | "env" | "claimed" | "kyc_donors_only" | "fiscal_sponsored">;
223
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<{
224
237
  cash: number;
225
238
  liq: number;
226
239
  lock: number;
227
- }> | 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<{
228
241
  value: string;
229
242
  label: string;
230
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<{
@@ -267,12 +280,15 @@ export declare const endowUpdate: Omit<Omit<import("valibot").ObjectSchema<{
267
280
  }[] | undefined;
268
281
  fund_opt_in?: boolean | undefined;
269
282
  target?: string | undefined;
270
- referrer?: string | undefined;
283
+ referrer?: {
284
+ id: string;
285
+ expiry: string;
286
+ } | undefined;
271
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<{
272
288
  cash: number;
273
289
  liq: number;
274
290
  lock: number;
275
- }> | 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<{
276
292
  value: string;
277
293
  label: string;
278
294
  }[], 4> | import("valibot").LiteralIssue | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").LiteralIssue>>;
@@ -317,7 +333,10 @@ export declare const endowUpdate: Omit<Omit<import("valibot").ObjectSchema<{
317
333
  }[] | undefined;
318
334
  fund_opt_in?: boolean | undefined;
319
335
  target?: string | undefined;
320
- referrer?: string | undefined;
336
+ referrer?: {
337
+ id: string;
338
+ expiry: string;
339
+ } | undefined;
321
340
  };
322
341
  readonly output: {
323
342
  name: string;
@@ -359,13 +378,16 @@ export declare const endowUpdate: Omit<Omit<import("valibot").ObjectSchema<{
359
378
  }[] | undefined;
360
379
  fund_opt_in?: boolean | undefined;
361
380
  target?: string | undefined;
362
- referrer?: string | undefined;
381
+ referrer?: {
382
+ id: string;
383
+ expiry: string;
384
+ } | undefined;
363
385
  };
364
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<{
365
387
  cash: number;
366
388
  liq: number;
367
389
  lock: number;
368
- }> | 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<{
369
391
  value: string;
370
392
  label: string;
371
393
  }[], 4> | import("valibot").LiteralIssue | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").LiteralIssue>;
@@ -407,7 +429,10 @@ export declare const endowUpdate: Omit<Omit<import("valibot").ObjectSchema<{
407
429
  }[], 4, undefined>]>, never>, never>;
408
430
  readonly fund_opt_in: import("valibot").OptionalSchema<import("valibot").OptionalSchema<import("valibot").BooleanSchema<undefined>, never>, never>;
409
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>;
410
- readonly referrer: import("valibot").OptionalSchema<import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").TrimAction]>, import("valibot").NonEmptyAction<string, "required">]>, 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>;
411
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>;
412
437
  readonly endow_designation: import("valibot").OptionalSchema<import("valibot").PicklistSchema<readonly ["Charity", "Religious Organization", "University", "Hospital", "Other"], undefined>, never>;
413
438
  readonly social_media_urls: import("valibot").OptionalSchema<import("valibot").ObjectSchema<{
@@ -424,7 +449,7 @@ export declare const endowUpdate: Omit<Omit<import("valibot").ObjectSchema<{
424
449
  cash: number;
425
450
  liq: number;
426
451
  lock: number;
427
- }> | 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<{
428
453
  value: string;
429
454
  label: string;
430
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<{
@@ -456,7 +481,10 @@ export declare const endowUpdate: Omit<Omit<import("valibot").ObjectSchema<{
456
481
  }[] | undefined;
457
482
  fund_opt_in?: boolean | undefined;
458
483
  target?: string | undefined;
459
- referrer?: string | undefined;
484
+ referrer?: {
485
+ id: string;
486
+ expiry: string;
487
+ } | undefined;
460
488
  registration_number?: string | undefined;
461
489
  endow_designation?: "Charity" | "Religious Organization" | "University" | "Hospital" | "Other" | undefined;
462
490
  social_media_urls?: {
@@ -472,7 +500,7 @@ export declare const endowUpdate: Omit<Omit<import("valibot").ObjectSchema<{
472
500
  cash: number;
473
501
  liq: number;
474
502
  lock: number;
475
- }> | 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<{
476
504
  value: string;
477
505
  label: string;
478
506
  }[], 4> | import("valibot").LiteralIssue | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").LiteralIssue>>;
@@ -506,7 +534,10 @@ export declare const endowUpdate: Omit<Omit<import("valibot").ObjectSchema<{
506
534
  }[] | undefined;
507
535
  fund_opt_in?: boolean | undefined;
508
536
  target?: string | undefined;
509
- referrer?: string | undefined;
537
+ referrer?: {
538
+ id: string;
539
+ expiry: string;
540
+ } | undefined;
510
541
  registration_number?: string | undefined;
511
542
  endow_designation?: "Charity" | "Religious Organization" | "University" | "Hospital" | "Other" | undefined;
512
543
  social_media_urls?: {
@@ -548,7 +579,10 @@ export declare const endowUpdate: Omit<Omit<import("valibot").ObjectSchema<{
548
579
  }[] | undefined;
549
580
  fund_opt_in?: boolean | undefined;
550
581
  target?: string | undefined;
551
- referrer?: string | undefined;
582
+ referrer?: {
583
+ id: string;
584
+ expiry: string;
585
+ } | undefined;
552
586
  registration_number?: string | undefined;
553
587
  endow_designation?: "Charity" | "Religious Organization" | "University" | "Hospital" | "Other" | undefined;
554
588
  social_media_urls?: {
@@ -565,13 +599,13 @@ export declare const endowUpdate: Omit<Omit<import("valibot").ObjectSchema<{
565
599
  cash: number;
566
600
  liq: number;
567
601
  lock: number;
568
- }> | 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<{
569
603
  value: string;
570
604
  label: string;
571
605
  }[], 4> | import("valibot").LiteralIssue | import("valibot").UnionIssue<import("valibot").StringIssue | import("valibot").NumberIssue | import("valibot").MinValueIssue<number, 0> | import("valibot").LiteralIssue>;
572
606
  } | undefined;
573
607
  };
574
- 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", "referrer", "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>;
575
609
  export interface Endowment extends InferOutput<typeof endowment> {
576
610
  }
577
611
  export interface EndowUpdate extends InferOutput<typeof endowUpdate> {
@@ -579,7 +613,7 @@ export interface EndowUpdate extends InferOutput<typeof endowUpdate> {
579
613
  export type EndowFields = InferOutput<typeof endowFields>;
580
614
  /** for ein path, only fields in reg-num/env gsi is available */
581
615
  export declare const endowQueryParams: import("valibot").ObjectSchema<{
582
- 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", "referrer", "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>;
583
617
  }, undefined>;
584
618
  export interface EndowQueryParams extends InferInput<typeof endowQueryParams> {
585
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,7 +94,7 @@ export const endowment = object({
90
94
  claimed: boolean(),
91
95
  kyc_donors_only: boolean(),
92
96
  fiscal_sponsored: boolean(),
93
- referrer: optional(pipe(str, nonEmpty("required"))),
97
+ referrer: optional(referrer),
94
98
  });
95
99
  export const endowUpdate = partial(omit(endowment, [
96
100
  "id",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-giving/endowment",
3
- "version": "1.1.4",
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,7 +221,7 @@ export const endowment = object({
216
221
  claimed: boolean(),
217
222
  kyc_donors_only: boolean(),
218
223
  fiscal_sponsored: boolean(),
219
- referrer: optional(pipe(str, nonEmpty("required"))),
224
+ referrer: optional(referrer),
220
225
  });
221
226
 
222
227
  export const endowUpdate = partial(