oapi: policies

This commit is contained in:
Puyodead1
2023-04-13 15:32:04 -04:00
parent 1b1fbce4d3
commit 3fa2a95429
12 changed files with 39295 additions and 48 deletions
@@ -16,11 +16,11 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { RouteRateLimit, RateLimitOptions } from ".";
import { RateLimitOptions, RouteRateLimit } from ".";
export class RateLimits {
enabled: boolean = false;
ip: Omit<RateLimitOptions, "bot_count"> = {
ip: RateLimitOptions = {
count: 500,
window: 5,
};
@@ -0,0 +1,3 @@
import { GeneralConfiguration } from "../../config";
export type GeneralConfigurationResponse = GeneralConfiguration;
@@ -0,0 +1,6 @@
export interface InstanceDomainsResponse {
cdn: string;
gateway: string;
defaultApiVersion: string;
apiEndpoint: string;
}
@@ -0,0 +1,8 @@
export interface InstanceStatsResponse {
counts: {
user: number;
guild: number;
message: number;
members: number;
};
}
@@ -0,0 +1,3 @@
import { LimitsConfiguration } from "../../config";
export type LimitsConfigurationResponse = LimitsConfiguration;
+4
View File
@@ -11,6 +11,7 @@ export * from "./ChannelPinsResponse";
export * from "./ChannelWebhooksResponse";
export * from "./GatewayBotResponse";
export * from "./GatewayResponse";
export * from "./GeneralConfigurationResponse";
export * from "./GenerateRegistrationTokensResponse";
export * from "./GuildBansResponse";
export * from "./GuildChannelsResponse";
@@ -29,6 +30,9 @@ export * from "./GuildVanityUrl";
export * from "./GuildVoiceRegionsResponse";
export * from "./GuildWidgetJsonResponse";
export * from "./GuildWidgetSettingsResponse";
export * from "./InstanceDomainsResponse";
export * from "./InstanceStatsResponse";
export * from "./LimitsConfigurationResponse";
export * from "./LocationMetadataResponse";
export * from "./MemberJoinGuildResponse";
export * from "./OAuthAuthorizeResponse";