@spytecgps/lambda-utils 1.0.14 → 1.0.16

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,6 @@
1
+ import { HttpError } from './HttpError';
2
+ export default class ConflictError extends HttpError {
3
+ code: number;
4
+ statusCode: number;
5
+ name: string;
6
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ extendStatics(d, b);
11
+ function __() { this.constructor = d; }
12
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
+ };
14
+ })();
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ var HttpError_1 = require("./HttpError");
17
+ var ConflictError = /** @class */ (function (_super) {
18
+ __extends(ConflictError, _super);
19
+ function ConflictError() {
20
+ var _this = _super !== null && _super.apply(this, arguments) || this;
21
+ _this.code = 409;
22
+ _this.statusCode = 409;
23
+ _this.name = 'ConflictError';
24
+ return _this;
25
+ }
26
+ return ConflictError;
27
+ }(HttpError_1.HttpError));
28
+ exports.default = ConflictError;
@@ -2,4 +2,5 @@ import BadRequestError from './BadRequestError';
2
2
  import NotFoundError from './NotFoundError';
3
3
  import UnauthorizedError from './UnauthorizedError';
4
4
  import ForbiddenError from './ForbiddenError';
5
- export { BadRequestError, NotFoundError, UnauthorizedError, ForbiddenError };
5
+ import ConflictError from './ConflictError';
6
+ export { BadRequestError, NotFoundError, UnauthorizedError, ForbiddenError, ConflictError };
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ForbiddenError = exports.UnauthorizedError = exports.NotFoundError = exports.BadRequestError = void 0;
6
+ exports.ConflictError = exports.ForbiddenError = exports.UnauthorizedError = exports.NotFoundError = exports.BadRequestError = void 0;
7
7
  var BadRequestError_1 = __importDefault(require("./BadRequestError"));
8
8
  exports.BadRequestError = BadRequestError_1.default;
9
9
  var NotFoundError_1 = __importDefault(require("./NotFoundError"));
@@ -12,3 +12,5 @@ var UnauthorizedError_1 = __importDefault(require("./UnauthorizedError"));
12
12
  exports.UnauthorizedError = UnauthorizedError_1.default;
13
13
  var ForbiddenError_1 = __importDefault(require("./ForbiddenError"));
14
14
  exports.ForbiddenError = ForbiddenError_1.default;
15
+ var ConflictError_1 = __importDefault(require("./ConflictError"));
16
+ exports.ConflictError = ConflictError_1.default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spytecgps/lambda-utils",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "description": "Lambda Utils",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",