fastify

  • Version 4.28.1
  • Published
  • 2.44 MB
  • 16 dependencies
  • MIT license

Install

npm i fastify
yarn add fastify
pnpm add fastify

Overview

Fast and low overhead web framework, for Node.js

Index

Variables

Functions

Interfaces

Type Aliases

Variables

variable errorCodes

const errorCodes: FastifyErrorCodes;

    variable fastify

    const fastify: typeof import('/fastify.d.ts');

      Functions

      function fastify

      fastify: typeof import('/fastify.d.ts');
      • Fastify factory function for the standard fastify http, https, or http2 server instance.

        The default function utilizes http

        Parameter opts

        Fastify server options

        Returns

        Fastify server instance

      Interfaces

      interface AddContentTypeParser

      interface AddContentTypeParser<
      RawServer extends RawServerBase = RawServerDefault,
      RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
      RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
      SchemaCompiler extends FastifySchema = FastifySchema,
      TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault
      > {}
      • Natively, Fastify only supports 'application/json' and 'text/plain' content types. The default charset is utf-8. If you need to support different content types, you can use the addContentTypeParser API. The default JSON and/or plain text parser can be changed.

      call signature

      (
      contentType: string | string[] | RegExp,
      opts: {
      bodyLimit?: number;
      },
      parser: FastifyContentTypeParser<
      RawServer,
      RawRequest,
      RouteGeneric,
      SchemaCompiler,
      TypeProvider
      >
      ): void;

        call signature

        (
        contentType: string | string[] | RegExp,
        parser: FastifyContentTypeParser<
        RawServer,
        RawRequest,
        RouteGeneric,
        SchemaCompiler,
        TypeProvider
        >
        ): void;

          call signature

          <parseAs extends string | Buffer>(
          contentType: string | string[] | RegExp,
          opts: {
          parseAs: parseAs extends Buffer ? 'buffer' : 'string';
          bodyLimit?: number;
          },
          parser: FastifyBodyParser<
          parseAs,
          RawServer,
          RawRequest,
          RouteGeneric,
          SchemaCompiler,
          TypeProvider
          >
          ): void;

            interface ConnectionError

            interface ConnectionError extends Error {}

              property bytesParsed

              bytesParsed: number;

                property code

                code: string;

                  property rawPacket

                  rawPacket: {
                  type: string;
                  data: number[];
                  };

                    interface DoneFuncWithErrOrRes

                    interface DoneFuncWithErrOrRes {}

                      call signature

                      (): void;

                        call signature

                        <TError extends Error = FastifyError>(err: TError): void;

                          call signature

                          (err: null, res: unknown): void;

                            interface FastifyBaseLogger

                            interface FastifyBaseLogger extends pino.BaseLogger {}

                              method child

                              child: (
                              bindings: pino.Bindings,
                              options?: pino.ChildLoggerOptions
                              ) => FastifyBaseLogger;

                                interface FastifyContextConfig

                                interface FastifyContextConfig {}

                                  interface FastifyContextConfig

                                  interface FastifyContextConfig {}

                                    property bar

                                    bar: number;

                                      property foo

                                      foo: string;

                                        interface FastifyInstance

                                        interface FastifyInstance<
                                        RawServer extends RawServerBase = RawServerDefault,
                                        RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                        RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                        Logger extends FastifyBaseLogger = FastifyBaseLogger,
                                        TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault
                                        > {}
                                        • Fastify server instance. Returned by the core fastify() method.

                                        property decorate

                                        decorate: DecorationMethod<
                                        FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>
                                        >;

                                          property decorateReply

                                          decorateReply: DecorationMethod<
                                          FastifyReply,
                                          FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>
                                          >;

                                            property decorateRequest

                                            decorateRequest: DecorationMethod<
                                            FastifyRequest,
                                            FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>
                                            >;

                                              property listeningOrigin

                                              listeningOrigin: string;

                                                property log

                                                log: Logger;

                                                  property pluginName

                                                  pluginName: string;

                                                    property prefix

                                                    prefix: string;

                                                      property register

                                                      register: FastifyRegister<
                                                      FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider> &
                                                      PromiseLike<undefined>
                                                      >;

                                                        property server

                                                        server: RawServer;

                                                          property version

                                                          version: string;

                                                            method [Symbol.asyncDispose]

                                                            [Symbol.asyncDispose]: () => Promise<undefined>;
                                                            • Alias for

                                                            method addConstraintStrategy

                                                            addConstraintStrategy: (
                                                            strategy: ConstraintStrategy<FindMyWayVersion<RawServer>, unknown>
                                                            ) => void;

                                                              method addresses

                                                              addresses: () => AddressInfo[];

                                                                method addSchema

                                                                addSchema: (
                                                                schema: unknown
                                                                ) => FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>;

                                                                  method after

                                                                  after: {
                                                                  (): FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider> &
                                                                  PromiseLike<undefined>;
                                                                  (afterListener: (err: Error) => void): FastifyInstance<
                                                                  RawServer,
                                                                  RawRequest,
                                                                  RawReply,
                                                                  Logger,
                                                                  TypeProvider
                                                                  >;
                                                                  };

                                                                    method close

                                                                    close: { (): Promise<undefined>; (closeListener: () => void): undefined };

                                                                      method getDefaultRoute

                                                                      getDefaultRoute: () => DefaultRoute<RawRequest, RawReply>;

                                                                        method getSchema

                                                                        getSchema: (schemaId: string) => unknown;

                                                                          method getSchemas

                                                                          getSchemas: () => Record<string, unknown>;

                                                                            method hasConstraintStrategy

                                                                            hasConstraintStrategy: (strategyName: string) => boolean;

                                                                              method hasDecorator

                                                                              hasDecorator: (decorator: string | symbol) => boolean;

                                                                                method hasPlugin

                                                                                hasPlugin: (name: string) => boolean;

                                                                                  method hasReplyDecorator

                                                                                  hasReplyDecorator: (decorator: string | symbol) => boolean;

                                                                                    method hasRequestDecorator

                                                                                    hasRequestDecorator: (decorator: string | symbol) => boolean;

                                                                                      method inject

                                                                                      inject: {
                                                                                      (opts: InjectOptions | string, cb: LightMyRequestCallback): void;
                                                                                      (opts: any): Promise<LightMyRequestResponse>;
                                                                                      (): LightMyRequestChain;
                                                                                      };

                                                                                        method listen

                                                                                        listen: {
                                                                                        (
                                                                                        opts: FastifyListenOptions,
                                                                                        callback: (err: Error | null, address: string) => void
                                                                                        ): void;
                                                                                        (opts?: FastifyListenOptions): Promise<string>;
                                                                                        (callback: (err: Error, address: string) => void): void;
                                                                                        (
                                                                                        port: string | number,
                                                                                        address: string,
                                                                                        backlog: number,
                                                                                        callback: (err: Error, address: string) => void
                                                                                        ): void;
                                                                                        (
                                                                                        port: string | number,
                                                                                        address: string,
                                                                                        callback: (err: Error, address: string) => void
                                                                                        ): void;
                                                                                        (
                                                                                        port: string | number,
                                                                                        callback: (err: Error, address: string) => void
                                                                                        ): void;
                                                                                        (port: string | number, address?: string, backlog?: number): Promise<string>;
                                                                                        };
                                                                                        • See Also

                                                                                          • https://github.com/fastify/fastify/pull/3712

                                                                                          Deprecated

                                                                                          Variadic listen method is deprecated. Please use .listen(optionsObject, callback) instead. The variadic signature will be removed in fastify@5

                                                                                        • See Also

                                                                                          • https://github.com/fastify/fastify/pull/3712

                                                                                          Deprecated

                                                                                          Variadic listen method is deprecated. Please use .listen(optionsObject) instead. The variadic signature will be removed in fastify@5

                                                                                        method ready

                                                                                        ready: {
                                                                                        (): FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider> &
                                                                                        PromiseLike<undefined>;
                                                                                        (readyListener: (err: Error) => void): FastifyInstance<
                                                                                        RawServer,
                                                                                        RawRequest,
                                                                                        RawReply,
                                                                                        Logger,
                                                                                        TypeProvider
                                                                                        >;
                                                                                        };

                                                                                          method route

                                                                                          route: <
                                                                                          RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                          ContextConfig = unknown
                                                                                          >() => any;

                                                                                            method routing

                                                                                            routing: (req: RawRequest, res: RawReply) => void;

                                                                                              method setDefaultRoute

                                                                                              setDefaultRoute: (defaultRoute: DefaultRoute<RawRequest, RawReply>) => void;

                                                                                                method withTypeProvider

                                                                                                withTypeProvider: <Provider extends FastifyTypeProvider>() => FastifyInstance<
                                                                                                RawServer,
                                                                                                RawRequest,
                                                                                                RawReply,
                                                                                                Logger,
                                                                                                Provider
                                                                                                >;

                                                                                                  interface FastifyInstance

                                                                                                  interface FastifyInstance {}

                                                                                                    property typedTestProperty

                                                                                                    typedTestProperty: boolean;

                                                                                                      property typedTestPropertyGetterSetter

                                                                                                      typedTestPropertyGetterSetter: string;

                                                                                                        method typedTestMethod

                                                                                                        typedTestMethod: (x: string) => string;

                                                                                                          interface FastifyListenOptions

                                                                                                          interface FastifyListenOptions {}

                                                                                                            property backlog

                                                                                                            backlog?: number;
                                                                                                            • Specify the maximum length of the queue of pending connections. The actual length will be determined by the OS through sysctl settings such as tcp_max_syn_backlog and somaxconn on Linux. Default to 511.

                                                                                                            property exclusive

                                                                                                            exclusive?: boolean;
                                                                                                            • Default to false.

                                                                                                            property host

                                                                                                            host?: string;
                                                                                                            • Default to localhost.

                                                                                                            property ipv6Only

                                                                                                            ipv6Only?: boolean;
                                                                                                            • For TCP servers, setting ipv6Only to true will disable dual-stack support, i.e., binding to host :: won't make 0.0.0.0 be bound. Default to false.

                                                                                                            property listenTextResolver

                                                                                                            listenTextResolver?: (address: string) => string;
                                                                                                            • Function that resolves text to log after server has been successfully started

                                                                                                              Parameter address

                                                                                                            property path

                                                                                                            path?: string;
                                                                                                            • Will be ignored if port is specified.

                                                                                                              See Also

                                                                                                              • [Identifying paths for IPC connections](https://nodejs.org/api/net.html#identifying-paths-for-ipc-connections).

                                                                                                            property port

                                                                                                            port?: number;
                                                                                                            • Default to 0 (picks the first available open port).

                                                                                                            property readableAll

                                                                                                            readableAll?: boolean;
                                                                                                            • For IPC servers makes the pipe readable for all users. Default to false.

                                                                                                            property signal

                                                                                                            signal?: AbortSignal;
                                                                                                            • An AbortSignal that may be used to close a listening server. This option is available only in Node.js v15.6.0 and greater

                                                                                                            property writableAll

                                                                                                            writableAll?: boolean;
                                                                                                            • For IPC servers makes the pipe writable for all users. Default to false.

                                                                                                            interface FastifyLoggerOptions

                                                                                                            interface FastifyLoggerOptions<
                                                                                                            RawServer extends RawServerBase = RawServerDefault,
                                                                                                            RawRequest extends FastifyRequest<
                                                                                                            RouteGenericInterface,
                                                                                                            RawServer,
                                                                                                            RawRequestDefaultExpression<RawServer>,
                                                                                                            FastifySchema,
                                                                                                            FastifyTypeProvider
                                                                                                            > = FastifyRequest<
                                                                                                            RouteGenericInterface,
                                                                                                            RawServer,
                                                                                                            RawRequestDefaultExpression<RawServer>,
                                                                                                            FastifySchema,
                                                                                                            FastifyTypeProviderDefault
                                                                                                            >,
                                                                                                            RawReply extends FastifyReply<
                                                                                                            RawServer,
                                                                                                            RawRequestDefaultExpression<RawServer>,
                                                                                                            RawReplyDefaultExpression<RawServer>,
                                                                                                            RouteGenericInterface,
                                                                                                            ContextConfigDefault,
                                                                                                            FastifySchema,
                                                                                                            FastifyTypeProvider
                                                                                                            > = FastifyReply<
                                                                                                            RawServer,
                                                                                                            RawRequestDefaultExpression<RawServer>,
                                                                                                            RawReplyDefaultExpression<RawServer>,
                                                                                                            RouteGenericInterface,
                                                                                                            ContextConfigDefault,
                                                                                                            FastifySchema,
                                                                                                            FastifyTypeProviderDefault
                                                                                                            >
                                                                                                            > {}
                                                                                                            • Fastify Custom Logger options.

                                                                                                            property file

                                                                                                            file?: string;

                                                                                                              property genReqId

                                                                                                              genReqId?: (req: RawRequest) => string;

                                                                                                                property level

                                                                                                                level?: string;

                                                                                                                  property serializers

                                                                                                                  serializers?: {
                                                                                                                  req?: (req: RawRequest) => {
                                                                                                                  method?: string;
                                                                                                                  url?: string;
                                                                                                                  version?: string;
                                                                                                                  hostname?: string;
                                                                                                                  remoteAddress?: string;
                                                                                                                  remotePort?: number;
                                                                                                                  [key: string]: unknown;
                                                                                                                  };
                                                                                                                  err?: (err: FastifyError) => {
                                                                                                                  type: string;
                                                                                                                  message: string;
                                                                                                                  stack: string;
                                                                                                                  [key: string]: unknown;
                                                                                                                  };
                                                                                                                  res?: (res: ResSerializerReply<RawServer, RawReply>) => {
                                                                                                                  statusCode?: string | number;
                                                                                                                  [key: string]: unknown;
                                                                                                                  };
                                                                                                                  };

                                                                                                                    property stream

                                                                                                                    stream?: FastifyLoggerStreamDestination;

                                                                                                                      interface FastifyRegister

                                                                                                                      interface FastifyRegister<
                                                                                                                      T = void,
                                                                                                                      RawServer extends RawServerBase = RawServerDefault,
                                                                                                                      TypeProviderDefault extends FastifyTypeProvider = FastifyTypeProvider,
                                                                                                                      LoggerDefault extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                      > {}
                                                                                                                      • FastifyRegister

                                                                                                                        Function for adding a plugin to fastify. The options are inferred from the passed in FastifyPlugin parameter.

                                                                                                                      call signature

                                                                                                                      <
                                                                                                                      Options extends FastifyPluginOptions,
                                                                                                                      Server extends RawServerBase = RawServer,
                                                                                                                      TypeProvider extends FastifyTypeProvider = TypeProviderDefault,
                                                                                                                      Logger extends FastifyBaseLogger = LoggerDefault
                                                                                                                      >(
                                                                                                                      plugin: FastifyPluginCallback<Options, Server, TypeProvider, Logger>,
                                                                                                                      opts?: FastifyRegisterOptions<Options>
                                                                                                                      ): T;

                                                                                                                        call signature

                                                                                                                        <
                                                                                                                        Options extends FastifyPluginOptions,
                                                                                                                        Server extends RawServerBase = RawServer,
                                                                                                                        TypeProvider extends FastifyTypeProvider = TypeProviderDefault,
                                                                                                                        Logger extends FastifyBaseLogger = LoggerDefault
                                                                                                                        >(
                                                                                                                        plugin: FastifyPluginAsync<Options, Server, TypeProvider, Logger>,
                                                                                                                        opts?: FastifyRegisterOptions<Options>
                                                                                                                        ): T;

                                                                                                                          call signature

                                                                                                                          <
                                                                                                                          Options extends FastifyPluginOptions,
                                                                                                                          Server extends RawServerBase = RawServer,
                                                                                                                          TypeProvider extends FastifyTypeProvider = TypeProviderDefault,
                                                                                                                          Logger extends FastifyBaseLogger = LoggerDefault
                                                                                                                          >(
                                                                                                                          plugin:
                                                                                                                          | FastifyPluginCallback<Options, Server, TypeProvider, Logger>
                                                                                                                          | FastifyPluginAsync<Options, Server, TypeProvider, Logger>
                                                                                                                          | Promise<{
                                                                                                                          default: FastifyPluginCallback<
                                                                                                                          Options,
                                                                                                                          Server,
                                                                                                                          TypeProvider,
                                                                                                                          Logger
                                                                                                                          >;
                                                                                                                          }>
                                                                                                                          | Promise<{
                                                                                                                          default: FastifyPluginAsync<Options, Server, TypeProvider, Logger>;
                                                                                                                          }>,
                                                                                                                          opts?: FastifyRegisterOptions<Options>
                                                                                                                          ): T;

                                                                                                                            interface FastifyReply

                                                                                                                            interface FastifyReply<
                                                                                                                            RawServer extends RawServerBase = RawServerDefault,
                                                                                                                            RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                            RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                            RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                            ContextConfig = ContextConfigDefault,
                                                                                                                            SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                            TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                            ReplyType extends FastifyReplyType = ResolveFastifyReplyType<
                                                                                                                            TypeProvider,
                                                                                                                            SchemaCompiler,
                                                                                                                            RouteGeneric
                                                                                                                            >
                                                                                                                            > {}
                                                                                                                            • FastifyReply is an instance of the standard http or http2 reply types. It defaults to http.ServerResponse, and it also extends the relative reply object.

                                                                                                                            property context

                                                                                                                            context: FastifyReplyContext<ContextConfig>;

                                                                                                                              property elapsedTime

                                                                                                                              elapsedTime: number;

                                                                                                                                property log

                                                                                                                                log: FastifyBaseLogger;

                                                                                                                                  property raw

                                                                                                                                  raw: RawReply;

                                                                                                                                    property request

                                                                                                                                    request: FastifyRequest<
                                                                                                                                    RouteGeneric,
                                                                                                                                    RawServer,
                                                                                                                                    RawRequest,
                                                                                                                                    SchemaCompiler,
                                                                                                                                    TypeProvider
                                                                                                                                    >;

                                                                                                                                      property sent

                                                                                                                                      sent: boolean;

                                                                                                                                        property server

                                                                                                                                        server: FastifyInstance;

                                                                                                                                          property statusCode

                                                                                                                                          statusCode: number;

                                                                                                                                            property trailer

                                                                                                                                            trailer: (
                                                                                                                                            key: string,
                                                                                                                                            fn:
                                                                                                                                            | ((
                                                                                                                                            reply: FastifyReply<
                                                                                                                                            RawServer,
                                                                                                                                            RawRequest,
                                                                                                                                            RawReply,
                                                                                                                                            RouteGeneric,
                                                                                                                                            ContextConfig,
                                                                                                                                            SchemaCompiler,
                                                                                                                                            TypeProvider
                                                                                                                                            >,
                                                                                                                                            payload: string | Buffer | null
                                                                                                                                            ) => Promise<string>)
                                                                                                                                            | ((
                                                                                                                                            reply: FastifyReply<
                                                                                                                                            RawServer,
                                                                                                                                            RawRequest,
                                                                                                                                            RawReply,
                                                                                                                                            RouteGeneric,
                                                                                                                                            ContextConfig,
                                                                                                                                            SchemaCompiler,
                                                                                                                                            TypeProvider
                                                                                                                                            >,
                                                                                                                                            payload: string | Buffer | null,
                                                                                                                                            done: (err: Error | null, value?: string) => void
                                                                                                                                            ) => void)
                                                                                                                                            ) => FastifyReply<
                                                                                                                                            RawServer,
                                                                                                                                            RawRequest,
                                                                                                                                            RawReply,
                                                                                                                                            RouteGeneric,
                                                                                                                                            ContextConfig,
                                                                                                                                            SchemaCompiler,
                                                                                                                                            TypeProvider
                                                                                                                                            >;

                                                                                                                                              method callNotFound

                                                                                                                                              callNotFound: () => void;

                                                                                                                                                method code

                                                                                                                                                code: <Code extends ReplyKeysToCodes<keyof RouteGeneric['Reply']>>(
                                                                                                                                                statusCode: Code
                                                                                                                                                ) => FastifyReply<
                                                                                                                                                RawServer,
                                                                                                                                                RawRequest,
                                                                                                                                                RawReply,
                                                                                                                                                RouteGeneric,
                                                                                                                                                ContextConfig,
                                                                                                                                                SchemaCompiler,
                                                                                                                                                TypeProvider,
                                                                                                                                                ResolveReplyTypeWithRouteGeneric<
                                                                                                                                                RouteGeneric['Reply'],
                                                                                                                                                Code,
                                                                                                                                                SchemaCompiler,
                                                                                                                                                TypeProvider
                                                                                                                                                >
                                                                                                                                                >;

                                                                                                                                                  method compileSerializationSchema

                                                                                                                                                  compileSerializationSchema: (
                                                                                                                                                  schema: { [key: string]: unknown },
                                                                                                                                                  httpStatus?: string,
                                                                                                                                                  contentType?: string
                                                                                                                                                  ) => (payload: { [key: string]: unknown }) => string;

                                                                                                                                                    method getHeader

                                                                                                                                                    getHeader: (key: HttpHeader) => number | string | string[] | undefined;

                                                                                                                                                      method getHeaders

                                                                                                                                                      getHeaders: () => Record<HttpHeader, number | string | string[] | undefined>;

                                                                                                                                                        method getResponseTime

                                                                                                                                                        getResponseTime: () => number;
                                                                                                                                                        • Deprecated

                                                                                                                                                          Use the Reply#elapsedTime property instead

                                                                                                                                                        method getSerializationFunction

                                                                                                                                                        getSerializationFunction: {
                                                                                                                                                        (httpStatus: string, contentType?: string): (payload: {
                                                                                                                                                        [key: string]: unknown;
                                                                                                                                                        }) => string;
                                                                                                                                                        (schema: { [key: string]: unknown }): (payload: {
                                                                                                                                                        [key: string]: unknown;
                                                                                                                                                        }) => string;
                                                                                                                                                        };

                                                                                                                                                          method hasHeader

                                                                                                                                                          hasHeader: (key: HttpHeader) => boolean;

                                                                                                                                                            method hasTrailer

                                                                                                                                                            hasTrailer: (key: string) => boolean;

                                                                                                                                                              method header

                                                                                                                                                              header: (
                                                                                                                                                              key: HttpHeader,
                                                                                                                                                              value: any
                                                                                                                                                              ) => FastifyReply<
                                                                                                                                                              RawServer,
                                                                                                                                                              RawRequest,
                                                                                                                                                              RawReply,
                                                                                                                                                              RouteGeneric,
                                                                                                                                                              ContextConfig,
                                                                                                                                                              SchemaCompiler,
                                                                                                                                                              TypeProvider
                                                                                                                                                              >;

                                                                                                                                                                method headers

                                                                                                                                                                headers: (
                                                                                                                                                                values: Partial<Record<HttpHeader, number | string | string[] | undefined>>
                                                                                                                                                                ) => FastifyReply<
                                                                                                                                                                RawServer,
                                                                                                                                                                RawRequest,
                                                                                                                                                                RawReply,
                                                                                                                                                                RouteGeneric,
                                                                                                                                                                ContextConfig,
                                                                                                                                                                SchemaCompiler,
                                                                                                                                                                TypeProvider
                                                                                                                                                                >;

                                                                                                                                                                  method hijack

                                                                                                                                                                  hijack: () => FastifyReply<
                                                                                                                                                                  RawServer,
                                                                                                                                                                  RawRequest,
                                                                                                                                                                  RawReply,
                                                                                                                                                                  RouteGeneric,
                                                                                                                                                                  ContextConfig,
                                                                                                                                                                  SchemaCompiler,
                                                                                                                                                                  TypeProvider
                                                                                                                                                                  >;

                                                                                                                                                                    method redirect

                                                                                                                                                                    redirect: {
                                                                                                                                                                    (statusCode: number, url: string): FastifyReply<
                                                                                                                                                                    RawServer,
                                                                                                                                                                    RawRequest,
                                                                                                                                                                    RawReply,
                                                                                                                                                                    RouteGeneric,
                                                                                                                                                                    ContextConfig,
                                                                                                                                                                    SchemaCompiler,
                                                                                                                                                                    TypeProvider
                                                                                                                                                                    >;
                                                                                                                                                                    (url: string, statusCode?: number): FastifyReply<
                                                                                                                                                                    RawServer,
                                                                                                                                                                    RawRequest,
                                                                                                                                                                    RawReply,
                                                                                                                                                                    RouteGeneric,
                                                                                                                                                                    ContextConfig,
                                                                                                                                                                    SchemaCompiler,
                                                                                                                                                                    TypeProvider,
                                                                                                                                                                    UndefinedToUnknown<
                                                                                                                                                                    KeysOf<RouteGeneric['Reply']> extends never
                                                                                                                                                                    ? ResolveReplyFromSchemaCompiler<TypeProvider, SchemaCompiler>
                                                                                                                                                                    : RouteGeneric['Reply']
                                                                                                                                                                    >
                                                                                                                                                                    >;
                                                                                                                                                                    };
                                                                                                                                                                    • Deprecated

                                                                                                                                                                      The reply.redirect() method has a new signature: reply.reply.redirect(url: string, code?: number). It will be enforced in fastify@v5'.

                                                                                                                                                                    method removeHeader

                                                                                                                                                                    removeHeader: (
                                                                                                                                                                    key: HttpHeader
                                                                                                                                                                    ) => FastifyReply<
                                                                                                                                                                    RawServer,
                                                                                                                                                                    RawRequest,
                                                                                                                                                                    RawReply,
                                                                                                                                                                    RouteGeneric,
                                                                                                                                                                    ContextConfig,
                                                                                                                                                                    SchemaCompiler,
                                                                                                                                                                    TypeProvider
                                                                                                                                                                    >;

                                                                                                                                                                      method removeTrailer

                                                                                                                                                                      removeTrailer: (
                                                                                                                                                                      key: string
                                                                                                                                                                      ) => FastifyReply<
                                                                                                                                                                      RawServer,
                                                                                                                                                                      RawRequest,
                                                                                                                                                                      RawReply,
                                                                                                                                                                      RouteGeneric,
                                                                                                                                                                      ContextConfig,
                                                                                                                                                                      SchemaCompiler,
                                                                                                                                                                      TypeProvider
                                                                                                                                                                      >;

                                                                                                                                                                        method send

                                                                                                                                                                        send: (
                                                                                                                                                                        payload?: ReplyType
                                                                                                                                                                        ) => FastifyReply<
                                                                                                                                                                        RawServer,
                                                                                                                                                                        RawRequest,
                                                                                                                                                                        RawReply,
                                                                                                                                                                        RouteGeneric,
                                                                                                                                                                        ContextConfig,
                                                                                                                                                                        SchemaCompiler,
                                                                                                                                                                        TypeProvider
                                                                                                                                                                        >;

                                                                                                                                                                          method serialize

                                                                                                                                                                          serialize: (payload: any) => string | ArrayBuffer | Buffer;

                                                                                                                                                                            method serializeInput

                                                                                                                                                                            serializeInput: {
                                                                                                                                                                            (
                                                                                                                                                                            input: { [key: string]: unknown },
                                                                                                                                                                            schema: { [key: string]: unknown },
                                                                                                                                                                            httpStatus?: string,
                                                                                                                                                                            contentType?: string
                                                                                                                                                                            ): string;
                                                                                                                                                                            (
                                                                                                                                                                            input: { [key: string]: unknown },
                                                                                                                                                                            httpStatus: string,
                                                                                                                                                                            contentType?: string
                                                                                                                                                                            ): unknown;
                                                                                                                                                                            };

                                                                                                                                                                              method serializer

                                                                                                                                                                              serializer: (
                                                                                                                                                                              fn: (payload: any) => string
                                                                                                                                                                              ) => FastifyReply<
                                                                                                                                                                              RawServer,
                                                                                                                                                                              RawRequest,
                                                                                                                                                                              RawReply,
                                                                                                                                                                              RouteGeneric,
                                                                                                                                                                              ContextConfig,
                                                                                                                                                                              SchemaCompiler,
                                                                                                                                                                              TypeProvider
                                                                                                                                                                              >;

                                                                                                                                                                                method status

                                                                                                                                                                                status: <Code extends ReplyKeysToCodes<keyof RouteGeneric['Reply']>>(
                                                                                                                                                                                statusCode: Code
                                                                                                                                                                                ) => FastifyReply<
                                                                                                                                                                                RawServer,
                                                                                                                                                                                RawRequest,
                                                                                                                                                                                RawReply,
                                                                                                                                                                                RouteGeneric,
                                                                                                                                                                                ContextConfig,
                                                                                                                                                                                SchemaCompiler,
                                                                                                                                                                                TypeProvider,
                                                                                                                                                                                ResolveReplyTypeWithRouteGeneric<
                                                                                                                                                                                RouteGeneric['Reply'],
                                                                                                                                                                                Code,
                                                                                                                                                                                SchemaCompiler,
                                                                                                                                                                                TypeProvider
                                                                                                                                                                                >
                                                                                                                                                                                >;

                                                                                                                                                                                  method then

                                                                                                                                                                                  then: (fulfilled: () => void, rejected: (err: Error) => void) => void;

                                                                                                                                                                                    method type

                                                                                                                                                                                    type: (
                                                                                                                                                                                    contentType: string
                                                                                                                                                                                    ) => FastifyReply<
                                                                                                                                                                                    RawServer,
                                                                                                                                                                                    RawRequest,
                                                                                                                                                                                    RawReply,
                                                                                                                                                                                    RouteGeneric,
                                                                                                                                                                                    ContextConfig,
                                                                                                                                                                                    SchemaCompiler,
                                                                                                                                                                                    TypeProvider
                                                                                                                                                                                    >;

                                                                                                                                                                                      interface FastifyReply

                                                                                                                                                                                      interface FastifyReply {}

                                                                                                                                                                                        property testProp

                                                                                                                                                                                        testProp: TestType;

                                                                                                                                                                                          interface FastifyReply

                                                                                                                                                                                          interface FastifyReply {}

                                                                                                                                                                                            property typedTestReplyProperty

                                                                                                                                                                                            typedTestReplyProperty: boolean;

                                                                                                                                                                                              property typedTestReplyPropertyGetterSetter

                                                                                                                                                                                              typedTestReplyPropertyGetterSetter: string;

                                                                                                                                                                                                method typedTestReplyMethod

                                                                                                                                                                                                typedTestReplyMethod: (x: string) => string;

                                                                                                                                                                                                  interface FastifyReplyContext

                                                                                                                                                                                                  interface FastifyReplyContext<ContextConfig = ContextConfigDefault> {}

                                                                                                                                                                                                    property config

                                                                                                                                                                                                    config: FastifyContextConfig & FastifyRouteConfig & ContextConfig;
                                                                                                                                                                                                    • Deprecated

                                                                                                                                                                                                      Use Reply#routeOptions#config or Reply#routeOptions#schema instead

                                                                                                                                                                                                    interface FastifyRequest

                                                                                                                                                                                                    interface FastifyRequest<
                                                                                                                                                                                                    RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                    RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                    RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                    SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                    TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                    ContextConfig = ContextConfigDefault,
                                                                                                                                                                                                    Logger extends FastifyBaseLogger = FastifyBaseLogger,
                                                                                                                                                                                                    RequestType extends FastifyRequestType = ResolveFastifyRequestType<
                                                                                                                                                                                                    TypeProvider,
                                                                                                                                                                                                    SchemaCompiler,
                                                                                                                                                                                                    RouteGeneric
                                                                                                                                                                                                    >
                                                                                                                                                                                                    > {}
                                                                                                                                                                                                    • FastifyRequest is an instance of the standard http or http2 request objects. It defaults to http.IncomingMessage, and it also extends the relative request object.

                                                                                                                                                                                                    property body

                                                                                                                                                                                                    body: RequestType['body'];

                                                                                                                                                                                                      property connection

                                                                                                                                                                                                      readonly connection: RawRequest['socket'];

                                                                                                                                                                                                        property context

                                                                                                                                                                                                        context: FastifyRequestContext<ContextConfig>;

                                                                                                                                                                                                          property headers

                                                                                                                                                                                                          headers: RawRequest['headers'] & RequestType['headers'];

                                                                                                                                                                                                            property hostname

                                                                                                                                                                                                            readonly hostname: string;

                                                                                                                                                                                                              property id

                                                                                                                                                                                                              id: string;

                                                                                                                                                                                                                property ip

                                                                                                                                                                                                                readonly ip: string;

                                                                                                                                                                                                                  property ips

                                                                                                                                                                                                                  readonly ips?: string[];

                                                                                                                                                                                                                    property is404

                                                                                                                                                                                                                    readonly is404: boolean;

                                                                                                                                                                                                                      property log

                                                                                                                                                                                                                      log: Logger;

                                                                                                                                                                                                                        property method

                                                                                                                                                                                                                        readonly method: string;

                                                                                                                                                                                                                          property originalUrl

                                                                                                                                                                                                                          readonly originalUrl: string;

                                                                                                                                                                                                                            property params

                                                                                                                                                                                                                            params: RequestType['params'];

                                                                                                                                                                                                                              property protocol

                                                                                                                                                                                                                              readonly protocol: 'http' | 'https';

                                                                                                                                                                                                                                property query

                                                                                                                                                                                                                                query: RequestType['query'];

                                                                                                                                                                                                                                  property raw

                                                                                                                                                                                                                                  raw: RawRequest;

                                                                                                                                                                                                                                    property req

                                                                                                                                                                                                                                    readonly req: RawRequest & RouteGeneric['Headers'];
                                                                                                                                                                                                                                    • Deprecated

                                                                                                                                                                                                                                      Use raw property

                                                                                                                                                                                                                                    property routeConfig

                                                                                                                                                                                                                                    routeConfig: FastifyRequestContext<ContextConfig>['config'];

                                                                                                                                                                                                                                      property routeOptions

                                                                                                                                                                                                                                      readonly routeOptions: Readonly<
                                                                                                                                                                                                                                      RequestRouteOptions<ContextConfig, SchemaCompiler>
                                                                                                                                                                                                                                      >;

                                                                                                                                                                                                                                        property routerMethod

                                                                                                                                                                                                                                        readonly routerMethod: string;

                                                                                                                                                                                                                                          property routerPath

                                                                                                                                                                                                                                          readonly routerPath: string;

                                                                                                                                                                                                                                            property routeSchema

                                                                                                                                                                                                                                            routeSchema?: FastifySchema;

                                                                                                                                                                                                                                              property server

                                                                                                                                                                                                                                              server: FastifyInstance;

                                                                                                                                                                                                                                                property socket

                                                                                                                                                                                                                                                readonly socket: RawRequest['socket'];

                                                                                                                                                                                                                                                  property url

                                                                                                                                                                                                                                                  readonly url: string;

                                                                                                                                                                                                                                                    property validationError

                                                                                                                                                                                                                                                    validationError?: Error & { validation: any; validationContext: string };
                                                                                                                                                                                                                                                    • in order for this to be used the user should ensure they have set the attachValidation option.

                                                                                                                                                                                                                                                    method compileValidationSchema

                                                                                                                                                                                                                                                    compileValidationSchema: (
                                                                                                                                                                                                                                                    schema: { [key: string]: any },
                                                                                                                                                                                                                                                    httpPart?: HTTPRequestPart
                                                                                                                                                                                                                                                    ) => ValidationFunction;

                                                                                                                                                                                                                                                      method getValidationFunction

                                                                                                                                                                                                                                                      getValidationFunction: {
                                                                                                                                                                                                                                                      (httpPart: HTTPRequestPart): ValidationFunction;
                                                                                                                                                                                                                                                      (schema: { [key: string]: any }): ValidationFunction;
                                                                                                                                                                                                                                                      };

                                                                                                                                                                                                                                                        method validateInput

                                                                                                                                                                                                                                                        validateInput: {
                                                                                                                                                                                                                                                        (
                                                                                                                                                                                                                                                        input: any,
                                                                                                                                                                                                                                                        schema: { [key: string]: any },
                                                                                                                                                                                                                                                        httpPart?: HTTPRequestPart
                                                                                                                                                                                                                                                        ): boolean;
                                                                                                                                                                                                                                                        (input: any, httpPart?: HTTPRequestPart): boolean;
                                                                                                                                                                                                                                                        };

                                                                                                                                                                                                                                                          interface FastifyRequest

                                                                                                                                                                                                                                                          interface FastifyRequest {}

                                                                                                                                                                                                                                                            property testProp

                                                                                                                                                                                                                                                            testProp: TestType;

                                                                                                                                                                                                                                                              interface FastifyRequest

                                                                                                                                                                                                                                                              interface FastifyRequest {}

                                                                                                                                                                                                                                                                property typedTestRequestProperty

                                                                                                                                                                                                                                                                typedTestRequestProperty: boolean;

                                                                                                                                                                                                                                                                  property typedTestRequestPropertyGetterSetter

                                                                                                                                                                                                                                                                  typedTestRequestPropertyGetterSetter: string;

                                                                                                                                                                                                                                                                    method typedTestRequestMethod

                                                                                                                                                                                                                                                                    typedTestRequestMethod: (x: string) => string;

                                                                                                                                                                                                                                                                      interface FastifyRequestContext

                                                                                                                                                                                                                                                                      interface FastifyRequestContext<ContextConfig = ContextConfigDefault> {}
                                                                                                                                                                                                                                                                      • Route context object. Properties defined here will be available in the route's handler

                                                                                                                                                                                                                                                                      property config

                                                                                                                                                                                                                                                                      config: FastifyContextConfig & FastifyRouteConfig & ContextConfig;
                                                                                                                                                                                                                                                                      • Deprecated

                                                                                                                                                                                                                                                                        Use Request#routeOptions#config or Request#routeOptions#schema instead

                                                                                                                                                                                                                                                                      interface FastifySchema

                                                                                                                                                                                                                                                                      interface FastifySchema {}
                                                                                                                                                                                                                                                                      • Schemas in Fastify follow the JSON-Schema standard. For this reason we have opted to not ship strict schema based types. Instead we provide an example in our documentation on how to solve this problem. Check it out here: https://github.com/fastify/fastify/blob/main/docs/Reference/TypeScript.md#json-schema

                                                                                                                                                                                                                                                                      property body

                                                                                                                                                                                                                                                                      body?: unknown;

                                                                                                                                                                                                                                                                        property headers

                                                                                                                                                                                                                                                                        headers?: unknown;

                                                                                                                                                                                                                                                                          property params

                                                                                                                                                                                                                                                                          params?: unknown;

                                                                                                                                                                                                                                                                            property querystring

                                                                                                                                                                                                                                                                            querystring?: unknown;

                                                                                                                                                                                                                                                                              property response

                                                                                                                                                                                                                                                                              response?: unknown;

                                                                                                                                                                                                                                                                                interface FastifyServerFactory

                                                                                                                                                                                                                                                                                interface FastifyServerFactory<RawServer extends RawServerBase = RawServerDefault> {}

                                                                                                                                                                                                                                                                                  call signature

                                                                                                                                                                                                                                                                                  (
                                                                                                                                                                                                                                                                                  handler: FastifyServerFactoryHandler<RawServer>,
                                                                                                                                                                                                                                                                                  opts: Record<string, unknown>
                                                                                                                                                                                                                                                                                  ): RawServer;

                                                                                                                                                                                                                                                                                    interface FastifyTypeProvider

                                                                                                                                                                                                                                                                                    interface FastifyTypeProvider {}

                                                                                                                                                                                                                                                                                      property input

                                                                                                                                                                                                                                                                                      readonly input: unknown;

                                                                                                                                                                                                                                                                                        property output

                                                                                                                                                                                                                                                                                        readonly output: unknown;

                                                                                                                                                                                                                                                                                          interface FastifyTypeProviderDefault

                                                                                                                                                                                                                                                                                          interface FastifyTypeProviderDefault extends FastifyTypeProvider {}

                                                                                                                                                                                                                                                                                            interface onCloseAsyncHookHandler

                                                                                                                                                                                                                                                                                            interface onCloseAsyncHookHandler<
                                                                                                                                                                                                                                                                                            RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                            RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                            RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                            Logger extends FastifyBaseLogger = FastifyBaseLogger,
                                                                                                                                                                                                                                                                                            TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault
                                                                                                                                                                                                                                                                                            > {}

                                                                                                                                                                                                                                                                                              call signature

                                                                                                                                                                                                                                                                                              (
                                                                                                                                                                                                                                                                                              instance: FastifyInstance<
                                                                                                                                                                                                                                                                                              RawServer,
                                                                                                                                                                                                                                                                                              RawRequest,
                                                                                                                                                                                                                                                                                              RawReply,
                                                                                                                                                                                                                                                                                              Logger,
                                                                                                                                                                                                                                                                                              TypeProvider
                                                                                                                                                                                                                                                                                              >
                                                                                                                                                                                                                                                                                              ): Promise<unknown>;

                                                                                                                                                                                                                                                                                                interface onCloseHookHandler

                                                                                                                                                                                                                                                                                                interface onCloseHookHandler<
                                                                                                                                                                                                                                                                                                RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                Logger extends FastifyBaseLogger = FastifyBaseLogger,
                                                                                                                                                                                                                                                                                                TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault
                                                                                                                                                                                                                                                                                                > {}
                                                                                                                                                                                                                                                                                                • Triggered when fastify.close() is invoked to stop the server. It is useful when plugins need a "shutdown" event, for example to close an open connection to a database.

                                                                                                                                                                                                                                                                                                call signature

                                                                                                                                                                                                                                                                                                (
                                                                                                                                                                                                                                                                                                instance: FastifyInstance<
                                                                                                                                                                                                                                                                                                RawServer,
                                                                                                                                                                                                                                                                                                RawRequest,
                                                                                                                                                                                                                                                                                                RawReply,
                                                                                                                                                                                                                                                                                                Logger,
                                                                                                                                                                                                                                                                                                TypeProvider
                                                                                                                                                                                                                                                                                                >,
                                                                                                                                                                                                                                                                                                done: HookHandlerDoneFunction
                                                                                                                                                                                                                                                                                                ): void;

                                                                                                                                                                                                                                                                                                  interface onErrorAsyncHookHandler

                                                                                                                                                                                                                                                                                                  interface onErrorAsyncHookHandler<
                                                                                                                                                                                                                                                                                                  RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                  RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                  RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                  RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                                                                                                                  ContextConfig = ContextConfigDefault,
                                                                                                                                                                                                                                                                                                  TError extends Error = FastifyError,
                                                                                                                                                                                                                                                                                                  SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                                                                                                                  TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                  Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                  > {}

                                                                                                                                                                                                                                                                                                    call signature

                                                                                                                                                                                                                                                                                                    (
                                                                                                                                                                                                                                                                                                    this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>,
                                                                                                                                                                                                                                                                                                    request: FastifyRequest<
                                                                                                                                                                                                                                                                                                    RouteGeneric,
                                                                                                                                                                                                                                                                                                    RawServer,
                                                                                                                                                                                                                                                                                                    RawRequest,
                                                                                                                                                                                                                                                                                                    SchemaCompiler,
                                                                                                                                                                                                                                                                                                    TypeProvider,
                                                                                                                                                                                                                                                                                                    ContextConfig,
                                                                                                                                                                                                                                                                                                    Logger
                                                                                                                                                                                                                                                                                                    >,
                                                                                                                                                                                                                                                                                                    reply: FastifyReply<
                                                                                                                                                                                                                                                                                                    RawServer,
                                                                                                                                                                                                                                                                                                    RawRequest,
                                                                                                                                                                                                                                                                                                    RawReply,
                                                                                                                                                                                                                                                                                                    RouteGeneric,
                                                                                                                                                                                                                                                                                                    ContextConfig,
                                                                                                                                                                                                                                                                                                    SchemaCompiler,
                                                                                                                                                                                                                                                                                                    TypeProvider
                                                                                                                                                                                                                                                                                                    >,
                                                                                                                                                                                                                                                                                                    error: TError
                                                                                                                                                                                                                                                                                                    ): Promise<unknown>;

                                                                                                                                                                                                                                                                                                      interface onErrorHookHandler

                                                                                                                                                                                                                                                                                                      interface onErrorHookHandler<
                                                                                                                                                                                                                                                                                                      RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                      RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                      RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                      RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                                                                                                                      ContextConfig = ContextConfigDefault,
                                                                                                                                                                                                                                                                                                      TError extends Error = FastifyError,
                                                                                                                                                                                                                                                                                                      SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                                                                                                                      TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                      Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                      > {}
                                                                                                                                                                                                                                                                                                      • This hook is useful if you need to do some custom error logging or add some specific header in case of error. It is not intended for changing the error, and calling reply.send will throw an exception. This hook will be executed only after the customErrorHandler has been executed, and only if the customErrorHandler sends an error back to the user (Note that the default customErrorHandler always sends the error back to the user). Notice: unlike the other hooks, pass an error to the done function is not supported.

                                                                                                                                                                                                                                                                                                      call signature

                                                                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                                                                      this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>,
                                                                                                                                                                                                                                                                                                      request: FastifyRequest<
                                                                                                                                                                                                                                                                                                      RouteGeneric,
                                                                                                                                                                                                                                                                                                      RawServer,
                                                                                                                                                                                                                                                                                                      RawRequest,
                                                                                                                                                                                                                                                                                                      SchemaCompiler,
                                                                                                                                                                                                                                                                                                      TypeProvider,
                                                                                                                                                                                                                                                                                                      ContextConfig,
                                                                                                                                                                                                                                                                                                      Logger
                                                                                                                                                                                                                                                                                                      >,
                                                                                                                                                                                                                                                                                                      reply: FastifyReply<
                                                                                                                                                                                                                                                                                                      RawServer,
                                                                                                                                                                                                                                                                                                      RawRequest,
                                                                                                                                                                                                                                                                                                      RawReply,
                                                                                                                                                                                                                                                                                                      RouteGeneric,
                                                                                                                                                                                                                                                                                                      ContextConfig,
                                                                                                                                                                                                                                                                                                      SchemaCompiler,
                                                                                                                                                                                                                                                                                                      TypeProvider
                                                                                                                                                                                                                                                                                                      >,
                                                                                                                                                                                                                                                                                                      error: TError,
                                                                                                                                                                                                                                                                                                      done: () => void
                                                                                                                                                                                                                                                                                                      ): void;

                                                                                                                                                                                                                                                                                                        interface onListenAsyncHookHandler

                                                                                                                                                                                                                                                                                                        interface onListenAsyncHookHandler<
                                                                                                                                                                                                                                                                                                        RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                        RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                        RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                        Logger extends FastifyBaseLogger = FastifyBaseLogger,
                                                                                                                                                                                                                                                                                                        TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault
                                                                                                                                                                                                                                                                                                        > {}

                                                                                                                                                                                                                                                                                                          call signature

                                                                                                                                                                                                                                                                                                          (
                                                                                                                                                                                                                                                                                                          this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>
                                                                                                                                                                                                                                                                                                          ): Promise<unknown>;

                                                                                                                                                                                                                                                                                                            interface onListenHookHandler

                                                                                                                                                                                                                                                                                                            interface onListenHookHandler<
                                                                                                                                                                                                                                                                                                            RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                            RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                            RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                            Logger extends FastifyBaseLogger = FastifyBaseLogger,
                                                                                                                                                                                                                                                                                                            TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault
                                                                                                                                                                                                                                                                                                            > {}
                                                                                                                                                                                                                                                                                                            • Triggered when fastify.listen() is invoked to start the server. It is useful when plugins need a "onListen" event, for example to run logics after the server start listening for requests.

                                                                                                                                                                                                                                                                                                            call signature

                                                                                                                                                                                                                                                                                                            (
                                                                                                                                                                                                                                                                                                            this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>,
                                                                                                                                                                                                                                                                                                            done: HookHandlerDoneFunction
                                                                                                                                                                                                                                                                                                            ): void;

                                                                                                                                                                                                                                                                                                              interface onReadyAsyncHookHandler

                                                                                                                                                                                                                                                                                                              interface onReadyAsyncHookHandler<
                                                                                                                                                                                                                                                                                                              RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                              RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                              RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                              Logger extends FastifyBaseLogger = FastifyBaseLogger,
                                                                                                                                                                                                                                                                                                              TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault
                                                                                                                                                                                                                                                                                                              > {}

                                                                                                                                                                                                                                                                                                                call signature

                                                                                                                                                                                                                                                                                                                (
                                                                                                                                                                                                                                                                                                                this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>
                                                                                                                                                                                                                                                                                                                ): Promise<unknown>;

                                                                                                                                                                                                                                                                                                                  interface onReadyHookHandler

                                                                                                                                                                                                                                                                                                                  interface onReadyHookHandler<
                                                                                                                                                                                                                                                                                                                  RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                  RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                  RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                  Logger extends FastifyBaseLogger = FastifyBaseLogger,
                                                                                                                                                                                                                                                                                                                  TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault
                                                                                                                                                                                                                                                                                                                  > {}
                                                                                                                                                                                                                                                                                                                  • Triggered when fastify.listen() or fastify.ready() is invoked to start the server. It is useful when plugins need a "ready" event, for example to load data before the server start listening for requests.

                                                                                                                                                                                                                                                                                                                  call signature

                                                                                                                                                                                                                                                                                                                  (
                                                                                                                                                                                                                                                                                                                  this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>,
                                                                                                                                                                                                                                                                                                                  done: HookHandlerDoneFunction
                                                                                                                                                                                                                                                                                                                  ): void;

                                                                                                                                                                                                                                                                                                                    interface onRegisterHookHandler

                                                                                                                                                                                                                                                                                                                    interface onRegisterHookHandler<
                                                                                                                                                                                                                                                                                                                    RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                    RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                    RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                    Logger extends FastifyBaseLogger = FastifyBaseLogger,
                                                                                                                                                                                                                                                                                                                    TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                    Options extends FastifyPluginOptions = FastifyPluginOptions
                                                                                                                                                                                                                                                                                                                    > {}
                                                                                                                                                                                                                                                                                                                    • Triggered when a new plugin is registered and a new encapsulation context is created. The hook will be executed before the registered code. This hook can be useful if you are developing a plugin that needs to know when a plugin context is formed, and you want to operate in that specific context. Note: This hook will not be called if a plugin is wrapped inside fastify-plugin.

                                                                                                                                                                                                                                                                                                                    call signature

                                                                                                                                                                                                                                                                                                                    (
                                                                                                                                                                                                                                                                                                                    instance: FastifyInstance<
                                                                                                                                                                                                                                                                                                                    RawServer,
                                                                                                                                                                                                                                                                                                                    RawRequest,
                                                                                                                                                                                                                                                                                                                    RawReply,
                                                                                                                                                                                                                                                                                                                    Logger,
                                                                                                                                                                                                                                                                                                                    TypeProvider
                                                                                                                                                                                                                                                                                                                    >,
                                                                                                                                                                                                                                                                                                                    opts: RegisterOptions & Options,
                                                                                                                                                                                                                                                                                                                    done: HookHandlerDoneFunction
                                                                                                                                                                                                                                                                                                                    ): Promise<unknown> | void;

                                                                                                                                                                                                                                                                                                                      interface onRequestAbortAsyncHookHandler

                                                                                                                                                                                                                                                                                                                      interface onRequestAbortAsyncHookHandler<
                                                                                                                                                                                                                                                                                                                      RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                      RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                      RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                      RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                                                                                                                                      ContextConfig = ContextConfigDefault,
                                                                                                                                                                                                                                                                                                                      SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                                                                                                                                      TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                      Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                      > {}

                                                                                                                                                                                                                                                                                                                        call signature

                                                                                                                                                                                                                                                                                                                        (
                                                                                                                                                                                                                                                                                                                        this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>,
                                                                                                                                                                                                                                                                                                                        request: FastifyRequest<
                                                                                                                                                                                                                                                                                                                        RouteGeneric,
                                                                                                                                                                                                                                                                                                                        RawServer,
                                                                                                                                                                                                                                                                                                                        RawRequest,
                                                                                                                                                                                                                                                                                                                        SchemaCompiler,
                                                                                                                                                                                                                                                                                                                        TypeProvider,
                                                                                                                                                                                                                                                                                                                        ContextConfig,
                                                                                                                                                                                                                                                                                                                        Logger
                                                                                                                                                                                                                                                                                                                        >
                                                                                                                                                                                                                                                                                                                        ): Promise<unknown>;

                                                                                                                                                                                                                                                                                                                          interface onRequestAbortHookHandler

                                                                                                                                                                                                                                                                                                                          interface onRequestAbortHookHandler<
                                                                                                                                                                                                                                                                                                                          RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                          RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                          RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                          RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                                                                                                                                          ContextConfig = ContextConfigDefault,
                                                                                                                                                                                                                                                                                                                          SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                                                                                                                                          TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                          Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                          > {}
                                                                                                                                                                                                                                                                                                                          • onRequestAbort is useful if you need to monitor the if the client aborts the request (if the request.raw.aborted property is set to true). The onRequestAbort hook is executed when a client closes the connection before the entire request has been received. Therefore, you will not be able to send data to the client. Notice: client abort detection is not completely reliable. See: https://github.com/fastify/fastify/blob/main/docs/Guides/Detecting-When-Clients-Abort.md

                                                                                                                                                                                                                                                                                                                          call signature

                                                                                                                                                                                                                                                                                                                          (
                                                                                                                                                                                                                                                                                                                          this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>,
                                                                                                                                                                                                                                                                                                                          request: FastifyRequest<
                                                                                                                                                                                                                                                                                                                          RouteGeneric,
                                                                                                                                                                                                                                                                                                                          RawServer,
                                                                                                                                                                                                                                                                                                                          RawRequest,
                                                                                                                                                                                                                                                                                                                          SchemaCompiler,
                                                                                                                                                                                                                                                                                                                          TypeProvider,
                                                                                                                                                                                                                                                                                                                          ContextConfig,
                                                                                                                                                                                                                                                                                                                          Logger
                                                                                                                                                                                                                                                                                                                          >,
                                                                                                                                                                                                                                                                                                                          done: HookHandlerDoneFunction
                                                                                                                                                                                                                                                                                                                          ): void;

                                                                                                                                                                                                                                                                                                                            interface onRequestAsyncHookHandler

                                                                                                                                                                                                                                                                                                                            interface onRequestAsyncHookHandler<
                                                                                                                                                                                                                                                                                                                            RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                            RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                            RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                            RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                                                                                                                                            ContextConfig = ContextConfigDefault,
                                                                                                                                                                                                                                                                                                                            SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                                                                                                                                            TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                            Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                            > {}

                                                                                                                                                                                                                                                                                                                              call signature

                                                                                                                                                                                                                                                                                                                              (
                                                                                                                                                                                                                                                                                                                              this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>,
                                                                                                                                                                                                                                                                                                                              request: FastifyRequest<
                                                                                                                                                                                                                                                                                                                              RouteGeneric,
                                                                                                                                                                                                                                                                                                                              RawServer,
                                                                                                                                                                                                                                                                                                                              RawRequest,
                                                                                                                                                                                                                                                                                                                              SchemaCompiler,
                                                                                                                                                                                                                                                                                                                              TypeProvider,
                                                                                                                                                                                                                                                                                                                              ContextConfig,
                                                                                                                                                                                                                                                                                                                              Logger
                                                                                                                                                                                                                                                                                                                              >,
                                                                                                                                                                                                                                                                                                                              reply: FastifyReply<
                                                                                                                                                                                                                                                                                                                              RawServer,
                                                                                                                                                                                                                                                                                                                              RawRequest,
                                                                                                                                                                                                                                                                                                                              RawReply,
                                                                                                                                                                                                                                                                                                                              RouteGeneric,
                                                                                                                                                                                                                                                                                                                              ContextConfig,
                                                                                                                                                                                                                                                                                                                              SchemaCompiler,
                                                                                                                                                                                                                                                                                                                              TypeProvider
                                                                                                                                                                                                                                                                                                                              >
                                                                                                                                                                                                                                                                                                                              ): Promise<unknown>;

                                                                                                                                                                                                                                                                                                                                interface onRequestHookHandler

                                                                                                                                                                                                                                                                                                                                interface onRequestHookHandler<
                                                                                                                                                                                                                                                                                                                                RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                                                                                                                                                ContextConfig = ContextConfigDefault,
                                                                                                                                                                                                                                                                                                                                SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                                                                                                                                                TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                                Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                > {}
                                                                                                                                                                                                                                                                                                                                • onRequest is the first hook to be executed in the request lifecycle. There was no previous hook, the next hook will be preParsing. Notice: in the onRequest hook, request.body will always be null, because the body parsing happens before the preHandler hook.

                                                                                                                                                                                                                                                                                                                                call signature

                                                                                                                                                                                                                                                                                                                                (
                                                                                                                                                                                                                                                                                                                                this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>,
                                                                                                                                                                                                                                                                                                                                request: FastifyRequest<
                                                                                                                                                                                                                                                                                                                                RouteGeneric,
                                                                                                                                                                                                                                                                                                                                RawServer,
                                                                                                                                                                                                                                                                                                                                RawRequest,
                                                                                                                                                                                                                                                                                                                                SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                TypeProvider,
                                                                                                                                                                                                                                                                                                                                ContextConfig,
                                                                                                                                                                                                                                                                                                                                Logger
                                                                                                                                                                                                                                                                                                                                >,
                                                                                                                                                                                                                                                                                                                                reply: FastifyReply<
                                                                                                                                                                                                                                                                                                                                RawServer,
                                                                                                                                                                                                                                                                                                                                RawRequest,
                                                                                                                                                                                                                                                                                                                                RawReply,
                                                                                                                                                                                                                                                                                                                                RouteGeneric,
                                                                                                                                                                                                                                                                                                                                ContextConfig,
                                                                                                                                                                                                                                                                                                                                SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                TypeProvider
                                                                                                                                                                                                                                                                                                                                >,
                                                                                                                                                                                                                                                                                                                                done: HookHandlerDoneFunction
                                                                                                                                                                                                                                                                                                                                ): void;

                                                                                                                                                                                                                                                                                                                                  interface onResponseAsyncHookHandler

                                                                                                                                                                                                                                                                                                                                  interface onResponseAsyncHookHandler<
                                                                                                                                                                                                                                                                                                                                  RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                  RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                  RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                  RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                                                                                                                                                  ContextConfig = ContextConfigDefault,
                                                                                                                                                                                                                                                                                                                                  SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                                                                                                                                                  TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                                  Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                  > {}

                                                                                                                                                                                                                                                                                                                                    call signature

                                                                                                                                                                                                                                                                                                                                    (
                                                                                                                                                                                                                                                                                                                                    this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>,
                                                                                                                                                                                                                                                                                                                                    request: FastifyRequest<
                                                                                                                                                                                                                                                                                                                                    RouteGeneric,
                                                                                                                                                                                                                                                                                                                                    RawServer,
                                                                                                                                                                                                                                                                                                                                    RawRequest,
                                                                                                                                                                                                                                                                                                                                    SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                    TypeProvider,
                                                                                                                                                                                                                                                                                                                                    ContextConfig,
                                                                                                                                                                                                                                                                                                                                    Logger
                                                                                                                                                                                                                                                                                                                                    >,
                                                                                                                                                                                                                                                                                                                                    reply: FastifyReply<
                                                                                                                                                                                                                                                                                                                                    RawServer,
                                                                                                                                                                                                                                                                                                                                    RawRequest,
                                                                                                                                                                                                                                                                                                                                    RawReply,
                                                                                                                                                                                                                                                                                                                                    RouteGeneric,
                                                                                                                                                                                                                                                                                                                                    ContextConfig,
                                                                                                                                                                                                                                                                                                                                    SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                    TypeProvider
                                                                                                                                                                                                                                                                                                                                    >
                                                                                                                                                                                                                                                                                                                                    ): Promise<unknown>;

                                                                                                                                                                                                                                                                                                                                      interface onResponseHookHandler

                                                                                                                                                                                                                                                                                                                                      interface onResponseHookHandler<
                                                                                                                                                                                                                                                                                                                                      RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                      RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                      RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                      RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                                                                                                                                                      ContextConfig = ContextConfigDefault,
                                                                                                                                                                                                                                                                                                                                      SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                                                                                                                                                      TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                                      Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                      > {}
                                                                                                                                                                                                                                                                                                                                      • onResponse is the seventh and last hook in the request hook lifecycle. The previous hook was onSend, there is no next hook. The onResponse hook is executed when a response has been sent, so you will not be able to send more data to the client. It can however be useful for sending data to external services, for example to gather statistics.

                                                                                                                                                                                                                                                                                                                                      call signature

                                                                                                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                                                                                                      this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>,
                                                                                                                                                                                                                                                                                                                                      request: FastifyRequest<
                                                                                                                                                                                                                                                                                                                                      RouteGeneric,
                                                                                                                                                                                                                                                                                                                                      RawServer,
                                                                                                                                                                                                                                                                                                                                      RawRequest,
                                                                                                                                                                                                                                                                                                                                      SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                      TypeProvider,
                                                                                                                                                                                                                                                                                                                                      ContextConfig,
                                                                                                                                                                                                                                                                                                                                      Logger
                                                                                                                                                                                                                                                                                                                                      >,
                                                                                                                                                                                                                                                                                                                                      reply: FastifyReply<
                                                                                                                                                                                                                                                                                                                                      RawServer,
                                                                                                                                                                                                                                                                                                                                      RawRequest,
                                                                                                                                                                                                                                                                                                                                      RawReply,
                                                                                                                                                                                                                                                                                                                                      RouteGeneric,
                                                                                                                                                                                                                                                                                                                                      ContextConfig,
                                                                                                                                                                                                                                                                                                                                      SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                      TypeProvider
                                                                                                                                                                                                                                                                                                                                      >,
                                                                                                                                                                                                                                                                                                                                      done: HookHandlerDoneFunction
                                                                                                                                                                                                                                                                                                                                      ): void;

                                                                                                                                                                                                                                                                                                                                        interface onRouteHookHandler

                                                                                                                                                                                                                                                                                                                                        interface onRouteHookHandler<
                                                                                                                                                                                                                                                                                                                                        RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                        RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                        RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                        RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                                                                                                                                                        ContextConfig = ContextConfigDefault,
                                                                                                                                                                                                                                                                                                                                        SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                                                                                                                                                        TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                                        Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                        > {}
                                                                                                                                                                                                                                                                                                                                        • Triggered when a new route is registered. Listeners are passed a routeOptions object as the sole parameter. The interface is synchronous, and, as such, the listener does not get passed a callback

                                                                                                                                                                                                                                                                                                                                        call signature

                                                                                                                                                                                                                                                                                                                                        (
                                                                                                                                                                                                                                                                                                                                        this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>,
                                                                                                                                                                                                                                                                                                                                        opts: RouteOptions<
                                                                                                                                                                                                                                                                                                                                        RawServer,
                                                                                                                                                                                                                                                                                                                                        RawRequest,
                                                                                                                                                                                                                                                                                                                                        RawReply,
                                                                                                                                                                                                                                                                                                                                        RouteGeneric,
                                                                                                                                                                                                                                                                                                                                        ContextConfig,
                                                                                                                                                                                                                                                                                                                                        SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                        TypeProvider
                                                                                                                                                                                                                                                                                                                                        > & { routePath: string; path: string; prefix: string }
                                                                                                                                                                                                                                                                                                                                        ): Promise<unknown> | void;

                                                                                                                                                                                                                                                                                                                                          interface onSendAsyncHookHandler

                                                                                                                                                                                                                                                                                                                                          interface onSendAsyncHookHandler<
                                                                                                                                                                                                                                                                                                                                          OnSendPayload = unknown,
                                                                                                                                                                                                                                                                                                                                          RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                          RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                          RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                          RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                                                                                                                                                          ContextConfig = ContextConfigDefault,
                                                                                                                                                                                                                                                                                                                                          SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                                                                                                                                                          TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                                          Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                          > {}

                                                                                                                                                                                                                                                                                                                                            call signature

                                                                                                                                                                                                                                                                                                                                            (
                                                                                                                                                                                                                                                                                                                                            this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>,
                                                                                                                                                                                                                                                                                                                                            request: FastifyRequest<
                                                                                                                                                                                                                                                                                                                                            RouteGeneric,
                                                                                                                                                                                                                                                                                                                                            RawServer,
                                                                                                                                                                                                                                                                                                                                            RawRequest,
                                                                                                                                                                                                                                                                                                                                            SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                            TypeProvider,
                                                                                                                                                                                                                                                                                                                                            ContextConfig,
                                                                                                                                                                                                                                                                                                                                            Logger
                                                                                                                                                                                                                                                                                                                                            >,
                                                                                                                                                                                                                                                                                                                                            reply: FastifyReply<
                                                                                                                                                                                                                                                                                                                                            RawServer,
                                                                                                                                                                                                                                                                                                                                            RawRequest,
                                                                                                                                                                                                                                                                                                                                            RawReply,
                                                                                                                                                                                                                                                                                                                                            RouteGeneric,
                                                                                                                                                                                                                                                                                                                                            ContextConfig,
                                                                                                                                                                                                                                                                                                                                            SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                            TypeProvider
                                                                                                                                                                                                                                                                                                                                            >,
                                                                                                                                                                                                                                                                                                                                            payload: OnSendPayload
                                                                                                                                                                                                                                                                                                                                            ): Promise<unknown>;

                                                                                                                                                                                                                                                                                                                                              interface onSendHookHandler

                                                                                                                                                                                                                                                                                                                                              interface onSendHookHandler<
                                                                                                                                                                                                                                                                                                                                              OnSendPayload = unknown,
                                                                                                                                                                                                                                                                                                                                              RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                              RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                              RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                              RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                                                                                                                                                              ContextConfig = ContextConfigDefault,
                                                                                                                                                                                                                                                                                                                                              SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                                                                                                                                                              TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                                              Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                              > {}
                                                                                                                                                                                                                                                                                                                                              • You can change the payload with the onSend hook. It is the sixth hook to be executed in the request lifecycle. The previous hook was preSerialization, the next hook will be onResponse. Note: If you change the payload, you may only change it to a string, a Buffer, a stream, or null.

                                                                                                                                                                                                                                                                                                                                              call signature

                                                                                                                                                                                                                                                                                                                                              (
                                                                                                                                                                                                                                                                                                                                              this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>,
                                                                                                                                                                                                                                                                                                                                              request: FastifyRequest<
                                                                                                                                                                                                                                                                                                                                              RouteGeneric,
                                                                                                                                                                                                                                                                                                                                              RawServer,
                                                                                                                                                                                                                                                                                                                                              RawRequest,
                                                                                                                                                                                                                                                                                                                                              SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                              TypeProvider,
                                                                                                                                                                                                                                                                                                                                              ContextConfig,
                                                                                                                                                                                                                                                                                                                                              Logger
                                                                                                                                                                                                                                                                                                                                              >,
                                                                                                                                                                                                                                                                                                                                              reply: FastifyReply<
                                                                                                                                                                                                                                                                                                                                              RawServer,
                                                                                                                                                                                                                                                                                                                                              RawRequest,
                                                                                                                                                                                                                                                                                                                                              RawReply,
                                                                                                                                                                                                                                                                                                                                              RouteGeneric,
                                                                                                                                                                                                                                                                                                                                              ContextConfig,
                                                                                                                                                                                                                                                                                                                                              SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                              TypeProvider
                                                                                                                                                                                                                                                                                                                                              >,
                                                                                                                                                                                                                                                                                                                                              payload: OnSendPayload,
                                                                                                                                                                                                                                                                                                                                              done: DoneFuncWithErrOrRes
                                                                                                                                                                                                                                                                                                                                              ): void;

                                                                                                                                                                                                                                                                                                                                                interface onTimeoutAsyncHookHandler

                                                                                                                                                                                                                                                                                                                                                interface onTimeoutAsyncHookHandler<
                                                                                                                                                                                                                                                                                                                                                RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                                RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                                                                                                                                                                ContextConfig = ContextConfigDefault,
                                                                                                                                                                                                                                                                                                                                                SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                                                                                                                                                                TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                                                Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                                > {}

                                                                                                                                                                                                                                                                                                                                                  call signature

                                                                                                                                                                                                                                                                                                                                                  (
                                                                                                                                                                                                                                                                                                                                                  this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>,
                                                                                                                                                                                                                                                                                                                                                  request: FastifyRequest<
                                                                                                                                                                                                                                                                                                                                                  RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                  RawServer,
                                                                                                                                                                                                                                                                                                                                                  RawRequest,
                                                                                                                                                                                                                                                                                                                                                  SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                  TypeProvider,
                                                                                                                                                                                                                                                                                                                                                  ContextConfig,
                                                                                                                                                                                                                                                                                                                                                  Logger
                                                                                                                                                                                                                                                                                                                                                  >,
                                                                                                                                                                                                                                                                                                                                                  reply: FastifyReply<
                                                                                                                                                                                                                                                                                                                                                  RawServer,
                                                                                                                                                                                                                                                                                                                                                  RawRequest,
                                                                                                                                                                                                                                                                                                                                                  RawReply,
                                                                                                                                                                                                                                                                                                                                                  RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                  ContextConfig,
                                                                                                                                                                                                                                                                                                                                                  SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                  TypeProvider
                                                                                                                                                                                                                                                                                                                                                  >
                                                                                                                                                                                                                                                                                                                                                  ): Promise<unknown>;

                                                                                                                                                                                                                                                                                                                                                    interface onTimeoutHookHandler

                                                                                                                                                                                                                                                                                                                                                    interface onTimeoutHookHandler<
                                                                                                                                                                                                                                                                                                                                                    RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                                    RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                    RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                    RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                                                                                                                                                                    ContextConfig = ContextConfigDefault,
                                                                                                                                                                                                                                                                                                                                                    SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                                                                                                                                                                    TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                                                    Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                                    > {}
                                                                                                                                                                                                                                                                                                                                                    • onTimeout is useful if you need to monitor the request timed out in your service. (if the connectionTimeout property is set on the fastify instance) The onTimeout hook is executed when a request is timed out and the http socket has been hanged up. Therefore you will not be able to send data to the client.

                                                                                                                                                                                                                                                                                                                                                    call signature

                                                                                                                                                                                                                                                                                                                                                    (
                                                                                                                                                                                                                                                                                                                                                    this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>,
                                                                                                                                                                                                                                                                                                                                                    request: FastifyRequest<
                                                                                                                                                                                                                                                                                                                                                    RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                    RawServer,
                                                                                                                                                                                                                                                                                                                                                    RawRequest,
                                                                                                                                                                                                                                                                                                                                                    SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                    TypeProvider,
                                                                                                                                                                                                                                                                                                                                                    ContextConfig,
                                                                                                                                                                                                                                                                                                                                                    Logger
                                                                                                                                                                                                                                                                                                                                                    >,
                                                                                                                                                                                                                                                                                                                                                    reply: FastifyReply<
                                                                                                                                                                                                                                                                                                                                                    RawServer,
                                                                                                                                                                                                                                                                                                                                                    RawRequest,
                                                                                                                                                                                                                                                                                                                                                    RawReply,
                                                                                                                                                                                                                                                                                                                                                    RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                    ContextConfig,
                                                                                                                                                                                                                                                                                                                                                    SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                    TypeProvider
                                                                                                                                                                                                                                                                                                                                                    >,
                                                                                                                                                                                                                                                                                                                                                    done: HookHandlerDoneFunction
                                                                                                                                                                                                                                                                                                                                                    ): void;

                                                                                                                                                                                                                                                                                                                                                      interface preCloseAsyncHookHandler

                                                                                                                                                                                                                                                                                                                                                      interface preCloseAsyncHookHandler<
                                                                                                                                                                                                                                                                                                                                                      RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                                      RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                      RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                      Logger extends FastifyBaseLogger = FastifyBaseLogger,
                                                                                                                                                                                                                                                                                                                                                      TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault
                                                                                                                                                                                                                                                                                                                                                      > {}

                                                                                                                                                                                                                                                                                                                                                        call signature

                                                                                                                                                                                                                                                                                                                                                        (
                                                                                                                                                                                                                                                                                                                                                        this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>
                                                                                                                                                                                                                                                                                                                                                        ): Promise<unknown>;

                                                                                                                                                                                                                                                                                                                                                          interface preCloseHookHandler

                                                                                                                                                                                                                                                                                                                                                          interface preCloseHookHandler<
                                                                                                                                                                                                                                                                                                                                                          RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                                          RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                          RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                          Logger extends FastifyBaseLogger = FastifyBaseLogger,
                                                                                                                                                                                                                                                                                                                                                          TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault
                                                                                                                                                                                                                                                                                                                                                          > {}
                                                                                                                                                                                                                                                                                                                                                          • Triggered when fastify.close() is invoked to stop the server. It is useful when plugins need to cancel some state to allow the server to close successfully.

                                                                                                                                                                                                                                                                                                                                                          call signature

                                                                                                                                                                                                                                                                                                                                                          (
                                                                                                                                                                                                                                                                                                                                                          this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>,
                                                                                                                                                                                                                                                                                                                                                          done: HookHandlerDoneFunction
                                                                                                                                                                                                                                                                                                                                                          ): void;

                                                                                                                                                                                                                                                                                                                                                            interface preHandlerAsyncHookHandler

                                                                                                                                                                                                                                                                                                                                                            interface preHandlerAsyncHookHandler<
                                                                                                                                                                                                                                                                                                                                                            RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                                            RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                            RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                            RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                                                                                                                                                                            ContextConfig = ContextConfigDefault,
                                                                                                                                                                                                                                                                                                                                                            SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                                                                                                                                                                            TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                                                            Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                                            > {}

                                                                                                                                                                                                                                                                                                                                                              call signature

                                                                                                                                                                                                                                                                                                                                                              (
                                                                                                                                                                                                                                                                                                                                                              this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>,
                                                                                                                                                                                                                                                                                                                                                              request: FastifyRequest<
                                                                                                                                                                                                                                                                                                                                                              RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                              RawServer,
                                                                                                                                                                                                                                                                                                                                                              RawRequest,
                                                                                                                                                                                                                                                                                                                                                              SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                              TypeProvider,
                                                                                                                                                                                                                                                                                                                                                              ContextConfig,
                                                                                                                                                                                                                                                                                                                                                              Logger
                                                                                                                                                                                                                                                                                                                                                              >,
                                                                                                                                                                                                                                                                                                                                                              reply: FastifyReply<
                                                                                                                                                                                                                                                                                                                                                              RawServer,
                                                                                                                                                                                                                                                                                                                                                              RawRequest,
                                                                                                                                                                                                                                                                                                                                                              RawReply,
                                                                                                                                                                                                                                                                                                                                                              RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                              ContextConfig,
                                                                                                                                                                                                                                                                                                                                                              SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                              TypeProvider
                                                                                                                                                                                                                                                                                                                                                              >
                                                                                                                                                                                                                                                                                                                                                              ): Promise<unknown>;

                                                                                                                                                                                                                                                                                                                                                                interface preHandlerHookHandler

                                                                                                                                                                                                                                                                                                                                                                interface preHandlerHookHandler<
                                                                                                                                                                                                                                                                                                                                                                RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                                                RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                                                                                                                                                                                ContextConfig = ContextConfigDefault,
                                                                                                                                                                                                                                                                                                                                                                SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                                                                                                                                                                                TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                                                                Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                                                > {}
                                                                                                                                                                                                                                                                                                                                                                • preHandler is the fourth hook to be executed in the request lifecycle. The previous hook was preValidation, the next hook will be preSerialization.

                                                                                                                                                                                                                                                                                                                                                                call signature

                                                                                                                                                                                                                                                                                                                                                                (
                                                                                                                                                                                                                                                                                                                                                                this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>,
                                                                                                                                                                                                                                                                                                                                                                request: FastifyRequest<
                                                                                                                                                                                                                                                                                                                                                                RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                RawServer,
                                                                                                                                                                                                                                                                                                                                                                RawRequest,
                                                                                                                                                                                                                                                                                                                                                                SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                                TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                Logger
                                                                                                                                                                                                                                                                                                                                                                >,
                                                                                                                                                                                                                                                                                                                                                                reply: FastifyReply<
                                                                                                                                                                                                                                                                                                                                                                RawServer,
                                                                                                                                                                                                                                                                                                                                                                RawRequest,
                                                                                                                                                                                                                                                                                                                                                                RawReply,
                                                                                                                                                                                                                                                                                                                                                                RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                                TypeProvider
                                                                                                                                                                                                                                                                                                                                                                >,
                                                                                                                                                                                                                                                                                                                                                                done: HookHandlerDoneFunction
                                                                                                                                                                                                                                                                                                                                                                ): void;

                                                                                                                                                                                                                                                                                                                                                                  interface preParsingAsyncHookHandler

                                                                                                                                                                                                                                                                                                                                                                  interface preParsingAsyncHookHandler<
                                                                                                                                                                                                                                                                                                                                                                  RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                                                  RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                  RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                  RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                                                                                                                                                                                  ContextConfig = ContextConfigDefault,
                                                                                                                                                                                                                                                                                                                                                                  SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                                                                                                                                                                                  TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                                                                  Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                                                  > {}

                                                                                                                                                                                                                                                                                                                                                                    call signature

                                                                                                                                                                                                                                                                                                                                                                    (
                                                                                                                                                                                                                                                                                                                                                                    this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>,
                                                                                                                                                                                                                                                                                                                                                                    request: FastifyRequest<
                                                                                                                                                                                                                                                                                                                                                                    RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                    RawServer,
                                                                                                                                                                                                                                                                                                                                                                    RawRequest,
                                                                                                                                                                                                                                                                                                                                                                    SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                                    TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                    ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                    Logger
                                                                                                                                                                                                                                                                                                                                                                    >,
                                                                                                                                                                                                                                                                                                                                                                    reply: FastifyReply<
                                                                                                                                                                                                                                                                                                                                                                    RawServer,
                                                                                                                                                                                                                                                                                                                                                                    RawRequest,
                                                                                                                                                                                                                                                                                                                                                                    RawReply,
                                                                                                                                                                                                                                                                                                                                                                    RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                    ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                    SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                                    TypeProvider
                                                                                                                                                                                                                                                                                                                                                                    >,
                                                                                                                                                                                                                                                                                                                                                                    payload: RequestPayload
                                                                                                                                                                                                                                                                                                                                                                    ): Promise<RequestPayload | unknown>;

                                                                                                                                                                                                                                                                                                                                                                      interface preParsingHookHandler

                                                                                                                                                                                                                                                                                                                                                                      interface preParsingHookHandler<
                                                                                                                                                                                                                                                                                                                                                                      RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                                                      RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                      RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                      RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                                                                                                                                                                                      ContextConfig = ContextConfigDefault,
                                                                                                                                                                                                                                                                                                                                                                      SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                                                                                                                                                                                      TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                                                                      Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                                                      > {}
                                                                                                                                                                                                                                                                                                                                                                      • preParsing is the second hook to be executed in the request lifecycle. The previous hook was onRequest, the next hook will be preValidation. Notice: in the preParsing hook, request.body will always be null, because the body parsing happens before the preHandler hook.

                                                                                                                                                                                                                                                                                                                                                                      call signature

                                                                                                                                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                                                                                                                                      this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>,
                                                                                                                                                                                                                                                                                                                                                                      request: FastifyRequest<
                                                                                                                                                                                                                                                                                                                                                                      RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                      RawServer,
                                                                                                                                                                                                                                                                                                                                                                      RawRequest,
                                                                                                                                                                                                                                                                                                                                                                      SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                                      TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                      ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                      Logger
                                                                                                                                                                                                                                                                                                                                                                      >,
                                                                                                                                                                                                                                                                                                                                                                      reply: FastifyReply<
                                                                                                                                                                                                                                                                                                                                                                      RawServer,
                                                                                                                                                                                                                                                                                                                                                                      RawRequest,
                                                                                                                                                                                                                                                                                                                                                                      RawReply,
                                                                                                                                                                                                                                                                                                                                                                      RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                      ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                      SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                                      TypeProvider
                                                                                                                                                                                                                                                                                                                                                                      >,
                                                                                                                                                                                                                                                                                                                                                                      payload: RequestPayload,
                                                                                                                                                                                                                                                                                                                                                                      done: <TError extends Error = FastifyError>(
                                                                                                                                                                                                                                                                                                                                                                      err?: TError | null,
                                                                                                                                                                                                                                                                                                                                                                      res?: RequestPayload
                                                                                                                                                                                                                                                                                                                                                                      ) => void
                                                                                                                                                                                                                                                                                                                                                                      ): void;

                                                                                                                                                                                                                                                                                                                                                                        interface preSerializationAsyncHookHandler

                                                                                                                                                                                                                                                                                                                                                                        interface preSerializationAsyncHookHandler<
                                                                                                                                                                                                                                                                                                                                                                        PreSerializationPayload = unknown,
                                                                                                                                                                                                                                                                                                                                                                        RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                                                        RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                        RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                        RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                                                                                                                                                                                        ContextConfig = ContextConfigDefault,
                                                                                                                                                                                                                                                                                                                                                                        SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                                                                                                                                                                                        TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                                                                        Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                                                        > {}

                                                                                                                                                                                                                                                                                                                                                                          call signature

                                                                                                                                                                                                                                                                                                                                                                          (
                                                                                                                                                                                                                                                                                                                                                                          this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>,
                                                                                                                                                                                                                                                                                                                                                                          request: FastifyRequest<
                                                                                                                                                                                                                                                                                                                                                                          RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                          RawServer,
                                                                                                                                                                                                                                                                                                                                                                          RawRequest,
                                                                                                                                                                                                                                                                                                                                                                          SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                                          TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                          ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                          Logger
                                                                                                                                                                                                                                                                                                                                                                          >,
                                                                                                                                                                                                                                                                                                                                                                          reply: FastifyReply<
                                                                                                                                                                                                                                                                                                                                                                          RawServer,
                                                                                                                                                                                                                                                                                                                                                                          RawRequest,
                                                                                                                                                                                                                                                                                                                                                                          RawReply,
                                                                                                                                                                                                                                                                                                                                                                          RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                          ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                          SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                                          TypeProvider
                                                                                                                                                                                                                                                                                                                                                                          >,
                                                                                                                                                                                                                                                                                                                                                                          payload: PreSerializationPayload
                                                                                                                                                                                                                                                                                                                                                                          ): Promise<unknown>;

                                                                                                                                                                                                                                                                                                                                                                            interface preSerializationHookHandler

                                                                                                                                                                                                                                                                                                                                                                            interface preSerializationHookHandler<
                                                                                                                                                                                                                                                                                                                                                                            PreSerializationPayload = unknown,
                                                                                                                                                                                                                                                                                                                                                                            RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                                                            RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                            RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                            RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                                                                                                                                                                                            ContextConfig = ContextConfigDefault,
                                                                                                                                                                                                                                                                                                                                                                            SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                                                                                                                                                                                            TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                                                                            Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                                                            > {}
                                                                                                                                                                                                                                                                                                                                                                            • preSerialization is the fifth hook to be executed in the request lifecycle. The previous hook was preHandler, the next hook will be onSend. Note: the hook is NOT called if the payload is a string, a Buffer, a stream or null.

                                                                                                                                                                                                                                                                                                                                                                            call signature

                                                                                                                                                                                                                                                                                                                                                                            (
                                                                                                                                                                                                                                                                                                                                                                            this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>,
                                                                                                                                                                                                                                                                                                                                                                            request: FastifyRequest<
                                                                                                                                                                                                                                                                                                                                                                            RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                            RawServer,
                                                                                                                                                                                                                                                                                                                                                                            RawRequest,
                                                                                                                                                                                                                                                                                                                                                                            SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                                            TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                            ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                            Logger
                                                                                                                                                                                                                                                                                                                                                                            >,
                                                                                                                                                                                                                                                                                                                                                                            reply: FastifyReply<
                                                                                                                                                                                                                                                                                                                                                                            RawServer,
                                                                                                                                                                                                                                                                                                                                                                            RawRequest,
                                                                                                                                                                                                                                                                                                                                                                            RawReply,
                                                                                                                                                                                                                                                                                                                                                                            RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                            ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                            SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                                            TypeProvider
                                                                                                                                                                                                                                                                                                                                                                            >,
                                                                                                                                                                                                                                                                                                                                                                            payload: PreSerializationPayload,
                                                                                                                                                                                                                                                                                                                                                                            done: DoneFuncWithErrOrRes
                                                                                                                                                                                                                                                                                                                                                                            ): void;

                                                                                                                                                                                                                                                                                                                                                                              interface preValidationAsyncHookHandler

                                                                                                                                                                                                                                                                                                                                                                              interface preValidationAsyncHookHandler<
                                                                                                                                                                                                                                                                                                                                                                              RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                                                              RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                              RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                              RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                                                                                                                                                                                              ContextConfig = ContextConfigDefault,
                                                                                                                                                                                                                                                                                                                                                                              SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                                                                                                                                                                                              TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                                                                              Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                                                              > {}

                                                                                                                                                                                                                                                                                                                                                                                call signature

                                                                                                                                                                                                                                                                                                                                                                                (
                                                                                                                                                                                                                                                                                                                                                                                this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>,
                                                                                                                                                                                                                                                                                                                                                                                request: FastifyRequest<
                                                                                                                                                                                                                                                                                                                                                                                RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                RawServer,
                                                                                                                                                                                                                                                                                                                                                                                RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                                                TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                Logger
                                                                                                                                                                                                                                                                                                                                                                                >,
                                                                                                                                                                                                                                                                                                                                                                                reply: FastifyReply<
                                                                                                                                                                                                                                                                                                                                                                                RawServer,
                                                                                                                                                                                                                                                                                                                                                                                RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                RawReply,
                                                                                                                                                                                                                                                                                                                                                                                RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                                                TypeProvider
                                                                                                                                                                                                                                                                                                                                                                                >
                                                                                                                                                                                                                                                                                                                                                                                ): Promise<unknown>;

                                                                                                                                                                                                                                                                                                                                                                                  interface preValidationHookHandler

                                                                                                                                                                                                                                                                                                                                                                                  interface preValidationHookHandler<
                                                                                                                                                                                                                                                                                                                                                                                  RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                                                                  RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                                  RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                                  RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                                                                                                                                                                                                  ContextConfig = ContextConfigDefault,
                                                                                                                                                                                                                                                                                                                                                                                  SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                                                                                                                                                                                                  TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                                                                                  Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                                                                  > {}
                                                                                                                                                                                                                                                                                                                                                                                  • preValidation is the third hook to be executed in the request lifecycle. The previous hook was preParsing, the next hook will be preHandler.

                                                                                                                                                                                                                                                                                                                                                                                  call signature

                                                                                                                                                                                                                                                                                                                                                                                  (
                                                                                                                                                                                                                                                                                                                                                                                  this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>,
                                                                                                                                                                                                                                                                                                                                                                                  request: FastifyRequest<
                                                                                                                                                                                                                                                                                                                                                                                  RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                  RawServer,
                                                                                                                                                                                                                                                                                                                                                                                  RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                  SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                                                  TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                  ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                  Logger
                                                                                                                                                                                                                                                                                                                                                                                  >,
                                                                                                                                                                                                                                                                                                                                                                                  reply: FastifyReply<
                                                                                                                                                                                                                                                                                                                                                                                  RawServer,
                                                                                                                                                                                                                                                                                                                                                                                  RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                  RawReply,
                                                                                                                                                                                                                                                                                                                                                                                  RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                  ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                  SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                                                  TypeProvider
                                                                                                                                                                                                                                                                                                                                                                                  >,
                                                                                                                                                                                                                                                                                                                                                                                  done: HookHandlerDoneFunction
                                                                                                                                                                                                                                                                                                                                                                                  ): void;

                                                                                                                                                                                                                                                                                                                                                                                    interface PrintRoutesOptions

                                                                                                                                                                                                                                                                                                                                                                                    interface PrintRoutesOptions {}

                                                                                                                                                                                                                                                                                                                                                                                      property commonPrefix

                                                                                                                                                                                                                                                                                                                                                                                      commonPrefix?: boolean;

                                                                                                                                                                                                                                                                                                                                                                                        property includeHooks

                                                                                                                                                                                                                                                                                                                                                                                        includeHooks?: boolean;

                                                                                                                                                                                                                                                                                                                                                                                          property includeMeta

                                                                                                                                                                                                                                                                                                                                                                                          includeMeta?: boolean | (string | symbol)[];

                                                                                                                                                                                                                                                                                                                                                                                            property method

                                                                                                                                                                                                                                                                                                                                                                                            method?: HTTPMethods;

                                                                                                                                                                                                                                                                                                                                                                                              interface RegisterOptions

                                                                                                                                                                                                                                                                                                                                                                                              interface RegisterOptions {}

                                                                                                                                                                                                                                                                                                                                                                                                property logLevel

                                                                                                                                                                                                                                                                                                                                                                                                logLevel?: LogLevel;

                                                                                                                                                                                                                                                                                                                                                                                                  property logSerializers

                                                                                                                                                                                                                                                                                                                                                                                                  logSerializers?: Record<string, (value: any) => string>;

                                                                                                                                                                                                                                                                                                                                                                                                    property prefix

                                                                                                                                                                                                                                                                                                                                                                                                    prefix?: string;

                                                                                                                                                                                                                                                                                                                                                                                                      interface RequestGenericInterface

                                                                                                                                                                                                                                                                                                                                                                                                      interface RequestGenericInterface {}

                                                                                                                                                                                                                                                                                                                                                                                                        property Body

                                                                                                                                                                                                                                                                                                                                                                                                        Body?: RequestBodyDefault;

                                                                                                                                                                                                                                                                                                                                                                                                          property Headers

                                                                                                                                                                                                                                                                                                                                                                                                          Headers?: RequestHeadersDefault;

                                                                                                                                                                                                                                                                                                                                                                                                            property Params

                                                                                                                                                                                                                                                                                                                                                                                                            Params?: RequestParamsDefault;

                                                                                                                                                                                                                                                                                                                                                                                                              property Querystring

                                                                                                                                                                                                                                                                                                                                                                                                              Querystring?: RequestQuerystringDefault;

                                                                                                                                                                                                                                                                                                                                                                                                                interface RequestPayload

                                                                                                                                                                                                                                                                                                                                                                                                                interface RequestPayload extends Readable {}

                                                                                                                                                                                                                                                                                                                                                                                                                  property receivedEncodedLength

                                                                                                                                                                                                                                                                                                                                                                                                                  receivedEncodedLength?: number;

                                                                                                                                                                                                                                                                                                                                                                                                                    interface RouteGenericInterface

                                                                                                                                                                                                                                                                                                                                                                                                                    interface RouteGenericInterface
                                                                                                                                                                                                                                                                                                                                                                                                                    extends RequestGenericInterface,
                                                                                                                                                                                                                                                                                                                                                                                                                    ReplyGenericInterface {}

                                                                                                                                                                                                                                                                                                                                                                                                                      interface RouteOptions

                                                                                                                                                                                                                                                                                                                                                                                                                      interface RouteOptions<
                                                                                                                                                                                                                                                                                                                                                                                                                      RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                                                                                                      RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                                                                      RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                                                                      RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                                                                                                                                                                                                                                      ContextConfig = ContextConfigDefault,
                                                                                                                                                                                                                                                                                                                                                                                                                      SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                                                                                                                                                                                                                                      TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                                                                                                                      Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                                                                                                      > extends RouteShorthandOptions<
                                                                                                                                                                                                                                                                                                                                                                                                                      RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                      RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                      RawReply,
                                                                                                                                                                                                                                                                                                                                                                                                                      RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                      ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                      SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                                                                                      TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                      Logger
                                                                                                                                                                                                                                                                                                                                                                                                                      > {}
                                                                                                                                                                                                                                                                                                                                                                                                                      • Fastify route method options.

                                                                                                                                                                                                                                                                                                                                                                                                                      property handler

                                                                                                                                                                                                                                                                                                                                                                                                                      handler: RouteHandlerMethod<
                                                                                                                                                                                                                                                                                                                                                                                                                      RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                      RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                      RawReply,
                                                                                                                                                                                                                                                                                                                                                                                                                      RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                      ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                      NoInferCompat<SchemaCompiler>,
                                                                                                                                                                                                                                                                                                                                                                                                                      TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                      Logger
                                                                                                                                                                                                                                                                                                                                                                                                                      >;

                                                                                                                                                                                                                                                                                                                                                                                                                        property method

                                                                                                                                                                                                                                                                                                                                                                                                                        method: HTTPMethods | HTTPMethods[];

                                                                                                                                                                                                                                                                                                                                                                                                                          property url

                                                                                                                                                                                                                                                                                                                                                                                                                          url: string;

                                                                                                                                                                                                                                                                                                                                                                                                                            interface RouteShorthandMethod

                                                                                                                                                                                                                                                                                                                                                                                                                            interface RouteShorthandMethod<
                                                                                                                                                                                                                                                                                                                                                                                                                            RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                                                                                                            RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                                                                            RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                                                                            TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                                                                                                                            Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                                                                                                            > {}
                                                                                                                                                                                                                                                                                                                                                                                                                            • Fastify Router Shorthand method type that is similar to the Express/Restify approach

                                                                                                                                                                                                                                                                                                                                                                                                                            interface RouteShorthandOptions

                                                                                                                                                                                                                                                                                                                                                                                                                            interface RouteShorthandOptions<
                                                                                                                                                                                                                                                                                                                                                                                                                            RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                                                                                                            RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                                                                            RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                                                                            RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                                                                                                                                                                                                                                            ContextConfig = ContextConfigDefault,
                                                                                                                                                                                                                                                                                                                                                                                                                            SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                                                                                                                                                                                                                                            TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                                                                                                                            Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                                                                                                            > {}
                                                                                                                                                                                                                                                                                                                                                                                                                            • Route shorthand options for the various shorthand methods

                                                                                                                                                                                                                                                                                                                                                                                                                            property attachValidation

                                                                                                                                                                                                                                                                                                                                                                                                                            attachValidation?: boolean;

                                                                                                                                                                                                                                                                                                                                                                                                                              property bodyLimit

                                                                                                                                                                                                                                                                                                                                                                                                                              bodyLimit?: number;

                                                                                                                                                                                                                                                                                                                                                                                                                                property childLoggerFactory

                                                                                                                                                                                                                                                                                                                                                                                                                                childLoggerFactory?: FastifyChildLoggerFactory<
                                                                                                                                                                                                                                                                                                                                                                                                                                RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                RawReply,
                                                                                                                                                                                                                                                                                                                                                                                                                                Logger,
                                                                                                                                                                                                                                                                                                                                                                                                                                TypeProvider
                                                                                                                                                                                                                                                                                                                                                                                                                                >;

                                                                                                                                                                                                                                                                                                                                                                                                                                  property config

                                                                                                                                                                                                                                                                                                                                                                                                                                  config?: Omit<FastifyRequestContext<ContextConfig>['config'], 'url' | 'method'>;

                                                                                                                                                                                                                                                                                                                                                                                                                                    property constraints

                                                                                                                                                                                                                                                                                                                                                                                                                                    constraints?: RouteConstraint;

                                                                                                                                                                                                                                                                                                                                                                                                                                      property errorHandler

                                                                                                                                                                                                                                                                                                                                                                                                                                      errorHandler?: (
                                                                                                                                                                                                                                                                                                                                                                                                                                      this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>,
                                                                                                                                                                                                                                                                                                                                                                                                                                      error: FastifyError,
                                                                                                                                                                                                                                                                                                                                                                                                                                      request: FastifyRequest<
                                                                                                                                                                                                                                                                                                                                                                                                                                      RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                      RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                      RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                      NoInferCompat<SchemaCompiler>,
                                                                                                                                                                                                                                                                                                                                                                                                                                      TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                                      ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                      Logger
                                                                                                                                                                                                                                                                                                                                                                                                                                      >,
                                                                                                                                                                                                                                                                                                                                                                                                                                      reply: FastifyReply<
                                                                                                                                                                                                                                                                                                                                                                                                                                      RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                      RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                      RawReply,
                                                                                                                                                                                                                                                                                                                                                                                                                                      RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                      ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                      NoInferCompat<SchemaCompiler>,
                                                                                                                                                                                                                                                                                                                                                                                                                                      TypeProvider
                                                                                                                                                                                                                                                                                                                                                                                                                                      >
                                                                                                                                                                                                                                                                                                                                                                                                                                      ) => void;

                                                                                                                                                                                                                                                                                                                                                                                                                                        property exposeHeadRoute

                                                                                                                                                                                                                                                                                                                                                                                                                                        exposeHeadRoute?: boolean;

                                                                                                                                                                                                                                                                                                                                                                                                                                          property logLevel

                                                                                                                                                                                                                                                                                                                                                                                                                                          logLevel?: LogLevel;

                                                                                                                                                                                                                                                                                                                                                                                                                                            property onError

                                                                                                                                                                                                                                                                                                                                                                                                                                            onError?:
                                                                                                                                                                                                                                                                                                                                                                                                                                            | onErrorMetaHookHandler<
                                                                                                                                                                                                                                                                                                                                                                                                                                            RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                            RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                            RawReply,
                                                                                                                                                                                                                                                                                                                                                                                                                                            RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                            ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                            FastifyError,
                                                                                                                                                                                                                                                                                                                                                                                                                                            NoInferCompat<SchemaCompiler>,
                                                                                                                                                                                                                                                                                                                                                                                                                                            TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                                            Logger
                                                                                                                                                                                                                                                                                                                                                                                                                                            >
                                                                                                                                                                                                                                                                                                                                                                                                                                            | onErrorMetaHookHandler<
                                                                                                                                                                                                                                                                                                                                                                                                                                            RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                            RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                            RawReply,
                                                                                                                                                                                                                                                                                                                                                                                                                                            RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                            ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                            FastifyError,
                                                                                                                                                                                                                                                                                                                                                                                                                                            NoInferCompat<SchemaCompiler>,
                                                                                                                                                                                                                                                                                                                                                                                                                                            TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                                            Logger
                                                                                                                                                                                                                                                                                                                                                                                                                                            >[];

                                                                                                                                                                                                                                                                                                                                                                                                                                              property onRequest

                                                                                                                                                                                                                                                                                                                                                                                                                                              onRequest?:
                                                                                                                                                                                                                                                                                                                                                                                                                                              | onRequestMetaHookHandler<
                                                                                                                                                                                                                                                                                                                                                                                                                                              RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                              RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                              RawReply,
                                                                                                                                                                                                                                                                                                                                                                                                                                              RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                              ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                              NoInferCompat<SchemaCompiler>,
                                                                                                                                                                                                                                                                                                                                                                                                                                              TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                                              Logger
                                                                                                                                                                                                                                                                                                                                                                                                                                              >
                                                                                                                                                                                                                                                                                                                                                                                                                                              | onRequestMetaHookHandler<
                                                                                                                                                                                                                                                                                                                                                                                                                                              RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                              RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                              RawReply,
                                                                                                                                                                                                                                                                                                                                                                                                                                              RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                              ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                              NoInferCompat<SchemaCompiler>,
                                                                                                                                                                                                                                                                                                                                                                                                                                              TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                                              Logger
                                                                                                                                                                                                                                                                                                                                                                                                                                              >[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                property onRequestAbort

                                                                                                                                                                                                                                                                                                                                                                                                                                                onRequestAbort?:
                                                                                                                                                                                                                                                                                                                                                                                                                                                | onRequestAbortMetaHookHandler<
                                                                                                                                                                                                                                                                                                                                                                                                                                                RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                RawReply,
                                                                                                                                                                                                                                                                                                                                                                                                                                                RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                                ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                NoInferCompat<SchemaCompiler>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                                                Logger
                                                                                                                                                                                                                                                                                                                                                                                                                                                >
                                                                                                                                                                                                                                                                                                                                                                                                                                                | onRequestAbortMetaHookHandler<
                                                                                                                                                                                                                                                                                                                                                                                                                                                RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                RawReply,
                                                                                                                                                                                                                                                                                                                                                                                                                                                RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                                ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                NoInferCompat<SchemaCompiler>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                                                Logger
                                                                                                                                                                                                                                                                                                                                                                                                                                                >[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                  property onResponse

                                                                                                                                                                                                                                                                                                                                                                                                                                                  onResponse?:
                                                                                                                                                                                                                                                                                                                                                                                                                                                  | onResponseMetaHookHandler<
                                                                                                                                                                                                                                                                                                                                                                                                                                                  RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  RawReply,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  NoInferCompat<SchemaCompiler>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  Logger
                                                                                                                                                                                                                                                                                                                                                                                                                                                  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                  | onResponseMetaHookHandler<
                                                                                                                                                                                                                                                                                                                                                                                                                                                  RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  RawReply,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  NoInferCompat<SchemaCompiler>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  Logger
                                                                                                                                                                                                                                                                                                                                                                                                                                                  >[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                    property onSend

                                                                                                                                                                                                                                                                                                                                                                                                                                                    onSend?:
                                                                                                                                                                                                                                                                                                                                                                                                                                                    | onSendMetaHookHandler<
                                                                                                                                                                                                                                                                                                                                                                                                                                                    unknown,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    RawReply,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    NoInferCompat<SchemaCompiler>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    Logger
                                                                                                                                                                                                                                                                                                                                                                                                                                                    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                    | onSendMetaHookHandler<
                                                                                                                                                                                                                                                                                                                                                                                                                                                    unknown,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    RawReply,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    NoInferCompat<SchemaCompiler>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    Logger
                                                                                                                                                                                                                                                                                                                                                                                                                                                    >[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                      property onTimeout

                                                                                                                                                                                                                                                                                                                                                                                                                                                      onTimeout?:
                                                                                                                                                                                                                                                                                                                                                                                                                                                      | onTimeoutMetaHookHandler<
                                                                                                                                                                                                                                                                                                                                                                                                                                                      RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      RawReply,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      NoInferCompat<SchemaCompiler>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      Logger
                                                                                                                                                                                                                                                                                                                                                                                                                                                      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                      | onTimeoutMetaHookHandler<
                                                                                                                                                                                                                                                                                                                                                                                                                                                      RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      RawReply,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      NoInferCompat<SchemaCompiler>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      Logger
                                                                                                                                                                                                                                                                                                                                                                                                                                                      >[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                        property prefixTrailingSlash

                                                                                                                                                                                                                                                                                                                                                                                                                                                        prefixTrailingSlash?: 'slash' | 'no-slash' | 'both';

                                                                                                                                                                                                                                                                                                                                                                                                                                                          property preHandler

                                                                                                                                                                                                                                                                                                                                                                                                                                                          preHandler?:
                                                                                                                                                                                                                                                                                                                                                                                                                                                          | preHandlerMetaHookHandler<
                                                                                                                                                                                                                                                                                                                                                                                                                                                          RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          RawReply,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          NoInferCompat<SchemaCompiler>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          Logger
                                                                                                                                                                                                                                                                                                                                                                                                                                                          >
                                                                                                                                                                                                                                                                                                                                                                                                                                                          | preHandlerMetaHookHandler<
                                                                                                                                                                                                                                                                                                                                                                                                                                                          RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          RawReply,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          NoInferCompat<SchemaCompiler>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          Logger
                                                                                                                                                                                                                                                                                                                                                                                                                                                          >[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                            property preParsing

                                                                                                                                                                                                                                                                                                                                                                                                                                                            preParsing?:
                                                                                                                                                                                                                                                                                                                                                                                                                                                            | preParsingMetaHookHandler<
                                                                                                                                                                                                                                                                                                                                                                                                                                                            RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            RawReply,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            NoInferCompat<SchemaCompiler>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            Logger
                                                                                                                                                                                                                                                                                                                                                                                                                                                            >
                                                                                                                                                                                                                                                                                                                                                                                                                                                            | preParsingMetaHookHandler<
                                                                                                                                                                                                                                                                                                                                                                                                                                                            RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            RawReply,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            NoInferCompat<SchemaCompiler>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            Logger
                                                                                                                                                                                                                                                                                                                                                                                                                                                            >[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                              property preSerialization

                                                                                                                                                                                                                                                                                                                                                                                                                                                              preSerialization?:
                                                                                                                                                                                                                                                                                                                                                                                                                                                              | preSerializationMetaHookHandler<
                                                                                                                                                                                                                                                                                                                                                                                                                                                              unknown,
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RawReply,
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                              NoInferCompat<SchemaCompiler>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                              TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                                                              Logger
                                                                                                                                                                                                                                                                                                                                                                                                                                                              >
                                                                                                                                                                                                                                                                                                                                                                                                                                                              | preSerializationMetaHookHandler<
                                                                                                                                                                                                                                                                                                                                                                                                                                                              unknown,
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RawReply,
                                                                                                                                                                                                                                                                                                                                                                                                                                                              RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                                              ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                              NoInferCompat<SchemaCompiler>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                              TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                                                              Logger
                                                                                                                                                                                                                                                                                                                                                                                                                                                              >[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                                property preValidation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                preValidation?:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                | preValidationMetaHookHandler<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                RawReply,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                NoInferCompat<SchemaCompiler>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                Logger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                | preValidationMetaHookHandler<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                RawReply,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                NoInferCompat<SchemaCompiler>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                Logger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                >[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  property schema

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  schema?: SchemaCompiler;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    property schemaErrorFormatter

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    schemaErrorFormatter?: SchemaErrorFormatter;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      property serializerCompiler

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      serializerCompiler?: FastifySerializerCompiler<NoInferCompat<SchemaCompiler>>;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        property validatorCompiler

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        validatorCompiler?: FastifySchemaCompiler<NoInferCompat<SchemaCompiler>>;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          property version

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          version?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            interface RouteShorthandOptionsWithHandler

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            interface RouteShorthandOptionsWithHandler<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ContextConfig = ContextConfigDefault,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            > extends RouteShorthandOptions<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            RawReply,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Logger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            > {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Shorthand options including the handler function property

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property handler

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            handler: RouteHandlerMethod<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            RawReply,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Logger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            >;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Type Aliases

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              type ConstructorAction

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              type ConstructorAction = 'error' | 'remove' | 'ignore';

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                type ContextConfigDefault

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                type ContextConfigDefault = unknown;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  type FastifyBodyParser

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  type FastifyBodyParser<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RawBody extends string | Buffer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  > =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | ((
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  request: FastifyRequest<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  TypeProvider
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  >,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  rawBody: RawBody,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  done: ContentTypeParserDoneFunction
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ) => void)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | ((
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  request: FastifyRequest<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  TypeProvider
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  >,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  rawBody: RawBody
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ) => Promise<any>);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Body parser method that operators on request body

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  type FastifyContentTypeParser

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  type FastifyContentTypeParser<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  > =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | ((
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  request: FastifyRequest<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  TypeProvider
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  >,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  payload: RawRequest
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ) => Promise<any>)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | ((
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  request: FastifyRequest<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  TypeProvider
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  >,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  payload: RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  done: ContentTypeParserDoneFunction
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ) => void);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Content Type Parser method that operates on request content

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  type FastifyErrorCodes

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  type FastifyErrorCodes = Record<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_NOT_FOUND'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_OPTIONS_NOT_OBJ'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_QSP_NOT_FN'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_ARR'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_VERSION_CONSTRAINT_NOT_STR'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_VALIDATION'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_CTP_ALREADY_PRESENT'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_CTP_INVALID_TYPE'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_CTP_EMPTY_TYPE'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_CTP_INVALID_HANDLER'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_CTP_INVALID_PARSE_TYPE'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_CTP_BODY_TOO_LARGE'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_CTP_INVALID_MEDIA_TYPE'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_CTP_INVALID_CONTENT_LENGTH'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_CTP_EMPTY_JSON_BODY'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_CTP_INSTANCE_ALREADY_STARTED'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_DEC_ALREADY_PRESENT'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_DEC_DEPENDENCY_INVALID_TYPE'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_DEC_MISSING_DEPENDENCY'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_DEC_AFTER_START'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_HOOK_INVALID_TYPE'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_HOOK_INVALID_HANDLER'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_HOOK_INVALID_ASYNC_HANDLER'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_HOOK_NOT_SUPPORTED'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_MISSING_MIDDLEWARE'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_HOOK_TIMEOUT'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_LOG_INVALID_DESTINATION'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_LOG_INVALID_LOGGER'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_REP_INVALID_PAYLOAD_TYPE'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_REP_ALREADY_SENT'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_REP_SENT_VALUE'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_SEND_INSIDE_ONERR'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_SEND_UNDEFINED_ERR'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_BAD_STATUS_CODE'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_BAD_TRAILER_NAME'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_BAD_TRAILER_VALUE'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_FAILED_ERROR_SERIALIZATION'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_MISSING_SERIALIZATION_FN'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_REQ_INVALID_VALIDATION_INVOCATION'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_SCH_MISSING_ID'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_SCH_ALREADY_PRESENT'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_SCH_CONTENT_MISSING_SCHEMA'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_SCH_DUPLICATE'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_SCH_VALIDATION_BUILD'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_SCH_SERIALIZATION_BUILD'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_SCH_RESPONSE_SCHEMA_NOT_NESTED_2XX'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_HTTP2_INVALID_VERSION'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_INIT_OPTS_INVALID'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_FORCE_CLOSE_CONNECTIONS_IDLE_NOT_AVAILABLE'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_DUPLICATED_ROUTE'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_BAD_URL'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_ASYNC_CONSTRAINT'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_DEFAULT_ROUTE_INVALID_TYPE'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_INVALID_URL'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_ROUTE_OPTIONS_NOT_OBJ'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_ROUTE_DUPLICATED_HANDLER'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_ROUTE_HANDLER_NOT_FN'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_ROUTE_MISSING_HANDLER'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_ROUTE_METHOD_INVALID'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_ROUTE_METHOD_NOT_SUPPORTED'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_ROUTE_BODY_VALIDATION_SCHEMA_NOT_SUPPORTED'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_ROUTE_BODY_LIMIT_OPTION_NOT_INT'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_ROUTE_REWRITE_NOT_STR'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_REOPENED_CLOSE_SERVER'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_REOPENED_SERVER'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_INSTANCE_ALREADY_LISTENING'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_PLUGIN_VERSION_MISMATCH'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_PLUGIN_NOT_PRESENT_IN_INSTANCE'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_PLUGIN_CALLBACK_NOT_FN'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_PLUGIN_NOT_VALID'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_ROOT_PLG_BOOTED'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_PARENT_PLUGIN_BOOTED'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 'FST_ERR_PLUGIN_TIMEOUT',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FastifyErrorConstructor
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  >;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    type FastifyHttp2Options

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    type FastifyHttp2Options<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Server extends http2.Http2Server,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    > = FastifyServerOptions<Server, Logger> & {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    http2: true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    http2SessionTimeout?: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      type FastifyHttp2SecureOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      type FastifyHttp2SecureOptions<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Server extends http2.Http2SecureServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      > = FastifyServerOptions<Server, Logger> & {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      http2: true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      https: http2.SecureServerOptions;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      http2SessionTimeout?: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        type FastifyHttpOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        type FastifyHttpOptions<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Server extends http.Server,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        > = FastifyServerOptions<Server, Logger> & {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        http?: http.ServerOptions | null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type FastifyHttpsOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type FastifyHttpsOptions<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Server extends https.Server,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          > = FastifyServerOptions<Server, Logger> & {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          https: https.ServerOptions | null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type FastifyLogFn

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type FastifyLogFn = pino.LogFn;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Standard Fastify logging function

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type FastifyLoggerInstance

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type FastifyLoggerInstance = FastifyBaseLogger;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Deprecated

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Use FastifyBaseLogger instead

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type FastifyPlugin

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type FastifyPlugin<Options extends FastifyPluginOptions = Record<never, never>> =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | FastifyPluginCallback<Options>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | FastifyPluginAsync<Options>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Generic plugin type.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Deprecated

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              union type doesn't work well with type inference in TS and is therefore deprecated in favor of explicit types. Use FastifyPluginCallback or FastifyPluginAsync instead. To activate plugins use FastifyRegister. https://fastify.dev/docs/latest/Reference/TypeScript/#register

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type FastifyPluginAsync

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type FastifyPluginAsync<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Options extends FastifyPluginOptions = Record<never, never>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Server extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            > = (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            instance: FastifyInstance<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Server,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            RawRequestDefaultExpression<Server>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            RawReplyDefaultExpression<Server>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Logger,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            TypeProvider
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            >,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            opts: Options
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ) => Promise<void>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • FastifyPluginAsync

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Fastify allows the user to extend its functionalities with plugins. A plugin can be a set of routes, a server decorator or whatever. To activate plugins, use the fastify.register() method.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type FastifyPluginCallback

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type FastifyPluginCallback<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Options extends FastifyPluginOptions = Record<never, never>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Server extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            > = (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            instance: FastifyInstance<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Server,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            RawRequestDefaultExpression<Server>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            RawReplyDefaultExpression<Server>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Logger,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            TypeProvider
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            >,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            opts: Options,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            done: (err?: Error) => void
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ) => void;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • FastifyPluginCallback

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Fastify allows the user to extend its functionalities with plugins. A plugin can be a set of routes, a server decorator or whatever. To activate plugins, use the fastify.register() method.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type FastifyPluginOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type FastifyPluginOptions = Record<string, any>;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              type FastifyRegisterOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              type FastifyRegisterOptions<Options> =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | (RegisterOptions & Options)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | ((instance: FastifyInstance) => RegisterOptions & Options);

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                type FastifySchemaCompiler

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                type FastifySchemaCompiler<T> = (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                routeSchema: FastifyRouteSchemaDef<T>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ) => FastifyValidationResult;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Compiler for FastifySchema Type

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                type FastifyServerFactoryHandler

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                type FastifyServerFactoryHandler<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                > = RawServer extends http.Server | https.Server
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ? (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                request: http.IncomingMessage & RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                response: http.ServerResponse & RawReply
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ) => void
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                : (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                request: http2.Http2ServerRequest & RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                response: http2.Http2ServerResponse & RawReply
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ) => void;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  type FastifyServerOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  type FastifyServerOptions<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  > = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ignoreTrailingSlash?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ignoreDuplicateSlashes?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  connectionTimeout?: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  keepAliveTimeout?: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  maxRequestsPerSocket?: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  forceCloseConnections?: boolean | 'idle';
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  requestTimeout?: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  pluginTimeout?: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  bodyLimit?: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  maxParamLength?: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  disableRequestLogging?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  exposeHeadRoutes?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  onProtoPoisoning?: ProtoAction;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  onConstructorPoisoning?: ConstructorAction;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  logger?:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | (FastifyLoggerOptions<RawServer> & PinoLoggerOptions)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Logger;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  serializerOpts?: FJSOptions | Record<string, unknown>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  serverFactory?: FastifyServerFactory<RawServer>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  caseSensitive?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  allowUnsafeRegex?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  requestIdHeader?: string | false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  requestIdLogLabel?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  useSemicolonDelimiter?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  jsonShorthand?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  genReqId?: (req: RawRequestDefaultExpression<RawServer>) => string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  trustProxy?: boolean | string | string[] | number | TrustProxyFunction;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  querystringParser?: (str: string) => { [key: string]: unknown };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  * @deprecated Prefer using the `constraints.version` property
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  versioning?: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  storage(): {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  get(version: string): string | null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  set(version: string, store: Function): void;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  del(version: string): void;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  empty(): void;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  deriveVersion<Context>(req: Object, ctx?: Context): string; // not a fan of using Object here. Also what is Context? Can either of these be better defined?
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  constraints?: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [name: string]: ConstraintStrategy<FindMyWayVersion<RawServer>, unknown>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  schemaController?: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  bucket?: (parentSchemas?: unknown) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  add(schema: unknown): FastifyInstance;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  getSchema(schemaId: string): unknown;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  getSchemas(): Record<string, unknown>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  compilersFactory?: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  buildValidator?: ValidatorFactory;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  buildSerializer?: SerializerFactory;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  return503OnClosing?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ajv?: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  customOptions?: AjvOptions;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  plugins?: (Function | [Function, unknown])[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  frameworkErrors?: <
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RequestGeneric extends RequestGenericInterface = RequestGenericInterface,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  SchemaCompiler extends FastifySchema = FastifySchema
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  >(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  error: FastifyError,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  req: FastifyRequest<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RequestGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FastifySchema,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  TypeProvider
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  >,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  res: FastifyReply<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RequestGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FastifyContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  TypeProvider
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ) => void;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  rewriteUrl?: (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  // The RawRequestDefaultExpression, RawReplyDefaultExpression, and FastifyTypeProviderDefault parameters
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  // should be narrowed further but those generic parameters are not passed to this FastifyServerOptions type
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  this: FastifyInstance<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Logger,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FastifyTypeProviderDefault
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  >,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  req: RawRequestDefaultExpression<RawServer>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ) => string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  schemaErrorFormatter?: SchemaErrorFormatter;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  * listener to error events emitted by client connections
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  clientErrorHandler?: (error: ConnectionError, socket: Socket) => void;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Options for a fastify server instance. Utilizes conditional logic on the generic server parameter to enforce certain https and http2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  type getDefaultJsonParser

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  type getDefaultJsonParser = (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  onProtoPoisoning: ProtoAction,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  onConstructorPoisoning: ConstructorAction
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ) => FastifyBodyParser<string>;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    type hasContentTypeParser

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    type hasContentTypeParser = (contentType: string | RegExp) => boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Checks for a type parser of a content type

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    type HookHandlerDoneFunction

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    type HookHandlerDoneFunction = <TError extends Error = FastifyError>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    err?: TError
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ) => void;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      type HTTPMethods

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      type HTTPMethods = Uppercase<_HTTPMethods> | Lowercase<_HTTPMethods>;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        type LogLevel

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        type LogLevel = pino.LevelWithSilent;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type ProtoAction

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type ProtoAction = 'error' | 'remove' | 'ignore';

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type RawReplyDefaultExpression

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type RawReplyDefaultExpression<RawServer extends RawServerBase = RawServerDefault> =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            RawServer extends http.Server | https.Server
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ? http.ServerResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            : RawServer extends http2.Http2Server | http2.Http2SecureServer
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ? http2.Http2ServerResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            : never;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • The default reply type based on the server type. Utilizes generic constraining.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type RawRequestDefaultExpression

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type RawRequestDefaultExpression<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            RawServer extends RawServerBase = RawServerDefault
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            > = RawServer extends http.Server | https.Server
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ? http.IncomingMessage
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            : RawServer extends http2.Http2Server | http2.Http2SecureServer
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ? http2.Http2ServerRequest
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            : never;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • The default request type based on the server type. Utilizes generic constraining.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type RawServerBase

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type RawServerBase =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | http.Server
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | https.Server
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | http2.Http2Server
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | http2.Http2SecureServer;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • A union type of the Node.js server types from the http, https, and http2 modules.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type RawServerDefault

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type RawServerDefault = http.Server;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • The default server type

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type RequestBodyDefault

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type RequestBodyDefault = unknown;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              type RequestHeadersDefault

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              type RequestHeadersDefault = unknown;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                type RequestParamsDefault

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                type RequestParamsDefault = unknown;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  type RequestQuerystringDefault

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  type RequestQuerystringDefault = unknown;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    type RouteHandler

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    type RouteHandler<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ContextConfig = ContextConfigDefault,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    > = (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    request: FastifyRequest<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Logger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    >,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    reply: FastifyReply<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    RawReply,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    TypeProvider
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ) => RouteGeneric['Reply'] | void | Promise<RouteGeneric['Reply'] | void>;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      type RouteHandlerMethod

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      type RouteHandlerMethod<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      RawServer extends RawServerBase = RawServerDefault,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ContextConfig = ContextConfigDefault,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      SchemaCompiler extends FastifySchema = FastifySchema,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Logger extends FastifyBaseLogger = FastifyBaseLogger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      > = (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      this: FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      request: FastifyRequest<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      TypeProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Logger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      >,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      reply: FastifyReply<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      RawServer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      RawRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      RawReply,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      RouteGeneric,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ContextConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      SchemaCompiler,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      TypeProvider
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      // This return type used to be a generic type argument. Due to TypeScript's inference of return types, this rendered returns unchecked.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ) => ResolveFastifyReplyReturnType<TypeProvider, SchemaCompiler, RouteGeneric>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Route handler method declaration.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      type ValidationResult

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      type ValidationResult = FastifySchemaValidationError;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Package Files (19)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Dependencies (16)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Dev Dependencies (45)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Peer Dependencies (0)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No peer dependencies.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Badge

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/fastify.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Markdown
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/fastify)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • HTML
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <a href="https://www.jsdocs.io/package/fastify"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>