Skip to content

Commit 3d4df7b

Browse files
committed
refactor: split changeset type
1 parent 2147d4e commit 3d4df7b

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

packages/repository/src/types/changeset.types.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ import {
1616
RoundRole,
1717
} from "./round.types.js";
1818

19-
export type Changeset =
19+
//TODO: see if in the future we move out of inline object types for changesets
20+
21+
type ProjectChangeset =
2022
| {
2123
type: "InsertProject";
2224
args: {
@@ -60,7 +62,9 @@ export type Changeset =
6062
args: {
6163
projectRole: Pick<ProjectRole, "chainId" | "projectId" | "role" | "address">;
6264
};
63-
}
65+
};
66+
67+
type RoundChangeset =
6468
| {
6569
type: "InsertRound";
6670
args: {
@@ -123,7 +127,9 @@ export type Changeset =
123127
args: {
124128
roundRole: Pick<RoundRole, "chainId" | "roundId" | "role" | "address">;
125129
};
126-
}
130+
};
131+
132+
type ApplicationChangeset =
127133
| {
128134
type: "InsertApplication";
129135
args: NewApplication;
@@ -137,3 +143,7 @@ export type Changeset =
137143
application: PartialApplication;
138144
};
139145
};
146+
147+
//TODO: add changeset for Donation and Payout tables
148+
149+
export type Changeset = ProjectChangeset | RoundChangeset | ApplicationChangeset;

0 commit comments

Comments
 (0)