@better-giving/fundraiser 1.1.0 → 1.1.3
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/db.d.mts +3 -0
- package/dist/db.mjs +8 -1
- package/dist/schema.mjs +2 -0
- package/package.json +5 -4
- package/src/db.mts +11 -0
- package/src/schema.mts +3 -0
package/dist/db.d.mts
CHANGED
package/dist/db.mjs
CHANGED
|
@@ -1 +1,8 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export const fundGsi = {
|
|
2
|
+
slugEnv: "slug-env-gsi",
|
|
3
|
+
};
|
|
4
|
+
// export namespace SlugEnvGsi {
|
|
5
|
+
// export type Name = typeof fundGsi.slugEnv;
|
|
6
|
+
// export interface Keys extends Pick<NewFund, "slug" | "env"> {}
|
|
7
|
+
// export interface Record extends DbRecord {} //all attributes are copied to this index
|
|
8
|
+
// }
|
package/dist/schema.mjs
CHANGED
|
@@ -23,6 +23,7 @@ export const newFund = object({
|
|
|
23
23
|
]),
|
|
24
24
|
videos: array(pipe(str, url())),
|
|
25
25
|
npo_owner,
|
|
26
|
+
// slug: optional(slug),
|
|
26
27
|
});
|
|
27
28
|
export const fundUpdate = partial(pick(newFund, [
|
|
28
29
|
"name",
|
|
@@ -32,6 +33,7 @@ export const fundUpdate = partial(pick(newFund, [
|
|
|
32
33
|
"featured",
|
|
33
34
|
"target",
|
|
34
35
|
"videos",
|
|
36
|
+
// "slug",
|
|
35
37
|
]));
|
|
36
38
|
export const fundsParams = object({
|
|
37
39
|
/** search text */
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-giving/fundraiser",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"valibot": "0.42.0",
|
|
6
|
-
"@better-giving/
|
|
7
|
-
"@better-giving/
|
|
6
|
+
"@better-giving/endowment": "1.1.2",
|
|
7
|
+
"@better-giving/schemas": "1.1.2",
|
|
8
|
+
"@better-giving/types": "1.1.2"
|
|
8
9
|
},
|
|
9
10
|
"devDependencies": {
|
|
10
|
-
"@better-giving/config": "1.1.
|
|
11
|
+
"@better-giving/config": "1.1.2"
|
|
11
12
|
},
|
|
12
13
|
"files": [
|
|
13
14
|
"src",
|
package/src/db.mts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type { FundInternal, NewFund } from "./schema.mjs";
|
|
2
|
+
|
|
3
|
+
export const fundGsi = {
|
|
4
|
+
slugEnv: "slug-env-gsi",
|
|
5
|
+
} as const;
|
|
6
|
+
|
|
2
7
|
export interface Keys {
|
|
3
8
|
/** Fund#${uuid} */
|
|
4
9
|
PK: `Fund#${string}`;
|
|
@@ -7,3 +12,9 @@ export interface Keys {
|
|
|
7
12
|
|
|
8
13
|
export interface Attributes extends NewFund, FundInternal {}
|
|
9
14
|
export interface DbRecord extends Keys, Attributes {}
|
|
15
|
+
|
|
16
|
+
export namespace SlugEnvGsi {
|
|
17
|
+
export type Name = typeof fundGsi.slugEnv;
|
|
18
|
+
export interface Keys extends Pick<Attributes, "slug" | "env"> {}
|
|
19
|
+
export interface Record extends DbRecord {} //all attributes are copied to this index
|
|
20
|
+
}
|
package/src/schema.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { slug } from "@better-giving/endowment/schema";
|
|
1
2
|
import type { DonateMethodId } from "@better-giving/schemas";
|
|
2
3
|
import type { Environment } from "@better-giving/types/list";
|
|
3
4
|
export type { Environment } from "@better-giving/types/list";
|
|
@@ -66,6 +67,7 @@ export const newFund = object({
|
|
|
66
67
|
]),
|
|
67
68
|
videos: array(pipe(str, url())),
|
|
68
69
|
npo_owner,
|
|
70
|
+
slug: optional(slug),
|
|
69
71
|
});
|
|
70
72
|
|
|
71
73
|
export const fundUpdate = partial(
|
|
@@ -77,6 +79,7 @@ export const fundUpdate = partial(
|
|
|
77
79
|
"featured",
|
|
78
80
|
"target",
|
|
79
81
|
"videos",
|
|
82
|
+
"slug",
|
|
80
83
|
])
|
|
81
84
|
);
|
|
82
85
|
|