diff --git a/index.node.js b/index.node.js index c413b11..d24cb03 100644 --- a/index.node.js +++ b/index.node.js @@ -1 +1 @@ -!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var E=t();for(var n in E)("object"==typeof exports?exports:e)[n]=E[n]}}(global,function(){return function(e){var t={};function E(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,E),r.l=!0,r.exports}return E.m=e,E.c=t,E.d=function(e,t,n){E.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},E.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},E.t=function(e,t){if(1&t&&(e=E(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(E.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)E.d(n,r,function(t){return e[t]}.bind(null,r));return n},E.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return E.d(t,"a",t),t},E.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},E.p="",E(E.s=0)}([function(e,t,E){"use strict";var n;E.r(t),function(e){e.OBJECT_DUPLICATE="OBJECT_DUPLICATE",e.OBJECT_NOT_FOUND="OBJECT_NOT_FOUND",e.OBJECT_IMMUTABLE="OBJECT_IMMUTABLE",e.OBJECT_DELETED="OBJECT_DELETED",e.TOKEN_EXPIRED="TOKEN_EXPIRED",e.TOKEN_MALFORMED="TOKEN_MALFORMED",e.ACCESS_DENIED="ACCESS_DENIED",e.INVALID_CREDENTIALS="INVALID_CREDENTIALS",e.QUERY_DEPTH_EXCEEDED="QUERY_DEPTH_EXCEEDED",e.QUERY_COMPLEXITY_EXCEEDED="QUERY_COMPLEXITY_EXCEEDED",e.QUERY_BREADTH_EXCEEDED="QUERY_BREADTH_EXCEEDED",e.INPUT_LIST_EMPTY="INPUT_LIST_EMPTY",e.INPUT_LIST_MIN="INPUT_LIST_MIN",e.INPUT_LIST_MAX="INPUT_LIST_MAX",e.INPUT_INVALID="INPUT_INVALID",e.UNKNOWN_ERROR="UKNOWN_ERROR"}(n||(n={})),E.d(t,"isValidCode",function(){return r}),E.d(t,"codes",function(){return n});const r=e=>Object.keys(n).includes(e)}])}); \ No newline at end of file +!function(e,E){if("object"==typeof exports&&"object"==typeof module)module.exports=E();else if("function"==typeof define&&define.amd)define([],E);else{var t=E();for(var n in t)("object"==typeof exports?exports:e)[n]=t[n]}}(global,function(){return function(e){var E={};function t(n){if(E[n])return E[n].exports;var r=E[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=e,t.c=E,t.d=function(e,E,n){t.o(e,E)||Object.defineProperty(e,E,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,E){if(1&E&&(e=t(e)),8&E)return e;if(4&E&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&E&&"string"!=typeof e)for(var r in e)t.d(n,r,function(E){return e[E]}.bind(null,r));return n},t.n=function(e){var E=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(E,"a",E),E},t.o=function(e,E){return Object.prototype.hasOwnProperty.call(e,E)},t.p="",t(t.s=0)}([function(e,E,t){"use strict";var n;t.r(E),function(e){e.OBJECT_DUPLICATE="OBJECT_DUPLICATE",e.OBJECT_NOT_FOUND="OBJECT_NOT_FOUND",e.OBJECT_IMMUTABLE="OBJECT_IMMUTABLE",e.OBJECT_DELETED="OBJECT_DELETED",e.TOKEN_EXPIRED="TOKEN_EXPIRED",e.TOKEN_MALFORMED="TOKEN_MALFORMED",e.ACCESS_DENIED="ACCESS_DENIED",e.INVALID_CREDENTIALS="INVALID_CREDENTIALS",e.QUERY_DEPTH_EXCEEDED="QUERY_DEPTH_EXCEEDED",e.QUERY_COMPLEXITY_EXCEEDED="QUERY_COMPLEXITY_EXCEEDED",e.QUERY_BREADTH_EXCEEDED="QUERY_BREADTH_EXCEEDED",e.INPUT_LIST_EMPTY="INPUT_LIST_EMPTY",e.INPUT_LIST_MIN="INPUT_LIST_MIN",e.INPUT_LIST_MAX="INPUT_LIST_MAX",e.INPUT_INVALID="INPUT_INVALID",e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.MAX_PAYLOAD_EXCEEDED="MAX_PAYLOAD_EXCEEDED"}(n||(n={})),t.d(E,"isValidCode",function(){return r}),t.d(E,"codes",function(){return n});const r=e=>Object.keys(n).includes(e)}])}); \ No newline at end of file diff --git a/index.web.js b/index.web.js index 49d0e3f..39ae06f 100644 --- a/index.web.js +++ b/index.web.js @@ -1 +1 @@ -!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var E=t();for(var n in E)("object"==typeof exports?exports:e)[n]=E[n]}}(window,function(){return function(e){var t={};function E(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,E),r.l=!0,r.exports}return E.m=e,E.c=t,E.d=function(e,t,n){E.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},E.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},E.t=function(e,t){if(1&t&&(e=E(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(E.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)E.d(n,r,function(t){return e[t]}.bind(null,r));return n},E.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return E.d(t,"a",t),t},E.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},E.p="",E(E.s=0)}([function(e,t,E){"use strict";var n;E.r(t),function(e){e.OBJECT_DUPLICATE="OBJECT_DUPLICATE",e.OBJECT_NOT_FOUND="OBJECT_NOT_FOUND",e.OBJECT_IMMUTABLE="OBJECT_IMMUTABLE",e.OBJECT_DELETED="OBJECT_DELETED",e.TOKEN_EXPIRED="TOKEN_EXPIRED",e.TOKEN_MALFORMED="TOKEN_MALFORMED",e.ACCESS_DENIED="ACCESS_DENIED",e.INVALID_CREDENTIALS="INVALID_CREDENTIALS",e.QUERY_DEPTH_EXCEEDED="QUERY_DEPTH_EXCEEDED",e.QUERY_COMPLEXITY_EXCEEDED="QUERY_COMPLEXITY_EXCEEDED",e.QUERY_BREADTH_EXCEEDED="QUERY_BREADTH_EXCEEDED",e.INPUT_LIST_EMPTY="INPUT_LIST_EMPTY",e.INPUT_LIST_MIN="INPUT_LIST_MIN",e.INPUT_LIST_MAX="INPUT_LIST_MAX",e.INPUT_INVALID="INPUT_INVALID",e.UNKNOWN_ERROR="UKNOWN_ERROR"}(n||(n={})),E.d(t,"isValidCode",function(){return r}),E.d(t,"codes",function(){return n});const r=e=>Object.keys(n).includes(e)}])}); \ No newline at end of file +!function(e,E){if("object"==typeof exports&&"object"==typeof module)module.exports=E();else if("function"==typeof define&&define.amd)define([],E);else{var t=E();for(var n in t)("object"==typeof exports?exports:e)[n]=t[n]}}(window,function(){return function(e){var E={};function t(n){if(E[n])return E[n].exports;var r=E[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=e,t.c=E,t.d=function(e,E,n){t.o(e,E)||Object.defineProperty(e,E,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,E){if(1&E&&(e=t(e)),8&E)return e;if(4&E&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&E&&"string"!=typeof e)for(var r in e)t.d(n,r,function(E){return e[E]}.bind(null,r));return n},t.n=function(e){var E=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(E,"a",E),E},t.o=function(e,E){return Object.prototype.hasOwnProperty.call(e,E)},t.p="",t(t.s=0)}([function(e,E,t){"use strict";var n;t.r(E),function(e){e.OBJECT_DUPLICATE="OBJECT_DUPLICATE",e.OBJECT_NOT_FOUND="OBJECT_NOT_FOUND",e.OBJECT_IMMUTABLE="OBJECT_IMMUTABLE",e.OBJECT_DELETED="OBJECT_DELETED",e.TOKEN_EXPIRED="TOKEN_EXPIRED",e.TOKEN_MALFORMED="TOKEN_MALFORMED",e.ACCESS_DENIED="ACCESS_DENIED",e.INVALID_CREDENTIALS="INVALID_CREDENTIALS",e.QUERY_DEPTH_EXCEEDED="QUERY_DEPTH_EXCEEDED",e.QUERY_COMPLEXITY_EXCEEDED="QUERY_COMPLEXITY_EXCEEDED",e.QUERY_BREADTH_EXCEEDED="QUERY_BREADTH_EXCEEDED",e.INPUT_LIST_EMPTY="INPUT_LIST_EMPTY",e.INPUT_LIST_MIN="INPUT_LIST_MIN",e.INPUT_LIST_MAX="INPUT_LIST_MAX",e.INPUT_INVALID="INPUT_INVALID",e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.MAX_PAYLOAD_EXCEEDED="MAX_PAYLOAD_EXCEEDED"}(n||(n={})),t.d(E,"isValidCode",function(){return r}),t.d(E,"codes",function(){return n});const r=e=>Object.keys(n).includes(e)}])}); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 030034b..39f92bf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@adgorithmics/graphql-errors", - "version": "1.1.0", + "version": "1.2.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -2199,7 +2199,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -2220,12 +2221,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2240,17 +2243,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -2367,7 +2373,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -2379,6 +2386,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -2393,6 +2401,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -2400,12 +2409,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -2424,6 +2435,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -2504,7 +2516,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -2516,6 +2529,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -2601,7 +2615,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -2637,6 +2652,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -2656,6 +2672,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -2699,12 +2716,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, diff --git a/package.json b/package.json index 155023d..8354dcd 100644 --- a/package.json +++ b/package.json @@ -1,51 +1,51 @@ { - "name": "@adgorithmics/graphql-errors", - "version": "1.1.0", - "description": "Response erorr codes for graphql.", - "main": "index.node.js", - "browser": "index.web.js", - "types": "src/index.d.ts", - "files": [ - "/src", - "/index.web.js", - "/index.node.js" - ], - "scripts": { - "build": "webpack", - "precommit": "npm run lint", - "prepush": "npm run lint", - "lint": "concurrently \"npm run lint:eslint\" \"npm run lint:prettier\"", - "lint:eslint": "eslint . --ext ts", - "lint:eslint:fix": "eslint . --ext ts --fix", - "lint:prettier": "prettier \"./src/**/*.ts\" -l", - "lint:prettier:fix": "prettier \"./src/**/*.ts\" --write" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/adgorithmics-inc/graphql-errors.git" - }, - "author": "Adgorithmics, LLC", - "license": "ISC", - "bugs": { - "url": "https://github.com/adgorithmics-inc/graphql-errors/issues" - }, - "homepage": "https://github.com/adgorithmics-inc/graphql-errors#readme", - "devDependencies": { - "@adgorithmics/eslint-config-base": "^1.3.0", - "concurrently": "4.1.2", - "prettier": "1.18.2", - "ts-loader": "6.0.4", - "typescript": "3.5.3", - "webpack": "4.39.3", - "webpack-cli": "3.3.7", - "@typescript-eslint/eslint-plugin": "2.0.0", - "@typescript-eslint/parser": "2.0.0", - "eslint": "6.2.0", - "eslint-config-prettier": "6.1.0" - }, - "prettier": { - "trailingComma": "all", - "tabWidth": 4, - "singleQuote": true - } + "name": "@adgorithmics/graphql-errors", + "version": "1.2.0", + "description": "Response error codes for graphql.", + "main": "index.node.js", + "browser": "index.web.js", + "types": "src/index.d.ts", + "files": [ + "/src", + "/index.web.js", + "/index.node.js" + ], + "scripts": { + "build": "webpack", + "precommit": "npm run lint", + "prepush": "npm run lint", + "lint": "concurrently \"npm run lint:eslint\" \"npm run lint:prettier\"", + "lint:eslint": "eslint . --ext ts", + "lint:eslint:fix": "eslint . --ext ts --fix", + "lint:prettier": "prettier \"./src/**/*.ts\" -l", + "lint:prettier:fix": "prettier \"./src/**/*.ts\" --write" + }, + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/adgorithmics-inc/graphql-errors.git" + }, + "author": "Adgorithmics, LLC", + "license": "ISC", + "bugs": { + "url": "https://github.com/adgorithmics-inc/graphql-errors/issues" + }, + "homepage": "https://github.com/adgorithmics-inc/graphql-errors#readme", + "devDependencies": { + "@adgorithmics/eslint-config-base": "^1.3.0", + "concurrently": "4.1.2", + "prettier": "1.18.2", + "ts-loader": "6.0.4", + "typescript": "3.5.3", + "webpack": "4.39.3", + "webpack-cli": "3.3.7", + "@typescript-eslint/eslint-plugin": "2.0.0", + "@typescript-eslint/parser": "2.0.0", + "eslint": "6.2.0", + "eslint-config-prettier": "6.1.0" + }, + "prettier": { + "trailingComma": "all", + "tabWidth": 4, + "singleQuote": true + } } diff --git a/src/lib/codes.d.ts b/src/lib/codes.d.ts index 8fbafe5..412288d 100644 --- a/src/lib/codes.d.ts +++ b/src/lib/codes.d.ts @@ -14,5 +14,6 @@ export declare enum codes { INPUT_LIST_MIN = "INPUT_LIST_MIN", INPUT_LIST_MAX = "INPUT_LIST_MAX", INPUT_INVALID = "INPUT_INVALID", - UNKNOWN_ERROR = "UKNOWN_ERROR" + UNKNOWN_ERROR = "UNKNOWN_ERROR", + MAX_PAYLOAD_EXCEEDED = "MAX_PAYLOAD_EXCEEDED" } diff --git a/src/lib/codes.ts b/src/lib/codes.ts index e2cf669..4e08964 100644 --- a/src/lib/codes.ts +++ b/src/lib/codes.ts @@ -41,5 +41,7 @@ export enum codes { // Mystery Flags // New phone, who dis? - UNKNOWN_ERROR = 'UKNOWN_ERROR', + UNKNOWN_ERROR = 'UNKNOWN_ERROR', + + MAX_PAYLOAD_EXCEEDED = 'MAX_PAYLOAD_EXCEEDED', }