diff --git a/packages/pl-api/lib/entities/account-warning.ts b/packages/pl-api/lib/entities/account-warning.ts index 5b54270a6..9ec3eea5b 100644 --- a/packages/pl-api/lib/entities/account-warning.ts +++ b/packages/pl-api/lib/entities/account-warning.ts @@ -23,6 +23,9 @@ const accountWarningSchema = v.object({ created_at: v.fallback(datetimeSchema, new Date().toISOString()), }); +/** + * @category Entity types + */ type AccountWarning = v.InferOutput; export { accountWarningSchema, type AccountWarning }; diff --git a/packages/pl-api/lib/entities/account.ts b/packages/pl-api/lib/entities/account.ts index e75290ff3..64d8b712d 100644 --- a/packages/pl-api/lib/entities/account.ts +++ b/packages/pl-api/lib/entities/account.ts @@ -164,6 +164,9 @@ type WithMoved = { moved: Account | null; }; +/** + * @category Entity types + */ type Account = v.InferOutput & WithMoved; /** @@ -200,6 +203,9 @@ const untypedCredentialAccountSchema = v.pipe(v.any(), preprocessAccount, v.obje })), undefined), })); +/** + * @category Entity types + */ type CredentialAccount = v.InferOutput & WithMoved; /** @@ -212,6 +218,9 @@ const untypedMutedAccountSchema = v.pipe(v.any(), preprocessAccount, v.object({ mute_expires_at: v.fallback(v.nullable(datetimeSchema), null), })); +/** + * @category Entity types + */ type MutedAccount = v.InferOutput & WithMoved; /** diff --git a/packages/pl-api/lib/entities/admin/account.ts b/packages/pl-api/lib/entities/admin/account.ts index 6aee599f7..caf4f233e 100644 --- a/packages/pl-api/lib/entities/admin/account.ts +++ b/packages/pl-api/lib/entities/admin/account.ts @@ -69,7 +69,7 @@ const adminAccountSchema = v.pipe( ); /** - * @category Admin types + * @category Admin entity types */ type AdminAccount = v.InferOutput; diff --git a/packages/pl-api/lib/entities/admin/announcement.ts b/packages/pl-api/lib/entities/admin/announcement.ts index 41310b72d..ef6b20fba 100644 --- a/packages/pl-api/lib/entities/admin/announcement.ts +++ b/packages/pl-api/lib/entities/admin/announcement.ts @@ -20,7 +20,7 @@ const adminAnnouncementSchema = v.pipe( ); /** - * @category Admin types + * @category Admin entity types */ type AdminAnnouncement = v.InferOutput; diff --git a/packages/pl-api/lib/entities/admin/canonical-email-block.ts b/packages/pl-api/lib/entities/admin/canonical-email-block.ts index b086b4e7a..1ed511266 100644 --- a/packages/pl-api/lib/entities/admin/canonical-email-block.ts +++ b/packages/pl-api/lib/entities/admin/canonical-email-block.ts @@ -10,7 +10,7 @@ const adminCanonicalEmailBlockSchema = v.object({ }); /** - * @category Admin types + * @category Admin entity types */ type AdminCanonicalEmailBlock = v.InferOutput; diff --git a/packages/pl-api/lib/entities/admin/cohort.ts b/packages/pl-api/lib/entities/admin/cohort.ts index af31b394e..ceaa51641 100644 --- a/packages/pl-api/lib/entities/admin/cohort.ts +++ b/packages/pl-api/lib/entities/admin/cohort.ts @@ -17,7 +17,7 @@ const adminCohortSchema = v.object({ }); /** - * @category Admin types + * @category Admin entity types */ type AdminCohort = v.InferOutput; diff --git a/packages/pl-api/lib/entities/admin/dimension.ts b/packages/pl-api/lib/entities/admin/dimension.ts index f01a5f997..1804f90dc 100644 --- a/packages/pl-api/lib/entities/admin/dimension.ts +++ b/packages/pl-api/lib/entities/admin/dimension.ts @@ -16,7 +16,7 @@ const adminDimensionSchema = v.object({ }); /** - * @category Admin types + * @category Admin entity types */ type AdminDimension = v.InferOutput; diff --git a/packages/pl-api/lib/entities/admin/domain-allow.ts b/packages/pl-api/lib/entities/admin/domain-allow.ts index e8a95d6be..109500052 100644 --- a/packages/pl-api/lib/entities/admin/domain-allow.ts +++ b/packages/pl-api/lib/entities/admin/domain-allow.ts @@ -13,7 +13,7 @@ const adminDomainAllowSchema = v.object({ }); /** - * @category Admin types + * @category Admin entity types */ type AdminDomainAllow = v.InferOutput; diff --git a/packages/pl-api/lib/entities/admin/domain-block.ts b/packages/pl-api/lib/entities/admin/domain-block.ts index 186d559d2..0a79df86d 100644 --- a/packages/pl-api/lib/entities/admin/domain-block.ts +++ b/packages/pl-api/lib/entities/admin/domain-block.ts @@ -20,7 +20,7 @@ const adminDomainBlockSchema = v.object({ }); /** - * @category Admin types + * @category Admin entity types */ type AdminDomainBlock = v.InferOutput; diff --git a/packages/pl-api/lib/entities/admin/domain.ts b/packages/pl-api/lib/entities/admin/domain.ts index ad117483f..4a6da0611 100644 --- a/packages/pl-api/lib/entities/admin/domain.ts +++ b/packages/pl-api/lib/entities/admin/domain.ts @@ -2,6 +2,9 @@ import * as v from 'valibot'; import { datetimeSchema } from '../utils'; +/** + * @category Admin schemas + */ const adminDomainSchema = v.object({ domain: v.fallback(v.string(), ''), id: v.pipe(v.unknown(), v.transform(String)), @@ -11,7 +14,7 @@ const adminDomainSchema = v.object({ }); /** - * @category Admin types + * @category Admin entity types */ type AdminDomain = v.InferOutput diff --git a/packages/pl-api/lib/entities/admin/email-domain-block.ts b/packages/pl-api/lib/entities/admin/email-domain-block.ts index 917b5005c..f731574be 100644 --- a/packages/pl-api/lib/entities/admin/email-domain-block.ts +++ b/packages/pl-api/lib/entities/admin/email-domain-block.ts @@ -18,7 +18,7 @@ const adminEmailDomainBlockSchema = v.object({ }); /** - * @category Admin types + * @category Admin entity types */ type AdminEmailDomainBlock = v.InferOutput; diff --git a/packages/pl-api/lib/entities/admin/ip-block.ts b/packages/pl-api/lib/entities/admin/ip-block.ts index de764e264..b76bd685f 100644 --- a/packages/pl-api/lib/entities/admin/ip-block.ts +++ b/packages/pl-api/lib/entities/admin/ip-block.ts @@ -16,7 +16,7 @@ const adminIpBlockSchema = v.object({ }); /** - * @category Admin types + * @category Admin entity types */ type AdminIpBlock = v.InferOutput; diff --git a/packages/pl-api/lib/entities/admin/ip.ts b/packages/pl-api/lib/entities/admin/ip.ts index c77dc5d4c..1a323a144 100644 --- a/packages/pl-api/lib/entities/admin/ip.ts +++ b/packages/pl-api/lib/entities/admin/ip.ts @@ -12,7 +12,7 @@ const adminIpSchema = v.object({ }); /** - * @category Admin types + * @category Admin entity types */ type AdminIp = v.InferOutput; diff --git a/packages/pl-api/lib/entities/admin/measure.ts b/packages/pl-api/lib/entities/admin/measure.ts index 296abfc43..f8b1d85ca 100644 --- a/packages/pl-api/lib/entities/admin/measure.ts +++ b/packages/pl-api/lib/entities/admin/measure.ts @@ -19,7 +19,7 @@ const adminMeasureSchema = v.object({ }); /** - * @category Admin types + * @category Admin entity types */ type AdminMeasure = v.InferOutput; diff --git a/packages/pl-api/lib/entities/admin/moderation-log-entry.ts b/packages/pl-api/lib/entities/admin/moderation-log-entry.ts index 3b8b1b9bd..5c36c6b1e 100644 --- a/packages/pl-api/lib/entities/admin/moderation-log-entry.ts +++ b/packages/pl-api/lib/entities/admin/moderation-log-entry.ts @@ -12,7 +12,7 @@ const adminModerationLogEntrySchema = v.object({ }); /** - * @category Admin types + * @category Admin entity types */ type AdminModerationLogEntry = v.InferOutput diff --git a/packages/pl-api/lib/entities/admin/pleroma-config.ts b/packages/pl-api/lib/entities/admin/pleroma-config.ts index 8dd089506..8621dc3da 100644 --- a/packages/pl-api/lib/entities/admin/pleroma-config.ts +++ b/packages/pl-api/lib/entities/admin/pleroma-config.ts @@ -13,7 +13,7 @@ const pleromaConfigSchema = v.object({ }); /** - * @category Admin types + * @category Admin entity types */ type PleromaConfig = v.InferOutput diff --git a/packages/pl-api/lib/entities/admin/relay.ts b/packages/pl-api/lib/entities/admin/relay.ts index a4b48baaf..c2b5ded52 100644 --- a/packages/pl-api/lib/entities/admin/relay.ts +++ b/packages/pl-api/lib/entities/admin/relay.ts @@ -1,5 +1,8 @@ import * as v from 'valibot'; +/** + * @category Admin schemas + */ const adminRelaySchema = v.pipe( v.any(), v.transform((data: any) => ({ id: data.actor, ...data })), @@ -11,7 +14,7 @@ const adminRelaySchema = v.pipe( ); /** - * @category Admin types + * @category Admin entity types */ type AdminRelay = v.InferOutput diff --git a/packages/pl-api/lib/entities/admin/report.ts b/packages/pl-api/lib/entities/admin/report.ts index bdfda3f5d..dffe682fc 100644 --- a/packages/pl-api/lib/entities/admin/report.ts +++ b/packages/pl-api/lib/entities/admin/report.ts @@ -49,7 +49,7 @@ const adminReportSchema = v.pipe( ); /** - * @category Admin types + * @category Admin entity types */ type AdminReport = v.InferOutput; diff --git a/packages/pl-api/lib/entities/admin/rule.ts b/packages/pl-api/lib/entities/admin/rule.ts index e8803d83a..9173d4a1b 100644 --- a/packages/pl-api/lib/entities/admin/rule.ts +++ b/packages/pl-api/lib/entities/admin/rule.ts @@ -12,7 +12,7 @@ const adminRuleSchema = v.object({ }); /** - * @category Admin types + * @category Admin entity types */ type AdminRule = v.InferOutput; diff --git a/packages/pl-api/lib/entities/admin/tag.ts b/packages/pl-api/lib/entities/admin/tag.ts index 44dedb9f1..e4320fc01 100644 --- a/packages/pl-api/lib/entities/admin/tag.ts +++ b/packages/pl-api/lib/entities/admin/tag.ts @@ -15,7 +15,7 @@ const adminTagSchema = v.object({ }); /** - * @category Admin types + * @category Admin entity types */ type AdminTag = v.InferOutput; diff --git a/packages/pl-api/lib/entities/announcement-reaction.ts b/packages/pl-api/lib/entities/announcement-reaction.ts index 4de8f896e..0d7217dcc 100644 --- a/packages/pl-api/lib/entities/announcement-reaction.ts +++ b/packages/pl-api/lib/entities/announcement-reaction.ts @@ -13,6 +13,9 @@ const announcementReactionSchema = v.object({ announcement_id: v.fallback(v.string(), ''), }); +/** + * @category Entity types + */ type AnnouncementReaction = v.InferOutput; export { announcementReactionSchema, type AnnouncementReaction }; diff --git a/packages/pl-api/lib/entities/announcement.ts b/packages/pl-api/lib/entities/announcement.ts index d562d2a26..683aba701 100644 --- a/packages/pl-api/lib/entities/announcement.ts +++ b/packages/pl-api/lib/entities/announcement.ts @@ -32,6 +32,9 @@ const announcementSchema = v.object({ updated_at: v.fallback(datetimeSchema, new Date().toISOString()), }); +/** + * @category Entity types + */ type Announcement = v.InferOutput; export { announcementSchema, type Announcement }; diff --git a/packages/pl-api/lib/entities/application.ts b/packages/pl-api/lib/entities/application.ts index 1f96c0b67..21e8c0059 100644 --- a/packages/pl-api/lib/entities/application.ts +++ b/packages/pl-api/lib/entities/application.ts @@ -39,6 +39,9 @@ const credentialApplicationSchema = v.pipe( }), ); +/** + * @category Entity types + */ type CredentialApplication = v.InferOutput; export { applicationSchema, credentialApplicationSchema, type Application, type CredentialApplication }; diff --git a/packages/pl-api/lib/entities/backup.ts b/packages/pl-api/lib/entities/backup.ts index 7e58e16fc..8a49f4afa 100644 --- a/packages/pl-api/lib/entities/backup.ts +++ b/packages/pl-api/lib/entities/backup.ts @@ -15,6 +15,9 @@ const backupSchema = v.object({ url: v.fallback(v.string(), ''), }); +/** + * @category Entity types + */ type Backup = v.InferOutput; export { backupSchema, type Backup }; diff --git a/packages/pl-api/lib/entities/bookmark-folder.ts b/packages/pl-api/lib/entities/bookmark-folder.ts index c2ca21c07..e4e063f48 100644 --- a/packages/pl-api/lib/entities/bookmark-folder.ts +++ b/packages/pl-api/lib/entities/bookmark-folder.ts @@ -10,6 +10,9 @@ const bookmarkFolderSchema = v.object({ emoji_url: v.fallback(v.nullable(v.string()), null), }); +/** + * @category Entity types + */ type BookmarkFolder = v.InferOutput; export { bookmarkFolderSchema, type BookmarkFolder }; diff --git a/packages/pl-api/lib/entities/chat-message.ts b/packages/pl-api/lib/entities/chat-message.ts index 264bfceae..3da2f5dcf 100644 --- a/packages/pl-api/lib/entities/chat-message.ts +++ b/packages/pl-api/lib/entities/chat-message.ts @@ -21,6 +21,9 @@ const chatMessageSchema = v.object({ card: v.fallback(v.nullable(previewCardSchema), null), }); +/** + * @category Entity types + */ type ChatMessage = v.InferOutput; export { chatMessageSchema, type ChatMessage }; diff --git a/packages/pl-api/lib/entities/chat.ts b/packages/pl-api/lib/entities/chat.ts index f137e7960..ee107809c 100644 --- a/packages/pl-api/lib/entities/chat.ts +++ b/packages/pl-api/lib/entities/chat.ts @@ -16,6 +16,9 @@ const chatSchema = v.object({ updated_at: datetimeSchema, }); +/** + * @category Entity types + */ type Chat = v.InferOutput; export { chatSchema, type Chat }; diff --git a/packages/pl-api/lib/entities/context.ts b/packages/pl-api/lib/entities/context.ts index 8d8e67462..bec10638d 100644 --- a/packages/pl-api/lib/entities/context.ts +++ b/packages/pl-api/lib/entities/context.ts @@ -11,6 +11,9 @@ const contextSchema = v.object({ descendants: v.array(statusSchema), }); +/** + * @category Entity types + */ type Context = v.InferOutput; export { contextSchema, type Context }; diff --git a/packages/pl-api/lib/entities/conversation.ts b/packages/pl-api/lib/entities/conversation.ts index af31cfc74..9c806f266 100644 --- a/packages/pl-api/lib/entities/conversation.ts +++ b/packages/pl-api/lib/entities/conversation.ts @@ -15,6 +15,9 @@ const conversationSchema = v.object({ last_status: v.fallback(v.nullable(statusSchema), null), }); +/** + * @category Entity types + */ type Conversation = v.InferOutput; export { conversationSchema, type Conversation }; diff --git a/packages/pl-api/lib/entities/custom-emoji.ts b/packages/pl-api/lib/entities/custom-emoji.ts index 4dad8f510..a373ff6f0 100644 --- a/packages/pl-api/lib/entities/custom-emoji.ts +++ b/packages/pl-api/lib/entities/custom-emoji.ts @@ -14,6 +14,9 @@ const customEmojiSchema = v.object({ category: v.fallback(v.nullable(v.string()), null), }); +/** + * @category Entity types + */ type CustomEmoji = v.InferOutput; export { customEmojiSchema, type CustomEmoji }; diff --git a/packages/pl-api/lib/entities/directory/category.ts b/packages/pl-api/lib/entities/directory/category.ts index c80d69131..68d18d641 100644 --- a/packages/pl-api/lib/entities/directory/category.ts +++ b/packages/pl-api/lib/entities/directory/category.ts @@ -9,7 +9,7 @@ const directoryCategorySchema = v.object({ }); /** - * @category Directory types + * @category Directory entity types */ type DirectoryCategory = v.InferOutput; diff --git a/packages/pl-api/lib/entities/directory/language.ts b/packages/pl-api/lib/entities/directory/language.ts index 4e7c9bb92..3b8fd0bf2 100644 --- a/packages/pl-api/lib/entities/directory/language.ts +++ b/packages/pl-api/lib/entities/directory/language.ts @@ -10,7 +10,7 @@ const directoryLanguageSchema = v.object({ }); /** - * @category Directory types + * @category Directory entity types */ type DirectoryLanguage = v.InferOutput; diff --git a/packages/pl-api/lib/entities/directory/server.ts b/packages/pl-api/lib/entities/directory/server.ts index a0589b29f..2c6ed8255 100644 --- a/packages/pl-api/lib/entities/directory/server.ts +++ b/packages/pl-api/lib/entities/directory/server.ts @@ -20,7 +20,7 @@ const directoryServerSchema = v.object({ }); /** - * @category Directory types + * @category Directory entity types */ type DirectoryServer = v.InferOutput; diff --git a/packages/pl-api/lib/entities/directory/statistics-period.ts b/packages/pl-api/lib/entities/directory/statistics-period.ts index f97642e6f..15dcb2c82 100644 --- a/packages/pl-api/lib/entities/directory/statistics-period.ts +++ b/packages/pl-api/lib/entities/directory/statistics-period.ts @@ -11,7 +11,7 @@ const directoryStatisticsPeriodSchema = v.object({ }); /** - * @category Directory types + * @category Directory entity types */ type DirectoryStatisticsPeriod = v.InferOutput; diff --git a/packages/pl-api/lib/entities/domain-block.ts b/packages/pl-api/lib/entities/domain-block.ts index a0da3e358..c5f469d9e 100644 --- a/packages/pl-api/lib/entities/domain-block.ts +++ b/packages/pl-api/lib/entities/domain-block.ts @@ -11,6 +11,9 @@ const domainBlockSchema = v.object({ comment: v.fallback(v.optional(v.string()), undefined), }); +/** + * @category Entity types + */ type DomainBlock = v.InferOutput; export { domainBlockSchema, type DomainBlock }; diff --git a/packages/pl-api/lib/entities/emoji-reaction.ts b/packages/pl-api/lib/entities/emoji-reaction.ts index f1c7326b7..f2568a7fb 100644 --- a/packages/pl-api/lib/entities/emoji-reaction.ts +++ b/packages/pl-api/lib/entities/emoji-reaction.ts @@ -36,6 +36,9 @@ const emojiReactionSchema = v.pipe( v.union([baseEmojiReactionSchema, customEmojiReactionSchema]), ); +/** + * @category Entity types + */ type EmojiReaction = v.InferOutput; export { emojiReactionSchema, type EmojiReaction }; diff --git a/packages/pl-api/lib/entities/extended-description.ts b/packages/pl-api/lib/entities/extended-description.ts index f739f19fb..4c3b07071 100644 --- a/packages/pl-api/lib/entities/extended-description.ts +++ b/packages/pl-api/lib/entities/extended-description.ts @@ -11,6 +11,9 @@ const extendedDescriptionSchema = v.object({ content: v.string(), }); +/** + * @category Entity types + */ type ExtendedDescription = v.InferOutput; export { extendedDescriptionSchema, type ExtendedDescription }; diff --git a/packages/pl-api/lib/entities/familiar-followers.ts b/packages/pl-api/lib/entities/familiar-followers.ts index 2356b3418..519f9fe48 100644 --- a/packages/pl-api/lib/entities/familiar-followers.ts +++ b/packages/pl-api/lib/entities/familiar-followers.ts @@ -12,6 +12,9 @@ const familiarFollowersSchema = v.object({ accounts: filteredArray(accountSchema), }); +/** + * @category Entity types + */ type FamiliarFollowers = v.InferOutput export { familiarFollowersSchema, type FamiliarFollowers }; diff --git a/packages/pl-api/lib/entities/featured-tag.ts b/packages/pl-api/lib/entities/featured-tag.ts index e044377d2..14f9730e8 100644 --- a/packages/pl-api/lib/entities/featured-tag.ts +++ b/packages/pl-api/lib/entities/featured-tag.ts @@ -12,6 +12,9 @@ const featuredTagSchema = v.object({ last_status_at: v.number(), }); +/** + * @category Entity types + */ type FeaturedTag = v.InferOutput; export { featuredTagSchema, type FeaturedTag }; diff --git a/packages/pl-api/lib/entities/filter-result.ts b/packages/pl-api/lib/entities/filter-result.ts index 4811c3799..9b8c37eb1 100644 --- a/packages/pl-api/lib/entities/filter-result.ts +++ b/packages/pl-api/lib/entities/filter-result.ts @@ -12,6 +12,9 @@ const filterResultSchema = v.object({ status_matches: v.fallback(v.nullable(v.string()), null), }); +/** + * @category Entity types + */ type FilterResult = v.InferOutput; export { filterResultSchema, type FilterResult }; diff --git a/packages/pl-api/lib/entities/filter.ts b/packages/pl-api/lib/entities/filter.ts index 1d1f0d7ab..ca41bfe49 100644 --- a/packages/pl-api/lib/entities/filter.ts +++ b/packages/pl-api/lib/entities/filter.ts @@ -53,6 +53,9 @@ const filterSchema = v.pipe( }), ); +/** + * @category Entity types + */ type Filter = v.InferOutput; export { filterKeywordSchema, filterStatusSchema, filterSchema, type Filter }; diff --git a/packages/pl-api/lib/entities/group-member.ts b/packages/pl-api/lib/entities/group-member.ts index c0dd0384f..76d892105 100644 --- a/packages/pl-api/lib/entities/group-member.ts +++ b/packages/pl-api/lib/entities/group-member.ts @@ -19,6 +19,9 @@ const groupMemberSchema = v.object({ role: v.enum(GroupRoles), }); +/** + * @category Entity types + */ type GroupMember = v.InferOutput; export { groupMemberSchema, type GroupMember, GroupRoles, type GroupRole }; diff --git a/packages/pl-api/lib/entities/group-relationship.ts b/packages/pl-api/lib/entities/group-relationship.ts index 74fd7dc99..2ef313133 100644 --- a/packages/pl-api/lib/entities/group-relationship.ts +++ b/packages/pl-api/lib/entities/group-relationship.ts @@ -12,6 +12,9 @@ const groupRelationshipSchema = v.object({ requested: v.fallback(v.boolean(), false), }); +/** + * @category Entity types + */ type GroupRelationship = v.InferOutput; export { groupRelationshipSchema, type GroupRelationship }; diff --git a/packages/pl-api/lib/entities/group.ts b/packages/pl-api/lib/entities/group.ts index 76ba749db..60e2f00ea 100644 --- a/packages/pl-api/lib/entities/group.ts +++ b/packages/pl-api/lib/entities/group.ts @@ -31,6 +31,9 @@ const groupSchema = v.object({ header_description: v.fallback(v.string(), ''), }); +/** + * @category Entity types + */ type Group = v.InferOutput; export { groupSchema, type Group }; diff --git a/packages/pl-api/lib/entities/grouped-notifications-results.ts b/packages/pl-api/lib/entities/grouped-notifications-results.ts index e78c892f0..75685597a 100644 --- a/packages/pl-api/lib/entities/grouped-notifications-results.ts +++ b/packages/pl-api/lib/entities/grouped-notifications-results.ts @@ -122,6 +122,9 @@ const notificationGroupSchema: v.BaseSchema; export { instanceSchema, type Instance }; diff --git a/packages/pl-api/lib/entities/interaction-policy.ts b/packages/pl-api/lib/entities/interaction-policy.ts index db2168ace..36df12137 100644 --- a/packages/pl-api/lib/entities/interaction-policy.ts +++ b/packages/pl-api/lib/entities/interaction-policy.ts @@ -4,6 +4,9 @@ import { coerceObject } from './utils'; const interactionPolicyEntrySchema = v.picklist(['public', 'followers', 'following', 'mutuals', 'mentioned', 'author', 'me']); +/** + * @category Entity types + */ type InteractionPolicyEntry = v.InferOutput; const interactionPolicyRuleSchema = coerceObject({ @@ -21,6 +24,9 @@ const interactionPolicySchema = coerceObject({ can_reply: interactionPolicyRuleSchema, }); +/** + * @category Entity types + */ type InteractionPolicy = v.InferOutput; /** @@ -33,6 +39,9 @@ const interactionPoliciesSchema = coerceObject({ direct: interactionPolicySchema, }); +/** + * @category Entity types + */ type InteractionPolicies = v.InferOutput; export { interactionPolicySchema, interactionPoliciesSchema, type InteractionPolicyEntry, type InteractionPolicy, type InteractionPolicies }; diff --git a/packages/pl-api/lib/entities/interaction-request.ts b/packages/pl-api/lib/entities/interaction-request.ts index 34857bebe..1bbd49bcf 100644 --- a/packages/pl-api/lib/entities/interaction-request.ts +++ b/packages/pl-api/lib/entities/interaction-request.ts @@ -20,6 +20,9 @@ const interactionRequestSchema = v.object({ uri: v.fallback(v.nullable(v.string()), null), }); +/** + * @category Entity types + */ type InteractionRequest = v.InferOutput; export { interactionRequestSchema, type InteractionRequest }; diff --git a/packages/pl-api/lib/entities/list.ts b/packages/pl-api/lib/entities/list.ts index 72bd5e370..12278a7f3 100644 --- a/packages/pl-api/lib/entities/list.ts +++ b/packages/pl-api/lib/entities/list.ts @@ -11,6 +11,9 @@ const listSchema = v.object({ exclusive: v.fallback(v.optional(v.boolean()), undefined), }); +/** + * @category Entity types + */ type List = v.InferOutput; export { listSchema, type List }; diff --git a/packages/pl-api/lib/entities/location.ts b/packages/pl-api/lib/entities/location.ts index c83740f7e..731e95ec9 100644 --- a/packages/pl-api/lib/entities/location.ts +++ b/packages/pl-api/lib/entities/location.ts @@ -21,6 +21,9 @@ const locationSchema = v.object({ })), null), }); +/** + * @category Entity types + */ type Location = v.InferOutput; export { locationSchema, type Location }; diff --git a/packages/pl-api/lib/entities/marker.ts b/packages/pl-api/lib/entities/marker.ts index bf498dc42..a0b370f21 100644 --- a/packages/pl-api/lib/entities/marker.ts +++ b/packages/pl-api/lib/entities/marker.ts @@ -20,6 +20,9 @@ const markerSchema = v.pipe( }), ); +/** + * @category Entity types + */ type Marker = v.InferOutput; /** @@ -27,6 +30,9 @@ type Marker = v.InferOutput; */ const markersSchema = v.record(v.string(), markerSchema); +/** + * @category Entity types + */ type Markers = v.InferOutput; export { diff --git a/packages/pl-api/lib/entities/media-attachment.ts b/packages/pl-api/lib/entities/media-attachment.ts index 5d459d505..95b6c2451 100644 --- a/packages/pl-api/lib/entities/media-attachment.ts +++ b/packages/pl-api/lib/entities/media-attachment.ts @@ -114,6 +114,9 @@ const mediaAttachmentSchema = v.pipe( ]), ); +/** + * @category Entity types + */ type MediaAttachment = v.InferOutput; export { blurhashSchema, mediaAttachmentSchema, type MediaAttachment }; diff --git a/packages/pl-api/lib/entities/mention.ts b/packages/pl-api/lib/entities/mention.ts index 88c73f6f4..9671356cf 100644 --- a/packages/pl-api/lib/entities/mention.ts +++ b/packages/pl-api/lib/entities/mention.ts @@ -20,6 +20,9 @@ const mentionSchema = v.pipe( }), ); +/** + * @category Entity types + */ type Mention = v.InferOutput; export { mentionSchema, type Mention }; diff --git a/packages/pl-api/lib/entities/notification-policy.ts b/packages/pl-api/lib/entities/notification-policy.ts index 19396a4f5..1adef7724 100644 --- a/packages/pl-api/lib/entities/notification-policy.ts +++ b/packages/pl-api/lib/entities/notification-policy.ts @@ -18,6 +18,9 @@ const notificationPolicySchema = v.object({ }), }); +/** + * @category Entity types + */ type NotificationPolicy = v.InferOutput; export { notificationPolicySchema, type NotificationPolicy }; diff --git a/packages/pl-api/lib/entities/notification-request.ts b/packages/pl-api/lib/entities/notification-request.ts index 080c09c62..8c1fb8b7a 100644 --- a/packages/pl-api/lib/entities/notification-request.ts +++ b/packages/pl-api/lib/entities/notification-request.ts @@ -17,6 +17,9 @@ const notificationRequestSchema = v.object({ last_status: v.fallback(v.optional(statusSchema), undefined), }); +/** + * @category Entity types + */ type NotificationRequest = v.InferOutput; export { notificationRequestSchema, type NotificationRequest }; diff --git a/packages/pl-api/lib/entities/notification.ts b/packages/pl-api/lib/entities/notification.ts index 5ec909580..388f2f424 100644 --- a/packages/pl-api/lib/entities/notification.ts +++ b/packages/pl-api/lib/entities/notification.ts @@ -110,6 +110,9 @@ const notificationSchema: v.BaseSchema> eventParticipationRequestNotificationSchema, ])) as any; +/** + * @category Entity types + */ type Notification = v.InferOutput< | typeof accountNotificationSchema | typeof mentionNotificationSchema diff --git a/packages/pl-api/lib/entities/oauth-token.ts b/packages/pl-api/lib/entities/oauth-token.ts index 462615991..808136fc5 100644 --- a/packages/pl-api/lib/entities/oauth-token.ts +++ b/packages/pl-api/lib/entities/oauth-token.ts @@ -19,6 +19,9 @@ const oauthTokenSchema = v.pipe( }), ); +/** + * @category Entity types + */ type OauthToken = v.InferOutput; export { oauthTokenSchema, type OauthToken }; diff --git a/packages/pl-api/lib/entities/poll.ts b/packages/pl-api/lib/entities/poll.ts index 1180e9133..29bc9009f 100644 --- a/packages/pl-api/lib/entities/poll.ts +++ b/packages/pl-api/lib/entities/poll.ts @@ -29,7 +29,14 @@ const pollSchema = v.object({ non_anonymous: v.fallback(v.boolean(), false), }); +/** + * @category Entity types + */ type Poll = v.InferOutput; + +/** + * @category Entity types + */ type PollOption = Poll['options'][number]; export { pollSchema, type Poll, type PollOption }; diff --git a/packages/pl-api/lib/entities/preview-card-author.ts b/packages/pl-api/lib/entities/preview-card-author.ts index 000ce3783..64faed7dc 100644 --- a/packages/pl-api/lib/entities/preview-card-author.ts +++ b/packages/pl-api/lib/entities/preview-card-author.ts @@ -12,6 +12,9 @@ const previewCardAuthorSchema = v.object({ account: v.fallback(v.nullable(accountSchema), null), }); +/** + * @category Entity types + */ type PreviewCardAuthor = v.InferOutput; export { previewCardAuthorSchema, type PreviewCardAuthor }; diff --git a/packages/pl-api/lib/entities/preview-card.ts b/packages/pl-api/lib/entities/preview-card.ts index aeab1c07b..e8a8710f8 100644 --- a/packages/pl-api/lib/entities/preview-card.ts +++ b/packages/pl-api/lib/entities/preview-card.ts @@ -28,6 +28,9 @@ const previewCardSchema = v.object({ width: v.fallback(v.number(), 0), }); +/** + * @category Entity types + */ type PreviewCard = v.InferOutput; export { previewCardSchema, type PreviewCard }; diff --git a/packages/pl-api/lib/entities/relationship-severance-event.ts b/packages/pl-api/lib/entities/relationship-severance-event.ts index 19085a983..1d19a85ff 100644 --- a/packages/pl-api/lib/entities/relationship-severance-event.ts +++ b/packages/pl-api/lib/entities/relationship-severance-event.ts @@ -14,6 +14,9 @@ const relationshipSeveranceEventSchema = v.object({ created_at: datetimeSchema, }); +/** + * @category Entity types + */ type RelationshipSeveranceEvent = v.InferOutput; export { relationshipSeveranceEventSchema, type RelationshipSeveranceEvent }; diff --git a/packages/pl-api/lib/entities/relationship.ts b/packages/pl-api/lib/entities/relationship.ts index bc8d6f3df..31291f424 100644 --- a/packages/pl-api/lib/entities/relationship.ts +++ b/packages/pl-api/lib/entities/relationship.ts @@ -20,6 +20,9 @@ const relationshipSchema = v.object({ showing_reblogs: v.fallback(v.boolean(), false), }); +/** + * @category Entity types + */ type Relationship = v.InferOutput; export { relationshipSchema, type Relationship }; diff --git a/packages/pl-api/lib/entities/report.ts b/packages/pl-api/lib/entities/report.ts index fe930a4b5..2226f40de 100644 --- a/packages/pl-api/lib/entities/report.ts +++ b/packages/pl-api/lib/entities/report.ts @@ -20,6 +20,9 @@ const reportSchema = v.object({ target_account: v.fallback(v.nullable(accountSchema), null), }); +/** + * @category Entity types + */ type Report = v.InferOutput; export { reportSchema, type Report }; diff --git a/packages/pl-api/lib/entities/role.ts b/packages/pl-api/lib/entities/role.ts index a10e7cda5..14584738e 100644 --- a/packages/pl-api/lib/entities/role.ts +++ b/packages/pl-api/lib/entities/role.ts @@ -13,6 +13,9 @@ const roleSchema = v.object({ highlighted: v.fallback(v.boolean(), true), }); +/** + * @category Entity types + */ type Role = v.InferOutput; export { diff --git a/packages/pl-api/lib/entities/rule.ts b/packages/pl-api/lib/entities/rule.ts index 2b949b414..1bc5e6b40 100644 --- a/packages/pl-api/lib/entities/rule.ts +++ b/packages/pl-api/lib/entities/rule.ts @@ -19,6 +19,9 @@ const ruleSchema = v.pipe( baseRuleSchema, ); +/** + * @category Entity types + */ type Rule = v.InferOutput; export { ruleSchema, type Rule }; diff --git a/packages/pl-api/lib/entities/scheduled-status.ts b/packages/pl-api/lib/entities/scheduled-status.ts index 90f52c4d6..17bb70716 100644 --- a/packages/pl-api/lib/entities/scheduled-status.ts +++ b/packages/pl-api/lib/entities/scheduled-status.ts @@ -34,6 +34,9 @@ const scheduledStatusSchema = v.object({ media_attachments: filteredArray(mediaAttachmentSchema), }); +/** + * @category Entity types + */ type ScheduledStatus = v.InferOutput; export { scheduledStatusSchema, type ScheduledStatus }; diff --git a/packages/pl-api/lib/entities/scrobble.ts b/packages/pl-api/lib/entities/scrobble.ts index 41ecc51b4..b1b2d50ac 100644 --- a/packages/pl-api/lib/entities/scrobble.ts +++ b/packages/pl-api/lib/entities/scrobble.ts @@ -24,6 +24,9 @@ const scrobbleSchema = v.pipe( }), ); +/** + * @category Entity types + */ type Scrobble = v.InferOutput; export { scrobbleSchema, type Scrobble }; diff --git a/packages/pl-api/lib/entities/search.ts b/packages/pl-api/lib/entities/search.ts index 21eaa0ea2..9af61536d 100644 --- a/packages/pl-api/lib/entities/search.ts +++ b/packages/pl-api/lib/entities/search.ts @@ -17,6 +17,9 @@ const searchSchema = v.object({ groups: filteredArray(groupSchema), }); +/** + * @category Entity types + */ type Search = v.InferOutput; export { searchSchema, type Search }; diff --git a/packages/pl-api/lib/entities/status-edit.ts b/packages/pl-api/lib/entities/status-edit.ts index d419cc80b..46a3c159c 100644 --- a/packages/pl-api/lib/entities/status-edit.ts +++ b/packages/pl-api/lib/entities/status-edit.ts @@ -24,6 +24,9 @@ const statusEditSchema = v.object({ emojis: filteredArray(customEmojiSchema), }); +/** + * @category Entity types + */ type StatusEdit = v.InferOutput; export { statusEditSchema, type StatusEdit }; diff --git a/packages/pl-api/lib/entities/status-source.ts b/packages/pl-api/lib/entities/status-source.ts index d87f917cf..355c6a1c1 100644 --- a/packages/pl-api/lib/entities/status-source.ts +++ b/packages/pl-api/lib/entities/status-source.ts @@ -18,6 +18,9 @@ const statusSourceSchema = v.object({ spoiler_text_map: v.fallback(v.nullable(v.record(v.string(), v.string())), null), }); +/** + * @category Entity types + */ type StatusSource = v.InferOutput; export { statusSourceSchema, type StatusSource }; diff --git a/packages/pl-api/lib/entities/status.ts b/packages/pl-api/lib/entities/status.ts index 7fdfe563a..6534e025b 100644 --- a/packages/pl-api/lib/entities/status.ts +++ b/packages/pl-api/lib/entities/status.ts @@ -155,12 +155,18 @@ const statusWithoutAccountSchema = v.pipe(v.any(), v.transform(preprocess), v.ob quote: v.fallback(v.nullable(v.lazy(() => statusSchema)), null), })); +/** + * @category Entity types + */ type StatusWithoutAccount = Omit, 'account'> & { account: Account | null; reblog: Status | null; quote: Status | null; } +/** + * @category Entity types + */ type Status = v.InferOutput & { reblog: Status | null; quote: Status | null; diff --git a/packages/pl-api/lib/entities/streaming-event.ts b/packages/pl-api/lib/entities/streaming-event.ts index 8126c03cf..d65ada9f3 100644 --- a/packages/pl-api/lib/entities/streaming-event.ts +++ b/packages/pl-api/lib/entities/streaming-event.ts @@ -25,6 +25,9 @@ const followRelationshipUpdateSchema = v.object({ }), }); +/** + * @category Entity types + */ type FollowRelationshipUpdate = v.InferOutput; const baseStreamingEventSchema = v.object({ @@ -130,6 +133,9 @@ const streamingEventSchema: v.BaseSchema; export { suggestionSchema, type Suggestion }; diff --git a/packages/pl-api/lib/entities/tag.ts b/packages/pl-api/lib/entities/tag.ts index 31abaaba8..ae3aba9c8 100644 --- a/packages/pl-api/lib/entities/tag.ts +++ b/packages/pl-api/lib/entities/tag.ts @@ -20,6 +20,9 @@ const tagSchema = v.object({ following: v.fallback(v.optional(v.boolean()), undefined), }); +/** + * @category Entity types + */ type Tag = v.InferOutput; export { historySchema, tagSchema, type Tag }; diff --git a/packages/pl-api/lib/entities/token.ts b/packages/pl-api/lib/entities/token.ts index f55f81620..c66ef53bb 100644 --- a/packages/pl-api/lib/entities/token.ts +++ b/packages/pl-api/lib/entities/token.ts @@ -16,6 +16,9 @@ const tokenSchema = v.object({ me: v.fallback(v.optional(v.string()), undefined), }); +/** + * @category Entity types + */ type Token = v.InferOutput; export { tokenSchema, type Token }; diff --git a/packages/pl-api/lib/entities/translation.ts b/packages/pl-api/lib/entities/translation.ts index 594d7effe..69a70796e 100644 --- a/packages/pl-api/lib/entities/translation.ts +++ b/packages/pl-api/lib/entities/translation.ts @@ -43,6 +43,9 @@ const translationSchema = v.pipe( }), ); +/** + * @category Entity types + */ type Translation = v.InferOutput; export { translationSchema, type Translation }; diff --git a/packages/pl-api/lib/entities/trends-link.ts b/packages/pl-api/lib/entities/trends-link.ts index fe39f4142..a199b49fd 100644 --- a/packages/pl-api/lib/entities/trends-link.ts +++ b/packages/pl-api/lib/entities/trends-link.ts @@ -31,6 +31,9 @@ const trendsLinkSchema = v.pipe( }), ); +/** + * @category Entity types + */ type TrendsLink = v.InferOutput; export { trendsLinkSchema, type TrendsLink }; diff --git a/packages/pl-api/lib/entities/web-push-subscription.ts b/packages/pl-api/lib/entities/web-push-subscription.ts index 29f111a79..20455c29a 100644 --- a/packages/pl-api/lib/entities/web-push-subscription.ts +++ b/packages/pl-api/lib/entities/web-push-subscription.ts @@ -11,6 +11,9 @@ const webPushSubscriptionSchema = v.object({ server_key: v.string(), }); +/** + * @category Entity types + */ type WebPushSubscription = v.InferOutput; export { webPushSubscriptionSchema, type WebPushSubscription };