diff options
author | Puyodead1 <puyodead@proton.me> | 2023-03-24 21:53:59 -0400 |
---|---|---|
committer | Puyodead1 <puyodead@proton.me> | 2023-04-13 15:32:04 -0400 |
commit | 3fa2a954297df36d4c33186559c681d4967970b6 (patch) | |
tree | cd89fe6676ba4c009396f71a84ea9aadd013b70a /src/util | |
parent | oapi: oauth2 (diff) | |
download | server-3fa2a954297df36d4c33186559c681d4967970b6.tar.xz |
oapi: policies
Diffstat (limited to 'src/util')
6 files changed, 26 insertions, 2 deletions
diff --git a/src/util/config/types/subconfigurations/limits/RateLimits.ts b/src/util/config/types/subconfigurations/limits/RateLimits.ts index caba740b..0ce0827c 100644 --- a/src/util/config/types/subconfigurations/limits/RateLimits.ts +++ b/src/util/config/types/subconfigurations/limits/RateLimits.ts @@ -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, }; diff --git a/src/util/schemas/responses/GeneralConfigurationResponse.ts b/src/util/schemas/responses/GeneralConfigurationResponse.ts new file mode 100644 index 00000000..4feaa32d --- /dev/null +++ b/src/util/schemas/responses/GeneralConfigurationResponse.ts @@ -0,0 +1,3 @@ +import { GeneralConfiguration } from "../../config"; + +export type GeneralConfigurationResponse = GeneralConfiguration; diff --git a/src/util/schemas/responses/InstanceDomainsResponse.ts b/src/util/schemas/responses/InstanceDomainsResponse.ts new file mode 100644 index 00000000..60367492 --- /dev/null +++ b/src/util/schemas/responses/InstanceDomainsResponse.ts @@ -0,0 +1,6 @@ +export interface InstanceDomainsResponse { + cdn: string; + gateway: string; + defaultApiVersion: string; + apiEndpoint: string; +} diff --git a/src/util/schemas/responses/InstanceStatsResponse.ts b/src/util/schemas/responses/InstanceStatsResponse.ts new file mode 100644 index 00000000..d24fd434 --- /dev/null +++ b/src/util/schemas/responses/InstanceStatsResponse.ts @@ -0,0 +1,8 @@ +export interface InstanceStatsResponse { + counts: { + user: number; + guild: number; + message: number; + members: number; + }; +} diff --git a/src/util/schemas/responses/LimitsConfigurationResponse.ts b/src/util/schemas/responses/LimitsConfigurationResponse.ts new file mode 100644 index 00000000..f40ab918 --- /dev/null +++ b/src/util/schemas/responses/LimitsConfigurationResponse.ts @@ -0,0 +1,3 @@ +import { LimitsConfiguration } from "../../config"; + +export type LimitsConfigurationResponse = LimitsConfiguration; diff --git a/src/util/schemas/responses/index.ts b/src/util/schemas/responses/index.ts index c5e18406..1e4f30cb 100644 --- a/src/util/schemas/responses/index.ts +++ b/src/util/schemas/responses/index.ts @@ -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"; |