2024-07-26 17:49:36 +02:00
|
|
|
/**
|
|
|
|
|
* @file TypeScript type definitions
|
|
|
|
|
* @module federation/types
|
|
|
|
|
*/
|
|
|
|
|
|
2024-07-23 00:11:05 +02:00
|
|
|
import type { z } from "zod";
|
2024-06-20 00:21:34 +02:00
|
|
|
import type {
|
2024-08-25 15:47:03 +02:00
|
|
|
DeleteSchema,
|
2024-06-20 00:21:34 +02:00
|
|
|
EntitySchema,
|
|
|
|
|
FollowAcceptSchema,
|
|
|
|
|
FollowRejectSchema,
|
|
|
|
|
FollowSchema,
|
2024-08-25 15:47:03 +02:00
|
|
|
GroupSchema,
|
|
|
|
|
InstanceMetadataSchema,
|
2024-06-20 00:21:34 +02:00
|
|
|
NoteSchema,
|
2024-08-25 15:47:03 +02:00
|
|
|
UnfollowSchema,
|
2024-06-20 00:21:34 +02:00
|
|
|
UserSchema,
|
2024-07-23 00:11:05 +02:00
|
|
|
} from "./schemas/base";
|
2024-08-25 16:10:38 +02:00
|
|
|
import type { ContentFormatSchema } from "./schemas/content_format";
|
2024-08-24 15:05:11 +02:00
|
|
|
import type { ExtensionPropertySchema } from "./schemas/extensions";
|
|
|
|
|
import type { CustomEmojiExtensionSchema } from "./schemas/extensions/custom_emojis";
|
2024-08-25 16:01:06 +02:00
|
|
|
import type { LikeSchema } from "./schemas/extensions/likes";
|
|
|
|
|
import type { VoteSchema } from "./schemas/extensions/polls";
|
|
|
|
|
import type { ReactionSchema } from "./schemas/extensions/reactions";
|
|
|
|
|
import type { ShareSchema } from "./schemas/extensions/share";
|
2024-08-24 15:05:11 +02:00
|
|
|
import type { VanityExtensionSchema } from "./schemas/extensions/vanity";
|
2024-06-20 00:21:34 +02:00
|
|
|
|
|
|
|
|
// biome-ignore lint/suspicious/noExplicitAny: Used only as a base type
|
|
|
|
|
type AnyZod = z.ZodType<any, any, any>;
|
|
|
|
|
|
|
|
|
|
type InferType<T extends AnyZod> = z.infer<T>;
|
|
|
|
|
|
|
|
|
|
export type Note = InferType<typeof NoteSchema>;
|
2024-08-25 16:10:38 +02:00
|
|
|
export type EntityExtensionProperty = InferType<typeof ExtensionPropertySchema>;
|
2024-06-20 00:21:34 +02:00
|
|
|
export type VanityExtension = InferType<typeof VanityExtensionSchema>;
|
|
|
|
|
export type User = InferType<typeof UserSchema>;
|
|
|
|
|
export type Follow = InferType<typeof FollowSchema>;
|
|
|
|
|
export type FollowAccept = InferType<typeof FollowAcceptSchema>;
|
|
|
|
|
export type FollowReject = InferType<typeof FollowRejectSchema>;
|
|
|
|
|
export type ContentFormat = InferType<typeof ContentFormatSchema>;
|
|
|
|
|
export type CustomEmojiExtension = InferType<typeof CustomEmojiExtensionSchema>;
|
|
|
|
|
export type Entity = InferType<typeof EntitySchema>;
|
2024-08-25 15:47:03 +02:00
|
|
|
export type Delete = InferType<typeof DeleteSchema>;
|
|
|
|
|
export type Group = InferType<typeof GroupSchema>;
|
|
|
|
|
export type InstanceMetadata = InferType<typeof InstanceMetadataSchema>;
|
|
|
|
|
export type Unfollow = InferType<typeof UnfollowSchema>;
|
2024-08-25 16:10:38 +02:00
|
|
|
export type LikeExtension = InferType<typeof LikeSchema>;
|
|
|
|
|
export type DislikeExtension = InferType<typeof LikeSchema>;
|
|
|
|
|
export type PollVoteExtension = InferType<typeof VoteSchema>;
|
|
|
|
|
export type ReactionExtension = InferType<typeof ReactionSchema>;
|
|
|
|
|
export type ShareExtension = InferType<typeof ShareSchema>;
|