@better-giving/endowment 2.0.1 → 2.0.2
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/schema.d.mts +19 -8
- package/dist/schema.mjs +2 -0
- package/package.json +1 -1
- package/src/schema.mts +3 -0
package/dist/schema.d.mts
CHANGED
|
@@ -2,6 +2,7 @@ import { donateMethodId, donateMethodIds, env, orgDesignation, unSdgNum } from "
|
|
|
2
2
|
export { type OrgDesignation as EndowDesignation, type Environment, type UnSdgNum, type DonateMethodId, https_url, } from "@better-giving/schemas";
|
|
3
3
|
export { orgDesignation as endowDesignation, env, unSdgNum, donateMethodId, donateMethodIds, };
|
|
4
4
|
import * as v from "valibot";
|
|
5
|
+
export declare const min_payout_amount = 50;
|
|
5
6
|
export declare const str: v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>;
|
|
6
7
|
export declare const csv: v.LazySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]> | v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.RegexAction<string, "invalid csv">]>>;
|
|
7
8
|
export declare const csvStrs: v.SchemaWithPipe<[v.LazySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]> | v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.RegexAction<string, "invalid csv">]>>, v.TransformAction<string, string[]>, v.FilterItemsAction<string[]>]>;
|
|
@@ -106,6 +107,7 @@ export declare const endowment: v.ObjectSchema<{
|
|
|
106
107
|
readonly referrer: v.OptionalSchema<v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.NonEmptyAction<string, "required">]>, never>;
|
|
107
108
|
readonly referrer_expiry: v.OptionalSchema<v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.IsoTimestampAction<string, undefined>]>, never>;
|
|
108
109
|
readonly w_form: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
110
|
+
readonly payout_minimum: v.OptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.MinValueAction<number, 50, undefined>]>, never>;
|
|
109
111
|
}, undefined>;
|
|
110
112
|
export declare const endowUpdate: Omit<Omit<v.ObjectSchema<{
|
|
111
113
|
readonly id: v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
|
|
@@ -166,6 +168,7 @@ export declare const endowUpdate: Omit<Omit<v.ObjectSchema<{
|
|
|
166
168
|
readonly referrer: v.OptionalSchema<v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.NonEmptyAction<string, "required">]>, never>;
|
|
167
169
|
readonly referrer_expiry: v.OptionalSchema<v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.IsoTimestampAction<string, undefined>]>, never>;
|
|
168
170
|
readonly w_form: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
171
|
+
readonly payout_minimum: v.OptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.MinValueAction<number, 50, undefined>]>, never>;
|
|
169
172
|
}, undefined>, "_types" | "_run" | "entries"> & {
|
|
170
173
|
readonly entries: Omit<{
|
|
171
174
|
readonly id: v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
|
|
@@ -226,6 +229,7 @@ export declare const endowUpdate: Omit<Omit<v.ObjectSchema<{
|
|
|
226
229
|
readonly referrer: v.OptionalSchema<v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.NonEmptyAction<string, "required">]>, never>;
|
|
227
230
|
readonly referrer_expiry: v.OptionalSchema<v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.IsoTimestampAction<string, undefined>]>, never>;
|
|
228
231
|
readonly w_form: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
232
|
+
readonly payout_minimum: v.OptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.MinValueAction<number, 50, undefined>]>, never>;
|
|
229
233
|
}, "id" | "env" | "claimed" | "kyc_donors_only" | "fiscal_sponsored">;
|
|
230
234
|
_run(dataset: v.Dataset<unknown, never>, config: v.Config<v.StringIssue | v.RegexIssue<string> | v.NumberIssue | v.IntegerIssue<number> | v.MinValueIssue<number, 0> | v.MaxValueIssue<number, 100> | v.ObjectIssue | v.CheckIssue<{
|
|
231
235
|
cash: number;
|
|
@@ -234,7 +238,7 @@ export declare const endowUpdate: Omit<Omit<v.ObjectSchema<{
|
|
|
234
238
|
}> | v.MaxLengthIssue<string, 30> | v.ExcludesIssue<string, ".."> | v.CustomIssue | v.NonEmptyIssue<string> | v.UrlIssue<string> | v.MaxLengthIssue<string, 60> | v.PicklistIssue | v.MaxLengthIssue<string, 140> | v.ArrayIssue | v.NonEmptyIssue<string[]> | v.MinLengthIssue<(2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17)[], 1> | v.MaxLengthIssue<string, 500> | v.BooleanIssue | v.MaxLengthIssue<{
|
|
235
239
|
value: string;
|
|
236
240
|
label: string;
|
|
237
|
-
}[], 4> | v.LiteralIssue | v.UnionIssue<v.StringIssue | v.NumberIssue | v.MinValueIssue<number, 0> | v.LiteralIssue> | v.IsoTimestampIssue<string>>): v.Dataset<{
|
|
241
|
+
}[], 4> | v.LiteralIssue | v.UnionIssue<v.StringIssue | v.NumberIssue | v.MinValueIssue<number, 0> | v.LiteralIssue> | v.IsoTimestampIssue<string> | v.MinValueIssue<number, 50>>): v.Dataset<{
|
|
238
242
|
name: string;
|
|
239
243
|
hq_country: string;
|
|
240
244
|
active_in_countries: string[];
|
|
@@ -278,6 +282,7 @@ export declare const endowUpdate: Omit<Omit<v.ObjectSchema<{
|
|
|
278
282
|
referrer?: string | undefined;
|
|
279
283
|
referrer_expiry?: string | undefined;
|
|
280
284
|
w_form?: string | undefined;
|
|
285
|
+
payout_minimum?: number | undefined;
|
|
281
286
|
}, v.StringIssue | v.RegexIssue<string> | v.NumberIssue | v.IntegerIssue<number> | v.MinValueIssue<number, 0> | v.MaxValueIssue<number, 100> | v.ObjectIssue | v.CheckIssue<{
|
|
282
287
|
cash: number;
|
|
283
288
|
liq: number;
|
|
@@ -285,7 +290,7 @@ export declare const endowUpdate: Omit<Omit<v.ObjectSchema<{
|
|
|
285
290
|
}> | v.MaxLengthIssue<string, 30> | v.ExcludesIssue<string, ".."> | v.CustomIssue | v.NonEmptyIssue<string> | v.UrlIssue<string> | v.MaxLengthIssue<string, 60> | v.PicklistIssue | v.MaxLengthIssue<string, 140> | v.ArrayIssue | v.NonEmptyIssue<string[]> | v.MinLengthIssue<(2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17)[], 1> | v.MaxLengthIssue<string, 500> | v.BooleanIssue | v.MaxLengthIssue<{
|
|
286
291
|
value: string;
|
|
287
292
|
label: string;
|
|
288
|
-
}[], 4> | v.LiteralIssue | v.UnionIssue<v.StringIssue | v.NumberIssue | v.MinValueIssue<number, 0> | v.LiteralIssue> | v.IsoTimestampIssue<string>>;
|
|
293
|
+
}[], 4> | v.LiteralIssue | v.UnionIssue<v.StringIssue | v.NumberIssue | v.MinValueIssue<number, 0> | v.LiteralIssue> | v.IsoTimestampIssue<string> | v.MinValueIssue<number, 50>>;
|
|
289
294
|
readonly _types?: {
|
|
290
295
|
readonly input: {
|
|
291
296
|
name: string;
|
|
@@ -331,6 +336,7 @@ export declare const endowUpdate: Omit<Omit<v.ObjectSchema<{
|
|
|
331
336
|
referrer?: string | undefined;
|
|
332
337
|
referrer_expiry?: string | undefined;
|
|
333
338
|
w_form?: string | undefined;
|
|
339
|
+
payout_minimum?: number | undefined;
|
|
334
340
|
};
|
|
335
341
|
readonly output: {
|
|
336
342
|
name: string;
|
|
@@ -376,6 +382,7 @@ export declare const endowUpdate: Omit<Omit<v.ObjectSchema<{
|
|
|
376
382
|
referrer?: string | undefined;
|
|
377
383
|
referrer_expiry?: string | undefined;
|
|
378
384
|
w_form?: string | undefined;
|
|
385
|
+
payout_minimum?: number | undefined;
|
|
379
386
|
};
|
|
380
387
|
readonly issue: v.StringIssue | v.RegexIssue<string> | v.NumberIssue | v.IntegerIssue<number> | v.MinValueIssue<number, 0> | v.MaxValueIssue<number, 100> | v.ObjectIssue | v.CheckIssue<{
|
|
381
388
|
cash: number;
|
|
@@ -384,7 +391,7 @@ export declare const endowUpdate: Omit<Omit<v.ObjectSchema<{
|
|
|
384
391
|
}> | v.MaxLengthIssue<string, 30> | v.ExcludesIssue<string, ".."> | v.CustomIssue | v.NonEmptyIssue<string> | v.UrlIssue<string> | v.MaxLengthIssue<string, 60> | v.PicklistIssue | v.MaxLengthIssue<string, 140> | v.ArrayIssue | v.NonEmptyIssue<string[]> | v.MinLengthIssue<(2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17)[], 1> | v.MaxLengthIssue<string, 500> | v.BooleanIssue | v.MaxLengthIssue<{
|
|
385
392
|
value: string;
|
|
386
393
|
label: string;
|
|
387
|
-
}[], 4> | v.LiteralIssue | v.UnionIssue<v.StringIssue | v.NumberIssue | v.MinValueIssue<number, 0> | v.LiteralIssue> | v.IsoTimestampIssue<string>;
|
|
394
|
+
}[], 4> | v.LiteralIssue | v.UnionIssue<v.StringIssue | v.NumberIssue | v.MinValueIssue<number, 0> | v.LiteralIssue> | v.IsoTimestampIssue<string> | v.MinValueIssue<number, 50>;
|
|
388
395
|
} | undefined;
|
|
389
396
|
}, "_types" | "_run" | "entries"> & {
|
|
390
397
|
readonly entries: {
|
|
@@ -427,6 +434,7 @@ export declare const endowUpdate: Omit<Omit<v.ObjectSchema<{
|
|
|
427
434
|
readonly referrer: v.OptionalSchema<v.OptionalSchema<v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.NonEmptyAction<string, "required">]>, never>, never>;
|
|
428
435
|
readonly referrer_expiry: v.OptionalSchema<v.OptionalSchema<v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.IsoTimestampAction<string, undefined>]>, never>, never>;
|
|
429
436
|
readonly w_form: v.OptionalSchema<v.OptionalSchema<v.StringSchema<undefined>, never>, never>;
|
|
437
|
+
readonly payout_minimum: v.OptionalSchema<v.OptionalSchema<v.SchemaWithPipe<[v.NumberSchema<undefined>, v.MinValueAction<number, 50, undefined>]>, never>, never>;
|
|
430
438
|
readonly registration_number: v.OptionalSchema<v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.NonEmptyAction<string, "required">, v.RegexAction<string, "must only contain letters and numbers">]>, never>;
|
|
431
439
|
readonly endow_designation: v.OptionalSchema<v.PicklistSchema<readonly ["Charity", "Religious Organization", "University", "Hospital", "Other"], undefined>, never>;
|
|
432
440
|
readonly social_media_urls: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -446,7 +454,7 @@ export declare const endowUpdate: Omit<Omit<v.ObjectSchema<{
|
|
|
446
454
|
}> | v.MaxLengthIssue<string, 30> | v.ExcludesIssue<string, ".."> | v.CustomIssue | v.NonEmptyIssue<string> | v.UrlIssue<string> | v.MaxLengthIssue<string, 60> | v.PicklistIssue | v.MaxLengthIssue<string, 140> | v.ArrayIssue | v.NonEmptyIssue<string[]> | v.MinLengthIssue<(2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17)[], 1> | v.MaxLengthIssue<string, 500> | v.BooleanIssue | v.MaxLengthIssue<{
|
|
447
455
|
value: string;
|
|
448
456
|
label: string;
|
|
449
|
-
}[], 4> | v.LiteralIssue | v.UnionIssue<v.StringIssue | v.NumberIssue | v.MinValueIssue<number, 0> | v.LiteralIssue> | v.IsoTimestampIssue<string>>): v.Dataset<{
|
|
457
|
+
}[], 4> | v.LiteralIssue | v.UnionIssue<v.StringIssue | v.NumberIssue | v.MinValueIssue<number, 0> | v.LiteralIssue> | v.IsoTimestampIssue<string> | v.MinValueIssue<number, 50>>): v.Dataset<{
|
|
450
458
|
url?: string | undefined;
|
|
451
459
|
slug?: string | undefined;
|
|
452
460
|
name?: string | undefined;
|
|
@@ -479,6 +487,7 @@ export declare const endowUpdate: Omit<Omit<v.ObjectSchema<{
|
|
|
479
487
|
referrer?: string | undefined;
|
|
480
488
|
referrer_expiry?: string | undefined;
|
|
481
489
|
w_form?: string | undefined;
|
|
490
|
+
payout_minimum?: number | undefined;
|
|
482
491
|
registration_number?: string | undefined;
|
|
483
492
|
endow_designation?: "Charity" | "Religious Organization" | "University" | "Hospital" | "Other" | undefined;
|
|
484
493
|
social_media_urls?: {
|
|
@@ -497,7 +506,7 @@ export declare const endowUpdate: Omit<Omit<v.ObjectSchema<{
|
|
|
497
506
|
}> | v.MaxLengthIssue<string, 30> | v.ExcludesIssue<string, ".."> | v.CustomIssue | v.NonEmptyIssue<string> | v.UrlIssue<string> | v.MaxLengthIssue<string, 60> | v.PicklistIssue | v.MaxLengthIssue<string, 140> | v.ArrayIssue | v.NonEmptyIssue<string[]> | v.MinLengthIssue<(2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17)[], 1> | v.MaxLengthIssue<string, 500> | v.BooleanIssue | v.MaxLengthIssue<{
|
|
498
507
|
value: string;
|
|
499
508
|
label: string;
|
|
500
|
-
}[], 4> | v.LiteralIssue | v.UnionIssue<v.StringIssue | v.NumberIssue | v.MinValueIssue<number, 0> | v.LiteralIssue> | v.IsoTimestampIssue<string>>;
|
|
509
|
+
}[], 4> | v.LiteralIssue | v.UnionIssue<v.StringIssue | v.NumberIssue | v.MinValueIssue<number, 0> | v.LiteralIssue> | v.IsoTimestampIssue<string> | v.MinValueIssue<number, 50>>;
|
|
501
510
|
readonly _types?: {
|
|
502
511
|
readonly input: {
|
|
503
512
|
url?: string | undefined;
|
|
@@ -532,6 +541,7 @@ export declare const endowUpdate: Omit<Omit<v.ObjectSchema<{
|
|
|
532
541
|
referrer?: string | undefined;
|
|
533
542
|
referrer_expiry?: string | undefined;
|
|
534
543
|
w_form?: string | undefined;
|
|
544
|
+
payout_minimum?: number | undefined;
|
|
535
545
|
registration_number?: string | undefined;
|
|
536
546
|
endow_designation?: "Charity" | "Religious Organization" | "University" | "Hospital" | "Other" | undefined;
|
|
537
547
|
social_media_urls?: {
|
|
@@ -577,6 +587,7 @@ export declare const endowUpdate: Omit<Omit<v.ObjectSchema<{
|
|
|
577
587
|
referrer?: string | undefined;
|
|
578
588
|
referrer_expiry?: string | undefined;
|
|
579
589
|
w_form?: string | undefined;
|
|
590
|
+
payout_minimum?: number | undefined;
|
|
580
591
|
registration_number?: string | undefined;
|
|
581
592
|
endow_designation?: "Charity" | "Religious Organization" | "University" | "Hospital" | "Other" | undefined;
|
|
582
593
|
social_media_urls?: {
|
|
@@ -596,10 +607,10 @@ export declare const endowUpdate: Omit<Omit<v.ObjectSchema<{
|
|
|
596
607
|
}> | v.MaxLengthIssue<string, 30> | v.ExcludesIssue<string, ".."> | v.CustomIssue | v.NonEmptyIssue<string> | v.UrlIssue<string> | v.MaxLengthIssue<string, 60> | v.PicklistIssue | v.MaxLengthIssue<string, 140> | v.ArrayIssue | v.NonEmptyIssue<string[]> | v.MinLengthIssue<(2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17)[], 1> | v.MaxLengthIssue<string, 500> | v.BooleanIssue | v.MaxLengthIssue<{
|
|
597
608
|
value: string;
|
|
598
609
|
label: string;
|
|
599
|
-
}[], 4> | v.LiteralIssue | v.UnionIssue<v.StringIssue | v.NumberIssue | v.MinValueIssue<number, 0> | v.LiteralIssue> | v.IsoTimestampIssue<string>;
|
|
610
|
+
}[], 4> | v.LiteralIssue | v.UnionIssue<v.StringIssue | v.NumberIssue | v.MinValueIssue<number, 0> | v.LiteralIssue> | v.IsoTimestampIssue<string> | v.MinValueIssue<number, 50>;
|
|
600
611
|
} | undefined;
|
|
601
612
|
};
|
|
602
|
-
export declare const endowFields: v.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", "referral_id", "referrer", "referrer_expiry", "w_form", "id", "env", "registration_number", "endow_designation", "social_media_urls", "claimed", "kyc_donors_only", "fiscal_sponsored"], undefined>;
|
|
613
|
+
export declare const endowFields: v.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", "referral_id", "referrer", "referrer_expiry", "w_form", "payout_minimum", "id", "env", "registration_number", "endow_designation", "social_media_urls", "claimed", "kyc_donors_only", "fiscal_sponsored"], undefined>;
|
|
603
614
|
export interface Endowment extends v.InferOutput<typeof endowment> {
|
|
604
615
|
}
|
|
605
616
|
export interface EndowUpdate extends v.InferOutput<typeof endowUpdate> {
|
|
@@ -607,7 +618,7 @@ export interface EndowUpdate extends v.InferOutput<typeof endowUpdate> {
|
|
|
607
618
|
export type EndowFields = v.InferOutput<typeof endowFields>;
|
|
608
619
|
/** for ein path, only fields in reg-num/env gsi is available */
|
|
609
620
|
export declare const endowQueryParams: v.ObjectSchema<{
|
|
610
|
-
readonly fields: v.OptionalSchema<v.SchemaWithPipe<[v.SchemaWithPipe<[v.LazySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]> | v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.RegexAction<string, "invalid csv">]>>, v.TransformAction<string, string[]>, v.FilterItemsAction<string[]>]>, v.ArraySchema<v.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", "referral_id", "referrer", "referrer_expiry", "w_form", "id", "env", "registration_number", "endow_designation", "social_media_urls", "claimed", "kyc_donors_only", "fiscal_sponsored"], undefined>, undefined>]>, never>;
|
|
621
|
+
readonly fields: v.OptionalSchema<v.SchemaWithPipe<[v.SchemaWithPipe<[v.LazySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]> | v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.TrimAction]>, v.RegexAction<string, "invalid csv">]>>, v.TransformAction<string, string[]>, v.FilterItemsAction<string[]>]>, v.ArraySchema<v.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", "referral_id", "referrer", "referrer_expiry", "w_form", "payout_minimum", "id", "env", "registration_number", "endow_designation", "social_media_urls", "claimed", "kyc_donors_only", "fiscal_sponsored"], undefined>, undefined>]>, never>;
|
|
611
622
|
}, undefined>;
|
|
612
623
|
export interface EndowQueryParams extends v.InferInput<typeof endowQueryParams> {
|
|
613
624
|
}
|
package/dist/schema.mjs
CHANGED
|
@@ -2,6 +2,7 @@ import { donateMethodId, donateMethodIds, env, https_url, orgDesignation, unSdgN
|
|
|
2
2
|
export { https_url, } from "@better-giving/schemas";
|
|
3
3
|
export { orgDesignation as endowDesignation, env, unSdgNum, donateMethodId, donateMethodIds, };
|
|
4
4
|
import * as v from "valibot";
|
|
5
|
+
export const min_payout_amount = 50;
|
|
5
6
|
export const str = v.pipe(v.string(), v.trim());
|
|
6
7
|
export const csv = v.lazy((x) => {
|
|
7
8
|
if (!x)
|
|
@@ -89,6 +90,7 @@ export const endowment = v.object({
|
|
|
89
90
|
referrer: v.optional(v.pipe(str, v.nonEmpty("required"))),
|
|
90
91
|
referrer_expiry: v.optional(v.pipe(str, v.isoTimestamp())),
|
|
91
92
|
w_form: v.optional(v.string()),
|
|
93
|
+
payout_minimum: v.optional(v.pipe(v.number(), v.minValue(min_payout_amount))),
|
|
92
94
|
});
|
|
93
95
|
export const endowUpdate = v.partial(v.omit(endowment, [
|
|
94
96
|
"id",
|
package/package.json
CHANGED
package/src/schema.mts
CHANGED
|
@@ -22,6 +22,8 @@ export {
|
|
|
22
22
|
};
|
|
23
23
|
import * as v from "valibot";
|
|
24
24
|
|
|
25
|
+
export const min_payout_amount = 50;
|
|
26
|
+
|
|
25
27
|
export const str = v.pipe(v.string(), v.trim());
|
|
26
28
|
export const csv = v.lazy((x) => {
|
|
27
29
|
if (!x) return str;
|
|
@@ -175,6 +177,7 @@ export const endowment = v.object({
|
|
|
175
177
|
referrer: v.optional(v.pipe(str, v.nonEmpty("required"))),
|
|
176
178
|
referrer_expiry: v.optional(v.pipe(str, v.isoTimestamp())),
|
|
177
179
|
w_form: v.optional(v.string()),
|
|
180
|
+
payout_minimum: v.optional(v.pipe(v.number(), v.minValue(min_payout_amount))),
|
|
178
181
|
});
|
|
179
182
|
|
|
180
183
|
export const endowUpdate = v.partial(
|