@spytecgps/lambda-utils 0.0.2 → 0.0.5

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.
@@ -0,0 +1,4 @@
1
+ import { APIGatewayProxyResult } from 'aws-lambda';
2
+ import { WrapperArgs } from './types';
3
+ declare const apiGwWrapper: <E, R>({ event, schema, handler }: WrapperArgs<E, R>) => Promise<APIGatewayProxyResult>;
4
+ export default apiGwWrapper;
@@ -0,0 +1,3 @@
1
+ export default class UnauthorizedError extends Error {
2
+ code: number;
3
+ }
@@ -1,3 +1,4 @@
1
1
  import BadRequestError from './BadRequestError';
2
2
  import NotFoundError from './NotFoundError';
3
- export { BadRequestError, NotFoundError };
3
+ import UnauthorizedError from './UnauthorizedError';
4
+ export { BadRequestError, NotFoundError, UnauthorizedError };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- import wrapper from './wrapper';
2
- import * as errors from './errors';
3
- export { wrapper, errors };
1
+ export * from './wrappers';
2
+ export * from './errors';