mirror of
https://github.com/versia-pub/api.git
synced 2025-12-06 08:28:19 +01:00
fix(federation): 🐛 Fix broken types (forgot to rename)
This commit is contained in:
parent
f998264300
commit
1a4890df2a
|
|
@ -1,27 +1,32 @@
|
||||||
|
import type {
|
||||||
|
Dislike,
|
||||||
|
Extension,
|
||||||
|
Follow,
|
||||||
|
FollowAccept,
|
||||||
|
FollowReject,
|
||||||
|
Like,
|
||||||
|
Note,
|
||||||
|
Patch,
|
||||||
|
ServerMetadata,
|
||||||
|
Undo,
|
||||||
|
User,
|
||||||
|
} from "../schemas";
|
||||||
import type { EntityValidator } from "../validator/index";
|
import type { EntityValidator } from "../validator/index";
|
||||||
|
|
||||||
type MaybePromise<T> = T | Promise<T>;
|
type MaybePromise<T> = T | Promise<T>;
|
||||||
|
|
||||||
type ParserCallbacks<T> = {
|
type ParserCallbacks<T> = {
|
||||||
note: (note: typeof EntityValidator.$Note) => MaybePromise<T>;
|
note: (note: Note) => MaybePromise<T>;
|
||||||
follow: (follow: typeof EntityValidator.$Follow) => MaybePromise<T>;
|
follow: (follow: Follow) => MaybePromise<T>;
|
||||||
followAccept: (
|
followAccept: (followAccept: FollowAccept) => MaybePromise<T>;
|
||||||
followAccept: typeof EntityValidator.$FollowAccept,
|
followReject: (followReject: FollowReject) => MaybePromise<T>;
|
||||||
) => MaybePromise<T>;
|
user: (user: User) => MaybePromise<T>;
|
||||||
followReject: (
|
like: (like: Like) => MaybePromise<T>;
|
||||||
followReject: typeof EntityValidator.$FollowReject,
|
dislike: (dislike: Dislike) => MaybePromise<T>;
|
||||||
) => MaybePromise<T>;
|
undo: (undo: Undo) => MaybePromise<T>;
|
||||||
user: (user: typeof EntityValidator.$User) => MaybePromise<T>;
|
serverMetadata: (serverMetadata: ServerMetadata) => MaybePromise<T>;
|
||||||
like: (like: typeof EntityValidator.$Like) => MaybePromise<T>;
|
extension: (extension: Extension) => MaybePromise<T>;
|
||||||
dislike: (dislike: typeof EntityValidator.$Dislike) => MaybePromise<T>;
|
patch: (patch: Patch) => MaybePromise<T>;
|
||||||
undo: (undo: typeof EntityValidator.$Undo) => MaybePromise<T>;
|
|
||||||
serverMetadata: (
|
|
||||||
serverMetadata: typeof EntityValidator.$ServerMetadata,
|
|
||||||
) => MaybePromise<T>;
|
|
||||||
extension: (
|
|
||||||
extension: typeof EntityValidator.$Extension,
|
|
||||||
) => MaybePromise<T>;
|
|
||||||
patch: (patch: typeof EntityValidator.$Patch) => MaybePromise<T>;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@
|
||||||
"workspaces": ["federation", "client"],
|
"workspaces": ["federation", "client"],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "bunx @biomejs/biome check .",
|
"lint": "bunx @biomejs/biome check .",
|
||||||
"build": "bun run build.ts"
|
"build": "bun run build.ts",
|
||||||
|
"check": "bunx tsc -p ."
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "^1.8.1",
|
"@biomejs/biome": "^1.8.1",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue