@remcostoeten/fync
Version:
Unified TypeScript library for 9 popular APIs with consistent functional architecture
710 lines • 19.9 kB
TypeScript
import { type TModule } from "../core";
declare const resources: {
users: import("../core").TResourceConfig<{
getCurrentUser: {
path: string;
};
getUser: {
path: string;
};
modifyCurrentUser: {
path: string;
method: "PATCH";
};
getCurrentUserGuilds: {
path: string;
};
getCurrentUserGuildMember: {
path: string;
};
leaveGuild: {
path: string;
method: "DELETE";
};
createDM: {
path: string;
method: "POST";
};
getConnections: {
path: string;
};
getApplicationRoleConnection: {
path: string;
};
updateApplicationRoleConnection: {
path: string;
method: "PUT";
};
}>;
guilds: import("../core").TResourceConfig<{
createGuild: {
path: string;
method: "POST";
};
getGuild: {
path: string;
};
getGuildPreview: {
path: string;
};
modifyGuild: {
path: string;
method: "PATCH";
};
deleteGuild: {
path: string;
method: "DELETE";
};
getGuildChannels: {
path: string;
};
createGuildChannel: {
path: string;
method: "POST";
};
modifyGuildChannelPositions: {
path: string;
method: "PATCH";
};
listActiveThreads: {
path: string;
};
getGuildMember: {
path: string;
};
listGuildMembers: {
path: string;
};
searchGuildMembers: {
path: string;
};
addGuildMember: {
path: string;
method: "PUT";
};
modifyGuildMember: {
path: string;
method: "PATCH";
};
modifyCurrentMember: {
path: string;
method: "PATCH";
};
addGuildMemberRole: {
path: string;
method: "PUT";
};
removeGuildMemberRole: {
path: string;
method: "DELETE";
};
removeGuildMember: {
path: string;
method: "DELETE";
};
getGuildBans: {
path: string;
};
getGuildBan: {
path: string;
};
createGuildBan: {
path: string;
method: "PUT";
};
removeGuildBan: {
path: string;
method: "DELETE";
};
getGuildRoles: {
path: string;
};
createGuildRole: {
path: string;
method: "POST";
};
modifyGuildRolePositions: {
path: string;
method: "PATCH";
};
modifyGuildRole: {
path: string;
method: "PATCH";
};
deleteGuildRole: {
path: string;
method: "DELETE";
};
getGuildPruneCount: {
path: string;
};
beginGuildPrune: {
path: string;
method: "POST";
};
getGuildVoiceRegions: {
path: string;
};
getGuildInvites: {
path: string;
};
getGuildIntegrations: {
path: string;
};
deleteGuildIntegration: {
path: string;
method: "DELETE";
};
getGuildWidgetSettings: {
path: string;
};
modifyGuildWidget: {
path: string;
method: "PATCH";
};
getGuildWidget: {
path: string;
};
getGuildVanityURL: {
path: string;
};
getGuildWelcomeScreen: {
path: string;
};
modifyGuildWelcomeScreen: {
path: string;
method: "PATCH";
};
getGuildOnboarding: {
path: string;
};
modifyGuildOnboarding: {
path: string;
method: "PUT";
};
modifyCurrentUserVoiceState: {
path: string;
method: "PATCH";
};
modifyUserVoiceState: {
path: string;
method: "PATCH";
};
listScheduledEventsForGuild: {
path: string;
};
createGuildScheduledEvent: {
path: string;
method: "POST";
};
getGuildScheduledEvent: {
path: string;
};
modifyGuildScheduledEvent: {
path: string;
method: "PATCH";
};
deleteGuildScheduledEvent: {
path: string;
method: "DELETE";
};
getGuildScheduledEventUsers: {
path: string;
};
getGuildTemplate: {
path: string;
};
createGuildFromTemplate: {
path: string;
method: "POST";
};
getGuildTemplates: {
path: string;
};
createGuildTemplate: {
path: string;
method: "POST";
};
syncGuildTemplate: {
path: string;
method: "PUT";
};
modifyGuildTemplate: {
path: string;
method: "PATCH";
};
deleteGuildTemplate: {
path: string;
method: "DELETE";
};
}>;
channels: import("../core").TResourceConfig<{
getChannel: {
path: string;
};
modifyChannel: {
path: string;
method: "PATCH";
};
deleteChannel: {
path: string;
method: "DELETE";
};
getChannelMessages: {
path: string;
};
getChannelMessage: {
path: string;
};
createMessage: {
path: string;
method: "POST";
};
crosspostMessage: {
path: string;
method: "POST";
};
createReaction: {
path: string;
method: "PUT";
};
deleteOwnReaction: {
path: string;
method: "DELETE";
};
deleteUserReaction: {
path: string;
method: "DELETE";
};
getReactions: {
path: string;
};
deleteAllReactions: {
path: string;
method: "DELETE";
};
deleteAllReactionsForEmoji: {
path: string;
method: "DELETE";
};
editMessage: {
path: string;
method: "PATCH";
};
deleteMessage: {
path: string;
method: "DELETE";
};
bulkDeleteMessages: {
path: string;
method: "POST";
};
editChannelPermissions: {
path: string;
method: "PUT";
};
getChannelInvites: {
path: string;
};
createChannelInvite: {
path: string;
method: "POST";
};
deleteChannelPermission: {
path: string;
method: "DELETE";
};
followAnnouncementChannel: {
path: string;
method: "POST";
};
triggerTypingIndicator: {
path: string;
method: "POST";
};
getPinnedMessages: {
path: string;
};
pinMessage: {
path: string;
method: "PUT";
};
unpinMessage: {
path: string;
method: "DELETE";
};
groupDMAddRecipient: {
path: string;
method: "PUT";
};
groupDMRemoveRecipient: {
path: string;
method: "DELETE";
};
startThreadFromMessage: {
path: string;
method: "POST";
};
startThreadWithoutMessage: {
path: string;
method: "POST";
};
startThreadInForumOrMediaChannel: {
path: string;
method: "POST";
};
joinThread: {
path: string;
method: "PUT";
};
addThreadMember: {
path: string;
method: "PUT";
};
leaveThread: {
path: string;
method: "DELETE";
};
removeThreadMember: {
path: string;
method: "DELETE";
};
getThreadMember: {
path: string;
};
listThreadMembers: {
path: string;
};
listPublicArchivedThreads: {
path: string;
};
listPrivateArchivedThreads: {
path: string;
};
listJoinedPrivateArchivedThreads: {
path: string;
};
}>;
emojis: import("../core").TResourceConfig<{
listGuildEmojis: {
path: string;
};
getGuildEmoji: {
path: string;
};
createGuildEmoji: {
path: string;
method: "POST";
};
modifyGuildEmoji: {
path: string;
method: "PATCH";
};
deleteGuildEmoji: {
path: string;
method: "DELETE";
};
}>;
invites: import("../core").TResourceConfig<{
getInvite: {
path: string;
};
deleteInvite: {
path: string;
method: "DELETE";
};
}>;
voice: import("../core").TResourceConfig<{
listVoiceRegions: {
path: string;
};
}>;
webhooks: import("../core").TResourceConfig<{
createWebhook: {
path: string;
method: "POST";
};
getChannelWebhooks: {
path: string;
};
getGuildWebhooks: {
path: string;
};
getWebhook: {
path: string;
};
getWebhookWithToken: {
path: string;
};
modifyWebhook: {
path: string;
method: "PATCH";
};
modifyWebhookWithToken: {
path: string;
method: "PATCH";
};
deleteWebhook: {
path: string;
method: "DELETE";
};
deleteWebhookWithToken: {
path: string;
method: "DELETE";
};
executeWebhook: {
path: string;
method: "POST";
};
executeSlackCompatibleWebhook: {
path: string;
method: "POST";
};
executeGitHubCompatibleWebhook: {
path: string;
method: "POST";
};
getWebhookMessage: {
path: string;
};
editWebhookMessage: {
path: string;
method: "PATCH";
};
deleteWebhookMessage: {
path: string;
method: "DELETE";
};
}>;
applications: import("../core").TResourceConfig<{
getGlobalApplicationCommands: {
path: string;
};
createGlobalApplicationCommand: {
path: string;
method: "POST";
};
getGlobalApplicationCommand: {
path: string;
};
editGlobalApplicationCommand: {
path: string;
method: "PATCH";
};
deleteGlobalApplicationCommand: {
path: string;
method: "DELETE";
};
bulkOverwriteGlobalApplicationCommands: {
path: string;
method: "PUT";
};
getGuildApplicationCommands: {
path: string;
};
createGuildApplicationCommand: {
path: string;
method: "POST";
};
getGuildApplicationCommand: {
path: string;
};
editGuildApplicationCommand: {
path: string;
method: "PATCH";
};
deleteGuildApplicationCommand: {
path: string;
method: "DELETE";
};
bulkOverwriteGuildApplicationCommands: {
path: string;
method: "PUT";
};
getGuildApplicationCommandPermissions: {
path: string;
};
getApplicationCommandPermissions: {
path: string;
};
editApplicationCommandPermissions: {
path: string;
method: "PUT";
};
createInteractionResponse: {
path: string;
method: "POST";
};
getOriginalInteractionResponse: {
path: string;
};
editOriginalInteractionResponse: {
path: string;
method: "PATCH";
};
deleteOriginalInteractionResponse: {
path: string;
method: "DELETE";
};
createFollowupMessage: {
path: string;
method: "POST";
};
getFollowupMessage: {
path: string;
};
editFollowupMessage: {
path: string;
method: "PATCH";
};
deleteFollowupMessage: {
path: string;
method: "DELETE";
};
getCurrentApplication: {
path: string;
};
editCurrentApplication: {
path: string;
method: "PATCH";
};
}>;
auditLogs: import("../core").TResourceConfig<{
getGuildAuditLog: {
path: string;
};
}>;
autoModeration: import("../core").TResourceConfig<{
listAutoModerationRulesForGuild: {
path: string;
};
getAutoModerationRule: {
path: string;
};
createAutoModerationRule: {
path: string;
method: "POST";
};
modifyAutoModerationRule: {
path: string;
method: "PATCH";
};
deleteAutoModerationRule: {
path: string;
method: "DELETE";
};
}>;
stickers: import("../core").TResourceConfig<{
getSticker: {
path: string;
};
listStickerPacks: {
path: string;
};
listGuildStickers: {
path: string;
};
getGuildSticker: {
path: string;
};
createGuildSticker: {
path: string;
method: "POST";
};
modifyGuildSticker: {
path: string;
method: "PATCH";
};
deleteGuildSticker: {
path: string;
method: "DELETE";
};
}>;
stageInstances: import("../core").TResourceConfig<{
createStageInstance: {
path: string;
method: "POST";
};
getStageInstance: {
path: string;
};
modifyStageInstance: {
path: string;
method: "PATCH";
};
deleteStageInstance: {
path: string;
method: "DELETE";
};
}>;
};
type TDiscordModule = TModule<typeof resources> & {
getCurrentUser: () => Promise<any>;
getUser: (userId: string) => Promise<any>;
getGuild: (guildId: string) => Promise<any>;
getChannel: (channelId: string) => Promise<any>;
sendMessage: (channelId: string, content: string, options?: any) => Promise<any>;
sendEmbed: (channelId: string, embed: any, content?: string) => Promise<any>;
editMessage: (channelId: string, messageId: string, content: string, options?: any) => Promise<any>;
deleteMessage: (channelId: string, messageId: string) => Promise<any>;
getMessages: (channelId: string, limit?: number) => Promise<any>;
createChannel: (guildId: string, name: string, type?: number, options?: any) => Promise<any>;
deleteChannel: (channelId: string) => Promise<any>;
getGuildMembers: (guildId: string, limit?: number) => Promise<any>;
getGuildMember: (guildId: string, userId: string) => Promise<any>;
kickMember: (guildId: string, userId: string, reason?: string) => Promise<any>;
banMember: (guildId: string, userId: string, options?: any) => Promise<any>;
unbanMember: (guildId: string, userId: string) => Promise<any>;
addRole: (guildId: string, userId: string, roleId: string) => Promise<any>;
removeRole: (guildId: string, userId: string, roleId: string) => Promise<any>;
createRole: (guildId: string, name: string, options?: any) => Promise<any>;
deleteRole: (guildId: string, roleId: string) => Promise<any>;
createInvite: (channelId: string, options?: any) => Promise<any>;
getInvite: (inviteCode: string) => Promise<any>;
deleteInvite: (inviteCode: string) => Promise<any>;
createWebhook: (channelId: string, name: string, avatar?: string) => Promise<any>;
executeWebhook: (webhookId: string, webhookToken: string, content: any) => Promise<any>;
getGuildRoles: (guildId: string) => Promise<any>;
getGuildChannels: (guildId: string) => Promise<any>;
getGuildBans: (guildId: string) => Promise<any>;
getGuildInvites: (guildId: string) => Promise<any>;
getGuildEmojis: (guildId: string) => Promise<any>;
createGuildEmoji: (guildId: string, name: string, image: string, roles?: string[]) => Promise<any>;
deleteGuildEmoji: (guildId: string, emojiId: string) => Promise<any>;
getGuildAuditLog: (guildId: string, options?: any) => Promise<any>;
getCurrentUserGuilds: (limit?: number) => Promise<any>;
leaveGuild: (guildId: string) => Promise<any>;
createDM: (recipientId: string) => Promise<any>;
addReaction: (channelId: string, messageId: string, emoji: string) => Promise<any>;
removeReaction: (channelId: string, messageId: string, emoji: string) => Promise<any>;
getReactions: (channelId: string, messageId: string, emoji: string) => Promise<any>;
createThread: (channelId: string, name: string, options?: any) => Promise<any>;
joinThread: (threadId: string) => Promise<any>;
leaveThread: (threadId: string) => Promise<any>;
listThreadMembers: (threadId: string) => Promise<any>;
modifyCurrentUser: (options: any) => Promise<any>;
modifyGuild: (guildId: string, options: any) => Promise<any>;
modifyChannel: (channelId: string, options: any) => Promise<any>;
modifyGuildMember: (guildId: string, userId: string, options: any) => Promise<any>;
modifyGuildRole: (guildId: string, roleId: string, options: any) => Promise<any>;
triggerTyping: (channelId: string) => Promise<any>;
getPinnedMessages: (channelId: string) => Promise<any>;
pinMessage: (channelId: string, messageId: string) => Promise<any>;
unpinMessage: (channelId: string, messageId: string) => Promise<any>;
bulkDeleteMessages: (channelId: string, messageIds: string[]) => Promise<any>;
searchGuildMembers: (guildId: string, query: string, limit?: number) => Promise<any>;
getGuildPreview: (guildId: string) => Promise<any>;
getGuildVanityURL: (guildId: string) => Promise<any>;
getGuildWidgetSettings: (guildId: string) => Promise<any>;
getGuildWelcomeScreen: (guildId: string) => Promise<any>;
getVoiceRegions: () => Promise<any>;
createStageInstance: (channelId: string, topic: string, options?: any) => Promise<any>;
modifyStageInstance: (channelId: string, topic?: string, privacyLevel?: number) => Promise<any>;
deleteStageInstance: (channelId: string) => Promise<any>;
getStageInstance: (channelId: string) => Promise<any>;
};
export declare function Discord(config: {
token: string;
}): TDiscordModule;
export {};
//# sourceMappingURL=index.d.ts.map