Skip to main content

Module: @sapphire/plugin-api

Namespaces

Enumerations

Classes

Interfaces

Type Aliases

AuthLessServerOptions

Ƭ AuthLessServerOptions: Omit<ServerOptions, "auth">

The ServerOptions without ServerOptions.auth.

Since

1.0.0

Defined in

projects/plugins/packages/api/src/lib/structures/http/Server.ts:233


ContentTypeParameter

Ƭ ContentTypeParameter: `; ${string}=${string}`

RFC 1341 4: Defines a Content-Type's parameter, which follows the following structure:

  • parameter = attribute "=" value
  • attribute = token
  • value = token / quoted-string
  • token = 1*<any CHAR except "SPACE", "CTLs", or "tspecials">
  • tspecials = ( | ) | < | > | @ | , | ; | : | \ | " | / | [ | ] | ? | . | =

@note tspecials must be in quoted-string, to use within parameter values. @note The definition of tspecials is the same as the RFC 822 definition of specials with the addition of the three characters /, ?, and =.

Since

1.3.0

Defined in

projects/plugins/packages/api/src/lib/structures/http/Server.ts:151


ContentTypeType

Ƭ ContentTypeType: "text" | "multipart" | "message" | "image" | "audio" | "video" | "application" | `X-${string}`

RFC 1341 4: Defines a Content-Type's type, which follows the following structure:

  • type = text | multipart | message | image | audio | video | application | x-token
  • x-token = The two characters "X-" followed, with no intervening white space, by any token

Since

1.3.0

Defined in

projects/plugins/packages/api/src/lib/structures/http/Server.ts:135


MatchData

Ƭ MatchData: Record<string, string> | null

Defined in

projects/plugins/packages/api/src/lib/utils/RouteData.ts:18


Methods

Ƭ Methods: "ACL" | "BIND" | "CHECKOUT" | "CONNECT" | "COPY" | "DELETE" | "GET" | "HEAD" | "LINK" | "LOCK" | "M-SEARCH" | "MERGE" | "MKACTIVITY" | "MKCALENDAR" | "MKCOL" | "MOVE" | "NOTIFY" | "OPTIONS" | "PATCH" | "POST" | "PRI" | "PROPFIND" | "PROPPATCH" | "PURGE" | "PUT" | "REBIND" | "REPORT" | "SEARCH" | "SOURCE" | "SUBSCRIBE" | "TRACE" | "UNBIND" | "UNLINK" | "UNLOCK" | "UNSUBSCRIBE"

Defined in

projects/plugins/packages/api/src/lib/structures/http/HttpMethods.ts:3


MimeType

Ƭ MimeType: `${MimeTypeWithoutParameters}${"" | ContentTypeParameter}`

RFC 1341 4: Defines the syntax for a Content-Type field, which follows the following structure: type "/" subtype *[";" parameter].

Since

1.3.0

Defined in

projects/plugins/packages/api/src/lib/structures/http/Server.ts:164


MimeTypeWithoutParameters

Ƭ MimeTypeWithoutParameters: `${ContentTypeType}/${string}`

RFC 1341 4: Defines the syntax for a Content-Type field without parameters, which follows the following structure: type "/" subtype.

Defined in

projects/plugins/packages/api/src/lib/structures/http/Server.ts:157

Variables

methodEntries

Const methodEntries: readonly [Methods, symbol][]

Defined in

projects/plugins/packages/api/src/lib/structures/http/HttpMethods.ts:41


methods

Const methods: Record<Methods, symbol>

Defined in

projects/plugins/packages/api/src/lib/structures/http/HttpMethods.ts:40


version

Const version: string = '[VI]{{inject}}[/VI]'

The @sapphire/plugin-api version that you are currently using. An example use of this is showing it of in a bot information command.

Note to Sapphire developers: This needs to explicitly be string so it is not typed as the string that gets replaced by esbuild

Defined in

projects/plugins/packages/api/src/index.ts:56

Functions

loadListeners

loadListeners(): void

Returns

void

Defined in

projects/plugins/packages/api/src/listeners/_load.ts:9


loadMediaParsers

loadMediaParsers(): void

Returns

void

Defined in

projects/plugins/packages/api/src/mediaParsers/_load.ts:6


loadMiddlewares

loadMiddlewares(): void

Returns

void

Defined in

projects/plugins/packages/api/src/middlewares/_load.ts:7


loadRoutes

loadRoutes(): void

Returns

void

Defined in

projects/plugins/packages/api/src/routes/_load.ts:5