mirror of
https://github.com/versia-pub/server.git
synced 2026-04-28 13:19:16 +02:00
docs(federation): 📝 Update SDK documentation
This commit is contained in:
parent
f79b0bc999
commit
45e5460975
67 changed files with 332 additions and 65 deletions
25
packages/sdk/schemas/extensions/emojis.ts
Normal file
25
packages/sdk/schemas/extensions/emojis.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/**
|
||||
* Custom emojis extension.
|
||||
* @module federation/schemas/extensions/custom_emojis
|
||||
* @see module:federation/schemas/base
|
||||
* @see https://versia.pub/extensions/custom-emojis
|
||||
*/
|
||||
import { z } from "zod";
|
||||
import { emojiRegex } from "../../regex.ts";
|
||||
import { ImageContentFormatSchema } from "../contentformat.ts";
|
||||
|
||||
export const CustomEmojiExtensionSchema = z.strictObject({
|
||||
emojis: z.array(
|
||||
z.strictObject({
|
||||
name: z
|
||||
.string()
|
||||
.min(1)
|
||||
.max(256)
|
||||
.regex(
|
||||
emojiRegex,
|
||||
"Emoji name must be alphanumeric, underscores, or dashes, and surrounded by identifiers",
|
||||
),
|
||||
url: ImageContentFormatSchema,
|
||||
}),
|
||||
),
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue