diff --git a/index.node.js b/index.node.js index 1abe956..ad009f7 100644 --- a/index.node.js +++ b/index.node.js @@ -1 +1 @@ -!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.TOKEN_EXPIRED="TOKEN_EXPIRED",e.TOKEN_MALFORMED="TOKEN_MALFORMED",e.INVALID_REFRESH_TOKEN="INVALID_REFRESH_TOKEN",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 +!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.TOKEN_EXPIRED="TOKEN_EXPIRED",e.TOKEN_MALFORMED="TOKEN_MALFORMED",e.INVALID_REFRESH_TOKEN="INVALID_REFRESH_TOKEN",e.TOKEN_MISSING="TOKEN_MISSING",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 515bc50..b2255d3 100644 --- a/index.web.js +++ b/index.web.js @@ -1 +1 @@ -!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.TOKEN_EXPIRED="TOKEN_EXPIRED",e.TOKEN_MALFORMED="TOKEN_MALFORMED",e.INVALID_REFRESH_TOKEN="INVALID_REFRESH_TOKEN",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 +!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.TOKEN_EXPIRED="TOKEN_EXPIRED",e.TOKEN_MALFORMED="TOKEN_MALFORMED",e.INVALID_REFRESH_TOKEN="INVALID_REFRESH_TOKEN",e.TOKEN_MISSING="TOKEN_MISSING",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/src/lib/codes.d.ts b/src/lib/codes.d.ts index 519195d..c908fe5 100644 --- a/src/lib/codes.d.ts +++ b/src/lib/codes.d.ts @@ -5,6 +5,7 @@ export declare enum codes { TOKEN_EXPIRED = 'TOKEN_EXPIRED', TOKEN_MALFORMED = 'TOKEN_MALFORMED', INVALID_REFRESH_TOKEN = 'INVALID_REFRESH_TOKEN', + TOKEN_MISSING = 'TOKEN_MISSING', ACCESS_DENIED = 'ACCESS_DENIED', INVALID_CREDENTIALS = 'INVALID_CREDENTIALS', QUERY_DEPTH_EXCEEDED = 'QUERY_DEPTH_EXCEEDED', diff --git a/src/lib/codes.ts b/src/lib/codes.ts index 04cf948..7bdecce 100644 --- a/src/lib/codes.ts +++ b/src/lib/codes.ts @@ -14,6 +14,8 @@ export enum codes { TOKEN_MALFORMED = 'TOKEN_MALFORMED', // Refresh token is invalid INVALID_REFRESH_TOKEN = 'INVALID_REFRESH_TOKEN', + // No token provided + TOKEN_MISSING = 'TOKEN_MISSING', // Permissions Flags // User has insufficient permissions for the desired action @@ -39,9 +41,9 @@ export enum codes { // User input invalid INPUT_INVALID = 'INPUT_INVALID', - // Mystery Flags - // New phone, who dis? + // Something went wrong UNKNOWN_ERROR = 'UNKNOWN_ERROR', + // The amount of data requested exceeds the allowable limit. MAX_PAYLOAD_EXCEEDED = 'MAX_PAYLOAD_EXCEEDED', }