{"version":3,"file":"internal-types.js","sourceRoot":"","sources":["../../src/internal-types.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIU,QAAA,iBAAiB,GAAG,YAAY,CAAC;AAE9C;;;;;GAKG;AACU,QAAA,cAAc,GAAkB,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAiC/D,QAAA,aAAa,GAAG;IAC3B,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,GAAG,EAAE,YAAY;CAClB,CAAC;AAEW,QAAA,wBAAwB,GAAG,IAAI,GAAG,CAAC;IAC9C,WAAW;IACX,eAAe;IACf,YAAY;IACZ,cAAc;IACd,eAAe;IACf,eAAe;IACf,WAAW;CACZ,CAAC,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type * as Hapi from '@hapi/hapi';\n\nexport const HapiComponentName = '@hapi/hapi';\n\n/**\n * This symbol is used to mark a Hapi route handler or server extension handler as\n * already patched, since its possible to use these handlers multiple times\n * i.e. when allowing multiple versions of one plugin, or when registering a plugin\n * multiple times on different servers.\n */\nexport const handlerPatched: unique symbol = Symbol('hapi-handler-patched');\n\nexport type HapiServerRouteInputMethod = (route: HapiServerRouteInput) => void;\n\nexport type HapiServerRouteInput =\n  | PatchableServerRoute\n  | PatchableServerRoute[];\n\nexport type PatchableServerRoute = Hapi.ServerRoute<any> & {\n  [handlerPatched]?: boolean;\n};\n\nexport type HapiPluginObject<T> = Hapi.ServerRegisterPluginObject<T>;\n\nexport type HapiPluginInput<T> =\n  | HapiPluginObject<T>\n  | Array<HapiPluginObject<T>>;\n\nexport type RegisterFunction<T> = (\n  plugin: HapiPluginInput<T>,\n  options?: Hapi.ServerRegisterOptions\n) => Promise<void>;\n\nexport type PatchableExtMethod = Hapi.Lifecycle.Method & {\n  [handlerPatched]?: boolean;\n};\n\nexport type ServerExtDirectInput = [\n  Hapi.ServerRequestExtType,\n  Hapi.Lifecycle.Method,\n  (Hapi.ServerExtOptions | undefined)?,\n];\n\nexport const HapiLayerType = {\n  ROUTER: 'router',\n  PLUGIN: 'plugin',\n  EXT: 'server.ext',\n};\n\nexport const HapiLifecycleMethodNames = new Set([\n  'onPreAuth',\n  'onCredentials',\n  'onPostAuth',\n  'onPreHandler',\n  'onPostHandler',\n  'onPreResponse',\n  'onRequest',\n]);\n"]}