i hate my life

Signed-off-by: mkljczk <git@mkljczk.pl>
This commit is contained in:
mkljczk
2025-01-02 16:37:49 +01:00
parent 4b5402aed3
commit bf4bfa0b4b
13 changed files with 369 additions and 553 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -26,7 +26,6 @@ export * from './backup';
export * from './bookmark-folder';
export * from './chat';
export * from './chat-message';
export * from './circle';
export * from './context';
export * from './conversation';
export * from './custom-emoji';
@@ -58,7 +57,6 @@ export * from './notification-request';
export * from './oauth-token';
export * from './poll';
export * from './preview-card';
export * from './preview-card-author';
export * from './relationship';
export * from './relationship-severance-event';
export * from './report';

View File

@@ -5,5 +5,3 @@ export * from './entities';
export * from './features';
export * from './params';
export * from './responses';
export * from './schemas';
export * from './schemas/all-schemas';

View File

@@ -1,193 +0,0 @@
import {
accountSchema,
accountWarningSchema,
adminAccountSchema,
adminAnnouncementSchema,
adminCanonicalEmailBlockSchema,
adminCohortSchema,
adminDimensionSchema,
adminDomainAllowSchema,
adminDomainBlockSchema,
adminDomainSchema,
adminEmailDomainBlockSchema,
adminIpBlockSchema,
adminIpSchema,
adminMeasureSchema,
adminModerationLogEntrySchema,
adminRelaySchema,
adminReportSchema,
adminRuleSchema,
adminTagSchema,
announcementReactionSchema,
announcementSchema,
antennaSchema,
applicationSchema,
backupSchema,
blurhashSchema,
bookmarkFolderSchema,
chatMessageSchema,
chatSchema,
circleSchema,
contextSchema,
conversationSchema,
credentialAccountSchema,
credentialApplicationSchema,
customEmojiSchema,
domainBlockSchema,
emojiReactionSchema,
extendedDescriptionSchema,
familiarFollowersSchema,
featuredTagSchema,
filterKeywordSchema,
filterSchema,
filterStatusSchema,
followRelationshipUpdateSchema,
groupedNotificationsResultsSchema,
groupMemberSchema,
groupRelationshipSchema,
groupSchema,
historySchema,
instanceSchema,
interactionPoliciesSchema,
interactionPolicySchema,
interactionRequestSchema,
listSchema,
locationSchema,
markerSchema,
markersSchema,
mediaAttachmentSchema,
mentionSchema,
mutedAccountSchema,
notificationGroupSchema,
notificationPolicySchema,
notificationRequestSchema,
notificationSchema,
oauthTokenSchema,
pleromaConfigSchema,
pollSchema,
previewCardAuthorSchema,
previewCardSchema,
relationshipSchema,
relationshipSeveranceEventSchema,
reportSchema,
roleSchema,
ruleSchema,
scheduledStatusSchema,
scrobbleSchema,
searchSchema,
statusEditSchema,
statusSchema,
statusSourceSchema,
statusWithoutAccountSchema,
streamingEventSchema,
suggestionSchema,
tagSchema,
tokenSchema,
translationSchema,
trendsLinkSchema,
webPushSubscriptionSchema,
} from '../entities';
const NON_ADMIN_SCHEMAS = {
accountSchema,
accountWarningSchema,
announcementReactionSchema,
announcementSchema,
antennaSchema,
applicationSchema,
backupSchema,
blurhashSchema,
bookmarkFolderSchema,
chatMessageSchema,
chatSchema,
circleSchema,
contextSchema,
conversationSchema,
credentialAccountSchema,
credentialApplicationSchema,
customEmojiSchema,
domainBlockSchema,
emojiReactionSchema,
extendedDescriptionSchema,
familiarFollowersSchema,
featuredTagSchema,
filterKeywordSchema,
filterSchema,
filterStatusSchema,
followRelationshipUpdateSchema,
groupedNotificationsResultsSchema,
groupMemberSchema,
groupRelationshipSchema,
groupSchema,
historySchema,
instanceSchema,
interactionPoliciesSchema,
interactionPolicySchema,
interactionRequestSchema,
listSchema,
locationSchema,
markerSchema,
markersSchema,
mediaAttachmentSchema,
mentionSchema,
mutedAccountSchema,
notificationGroupSchema,
notificationPolicySchema,
notificationRequestSchema,
notificationSchema,
oauthTokenSchema,
pollSchema,
previewCardAuthorSchema,
previewCardSchema,
relationshipSchema,
relationshipSeveranceEventSchema,
reportSchema,
roleSchema,
ruleSchema,
scheduledStatusSchema,
scrobbleSchema,
searchSchema,
statusEditSchema,
statusSchema,
statusSourceSchema,
statusWithoutAccountSchema,
streamingEventSchema,
suggestionSchema,
tagSchema,
tokenSchema,
translationSchema,
trendsLinkSchema,
webPushSubscriptionSchema,
};
const ADMIN_SCHEMAS = {
adminAccountSchema,
adminAnnouncementSchema,
adminCanonicalEmailBlockSchema,
adminCohortSchema,
adminDimensionSchema,
adminDomainAllowSchema,
adminDomainBlockSchema,
adminDomainSchema,
adminEmailDomainBlockSchema,
adminIpBlockSchema,
adminIpSchema,
adminMeasureSchema,
adminModerationLogEntrySchema,
adminRelaySchema,
adminReportSchema,
adminRuleSchema,
adminTagSchema,
pleromaConfigSchema,
};
const ALL_SCHEMAS = {
...ADMIN_SCHEMAS,
...NON_ADMIN_SCHEMAS,
};
export {
ALL_SCHEMAS,
ADMIN_SCHEMAS,
NON_ADMIN_SCHEMAS,
};

View File

@@ -1,21 +0,0 @@
import * as v from 'valibot';
import { instanceSchema } from '../entities';
import type { ALL_SCHEMAS } from './all-schemas';
const nullSchema = v.fallback(v.null(), null);
const IMPORTED_SCHEMAS = {
instanceSchema,
} as typeof ALL_SCHEMAS;
const SCHEMAS = new Proxy(IMPORTED_SCHEMAS, {
get: (target, p: keyof typeof ALL_SCHEMAS) => p in target ? target[p] : nullSchema,
});
const importSchemas = (schemas: Partial<typeof ALL_SCHEMAS>) =>
// @ts-ignore
Object.entries(schemas).forEach(([key, value]) => IMPORTED_SCHEMAS[key] = value);
export { SCHEMAS, importSchemas };