DWS Packages
Preparing search index...
@dws-std/elysia-ratelimit
rateLimitPlugin
Function rateLimitPlugin
rateLimitPlugin
(
store
?:
KvStore
,
)
:
Elysia
<
"rateLimitPlugin"
,
{
decorator
:
{}
;
derive
:
{}
;
resolve
:
{}
;
store
:
{}
}
,
{
error
:
{}
;
typebox
:
{}
}
,
{
macro
:
Partial
<
{
rateLimit
:
RateLimitMacroOptions
}
>
;
macroFn
:
{
rateLimit
:
(
options
:
RateLimitMacroOptions
,
)
=>
{
transform
:
(
__namedParameters
:
{
request
:
Request
;
server
:
Server
<
unknown
>
|
null
;
set
:
{
headers
:
HTTPHeaders
;
status
?:
|
number
|
"Continue"
|
"Switching Protocols"
|
"Processing"
|
"Early Hints"
|
"OK"
|
"Created"
|
"Accepted"
|
"Non-Authoritative Information"
|
"No Content"
|
"Reset Content"
|
"Partial Content"
|
"Multi-Status"
|
"Already Reported"
|
"Multiple Choices"
|
"Moved Permanently"
|
"Found"
|
"See Other"
|
"Not Modified"
|
"Temporary Redirect"
|
"Permanent Redirect"
|
"Bad Request"
|
"Unauthorized"
|
"Payment Required"
|
"Forbidden"
|
"Not Found"
|
"Method Not Allowed"
|
"Not Acceptable"
|
"Proxy Authentication Required"
|
"Request Timeout"
|
"Conflict"
|
"Gone"
|
"Length Required"
|
"Precondition Failed"
|
"Payload Too Large"
|
"URI Too Long"
|
"Unsupported Media Type"
|
"Range Not Satisfiable"
|
"Expectation Failed"
|
"I'm a teapot"
|
"Enhance Your Calm"
|
"Misdirected Request"
|
"Unprocessable Content"
|
"Locked"
|
"Failed Dependency"
|
"Too Early"
|
"Upgrade Required"
|
"Precondition Required"
|
"Too Many Requests"
|
"Request Header Fields Too Large"
|
"Unavailable For Legal Reasons"
|
"Internal Server Error"
|
"Not Implemented"
|
"Bad Gateway"
|
"Service Unavailable"
|
"Gateway Timeout"
|
"HTTP Version Not Supported"
|
"Variant Also Negotiates"
|
"Insufficient Storage"
|
"Loop Detected"
|
"Not Extended"
|
"Network Authentication Required"
;
}
;
}
,
)
=>
Promise
<
void
>
;
}
;
}
;
parser
:
{}
;
response
:
{}
;
schema
:
{}
;
standaloneSchema
:
{}
;
}
,
>
Parameters
store
:
KvStore
= ...
Returns
Elysia
<
"rateLimitPlugin"
,
{
decorator
:
{}
;
derive
:
{}
;
resolve
:
{}
;
store
:
{}
}
,
{
error
:
{}
;
typebox
:
{}
}
,
{
macro
:
Partial
<
{
rateLimit
:
RateLimitMacroOptions
}
>
;
macroFn
:
{
rateLimit
:
(
options
:
RateLimitMacroOptions
,
)
=>
{
transform
:
(
__namedParameters
:
{
request
:
Request
;
server
:
Server
<
unknown
>
|
null
;
set
:
{
headers
:
HTTPHeaders
;
status
?:
|
number
|
"Continue"
|
"Switching Protocols"
|
"Processing"
|
"Early Hints"
|
"OK"
|
"Created"
|
"Accepted"
|
"Non-Authoritative Information"
|
"No Content"
|
"Reset Content"
|
"Partial Content"
|
"Multi-Status"
|
"Already Reported"
|
"Multiple Choices"
|
"Moved Permanently"
|
"Found"
|
"See Other"
|
"Not Modified"
|
"Temporary Redirect"
|
"Permanent Redirect"
|
"Bad Request"
|
"Unauthorized"
|
"Payment Required"
|
"Forbidden"
|
"Not Found"
|
"Method Not Allowed"
|
"Not Acceptable"
|
"Proxy Authentication Required"
|
"Request Timeout"
|
"Conflict"
|
"Gone"
|
"Length Required"
|
"Precondition Failed"
|
"Payload Too Large"
|
"URI Too Long"
|
"Unsupported Media Type"
|
"Range Not Satisfiable"
|
"Expectation Failed"
|
"I'm a teapot"
|
"Enhance Your Calm"
|
"Misdirected Request"
|
"Unprocessable Content"
|
"Locked"
|
"Failed Dependency"
|
"Too Early"
|
"Upgrade Required"
|
"Precondition Required"
|
"Too Many Requests"
|
"Request Header Fields Too Large"
|
"Unavailable For Legal Reasons"
|
"Internal Server Error"
|
"Not Implemented"
|
"Bad Gateway"
|
"Service Unavailable"
|
"Gateway Timeout"
|
"HTTP Version Not Supported"
|
"Variant Also Negotiates"
|
"Insufficient Storage"
|
"Loop Detected"
|
"Not Extended"
|
"Network Authentication Required"
;
}
;
}
,
)
=>
Promise
<
void
>
;
}
;
}
;
parser
:
{}
;
response
:
{}
;
schema
:
{}
;
standaloneSchema
:
{}
;
}
,
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
DWS Packages
Loading...