mirror of
https://github.com/versia-pub/api.git
synced 2026-03-13 04:09:15 +01:00
feat(federation): ✨ Add a federation requester client
This commit is contained in:
parent
7e3db6fc2b
commit
bbcc362bc1
8 changed files with 266 additions and 4 deletions
20
federation/schemas/webfinger.ts
Normal file
20
federation/schemas/webfinger.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import { z } from "zod";
|
||||
|
||||
export const WebFingerSchema = z.object({
|
||||
subject: z.string().url(),
|
||||
aliases: z.array(z.string().url()).optional(),
|
||||
properties: z.record(z.string().url(), z.string().or(z.null())).optional(),
|
||||
links: z
|
||||
.array(
|
||||
z.object({
|
||||
rel: z.string(),
|
||||
type: z.string().optional(),
|
||||
href: z.string().url().optional(),
|
||||
titles: z.record(z.string(), z.string()).optional(),
|
||||
properties: z
|
||||
.record(z.string().url(), z.string().or(z.null()))
|
||||
.optional(),
|
||||
}),
|
||||
)
|
||||
.optional(),
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue