@uphold/fastify-openapi-router-plugin 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/types/index.d.ts +9 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uphold/fastify-openapi-router-plugin",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "A plugin for Fastify to connect routes with a OpenAPI 3.x specification",
5
5
  "main": "./src/index.js",
6
6
  "types": "./types/index.d.ts",
package/types/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { RouteOptions as FastifyRouteOptions, FastifyPluginCallback, FastifyRequest } from 'fastify'
2
2
  import OpenAPI from 'openapi-types';
3
3
  import { DECORATOR_NAME } from '../src/utils/constants'
4
- import { errors } from '../src/errors'
4
+ import { errors } from '../src'
5
5
 
6
6
  declare module 'fastify' {
7
7
  interface FastifyRequest {
@@ -55,6 +55,14 @@ export interface PluginOptions {
55
55
 
56
56
  export const openApiRouterPlugin: FastifyPluginCallback<PluginOptions>
57
57
 
58
+ export function verifyScopes(providedScopes: string[], requiredScopes: string[]): string[]
59
+
60
+ export function createSecurityHandlerError(error: Error, force?: boolean): typeof errors.SecurityHandlerError
61
+
62
+ export function createScopesMismatchError(providedScopes: string[], requiredScopes: string[], missingScopes: string[]): typeof errors.ScopesMismatchError
63
+
64
+ export function createUnauthorizedError(securityReport: SecurityReport): typeof errors.UnauthorizedError
65
+
58
66
  export { errors }
59
67
 
60
68
  export default openApiRouterPlugin