@workast/sdk 2.3.0 → 3.1.0
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.
- package/README.md +156 -58
- package/dist/chunk-LR7MGXLV.js +1851 -0
- package/dist/chunk-LR7MGXLV.js.map +1 -0
- package/dist/index.cjs +1875 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +15911 -0
- package/dist/index.d.ts +15911 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/mock.cjs +4591 -0
- package/dist/mock.cjs.map +1 -0
- package/dist/mock.d.cts +115 -0
- package/dist/mock.d.ts +115 -0
- package/dist/mock.js +2736 -0
- package/dist/mock.js.map +1 -0
- package/package.json +44 -52
- package/CHANGELOG.md +0 -59
- package/dist/workast.min.js +0 -1
- package/index.d.ts +0 -163
- package/lib/workast.js +0 -1850
package/dist/workast.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
window.Workast=function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=20)}([function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}}},function(t,e){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}},function(t,e,r){var n,o,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,o=[],void 0===(i="function"==typeof(n=function(){"use strict";var e=r(18),n=r(53),o=r(54),i=r(19);t.exports={generateMethod:e,generateBasicMethods:n,RESOURCE_PATH:o,BASIC_METHODS:i}})?n.apply(e,o):n)||(t.exports=i)},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function r(e){return t.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},r(e)}t.exports=r},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Array.isArray,i=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),a=function(t,e){for(var r=e&&e.plainObjects?Object.create(null):{},n=0;n<t.length;++n)void 0!==t[n]&&(r[n]=t[n]);return r};t.exports={arrayToObject:a,assign:function(t,e){return Object.keys(e).reduce((function(t,r){return t[r]=e[r],t}),t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],r=[],n=0;n<e.length;++n)for(var i=e[n],a=i.obj[i.prop],s=Object.keys(a),c=0;c<s.length;++c){var u=s[c],l=a[u];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(e.push({obj:a,prop:u}),r.push(l))}return function(t){for(;t.length>1;){var e=t.pop(),r=e.obj[e.prop];if(o(r)){for(var n=[],i=0;i<r.length;++i)void 0!==r[i]&&n.push(r[i]);e.obj[e.prop]=n}}}(e),t},decode:function(t,e,r){var n=t.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(t){return n}},encode:function(t,e,r){if(0===t.length)return t;var n=t;if("symbol"==typeof t?n=Symbol.prototype.toString.call(t):"string"!=typeof t&&(n=String(t)),"iso-8859-1"===r)return escape(n).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var o="",a=0;a<n.length;++a){var s=n.charCodeAt(a);45===s||46===s||95===s||126===s||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122?o+=n.charAt(a):s<128?o+=i[s]:s<2048?o+=i[192|s>>6]+i[128|63&s]:s<55296||s>=57344?o+=i[224|s>>12]+i[128|s>>6&63]+i[128|63&s]:(a+=1,s=65536+((1023&s)<<10|1023&n.charCodeAt(a)),o+=i[240|s>>18]+i[128|s>>12&63]+i[128|s>>6&63]+i[128|63&s])}return o},isBuffer:function(t){return!(!t||"object"!=typeof t)&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(o(t)){for(var r=[],n=0;n<t.length;n+=1)r.push(e(t[n]));return r}return e(t)},merge:function t(e,r,i){if(!r)return e;if("object"!=typeof r){if(o(e))e.push(r);else{if(!e||"object"!=typeof e)return[e,r];(i&&(i.plainObjects||i.allowPrototypes)||!n.call(Object.prototype,r))&&(e[r]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(r);var s=e;return o(e)&&!o(r)&&(s=a(e,i)),o(e)&&o(r)?(r.forEach((function(r,o){if(n.call(e,o)){var a=e[o];a&&"object"==typeof a&&r&&"object"==typeof r?e[o]=t(a,r,i):e.push(r)}else e[o]=r})),e):Object.keys(r).reduce((function(e,o){var a=r[o];return n.call(e,o)?e[o]=t(e[o],a,i):e[o]=a,e}),s)}}},function(t,e,r){var n=r(7);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n(t,e)}},function(t,e){function r(e,n){return t.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(e,n)}t.exports=r},function(t,e,r){var n=r(44),o=r(16);t.exports=function(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?o(t):e}},function(t,e,r){t.exports=r(21)},function(t,e){function r(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function s(t){r(a,o,i,s,c,"next",t)}function c(t){r(a,o,i,s,c,"throw",t)}s(void 0)}))}}},function(t,e,r){var n=r(24),o=r(25),i=r(26),a=r(28);t.exports=function(t,e){return n(t)||o(t,e)||i(t,e)||a()}},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){return null!==t&&"object"===n(t)}},function(t,e,r){var n,o,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,o=[r(11)],void 0===(i="function"==typeof(n=function(e){"use strict";var n=r(0);e=n(e);var o=r(37),i=r(38),a=r(40);function s(t){return"string"==typeof t}t.exports={isNonEmptyString:function(t){return s(t)&&t.length>0},isInteger:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.min,n=void 0===r?-1/0:r,o=e.max,i=void 0===o?1/0:o;return Number.isInteger(t)&&t>=n&&t<=i},normalizeUrl:function(t,e){var r=t.endsWith("/")?t.slice(0,-1):t,n=e.startsWith("/")?e:"/".concat(e);return r.concat(n)},buildMultipartFields:function(t){return t&&Object.keys(t).length?a.stringify(t,{encode:!1,delimiter:"|&|"}).split("|&|").reduce((function(t,r){var n=r.split("="),o=(0,e.default)(n,2),i=o[0],a=o[1];return t[i]=a,t}),{}):{}},isString:s,isObject:o,get:i,isFunction:function(t){return"function"==typeof t}}})?n.apply(e,o):n)||(t.exports=i)},function(t,e,r){"use strict";var n=String.prototype.replace,o=/%20/g,i=r(5),a={RFC1738:"RFC1738",RFC3986:"RFC3986"};t.exports=i.assign({default:a.RFC3986,formatters:{RFC1738:function(t){return n.call(t,o,"+")},RFC3986:function(t){return String(t)}}},a)},function(t,e,r){var n,o,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,o=[],void 0===(i="function"==typeof(n=function(){"use strict";var e=r(43),n=r(49);t.exports={WorkastInvalidParameterError:e,WorkastHTTPError:n}})?n.apply(e,o):n)||(t.exports=i)},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e,r){var n,o,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,o=[r(3),r(16),r(6),r(8),r(4),r(45)],void 0===(i="function"==typeof(n=function(e,n,o,i,a,s){"use strict";var c=r(0);function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,a.default)(t);if(e){var o=(0,a.default)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return(0,i.default)(this,r)}}e=c(e),n=c(n),o=c(o),i=c(i),a=c(a);var l=function(t){(0,o.default)(i,t);var r=u(i);function i(t){var o;return(0,e.default)(this,i),(o=r.call(this)).message=t,o.name=o.constructor.name,o.isWorkastSDKError=!0,Error.captureStackTrace((0,n.default)(o),o.constructor),o}return i}((0,(s=c(s)).default)(Error));t.exports=l})?n.apply(e,o):n)||(t.exports=i)},function(t,e,r){var n,o,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,o=[r(9),r(1),r(10)],void 0===(i="function"==typeof(n=function(e,n,o){"use strict";var i=r(0);function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach((function(e){(0,n.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}e=i(e),n=i(n),o=i(o);var c=r(15).WorkastInvalidParameterError;t.exports=function(t,r){return(0,o.default)(e.default.mark((function n(){var o,i,a,u,l,f,p,h,d,y=arguments;return e.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(o=(r.path.match(/{\w+}/g)||[]).length,i=y.length,a=new Array(i),u=0;u<i;u++)a[u]=y[u];if(!(a.length<o)){e.next=4;break}throw new c("Missing URL params");case 4:for(l=r.path,f=0;f<o;f+=1)l=l.replace(/{\w+}/,a[f]);return["GET","HEAD"].includes(r.method)?p=a[o]:h=a[o],d=a[o+1]||{},e.abrupt("return",t.apiCall(s(s({},d),{},{method:r.method,path:l,query:p,body:h})));case 9:case"end":return e.stop()}}),n)})))}})?n.apply(e,o):n)||(t.exports=i)},function(t,e,r){var n,o,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,o=[],void 0===(i="function"==typeof(n=function(){"use strict";t.exports={CREATE:"create",LIST:"list",RETRIEVE:"retrieve",UPDATE:"update",DELETE:"del"}})?n.apply(e,o):n)||(t.exports=i)},function(t,e,r){var n,o,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,o=[r(9),r(22),r(1),r(10),r(11),r(3),r(29)],void 0===(i="function"==typeof(n=function(e,n,o,i,a,s,c){"use strict";var u=r(0);e=u(e),n=u(n),o=u(o),i=u(i),a=u(a),s=u(s),c=u(c);var l=r(30),f=r(13),p=r(15),h=p.WorkastInvalidParameterError,d=p.WorkastHTTPError,y=r(50).version,m=r(51),b=function(){function t(e){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,s.default)(this,t);var o=f.get(n,"timeout",t.DEFAULT_TIMEOUT),i=f.get(n,"maxRetries",t.DEFAULT_MAX_RETRIES),c=f.get(n,"apiBaseUrl",t.DEFAULT_API_BASE_URL),u=f.get(n,"authBaseUrl",t.DEFAULT_AUTH_BASE_URL);if(!f.isNonEmptyString(e))throw new h("Token must be a non-empty string.");if(!f.isInteger(o,{min:1}))throw new h("Timeout must be an integer greater than zero.");if(!f.isInteger(i,{min:0}))throw new h("Max retries must be an integer greater than or equal to zero.");if(!f.isNonEmptyString(c))throw new h("API base URL must be a non-empty string.");if(!f.isNonEmptyString(u))throw new h("Auth base URL must be a non-empty string.");this.config={token:e,timeout:o,maxRetries:i,apiBaseUrl:c,authBaseUrl:u},Object.entries(m).forEach((function(t){var e=(0,a.default)(t,2),n=e[0],o=e[1];r[n]=o(r)}))}var r;return(0,c.default)(t,null,[{key:"DEFAULT_TIMEOUT",get:function(){return 12e4}},{key:"DEFAULT_MAX_RETRIES",get:function(){return 0}},{key:"DEFAULT_API_BASE_URL",get:function(){return"https://api.todobot.io"}},{key:"DEFAULT_AUTH_BASE_URL",get:function(){return"https://my.workast.io"}},{key:"ALLOWED_HTTP_METHODS",get:function(){return["GET","HEAD","POST","PUT","DELETE","PATCH"]}},{key:"IMPERSONATE_TEAM_HEADER",get:function(){return"W-TEAM-ID"}},{key:"IMPERSONATE_USER_HEADER",get:function(){return"W-USER-ID"}},{key:"AUTHENTICATION_SCHEME",get:function(){return"Bearer"}},{key:"DEFAULT_CONTENT_TYPE",get:function(){return"application/json"}},{key:"CLIENT_HEADER",get:function(){return"X-Workast-Client"}},{key:"CLIENT_NAME",get:function(){return"workast-sdk-js/".concat(y)}}]),(0,c.default)(t,[{key:"apiCall",value:(r=(0,i.default)(e.default.mark((function r(){var i,a,s,c,u,p,y,m,b,v,g,T,O,w,E,_,S,j,x=arguments;return e.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=x.length>0&&void 0!==x[0]?x[0]:{},a=f.get(i,"baseUrl",this.config.apiBaseUrl),s=f.get(i,"timeout",this.config.timeout),c=f.get(i,"maxRetries",this.config.maxRetries),u=f.get(i,"method","GET"),p=f.get(i,"path","/"),y=f.get(i,"query",{}),m=f.get(i,"body",{}),b=f.get(i,"impersonate.team"),v=f.get(i,"impersonate.user"),g=f.get(i,"onProgress"),f.isNonEmptyString(a)){e.next=13;break}throw new h("Base URL must be a non-empty string.");case 13:if(f.isInteger(s,{min:1})){e.next=15;break}throw new h("Timeout must be an integer greater than zero.");case 15:if(f.isInteger(c,{min:0})){e.next=17;break}throw new h("Max retries must be an integer greater than or equal to zero.");case 17:if(t.ALLOWED_HTTP_METHODS.includes(u)){e.next=19;break}throw new h("Method must be one of ".concat(t.ALLOWED_HTTP_METHODS.join(", "),"."));case 19:if(f.isString(p)){e.next=21;break}throw new h("Path must be a string.");case 21:if(f.isObject(y)){e.next=23;break}throw new h("Query must be an object.");case 23:if(f.isObject(m)){e.next=25;break}throw new h("Body must be an object.");case 25:if(!b||f.isString(b)){e.next=27;break}throw new h("Impersonated team must be a string.");case 27:if(!v||f.isString(v)){e.next=29;break}throw new h("Impersonated user must be a string.");case 29:if(!g||f.isFunction(g)){e.next=31;break}throw new h("Progress callback must be a function.");case 31:return T=f.normalizeUrl(a,p),O=(0,o.default)({Accept:t.DEFAULT_CONTENT_TYPE,Authorization:"".concat(t.AUTHENTICATION_SCHEME," ").concat(this.config.token)},t.CLIENT_HEADER,t.CLIENT_NAME),b&&(O[t.IMPERSONATE_TEAM_HEADER]=b),v&&(O[t.IMPERSONATE_USER_HEADER]=v),e.prev=35,w=l(u,T).timeout(s).retry(c).set(O),["GET","HEAD"].includes(u)?w.query(y):(E=m.file,_=(0,n.default)(m,["file"]),E?(S=f.buildMultipartFields(_),w.field(S).attach("file",E)):w.send(_).type(t.DEFAULT_CONTENT_TYPE)),g&&w.on("progress",g),e.next=41,w;case 41:return j=e.sent,e.abrupt("return",204===j.status?void 0:j.body);case 45:throw e.prev=45,e.t0=e.catch(35),new d(e.t0);case 48:case"end":return e.stop()}}),r,this,[[35,45]])}))),function(){return r.apply(this,arguments)})}]),t}();t.exports=b})?n.apply(e,o):n)||(t.exports=i)},function(t,e,r){var n=function(t){"use strict";var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=T(a,r);if(s){if(s===l)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=u(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var l={};function f(){}function p(){}function h(){}var d={};d[o]=function(){return this};var y=Object.getPrototypeOf,m=y&&y(y(_([])));m&&m!==e&&r.call(m,o)&&(d=m);var b=h.prototype=f.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){var n;this._invoke=function(o,i){function a(){return new e((function(n,a){!function n(o,i,a,s){var c=u(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,s)}))}s(c.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function T(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,T(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=b.constructor=h,h.constructor=p,p.displayName=s(h,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,s(t,a,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},v(g.prototype),g.prototype[i]=function(){return this},t.AsyncIterator=g,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new g(c(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(b),s(b,a,"Generator"),b[o]=function(){return this},b.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),w(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;w(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e,r){var n=r(23);t.exports=function(t,e){if(null==t)return{};var r,o,i=n(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(o=0;o<a.length;o++)r=a[o],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}},function(t,e){t.exports=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}return r}}},function(t,e,r){var n=r(27);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e){function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o;"undefined"!=typeof window?o=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),o=void 0):o=self;var i=r(31),a=r(32),s=r(33),c=r(12),u=r(34),l=r(36);function f(){}t.exports=function(t,r){return"function"==typeof r?new e.Request("GET",t).end(r):1===arguments.length?new e.Request("GET",t):new e.Request(t,r)};var p=e=t.exports;e.Request=g,p.getXHR=function(){if(o.XMLHttpRequest&&(!o.location||"file:"!==o.location.protocol||!o.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){}throw new Error("Browser-only version of superagent could not find XHR")};var h="".trim?function(t){return t.trim()}:function(t){return t.replace(/(^\s*|\s*$)/g,"")};function d(t){if(!c(t))return t;var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&y(e,r,t[r]);return e.join("&")}function y(t,e,r){if(void 0!==r)if(null!==r)if(Array.isArray(r))r.forEach((function(r){y(t,e,r)}));else if(c(r))for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&y(t,"".concat(e,"[").concat(n,"]"),r[n]);else t.push(encodeURI(e)+"="+encodeURIComponent(r));else t.push(encodeURI(e))}function m(t){for(var e,r,n={},o=t.split("&"),i=0,a=o.length;i<a;++i)-1===(r=(e=o[i]).indexOf("="))?n[decodeURIComponent(e)]="":n[decodeURIComponent(e.slice(0,r))]=decodeURIComponent(e.slice(r+1));return n}function b(t){return/[/+]json($|[^-\w])/.test(t)}function v(t){this.req=t,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var e=this.xhr.status;1223===e&&(e=204),this._setStatusProperties(e),this.headers=function(t){for(var e,r,n,o,i=t.split(/\r?\n/),a={},s=0,c=i.length;s<c;++s)-1!==(e=(r=i[s]).indexOf(":"))&&(n=r.slice(0,e).toLowerCase(),o=h(r.slice(e+1)),a[n]=o);return a}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&t._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function g(t,e){var r=this;this._query=this._query||[],this.method=t,this.url=e,this.header={},this._header={},this.on("end",(function(){var t,e=null,n=null;try{n=new v(r)}catch(t){return(e=new Error("Parser is unable to parse the response")).parse=!0,e.original=t,r.xhr?(e.rawResponse=void 0===r.xhr.responseType?r.xhr.responseText:r.xhr.response,e.status=r.xhr.status?r.xhr.status:null,e.statusCode=e.status):(e.rawResponse=null,e.status=null),r.callback(e)}r.emit("response",n);try{r._isResponseOK(n)||(t=new Error(n.statusText||n.text||"Unsuccessful HTTP response"))}catch(e){t=e}t?(t.original=e,t.response=n,t.status=n.status,r.callback(t,n)):r.callback(null,n)}))}function T(t,e,r){var n=p("DELETE",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n}p.serializeObject=d,p.parseString=m,p.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},p.serialize={"application/x-www-form-urlencoded":d,"application/json":a},p.parse={"application/x-www-form-urlencoded":m,"application/json":JSON.parse},u(v.prototype),v.prototype._parseBody=function(t){var e=p.parse[this.type];return this.req._parser?this.req._parser(this,t):(!e&&b(this.type)&&(e=p.parse["application/json"]),e&&t&&(t.length>0||t instanceof Object)?e(t):null)},v.prototype.toError=function(){var t=this.req,e=t.method,r=t.url,n="cannot ".concat(e," ").concat(r," (").concat(this.status,")"),o=new Error(n);return o.status=this.status,o.method=e,o.url=r,o},p.Response=v,i(g.prototype),s(g.prototype),g.prototype.type=function(t){return this.set("Content-Type",p.types[t]||t),this},g.prototype.accept=function(t){return this.set("Accept",p.types[t]||t),this},g.prototype.auth=function(t,e,r){1===arguments.length&&(e=""),"object"===n(e)&&null!==e&&(r=e,e=""),r||(r={type:"function"==typeof btoa?"basic":"auto"});var o=function(t){if("function"==typeof btoa)return btoa(t);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(t,e,r,o)},g.prototype.query=function(t){return"string"!=typeof t&&(t=d(t)),t&&this._query.push(t),this},g.prototype.attach=function(t,e,r){if(e){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(t,e,r||e.name)}return this},g.prototype._getFormData=function(){return this._formData||(this._formData=new o.FormData),this._formData},g.prototype.callback=function(t,e){if(this._shouldRetry(t,e))return this._retry();var r=this._callback;this.clearTimeout(),t&&(this._maxRetries&&(t.retries=this._retries-1),this.emit("error",t)),r(t,e)},g.prototype.crossDomainError=function(){var t=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");t.crossDomain=!0,t.status=this.status,t.method=this.method,t.url=this.url,this.callback(t)},g.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},g.prototype.ca=g.prototype.agent,g.prototype.buffer=g.prototype.ca,g.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},g.prototype.pipe=g.prototype.write,g.prototype._isHost=function(t){return t&&"object"===n(t)&&!Array.isArray(t)&&"[object Object]"!==Object.prototype.toString.call(t)},g.prototype.end=function(t){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=t||f,this._finalizeQueryString(),this._end()},g.prototype._setUploadTimeout=function(){var t=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout((function(){t._timeoutError("Upload timeout of ",t._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},g.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var t=this;this.xhr=p.getXHR();var e=this.xhr,r=this._formData||this._data;this._setTimeouts(),e.onreadystatechange=function(){var r=e.readyState;if(r>=2&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4===r){var n;try{n=e.status}catch(t){n=0}if(!n){if(t.timedout||t._aborted)return;return t.crossDomainError()}t.emit("end")}};var n=function(e,r){r.total>0&&(r.percent=r.loaded/r.total*100,100===r.percent&&clearTimeout(t._uploadTimeoutTimer)),r.direction=e,t.emit("progress",r)};if(this.hasListeners("progress"))try{e.addEventListener("progress",n.bind(null,"download")),e.upload&&e.upload.addEventListener("progress",n.bind(null,"upload"))}catch(t){}e.upload&&this._setUploadTimeout();try{this.username&&this.password?e.open(this.method,this.url,!0,this.username,this.password):e.open(this.method,this.url,!0)}catch(t){return this.callback(t)}if(this._withCredentials&&(e.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof r&&!this._isHost(r)){var o=this._header["content-type"],i=this._serializer||p.serialize[o?o.split(";")[0]:""];!i&&b(o)&&(i=p.serialize["application/json"]),i&&(r=i(r))}for(var a in this.header)null!==this.header[a]&&Object.prototype.hasOwnProperty.call(this.header,a)&&e.setRequestHeader(a,this.header[a]);this._responseType&&(e.responseType=this._responseType),this.emit("request",this),e.send(void 0===r?null:r)},p.agent=function(){return new l},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(t){l.prototype[t.toLowerCase()]=function(e,r){var n=new p.Request(t,e);return this._setDefaults(n),r&&n.end(r),n}})),l.prototype.del=l.prototype.delete,p.get=function(t,e,r){var n=p("GET",t);return"function"==typeof e&&(r=e,e=null),e&&n.query(e),r&&n.end(r),n},p.head=function(t,e,r){var n=p("HEAD",t);return"function"==typeof e&&(r=e,e=null),e&&n.query(e),r&&n.end(r),n},p.options=function(t,e,r){var n=p("OPTIONS",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},p.del=T,p.delete=T,p.patch=function(t,e,r){var n=p("PATCH",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},p.post=function(t,e,r){var n=p("POST",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},p.put=function(t,e,r){var n=p("PUT",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n}},function(t,e,r){function n(t){if(t)return function(t){for(var e in n.prototype)t[e]=n.prototype[e];return t}(t)}t.exports=n,n.prototype.on=n.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},n.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<n.length;o++)if((r=n[o])===e||r.fn===e){n.splice(o,1);break}return 0===n.length&&delete this._callbacks["$"+t],this},n.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){n=0;for(var o=(r=r.slice(0)).length;n<o;++n)r[n].apply(this,e)}return this},n.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},n.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e){t.exports=o,o.default=o,o.stable=a,o.stableStringify=a;var r=[],n=[];function o(t,e,o){var i;for(!function t(e,o,i,a){var s;if("object"==typeof e&&null!==e){for(s=0;s<i.length;s++)if(i[s]===e){var c=Object.getOwnPropertyDescriptor(a,o);return void(void 0!==c.get?c.configurable?(Object.defineProperty(a,o,{value:"[Circular]"}),r.push([a,o,e,c])):n.push([e,o]):(a[o]="[Circular]",r.push([a,o,e])))}if(i.push(e),Array.isArray(e))for(s=0;s<e.length;s++)t(e[s],s,i,e);else{var u=Object.keys(e);for(s=0;s<u.length;s++){var l=u[s];t(e[l],l,i,e)}}i.pop()}}(t,"",[],void 0),i=0===n.length?JSON.stringify(t,e,o):JSON.stringify(t,s(e),o);0!==r.length;){var a=r.pop();4===a.length?Object.defineProperty(a[0],a[1],a[3]):a[0][a[1]]=a[2]}return i}function i(t,e){return t<e?-1:t>e?1:0}function a(t,e,o){var a,c=function t(e,o,a,s){var c;if("object"==typeof e&&null!==e){for(c=0;c<a.length;c++)if(a[c]===e){var u=Object.getOwnPropertyDescriptor(s,o);return void(void 0!==u.get?u.configurable?(Object.defineProperty(s,o,{value:"[Circular]"}),r.push([s,o,e,u])):n.push([e,o]):(s[o]="[Circular]",r.push([s,o,e])))}if("function"==typeof e.toJSON)return;if(a.push(e),Array.isArray(e))for(c=0;c<e.length;c++)t(e[c],c,a,e);else{var l={},f=Object.keys(e).sort(i);for(c=0;c<f.length;c++){var p=f[c];t(e[p],p,a,e),l[p]=e[p]}if(void 0===s)return l;r.push([s,o,e]),s[o]=l}a.pop()}}(t,"",[],void 0)||t;for(a=0===n.length?JSON.stringify(c,e,o):JSON.stringify(c,s(e),o);0!==r.length;){var u=r.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}return a}function s(t){return t=void 0!==t?t:function(t,e){return e},function(e,r){if(n.length>0)for(var o=0;o<n.length;o++){var i=n[o];if(i[1]===e&&i[0]===r){r="[Circular]",n.splice(o,1);break}}return t.call(this,e,r)}}},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=r(12);function i(t){if(t)return function(t){for(var e in i.prototype)Object.prototype.hasOwnProperty.call(i.prototype,e)&&(t[e]=i.prototype[e]);return t}(t)}t.exports=i,i.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},i.prototype.parse=function(t){return this._parser=t,this},i.prototype.responseType=function(t){return this._responseType=t,this},i.prototype.serialize=function(t){return this._serializer=t,this},i.prototype.timeout=function(t){if(!t||"object"!==n(t))return this._timeout=t,this._responseTimeout=0,this._uploadTimeout=0,this;for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))switch(e){case"deadline":this._timeout=t.deadline;break;case"response":this._responseTimeout=t.response;break;case"upload":this._uploadTimeout=t.upload;break;default:console.warn("Unknown timeout option",e)}return this},i.prototype.retry=function(t,e){return 0!==arguments.length&&!0!==t||(t=1),t<=0&&(t=0),this._maxRetries=t,this._retries=0,this._retryCallback=e,this};var a=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];i.prototype._shouldRetry=function(t,e){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var r=this._retryCallback(t,e);if(!0===r)return!0;if(!1===r)return!1}catch(t){console.error(t)}if(e&&e.status&&e.status>=500&&501!==e.status)return!0;if(t){if(t.code&&a.includes(t.code))return!0;if(t.timeout&&"ECONNABORTED"===t.code)return!0;if(t.crossDomain)return!0}return!1},i.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},i.prototype.then=function(t,e){var r=this;if(!this._fullfilledPromise){var n=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((function(t,e){n.on("abort",(function(){if(!(r._maxRetries&&r._maxRetries>r._retries))if(r.timedout&&r.timedoutError)e(r.timedoutError);else{var t=new Error("Aborted");t.code="ABORTED",t.status=r.status,t.method=r.method,t.url=r.url,e(t)}})),n.end((function(r,n){r?e(r):t(n)}))}))}return this._fullfilledPromise.then(t,e)},i.prototype.catch=function(t){return this.then(void 0,t)},i.prototype.use=function(t){return t(this),this},i.prototype.ok=function(t){if("function"!=typeof t)throw new Error("Callback required");return this._okCallback=t,this},i.prototype._isResponseOK=function(t){return!!t&&(this._okCallback?this._okCallback(t):t.status>=200&&t.status<300)},i.prototype.get=function(t){return this._header[t.toLowerCase()]},i.prototype.getHeader=i.prototype.get,i.prototype.set=function(t,e){if(o(t)){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&this.set(r,t[r]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},i.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},i.prototype.field=function(t,e){if(null==t)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(o(t)){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&this.field(r,t[r]);return this}if(Array.isArray(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.field(t,e[n]);return this}if(null==e)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof e&&(e=String(e)),this._getFormData().append(t,e),this},i.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},i.prototype._auth=function(t,e,r,n){switch(r.type){case"basic":this.set("Authorization","Basic ".concat(n("".concat(t,":").concat(e))));break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("Authorization","Bearer ".concat(t))}return this},i.prototype.withCredentials=function(t){return void 0===t&&(t=!0),this._withCredentials=t,this},i.prototype.redirects=function(t){return this._maxRedirects=t,this},i.prototype.maxResponseSize=function(t){if("number"!=typeof t)throw new TypeError("Invalid argument");return this._maxResponseSize=t,this},i.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},i.prototype.send=function(t){var e=o(t),r=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(e&&!this._data)Array.isArray(t)?this._data=[]:this._isHost(t)||(this._data={});else if(t&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(e&&o(this._data))for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(this._data[n]=t[n]);else"string"==typeof t?(r||this.type("form"),r=this._header["content-type"],this._data="application/x-www-form-urlencoded"===r?this._data?"".concat(this._data,"&").concat(t):t:(this._data||"")+t):this._data=t;return!e||this._isHost(t)||r||this.type("json"),this},i.prototype.sortQuery=function(t){return this._sort=void 0===t||t,this},i.prototype._finalizeQueryString=function(){var t=this._query.join("&");if(t&&(this.url+=(this.url.includes("?")?"&":"?")+t),this._query.length=0,this._sort){var e=this.url.indexOf("?");if(e>=0){var r=this.url.slice(e+1).split("&");"function"==typeof this._sort?r.sort(this._sort):r.sort(),this.url=this.url.slice(0,e)+"?"+r.join("&")}}},i.prototype._appendQueryString=function(){console.warn("Unsupported")},i.prototype._timeoutError=function(t,e,r){if(!this._aborted){var n=new Error("".concat(t+e,"ms exceeded"));n.timeout=e,n.code="ECONNABORTED",n.errno=r,this.timedout=!0,this.timedoutError=n,this.abort(),this.callback(n)}},i.prototype._setTimeouts=function(){var t=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){t._timeoutError("Timeout of ",t._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){t._timeoutError("Response timeout of ",t._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))}},function(t,e,r){"use strict";var n=r(35);function o(t){if(t)return function(t){for(var e in o.prototype)Object.prototype.hasOwnProperty.call(o.prototype,e)&&(t[e]=o.prototype[e]);return t}(t)}t.exports=o,o.prototype.get=function(t){return this.header[t.toLowerCase()]},o.prototype._setHeaderProperties=function(t){var e=t["content-type"]||"";this.type=n.type(e);var r=n.params(e);for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(this[o]=r[o]);this.links={};try{t.link&&(this.links=n.parseLinks(t.link))}catch(t){}},o.prototype._setStatusProperties=function(t){var e=t/100|0;this.statusCode=t,this.status=this.statusCode,this.statusType=e,this.info=1===e,this.ok=2===e,this.redirect=3===e,this.clientError=4===e,this.serverError=5===e,this.error=(4===e||5===e)&&this.toError(),this.created=201===t,this.accepted=202===t,this.noContent=204===t,this.badRequest=400===t,this.unauthorized=401===t,this.notAcceptable=406===t,this.forbidden=403===t,this.notFound=404===t,this.unprocessableEntity=422===t}},function(t,e,r){"use strict";e.type=function(t){return t.split(/ *; */).shift()},e.params=function(t){return t.split(/ *; */).reduce((function(t,e){var r=e.split(/ *= */),n=r.shift(),o=r.shift();return n&&o&&(t[n]=o),t}),{})},e.parseLinks=function(t){return t.split(/ *, */).reduce((function(t,e){var r=e.split(/ *; */),n=r[0].slice(1,-1);return t[r[1].split(/ *= */)[1].slice(1,-1)]=n,t}),{})},e.cleanHeader=function(t,e){return delete t["content-type"],delete t["content-length"],delete t["transfer-encoding"],delete t.host,e&&(delete t.authorization,delete t.cookie),t}},function(t,e,r){"use strict";function n(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function i(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"].forEach((function(t){i.prototype[t]=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this._defaults.push({fn:t,args:r}),this}})),i.prototype._setDefaults=function(t){this._defaults.forEach((function(e){t[e.fn].apply(t,n(e.args))}))},t.exports=i},function(t,e){t.exports=function(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}},function(t,e,r){(function(e){var r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/,o=/^\./,i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,s=/^\[object .+?Constructor\]$/,c="object"==typeof e&&e&&e.Object===Object&&e,u="object"==typeof self&&self&&self.Object===Object&&self,l=c||u||Function("return this")();var f,p=Array.prototype,h=Function.prototype,d=Object.prototype,y=l["__core-js_shared__"],m=(f=/[^.]+$/.exec(y&&y.keys&&y.keys.IE_PROTO||""))?"Symbol(src)_1."+f:"",b=h.toString,v=d.hasOwnProperty,g=d.toString,T=RegExp("^"+b.call(v).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),O=l.Symbol,w=p.splice,E=L(l,"Map"),_=L(Object,"create"),S=O?O.prototype:void 0,j=S?S.toString:void 0;function x(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function P(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function A(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function I(t,e){for(var r,n,o=t.length;o--;)if((r=t[o][0])===(n=e)||r!=r&&n!=n)return o;return-1}function k(t,e){for(var o,i=0,a=(e=function(t,e){if(U(t))return!1;var o=typeof t;if("number"==o||"symbol"==o||"boolean"==o||null==t||F(t))return!0;return n.test(t)||!r.test(t)||null!=e&&t in Object(e)}(e,t)?[e]:U(o=e)?o:C(o)).length;null!=t&&i<a;)t=t[N(e[i++])];return i&&i==a?t:void 0}function R(t){return!(!M(t)||(e=t,m&&m in e))&&(function(t){var e=M(t)?g.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?T:s).test(function(t){if(null!=t){try{return b.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}function D(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function L(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return R(r)?r:void 0}x.prototype.clear=function(){this.__data__=_?_(null):{}},x.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},x.prototype.get=function(t){var e=this.__data__;if(_){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return v.call(e,t)?e[t]:void 0},x.prototype.has=function(t){var e=this.__data__;return _?void 0!==e[t]:v.call(e,t)},x.prototype.set=function(t,e){return this.__data__[t]=_&&void 0===e?"__lodash_hash_undefined__":e,this},P.prototype.clear=function(){this.__data__=[]},P.prototype.delete=function(t){var e=this.__data__,r=I(e,t);return!(r<0)&&(r==e.length-1?e.pop():w.call(e,r,1),!0)},P.prototype.get=function(t){var e=this.__data__,r=I(e,t);return r<0?void 0:e[r][1]},P.prototype.has=function(t){return I(this.__data__,t)>-1},P.prototype.set=function(t,e){var r=this.__data__,n=I(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},A.prototype.clear=function(){this.__data__={hash:new x,map:new(E||P),string:new x}},A.prototype.delete=function(t){return D(this,t).delete(t)},A.prototype.get=function(t){return D(this,t).get(t)},A.prototype.has=function(t){return D(this,t).has(t)},A.prototype.set=function(t,e){return D(this,t).set(t,e),this};var C=H((function(t){var e;t=null==(e=t)?"":function(t){if("string"==typeof t)return t;if(F(t))return j?j.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}(e);var r=[];return o.test(t)&&r.push(""),t.replace(i,(function(t,e,n,o){r.push(n?o.replace(a,"$1"):e||t)})),r}));function N(t){if("string"==typeof t||F(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function H(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a),a};return r.cache=new(H.Cache||A),r}H.Cache=A;var U=Array.isArray;function M(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function F(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==g.call(t)}t.exports=function(t,e,r){var n=null==t?void 0:k(t,e);return void 0===n?r:n}}).call(this,r(39))},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";var n=r(41),o=r(42),i=r(14);t.exports={formats:i,parse:o,stringify:n}},function(t,e,r){"use strict";var n=r(5),o=r(14),i=Object.prototype.hasOwnProperty,a={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},s=Array.isArray,c=Array.prototype.push,u=function(t,e){c.apply(t,s(e)?e:[e])},l=Date.prototype.toISOString,f=o.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,format:f,formatter:o.formatters[f],indices:!1,serializeDate:function(t){return l.call(t)},skipNulls:!1,strictNullHandling:!1},h=function t(e,r,o,i,a,c,l,f,h,d,y,m,b){var v,g=e;if("function"==typeof l?g=l(r,g):g instanceof Date?g=d(g):"comma"===o&&s(g)&&(g=n.maybeMap(g,(function(t){return t instanceof Date?d(t):t})).join(",")),null===g){if(i)return c&&!m?c(r,p.encoder,b,"key"):r;g=""}if("string"==typeof(v=g)||"number"==typeof v||"boolean"==typeof v||"symbol"==typeof v||"bigint"==typeof v||n.isBuffer(g))return c?[y(m?r:c(r,p.encoder,b,"key"))+"="+y(c(g,p.encoder,b,"value"))]:[y(r)+"="+y(String(g))];var T,O=[];if(void 0===g)return O;if(s(l))T=l;else{var w=Object.keys(g);T=f?w.sort(f):w}for(var E=0;E<T.length;++E){var _=T[E],S=g[_];if(!a||null!==S){var j=s(g)?"function"==typeof o?o(r,_):r:r+(h?"."+_:"["+_+"]");u(O,t(S,j,o,i,a,c,l,f,h,d,y,m,b))}}return O};t.exports=function(t,e){var r,n=t,c=function(t){if(!t)return p;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||p.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=o.default;if(void 0!==t.format){if(!i.call(o.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var n=o.formatters[r],a=p.filter;return("function"==typeof t.filter||s(t.filter))&&(a=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:p.addQueryPrefix,allowDots:void 0===t.allowDots?p.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:p.charsetSentinel,delimiter:void 0===t.delimiter?p.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:p.encode,encoder:"function"==typeof t.encoder?t.encoder:p.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:p.encodeValuesOnly,filter:a,formatter:n,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:p.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:p.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:p.strictNullHandling}}(e);"function"==typeof c.filter?n=(0,c.filter)("",n):s(c.filter)&&(r=c.filter);var l,f=[];if("object"!=typeof n||null===n)return"";l=e&&e.arrayFormat in a?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var d=a[l];r||(r=Object.keys(n)),c.sort&&r.sort(c.sort);for(var y=0;y<r.length;++y){var m=r[y];c.skipNulls&&null===n[m]||u(f,h(n[m],m,d,c.strictNullHandling,c.skipNulls,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.formatter,c.encodeValuesOnly,c.charset))}var b=f.join(c.delimiter),v=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?v+="utf8=%26%2310003%3B&":v+="utf8=%E2%9C%93&"),b.length>0?v+b:""}},function(t,e,r){"use strict";var n=r(5),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},c=function(t,e){return t&&"string"==typeof t&&e.comma&&t.indexOf(",")>-1?t.split(","):t},u=function(t,e,r,n){if(t){var i=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(i),u=s?i.slice(0,s.index):i,l=[];if(u){if(!r.plainObjects&&o.call(Object.prototype,u)&&!r.allowPrototypes)return;l.push(u)}for(var f=0;r.depth>0&&null!==(s=a.exec(i))&&f<r.depth;){if(f+=1,!r.plainObjects&&o.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;l.push(s[1])}return s&&l.push("["+i.slice(s.index)+"]"),function(t,e,r,n){for(var o=n?e:c(e,r),i=t.length-1;i>=0;--i){var a,s=t[i];if("[]"===s&&r.parseArrays)a=[].concat(o);else{a=r.plainObjects?Object.create(null):{};var u="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(u,10);r.parseArrays||""!==u?!isNaN(l)&&s!==u&&String(l)===u&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(a=[])[l]=o:a[u]=o:a={0:o}}o=a}return o}(l,e,r,n)}};t.exports=function(t,e){var r=function(t){if(!t)return a;if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e=void 0===t.charset?a.charset:t.charset;return{allowDots:void 0===t.allowDots?a.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:a.allowPrototypes,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:a.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:a.comma,decoder:"function"==typeof t.decoder?t.decoder:a.decoder,delimiter:"string"==typeof t.delimiter||n.isRegExp(t.delimiter)?t.delimiter:a.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:a.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:a.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:a.strictNullHandling}}(e);if(""===t||null==t)return r.plainObjects?Object.create(null):{};for(var l="string"==typeof t?function(t,e){var r,u={},l=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,f=e.parameterLimit===1/0?void 0:e.parameterLimit,p=l.split(e.delimiter,f),h=-1,d=e.charset;if(e.charsetSentinel)for(r=0;r<p.length;++r)0===p[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===p[r]?d="utf-8":"utf8=%26%2310003%3B"===p[r]&&(d="iso-8859-1"),h=r,r=p.length);for(r=0;r<p.length;++r)if(r!==h){var y,m,b=p[r],v=b.indexOf("]="),g=-1===v?b.indexOf("="):v+1;-1===g?(y=e.decoder(b,a.decoder,d,"key"),m=e.strictNullHandling?null:""):(y=e.decoder(b.slice(0,g),a.decoder,d,"key"),m=n.maybeMap(c(b.slice(g+1),e),(function(t){return e.decoder(t,a.decoder,d,"value")}))),m&&e.interpretNumericEntities&&"iso-8859-1"===d&&(m=s(m)),b.indexOf("[]=")>-1&&(m=i(m)?[m]:m),o.call(u,y)?u[y]=n.combine(u[y],m):u[y]=m}return u}(t,r):t,f=r.plainObjects?Object.create(null):{},p=Object.keys(l),h=0;h<p.length;++h){var d=p[h],y=u(d,l[d],r,"string"==typeof t);f=n.merge(f,y,r)}return n.compact(f)}},function(t,e,r){var n,o,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,o=[r(3),r(6),r(8),r(4)],void 0===(i="function"==typeof(n=function(e,n,o,i){"use strict";var a=r(0);function s(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,i.default)(t);if(e){var a=(0,i.default)(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return(0,o.default)(this,r)}}e=a(e),n=a(n),o=a(o),i=a(i);var c=function(t){(0,n.default)(o,t);var r=s(o);function o(){return(0,e.default)(this,o),r.apply(this,arguments)}return o}(r(17));t.exports=c})?n.apply(e,o):n)||(t.exports=i)},function(t,e){function r(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=r=function(t){return typeof t}:t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(e)}t.exports=r},function(t,e,r){var n=r(4),o=r(7),i=r(46),a=r(47);function s(e){var r="function"==typeof Map?new Map:void 0;return t.exports=s=function(t){if(null===t||!i(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,e)}function e(){return a(t,arguments,n(this).constructor)}return e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),o(e,t)},s(e)}t.exports=s},function(t,e){t.exports=function(t){return-1!==Function.toString.call(t).indexOf("[native code]")}},function(t,e,r){var n=r(7),o=r(48);function i(e,r,a){return o()?t.exports=i=Reflect.construct:t.exports=i=function(t,e,r){var o=[null];o.push.apply(o,e);var i=new(Function.bind.apply(t,o));return r&&n(i,r.prototype),i},i.apply(null,arguments)}t.exports=i},function(t,e){t.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}},function(t,e,r){var n,o,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,o=[r(3),r(6),r(8),r(4)],void 0===(i="function"==typeof(n=function(e,n,o,i){"use strict";var a=r(0);function s(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,i.default)(t);if(e){var a=(0,i.default)(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return(0,o.default)(this,r)}}e=a(e),n=a(n),o=a(o),i=a(i);var c=r(17),u=r(13),l=function(t){(0,n.default)(o,t);var r=s(o);function o(t){var n;(0,e.default)(this,o);var i=t.message,a="RequestError",s=t.status;if(t.response){var c=t.response.body;i=u.get(c,"error.message",u.get(c,"message","Request failed with status code ".concat(s))),a=u.get(c,"error.name","ResponseError")}else t.timeout&&(i="Request timed out after ".concat(t.timeout," ms"),a="RequestTimeoutError");return(n=r.call(this,i)).type=a,s&&(n.statusCode=s),n}return o}(c);t.exports=l})?n.apply(e,o):n)||(t.exports=i)},function(t){t.exports=JSON.parse('{"name":"@workast/sdk","version":"2.3.0","description":"Workast SDK for JavaScript in the browser and Node.js","main":"lib/workast.js","types":"index.d.ts","files":["lib","dist","index.d.ts"],"scripts":{"lint":"eslint --format compact .","test":"NODE_ENV=test nyc mocha \'test/**/*.spec.js\'","coverage":"npm test && nyc report --reporter=text-lcov | coveralls","docs":"jsdoc -c jsdoc.json","build":"webpack","prepublishOnly":"npm run build","version":"node scripts/npm-version-hook.js"},"repository":{"type":"git","url":"git+https://github.com/workast/workast-sdk-js.git"},"keywords":["workast","project management","api"],"author":"Workast <support@workast.com> (http://workast.com/)","license":"MIT","bugs":{"url":"https://github.com/workast/workast-sdk-js/issues"},"homepage":"https://github.com/workast/workast-sdk-js#readme","engines":{"node":">=10.x","npm":">=6.x"},"browserslist":["> 1%","last 2 versions","not dead","maintained node versions"],"devDependencies":{"@babel/core":"^7.8.6","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.6","babel-loader":"^8.1.0","chai":"^4.2.0","chai-as-promised":"^7.1.1","chance":"^1.1.6","clean-webpack-plugin":"^3.0.0","coveralls":"^3.1.0","eslint":"^7.5.0","eslint-config-airbnb-base":"^14.2.0","eslint-plugin-import":"^2.20.1","husky":"^4.2.3","mocha":"^8.0.1","nock":"^13.0.3","nthline":"^1.0.2","nyc":"^15.1.0","sinon":"^9.0.0","webpack":"^4.41.6","webpack-cli":"^3.3.11","webpack-node-externals":"^2.5.0"},"dependencies":{"@babel/runtime":"^7.8.4","lodash.get":"^4.4.2","lodash.isobject":"^3.0.2","qs":"^6.9.4","superagent":"^5.2.2"}}')},function(t,e,r){var n,o,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,o=[],void 0===(i="function"==typeof(n=function(){"use strict";var e=r(52),n=r(55),o=r(56),i=r(57),a=r(58);t.exports={lists:e,notifications:n,tags:o,tasks:i,users:a}})?n.apply(e,o):n)||(t.exports=i)},function(t,e,r){var n,o,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,o=[r(1)],void 0===(i="function"==typeof(n=function(e){"use strict";var n=r(0);function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?o(Object(n),!0).forEach((function(r){(0,e.default)(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}e=n(e);var a=r(2),s=a.generateMethod,c=a.generateBasicMethods,u=a.RESOURCE_PATH,l=a.BASIC_METHODS;t.exports=function(t){return i(i({},c(t,u.LIST,[l.CREATE,l.LIST,l.RETRIEVE,l.UPDATE])),{},{addComment:s(t,{method:"POST",path:"".concat(u.LIST,"/{listId}/activity")}),addParticipants:s(t,{method:"POST",path:"".concat(u.LIST,"/{listId}/participant")}),archive:s(t,{method:"POST",path:"".concat(u.LIST,"/{listId}/archive")}),createAttachment:s(t,{method:"POST",path:"".concat(u.LIST,"/{listId}/attachment")}),createNote:s(t,{method:"POST",path:"".concat(u.LIST,"/{listId}/note")}),createSublist:s(t,{method:"POST",path:"".concat(u.LIST,"/{listId}/sublist")}),deleteAttachment:s(t,{method:"DELETE",path:"".concat(u.LIST,"/{listId}/attachment/{attachmentId}")}),deleteComment:s(t,{method:"DELETE",path:"".concat(u.LIST,"/{listId}/activity/{activityId}")}),deleteSublist:s(t,{method:"DELETE",path:"".concat(u.LIST,"/{listId}/sublist/{sublistId}")}),importTemplate:s(t,{method:"POST",path:"".concat(u.LIST,"/{listId}/import/{templateId}")}),join:s(t,{method:"POST",path:"".concat(u.LIST,"/{listId}/participant/join")}),listActivity:s(t,{method:"GET",path:"".concat(u.LIST,"/{listId}/activity")}),listAttachments:s(t,{method:"GET",path:"".concat(u.LIST,"/{listId}/attachment")}),listParticipants:s(t,{method:"GET",path:"".concat(u.LIST,"/{listId}/participant")}),listNotes:s(t,{method:"GET",path:"".concat(u.LIST,"/{listId}/note")}),moveTasks:s(t,{method:"POST",path:"".concat(u.LIST,"/{listId}/move")}),personal:s(t,{method:"GET",path:"".concat(u.LIST,"/personal")}),removeParticipants:s(t,{method:"DELETE",path:"".concat(u.LIST,"/{listId}/participant")}),retrieveNote:s(t,{method:"GET",path:"".concat(u.LIST,"/{listId}/note/{noteId}")}),unarchive:s(t,{method:"POST",path:"".concat(u.LIST,"/{listId}/unarchive")}),updateAttachment:s(t,{method:"PATCH",path:"".concat(u.LIST,"/{listId}/attachment/{attachmentId}")}),updateComment:s(t,{method:"PATCH",path:"".concat(u.LIST,"/{listId}/activity/{activityId}")}),updateNote:s(t,{method:"PATCH",path:"".concat(u.LIST,"/{listId}/note/{noteId}")}),updateSublist:s(t,{method:"PATCH",path:"".concat(u.LIST,"/{listId}/sublist/{sublistId}")})})}})?n.apply(e,o):n)||(t.exports=i)},function(t,e,r){var n,o,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,o=[r(1)],void 0===(i="function"==typeof(n=function(e){"use strict";var n=r(0);e=n(e);var o=r(18),i=r(19);t.exports=function(t,r,n){var a,s=(a={},(0,e.default)(a,i.CREATE,o(t,{method:"POST",path:r})),(0,e.default)(a,i.LIST,o(t,{method:"GET",path:r})),(0,e.default)(a,i.RETRIEVE,o(t,{method:"GET",path:"".concat(r,"/{id}")})),(0,e.default)(a,i.UPDATE,o(t,{method:"PATCH",path:"".concat(r,"/{id}")})),(0,e.default)(a,i.DELETE,o(t,{method:"DELETE",path:"".concat(r,"/{id}")})),a);return n?n.reduce((function(t,e){return t[e]=s[e],t}),{}):s}})?n.apply(e,o):n)||(t.exports=i)},function(t,e,r){var n,o,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,o=[],void 0===(i="function"==typeof(n=function(){"use strict";t.exports={LIST:"/list",NOTIFICATION:"/notification",TAG:"/tag",TASK:"/task",USER:"/user"}})?n.apply(e,o):n)||(t.exports=i)},function(t,e,r){var n,o,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,o=[r(1)],void 0===(i="function"==typeof(n=function(e){"use strict";var n=r(0);function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?o(Object(n),!0).forEach((function(r){(0,e.default)(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}e=n(e);var a=r(2),s=a.generateMethod,c=a.generateBasicMethods,u=a.RESOURCE_PATH,l=a.BASIC_METHODS;t.exports=function(t){return i(i({},c(t,u.NOTIFICATION,[l.LIST])),{},{markAllAsRead:s(t,{method:"POST",path:"".concat(u.NOTIFICATION,"/read")}),markAsRead:s(t,{method:"POST",path:"".concat(u.NOTIFICATION,"/{notificationId}/read")}),markAsUnread:s(t,{method:"POST",path:"".concat(u.NOTIFICATION,"/{notificationId}/unread")}),retrieveSettings:s(t,{method:"GET",path:"".concat(u.NOTIFICATION,"/settings")}),subscribe:s(t,{method:"POST",path:"".concat(u.NOTIFICATION,"/subscribe")}),unsubscribe:s(t,{method:"POST",path:"".concat(u.NOTIFICATION,"/unsubscribe")}),updateSettings:s(t,{method:"PATCH",path:"".concat(u.NOTIFICATION,"/settings")})})}})?n.apply(e,o):n)||(t.exports=i)},function(t,e,r){var n,o,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,o=[r(1)],void 0===(i="function"==typeof(n=function(e){"use strict";var n=r(0);function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}e=n(e);var i=r(2),a=i.generateBasicMethods,s=i.RESOURCE_PATH,c=i.BASIC_METHODS;t.exports=function(t){return function(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?o(Object(n),!0).forEach((function(r){(0,e.default)(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},a(t,s.TAG,[c.CREATE,c.DELETE,c.LIST,c.UPDATE]))}})?n.apply(e,o):n)||(t.exports=i)},function(t,e,r){var n,o,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,o=[r(1)],void 0===(i="function"==typeof(n=function(e){"use strict";var n=r(0);function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?o(Object(n),!0).forEach((function(r){(0,e.default)(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}e=n(e);var a=r(2),s=a.generateMethod,c=a.generateBasicMethods,u=a.RESOURCE_PATH,l=a.BASIC_METHODS;t.exports=function(t){return i(i({},c(t,u.TASK,[l.RETRIEVE,l.UPDATE,l.DELETE])),{},{create:s(t,{method:"POST",path:"".concat(u.LIST,"/{listId}/task")}),subscribe:s(t,{method:"POST",path:"".concat(u.TASK,"/{id}/follow")}),unsubscribe:s(t,{method:"POST",path:"".concat(u.TASK,"/{id}/unfollow")}),restore:s(t,{method:"POST",path:"".concat(u.TASK,"/{id}/restore")}),complete:s(t,{method:"POST",path:"".concat(u.TASK,"/{id}/done")}),reopen:s(t,{method:"POST",path:"".concat(u.TASK,"/{id}/undone")}),assign:s(t,{method:"POST",path:"".concat(u.TASK,"/{id}/assigned")}),unassign:s(t,{method:"DELETE",path:"".concat(u.TASK,"/{id}/assigned")}),clone:s(t,{method:"POST",path:"".concat(u.TASK,"/{id}/clone")}),search:s(t,{method:"POST",path:"".concat(u.TASK,"/search")}),addTags:s(t,{method:"POST",path:"".concat(u.TASK,"/{id}/tag")}),removeTags:s(t,{method:"DELETE",path:"".concat(u.TASK,"/{id}/tag")}),createAttachment:s(t,{method:"POST",path:"".concat(u.TASK,"/{id}/attachment")}),deleteAttachment:s(t,{method:"DELETE",path:"".concat(u.TASK,"/{id}/attachment/{attachmentId}")}),updateAttachment:s(t,{method:"PATCH",path:"".concat(u.TASK,"/{id}/attachment/{attachmentId}")}),createSubtask:s(t,{method:"POST",path:"".concat(u.TASK,"/{id}/subtask")}),listActivity:s(t,{method:"GET",path:"".concat(u.TASK,"/{id}/activity")}),addComment:s(t,{method:"POST",path:"".concat(u.TASK,"/{id}/activity")}),deleteComment:s(t,{method:"DELETE",path:"".concat(u.TASK,"/{id}/activity/{activityId}")}),updateComment:s(t,{method:"PATCH",path:"".concat(u.TASK,"/{id}/activity/{activityId}")}),markAllNotificationsAsRead:s(t,{method:"POST",path:"".concat(u.TASK,"/{id}/notification/read")})})}})?n.apply(e,o):n)||(t.exports=i)},function(t,e,r){var n,o,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,o=[r(1)],void 0===(i="function"==typeof(n=function(e){"use strict";var n=r(0);function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?o(Object(n),!0).forEach((function(r){(0,e.default)(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}e=n(e);var a=r(2),s=a.generateMethod,c=a.generateBasicMethods,u=a.RESOURCE_PATH,l=a.BASIC_METHODS;t.exports=function(t){return i(i({},c(t,u.USER,[l.LIST,l.RETRIEVE,l.UPDATE])),{},{me:s(t,{method:"GET",path:"".concat(u.USER,"/me")}),invite:s(t,{method:"POST",path:"".concat(u.USER,"/invite")}),activate:s(t,{method:"POST",path:"".concat(u.USER,"/{userId}/activate")}),deactivate:s(t,{method:"POST",path:"".concat(u.USER,"/{userId}/deactivate")})})}})?n.apply(e,o):n)||(t.exports=i)}]);
|
package/index.d.ts
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
declare enum HttpMethod {
|
|
2
|
-
GET = 'GET',
|
|
3
|
-
HEAD = 'HEAD',
|
|
4
|
-
POST = 'POST',
|
|
5
|
-
PUT = 'PUT',
|
|
6
|
-
DELETE = 'DELETE',
|
|
7
|
-
PATCH = 'PATCH'
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
declare enum HttpProgressEventDirection {
|
|
11
|
-
UPLOAD = 'upload',
|
|
12
|
-
DOWNLOAD = 'download'
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
declare interface HttpProgressEvent {
|
|
16
|
-
readonly direction: HttpProgressEventDirection;
|
|
17
|
-
readonly lengthComputable: boolean;
|
|
18
|
-
readonly loaded: number;
|
|
19
|
-
readonly total?: number;
|
|
20
|
-
readonly percent?: number;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
declare interface Impersonate {
|
|
24
|
-
team?: string;
|
|
25
|
-
user?: string;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
declare interface HTTPRequestOptions {
|
|
29
|
-
baseUrl?: string;
|
|
30
|
-
timeout?: number;
|
|
31
|
-
maxRetries?: number;
|
|
32
|
-
method?: HttpMethod;
|
|
33
|
-
path?: string;
|
|
34
|
-
query?: Object;
|
|
35
|
-
body?: Object;
|
|
36
|
-
impersonate?: Impersonate
|
|
37
|
-
onProgress?(event: HttpProgressEvent): void;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
declare interface SDKConfiguration {
|
|
41
|
-
timeout?: number;
|
|
42
|
-
maxRetries?: number;
|
|
43
|
-
apiBaseUrl?: string;
|
|
44
|
-
authBaseUrl?: string;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
declare interface ResourceRequestOptions {
|
|
48
|
-
baseUrl?: string;
|
|
49
|
-
timeout?: number;
|
|
50
|
-
maxRetries?: number;
|
|
51
|
-
impersonate?: Impersonate
|
|
52
|
-
onProgress?(event: HttpProgressEvent): void;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
declare interface ListsResource {
|
|
56
|
-
addComment(listId: string, body: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
57
|
-
addParticipants(listId: string, body: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
58
|
-
archive(listId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
59
|
-
create(body: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
60
|
-
createAttachment(listId: string, body: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
61
|
-
createNote(listId: string, body: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
62
|
-
createSublist(listId: string, body: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
63
|
-
deleteAttachment(listId: string, attachmentId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
64
|
-
deleteComment(listId: string, commentId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
65
|
-
deleteSublist(listId: string, sublistId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
66
|
-
importTemplate(listId: string, templateId: string, body: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
67
|
-
join(listId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
68
|
-
list(query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
69
|
-
listActivity(listId: string, query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
70
|
-
listAttachments(listId: string, query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
71
|
-
listParticipants(listId: string, query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
72
|
-
listNotes(listId: string, query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
73
|
-
moveTasks(listId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
74
|
-
personal(query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
75
|
-
removeParticipants(listId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
76
|
-
retrieve(listId: string, query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
77
|
-
retrieveNote(listId: string, noteId: string, query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
78
|
-
unarchive(listId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
79
|
-
update(listId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
80
|
-
updateAttachment(listId: string, attachmentId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
81
|
-
updateComment(listId: string, commentId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
82
|
-
updateNote(listId: string, noteId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
83
|
-
updateSublist(listId: string, sublistId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
declare interface NotificationsResource {
|
|
87
|
-
list(query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
88
|
-
markAllAsRead(body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
89
|
-
markAsRead(notificationId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
90
|
-
markAsUnread(notificationId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
91
|
-
retrieveSettings(query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
92
|
-
subscribe(body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
93
|
-
unsubscribe(body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
94
|
-
updateSettings(body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
declare interface TagsResource {
|
|
98
|
-
create(body: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
99
|
-
del(tagId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
100
|
-
list(query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
101
|
-
update(tagId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
declare interface TasksResource {
|
|
105
|
-
create(spaceId: string, body: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
106
|
-
retrieve(taskId: string, query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
107
|
-
update(taskId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
108
|
-
del(taskId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
109
|
-
subscribe(taskId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
110
|
-
unsubscribe(taskId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
111
|
-
restore(taskId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
112
|
-
complete(taskId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
113
|
-
reopen(taskId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
114
|
-
assign(taskId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
115
|
-
unassign(taskId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
116
|
-
clone(taskId: string, body?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
117
|
-
search(body: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
118
|
-
addTags(taskId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
119
|
-
removeTags(taskId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
120
|
-
createAttachment(taskId: string, body: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
121
|
-
deleteAttachment(taskId: string, attachmentId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
122
|
-
updateAttachment(taskId: string, attachmentId: string, body: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
123
|
-
createSubtask(taskId: string, body: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
124
|
-
listActivity(taskId: string, query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
125
|
-
addComment(taskId: string, body: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
126
|
-
deleteComment(taskId: string, commentId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
127
|
-
updateComment(taskId: string, commentId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
128
|
-
markAllNotificationsAsRead(taskId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
declare interface UsersResource {
|
|
132
|
-
me(query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
133
|
-
retrieve(userId: string, query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
134
|
-
invite(body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
135
|
-
activate(userId: string, body?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
136
|
-
deactivate(userId: string, body?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
137
|
-
list(query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
138
|
-
update(userId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
declare class Workast {
|
|
142
|
-
static DEFAULT_TIMEOUT: number;
|
|
143
|
-
static DEFAULT_MAX_RETRIES: number;
|
|
144
|
-
static DEFAULT_API_BASE_URL: string;
|
|
145
|
-
static DEFAULT_AUTH_BASE_URL: string;
|
|
146
|
-
static ALLOWED_HTTP_METHODS: HttpMethod[];
|
|
147
|
-
static IMPERSONATE_TEAM_HEADER: string;
|
|
148
|
-
static IMPERSONATE_USER_HEADER: string;
|
|
149
|
-
static AUTHENTICATION_SCHEME: string;
|
|
150
|
-
static DEFAULT_CONTENT_TYPE: string;
|
|
151
|
-
|
|
152
|
-
constructor(token: string, config?: SDKConfiguration);
|
|
153
|
-
|
|
154
|
-
lists: ListsResource;
|
|
155
|
-
notifications: NotificationsResource;
|
|
156
|
-
tags: TagsResource;
|
|
157
|
-
tasks: TasksResource;
|
|
158
|
-
users: UsersResource;
|
|
159
|
-
|
|
160
|
-
apiCall(options?: HTTPRequestOptions): Promise<Object> | Promise<undefined>
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export = Workast;
|